#include <fframe.h>
Public Member Functions | |
| fframe (uint8_t *_data=NULL, size_t _datalen=0) | |
| fframe (size_t len=DEFAULT_FFRAME_SIZE) | |
| virtual | ~fframe () |
| virtual void | reset (uint8_t *_data, size_t _datalen) |
| fframe (const fframe &frame) | |
| fframe & | operator= (const fframe &frame) |
| virtual uint8_t * | sopdu () const |
| Returns pointer to begin of this PDU. | |
| virtual size_t | pdulen () const |
| Returns length of this PDU. | |
| virtual uint8_t * | sosdu () const |
| Returns pointer to begin of SDU encapsulated in this PDU (if any). | |
| virtual uint8_t & | operator[] (size_t index) throw (eFrameOutOfRange) |
| virtual bool | complete () const |
| virtual size_t | need_bytes () const |
| virtual void | validate (uint16_t total_len=0) const |
| virtual void | initialize () |
| virtual void | payload_insert (uint8_t *data, size_t datalen) |
| virtual uint8_t * | payload () const |
| virtual size_t | payloadlen () const |
| virtual uint8_t * | soframe () const |
| virtual size_t | framelen () const |
| bool | empty () const |
| void | shift_left (size_t bytes) |
| void | shift_right (size_t bytes) |
Public Attributes | |
| fframe * | next |
| fframe * | prev |
Friends | |
| std::ostream & | operator<< (std::ostream &os, fframe const &frame) |
base class for all framing related classes these classes are used for mixin'g in an existing memory area parsing functionality for specific packet formats, e.g. OpenFlow, Ethernet, VLAN, IPv4, etc.
| fframe::fframe | ( | uint8_t * | _data = NULL, |
| size_t | _datalen = 0 |
||
| ) |
constructor for parsing existing frames
| fframe::fframe | ( | size_t | len = DEFAULT_FFRAME_SIZE | ) |
constructor for creating new frames
|
virtual |
destructor
| fframe::fframe | ( | const fframe & | frame | ) |
copy constructor
|
inlinevirtual |
returns boolean value indicating completeness of the packet
Reimplemented in rofl::ficmpv6frame, rofl::fgtpuframe, rofl::fl2tpv3frame, rofl::farpv4frame, rofl::fipv6frame, rofl::fipv4frame, rofl::fetherframe, rofl::ftcpframe, rofl::ficmpv4frame, rofl::fvlanframe, rofl::fsctpframe, rofl::fudpframe, and rofl::fmplsframe.
|
inline |
return bool whether frame is empty or not
|
inlinevirtual |
get length of data area
|
inlinevirtual |
initialize (set eth_hdr, pppoe_hdr)
Reimplemented in rofl::ficmpv6frame, rofl::fgtpuframe, rofl::fl2tpv3frame, rofl::farpv4frame, rofl::fipv6frame, rofl::fipv4frame, rofl::fetherframe, rofl::ftcpframe, rofl::ficmpv4frame, rofl::fvlanframe, rofl::fsctpframe, rofl::fudpframe, and rofl::fmplsframe.
|
inlinevirtual |
returns the number of bytes this packet expects from the socket next
Reimplemented in rofl::ficmpv6frame, rofl::fgtpuframe, rofl::fl2tpv3frame, rofl::farpv4frame, rofl::fipv6frame, rofl::fipv4frame, rofl::fetherframe, rofl::ftcpframe, rofl::ficmpv4frame, rofl::fvlanframe, rofl::fsctpframe, rofl::fudpframe, and rofl::fmplsframe.
|
virtual | ||||||||||||||
index operator
|
inlinevirtual |
get payload
Reimplemented in rofl::ficmpv6frame, rofl::fgtpuframe, rofl::fl2tpv3frame, rofl::farpv4frame, rofl::fipv6frame, rofl::fipv4frame, rofl::fetherframe, rofl::ftcpframe, rofl::ficmpv4frame, rofl::fvlanframe, rofl::fsctpframe, rofl::fudpframe, and rofl::fmplsframe.
|
inlinevirtual |
insert payload
Reimplemented in rofl::ficmpv6frame, rofl::fgtpuframe, rofl::fl2tpv3frame, rofl::farpv4frame, rofl::fipv6frame, rofl::fipv4frame, rofl::fetherframe, rofl::ftcpframe, rofl::ficmpv4frame, rofl::fvlanframe, rofl::fsctpframe, rofl::fudpframe, and rofl::fmplsframe.
|
inlinevirtual |
get payload length
Reimplemented in rofl::ficmpv6frame, rofl::fgtpuframe, rofl::fl2tpv3frame, rofl::farpv4frame, rofl::fipv6frame, rofl::fipv4frame, rofl::fetherframe, rofl::ftcpframe, rofl::ficmpv4frame, rofl::fvlanframe, rofl::fsctpframe, rofl::fudpframe, and rofl::fmplsframe.
|
virtual |
reset this frame to a new buffer pointing to at (data, datalen)
Reimplemented in rofl::fgtpuframe, rofl::fvlanframe, rofl::fetherframe, and rofl::fmplsframe.
|
inline |
shift left
|
inline |
shift right
|
inlinevirtual |
get start of data area
|
inlinevirtual |
validate (frame structure)
Reimplemented in rofl::ficmpv6frame, rofl::fgtpuframe, rofl::fl2tpv3frame, rofl::farpv4frame, rofl::fipv6frame, rofl::fipv4frame, rofl::fetherframe, rofl::ftcpframe, rofl::ficmpv4frame, rofl::fvlanframe, rofl::fsctpframe, rofl::fudpframe, and rofl::fmplsframe.
1.8.6