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

This file contains some definitions and helper functions for when layer 4 is ICMP. More...

#include "Types.hpp"
#include "L3_IPv4.hpp"
Include dependency graph for L4_ICMP.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  Myra::L4_ICMP::Header
 ICMP header. More...
 

Namespaces

 Myra
 Namespace declaration for all of the Myra Canyon helper functions.
 
 Myra::L3_IPv4
 Layer 3 is IPv4.
 
 Myra::L4_ICMP
 Definitions and helper functions for when layer 4 is ICMP.
 

Enumerations

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

Functions

const Header * Myra::L4_ICMP::get_header (const L3_IPv4::Header *l3)
 Get the L4_ICMP::Header. More...
 
Type Myra::L4_ICMP::get_type (const Header *header)
 Get the type from the header. More...
 
uint16_t Myra::L4_ICMP::get_payload_length (const L3_IPv4::Header *l3)
 Number of bytes in ICMP payload. More...
 
std::string Myra::L4_ICMP::to_string (const Type &type)
 
bool Myra::L4_ICMP::is_known_type (const Type &type)
 Determine if the type is a known value. More...
 
bool Myra::L4_ICMP::is_unknown_type (const Type &type)
 Determine if the type is unknown. More...
 
bool Myra::L3_IPv4::protocol_is_ICMP (const Protocol &protocol)
 Determine if a packet's layer 4 is UDP. More...
 
bool Myra::L3_IPv4::protocol_is_ICMP (const L3_IPv4::Header *l3)
 Determine if a packet's layer 4 is UDP. More...
 

Detailed Description

This file contains some definitions and helper functions for when layer 4 is ICMP.