Contiki 2.5
Functions
ethernode.c File Reference

uIP virtual network interface using UDP tunnels. More...

#include "net/ethernode.h"
#include "net/uip_arch.h"
#include "net/uip-fw.h"
#include "ether.h"
#include "dev/radio.h"
#include "net/netstack.h"
#include "net/packetbuf.h"
#include "node.h"
#include "lib/random.h"
#include <stdio.h>
#include <sys/select.h>
#include <unistd.h>

Go to the source code of this file.

Functions

void ethernode_init (int port)
 Initialize the virtual UDP tunnel network interface. More...
 
int ethernode_poll (void)
 Poll the network device to see if a packet has arrived. More...
 
u8_t ethernode_send (void)
 Send a packet from the uip_buf buffer over the UDP tunnel. More...
 

Detailed Description

uIP virtual network interface using UDP tunnels.

Author
Adam Dunkels

Definition in file ethernode.c.

Function Documentation

void ethernode_init ( int  port)

Initialize the virtual UDP tunnel network interface.

Parameters
sidThe ID number of this node.

Definition at line 154 of file ethernode.c.

int ethernode_poll ( void  )

Poll the network device to see if a packet has arrived.

Returns
The length of the incoming packet, or zero if no packet was found.

Definition at line 173 of file ethernode.c.

u8_t ethernode_send ( void  )

Send a packet from the uip_buf buffer over the UDP tunnel.

Return values
UIP_FW_TOOLARGEA transmission of packet that was too large was attempted.
UIP_FW_DROPPEDThe packet is known to be dropped.
UIP_FW_OKThe packet was transmitted.

Definition at line 228 of file ethernode.c.

References NULL, UIP_FW_OK, UIP_FW_TOOLARGE, and uip_len.