/[lwip]/lwip/src/core/pbuf.c
ViewVC logotype

Diff of /lwip/src/core/pbuf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by likewise, Mon Mar 31 18:48:52 2003 UTC revision 1.33 by davidhaas, Mon Mar 31 20:45:08 2003 UTC
# Line 486  pbuf_realloc(struct pbuf *p, u16_t new_l Line 486  pbuf_realloc(struct pbuf *p, u16_t new_l
486  }  }
487    
488  /**  /**
489   * Tries to expand the payload with towards the front.   * Adjusts the payload pointer +/- for header.
490   *   *
491   * Adjusts the ->payload pointer so that space for a header appears in   * Adjusts the ->payload pointer so that space for a header appears in
492   * the pbuf. Also, the ->tot_len and ->len fields are adjusted.   * the pbuf. Also, the ->tot_len and ->len fields are adjusted.
493   *   *
494   * @param hdr_decrement Number of bytes to decrement header size.   * @param hdr_size Number of bytes to increment header size which
495   * (Using a negative value increases the header size.)   * increases the size of the pbuf. New space is on the front.
496   *   * (Using a negative value decreases the header size.)
497     *
498     * PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so
499     * the call will fail. A check is made that the increase in header size does
500     * not move the payload pointer in front of the start of the buffer.
501   * @return 1 on failure, 0 on success.   * @return 1 on failure, 0 on success.
502   */   */
503  u8_t  u8_t
# Line 710  pbuf_chain(struct pbuf *h, struct pbuf * Line 714  pbuf_chain(struct pbuf *h, struct pbuf *
714      /* add total length of second chain to all totals of first chain */      /* add total length of second chain to all totals of first chain */
715      p->tot_len += t->tot_len;      p->tot_len += t->tot_len;
716    }    }
717      /* add total length of second chain to last buffer tot_len in first chain */
718      p->tot_len += t->tot_len;
719      
720    /* chain last pbuf of h chain (p) with first of tail (t) */    /* chain last pbuf of h chain (p) with first of tail (t) */
721    p->next = t;    p->next = t;
722    /* t is now referenced to one more time */    /* t is now referenced to one more time */

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26