4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since d2e3359 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:
926 bytes
|
Line | |
---|
1 | #ifndef ASN1_H |
---|
2 | #define ASN1_H |
---|
3 | |
---|
4 | #include <list> |
---|
5 | |
---|
6 | enum ASN_type_class_t { |
---|
7 | Universal = 0, |
---|
8 | Application = 1, |
---|
9 | Context = 2, /* Context Specific */ |
---|
10 | Private = 3, |
---|
11 | }; |
---|
12 | |
---|
13 | class ASN_type { |
---|
14 | public: |
---|
15 | uint8_t type; |
---|
16 | ASN_type(uint8_t _type); |
---|
17 | ASN_type_class_t getClass(void) const; |
---|
18 | bool isPrimative(void) const; |
---|
19 | int getTag(void) const; |
---|
20 | }; |
---|
21 | |
---|
22 | class ASN_data { |
---|
23 | public: |
---|
24 | ASN_type type; |
---|
25 | uint64_t len; |
---|
26 | typedef std::list<uint8_t> buffer_t; |
---|
27 | buffer_t buffer; |
---|
28 | |
---|
29 | ASN_data(ASN_type _type,uint64_t _len); |
---|
30 | |
---|
31 | void feed(std::list<uint8_t> &buffer,uint64_t len); |
---|
32 | virtual void parse(void); |
---|
33 | |
---|
34 | virtual void toString(void); |
---|
35 | virtual ~ASN_data(); |
---|
36 | }; |
---|
37 | |
---|
38 | class ASN { |
---|
39 | typedef std::list <uint8_t> buffer_t; |
---|
40 | buffer_t buffer; |
---|
41 | public: |
---|
42 | void feed(char *buff,int size); |
---|
43 | void feed(std::list<uint8_t> &buff,uint64_t len); |
---|
44 | ASN_type getType(void); |
---|
45 | uint64_t getLength(void); |
---|
46 | ASN_data *getEncoding(void); |
---|
47 | bool eof(void) const; |
---|
48 | }; |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.