--- libdladm.txt.old	Wed Feb  7 16:00:41 2007
+++ libdladm.txt	Wed Feb  7 15:59:45 2007
@@ -34,8 +34,8 @@
 dladm_set_prop(...)
 {
 	...
-	if (wladm_is_valid(link)) {
-		s = wladm_set_prop(link, ...);
+	if (dladm_wlan_is_valid(link)) {
+		s = dladm_wlan_set_prop(link, ...);
 		....
 		goto save;
 	}
@@ -95,8 +95,8 @@
 dladm_walk_prop(...)
 {
 	...
-	if (wladm_is_valid(link)) {
-		wladm_walk_prop(link, ...);
+	if (dladm_wlan_is_valid(link)) {
+		dladm_wlan_walk_prop(link, ...);
 		return;
 	}
 
@@ -141,8 +141,8 @@
 		return (DLADM_STATUS_OK);
 	}
 
-	if (wladm_is_valid(link)) {
-		s = wladm_get_prop(link, ...);
+	if (dladm_wlan_is_valid(link)) {
+		s = dladm_wlan_get_prop(link, ...);
 		...
 	}
 
--- libwladm.txt	Wed Feb  7 15:57:36 2007
+++ libdlwlan.txt	Fri Mar  9 21:36:51 2007
@@ -1,73 +1,73 @@
-libwladm: WLAN Administration Interface
+libdlwlan.h: WLAN Administration Interface
 ----------------------------------------
 
 1. Core APIs
 ------------
-1.1. wladm_scan()
+1.1. dladm_wlan_scan()
 -----------------
-wladm_status_t
-wladm_scan(const char *link, void *arg,
-    boolean_t (*func)(void *, wladm_wlan_attr_t *));
+dladm_status_t
+dladm_wlan_scan(const char *link, void *arg,
+    boolean_t (*func)(void *, dladm_wlan_attr_t *));
 
 Description:
-wladm_scan() will initiate a scan on the specified link. For each WLAN
+dladm_wlan_scan() will initiate a scan on the specified link. For each WLAN
 discovered, func() will be called with arguments arg and a pointer to
-the WLAN's attributes. If func() returns B_FALSE, wladm_scan() will
+the WLAN's attributes. If func() returns B_FALSE, dladm_wlan_scan() will
 terminate; otherwise, it will continue until all discovered WLANs are
 encountered.
 
 The attributes structure contains:
-typedef struct wladm_wlan_attr {
+typedef struct dladm_wlan_wlan_attr {
 	uint_t			wa_valid;
-	wladm_essid_t		wa_essid;
-	wladm_bssid_t		wa_bssid;
-	wladm_secmode_t		wa_secmode;
-	wladm_strength_t	wa_strength;
-	wladm_mode_t		wa_mode;
-	wladm_speed_t		wa_speed;
-	wladm_auth_t		wa_auth;
-	wladm_bsstype_t		wa_bsstype;
-	wladm_channel_t		wa_channel;
-} wladm_wlan_attr_t;
+	dladm_wlan_essid_t	wa_essid;
+	dladm_wlan_bssid_t	wa_bssid;
+	dladm_wlan_secmode_t	wa_secmode;
+	dladm_wlan_strength_t	wa_strength;
+	dladm_wlan_mode_t	wa_mode;
+	dladm_wlan_speed_t	wa_speed;
+	dladm_wlan_auth_t	wa_auth;
+	dladm_wlan_bsstype_t	wa_bsstype;
+	dladm_wlan_channel_t	wa_channel;
+} dladm_wlan_attr_t;
 
 wa_valid is a bitfield used for indicating the validity of each attribute.
 wa_valid may have 0 or more of the following bits set:
-	WLADM_WLAN_ATTR_ESSID
-	WLADM_WLAN_ATTR_BSSID
-	WLADM_WLAN_ATTR_ENCR
-	WLADM_WLAN_ATTR_STRENGTH
-	WLADM_WLAN_ATTR_MODE
-	WLADM_WLAN_ATTR_SPEED
-	WLADM_WLAN_ATTR_AUTH
-	WLADM_WLAN_ATTR_BSSTYPE
-	WLADM_WLAN_ATTR_CHANNEL
+	DLADM_WLAN_ATTR_ESSID
+	DLADM_WLAN_ATTR_BSSID
+	DLADM_WLAN_ATTR_ENCR
+	DLADM_WLAN_ATTR_STRENGTH
+	DLADM_WLAN_ATTR_MODE
+	DLADM_WLAN_ATTR_SPEED
+	DLADM_WLAN_ATTR_AUTH
+	DLADM_WLAN_ATTR_BSSTYPE
+	DLADM_WLAN_ATTR_CHANNEL
 
 Return values:
-WLADM_STATUS_OK is returned if the scan succeeds (regardless of whether
+DLADM_STATUS_OK is returned if the scan succeeds (regardless of whether
 or not WLANs are discovered).
 
-WLADM_STATUS_BADARG is returned if the specified link is NULL or is
+DLADM_STATUS_BADARG is returned if the specified link is NULL or is
 not a wireless link.
 
-WLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
+DLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
 
-WLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
+DLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
 
-WLADM_STATUS_FAILED is returned if a scan cannot be initiated due to a
+DLADM_STATUS_FAILED is returned if a scan cannot be initiated due to a
 hardware related issue.
 
 
-1.2. wladm_connect()
+1.2. dladm_wlan_connect()
 --------------------
-wladm_status_t
-wladm_connect(const char *link, wladm_wlan_attr_t *attrp,
+dladm_status_t
+dladm_wlan_connect(const char *link, dladm_wlan_attr_t *attrp,
     int timeout, void *keys, uint_t key_count, uint_t flags);
 
 Description:
-wladm_connect() will first initiate a scan on the specified link.
+dladm_wlan_connect() will first initiate a scan on the specified link.
 The discovered WLANs will then be maintained internally as a list of
-wladm_wlan_attr_t. Next, if attr is non-NULL and the attr->wa_valid
-bitfield contains one or more bits set (see 1.1), wladm_connect()
+dladm_wlan_attr_t. Next, if attr is non-NULL and the attr->wa_valid
+bitfield contains one or more bits set (see 1.1), dladm_wlan_connect()
 will walk its WLAN list and remove the ones which do not have the
 attributes specified in attr. If attr is NULL, the WLAN list will be
 left unfiltered.
@@ -82,9 +82,9 @@
 enabled.
 
 The following flags are supported:
-WLADM_OPT_CREATEIBSS:
+DLADM_WLAN_CONNECT_CREATEIBSS:
 If this flag is set and the bsstype attribute attr->wa_bsstype is
-set to WLADM_BSSTYPE_IBSS:
+set to DLADM_WLAN_BSSTYPE_IBSS:
 -If the essid attribute attr->wa_essid is specified and there exists
  no WLAN on the discovered WLAN with this particular essid, an adhoc
  WLAN with essid equal to attr->wa_essid will be created.
@@ -91,113 +91,113 @@
 -If the essid attribute is not specified, an adhoc WLAN with a random
  essid will be created, irrespective of which WLANs are available.
 
-WLADM_OPT_NOSCAN:
-If this flag is set, wladm_connect() will, without doing a scan,
+DLADM_WLAN_CONNECT_NOSCAN:
+If this flag is set, dladm_wlan_connect() will, without doing a scan,
 attempt to associate with a WLAN with attributes most closely matching
 attributes specified in attrp.
 
 Return values:
-WLADM_STATUS_OK is returned if connect has succeeded on one of the
+DLADM_STATUS_OK is returned if connect has succeeded on one of the
 discovered WLANs or if an adhoc WLAN has been created.
 
-WLADM_STATUS_BADARG is returned if any of the specified arguments
+DLADM_STATUS_BADARG is returned if any of the specified arguments
 contain invalid values (e.g.illegal values in attr, keys == NULL but
 key_count > 0)
 
-WLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
+DLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
 
-WLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
+DLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
 
-WLADM_STATUS_ISCONN is returned if the specified link is already connected
+DLADM_STATUS_ISCONN is returned if the specified link is already connected
 to a WLAN.
 
-WLADM_STATUS_NOTFOUND is returned if no non-hidden WLANs are within range.
+DLADM_STATUS_NOTFOUND is returned if no non-hidden WLANs are within range.
 
-WLADM_STATUS_FAILED is returned if a scan or connect cannot be initiated
+DLADM_STATUS_FAILED is returned if a scan or connect cannot be initiated
 due to a hardware related issue.
 
 
-1.3. wladm_disconnect()
+1.3. dladm_wlan_disconnect()
 ----------------------------
-wladm_status_t
-wladm_disconnect(const char *link);
+dladm_status_t
+dladm_wlan_disconnect(const char *link);
 
 Description:
-wladm_disconnect() will initiate a disconnect on the specified link.
+dladm_wlan_disconnect() will initiate a disconnect on the specified link.
 
 Return values:
-WLADM_STATUS_OK is returned if disconnect succeeds.
+DLADM_STATUS_OK is returned if disconnect succeeds.
 
-WLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
+DLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
 
-WLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
+DLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
 
-WLADM_STATUS_NOTCONN is returned if the specified link isn't connected
+DLADM_STATUS_NOTCONN is returned if the specified link isn't connected
 to any WLAN.
 
-WLADM_STATUS_FAILED is returned if the disconnect cannot succeed due to
+DLADM_STATUS_FAILED is returned if the disconnect cannot succeed due to
 a hardware issue.
 
 
-1.4. wladm_get_link_attr()
+1.4. dladm_wlan_get_link_attr()
 --------------------------
-wladm_status_t
-wladm_get_link_attr(const char *link, wladm_link_attr_t *attrp);
+dladm_status_t
+dladm_wlan_get_link_attr(const char *link, dladm_wlan_link_attr_t *attrp);
 
 Description:
-wladm_get_link_attr() queries the specified link for its attributes and
+dladm_wlan_get_link_attr() queries the specified link for its attributes and
 fills in the following structure:
 
-typedef struct wladm_link_attr {
+typedef struct dladm_wlan_link_attr {
 	uint_t			la_valid;
-	wladm_linkstatus_t	la_status;
-	wladm_wlan_attr_t	la_wlan_attr;
-} wladm_link_attr_t;
+	dladm_wlan_linkstatus_t	la_status;
+	dladm_wlan_attr_t	la_wlan_attr;
+} dladm_wlan_link_attr_t;
 
 la_valid is a bitfield which specifies which attributes within this
 structure are valid. la_valid may have 0 or more of the following bits set:
-	WLADM_LINK_ATTR_STATUS
-	WLADM_LINK_ATTR_WLAN
+	DLADM_WLAN_LINKATTR_STATUS
+	DLADM_WLAN_LINKATTR_WLAN
 
 la_wlan_attr holds the wlan attributes and is only valid when la_status is
-WLADM_LINKSTATUS_CONNECTED.
+DLADM_WLAN_LINKSTATUS_CONNECTED.
 
 Return values:
-WLADM_STATUS_OK is returned if attributes are successfully obtained from
+DLADM_STATUS_OK is returned if attributes are successfully obtained from
 the specified link.
 
-WLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
+DLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
 
-WLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
+DLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
 
-WLADM_STATUS_BADARG is returned if link or attr is NULL or if link is not
+DLADM_STATUS_BADARG is returned if link or attr is NULL or if link is not
 a wireless link.
 
-WLADM_STATUS_FAILED is returned if the link attributes cannot be retrieved
+DLADM_STATUS_FAILED is returned if the link attributes cannot be retrieved
 due to a hardware issue.
 
 
-1.5. wladm_walk()
+1.5. dladm_wlan_walk()
 ----------------------
-wladm_status_t
-wladm_walk(void *arg, boolean_t (*func)(void *, const char *));
+dladm_status_t
+dladm_wlan_walk(void *arg, boolean_t (*func)(void *, const char *));
 
 Description:
 For each wireless link in the system, func() will be called with arguments
-arg and the link name. If func() returns B_FALSE, wladm_walk() will
+arg and the link name. If func() returns B_FALSE, dladm_wlan_walk() will
 terminate; otherwise, it will continue until all wireless links are
 encountered.
 
 Return values:
-WLADM_STATUS_OK is returned if the operation is successful.
+DLADM_STATUS_OK is returned if the operation is successful.
 
-WLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
+DLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
 
 
-1.6. wladm_is_valid()
+1.6. dladm_wlan_is_valid()
 --------------------
 boolean_t
-wladm_is_valid(const char *link);
+dladm_wlan_is_valid(const char *link);
 
 Description:
 Determines if the specified link is a valid wireless link.
@@ -209,14 +209,14 @@
 
 2. Link property APIs
 ---------------------
-2.1 wladm_set_prop()
+2.1 dladm_wlan_set_prop()
 --------------------
-wladm_status_t
-wladm_set_prop(const char *link, const char *prop_name, char **prop_val,
+dladm_status_t
+dladm_wlan_set_prop(const char *link, const char *prop_name, char **prop_val,
     uint_t val_cnt);
 
 Description:
-wladm_set_prop() assigns the value(s) in the array prop_val (of size
+dladm_wlan_set_prop() assigns the value(s) in the array prop_val (of size
 val_cnt) to the property prop_name on the specified link. If prop_val is
 NULL, the property prop_name will be set to its default value(s). If
 prop_name is NULL, all properties on the specified link will be set to
@@ -231,70 +231,71 @@
 powermode	off			off, fast, maximum	no
 
 Return Values:
-WLADM_STATUS_OK is returned if the operation is successful.
+DLADM_STATUS_OK is returned if the operation is successful.
 
-WLADM_STATUS_BADARG is returned if any of the specified arguments are invalid.
+DLADM_STATUS_BADARG is returned if any of the specified arguments are invalid.
 
-WLADM_STATUS_PROPRDONLY is returned the specified property is read-only.
+DLADM_STATUS_PROPRDONLY is returned the specified property is read-only.
 
-WLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
+DLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
 
-WLADM_STATUS_NOTSUP is returned if the operation is not supported by the
+DLADM_STATUS_NOTSUP is returned if the operation is not supported by the
 underlying driver.
 
-WLADM_STATUS_BADVALCNT is returned if the number of values provided is invalid.
+DLADM_STATUS_BADVALCNT is returned if the number of values provided is invalid.
 
-WLADM_STATUS_FAILED is returned if the specified property cannot be set to
+DLADM_STATUS_FAILED is returned if the specified property cannot be set to
 the desired value(s).
 
 
-2.2. wladm_walk_prop()
+2.2. dladm_wlan_walk_prop()
 ----------------------
-wladm_status_t
-wladm_walk_prop(const char *link, void *arg,
+dladm_status_t
+dladm_wlan_walk_prop(const char *link, void *arg,
     boolean_t (*func)(void *, const char *));
 
 Description:
-For each property belonging to the specified link, wladm_walk_prop() will
+For each property belonging to the specified link, dladm_wlan_walk_prop() will
 call func() with arguments arg and the property's name. If func() returns
-B_FALSE, wladm_walk_prop() will terminate; otherwise, it will continue until
-all properties are encountered.
+B_FALSE, dladm_wlan_walk_prop() will terminate; otherwise, it will continue
+until all properties are encountered.
 
 Return Values:
-WLADM_STATUS_OK is returned always.
+DLADM_STATUS_OK is returned always.
 
 
-2.3. wladm_get_prop()
+2.3. dladm_wlan_get_prop()
 ---------------------
-wladm_status_t
-wladm_get_prop(const char *link, wladm_prop_type_t type, const char *prop_name,
-    char **prop_val, uint_t *val_cntp);
+dladm_status_t
+dladm_wlan_get_prop(const char *link, dladm_wlan_prop_type_t type,
+    const char *prop_name, char **prop_val, uint_t *val_cntp);
 
 Description:
-wladm_get_prop() obtains the specified property value(s) from the specified
-link. type can be one of WLADM_PROP_VAL_CURRENT, WLADM_PROP_VAL_DEFAULT, or
-WLADM_PROP_VAL_MODIFIABLE. prop_name specifies the name of the property whose
-value(s) is/are to be retrieved. prop_val is a string array of size *val_cntp
-used for storing the retrieved property value(s). If no error occurs,
-wladm_get_prop() will set *val_cntp to the actual number of values retrieved
-upon return; otherwise, *val_cntp will be left unmodified.
+dladm_wlan_get_prop() obtains the specified property value(s) from the
+specified link. type can be one of DLADM_WLAN_PROP_VAL_CURRENT,
+DLADM_WLAN_PROP_VAL_DEFAULT, or DLADM_WLAN_PROP_VAL_MODIFIABLE. prop_name
+specifies the name of the property whose value(s) is/are to be retrieved.
+prop_val is a string array of size *val_cntp used for storing the retrieved
+property value(s). If no error occurs, dladm_wlan_get_prop() will set
+*val_cntp to the actual number of values retrieved upon return; otherwise,
+*val_cntp will be left unmodified.
 
 Return Values:
-WLADM_STATUS_OK is returned if the operation is successful.
+DLADM_STATUS_OK is returned if the operation is successful.
 
-WLADM_STATUS_BADARG is returned if any of the specified arguments are invalid.
+DLADM_STATUS_BADARG is returned if any of the specified arguments are invalid.
 
-WLADM_STATUS_TOOSMALL is returned if the array prop_val is not large enough
+DLADM_STATUS_TOOSMALL is returned if the array prop_val is not large enough
 to hold the retrieved values.
 
-WLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
+DLADM_STATUS_LINKINVAL is returned if the specified link is invalid.
 
-WLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
+DLADM_STATUS_NOMEM is returned if a memory allocation failure has occurred.
 
-WLADM_STATUS_NOTSUP is returned if the operation is not supported by the
+DLADM_STATUS_NOTSUP is returned if the operation is not supported by the
 underlying driver.
 
-WLADM_STATUS_FAILED is returned if the specified property value(s) cannot
+DLADM_STATUS_FAILED is returned if the specified property value(s) cannot
 be retrieved.
 
 
@@ -304,33 +305,33 @@
 ----------------------
 The following routines convert wladm datatypes to strings. The 2nd argument
 is the buffer to which the converted string will be written. This buffer
-will be returned to the caller. Its size must be at least WLADM_STRSIZE
+will be returned to the caller. Its size must be at least DLADM_WLAN_STRSIZE
 bytes.
 
-const char *wladm_essid2str(wladm_essid_t *, char *);
-const char *wladm_bssid2str(wladm_bssid_t *, char *);
-const char *wladm_secmode2str(wladm_secmode_t *, char *);
-const char *wladm_strength2str(wladm_strength_t *, char *);
-const char *wladm_mode2str(wladm_mode_t *, char *);
-const char *wladm_speed2str(wladm_speed_t *, char *);
-const char *wladm_auth2str(wladm_auth_t *, char *);
-const char *wladm_bsstype2str(wladm_bsstype_t *, char *);
-const char *wladm_linkstatus2str(wladm_linkstatus_t *, char *);
-const char *wladm_status2str(wladm_status_t, char *);
+const char *dladm_wlan_essid2str(dladm_wlan_essid_t *, char *);
+const char *dladm_wlan_bssid2str(dladm_wlan_bssid_t *, char *);
+const char *dladm_wlan_secmode2str(dladm_wlan_secmode_t *, char *);
+const char *dladm_wlan_strength2str(dladm_wlan_strength_t *, char *);
+const char *dladm_wlan_mode2str(dladm_wlan_mode_t *, char *);
+const char *dladm_wlan_speed2str(dladm_wlan_speed_t *, char *);
+const char *dladm_wlan_auth2str(dladm_wlan_auth_t *, char *);
+const char *dladm_wlan_bsstype2str(dladm_wlan_bsstype_t *, char *);
+const char *dladm_wlan_linkstatus2str(dladm_wlan_linkstatus_t *, char *);
+const char *dladm_wlan_status2str(dladm_status_t, char *);
 
 3.2 String to datatype
 ----------------------
-The following routines convert strings to wladm datatypes. WLADM_STATUS_OK
-is returned if conversion is successful. WLADM_STATUS_BADARG is returned if
+The following routines convert strings to wladm datatypes. DLADM_STATUS_OK
+is returned if conversion is successful. DLADM_STATUS_BADARG is returned if
 conversion is unsuccessful.
 
-wladm_status_t wladm_str2essid(const char *, wladm_essid_t *);
-wladm_status_t wladm_str2bssid(const char *, wladm_bssid_t *);
-wladm_status_t wladm_str2secmode(const char *, wladm_secmode_t *);
-wladm_status_t wladm_str2strength(const char *, wladm_strength_t *);
-wladm_status_t wladm_str2mode(const char *, wladm_mode_t *);
-wladm_status_t wladm_str2speed(const char *, wladm_speed_t *);
-wladm_status_t wladm_str2auth(const char *, wladm_auth_t *);
-wladm_status_t wladm_str2bsstype(const char *, wladm_bsstype_t *);
-wladm_status_t wladm_str2linkstatus(const char *, wladm_linkstatus_t *);
-
+dladm_status_t dladm_wlan_str2essid(const char *, dladm_wlan_essid_t *);
+dladm_status_t dladm_wlan_str2bssid(const char *, dladm_wlan_bssid_t *);
+dladm_status_t dladm_wlan_str2secmode(const char *, dladm_wlan_secmode_t *);
+dladm_status_t dladm_wlan_str2strength(const char *, dladm_wlan_strength_t *);
+dladm_status_t dladm_wlan_str2mode(const char *, dladm_wlan_mode_t *);
+dladm_status_t dladm_wlan_str2speed(const char *, dladm_wlan_speed_t *);
+dladm_status_t dladm_wlan_str2auth(const char *, dladm_wlan_auth_t *);
+dladm_status_t dladm_wlan_str2bsstype(const char *, dladm_wlan_bsstype_t *);
+dladm_status_t dladm_wlan_str2linkstatus(const char *,
+    dladm_wlan_linkstatus_t *);
