- Timestamp:
- 10/28/05 16:57:37 (15 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:
- 950d54a
- Parents:
- b190686
- Location:
- examples/tracedump
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/tracedump/link_10.cc
r57bbf89 rf04e489 11 11 { 12 12 printf(" Legacy ATM:"); 13 /* 14 if (len>=6) 15 printf(" %s",ether_ntoa((struct ether_addr*)packet)); 16 else { 17 printf("[|Truncated]\n"); 18 return; 19 } 20 if (len>=12) 21 printf(" %s",ether_ntoa((struct ether_addr*)(packet+6))); 22 else { 23 printf("[|Truncated]\n"); 24 return; 25 } 26 */ 27 if (len>=24) { 28 uint16_t type = htons(*(uint16_t*)(packet+22)); 13 if (len>=12) { 14 uint16_t type = htons(*(uint16_t*)(packet+10)); 29 15 printf(" %04x\n",type); 30 decode_next(packet+ 24,len-24,"eth",type);16 decode_next(packet+12,len-12,"eth",type); 31 17 } 32 18 else { -
examples/tracedump/link_11.cc
r57bbf89 rf04e489 12 12 { 13 13 printf(" Legacy Framing: "); 14 if (len>=10) { 15 decode_next(packet+10,len-10,"link",2); 16 } 17 else { 18 printf("[|Truncated]\n"); 19 return; 20 } 14 decode_next(packet,len,"link",2); 21 15 return; 22 16 } -
examples/tracedump/link_9.cc
r57bbf89 rf04e489 11 11 { 12 12 printf(" Legacy POS:"); 13 /* 14 if (len>=6) 15 printf(" %s",ether_ntoa((struct ether_addr*)packet)); 16 else { 17 printf("[|Truncated]\n"); 18 return; 19 } 20 if (len>=12) 21 printf(" %s",ether_ntoa((struct ether_addr*)(packet+6))); 22 else { 23 printf("[|Truncated]\n"); 24 return; 25 } 26 */ 27 if (len>=20) { 28 uint16_t type = htons(*(uint16_t*)(packet+18)); 13 if (len>=4) { 14 uint16_t type = htons(*(uint16_t*)(packet+2)); 29 15 printf(" %04x\n",type); 30 decode_next(packet+ 20,len-20,"eth",type);16 decode_next(packet+4,len-4,"eth",type); 31 17 } 32 18 else {
Note: See TracChangeset
for help on using the changeset viewer.