57#define UIP_FRAGH_LEN 8
60#define UIP_TCPH_LEN 20
61#define UIP_ICMPH_LEN 4
63#define UIP_IPUDPH_LEN (UIP_UDPH_LEN + UIP_IPH_LEN)
64#define UIP_IPTCPH_LEN (UIP_TCPH_LEN + UIP_IPH_LEN)
66#define uip_l3_icmp_hdr_len (UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN)
71#define UIP_IP_BUF ((struct uip_ip_hdr *)uip_buf)
72#define UIP_IP_PAYLOAD(ext) ((unsigned char *)uip_buf + UIP_IPH_LEN + (ext))
77#define UIP_ICMP_BUF ((struct uip_icmp_hdr *)UIP_IP_PAYLOAD(uip_ext_len))
78#define UIP_ICMP_PAYLOAD ((unsigned char *)UIP_IP_PAYLOAD(uip_ext_len) + UIP_ICMPH_LEN)
79#define UIP_UDP_BUF ((struct uip_udp_hdr *)UIP_IP_PAYLOAD(uip_ext_len))
80#define UIP_UDP_PAYLOAD ((unsigned char *)UIP_IP_PAYLOAD(uip_ext_len) + UIP_UDPH_LEN)
81#define UIP_TCP_BUF ((struct uip_tcp_hdr *)UIP_IP_PAYLOAD(uip_ext_len))
82#define UIP_TCP_PAYLOAD ((unsigned char *)UIP_IP_PAYLOAD(uip_ext_len) + UIP_TCPH_LEN)
85#include "net/ipv6/uipbuf.h"
100typedef union uip_ip6addr_t {
105typedef uip_ip6addr_t uip_ipaddr_t;
108#define UIP_802154_SHORTADDR_LEN 2
109#define UIP_802154_LONGADDR_LEN 8
113 uint8_t addr[UIP_802154_SHORTADDR_LEN];
117 uint8_t addr[UIP_802154_LONGADDR_LEN];
131#ifndef UIP_CONF_LL_802154
132#define UIP_CONF_LL_802154 1
135#if UIP_CONF_LL_802154
137#if LINKADDR_SIZE == UIP_802154_LONGADDR_LEN
139#elif LINKADDR_SIZE == UIP_802154_SHORTADDR_LEN
142#error unsupported configuration of LINKADDR_SIZE
145#define UIP_LLADDR_LEN LINKADDR_SIZE
151#define UIP_LLADDR_LEN 6
156#define UIP_LLADDR_LEN 6
197#define uip_sethostaddr(addr) uip_ipaddr_copy(&uip_hostaddr, (addr))
217#define uip_gethostaddr(addr) uip_ipaddr_copy((addr), &uip_hostaddr)
303#define uip_input() uip_process(UIP_DATA)
349#define uip_periodic(conn) do { uip_conn = &uip_conns[conn]; \
350 uip_process(UIP_TIMER); } while (0)
358#define uip_conn_active(conn) (uip_conns[conn].tcpstateflags != UIP_CLOSED)
373#define uip_periodic_conn(conn) do { uip_conn = conn; \
374 uip_process(UIP_TIMER); } while (0)
387#define uip_poll_conn(conn) do { uip_conn = conn; \
388 uip_process(UIP_POLL_REQUEST); } while (0)
424#define uip_udp_periodic(conn) do { uip_udp_conn = &uip_udp_conns[conn]; \
425 uip_process(UIP_UDP_TIMER); } while(0)
441#define uip_udp_periodic_conn(conn) do { uip_udp_conn = conn; \
442 uip_process(UIP_UDP_TIMER); } while(0)
465#define uip_buf (uip_aligned_buf.u8)
555#define uip_outstanding(conn) ((conn)->len)
593#define uip_datalen() uip_len
604#define uip_urgdatalen() uip_urglen
613#define uip_close() (uip_flags = UIP_CLOSE)
624#define uip_abort() (uip_flags = UIP_ABORT)
634#define uip_stop() (uip_conn->tcpstateflags |= UIP_STOPPED)
642#define uip_stopped(conn) ((conn)->tcpstateflags & UIP_STOPPED)
653#define uip_restart() do { uip_flags |= UIP_NEWDATA; \
654 uip_conn->tcpstateflags &= ~UIP_STOPPED; \
669#define uip_udpconnection() (uip_conn == NULL)
680#define uip_newdata() (uip_flags & UIP_NEWDATA)
691#define uip_acked() (uip_flags & UIP_ACKDATA)
703#define uip_connected() (uip_flags & UIP_CONNECTED)
713#define uip_closed() (uip_flags & UIP_CLOSE)
723#define uip_aborted() (uip_flags & UIP_ABORT)
733#define uip_timedout() (uip_flags & UIP_TIMEDOUT)
745#define uip_rexmit() (uip_flags & UIP_REXMIT)
759#define uip_poll() (uip_flags & UIP_POLL)
767#define uip_initialmss() (uip_conn->initialmss)
780#define uip_mss() (uip_conn->mss)
818#define uip_udp_remove(conn) (conn)->lport = 0
830#define uip_udp_bind(conn, port) (conn)->lport = port
843#define uip_udp_send(len) uip_send((char *)uip_appdata, len)
870#define uip_ipaddr_to_quad(a) (a)->u8[0],(a)->u8[1],(a)->u8[2],(a)->u8[3]
898#define uip_ipaddr(addr, addr0,addr1,addr2,addr3) do { \
899 (addr)->u8[0] = addr0; \
900 (addr)->u8[1] = addr1; \
901 (addr)->u8[2] = addr2; \
902 (addr)->u8[3] = addr3; \
912#define uip_ip6addr(addr, addr0,addr1,addr2,addr3,addr4,addr5,addr6,addr7) do { \
913 (addr)->u16[0] = UIP_HTONS(addr0); \
914 (addr)->u16[1] = UIP_HTONS(addr1); \
915 (addr)->u16[2] = UIP_HTONS(addr2); \
916 (addr)->u16[3] = UIP_HTONS(addr3); \
917 (addr)->u16[4] = UIP_HTONS(addr4); \
918 (addr)->u16[5] = UIP_HTONS(addr5); \
919 (addr)->u16[6] = UIP_HTONS(addr6); \
920 (addr)->u16[7] = UIP_HTONS(addr7); \
930#define uip_ip6addr_u8(addr, addr0,addr1,addr2,addr3,addr4,addr5,addr6,addr7,addr8,addr9,addr10,addr11,addr12,addr13,addr14,addr15) do { \
931 (addr)->u8[0] = addr0; \
932 (addr)->u8[1] = addr1; \
933 (addr)->u8[2] = addr2; \
934 (addr)->u8[3] = addr3; \
935 (addr)->u8[4] = addr4; \
936 (addr)->u8[5] = addr5; \
937 (addr)->u8[6] = addr6; \
938 (addr)->u8[7] = addr7; \
939 (addr)->u8[8] = addr8; \
940 (addr)->u8[9] = addr9; \
941 (addr)->u8[10] = addr10; \
942 (addr)->u8[11] = addr11; \
943 (addr)->u8[12] = addr12; \
944 (addr)->u8[13] = addr13; \
945 (addr)->u8[14] = addr14; \
946 (addr)->u8[15] = addr15; \
968#ifndef uip_ipaddr_copy
969#define uip_ipaddr_copy(dest, src) (*(dest) = *(src))
971#ifndef uip_ip4addr_copy
972#define uip_ip4addr_copy(dest, src) (*((uip_ip4addr_t *)dest) = *((uip_ip4addr_t *)src))
974#ifndef uip_ip6addr_copy
975#define uip_ip6addr_copy(dest, src) (*((uip_ip6addr_t *)dest) = *((uip_ip6addr_t *)src))
998#define uip_ip4addr_cmp(addr1, addr2) ((addr1)->u16[0] == (addr2)->u16[0] && \
999 (addr1)->u16[1] == (addr2)->u16[1])
1000#define uip_ip6addr_cmp(addr1, addr2) (memcmp(addr1, addr2, sizeof(uip_ip6addr_t)) == 0)
1002#define uip_ipaddr_cmp(addr1, addr2) uip_ip6addr_cmp(addr1, addr2)
1029#define uip_ipaddr_maskcmp(addr1, addr2, mask) \
1030 (((((uint16_t *)addr1)[0] & ((uint16_t *)mask)[0]) == \
1031 (((uint16_t *)addr2)[0] & ((uint16_t *)mask)[0])) && \
1032 ((((uint16_t *)addr1)[1] & ((uint16_t *)mask)[1]) == \
1033 (((uint16_t *)addr2)[1] & ((uint16_t *)mask)[1])))
1035#define uip_ipaddr_prefixcmp(addr1, addr2, length) (memcmp(addr1, addr2, length>>3) == 0)
1061#define uip_ipaddr_mask(dest, src, mask) do { \
1062 ((uint16_t *)dest)[0] = ((uint16_t *)src)[0] & ((uint16_t *)mask)[0]; \
1063 ((uint16_t *)dest)[1] = ((uint16_t *)src)[1] & ((uint16_t *)mask)[1]; \
1084#define uip_ipaddr1(addr) ((addr)->u8[0])
1104#define uip_ipaddr2(addr) ((addr)->u8[1])
1124#define uip_ipaddr3(addr) ((addr)->u8[2])
1144#define uip_ipaddr4(addr) ((addr)->u8[3])
1156# if UIP_BYTE_ORDER == UIP_BIG_ENDIAN
1157# define UIP_HTONS(n) (n)
1158# define UIP_HTONL(n) (n)
1160# define UIP_HTONS(n) (uint16_t)((((uint16_t) (n)) << 8) | (((uint16_t) (n)) >> 8))
1161# define UIP_HTONL(n) (((uint32_t)UIP_HTONS(n) << 16) | UIP_HTONS((uint32_t)(n) >> 16))
1164#error "UIP_HTONS already defined!"
1178#define uip_ntohs uip_htons
1182uint32_t uip_htonl(uint32_t val);
1185#define uip_ntohl uip_htonl
1205extern void *uip_urgdata;
1245extern uint16_t uip_urglen, uip_surglen;
1324struct uip_fallback_interface {
1336struct uip_icmp6_conn {
1337 uip_icmp6_appstate_t appstate;
1347#if UIP_STATISTICS == 1
1349#define UIP_STAT(s) s
1432#define UIP_ETHTYPE_ARP 0x0806
1433#define UIP_ETHTYPE_IP 0x0800
1434#define UIP_ETHTYPE_IPV6 0x86dd
1442extern uint8_t uip_flags;
1451#define UIP_ACKDATA 1
1455#define UIP_NEWDATA 2
1472#define UIP_CONNECTED 64
1477#define UIP_TIMEDOUT 128
1494void uip_process(uint8_t flag);
1509#define UIP_POLL_REQUEST 3
1511#define UIP_UDP_SEND_CONN 4
1515#define UIP_UDP_TIMER 5
1520#define UIP_SYN_RCVD 1
1521#define UIP_SYN_SENT 2
1522#define UIP_ESTABLISHED 3
1523#define UIP_FIN_WAIT_1 4
1524#define UIP_FIN_WAIT_2 5
1525#define UIP_CLOSING 6
1526#define UIP_TIME_WAIT 7
1527#define UIP_LAST_ACK 8
1528#define UIP_TS_MASK 15
1530#define UIP_STOPPED 16
1546 uip_ip6addr_t srcipaddr, destipaddr;
1571typedef struct uip_ext_hdr {
1577typedef struct uip_hbho_hdr {
1583typedef struct uip_desto_hdr {
1598typedef struct uip_routing_hdr {
1601 uint8_t routing_type;
1606typedef struct uip_rpl_srh_hdr {
1609 uint8_t reserved[2];
1613typedef struct uip_frag_hdr {
1616 uint16_t offsetresmore;
1624typedef struct uip_ext_hdr_opt {
1630typedef struct uip_ext_hdr_opt_padn {
1633} uip_ext_hdr_opt_padn;
1636typedef struct uip_ext_hdr_opt_rpl {
1641 uint16_t senderrank;
1642} uip_ext_hdr_opt_rpl;
1659struct uip_icmp_hdr {
1660 uint8_t type, icode;
1661 uint16_t icmpchksum;
1688#define UIP_APPDATA_SIZE (UIP_BUFSIZE - UIP_IPTCPH_LEN)
1690#define UIP_PROTO_ICMP 1
1691#define UIP_PROTO_TCP 6
1692#define UIP_PROTO_UDP 17
1693#define UIP_PROTO_ICMP6 58
1698#define UIP_PROTO_HBHO 0
1699#define UIP_PROTO_DESTO 60
1700#define UIP_PROTO_ROUTING 43
1701#define UIP_PROTO_FRAG 44
1702#define UIP_PROTO_NONE 59
1705#define uip_is_proto_ext_hdr(proto) ((proto) != UIP_PROTO_TCP && (proto) != UIP_PROTO_UDP && (proto) != UIP_PROTO_ICMP6)
1709#define UIP_EXT_HDR_OPT_PAD1 0
1710#define UIP_EXT_HDR_OPT_PADN 1
1711#define UIP_EXT_HDR_OPT_RPL 0x63
1712#define UIP_EXT_HDR_OPT_MPL 0x6D
1725#define UIP_EXT_HDR_BITMAP_HBHO 0x01
1726#define UIP_EXT_HDR_BITMAP_DESTO1 0x02
1727#define UIP_EXT_HDR_BITMAP_ROUTING 0x04
1728#define UIP_EXT_HDR_BITMAP_FRAG 0x08
1729#define UIP_EXT_HDR_BITMAP_AH 0x10
1730#define UIP_EXT_HDR_BITMAP_ESP 0x20
1731#define UIP_EXT_HDR_BITMAP_DESTO2 0x40
1735extern uip_ipaddr_t uip_hostaddr;
1736extern const uip_ipaddr_t uip_all_zeroes_addr;
1740#define UIP_LLPREF_LEN 10
1746#define uip_is_addr_loopback(a) \
1747 ((((a)->u16[0]) == 0) && \
1748 (((a)->u16[1]) == 0) && \
1749 (((a)->u16[2]) == 0) && \
1750 (((a)->u16[3]) == 0) && \
1751 (((a)->u16[4]) == 0) && \
1752 (((a)->u16[5]) == 0) && \
1753 (((a)->u16[6]) == 0) && \
1754 (((a)->u8[14]) == 0) && \
1755 (((a)->u8[15]) == 0x01))
1760#define uip_is_addr_unspecified(a) \
1761 ((((a)->u16[0]) == 0) && \
1762 (((a)->u16[1]) == 0) && \
1763 (((a)->u16[2]) == 0) && \
1764 (((a)->u16[3]) == 0) && \
1765 (((a)->u16[4]) == 0) && \
1766 (((a)->u16[5]) == 0) && \
1767 (((a)->u16[6]) == 0) && \
1768 (((a)->u16[7]) == 0))
1771#define uip_is_addr_linklocal_allnodes_mcast(a) \
1772 ((((a)->u8[0]) == 0xff) && \
1773 (((a)->u8[1]) == 0x02) && \
1774 (((a)->u16[1]) == 0) && \
1775 (((a)->u16[2]) == 0) && \
1776 (((a)->u16[3]) == 0) && \
1777 (((a)->u16[4]) == 0) && \
1778 (((a)->u16[5]) == 0) && \
1779 (((a)->u16[6]) == 0) && \
1780 (((a)->u8[14]) == 0) && \
1781 (((a)->u8[15]) == 0x01))
1784#define uip_is_addr_linklocal_allrouters_mcast(a) \
1785 ((((a)->u8[0]) == 0xff) && \
1786 (((a)->u8[1]) == 0x02) && \
1787 (((a)->u16[1]) == 0) && \
1788 (((a)->u16[2]) == 0) && \
1789 (((a)->u16[3]) == 0) && \
1790 (((a)->u16[4]) == 0) && \
1791 (((a)->u16[5]) == 0) && \
1792 (((a)->u16[6]) == 0) && \
1793 (((a)->u8[14]) == 0) && \
1794 (((a)->u8[15]) == 0x02))
1801#define uip_is_addr_linklocal(a) \
1802 ((a)->u8[0] == 0xfe && \
1806#define uip_create_unspecified(a) uip_ip6addr(a, 0, 0, 0, 0, 0, 0, 0, 0)
1809#define uip_create_linklocal_allnodes_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0001)
1812#define uip_create_linklocal_allrouters_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0002)
1813#define uip_create_linklocal_prefix(addr) do { \
1814 (addr)->u16[0] = UIP_HTONS(0xfe80); \
1815 (addr)->u16[1] = 0; \
1816 (addr)->u16[2] = 0; \
1817 (addr)->u16[3] = 0; \
1824#define uip_is_addr_solicited_node(a) \
1825 ((((a)->u8[0]) == 0xFF) && \
1826 (((a)->u8[1]) == 0x02) && \
1827 (((a)->u16[1]) == 0x00) && \
1828 (((a)->u16[2]) == 0x00) && \
1829 (((a)->u16[3]) == 0x00) && \
1830 (((a)->u16[4]) == 0x00) && \
1831 (((a)->u8[10]) == 0x00) && \
1832 (((a)->u8[11]) == 0x01) && \
1833 (((a)->u8[12]) == 0xFF))
1839#define uip_create_solicited_node(a, b) \
1840 (((b)->u8[0]) = 0xFF); \
1841 (((b)->u8[1]) = 0x02); \
1842 (((b)->u16[1]) = 0); \
1843 (((b)->u16[2]) = 0); \
1844 (((b)->u16[3]) = 0); \
1845 (((b)->u16[4]) = 0); \
1846 (((b)->u8[10]) = 0); \
1847 (((b)->u8[11]) = 0x01); \
1848 (((b)->u8[12]) = 0xFF); \
1849 (((b)->u8[13]) = ((a)->u8[13])); \
1850 (((b)->u16[7]) = ((a)->u16[7]))
1857#if UIP_CONF_LL_802154
1858#if UIP_LLADDR_LEN == UIP_802154_LONGADDR_LEN
1859#define uip_is_addr_mac_addr_based(a, m) \
1860 ((((a)->u8[8]) == (((m)->addr[0]) ^ 0x02)) && \
1861 (((a)->u8[9]) == (m)->addr[1]) && \
1862 (((a)->u8[10]) == (m)->addr[2]) && \
1863 (((a)->u8[11]) == (m)->addr[3]) && \
1864 (((a)->u8[12]) == (m)->addr[4]) && \
1865 (((a)->u8[13]) == (m)->addr[5]) && \
1866 (((a)->u8[14]) == (m)->addr[6]) && \
1867 (((a)->u8[15]) == (m)->addr[7]))
1869#define uip_is_addr_mac_addr_based(a, m) (((a)->u16[4] == 0x0000) \
1870 && ((a)->u8[10] == 0x00) \
1871 && ((a)->u8[11] == 0xff) \
1872 && ((a)->u8[12] == 0xfe) \
1873 && ((a)->u8[13] == 0x00) \
1874 && ((a)->u8[14] == (m)->addr[0]) \
1875 && ((a)->u8[15] == (m)->addr[1]))
1879#define uip_is_addr_mac_addr_based(a, m) \
1880 ((((a)->u8[8]) == (((m)->addr[0]) | 0x02)) && \
1881 (((a)->u8[9]) == (m)->addr[1]) && \
1882 (((a)->u8[10]) == (m)->addr[2]) && \
1883 (((a)->u8[11]) == 0xff) && \
1884 (((a)->u8[12]) == 0xfe) && \
1885 (((a)->u8[13]) == (m)->addr[3]) && \
1886 (((a)->u8[14]) == (m)->addr[4]) && \
1887 (((a)->u8[15]) == (m)->addr[5]))
1895#define uip_is_addr_mcast(a) \
1896 (((a)->u8[0]) == 0xFF)
1902#define uip_is_addr_mcast_global(a) \
1903 ((((a)->u8[0]) == 0xFF) && \
1904 (((a)->u8[1] & 0x0F) == 0x0E))
1912#define uip_is_addr_mcast_non_routable(a) \
1913 ((((a)->u8[0]) == 0xFF) && \
1914 (((a)->u8[1] & 0x0F) <= 0x02))
1923#define uip_is_addr_mcast_routable(a) \
1924 ((((a)->u8[0]) == 0xFF) && \
1925 (((a)->u8[1] & 0x0F) > 0x02))
1931#define uip_is_mcast_group_id_all_nodes(a) \
1932 ((((a)->u16[1]) == 0) && \
1933 (((a)->u16[2]) == 0) && \
1934 (((a)->u16[3]) == 0) && \
1935 (((a)->u16[4]) == 0) && \
1936 (((a)->u16[5]) == 0) && \
1937 (((a)->u16[6]) == 0) && \
1938 (((a)->u8[14]) == 0) && \
1939 (((a)->u8[15]) == 1))
1945#define uip_is_mcast_group_id_all_routers(a) \
1946 ((((a)->u16[1]) == 0) && \
1947 (((a)->u16[2]) == 0) && \
1948 (((a)->u16[3]) == 0) && \
1949 (((a)->u16[4]) == 0) && \
1950 (((a)->u16[5]) == 0) && \
1951 (((a)->u16[6]) == 0) && \
1952 (((a)->u8[14]) == 0) && \
1953 (((a)->u8[15]) == 2))
1960#define uip_are_solicited_bytes_equal(a, b) \
1961 ((((a)->u8[13]) == ((b)->u8[13])) && \
1962 (((a)->u8[14]) == ((b)->u8[14])) && \
1963 (((a)->u8[15]) == ((b)->u8[15])))
1981uint16_t
uip_chksum(uint16_t *data, uint16_t len);
static uint8_t output(const linkaddr_t *localdest)
Take an IP packet and format it to be sent on an 802.15.4 network using 6lowpan.
struct uip_80211_addr uip_80211_addr
802.11 address
union uip_ip4addr_t uip_ip4addr_t
Representation of an IP address.
struct uip_udp_conn * uip_udp_conn
The current UDP connection.
uint16_t uip_icmp6chksum(void)
Calculate the ICMP checksum of the packet in uip_buf.
uip_lladdr_t uip_lladdr
Host L2 address.
void * uip_appdata
Pointer to the application data in the packet buffer.
struct uip_icmp6_conn uip_icmp6_conns
single possible icmpv6 "connection"
uint16_t uip_ipchksum(void)
Calculate the IP header checksum of the packet header in uip_buf.
struct uip_conn * uip_conn
Pointer to the current TCP connection.
struct uip_802154_shortaddr uip_802154_shortaddr
16 bit 802.15.4 address
bool uip_remove_ext_hdr(void)
Removes all IPv6 extension headers from uip_buf, updates length fields (uip_len and uip_ext_len)
uint16_t uip_tcpchksum(void)
Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
uint16_t uip_chksum(uint16_t *data, uint16_t len)
Calculate the Internet checksum over a buffer.
struct uip_eth_addr uip_eth_addr
802.3 address
uint16_t uip_udpchksum(void)
Calculate the UDP checksum of the packet in uip_buf and uip_appdata.
struct uip_802154_longaddr uip_802154_longaddr
64 bit 802.15.4 address
void uip_send(const void *data, int len)
Send data on the current connection.
struct uip_conn * uip_connect(const uip_ipaddr_t *ripaddr, uint16_t port)
Connect to a remote host using TCP.
void uip_listen(uint16_t port)
Start listening to the specified port.
struct uip_udp_conn * uip_udp_new(const uip_ipaddr_t *ripaddr, uint16_t rport)
Set up a new UDP connection.
void uip_unlisten(uint16_t port)
Stop listening to the specified port.
uint8_t uip_acc32[4]
4-byte array used for the 32-bit sequence number calculations.
uint16_t uip_htons(uint16_t val)
Convert a 16-bit quantity from host byte order to network byte order.
uip_buf_t uip_aligned_buf
Packet buffer for incoming and outgoing packets.
void uip_reass_over(void)
Abandon the reassembly of the current packet.
uint16_t uip_ext_len
The length of the extension headers.
uint16_t uip_len
The length of the packet in the uip_buf buffer.
uint8_t uip_last_proto
The final protocol after IPv6 extension headers: UIP_PROTO_TCP, UIP_PROTO_UDP or UIP_PROTO_ICMP6.
void uip_init(void)
uIP initialization function.
void uip_setipid(uint16_t id)
uIP initialization function.
struct tcpip_uipstate uip_tcp_appstate_t
The type of the application state that is to be stored in the uip_conn structure.
struct tcpip_uipstate uip_udp_appstate_t
The type of the application state that is to be stored in the uip_conn structure.
#define UIP_BUFSIZE
The size of the uIP packet buffer.
#define UIP_TCP_CONNS
The maximum number of simultaneously open TCP connections.
#define UIP_UDP_CONNS
The maximum amount of concurrent UDP connections.
Header file for the link-layer address representation.
Representation of a uIP TCP connection.
uint8_t rcv_nxt[4]
The sequence number that we expect to receive next.
uint8_t timer
The retransmission timer.
uint16_t mss
Current maximum segment size for the connection.
uint8_t sa
Retransmission time-out calculation state variable.
uint16_t len
Length of the data that was previously sent.
uint16_t lport
The local TCP port, in network byte order.
uint16_t rport
The local remote TCP port, in network byte order.
uip_ipaddr_t ripaddr
The IP address of the remote host.
uint8_t sv
Retransmission time-out calculation state variable.
uint8_t nrtx
The number of retransmissions for the last segment sent.
uint16_t initialmss
Initial maximum segment size for the connection.
uint8_t snd_nxt[4]
The sequence number that was last sent by us.
uint8_t tcpstateflags
TCP state and flags.
uint8_t rto
Retransmission time-out.
The structure holding the TCP/IP statistics that are gathered if UIP_STATISTICS is set to 1.
uip_stats_t forwarded
Number of forwarded packets at the IP layer.
uip_stats_t hblenerr
Number of packets dropped due to wrong IP length, high byte.
struct uip_stats::@47 tcp
TCP statistics.
uip_stats_t rexmit
Number of retransmitted TCP segments.
uip_stats_t syndrop
Number of dropped SYNs because too few connections were available.
uip_stats_t drop
Number of dropped packets at the IP layer.
uip_stats_t lblenerr
Number of packets dropped due to wrong IP length, low byte.
struct uip_stats::@45 ip
IP statistics.
struct uip_stats::@46 icmp
ICMP statistics.
uip_stats_t chkerr
Number of packets dropped due to IP checksum errors.
uip_stats_t ackerr
Number of TCP segments with a bad ACK number.
uip_stats_t recv
Number of received packets at the IP layer.
uip_stats_t fragerr
Number of packets dropped because they were IP fragments.
uip_stats_t typeerr
Number of ICMP packets with a wrong type.
uip_stats_t protoerr
Number of packets dropped because they were neither ICMP, UDP nor TCP.
uip_stats_t rst
Number of received TCP RST (reset) segments.
uip_stats_t vhlerr
Number of packets dropped due to wrong IP version or header length.
struct uip_stats::@48 udp
UDP statistics.
uip_stats_t sent
Number of sent packets at the IP layer.
uip_stats_t synrst
Number of SYNs for closed ports, triggering a RST.
Representation of a uIP UDP connection.
uip_ipaddr_t ripaddr
The IP address of the remote peer.
uint8_t ttl
Default time-to-live.
uint16_t rport
The remote port number in network byte order.
uip_udp_appstate_t appstate
The application state.
uint16_t lport
The local port number in network byte order.
Header for the Contiki/uIP interface.
Configuration options for uIP.
Representation of an IP address.