libisdn
asn1_common.h File Reference

Go to the source code of this file.

Defines

#define HEX_INT8_FMT   "02hhx"
#define offset_of(type, member)   (uintptr_t)&(((type *)0)->member)
#define container_of(ptr, type, member)   (type *)((uintptr_t)ptr - offset_of(type, member))
#define MIN(x, y)   (((x) < (y)) ? (x) : (y))
#define MAX(x, y)   (((x) > (y)) ? (x) : (y))
#define ARRAY_SIZE(x)   (sizeof((x)) / sizeof((x)[0]))
#define __packed   __attribute__((packed))
#define __unused   __attribute__((unused))
#define __asn1_ptr_check(ptr)
#define asn1_malloc(size)   malloc(size)
#define asn1_free(ptr)   free(ptr)

Define Documentation

#define __asn1_ptr_check (   ptr)
#define __packed   __attribute__((packed))

Definition at line 37 of file asn1_common.h.

#define __unused   __attribute__((unused))

Definition at line 41 of file asn1_common.h.

#define asn1_free (   ptr)    free(ptr)

Definition at line 55 of file asn1_common.h.

Referenced by asn1_destroy().

#define asn1_malloc (   size)    malloc(size)

Definition at line 54 of file asn1_common.h.

#define container_of (   ptr,
  type,
  member 
)    (type *)((uintptr_t)ptr - offset_of(type, member))

Definition at line 20 of file asn1_common.h.

Referenced by asn1_destroy(), asn1_encode(), and asn1_print().

#define HEX_INT8_FMT   "02hhx"

ASN.1 codec

Definition at line 11 of file asn1_common.h.

Referenced by asn1_print().

#define MAX (   x,
 
)    (((x) > (y)) ? (x) : (y))

Definition at line 29 of file asn1_common.h.

Referenced by asn1_decode(), and msgb_put().

#define MIN (   x,
 
)    (((x) < (y)) ? (x) : (y))

Definition at line 25 of file asn1_common.h.

#define offset_of (   type,
  member 
)    (uintptr_t)&(((type *)0)->member)

Definition at line 15 of file asn1_common.h.