The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NVpairFrame class

Class for holding/storing pairs of strings as name/value pairs Subclass of Frame class. More...

Collaboration diagram for NVpairFrame class:

Functions

FSTATIC gboolean _nvpairframe_default_isvalid (const Frame *self,gconstpointer tlvptr,gconstpointer pktend)
 NVpairFrame class 'isvalid' member function (checks for valid name/value pairs) More...
 
NVpairFramenvpairframe_new (guint16 frame_type, gchar *name, gchar *value, gsize framesize)
 Construct a new NVpairFrame - allowing for "derived" frame types... More...
 
WINEXPORT Framenvpairframe_tlvconstructor (gconstpointer tlvstart, gconstpointer pktend, gpointer *ignorednewpkt, gpointer *ignoredpktend)
 Given marshalled packet data corresponding to an NVpairFrame (name/value pair) return the corresponding Frame In other words, un-marshall the data... More...
 
typedef struct _NVpairFrame NVpairFrame
 

Detailed Description

Class for holding/storing pairs of strings as name/value pairs Subclass of Frame class.

Typedef Documentation

typedef struct _NVpairFrame NVpairFrame

Definition at line 31 of file nvpairframe.h.

Function Documentation

gboolean _nvpairframe_default_isvalid ( const Frame self,
gconstpointer  tlvptr,
gconstpointer  pktend 
)

NVpairFrame class 'isvalid' member function (checks for valid name/value pairs)

Parameters
[in]selfNVpairFrame object ('this')
[in]tlvptrPointer to the TLV for this NVpairFrame
[in]pktendPointer to one byte past the end of the packet

Definition at line 57 of file nvpairframe.c.

References CASTTOCONSTCLASS, get_generic_tlv_len(), get_generic_tlv_value(), _NVpairFrame::name, and _NVpairFrame::value.

Referenced by nvpairframe_new().

Here is the call graph for this function:

Here is the caller graph for this function:

NVpairFrame* nvpairframe_new ( guint16  frame_type,
gchar *  name,
gchar *  value,
gsize  framesize 
)

Construct a new NVpairFrame - allowing for "derived" frame types...

This can be used directly for creating NVpairFrame frames, or by derived classes.

Parameters
[in]frame_typeTLV type of NVpairFrame
[in]namename to initialize nvpair to
[in]valuevalue to initialize nvpair to
framesizesize of frame structure (or zero for sizeof(NVpairFrame))

Definition at line 97 of file nvpairframe.c.

References _nvpairframe_default_isvalid(), CASTTOCLASS, frame_new(), _Frame::isvalid, _Frame::length, cma.store::name, and proj_class_register_subclassed().

Referenced by cma.AssimCclasses.pyNVpairFrame::__init__(), and nvpairframe_tlvconstructor().

Here is the call graph for this function:

Here is the caller graph for this function:

WINEXPORT Frame* nvpairframe_tlvconstructor ( gconstpointer  tlvstart,
gconstpointer  pktend,
gpointer *  ignorednewpkt,
gpointer *  ignoredpktend 
)

Given marshalled packet data corresponding to an NVpairFrame (name/value pair) return the corresponding Frame In other words, un-marshall the data...

Todo:
FIXMEthis code is probably wrong...
Todo:
FIXME CERTAINLY ARE MEMORY LEAKS HERE!
Parameters
[in]tlvstartStart of marshalled CStringFrame data
[in]pktendPointer to first invalid byte past 'tlvstart'
ignorednewpkt[ignored] replacement packet if any
ignoredpktend[ignored] end of replaement packet

Definition at line 131 of file nvpairframe.c.

References _NVpairFrame::baseclass, CASTTOCLASS, frame_default_valuefinalize(), get_generic_tlv_len(), get_generic_tlv_type(), get_generic_tlv_value(), _Frame::length, nvpairframe_new(), and _Frame::setvalue.

Here is the call graph for this function: