1#include "main-header.h"
25void routing_event_loop();
27void send_routing_update_now();
30void set_routing_debug(
byte b);
31byte get_routing_debug();
37void error_com(
void *com);
38int is_command_valid(
struct command *com);
41void routing_error(
struct command *com,
int errorcode);
void routing_print_table()
print routing table
struct hostroute * routing_find_route(const long nodeid, const byte sourcedev)
find specific hostroute to target or NULL if none known special case, if we ask for a route to server...
void routing_init()
called when we power-up
void remove_stale_routes()
"old" routes are being removed this is the route garbage collector
struct hostroute * routing_find_host(const long nodeid)
find route to host or NULL if none known
long get_my_node_id()
get the id of my node
struct hostroute * routing_get_node_by_index(const int index)
finds a nodeid by index. [0...n]
int routing_count_nodes()
determine number of nodes known
int is_device_online(int device)
return 1 if the specified device is online and routing
byte got_new_packet(struct command *com, uint8_t signal_indicator)
stack received a new packet (signal indicator is a 0-255 byte value, interface specific)
byte get_hops_to_server()
how many hops to the server?
int send_command_one_arg(int command, long target, const byte *arg1, int arg1len)
helper function to quickly and easily send a command somewhere return 0 if ok, else errorcode
void request_route(long host)
send an arp request (equivalent)
void routing_request_reply(const struct command *com)
we call this when we receive a reply to a routing request this adds or updates a new route
definitions of routing table structures