36 #include "ip64/ip64.h" 41 #define DEBUG DEBUG_NONE 44 static uip_ipaddr_t last_sender;
48 ip64_slip_interface_input(uint8_t *packet, uint16_t len)
59 PRINTF(
"Got configuration message of type %c\n",
uip_buf[1]);
65 memset(&prefix, 0, 16);
66 memcpy(&prefix, &
uip_buf[2], 8);
67 PRINTF(
"Setting prefix ");
70 set_prefix_64(&prefix);
74 PRINTF(
"Got request message of type %c\n",
uip_buf[1]);
76 const char *hexchar =
"0123456789abcdef";
80 for(j = 0; j < 8; j++) {
97 memcpy(
uip_buf, ip64_packet_buffer, len);
109 PRINTF(
"ip64-slip-interface: init\n");
119 PRINTF(
"ip64-slip-interface: output source ");
127 if(uip_ipaddr_cmp(&last_sender, &
UIP_IP_BUF->srcipaddr)) {
128 PRINTF(
"ip64-interface: output, not sending bounced message\n");
132 PRINTF(
"ip64-interface: output len %d\n", len);
134 memcpy(
uip_buf, ip64_packet_buffer, len);
143 const struct uip_fallback_interface ip64_slip_interface = {
#define UIP_IP_BUF
Direct access to IPv6 header.
uip_lladdr_t uip_lladdr
Host L2 address.
uint16_t uip_len
The length of the packet in the uip_buf buffer.
A set of debugging macros for the IP stack
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.
Header file for IPv6-related data structures.
#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.
Header file for the uIP TCP/IP stack.
void process_start(struct process *p, process_data_t data)
Start a process.