Asterisk.org: Developer Documentation (28 Oct 2009)

Wed Oct 28 15:49:23 2009

## Asterisk developer's documentation

# 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 (void *p)
static unsigned int | get_unaligned_uint32 (void *p)
static void | put_unaligned_uint16 (void *p, unsigned short datum)
static void | put_unaligned_uint32 (void *p, unsigned int datum)

## Detailed Description

Handle unaligned data access.

Definition in file unaligned.h.

## Function Documentation

static unsigned short get_unaligned_uint16 | ( | void * | p | ) | `[inline, static]`

Definition at line 38 of file unaligned.h.

References __attribute__().

Referenced by dump_short(), and iax_parse_ies().

    00039 {
    00040    struct { unsigned short d; } __attribute__((packed)) *pp = (void *)p;
    00041
    00042    return pp->d;
    00043 }

static unsigned int get_unaligned_uint32 | ( | void * | p | ) | `[inline, static]`

Definition at line 32 of file unaligned.h.

References __attribute__().

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

    00033 {
    00034    struct { unsigned int d; } __attribute__((packed)) *pp = (void *)p;
    00035
    00036    return pp->d;
    00037 }

static void put_unaligned_uint16 | ( | void * | p,
|  | unsigned short | datum |
| ) |  |  | `[inline, static]`

Definition at line 52 of file unaligned.h.

References __attribute__().

    00053 {
    00054    struct { unsigned short d; } __attribute__((packed)) *pp = (void *)p;
    00055
    00056    pp->d = datum;
    00057 }

static void put_unaligned_uint32 | ( | void * | p,
|  | unsigned int | datum |
| ) |  |  | `[inline, static]`

Definition at line 45 of file unaligned.h.

References __attribute__().

Referenced by ast_rtp_raw_write().

    00046 {
    00047    struct { unsigned int d; } __attribute__((packed)) *pp = (void *)p;
    00048
    00049    pp->d = datum;
    00050 }