ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
tcpip.h File Reference
#include <tamtypes.h>
+ Include dependency graph for tcpip.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PBuf
 
struct  ip4_addr_t
 
struct  ip6_addr_t
 
struct  NetIF
 
struct  in_addr
 
struct  in6_addr
 
struct  sockaddr_in
 
struct  sockaddr
 
struct  sockaddr_storage
 
struct  fd_set
 
struct  hostent
 
struct  addrinfo
 
struct  t_ip_info
 

Macros

#define PS2IP_DNS
 
#define PS2IP_DHCP   1
 
#define LWIP_DHCP   1
 
#define LWIP_IPV4   1
 
#define LWIP_TCP   1
 
#define LWIP_UDP   1
 
#define MEMP_NUM_UDP_PCB   4
 
#define MEMP_NUM_TCP_PCB   5
 
#define MEMP_NUM_NETCONN   (MEMP_NUM_TCP_PCB+MEMP_NUM_UDP_PCB)
 
#define LWIP_NETIF_STATUS_CALLBACK   0
 
#define LWIP_NETIF_LINK_CALLBACK   0
 
#define LWIP_AUTOIP   0
 
#define LWIP_NETIF_HOSTNAME   0
 
#define LWIP_SNMP   0
 
#define LWIP_IGMP   0
 
#define LWIP_NETIF_HWADDRHINT   0
 
#define LWIP_LOOPBACK_MAX_PBUFS   0
 
#define LWIP_NUM_NETIF_CLIENT_DATA   0
 
#define LWIP_SOCKET_OFFSET   0
 
#define LWIP_IPV6_SEND_ROUTER_SOLICIT   1
 
#define DNS_MAX_SERVERS   2
 
#define PBUF_TRANSPORT_HLEN   20
 
#define PBUF_IP_HLEN   20
 
#define IPADDR_NONE   ((u32)0xffffffffUL)
 
#define IPADDR_LOOPBACK   ((u32)0x7f000001UL)
 
#define IPADDR_ANY   ((u32)0x00000000UL)
 
#define IPADDR_BROADCAST   ((u32)0xffffffffUL)
 
#define IP_CLASSA(a)   ((((u32)(a)) & 0x80000000UL) == 0)
 
#define IP_CLASSA_NET   0xff000000
 
#define IP_CLASSA_NSHIFT   24
 
#define IP_CLASSA_HOST   (0xffffffff & ~IP_CLASSA_NET)
 
#define IP_CLASSA_MAX   128
 
#define IP_CLASSB(a)   ((((u32)(a)) & 0xc0000000UL) == 0x80000000UL)
 
#define IP_CLASSB_NET   0xffff0000
 
#define IP_CLASSB_NSHIFT   16
 
#define IP_CLASSB_HOST   (0xffffffff & ~IP_CLASSB_NET)
 
#define IP_CLASSB_MAX   65536
 
#define IP_CLASSC(a)   ((((u32)(a)) & 0xe0000000UL) == 0xc0000000UL)
 
#define IP_CLASSC_NET   0xffffff00
 
#define IP_CLASSC_NSHIFT   8
 
#define IP_CLASSC_HOST   (0xffffffff & ~IP_CLASSC_NET)
 
#define IP_CLASSD(a)   (((u32)(a) & 0xf0000000UL) == 0xe0000000UL)
 
#define IP_CLASSD_NET   0xf0000000 /* These ones aren't really */
 
#define IP_CLASSD_NSHIFT   28 /* net and host fields, but */
 
#define IP_CLASSD_HOST   0x0fffffff /* routing needn't know. */
 
#define IP_MULTICAST(a)   IP_CLASSD(a)
 
#define IP_EXPERIMENTAL(a)   (((u32)(a) & 0xf0000000UL) == 0xf0000000UL)
 
#define IP_BADCLASS(a)   (((u32)(a) & 0xf0000000UL) == 0xf0000000UL)
 
#define IP_LOOPBACKNET   127 /* official! */
 
#define IP4_ADDR(ipaddr, a, b, c, d)
 
#define IPADDR2_COPY(dest, src)   memcpy(dest, src, sizeof(ip4_addr_t))
 
#define ip4_addr_copy(dest, src)   ((dest).addr = (src).addr)
 
#define ip4_addr_set(dest, src)
 
#define ip4_addr_set_zero(ipaddr)   ((ipaddr)->addr = 0)
 
#define ip4_addr_set_any(ipaddr)   ((ipaddr)->addr = IPADDR_ANY)
 
#define ip4_addr_set_loopback(ipaddr)   ((ipaddr)->addr = PP_HTONL(IPADDR_LOOPBACK))
 
#define ip4_addr_isloopback(ipaddr)   (((ipaddr)->addr & PP_HTONL(IP_CLASSA_NET)) == PP_HTONL(((u32)IP_LOOPBACKNET) << 24))
 
#define ip4_addr_set_hton(dest, src)
 
#define ip4_addr_set_u32(dest_ipaddr, src_u32)   ((dest_ipaddr)->addr = (src_u32))
 
#define ip4_addr_get_u32(src_ipaddr)   ((src_ipaddr)->addr)
 
#define ip4_addr_get_network(target, host, netmask)   do { ((target)->addr = ((host)->addr) & ((netmask)->addr)); } while(0)
 
#define ip4_addr_netcmp(addr1, addr2, mask)
 
#define ip4_addr_cmp(addr1, addr2)   ((addr1)->addr == (addr2)->addr)
 
#define ip4_addr_isany_val(addr1)   ((addr1).addr == IPADDR_ANY)
 
#define ip4_addr_isany(addr1)   ((addr1) == NULL || ip4_addr_isany_val(*(addr1)))
 
#define ip4_addr_isbroadcast(addr1, netif)   ip4_addr_isbroadcast_u32((addr1)->addr, netif)
 
#define ip_addr_netmask_valid(netmask)   ip4_addr_netmask_valid((netmask)->addr)
 
#define ip4_addr_ismulticast(addr1)   (((addr1)->addr & PP_HTONL(0xf0000000UL)) == PP_HTONL(0xe0000000UL))
 
#define ip4_addr_islinklocal(addr1)   (((addr1)->addr & PP_HTONL(0xffff0000UL)) == PP_HTONL(0xa9fe0000UL))
 
#define ip4_addr_debug_print_parts(debug, a, b, c, d)    LWIP_DEBUGF(debug, ("%" U16_F ".%" U16_F ".%" U16_F ".%" U16_F, a, b, c, d))
 
#define ip4_addr_debug_print(debug, ipaddr)
 
#define ip4_addr_debug_print_val(debug, ipaddr)
 
#define ip4_addr1(ipaddr)   (((const u8*)(&(ipaddr)->addr))[0])
 
#define ip4_addr2(ipaddr)   (((const u8*)(&(ipaddr)->addr))[1])
 
#define ip4_addr3(ipaddr)   (((const u8*)(&(ipaddr)->addr))[2])
 
#define ip4_addr4(ipaddr)   (((const u8*)(&(ipaddr)->addr))[3])
 
#define ip4_addr1_16(ipaddr)   ((u16)ip4_addr1(ipaddr))
 
#define ip4_addr2_16(ipaddr)   ((u16)ip4_addr2(ipaddr))
 
#define ip4_addr3_16(ipaddr)   ((u16)ip4_addr3(ipaddr))
 
#define ip4_addr4_16(ipaddr)   ((u16)ip4_addr4(ipaddr))
 
#define IP4ADDR_STRLEN_MAX   16
 
#define IP6_ADDR_PART(ip6addr, index, a, b, c, d)
 
#define IP6_ADDR(ip6addr, idx0, idx1, idx2, idx3)
 
#define IP6_ADDR_BLOCK1(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xffff))
 
#define IP6_ADDR_BLOCK2(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[0])) & 0xffff))
 
#define IP6_ADDR_BLOCK3(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[1]) >> 16) & 0xffff))
 
#define IP6_ADDR_BLOCK4(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[1])) & 0xffff))
 
#define IP6_ADDR_BLOCK5(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[2]) >> 16) & 0xffff))
 
#define IP6_ADDR_BLOCK6(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[2])) & 0xffff))
 
#define IP6_ADDR_BLOCK7(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[3]) >> 16) & 0xffff))
 
#define IP6_ADDR_BLOCK8(ip6addr)   ((u16)((lwip_htonl((ip6addr)->addr[3])) & 0xffff))
 
#define ip6_addr_copy(dest, src)
 
#define ip6_addr_set(dest, src)
 
#define ip6_addr_set_zero(ip6addr)
 
#define ip6_addr_set_any(ip6addr)   ip6_addr_set_zero(ip6addr)
 
#define ip6_addr_set_loopback(ip6addr)
 
#define ip6_addr_set_hton(dest, src)
 
#define ip6_addr_netcmp(addr1, addr2)
 
#define ip6_addr_cmp(addr1, addr2)
 
#define ip6_get_subnet_id(ip6addr)   (lwip_htonl((ip6addr)->addr[2]) & 0x0000ffffUL)
 
#define ip6_addr_isany_val(ip6addr)
 
#define ip6_addr_isany(ip6addr)   (((ip6addr) == NULL) || ip6_addr_isany_val(*(ip6addr)))
 
#define ip6_addr_isloopback(ip6addr)
 
#define ip6_addr_isglobal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xe0000000UL)) == PP_HTONL(0x20000000UL))
 
#define ip6_addr_islinklocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfe800000UL))
 
#define ip6_addr_issitelocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfec00000UL))
 
#define ip6_addr_isuniquelocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xfe000000UL)) == PP_HTONL(0xfc000000UL))
 
#define ip6_addr_isipv6mappedipv4(ip6addr)   (((ip6addr)->addr[0] == 0) && ((ip6addr)->addr[1] == 0) && (((ip6addr)->addr[2]) == PP_HTONL(0x0000FFFFUL)))
 
#define ip6_addr_ismulticast(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xff000000UL)) == PP_HTONL(0xff000000UL))
 
#define ip6_addr_multicast_transient_flag(ip6addr)   ((ip6addr)->addr[0] & PP_HTONL(0x00100000UL))
 
#define ip6_addr_multicast_prefix_flag(ip6addr)   ((ip6addr)->addr[0] & PP_HTONL(0x00200000UL))
 
#define ip6_addr_multicast_rendezvous_flag(ip6addr)   ((ip6addr)->addr[0] & PP_HTONL(0x00400000UL))
 
#define ip6_addr_multicast_scope(ip6addr)   ((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xf)
 
#define IP6_MULTICAST_SCOPE_RESERVED   0x0
 
#define IP6_MULTICAST_SCOPE_RESERVED0   0x0
 
#define IP6_MULTICAST_SCOPE_INTERFACE_LOCAL   0x1
 
#define IP6_MULTICAST_SCOPE_LINK_LOCAL   0x2
 
#define IP6_MULTICAST_SCOPE_RESERVED3   0x3
 
#define IP6_MULTICAST_SCOPE_ADMIN_LOCAL   0x4
 
#define IP6_MULTICAST_SCOPE_SITE_LOCAL   0x5
 
#define IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL   0x8
 
#define IP6_MULTICAST_SCOPE_GLOBAL   0xe
 
#define IP6_MULTICAST_SCOPE_RESERVEDF   0xf
 
#define ip6_addr_ismulticast_iflocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff010000UL))
 
#define ip6_addr_ismulticast_linklocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff020000UL))
 
#define ip6_addr_ismulticast_adminlocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff040000UL))
 
#define ip6_addr_ismulticast_sitelocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff050000UL))
 
#define ip6_addr_ismulticast_orglocal(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff080000UL))
 
#define ip6_addr_ismulticast_global(ip6addr)   (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff0e0000UL))
 
#define ip6_addr_isallnodes_iflocal(ip6addr)
 
#define ip6_addr_isallnodes_linklocal(ip6addr)
 
#define ip6_addr_set_allnodes_linklocal(ip6addr)
 
#define ip6_addr_isallrouters_linklocal(ip6addr)
 
#define ip6_addr_set_allrouters_linklocal(ip6addr)
 
#define ip6_addr_issolicitednode(ip6addr)
 
#define ip6_addr_set_solicitednode(ip6addr, if_id)
 
#define ip6_addr_cmp_solicitednode(ip6addr, sn_addr)
 
#define IP6_ADDR_INVALID   0x00
 
#define IP6_ADDR_TENTATIVE   0x08
 
#define IP6_ADDR_TENTATIVE_1   0x09 /* 1 probe sent */
 
#define IP6_ADDR_TENTATIVE_2   0x0a /* 2 probes sent */
 
#define IP6_ADDR_TENTATIVE_3   0x0b /* 3 probes sent */
 
#define IP6_ADDR_TENTATIVE_4   0x0c /* 4 probes sent */
 
#define IP6_ADDR_TENTATIVE_5   0x0d /* 5 probes sent */
 
#define IP6_ADDR_TENTATIVE_6   0x0e /* 6 probes sent */
 
#define IP6_ADDR_TENTATIVE_7   0x0f /* 7 probes sent */
 
#define IP6_ADDR_VALID   0x10 /* This bit marks an address as valid (preferred or deprecated) */
 
#define IP6_ADDR_PREFERRED   0x30
 
#define IP6_ADDR_DEPRECATED   0x10 /* Same as VALID (valid but not preferred) */
 
#define IP6_ADDR_TENTATIVE_COUNT_MASK   0x07 /* 1-7 probes sent */
 
#define ip6_addr_isinvalid(addr_state)   (addr_state == IP6_ADDR_INVALID)
 
#define ip6_addr_istentative(addr_state)   (addr_state & IP6_ADDR_TENTATIVE)
 
#define ip6_addr_isvalid(addr_state)   (addr_state & IP6_ADDR_VALID) /* Include valid, preferred, and deprecated. */
 
#define ip6_addr_ispreferred(addr_state)   (addr_state == IP6_ADDR_PREFERRED)
 
#define ip6_addr_isdeprecated(addr_state)   (addr_state == IP6_ADDR_DEPRECATED)
 
#define ip6_addr_debug_print_parts(debug, a, b, c, d, e, f, g, h)
 
#define ip6_addr_debug_print(debug, ipaddr)
 
#define ip6_addr_debug_print_val(debug, ipaddr)
 
#define IP6ADDR_STRLEN_MAX   46
 
#define IP_ADDR_PCB_VERSION_MATCH(addr, pcb)   1
 
#define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr)   1
 
#define IPADDR4_INIT(u32val)   { u32val }
 
#define IP_IS_V4_VAL(ipaddr)   1
 
#define IP_IS_V6_VAL(ipaddr)   0
 
#define IP_IS_V4(ipaddr)   1
 
#define IP_IS_V6(ipaddr)   0
 
#define IP_IS_ANY_TYPE_VAL(ipaddr)   0
 
#define IP_SET_TYPE_VAL(ipaddr, iptype)
 
#define IP_SET_TYPE(ipaddr, iptype)
 
#define IP_GET_TYPE(ipaddr)   IPADDR_TYPE_V4
 
#define ip_2_ip4(ipaddr)   (ipaddr)
 
#define IP_ADDR4(ipaddr, a, b, c, d)   IP4_ADDR(ipaddr,a,b,c,d)
 
#define ip_addr_copy(dest, src)   ip4_addr_copy(dest, src)
 
#define ip_addr_copy_from_ip4(dest, src)   ip4_addr_copy(dest, src)
 
#define ip_addr_set_ip4_u32(ipaddr, val)   ip4_addr_set_u32(ip_2_ip4(ipaddr), val)
 
#define ip_addr_get_ip4_u32(ipaddr)   ip4_addr_get_u32(ip_2_ip4(ipaddr))
 
#define ip_addr_set(dest, src)   ip4_addr_set(dest, src)
 
#define ip_addr_set_ipaddr(dest, src)   ip4_addr_set(dest, src)
 
#define ip_addr_set_zero(ipaddr)   ip4_addr_set_zero(ipaddr)
 
#define ip_addr_set_zero_ip4(ipaddr)   ip4_addr_set_zero(ipaddr)
 
#define ip_addr_set_any(is_ipv6, ipaddr)   ip4_addr_set_any(ipaddr)
 
#define ip_addr_set_loopback(is_ipv6, ipaddr)   ip4_addr_set_loopback(ipaddr)
 
#define ip_addr_set_hton(dest, src)   ip4_addr_set_hton(dest, src)
 
#define ip_addr_get_network(target, host, mask)   ip4_addr_get_network(target, host, mask)
 
#define ip_addr_netcmp(addr1, addr2, mask)   ip4_addr_netcmp(addr1, addr2, mask)
 
#define ip_addr_cmp(addr1, addr2)   ip4_addr_cmp(addr1, addr2)
 
#define ip_addr_isany(ipaddr)   ip4_addr_isany(ipaddr)
 
#define ip_addr_isany_val(ipaddr)   ip4_addr_isany_val(ipaddr)
 
#define ip_addr_isloopback(ipaddr)   ip4_addr_isloopback(ipaddr)
 
#define ip_addr_islinklocal(ipaddr)   ip4_addr_islinklocal(ipaddr)
 
#define ip_addr_isbroadcast(addr, netif)   ip4_addr_isbroadcast(addr, netif)
 
#define ip_addr_ismulticast(ipaddr)   ip4_addr_ismulticast(ipaddr)
 
#define ip_addr_debug_print(debug, ipaddr)   ip4_addr_debug_print(debug, ipaddr)
 
#define ip_addr_debug_print_val(debug, ipaddr)   ip4_addr_debug_print_val(debug, ipaddr)
 
#define ipaddr_ntoa(ipaddr)   ip4addr_ntoa(ipaddr)
 
#define ipaddr_ntoa_r(ipaddr, buf, buflen)   ip4addr_ntoa_r(ipaddr, buf, buflen)
 
#define ipaddr_aton(cp, addr)   ip4addr_aton(cp, addr)
 
#define IPADDR_STRLEN_MAX   IP4ADDR_STRLEN_MAX
 
#define IP_ADDR_ANY   IP4_ADDR_ANY
 
#define IP4_ADDR_ANY   (&ip_addr_any)
 
#define IP4_ADDR_ANY4   (ip_2_ip4(&ip_addr_any))
 
#define IP_ADDR_BROADCAST   (&ip_addr_broadcast)
 
#define IP4_ADDR_BROADCAST   (ip_2_ip4(&ip_addr_broadcast))
 
#define IP_ANY_TYPE   IP_ADDR_ANY
 
#define NETIF_MAX_HWADDR_LEN   6U
 
#define NETIF_FLAG_UP   0x01U
 
#define NETIF_FLAG_BROADCAST   0x02U
 
#define NETIF_FLAG_LINK_UP   0x04U
 
#define NETIF_FLAG_ETHARP   0x08U
 
#define NETIF_FLAG_ETHERNET   0x10U
 
#define NETIF_FLAG_IGMP   0x20U
 
#define NETIF_FLAG_MLD6   0x40U
 
#define netif_set_client_data(netif, id, data)   netif_get_client_data(netif, id) = (data)
 
#define netif_get_client_data(netif, id)   (netif)->client_data[(id)]
 
#define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags)
 
#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag)
 
#define netif_ip4_addr(netif)   ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr)))
 
#define netif_ip4_netmask(netif)   ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask)))
 
#define netif_ip4_gw(netif)   ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw)))
 
#define netif_ip_addr4(netif)   ((const ip_addr_t*)&((netif)->ip_addr))
 
#define netif_ip_netmask4(netif)   ((const ip_addr_t*)&((netif)->netmask))
 
#define netif_ip_gw4(netif)   ((const ip_addr_t*)&((netif)->gw))
 
#define netif_is_up(netif)   (((netif)->flags & NETIF_FLAG_UP) ? (u8)1 : (u8)0)
 
#define netif_is_link_up(netif)   (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8)1 : (u8)0)
 
#define NETIF_SET_HWADDRHINT(netif, hint)
 
#define s6_addr   un.u8_addr
 
#define INADDR_NONE   IPADDR_NONE
 
#define INADDR_LOOPBACK   IPADDR_LOOPBACK
 
#define INADDR_ANY   IPADDR_ANY
 
#define INADDR_BROADCAST   IPADDR_BROADCAST
 
#define SIN_ZERO_LEN   8
 
#define SOCKLEN_T_DEFINED   1
 
#define SOCK_STREAM   1
 
#define SOCK_DGRAM   2
 
#define SOCK_RAW   3
 
#define SO_REUSEADDR   0x0004 /* Allow local address reuse */
 
#define SO_KEEPALIVE   0x0008 /* keep connections alive */
 
#define SO_BROADCAST   0x0020 /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */
 
#define SO_DEBUG   0x0001 /* Unimplemented: turn on debugging info recording */
 
#define SO_ACCEPTCONN   0x0002 /* socket has had listen() */
 
#define SO_DONTROUTE   0x0010 /* Unimplemented: just use interface addresses */
 
#define SO_USELOOPBACK   0x0040 /* Unimplemented: bypass hardware when possible */
 
#define SO_LINGER   0x0080 /* linger on close if data present */
 
#define SO_DONTLINGER   ((int)(~SO_LINGER))
 
#define SO_OOBINLINE   0x0100 /* Unimplemented: leave received OOB data in line */
 
#define SO_REUSEPORT   0x0200 /* Unimplemented: allow local address & port reuse */
 
#define SO_SNDBUF   0x1001 /* Unimplemented: send buffer size */
 
#define SO_RCVBUF   0x1002 /* receive buffer size */
 
#define SO_SNDLOWAT   0x1003 /* Unimplemented: send low-water mark */
 
#define SO_RCVLOWAT   0x1004 /* Unimplemented: receive low-water mark */
 
#define SO_SNDTIMEO   0x1005 /* send timeout */
 
#define SO_RCVTIMEO   0x1006 /* receive timeout */
 
#define SO_ERROR   0x1007 /* get error status and clear */
 
#define SO_TYPE   0x1008 /* get socket type */
 
#define SO_CONTIMEO   0x1009 /* Unimplemented: connect timeout */
 
#define SO_NO_CHECK   0x100a /* don't create UDP checksum */
 
#define SOL_SOCKET   0xfff /* options for socket level */
 
#define AF_UNSPEC   0
 
#define AF_INET   2
 
#define AF_INET6   AF_UNSPEC
 
#define PF_INET   AF_INET
 
#define PF_INET6   AF_INET6
 
#define PF_UNSPEC   AF_UNSPEC
 
#define IPPROTO_IP   0
 
#define IPPROTO_ICMP   1
 
#define IPPROTO_TCP   6
 
#define IPPROTO_UDP   17
 
#define IPPROTO_UDPLITE   136
 
#define IPPROTO_RAW   255
 
#define MSG_PEEK   0x01 /* Peeks at an incoming message */
 
#define MSG_WAITALL   0x02 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */
 
#define MSG_OOB   0x04 /* Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */
 
#define MSG_DONTWAIT   0x08 /* Nonblocking i/o for this operation only */
 
#define MSG_MORE   0x10 /* Sender will send more */
 
#define IP_TOS   1
 
#define IP_TTL   2
 
#define TCP_NODELAY   0x01 /* don't delay send to coalesce packets */
 
#define TCP_KEEPALIVE   0x02 /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */
 
#define TCP_KEEPIDLE   0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */
 
#define TCP_KEEPINTVL   0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */
 
#define TCP_KEEPCNT   0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */
 
#define IPTOS_TOS_MASK   0x1E
 
#define IPTOS_TOS(tos)   ((tos) & IPTOS_TOS_MASK)
 
#define IPTOS_LOWDELAY   0x10
 
#define IPTOS_THROUGHPUT   0x08
 
#define IPTOS_RELIABILITY   0x04
 
#define IPTOS_LOWCOST   0x02
 
#define IPTOS_MINCOST   IPTOS_LOWCOST
 
#define IPTOS_PREC_MASK   0xe0
 
#define IPTOS_PREC(tos)   ((tos) & IPTOS_PREC_MASK)
 
#define IPTOS_PREC_NETCONTROL   0xe0
 
#define IPTOS_PREC_INTERNETCONTROL   0xc0
 
#define IPTOS_PREC_CRITIC_ECP   0xa0
 
#define IPTOS_PREC_FLASHOVERRIDE   0x80
 
#define IPTOS_PREC_FLASH   0x60
 
#define IPTOS_PREC_IMMEDIATE   0x40
 
#define IPTOS_PREC_PRIORITY   0x20
 
#define IPTOS_PREC_ROUTINE   0x00
 
#define IOCPARM_MASK   0x7fU /* parameters must be < 128 bytes */
 
#define IOC_VOID   0x20000000UL /* no parameters */
 
#define IOC_OUT   0x40000000UL /* copy out parameters */
 
#define IOC_IN   0x80000000UL /* copy in parameters */
 
#define IOC_INOUT   (IOC_IN|IOC_OUT)
 
#define _IO(x, y)   (IOC_VOID|((x)<<8)|(y))
 
#define _IOR(x, y, t)   (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
 
#define _IOW(x, y, t)   (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
 
#define FIONREAD   _IOR('f', 127, unsigned long) /* get # bytes to read */
 
#define FIONBIO   _IOW('f', 126, unsigned long) /* set/clear non-blocking i/o */
 
#define SIOCSHIWAT   _IOW('s', 0, unsigned long) /* set high watermark */
 
#define SIOCGHIWAT   _IOR('s', 1, unsigned long) /* get high watermark */
 
#define SIOCSLOWAT   _IOW('s', 2, unsigned long) /* set low watermark */
 
#define SIOCGLOWAT   _IOR('s', 3, unsigned long) /* get low watermark */
 
#define SIOCATMARK   _IOR('s', 7, unsigned long) /* at oob mark? */
 
#define F_GETFL   3
 
#define F_SETFL   4
 
#define O_NONBLOCK   1 /* nonblocking I/O */
 
#define O_NDELAY   1 /* same as O_NONBLOCK, for compatibility */
 
#define SHUT_RD   0
 
#define SHUT_WR   1
 
#define SHUT_RDWR   2
 
#define FD_SETSIZE   MEMP_NUM_NETCONN
 
#define FDSETSAFESET(n, code)
 
#define FDSETSAFEGET(n, code)
 
#define FD_SET(n, p)   FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] |= (1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))
 
#define FD_CLR(n, p)   FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] &= ~(1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))
 
#define FD_ISSET(n, p)   FDSETSAFEGET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] & (1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))
 
#define FD_ZERO(p)   memset((void*)(p), 0, sizeof(*(p)))
 
#define DNS_TMR_INTERVAL   1000
 
#define LWIP_DNS_ADDRTYPE_IPV4   0
 
#define LWIP_DNS_ADDRTYPE_IPV6   1
 
#define LWIP_DNS_ADDRTYPE_IPV4_IPV6   2 /* try to resolve IPv4 first, try IPv6 if IPv4 fails only */
 
#define LWIP_DNS_ADDRTYPE_IPV6_IPV4   3 /* try to resolve IPv6 first, try IPv4 if IPv6 fails only */
 
#define LWIP_DNS_ADDRTYPE_DEFAULT   LWIP_DNS_ADDRTYPE_IPV4
 
#define LWIP_DNS_API_DECLARE_H_ERRNO   1
 
#define LWIP_DNS_API_DEFINE_ERRORS   1
 
#define LWIP_DNS_API_DEFINE_FLAGS   1
 
#define LWIP_DNS_API_DECLARE_STRUCTS   1
 
#define EAI_NONAME   200
 
#define EAI_SERVICE   201
 
#define EAI_FAIL   202
 
#define EAI_MEMORY   203
 
#define EAI_FAMILY   204
 
#define HOST_NOT_FOUND   210
 
#define NO_DATA   211
 
#define NO_RECOVERY   212
 
#define TRY_AGAIN   213
 
#define AI_PASSIVE   0x01
 
#define AI_CANONNAME   0x02
 
#define AI_NUMERICHOST   0x04
 
#define AI_NUMERICSERV   0x08
 
#define AI_V4MAPPED   0x10
 
#define AI_ALL   0x20
 
#define AI_ADDRCONFIG   0x40
 
#define h_addr   h_addr_list[0] /* for backward compatibility */
 
#define NETDB_ELEM_SIZE   (sizeof(struct addrinfo) + sizeof(struct sockaddr_storage) + DNS_MAX_NAME_LENGTH + 1)
 
#define htons(x)   lwip_htons(x)
 
#define ntohs(x)   lwip_ntohs(x)
 
#define htonl(x)   lwip_htonl(x)
 
#define ntohl(x)   lwip_ntohl(x)
 
#define lwip_htons(x)   PP_HTONS(x)
 
#define lwip_ntohs(x)   PP_NTOHS(x)
 
#define lwip_htonl(x)   PP_HTONL(x)
 
#define lwip_ntohl(x)   PP_NTOHL(x)
 
#define PP_HTONS(x)   ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
 
#define PP_NTOHS(x)   PP_HTONS(x)
 
#define PP_HTONL(x)
 
#define PP_NTOHL(x)   PP_HTONL(x)
 

Typedefs

typedef signed char err_t
 
typedef struct ip4_addr_packed ip4_addr_p_t
 
typedef struct ip6_addr_packed ip6_addr_p_t
 
typedef ip4_addr_t ip_addr_t
 
typedef err_t(* netif_init_fn) (struct netif *netif)
 
typedef err_t(* netif_input_fn) (struct pbuf *p, struct netif *inp)
 
typedef err_t(* netif_output_fn) (struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr)
 
typedef err_t(* netif_linkoutput_fn) (struct netif *netif, struct pbuf *p)
 
typedef void(* netif_status_callback_fn) (struct netif *netif)
 
typedef u8 sa_family_t
 
typedef u16 in_port_t
 
typedef int socklen_t
 
typedef void(* dns_found_callback) (const char *name, const ip_addr_t *ipaddr, void *callback_arg)
 

Enumerations

enum  pbuf_layer {
  PBUF_TRANSPORT ,
  PBUF_IP ,
  PBUF_LINK ,
  PBUF_RAW_TX ,
  PBUF_RAW
}
 
enum  pbuf_type {
  PBUF_RAM ,
  PBUF_ROM ,
  PBUF_REF ,
  PBUF_POOL
}
 
enum  lwip_ip_addr_type {
  IPADDR_TYPE_V4 = 0U ,
  IPADDR_TYPE_V6 = 6U ,
  IPADDR_TYPE_ANY = 46U
}
 
enum  lwip_internal_netif_client_data_index {
  LWIP_NETIF_CLIENT_DATA_INDEX_DHCP ,
  LWIP_NETIF_CLIENT_DATA_INDEX_MAX
}
 
enum  netif_mac_filter_action {
  NETIF_DEL_MAC_FILTER = 0 ,
  NETIF_ADD_MAC_FILTER = 1
}
 
enum  dhcp_state_enum_t {
  DHCP_STATE_OFF = 0 ,
  DHCP_STATE_REQUESTING = 1 ,
  DHCP_STATE_INIT = 2 ,
  DHCP_STATE_REBOOTING = 3 ,
  DHCP_STATE_REBINDING = 4 ,
  DHCP_STATE_RENEWING = 5 ,
  DHCP_STATE_SELECTING = 6 ,
  DHCP_STATE_INFORMING = 7 ,
  DHCP_STATE_CHECKING = 8 ,
  DHCP_STATE_PERMANENT = 9 ,
  DHCP_STATE_BOUND = 10 ,
  DHCP_STATE_RELEASING = 11 ,
  DHCP_STATE_BACKING_OFF = 12
}
 

Functions

u8 netif_alloc_client_data_id (void)
 

Variables

const ip_addr_t ip_addr_any
 
const ip_addr_t ip_addr_broadcast
 
struct netifnetif_list
 
struct netifnetif_default
 

Detailed Description

Common definitions file for the LWIP v2.0.0 port.

Definition in file tcpip.h.

Macro Definition Documentation

◆ _IO

#define _IO (   x,
  y 
)    (IOC_VOID|((x)<<8)|(y))

Definition at line 1540 of file tcpip.h.

◆ _IOR

#define _IOR (   x,
  y,
 
)    (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))

Definition at line 1542 of file tcpip.h.

◆ _IOW

#define _IOW (   x,
  y,
 
)    (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))

Definition at line 1544 of file tcpip.h.

◆ AF_INET

#define AF_INET   2

Definition at line 1393 of file tcpip.h.

◆ AF_INET6

#define AF_INET6   AF_UNSPEC

Definition at line 1397 of file tcpip.h.

◆ AF_UNSPEC

#define AF_UNSPEC   0

Definition at line 1392 of file tcpip.h.

◆ AI_ADDRCONFIG

#define AI_ADDRCONFIG   0x40

Definition at line 1698 of file tcpip.h.

◆ AI_ALL

#define AI_ALL   0x20

Definition at line 1697 of file tcpip.h.

◆ AI_CANONNAME

#define AI_CANONNAME   0x02

Definition at line 1693 of file tcpip.h.

◆ AI_NUMERICHOST

#define AI_NUMERICHOST   0x04

Definition at line 1694 of file tcpip.h.

◆ AI_NUMERICSERV

#define AI_NUMERICSERV   0x08

Definition at line 1695 of file tcpip.h.

◆ AI_PASSIVE

#define AI_PASSIVE   0x01

Definition at line 1692 of file tcpip.h.

◆ AI_V4MAPPED

#define AI_V4MAPPED   0x10

Definition at line 1696 of file tcpip.h.

◆ DNS_MAX_SERVERS

#define DNS_MAX_SERVERS   2

Definition at line 61 of file tcpip.h.

◆ DNS_TMR_INTERVAL

#define DNS_TMR_INTERVAL   1000

DNS timer period

Definition at line 1614 of file tcpip.h.

◆ EAI_FAIL

#define EAI_FAIL   202

Definition at line 1680 of file tcpip.h.

◆ EAI_FAMILY

#define EAI_FAMILY   204

Definition at line 1682 of file tcpip.h.

◆ EAI_MEMORY

#define EAI_MEMORY   203

Definition at line 1681 of file tcpip.h.

◆ EAI_NONAME

#define EAI_NONAME   200

Errors used by the DNS API functions, h_errno can be one of them

Definition at line 1678 of file tcpip.h.

◆ EAI_SERVICE

#define EAI_SERVICE   201

Definition at line 1679 of file tcpip.h.

◆ F_GETFL

#define F_GETFL   3

Definition at line 1565 of file tcpip.h.

◆ F_SETFL

#define F_SETFL   4

Definition at line 1568 of file tcpip.h.

◆ FD_CLR

#define FD_CLR (   n,
 
)    FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] &= ~(1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))

Definition at line 1597 of file tcpip.h.

◆ FD_ISSET

#define FD_ISSET (   n,
 
)    FDSETSAFEGET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] & (1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))

Definition at line 1598 of file tcpip.h.

◆ FD_SET

#define FD_SET (   n,
 
)    FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] |= (1 << (((n)-LWIP_SOCKET_OFFSET) & 7)))

Definition at line 1596 of file tcpip.h.

◆ FD_SETSIZE

#define FD_SETSIZE   MEMP_NUM_NETCONN

Definition at line 1590 of file tcpip.h.

◆ FD_ZERO

#define FD_ZERO (   p)    memset((void*)(p), 0, sizeof(*(p)))

Definition at line 1599 of file tcpip.h.

◆ FDSETSAFEGET

#define FDSETSAFEGET (   n,
  code 
)
Value:
(((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0) ?\
(code) : 0)
#define MEMP_NUM_NETCONN
Definition: tcpip.h:49
#define LWIP_SOCKET_OFFSET
Definition: tcpip.h:59

Definition at line 1594 of file tcpip.h.

◆ FDSETSAFESET

#define FDSETSAFESET (   n,
  code 
)
Value:
do { \
if (((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0)) { \
code; }} while(0)

Definition at line 1591 of file tcpip.h.

◆ FIONBIO

#define FIONBIO   _IOW('f', 126, unsigned long) /* set/clear non-blocking i/o */

Definition at line 1551 of file tcpip.h.

◆ FIONREAD

#define FIONREAD   _IOR('f', 127, unsigned long) /* get # bytes to read */

Definition at line 1548 of file tcpip.h.

◆ h_addr

#define h_addr   h_addr_list[0] /* for backward compatibility */

Definition at line 1710 of file tcpip.h.

◆ HOST_NOT_FOUND

#define HOST_NOT_FOUND   210

Definition at line 1684 of file tcpip.h.

◆ htonl

#define htonl (   x)    lwip_htonl(x)

Definition at line 1730 of file tcpip.h.

◆ htons

#define htons (   x)    lwip_htons(x)

Definition at line 1728 of file tcpip.h.

◆ IF__NETIF_CHECKSUM_ENABLED

#define IF__NETIF_CHECKSUM_ENABLED (   netif,
  chksumflag 
)

Definition at line 1189 of file tcpip.h.

◆ INADDR_ANY

#define INADDR_ANY   IPADDR_ANY

0.0.0.0

Definition at line 1294 of file tcpip.h.

◆ INADDR_BROADCAST

#define INADDR_BROADCAST   IPADDR_BROADCAST

255.255.255.255

Definition at line 1296 of file tcpip.h.

◆ INADDR_LOOPBACK

#define INADDR_LOOPBACK   IPADDR_LOOPBACK

127.0.0.1

Definition at line 1292 of file tcpip.h.

◆ INADDR_NONE

#define INADDR_NONE   IPADDR_NONE

255.255.255.255

Definition at line 1290 of file tcpip.h.

◆ IOC_IN

#define IOC_IN   0x80000000UL /* copy in parameters */

Definition at line 1536 of file tcpip.h.

◆ IOC_INOUT

#define IOC_INOUT   (IOC_IN|IOC_OUT)

Definition at line 1537 of file tcpip.h.

◆ IOC_OUT

#define IOC_OUT   0x40000000UL /* copy out parameters */

Definition at line 1535 of file tcpip.h.

◆ IOC_VOID

#define IOC_VOID   0x20000000UL /* no parameters */

Definition at line 1534 of file tcpip.h.

◆ IOCPARM_MASK

#define IOCPARM_MASK   0x7fU /* parameters must be < 128 bytes */

Definition at line 1533 of file tcpip.h.

◆ IP4_ADDR

#define IP4_ADDR (   ipaddr,
  a,
  b,
  c,
 
)
Value:
(ipaddr)->addr = ((u32)((d) & 0xff) << 24) | \
((u32)((c) & 0xff) << 16) | \
((u32)((b) & 0xff) << 8) | \
(u32)((a) & 0xff)
unsigned int u32
Definition: tamtypes.h:30

Set an IP address given by the four byte-parts. Little-endian version that prevents the use of lwip_htonl.

Definition at line 254 of file tcpip.h.

◆ ip4_addr1

#define ip4_addr1 (   ipaddr)    (((const u8*)(&(ipaddr)->addr))[0])

Definition at line 335 of file tcpip.h.

◆ ip4_addr1_16

#define ip4_addr1_16 (   ipaddr)    ((u16)ip4_addr1(ipaddr))

Definition at line 341 of file tcpip.h.

◆ ip4_addr2

#define ip4_addr2 (   ipaddr)    (((const u8*)(&(ipaddr)->addr))[1])

Definition at line 336 of file tcpip.h.

◆ ip4_addr2_16

#define ip4_addr2_16 (   ipaddr)    ((u16)ip4_addr2(ipaddr))

Definition at line 342 of file tcpip.h.

◆ ip4_addr3

#define ip4_addr3 (   ipaddr)    (((const u8*)(&(ipaddr)->addr))[2])

Definition at line 337 of file tcpip.h.

◆ ip4_addr3_16

#define ip4_addr3_16 (   ipaddr)    ((u16)ip4_addr3(ipaddr))

Definition at line 343 of file tcpip.h.

◆ ip4_addr4

#define ip4_addr4 (   ipaddr)    (((const u8*)(&(ipaddr)->addr))[3])

Definition at line 338 of file tcpip.h.

◆ ip4_addr4_16

#define ip4_addr4_16 (   ipaddr)    ((u16)ip4_addr4(ipaddr))

Definition at line 344 of file tcpip.h.

◆ IP4_ADDR_ANY

#define IP4_ADDR_ANY   (&ip_addr_any)

Can be used as a fixed/const ip_addr_t for the IPv4 wildcard and the broadcast address

Definition at line 847 of file tcpip.h.

◆ IP4_ADDR_ANY4

#define IP4_ADDR_ANY4   (ip_2_ip4(&ip_addr_any))

Can be used as a fixed/const ip4_addr_t for the wildcard and the broadcast address

Definition at line 853 of file tcpip.h.

◆ IP4_ADDR_BROADCAST

#define IP4_ADDR_BROADCAST   (ip_2_ip4(&ip_addr_broadcast))

Definition at line 858 of file tcpip.h.

◆ ip4_addr_cmp

#define ip4_addr_cmp (   addr1,
  addr2 
)    ((addr1)->addr == (addr2)->addr)

Definition at line 306 of file tcpip.h.

◆ ip4_addr_copy

#define ip4_addr_copy (   dest,
  src 
)    ((dest).addr = (src).addr)

Copy IP address - faster than ip4_addr_set: no NULL check

Definition at line 268 of file tcpip.h.

◆ ip4_addr_debug_print

#define ip4_addr_debug_print (   debug,
  ipaddr 
)
Value:
(u16)((ipaddr) != NULL ? ip4_addr1_16(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? ip4_addr2_16(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? ip4_addr3_16(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? ip4_addr4_16(ipaddr) : 0))
#define NULL
Definition: tamtypes.h:91
unsigned short u16
Definition: tamtypes.h:24
#define ip4_addr_debug_print_parts(debug, a, b, c, d)
Definition: tcpip.h:319
#define ip4_addr1_16(ipaddr)
Definition: tcpip.h:341
#define ip4_addr2_16(ipaddr)
Definition: tcpip.h:342
#define ip4_addr3_16(ipaddr)
Definition: tcpip.h:343
#define ip4_addr4_16(ipaddr)
Definition: tcpip.h:344

Definition at line 321 of file tcpip.h.

◆ ip4_addr_debug_print_parts

#define ip4_addr_debug_print_parts (   debug,
  a,
  b,
  c,
 
)     LWIP_DEBUGF(debug, ("%" U16_F ".%" U16_F ".%" U16_F ".%" U16_F, a, b, c, d))

Definition at line 319 of file tcpip.h.

◆ ip4_addr_debug_print_val

#define ip4_addr_debug_print_val (   debug,
  ipaddr 
)
Value:
ip4_addr1_16(&(ipaddr)), \
ip4_addr2_16(&(ipaddr)), \
ip4_addr3_16(&(ipaddr)), \
ip4_addr4_16(&(ipaddr)))

Definition at line 327 of file tcpip.h.

◆ ip4_addr_get_network

#define ip4_addr_get_network (   target,
  host,
  netmask 
)    do { ((target)->addr = ((host)->addr) & ((netmask)->addr)); } while(0)

Get the network address by combining host address with netmask

Definition at line 292 of file tcpip.h.

◆ ip4_addr_get_u32

#define ip4_addr_get_u32 (   src_ipaddr)    ((src_ipaddr)->addr)

IPv4 only: get the IP address as an u32

Definition at line 289 of file tcpip.h.

◆ ip4_addr_isany

#define ip4_addr_isany (   addr1)    ((addr1) == NULL || ip4_addr_isany_val(*(addr1)))

Definition at line 309 of file tcpip.h.

◆ ip4_addr_isany_val

#define ip4_addr_isany_val (   addr1)    ((addr1).addr == IPADDR_ANY)

Definition at line 308 of file tcpip.h.

◆ ip4_addr_isbroadcast

#define ip4_addr_isbroadcast (   addr1,
  netif 
)    ip4_addr_isbroadcast_u32((addr1)->addr, netif)

Definition at line 311 of file tcpip.h.

◆ ip4_addr_islinklocal

#define ip4_addr_islinklocal (   addr1)    (((addr1)->addr & PP_HTONL(0xffff0000UL)) == PP_HTONL(0xa9fe0000UL))

Definition at line 317 of file tcpip.h.

◆ ip4_addr_isloopback

#define ip4_addr_isloopback (   ipaddr)    (((ipaddr)->addr & PP_HTONL(IP_CLASSA_NET)) == PP_HTONL(((u32)IP_LOOPBACKNET) << 24))

Check if an address is in the loopback region

Definition at line 280 of file tcpip.h.

◆ ip4_addr_ismulticast

#define ip4_addr_ismulticast (   addr1)    (((addr1)->addr & PP_HTONL(0xf0000000UL)) == PP_HTONL(0xe0000000UL))

Definition at line 315 of file tcpip.h.

◆ ip4_addr_netcmp

#define ip4_addr_netcmp (   addr1,
  addr2,
  mask 
)
Value:
(((addr1)->addr & \
(mask)->addr) == \
((addr2)->addr & \
(mask)->addr))

Determine if two address are on the same network.

  • addr1 IP address 1
  • addr2 IP address 2
  • mask network identifier mask
    Returns
    !0 if the network identifiers of both address match

Definition at line 302 of file tcpip.h.

◆ ip4_addr_set

#define ip4_addr_set (   dest,
  src 
)
Value:
((dest)->addr = \
((src) == NULL ? 0 : \
(src)->addr))

Safely copy one IP address to another (src may be NULL)

Definition at line 270 of file tcpip.h.

◆ ip4_addr_set_any

#define ip4_addr_set_any (   ipaddr)    ((ipaddr)->addr = IPADDR_ANY)

Set address to IPADDR_ANY (no need for lwip_htonl())

Definition at line 276 of file tcpip.h.

◆ ip4_addr_set_hton

#define ip4_addr_set_hton (   dest,
  src 
)
Value:
((dest)->addr = \
((src) == NULL ? 0:\
lwip_htonl((src)->addr)))

Safely copy one IP address to another and change byte order from host- to network-order.

Definition at line 283 of file tcpip.h.

◆ ip4_addr_set_loopback

#define ip4_addr_set_loopback (   ipaddr)    ((ipaddr)->addr = PP_HTONL(IPADDR_LOOPBACK))

Set address to loopback address

Definition at line 278 of file tcpip.h.

◆ ip4_addr_set_u32

#define ip4_addr_set_u32 (   dest_ipaddr,
  src_u32 
)    ((dest_ipaddr)->addr = (src_u32))

IPv4 only: set the IP address given as an u32

Definition at line 287 of file tcpip.h.

◆ ip4_addr_set_zero

#define ip4_addr_set_zero (   ipaddr)    ((ipaddr)->addr = 0)

Set complete address to zero

Definition at line 274 of file tcpip.h.

◆ IP4ADDR_STRLEN_MAX

#define IP4ADDR_STRLEN_MAX   16

Definition at line 346 of file tcpip.h.

◆ IP6_ADDR

#define IP6_ADDR (   ip6addr,
  idx0,
  idx1,
  idx2,
  idx3 
)
Value:
do { \
(ip6addr)->addr[0] = idx0; \
(ip6addr)->addr[1] = idx1; \
(ip6addr)->addr[2] = idx2; \
(ip6addr)->addr[3] = idx3; } while(0)

Set a full IPv6 address by passing the 4 u32 indices in network byte order (use PP_HTONL() for constants)

Definition at line 369 of file tcpip.h.

◆ IP6_ADDR_BLOCK1

#define IP6_ADDR_BLOCK1 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xffff))

Access address in 16-bit block

Definition at line 376 of file tcpip.h.

◆ IP6_ADDR_BLOCK2

#define IP6_ADDR_BLOCK2 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[0])) & 0xffff))

Access address in 16-bit block

Definition at line 378 of file tcpip.h.

◆ IP6_ADDR_BLOCK3

#define IP6_ADDR_BLOCK3 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[1]) >> 16) & 0xffff))

Access address in 16-bit block

Definition at line 380 of file tcpip.h.

◆ IP6_ADDR_BLOCK4

#define IP6_ADDR_BLOCK4 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[1])) & 0xffff))

Access address in 16-bit block

Definition at line 382 of file tcpip.h.

◆ IP6_ADDR_BLOCK5

#define IP6_ADDR_BLOCK5 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[2]) >> 16) & 0xffff))

Access address in 16-bit block

Definition at line 384 of file tcpip.h.

◆ IP6_ADDR_BLOCK6

#define IP6_ADDR_BLOCK6 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[2])) & 0xffff))

Access address in 16-bit block

Definition at line 386 of file tcpip.h.

◆ IP6_ADDR_BLOCK7

#define IP6_ADDR_BLOCK7 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[3]) >> 16) & 0xffff))

Access address in 16-bit block

Definition at line 388 of file tcpip.h.

◆ IP6_ADDR_BLOCK8

#define IP6_ADDR_BLOCK8 (   ip6addr)    ((u16)((lwip_htonl((ip6addr)->addr[3])) & 0xffff))

Access address in 16-bit block

Definition at line 390 of file tcpip.h.

◆ ip6_addr_cmp

#define ip6_addr_cmp (   addr1,
  addr2 
)
Value:
(((addr1)->addr[0] == (addr2)->addr[0]) && \
((addr1)->addr[1] == (addr2)->addr[1]) && \
((addr1)->addr[2] == (addr2)->addr[2]) && \
((addr1)->addr[3] == (addr2)->addr[3]))

Definition at line 434 of file tcpip.h.

◆ ip6_addr_cmp_solicitednode

#define ip6_addr_cmp_solicitednode (   ip6addr,
  sn_addr 
)
Value:
(((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \
((ip6addr)->addr[1] == 0) && \
((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)) && \
((ip6addr)->addr[3] == (PP_HTONL(0xff000000UL) | (sn_addr)->addr[3])))
#define PP_HTONL(x)
Definition: tcpip.h:1743

Definition at line 517 of file tcpip.h.

◆ ip6_addr_copy

#define ip6_addr_copy (   dest,
  src 
)
Value:
do{(dest).addr[0] = (src).addr[0]; \
(dest).addr[1] = (src).addr[1]; \
(dest).addr[2] = (src).addr[2]; \
(dest).addr[3] = (src).addr[3];}while(0)

Copy IPv6 address - faster than ip6_addr_set: no NULL check

Definition at line 393 of file tcpip.h.

◆ ip6_addr_debug_print

#define ip6_addr_debug_print (   debug,
  ipaddr 
)
Value:
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK1(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK2(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK3(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK4(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK5(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK6(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK7(ipaddr) : 0), \
(u16)((ipaddr) != NULL ? IP6_ADDR_BLOCK8(ipaddr) : 0))
#define IP6_ADDR_BLOCK6(ip6addr)
Definition: tcpip.h:386
#define IP6_ADDR_BLOCK4(ip6addr)
Definition: tcpip.h:382
#define ip6_addr_debug_print_parts(debug, a, b, c, d, e, f, g, h)
Definition: tcpip.h:544
#define IP6_ADDR_BLOCK5(ip6addr)
Definition: tcpip.h:384
#define IP6_ADDR_BLOCK3(ip6addr)
Definition: tcpip.h:380
#define IP6_ADDR_BLOCK2(ip6addr)
Definition: tcpip.h:378
#define IP6_ADDR_BLOCK7(ip6addr)
Definition: tcpip.h:388
#define IP6_ADDR_BLOCK1(ip6addr)
Definition: tcpip.h:376
#define IP6_ADDR_BLOCK8(ip6addr)
Definition: tcpip.h:390

Definition at line 547 of file tcpip.h.

◆ ip6_addr_debug_print_parts

#define ip6_addr_debug_print_parts (   debug,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
 
)
Value:
LWIP_DEBUGF(debug, ("%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F, \
a, b, c, d, e, f, g, h))
#define X16_F
Definition: cc.h:41

Definition at line 544 of file tcpip.h.

◆ ip6_addr_debug_print_val

#define ip6_addr_debug_print_val (   debug,
  ipaddr 
)
Value:
IP6_ADDR_BLOCK1(&(ipaddr)), \
IP6_ADDR_BLOCK2(&(ipaddr)), \
IP6_ADDR_BLOCK3(&(ipaddr)), \
IP6_ADDR_BLOCK4(&(ipaddr)), \
IP6_ADDR_BLOCK5(&(ipaddr)), \
IP6_ADDR_BLOCK6(&(ipaddr)), \
IP6_ADDR_BLOCK7(&(ipaddr)), \
IP6_ADDR_BLOCK8(&(ipaddr)))

Definition at line 557 of file tcpip.h.

◆ IP6_ADDR_DEPRECATED

#define IP6_ADDR_DEPRECATED   0x10 /* Same as VALID (valid but not preferred) */

Definition at line 534 of file tcpip.h.

◆ IP6_ADDR_INVALID

#define IP6_ADDR_INVALID   0x00

Definition at line 523 of file tcpip.h.

◆ ip6_addr_isallnodes_iflocal

#define ip6_addr_isallnodes_iflocal (   ip6addr)
Value:
(((ip6addr)->addr[0] == PP_HTONL(0xff010000UL)) && \
((ip6addr)->addr[1] == 0UL) && \
((ip6addr)->addr[2] == 0UL) && \
((ip6addr)->addr[3] == PP_HTONL(0x00000001UL)))

Definition at line 485 of file tcpip.h.

◆ ip6_addr_isallnodes_linklocal

#define ip6_addr_isallnodes_linklocal (   ip6addr)
Value:
(((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \
((ip6addr)->addr[1] == 0UL) && \
((ip6addr)->addr[2] == 0UL) && \
((ip6addr)->addr[3] == PP_HTONL(0x00000001UL)))

Definition at line 490 of file tcpip.h.

◆ ip6_addr_isallrouters_linklocal

#define ip6_addr_isallrouters_linklocal (   ip6addr)
Value:
(((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \
((ip6addr)->addr[1] == 0UL) && \
((ip6addr)->addr[2] == 0UL) && \
((ip6addr)->addr[3] == PP_HTONL(0x00000002UL)))

Definition at line 499 of file tcpip.h.

◆ ip6_addr_isany

#define ip6_addr_isany (   ip6addr)    (((ip6addr) == NULL) || ip6_addr_isany_val(*(ip6addr)))

Definition at line 445 of file tcpip.h.

◆ ip6_addr_isany_val

#define ip6_addr_isany_val (   ip6addr)
Value:
(((ip6addr).addr[0] == 0) && \
((ip6addr).addr[1] == 0) && \
((ip6addr).addr[2] == 0) && \
((ip6addr).addr[3] == 0))

Definition at line 441 of file tcpip.h.

◆ ip6_addr_isdeprecated

#define ip6_addr_isdeprecated (   addr_state)    (addr_state == IP6_ADDR_DEPRECATED)

Definition at line 542 of file tcpip.h.

◆ ip6_addr_isglobal

#define ip6_addr_isglobal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xe0000000UL)) == PP_HTONL(0x20000000UL))

Definition at line 452 of file tcpip.h.

◆ ip6_addr_isinvalid

#define ip6_addr_isinvalid (   addr_state)    (addr_state == IP6_ADDR_INVALID)

Definition at line 538 of file tcpip.h.

◆ ip6_addr_isipv6mappedipv4

#define ip6_addr_isipv6mappedipv4 (   ip6addr)    (((ip6addr)->addr[0] == 0) && ((ip6addr)->addr[1] == 0) && (((ip6addr)->addr[2]) == PP_HTONL(0x0000FFFFUL)))

Definition at line 460 of file tcpip.h.

◆ ip6_addr_islinklocal

#define ip6_addr_islinklocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfe800000UL))

Definition at line 454 of file tcpip.h.

◆ ip6_addr_isloopback

#define ip6_addr_isloopback (   ip6addr)
Value:
(((ip6addr)->addr[0] == 0UL) && \
((ip6addr)->addr[1] == 0UL) && \
((ip6addr)->addr[2] == 0UL) && \
((ip6addr)->addr[3] == PP_HTONL(0x00000001UL)))

Definition at line 447 of file tcpip.h.

◆ ip6_addr_ismulticast

#define ip6_addr_ismulticast (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xff000000UL)) == PP_HTONL(0xff000000UL))

Definition at line 462 of file tcpip.h.

◆ ip6_addr_ismulticast_adminlocal

#define ip6_addr_ismulticast_adminlocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff040000UL))

Definition at line 479 of file tcpip.h.

◆ ip6_addr_ismulticast_global

#define ip6_addr_ismulticast_global (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff0e0000UL))

Definition at line 482 of file tcpip.h.

◆ ip6_addr_ismulticast_iflocal

#define ip6_addr_ismulticast_iflocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff010000UL))

Definition at line 477 of file tcpip.h.

◆ ip6_addr_ismulticast_linklocal

#define ip6_addr_ismulticast_linklocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff020000UL))

Definition at line 478 of file tcpip.h.

◆ ip6_addr_ismulticast_orglocal

#define ip6_addr_ismulticast_orglocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff080000UL))

Definition at line 481 of file tcpip.h.

◆ ip6_addr_ismulticast_sitelocal

#define ip6_addr_ismulticast_sitelocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff050000UL))

Definition at line 480 of file tcpip.h.

◆ ip6_addr_ispreferred

#define ip6_addr_ispreferred (   addr_state)    (addr_state == IP6_ADDR_PREFERRED)

Definition at line 541 of file tcpip.h.

◆ ip6_addr_issitelocal

#define ip6_addr_issitelocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfec00000UL))

Definition at line 456 of file tcpip.h.

◆ ip6_addr_issolicitednode

#define ip6_addr_issolicitednode (   ip6addr)
Value:
( ((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \
((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)) && \
(((ip6addr)->addr[3] & PP_HTONL(0xff000000UL)) == PP_HTONL(0xff000000UL)) )

Definition at line 508 of file tcpip.h.

◆ ip6_addr_istentative

#define ip6_addr_istentative (   addr_state)    (addr_state & IP6_ADDR_TENTATIVE)

Definition at line 539 of file tcpip.h.

◆ ip6_addr_isuniquelocal

#define ip6_addr_isuniquelocal (   ip6addr)    (((ip6addr)->addr[0] & PP_HTONL(0xfe000000UL)) == PP_HTONL(0xfc000000UL))

Definition at line 458 of file tcpip.h.

◆ ip6_addr_isvalid

#define ip6_addr_isvalid (   addr_state)    (addr_state & IP6_ADDR_VALID) /* Include valid, preferred, and deprecated. */

Definition at line 540 of file tcpip.h.

◆ ip6_addr_multicast_prefix_flag

#define ip6_addr_multicast_prefix_flag (   ip6addr)    ((ip6addr)->addr[0] & PP_HTONL(0x00200000UL))

Definition at line 464 of file tcpip.h.

◆ ip6_addr_multicast_rendezvous_flag

#define ip6_addr_multicast_rendezvous_flag (   ip6addr)    ((ip6addr)->addr[0] & PP_HTONL(0x00400000UL))

Definition at line 465 of file tcpip.h.

◆ ip6_addr_multicast_scope

#define ip6_addr_multicast_scope (   ip6addr)    ((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xf)

Definition at line 466 of file tcpip.h.

◆ ip6_addr_multicast_transient_flag

#define ip6_addr_multicast_transient_flag (   ip6addr)    ((ip6addr)->addr[0] & PP_HTONL(0x00100000UL))

Definition at line 463 of file tcpip.h.

◆ ip6_addr_netcmp

#define ip6_addr_netcmp (   addr1,
  addr2 
)
Value:
(((addr1)->addr[0] == (addr2)->addr[0]) && \
((addr1)->addr[1] == (addr2)->addr[1]))

Determine if two IPv6 address are on the same network.

  • addr1 IPv6 address 1
  • addr2 IPv6 address 2
    Returns
    !0 if the network identifiers of both address match

Definition at line 431 of file tcpip.h.

◆ IP6_ADDR_PART

#define IP6_ADDR_PART (   ip6addr,
  index,
  a,
  b,
  c,
 
)
Value:
(ip6addr)->addr[index] = ((u32)((d) & 0xff) << 24) | \
((u32)((c) & 0xff) << 16) | \
((u32)((b) & 0xff) << 8) | \
(u32)((a) & 0xff)
s32 index
Definition: libpad.c:194

Set an IPv6 partial address given by byte-parts. Little-endian version, stored in network order (no lwip_htonl).

Definition at line 361 of file tcpip.h.

◆ IP6_ADDR_PREFERRED

#define IP6_ADDR_PREFERRED   0x30

Definition at line 533 of file tcpip.h.

◆ ip6_addr_set

#define ip6_addr_set (   dest,
  src 
)
Value:
do{(dest)->addr[0] = (src) == NULL ? 0 : (src)->addr[0]; \
(dest)->addr[1] = (src) == NULL ? 0 : (src)->addr[1]; \
(dest)->addr[2] = (src) == NULL ? 0 : (src)->addr[2]; \
(dest)->addr[3] = (src) == NULL ? 0 : (src)->addr[3];}while(0)

Safely copy one IPv6 address to another (src may be NULL)

Definition at line 398 of file tcpip.h.

◆ ip6_addr_set_allnodes_linklocal

#define ip6_addr_set_allnodes_linklocal (   ip6addr)
Value:
do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \
(ip6addr)->addr[1] = 0; \
(ip6addr)->addr[2] = 0; \
(ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0)

Definition at line 494 of file tcpip.h.

◆ ip6_addr_set_allrouters_linklocal

#define ip6_addr_set_allrouters_linklocal (   ip6addr)
Value:
do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \
(ip6addr)->addr[1] = 0; \
(ip6addr)->addr[2] = 0; \
(ip6addr)->addr[3] = PP_HTONL(0x00000002UL);}while(0)

Definition at line 503 of file tcpip.h.

◆ ip6_addr_set_any

#define ip6_addr_set_any (   ip6addr)    ip6_addr_set_zero(ip6addr)

Set address to ipv6 'any' (no need for lwip_htonl())

Definition at line 410 of file tcpip.h.

◆ ip6_addr_set_hton

#define ip6_addr_set_hton (   dest,
  src 
)
Value:
do{(dest)->addr[0] = (src) == NULL ? 0 : lwip_htonl((src)->addr[0]); \
(dest)->addr[1] = (src) == NULL ? 0 : lwip_htonl((src)->addr[1]); \
(dest)->addr[2] = (src) == NULL ? 0 : lwip_htonl((src)->addr[2]); \
(dest)->addr[3] = (src) == NULL ? 0 : lwip_htonl((src)->addr[3]);}while(0)
#define lwip_htonl(x)
Definition: tcpip.h:1735

Safely copy one IPv6 address to another and change byte order from host- to network-order.

Definition at line 418 of file tcpip.h.

◆ ip6_addr_set_loopback

#define ip6_addr_set_loopback (   ip6addr)
Value:
do{(ip6addr)->addr[0] = 0; \
(ip6addr)->addr[1] = 0; \
(ip6addr)->addr[2] = 0; \
(ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0)

Set address to ipv6 loopback address

Definition at line 412 of file tcpip.h.

◆ ip6_addr_set_solicitednode

#define ip6_addr_set_solicitednode (   ip6addr,
  if_id 
)
Value:
do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \
(ip6addr)->addr[1] = 0; \
(ip6addr)->addr[2] = PP_HTONL(0x00000001UL); \
(ip6addr)->addr[3] = (PP_HTONL(0xff000000UL) | (if_id));}while(0)

Definition at line 512 of file tcpip.h.

◆ ip6_addr_set_zero

#define ip6_addr_set_zero (   ip6addr)
Value:
do{(ip6addr)->addr[0] = 0; \
(ip6addr)->addr[1] = 0; \
(ip6addr)->addr[2] = 0; \
(ip6addr)->addr[3] = 0;}while(0)

Set complete address to zero

Definition at line 404 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE

#define IP6_ADDR_TENTATIVE   0x08

Definition at line 524 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_1

#define IP6_ADDR_TENTATIVE_1   0x09 /* 1 probe sent */

Definition at line 525 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_2

#define IP6_ADDR_TENTATIVE_2   0x0a /* 2 probes sent */

Definition at line 526 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_3

#define IP6_ADDR_TENTATIVE_3   0x0b /* 3 probes sent */

Definition at line 527 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_4

#define IP6_ADDR_TENTATIVE_4   0x0c /* 4 probes sent */

Definition at line 528 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_5

#define IP6_ADDR_TENTATIVE_5   0x0d /* 5 probes sent */

Definition at line 529 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_6

#define IP6_ADDR_TENTATIVE_6   0x0e /* 6 probes sent */

Definition at line 530 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_7

#define IP6_ADDR_TENTATIVE_7   0x0f /* 7 probes sent */

Definition at line 531 of file tcpip.h.

◆ IP6_ADDR_TENTATIVE_COUNT_MASK

#define IP6_ADDR_TENTATIVE_COUNT_MASK   0x07 /* 1-7 probes sent */

Definition at line 536 of file tcpip.h.

◆ IP6_ADDR_VALID

#define IP6_ADDR_VALID   0x10 /* This bit marks an address as valid (preferred or deprecated) */

Definition at line 532 of file tcpip.h.

◆ ip6_get_subnet_id

#define ip6_get_subnet_id (   ip6addr)    (lwip_htonl((ip6addr)->addr[2]) & 0x0000ffffUL)

Definition at line 439 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_ADMIN_LOCAL

#define IP6_MULTICAST_SCOPE_ADMIN_LOCAL   0x4

Definition at line 472 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_GLOBAL

#define IP6_MULTICAST_SCOPE_GLOBAL   0xe

Definition at line 475 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_INTERFACE_LOCAL

#define IP6_MULTICAST_SCOPE_INTERFACE_LOCAL   0x1

Definition at line 469 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_LINK_LOCAL

#define IP6_MULTICAST_SCOPE_LINK_LOCAL   0x2

Definition at line 470 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL

#define IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL   0x8

Definition at line 474 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_RESERVED

#define IP6_MULTICAST_SCOPE_RESERVED   0x0

Definition at line 467 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_RESERVED0

#define IP6_MULTICAST_SCOPE_RESERVED0   0x0

Definition at line 468 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_RESERVED3

#define IP6_MULTICAST_SCOPE_RESERVED3   0x3

Definition at line 471 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_RESERVEDF

#define IP6_MULTICAST_SCOPE_RESERVEDF   0xf

Definition at line 476 of file tcpip.h.

◆ IP6_MULTICAST_SCOPE_SITE_LOCAL

#define IP6_MULTICAST_SCOPE_SITE_LOCAL   0x5

Definition at line 473 of file tcpip.h.

◆ IP6ADDR_STRLEN_MAX

#define IP6ADDR_STRLEN_MAX   46

Definition at line 568 of file tcpip.h.

◆ ip_2_ip4

#define ip_2_ip4 (   ipaddr)    (ipaddr)

Definition at line 757 of file tcpip.h.

◆ IP_ADDR4

#define IP_ADDR4 (   ipaddr,
  a,
  b,
  c,
 
)    IP4_ADDR(ipaddr,a,b,c,d)

Definition at line 758 of file tcpip.h.

◆ IP_ADDR_ANY

#define IP_ADDR_ANY   IP4_ADDR_ANY

Provided for compatibility. Use IP4_ADDR_ANY for better readability.

Definition at line 841 of file tcpip.h.

◆ IP_ADDR_BROADCAST

#define IP_ADDR_BROADCAST   (&ip_addr_broadcast)

Definition at line 856 of file tcpip.h.

◆ ip_addr_cmp

#define ip_addr_cmp (   addr1,
  addr2 
)    ip4_addr_cmp(addr1, addr2)

Definition at line 773 of file tcpip.h.

◆ ip_addr_copy

#define ip_addr_copy (   dest,
  src 
)    ip4_addr_copy(dest, src)

Definition at line 760 of file tcpip.h.

◆ ip_addr_copy_from_ip4

#define ip_addr_copy_from_ip4 (   dest,
  src 
)    ip4_addr_copy(dest, src)

Definition at line 761 of file tcpip.h.

◆ ip_addr_debug_print

#define ip_addr_debug_print (   debug,
  ipaddr 
)    ip4_addr_debug_print(debug, ipaddr)

Definition at line 780 of file tcpip.h.

◆ ip_addr_debug_print_val

#define ip_addr_debug_print_val (   debug,
  ipaddr 
)    ip4_addr_debug_print_val(debug, ipaddr)

Definition at line 781 of file tcpip.h.

◆ ip_addr_get_ip4_u32

#define ip_addr_get_ip4_u32 (   ipaddr)    ip4_addr_get_u32(ip_2_ip4(ipaddr))

Definition at line 763 of file tcpip.h.

◆ ip_addr_get_network

#define ip_addr_get_network (   target,
  host,
  mask 
)    ip4_addr_get_network(target, host, mask)

Definition at line 771 of file tcpip.h.

◆ ip_addr_isany

#define ip_addr_isany (   ipaddr)    ip4_addr_isany(ipaddr)

Definition at line 774 of file tcpip.h.

◆ ip_addr_isany_val

#define ip_addr_isany_val (   ipaddr)    ip4_addr_isany_val(ipaddr)

Definition at line 775 of file tcpip.h.

◆ ip_addr_isbroadcast

#define ip_addr_isbroadcast (   addr,
  netif 
)    ip4_addr_isbroadcast(addr, netif)

Definition at line 778 of file tcpip.h.

◆ ip_addr_islinklocal

#define ip_addr_islinklocal (   ipaddr)    ip4_addr_islinklocal(ipaddr)

Definition at line 777 of file tcpip.h.

◆ ip_addr_isloopback

#define ip_addr_isloopback (   ipaddr)    ip4_addr_isloopback(ipaddr)

Definition at line 776 of file tcpip.h.

◆ ip_addr_ismulticast

#define ip_addr_ismulticast (   ipaddr)    ip4_addr_ismulticast(ipaddr)

Definition at line 779 of file tcpip.h.

◆ ip_addr_netcmp

#define ip_addr_netcmp (   addr1,
  addr2,
  mask 
)    ip4_addr_netcmp(addr1, addr2, mask)

Definition at line 772 of file tcpip.h.

◆ ip_addr_netmask_valid

#define ip_addr_netmask_valid (   netmask)    ip4_addr_netmask_valid((netmask)->addr)

Definition at line 313 of file tcpip.h.

◆ IP_ADDR_PCB_VERSION_MATCH

#define IP_ADDR_PCB_VERSION_MATCH (   addr,
  pcb 
)    1

Definition at line 742 of file tcpip.h.

◆ IP_ADDR_PCB_VERSION_MATCH_EXACT

#define IP_ADDR_PCB_VERSION_MATCH_EXACT (   pcb,
  ipaddr 
)    1

Definition at line 743 of file tcpip.h.

◆ ip_addr_set

#define ip_addr_set (   dest,
  src 
)    ip4_addr_set(dest, src)

Definition at line 764 of file tcpip.h.

◆ ip_addr_set_any

#define ip_addr_set_any (   is_ipv6,
  ipaddr 
)    ip4_addr_set_any(ipaddr)

Definition at line 768 of file tcpip.h.

◆ ip_addr_set_hton

#define ip_addr_set_hton (   dest,
  src 
)    ip4_addr_set_hton(dest, src)

Definition at line 770 of file tcpip.h.

◆ ip_addr_set_ip4_u32

#define ip_addr_set_ip4_u32 (   ipaddr,
  val 
)    ip4_addr_set_u32(ip_2_ip4(ipaddr), val)

Definition at line 762 of file tcpip.h.

◆ ip_addr_set_ipaddr

#define ip_addr_set_ipaddr (   dest,
  src 
)    ip4_addr_set(dest, src)

Definition at line 765 of file tcpip.h.

◆ ip_addr_set_loopback

#define ip_addr_set_loopback (   is_ipv6,
  ipaddr 
)    ip4_addr_set_loopback(ipaddr)

Definition at line 769 of file tcpip.h.

◆ ip_addr_set_zero

#define ip_addr_set_zero (   ipaddr)    ip4_addr_set_zero(ipaddr)

Definition at line 766 of file tcpip.h.

◆ ip_addr_set_zero_ip4

#define ip_addr_set_zero_ip4 (   ipaddr)    ip4_addr_set_zero(ipaddr)

Definition at line 767 of file tcpip.h.

◆ IP_ANY_TYPE

#define IP_ANY_TYPE   IP_ADDR_ANY

Definition at line 890 of file tcpip.h.

◆ IP_BADCLASS

#define IP_BADCLASS (   a)    (((u32)(a) & 0xf0000000UL) == 0xf0000000UL)

Definition at line 247 of file tcpip.h.

◆ IP_CLASSA

#define IP_CLASSA (   a)    ((((u32)(a)) & 0x80000000UL) == 0)

Definition at line 223 of file tcpip.h.

◆ IP_CLASSA_HOST

#define IP_CLASSA_HOST   (0xffffffff & ~IP_CLASSA_NET)

Definition at line 226 of file tcpip.h.

◆ IP_CLASSA_MAX

#define IP_CLASSA_MAX   128

Definition at line 227 of file tcpip.h.

◆ IP_CLASSA_NET

#define IP_CLASSA_NET   0xff000000

Definition at line 224 of file tcpip.h.

◆ IP_CLASSA_NSHIFT

#define IP_CLASSA_NSHIFT   24

Definition at line 225 of file tcpip.h.

◆ IP_CLASSB

#define IP_CLASSB (   a)    ((((u32)(a)) & 0xc0000000UL) == 0x80000000UL)

Definition at line 229 of file tcpip.h.

◆ IP_CLASSB_HOST

#define IP_CLASSB_HOST   (0xffffffff & ~IP_CLASSB_NET)

Definition at line 232 of file tcpip.h.

◆ IP_CLASSB_MAX

#define IP_CLASSB_MAX   65536

Definition at line 233 of file tcpip.h.

◆ IP_CLASSB_NET

#define IP_CLASSB_NET   0xffff0000

Definition at line 230 of file tcpip.h.

◆ IP_CLASSB_NSHIFT

#define IP_CLASSB_NSHIFT   16

Definition at line 231 of file tcpip.h.

◆ IP_CLASSC

#define IP_CLASSC (   a)    ((((u32)(a)) & 0xe0000000UL) == 0xc0000000UL)

Definition at line 235 of file tcpip.h.

◆ IP_CLASSC_HOST

#define IP_CLASSC_HOST   (0xffffffff & ~IP_CLASSC_NET)

Definition at line 238 of file tcpip.h.

◆ IP_CLASSC_NET

#define IP_CLASSC_NET   0xffffff00

Definition at line 236 of file tcpip.h.

◆ IP_CLASSC_NSHIFT

#define IP_CLASSC_NSHIFT   8

Definition at line 237 of file tcpip.h.

◆ IP_CLASSD

#define IP_CLASSD (   a)    (((u32)(a) & 0xf0000000UL) == 0xe0000000UL)

Definition at line 240 of file tcpip.h.

◆ IP_CLASSD_HOST

#define IP_CLASSD_HOST   0x0fffffff /* routing needn't know. */

Definition at line 243 of file tcpip.h.

◆ IP_CLASSD_NET

#define IP_CLASSD_NET   0xf0000000 /* These ones aren't really */

Definition at line 241 of file tcpip.h.

◆ IP_CLASSD_NSHIFT

#define IP_CLASSD_NSHIFT   28 /* net and host fields, but */

Definition at line 242 of file tcpip.h.

◆ IP_EXPERIMENTAL

#define IP_EXPERIMENTAL (   a)    (((u32)(a) & 0xf0000000UL) == 0xf0000000UL)

Definition at line 246 of file tcpip.h.

◆ IP_GET_TYPE

#define IP_GET_TYPE (   ipaddr)    IPADDR_TYPE_V4

Definition at line 756 of file tcpip.h.

◆ IP_IS_ANY_TYPE_VAL

#define IP_IS_ANY_TYPE_VAL (   ipaddr)    0

Definition at line 753 of file tcpip.h.

◆ IP_IS_V4

#define IP_IS_V4 (   ipaddr)    1

Definition at line 751 of file tcpip.h.

◆ IP_IS_V4_VAL

#define IP_IS_V4_VAL (   ipaddr)    1

Definition at line 749 of file tcpip.h.

◆ IP_IS_V6

#define IP_IS_V6 (   ipaddr)    0

Definition at line 752 of file tcpip.h.

◆ IP_IS_V6_VAL

#define IP_IS_V6_VAL (   ipaddr)    0

Definition at line 750 of file tcpip.h.

◆ IP_LOOPBACKNET

#define IP_LOOPBACKNET   127 /* official! */

Definition at line 249 of file tcpip.h.

◆ IP_MULTICAST

#define IP_MULTICAST (   a)    IP_CLASSD(a)

Definition at line 244 of file tcpip.h.

◆ IP_SET_TYPE

#define IP_SET_TYPE (   ipaddr,
  iptype 
)

Definition at line 755 of file tcpip.h.

◆ IP_SET_TYPE_VAL

#define IP_SET_TYPE_VAL (   ipaddr,
  iptype 
)

Definition at line 754 of file tcpip.h.

◆ IP_TOS

#define IP_TOS   1

Definition at line 1424 of file tcpip.h.

◆ IP_TTL

#define IP_TTL   2

Definition at line 1425 of file tcpip.h.

◆ IPADDR2_COPY

#define IPADDR2_COPY (   dest,
  src 
)    memcpy(dest, src, sizeof(ip4_addr_t))

MEMCPY-like copying of IP addresses where addresses are known to be 16-bit-aligned if the port is correctly configured (so a port could define this to copying 2 u16's) - no NULL-pointer-checking needed.

Definition at line 264 of file tcpip.h.

◆ IPADDR4_INIT

#define IPADDR4_INIT (   u32val)    { u32val }

Definition at line 748 of file tcpip.h.

◆ IPADDR_ANY

#define IPADDR_ANY   ((u32)0x00000000UL)

0.0.0.0

Definition at line 215 of file tcpip.h.

◆ ipaddr_aton

#define ipaddr_aton (   cp,
  addr 
)    ip4addr_aton(cp, addr)

Definition at line 784 of file tcpip.h.

◆ IPADDR_BROADCAST

#define IPADDR_BROADCAST   ((u32)0xffffffffUL)

255.255.255.255

Definition at line 217 of file tcpip.h.

◆ IPADDR_LOOPBACK

#define IPADDR_LOOPBACK   ((u32)0x7f000001UL)

127.0.0.1

Definition at line 213 of file tcpip.h.

◆ IPADDR_NONE

#define IPADDR_NONE   ((u32)0xffffffffUL)

255.255.255.255

Definition at line 211 of file tcpip.h.

◆ ipaddr_ntoa

#define ipaddr_ntoa (   ipaddr)    ip4addr_ntoa(ipaddr)

Definition at line 782 of file tcpip.h.

◆ ipaddr_ntoa_r

#define ipaddr_ntoa_r (   ipaddr,
  buf,
  buflen 
)    ip4addr_ntoa_r(ipaddr, buf, buflen)

Definition at line 783 of file tcpip.h.

◆ IPADDR_STRLEN_MAX

#define IPADDR_STRLEN_MAX   IP4ADDR_STRLEN_MAX

Definition at line 786 of file tcpip.h.

◆ IPPROTO_ICMP

#define IPPROTO_ICMP   1

Definition at line 1404 of file tcpip.h.

◆ IPPROTO_IP

#define IPPROTO_IP   0

Definition at line 1403 of file tcpip.h.

◆ IPPROTO_RAW

#define IPPROTO_RAW   255

Definition at line 1412 of file tcpip.h.

◆ IPPROTO_TCP

#define IPPROTO_TCP   6

Definition at line 1405 of file tcpip.h.

◆ IPPROTO_UDP

#define IPPROTO_UDP   17

Definition at line 1406 of file tcpip.h.

◆ IPPROTO_UDPLITE

#define IPPROTO_UDPLITE   136

Definition at line 1411 of file tcpip.h.

◆ IPTOS_LOWCOST

#define IPTOS_LOWCOST   0x02

Definition at line 1498 of file tcpip.h.

◆ IPTOS_LOWDELAY

#define IPTOS_LOWDELAY   0x10

Definition at line 1495 of file tcpip.h.

◆ IPTOS_MINCOST

#define IPTOS_MINCOST   IPTOS_LOWCOST

Definition at line 1499 of file tcpip.h.

◆ IPTOS_PREC

#define IPTOS_PREC (   tos)    ((tos) & IPTOS_PREC_MASK)

Definition at line 1511 of file tcpip.h.

◆ IPTOS_PREC_CRITIC_ECP

#define IPTOS_PREC_CRITIC_ECP   0xa0

Definition at line 1514 of file tcpip.h.

◆ IPTOS_PREC_FLASH

#define IPTOS_PREC_FLASH   0x60

Definition at line 1516 of file tcpip.h.

◆ IPTOS_PREC_FLASHOVERRIDE

#define IPTOS_PREC_FLASHOVERRIDE   0x80

Definition at line 1515 of file tcpip.h.

◆ IPTOS_PREC_IMMEDIATE

#define IPTOS_PREC_IMMEDIATE   0x40

Definition at line 1517 of file tcpip.h.

◆ IPTOS_PREC_INTERNETCONTROL

#define IPTOS_PREC_INTERNETCONTROL   0xc0

Definition at line 1513 of file tcpip.h.

◆ IPTOS_PREC_MASK

#define IPTOS_PREC_MASK   0xe0

Definition at line 1510 of file tcpip.h.

◆ IPTOS_PREC_NETCONTROL

#define IPTOS_PREC_NETCONTROL   0xe0

Definition at line 1512 of file tcpip.h.

◆ IPTOS_PREC_PRIORITY

#define IPTOS_PREC_PRIORITY   0x20

Definition at line 1518 of file tcpip.h.

◆ IPTOS_PREC_ROUTINE

#define IPTOS_PREC_ROUTINE   0x00

Definition at line 1519 of file tcpip.h.

◆ IPTOS_RELIABILITY

#define IPTOS_RELIABILITY   0x04

Definition at line 1497 of file tcpip.h.

◆ IPTOS_THROUGHPUT

#define IPTOS_THROUGHPUT   0x08

Definition at line 1496 of file tcpip.h.

◆ IPTOS_TOS

#define IPTOS_TOS (   tos)    ((tos) & IPTOS_TOS_MASK)

Definition at line 1494 of file tcpip.h.

◆ IPTOS_TOS_MASK

#define IPTOS_TOS_MASK   0x1E

Definition at line 1493 of file tcpip.h.

◆ LWIP_AUTOIP

#define LWIP_AUTOIP   0

Definition at line 52 of file tcpip.h.

◆ LWIP_DHCP

#define LWIP_DHCP   1

Definition at line 33 of file tcpip.h.

◆ LWIP_DNS_ADDRTYPE_DEFAULT

#define LWIP_DNS_ADDRTYPE_DEFAULT   LWIP_DNS_ADDRTYPE_IPV4

Definition at line 1626 of file tcpip.h.

◆ LWIP_DNS_ADDRTYPE_IPV4

#define LWIP_DNS_ADDRTYPE_IPV4   0

Definition at line 1617 of file tcpip.h.

◆ LWIP_DNS_ADDRTYPE_IPV4_IPV6

#define LWIP_DNS_ADDRTYPE_IPV4_IPV6   2 /* try to resolve IPv4 first, try IPv6 if IPv4 fails only */

Definition at line 1619 of file tcpip.h.

◆ LWIP_DNS_ADDRTYPE_IPV6

#define LWIP_DNS_ADDRTYPE_IPV6   1

Definition at line 1618 of file tcpip.h.

◆ LWIP_DNS_ADDRTYPE_IPV6_IPV4

#define LWIP_DNS_ADDRTYPE_IPV6_IPV4   3 /* try to resolve IPv6 first, try IPv4 if IPv6 fails only */

Definition at line 1620 of file tcpip.h.

◆ LWIP_DNS_API_DECLARE_H_ERRNO

#define LWIP_DNS_API_DECLARE_H_ERRNO   1

Definition at line 1661 of file tcpip.h.

◆ LWIP_DNS_API_DECLARE_STRUCTS

#define LWIP_DNS_API_DECLARE_STRUCTS   1

Definition at line 1673 of file tcpip.h.

◆ LWIP_DNS_API_DEFINE_ERRORS

#define LWIP_DNS_API_DEFINE_ERRORS   1

Definition at line 1665 of file tcpip.h.

◆ LWIP_DNS_API_DEFINE_FLAGS

#define LWIP_DNS_API_DEFINE_FLAGS   1

Definition at line 1669 of file tcpip.h.

◆ lwip_htonl

#define lwip_htonl (   x)    PP_HTONL(x)

Definition at line 1735 of file tcpip.h.

◆ lwip_htons

#define lwip_htons (   x)    PP_HTONS(x)

Definition at line 1733 of file tcpip.h.

◆ LWIP_IGMP

#define LWIP_IGMP   0

Definition at line 55 of file tcpip.h.

◆ LWIP_IPV4

#define LWIP_IPV4   1

Definition at line 36 of file tcpip.h.

◆ LWIP_IPV6_SEND_ROUTER_SOLICIT

#define LWIP_IPV6_SEND_ROUTER_SOLICIT   1

Definition at line 60 of file tcpip.h.

◆ LWIP_LOOPBACK_MAX_PBUFS

#define LWIP_LOOPBACK_MAX_PBUFS   0

Definition at line 57 of file tcpip.h.

◆ LWIP_NETIF_HOSTNAME

#define LWIP_NETIF_HOSTNAME   0

Definition at line 53 of file tcpip.h.

◆ LWIP_NETIF_HWADDRHINT

#define LWIP_NETIF_HWADDRHINT   0

Definition at line 56 of file tcpip.h.

◆ LWIP_NETIF_LINK_CALLBACK

#define LWIP_NETIF_LINK_CALLBACK   0

Definition at line 51 of file tcpip.h.

◆ LWIP_NETIF_STATUS_CALLBACK

#define LWIP_NETIF_STATUS_CALLBACK   0

Definition at line 50 of file tcpip.h.

◆ lwip_ntohl

#define lwip_ntohl (   x)    PP_NTOHL(x)

Definition at line 1736 of file tcpip.h.

◆ lwip_ntohs

#define lwip_ntohs (   x)    PP_NTOHS(x)

Definition at line 1734 of file tcpip.h.

◆ LWIP_NUM_NETIF_CLIENT_DATA

#define LWIP_NUM_NETIF_CLIENT_DATA   0

Definition at line 58 of file tcpip.h.

◆ LWIP_SNMP

#define LWIP_SNMP   0

Definition at line 54 of file tcpip.h.

◆ LWIP_SOCKET_OFFSET

#define LWIP_SOCKET_OFFSET   0

Definition at line 59 of file tcpip.h.

◆ LWIP_TCP

#define LWIP_TCP   1

Definition at line 39 of file tcpip.h.

◆ LWIP_UDP

#define LWIP_UDP   1

Definition at line 42 of file tcpip.h.

◆ MEMP_NUM_NETCONN

#define MEMP_NUM_NETCONN   (MEMP_NUM_TCP_PCB+MEMP_NUM_UDP_PCB)

Definition at line 49 of file tcpip.h.

◆ MEMP_NUM_TCP_PCB

#define MEMP_NUM_TCP_PCB   5

Definition at line 48 of file tcpip.h.

◆ MEMP_NUM_UDP_PCB

#define MEMP_NUM_UDP_PCB   4

Definition at line 47 of file tcpip.h.

◆ MSG_DONTWAIT

#define MSG_DONTWAIT   0x08 /* Nonblocking i/o for this operation only */

Definition at line 1418 of file tcpip.h.

◆ MSG_MORE

#define MSG_MORE   0x10 /* Sender will send more */

Definition at line 1419 of file tcpip.h.

◆ MSG_OOB

#define MSG_OOB   0x04 /* Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */

Definition at line 1417 of file tcpip.h.

◆ MSG_PEEK

#define MSG_PEEK   0x01 /* Peeks at an incoming message */

Definition at line 1415 of file tcpip.h.

◆ MSG_WAITALL

#define MSG_WAITALL   0x02 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */

Definition at line 1416 of file tcpip.h.

◆ NETDB_ELEM_SIZE

#define NETDB_ELEM_SIZE   (sizeof(struct addrinfo) + sizeof(struct sockaddr_storage) + DNS_MAX_NAME_LENGTH + 1)

Definition at line 1725 of file tcpip.h.

◆ netif_get_client_data

#define netif_get_client_data (   netif,
  id 
)    (netif)->client_data[(id)]

Get client data. Obtain ID from netif_alloc_client_data_id().

Definition at line 1059 of file tcpip.h.

◆ netif_ip4_addr

#define netif_ip4_addr (   netif)    ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr)))

Definition at line 1199 of file tcpip.h.

◆ netif_ip4_gw

#define netif_ip4_gw (   netif)    ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw)))

Definition at line 1203 of file tcpip.h.

◆ netif_ip4_netmask

#define netif_ip4_netmask (   netif)    ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask)))

Definition at line 1201 of file tcpip.h.

◆ netif_ip_addr4

#define netif_ip_addr4 (   netif)    ((const ip_addr_t*)&((netif)->ip_addr))

Definition at line 1205 of file tcpip.h.

◆ netif_ip_gw4

#define netif_ip_gw4 (   netif)    ((const ip_addr_t*)&((netif)->gw))

Definition at line 1209 of file tcpip.h.

◆ netif_ip_netmask4

#define netif_ip_netmask4 (   netif)    ((const ip_addr_t*)&((netif)->netmask))

Definition at line 1207 of file tcpip.h.

◆ netif_is_link_up

#define netif_is_link_up (   netif)    (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8)1 : (u8)0)

Ask if a link is up

Definition at line 1218 of file tcpip.h.

◆ netif_is_up

#define netif_is_up (   netif)    (((netif)->flags & NETIF_FLAG_UP) ? (u8)1 : (u8)0)

Ask if an interface is up

Definition at line 1215 of file tcpip.h.

◆ NETIF_MAX_HWADDR_LEN

#define NETIF_MAX_HWADDR_LEN   6U

Must be the maximum of all used hardware address lengths across all types of interfaces in use. This does not have to be changed, normally.

Definition at line 903 of file tcpip.h.

◆ NETIF_SET_CHECKSUM_CTRL

#define NETIF_SET_CHECKSUM_CTRL (   netif,
  chksumflags 
)

Definition at line 1188 of file tcpip.h.

◆ netif_set_client_data

#define netif_set_client_data (   netif,
  id,
  data 
)    netif_get_client_data(netif, id) = (data)

Set client data. Obtain ID from netif_alloc_client_data_id().

Definition at line 1055 of file tcpip.h.

◆ NETIF_SET_HWADDRHINT

#define NETIF_SET_HWADDRHINT (   netif,
  hint 
)

Definition at line 1254 of file tcpip.h.

◆ NO_DATA

#define NO_DATA   211

Definition at line 1685 of file tcpip.h.

◆ NO_RECOVERY

#define NO_RECOVERY   212

Definition at line 1686 of file tcpip.h.

◆ ntohl

#define ntohl (   x)    lwip_ntohl(x)

Definition at line 1731 of file tcpip.h.

◆ ntohs

#define ntohs (   x)    lwip_ntohs(x)

Definition at line 1729 of file tcpip.h.

◆ O_NDELAY

#define O_NDELAY   1 /* same as O_NONBLOCK, for compatibility */

Definition at line 1577 of file tcpip.h.

◆ O_NONBLOCK

#define O_NONBLOCK   1 /* nonblocking I/O */

Definition at line 1574 of file tcpip.h.

◆ PBUF_IP_HLEN

#define PBUF_IP_HLEN   20

Definition at line 103 of file tcpip.h.

◆ PBUF_TRANSPORT_HLEN

#define PBUF_TRANSPORT_HLEN   20

Definition at line 99 of file tcpip.h.

◆ PF_INET

#define PF_INET   AF_INET

Definition at line 1399 of file tcpip.h.

◆ PF_INET6

#define PF_INET6   AF_INET6

Definition at line 1400 of file tcpip.h.

◆ PF_UNSPEC

#define PF_UNSPEC   AF_UNSPEC

Definition at line 1401 of file tcpip.h.

◆ PP_HTONL

#define PP_HTONL (   x)
Value:
((((x) & 0xff) << 24) | \
(((x) & 0xff00) << 8) | \
(((x) & 0xff0000UL) >> 8) | \
(((x) & 0xff000000UL) >> 24))
s32 x
Definition: libmouse.c:34

Definition at line 1743 of file tcpip.h.

◆ PP_HTONS

#define PP_HTONS (   x)    ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))

Definition at line 1741 of file tcpip.h.

◆ PP_NTOHL

#define PP_NTOHL (   x)    PP_HTONL(x)

Definition at line 1747 of file tcpip.h.

◆ PP_NTOHS

#define PP_NTOHS (   x)    PP_HTONS(x)

Definition at line 1742 of file tcpip.h.

◆ PS2IP_DHCP

#define PS2IP_DHCP   1

Definition at line 30 of file tcpip.h.

◆ PS2IP_DNS

#define PS2IP_DNS

Definition at line 27 of file tcpip.h.

◆ s6_addr

#define s6_addr   un.u8_addr

Definition at line 1286 of file tcpip.h.

◆ SHUT_RD

#define SHUT_RD   0

Definition at line 1581 of file tcpip.h.

◆ SHUT_RDWR

#define SHUT_RDWR   2

Definition at line 1583 of file tcpip.h.

◆ SHUT_WR

#define SHUT_WR   1

Definition at line 1582 of file tcpip.h.

◆ SIN_ZERO_LEN

#define SIN_ZERO_LEN   8

Definition at line 1316 of file tcpip.h.

◆ SIOCATMARK

#define SIOCATMARK   _IOR('s', 7, unsigned long) /* at oob mark? */

Definition at line 1560 of file tcpip.h.

◆ SIOCGHIWAT

#define SIOCGHIWAT   _IOR('s', 1, unsigned long) /* get high watermark */

Definition at line 1557 of file tcpip.h.

◆ SIOCGLOWAT

#define SIOCGLOWAT   _IOR('s', 3, unsigned long) /* get low watermark */

Definition at line 1559 of file tcpip.h.

◆ SIOCSHIWAT

#define SIOCSHIWAT   _IOW('s', 0, unsigned long) /* set high watermark */

Definition at line 1556 of file tcpip.h.

◆ SIOCSLOWAT

#define SIOCSLOWAT   _IOW('s', 2, unsigned long) /* set low watermark */

Definition at line 1558 of file tcpip.h.

◆ SO_ACCEPTCONN

#define SO_ACCEPTCONN   0x0002 /* socket has had listen() */

Definition at line 1369 of file tcpip.h.

◆ SO_BROADCAST

#define SO_BROADCAST   0x0020 /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */

Definition at line 1362 of file tcpip.h.

◆ SO_CONTIMEO

#define SO_CONTIMEO   0x1009 /* Unimplemented: connect timeout */

Definition at line 1384 of file tcpip.h.

◆ SO_DEBUG

#define SO_DEBUG   0x0001 /* Unimplemented: turn on debugging info recording */

Definition at line 1368 of file tcpip.h.

◆ SO_DONTLINGER

#define SO_DONTLINGER   ((int)(~SO_LINGER))

Definition at line 1373 of file tcpip.h.

◆ SO_DONTROUTE

#define SO_DONTROUTE   0x0010 /* Unimplemented: just use interface addresses */

Definition at line 1370 of file tcpip.h.

◆ SO_ERROR

#define SO_ERROR   0x1007 /* get error status and clear */

Definition at line 1382 of file tcpip.h.

◆ SO_KEEPALIVE

#define SO_KEEPALIVE   0x0008 /* keep connections alive */

Definition at line 1361 of file tcpip.h.

◆ SO_LINGER

#define SO_LINGER   0x0080 /* linger on close if data present */

Definition at line 1372 of file tcpip.h.

◆ SO_NO_CHECK

#define SO_NO_CHECK   0x100a /* don't create UDP checksum */

Definition at line 1385 of file tcpip.h.

◆ SO_OOBINLINE

#define SO_OOBINLINE   0x0100 /* Unimplemented: leave received OOB data in line */

Definition at line 1374 of file tcpip.h.

◆ SO_RCVBUF

#define SO_RCVBUF   0x1002 /* receive buffer size */

Definition at line 1377 of file tcpip.h.

◆ SO_RCVLOWAT

#define SO_RCVLOWAT   0x1004 /* Unimplemented: receive low-water mark */

Definition at line 1379 of file tcpip.h.

◆ SO_RCVTIMEO

#define SO_RCVTIMEO   0x1006 /* receive timeout */

Definition at line 1381 of file tcpip.h.

◆ SO_REUSEADDR

#define SO_REUSEADDR   0x0004 /* Allow local address reuse */

Definition at line 1360 of file tcpip.h.

◆ SO_REUSEPORT

#define SO_REUSEPORT   0x0200 /* Unimplemented: allow local address & port reuse */

Definition at line 1375 of file tcpip.h.

◆ SO_SNDBUF

#define SO_SNDBUF   0x1001 /* Unimplemented: send buffer size */

Definition at line 1376 of file tcpip.h.

◆ SO_SNDLOWAT

#define SO_SNDLOWAT   0x1003 /* Unimplemented: send low-water mark */

Definition at line 1378 of file tcpip.h.

◆ SO_SNDTIMEO

#define SO_SNDTIMEO   0x1005 /* send timeout */

Definition at line 1380 of file tcpip.h.

◆ SO_TYPE

#define SO_TYPE   0x1008 /* get socket type */

Definition at line 1383 of file tcpip.h.

◆ SO_USELOOPBACK

#define SO_USELOOPBACK   0x0040 /* Unimplemented: bypass hardware when possible */

Definition at line 1371 of file tcpip.h.

◆ SOCK_DGRAM

#define SOCK_DGRAM   2

Definition at line 1354 of file tcpip.h.

◆ SOCK_RAW

#define SOCK_RAW   3

Definition at line 1355 of file tcpip.h.

◆ SOCK_STREAM

#define SOCK_STREAM   1

Definition at line 1353 of file tcpip.h.

◆ SOCKLEN_T_DEFINED

#define SOCKLEN_T_DEFINED   1

Definition at line 1349 of file tcpip.h.

◆ SOL_SOCKET

#define SOL_SOCKET   0xfff /* options for socket level */

Definition at line 1390 of file tcpip.h.

◆ TCP_KEEPALIVE

#define TCP_KEEPALIVE   0x02 /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */

Definition at line 1432 of file tcpip.h.

◆ TCP_KEEPCNT

#define TCP_KEEPCNT   0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */

Definition at line 1435 of file tcpip.h.

◆ TCP_KEEPIDLE

#define TCP_KEEPIDLE   0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */

Definition at line 1433 of file tcpip.h.

◆ TCP_KEEPINTVL

#define TCP_KEEPINTVL   0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */

Definition at line 1434 of file tcpip.h.

◆ TCP_NODELAY

#define TCP_NODELAY   0x01 /* don't delay send to coalesce packets */

Definition at line 1431 of file tcpip.h.

◆ TRY_AGAIN

#define TRY_AGAIN   213

Definition at line 1687 of file tcpip.h.

Typedef Documentation

◆ dns_found_callback

typedef void(* dns_found_callback) (const char *name, const ip_addr_t *ipaddr, void *callback_arg)

Callback which is invoked when a hostname is found. A function of this type must be implemented by the application using the DNS resolver.

Parameters
namepointer to the name that was looked up.
ipaddrpointer to an ip_addr_t containing the IP address of the hostname, or NULL if the name could not be found (or on any other error).
callback_arga user-specified callback argument passed to dns_gethostbyname

Definition at line 1655 of file tcpip.h.

◆ err_t

typedef signed char err_t

Definition at line 95 of file tcpip.h.

◆ in_port_t

typedef u16 in_port_t

Definition at line 1306 of file tcpip.h.

◆ ip4_addr_p_t

typedef struct ip4_addr_packed ip4_addr_p_t

Definition at line 95 of file tcpip.h.

◆ ip6_addr_p_t

typedef struct ip6_addr_packed ip6_addr_p_t

Definition at line 95 of file tcpip.h.

◆ ip_addr_t

typedef ip4_addr_t ip_addr_t

Definition at line 747 of file tcpip.h.

◆ netif_init_fn

typedef err_t(* netif_init_fn) (struct netif *netif)

Function prototype for netif init functions. Set up flags and output/linkoutput callback functions in this function.

Parameters
netifThe netif to initialize

Definition at line 995 of file tcpip.h.

◆ netif_input_fn

typedef err_t(* netif_input_fn) (struct pbuf *p, struct netif *inp)

Function prototype for netif->input functions. This function is saved as 'input' callback function in the netif struct. Call it when a packet has been received.

Parameters
pThe received packet, copied into a pbuf
inpThe netif which received the packet

Definition at line 1002 of file tcpip.h.

◆ netif_linkoutput_fn

typedef err_t(* netif_linkoutput_fn) (struct netif *netif, struct pbuf *p)

Function prototype for netif->linkoutput functions. Only used for ethernet netifs. This function is called by ARP when a packet shall be sent.

Parameters
netifThe netif which shall send a packet
pThe packet to send (raw ethernet packet)

Definition at line 1036 of file tcpip.h.

◆ netif_output_fn

typedef err_t(* netif_output_fn) (struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr)

Function prototype for netif->output functions. Called by lwIP when a packet shall be sent. For ethernet netif, set this to 'etharp_output' and set 'linkoutput'.

Parameters
netifThe netif which shall send a packet
pThe packet to send (p->payload points to IP header)
ipaddrThe IP address to which the packet shall be sent

Definition at line 1013 of file tcpip.h.

◆ netif_status_callback_fn

typedef void(* netif_status_callback_fn) (struct netif *netif)

Function prototype for netif status- or link-callback functions.

Definition at line 1038 of file tcpip.h.

◆ sa_family_t

typedef u8 sa_family_t

Definition at line 1301 of file tcpip.h.

◆ socklen_t

typedef int socklen_t

Definition at line 1350 of file tcpip.h.

Enumeration Type Documentation

◆ dhcp_state_enum_t

Enumerator
DHCP_STATE_OFF 
DHCP_STATE_REQUESTING 
DHCP_STATE_INIT 
DHCP_STATE_REBOOTING 
DHCP_STATE_REBINDING 
DHCP_STATE_RENEWING 
DHCP_STATE_SELECTING 
DHCP_STATE_INFORMING 
DHCP_STATE_CHECKING 
DHCP_STATE_PERMANENT 
DHCP_STATE_BOUND 
DHCP_STATE_RELEASING 
DHCP_STATE_BACKING_OFF 

Definition at line 1259 of file tcpip.h.

1259  {
1260  DHCP_STATE_OFF = 0,
1262  DHCP_STATE_INIT = 2,
1265  DHCP_STATE_RENEWING = 5,
1268  DHCP_STATE_CHECKING = 8,
1269  DHCP_STATE_PERMANENT = 9, /* not yet implemented */
1270  DHCP_STATE_BOUND = 10,
1271  DHCP_STATE_RELEASING = 11, /* not yet implemented */
dhcp_state_enum_t
Definition: tcpip.h:1259
@ DHCP_STATE_OFF
Definition: tcpip.h:1260
@ DHCP_STATE_INIT
Definition: tcpip.h:1262
@ DHCP_STATE_BOUND
Definition: tcpip.h:1270
@ DHCP_STATE_BACKING_OFF
Definition: tcpip.h:1272
@ DHCP_STATE_PERMANENT
Definition: tcpip.h:1269
@ DHCP_STATE_CHECKING
Definition: tcpip.h:1268
@ DHCP_STATE_REBOOTING
Definition: tcpip.h:1263
@ DHCP_STATE_SELECTING
Definition: tcpip.h:1266
@ DHCP_STATE_REQUESTING
Definition: tcpip.h:1261
@ DHCP_STATE_RELEASING
Definition: tcpip.h:1271
@ DHCP_STATE_RENEWING
Definition: tcpip.h:1265
@ DHCP_STATE_REBINDING
Definition: tcpip.h:1264
@ DHCP_STATE_INFORMING
Definition: tcpip.h:1267

◆ lwip_internal_netif_client_data_index

Enumerator
LWIP_NETIF_CLIENT_DATA_INDEX_DHCP 
LWIP_NETIF_CLIENT_DATA_INDEX_MAX 

Definition at line 947 of file tcpip.h.

948 {
949 #if LWIP_DHCP
951 #endif
952 #if LWIP_AUTOIP
953  LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP,
954 #endif
955 #if LWIP_IGMP
956  LWIP_NETIF_CLIENT_DATA_INDEX_IGMP,
957 #endif
958 #if LWIP_IPV6_MLD
959  LWIP_NETIF_CLIENT_DATA_INDEX_MLD6,
960 #endif
962 };
@ LWIP_NETIF_CLIENT_DATA_INDEX_MAX
Definition: tcpip.h:961
@ LWIP_NETIF_CLIENT_DATA_INDEX_DHCP
Definition: tcpip.h:950

◆ lwip_ip_addr_type

IP address types for use in ip_addr_t.type member.

See also
tcp_new_ip_type(), udp_new_ip_type(), raw_new_ip_type().
Enumerator
IPADDR_TYPE_V4 

IPv4

IPADDR_TYPE_V6 

IPv6

IPADDR_TYPE_ANY 

IPv4+IPv6 ("dual-stack")

Definition at line 576 of file tcpip.h.

576  {
578  IPADDR_TYPE_V4 = 0U,
580  IPADDR_TYPE_V6 = 6U,
582  IPADDR_TYPE_ANY = 46U
583 };
@ IPADDR_TYPE_V6
Definition: tcpip.h:580
@ IPADDR_TYPE_ANY
Definition: tcpip.h:582
@ IPADDR_TYPE_V4
Definition: tcpip.h:578

◆ netif_mac_filter_action

MAC Filter Actions, these are passed to a netif's igmp_mac_filter or mld_mac_filter callback function.

Enumerator
NETIF_DEL_MAC_FILTER 

Delete a filter entry

NETIF_ADD_MAC_FILTER 

Add a filter entry

Definition at line 983 of file tcpip.h.

983  {
988 };
@ NETIF_ADD_MAC_FILTER
Definition: tcpip.h:987
@ NETIF_DEL_MAC_FILTER
Definition: tcpip.h:985

◆ pbuf_layer

enum pbuf_layer

Enumeration of pbuf layers

Enumerator
PBUF_TRANSPORT 

Includes spare room for transport layer header, e.g. UDP header. Use this if you intend to pass the pbuf to functions like udp_send().

PBUF_IP 

Includes spare room for IP header. Use this if you intend to pass the pbuf to functions like raw_send().

PBUF_LINK 

Includes spare room for link layer header (ethernet header). Use this if you intend to pass the pbuf to functions like ethernet_output().

See also
PBUF_LINK_HLEN
PBUF_RAW_TX 

Includes spare room for additional encapsulation header before ethernet headers (e.g. 802.11). Use this if you intend to pass the pbuf to functions like netif->linkoutput().

See also
PBUF_LINK_ENCAPSULATION_HLEN
PBUF_RAW 

Use this for input packets in a netif driver when calling netif->input() in the most common case - ethernet-layer netif driver.

Definition at line 110 of file tcpip.h.

110  {
118  PBUF_IP,
123  PBUF_LINK,
129  PBUF_RAW_TX,
132  PBUF_RAW
133 } pbuf_layer;
pbuf_layer
Definition: tcpip.h:110
@ PBUF_RAW_TX
Definition: tcpip.h:129
@ PBUF_RAW
Definition: tcpip.h:132
@ PBUF_TRANSPORT
Definition: tcpip.h:114
@ PBUF_LINK
Definition: tcpip.h:123
@ PBUF_IP
Definition: tcpip.h:118

◆ pbuf_type

enum pbuf_type

Enumeration of pbuf types

Enumerator
PBUF_RAM 

pbuf data is stored in RAM, used for TX mostly, struct pbuf and its payload are allocated in one piece of contiguous memory (so the first payload byte can be calculated from struct pbuf). pbuf_alloc() allocates PBUF_RAM pbufs as unchained pbufs (although that might change in future versions). This should be used for all OUTGOING packets (TX).

PBUF_ROM 

pbuf data is stored in ROM, i.e. struct pbuf and its payload are located in totally different memory areas. Since it points to ROM, payload does not have to be copied when queued for transmission.

PBUF_REF 

pbuf comes from the pbuf pool. Much like PBUF_ROM but payload might change so it has to be duplicated when queued before transmitting, depending on who has a 'ref' to it.

PBUF_POOL 

pbuf payload refers to RAM. This one comes from a pool and should be used for RX. Payload can be chained (scatter-gather RX) but like PBUF_RAM, struct pbuf and its payload are allocated in one piece of contiguous memory (so the first payload byte can be calculated from struct pbuf). Don't use this for TX, if the pool becomes empty e.g. because of TCP queuing, you are unable to receive TCP acks!

Definition at line 139 of file tcpip.h.

139  {
146  PBUF_RAM,
150  PBUF_ROM,
154  PBUF_REF,
161  PBUF_POOL
162 } pbuf_type;
pbuf_type
Definition: tcpip.h:139
@ PBUF_ROM
Definition: tcpip.h:150
@ PBUF_RAM
Definition: tcpip.h:146
@ PBUF_REF
Definition: tcpip.h:154
@ PBUF_POOL
Definition: tcpip.h:161

Function Documentation

◆ netif_alloc_client_data_id()

u8 netif_alloc_client_data_id ( void  )

Variable Documentation

◆ ip_addr_any

const ip_addr_t ip_addr_any
extern

Definition at line 58 of file ps2ipc.c.

◆ ip_addr_broadcast

const ip_addr_t ip_addr_broadcast
extern

◆ netif_default

struct netif* netif_default
extern

The default network interface.

◆ netif_list

struct netif* netif_list
extern

The list of network interfaces.