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/mesh_protocol.h File Reference

WSN mesh network protocol registry. More...

#include <netinet/in.h>
#include <pthread.h>
#include "avl.h"

Go to the source code of this file.

Classes

struct  _protocol

Defines

#define PROTO_NAMELEN   64

Typedefs

typedef _protocol protocol_t

Functions

u_int64_t get_current_time (void)
int add_protocol (struct _self *self, char *name, int id, char *path, unsigned int tmo, unsigned char pro, unsigned char re, char *discovery_fctn, char *route_send_fctn, char *route_recv_fctn, char *socket_mod_fctn)
int delete_protocol (struct _self *self, char *string)
protocol_tprotocol_by_string (struct _self *self, char *string)
protocol_tprotocol_by_id (struct _self *self, int id)
int recv_mesh_discovery (protocol_t *proto, int sd, int num_links)
ssize_t send_routes (struct _self *self, int sd, struct _db *db, unsigned int num_links, struct sockaddr_in *to)
ssize_t receive_routes (int sd, struct _db *db, unsigned int num_links, struct sockaddr_in *from, struct msghdr *msg_header, size_t ctl_msg_size)


Detailed Description

WSN mesh network protocol registry.

Revision
1.2

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

Author
sean_m_brennan

Created: August 1, 2007

Date
2008/02/05 19:14:30

Definition in file mesh_protocol.h.


Define Documentation

#define PROTO_NAMELEN   64
 

Definition at line 45 of file mesh_protocol.h.

Referenced by add_protocol().


Typedef Documentation

typedef struct _protocol protocol_t
 


Function Documentation

int add_protocol struct _self self,
char *  name,
int  id,
char *  path,
unsigned int  tmo,
unsigned char  pro,
unsigned char  re,
char *  discovery_fctn,
char *  route_send_fctn,
char *  route_recv_fctn,
char *  socket_mod_fctn
 

Definition at line 58 of file mesh_protocol.c.

References discover_network(), _protocol::discover_thread, _self::last_p, _protocol::lib_handle, _protocol::mesh_init_discovery, _protocol::mesh_route_recv, _protocol::mesh_route_send, _protocol::name, _protocol::proactive, PROTO_NAMELEN, _self::protocols, _protocol::reactive, _protocol::sensor, _protocol::timeout, and _protocol::unique_id.

int delete_protocol struct _self self,
char *  string
 

Definition at line 123 of file mesh_protocol.c.

References _protocol::next.

u_int64_t get_current_time void   ) 
 

Definition at line 48 of file mesh_protocol.c.

Referenced by add_msg(), mesh_sendmsg(), packet_usage(), reliable_net(), and route_idle_time().

protocol_t* protocol_by_id struct _self self,
int  id
 

Definition at line 155 of file mesh_protocol.c.

References _protocol::next, and _protocol::unique_id.

Referenced by mesh_recv().

protocol_t* protocol_by_string struct _self self,
char *  string
 

Definition at line 143 of file mesh_protocol.c.

References _protocol::name, and _protocol::next.

ssize_t receive_routes int  sd,
struct _db db,
unsigned int  num_links,
struct sockaddr_in *  from,
struct msghdr *  msg_header,
size_t  ctl_msg_size
 

Definition at line 191 of file mesh_protocol.c.

References database_size(), mesh_recvmsg(), and unpack_database().

Referenced by strength_recv_mesh_discovery().

int recv_mesh_discovery protocol_t proto,
int  sd,
int  num_links
 

Definition at line 169 of file mesh_protocol.c.

References _protocol::mesh_route_recv, and _protocol::sensor.

ssize_t send_routes struct _self self,
int  sd,
struct _db db,
unsigned int  num_links,
struct sockaddr_in *  to
 

Definition at line 180 of file mesh_protocol.c.

References database_size(), _self::interface, _self::mac_addr, mesh_sendmsg(), and pack_database().


© 2007, Los Alamos National Security, LLC.