Rev | Line | |
---|
[22] | 1 | #ifndef UDP_DISSECTOR_H |
---|
| 2 | #define UDP_DISSECTOR_H |
---|
| 3 | |
---|
| 4 | #include "Dissector.h" |
---|
| 5 | #include <string> |
---|
| 6 | |
---|
| 7 | class UdpDissector : public Dissector { |
---|
| 8 | |
---|
| 9 | public: |
---|
| 10 | UdpDissector(); |
---|
| 11 | virtual ~UdpDissector(); |
---|
| 12 | virtual UdpDissector * Clone() const; |
---|
| 13 | virtual bool Dissect(const unsigned char * pData, const ssize_t nDataLen); |
---|
| 14 | virtual bool NeedReassembly() const; |
---|
| 15 | virtual const EProtocolType GetUpperLayerType() const; |
---|
| 16 | |
---|
| 17 | private: |
---|
| 18 | struct UdpHeader { |
---|
| 19 | unsigned short srcPort; // Source port no. |
---|
| 20 | unsigned short destPort; // Dest. port no. |
---|
| 21 | unsigned short length; // UDP packet length |
---|
| 22 | unsigned short checksum; // UDP checksum (optional) |
---|
| 23 | }; |
---|
| 24 | |
---|
| 25 | private: |
---|
| 26 | UdpHeader * m_udpHdr; |
---|
| 27 | protected: |
---|
| 28 | ProtocolInfoElement * CreateLayerInfo(); |
---|
| 29 | }; |
---|
| 30 | |
---|
| 31 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.