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.
int ethernode_poll (void)
 Poll the network device to see if a packet has arrived.
u8_t ethernode_send (void)
 Send a packet from the uip_buf buffer over the UDP tunnel.

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:
sid The 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_TOOLARGE A transmission of packet that was too large was attempted.
UIP_FW_DROPPED The packet is known to be dropped.
UIP_FW_OK The packet was transmitted.

Definition at line 228 of file ethernode.c.

References UIP_FW_OK, UIP_FW_TOOLARGE, and uip_len.


Generated on Mon Apr 11 14:23:50 2011 for Contiki 2.5 by  doxygen 1.6.1