36 #include "ip64/ip64.h" 37 #include "ip64/ip64-arp.h" 38 #include "ip64/ip64-eth-interface.h" 42 #define DEBUG DEBUG_NONE 47 ip64_eth_interface_input(uint8_t *packet, uint16_t len)
52 if(ethhdr->type ==
UIP_HTONS(IP64_ETH_TYPE_ARP)) {
53 len = ip64_arp_arp_input(packet, len);
56 IP64_ETH_DRIVER.output(packet, len);
58 }
else if(ethhdr->type ==
UIP_HTONS(IP64_ETH_TYPE_IP) &&
60 printf(
"-------------->\n");
65 printf(
"ip64_interface_process: converted %d bytes\n",
uip_len);
67 printf(
"ip64-interface: input source ");
69 PRINTF(
" destination ");
82 printf(
"ip64-eth-interface: init\n");
90 printf(
"ip64-interface: output source ");
92 PRINTF(
" destination ");
96 printf(
"<--------------\n");
100 printf(
"ip64-interface: output len %d\n", len);
102 if(ip64_arp_check_cache(&ip64_packet_buffer[
sizeof(
struct ip64_eth_hdr)])) {
103 printf(
"Create header\n");
104 ret = ip64_arp_create_ethhdr(ip64_packet_buffer,
108 IP64_ETH_DRIVER.output(ip64_packet_buffer, len);
111 printf(
"Create request\n");
112 len = ip64_arp_create_arp_request(ip64_packet_buffer,
114 return IP64_ETH_DRIVER.output(ip64_packet_buffer, len);
121 const struct uip_fallback_interface ip64_eth_interface = {
#define UIP_IP_BUF
Direct access to IPv6 header.
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_HTONS(n)
Convert 16-bit quantity from host byte order to network byte order.
Header file for the uIP TCP/IP stack.
void tcpip_input(void)
Deliver an incoming packet to the TCP/IP stack.