The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
frame.h
Go to the documentation of this file.
1 
27 #ifndef _FRAME_H
28 #define _FRAME_H
29 #include <projectcommon.h>
30 #include <assimobj.h>
31 #include <generic_tlv_min.h>
32 typedef struct _FrameSet FrameSet;
33 typedef struct _Frame Frame;
34 
37 
43 struct _Frame {
45  guint16 type;
46  guint32 length;
47  gpointer value;
48  gsize (*dataspace)(const Frame* self);
49  void (*updatedata)(Frame* self, gpointer tlvptr, gconstpointer pktend, FrameSet* fs);
50  gboolean (*isvalid)(const Frame* self, gconstpointer tlvptr, gconstpointer pktend);
51 
52  void (*setvalue)(Frame* self,
53  gpointer value,
54  guint32 length,
55  GDestroyNotify valfinal);
56  void (*dump)(const Frame* self, const char * prefix);
57  GDestroyNotify valuefinalize;
58 };
59 #define FRAME_INITSIZE GENERICTLV_HDRSZ
60 WINEXPORT Frame* frame_new(guint16 frame_type, gsize framesize);
61 WINEXPORT Frame* frame_tlvconstructor(gpointer tlvstart, gconstpointer pktend, gpointer*,gpointer*);
62 WINEXPORT void frame_default_valuefinalize(gpointer value);
64 
65 #endif /* _FRAME_H */
guint32 length
Frame Length.
Definition: frame.h:46
GDestroyNotify valuefinalize
method for finalizing value
Definition: frame.h:57
AssimObj baseclass
Base object class for our Class system.
Definition: frame.h:44
This is the base Frame class object (in-memory TLV (type, length, value)) for every general component...
Definition: frame.h:43
#define WINEXPORT
Definition: projectcommon.h:45
gpointer value
Frame Value (pointer)
Definition: frame.h:47
WINEXPORT Frame * frame_tlvconstructor(gpointer tlvstart, gconstpointer pktend, gpointer *, gpointer *)
Given marshalled data corresponding to a Frame (basic binary frame), return that corresponding Frame ...
Definition: frame.c:157
void(* dump)(const Frame *self, const char *prefix)
member function for dumping Frame
Definition: frame.h:56
This file defines our base object class: AssimObj.
WINEXPORT Frame * frame_new(guint16 frame_type, gsize framesize)
Construct a new frame - allowing for "derived" frame types...
Definition: frame.c:124
gboolean(* isvalid)(const Frame *self, gconstpointer tlvptr, gconstpointer pktend)
TRUE if TLV data looks valid...
Definition: frame.h:50
Project common header file.
WINEXPORT void frame_default_valuefinalize(gpointer value)
Finalize a Frame.
Definition: frame.c:56
guint16 type
Frame Type (see Individual TLV 'Frame' data types and layouts (by TLV type) - frameformats.h )
Definition: frame.h:45
Provides definitions for using our generic TLV capabilities.
gsize(* dataspace)(const Frame *self)
How much space is needed to marshall this Frame?
Definition: frame.h:48
void(* updatedata)(Frame *self, gpointer tlvptr, gconstpointer pktend, FrameSet *fs)
Update packet data.
Definition: frame.h:49
FrameSet class - used for collecting Frames when not on the wire, and for marshalling/demarshalling t...
Definition: frameset.h:46
void(* setvalue)(Frame *self, gpointer value, guint32 length, GDestroyNotify valfinal)
member function for setting value
Definition: frame.h:52