N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/Vaike/linux/system-addons/networking/sensor_mesh.c File Reference

WSN mesh network routing library. More...

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "sensor_mesh.h"
#include "mesh_ipc.h"
#include "mesh_net.h"

Go to the source code of this file.

Functions

int mesh_proactive_rediscover (char *protocol_name)
double mesh_route_reliability (char *destination)
double mesh_route_goodput (char *destination)
double mesh_route_energy_cost (char *destination)
int neighbor_address (unsigned char *mac_addr, float angle, unsigned int dist)
int neighbor_position (float *angle, unsigned int *dist, unsigned char *mac_addr)
double mesh_link_reliability (float angle, int dist)
double mesh_link_goodput (float angle, int dist)
double mesh_link_energy (float angle, int dist)
int mesh_get_sendqueue (void)
int mesh_set_sendqueue (int size)
int mesh_get_mtu (void)
int mesh_set_mtu (int size)
int mesh_get_resend_timeout (struct timeval *tv)
int mesh_set_resend_timeout (struct timeval *tv)
ssize_t mesh_sendto (int sd, void *buf, size_t len, struct sockaddr_in *to)
ssize_t mesh_recvfrom (int sd, void *buf, size_t len, struct sockaddr_in *from)
ssize_t mesh_raw_sendto (int sd, void *buf, size_t len, struct sockaddr_in *to)
ssize_t mesh_raw_recvfrom (int sd, void *buf, size_t len, struct sockaddr_in *from)
ssize_t mesh_sendto_nextdoor (int sd, void *buf, size_t len, float angle, int dist)
ssize_t mesh_recvfrom_nextdoor (int sd, void *buf, size_t len, float *angle, int *dist)


Detailed Description

WSN mesh network routing library.

Revision
1.1

Original Author: Sean M. Brennan <brennan@lanl.gov>

Author
sean_m_brennan

Created: August 1, 2007

Date
2008/02/03 22:00:51

Definition in file sensor_mesh.c.


Function Documentation

int mesh_get_mtu void   ) 
 

Definition at line 138 of file sensor_mesh.c.

References error, mesh_ioctl(), and MESH_IOGMTU.

int mesh_get_resend_timeout struct timeval *  tv  ) 
 

Definition at line 153 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOGSNDTMO.

int mesh_get_sendqueue void   ) 
 

Definition at line 123 of file sensor_mesh.c.

References error, mesh_ioctl(), and MESH_IOGSNDQ.

double mesh_link_energy float  angle,
int  dist
 

Definition at line 112 of file sensor_mesh.c.

References MAC_ADDR_LEN, mesh_ioctl(), MESH_IOGLNKMTR, and neighbor_address().

double mesh_link_goodput float  angle,
int  dist
 

Definition at line 101 of file sensor_mesh.c.

References MAC_ADDR_LEN, mesh_ioctl(), MESH_IOGLNKMTR, and neighbor_address().

double mesh_link_reliability float  angle,
int  dist
 

Definition at line 90 of file sensor_mesh.c.

References MAC_ADDR_LEN, mesh_ioctl(), MESH_IOGLNKMTR, and neighbor_address().

int mesh_proactive_rediscover char *  protocol_name  ) 
 

re-establish proactive routes

Definition at line 44 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOREDISCVR.

ssize_t mesh_raw_recvfrom int  sd,
void *  buf,
size_t  len,
struct sockaddr_in *  from
 

Definition at line 186 of file sensor_mesh.c.

References mesh_ioctl(), MESH_IORECVRAW, and NET_ADDR_LEN.

ssize_t mesh_raw_sendto int  sd,
void *  buf,
size_t  len,
struct sockaddr_in *  to
 

routed UDP

Definition at line 180 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOSENDRAW.

ssize_t mesh_recvfrom int  sd,
void *  buf,
size_t  len,
struct sockaddr_in *  from
 

Definition at line 171 of file sensor_mesh.c.

References mesh_ioctl(), MESH_IORECVSEQ, and NET_ADDR_LEN.

ssize_t mesh_recvfrom_nextdoor int  sd,
void *  buf,
size_t  len,
float *  angle,
int *  dist
 

Definition at line 205 of file sensor_mesh.c.

References MAC_ADDR_LEN, mesh_ioctl(), MESH_IORECVNEAR, and neighbor_position().

double mesh_route_energy_cost char *  destination  ) 
 

Definition at line 68 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOGRTMTR.

double mesh_route_goodput char *  destination  ) 
 

Definition at line 59 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOGRTMTR.

double mesh_route_reliability char *  destination  ) 
 

Definition at line 50 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOGRTMTR.

ssize_t mesh_sendto int  sd,
void *  buf,
size_t  len,
struct sockaddr_in *  to
 

semi-reliable routed UDP

Definition at line 165 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOSENDSEQ.

ssize_t mesh_sendto_nextdoor int  sd,
void *  buf,
size_t  len,
float  angle,
int  dist
 

only to one-hop neighbor by position

Definition at line 196 of file sensor_mesh.c.

References MAC_ADDR_LEN, mesh_ioctl(), MESH_IOSENDNEAR, and neighbor_address().

int mesh_set_mtu int  size  ) 
 

Definition at line 147 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOSMTU.

int mesh_set_resend_timeout struct timeval *  tv  ) 
 

Definition at line 159 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOGSNDTMO.

int mesh_set_sendqueue int  size  ) 
 

Definition at line 132 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOSSNDQ.

int neighbor_address unsigned char *  mac_addr,
float  angle,
unsigned int  dist
 

Definition at line 77 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOGNGHADDR.

int neighbor_position float *  angle,
unsigned int *  dist,
unsigned char *  mac_addr
 

Definition at line 83 of file sensor_mesh.c.

References mesh_ioctl(), and MESH_IOGNGHPOS.


© 2007, Los Alamos National Security, LLC.