summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_cisco.c
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-05-10 16:54:00 +0000
committerarchie <archie@FreeBSD.org>2000-05-10 16:54:00 +0000
commit284ada4222a0d783ace7593b2e4a83a69b592ab1 (patch)
treecc3628ef6be7d3a8a0f40872c3cd0df1840a941b /sys/netgraph/ng_cisco.c
parent3427f4b1fa553a6b0a8a4cb581ae6b71e70503e4 (diff)
downloadFreeBSD-src-284ada4222a0d783ace7593b2e4a83a69b592ab1.zip
FreeBSD-src-284ada4222a0d783ace7593b2e4a83a69b592ab1.tar.gz
Add hook for IPv6.
Diffstat (limited to 'sys/netgraph/ng_cisco.c')
-rw-r--r--sys/netgraph/ng_cisco.c12
1 files changed, 8 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;
OpenPOWER on IntegriCloud