Revised OpenFlow Library  v0.6.0dev
 All Classes Files Functions Variables Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
rofl::openflow::cofmsg Class Reference

#include <cofmsg.h>

Classes

struct  typedesc_t
 

Public Member Functions

 cofmsg (uint8_t ofp_version, uint32_t xid, uint8_t type)
 
 cofmsg (size_t size=sizeof(struct openflow::ofp_header))
 
 cofmsg (cmemory *memarea)
 
 cofmsg (cofmsg const &p)
 
virtual ~cofmsg ()
 
cofmsgoperator= (cofmsg const &p)
 
virtual void reset ()
 
virtual size_t length () const
 
virtual void pack (uint8_t *buf=(uint8_t *) 0, size_t buflen=0)
 
virtual void unpack (uint8_t *buf, size_t buflen)
 
virtual void validate ()
 
virtual uint8_t * resize (size_t len)
 
uint8_t * soframe () const
 
size_t framelen () const
 
uint8_t * sobody () const
 
size_t bodylen () const
 
uint8_t get_version () const
 
virtual void set_version (uint8_t ofp_version)
 
uint16_t get_length () const
 
void set_length (uint16_t len)
 
uint8_t get_type () const
 
void set_type (uint8_t type)
 
uint32_t get_xid () const
 
void set_xid (uint32_t xid)
 
std::string str () const
 

Static Public Member Functions

static const char * packet_info (uint8_t ofp_version)
 
static const char * type2desc (uint8_t ofp_version, uint8_t type)
 

Static Public Attributes

static std::set< cofmsg * > cofpacket_list
 

Protected Attributes

cmemorymemarea
 
union {
   uint8_t *   ofhu_generic
 
   struct rofl::openflow::ofp_header *   ofhu_header
 
ofh_ofhu
 

Friends

std::ostream & operator<< (std::ostream &os, cofmsg const &msg)
 

Detailed Description

cofpacket

Inheritance diagram for rofl::openflow::cofmsg:
rofl::openflow::cofmsg_barrier_reply rofl::openflow::cofmsg_barrier_request rofl::openflow::cofmsg_echo_reply rofl::openflow::cofmsg_echo_request rofl::openflow::cofmsg_error rofl::openflow::cofmsg_experimenter rofl::openflow::cofmsg_features_reply rofl::openflow::cofmsg_features_request rofl::openflow::cofmsg_flow_mod rofl::openflow::cofmsg_flow_removed rofl::openflow::cofmsg_get_async_config_reply rofl::openflow::cofmsg_get_async_config_request rofl::openflow::cofmsg_get_config_reply rofl::openflow::cofmsg_get_config_request rofl::openflow::cofmsg_group_mod rofl::openflow::cofmsg_hello rofl::openflow::cofmsg_meter_mod rofl::openflow::cofmsg_packet_in rofl::openflow::cofmsg_packet_out rofl::openflow::cofmsg_port_mod rofl::openflow::cofmsg_port_status rofl::openflow::cofmsg_queue_get_config_reply rofl::openflow::cofmsg_queue_get_config_request rofl::openflow::cofmsg_role_reply rofl::openflow::cofmsg_role_request rofl::openflow::cofmsg_set_async_config rofl::openflow::cofmsg_set_config rofl::openflow::cofmsg_stats rofl::openflow::cofmsg_table_mod

Constructor & Destructor Documentation

cofmsg::cofmsg ( size_t  size = sizeof(struct openflow::ofp_header))

constructor

cofmsg::cofmsg ( cofmsg const &  p)

copy constructor

cofmsg::~cofmsg ( )
virtual

destructor

Member Function Documentation

size_t rofl::openflow::cofmsg::bodylen ( ) const
inline

frame length

size_t rofl::openflow::cofmsg::framelen ( ) const
inline

frame length

uint32_t cofmsg::get_xid ( ) const

returns xid field in host byte order from header

size_t cofmsg::length ( ) const
virtual

returns length of packet in packed state

Reimplemented in rofl::openflow::cofmsg_set_config, rofl::openflow::cofmsg_set_async_config, rofl::openflow::cofmsg_experimenter_stats_reply, rofl::openflow::cofmsg_flow_stats_reply, rofl::openflow::cofmsg_table_features_stats_reply, rofl::openflow::cofmsg_port_stats_reply, rofl::openflow::cofmsg_queue_get_config_reply, rofl::openflow::cofmsg_group_stats_reply, rofl::openflow::cofmsg_aggr_stats_reply, rofl::openflow::cofmsg_queue_stats_reply, rofl::openflow::cofmsg_meter_config_stats_reply, rofl::openflow::cofmsg_table_stats_reply, rofl::openflow::cofmsg_meter_stats_reply, rofl::openflow::cofmsg_features_reply, rofl::openflow::cofmsg_desc_stats_reply, rofl::openflow::cofmsg_group_desc_stats_reply, rofl::openflow::cofmsg_port_desc_stats_reply, rofl::openflow::cofmsg_group_features_stats_reply, rofl::openflow::cofmsg_get_config_reply, rofl::openflow::cofmsg_echo_reply, rofl::openflow::cofmsg_role_reply, rofl::openflow::cofmsg_barrier_reply, rofl::openflow::cofmsg_get_async_config_reply, rofl::openflow::cofmsg_meter_features_stats_reply, rofl::openflow::cofmsg_flow_removed, rofl::openflow::cofmsg_packet_in, rofl::openflow::cofmsg_group_mod, rofl::openflow::cofmsg_flow_stats_request, rofl::openflow::cofmsg_packet_out, rofl::openflow::cofmsg_flow_mod, rofl::openflow::cofmsg_error, rofl::openflow::cofmsg_experimenter_stats_request, rofl::openflow::cofmsg_port_stats_request, rofl::openflow::cofmsg_experimenter, rofl::openflow::cofmsg_port_mod, rofl::openflow::cofmsg_stats, rofl::openflow::cofmsg_aggr_stats_request, rofl::openflow::cofmsg_port_status, rofl::openflow::cofmsg_group_stats_request, rofl::openflow::cofmsg_queue_get_config_request, rofl::openflow::cofmsg_table_features_stats_request, rofl::openflow::cofmsg_table_mod, rofl::openflow::cofmsg_queue_stats_request, rofl::openflow::cofmsg_table_stats_request, rofl::openflow::cofmsg_group_desc_stats_request, rofl::openflow::cofmsg_port_desc_stats_request, rofl::openflow::cofmsg_desc_stats_request, rofl::openflow::cofmsg_meter_config_stats_request, rofl::openflow::cofmsg_group_features_stats_request, rofl::openflow::cofmsg_meter_stats_request, rofl::openflow::cofmsg_meter_mod, rofl::openflow::cofmsg_barrier_request, rofl::openflow::cofmsg_echo_request, rofl::openflow::cofmsg_hello, rofl::openflow::cofmsg_role_request, rofl::openflow::cofmsg_features_request, rofl::openflow::cofmsg_get_async_config_request, and rofl::openflow::cofmsg_get_config_request.

cofmsg & cofmsg::operator= ( cofmsg const &  p)

assignment operator

void cofmsg::pack ( uint8_t *  buf = (uint8_t*)0,
size_t  buflen = 0 
)
virtual

pack OFpacket content to specified buffer

Reimplemented in rofl::openflow::cofmsg_set_config, rofl::openflow::cofmsg_set_async_config, rofl::openflow::cofmsg_experimenter_stats_reply, rofl::openflow::cofmsg_flow_stats_reply, rofl::openflow::cofmsg_table_features_stats_reply, rofl::openflow::cofmsg_port_stats_reply, rofl::openflow::cofmsg_queue_get_config_reply, rofl::openflow::cofmsg_group_stats_reply, rofl::openflow::cofmsg_aggr_stats_reply, rofl::openflow::cofmsg_queue_stats_reply, rofl::openflow::cofmsg_meter_config_stats_reply, rofl::openflow::cofmsg_table_stats_reply, rofl::openflow::cofmsg_meter_stats_reply, rofl::openflow::cofmsg_features_reply, rofl::openflow::cofmsg_desc_stats_reply, rofl::openflow::cofmsg_group_desc_stats_reply, rofl::openflow::cofmsg_port_desc_stats_reply, rofl::openflow::cofmsg_group_features_stats_reply, rofl::openflow::cofmsg_get_config_reply, rofl::openflow::cofmsg_echo_reply, rofl::openflow::cofmsg_role_reply, rofl::openflow::cofmsg_barrier_reply, rofl::openflow::cofmsg_get_async_config_reply, rofl::openflow::cofmsg_meter_features_stats_reply, rofl::openflow::cofmsg_flow_removed, rofl::openflow::cofmsg_packet_in, rofl::openflow::cofmsg_group_mod, rofl::openflow::cofmsg_flow_stats_request, rofl::openflow::cofmsg_packet_out, rofl::openflow::cofmsg_error, rofl::openflow::cofmsg_experimenter_stats_request, rofl::openflow::cofmsg_flow_mod, rofl::openflow::cofmsg_port_stats_request, rofl::openflow::cofmsg_experimenter, rofl::openflow::cofmsg_port_mod, rofl::openflow::cofmsg_stats, rofl::openflow::cofmsg_aggr_stats_request, rofl::openflow::cofmsg_port_status, rofl::openflow::cofmsg_group_stats_request, rofl::openflow::cofmsg_queue_get_config_request, rofl::openflow::cofmsg_table_features_stats_request, rofl::openflow::cofmsg_table_mod, rofl::openflow::cofmsg_queue_stats_request, rofl::openflow::cofmsg_table_stats_request, rofl::openflow::cofmsg_group_desc_stats_request, rofl::openflow::cofmsg_port_desc_stats_request, rofl::openflow::cofmsg_desc_stats_request, rofl::openflow::cofmsg_meter_config_stats_request, rofl::openflow::cofmsg_group_features_stats_request, rofl::openflow::cofmsg_meter_stats_request, rofl::openflow::cofmsg_meter_mod, rofl::openflow::cofmsg_barrier_request, rofl::openflow::cofmsg_echo_request, rofl::openflow::cofmsg_hello, rofl::openflow::cofmsg_role_request, rofl::openflow::cofmsg_features_request, rofl::openflow::cofmsg_get_async_config_request, and rofl::openflow::cofmsg_get_config_request.

const char * cofmsg::packet_info ( uint8_t  ofp_version)
static

return information string about allocated cofpacket instances

void cofmsg::reset ( )
virtual

reset packet content

Reimplemented in rofl::openflow::cofmsg_set_config, rofl::openflow::cofmsg_experimenter_stats_reply, rofl::openflow::cofmsg_flow_stats_reply, rofl::openflow::cofmsg_table_features_stats_reply, rofl::openflow::cofmsg_port_stats_reply, rofl::openflow::cofmsg_queue_get_config_reply, rofl::openflow::cofmsg_group_stats_reply, rofl::openflow::cofmsg_aggr_stats_reply, rofl::openflow::cofmsg_queue_stats_reply, rofl::openflow::cofmsg_meter_config_stats_reply, rofl::openflow::cofmsg_table_stats_reply, rofl::openflow::cofmsg_meter_stats_reply, rofl::openflow::cofmsg_features_reply, rofl::openflow::cofmsg_desc_stats_reply, rofl::openflow::cofmsg_group_desc_stats_reply, rofl::openflow::cofmsg_echo_reply, rofl::openflow::cofmsg_port_desc_stats_reply, rofl::openflow::cofmsg_group_features_stats_reply, rofl::openflow::cofmsg_role_reply, rofl::openflow::cofmsg_barrier_reply, rofl::openflow::cofmsg_get_config_reply, rofl::openflow::cofmsg_meter_features_stats_reply, rofl::openflow::cofmsg_flow_removed, rofl::openflow::cofmsg_packet_in, rofl::openflow::cofmsg_group_mod, rofl::openflow::cofmsg_flow_stats_request, rofl::openflow::cofmsg_packet_out, rofl::openflow::cofmsg_error, rofl::openflow::cofmsg_experimenter_stats_request, rofl::openflow::cofmsg_port_stats_request, rofl::openflow::cofmsg_experimenter, rofl::openflow::cofmsg_port_mod, rofl::openflow::cofmsg_stats, rofl::openflow::cofmsg_aggr_stats_request, rofl::openflow::cofmsg_port_status, rofl::openflow::cofmsg_group_stats_request, rofl::openflow::cofmsg_queue_get_config_request, rofl::openflow::cofmsg_table_features_stats_request, rofl::openflow::cofmsg_table_mod, rofl::openflow::cofmsg_queue_stats_request, rofl::openflow::cofmsg_table_stats_request, rofl::openflow::cofmsg_barrier_request, rofl::openflow::cofmsg_echo_request, rofl::openflow::cofmsg_group_desc_stats_request, rofl::openflow::cofmsg_hello, rofl::openflow::cofmsg_meter_mod, rofl::openflow::cofmsg_port_desc_stats_request, rofl::openflow::cofmsg_desc_stats_request, rofl::openflow::cofmsg_group_features_stats_request, rofl::openflow::cofmsg_role_request, rofl::openflow::cofmsg_features_request, rofl::openflow::cofmsg_get_async_config_request, rofl::openflow::cofmsg_get_config_request, and rofl::openflow::cofmsg_flow_mod.

void cofmsg::set_xid ( uint32_t  xid)

sets xid field in header

uint8_t* rofl::openflow::cofmsg::sobody ( ) const
inline

start of frame

uint8_t* rofl::openflow::cofmsg::soframe ( ) const
inline

start of frame

const char * cofmsg::type2desc ( uint8_t  ofp_version,
uint8_t  type 
)
static

return description for ofp_type

void cofmsg::unpack ( uint8_t *  buf,
size_t  buflen 
)
virtual

unpack OFpacket content from specified buffer

Reimplemented in rofl::openflow::cofmsg_set_config, rofl::openflow::cofmsg_set_async_config, rofl::openflow::cofmsg_experimenter_stats_reply, rofl::openflow::cofmsg_flow_stats_reply, rofl::openflow::cofmsg_table_features_stats_reply, rofl::openflow::cofmsg_port_stats_reply, rofl::openflow::cofmsg_queue_get_config_reply, rofl::openflow::cofmsg_group_stats_reply, rofl::openflow::cofmsg_aggr_stats_reply, rofl::openflow::cofmsg_queue_stats_reply, rofl::openflow::cofmsg_meter_config_stats_reply, rofl::openflow::cofmsg_table_stats_reply, rofl::openflow::cofmsg_meter_stats_reply, rofl::openflow::cofmsg_features_reply, rofl::openflow::cofmsg_desc_stats_reply, rofl::openflow::cofmsg_group_desc_stats_reply, rofl::openflow::cofmsg_port_desc_stats_reply, rofl::openflow::cofmsg_group_features_stats_reply, rofl::openflow::cofmsg_get_config_reply, rofl::openflow::cofmsg_echo_reply, rofl::openflow::cofmsg_role_reply, rofl::openflow::cofmsg_barrier_reply, rofl::openflow::cofmsg_get_async_config_reply, rofl::openflow::cofmsg_meter_features_stats_reply, rofl::openflow::cofmsg_flow_removed, rofl::openflow::cofmsg_packet_in, rofl::openflow::cofmsg_group_mod, rofl::openflow::cofmsg_flow_stats_request, rofl::openflow::cofmsg_packet_out, rofl::openflow::cofmsg_error, rofl::openflow::cofmsg_experimenter_stats_request, rofl::openflow::cofmsg_flow_mod, rofl::openflow::cofmsg_port_stats_request, rofl::openflow::cofmsg_experimenter, rofl::openflow::cofmsg_port_mod, rofl::openflow::cofmsg_stats, rofl::openflow::cofmsg_aggr_stats_request, rofl::openflow::cofmsg_port_status, rofl::openflow::cofmsg_group_stats_request, rofl::openflow::cofmsg_queue_get_config_request, rofl::openflow::cofmsg_table_features_stats_request, rofl::openflow::cofmsg_table_mod, rofl::openflow::cofmsg_queue_stats_request, rofl::openflow::cofmsg_table_stats_request, rofl::openflow::cofmsg_group_desc_stats_request, rofl::openflow::cofmsg_port_desc_stats_request, rofl::openflow::cofmsg_desc_stats_request, rofl::openflow::cofmsg_meter_config_stats_request, rofl::openflow::cofmsg_group_features_stats_request, rofl::openflow::cofmsg_meter_stats_request, rofl::openflow::cofmsg_meter_mod, rofl::openflow::cofmsg_barrier_request, rofl::openflow::cofmsg_echo_request, rofl::openflow::cofmsg_hello, rofl::openflow::cofmsg_role_request, rofl::openflow::cofmsg_features_request, rofl::openflow::cofmsg_get_async_config_request, and rofl::openflow::cofmsg_get_config_request.

void cofmsg::validate ( )
virtual

parse packet and validate it

Reimplemented in rofl::openflow::cofmsg_set_config, rofl::openflow::cofmsg_set_async_config, rofl::openflow::cofmsg_experimenter_stats_reply, rofl::openflow::cofmsg_flow_stats_reply, rofl::openflow::cofmsg_table_features_stats_reply, rofl::openflow::cofmsg_port_stats_reply, rofl::openflow::cofmsg_queue_get_config_reply, rofl::openflow::cofmsg_group_stats_reply, rofl::openflow::cofmsg_aggr_stats_reply, rofl::openflow::cofmsg_queue_stats_reply, rofl::openflow::cofmsg_meter_config_stats_reply, rofl::openflow::cofmsg_table_stats_reply, rofl::openflow::cofmsg_meter_stats_reply, rofl::openflow::cofmsg_features_reply, rofl::openflow::cofmsg_desc_stats_reply, rofl::openflow::cofmsg_group_desc_stats_reply, rofl::openflow::cofmsg_port_desc_stats_reply, rofl::openflow::cofmsg_group_features_stats_reply, rofl::openflow::cofmsg_get_config_reply, rofl::openflow::cofmsg_echo_reply, rofl::openflow::cofmsg_role_reply, rofl::openflow::cofmsg_barrier_reply, rofl::openflow::cofmsg_get_async_config_reply, rofl::openflow::cofmsg_meter_features_stats_reply, rofl::openflow::cofmsg_flow_removed, rofl::openflow::cofmsg_packet_in, rofl::openflow::cofmsg_group_mod, rofl::openflow::cofmsg_flow_stats_request, rofl::openflow::cofmsg_packet_out, rofl::openflow::cofmsg_error, rofl::openflow::cofmsg_experimenter_stats_request, rofl::openflow::cofmsg_port_stats_request, rofl::openflow::cofmsg_experimenter, rofl::openflow::cofmsg_port_mod, rofl::openflow::cofmsg_stats, rofl::openflow::cofmsg_aggr_stats_request, rofl::openflow::cofmsg_port_status, rofl::openflow::cofmsg_group_stats_request, rofl::openflow::cofmsg_queue_get_config_request, rofl::openflow::cofmsg_table_features_stats_request, rofl::openflow::cofmsg_table_mod, rofl::openflow::cofmsg_queue_stats_request, rofl::openflow::cofmsg_table_stats_request, rofl::openflow::cofmsg_group_desc_stats_request, rofl::openflow::cofmsg_port_desc_stats_request, rofl::openflow::cofmsg_desc_stats_request, rofl::openflow::cofmsg_meter_config_stats_request, rofl::openflow::cofmsg_group_features_stats_request, rofl::openflow::cofmsg_meter_stats_request, rofl::openflow::cofmsg_meter_mod, rofl::openflow::cofmsg_barrier_request, rofl::openflow::cofmsg_echo_request, rofl::openflow::cofmsg_hello, rofl::openflow::cofmsg_role_request, rofl::openflow::cofmsg_features_request, rofl::openflow::cofmsg_get_async_config_request, rofl::openflow::cofmsg_get_config_request, and rofl::openflow::cofmsg_flow_mod.


The documentation for this class was generated from the following files: