Changeset 4f55f69 for libpacketdump/ip_33.c
- Timestamp:
- 04/27/07 23:35:49 (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:
- d6d2a32
- Parents:
- 0f42351
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpacketdump/ip_33.c
r0a22046 r4f55f69 47 47 }; 48 48 49 int get_next_option(unsigned char **ptr,int *len, 50 unsigned char *type, 51 unsigned char *optlen, 52 unsigned char **data) 53 { 54 if (*len<=0) 55 return 0; 56 *type=**ptr; 57 switch(*type) { 58 case 0: 59 return 0; 60 case 1: 61 (*ptr)++; 62 (*len)--; 63 return 1; 64 default: 65 *optlen = *(*ptr+1); 66 (*len)-=*optlen; 67 (*data)=(*ptr+2); 68 (*ptr)+=*optlen; 69 if (*len<0) 70 return 0; 71 return 1; 72 } 73 } 74 75 void decode(int link_type,char *packet,int len) 49 void decode(int link_type,char *packet,unsigned len) 76 50 { 77 51 struct dccphdr *dccp = (struct dccphdr*)packet;
Note: See TracChangeset
for help on using the changeset viewer.