if_stf.c (79106) | if_stf.c (82884) |
---|---|
1/* $FreeBSD: head/sys/net/if_stf.c 79106 2001-07-02 21:02:09Z brooks $ */ | 1/* $FreeBSD: head/sys/net/if_stf.c 82884 2001-09-03 20:03:55Z julian $ */ |
2/* $KAME: if_stf.c,v 1.62 2001/06/07 22:32:16 itojun Exp $ */ 3 4/* 5 * Copyright (C) 2000 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 83 unchanged lines hidden (view full) --- 93#include <net/route.h> 94#include <net/netisr.h> 95#include <net/if_types.h> 96#include <net/if_stf.h> 97 98#include <netinet/in.h> 99#include <netinet/in_systm.h> 100#include <netinet/ip.h> | 2/* $KAME: if_stf.c,v 1.62 2001/06/07 22:32:16 itojun Exp $ */ 3 4/* 5 * Copyright (C) 2000 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 83 unchanged lines hidden (view full) --- 93#include <net/route.h> 94#include <net/netisr.h> 95#include <net/if_types.h> 96#include <net/if_stf.h> 97 98#include <netinet/in.h> 99#include <netinet/in_systm.h> 100#include <netinet/ip.h> |
101#include <netinet/ipprotosw.h> | |
102#include <netinet/ip_var.h> 103#include <netinet/in_var.h> 104 105#include <netinet/ip6.h> 106#include <netinet6/ip6_var.h> 107#include <netinet6/in6_var.h> 108#include <netinet/ip_ecn.h> 109 --- 19 unchanged lines hidden (view full) --- 129}; 130 131static struct stf_softc *stf; 132 133static MALLOC_DEFINE(M_STF, "stf", "6to4 Tunnel Interface"); 134static int ip_stf_ttl = 40; 135 136extern struct domain inetdomain; | 101#include <netinet/ip_var.h> 102#include <netinet/in_var.h> 103 104#include <netinet/ip6.h> 105#include <netinet6/ip6_var.h> 106#include <netinet6/in6_var.h> 107#include <netinet/ip_ecn.h> 108 --- 19 unchanged lines hidden (view full) --- 128}; 129 130static struct stf_softc *stf; 131 132static MALLOC_DEFINE(M_STF, "stf", "6to4 Tunnel Interface"); 133static int ip_stf_ttl = 40; 134 135extern struct domain inetdomain; |
137struct ipprotosw in_stf_protosw = | 136struct protosw in_stf_protosw = |
138{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR, 139 in_stf_input, rip_output, 0, rip_ctloutput, 140 0, 141 0, 0, 0, 0, 142 &rip_usrreqs 143}; 144 145static int stfmodevent __P((module_t, int, void *)); --- 399 unchanged lines hidden (view full) --- 545 u_int8_t otos, itos; 546 int len, isr; 547 struct ifqueue *ifq = NULL; 548 struct ifnet *ifp; 549 va_list ap; 550 551 va_start(ap, m); 552 off = va_arg(ap, int); | 137{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR, 138 in_stf_input, rip_output, 0, rip_ctloutput, 139 0, 140 0, 0, 0, 0, 141 &rip_usrreqs 142}; 143 144static int stfmodevent __P((module_t, int, void *)); --- 399 unchanged lines hidden (view full) --- 544 u_int8_t otos, itos; 545 int len, isr; 546 struct ifqueue *ifq = NULL; 547 struct ifnet *ifp; 548 va_list ap; 549 550 va_start(ap, m); 551 off = va_arg(ap, int); |
553 proto = va_arg(ap, int); | 552 proto = mtod(m, struct ip *)->ip_p; |
554 va_end(ap); 555 556 if (proto != IPPROTO_IPV6) { 557 m_freem(m); 558 return; 559 } 560 561 ip = mtod(m, struct ip *); --- 144 unchanged lines hidden --- | 553 va_end(ap); 554 555 if (proto != IPPROTO_IPV6) { 556 m_freem(m); 557 return; 558 } 559 560 ip = mtod(m, struct ip *); --- 144 unchanged lines hidden --- |