33 #include "contiki-net.h"
35 #include "net/eth-proc.h"
38 #define BUF ((struct uip_eth_hdr *)&uip_buf[0])
39 #define IPBUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
41 PROCESS(eth_process,
"Ethernet");
44 #if NETSTACK_CONF_WITH_IPV6
48 if (dest_mac ==
NULL) {
55 quarkX1000_eth_send();
64 quarkX1000_eth_send();
77 #if NETSTACK_CONF_WITH_IPV6
78 if(BUF->type ==
uip_htons(UIP_ETHTYPE_IPV6)) {
82 if(BUF->type ==
uip_htons(UIP_ETHTYPE_IP)) {
85 }
else if(BUF->type ==
uip_htons(UIP_ETHTYPE_ARP)) {
91 quarkX1000_eth_send();
104 tcpip_set_outputfunc(
output);
uip_len
The length of the packet in the uip_buf buffer.
void process_poll(struct process *p)
Request a process to be polled.
#define PROCESS_END()
Define the end of a process.
#define PROCESS(name, strname)
Declare a process.
#define UIP_LLH_LEN
The link level header length.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_POLLHANDLER(handler)
Specify an action when a process is polled.
static void pollhandler(void)
USB Poll Handler.
#define NULL
The null pointer.
void uip_arp_out(void)
Prepend Ethernet header to an outbound IP packet and see if we need to send out an ARP request...
static uint8_t output(const uip_lladdr_t *localdest)
Take an IP packet and format it to be sent on an 802.15.4 network using 6lowpan.
CCIF uip_lladdr_t uip_lladdr
Host L2 address.
#define PROCESS_WAIT_UNTIL(c)
Wait for a condition to occur.
void uip_arp_arpin(void)
ARP processing for incoming IP packets.
void tcpip_input(void)
Deliver an incoming packet to the TCP/IP stack.
Header file for database of link-local neighbors, used by IPv6 code and to be used by future ...
CCIF uint16_t uip_htons(uint16_t val)
Convert a 16-bit quantity from host byte order to network byte order.
#define PROCESS_BEGIN()
Define the beginning of a process.