|
|
|
|
/home/brennan/n-sim/Vaike/linux/system-addons/networking/mesh_link.h File ReferenceWSN mesh network routing links. More...
#include <net/route.h>
#include <limits.h>
#include "mesh_protocol.h"
#include "mesh_metrics.h"
#include "mesh_net.h"
Go to the source code of this file.
|
Classes |
struct | _q |
struct | header_t |
struct | link_t |
struct | _link_entry |
struct | _db |
Defines |
#define | MESH_LINK_STRLEN (NET_ADDR_LEN * 2 + 32 * 5) |
#define | NUM_LINK_METRICS 4 |
#define | MAX_SEQNUM UINT32_MAX |
#define | MAX_MTU 2048 |
#define | MESH_LINK_STR_FORMAT "%s:%u:%d:%d:%d:%d:%s" |
Typedefs |
typedef _q | msg_queue_t |
typedef _link_entry | link_entry_t |
typedef _db | database_t |
Functions |
void | init_link (protocol_t *proto, link_t *link) |
void | init_link_entry (protocol_t *proto, link_entry_t *entry) |
link_entry_t * | new_link_entry (protocol_t *proto) |
void | link_to_string (link_t *link, char *string) |
database_t * | new_database (protocol_t *proto, unsigned int size) |
size_t | database_size (unsigned int num_links) |
void | pack_database (database_t *db) |
void | unpack_database (database_t *db) |
int | add_entry (protocol_t *proto, unsigned int id, link_entry_t *entry) |
int | remove_entry (protocol_t *proto, unsigned int id, link_entry_t *entry) |
link_entry_t * | retrieve_entry (protocol_t *proto, unsigned int id) |
link_entry_t * | iterate_entries (protocol_t *proto) |
unsigned int | num_entries (protocol_t *proto) |
void | empty_entries (protocol_t *proto) |
int | add_msg (link_entry_t *link, unsigned int seq_num, msg_queue_t *msg) |
int | remove_msg (link_entry_t *link, unsigned int seq_num, msg_queue_t *msg) |
msg_queue_t * | retrieve_msg (link_entry_t *link, unsigned int seq_num) |
void | empty_msgs (link_entry_t *link) |
unsigned int | ip_to_id (char *addr) |
char * | ip_to_dot (unsigned int addr) |
size_t | header_size (void) |
void | unpack_header (header_t *hdr) |
Detailed Description
WSN mesh network routing links.
- 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:48
Definition in file mesh_link.h.
Define Documentation
#define MAX_SEQNUM UINT32_MAX |
|
#define MESH_LINK_STR_FORMAT "%s:%u:%d:%d:%d:%d:%s" |
|
#define MESH_LINK_STRLEN (NET_ADDR_LEN * 2 + 32 * 5) |
|
#define NUM_LINK_METRICS 4 |
|
Typedef Documentation
Function Documentation
size_t database_size |
( |
unsigned int |
num_links |
) |
|
|
size_t header_size |
( |
void |
|
) |
|
|
|
Definition at line 81 of file mesh_link.c.
References _link_entry::bcast, _self::broadcast, _link_entry::iface, init_link(), init_metrics(), _self::interface, _self::ip_addr, ip_to_id(), _link_entry::last_packet, _link_entry::link, _link_entry::metrics, _self::netmask, _link_entry::next, _link_entry::nmask, _link_entry::node_id, _link_entry::protocol, _link_entry::recv_seq_num, avltree::root, _link_entry::routing_backlog, _link_entry::routing_pending, _link_entry::send_queue, _link_entry::send_seq_num, _protocol::sensor, and _link_entry::time_last_used.
Referenced by new_link_entry(). |
char* ip_to_dot |
( |
unsigned int |
addr |
) |
|
|
unsigned int ip_to_id |
( |
char * |
addr |
) |
|
|
void link_to_string |
( |
link_t * |
link, |
|
|
char * |
string |
|
) |
|
|
|
Definition at line 189 of file mesh_link.c.
References _db::header, link_t::hop_count, link_to_string(), _db::links, MESH_LINK_STRLEN, link_t::metrics, NUM_LINK_METRICS, header_t::protocol, link_t::rediscover, header_t::size, and unpack_header().
Referenced by receive_routes(). |
|