Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2016 03:44:09 GMT
From:      yuanxunzhang@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r307709 - soc2016/yuanxunzhang/head/usr.sbin/eaps
Message-ID:  <201608160344.u7G3i9Y3037706@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuanxunzhang
Date: Tue Aug 16 03:44:08 2016
New Revision: 307709
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=307709

Log:
  EAPS: query eaps domian status

Modified:
  soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c

Modified: soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c
==============================================================================
--- soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c	Tue Aug 16 03:32:47 2016	(r307708)
+++ soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c	Tue Aug 16 03:44:08 2016	(r307709)
@@ -37,7 +37,7 @@
 #include <sys/socket.h>
 #include <sys/sockio.h>
 #include <net/if.h>
-#include <net/if_lagg.h>
+#include <net/eaps.h>
 #include <ctype.h>
 #include <err.h>
 #include <errno.h>
@@ -168,19 +168,19 @@
 static void
 show_eaps_status(int argc, char **argv, int s)
 {
-	// struct eaps_reqall er;
-	// bzero(&er, sizeof(er));
+	struct eaps_reqall er;
+	bzero(&er, sizeof(er));
 
-	// char *domain_name = *(++argv);
+	char *domain_name = *(++argv);
+
+	// check eaps domain name
+	if (domain_name == NULL) {
+		err(1, "EAPS domain name is NULL!");
+	} 
 
-	// // check eaps domain name
-	// if (domain_name == NULL) {
-	// 	err(1, "EAPS domain name is NULL!");
-	// } 
-
-	// strlcpy(er.eaps_ifname, domain_name, sizeof(er.eaps_ifname));
-	// if (ioctl(s, SIOCSEAPSDOMAIN, &er) < 0)
-	// 	err(1, "SIOCSEAPSDOMAIN");
+	strlcpy(er.eaps_ifname, domain_name, sizeof(er.eaps_ifname));
+	if (ioctl(s, SIOCSEAPSDOMAIN, &er) < 0)
+		err(1, "SIOCSEAPSDOMAIN");
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608160344.u7G3i9Y3037706>