diff options
author | archie <archie@FreeBSD.org> | 2000-05-10 16:54:00 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 2000-05-10 16:54:00 +0000 |
commit | 284ada4222a0d783ace7593b2e4a83a69b592ab1 (patch) | |
tree | cc3628ef6be7d3a8a0f40872c3cd0df1840a941b /sys/netgraph | |
parent | 3427f4b1fa553a6b0a8a4cb581ae6b71e70503e4 (diff) | |
download | FreeBSD-src-284ada4222a0d783ace7593b2e4a83a69b592ab1.zip FreeBSD-src-284ada4222a0d783ace7593b2e4a83a69b592ab1.tar.gz |
Add hook for IPv6.
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_cisco.c | 12 | ||||
-rw-r--r-- | sys/netgraph/ng_cisco.h | 1 |
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c index 29ba7c7..0819169 100644 --- a/sys/netgraph/ng_cisco.c +++ b/sys/netgraph/ng_cisco.c @@ -40,10 +40,6 @@ * $Whistle: ng_cisco.c,v 1.25 1999/11/01 09:24:51 julian Exp $ */ -#include "opt_inet.h" -#include "opt_atalk.h" -#include "opt_ipx.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/errno.h> @@ -112,6 +108,7 @@ struct cisco_priv { struct protoent inet; /* IP information */ struct in_addr localip; struct in_addr localmask; + struct protoent inet6; /* IPv6 information */ struct protoent atalk; /* AppleTalk information */ struct protoent ipx; /* IPX information */ }; @@ -215,6 +212,7 @@ cisco_constructor(node_p *nodep) /* Initialise the varous protocol hook holders */ sc->downstream.af = 0xffff; sc->inet.af = AF_INET; + sc->inet6.af = AF_INET6; sc->atalk.af = AF_APPLETALK; sc->ipx.af = AF_IPX; return (0); @@ -383,6 +381,9 @@ cisco_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, case AF_INET: /* Internet Protocol */ h->protocol = htons(ETHERTYPE_IP); break; + case AF_INET6: + h->protocol = htons(ETHERTYPE_IPV6); + break; case AF_APPLETALK: /* AppleTalk Protocol */ h->protocol = htons(ETHERTYPE_AT); break; @@ -520,6 +521,9 @@ cisco_input(sc_p sc, struct mbuf *m, meta_p meta) case ETHERTYPE_IP: pep = &sc->inet; break; + case ETHERTYPE_IPV6: + pep = &sc->inet6; + break; case ETHERTYPE_AT: pep = &sc->atalk; break; diff --git a/sys/netgraph/ng_cisco.h b/sys/netgraph/ng_cisco.h index a51dbfa..be390af 100644 --- a/sys/netgraph/ng_cisco.h +++ b/sys/netgraph/ng_cisco.h @@ -50,6 +50,7 @@ /* Hook names */ #define NG_CISCO_HOOK_DOWNSTREAM "downstream" #define NG_CISCO_HOOK_INET "inet" +#define NG_CISCO_HOOK_INET6 "inet6" #define NG_CISCO_HOOK_APPLETALK "atalk" #define NG_CISCO_HOOK_IPX "ipx" #define NG_CISCO_HOOK_DEBUG "debug" |