| version 1.4, 1999/07/09 22:57:27 |
version 1.5, 1999/07/22 03:59:42 |
| Line 144 struct ip6stat ip6stat; |
|
| Line 144 struct ip6stat ip6stat; |
|
| |
|
| static void ip6_init2 __P((void *)); |
static void ip6_init2 __P((void *)); |
| |
|
| static int ip6_hopopts_input __P((u_int32_t *, long *, struct mbuf **, int *)); |
static int ip6_hopopts_input __P((u_int32_t *, u_int32_t *, struct mbuf **, int *)); |
| |
|
| /* |
/* |
| * IP6 initialization: fill in IP6 protocol switch table. |
* IP6 initialization: fill in IP6 protocol switch table. |
|
|
| register struct ip6_hdr *ip6; |
register struct ip6_hdr *ip6; |
| int off = sizeof(struct ip6_hdr), nest; |
int off = sizeof(struct ip6_hdr), nest; |
| u_int32_t plen; |
u_int32_t plen; |
| long rtalert = -1; |
u_int32_t rtalert = ~0; |
| int nxt, ours = 0; |
int nxt, ours = 0; |
| |
|
| #ifdef IPSEC |
#ifdef IPSEC |
|
|
| * accept the packet if a router alert option is included |
* accept the packet if a router alert option is included |
| * and we act as an IPv6 router. |
* and we act as an IPv6 router. |
| */ |
*/ |
| if (rtalert >= 0 && ip6_forwarding) |
if (rtalert != ~0 && ip6_forwarding) |
| ours = 1; |
ours = 1; |
| } else |
} else |
| nxt = ip6->ip6_nxt; |
nxt = ip6->ip6_nxt; |
|
|
| static int |
static int |
| ip6_hopopts_input(plenp, rtalertp, mp, offp) |
ip6_hopopts_input(plenp, rtalertp, mp, offp) |
| u_int32_t *plenp; |
u_int32_t *plenp; |
| long *rtalertp; /* XXX: should be stored more smart way */ |
u_int32_t *rtalertp; /* XXX: should be stored more smart way */ |
| struct mbuf **mp; |
struct mbuf **mp; |
| int *offp; |
int *offp; |
| { |
{ |
| Line 566 ip6_process_hopopts(m, opthead, hbhlen, |
|
| Line 566 ip6_process_hopopts(m, opthead, hbhlen, |
|
| struct mbuf *m; |
struct mbuf *m; |
| u_int8_t *opthead; |
u_int8_t *opthead; |
| int hbhlen; |
int hbhlen; |
| long *rtalertp; |
u_int32_t *rtalertp; |
| u_int32_t *plenp; |
u_int32_t *plenp; |
| { |
{ |
| struct ip6_hdr *ip6; |
struct ip6_hdr *ip6; |