ip_encap.c (4d2c57188f33f99e7538e2c9141f8cfee4acb23d) | ip_encap.c (ff265614c166724356a66c341ff3bb9c4ee3c260) |
---|---|
1/* $FreeBSD$ */ 2/* $KAME: ip_encap.c,v 1.41 2001/03/15 08:35:08 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 113 unchanged lines hidden (view full) --- 122 * from drivers. 123 */ 124 LIST_INIT(&encaptab); 125#endif 126} 127 128#ifdef INET 129void | 1/* $FreeBSD$ */ 2/* $KAME: ip_encap.c,v 1.41 2001/03/15 08:35:08 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 113 unchanged lines hidden (view full) --- 122 * from drivers. 123 */ 124 LIST_INIT(&encaptab); 125#endif 126} 127 128#ifdef INET 129void |
130#if __STDC__ 131encap4_input(struct mbuf *m, ...) 132#else 133encap4_input(m, va_alist) | 130encap4_input(m, off) |
134 struct mbuf *m; | 131 struct mbuf *m; |
135 va_dcl 136#endif | 132 int off; |
137{ | 133{ |
138 int off, proto; | |
139 struct ip *ip; | 134 struct ip *ip; |
135 int proto; |
|
140 struct sockaddr_in s, d; 141 const struct protosw *psw; 142 struct encaptab *ep, *match; | 136 struct sockaddr_in s, d; 137 const struct protosw *psw; 138 struct encaptab *ep, *match; |
143 va_list ap; | |
144 int prio, matchprio; 145 | 139 int prio, matchprio; 140 |
146 va_start(ap, m); 147 off = va_arg(ap, int); 148 va_end(ap); 149 | |
150 ip = mtod(m, struct ip *); 151 proto = ip->ip_p; 152 153 bzero(&s, sizeof(s)); 154 s.sin_family = AF_INET; 155 s.sin_len = sizeof(struct sockaddr_in); 156 s.sin_addr = ip->ip_src; 157 bzero(&d, sizeof(d)); --- 388 unchanged lines hidden --- | 141 ip = mtod(m, struct ip *); 142 proto = ip->ip_p; 143 144 bzero(&s, sizeof(s)); 145 s.sin_family = AF_INET; 146 s.sin_len = sizeof(struct sockaddr_in); 147 s.sin_addr = ip->ip_src; 148 bzero(&d, sizeof(d)); --- 388 unchanged lines hidden --- |