summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-12-25 01:58:19 +0000
committerglebius <glebius@FreeBSD.org>2013-12-25 01:58:19 +0000
commit74be2cbb0c062bacb9f6722d480da42b2cf7fca0 (patch)
tree51897114d2f8be20e198e951b61c6cb609f7fed9 /sys/netinet
parent2c071f548472ad9536081bfc3aafef68b634c697 (diff)
downloadFreeBSD-src-74be2cbb0c062bacb9f6722d480da42b2cf7fca0.zip
FreeBSD-src-74be2cbb0c062bacb9f6722d480da42b2cf7fca0.tar.gz
Remove from kernel the "dll" code.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/libalias/alias_mod.c3
-rw-r--r--sys/netinet/libalias/alias_mod.h32
2 files changed, 18 insertions, 17 deletions
diff --git a/sys/netinet/libalias/alias_mod.c b/sys/netinet/libalias/alias_mod.c
index c9a197a..a061431 100644
--- a/sys/netinet/libalias/alias_mod.c
+++ b/sys/netinet/libalias/alias_mod.c
@@ -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 */
diff --git a/sys/netinet/libalias/alias_mod.h b/sys/netinet/libalias/alias_mod.h
index f6f7591..c24c0bc 100644
--- a/sys/netinet/libalias/alias_mod.h
+++ b/sys/netinet/libalias/alias_mod.h
@@ -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_ */
OpenPOWER on IntegriCloud