void isc__buffer_putuint16(isc_buffer_t *b, isc_uint16_t val) { REQUIRE(ISC_BUFFER_VALID(b)); REQUIRE(b->used + 2 <= b->length); ISC__BUFFER_PUTUINT16(b, val); }
void isc__buffer_putuint16(isc_buffer_t *b, isc_uint16_t val) { isc_result_t result; REQUIRE(ISC_BUFFER_VALID(b)); if (ISC_UNLIKELY(b->autore)) { result = isc_buffer_reserve(&b, 2); REQUIRE(result == ISC_R_SUCCESS); } REQUIRE(isc_buffer_availablelength(b) >= 2); ISC__BUFFER_PUTUINT16(b, val); }
void isc__buffer_putuint48(isc_buffer_t *b, isc_uint64_t val) { isc_uint16_t valhi; isc_uint32_t vallo; REQUIRE(ISC_BUFFER_VALID(b)); REQUIRE(b->used + 6 <= b->length); valhi = (isc_uint16_t)(val >> 32); vallo = (isc_uint32_t)(val & 0xFFFFFFFF); ISC__BUFFER_PUTUINT16(b, valhi); ISC__BUFFER_PUTUINT32(b, vallo); }
void isc__buffer_putuint48(isc_buffer_t *b, isc_uint64_t val) { isc_result_t result; isc_uint16_t valhi; isc_uint32_t vallo; REQUIRE(ISC_BUFFER_VALID(b)); if (ISC_UNLIKELY(b->autore)) { result = isc_buffer_reserve(&b, 6); REQUIRE(result == ISC_R_SUCCESS); } REQUIRE(isc_buffer_availablelength(b) >= 6); valhi = (isc_uint16_t)(val >> 32); vallo = (isc_uint32_t)(val & 0xFFFFFFFF); ISC__BUFFER_PUTUINT16(b, valhi); ISC__BUFFER_PUTUINT32(b, vallo); }