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

Class representing various length of integers - subclass of Frame class. More...

Collaboration diagram for IntFrame class:

Functions

FSTATIC int _intframe_intlength (IntFrame *self)
 Return number of bytes in this integer. More...
 
FSTATIC void _intframe_setint (IntFrame *self, guint64 value)
 Set the integer value associated with an IntFrame. More...
 
FSTATIC guint64 _intframe_getint (IntFrame *self)
 Get the integer value associated with an IntFrame. More...
 
FSTATIC void _intframe_updatedata (Frame *, gpointer, gconstpointer, FrameSet *)
 
FSTATIC gboolean _intframe_isvalid (const Frame *self,gconstpointer tlvptr,gconstpointer pktend)
 Return TRUE if this integer is valid - basically is it of one of our supported lengths... More...
 
FSTATIC gchar * _intframe_toString (gconstpointer obj)
 Return a printable representation of our IntFrame object. More...
 
IntFrameintframe_new (guint16 frametype, int intbytes)
 Construct new IntFrame object. More...
 
Frameintframe_tlvconstructor (gpointer tlvstart, gconstpointer pktend, gpointer *ignorednewpkt, gpointer *ignoredpktend)
 Given marshalled data corresponding to an IntFrame (integer frame), return that corresponding Frame In other words, un-marshall the data... More...
 
typedef struct _IntFrame IntFrame
 

Detailed Description

Class representing various length of integers - subclass of Frame class.

Typedef Documentation

typedef struct _IntFrame IntFrame

Definition at line 35 of file intframe.h.

Function Documentation

FSTATIC guint64 _intframe_getint ( IntFrame self)

Get the integer value associated with an IntFrame.

Definition at line 116 of file intframe.c.

Referenced by intframe_new().

Here is the caller graph for this function:

FSTATIC int _intframe_intlength ( IntFrame self)

Return number of bytes in this integer.

Definition at line 89 of file intframe.c.

Referenced by intframe_new().

Here is the caller graph for this function:

FSTATIC gboolean _intframe_isvalid ( const Frame self,
gconstpointer  tlvptr,
gconstpointer  pktend 
)

Return TRUE if this integer is valid - basically is it of one of our supported lengths...

Parameters
selfFrame to validate
tlvptrTLV pointer to our TLV
pktendpointer to one byte past end of packet

Definition at line 152 of file intframe.c.

References get_generic_tlv_len().

Referenced by intframe_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _intframe_setint ( IntFrame self,
guint64  value 
)

Set the integer value associated with an IntFrame.

Definition at line 95 of file intframe.c.

Referenced by intframe_new().

Here is the caller graph for this function:

FSTATIC gchar * _intframe_toString ( gconstpointer  obj)

Return a printable representation of our IntFrame object.

Definition at line 172 of file intframe.c.

References CASTTOCONSTCLASS, and FMT_64BIT.

Referenced by intframe_new().

Here is the caller graph for this function:

FSTATIC void _intframe_updatedata ( Frame fself,
gpointer  tlvptr,
gconstpointer  pktend,
FrameSet fs 
)
Todo:
add a new get_generic_nonconst_tlv_value() function.
Parameters
fselfobject whose data will be put into FrameSet packet
tlvptrpointer to our current TLV entry
pktendend of packet
fsFrameSet that we're doing this for

Definition at line 122 of file intframe.c.

References CASTTOCLASS, get_generic_tlv_value(), tlv_set_guint16(), tlv_set_guint24(), tlv_set_guint32(), tlv_set_guint64(), and tlv_set_guint8().

Referenced by intframe_new().

Here is the call graph for this function:

Here is the caller graph for this function:

IntFrame* intframe_new ( guint16  frametype,
int  intbytes 
)
Frame* intframe_tlvconstructor ( gpointer  tlvstart,
gconstpointer  pktend,
gpointer *  ignorednewpkt,
gpointer *  ignoredpktend 
)

Given marshalled data corresponding to an IntFrame (integer frame), return that corresponding Frame In other words, un-marshall the data...

Parameters
[in]tlvstartFirst byte of the IntFrame TLV
[in]pktendFirst invalid byte past pktend
ignorednewpkt[ignored] replacement packet
ignoredpktend[ignored] end of replacement packet

Definition at line 208 of file intframe.c.

References _IntFrame::baseclass, CASTTOCLASS, get_generic_tlv_len(), get_generic_tlv_type(), get_generic_tlv_value(), intframe_new(), _Frame::length, _IntFrame::setint, tlv_get_guint16(), tlv_get_guint24(), tlv_get_guint32(), tlv_get_guint64(), and tlv_get_guint8().

Here is the call graph for this function: