/* appends uint16_t in a packet, incrementing the index  */
static uint8_t _mdns_append_u16(uint8_t *packet, uint16_t *index, uint16_t value)
/* appends uint16_t in a packet, incrementing the index  */
static uint8_t _mdns_append_u16(uint8_t *packet, uint16_t *index, uint16_t value)
{
    if ((*index + 1) >= MDNS_MAX_PACKET_SIZE) {
        return 0;
    }
    _mdns_append_u8(packet, index, (value >> 8) & 0xFF);
    _mdns_append_u8(packet, index, value & 0xFF);
    return 2;
}