6 #define UIP_INADDR_NONE ((u32_t) 0xffffffff) 7 #define UIP_INADDR_LOOPBACK ((u32_t) 0x7f000001) 9 #define UIP_IPH_V(hdr) (ntohs((hdr)->_v_hl_tos) >> 12) 10 #define UIP_IPH_HL(hdr) ((ntohs((hdr)->_v_hl_tos) >> 8) & 0x0f) 11 #define UIP_IPH_TOS(hdr) (ntohs((hdr)->_v_hl_tos) & 0xff) 12 #define UIP_IPH_LEN(hdr) ((hdr)->_len) 13 #define UIP_IPH_ID(hdr) ((hdr)->_id) 14 #define UIP_IPH_OFFSET(hdr) ((hdr)->_offset) 15 #define UIP_IPH_TTL(hdr) (ntohs((hdr)->_ttl_proto) >> 8) 16 #define UIP_IPH_PROTO(hdr) (ntohs((hdr)->_ttl_proto) & 0xff) 17 #define UIP_IPH_CHKSUM(hdr) ((hdr)->_chksum) 19 #define UIP_IPH_VHLTOS_SET(hdr, v, hl, tos) (hdr)->_v_hl_tos = (htons(((v) << 12) | ((hl) << 8) | (tos))) 20 #define UIP_IPH_LEN_SET(hdr, len) (hdr)->_len = (len) 21 #define UIP_IPH_ID_SET(hdr, id) (hdr)->_id = (id) 22 #define UIP_IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off) 23 #define UIP_IPH_TTL_SET(hdr, ttl) (hdr)->_ttl_proto = (htons(UIP_IPH_PROTO(hdr) | ((ttl) << 8))) 24 #define UIP_IPH_PROTO_SET(hdr, proto) (hdr)->_ttl_proto = (htons((proto) | (UIP_IPH_TTL(hdr) << 8))) 25 #define UIP_IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum) 30 #define UIP_SOF_DEBUG (u16_t)0x0001U 31 #define UIP_SOF_ACCEPTCONN (u16_t)0x0002U 32 #define UIP_SOF_REUSEADDR (u16_t)0x0004U 33 #define UIP_SOF_KEEPALIVE (u16_t)0x0008U 34 #define UIP_SOF_DONTROUTE (u16_t)0x0010U 35 #define UIP_SOF_BROADCAST (u16_t)0x0020U 36 #define UIP_SOF_USELOOPBACK (u16_t)0x0040U 37 #define UIP_SOF_LINGER (u16_t)0x0080U 38 #define UIP_SOF_OOBINLINE (u16_t)0x0100U 39 #define UIP_SOF_REUSEPORT (u16_t)0x0200U 41 #define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = htonl(((u32_t)(a & 0xff) << 24) | ((u32_t)(b & 0xff) << 16) | \ 42 ((u32_t)(c & 0xff) << 8) | (u32_t)(d & 0xff)) 44 #define ip_addr_set(dest, src) (dest)->addr = \ 56 #define ip_addr_netcmp(addr1, addr2, mask) (((addr1)->addr & \ 60 #define ip_addr_cmp(addr1, addr2) ((addr1)->addr == (addr2)->addr) 62 #define ip_addr_isany(addr1) ((addr1) == NULL || (addr1)->addr == 0) 64 #define ip_addr_isbroadcast uip_ipaddr_isbroadcast 66 #define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000)) 68 #define ip4_addr1(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 24) & 0xff) 69 #define ip4_addr2(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 16) & 0xff) 70 #define ip4_addr3(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff) 71 #define ip4_addr4(ipaddr) ((u16_t)(ntohl((ipaddr)->addr)) & 0xff) 96 #define UIP_IP_RF 0x8000 97 #define UIP_IP_DF 0x4000 98 #define UIP_IP_MF 0x2000 99 #define UIP_IP_OFFMASK 0x1fff 113 struct uip_ip_addr local_ip; \ 114 struct uip_ip_addr remote_ip; \
PACK_STRUCT_FIELD(u32_t addr)
s8 s8_t
Definition: cc.h:44
PACK_STRUCT_BEGIN struct uip_ip_addr PACK_STRUCT_STRUCT
NSUInteger _offset
Definition: Context.m:698
#define PACK_STRUCT_BEGIN
Definition: arch.h:46
Definition: uip_pbuf.h:27
PACK_STRUCT_FIELD(u16_t addrw[2])
struct uip_netif * uip_iproute(struct uip_ip_addr *dst)
Definition: uip_ip.c:253
void uip_ipinit()
Definition: uip_ip.c:410
u32_t uip_ipaddr(const u8_t *cp)
Definition: uip_ip.c:483
GLenum const GLvoid * addr
Definition: glext.h:10528
u8_t uip_ipaddr_isbroadcast(struct uip_ip_addr *addr, struct uip_netif *netif)
Definition: uip_ip.c:264
s8_t uip_ipoutput_if(struct uip_pbuf *p, struct uip_ip_addr *src, struct uip_ip_addr *dst, u8_t ttl, u8_t tos, u8_t proto, struct uip_netif *netif)
Definition: uip_ip.c:359
GLenum src
Definition: glext.h:6980
GLfloat GLfloat p
Definition: glext.h:9809
#define PACK_STRUCT_END
Definition: arch.h:50
s8_t uip_ipinput(struct uip_pbuf *p, struct uip_netif *inp)
Definition: uip_ip.c:280
u8 u8_t
Definition: cc.h:43
const char * proto
Definition: civetweb.c:11575
PACK_STRUCT_FIELD(u16_t _v_hl_tos)
s32 s32_t
Definition: cc.h:48
s32_t uip_ipaton(const u8_t *cp, struct in_addr *addr)
Definition: uip_ip.c:415
u32 u32_t
Definition: cc.h:47
GLenum GLenum dst
Definition: glext.h:6980
u32_t s_addr
Definition: ip_addr.h:65
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
s8_t uip_ipoutput(struct uip_pbuf *p, struct uip_ip_addr *src, struct uip_ip_addr *dst, u8_t ttl, u8_t tos, u8_t proto)
Definition: uip_ip.c:399
Definition: uip_netif.h:29
u16 u16_t
Definition: cc.h:45