Changeset f5d654e for libpacketdump
- Timestamp:
- 04/02/08 16:32:01 (13 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:
- dd1217b
- Parents:
- 007fb43
- Location:
- libpacketdump
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libpacketdump/eth_2054.c
r622dd4d rf5d654e 20 20 * attempt to decode. 21 21 */ 22 char *format_hrd(struct arphdr *arp, char *hrd) {22 static char *format_hrd(struct arphdr *arp, char *hrd) { 23 23 static char buffer[1024] = {0,}; 24 24 int i; … … 50 50 * attempt to decode. 51 51 */ 52 char *format_pro(struct arphdr *arp, char *pro) {52 static char *format_pro(struct arphdr *arp, char *pro) { 53 53 static char buffer[1024] = {0,}; 54 54 int i; -
libpacketdump/ip_6.c
r4f55f69 rf5d654e 22 22 void decode(int link_type,char *packet,unsigned len) 23 23 { 24 unsigned char *pkt = NULL; 25 unsigned char type,optlen,*data; 26 int plen, i; 24 27 libtrace_tcp_t *tcp = (libtrace_tcp_t *)packet; 25 28 printf(" TCP:"); … … 69 72 DISPLAYS(check," Checksum %i"); 70 73 DISPLAYS(urg_ptr," Urgent %i"); 71 unsigned char *pkt = (unsigned char*)packet+sizeof(*tcp); 72 int plen = (len-sizeof *tcp) < (tcp->doff*4-sizeof(*tcp))?(len-sizeof(*tcp)):(tcp->doff*4-sizeof *tcp); 73 unsigned char type,optlen,*data; 74 pkt = (unsigned char*)packet+sizeof(*tcp); 75 plen = (len-sizeof *tcp) < (tcp->doff*4-sizeof(*tcp))?(len-sizeof(*tcp)):(tcp->doff*4-sizeof *tcp); 74 76 while(trace_get_next_option(&pkt,&plen,&type,&optlen,&data)) { 75 77 printf("\n TCP: "); … … 92 94 case 5: 93 95 printf("SACK Information"); 94 int i;95 96 i=0; 96 97 while(i+8<optlen) { -
libpacketdump/link_4.c
r3996329 rf5d654e 99 99 } __attribute__ ((__packed__)) ieee80211_payload; 100 100 101 char *macaddr(uint8_t mac[]) {101 static char *macaddr(uint8_t mac[]) { 102 102 static char ether_buf[18] = {0, }; 103 103 trace_ether_ntoa(mac, ether_buf); … … 724 724 725 725 if (len > hdrlen) { 726 pld = (ieee80211_payload *) ((char *)pkt + hdrlen) ;727 726 int payload_offset = 0; 728 727 uint16_t ethertype = 0; 728 pld = (ieee80211_payload *) ((char *)pkt + hdrlen) ; 729 729 if (ntohs(pld->ethertype) == 0xaaaa) { 730 730 /* 802.11 payload contains an 802.2 LLC/SNAP header */
Note: See TracChangeset
for help on using the changeset viewer.