48 #define IP_OPTIONS_SEND LWIP_IGMP 52 #define IP_PROTO_ICMP 1 53 #define IP_PROTO_IGMP 2 54 #define IP_PROTO_UDP 17 55 #define IP_PROTO_UDPLITE 136 56 #define IP_PROTO_TCP 6 64 #define IP_HDRINCL NULL 66 #if LWIP_NETIF_HWADDRHINT 67 #define IP_PCB_ADDRHINT ;u8_t addr_hint 69 #define IP_PCB_ADDRHINT 79 ip_addr_t remote_ip; \ 98 #define SOF_ACCEPTCONN (u8_t)0x02U 99 #define SOF_REUSEADDR (u8_t)0x04U 100 #define SOF_KEEPALIVE (u8_t)0x08U 102 #define SOF_BROADCAST (u8_t)0x20U 104 #define SOF_LINGER (u8_t)0x80U 109 #define SOF_INHERITED (SOF_REUSEADDR|SOF_KEEPALIVE|SOF_LINGER) 112 #ifdef PACK_STRUCT_USE_INCLUDES 113 # include "arch/bpstruct.h" 128 #define IP_OFFMASK 0x1fff 140 #ifdef PACK_STRUCT_USE_INCLUDES 141 # include "arch/epstruct.h" 144 #define IPH_V(hdr) (ntohs((hdr)->_v_hl_tos) >> 12) 145 #define IPH_HL(hdr) ((ntohs((hdr)->_v_hl_tos) >> 8) & 0x0f) 146 #define IPH_TOS(hdr) (ntohs((hdr)->_v_hl_tos) & 0xff) 147 #define IPH_LEN(hdr) ((hdr)->_len) 148 #define IPH_ID(hdr) ((hdr)->_id) 149 #define IPH_OFFSET(hdr) ((hdr)->_offset) 150 #define IPH_TTL(hdr) ((hdr)->_ttl) 151 #define IPH_PROTO(hdr) ((hdr)->_proto) 152 #define IPH_CHKSUM(hdr) ((hdr)->_chksum) 154 #define IPH_VHLTOS_SET(hdr, v, hl, tos) (hdr)->_v_hl_tos = (htons(((v) << 12) | ((hl) << 8) | (tos))) 155 #define IPH_LEN_SET(hdr, len) (hdr)->_len = (len) 156 #define IPH_ID_SET(hdr, id) (hdr)->_id = (id) 157 #define IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off) 158 #define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl = (u8_t)(ttl) 159 #define IPH_PROTO_SET(hdr, proto) (hdr)->_proto = (u8_t)(proto) 160 #define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum) 181 #if LWIP_NETIF_HWADDRHINT 193 #define ip_current_netif() (current_netif) 197 #define ip_current_header() (current_header) 199 #define ip_current_src_addr() (¤t_iphdr_src) 201 #define ip_current_dest_addr() (¤t_iphdr_dest) 206 #define ip_debug_print(p)
ip_addr_t current_iphdr_dest
#define ICACHE_FLASH_ATTR
struct netif * ip_route(ip_addr_t *dest) ICACHE_FLASH_ATTR
err_t ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif) ICACHE_FLASH_ATTR
#define ip_debug_print(p)
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
ip_addr_t current_iphdr_src
PACK_STRUCT_BEGIN struct ip_hdr PACK_STRUCT_STRUCT
struct netif * current_netif
#define PACK_STRUCT_BEGIN
struct netif * ip_router(ip_addr_t *dest, ip_addr_t *source)
err_t ip_input(struct pbuf *p, struct netif *inp) ICACHE_FLASH_ATTR
const struct ip_hdr * current_header
err_t ip_output(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto) ICACHE_FLASH_ATTR
#define PACK_STRUCT_FIELD(x)