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

Definitions and helper functions for when layer 4 is ICMP. More...

Classes

struct  Header
 ICMP header. More...
 

Enumerations

enum  Type {
  Type::EchoReply = 0,
  Type::DestinationUnreachable = 3,
  Type::RedirectMessage = 5,
  Type::EchoRequest = 8,
  Type::RouterAdvertisement = 9,
  Type::RouterSolicitation = 10,
  Type::TimeExceeded = 11,
  Type::ParameterProblem = 12,
  Type::Timestamp = 13,
  Type::TimestampReply = 14,
  Type::Unknown = 255
}
 ICMP types. More...
 

Functions

const Headerget_header (const L3_IPv4::Header *l3)
 Get the L4_ICMP::Header. More...
 
Type get_type (const Header *header)
 Get the type from the header. More...
 
uint16_t get_payload_length (const L3_IPv4::Header *l3)
 Number of bytes in ICMP payload. More...
 
std::string to_string (const Type &type)
 
bool is_known_type (const Type &type)
 Determine if the type is a known value. More...
 
bool is_unknown_type (const Type &type)
 Determine if the type is unknown. More...
 

Detailed Description

Definitions and helper functions for when layer 4 is ICMP.

Enumeration Type Documentation

enum Myra::L4_ICMP::Type
strong

ICMP types.

See also
L4_ICMP::Header::type
Note
This is not an exhaustive list. There are many more types defined in ICMP.
Enumerator
EchoReply 

0

DestinationUnreachable 

3

RedirectMessage 

5

EchoRequest 

8

RouterAdvertisement 

9

RouterSolicitation 

10

TimeExceeded 

11

ParameterProblem 

12

Timestamp 

13

TimestampReply 

14

Unknown 

255

Function Documentation

const Header* Myra::L4_ICMP::get_header ( const L3_IPv4::Header *  l3)
inline

Get the L4_ICMP::Header.

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t Myra::L4_ICMP::get_payload_length ( const L3_IPv4::Header *  l3)
inline

Number of bytes in ICMP payload.

Here is the call graph for this function:

Here is the caller graph for this function:

Type Myra::L4_ICMP::get_type ( const Header *  header)
inline

Get the type from the header.

Here is the caller graph for this function:

bool Myra::L4_ICMP::is_known_type ( const Type &  type)
inline

Determine if the type is a known value.

Here is the call graph for this function:

bool Myra::L4_ICMP::is_unknown_type ( const Type &  type)
inline

Determine if the type is unknown.

Here is the call graph for this function:

std::string Myra::L4_ICMP::to_string ( const Type &  type)
inline

Here is the caller graph for this function: