The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
addrframe.h
Go to the documentation of this file.
1 
26 #ifndef _ADDRFRAME_H
27 #define _ADDRFRAME_H
28 #include <projectcommon.h>
29 #include <frame.h>
30 #include <netaddr.h>
31 typedef struct _AddrFrame AddrFrame;
32 
38 struct _AddrFrame {
41  void (*_basefinal)(AssimObj*);
42  void (*setaddr)(AddrFrame* f, guint16 addrtype, gconstpointer addr, gsize addrlen);
43  void (*setnetaddr)(AddrFrame* f, NetAddr* addr);
44  NetAddr*(*getnetaddr)(AddrFrame*f);
45  void (*setport)(AddrFrame*f, guint16 port);
46 };
47 
48 WINEXPORT AddrFrame* addrframe_new(guint16 frame_type, gsize framesize);
49 WINEXPORT AddrFrame* addrframe_ipv4_new(guint16 frame_type, gconstpointer addr);
50 WINEXPORT AddrFrame* addrframe_ipv6_new(guint16 frame_type, gconstpointer addr);
51 WINEXPORT AddrFrame* addrframe_mac48_new(guint16 frame_type, gconstpointer addr);
52 WINEXPORT AddrFrame* addrframe_mac64_new(guint16 frame_type, gconstpointer addr);
53 WINEXPORT Frame* addrframe_tlvconstructor(gpointer tlvstart, gconstpointer pktend, gpointer*,gpointer*);
54 
56 #endif /* _ADDRFRAME_H */
WINEXPORT AddrFrame * addrframe_new(guint16 frame_type, gsize framesize)
Construct a new AddrFrame class - allowing for "derived" frame types...
Definition: addrframe.c:201
void(* setport)(AddrFrame *f, guint16 port)
Definition: addrframe.h:45
WINEXPORT AddrFrame * addrframe_ipv6_new(guint16 frame_type, gconstpointer addr)
Construct and initialize an IPv6 AddrFrame class.
Definition: addrframe.c:241
This is the base Frame class object (in-memory TLV (type, length, value)) for every general component...
Definition: frame.h:43
WINEXPORT AddrFrame * addrframe_mac48_new(guint16 frame_type, gconstpointer addr)
Construct and initialize a 48-bit MAC address AddrFrame class.
Definition: addrframe.c:253
#define WINEXPORT
Definition: projectcommon.h:45
Frame baseclass
Definition: addrframe.h:39
void(* setaddr)(AddrFrame *f, guint16 addrtype, gconstpointer addr, gsize addrlen)
Definition: addrframe.h:42
NetAddr * _addr
Definition: addrframe.h:40
Implements basic Frame class.
Project common header file.
WINEXPORT AddrFrame * addrframe_mac64_new(guint16 frame_type, gconstpointer addr)
Construct and initialize a 64-bit MAC address AddrFrame class.
Definition: addrframe.c:264
void(* setnetaddr)(AddrFrame *f, NetAddr *addr)
Definition: addrframe.h:43
The NetAddr class class represents a general network address - whether IP, MAC, or any other type of ...
Definition: netaddr.h:43
Defines interfaces for the NetAddr (network address) object.
WINEXPORT AddrFrame * addrframe_ipv4_new(guint16 frame_type, gconstpointer addr)
Construct and initialize an IPv4 AddrFrame class.
Definition: addrframe.c:229
This is our AddrFrame class object - used for holding NetAddr class network addresses.
Definition: addrframe.h:38
WINEXPORT Frame * addrframe_tlvconstructor(gpointer tlvstart, gconstpointer pktend, gpointer *, gpointer *)
Given marshalled packet data corresponding to an AddrFrame (address), return the corresponding Frame ...
Definition: addrframe.c:278
void(* _basefinal)(AssimObj *)
Free object (private)
Definition: addrframe.h:41