42#define LOG_MODULE "IP64"
43#define LOG_LEVEL LOG_LEVEL_IP64
47static uip_ipaddr_t last_sender;
51ip64_slip_interface_input(uint8_t *packet, uint16_t len)
62 LOG_DBG(
"Got configuration message of type %c\n",
uip_buf[1]);
68 memset(&prefix, 0, 16);
69 memcpy(&prefix, &
uip_buf[2], 8);
70 LOG_DBG(
"Setting prefix ");
71 LOG_DBG_6ADDR(&prefix);
73 set_prefix_64(&prefix);
77 LOG_DBG(
"Got request message of type %c\n",
uip_buf[1]);
79 const char *hexchar =
"0123456789abcdef";
83 for(j = 0; j < 8; j++) {
100 memcpy(
uip_buf, ip64_packet_buffer, len);
112 LOG_INFO(
"ip64-slip-interface: init\n");
114 slip_set_input_callback(input_callback);
122 LOG_DBG(
"ip64-slip-interface: output source ");
130 if(uip_ipaddr_cmp(&last_sender, &
UIP_IP_BUF->srcipaddr)) {
131 LOG_WARN(
"ip64-interface: output, not sending bounced message\n");
135 LOG_DBG(
"ip64-interface: output len %d\n", len);
137 memcpy(
uip_buf, ip64_packet_buffer, len);
146const struct uip_fallback_interface ip64_slip_interface = {
void process_start(struct process *p, process_data_t data)
Start a process.
uip_lladdr_t uip_lladdr
Host L2 address.
#define UIP_IP_BUF
Direct access to IPv6 header.
#define uip_ipaddr_copy(dest, src)
Copy an IP address from one place to another.
#define uip_buf
Macro to access uip_aligned_buf as an array of bytes.
uint16_t uip_len
The length of the packet in the uip_buf buffer.
Header file for the logging system.
Header file for IPv6-related data structures.
Header file for the uIP TCP/IP stack.