Asterisk - The Open Source Telephony Project GIT-master-f36a736
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.

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

References d.

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

◆ get_unaligned_uint32()

static unsigned int get_unaligned_uint32 ( const void *  p)
inlinestatic

Definition at line 38 of file unaligned.h.

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

References d.

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

◆ get_unaligned_uint64()

static uint64_t get_unaligned_uint64 ( const void *  p)
inlinestatic

Definition at line 32 of file unaligned.h.

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

References d.

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

◆ put_unaligned_uint16()

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

Definition at line 65 of file unaligned.h.

66{
67 struct { unsigned short d; } __attribute__((packed)) *pp = p;
68
69 pp->d = datum;
70}
Definition: ndbm.h:57

References d.

Referenced by ast_websocket_close(), ast_websocket_write(), rtp_transport_wide_cc_feedback_produce(), rtp_transport_wide_cc_feedback_status_append(), rtp_transport_wide_cc_feedback_status_vector_append(), send_start_rtp(), and send_tone().

◆ put_unaligned_uint32()

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

Definition at line 58 of file unaligned.h.

59{
60 struct { unsigned int d; } __attribute__((packed)) *pp = p;
61
62 pp->d = datum;
63}

References d.

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

◆ put_unaligned_uint64()

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

Definition at line 51 of file unaligned.h.

52{
53 struct { uint64_t d; } __attribute__((packed,may_alias)) *pp = p;
54
55 pp->d = datum;
56}

References d.

Referenced by ast_websocket_write(), and iax_ie_append_versioned_uint64().