|
|
|
|
/home/brennan/n-sim/Vaike/linux/system-addons/networking/mesh_on_demand.c File Reference#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <arpa/inet.h>
#include <linux/if_tun.h>
#include <linux/netfilter.h>
#include "libipq.h"
#include "sensor_self.h"
#include "mesh_link.h"
#include "mesh_route.h"
#include "mesh_on_demand.h"
Go to the source code of this file.
Define Documentation
#define DIVERT_DEV_IP "127.0.0.2" |
|
#define DIVERT_DEV_NAME "tun" |
|
|
TODO: make this portable (i.e. alternatives to libipq, tun/tap)
Definition at line 60 of file mesh_on_demand.c. |
Function Documentation
int on_demand |
( |
self_t * |
self |
) |
|
|
int packet_usage |
( |
self_t * |
self |
) |
|
|
|
Definition at line 338 of file mesh_on_demand.c.
References get_current_time(), ip_to_dot(), ipq_create_handle(), ipq_destroy_handle(), ipq_get_msgerr(), ipq_get_packet(), ipq_message_type(), ipq_read(), ipq_set_mode(), ipq_set_verdict(), _protocol::next, retrieve_entry(), and _link_entry::time_last_used.
Referenced by on_demand_timeouts(). |
|
Definition at line 75 of file mesh_on_demand.c.
References _q::data, _self::interface, _q::len, _link_entry::link, _self::mac_addr, mesh_sendmsg(), _q::next, NO_ROUTE, link_t::node, _q::port, _protocol::queue_sd, retrieve_entry(), ROUTE_FOUND, _link_entry::routing_backlog, _link_entry::routing_pending, and _protocol::sensor. |
int route_idle_time |
( |
u_int32_t |
dest, |
|
|
protocol_t * |
proto |
|
) |
|
|
|