|
@ -67,7 +67,7 @@ static inline void rfc4175_set_extended_sequence_number(uint8_t *buf, uint16_t n |
|
|
buf[1] = number & 0xff; |
|
|
buf[1] = number & 0xff; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_extended_sequence_number(uint8_t *buf) |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_extended_sequence_number(const uint8_t *buf) |
|
|
{ |
|
|
{ |
|
|
return (buf[0] << 8) | buf[1]; |
|
|
return (buf[0] << 8) | buf[1]; |
|
|
} |
|
|
} |
|
@ -78,7 +78,7 @@ static inline void rfc4175_set_line_length(uint8_t *buf, uint16_t length) |
|
|
buf[1] = length & 0xff; |
|
|
buf[1] = length & 0xff; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_line_length(uint8_t *buf) |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_line_length(const uint8_t *buf) |
|
|
{ |
|
|
{ |
|
|
return (buf[0] << 8) | buf[1]; |
|
|
return (buf[0] << 8) | buf[1]; |
|
|
} |
|
|
} |
|
@ -88,7 +88,7 @@ static inline void rfc4175_set_line_field_id(uint8_t *buf, uint8_t id) |
|
|
buf[2] |= (!!id) << 7; |
|
|
buf[2] |= (!!id) << 7; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static inline uint8_t rfc4175_get_line_field_id(uint8_t *buf) |
|
|
|
|
|
|
|
|
static inline uint8_t rfc4175_get_line_field_id(const uint8_t *buf) |
|
|
{ |
|
|
{ |
|
|
return buf[2] >> 7; |
|
|
return buf[2] >> 7; |
|
|
} |
|
|
} |
|
@ -99,7 +99,7 @@ static inline void rfc4175_set_line_number(uint8_t *buf, uint16_t number) |
|
|
buf[3] = number & 0xff; |
|
|
buf[3] = number & 0xff; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_line_number(uint8_t *buf) |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_line_number(const uint8_t *buf) |
|
|
{ |
|
|
{ |
|
|
return ((buf[2] & 0x7f) << 8) | buf[3]; |
|
|
return ((buf[2] & 0x7f) << 8) | buf[3]; |
|
|
} |
|
|
} |
|
@ -109,7 +109,7 @@ static inline void rfc4175_set_line_continuation(uint8_t *buf, uint8_t continuat |
|
|
buf[4] |= (!!continuation) << 7; |
|
|
buf[4] |= (!!continuation) << 7; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static inline uint8_t rfc4175_get_line_continuation(uint8_t *buf) |
|
|
|
|
|
|
|
|
static inline uint8_t rfc4175_get_line_continuation(const uint8_t *buf) |
|
|
{ |
|
|
{ |
|
|
return buf[4] >> 7; |
|
|
return buf[4] >> 7; |
|
|
} |
|
|
} |
|
@ -120,7 +120,7 @@ static inline void rfc4175_set_line_offset(uint8_t *buf, uint16_t offset) |
|
|
buf[5] = offset & 0xff; |
|
|
buf[5] = offset & 0xff; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_line_offset(uint8_t *buf) |
|
|
|
|
|
|
|
|
static inline uint16_t rfc4175_get_line_offset(const uint8_t *buf) |
|
|
{ |
|
|
{ |
|
|
return ((buf[4] & 0x7f) << 8) | buf[5]; |
|
|
return ((buf[4] & 0x7f) << 8) | buf[5]; |
|
|
} |
|
|
} |
|
|