From owner-svn-soc-all@freebsd.org Fri Jun 3 17:25:06 2016 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37731B69BAF for ; Fri, 3 Jun 2016 17:25:06 +0000 (UTC) (envelope-from yuanxunzhang@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C12418F8 for ; Fri, 3 Jun 2016 17:25:06 +0000 (UTC) (envelope-from yuanxunzhang@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id u53HP5MM041074 for ; Fri, 3 Jun 2016 17:25:05 GMT (envelope-from yuanxunzhang@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id u53HP2I2040947 for svn-soc-all@FreeBSD.org; Fri, 3 Jun 2016 17:25:02 GMT (envelope-from yuanxunzhang@FreeBSD.org) Date: Fri, 3 Jun 2016 17:25:02 GMT Message-Id: <201606031725.u53HP2I2040947@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to yuanxunzhang@FreeBSD.org using -f 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2016 17:25:06 -0000 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 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * 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 /* - * 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;