ip.h
lwip/debug.h
lwip/def.h
lwip/pbuf.h
lwip/ip_addr.h
lwip/err.h
lwip/netif.h
src/sys/include/net/ipv6/ip.h
lwip/ip_addr.h
lwip/debug.h
lwip/def.h
lwip/err.h
lwip/netif.h
lwip/pbuf.h
ip_hdr
IP_HDRINCL
NULL
IP_HLEN
40
IP_PROTO_ICMP
58
IP_PROTO_TCP
6
IP_PROTO_UDP
17
IP_PROTO_UDPLITE
170
void void ip_init (void) ip_init void
void void ip_input (struct pbuf *p, struct netif *inp) ip_input struct pbuf * p struct netif * inp
err_t err_t ip_output (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, unsigned char ttl, unsigned char proto) ip_output struct pbuf * p struct ip_addr * src struct ip_addr * dest unsigned char ttl unsigned char proto
err_t err_t ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, unsigned char ttl, unsigned char proto, struct netif *netif) ip_output_if struct pbuf * p struct ip_addr * src struct ip_addr * dest unsigned char ttl unsigned char proto struct netif * netif
netif * struct netif* ip_route (struct ip_addr *dest) ip_route struct ip_addr * dest

    /*
    *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: ipv6_2ip_8h.xml 88 2016-01-12 00:11:29Z reddawg $
    */
    #ifndef__LWIP_IP_H__
    #define__LWIP_IP_H__

    #include"lwip/debug.h"
    #include"lwip/def.h"
    #include"lwip/pbuf.h"
    #include"lwip/ip_addr.h"

    #include"lwip/err.h"

    #defineIP_HLEN40

    #defineIP_PROTO_ICMP58
    #defineIP_PROTO_UDP17
    #defineIP_PROTO_UDPLITE170
    #defineIP_PROTO_TCP6

    /*Thisispassedasthedestinationaddresstoip_output_if(not
    toip_output),meaningthatanIPheaderalreadyisconstructed
    inthepbuf.ThisisusedwhenTCPretransmits.*/
    #ifdefIP_HDRINCL
    #undefIP_HDRINCL
    #endif/*IP_HDRINCL*/
    #defineIP_HDRINCLNULL

    /*TheIPv6header.*/
    structip_hdr{
    #ifBYTE_ORDER==LITTLE_ENDIAN
    u8_ttclass1:4,v:4;
    u8_tflow1:4,tclass2:4;
    #else
    u8_tv:4,tclass1:4;
    u8_ttclass2:8,flow1:4;
    #endif
    u16_tflow2;
    u16_tlen;/*payloadlength*/
    u8_tnexthdr;/*nextheader*/
    u8_thoplim;/*hoplimit(TTL)*/
    structip_addrsrc,dest;/*sourceanddestinationIPaddresses*/
    };

    voidip_init(void);

    #include"lwip/netif.h"

    structnetif*ip_route(structip_addr*dest);

    voidip_input(structpbuf*p,structnetif*inp);

    /*sourceanddestinationaddressesinnetworkbyteorder,please*/
    err_tip_output(structpbuf*p,structip_addr*src,structip_addr*dest,
    unsignedcharttl,unsignedcharproto);

    err_tip_output_if(structpbuf*p,structip_addr*src,structip_addr*dest,
    unsignedcharttl,unsignedcharproto,
    structnetif*netif);

    #ifIP_DEBUG
    voidip_debug_print(structpbuf*p);
    #endif/*IP_DEBUG*/

    #endif/*__LWIP_IP_H__*/