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(gconstpointer tlvstart, gconstpointer pktend);
54 
56 #endif /* _ADDRFRAME_H */