icmp.h
net/arch.h
net/opt.h
net/pbuf.h
net/netif.h
src/sys/include/net/tcp.h
net/netif.h
arch/cpu.h
ubixos/types.h
sys/_types.h
net/arch.h
src/sys/include/net/ipv4/icmp.h
net/lwipopts.h
net/ipv4/ip_addr.h
net/err.h
net/opt.h
net/pbuf.h
net/debug.h
net/ipv4/inet.h
arch/cc.h
src/sys/net/net/udpecho.c
src/sys/net/netif/tcpdump.c
src/sys/net/netif/loopif.c
src/sys/include/net/tcp.h
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/net/net/shell.c
src/sys/net/api/api_lib.c
src/sys/net/net/init.c
src/sys/include/net/api.h
src/sys/net/api/sockets.c
src/sys/net/api/api_msg.c
icmp_dur_hdr
icmp_echo_hdr
icmp_te_hdr
ICMP_DUR
3
ICMP_ECHO
8
ICMP_ER
0
ICMP_IR
16
ICMP_IRQ
15
ICMP_PP
12
ICMP_RD
5
ICMP_SQ
4
ICMP_TE
11
ICMP_TS
13
ICMP_TSR
14
ICMPH_CODE
hdr
(NTOHS((hdr)->_type_code) & 0xff)
ICMPH_CODE_SET
hdr
code
((hdr)->_type_code = HTONS((code) | (ICMPH_TYPE(hdr) << 8)))
ICMPH_TYPE
hdr
(NTOHS((hdr)->_type_code) >> 8)
ICMPH_TYPE_SET
hdr
type
((hdr)->_type_code = HTONS(ICMPH_CODE(hdr) | ((type) << 8)))
icmp_dur_type
ICMP_DUR_NET
0
ICMP_DUR_HOST
1
ICMP_DUR_PROTO
2
ICMP_DUR_PORT
3
ICMP_DUR_FRAG
4
ICMP_DUR_SR
5
icmp_te_type
ICMP_TE_TTL
0
ICMP_TE_FRAG
1
void void icmp_dest_unreach (struct pbuf *p, enum icmp_dur_type t) icmp_dest_unreach struct pbuf * p enum icmp_dur_type t
void void icmp_input (struct pbuf *p, struct netif *inp) icmp_input struct pbuf * p struct netif * inp
void void icmp_time_exceeded (struct pbuf *p, enum icmp_te_type t) icmp_time_exceeded struct pbuf * p enum icmp_te_type t
icmp_te_hdr struct icmp_te_hdr PACK_STRUCT_STRUCT PACK_STRUCT_STRUCT
icmp_dur_hdr struct icmp_dur_hdr PACK_STRUCT_STRUCT PACK_STRUCT_STRUCT
icmp_echo_hdr struct icmp_echo_hdr PACK_STRUCT_STRUCT PACK_STRUCT_STRUCT

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

    #include"net/arch.h"

    #include"net/opt.h"
    #include"net/pbuf.h"

    #include"net/netif.h"

    #defineICMP_ER0/*echoreply*/
    #defineICMP_DUR3/*destinationunreachable*/
    #defineICMP_SQ4/*sourcequench*/
    #defineICMP_RD5/*redirect*/
    #defineICMP_ECHO8/*echo*/
    #defineICMP_TE11/*timeexceeded*/
    #defineICMP_PP12/*parameterproblem*/
    #defineICMP_TS13/*timestamp*/
    #defineICMP_TSR14/*timestampreply*/
    #defineICMP_IRQ15/*informationrequest*/
    #defineICMP_IR16/*informationreply*/

    enumicmp_dur_type{
    ICMP_DUR_NET=0,/*netunreachable*/
    ICMP_DUR_HOST=1,/*hostunreachable*/
    ICMP_DUR_PROTO=2,/*protocolunreachable*/
    ICMP_DUR_PORT=3,/*portunreachable*/
    ICMP_DUR_FRAG=4,/*fragmentationneededandDFset*/
    ICMP_DUR_SR=5/*sourceroutefailed*/
    };

    enumicmp_te_type{
    ICMP_TE_TTL=0,/*timetoliveexceededintransit*/
    ICMP_TE_FRAG=1/*fragmentreassemblytimeexceeded*/
    };

    voidicmp_input(structpbuf*p,structnetif*inp);

    voidicmp_dest_unreach(structpbuf*p,enumicmp_dur_typet);
    voidicmp_time_exceeded(structpbuf*p,enumicmp_te_typet);

    structicmp_echo_hdr{
    PACK_STRUCT_FIELD(uInt16_type_code);
    PACK_STRUCT_FIELD(uInt16chksum);
    PACK_STRUCT_FIELD(uInt16id);
    PACK_STRUCT_FIELD(uInt16seqno);
    }PACK_STRUCT_STRUCT;

    structicmp_dur_hdr{
    PACK_STRUCT_FIELD(uInt16_type_code);
    PACK_STRUCT_FIELD(uInt16chksum);
    PACK_STRUCT_FIELD(uInt32unused);
    }PACK_STRUCT_STRUCT;

    structicmp_te_hdr{
    PACK_STRUCT_FIELD(uInt16_type_code);
    PACK_STRUCT_FIELD(uInt16chksum);
    PACK_STRUCT_FIELD(uInt32unused);
    }PACK_STRUCT_STRUCT;

    #defineICMPH_TYPE(hdr)(NTOHS((hdr)->_type_code)>>8)
    #defineICMPH_CODE(hdr)(NTOHS((hdr)->_type_code)&0xff)

    #defineICMPH_TYPE_SET(hdr,type)((hdr)->_type_code=HTONS(ICMPH_CODE(hdr)|((type)<<8)))
    #defineICMPH_CODE_SET(hdr,code)((hdr)->_type_code=HTONS((code)|(ICMPH_TYPE(hdr)<<8)))

    #endif/*__LWIP_ICMP_H__*/