4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since 505c421 was
d2e3359,
checked in by Perry Lorier <perry@…>, 18 years ago
|
Add missing asn1 decoder files
Add parser for tcp port 1720
|
-
Property mode set to
100644
|
File size:
752 bytes
|
Line | |
---|
1 | // h323 |
---|
2 | #include <stdio.h> |
---|
3 | #include <stdint.h> |
---|
4 | #include <dlfcn.h> |
---|
5 | #include <map> |
---|
6 | #include "tracedump.h" |
---|
7 | #include <netinet/tcp.h> |
---|
8 | #include <netinet/in.h> |
---|
9 | #include "asn1.h" |
---|
10 | |
---|
11 | #define SAFE(x) \ |
---|
12 | ((unsigned int)len>=((char*)&tcp->x-(char*)tcp+sizeof(tcp->x))) |
---|
13 | #define DISPLAY_EXP(x,fmt,exp) \ |
---|
14 | if (SAFE(x)) \ |
---|
15 | printf(fmt,exp); \ |
---|
16 | else \ |
---|
17 | return; |
---|
18 | |
---|
19 | #define DISPLAY(x,fmt) DISPLAY_EXP(x,fmt,tcp->x) |
---|
20 | |
---|
21 | #define DISPLAYS(x,fmt) DISPLAY_EXP(x,fmt,htons(tcp->x)) |
---|
22 | #define DISPLAYL(x,fmt) DISPLAY_EXP(x,fmt,htonl(tcp->x)) |
---|
23 | #define DISPLAYIP(x,fmt) DISPLAY_EXP(x,fmt,inet_ntoa(*(struct in_addr*)&tcp->x)) |
---|
24 | |
---|
25 | extern "C" |
---|
26 | void decode(int link_type,char *packet,int len) |
---|
27 | { |
---|
28 | ASN asn; |
---|
29 | if (len<=0) |
---|
30 | return; |
---|
31 | asn.feed(packet,len); |
---|
32 | asn.getEncoding()->toString(); |
---|
33 | return; |
---|
34 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.