pbuf.h
net/debug.h
net/arch.h
src/sys/include/net/api.h
src/sys/include/net/api_msg.h
src/sys/include/net/ipv4/icmp.h
src/sys/include/net/ipv4/inet.h
src/sys/include/net/ipv4/ip.h
src/sys/include/net/ipv6/inet.h
src/sys/include/net/netif.h
src/sys/include/net/tcp.h
src/sys/include/net/tcpip.h
src/sys/include/net/udp.h
src/sys/include/netif/arp.h
src/sys/include/netif/tcpdump.h
src/sys/net/api/tcpip.c
src/sys/net/netif/ethernetif.c
arch/cpu.h
net/arch.h
src/sys/include/net/pbuf.h
net/debug.h
arch/cc.h
src/sys/net/net/udpecho.c
src/sys/include/net/ipv4/ip.h
src/sys/net/netif/tcpdump.c
src/sys/include/net/netif.h
src/sys/net/netif/loopif.c
src/sys/include/net/ipv6/inet.h
src/sys/include/net/udp.h
src/sys/include/netif/arp.h
src/sys/include/net/tcp.h
src/sys/net/netif/ethernetif.c
src/sys/net/netif/arp.c
src/sys/include/net/ipv4/icmp.h
src/sys/net/net/bot.c
src/sys/net/api/tcpip.c
src/sys/include/net/tcpip.h
src/sys/include/net/api_msg.h
src/sys/include/netif/ethernetif.h
src/sys/net/net/shell.c
src/sys/net/api/api_lib.c
src/sys/net/net/init.c
src/sys/include/netif/tcpdump.h
src/sys/include/net/api.h
src/sys/include/netif/loopif.h
src/sys/net/api/sockets.c
src/sys/net/api/api_msg.c
src/sys/include/net/pbuf.h
src/sys/include/net/ipv4/inet.h
pbuf
PBUF_FLAG_POOL
0x02
PBUF_FLAG_RAM
0x00
PBUF_FLAG_ROM
0x01
PBUF_IP_HLEN
20
PBUF_TRANSPORT_HLEN
20
pbuf_flag
PBUF_RAM
PBUF_ROM
PBUF_POOL
pbuf_layer
PBUF_TRANSPORT
PBUF_IP
PBUF_LINK
PBUF_RAW
pbuf * struct pbuf* pbuf_alloc (pbuf_layer l, uInt16 size, pbuf_flag flag) pbuf_alloc pbuf_layer l uInt16 size pbuf_flag flag arp_query ethernetif_output loopif_output low_level_input netbuf_alloc netbuf_ref
void void pbuf_chain (struct pbuf *h, struct pbuf *t) pbuf_chain struct pbuf * h struct pbuf * t ethernetif_output netbuf_chain
uInt8 uInt8 pbuf_clen (struct pbuf *p) pbuf_clen struct pbuf * p
pbuf * struct pbuf* pbuf_dechain (struct pbuf *p) pbuf_dechain struct pbuf * p
uInt8 uInt8 pbuf_free (struct pbuf *p) pbuf_free struct pbuf * p arp_arp_input ethernetif_input ethernetif_output netbuf_alloc netbuf_delete netbuf_free netbuf_ref netconn_delete recv_tcp recv_udp tcpip_input
uInt8 uInt8 pbuf_header (struct pbuf *p, Int16 header_size) pbuf_header struct pbuf * p Int16 header_size ethernetif_input ethernetif_output
void void pbuf_init (void) pbuf_init void net_init
void void pbuf_realloc (struct pbuf *p, uInt16 size) pbuf_realloc struct pbuf * p uInt16 size
void void pbuf_ref (struct pbuf *p) pbuf_ref struct pbuf * p

    /*
    *Copyright(c)2001,SwedishInstituteofComputerScience.
    *Allrightsreserved.
    *
    *Redistributionanduseinsourceandbinaryforms,withorwithout
    *modification,arepermittedprovidedthatthefollowingconditions
    *aremet:
    *1.Redistributionsofsourcecodemustretaintheabovecopyright
    *notice,thislistofconditionsandthefollowingdisclaimer.
    *2.Redistributionsinbinaryformmustreproducetheabovecopyright
    *notice,thislistofconditionsandthefollowingdisclaimerinthe
    *documentationand/orothermaterialsprovidedwiththedistribution.
    *3.NeitherthenameoftheInstitutenorthenamesofitscontributors
    *maybeusedtoendorseorpromoteproductsderivedfromthissoftware
    *withoutspecificpriorwrittenpermission.
    *
    *THISSOFTWAREISPROVIDEDBYTHEINSTITUTEANDCONTRIBUTORS``ASIS''AND
    *ANYEXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THE
    *IMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSE
    *AREDISCLAIMED.INNOEVENTSHALLTHEINSTITUTEORCONTRIBUTORSBELIABLE
    *FORANYDIRECT,INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,ORCONSEQUENTIAL
    *DAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENTOFSUBSTITUTEGOODS
    *ORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    *HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICT
    *LIABILITY,ORTORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAY
    *OUTOFTHEUSEOFTHISSOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOF
    *SUCHDAMAGE.
    *
    *ThisfileispartofthelwIPTCP/IPstack.
    *
    *Author:AdamDunkels<adam@sics.se>
    *
    *$Id: pbuf_8h.xml 88 2016-01-12 00:11:29Z reddawg $
    */
    /*-----------------------------------------------------------------------------------*/
    #ifndef__LWIP_PBUF_H__
    #define__LWIP_PBUF_H__

    #include"net/debug.h"
    #include"net/arch.h"

    #definePBUF_TRANSPORT_HLEN20
    #definePBUF_IP_HLEN20

    typedefenum{
    PBUF_TRANSPORT,
    PBUF_IP,
    PBUF_LINK,
    PBUF_RAW
    }pbuf_layer;

    typedefenum{
    PBUF_RAM,
    PBUF_ROM,
    PBUF_POOL
    }pbuf_flag;

    /*Definitionsforthepbufflagfield(thesearenottheflagsthat
    arepassedtopbuf_alloc()).*/
    #definePBUF_FLAG_RAM0x00/*FlagsthatpbufdataisstoredinRAM.*/
    #definePBUF_FLAG_ROM0x01/*FlagsthatpbufdataisstoredinROM.*/
    #definePBUF_FLAG_POOL0x02/*Flagsthatthepbufcomesfromthe
    pbufpool.*/

    structpbuf{
    structpbuf*next;

    /*high4bits,flags,low4bitsreferencecount*/
    uInt8flags,ref;
    void*payload;

    /*Totallengthofbuffer+additionallychainedbuffers.*/
    uInt16tot_len;
    /*Lengthofthisbuffer.*/
    uInt16len;

    };

    /*pbuf_init():

    Initializesthepbufmodule.Thenumparameterdetermineshowmany
    pbufsthatshouldbeallocatedtothepbufpool,andthesize
    parameterspecifiesthesizeofthedataallocatedtothose.*/
    voidpbuf_init(void);

    /*pbuf_alloc():

    Allocatesapbufatprotocollayerl.Theactualmemoryallocated
    forthepbufisdeterminedbythelayeratwhichthepbufis
    allocatedandtherequestedsize(fromthesizeparameter).The
    flagparameterdecideshowandwherethepbufshouldbeallocated
    asfollows:

    *PBUF_RAM:buffermemoryforpbufisallocatedasonelarge
    chunk.Thisincludesprotocolheadersaswell.

    *RBUF_ROM:nobuffermemoryisallocatedforthepbuf,evenfor
    protocolheaders.Additionalheadersmustbe
    prependedbyallocatinganotherpbufandchaininto
    thefrontoftheROMpbuf.

    *PBUF_ROOL:thepbufisallocatedasapbufchain,withpbufsfrom
    thepbufpoolthatisallocatedduringpbuf_init().*/
    structpbuf*pbuf_alloc(pbuf_layerl,uInt16size,pbuf_flagflag);

    /*pbuf_realloc():

    Shrinksthepbuftothesizegivenbythesizeparameter.
    */
    voidpbuf_realloc(structpbuf*p,uInt16size);

    /*pbuf_header():

    Triestomovethep->payloadpointerheader_sizenumberofbytes
    upwardwithinthepbuf.Thereturnvalueisnon-zeroifit
    fails.Ifso,anadditionalpbufshouldbeallocatedfortheheader
    anditshouldbechainedtothefront.*/
    uInt8pbuf_header(structpbuf*p,Int16header_size);

    /*pbuf_ref():

    Incrementsthereferencecountofthepbufp.
    */
    voidpbuf_ref(structpbuf*p);

    /*pbuf_free():

    Decrementsthereferencecountanddeallocatesthepbufifthe
    referencecountiszero.Ifthepbufisachainallpbufsinthe
    chainaredeallocated.*/
    uInt8pbuf_free(structpbuf*p);

    /*pbuf_clen():

    Returnsthelengthofthepbufchain.*/
    uInt8pbuf_clen(structpbuf*p);

    /*pbuf_chain():

    Chainspbuftontheendofpbufh.Pbufhwillhaveit'stot_len
    fieldadjustedaccordingly.Pbuftshouldnobeusedanymoreafter
    acalltothisfunction,sincepbuftisnowapartofpbufh.*/
    voidpbuf_chain(structpbuf*h,structpbuf*t);

    /*pbuf_dechain():

    Picksoffthefirstpbuffromthepbufchainp.Returnsthetailof
    thepbufchainorNULLifthepbufpwasnotchained.*/
    structpbuf*pbuf_dechain(structpbuf*p);

    #endif/*__LWIP_PBUF_H__*/