55 #define IP_PROTO_ICMP 1 56 #define IP_PROTO_UDP 17 57 #define IP_PROTO_UDPLITE 170 58 #define IP_PROTO_TCP 6 66 #define IP_HDRINCL NULL 73 #define IP_PCB struct ip_addr local_ip; \ 74 struct ip_addr remote_ip; \ 85 #define SOF_DEBUG (u16_t)0x0001U 86 #define SOF_ACCEPTCONN (u16_t)0x0002U 87 #define SOF_REUSEADDR (u16_t)0x0004U 88 #define SOF_KEEPALIVE (u16_t)0x0008U 89 #define SOF_DONTROUTE (u16_t)0x0010U 90 #define SOF_BROADCAST (u16_t)0x0020U 91 #define SOF_USELOOPBACK (u16_t)0x0040U 92 #define SOF_LINGER (u16_t)0x0080U 93 #define SOF_OOBINLINE (u16_t)0x0100U 94 #define SOF_REUSEPORT (u16_t)0x0200U 98 #ifdef PACK_STRUCT_USE_INCLUDES 99 # include "arch/bpstruct.h" 114 #define IP_OFFMASK 0x1fff 124 #ifdef PACK_STRUCT_USE_INCLUDES 125 # include "arch/epstruct.h" 128 #define IPH_V(hdr) (ntohs((hdr)->_v_hl_tos) >> 12) 129 #define IPH_HL(hdr) ((ntohs((hdr)->_v_hl_tos) >> 8) & 0x0f) 130 #define IPH_TOS(hdr) (ntohs((hdr)->_v_hl_tos) & 0xff) 131 #define IPH_LEN(hdr) ((hdr)->_len) 132 #define IPH_ID(hdr) ((hdr)->_id) 133 #define IPH_OFFSET(hdr) ((hdr)->_offset) 134 #define IPH_TTL(hdr) (ntohs((hdr)->_ttl_proto) >> 8) 135 #define IPH_PROTO(hdr) (ntohs((hdr)->_ttl_proto) & 0xff) 136 #define IPH_CHKSUM(hdr) ((hdr)->_chksum) 138 #define IPH_VHLTOS_SET(hdr, v, hl, tos) (hdr)->_v_hl_tos = (htons(((v) << 12) | ((hl) << 8) | (tos))) 139 #define IPH_LEN_SET(hdr, len) (hdr)->_len = (len) 140 #define IPH_ID_SET(hdr, id) (hdr)->_id = (id) 141 #define IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off) 142 #define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl_proto = (htons(IPH_PROTO(hdr) | ((ttl) << 8))) 143 #define IPH_PROTO_SET(hdr, proto) (hdr)->_ttl_proto = (htons((proto) | (IPH_TTL(hdr) << 8))) 144 #define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum) 149 #define ip_debug_print(p) s8_t err_t
Definition: err.h:39
NSUInteger _offset
Definition: Context.m:698
#define PACK_STRUCT_BEGIN
Definition: arch.h:46
PACK_STRUCT_BEGIN struct ip_hdr PACK_STRUCT_STRUCT
PACK_STRUCT_FIELD(u16_t _v_hl_tos)
err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif)
Definition: ip.c:376
void ip_init(void)
Definition: ip.c:68
#define ip_debug_print(p)
Definition: ip.h:149
struct netif * ip_route(struct ip_addr *dest)
Definition: ip.c:81
GLenum src
Definition: glext.h:6980
err_t ip_input(struct pbuf *p, struct netif *inp)
Definition: ip.c:173
GLfloat GLfloat p
Definition: glext.h:9809
#define PACK_STRUCT_END
Definition: arch.h:50
u8 u8_t
Definition: cc.h:43
const char * proto
Definition: civetweb.c:11575
err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t ttl, u8_t tos, u8_t proto)
Definition: ip.c:444
u16 u16_t
Definition: cc.h:45