#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 () |
cofmsg & | operator= (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 | |
cmemory * | memarea |
union { | |
uint8_t * ofhu_generic | |
struct rofl::openflow::ofp_header * ofhu_header | |
} | ofh_ofhu |
Friends | |
std::ostream & | operator<< (std::ostream &os, cofmsg const &msg) |
cofpacket
cofmsg::cofmsg | ( | size_t | size = sizeof(struct openflow::ofp_header) | ) |
constructor
cofmsg::cofmsg | ( | cofmsg const & | p | ) |
copy constructor
|
virtual |
destructor
|
inline |
frame length
|
inline |
frame length
uint32_t cofmsg::get_xid | ( | ) | const |
returns xid field in host byte order from header
|
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.
|
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.
|
static |
return information string about allocated cofpacket instances
|
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
|
inline |
start of frame
|
inline |
start of frame
|
static |
return description for ofp_type
|
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.
|
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.