37#include "ip64/ip64-arp.h"
38#include "ip64/ip64-eth-interface.h"
45#define LOG_MODULE "IP64"
46#define LOG_LEVEL LOG_LEVEL_IP64
50ip64_eth_interface_input(uint8_t *packet, uint16_t len)
55 if(ethhdr->type ==
UIP_HTONS(IP64_ETH_TYPE_ARP)) {
56 len = ip64_arp_arp_input(packet, len);
59 IP64_ETH_DRIVER.output(packet, len);
61 }
else if(ethhdr->type ==
UIP_HTONS(IP64_ETH_TYPE_IP) &&
63 LOG_DBG(
"-------------->\n");
68 LOG_DBG(
"ip64_interface_process: converted %d bytes\n",
uip_len);
70 LOG_DBG(
"ip64-interface: input source ");
72 LOG_DBG_(
" destination ");
85 LOG_INFO(
"ip64-eth-interface: init\n");
93 LOG_DBG(
"ip64-interface: output source ");
95 LOG_DBG_(
" destination ");
99 LOG_DBG(
"<--------------\n");
103 LOG_DBG(
"ip64-interface: output len %d\n", len);
105 if(ip64_arp_check_cache(&ip64_packet_buffer[
sizeof(
struct ip64_eth_hdr)])) {
106 LOG_DBG(
"Create header\n");
107 ret = ip64_arp_create_ethhdr(ip64_packet_buffer,
111 IP64_ETH_DRIVER.output(ip64_packet_buffer, len);
114 LOG_DBG(
"Create request\n");
115 len = ip64_arp_create_arp_request(ip64_packet_buffer,
117 return IP64_ETH_DRIVER.output(ip64_packet_buffer, len);
124const struct uip_fallback_interface ip64_eth_interface = {
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.
void tcpip_input(void)
Deliver an incoming packet to the TCP/IP stack.
#define UIP_IP_BUF
Direct access to IPv6 header.
#define UIP_HTONS(n)
Convert 16-bit quantity from host byte order to network byte order.
#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.