Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Dec 2013 01:58:20 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r259857 - head/sys/netinet/libalias
Message-ID:  <201312250158.rBP1wKOm080976@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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_ */



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