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

This file contains some definitions and helper functions specific to IP, or shared between IPv4 and IPv6. More...

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

Namespaces

 Myra
 Namespace declaration for all of the Myra Canyon helper functions.
 
 Myra::L2
 Layer 2 (ethernet).
 
 Myra::L3_IP
 Layer 3 is either IPv4 or IPv6.
 

Enumerations

enum  Myra::L3_IP::Protocol {
  Myra::L3_IP::Protocol::Unknown = 255,
  Myra::L3_IP::Protocol::HOPOPTS = IPPROTO_HOPOPTS,
  Myra::L3_IP::Protocol::ICMP = IPPROTO_ICMP,
  Myra::L3_IP::Protocol::TCP = IPPROTO_TCP,
  Myra::L3_IP::Protocol::UDP = IPPROTO_UDP,
  Myra::L3_IP::Protocol::ICMPv6 = IPPROTO_ICMPV6
}
 Single-byte protocol numbers used in Myra::L3_IPv4::Header::protocol and Myra::L3_IPv6::Header::next_header. More...
 

Functions

std::string Myra::L3_IP::to_string (const Protocol &protocol)
 Return a simple text string that represents the name of the IP protocol (layer 4). More...
 
bool Myra::L3_IP::is_known_protocol (const Protocol &protocol)
 Determine if the protocol is a known value. More...
 
bool Myra::L3_IP::is_unknown_protocol (const Protocol &protocol)
 Determine if the protocol is unknown. More...
 
bool Myra::L2::ethertype_is_IP (const L2::Ethertype type)
 Determine if a packet's layer 3 is IP. More...
 
bool Myra::L2::ethertype_is_IP (const L2::Header *l2)
 Determine if a packet's layer 3 is IP. More...
 

Detailed Description

This file contains some definitions and helper functions specific to IP, or shared between IPv4 and IPv6.