Code for tunnelling uIP packets over the Rime mesh routing module
#include "contiki-net.h"
#include "net/ip/uip.h"
#include "net/ip/uip-split.h"
#include "net/ip/uip-packetqueue.h"
#include "net/ipv6/uip-nd6.h"
#include "net/ipv6/uip-ds6.h"
#include <string.h>
#include "net/ip/uip-debug.h"
Macros | |
#define | _DEBUG_ DEBUG_NONE |
#define | UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[UIP_LLIPH_LEN + uip_ext_len]) |
#define | UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) |
#define | UIP_LOG(m) |
#define | UIP_TCP_BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) |
Enumerations | |
enum | { TCP_POLL, UDP_POLL, PACKET_INPUT } |
Functions | |
static void | check_for_tcp_syn (void) |
static void | eventhandler (process_event_t ev, process_data_t data) |
static void | packet_input (void) |
PROCESS (tcpip_process,"TCP/IP stack") | |
PROCESS_THREAD (tcpip_process, ev, data) | |
static void | start_periodic_tcp_timer (void) |
void | tcpip_input (void) |
Deliver an incoming packet to the TCP/IP stack. More... | |
void | tcpip_ipv6_output (void) |
This function does address resolution and then calls tcpip_output. More... | |
uint8_t | tcpip_output (const uip_lladdr_t *a) |
Output packet to layer 2 The eventual parameter is the MAC address of the destination. More... | |
void | tcpip_set_outputfunc (uint8_t(*f)(const uip_lladdr_t *)) |
void | tcpip_uipcall (void) |
Variables | |
static uint8_t(* | outputfunc )(const uip_lladdr_t *a) |
static struct etimer | periodic |
process_event_t | tcpip_event |
The uIP event. More... | |
#define _DEBUG_ DEBUG_NONE |
#define UIP_ICMP_BUF ((struct uip_icmp_hdr *)&uip_buf[UIP_LLIPH_LEN + uip_ext_len]) |
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN]) |
Referenced by check_for_tcp_syn(), and tcpip_ipv6_output().
#define UIP_LOG | ( | m | ) |
Referenced by tcpip_ipv6_output(), and tcpip_output().
#define UIP_TCP_BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) |
Referenced by check_for_tcp_syn().
|
static |
References start_periodic_tcp_timer(), TCP_SYN, UIP_IP_BUF, UIP_PROTO_TCP, and UIP_TCP_BUF.
Referenced by packet_input().
|
static |
References uip_conn::appstate, uip_udp_conn::appstate, etimer_expired(), etimer_restart(), i, uip_udp_conn::lport, NULL, tcpip_uipstate::p, PACKET_INPUT, packet_input(), periodic, PRINTF, PROCESS_EVENT_EXITED, PROCESS_EVENT_TIMER, PROCESS_NONE, start_periodic_tcp_timer(), TCP_POLL, tcpip_ipv6_output(), tcpip_output(), uip_conn::tcpstateflags, UDP_POLL, UIP_CLOSED, UIP_CONNS, uip_ds6_periodic(), uip_ds6_send_rs(), uip_ds6_timer_periodic, uip_ds6_timer_rs, uip_fw_periodic(), uip_len, UIP_LISTENPORTS, uip_reass_over(), UIP_UDP_CONNS, uip_udp_conns, and uip_unlisten().
Referenced by PROCESS_THREAD().
|
static |
References check_for_tcp_syn(), PRINTF, tcpip_ipv6_output(), tcpip_output(), uip_fw_forward(), UIP_FW_LOCAL, uip_input, uip_len, and uip_split_output().
Referenced by eventhandler().
PROCESS | ( | tcpip_process | , |
"TCP/IP stack" | |||
) |
PROCESS_THREAD | ( | tcpip_process | , |
ev | , | ||
data | |||
) |
|
static |
References etimer_expired(), etimer_restart(), and periodic.
Referenced by check_for_tcp_syn(), eventhandler(), and tcpip_uipcall().
|
static |
Referenced by tcpip_output(), and tcpip_set_outputfunc().
|
static |
Referenced by eventhandler(), PROCESS_THREAD(), and start_periodic_tcp_timer().