Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Myra::L3_IPv4 Namespace Reference

Layer 3 is IPv4. More...

Classes

struct  Header
 Layer 3 IPv4 header. More...
 

Typedefs

typedef L3_IP::Protocol Protocol
 Pull into L3_IPv4 the IP protocol declaration to use in L3_IPv4::Header::protocol. More...
 

Functions

const Headerget_header (const uint8_t *ptr)
 Get the L3_IPv4 header. More...
 
const Headerget_header (const L2::Header *l2)
 Get the L3_IPv4 header. More...
 
Protocol get_protocol (const Header *header)
 Get the protocol from the header to determine how to interpret layer 4. More...
 
int get_version (const Header *header)
 Get the high 4 bits from Header::ver_and_ihl. More...
 
int get_ihl (const Header *header)
 Get the low 4 bits from Header::ver_and_ihl. More...
 
uint16_t get_header_length (const Header *header)
 32 bit words, but 8 bits per byte. More...
 
uint16_t get_total_length (const Header *header)
 Get the total length of layer 3+. More...
 
uint16_t get_payload_length (const Header *header)
 Number of bytes in layer 4+. More...
 
const uint8_t * get_L4_pointer (const Header *header)
 Get a pointer to the start of layer 4. More...
 
bool is_known_protocol (const Header *header)
 Determine if the protocol is a known value. More...
 
bool is_unknown_protocol (const Header *header)
 Determine if the protocol is unknown. More...
 
std::string to_string (const Protocol &proto)
 Return a simple text string that represents the IP protocol name. More...
 
bool protocol_is_ICMP (const Protocol &protocol)
 Determine if a packet's layer 4 is UDP. More...
 
bool protocol_is_ICMP (const L3_IPv4::Header *l3)
 Determine if a packet's layer 4 is UDP. More...
 
bool protocol_is_TCP (const Protocol &protocol)
 Determine if a packet's layer 4 is TCP. More...
 
bool protocol_is_TCP (const L3_IPv4::Header *l3)
 Determine if a packet's layer 4 is TCP. More...
 
bool protocol_is_UDP (const Protocol &protocol)
 Determine if a packet's layer 4 is UDP. More...
 
bool protocol_is_UDP (const L3_IPv4::Header *l3)
 Determine if a packet's layer 4 is UDP. More...
 

Detailed Description

Layer 3 is IPv4.

See also
L3_IP

Typedef Documentation

Pull into L3_IPv4 the IP protocol declaration to use in L3_IPv4::Header::protocol.

Function Documentation

const Header* Myra::L3_IPv4::get_header ( const uint8_t *  ptr)
inline

Get the L3_IPv4 header.

Here is the caller graph for this function:

const Header* Myra::L3_IPv4::get_header ( const L2::Header *  l2)
inline

Get the L3_IPv4 header.

Here is the call graph for this function:

uint16_t Myra::L3_IPv4::get_header_length ( const Header *  header)
inline

32 bit words, but 8 bits per byte.

Here is the call graph for this function:

Here is the caller graph for this function:

int Myra::L3_IPv4::get_ihl ( const Header *  header)
inline

Get the low 4 bits from Header::ver_and_ihl.

See also
L3_IPv4::get_header_length()

Here is the caller graph for this function:

const uint8_t* Myra::L3_IPv4::get_L4_pointer ( const Header *  header)
inline

Get a pointer to the start of layer 4.

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t Myra::L3_IPv4::get_payload_length ( const Header *  header)
inline

Number of bytes in layer 4+.

Here is the call graph for this function:

Here is the caller graph for this function:

Protocol Myra::L3_IPv4::get_protocol ( const Header *  header)
inline

Get the protocol from the header to determine how to interpret layer 4.

Here is the caller graph for this function:

uint16_t Myra::L3_IPv4::get_total_length ( const Header *  header)
inline

Get the total length of layer 3+.

Here is the caller graph for this function:

int Myra::L3_IPv4::get_version ( const Header *  header)
inline

Get the high 4 bits from Header::ver_and_ihl.

Here is the caller graph for this function:

bool Myra::L3_IPv4::is_known_protocol ( const Header *  header)
inline

Determine if the protocol is a known value.

See also
L3_IP::is_known_protocol()

Here is the call graph for this function:

bool Myra::L3_IPv4::is_unknown_protocol ( const Header *  header)
inline

Determine if the protocol is unknown.

See also
L3_IP::is_unknown_protocol()

Here is the call graph for this function:

bool Myra::L3_IPv4::protocol_is_ICMP ( const Protocol &  protocol)
inline

Determine if a packet's layer 4 is UDP.

Here is the caller graph for this function:

bool Myra::L3_IPv4::protocol_is_ICMP ( const L3_IPv4::Header *  l3)
inline

Determine if a packet's layer 4 is UDP.

Here is the call graph for this function:

bool Myra::L3_IPv4::protocol_is_TCP ( const Protocol &  protocol)
inline

Determine if a packet's layer 4 is TCP.

Here is the caller graph for this function:

bool Myra::L3_IPv4::protocol_is_TCP ( const L3_IPv4::Header *  l3)
inline

Determine if a packet's layer 4 is TCP.

Here is the call graph for this function:

bool Myra::L3_IPv4::protocol_is_UDP ( const Protocol &  protocol)
inline

Determine if a packet's layer 4 is UDP.

Here is the caller graph for this function:

bool Myra::L3_IPv4::protocol_is_UDP ( const L3_IPv4::Header *  l3)
inline

Determine if a packet's layer 4 is UDP.

Here is the call graph for this function:

std::string Myra::L3_IPv4::to_string ( const Protocol &  proto)
inline

Return a simple text string that represents the IP protocol name.

Here is the call graph for this function: