{@
Modules | |
Serial Line IP (SLIP) protocol | |
The SLIP protocol is a very simple way to transmit IP packets over a serial line. | |
uIP hostname resolver functions | |
The uIP DNS resolver functions are used to lookup a hostname and map it to a numerical IP address. | |
Protosockets library | |
The protosocket library provides an interface to the uIP stack that is similar to the traditional BSD socket interface. | |
uIP configuration functions | |
The uIP configuration functions are used for setting run-time parameters in uIP such as IP addresses. | |
uIP initialization functions | |
The uIP initialization functions are used for booting uIP. | |
uIP device driver functions | |
These functions are used by a network device driver for interacting with uIP. | |
uIP application functions | |
Functions used by an application running of top of uIP. | |
uIP conversion functions | |
These functions can be used for converting between different data formats used by uIP. | |
Variables used in uIP device drivers | |
uIP has a few global variables that are used in device drivers for uIP. | |
Configuration options for uIP | |
uIP is configured using the per-project configuration file "uipopt.h". | |
The Contiki/uIP interface | |
TCP/IP support in Contiki is implemented using the uIP TCP/IP stack. | |
uIP TCP throughput booster hack | |
The basic uIP TCP implementation only allows each TCP connection to have a single TCP segment in flight at any given time. | |
Simple-udp | |
The default Contiki UDP API is difficult to use. | |
uIP packet forwarding | |
uIP Address Resolution Protocol | |
The Address Resolution Protocol ARP is used for mapping between IP addresses and link level addresses such as the Ethernet MAC addresses. | |
Architecture specific uIP functions | |
The functions in the architecture specific module implement the IP check sum and 32-bit additions. | |
Data Structures | |
struct | uip_80211_addr |
802.11 address More... | |
struct | uip_802154_longaddr |
64 bit 802.15.4 address More... | |
struct | uip_802154_shortaddr |
16 bit 802.15.4 address More... | |
struct | uip_conn |
Representation of a uIP TCP connection. More... | |
struct | uip_desto_hdr |
struct | uip_eth_addr |
802.3 address More... | |
struct | uip_ext_hdr |
struct | uip_ext_hdr_opt |
struct | uip_ext_hdr_opt_padn |
struct | uip_ext_hdr_opt_rpl |
struct | uip_fallback_interface |
struct | uip_frag_hdr |
struct | uip_hbho_hdr |
struct | uip_icmp_hdr |
struct | uip_icmpip_hdr |
union | uip_ip4addr_t |
Representation of an IP address. More... | |
union | uip_ip6addr_t |
struct | uip_ip_hdr |
struct | uip_routing_hdr |
struct | uip_stats |
The structure holding the TCP/IP statistics that are gathered if UIP_STATISTICS is set to 1. More... | |
struct | uip_tcp_hdr |
struct | uip_tcpip_hdr |
struct | uip_udp_conn |
Representation of a uIP UDP connection. More... | |
struct | uip_udp_hdr |
struct | uip_udpip_hdr |
Files | |
file | uip.c |
The uIP TCP/IP stack code. | |
file | uip.h |
Header file for the uIP TCP/IP stack. | |
Macros | |
#define | UIP_ABORT |
#define | UIP_ACKDATA |
#define | UIP_APPDATA_PTR (void *)&uip_buf[UIP_LLH_LEN + UIP_TCPIP_HLEN] |
#define | UIP_APPDATA_SIZE |
The buffer size available for user data in the uip_buf buffer. More... | |
#define | uip_are_solicited_bytes_equal(a, b) |
are last three bytes of both addresses equal? This is used to compare solicited node multicast addresses More... | |
#define | UIP_CLOSE |
#define | UIP_CLOSED 0 |
#define | UIP_CLOSING 6 |
#define | UIP_CONNECTED |
#define | uip_create_linklocal_allnodes_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0001) |
set IP address a to the link local all-nodes multicast address More... | |
#define | uip_create_linklocal_allrouters_mcast(a) uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0002) |
set IP address a to the link local all-routers multicast address More... | |
#define | uip_create_linklocal_prefix(addr) |
#define | uip_create_solicited_node(a, b) |
in b the solicited node address corresponding to address a both a and b are of type uip_ipaddr_t* More... | |
#define | uip_create_unspecified(a) uip_ip6addr(a, 0, 0, 0, 0, 0, 0, 0, 0) |
set IP address a to unspecified More... | |
#define | UIP_DATA |
#define | UIP_ESTABLISHED 3 |
#define | UIP_FIN_WAIT_1 4 |
#define | UIP_FIN_WAIT_2 5 |
#define | UIP_FRAGH_LEN 8 |
#define | UIP_ICMPH_LEN 4 /* Size of ICMP header */ |
#define | UIP_IPH_LEN 40 |
#define | UIP_IPICMPH_LEN |
#define | UIP_IPTCPH_LEN |
#define | UIP_IPUDPH_LEN |
#define | uip_is_addr_link_local(a) |
is addr (a) a link local unicast address, see RFC3513 i.e. More... | |
#define | uip_is_addr_linklocal(a) |
Checks whether the address a is link local. More... | |
#define | uip_is_addr_linklocal_allnodes_mcast(a) |
Is IPv6 address a the link local all-nodes multicast address. More... | |
#define | uip_is_addr_linklocal_allrouters_mcast(a) |
Is IPv6 address a the link local all-routers multicast address. More... | |
#define | uip_is_addr_loopback(a) |
Is IPv6 address a the unspecified address a is of type uip_ipaddr_t. More... | |
#define | uip_is_addr_mac_addr_based(a, m) |
was addr (a) forged based on the mac address m a type is uip_ipaddr_t m type is uiplladdr_t More... | |
#define | uip_is_addr_mcast(a) (((a)->u8[0]) == 0xFF) |
is address a multicast address, see RFC 3513 a is of type uip_ipaddr_t* More... | |
#define | uip_is_addr_mcast_global(a) |
is address a global multicast address (FFxE::/16), a is of type uip_ip6addr_t* More... | |
#define | uip_is_addr_mcast_non_routable(a) |
is address a non-routable multicast address. More... | |
#define | uip_is_addr_mcast_routable(a) |
is address a routable multicast address. More... | |
#define | uip_is_addr_solicited_node(a) |
is addr (a) a solicited node multicast address, see RFC3513 a is of type uip_ipaddr_t* More... | |
#define | uip_is_addr_unspecified(a) |
Is IPv6 address a the unspecified address a is of type uip_ipaddr_t. More... | |
#define | uip_is_mcast_group_id_all_nodes(a) |
is group-id of multicast address a the all nodes group-id More... | |
#define | uip_is_mcast_group_id_all_routers(a) |
is group-id of multicast address a the all routers group-id More... | |
#define | uip_l2_l3_hdr_len (UIP_LLH_LEN + UIP_IPH_LEN + uip_ext_len) |
The sums below are quite used in ND. More... | |
#define | uip_l2_l3_icmp_hdr_len (UIP_LLH_LEN + UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN) |
#define | uip_l3_hdr_len (UIP_IPH_LEN + uip_ext_len) |
#define | uip_l3_icmp_hdr_len (UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN) |
#define | UIP_LAST_ACK 8 |
#define | UIP_LLADDR_LEN 6 |
#define | UIP_LLIPH_LEN |
#define | UIP_LLPREF_LEN 10 |
Length of the link local prefix. More... | |
#define | UIP_NEWDATA |
#define | UIP_POLL |
#define | UIP_POLL_REQUEST |
#define | UIP_PROTO_ICMP 1 |
#define | UIP_PROTO_ICMP6 58 |
#define | UIP_PROTO_TCP 6 |
#define | UIP_PROTO_UDP 17 |
#define | UIP_REXMIT |
#define | UIP_STAT(s) |
The uIP TCP/IP statistics. More... | |
#define | UIP_STOPPED 16 |
#define | UIP_SYN_RCVD 1 |
#define | UIP_SYN_SENT 2 |
#define | UIP_TCPH_LEN 20 /* Size of TCP header */ |
#define | UIP_TCPIP_HLEN UIP_IPTCPH_LEN |
#define | UIP_TIME_WAIT 7 |
#define | UIP_TIMEDOUT |
#define | UIP_TIMER |
#define | UIP_TS_MASK 15 |
#define | UIP_UDP_SEND_CONN |
#define | UIP_UDPH_LEN 8 /* Size of UDP header */ |
Typedefs | |
typedef struct uip_80211_addr | uip_80211_addr |
802.11 address More... | |
typedef struct uip_802154_longaddr | uip_802154_longaddr |
64 bit 802.15.4 address More... | |
typedef struct uip_802154_shortaddr | uip_802154_shortaddr |
16 bit 802.15.4 address More... | |
typedef struct uip_desto_hdr | uip_desto_hdr |
typedef struct uip_eth_addr | uip_eth_addr |
802.3 address More... | |
typedef struct uip_ext_hdr | uip_ext_hdr |
typedef struct uip_ext_hdr_opt | uip_ext_hdr_opt |
typedef struct uip_ext_hdr_opt_padn | uip_ext_hdr_opt_padn |
typedef struct uip_ext_hdr_opt_rpl | uip_ext_hdr_opt_rpl |
typedef struct uip_frag_hdr | uip_frag_hdr |
typedef struct uip_hbho_hdr | uip_hbho_hdr |
typedef union uip_ip4addr_t | uip_ip4addr_t |
Representation of an IP address. More... | |
typedef union uip_ip6addr_t | uip_ip6addr_t |
typedef uip_ip6addr_t | uip_ipaddr_t |
typedef uip_eth_addr | uip_lladdr_t |
Ethernet address. More... | |
typedef struct uip_routing_hdr | uip_routing_hdr |
Functions | |
void | remove_ext_hdr (void) |
uint16_t | uip_chksum (uint16_t *buf, uint16_t len) |
Calculate the Internet checksum over a buffer. More... | |
uint16_t | uip_icmp6chksum (void) |
Calculate the ICMP checksum of the packet in uip_buf. More... | |
uint16_t | uip_ipchksum (void) |
Calculate the IP header checksum of the packet header in uip_buf. More... | |
void | uip_process (uint8_t flag) |
process the options within a hop by hop or destination option header More... | |
uint16_t | uip_tcpchksum (void) |
Calculate the TCP checksum of the packet in uip_buf and uip_appdata. More... | |
uint16_t | uip_udpchksum (void) |
Calculate the UDP checksum of the packet in uip_buf and uip_appdata. More... | |
#define UIP_ABORT |
Referenced by uip_process().
#define UIP_ACKDATA |
Referenced by uip_process().
#define UIP_APPDATA_PTR (void *)&uip_buf[UIP_LLH_LEN + UIP_TCPIP_HLEN] |
#define UIP_APPDATA_SIZE |
#define uip_are_solicited_bytes_equal | ( | a, | |
b | |||
) |
are last three bytes of both addresses equal? This is used to compare solicited node multicast addresses
#define UIP_CLOSE |
Referenced by uip_process().
#define UIP_CLOSED 0 |
Referenced by eventhandler(), for(), uip_init(), and uip_process().
#define UIP_CLOSING 6 |
Referenced by uip_process().
#define UIP_CONNECTED |
Referenced by uip_process().
#define uip_create_linklocal_allnodes_mcast | ( | a | ) | uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0001) |
set IP address a to the link local all-nodes multicast address
Referenced by ip64_4to6(), ns_input(), PROCESS_THREAD(), send_msg(), and uip_ds6_init().
#define uip_create_linklocal_allrouters_mcast | ( | a | ) | uip_ip6addr(a, 0xff02, 0, 0, 0, 0, 0, 0, 0x0002) |
set IP address a to the link local all-routers multicast address
Referenced by uip_ds6_init(), and uip_nd6_rs_output().
#define uip_create_linklocal_prefix | ( | addr | ) |
Referenced by uip_ds6_init().
#define uip_create_solicited_node | ( | a, | |
b | |||
) |
in b the solicited node address corresponding to address a both a and b are of type uip_ipaddr_t*
Referenced by uip_ds6_addr_add(), uip_ds6_addr_rm(), and uip_nd6_ns_output().
#define uip_create_unspecified | ( | a | ) | uip_ip6addr(a, 0, 0, 0, 0, 0, 0, 0, 0) |
set IP address a to unspecified
Referenced by uip_ds6_defrt_add(), uip_ds6_defrt_choose(), uip_ds6_select_src(), and uip_nd6_ns_output().
#define UIP_DATA |
#define UIP_ESTABLISHED 3 |
Referenced by uip_process().
#define UIP_EXT_HDR_BITMAP_AH 0x10 |
#define UIP_EXT_HDR_BITMAP_DESTO1 0x02 |
Referenced by uip_process().
#define UIP_EXT_HDR_BITMAP_DESTO2 0x40 |
Referenced by uip_process().
#define UIP_EXT_HDR_BITMAP_ESP 0x20 |
#define UIP_EXT_HDR_BITMAP_FRAG 0x08 |
#define UIP_EXT_HDR_BITMAP_HBHO 0x01 |
Bitmaps for extension header processing.
When processing extension headers, we should record somehow which one we see, because you cannot have twice the same header, except for destination We store all this in one uint8_t bitmap one bit for each header expected. The order in the bitmap is the order recommended in RFC2460
Referenced by uip_process().
#define UIP_EXT_HDR_BITMAP_ROUTING 0x04 |
Referenced by uip_process().
#define UIP_EXT_HDR_OPT_PAD1 0 |
Destination and Hop By Hop extension headers option types.
Referenced by ext_hdr_options_process().
#define UIP_EXT_HDR_OPT_PADN 1 |
Referenced by ext_hdr_options_process().
#define UIP_EXT_HDR_OPT_RPL 0x63 |
#define UIP_FIN_WAIT_1 4 |
Referenced by uip_process().
#define UIP_FIN_WAIT_2 5 |
Referenced by uip_process().
#define UIP_FRAGH_LEN 8 |
#define UIP_ICMPH_LEN 4 /* Size of ICMP header */ |
Referenced by echo_reply_input(), echo_request_input(), ns_input(), uip_icmp6_send(), uip_nd6_ns_output(), and uip_nd6_rs_output().
#define UIP_IPH_LEN 40 |
Referenced by compress_hdr_hc06(), compress_hdr_hc1(), compress_hdr_ipv6(), echo_reply_input(), echo_request_input(), ext_hdr_options_process(), input(), ns_input(), remove_ext_hdr(), rpl_remove_header(), set_rpl_opt(), time_exceeded(), uip_icmp6_error_output(), uip_icmp6_send(), uip_ipchksum(), uip_nd6_ns_output(), uip_process(), uip_split_output(), uncompress_hdr_hc06(), uncompress_hdr_hc1(), and upper_layer_chksum().
#define UIP_IPICMPH_LEN |
Referenced by uip_icmp6_error_output().
#define UIP_IPTCPH_LEN |
Referenced by uip_process().
#define UIP_IPUDPH_LEN |
Referenced by uip_process(), and uip_udp_packet_send().
#define uip_is_addr_link_local | ( | a | ) |
is addr (a) a link local unicast address, see RFC3513 i.e.
is (a) on prefix FE80::/10 a is of type uip_ipaddr_t*
Referenced by compress_hdr_hc06(), compress_hdr_hc1(), get_global_addr(), ra_input(), simple_rpl_global_address(), simple_rpl_init_dag_immediately(), uip_ds6_get_global(), uip_ds6_get_link_local(), uip_ds6_select_src(), and uip_process().
#define uip_is_addr_linklocal | ( | a | ) |
Checks whether the address a is link local.
a is of type uip_ipaddr_t
#define uip_is_addr_linklocal_allnodes_mcast | ( | a | ) |
Is IPv6 address a the link local all-nodes multicast address.
#define uip_is_addr_linklocal_allrouters_mcast | ( | a | ) |
Is IPv6 address a the link local all-routers multicast address.
#define uip_is_addr_loopback | ( | a | ) |
Is IPv6 address a the unspecified address a is of type uip_ipaddr_t.
Referenced by uip_process().
#define uip_is_addr_mac_addr_based | ( | a, | |
m | |||
) |
was addr (a) forged based on the mac address m a type is uip_ipaddr_t m type is uiplladdr_t
Referenced by compress_addr_64(), and compress_hdr_hc1().
#define uip_is_addr_mcast | ( | a | ) | (((a)->u8[0]) == 0xFF) |
is address a multicast address, see RFC 3513 a is of type uip_ipaddr_t*
Referenced by compress_hdr_hc06(), dao_input(), dis_input(), echo_request_input(), ext_hdr_options_process(), na_input(), ns_input(), tcpip_ipv6_output(), uip_ds6_select_src(), uip_icmp6_error_output(), and uip_process().
#define uip_is_addr_mcast_global | ( | a | ) |
is address a global multicast address (FFxE::/16), a is of type uip_ip6addr_t*
Referenced by dao_input(), and handle_dao_timer().
#define uip_is_addr_mcast_non_routable | ( | a | ) |
is address a non-routable multicast address.
Scopes 1 (interface-local) and 2 (link-local) are non-routable See RFC4291 and draft-ietf-6man-multicast-scopes a is of type uip_ip6addr_t*
#define uip_is_addr_mcast_routable | ( | a | ) |
is address a routable multicast address.
Scope 3 (Realm-Local) or higher are routable Realm-Local scope is defined in draft-ietf-6man-multicast-scopes See RFC4291 and draft-ietf-6man-multicast-scopes a is of type uip_ip6addr_t*
Referenced by uip_ds6_select_src(), uip_process(), and uip_udp_packet_send().
#define uip_is_addr_solicited_node | ( | a | ) |
is addr (a) a solicited node multicast address, see RFC3513 a is of type uip_ipaddr_t*
Referenced by ns_input().
#define uip_is_addr_unspecified | ( | a | ) |
Is IPv6 address a the unspecified address a is of type uip_ipaddr_t.
Referenced by compress_hdr_hc06(), ns_input(), route_callback(), tcpip_ipv6_output(), uip_icmp6_error_output(), uip_nd6_ns_output(), uip_nd6_rs_output(), and uip_process().
#define uip_is_mcast_group_id_all_nodes | ( | a | ) |
is group-id of multicast address a the all nodes group-id
#define uip_is_mcast_group_id_all_routers | ( | a | ) |
is group-id of multicast address a the all routers group-id
#define uip_l2_l3_hdr_len (UIP_LLH_LEN + UIP_IPH_LEN + uip_ext_len) |
The sums below are quite used in ND.
When used for uip_buf, we include link layer length when used for uip_len, we do not, hence we need values with and without LLH_LEN we do not use capital letters as these values are variable
#define uip_l2_l3_icmp_hdr_len (UIP_LLH_LEN + UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN) |
Referenced by ns_input(), uip_nd6_ns_output(), and uip_nd6_rs_output().
#define uip_l3_hdr_len (UIP_IPH_LEN + uip_ext_len) |
#define uip_l3_icmp_hdr_len (UIP_IPH_LEN + uip_ext_len + UIP_ICMPH_LEN) |
Referenced by dao_ack_input(), dao_input(), dio_input(), na_input(), ns_input(), ra_input(), and uip_nd6_rs_output().
#define UIP_LAST_ACK 8 |
Referenced by uip_process().
#define UIP_LLADDR_LEN 6 |
Referenced by create_llao(), na_input(), ns_input(), ra_input(), and uip_ds6_set_addr_iid().
#define UIP_LLIPH_LEN |
Referenced by uncompress_hdr_hc06(), and uncompress_hdr_hc1().
#define UIP_LLPREF_LEN 10 |
Length of the link local prefix.
#define UIP_NEWDATA |
Referenced by uip_process().
#define UIP_POLL |
Referenced by uip_process().
#define UIP_POLL_REQUEST |
Referenced by uip_process().
#define UIP_PROTO_DESTO 60 |
Referenced by uip_process().
#define UIP_PROTO_FRAG 44 |
Referenced by uip_process().
#define UIP_PROTO_HBHO 0 |
extension headers types
Referenced by rpl_invert_header(), rpl_remove_header(), rpl_update_header_empty(), rpl_update_header_final(), set_rpl_opt(), and uip_process().
#define UIP_PROTO_ICMP 1 |
Referenced by time_exceeded(), and uip_fw_forward().
#define UIP_PROTO_ICMP6 58 |
#define UIP_PROTO_NONE 59 |
Referenced by uip_process().
#define UIP_PROTO_ROUTING 43 |
Referenced by uip_process().
#define UIP_PROTO_TCP 6 |
#define UIP_PROTO_UDP 17 |
#define UIP_REXMIT |
Referenced by uip_process().
#define UIP_STAT | ( | s | ) |
The uIP TCP/IP statistics.
This is the variable in which the uIP TCP/IP statistics are gathered.
Referenced by echo_request_input(), na_input(), ns_input(), ra_input(), uip_icmp6_error_output(), uip_nd6_ns_output(), uip_nd6_rs_output(), and uip_process().
#define UIP_STOPPED 16 |
Referenced by uip_process().
#define UIP_SYN_RCVD 1 |
Referenced by uip_process().
#define UIP_SYN_SENT 2 |
Referenced by uip_process().
#define UIP_TCPH_LEN 20 /* Size of TCP header */ |
Referenced by uip_process().
#define UIP_TCPIP_HLEN UIP_IPTCPH_LEN |
Referenced by ip64_arp_create_arp_request(), slip_send(), slipdev_send(), uip_arp_out(), uip_fw_forward(), uip_process(), uip_send(), and uip_split_output().
#define UIP_TIME_WAIT 7 |
Referenced by uip_process().
#define UIP_TIMEDOUT |
Referenced by uip_process().
#define UIP_TIMER |
Referenced by uip_process().
#define UIP_TS_MASK 15 |
Referenced by for(), make_tcp_stats(), and uip_process().
#define UIP_UDP_SEND_CONN |
Referenced by uip_process(), and uip_udp_packet_send().
#define UIP_UDPH_LEN 8 /* Size of UDP header */ |
Referenced by compress_hdr_hc06(), compress_hdr_hc1(), uip_process(), uncompress_hdr_hc06(), and uncompress_hdr_hc1().
typedef struct uip_80211_addr uip_80211_addr |
802.11 address
typedef struct uip_802154_longaddr uip_802154_longaddr |
64 bit 802.15.4 address
typedef struct uip_802154_shortaddr uip_802154_shortaddr |
16 bit 802.15.4 address
typedef struct uip_desto_hdr uip_desto_hdr |
typedef struct uip_eth_addr uip_eth_addr |
802.3 address
typedef struct uip_ext_hdr uip_ext_hdr |
typedef struct uip_ext_hdr_opt uip_ext_hdr_opt |
typedef struct uip_ext_hdr_opt_padn uip_ext_hdr_opt_padn |
typedef struct uip_ext_hdr_opt_rpl uip_ext_hdr_opt_rpl |
typedef struct uip_frag_hdr uip_frag_hdr |
typedef struct uip_hbho_hdr uip_hbho_hdr |
typedef union uip_ip4addr_t uip_ip4addr_t |
Representation of an IP address.
typedef union uip_ip6addr_t uip_ip6addr_t |
typedef uip_ip6addr_t uip_ipaddr_t |
typedef uip_eth_addr uip_lladdr_t |
Ethernet address.
typedef struct uip_routing_hdr uip_routing_hdr |
void remove_ext_hdr | ( | void | ) |
References PRINTF, uip_ext_len, UIP_IP_BUF, UIP_IPH_LEN, uip_len, and UIP_TCP_BUF.
Referenced by tcpip_ipv6_output(), and uip_process().
uint16_t uip_chksum | ( | uint16_t * | buf, |
uint16_t | len | ||
) |
Calculate the Internet checksum over a buffer.
The Internet checksum is the one's complement of the one's complement sum of all 16-bit words in the buffer.
See RFC1071.
buf | A pointer to the buffer over which the checksum is to be computed. |
len | The length of the buffer over which the checksum is to be computed. |
References chksum(), and uip_htons().
Referenced by time_exceeded().
uint16_t uip_icmp6chksum | ( | void | ) |
Calculate the ICMP checksum of the packet in uip_buf.
References UIP_PROTO_ICMP6, and upper_layer_chksum().
Referenced by echo_request_input(), ns_input(), uip_icmp6_error_output(), uip_icmp6_send(), uip_nd6_ns_output(), uip_nd6_rs_output(), and uip_process().
uint16_t uip_ipchksum | ( | void | ) |
Calculate the IP header checksum of the packet header in uip_buf.
The IP header checksum is the Internet checksum of the 20 bytes of the IP header.
References chksum(), PRINTF, uip_buf, uip_htons(), UIP_IPH_LEN, and UIP_LLH_LEN.
Referenced by PROCESS_THREAD(), time_exceeded(), and uip_split_output().
void uip_process | ( | uint8_t | flag | ) |
process the options within a hop by hop or destination option header
0,: | nothing to send, |
1,: | drop pkt |
2,: | ICMP error message to send |
References c, uip_ds6_netif::cur_hop_limit, ext_hdr_options_process(), ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, ICMP6_DST_UNREACH_NOTNEIGHBOR, ICMP6_PACKET_TOO_BIG, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, ICMP6_PARAMPROB_NEXTHEADER, ICMP6_TIME_EXCEED_TRANSIT, ICMP6_TIME_EXCEEDED, uip_mcast6_driver::in, uip_conn::initialmss, uip_conn::len, uip_conn::lport, uip_udp_conn::lport, uip_conn::mss, uip_conn::nrtx, NULL, PRINT6ADDR, PRINTF, uip_conn::rcv_nxt, remove_ext_hdr(), reset(), uip_conn::ripaddr, uip_udp_conn::ripaddr, rpl_insert_header(), rpl_update_header_empty(), uip_conn::rport, uip_udp_conn::rport, uip_conn::rto, uip_conn::sa, send(), uip_conn::snd_nxt, uip_conn::sv, TCP_ACK, TCP_CTL, TCP_FIN, TCP_OPT_END, TCP_OPT_MSS, TCP_OPT_MSS_LEN, TCP_OPT_NOOP, TCP_PSH, TCP_RST, TCP_SYN, TCP_URG, uip_conn::tcpstateflags, uip_conn::timer, uip_udp_conn::ttl, UIP_ABORT, UIP_ACKDATA, uip_add32(), UIP_APPCALL, uip_appdata, uip_buf, UIP_CLOSE, UIP_CLOSED, UIP_CLOSING, uip_conn, UIP_CONNECTED, UIP_CONNS, uip_ds6_if, uip_ds6_is_addr_onlink(), uip_ds6_is_my_addr, uip_ds6_is_my_maddr, uip_ds6_select_src(), UIP_ESTABLISHED, uip_ext_bitmap, UIP_EXT_BUF, UIP_EXT_HDR_BITMAP_DESTO1, UIP_EXT_HDR_BITMAP_DESTO2, UIP_EXT_HDR_BITMAP_HBHO, UIP_EXT_HDR_BITMAP_ROUTING, uip_ext_len, UIP_FIN_WAIT_1, UIP_FIN_WAIT_2, uip_flags, UIP_HTONS, UIP_ICMP6_APPCALL, uip_icmp6_error_output(), uip_icmp6_input(), UIP_ICMP6_INPUT_ERROR, uip_icmp6chksum(), UIP_ICMP_BUF, UIP_IP_BUF, uip_ipaddr_cmp, uip_ipaddr_copy, UIP_IPH_LEN, UIP_IPTCPH_LEN, UIP_IPUDPH_LEN, uip_is_addr_link_local, uip_is_addr_loopback, uip_is_addr_mcast, uip_is_addr_mcast_routable, uip_is_addr_unspecified, UIP_LAST_ACK, uip_len, UIP_LINK_MTU, UIP_LISTENPORTS, UIP_LLH_LEN, UIP_LOG, UIP_MAXRTX, UIP_MAXSYNRTX, UIP_MCAST6, UIP_MCAST6_ACCEPT, UIP_NEWDATA, uip_next_hdr, uip_outstanding, UIP_POLL, UIP_POLL_REQUEST, UIP_PROTO_DESTO, UIP_PROTO_FRAG, UIP_PROTO_HBHO, UIP_PROTO_ICMP6, UIP_PROTO_NONE, UIP_PROTO_ROUTING, UIP_PROTO_TCP, UIP_PROTO_UDP, UIP_RECEIVE_WINDOW, UIP_REXMIT, UIP_ROUTING_BUF, UIP_RTO, uip_sappdata, uip_slen, UIP_STAT, UIP_STOPPED, UIP_SYN_RCVD, UIP_SYN_SENT, UIP_TCP_BUF, UIP_TCP_MSS, uip_tcpchksum(), UIP_TCPH_LEN, UIP_TCPIP_HLEN, UIP_TIME_WAIT, UIP_TIME_WAIT_TIMEOUT, UIP_TIMEDOUT, UIP_TIMER, UIP_TS_MASK, UIP_UDP_APPCALL, UIP_UDP_BUF, uip_udp_conn, UIP_UDP_CONNS, uip_udp_conns, UIP_UDP_SEND_CONN, uip_udpchksum(), and UIP_UDPH_LEN.
Referenced by uip_udp_packet_send().
uint16_t uip_tcpchksum | ( | void | ) |
Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
The TCP checksum is the Internet checksum of data contents of the TCP segment, and a pseudo-header as defined in RFC793.
Referenced by uip_process(), and uip_split_output().
uint16_t uip_udpchksum | ( | void | ) |
Calculate the UDP checksum of the packet in uip_buf and uip_appdata.
The UDP checksum is the Internet checksum of data contents of the UDP segment, and a pseudo-header as defined in RFC768.
Referenced by uip_process().
CCIF const uip_ipaddr_t uip_all_zeroes_addr |
Referenced by uip_arp_timer(), uip_arp_update(), and uip_fw_forward().
CCIF void* uip_appdata |
Pointer to the application data in the packet buffer.
This pointer points to the application data when the application is called. If the application wishes to send data, the application may use this space to write the data into before calling uip_send().
Referenced by generate(), generate_file_stats(), handle_incoming_packet(), handle_incoming_rerr(), handle_incoming_rrep(), handle_incoming_rreq(), ip64_arp_create_arp_request(), make_addresses(), make_addrmap(), make_led_toggle(), make_neighbor(), make_neighbor_roomfor(), make_processes(), make_route(), make_routes_roomfor(), make_tcp_stats(), msg_for_me(), newdata(), parse_headers(), parse_msg(), parse_statusline(), PROCESS_THREAD(), PT_THREAD(), send_discover(), send_request(), send_rerr(), send_rrep(), send_rreq(), senddata(), slip_send(), slipdev_send(), uip_arp_out(), uip_fw_forward(), uip_process(), uip_split_output(), websocket_http_client_appcall(), and write_mss_error().
CCIF const uip_ipaddr_t uip_broadcast_addr |
Referenced by handle_incoming_rrep(), uip_arp_out(), uip_fw_forward(), and uip_fw_output().
Pointer to the current TCP connection.
The uip_conn pointer can be used to access the current TCP connection.
Referenced by uip_process().
CCIF uip_ipaddr_t uip_draddr |
Referenced by uip_arp_out().
CCIF uint8_t uip_flags |
Referenced by uip_process().
CCIF uip_ipaddr_t uip_hostaddr |
CCIF uip_lladdr_t uip_lladdr |
Host L2 address.
Referenced by compress_hdr_hc06(), compress_hdr_hc1(), create_llao(), input_callback(), main(), ra_input(), send_packet(), set_global_address(), set_ip_from_prefix(), uip_arp_arpin(), uip_arp_out(), and uip_ds6_init().
CCIF uip_ipaddr_t uip_netmask |
struct uip_udp_conn* uip_udp_conn |
The current UDP connection.
Referenced by uip_process().
struct uip_udp_conn uip_udp_conns[UIP_UDP_CONNS] |
Referenced by eventhandler(), uip_init(), and uip_process().