The Assimilation Project  based on Assimilation version 0.5.1435932971
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tlvhelper.h
Go to the documentation of this file.
1 
25 #include <projectcommon.h>
26 #include <glib.h>
27 
28 // "Bad" values to return in case of errors
29 #define TLV_BAD8 ((guint8) 0xff)
30 #define TLV_BAD16 ((guint16) 0xffff)
31 #define TLV_BAD24 ((guint32) 0xffffff)
32 #define TLV_BAD32 ((guint32) 0xffffffff)
33 #define TLV_BAD64 ((guint64)0xffffffffffffffffUL)
34 #define TLV_BADPTR NULL
35 
37 WINEXPORT guint8 tlv_get_guint8 (const void* vitem, const void* bufend);
39 WINEXPORT guint16 tlv_get_guint16(const void* vitem, const void* bufend);
41 WINEXPORT guint32 tlv_get_guint24(const void* vitem, const void* bufend);
43 WINEXPORT guint32 tlv_get_guint32(const void* vitem, const void* bufend);
45 WINEXPORT guint64 tlv_get_guint64(const void* vitem, const void* bufend);
46 WINEXPORT void tlv_set_guint8 (void* vitem, guint8 item, const void* bufend);
47 WINEXPORT void tlv_set_guint16(void* vitem, guint16 item, const void* bufend);
48 WINEXPORT void tlv_set_guint24(void* vitem, guint32 item, const void* bufend);
49 WINEXPORT void tlv_set_guint32(void* vitem, guint32 item, const void* bufend);
50 WINEXPORT void tlv_set_guint64(void* vitem, guint64 item, const void* bufend);
#define WINEXPORT
Definition: projectcommon.h:45
WINEXPORT void tlv_set_guint32(void *vitem, guint32 item, const void *bufend)
Set an unsigned 32 bit integer to the given location with error checking and without caring about byt...
Definition: tlvhelper.c:93
WINEXPORT guint32 tlv_get_guint32(const void *vitem, const void *bufend)
tlv_get_guint32 returns a "tainted" value that must be validated by other means
Definition: tlvhelper.c:81
Project common header file.
WINEXPORT void tlv_set_guint16(void *vitem, guint16 item, const void *bufend)
Set an unsigned 16 bit integer to the given location with error checking and without caring about byt...
Definition: tlvhelper.c:67
WINEXPORT void tlv_set_guint24(void *vitem, guint32 item, const void *bufend)
Set an unsigned 24 bit (3-byte) integer to the given location with error checking and without caring ...
Definition: tlvhelper.c:148
WINEXPORT guint8 tlv_get_guint8(const void *vitem, const void *bufend)
tlv_get_guint8 returns a "tainted" value that must be validated by other means
Definition: tlvhelper.c:31
WINEXPORT guint16 tlv_get_guint16(const void *vitem, const void *bufend)
tlv_get_guint16 returns a "tainted" value that must be validated by other means
Definition: tlvhelper.c:55
WINEXPORT void tlv_set_guint64(void *vitem, guint64 item, const void *bufend)
Set an unsigned 64 bit integer to the given location with error checking and without caring about byt...
Definition: tlvhelper.c:120
WINEXPORT guint32 tlv_get_guint24(const void *vitem, const void *bufend)
tlv_get_guint24 returns a "tainted" value that must be validated by other means
Definition: tlvhelper.c:133
WINEXPORT guint64 tlv_get_guint64(const void *vitem, const void *bufend)
tlv_get_guint64 returns a "tainted" value that must be validated by other means
Definition: tlvhelper.c:108
WINEXPORT void tlv_set_guint8(void *vitem, guint8 item, const void *bufend)
Set an unsigned 8 bit integer to the given location with error checking.
Definition: tlvhelper.c:42