|
The Assimilation Monitoring Project
|
Implements a set of client-oriented TLV (Type, Length, Value) capabilities. More...
Macros | |
| #define | GENERICTLV_HDRSZ (sizeof(guint16)+sizeof(guint16)) |
| Size of Generic TLV header - ((type + length) == 4) More... | |
Functions | |
| guint16 | get_generic_tlv_type (gconstpointer tlv_vp, gconstpointer pktend) |
| Return the 'Type' of the given TLV TLV entry (first two bytes) More... | |
| void | set_generic_tlv_type (gpointer tlv_vp, guint16 newtype, gconstpointer pktend) |
| Set the 'Type' of the given TLV TLV entry (first two bytes) More... | |
| guint16 | get_generic_tlv_len (gconstpointer tlv_vp, gconstpointer pktend) |
| Return the 'Length' of the given generic TLV entry (second short in packet) More... | |
| void | set_generic_tlv_len (gpointer tlv_vp, guint16 newsize, gconstpointer pktend) |
| Set the 'Length' of the given generic TLV entry (second short in packet) More... | |
| gconstpointer | get_generic_tlv_value (gconstpointer tlv_vp, gconstpointer pktend) |
| Return a const pointer to the 'Value' of the given generic TLV entry. More... | |
| gpointer | get_generic_tlv_nonconst_value (gpointer tlv_vp, gconstpointer pktend) |
| Return a non-const (mutable) pointer to the 'Value' of the given generic TLV entry. More... | |
| void | set_generic_tlv_value (gpointer tlv_vp, void *srcdata, guint16 srcsize, gconstpointer pktend) |
| Set the TLV data value to the given 'tlv_vp' pointer. More... | |
| gboolean | is_valid_generic_tlv_packet (gconstpointer tlv_vp, gconstpointer pktend) |
| Return TRUE if this is a valid generic TLV packet. More... | |
| gconstpointer | get_generic_tlv_first (gconstpointer packet, gconstpointer pktend) |
| gconstpointer | get_generic_tlv_next (gconstpointer tlv_vp, gconstpointer pktend) |
| Return pointer to the next generic TLV entry after the current location. More... | |
| gconstpointer | find_next_generic_tlv_type (gconstpointer tlv_vp, guint16 tlvtype, gconstpointer pktend) |
| Return pointer to the next TLV entry of the given type at or after the current location. More... | |
Implements a set of client-oriented TLV (Type, Length, Value) capabilities.
These capabilities are the core of our packet assembly/disassembly infrastructure. Everything we send is wrapped in a Frame class, or a FrameSet class, and those both make extensive use of the capabilties defined here.
| #define GENERICTLV_HDRSZ (sizeof(guint16)+sizeof(guint16)) |
Size of Generic TLV header - ((type + length) == 4)
Definition at line 42 of file generic_tlv_min.c.
Referenced by find_next_generic_tlv_type(), get_generic_tlv_first(), get_generic_tlv_next(), get_generic_tlv_nonconst_value(), get_generic_tlv_value(), is_valid_generic_tlv_packet(), and set_generic_tlv_value().
| gconstpointer find_next_generic_tlv_type | ( | gconstpointer | tlv_vp, |
| guint16 | tlvtype, | ||
| gconstpointer | pktend | ||
| ) |
Return pointer to the next TLV entry of the given type at or after the current location.
| [in] | tlv_vp | Pointer to the current TLV |
| [in] | tlvtype | Type of TLV we're looking for |
| [in] | pktend | Pointer to first byte beyond the packet. |
Definition at line 202 of file generic_tlv_min.c.
References GENERICTLV_HDRSZ, get_generic_tlv_next(), and get_generic_tlv_type().

| gconstpointer get_generic_tlv_first | ( | gconstpointer | packet, |
| gconstpointer | pktend | ||
| ) |
| [in] | packet | Pointer to beginning of TLV packet |
| [in] | pktend | Pointer to first byte after the end of the TLV packet |
Definition at line 168 of file generic_tlv_min.c.
References GENERICTLV_HDRSZ, and get_generic_tlv_len().
Referenced by is_valid_generic_tlv_packet().


| guint16 get_generic_tlv_len | ( | gconstpointer | tlv_vp, |
| gconstpointer | pktend | ||
| ) |
Return the 'Length' of the given generic TLV entry (second short in packet)
| [in] | tlv_vp | Pointer to beginning of TLV entry |
| [in] | pktend | Pointer to one byte past end of packet |
Definition at line 63 of file generic_tlv_min.c.
References tlv_get_guint16().
Referenced by _addrframe_default_isvalid(), _cryptframe_default_isvalid(), _cstringframe_default_isvalid(), _intframe_isvalid(), _ipportframe_default_isvalid(), _nvpairframe_default_isvalid(), _signframe_compute_cksum(), _signframe_isvalid(), addrframe_tlvconstructor(), compressframe_tlvconstructor(), cryptframe_tlvconstructor(), cstringframe_tlvconstructor(), frame_tlvconstructor(), get_generic_tlv_first(), get_generic_tlv_next(), intframe_tlvconstructor(), ipportframe_tlvconstructor(), is_valid_generic_tlv_packet(), nvpairframe_tlvconstructor(), seqnoframe_tlvconstructor(), set_generic_tlv_value(), signframe_tlvconstructor(), and unknownframe_tlvconstructor().


| gconstpointer get_generic_tlv_next | ( | gconstpointer | tlv_vp, |
| gconstpointer | pktend | ||
| ) |
Return pointer to the next generic TLV entry after the current location.
| [in] | tlv_vp | Pointer to current TLV entry |
| [in] | pktend | Pointer to first byte after the end of the TLV packet |
Definition at line 182 of file generic_tlv_min.c.
References FRAMETYPE_END, GENERICTLV_HDRSZ, get_generic_tlv_len(), and get_generic_tlv_type().
Referenced by _signframe_compute_cksum(), find_next_generic_tlv_type(), and is_valid_generic_tlv_packet().


| gpointer get_generic_tlv_nonconst_value | ( | gpointer | tlv_vp, |
| gconstpointer | pktend | ||
| ) |
Return a non-const (mutable) pointer to the 'Value' of the given generic TLV entry.
| [in] | tlv_vp | Pointer to beginning of TLV entry, |
| [in] | pktend | Pointer to one byte past end of packet |
Definition at line 92 of file generic_tlv_min.c.
References GENERICTLV_HDRSZ.
Referenced by _seqnoframe_updatedata(), and _signframe_updatedata().

| guint16 get_generic_tlv_type | ( | gconstpointer | tlv_vp, |
| gconstpointer | pktend | ||
| ) |
Return the 'Type' of the given TLV TLV entry (first two bytes)
| [in] | tlv_vp | Pointer to beginning of TLV entry |
| [in] | pktend | Pointer to one byte past end of packet |
Definition at line 46 of file generic_tlv_min.c.
References tlv_get_guint16().
Referenced by _decode_packet_framedata_to_frameobject(), addrframe_tlvconstructor(), compressframe_tlvconstructor(), cryptframe_tlvconstructor(), cstringframe_tlvconstructor(), find_next_generic_tlv_type(), frame_tlvconstructor(), get_generic_tlv_next(), intframe_tlvconstructor(), ipportframe_tlvconstructor(), is_valid_generic_tlv_packet(), nvpairframe_tlvconstructor(), seqnoframe_tlvconstructor(), and unknownframe_tlvconstructor().


| gconstpointer get_generic_tlv_value | ( | gconstpointer | tlv_vp, |
| gconstpointer | pktend | ||
| ) |
Return a const pointer to the 'Value' of the given generic TLV entry.
| [in] | tlv_vp | Pointer to beginning of TLV entry, |
| [in] | pktend | Pointer to one byte past end of packet |
Definition at line 82 of file generic_tlv_min.c.
References GENERICTLV_HDRSZ.
Referenced by _addrframe_default_isvalid(), _cstringframe_default_isvalid(), _intframe_updatedata(), _ipportframe_default_isvalid(), _nvpairframe_default_isvalid(), _signframe_isvalid(), addrframe_tlvconstructor(), compressframe_tlvconstructor(), cryptframe_tlvconstructor(), cstringframe_tlvconstructor(), frame_tlvconstructor(), intframe_tlvconstructor(), ipportframe_tlvconstructor(), is_valid_generic_tlv_packet(), nvpairframe_tlvconstructor(), seqnoframe_tlvconstructor(), signframe_tlvconstructor(), and unknownframe_tlvconstructor().

| gboolean is_valid_generic_tlv_packet | ( | gconstpointer | tlv_vp, |
| gconstpointer | pktend | ||
| ) |
Return TRUE if this is a valid generic TLV packet.
Definition at line 116 of file generic_tlv_min.c.
References DIMOF, FRAMETYPE_END, FRAMETYPE_SIG, GENERICTLV_HDRSZ, get_generic_tlv_first(), get_generic_tlv_len(), get_generic_tlv_next(), get_generic_tlv_type(), and get_generic_tlv_value().

| void set_generic_tlv_len | ( | gpointer | tlv_vp, |
| guint16 | newsize, | ||
| gconstpointer | pktend | ||
| ) |
Set the 'Length' of the given generic TLV entry (second short in packet)
| [in] | tlv_vp | Pointer to beginning of TLV entry |
| [in] | newsize | Type to stuff into TLV entry |
| [in] | pktend | Pointer to one byte past end of packet |
Definition at line 72 of file generic_tlv_min.c.
References tlv_set_guint16().
Referenced by frameset_construct_packet().


| void set_generic_tlv_type | ( | gpointer | tlv_vp, |
| guint16 | newtype, | ||
| gconstpointer | pktend | ||
| ) |
Set the 'Type' of the given TLV TLV entry (first two bytes)
| [in] | tlv_vp | Pointer to beginning of TLV entry |
| [in] | newtype | Type to stuff into TLV entry |
| [in] | pktend | Pointer to one byte past end of packet |
Definition at line 54 of file generic_tlv_min.c.
References tlv_set_guint16().
Referenced by frameset_construct_packet().


| void set_generic_tlv_value | ( | gpointer | tlv_vp, |
| void * | srcdata, | ||
| guint16 | srcsize, | ||
| gconstpointer | pktend | ||
| ) |
Set the TLV data value to the given 'tlv_vp' pointer.
| tlv_vp | pointer to TLV entry | |
| srcdata | pointer to source data | |
| srcsize | size of source object | |
| [in] | pktend | Pointer to one byte past end of packet |
Definition at line 103 of file generic_tlv_min.c.
References GENERICTLV_HDRSZ, and get_generic_tlv_len().
Referenced by _frame_updatedata().

