diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c index 29ba7c7f619..081916972a1 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 #include #include @@ -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 a51dbfaff06..be390afa009 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"