Date: Fri, 3 Jun 2016 17:25:02 GMT From: yuanxunzhang@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r304528 - in soc2016/yuanxunzhang/head: sys/conf sys/modules sys/modules/eaps sys/net usr.sbin/eaps Message-ID: <201606031725.u53HP2I2040947@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuanxunzhang Date: Fri Jun 3 17:25:02 2016 New Revision: 304528 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=304528 Log: freeBSD-EAPS: Add eaps protocol module and makefile Added: soc2016/yuanxunzhang/head/sys/modules/eaps/ soc2016/yuanxunzhang/head/sys/modules/eaps/Makefile soc2016/yuanxunzhang/head/sys/net/eaps.c Modified: soc2016/yuanxunzhang/head/sys/conf/files soc2016/yuanxunzhang/head/sys/modules/Makefile soc2016/yuanxunzhang/head/sys/net/eaps.h soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c Modified: soc2016/yuanxunzhang/head/sys/conf/files ============================================================================== --- soc2016/yuanxunzhang/head/sys/conf/files Fri Jun 3 16:17:36 2016 (r304527) +++ soc2016/yuanxunzhang/head/sys/conf/files Fri Jun 3 17:25:02 2016 (r304528) @@ -3490,6 +3490,7 @@ net/bpf_filter.c optional bpf | netgraph_bpf net/bpf_zerocopy.c optional bpf net/bridgestp.c optional bridge | if_bridge +net/eaps.c optional eaps net/flowtable.c optional flowtable inet | flowtable inet6 net/ieee8023ad_lacp.c optional lagg net/if.c standard Modified: soc2016/yuanxunzhang/head/sys/modules/Makefile ============================================================================== --- soc2016/yuanxunzhang/head/sys/modules/Makefile Fri Jun 3 16:17:36 2016 (r304527) +++ soc2016/yuanxunzhang/head/sys/modules/Makefile Fri Jun 3 17:25:02 2016 (r304528) @@ -104,6 +104,7 @@ ${_ed} \ ${_elink} \ ${_em} \ + eaps \ en \ ${_ep} \ ${_epic} \ Added: soc2016/yuanxunzhang/head/sys/modules/eaps/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2016/yuanxunzhang/head/sys/modules/eaps/Makefile Fri Jun 3 17:25:02 2016 (r304528) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../net +KMOD= eaps +SRCS= eaps.c + +.include <bsd.kmod.mk> Added: soc2016/yuanxunzhang/head/sys/net/eaps.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2016/yuanxunzhang/head/sys/net/eaps.c Fri Jun 3 17:25:02 2016 (r304528) @@ -0,0 +1,56 @@ +/*- + * Copyright (c) 2016 Yuanxun Zhang. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <sys/param.h> +#include <sys/file.h> +#include <sys/queue.h> +#include <ctype.h> +#include <err.h> +#include <errno.h> +#include <netdb.h> +#include <nlist.h> +#include <paths.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sysexits.h> +#include <strings.h> +#include <unistd.h> +#include <net/vnet.h> +#include <net/eaps.h> + +/* + * EAPS Protocol Module + */ + +static SLIST_HEAD(slisthead, eaps_d) head = SLIST_HEAD_INITIALIZER(head); Modified: soc2016/yuanxunzhang/head/sys/net/eaps.h ============================================================================== --- soc2016/yuanxunzhang/head/sys/net/eaps.h Fri Jun 3 16:17:36 2016 (r304527) +++ soc2016/yuanxunzhang/head/sys/net/eaps.h Fri Jun 3 17:25:02 2016 (r304528) @@ -33,6 +33,11 @@ #ifdef _KERNEL +struct eaps_d { + char eaps_name[32]; /* name of the EAPS domain */ + SLIST_ENTRY(eaps_d) eaps_entries; +}; + /* * Extreme Active Protection System (EAPS) definitions. * Normative reference: draft-shah-extreme-rfc3619bis-02 [Expired I-D] Modified: soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c ============================================================================== --- soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c Fri Jun 3 16:17:36 2016 (r304527) +++ soc2016/yuanxunzhang/head/usr.sbin/eaps/eaps.c Fri Jun 3 17:25:02 2016 (r304528) @@ -48,18 +48,12 @@ #include <unistd.h> /* - * EAPS - configure, and display eaps + * EAPS Command Line Module - configure, and display eaps */ /* * EAPS Configuration Descriptor */ -struct eaps_d { - char eaps_name[32]; /* name of the EAPS domain */ - SLIST_ENTRY(eaps_d) eaps_entries; -}; - -static SLIST_HEAD(slisthead, eaps_d) head = SLIST_HEAD_INITIALIZER(head); static struct keytab { const char *kt_cp;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606031725.u53HP2I2040947>