Changeset de31abb for libpacketdump
- Timestamp:
- 05/15/07 14:13:37 (14 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 67b0d4d
- Parents:
- 40f19df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpacketdump/link_4.c
r4f55f69 rde31abb 725 725 if (len > hdrlen) { 726 726 pld = (ieee80211_payload *) ((char *)pkt + hdrlen) ; 727 printf(" 802.11MAC: Payload ethertype = 0x%04x\n", ntohs(pld->ethertype)); 728 decode_next((char *) pld->payload, len - hdrlen - 2, "eth", ntohs(pld->ethertype)); 727 int payload_offset = 0; 728 uint16_t ethertype = 0; 729 if (ntohs(pld->ethertype) == 0xaaaa) { 730 /* 802.11 payload contains an 802.2 LLC/SNAP header */ 731 libtrace_llcsnap_t *llcsnap = (libtrace_llcsnap_t *) pld; 732 printf(" 802.2: DSAP = 0x%x, SSAP = 0x%x, OUI = 0x%x, Type = 0x%x\n", 733 llcsnap->dsap, llcsnap->ssap, llcsnap->oui, ntohs(llcsnap->type)); 734 payload_offset = sizeof(libtrace_llcsnap_t); 735 ethertype = ntohs(llcsnap->type); 736 } else { 737 /* 802.11 payload contains an Ethernet II frame */ 738 printf(" 802.11MAC: Payload ethertype = 0x%04x\n", ntohs(pld->ethertype)); 739 payload_offset = sizeof(pld->ethertype); 740 ethertype = ntohs(pld->ethertype); 741 } 742 decode_next((char *) pkt + hdrlen + payload_offset, 743 len - hdrlen - payload_offset, "eth", ethertype); 729 744 } 730 745
Note: See TracChangeset
for help on using the changeset viewer.