ip_addr.h
net/arch.h
src/sys/include/net/ipv4/inet.h
src/sys/include/net/ipv4/ip.h
src/sys/include/net/netif.h
src/sys/include/netif/arp.h
arch/cpu.h
net/arch.h
src/sys/include/net/ipv4/ip_addr.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/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/net/ipv4/ip_addr.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/ipv4/inet.h
ip_addr
IP4_ADDR
ipaddr
a
b
c
d
(ipaddr)->addr = htonl(((uInt32)(a & 0xff) << 24) | ((uInt32)(b & 0xff) << 16) | \ ((uInt32)(c & 0xff) << 8) | (uInt32)(d & 0xff))
bot_thread
netMainThread
ip4_addr1
ipaddr
((uInt8)(ntohl((ipaddr)->addr) >> 24) & 0xff)
ip4_addr2
ipaddr
((uInt8)(ntohl((ipaddr)->addr) >> 16) & 0xff)
ethernetif_output
ip4_addr3
ipaddr
((uInt8)(ntohl((ipaddr)->addr) >> 8) & 0xff)
ethernetif_output
ip4_addr4
ipaddr
((uInt8)(ntohl((ipaddr)->addr)) & 0xff)
ethernetif_output
IP_ADDR_ANY
0
arp_init
arp_tmr
IP_ADDR_BROADCAST
(&ip_addr_broadcast)
ip_addr_cmp
addr1
addr2
((addr1)->addr == (addr2)->addr)
add_arp_entry
arp_arp_input
arp_lookup
ip_addr_debug_print
ipaddr
kprintf("%d.%d.%d.%d", \ (uInt8)(ntohl((ipaddr)->addr) >> 24) & 0xff, \ (uInt8)(ntohl((ipaddr)->addr) >> 16) & 0xff, \ (uInt8)(ntohl((ipaddr)->addr) >> 8) & 0xff, \ (uInt8)ntohl((ipaddr)->addr) & 0xff)
ip_addr_isany
addr1
((addr1) == NULL || (addr1)->addr == 0)
add_arp_entry
arp_tmr
ethernetif_output
ip_addr_isbroadcast
addr1
mask
(((((addr1)->addr) & ~((mask)->addr)) == \ (0xffffffff & ~((mask)->addr))) || \ ((addr1)->addr == 0xffffffff) || \ ((addr1)->addr == 0x00000000))
ethernetif_output
ip_addr_ismulticast
addr1
(((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
ethernetif_output
ip_addr_maskcmp
addr1
addr2
mask
(((addr1)->addr & \ (mask)->addr) == \ ((addr2)->addr & \ (mask)->addr))
arp_ip_input
ethernetif_output
ip_addr_set
dest
src
(dest)->addr = \ ((src) == IP_ADDR_ANY? IP_ADDR_ANY:\ ((struct ip_addr *)src)->addr)
add_arp_entry
arp_arp_input
arp_init
arp_query
arp_tmr
PACK_STRUCT_END struct ip_addr PACK_STRUCT_END struct ip_addr ip_addr_broadcast ip_addr_broadcast
PACK_STRUCT_BEGIN struct ip_addr PACK_STRUCT_BEGIN struct ip_addr 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_2ip__addr_8h.xml 88 2016-01-12 00:11:29Z reddawg $
    */
    #ifndef__LWIP_IP_ADDR_H__
    #define__LWIP_IP_ADDR_H__

    #include"net/arch.h"

    #defineIP_ADDR_ANY0

    #defineIP_ADDR_BROADCAST(&ip_addr_broadcast)

    PACK_STRUCT_BEGIN
    structip_addr{
    PACK_STRUCT_FIELD(uInt32addr);
    }PACK_STRUCT_STRUCT;
    PACK_STRUCT_END

    externstructip_addrip_addr_broadcast;

    #defineIP4_ADDR(ipaddr,a,b,c,d)(ipaddr)->addr=htonl(((uInt32)(a&0xff)<<24)|((uInt32)(b&0xff)<<16)|\
    ((uInt32)(c&0xff)<<8)|(uInt32)(d&0xff))

    #defineip_addr_set(dest,src)(dest)->addr=\
    ((src)==IP_ADDR_ANY?IP_ADDR_ANY:\
    ((structip_addr*)src)->addr)
    #defineip_addr_maskcmp(addr1,addr2,mask)(((addr1)->addr&\
    (mask)->addr)==\
    ((addr2)->addr&\
    (mask)->addr))
    #defineip_addr_cmp(addr1,addr2)((addr1)->addr==(addr2)->addr)

    #defineip_addr_isany(addr1)((addr1)==NULL||(addr1)->addr==0)

    #defineip_addr_isbroadcast(addr1,mask)(((((addr1)->addr)&~((mask)->addr))==\
    (0xffffffff&~((mask)->addr)))||\
    ((addr1)->addr==0xffffffff)||\
    ((addr1)->addr==0x00000000))

    #defineip_addr_ismulticast(addr1)(((addr1)->addr&ntohl(0xf0000000))==ntohl(0xe0000000))

    #defineip_addr_debug_print(ipaddr)kprintf("%d.%d.%d.%d",\
    (uInt8)(ntohl((ipaddr)->addr)>>24)&0xff,\
    (uInt8)(ntohl((ipaddr)->addr)>>16)&0xff,\
    (uInt8)(ntohl((ipaddr)->addr)>>8)&0xff,\
    (uInt8)ntohl((ipaddr)->addr)&0xff)

    #defineip4_addr1(ipaddr)((uInt8)(ntohl((ipaddr)->addr)>>24)&0xff)
    #defineip4_addr2(ipaddr)((uInt8)(ntohl((ipaddr)->addr)>>16)&0xff)
    #defineip4_addr3(ipaddr)((uInt8)(ntohl((ipaddr)->addr)>>8)&0xff)
    #defineip4_addr4(ipaddr)((uInt8)(ntohl((ipaddr)->addr))&0xff)
    #endif/*__LWIP_IP_ADDR_H__*/