From owner-svn-src-all@FreeBSD.ORG Wed Dec 25 01:58:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD2A5583; Wed, 25 Dec 2013 01:58:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D83514B4; Wed, 25 Dec 2013 01:58:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP1wKDb080978; Wed, 25 Dec 2013 01:58:20 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP1wKOm080976; Wed, 25 Dec 2013 01:58:20 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201312250158.rBP1wKOm080976@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 25 Dec 2013 01:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259857 - head/sys/netinet/libalias X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 01:58:20 -0000 Author: glebius Date: Wed Dec 25 01:58:19 2013 New Revision: 259857 URL: http://svnweb.freebsd.org/changeset/base/259857 Log: Remove from kernel the "dll" code. Modified: head/sys/netinet/libalias/alias_mod.c head/sys/netinet/libalias/alias_mod.h Modified: head/sys/netinet/libalias/alias_mod.c ============================================================================== --- head/sys/netinet/libalias/alias_mod.c Wed Dec 25 01:52:55 2013 (r259856) +++ head/sys/netinet/libalias/alias_mod.c Wed Dec 25 01:58:19 2013 (r259857) @@ -245,8 +245,8 @@ first_handler(void) return (LIST_FIRST(&handler_chain)); } +#ifndef _KERNEL /* Dll manipulation code - this code is not thread safe... */ - int attach_dll(struct dll *p) { @@ -288,3 +288,4 @@ walk_dll_chain(void) SLIST_REMOVE_HEAD(&dll_chain, next); return (t); } +#endif /* !_KERNEL */ Modified: head/sys/netinet/libalias/alias_mod.h ============================================================================== --- head/sys/netinet/libalias/alias_mod.h Wed Dec 25 01:52:55 2013 (r259856) +++ head/sys/netinet/libalias/alias_mod.h Wed Dec 25 01:58:19 2013 (r259857) @@ -82,8 +82,22 @@ struct proto_handler { int (*protohandler)(struct libalias *, struct ip *, struct alias_data *); LIST_ENTRY(proto_handler) entries; -}; +} +; +/* End of handlers. */ +#define EOH -1 + +/* Functions used with protocol handlers. */ +void handler_chain_init(void); +void handler_chain_destroy(void); +int LibAliasAttachHandlers(struct proto_handler *); +int LibAliasDetachHandlers(struct proto_handler *); +int detach_handler(struct proto_handler *); +int find_handler(int8_t, int8_t, struct libalias *, struct ip *, + struct alias_data *); +struct proto_handler *first_handler(void); +#ifndef _KERNEL /* * Used only in userland when libalias needs to keep track of all * module loaded. In kernel land (kld mode) we don't need to care @@ -101,16 +115,6 @@ struct dll { SLIST_ENTRY(dll) next; }; -/* Functions used with protocol handlers. */ -void handler_chain_init(void); -void handler_chain_destroy(void); -int LibAliasAttachHandlers(struct proto_handler *); -int LibAliasDetachHandlers(struct proto_handler *); -int detach_handler(struct proto_handler *); -int find_handler(int8_t, int8_t, struct libalias *, struct ip *, - struct alias_data *); -struct proto_handler *first_handler(void); - /* Functions used with dll module. */ void dll_chain_init(void); void dll_chain_destroy(void); @@ -118,14 +122,10 @@ int attach_dll(struct dll *); void *detach_dll(char *); struct dll *walk_dll_chain(void); -/* End of handlers. */ -#define EOH -1 - /* * Some defines borrowed from sys/module.h used to compile a kld * in userland as a shared lib. */ -#ifndef _KERNEL typedef enum modeventtype { MOD_LOAD, MOD_UNLOAD, @@ -144,6 +144,6 @@ typedef struct moduledata { modeventhand_t evhand; /* event handler */ void *priv; /* extra data */ } moduledata_t; -#endif +#endif /* !_KERNEL */ #endif /* !_ALIAS_MOD_H_ */