ROHC compression/decompression library
|
Bitwised operations for ROHC compression/decompression. More...
Go to the source code of this file.
Defines | |
#define | GET_BIT_0(x) ((*(x)) & 0x01) |
#define | GET_BIT_1(x) ((*(x)) & 0x02) |
#define | GET_BIT_2(x) ((*(x)) & 0x04) |
#define | GET_BIT_3(x) ((*(x)) & 0x08) |
#define | GET_BIT_4(x) ((*(x)) & 0x10) |
#define | GET_BIT_5(x) ((*(x)) & 0x20) |
#define | GET_BIT_6(x) ((*(x)) & 0x40) |
#define | GET_BIT_7(x) ((*(x)) & 0x80) |
#define | GET_BIT_0_2(x) ((*(x)) & 0x07) |
#define | GET_BIT_0_4(x) ((*(x)) & 0x1f) |
#define | GET_BIT_0_3(x) ((*(x)) & 0x0f) |
#define | GET_BIT_0_5(x) ((*(x)) & 0x3f) |
#define | GET_BIT_0_6(x) ((*(x)) & 0x7f) |
#define | GET_BIT_0_7(x) ((*(x)) & 0xff) |
#define | GET_BIT_1_7(x) ( ((*(x)) & 0xfe) >> 1 ) |
#define | GET_BIT_3_4(x) ( ((*(x)) & 0x18) >> 3 ) |
#define | GET_BIT_3_5(x) ( ((*(x)) & 0x38) >> 3 ) |
#define | GET_BIT_3_6(x) ( ((*(x)) & 0x78) >> 3 ) |
#define | GET_BIT_3_7(x) ( ((*(x)) & 0xf8) >> 3 ) |
#define | GET_BIT_4_7(x) ( ((*(x)) & 0xf0) >> 4 ) |
#define | GET_BIT_5_7(x) ( ((*(x)) & 0xe0) >> 5 ) |
#define | GET_BIT_6_7(x) ( ((*(x)) & 0xc0) >> 6 ) |
#define | GET_BIT_4_6(x) ( ((*(x)) & 0x70) >> 4 ) |
#define | GET_REAL(x) ((x) ? 1 : 0) |
Convert GET_BIT_* values to 0 or 1. | |
#define | GET_BOOL(x) ((x) ? true : false) |
Convert GET_BIT_* values to boolean. | |
#define | GET_NEXT_16_BITS(x) ((((*((x) + 1)) << 8) & 0xff00) | ((*(x)) & 0x00ff)) |
Get the next 16 bits at the given memory location in Network Byte Order. |
Bitwised operations for ROHC compression/decompression.
#define GET_BIT_0 | ( | x | ) | ((*(x)) & 0x01) |
#define GET_BIT_0_2 | ( | x | ) | ((*(x)) & 0x07) |
Referenced by d_feedback_headersize(), and d_feedback_size().
#define GET_BIT_0_3 | ( | x | ) | ((*(x)) & 0x0f) |
Referenced by d_decode_add_cid().
#define GET_BIT_0_4 | ( | x | ) | ((*(x)) & 0x1f) |
Referenced by sdvl_decode().
#define GET_BIT_0_5 | ( | x | ) | ((*(x)) & 0x3f) |
Referenced by sdvl_decode().
#define GET_BIT_0_6 | ( | x | ) | ((*(x)) & 0x7f) |
Referenced by sdvl_decode().
#define GET_BIT_0_7 | ( | x | ) | ((*(x)) & 0xff) |
Referenced by d_feedback_size(), d_is_irdyn(), d_is_padding(), and sdvl_decode().
#define GET_BIT_1 | ( | x | ) | ((*(x)) & 0x02) |
#define GET_BIT_1_7 | ( | x | ) | ( ((*(x)) & 0xfe) >> 1 ) |
Referenced by d_is_ir(), and d_is_segment().
#define GET_BIT_2 | ( | x | ) | ((*(x)) & 0x04) |
#define GET_BIT_3 | ( | x | ) | ((*(x)) & 0x08) |
#define GET_BIT_3_4 | ( | x | ) | ( ((*(x)) & 0x18) >> 3 ) |
#define GET_BIT_3_5 | ( | x | ) | ( ((*(x)) & 0x38) >> 3 ) |
#define GET_BIT_3_6 | ( | x | ) | ( ((*(x)) & 0x78) >> 3 ) |
#define GET_BIT_3_7 | ( | x | ) | ( ((*(x)) & 0xf8) >> 3 ) |
Referenced by d_is_feedback().
#define GET_BIT_4 | ( | x | ) | ((*(x)) & 0x10) |
#define GET_BIT_4_6 | ( | x | ) | ( ((*(x)) & 0x70) >> 4 ) |
#define GET_BIT_4_7 | ( | x | ) | ( ((*(x)) & 0xf0) >> 4 ) |
Referenced by d_is_add_cid().
#define GET_BIT_5 | ( | x | ) | ((*(x)) & 0x20) |
#define GET_BIT_5_7 | ( | x | ) | ( ((*(x)) & 0xe0) >> 5 ) |
Referenced by d_is_uor2(), d_sdvalue_size(), and sdvl_decode().
#define GET_BIT_6 | ( | x | ) | ((*(x)) & 0x40) |
Referenced by d_is_uor2_rtp().
#define GET_BIT_6_7 | ( | x | ) | ( ((*(x)) & 0xc0) >> 6 ) |
Referenced by d_is_uo1(), d_sdvalue_size(), and sdvl_decode().
#define GET_BIT_7 | ( | x | ) | ((*(x)) & 0x80) |
Referenced by d_is_uo0(), d_is_uor2_ts(), d_sdvalue_size(), and sdvl_decode().
#define GET_BOOL | ( | x | ) | ((x) ? true : false) |
Convert GET_BIT_* values to boolean.
example: GET_BOOL(GET_BIT_5(data_ptr));
#define GET_NEXT_16_BITS | ( | x | ) | ((((*((x) + 1)) << 8) & 0xff00) | ((*(x)) & 0x00ff)) |
Get the next 16 bits at the given memory location in Network Byte Order.
Referenced by ip_parse_dynamic_ip(), and udp_parse_static_udp().
#define GET_REAL | ( | x | ) | ((x) ? 1 : 0) |
Convert GET_BIT_* values to 0 or 1.
example: GET_REAL(GET_BIT_5(data_ptr));