Administering Profiles by Using the netadm Command

The netadm command is used to administer and obtain the status of profiles
(NCPs, locations, ENMs, and WLANs) and NCUs, the individual configuration objects that make
up an NCP. In addition, you can use the netadm command to
interact with the NWAM daemon (nwamd) in the absence of a GUI. For
more information about netadm, see the netadm(1M) man page.

The following netadm subcommands are supported:

enable [ -pprofile-type ] [ -cncu-class ] profile-name

Enables the specified profile. If the profile name is not unique, the profile type must be specified. If the profile type is ncu, and the name is not unique, for example, if there is both a link and an interface ncu with the same name, both NCUs are enabled, unless the -c option is used to specify the NCU class.

The profile type must be one of the following:

ncp

ncu

loc

enm

wlan

The NCU class must be specified as either phys or ip.

disable [- pprofile-type ] [ -cncu-class ] profile-name

Disables the specified profile. If the profile name is not unique, the profile type must be specified to identify the profile that is to be disabled. If the profile type is ncu and the name is not unique, for example, if there is both a link and an interface ncu with the same name, both NCUs will be disabled, unless the -c option is used to specify the NCU class.

The profile type must be one of the following:

ncp

ncu

loc

enm

wlan

The NCU class must be specified as either phys or ip.

list [ -x ] [- pprofile-type ] [ -cncu-class ] [ profile-name ]

Lists all of the available profiles and their current state. Possible state values are listed in the following section. If a profile is specified by name, then only the current state of that profile is listed. If the profile name is not unique, all of the profiles with that given name are listed. Or, the profile type, the NCU class, or both can be included to identify a specific profile. If just the profile type is specified, all of the profiles of that type are listed.

Listing the enabled NCP includes all of the NCUs that make up that NCP.

If the -x option is specified, an expanded description of the state of each listed profile is also included in the output.

Possible profile state values include the following:

disabled

Indicates a manually activated profile that has not been enabled.

offline

Indicates a conditionally activated or system-activated profile that has not been enabled. The profile might not be active because its conditions have not been satisfied. Or, the profile might not be active because another profile with more specific conditions that are met has been activated instead. This condition applies to profile types that must be enabled one at a time, for example, the Location profile.

online

Indicates a conditionally activated or system-activated profile whose conditions have been met and which has been successfully enabled. Or, it might indicate a manually activated profile that has been successfully enabled at the request of the user.

maintenance

Indicates that activation of the profile was attempted, but failed.

initialized

Indicates that the profile represents a valid configuration object for which no action has yet been taken.

uninitialized

Indicates that the profile represents a configuration object that is not present on the system. For example, this state could indicate an NCU that corresponds to a physical link that was removed from the system.

show-events

Listens for a stream of events from the NWAM daemon and displays them.

scan-wifilink-name

Initiates a wireless scan on the link that is specified as link-name.

select-wifilink-name

Selects a wireless network to connect to from scan results on the link that is specified as link-name.