-
Notifications
You must be signed in to change notification settings - Fork 0
/
UDPHeader.h
36 lines (28 loc) · 904 Bytes
/
UDPHeader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef UDPHEADER_H_
# define UDPHEADER_H_
#include "ITLHeader.h"
namespace Yellow
{
class UDPHeader : public Yellow::ITLHeader
{
public:
UDPHeader(void *);
UDPHeader(const UDPHeader &);
UDPHeader &operator=(const UDPHeader &);
virtual ~UDPHeader();
virtual const unsigned char *operator[](int) const;
virtual const int getLenght() const;
const unsigned short int getSourcePort() const;
void setSourcePort(const unsigned short int);
const unsigned short int getDestPort() const;
void setDestPort(const unsigned short int);
const unsigned short int getUDPLenght() const;
void setUDPLenght(const unsigned short int);
const unsigned short int getChecksum() const;
void setChecksum(const unsigned short int);
private:
struct udphdr *udp;
unsigned char *buff;
};
}
#endif /* !UDPHEADER_H_ */