Asterisk - The Open Source Telephony Project  18.5.0
Functions
unaligned.h File Reference

Handle unaligned data access. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static unsigned short get_unaligned_uint16 (const void *p)
 
static unsigned int get_unaligned_uint32 (const void *p)
 
static uint64_t get_unaligned_uint64 (const void *p)
 
static void put_unaligned_uint16 (void *p, unsigned short datum)
 
static void put_unaligned_uint32 (void *p, unsigned int datum)
 
static void put_unaligned_uint64 (void *p, uint64_t datum)
 

Detailed Description

Handle unaligned data access.

Definition in file unaligned.h.

Function Documentation

◆ get_unaligned_uint16()

static unsigned short get_unaligned_uint16 ( const void *  p)
inlinestatic

Definition at line 44 of file unaligned.h.

References d.

Referenced by ast_websocket_read(), dump_short(), iax_parse_ies(), and put_unaligned_uint16().

45 {
46  const struct { unsigned short d; } __attribute__((packed)) *pp = p;
47 
48  return pp->d;
49 }
static struct test_val d

◆ get_unaligned_uint32()

static unsigned int get_unaligned_uint32 ( const void *  p)
inlinestatic

Definition at line 38 of file unaligned.h.

References d.

Referenced by ast_event_get_ie_uint(), ast_event_iterator_get_ie_uint(), dump_datetime(), dump_int(), dump_prov_flags(), iax_parse_ies(), and put_unaligned_uint16().

39 {
40  const struct { unsigned int d; } __attribute__((packed)) *pp = p;
41 
42  return pp->d;
43 }
static struct test_val d

◆ get_unaligned_uint64()

static uint64_t get_unaligned_uint64 ( const void *  p)
inlinestatic

Definition at line 32 of file unaligned.h.

References d.

Referenced by ast_websocket_read(), dump_versioned_codec(), iax_parse_ies(), and put_unaligned_uint16().

33 {
34  const struct { uint64_t d; } __attribute__((packed)) *pp = p;
35  return pp->d;
36 }
static struct test_val d

◆ put_unaligned_uint16()

static void put_unaligned_uint16 ( void *  p,
unsigned short  datum 
)
inlinestatic

◆ put_unaligned_uint32()

static void put_unaligned_uint32 ( void *  p,
unsigned int  datum 
)
inlinestatic

Definition at line 58 of file unaligned.h.

References d.

Referenced by ast_rtcp_generate_nack(), ast_rtcp_generate_report(), ast_rtcp_generate_sdes(), put_unaligned_uint16(), rtp_raw_write(), rtp_transport_wide_cc_feedback_produce(), rtp_write_rtcp_fir(), rtp_write_rtcp_psfb(), and websocket_mask_payload().

59 {
60  struct { unsigned int d; } __attribute__((packed)) *pp = p;
61 
62  pp->d = datum;
63 }
static struct test_val d
Definition: ndbm.h:57

◆ put_unaligned_uint64()

static void put_unaligned_uint64 ( void *  p,
uint64_t  datum 
)
inlinestatic

Definition at line 51 of file unaligned.h.

References d.

Referenced by ast_websocket_write(), iax_ie_append_versioned_uint64(), and put_unaligned_uint16().

52 {
53  struct { uint64_t d; } __attribute__((packed,may_alias)) *pp = p;
54 
55  pp->d = datum;
56 }
static struct test_val d
Definition: ndbm.h:57