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

Public Member Functions

 coftable_feature_prop_actions (uint8_t ofp_version=OFP_VERSION_UNKNOWN, uint16_t type=0)
 
 coftable_feature_prop_actions (coftable_feature_prop_actions const &tfpa)
 
coftable_feature_prop_actionsoperator= (coftable_feature_prop_actions const &tfpa)
 
virtual void clear ()
 
virtual size_t length () const
 
virtual void pack (uint8_t *buf, size_t buflen)
 Copies content of this cmemory instance to specified buffer.
 
virtual void unpack (uint8_t *buf, size_t buflen)
 Copies content of specified buffer into this cmemory instance .
 
std::vector< struct
rofl::openflow::ofp_action > & 
set_action_ids ()
 
const std::vector< struct
rofl::openflow::ofp_action > & 
get_action_ids () const
 
void add_action (uint16_t type, uint16_t len=sizeof(struct rofl::openflow::ofp_action))
 
- Public Member Functions inherited from rofl::openflow::coftable_feature_prop
 coftable_feature_prop (uint8_t ofp_version, uint16_t type, size_t len=sizeof(struct openflow13::ofp_table_feature_prop_header))
 
 coftable_feature_prop (coftable_feature_prop const &tfp)
 
coftable_feature_propoperator= (coftable_feature_prop const &tfp)
 
uint8_t get_version () const
 
uint16_t get_type () const
 
void set_type (uint16_t type)
 
uint16_t get_length () const
 
void set_length (uint16_t len)
 
- Public Member Functions inherited from rofl::cmemory
 cmemory (size_t len=CMEMORY_DEFAULT_SIZE)
 Constructor. Allocates a new memory area with specified size (default: 1024 bytes). More...
 
 cmemory (uint8_t *data, size_t datalen)
 Constructor. Allocates a new memory area and clones specified buffer. More...
 
 cmemory (cmemory const &m)
 Copy constructor. More...
 
virtual ~cmemory ()
 Destructor. Calls C-function free() for allocated memory area.
 
cmemoryoperator= (cmemory const &m)
 Assignment operator. More...
 
uint8_t & operator[] (size_t index) const
 Index operator. More...
 
bool operator== (cmemory const &m) const
 Comparison operator. More...
 
bool operator!= (cmemory const &m) const
 Comparison operator (unequal). More...
 
bool operator< (cmemory const &m) const
 Less than operator. More...
 
bool operator> (cmemory const &m) const
 Less than operator. More...
 
cmemory operator& (cmemory const &m) const
 AND operator. More...
 
cmemoryoperator+= (cmemory const &m)
 Append operator with assignment to this cmemory instance. More...
 
cmemory operator+ (cmemory const &m)
 Append operator with assignment to temporary cmemory instance. More...
 
uint8_t * somem () const
 Returns pointer to start of allocated memory area.
 
size_t memlen () const
 Returns length of allocated memory area.
 
virtual void assign (uint8_t *buf, size_t buflen)
 Overwrites memory area with plain buffer specified. Resizes internal memory as necessary. More...
 
uint8_t * insert (uint8_t *ptr, size_t len)
 Inserts len bytes at pointer ptr into allocated memory area. More...
 
uint8_t * insert (unsigned int offset, size_t len)
 Inserts len bytes at start of allocated memory area plus offset. More...
 
void remove (uint8_t *ptr, size_t len)
 Removes len bytes starting at pointer ptr from allocated memory area. More...
 
void remove (unsigned int offset, size_t len)
 Removes len bytes starting at offset relative to the allocated memory area. More...
 
unsigned int find_first_of (uint8_t value, unsigned int start)
 Returns index of first byte with value "value" found in allocated memory area starting at offset "start". More...
 
void clear ()
 Clears the allocated memory area by setting all bytes to 0.
 
virtual std::string toString () const
 map onto std::string instance
 
virtual bool empty () const
 Returns boolean value empty/non empty.
 

Protected Member Functions

uint8_t * resize (size_t size)
 Resizes allocated memory area by calling C-function realloc(). More...
 

Friends

std::ostream & operator<< (std::ostream &os, coftable_feature_prop_actions const &tfp)
 
Inheritance diagram for rofl::openflow::coftable_feature_prop_actions:
rofl::openflow::coftable_feature_prop rofl::cmemory

Member Function Documentation

uint8_t * coftable_feature_prop_actions::resize ( size_t  len)
protectedvirtual

Resizes allocated memory area by calling C-function realloc().

This method resizes the internal memory area and adjusts all internal parameters accordingly, so that any subsequent calls to

See Also
somem() will yield valid results.
Parameters
lennew length of allocated memory area after resize operation
Exceptions
eMemAllocFailedis thrown when the C-function realloc() fails

Reimplemented from rofl::openflow::coftable_feature_prop.


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