diff options
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_faith.c | 2 | ||||
-rw-r--r-- | sys/net/net_osdep.h | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c index a4d5162..b28fecd 100644 --- a/sys/net/if_faith.c +++ b/sys/net/if_faith.c @@ -57,6 +57,8 @@ #include <net/route.h> #include <net/bpf.h> +#include <net/net_osdep.h> + extern int loioctl __P((struct ifnet *, u_long, caddr_t)); extern int looutput __P((struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt)); diff --git a/sys/net/net_osdep.h b/sys/net/net_osdep.h index fc77022..3bb3c18 100644 --- a/sys/net/net_osdep.h +++ b/sys/net/net_osdep.h @@ -165,5 +165,31 @@ extern const char *if_name __P((struct ifnet *)); #define HAVE_OLD_BPF +/* + * Deprecated. + */ +#include <sys/module.h> +#define PSEUDO_SET(sym, name) \ + static int name ## _modevent(module_t mod, int type, void *data) \ + { \ + void (*initfunc)(void *) = (void (*)(void *))data; \ + switch (type) { \ + case MOD_LOAD: \ + /* printf(#name " module load\n"); */ \ + initfunc(NULL); \ + break; \ + case MOD_UNLOAD: \ + printf(#name " module unload - not possible for this module type\n"); \ + return EINVAL; \ + } \ + return 0; \ + } \ + static moduledata_t name ## _mod = { \ + #name, \ + name ## _modevent, \ + (void *)sym \ + }; \ + DECLARE_MODULE(name, name ## _mod, SI_SUB_PSEUDO, SI_ORDER_ANY) + #endif /*_KERNEL*/ #endif /*__NET_NET_OSDEP_H_DEFINED_ */ |