|
The Assimilation Monitoring Project
|
Class for holding/storing binary blobs - Base class for all the other Frame types. More...
|
Modules | |
| AddrFrame class | |
| Class for holding/storing various kinds of NetAddr class network addresses. | |
| CompressFrame class | |
| Class for compressing FrameSets Subclass of Frame class. | |
| CryptFrame class | |
| Class for encrypting FrameSets. | |
| CstringFrame class | |
| Class for holding/storing C-style null-terminated strings - Subclass of Frame class. | |
| IntFrame class | |
| Class representing various length of integers - subclass of Frame class. | |
| IpPortFrame class | |
| Class for holding/storing various kinds of NetAddr class network addresses. | |
| NVpairFrame class | |
| Class for holding/storing pairs of strings as name/value pairs Subclass of Frame class. | |
| SeqnoFrame class | |
| Class representing packet "sequence numbers" - subclass of Frame class. | |
| SignFrame class | |
| Class representing digital signatures - subclass of Frame class. | |
| UnknownFrame class | |
| Class representing an unrecogized or unknown type of frame in a packet - subclass of Frame class. | |
Data Structures | |
| struct | _Frame |
| This is the base Frame class object (in-memory TLV (type, length, value)) for every general component of a packet. More... | |
Functions | |
| FSTATIC void | _frame_default_finalize (AssimObj *obj) |
| Finalize a Frame. More... | |
| FSTATIC void | frame_default_valuefinalize (gpointer value) |
| Finalize a Frame. More... | |
| FSTATIC gsize | _frame_total_size (Frame *f) |
| Return total space required to put this frame in a packet (marshalled size) More... | |
| FSTATIC gboolean | _frame_default_isvalid (const Frame *self,gconstpointer tlvptr,gconstpointer pktend) |
| Default Frame class 'isvalid' member function (always returns TRUE) More... | |
| FSTATIC void | _frame_setvalue (Frame *self,gpointer value,guint16 length,GDestroyNotify valnotify) |
| 'setvalue' Frame class member function. More... | |
| FSTATIC void | _frame_updatedata (Frame *self,gpointer tlvptr,gconstpointer pktend,FrameSet *fs) |
| Update packet data ('updatedata') Frame class member function. More... | |
| Frame * | frame_new (guint16 frame_type, gsize framesize) |
| Construct a new frame - allowing for "derived" frame types... More... | |
| Frame * | frame_tlvconstructor (gconstpointer tlvstart, gconstpointer pktend) |
| Given marshalled data corresponding to a Frame (basic binary frame), return that corresponding Frame In other words, un-marshall the data... More... | |
| FSTATIC void | _frame_dump (const Frame *f,const char *prefix) |
| Basic "dump a frame" member function - we use g_debug() for output. More... | |
Class for holding/storing binary blobs - Base class for all the other Frame types.
Finalize a Frame.
| obj | Frame to finalize |
Definition at line 43 of file frame.c.
References __FUNCTION__, _assimobj_finalize(), CASTTOCLASS, and DEBUGMSG5.
Referenced by frame_new().


| FSTATIC gboolean _frame_default_isvalid | ( | const Frame * | self, |
| gconstpointer | tlvptr, | ||
| gconstpointer | pktend | ||
| ) |
Default Frame class 'isvalid' member function (always returns TRUE)
| self | Frame object ('this') |
| tlvptr | Pointer to the TLV for this Frame |
| pktend | Pointer to one byte past the end of the packet |
Definition at line 73 of file frame.c.
Referenced by frame_new().

| void _frame_dump | ( | const Frame * | f, |
| const char * | prefix | ||
| ) |
Basic "dump a frame" member function - we use g_debug() for output.
It would be nice for derived classes to override this as appropriate.
| [in] | f | Frame being dumped |
| [in] | prefix | Prefix to put out before each line when dumping it |
Definition at line 161 of file frame.c.
References _Frame::length, proj_class_classname(), and _Frame::type.
Referenced by frame_new().


| FSTATIC void _frame_setvalue | ( | Frame * | self, |
| gpointer | value, | ||
| guint16 | length, | ||
| GDestroyNotify | valnotify | ||
| ) |
'setvalue' Frame class member function.
| self | Frame object ('this') |
| value | Value to save away |
| length | Length of value |
| valnotify | Value destructor. |
Definition at line 85 of file frame.c.
Referenced by frame_new().

Return total space required to put this frame in a packet (marshalled size)
| f | Frame to return the marshalled size of |
Definition at line 65 of file frame.c.
References FRAME_INITSIZE, and _Frame::length.
Referenced by frame_new().

| FSTATIC void _frame_updatedata | ( | Frame * | self, |
| gpointer | tlvptr, | ||
| gconstpointer | pktend, | ||
| FrameSet * | fs | ||
| ) |
Update packet data ('updatedata') Frame class member function.
| self | Frame object ('this') |
| tlvptr | Where the Frame TLV is |
| pktend | End of packet |
| fs | FrameSet to update (or not) |
Definition at line 100 of file frame.c.
References set_generic_tlv_value().
Referenced by frame_new().


| FSTATIC void frame_default_valuefinalize | ( | gpointer | value | ) |
Finalize a Frame.
| value | Value to finalize |
Definition at line 55 of file frame.c.
References __FUNCTION__, DEBUGMSG4, and FREE.
Referenced by _jsondiscovery_send(), create_setconfig(), cstringframe_tlvconstructor(), frame_tlvconstructor(), nano_reqconfig(), nanoprobe_report_upstream(), nvpairframe_tlvconstructor(), and unknownframe_tlvconstructor().

| Frame* frame_new | ( | guint16 | frame_type, |
| gsize | framesize | ||
| ) |
Construct a new frame - allowing for "derived" frame types...
This can be used directly for creating basic binary frames, or by derived classes.
| frame_type | TLV type of Frame |
| framesize | size of frame structure (or zero for sizeof(Frame)) |
Definition at line 113 of file frame.c.
References __FUNCTION__, _AssimObj::_finalize, _frame_default_finalize(), _frame_default_isvalid(), _frame_dump(), _frame_setvalue(), _frame_total_size(), _frame_updatedata(), assimobj_new(), BINDDEBUG, _Frame::dataspace, DEBUGMSG5, _Frame::dump, _Frame::isvalid, _Frame::length, NEWSUBCLASS, _Frame::setvalue, _Frame::type, _Frame::updatedata, _Frame::value, and _Frame::valuefinalize.
Referenced by cma.AssimCclasses.pyFrame::__init__(), addrframe_new(), cast_frameset_tests(), compressframe_new(), construct_pcap_frameset(), cryptframe_new(), cstringframe_new(), frame_tlvconstructor(), frameset_construct_packet(), intframe_new(), ipportframe_new(), nvpairframe_new(), seqnoframe_new(), signframe_new(), and unknownframe_new().


| Frame* frame_tlvconstructor | ( | gconstpointer | tlvstart, |
| gconstpointer | pktend | ||
| ) |
Given marshalled data corresponding to a Frame (basic binary frame), return that corresponding Frame In other words, un-marshall the data...
| [in] | tlvstart | start of TLV for this Frame |
| [in] | pktend | first invalid byte past 'tlvstart' |
Definition at line 145 of file frame.c.
References frame_default_valuefinalize(), frame_new(), get_generic_tlv_len(), get_generic_tlv_type(), get_generic_tlv_value(), _Frame::length, and _Frame::setvalue.
