|
The Assimilation Monitoring Project
|
Class representing a collection of Frames to be sent in a single datagram. More...
|
Functions | |
| FSTATIC SeqnoFrame * | _frameset_getseqno (FrameSet *self) |
| FSTATIC void | _frameset_indir_finalize (void *f) |
| static: finalize (free) frame More... | |
| FSTATIC void | _frameset_finalize (AssimObj *obj) |
| static: finalize (free) frameset and all its constituent frames... More... | |
| FrameSet * | frameset_new (guint16 frameset_type) |
| Construct a new frameset of the given type. More... | |
| void | frameset_prepend_frame (FrameSet *fs, Frame *f) |
| Prepend frame to the front of the frame list. More... | |
| void | frameset_append_frame (FrameSet *fs, Frame *f) |
| Append frame to the front of the end of the frame list. More... | |
| void | frameset_construct_packet (FrameSet *fs, SignFrame *sigframe, Frame *cryptframe, Frame *compressframe) |
| Construct packet to go correspond to this frameset. More... | |
| guint16 | frameset_get_flags (FrameSet *fs) |
| Return the flags currently set on this FrameSet. More... | |
| guint16 | frameset_set_flags (FrameSet *fs, guint16 flagbits) |
| Set (OR in) the given set of FrameSet flags. More... | |
| guint16 | frameset_clear_flags (FrameSet *fs, guint16 flagbits) |
| Clear the given set of FrameSet flags (& ~flagbits) More... | |
| gpointer | frame_append_to_frameset_packet (FrameSet *fs, Frame *f, gpointer curpktpos) |
| Append the given Frame to a FrameSet packet. More... | |
| void | frameset_dump (const FrameSet *fs) |
| Dump out a FrameSet. More... | |
| FSTATIC char * | _frameset_toString (gconstpointer) |
Class representing a collection of Frames to be sent in a single datagram.
Note that more than one FrameSet can be sent in a datagram, but a FrameSet may not be split across datagrams.
static: finalize (free) frameset and all its constituent frames...
| obj | frameset to finalize |
Definition at line 82 of file frameset.c.
References _frameset_indir_finalize(), CASTTOCLASS, _FrameSet::framelist, FREE, FREECLASSOBJ, _FrameSet::packet, and _FrameSet::pktend.
Referenced by frameset_new().


| FSTATIC SeqnoFrame * _frameset_getseqno | ( | FrameSet * | self | ) |
Definition at line 347 of file frameset.c.
References __FUNCTION__, CASTTOCLASS, DEBUGMSG4, FRAMETYPE_REQID, and _Frame::type.
Referenced by frameset_new().

| FSTATIC void _frameset_indir_finalize | ( | void * | f | ) |
static: finalize (free) frame
| f | Frame to finalize |
Definition at line 74 of file frameset.c.
References CASTTOCLASS, and UNREF.
Referenced by _frameset_finalize().

| FSTATIC char * _frameset_toString | ( | gconstpointer | vself | ) |
Definition at line 365 of file frameset.c.
References _Frame::baseclass, CASTTOCLASS, CASTTOCONSTCLASS, and _AssimObj::toString.
Referenced by frameset_new().

Append the given Frame to a FrameSet packet.
| fs | FrameSet to append frame to |
| f | Frame to append... |
| curpktpos | Current position in packet (not NULL) |
Definition at line 311 of file frameset.c.
References _Frame::dataspace, _Frame::length, _FrameSet::packet, _FrameSet::pktend, tlv_set_guint16(), _Frame::type, and _Frame::value.

Append frame to the front of the end of the frame list.
| fs | FrameSet to fetch flags for |
| f | Frame to put at the back of the frame list |
Definition at line 139 of file frameset.c.
References _FrameSet::framelist, and REF.
Referenced by _fsproto_fsa(), _fsprotocol_ackseqno(), _jsondiscovery_send(), _nano_send_rscexitstatus(), _pktdata_to_framesetlist(), address_tests(), cma.AssimCclasses.pyFrameSet::append(), cast_frameset_tests(), construct_pcap_frameset(), create_sendexpecthb(), create_setconfig(), fakecma_startup(), main(), nano_reqconfig(), nanoprobe_report_upstream(), and obey_pingpong().

| guint16 frameset_clear_flags | ( | FrameSet * | fs, |
| guint16 | flagbits | ||
| ) |
Clear the given set of FrameSet flags (& ~flagbits)
| fs | FrameSet to fetch flags for |
| flagbits | Bits to clear |
Definition at line 299 of file frameset.c.
References _FrameSet::fsflags.
Referenced by cma.AssimCclasses.pyFrameSet::clear_flags().

| void frameset_construct_packet | ( | FrameSet * | fs, |
| SignFrame * | sigframe, | ||
| Frame * | cryptframe, | ||
| Frame * | compressframe | ||
| ) |
Construct packet to go correspond to this frameset.
Once this is done, then this can be either sent out directly or queued with other framesets to send to the machine in question. If it needs to be retransmitted, that can also happen... If encryption methods have changed in the meantime, if we are asked to reconstruct a packet later.
The order we put these special frames in the frameset is important. We apply them here from last to first, but on the other end they have to be applied from first to last. That means that we do these things in this order: Compress the frame - all the frame after the FRAMETYPE_COMPRESS TLV Encrypt the frame - all the frame after the FRAMETYPE_CRYPT TLV Perform a signature over the whole frame after the FRAMETYPE_SIG TLV
At the other end, this is reversed. Check the signature according to the initial FRAMETYPE_SIG frame, discard if incorrect. Decrypt the frame after the FRAMETYPE_CRYPT TLV Uncompress the frame after the FRAMETYPE_COMPRESS TLV
Encryption tends to make data hard to compress, so it's better to compress before encrypting.
| fs | FrameSet for which we're creating a packet |
| sigframe | digital Signature method (cannot be NULL) |
| cryptframe | Optional Encryption method. This method might change the packet size. |
| compressframe | Optional Compression method. It is expected that this method should modify the packet "in place", and adjust things accordingly. |
Definition at line 155 of file frameset.c.
References CASTTOCLASS, _Frame::dataspace, frame_new(), _FrameSet::framelist, frameset_prepend_frame(), FRAMETYPE_COMPRESS, FRAMETYPE_CRYPT, FRAMETYPE_END, FRAMETYPE_SIG, FREE, _FrameSet::fsflags, _FrameSet::fstype, _Frame::isvalid, _Frame::length, MALLOC0, _FrameSet::packet, _FrameSet::pktend, proj_class_classname(), set_generic_tlv_len(), set_generic_tlv_type(), tlv_set_guint16(), _Frame::type, UNREF, and _Frame::updatedata.
Referenced by _netio_sendaframeset(), _netio_sendframesets(), address_tests(), cast_frameset_tests(), and cma.AssimCclasses.pyFrameSet::construct_packet().


| void frameset_dump | ( | const FrameSet * | fs | ) |
Dump out a FrameSet.
| fs | FrameSet to dump |
Definition at line 335 of file frameset.c.
References CASTTOCLASS, _Frame::dump, and _FrameSet::framelist.
Referenced by cma.AssimCclasses.pyFrameSet::dump().

| guint16 frameset_get_flags | ( | FrameSet * | fs | ) |
Return the flags currently set on this FrameSet.
| fs | FrameSet to fetch fsflags for |
Definition at line 281 of file frameset.c.
References _FrameSet::fsflags.
Referenced by cma.AssimCclasses.pyFrameSet::get_flags().

| FrameSet* frameset_new | ( | guint16 | frameset_type | ) |
Construct a new frameset of the given type.
| frameset_type | Type of frameset to create |
Definition at line 109 of file frameset.c.
References _AssimObj::_finalize, _frameset_finalize(), _frameset_getseqno(), _frameset_toString(), assimobj_new(), _FrameSet::baseclass, BINDDEBUG, _FrameSet::framelist, _FrameSet::fsflags, _FrameSet::fstype, _FrameSet::getseqno, NEWSUBCLASS, _FrameSet::packet, _FrameSet::pktend, and _AssimObj::toString.
Referenced by cma.AssimCclasses.pyFrameSet::__init__(), _decode_packet_get_frameset_data(), _fsproto_fsa(), _fsprotocol_ackseqno(), _hbsender_sendheartbeat(), _jsondiscovery_send(), _nano_send_rscexitstatus(), address_tests(), cast_frameset_tests(), construct_pcap_frameset(), create_sendexpecthb(), create_setconfig(), fakecma_startup(), main(), nano_reqconfig(), nanoprobe_report_upstream(), and obey_pingpong().


Prepend frame to the front of the frame list.
| fs | FrameSet to fetch flags for |
| f | Frame to put at the front of the frame list |
Definition at line 129 of file frameset.c.
References _FrameSet::framelist, and REF.
Referenced by _fsqueue_enq(), frameset_construct_packet(), and cma.AssimCclasses.pyFrameSet::prepend().

| guint16 frameset_set_flags | ( | FrameSet * | fs, |
| guint16 | flagbits | ||
| ) |
Set (OR in) the given set of FrameSet flags.
| fs | FrameSet to fetch flags for |
| flagbits | Bits to set |
Definition at line 289 of file frameset.c.
References _FrameSet::fsflags.
Referenced by _decode_packet_get_frameset_data(), and cma.AssimCclasses.pyFrameSet::set_flags().
