35 #include "contiki-net.h"
36 #include "net/ethernet.h"
39 #include "net/ethernet-drv.h"
41 #define BUF ((struct uip_eth_hdr *)&uip_buf[0])
43 PROCESS(ethernet_process,
"Ethernet driver");
63 if(BUF->type ==
uip_htons(UIP_ETHTYPE_IPV6)) {
64 uip_neighbor_add(&IPBUF->srcipaddr, &BUF->src);
68 if(BUF->type ==
uip_htons(UIP_ETHTYPE_IP)) {
71 }
else if(BUF->type ==
uip_htons(UIP_ETHTYPE_ARP)) {
89 ethernet_init((
struct ethernet_config *)data);
91 tcpip_set_outputfunc(ethernet_output);
void uip_arp_out(void)
Prepend Ethernet header to an outbound IP packet and see if we need to send out an ARP request...
uip_len
The length of the packet in the uip_buf buffer.
#define PROCESS_WAIT_UNTIL(c)
Wait for a condition to occur.
void process_poll(struct process *p)
Request a process to be polled.
void tcpip_input(void)
Deliver an incoming packet to the TCP/IP stack.
#define PROCESS_BEGIN()
Define the beginning of a process.
Header file for database of link-local neighbors, used by IPv6 code and to be used by future ...
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
CCIF uint16_t uip_htons(uint16_t val)
Convert a 16-bit quantity from host byte order to network byte order.
#define PROCESS_POLLHANDLER(handler)
Specify an action when a process is polled.
#define PROCESS(name, strname)
Declare a process.
void uip_arp_arpin(void)
ARP processing for incoming IP packets.