if_wtap.c (cfe30d02adda7c3b5c76156ac52d50d8cab325d9) | if_wtap.c (c8dfaf382fa6df9dc6fd1e1c3356e0c8bf607e6a) |
---|---|
1/*- 2 * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB 3 * All rights reserved. 4 * 5 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 407 unchanged lines hidden (view full) --- 416 * buffers to send all the fragments so all 417 * go out or none... 418 */ 419#if 0 420 STAILQ_INIT(&frags); 421#endif 422 if ((m->m_flags & M_FRAG)){ 423 printf("dont support frags\n"); | 1/*- 2 * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB 3 * All rights reserved. 4 * 5 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 407 unchanged lines hidden (view full) --- 416 * buffers to send all the fragments so all 417 * go out or none... 418 */ 419#if 0 420 STAILQ_INIT(&frags); 421#endif 422 if ((m->m_flags & M_FRAG)){ 423 printf("dont support frags\n"); |
424 ifp->if_oerrors++; | 424 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); |
425 return; 426 } | 425 return; 426 } |
427 ifp->if_opackets++; | 427 if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); |
428 if(wtap_raw_xmit(ni, m, NULL) < 0){ 429 printf("error raw_xmiting\n"); | 428 if(wtap_raw_xmit(ni, m, NULL) < 0){ 429 printf("error raw_xmiting\n"); |
430 ifp->if_oerrors++; | 430 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); |
431 return; 432 } 433 } 434} 435 436static int 437wtap_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) 438{ --- 150 unchanged lines hidden (view full) --- 589 DWTAP_PRINTF("%s\n", __func__); 590#endif 591 592 DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, m); 593 if (m == NULL) { /* NB: shouldn't happen */ 594 if_printf(ifp, "%s: no mbuf!\n", __func__); 595 } 596 | 431 return; 432 } 433 } 434} 435 436static int 437wtap_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) 438{ --- 150 unchanged lines hidden (view full) --- 589 DWTAP_PRINTF("%s\n", __func__); 590#endif 591 592 DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, m); 593 if (m == NULL) { /* NB: shouldn't happen */ 594 if_printf(ifp, "%s: no mbuf!\n", __func__); 595 } 596 |
597 ifp->if_ipackets++; | 597 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); |
598 599 ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0); 600 601 /* 602 * Locate the node for sender, track state, and then 603 * pass the (referenced) node up to the 802.11 layer 604 * for its use. 605 */ --- 38 unchanged lines hidden (view full) --- 644 m = bf->m; 645 DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, bf->m); 646 if (m == NULL) { /* NB: shouldn't happen */ 647 if_printf(ifp, "%s: no mbuf!\n", __func__); 648 free(bf, M_WTAP_RXBUF); 649 return; 650 } 651 | 598 599 ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0); 600 601 /* 602 * Locate the node for sender, track state, and then 603 * pass the (referenced) node up to the 802.11 layer 604 * for its use. 605 */ --- 38 unchanged lines hidden (view full) --- 644 m = bf->m; 645 DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, bf->m); 646 if (m == NULL) { /* NB: shouldn't happen */ 647 if_printf(ifp, "%s: no mbuf!\n", __func__); 648 free(bf, M_WTAP_RXBUF); 649 return; 650 } 651 |
652 ifp->if_ipackets++; | 652 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); |
653#if 0 654 ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0); 655#endif 656 657 /* 658 * Locate the node for sender, track state, and then 659 * pass the (referenced) node up to the 802.11 layer 660 * for its use. --- 262 unchanged lines hidden --- | 653#if 0 654 ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0); 655#endif 656 657 /* 658 * Locate the node for sender, track state, and then 659 * pass the (referenced) node up to the 802.11 layer 660 * for its use. --- 262 unchanged lines hidden --- |