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

This file contains some definitions and helper functions for when L3 is IPv6. More...

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

Classes

struct  Myra::L3_IPv6::Header
 IPv6 header. More...
 

Namespaces

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

Typedefs

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

Functions

const Header * Myra::L3_IPv6::get_header (const uint8_t *ptr)
 Get the L3_IPv6 header. More...
 
const Header * Myra::L3_IPv6::get_header (const L2::Header *l2)
 Get the L3_IPv6 header. More...
 
int Myra::L3_IPv6::get_version (const Header *header)
 Get the high 4 bits from L3_IPv6::Header::ver_class_flow_label. More...
 
int Myra::L3_IPv6::get_diffserv (const Header *header)
 Get the DiffServ (6 bits) from L3_IPv6::Header::ver_class_flow_label. More...
 
int Myra::L3_IPv6::get_ecn (const Header *header)
 Get the ECN (2 bits) from L3_IPv6::Header::ver_class_flow_label. More...
 
int Myra::L3_IPv6::get_flow_label (const Header *header)
 Get the flow label (20 bits) from L3_IPv6::Header::ver_class_flow_label. More...
 
const uint8_t * Myra::L3_IPv6::get_L4_pointer (const Header *header)
 Get a pointer to the start of L4. More...
 
Protocol Myra::L3_IPv6::get_protocol (const Header *header)
 Get the protocol from the header to determine how to interpret L4. More...
 
Protocol Myra::L3_IPv6::get_next_header (const Header *header)
 get_next_header() is the IPv6 equivalent to L3_IPv4::get_protocol() More...
 
bool Myra::L3_IPv6::is_known_protocol (const Header *header)
 Determine if the protocol is a known value. More...
 
bool Myra::L3_IPv6::is_unknown_protocol (const Header *header)
 Determine if the protocol is unknown. More...
 
std::string Myra::L3_IPv6::to_string (const Protocol &proto)
 Return a simple text string that represents the IP protocol name. More...
 
uint16_t Myra::L3_IPv6::get_payload_length (const Header *header)
 
bool Myra::L2::ethertype_is_IPv6 (const L2::Ethertype type)
 Determine if a packet's layer 3 is IPv6. More...
 
bool Myra::L2::ethertype_is_IPv6 (const L2::Header *l2)
 Determine if a packet's layer 3 is IPv6. More...
 

Detailed Description

This file contains some definitions and helper functions for when L3 is IPv6.