if_gif.c (63577) | if_gif.c (69152) |
---|---|
1/* $FreeBSD: head/sys/net/if_gif.c 63577 2000-07-20 00:35:37Z kris $ */ | 1/* $FreeBSD: head/sys/net/if_gif.c 69152 2000-11-25 07:35:38Z jlemon $ */ |
2/* $KAME: if_gif.c,v 1.28 2000/06/20 12:30:03 jinmei 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 9 * modification, are permitted provided that the following conditions --- 299 unchanged lines hidden (view full) --- 309} 310 311void 312gif_input(m, af, gifp) 313 struct mbuf *m; 314 int af; 315 struct ifnet *gifp; 316{ | 2/* $KAME: if_gif.c,v 1.28 2000/06/20 12:30:03 jinmei 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 9 * modification, are permitted provided that the following conditions --- 299 unchanged lines hidden (view full) --- 309} 310 311void 312gif_input(m, af, gifp) 313 struct mbuf *m; 314 int af; 315 struct ifnet *gifp; 316{ |
317 int s, isr; | 317 int isr; |
318 register struct ifqueue *ifq = 0; 319 320 if (gifp == NULL) { 321 /* just in case */ 322 m_freem(m); 323 return; 324 } 325 --- 48 unchanged lines hidden (view full) --- 374 isr = NETISR_IPV6; 375 break; 376#endif 377 default: 378 m_freem(m); 379 return; 380 } 381 | 318 register struct ifqueue *ifq = 0; 319 320 if (gifp == NULL) { 321 /* just in case */ 322 m_freem(m); 323 return; 324 } 325 --- 48 unchanged lines hidden (view full) --- 374 isr = NETISR_IPV6; 375 break; 376#endif 377 default: 378 m_freem(m); 379 return; 380 } 381 |
382 s = splimp(); 383 if (IF_QFULL(ifq)) { 384 IF_DROP(ifq); /* update statistics */ 385 m_freem(m); 386 splx(s); 387 return; 388 } 389 IF_ENQUEUE(ifq, m); 390 /* we need schednetisr since the address family may change */ 391 schednetisr(isr); | |
392 gifp->if_ipackets++; 393 gifp->if_ibytes += m->m_pkthdr.len; | 382 gifp->if_ipackets++; 383 gifp->if_ibytes += m->m_pkthdr.len; |
394 splx(s); | 384 (void) IF_HANDOFF(ifq, m, NULL); 385 /* we need schednetisr since the address family may change */ 386 schednetisr(isr); |
395 396 return; 397} 398 399/* XXX how should we handle IPv6 scope on SIOC[GS]IFPHYADDR? */ 400int 401gif_ioctl(ifp, cmd, data) 402 struct ifnet *ifp; --- 229 unchanged lines hidden --- | 387 388 return; 389} 390 391/* XXX how should we handle IPv6 scope on SIOC[GS]IFPHYADDR? */ 392int 393gif_ioctl(ifp, cmd, data) 394 struct ifnet *ifp; --- 229 unchanged lines hidden --- |