Changeset 914
- Timestamp:
- 08/18/06 17:51:32 (7 years ago)
- Location:
- trunk/libpacketdump
- Files:
-
- 1 edited
- 7 moved
-
Makefile.am (modified) (3 diffs)
-
eth_2048.c (moved) (moved from trunk/libpacketdump/eth_2048.cc) (1 diff)
-
eth_2054.c (moved) (moved from trunk/libpacketdump/eth_2054.cc) (4 diffs)
-
ip_1.c (moved) (moved from trunk/libpacketdump/ip_1.cc) (1 diff)
-
ip_132.c (moved) (moved from trunk/libpacketdump/ip_132.cc) (2 diffs)
-
ip_17.c (moved) (moved from trunk/libpacketdump/ip_17.cc) (2 diffs)
-
ip_33.c (moved) (moved from trunk/libpacketdump/ip_33.cc) (2 diffs)
-
ip_6.c (moved) (moved from trunk/libpacketdump/ip_6.cc) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/libpacketdump/Makefile.am
r913 r914 25 25 26 26 # Decoders for various ethertypes (in decimal) 27 BIN_PROTOCOLS+=eth_2048.la 28 BIN_PROTOCOLS+=eth_2054.la 29 TXT_PROTOCOLS+=eth_33024.protocol 27 BIN_PROTOCOLS+=eth_2048.la # IPv4 28 BIN_PROTOCOLS+=eth_2054.la # ARP 29 TXT_PROTOCOLS+=eth_33024.protocol # IPv6 30 30 31 31 # IP Protocol decoders … … 53 53 link_11_la_LDFLAGS=-module 54 54 55 eth_2048_la_LDFLAGS=-module 56 eth_2054_la_LDFLAGS=-module 57 58 ip_1_la_LDFLAGS=-module 59 ip_6_la_LDFLAGS=-module 60 ip_17_la_LDFLAGS=-module 61 ip_33_la_LDFLAGS=-module 62 ip_132_la_LDFLAGS=-module 63 55 64 SUBDIRS = parser 56 65 … … 58 67 59 68 plugin_LTLIBRARIES = $(BIN_PROTOCOLS) 60 plugin_DATA = $(TXT_PROTOCOLS) )69 plugin_DATA = $(TXT_PROTOCOLS) 61 70 62 71 INCLUDES= @ADD_INCLS@ -I../lib -I../ -
trunk/libpacketdump/eth_2048.c
r893 r914 24 24 #define DISPLAYIP(x,fmt) DISPLAY_EXP(x,fmt,inet_ntoa(*(struct in_addr*)&ip->x)) 25 25 26 extern "C"27 26 void decode(int link_type,char *packet,int len) 28 27 { -
trunk/libpacketdump/eth_2054.c
r893 r914 29 29 static char buffer[1024]; 30 30 char ether_buf[18] = {0, }; 31 int i; 32 31 33 if (hrd==NULL) 32 34 return "Truncated (Truncated)"; … … 37 39 break; 38 40 default: 39 int i;40 41 for (i=0;i<arp->ar_hln;i++) { 41 42 snprintf(buffer,sizeof(buffer),"%s %02x", … … 53 54 break; 54 55 default: 55 int i;56 56 strncat(buffer," (",sizeof(buffer)); 57 57 for (i=0;i<arp->ar_pln;i++) { … … 65 65 } 66 66 67 extern "C"68 67 void decode(int link_type,char *packet,int len) 69 68 { -
trunk/libpacketdump/ip_1.c
r893 r914 39 39 }; 40 40 41 extern "C"42 41 void decode(int link_type,char *packet,int len) 43 42 { -
trunk/libpacketdump/ip_132.c
r893 r914 2 2 #include <inttypes.h> 3 3 #include <dlfcn.h> 4 #include <map>5 4 #include "libpacketdump.h" 6 5 … … 152 151 } 153 152 154 extern "C"155 153 void decode(int link_type,char *packet,int len) 156 154 { -
trunk/libpacketdump/ip_17.c
r893 r914 2 2 #include <inttypes.h> 3 3 #include <dlfcn.h> 4 #include <map>5 4 #include "libpacketdump.h" 6 5 #include "libtrace.h" … … 26 25 27 26 28 extern "C"29 27 void decode(int link_type,char *packet,int len) 30 28 { -
trunk/libpacketdump/ip_33.c
r893 r914 3 3 #include <inttypes.h> 4 4 #include <dlfcn.h> 5 #include <map>6 5 #include "libpacketdump.h" 7 6 #include <netinet/tcp.h> … … 74 73 } 75 74 76 extern "C"77 75 void decode(int link_type,char *packet,int len) 78 76 { -
trunk/libpacketdump/ip_6.c
r893 r914 46 46 } 47 47 48 extern "C"49 48 void decode(int link_type,char *packet,int len) 50 49 { … … 97 96 DISPLAYS(urg_ptr," Urgent %i"); 98 97 unsigned char *pkt = (unsigned char*)packet+sizeof(*tcp); 99 int plen = (len-sizeof *tcp) < ?(tcp->doff*4-sizeof *tcp);98 int plen = (len-sizeof *tcp) < (tcp->doff*4-sizeof(*tcp))?(len-sizeof(*tcp)):(tcp->doff*4-sizeof *tcp); 100 99 unsigned char type,optlen,*data; 101 100 while(get_next_option(&pkt,&plen,&type,&optlen,&data)) {
Note: See TracChangeset
for help on using the changeset viewer.
