Deleted Added
full compact
ip_gre.c (111926) ip_gre.c (123922)
1/* $NetBSD: ip_gre.c,v 1.21 2002/08/14 00:23:30 itojun Exp $ */
1/* $NetBSD: ip_gre.c,v 1.21 2002/08/14 00:23:30 itojun Exp $ */
2/* $FreeBSD: head/sys/netinet/ip_gre.c 111926 2003-03-05 19:24:24Z peter $ */
2/* $FreeBSD: head/sys/netinet/ip_gre.c 123922 2003-12-28 03:56:00Z sam $ */
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Heiko W.Rupp <hwr@pilhuhn.de>
10 *

--- 180 unchanged lines hidden (view full) ---

191 return(0);
192 }
193
194 m->m_data += hlen;
195 m->m_len -= hlen;
196 m->m_pkthdr.len -= hlen;
197
198 if (sc->sc_if.if_bpf) {
3
4/*
5 * Copyright (c) 1998 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Heiko W.Rupp <hwr@pilhuhn.de>
10 *

--- 180 unchanged lines hidden (view full) ---

191 return(0);
192 }
193
194 m->m_data += hlen;
195 m->m_len -= hlen;
196 m->m_pkthdr.len -= hlen;
197
198 if (sc->sc_if.if_bpf) {
199 struct mbuf m0;
200 u_int32_t af = AF_INET;
199 u_int32_t af = AF_INET;
201
202 m0.m_next = m;
203 m0.m_len = 4;
204 m0.m_data = (char *)&af;
205
206 BPF_MTAP(&(sc->sc_if), &m0);
200 bpf_mtap2(sc->sc_if.if_bpf, &af, sizeof(af), m);
207 }
208
209 m->m_pkthdr.rcvif = &sc->sc_if;
210
211 netisr_dispatch(isr, m);
212
213 return(1); /* packet is done, no further processing needed */
214}

--- 63 unchanged lines hidden (view full) ---

278 * and full size of IP packet), so that adjust accordingly.
279 */
280 ip->ip_len = htons(ip->ip_len + sizeof(struct ip) - msiz);
281
282 ip->ip_sum = 0;
283 ip->ip_sum = in_cksum(m, (ip->ip_hl << 2));
284
285 if (sc->sc_if.if_bpf) {
201 }
202
203 m->m_pkthdr.rcvif = &sc->sc_if;
204
205 netisr_dispatch(isr, m);
206
207 return(1); /* packet is done, no further processing needed */
208}

--- 63 unchanged lines hidden (view full) ---

272 * and full size of IP packet), so that adjust accordingly.
273 */
274 ip->ip_len = htons(ip->ip_len + sizeof(struct ip) - msiz);
275
276 ip->ip_sum = 0;
277 ip->ip_sum = in_cksum(m, (ip->ip_hl << 2));
278
279 if (sc->sc_if.if_bpf) {
286 struct mbuf m0;
287 u_int af = AF_INET;
288
289 m0.m_next = m;
290 m0.m_len = 4;
291 m0.m_data = (char *)&af;
292
293 BPF_MTAP(&(sc->sc_if), &m0);
280 u_int32_t af = AF_INET;
281 bpf_mtap2(sc->sc_if.if_bpf, &af, sizeof(af), m);
294 }
295
296 m->m_pkthdr.rcvif = &sc->sc_if;
297
298 netisr_dispatch(NETISR_IP, m);
299}
300
301/*

--- 21 unchanged lines hidden ---
282 }
283
284 m->m_pkthdr.rcvif = &sc->sc_if;
285
286 netisr_dispatch(NETISR_IP, m);
287}
288
289/*

--- 21 unchanged lines hidden ---