/* Put one byte to the specified position in a pbuf WARNING: silently ignores offset >= p->tot_len */
void pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data)
/* Put one byte to the specified position in a pbuf WARNING: silently ignores offset >= p->tot_len */
void pbuf_put_at(struct pbuf *p, u16_t offset, u8_t data)
{
  u16_t q_idx;
  struct pbuf *q = pbuf_skip(p, offset, &q_idx);
  if ((q != NULL) && (q->len > q_idx)) {
    ((u8_t *)q->payload)[q_idx] = data;
  }
}