Class header
odtone::net::ip::icmp::header
Synopsis
class header {
public:
header(uint8, uint8);
template<typename T> static T * cast(void *, size_t);
uint8 type() const;
uint8 code() const;
void checksum(uint16);
};
Description
This class represents the header of an ICMP packet.
header
public
construct/copy/destruct
-
header(uint8 type, uint8 code);
Construct an ICMP packet header.
Parameters: |
type
|
The ICMP packet header type. |
|
header
public static functions
-
template<typename T> static T * cast(void * buffer, size_t length);
Convert a byte buffer ICMP packet.
Returns: |
The pointer of the returning ICMP packet. |
header
public member functions
-
uint8 type() const;
Get the ICMP packet header type.
Returns: |
The ICMP packet header type. |
-
uint8 code() const;
Get the ICMP packet header code.
Returns: |
The ICMP packet header code. |
-
void checksum(uint16 csum);
Set the ICMP packet checksum field.
Parameters: |
csum
|
The ICMP packet checksum field. |
|