Changeset 387d299 for libpacketdump/ip_1.c
- Timestamp:
- 07/04/14 11:37:25 (7 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
- d14e23d
- Parents:
- 9ad7a35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpacketdump/ip_1.c
rec0b927 r387d299 3 3 #include <dlfcn.h> 4 4 #include "libpacketdump.h" 5 6 #define STRUCT icmp7 8 #define SAFE(x) \9 ((unsigned int)len>=((char*)&STRUCT->x-(char*)STRUCT+sizeof(STRUCT->x)))10 #define DISPLAY_EXP(x,fmt,exp) \11 if (SAFE(x)) \12 printf(fmt,exp); \13 else \14 return;15 16 #define DISPLAY(x,fmt) DISPLAY_EXP(x,fmt,STRUCT->x)17 18 #define DISPLAYS(x,fmt) DISPLAY_EXP(x,fmt,htons(STRUCT->x))19 #define DISPLAYL(x,fmt) DISPLAY_EXP(x,fmt,htonl(STRUCT->x))20 #define DISPLAYIP(x,fmt) DISPLAY_EXP(x,fmt,inet_ntoa(*(struct in_addr*)&STRUCT->x))21 5 22 6 static char *unreach_types[]={
Note: See TracChangeset
for help on using the changeset viewer.