version 1.51, 2007/05/02 20:40:26 |
version 1.52, 2007/05/23 17:15:01 |
Line 85 const struct ip6protosw in6_gif_protosw |
|
Line 85 const struct ip6protosw in6_gif_protosw |
|
|
|
extern LIST_HEAD(, gif_softc) gif_softc_list; |
extern LIST_HEAD(, gif_softc) gif_softc_list; |
|
|
|
/* |
|
* family - family of the packet to be encapsulate. |
|
*/ |
|
|
int |
int |
in6_gif_output(ifp, family, m) |
in6_gif_output(struct ifnet *ifp, int family, struct mbuf *m) |
struct ifnet *ifp; |
|
int family; /* family of the packet to be encapsulate. */ |
|
struct mbuf *m; |
|
{ |
{ |
struct gif_softc *sc = (struct gif_softc*)ifp; |
struct gif_softc *sc = (struct gif_softc*)ifp; |
struct sockaddr_in6 *sin6_src = (struct sockaddr_in6 *)sc->gif_psrc; |
struct sockaddr_in6 *sin6_src = (struct sockaddr_in6 *)sc->gif_psrc; |
Line 214 in6_gif_output(ifp, family, m) |
|
Line 215 in6_gif_output(ifp, family, m) |
|
return (error); |
return (error); |
} |
} |
|
|
int in6_gif_input(mp, offp, proto) |
int in6_gif_input(struct mbuf **mp, int *offp, int proto) |
struct mbuf **mp; |
|
int *offp, proto; |
|
{ |
{ |
struct mbuf *m = *mp; |
struct mbuf *m = *mp; |
struct ifnet *gifp = NULL; |
struct ifnet *gifp = NULL; |
Line 302 int in6_gif_input(mp, offp, proto) |
|
Line 301 int in6_gif_input(mp, offp, proto) |
|
* validate outer address. |
* validate outer address. |
*/ |
*/ |
static int |
static int |
gif_validate6(ip6, sc, ifp) |
gif_validate6(const struct ip6_hdr *ip6, struct gif_softc *sc, |
const struct ip6_hdr *ip6; |
struct ifnet *ifp) |
struct gif_softc *sc; |
|
struct ifnet *ifp; |
|
{ |
{ |
const struct sockaddr_in6 *src, *dst; |
const struct sockaddr_in6 *src, *dst; |
|
|
Line 352 gif_validate6(ip6, sc, ifp) |
|
Line 349 gif_validate6(ip6, sc, ifp) |
|
* matched the physical addr family. see gif_encapcheck(). |
* matched the physical addr family. see gif_encapcheck(). |
*/ |
*/ |
int |
int |
gif_encapcheck6(m, off, proto, arg) |
gif_encapcheck6(struct mbuf *m, int off, int proto, void *arg) |
struct mbuf *m; |
|
int off; |
|
int proto; |
|
void *arg; |
|
{ |
{ |
struct ip6_hdr ip6; |
struct ip6_hdr ip6; |
struct gif_softc *sc; |
struct gif_softc *sc; |
Line 373 gif_encapcheck6(m, off, proto, arg) |
|
Line 366 gif_encapcheck6(m, off, proto, arg) |
|
#endif |
#endif |
|
|
int |
int |
in6_gif_attach(sc) |
in6_gif_attach(struct gif_softc *sc) |
struct gif_softc *sc; |
|
{ |
{ |
#ifndef GIF_ENCAPCHECK |
#ifndef GIF_ENCAPCHECK |
struct sockaddr_in6 mask6; |
struct sockaddr_in6 mask6; |
Line 399 in6_gif_attach(sc) |
|
Line 391 in6_gif_attach(sc) |
|
} |
} |
|
|
int |
int |
in6_gif_detach(sc) |
in6_gif_detach(struct gif_softc *sc) |
struct gif_softc *sc; |
|
{ |
{ |
int error; |
int error; |
|
|