summaryrefslogtreecommitdiff
path: root/deleted_files
diff options
context:
space:
mode:
authoryz147064 <none@none>2007-03-21 09:48:58 -0700
committeryz147064 <none@none>2007-03-21 09:48:58 -0700
commitf595a68a3b8953a12aa778c2abd7642df8da8c3a (patch)
tree1cef70a487a4a4ae84778794fcbf4a6853b9b2b5 /deleted_files
parent880e0df1f057217de7e4bf18b04b73d93730bdfa (diff)
downloadillumos-gate-f595a68a3b8953a12aa778c2abd7642df8da8c3a.tar.gz
PSARC 2007/140 libdladm restructure
6329535 the use_cache argument of macadm_walk function should be removed 6454340 macadm_walk leaks 6509525 wrong error code when adding/removing ports to/from an aggregation 6509532 aggregation deleting fails but system reports success 6518572 the reference to dls_vlan should be released if setzoneid fails 6520149 show-linkprop stops showing full list of link properties if it fails to display one property 6535220 potential complicated library dependency and code duplication between libdladm and its friends --HG-- rename : usr/src/lib/liblaadm/Makefile => deleted_files/usr/src/lib/liblaadm/Makefile rename : usr/src/lib/liblaadm/Makefile.com => deleted_files/usr/src/lib/liblaadm/Makefile.com rename : usr/src/lib/liblaadm/common/llib-llaadm => deleted_files/usr/src/lib/liblaadm/common/llib-llaadm rename : usr/src/lib/liblaadm/common/mapfile-vers => deleted_files/usr/src/lib/liblaadm/common/mapfile-vers rename : usr/src/lib/liblaadm/i386/Makefile => deleted_files/usr/src/lib/liblaadm/i386/Makefile rename : usr/src/lib/liblaadm/sparc/Makefile => deleted_files/usr/src/lib/liblaadm/sparc/Makefile rename : usr/src/lib/libmacadm/Makefile => deleted_files/usr/src/lib/libmacadm/Makefile rename : usr/src/lib/libmacadm/Makefile.com => deleted_files/usr/src/lib/libmacadm/Makefile.com rename : usr/src/lib/libmacadm/common/libmacadm.c => deleted_files/usr/src/lib/libmacadm/common/libmacadm.c rename : usr/src/lib/libmacadm/common/libmacadm.h => deleted_files/usr/src/lib/libmacadm/common/libmacadm.h rename : usr/src/lib/libmacadm/common/llib-lmacadm => deleted_files/usr/src/lib/libmacadm/common/llib-lmacadm rename : usr/src/lib/libmacadm/common/mapfile-vers => deleted_files/usr/src/lib/libmacadm/common/mapfile-vers rename : usr/src/lib/libmacadm/i386/Makefile => deleted_files/usr/src/lib/libmacadm/i386/Makefile rename : usr/src/lib/libmacadm/sparc/Makefile => deleted_files/usr/src/lib/libmacadm/sparc/Makefile rename : usr/src/lib/libwladm/Makefile => deleted_files/usr/src/lib/libwladm/Makefile rename : usr/src/lib/libwladm/Makefile.com => deleted_files/usr/src/lib/libwladm/Makefile.com rename : usr/src/lib/libwladm/common/llib-lwladm => deleted_files/usr/src/lib/libwladm/common/llib-lwladm rename : usr/src/lib/libwladm/common/mapfile-vers => deleted_files/usr/src/lib/libwladm/common/mapfile-vers rename : usr/src/lib/libwladm/i386/Makefile => deleted_files/usr/src/lib/libwladm/i386/Makefile rename : usr/src/lib/libwladm/libwladm.xcl => deleted_files/usr/src/lib/libwladm/libwladm.xcl rename : usr/src/lib/libwladm/sparc/Makefile => deleted_files/usr/src/lib/libwladm/sparc/Makefile rename : usr/src/lib/liblaadm/common/liblaadm.c => usr/src/lib/libdladm/common/libdlaggr.c rename : usr/src/lib/liblaadm/common/liblaadm.h => usr/src/lib/libdladm/common/libdlaggr.h rename : usr/src/lib/libwladm/common/libwladm.c => usr/src/lib/libdladm/common/libdlwlan.c rename : usr/src/lib/libwladm/common/libwladm.h => usr/src/lib/libdladm/common/libdlwlan.h rename : usr/src/lib/libwladm/common/libwladm_impl.h => usr/src/lib/libdladm/common/libdlwlan_impl.h
Diffstat (limited to 'deleted_files')
-rw-r--r--deleted_files/usr/src/lib/liblaadm/Makefile62
-rw-r--r--deleted_files/usr/src/lib/liblaadm/Makefile.com53
-rw-r--r--deleted_files/usr/src/lib/liblaadm/common/llib-llaadm32
-rw-r--r--deleted_files/usr/src/lib/liblaadm/common/mapfile-vers49
-rw-r--r--deleted_files/usr/src/lib/liblaadm/i386/Makefile31
-rw-r--r--deleted_files/usr/src/lib/liblaadm/sparc/Makefile31
-rw-r--r--deleted_files/usr/src/lib/libmacadm/Makefile62
-rw-r--r--deleted_files/usr/src/lib/libmacadm/Makefile.com53
-rw-r--r--deleted_files/usr/src/lib/libmacadm/common/libmacadm.c137
-rw-r--r--deleted_files/usr/src/lib/libmacadm/common/libmacadm.h46
-rw-r--r--deleted_files/usr/src/lib/libmacadm/common/llib-lmacadm32
-rw-r--r--deleted_files/usr/src/lib/libmacadm/common/mapfile-vers33
-rw-r--r--deleted_files/usr/src/lib/libmacadm/i386/Makefile31
-rw-r--r--deleted_files/usr/src/lib/libmacadm/sparc/Makefile31
-rw-r--r--deleted_files/usr/src/lib/libwladm/Makefile63
-rw-r--r--deleted_files/usr/src/lib/libwladm/Makefile.com51
-rw-r--r--deleted_files/usr/src/lib/libwladm/common/llib-lwladm31
-rw-r--r--deleted_files/usr/src/lib/libwladm/common/mapfile-vers60
-rw-r--r--deleted_files/usr/src/lib/libwladm/i386/Makefile30
-rw-r--r--deleted_files/usr/src/lib/libwladm/libwladm.xcl52
-rw-r--r--deleted_files/usr/src/lib/libwladm/sparc/Makefile30
21 files changed, 1000 insertions, 0 deletions
diff --git a/deleted_files/usr/src/lib/liblaadm/Makefile b/deleted_files/usr/src/lib/liblaadm/Makefile
new file mode 100644
index 0000000000..aad578c055
--- /dev/null
+++ b/deleted_files/usr/src/lib/liblaadm/Makefile
@@ -0,0 +1,62 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include $(SRC)/lib/Makefile.lib
+
+HDRS = liblaadm.h
+HDRDIR = common
+
+SUBDIRS = $(MACH)
+
+POFILE = liblaadm.po
+MSGFILES = common/liblaadm.c
+
+all := TARGET = all
+clean := TARGET = clean
+clobber := TARGET = clobber
+install := TARGET = install
+lint := TARGET = lint
+
+.KEEP_STATE:
+
+all clean clobber install lint: $(SUBDIRS)
+
+install_h: $(ROOTHDRS)
+
+check: $(CHECKHDRS)
+
+$(POFILE): pofile_MSGFILES
+
+_msg: $(MSGDOMAINPOFILE)
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
+include $(SRC)/Makefile.msg.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/deleted_files/usr/src/lib/liblaadm/Makefile.com b/deleted_files/usr/src/lib/liblaadm/Makefile.com
new file mode 100644
index 0000000000..45b019e06e
--- /dev/null
+++ b/deleted_files/usr/src/lib/liblaadm/Makefile.com
@@ -0,0 +1,53 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+LIBRARY = liblaadm.a
+VERS = .1
+OBJECTS = liblaadm.o
+
+include ../../Makefile.lib
+
+# install this library in the root filesystem
+include ../../Makefile.rootfs
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+LDLIBS += -lsocket -lc
+
+SRCDIR = ../common
+$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
+
+CFLAGS += $(CCVERBOSE)
+CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+lint: lintcheck
+
+include $(SRC)/lib/Makefile.targ
diff --git a/deleted_files/usr/src/lib/liblaadm/common/llib-llaadm b/deleted_files/usr/src/lib/liblaadm/common/llib-llaadm
new file mode 100644
index 0000000000..89c81d1dfe
--- /dev/null
+++ b/deleted_files/usr/src/lib/liblaadm/common/llib-llaadm
@@ -0,0 +1,32 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <liblaadm.h>
diff --git a/deleted_files/usr/src/lib/liblaadm/common/mapfile-vers b/deleted_files/usr/src/lib/liblaadm/common/mapfile-vers
new file mode 100644
index 0000000000..41f5be656b
--- /dev/null
+++ b/deleted_files/usr/src/lib/liblaadm/common/mapfile-vers
@@ -0,0 +1,49 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+SUNWprivate_1.1 {
+ global:
+ laadm_add;
+ laadm_create;
+ laadm_delete;
+ laadm_diag;
+ laadm_down;
+ laadm_lacp_mode_to_str;
+ laadm_lacp_timer_to_str;
+ laadm_mac_addr_to_str;
+ laadm_modify;
+ laadm_policy_to_str;
+ laadm_remove;
+ laadm_str_to_lacp_mode;
+ laadm_str_to_lacp_timer;
+ laadm_str_to_mac_addr;
+ laadm_str_to_policy;
+ laadm_up;
+ laadm_walk_sys;
+ local:
+ *;
+};
diff --git a/deleted_files/usr/src/lib/liblaadm/i386/Makefile b/deleted_files/usr/src/lib/liblaadm/i386/Makefile
new file mode 100644
index 0000000000..7eae19fff7
--- /dev/null
+++ b/deleted_files/usr/src/lib/liblaadm/i386/Makefile
@@ -0,0 +1,31 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/deleted_files/usr/src/lib/liblaadm/sparc/Makefile b/deleted_files/usr/src/lib/liblaadm/sparc/Makefile
new file mode 100644
index 0000000000..7eae19fff7
--- /dev/null
+++ b/deleted_files/usr/src/lib/liblaadm/sparc/Makefile
@@ -0,0 +1,31 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/deleted_files/usr/src/lib/libmacadm/Makefile b/deleted_files/usr/src/lib/libmacadm/Makefile
new file mode 100644
index 0000000000..2858be8fdc
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/Makefile
@@ -0,0 +1,62 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include $(SRC)/lib/Makefile.lib
+
+HDRS = libmacadm.h
+HDRDIR = common
+
+SUBDIRS = $(MACH)
+
+POFILE = libmacadm.po
+MSGFILES = common/libmacadm.c
+
+all := TARGET = all
+clean := TARGET = clean
+clobber := TARGET = clobber
+install := TARGET = install
+lint := TARGET = lint
+
+.KEEP_STATE:
+
+all clean clobber install lint: $(SUBDIRS)
+
+install_h: $(ROOTHDRS)
+
+check: $(CHECKHDRS)
+
+$(POFILE): pofile_MSGFILES
+
+_msg: $(MSGDOMAINPOFILE)
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
+include $(SRC)/Makefile.msg.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/deleted_files/usr/src/lib/libmacadm/Makefile.com b/deleted_files/usr/src/lib/libmacadm/Makefile.com
new file mode 100644
index 0000000000..a6fb192048
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/Makefile.com
@@ -0,0 +1,53 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+LIBRARY = libmacadm.a
+VERS = .1
+OBJECTS = libmacadm.o
+
+include ../../Makefile.lib
+
+# install this library in the root filesystem
+include ../../Makefile.rootfs
+
+LIBS = $(DYNLIB) $(LINTLIB)
+
+LDLIBS += -ldevinfo -lc
+
+SRCDIR = ../common
+$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
+
+CFLAGS += $(CCVERBOSE)
+CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
+
+.KEEP_STATE:
+
+all: $(LIBS) fnamecheck
+
+lint: lintcheck
+
+include $(SRC)/lib/Makefile.targ
diff --git a/deleted_files/usr/src/lib/libmacadm/common/libmacadm.c b/deleted_files/usr/src/lib/libmacadm/common/libmacadm.c
new file mode 100644
index 0000000000..9e6061099d
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/common/libmacadm.c
@@ -0,0 +1,137 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stropts.h>
+#include <sys/dld.h>
+#include <libdevinfo.h>
+
+#define _KERNEL
+#include <sys/sysmacros.h>
+#undef _KERNEL
+
+/*
+ * MAC Administration Library.
+ *
+ * This library is used by administration tools such as dladm(1M) to
+ * iterate through the list of MAC interfaces
+ *
+ */
+
+typedef struct macadm_dev {
+ char md_name[MAXNAMELEN];
+ struct macadm_dev *md_next;
+} macadm_dev_t;
+
+typedef struct macadm_walk {
+ macadm_dev_t *mw_dev_list;
+} macadm_walk_t;
+
+/*
+ * Local callback invoked for each DDI_NT_NET node.
+ */
+/* ARGSUSED */
+static int
+i_macadm_apply(di_node_t node, di_minor_t minor, void *arg)
+{
+ macadm_walk_t *mwp = arg;
+ macadm_dev_t *mdp = mwp->mw_dev_list;
+ macadm_dev_t **lastp = &mwp->mw_dev_list;
+ char dev[MAXNAMELEN];
+
+ (void) snprintf(dev, MAXNAMELEN, "%s%d",
+ di_driver_name(node), di_instance(node));
+
+ /*
+ * Skip aggregations.
+ */
+ if (strcmp("aggr", di_driver_name(node)) == 0)
+ return (DI_WALK_CONTINUE);
+
+ while (mdp) {
+ /*
+ * Skip duplicates.
+ */
+ if (strcmp(mdp->md_name, dev) == 0)
+ return (DI_WALK_CONTINUE);
+
+ lastp = &mdp->md_next;
+ mdp = mdp->md_next;
+ }
+
+ if ((mdp = malloc(sizeof (*mdp))) == NULL)
+ return (DI_WALK_CONTINUE);
+
+ (void) strlcpy(mdp->md_name, dev, MAXNAMELEN);
+ mdp->md_next = NULL;
+ *lastp = mdp;
+
+ return (DI_WALK_CONTINUE);
+}
+
+/*
+ * Invoke the specified callback for each DDI_NT_MAC node.
+ */
+int
+macadm_walk(void (*fn)(void *, const char *), void *arg,
+ boolean_t use_cache)
+{
+ di_node_t root;
+ macadm_walk_t mw;
+ macadm_dev_t *mdp;
+ uint_t flags;
+
+ if (use_cache) {
+ flags = DINFOCACHE;
+ } else {
+ flags = DINFOSUBTREE | DINFOMINOR | DINFOPROP | DINFOFORCE;
+ }
+
+ if ((root = di_init("/", flags)) == DI_NODE_NIL) {
+ return (-1);
+ }
+ mw.mw_dev_list = NULL;
+
+ (void) di_walk_minor(root, DDI_NT_NET, DI_CHECK_ALIAS, &mw,
+ i_macadm_apply);
+
+ di_fini(root);
+
+ mdp = mw.mw_dev_list;
+ while (mdp) {
+ (*fn)(arg, mdp->md_name);
+ mdp = mdp->md_next;
+ }
+
+ return (0);
+}
diff --git a/deleted_files/usr/src/lib/libmacadm/common/libmacadm.h b/deleted_files/usr/src/lib/libmacadm/common/libmacadm.h
new file mode 100644
index 0000000000..2f21b53d55
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/common/libmacadm.h
@@ -0,0 +1,46 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _LIBMACADM_H
+#define _LIBMACADM_H
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <sys/types.h>
+#include <sys/mac.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int macadm_walk(void (*)(void *, const char *),
+ void *, boolean_t);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _LIBMACADM_H */
diff --git a/deleted_files/usr/src/lib/libmacadm/common/llib-lmacadm b/deleted_files/usr/src/lib/libmacadm/common/llib-lmacadm
new file mode 100644
index 0000000000..ab38ea1ac2
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/common/llib-lmacadm
@@ -0,0 +1,32 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <libmacadm.h>
diff --git a/deleted_files/usr/src/lib/libmacadm/common/mapfile-vers b/deleted_files/usr/src/lib/libmacadm/common/mapfile-vers
new file mode 100644
index 0000000000..1ae18a3193
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/common/mapfile-vers
@@ -0,0 +1,33 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+SUNWprivate_1.1 {
+ global:
+ macadm_walk;
+ local:
+ *;
+};
diff --git a/deleted_files/usr/src/lib/libmacadm/i386/Makefile b/deleted_files/usr/src/lib/libmacadm/i386/Makefile
new file mode 100644
index 0000000000..7eae19fff7
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/i386/Makefile
@@ -0,0 +1,31 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/deleted_files/usr/src/lib/libmacadm/sparc/Makefile b/deleted_files/usr/src/lib/libmacadm/sparc/Makefile
new file mode 100644
index 0000000000..7eae19fff7
--- /dev/null
+++ b/deleted_files/usr/src/lib/libmacadm/sparc/Makefile
@@ -0,0 +1,31 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/deleted_files/usr/src/lib/libwladm/Makefile b/deleted_files/usr/src/lib/libwladm/Makefile
new file mode 100644
index 0000000000..918c51889e
--- /dev/null
+++ b/deleted_files/usr/src/lib/libwladm/Makefile
@@ -0,0 +1,63 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include $(SRC)/lib/Makefile.lib
+
+HDRS = libwladm.h libwladm_impl.h
+HDRDIR = common
+
+SUBDIRS = $(MACH)
+
+POFILE = libwladm.po
+MSGFILES = common/libwladm.c
+XGETFLAGS = -a -x libwladm.xcl
+
+all := TARGET = all
+clean := TARGET = clean
+clobber := TARGET = clobber
+install := TARGET = install
+lint := TARGET = lint
+
+.KEEP_STATE:
+
+all clean clobber install lint: $(SUBDIRS)
+
+install_h: $(ROOTHDRS)
+
+check: $(CHECKHDRS)
+
+$(POFILE): pofile_MSGFILES
+
+_msg: $(MSGDOMAINPOFILE)
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
+
+include $(SRC)/Makefile.msg.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/deleted_files/usr/src/lib/libwladm/Makefile.com b/deleted_files/usr/src/lib/libwladm/Makefile.com
new file mode 100644
index 0000000000..1f8c9760df
--- /dev/null
+++ b/deleted_files/usr/src/lib/libwladm/Makefile.com
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+LIBRARY = libwladm.a
+VERS = .1
+OBJECTS = libwladm.o
+
+include ../../Makefile.lib
+# install this library in the root filesystem
+include ../../Makefile.rootfs
+
+LIBS = $(DYNLIB) $(LINTLIB)
+LDLIBS += -ldevinfo -lsocket -lc
+
+SRCDIR = ../common
+$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
+
+CFLAGS += $(CCVERBOSE)
+CPPFLAGS += -I$(SRCDIR) -D_REENTRANT
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+lint: lintcheck
+
+include $(SRC)/lib/Makefile.targ
diff --git a/deleted_files/usr/src/lib/libwladm/common/llib-lwladm b/deleted_files/usr/src/lib/libwladm/common/llib-lwladm
new file mode 100644
index 0000000000..1f233e14ec
--- /dev/null
+++ b/deleted_files/usr/src/lib/libwladm/common/llib-lwladm
@@ -0,0 +1,31 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*LINTLIBRARY*/
+/*PROTOLIB1*/
+
+#include <libwladm.h>
diff --git a/deleted_files/usr/src/lib/libwladm/common/mapfile-vers b/deleted_files/usr/src/lib/libwladm/common/mapfile-vers
new file mode 100644
index 0000000000..c5f00d22b4
--- /dev/null
+++ b/deleted_files/usr/src/lib/libwladm/common/mapfile-vers
@@ -0,0 +1,60 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+SUNWprivate_1.1 {
+ global:
+ wladm_scan;
+ wladm_connect;
+ wladm_disconnect;
+ wladm_get_link_attr;
+ wladm_walk;
+ wladm_is_valid;
+ wladm_set_prop;
+ wladm_walk_prop;
+ wladm_get_prop;
+ wladm_essid2str;
+ wladm_bssid2str;
+ wladm_secmode2str;
+ wladm_strength2str;
+ wladm_mode2str;
+ wladm_speed2str;
+ wladm_auth2str;
+ wladm_bsstype2str;
+ wladm_linkstatus2str;
+ wladm_status2str;
+ wladm_str2essid;
+ wladm_str2bssid;
+ wladm_str2secmode;
+ wladm_str2strength;
+ wladm_str2mode;
+ wladm_str2speed;
+ wladm_str2auth;
+ wladm_str2bsstype;
+ wladm_str2linkstatus;
+ local:
+ *;
+};
diff --git a/deleted_files/usr/src/lib/libwladm/i386/Makefile b/deleted_files/usr/src/lib/libwladm/i386/Makefile
new file mode 100644
index 0000000000..a333224278
--- /dev/null
+++ b/deleted_files/usr/src/lib/libwladm/i386/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
diff --git a/deleted_files/usr/src/lib/libwladm/libwladm.xcl b/deleted_files/usr/src/lib/libwladm/libwladm.xcl
new file mode 100644
index 0000000000..69fa067e65
--- /dev/null
+++ b/deleted_files/usr/src/lib/libwladm/libwladm.xcl
@@ -0,0 +1,52 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+msgid "a"
+msgid "b"
+msgid "g"
+msgid "channel"
+msgid "powermode"
+msgid "radio"
+msgid "speed"
+msgid ""
+msgid "%.*f"
+msgid "%d"
+msgid "%s"
+msgid "%s%d"
+msgid "%u"
+msgid "/"
+msgid "/dev/%s"
+msgid "open"
+msgid "shared"
+msgid "bss"
+msgid "ibss"
+msgid "any"
+msgid "on"
+msgid "off"
+msgid "fast"
+msgid "max"
+msgid "wep"
+msgid "none"
diff --git a/deleted_files/usr/src/lib/libwladm/sparc/Makefile b/deleted_files/usr/src/lib/libwladm/sparc/Makefile
new file mode 100644
index 0000000000..a333224278
--- /dev/null
+++ b/deleted_files/usr/src/lib/libwladm/sparc/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)