37 #include "ip64-eth-interface.h"
41 #define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
43 #define DEBUG DEBUG_NONE
48 ip64_eth_interface_input(uint8_t *packet, uint16_t len)
53 if(ethhdr->type ==
UIP_HTONS(IP64_ETH_TYPE_ARP)) {
54 len = ip64_arp_arp_input(packet, len);
57 IP64_ETH_DRIVER.output(packet, len);
59 }
else if(ethhdr->type ==
UIP_HTONS(IP64_ETH_TYPE_IP) &&
61 printf(
"-------------->\n");
66 printf(
"ip64_interface_process: converted %d bytes\n",
uip_len);
68 printf(
"ip64-interface: input source ");
70 PRINTF(
" destination ");
83 printf(
"ip64-eth-interface: init\n");
92 printf(
"ip64-interface: output source ");
94 PRINTF(
" destination ");
98 printf(
"<--------------\n");
102 printf(
"ip64-interface: output len %d\n", len);
104 if(ip64_arp_check_cache(&ip64_packet_buffer[
sizeof(
struct ip64_eth_hdr)])) {
105 printf(
"Create header\n");
106 ret = ip64_arp_create_ethhdr(ip64_packet_buffer,
110 IP64_ETH_DRIVER.output(ip64_packet_buffer, len);
113 printf(
"Create request\n");
114 len = ip64_arp_create_arp_request(ip64_packet_buffer,
116 IP64_ETH_DRIVER.output(ip64_packet_buffer, len);
121 const struct uip_fallback_interface ip64_eth_interface = {
uip_len
The length of the packet in the uip_buf buffer.
void tcpip_input(void)
Deliver an incoming packet to the TCP/IP stack.
Header file for the uIP TCP/IP stack.
Network interface and stateless autoconfiguration (RFC 4862)
#define UIP_HTONS(n)
Convert 16-bit quantity from host byte order to network byte order.
#define UIP_IP_BUF
Pointer to IP header.
#define UIP_LLH_LEN
The link level header length.
A set of debugging macros.