57 #define UIP_IPH_LEN 40
58 #define UIP_FRAGH_LEN 8
60 #define UIP_IPH_LEN 20
63 #define UIP_UDPH_LEN 8
64 #define UIP_TCPH_LEN 20
65 #define UIP_ICMPH_LEN 4
67 #define UIP_IPUDPH_LEN (UIP_UDPH_LEN + UIP_IPH_LEN)
70 #define UIP_IPTCPH_LEN (UIP_TCPH_LEN + UIP_IPH_LEN)
73 #define UIP_TCPIP_HLEN UIP_IPTCPH_LEN
74 #define UIP_IPICMPH_LEN (UIP_IPH_LEN + UIP_ICMPH_LEN)
76 #define UIP_LLIPH_LEN (UIP_LLH_LEN + UIP_IPH_LEN)
85 #define uip_l2_l3_hdr_len (UIP_LLH_LEN + UIP_IPH_LEN + uip_ext_len)
86 #define uip_l2_l3_icmp_hdr_len (UIP_LLH_LEN + UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN)
87 #define uip_l3_hdr_len (UIP_IPH_LEN + uip_ext_len)
88 #define uip_l3_icmp_hdr_len (UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN)
106 typedef union uip_ip6addr_t {
112 typedef uip_ip6addr_t uip_ipaddr_t;
140 #if UIP_CONF_LL_802154
143 #define UIP_802154_SHORTADDR_LEN 2
144 #define UIP_802154_LONGADDR_LEN 8
145 #define UIP_LLADDR_LEN UIP_802154_LONGADDR_LEN
147 #if UIP_CONF_LL_80211
150 #define UIP_LLADDR_LEN 6
154 #define UIP_LLADDR_LEN 6
195 #define uip_sethostaddr(addr) uip_ipaddr_copy(&uip_hostaddr, (addr))
215 #define uip_gethostaddr(addr) uip_ipaddr_copy((addr), &uip_hostaddr)
227 #define uip_setdraddr(addr) uip_ipaddr_copy(&uip_draddr, (addr))
239 #define uip_setnetmask(addr) uip_ipaddr_copy(&uip_netmask, (addr))
250 #define uip_getdraddr(addr) uip_ipaddr_copy((addr), &uip_draddr)
260 #define uip_getnetmask(addr) uip_ipaddr_copy((addr), &uip_netmask)
346 #define uip_input() uip_process(UIP_DATA)
392 #define uip_periodic(conn) do { uip_conn = &uip_conns[conn]; \
393 uip_process(UIP_TIMER); } while (0)
399 #define uip_conn_active(conn) (uip_conns[conn].tcpstateflags != UIP_CLOSED)
414 #define uip_periodic_conn(conn) do { uip_conn = conn; \
415 uip_process(UIP_TIMER); } while (0)
428 #define uip_poll_conn(conn) do { uip_conn = conn; \
429 uip_process(UIP_POLL_REQUEST); } while (0)
465 #define uip_udp_periodic(conn) do { uip_udp_conn = &uip_udp_conns[conn]; \
466 uip_process(UIP_UDP_TIMER); } while(0)
482 #define uip_udp_periodic_conn(conn) do { uip_udp_conn = conn; \
483 uip_process(UIP_UDP_TIMER); } while(0)
522 #define uip_buf (uip_aligned_buf.u8)
612 #define uip_outstanding(conn) ((conn)->len)
651 #define uip_datalen() uip_len
662 #define uip_urgdatalen() uip_urglen
671 #define uip_close() (uip_flags = UIP_CLOSE)
682 #define uip_abort() (uip_flags = UIP_ABORT)
692 #define uip_stop() (uip_conn->tcpstateflags |= UIP_STOPPED)
700 #define uip_stopped(conn) ((conn)->tcpstateflags & UIP_STOPPED)
711 #define uip_restart() do { uip_flags |= UIP_NEWDATA; \
712 uip_conn->tcpstateflags &= ~UIP_STOPPED; \
727 #define uip_udpconnection() (uip_conn == NULL)
738 #define uip_newdata() (uip_flags & UIP_NEWDATA)
749 #define uip_acked() (uip_flags & UIP_ACKDATA)
761 #define uip_connected() (uip_flags & UIP_CONNECTED)
771 #define uip_closed() (uip_flags & UIP_CLOSE)
781 #define uip_aborted() (uip_flags & UIP_ABORT)
791 #define uip_timedout() (uip_flags & UIP_TIMEDOUT)
803 #define uip_rexmit() (uip_flags & UIP_REXMIT)
817 #define uip_poll() (uip_flags & UIP_POLL)
825 #define uip_initialmss() (uip_conn->initialmss)
838 #define uip_mss() (uip_conn->mss)
876 #define uip_udp_remove(conn) (conn)->lport = 0
888 #define uip_udp_bind(conn, port) (conn)->lport = port
901 #define uip_udp_send(len) uip_send((char *)uip_appdata, len)
927 #define uip_ipaddr_to_quad(a) (a)->u8[0],(a)->u8[1],(a)->u8[2],(a)->u8[3]
955 #define uip_ipaddr(addr, addr0,addr1,addr2,addr3) do { \
956 (addr)->u8[0] = addr0; \
957 (addr)->u8[1] = addr1; \
958 (addr)->u8[2] = addr2; \
959 (addr)->u8[3] = addr3; \
969 #define uip_ip6addr(addr, addr0,addr1,addr2,addr3,addr4,addr5,addr6,addr7) do { \
970 (addr)->u16[0] = UIP_HTONS(addr0); \
971 (addr)->u16[1] = UIP_HTONS(addr1); \
972 (addr)->u16[2] = UIP_HTONS(addr2); \
973 (addr)->u16[3] = UIP_HTONS(addr3); \
974 (addr)->u16[4] = UIP_HTONS(addr4); \
975 (addr)->u16[5] = UIP_HTONS(addr5); \
976 (addr)->u16[6] = UIP_HTONS(addr6); \
977 (addr)->u16[7] = UIP_HTONS(addr7); \
987 #define uip_ip6addr_u8(addr, addr0,addr1,addr2,addr3,addr4,addr5,addr6,addr7,addr8,addr9,addr10,addr11,addr12,addr13,addr14,addr15) do { \
988 (addr)->u8[0] = addr0; \
989 (addr)->u8[1] = addr1; \
990 (addr)->u8[2] = addr2; \
991 (addr)->u8[3] = addr3; \
992 (addr)->u8[4] = addr4; \
993 (addr)->u8[5] = addr5; \
994 (addr)->u8[6] = addr6; \
995 (addr)->u8[7] = addr7; \
996 (addr)->u8[8] = addr8; \
997 (addr)->u8[9] = addr9; \
998 (addr)->u8[10] = addr10; \
999 (addr)->u8[11] = addr11; \
1000 (addr)->u8[12] = addr12; \
1001 (addr)->u8[13] = addr13; \
1002 (addr)->u8[14] = addr14; \
1003 (addr)->u8[15] = addr15; \
1025 #ifndef uip_ipaddr_copy
1026 #define uip_ipaddr_copy(dest, src) (*(dest) = *(src))
1028 #ifndef uip_ip4addr_copy
1029 #define uip_ip4addr_copy(dest, src) (*(dest) = *(src))
1031 #ifndef uip_ip6addr_copy
1032 #define uip_ip6addr_copy(dest, src) (*(dest) = *(src))
1055 #define uip_ip4addr_cmp(addr1, addr2) ((addr1)->u16[0] == (addr2)->u16[0] && \
1056 (addr1)->u16[1] == (addr2)->u16[1])
1057 #define uip_ip6addr_cmp(addr1, addr2) (memcmp(addr1, addr2, sizeof(uip_ip6addr_t)) == 0)
1060 #define uip_ipaddr_cmp(addr1, addr2) uip_ip6addr_cmp(addr1, addr2)
1062 #define uip_ipaddr_cmp(addr1, addr2) uip_ip4addr_cmp(addr1, addr2)
1090 #define uip_ipaddr_maskcmp(addr1, addr2, mask) \
1091 (((((uint16_t *)addr1)[0] & ((uint16_t *)mask)[0]) == \
1092 (((uint16_t *)addr2)[0] & ((uint16_t *)mask)[0])) && \
1093 ((((uint16_t *)addr1)[1] & ((uint16_t *)mask)[1]) == \
1094 (((uint16_t *)addr2)[1] & ((uint16_t *)mask)[1])))
1096 #define uip_ipaddr_prefixcmp(addr1, addr2, length) (memcmp(addr1, addr2, length>>3) == 0)
1142 #define uip_ipaddr_mask(dest, src, mask) do { \
1143 ((uint16_t *)dest)[0] = ((uint16_t *)src)[0] & ((uint16_t *)mask)[0]; \
1144 ((uint16_t *)dest)[1] = ((uint16_t *)src)[1] & ((uint16_t *)mask)[1]; \
1165 #define uip_ipaddr1(addr) ((addr)->u8[0])
1185 #define uip_ipaddr2(addr) ((addr)->u8[1])
1205 #define uip_ipaddr3(addr) ((addr)->u8[2])
1225 #define uip_ipaddr4(addr) ((addr)->u8[3])
1237 # if UIP_BYTE_ORDER == UIP_BIG_ENDIAN
1238 # define UIP_HTONS(n) (n)
1239 # define UIP_HTONL(n) (n)
1241 # define UIP_HTONS(n) (uint16_t)((((uint16_t) (n)) << 8) | (((uint16_t) (n)) >> 8))
1242 # define UIP_HTONL(n) (((uint32_t)UIP_HTONS(n) << 16) | UIP_HTONS((uint32_t)(n) >> 16))
1245 #error "UIP_HTONS already defined!"
1259 #define uip_ntohs uip_htons
1263 CCIF uint32_t uip_htonl(uint32_t val);
1266 #define uip_ntohl uip_htonl
1286 extern void *uip_urgdata;
1322 extern uint16_t uip_urglen, uip_surglen;
1377 CCIF
extern struct uip_conn uip_conns[
UIP_CONNS];
1410 struct uip_fallback_interface {
1412 void (*output)(void);
1416 struct uip_icmp6_conn {
1417 uip_icmp6_appstate_t appstate;
1419 extern struct uip_icmp6_conn uip_icmp6_conns;
1427 #if UIP_STATISTICS == 1
1429 #define UIP_STAT(s) s
1482 uip_stats_t syndrop;
1521 CCIF
extern uint8_t uip_flags;
1530 #define UIP_ACKDATA 1
1534 #define UIP_NEWDATA 2
1536 #define UIP_REXMIT 4
1541 #define UIP_CLOSE 16
1546 #define UIP_ABORT 32
1551 #define UIP_CONNECTED 64
1556 #define UIP_TIMEDOUT 128
1588 #define UIP_POLL_REQUEST 3
1590 #define UIP_UDP_SEND_CONN 4
1594 #define UIP_UDP_TIMER 5
1598 #define UIP_CLOSED 0
1599 #define UIP_SYN_RCVD 1
1600 #define UIP_SYN_SENT 2
1601 #define UIP_ESTABLISHED 3
1602 #define UIP_FIN_WAIT_1 4
1603 #define UIP_FIN_WAIT_2 5
1604 #define UIP_CLOSING 6
1605 #define UIP_TIME_WAIT 7
1606 #define UIP_LAST_ACK 8
1607 #define UIP_TS_MASK 15
1609 #define UIP_STOPPED 16
1612 struct uip_tcpip_hdr {
1620 uip_ip6addr_t srcipaddr, destipaddr;
1631 uip_ipaddr_t srcipaddr, destipaddr;
1648 struct uip_icmpip_hdr {
1656 uip_ip6addr_t srcipaddr, destipaddr;
1667 uip_ipaddr_t srcipaddr, destipaddr;
1671 uint8_t type, icode;
1672 uint16_t icmpchksum;
1681 struct uip_udpip_hdr {
1689 uip_ip6addr_t srcipaddr, destipaddr;
1700 uip_ipaddr_t srcipaddr, destipaddr;
1724 uip_ip6addr_t srcipaddr, destipaddr;
1735 uip_ipaddr_t srcipaddr, destipaddr;
1761 typedef struct uip_ext_hdr {
1767 typedef struct uip_hbho_hdr {
1773 typedef struct uip_desto_hdr {
1788 typedef struct uip_routing_hdr {
1791 uint8_t routing_type;
1796 typedef struct uip_frag_hdr {
1799 uint16_t offsetresmore;
1807 typedef struct uip_ext_hdr_opt {
1813 typedef struct uip_ext_hdr_opt_padn {
1816 } uip_ext_hdr_opt_padn;
1819 typedef struct uip_ext_hdr_opt_rpl {
1824 uint16_t senderrank;
1825 } uip_ext_hdr_opt_rpl;
1828 struct uip_tcp_hdr {
1842 struct uip_icmp_hdr {
1843 uint8_t type, icode;
1844 uint16_t icmpchksum;
1852 struct uip_udp_hdr {
1874 #define UIP_APPDATA_SIZE (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN)
1875 #define UIP_APPDATA_PTR (void *)&uip_buf[UIP_LLH_LEN + UIP_TCPIP_HLEN]
1877 #define UIP_PROTO_ICMP 1
1878 #define UIP_PROTO_TCP 6
1879 #define UIP_PROTO_UDP 17
1880 #define UIP_PROTO_ICMP6 58
1886 #define UIP_PROTO_HBHO 0
1887 #define UIP_PROTO_DESTO 60
1888 #define UIP_PROTO_ROUTING 43
1889 #define UIP_PROTO_FRAG 44
1890 #define UIP_PROTO_NONE 59
1895 #define UIP_EXT_HDR_OPT_PAD1 0
1896 #define UIP_EXT_HDR_OPT_PADN 1
1897 #define UIP_EXT_HDR_OPT_RPL 0x63
1910 #define UIP_EXT_HDR_BITMAP_HBHO 0x01
1911 #define UIP_EXT_HDR_BITMAP_DESTO1 0x02
1912 #define UIP_EXT_HDR_BITMAP_ROUTING 0x04
1913 #define UIP_EXT_HDR_BITMAP_FRAG 0x08
1914 #define UIP_EXT_HDR_BITMAP_AH 0x10
1915 #define UIP_EXT_HDR_BITMAP_ESP 0x20
1916 #define UIP_EXT_HDR_BITMAP_DESTO2 0x40
1924 CCIF
extern const uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
1926 CCIF
extern uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
1928 CCIF
extern const uip_ipaddr_t uip_broadcast_addr;
1929 CCIF
extern const uip_ipaddr_t uip_all_zeroes_addr;
1931 #if UIP_FIXEDETHADDR
1942 #define UIP_LLPREF_LEN 10
1948 #define uip_is_addr_loopback(a) \
1949 ((((a)->u16[0]) == 0) && \
1950 (((a)->u16[1]) == 0) && \
1951 (((a)->u16[2]) == 0) && \
1952 (((a)->u16[3]) == 0) && \
1953 (((a)->u16[4]) == 0) && \
1954 (((a)->u16[5]) == 0) && \
1955 (((a)->u16[6]) == 0) && \
1956 (((a)->u8[14]) == 0) && \
1957 (((a)->u8[15]) == 0x01))
1962 #define uip_is_addr_unspecified(a) \
1963 ((((a)->u16[0]) == 0) && \
1964 (((a)->u16[1]) == 0) && \
1965 (((a)->u16[2]) == 0) && \
1966 (((a)->u16[3]) == 0) && \
1967 (((a)->u16[4]) == 0) && \
1968 (((a)->u16[5]) == 0) && \
1969 (((a)->u16[6]) == 0) && \
1970 (((a)->u16[7]) == 0))
1973 #define uip_is_addr_linklocal_allnodes_mcast(a) \
1974 ((((a)->u8[0]) == 0xff) && \
1975 (((a)->u8[1]) == 0x02) && \
1976 (((a)->u16[1]) == 0) && \
1977 (((a)->u16[2]) == 0) && \
1978 (((a)->u16[3]) == 0) && \
1979 (((a)->u16[4]) == 0) && \
1980 (((a)->u16[5]) == 0) && \
1981 (((a)->u16[6]) == 0) && \
1982 (((a)->u8[14]) == 0) && \
1983 (((a)->u8[15]) == 0x01))
1986 #define uip_is_addr_linklocal_allrouters_mcast(a) \
1987 ((((a)->u8[0]) == 0xff) && \
1988 (((a)->u8[1]) == 0x02) && \
1989 (((a)->u16[1]) == 0) && \
1990 (((a)->u16[2]) == 0) && \
1991 (((a)->u16[3]) == 0) && \
1992 (((a)->u16[4]) == 0) && \
1993 (((a)->u16[5]) == 0) && \
1994 (((a)->u16[6]) == 0) && \
1995 (((a)->u8[14]) == 0) && \
1996 (((a)->u8[15]) == 0x02))
2002 #define uip_is_addr_linklocal(a) \
2003 ((a)->u8[0] == 0xfe && \
2007 #define uip_create_unspecified(a) uip_ip6addr(a, 0, 0, 0, 0, 0, 0, 0, 0)
2010 #define uip_create_linklocal_allnodes_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0001)
2013 #define uip_create_linklocal_allrouters_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0002)
2014 #define uip_create_linklocal_prefix(addr) do { \
2015 (addr)->u16[0] = UIP_HTONS(0xfe80); \
2016 (addr)->u16[1] = 0; \
2017 (addr)->u16[2] = 0; \
2018 (addr)->u16[3] = 0; \
2025 #define uip_is_addr_solicited_node(a) \
2026 ((((a)->u8[0]) == 0xFF) && \
2027 (((a)->u8[1]) == 0x02) && \
2028 (((a)->u16[1]) == 0x00) && \
2029 (((a)->u16[2]) == 0x00) && \
2030 (((a)->u16[3]) == 0x00) && \
2031 (((a)->u16[4]) == 0x00) && \
2032 (((a)->u8[10]) == 0x00) && \
2033 (((a)->u8[11]) == 0x01) && \
2034 (((a)->u8[12]) == 0xFF))
2040 #define uip_create_solicited_node(a, b) \
2041 (((b)->u8[0]) = 0xFF); \
2042 (((b)->u8[1]) = 0x02); \
2043 (((b)->u16[1]) = 0); \
2044 (((b)->u16[2]) = 0); \
2045 (((b)->u16[3]) = 0); \
2046 (((b)->u16[4]) = 0); \
2047 (((b)->u8[10]) = 0); \
2048 (((b)->u8[11]) = 0x01); \
2049 (((b)->u8[12]) = 0xFF); \
2050 (((b)->u8[13]) = ((a)->u8[13])); \
2051 (((b)->u16[7]) = ((a)->u16[7]))
2058 #define uip_is_addr_link_local(a) \
2059 ((((a)->u8[0]) == 0xFE) && \
2060 (((a)->u8[1]) == 0x80))
2067 #if UIP_CONF_LL_802154
2068 #define uip_is_addr_mac_addr_based(a, m) \
2069 ((((a)->u8[8]) == (((m)->addr[0]) ^ 0x02)) && \
2070 (((a)->u8[9]) == (m)->addr[1]) && \
2071 (((a)->u8[10]) == (m)->addr[2]) && \
2072 (((a)->u8[11]) == (m)->addr[3]) && \
2073 (((a)->u8[12]) == (m)->addr[4]) && \
2074 (((a)->u8[13]) == (m)->addr[5]) && \
2075 (((a)->u8[14]) == (m)->addr[6]) && \
2076 (((a)->u8[15]) == (m)->addr[7]))
2079 #define uip_is_addr_mac_addr_based(a, m) \
2080 ((((a)->u8[8]) == (((m)->addr[0]) | 0x02)) && \
2081 (((a)->u8[9]) == (m)->addr[1]) && \
2082 (((a)->u8[10]) == (m)->addr[2]) && \
2083 (((a)->u8[11]) == 0xff) && \
2084 (((a)->u8[12]) == 0xfe) && \
2085 (((a)->u8[13]) == (m)->addr[3]) && \
2086 (((a)->u8[14]) == (m)->addr[4]) && \
2087 (((a)->u8[15]) == (m)->addr[5]))
2095 #define uip_is_addr_mcast(a) \
2096 (((a)->u8[0]) == 0xFF)
2102 #define uip_is_addr_mcast_global(a) \
2103 ((((a)->u8[0]) == 0xFF) && \
2104 (((a)->u8[1] & 0x0F) == 0x0E))
2112 #define uip_is_addr_mcast_non_routable(a) \
2113 ((((a)->u8[0]) == 0xFF) && \
2114 (((a)->u8[1] & 0x0F) <= 0x02))
2123 #define uip_is_addr_mcast_routable(a) \
2124 ((((a)->u8[0]) == 0xFF) && \
2125 (((a)->u8[1] & 0x0F) > 0x02))
2131 #define uip_is_mcast_group_id_all_nodes(a) \
2132 ((((a)->u16[1]) == 0) && \
2133 (((a)->u16[2]) == 0) && \
2134 (((a)->u16[3]) == 0) && \
2135 (((a)->u16[4]) == 0) && \
2136 (((a)->u16[5]) == 0) && \
2137 (((a)->u16[6]) == 0) && \
2138 (((a)->u8[14]) == 0) && \
2139 (((a)->u8[15]) == 1))
2145 #define uip_is_mcast_group_id_all_routers(a) \
2146 ((((a)->u16[1]) == 0) && \
2147 (((a)->u16[2]) == 0) && \
2148 (((a)->u16[3]) == 0) && \
2149 (((a)->u16[4]) == 0) && \
2150 (((a)->u16[5]) == 0) && \
2151 (((a)->u16[6]) == 0) && \
2152 (((a)->u8[14]) == 0) && \
2153 (((a)->u8[15]) == 2))
2160 #define uip_are_solicited_bytes_equal(a, b) \
2161 ((((a)->u8[13]) == ((b)->u8[13])) && \
2162 (((a)->u8[14]) == ((b)->u8[14])) && \
2163 (((a)->u8[15]) == ((b)->u8[15])))
2183 uint16_t
uip_chksum(uint16_t *buf, uint16_t len);
#define UIP_CONNS
The maximum number of simultaneously open TCP connections.
uint16_t uip_udpchksum(void)
Calculate the UDP checksum of the packet in uip_buf and uip_appdata.
struct uip_udp_conn * uip_udp_conn
The current UDP connection.
uint8_t uip_acc32[4]
4-byte array used for the 32-bit sequence number calculations.
uint16_t uip_ipchksum(void)
Calculate the IP header checksum of the packet header in uip_buf.
uip_len
The length of the packet in the uip_buf buffer.
uip_stats_t forwarded
Number of forwarded packets at the IP layer.
uint8_t sv
Retransmission time-out calculation state variable.
void uip_setipid(uint16_t id)
uIP initialization function.
union uip_ip4addr_t uip_ip4addr_t
Representation of an IP address.
CCIF uip_lladdr_t uip_lladdr
Host L2 address.
The structure holding the TCP/IP statistics that are gathered if UIP_STATISTICS is set to 1...
struct tcpip_uipstate uip_tcp_appstate_t
The type of the application state that is to be stored in the uip_conn structure. ...
uint16_t rport
The remote port number in network byte order.
Representation of a uIP TCP connection.
Header for the Contiki/uIP interface.
CCIF void uip_send(const void *data, int len)
Send data on the current connection.
uint8_t nrtx
The number of retransmissions for the last segment sent.
uint16_t uip_chksum(uint16_t *buf, uint16_t len)
Calculate the Internet checksum over a buffer.
uip_stats_t protoerr
Number of packets dropped because they were neither ICMP, UDP nor TCP.
CCIF uip_buf_t uip_aligned_buf
Packet buffer for incoming and outgoing packets.
uint16_t mss
Current maximum segment size for the connection.
uint16_t lport
The local TCP port, in network byte order.
uint8_t timer
The retransmission timer.
uint16_t len
Length of the data that was previously sent.
uip_stats_t fragerr
Number of packets dropped because they were IP fragments.
uip_eth_addr uip_lladdr_t
Ethernet address.
void uip_listen(uint16_t port)
Start listening to the specified port.
uint16_t lport
The local port number in network byte order.
#define UIP_BUFSIZE
The size of the uIP packet buffer.
struct uip_conn * uip_connect(uip_ipaddr_t *ripaddr, uint16_t port)
Connect to a remote host using TCP.
uip_tcp_appstate_t appstate
The application state.
uip_stats_t sent
Number of sent packets at the IP layer.
void uip_reass_over(void)
Periodic processing for a connection identified by its number.
webserver_log_file & uip_conn
Pointer to the current TCP connection.
uip_ipaddr_t ripaddr
The IP address of the remote peer.
struct uip_80211_addr uip_80211_addr
802.11 address
uint16_t uip_tcpchksum(void)
Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
void uip_unlisten(uint16_t port)
Stop listening to the specified port.
uip_stats_t lblenerr
Number of packets dropped due to wrong IP length, low byte.
uint16_t rport
The local remote TCP port, in network byte order.
Representation of an IP address.
uint16_t uip_icmp6chksum(void)
Calculate the ICMP checksum of the packet in uip_buf.
uint8_t rcv_nxt[4]
The sequence number that we expect to receive next.
Configuration options for uIP.
uip_stats_t drop
Number of dropped packets at the IP layer.
uint8_t rto
Retransmission time-out.
uint16_t initialmss
Initial maximum segment size for the connection.
CCIF uint16_t uip_htons(uint16_t val)
Convert a 16-bit quantity from host byte order to network byte order.
uint8_t uip_ext_len
The length of the extension headers.
struct uip_stats::@31 ip
IP statistics.
void uip_init(void)
uIP initialization function.
struct tcpip_uipstate uip_udp_appstate_t
The type of the application state that is to be stored in the uip_conn structure. ...
uint8_t tcpstateflags
TCP state and flags.
uint8_t sa
Retransmission time-out calculation state variable.
uint8_t snd_nxt[4]
The sequence number that was last sent by us.
uip_stats_t hblenerr
Number of packets dropped due to wrong IP length, high byte.
uip_stats_t recv
Number of received packets at the IP layer.
struct uip_802154_longaddr uip_802154_longaddr
64 bit 802.15.4 address
uip_stats_t typeerr
Number of ICMP packets with a wrong type.
void uip_process(uint8_t flag)
process the options within a hop by hop or destination option header
#define UIP_UDP_CONNS
The maximum amount of concurrent UDP connections.
struct uip_udp_conn * uip_udp_new(const uip_ipaddr_t *ripaddr, uint16_t rport)
Set up a new UDP connection.
struct uip_stats::@32 icmp
ICMP statistics.
uip_ipaddr_t ripaddr
The IP address of the remote host.
Representation of a uIP UDP connection.
struct uip_802154_shortaddr uip_802154_shortaddr
16 bit 802.15.4 address
struct uip_eth_addr uip_eth_addr
802.3 address
uip_appdata
Pointer to the application data in the packet buffer.
uip_udp_appstate_t appstate
The application state.
uip_stats_t chkerr
Number of packets dropped due to IP checksum errors.
uint8_t ttl
Default time-to-live.
uip_stats_t vhlerr
Number of packets dropped due to wrong IP version or header length.