lwip-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-members] pbuf alloc question


From: Jani Monoses
Subject: [lwip-members] pbuf alloc question
Date: Fri, 15 Nov 2002 14:54:50 +0200

In pbuf alloc the offset is calculated depending on the layer we ask.
Shouldn't the link len addition be under the PBUF_LINK case instead of
under PBUF_IP?
Now this is defined as 0 so it's the same.BTW when would this value be > 0?
Thanks


  switch(l) {
  case PBUF_TRANSPORT:
    offset += PBUF_TRANSPORT_HLEN;
    /* FALLTHROUGH */
  case PBUF_IP:
    offset += PBUF_IP_HLEN;
    offset += PBUF_LINK_HLEN;
    /* FALLTHROUGH */
  case PBUF_LINK:
    break;
  case PBUF_RAW:
    break;
  default:
    ASSERT("pbuf_alloc: bad pbuf layer", 0);
    return NULL;
  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]