41 #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
43 #define DEBUG DEBUG_NONE
46 static uip_ipaddr_t last_sender;
50 ip64_slip_interface_input(uint8_t *packet, uint16_t len)
61 PRINTF(
"Got configuration message of type %c\n",
uip_buf[1]);
67 memset(&prefix, 0, 16);
68 memcpy(&prefix, &
uip_buf[2], 8);
69 PRINTF(
"Setting prefix ");
72 set_prefix_64(&prefix);
76 PRINTF(
"Got request message of type %c\n",
uip_buf[1]);
78 const char *hexchar =
"0123456789abcdef";
82 for(j = 0; j < 8; j++) {
112 PRINTF(
"ip64-slip-interface: init\n");
123 PRINTF(
"ip64-slip-interface: output source ");
131 if(uip_ipaddr_cmp(&last_sender, &
UIP_IP_BUF->srcipaddr)) {
132 PRINTF(
"ip64-interface: output, not sending bounced message\n");
136 PRINTF(
"ip64-interface: output len %d\n", len);
147 const struct uip_fallback_interface ip64_slip_interface = {
uip_len
The length of the packet in the uip_buf buffer.
uint8_t slip_send(void)
Send an IP packet from the uIP buffer with SLIP.
Header file for IPv6-related data structures.
#define UIP_LLH_LEN
The link level header length.
#define uip_buf
Macro to access uip_aligned_buf as an array of bytes.
#define uip_ipaddr_copy(dest, src)
Copy an IP address from one place to another.
#define UIP_IP_BUF
Pointer to IP header.
void slip_set_input_callback(void(*c)(void))
Set a function to be called when there is activity on the SLIP interface; used for detecting if a nod...
#define NULL
The null pointer.
Header file for the uIP TCP/IP stack.
void process_start(struct process *p, process_data_t data)
Start a process.
A set of debugging macros for the IP stack
static uint8_t output(const uip_lladdr_t *localdest)
Take an IP packet and format it to be sent on an 802.15.4 network using 6lowpan.
CCIF uip_lladdr_t uip_lladdr
Host L2 address.