/* appends byte in a packet, incrementing the index  */
static uint8_t _mdns_append_u8(uint8_t *packet, uint16_t *index, uint8_t value)
/* appends byte in a packet, incrementing the index  */
static uint8_t _mdns_append_u8(uint8_t *packet, uint16_t *index, uint8_t value)
{
    if (*index >= MDNS_MAX_PACKET_SIZE) {
        return 0;
    }
    packet[*index] = value;
    *index += 1;
    return 1;
}