#include "common/list.h"#include "plugin.h"#include "parser.h"

Go to the source code of this file.
Data Structures | |
| struct | ObampNode |
| struct | ObampSniffingIf |
| struct | ObampNodeState |
| struct | OBAMP_data_message4 |
| struct | OBAMP_data_message6 |
| struct | OBAMP_tree_destroy |
| struct | OBAMP_tree_create |
| struct | OBAMP_tree_link_req |
| struct | OBAMP_tree_link_ack |
| struct | OBAMP_hello |
| struct | OBAMP_alive |
Defines | |
| #define | MESSAGE_TYPE 133 |
| #define | PARSER_TYPE MESSAGE_TYPE |
| #define | EMISSION_INTERVAL 10 |
| #define | EMISSION_JITTER 25 |
| #define | OBAMP_VALID_TIME 1800 |
| #define | PLUGIN_NAME "OLSRD OBAMP plugin" |
| #define | PLUGIN_NAME_SHORT "OLSRD OBAMP" |
| #define | PLUGIN_VERSION "1.0.0 (" __DATE__ " " __TIME__ ")" |
| #define | PLUGIN_COPYRIGHT " (C) Ninux.org" |
| #define | PLUGIN_AUTHOR " Saverio Proto (zioproto@gmail.com)" |
| #define | MOD_DESC PLUGIN_NAME " " PLUGIN_VERSION "\n" PLUGIN_COPYRIGHT "\n" PLUGIN_AUTHOR |
| #define | PLUGIN_INTERFACE_VERSION 5 |
| #define | PLUGIN_DESCR "OBAMP" |
| #define | OBAMP_JITTER 25 |
| #define | OBAMP_ALIVE_EIVAL 3 |
| #define | OBAMP_MESH_CREATE_IVAL 1 |
| #define | OBAMP_TREE_CREATE_IVAL 2 |
| #define | TREE_HEARTBEAT 5 |
| #define | OBAMP_OUTER_TREE_CREATE_IVAL 6 |
| #define | _MESH_LOCK_ 3 |
| #define | _Texpire_ 18 |
| #define | _Texpire_timer_ 1 |
| #define | _TREE_REQUEST_DELAY_ 5 |
| #define | OBAMP_DATA 0 |
| #define | OBAMP_HELLO 1 |
| #define | OBAMP_TREECREATE 2 |
| #define | OBAMP_ALIVE 3 |
| #define | OBAMP_TREE_REQ 4 |
| #define | OBAMP_TREE_ACK 5 |
| #define | OBAMP_TREE_DESTROY 6 |
| #define | OBAMP_SIGNALLING_PORT 6226 |
Functions | |
| union olsr_ip_addr * | MainAddressOf (union olsr_ip_addr *ip) |
| void | ObampSignalling (int sd, void *x, unsigned int y) |
| void | EncapFlowInObamp (int sd, void *x, unsigned int y) |
| int | AddObampSniffingIf (const char *ifName, void *data, set_plugin_parameter_addon addon) |
| int | InitOBAMP (void) |
| int | PreInitOBAMP (void) |
| void | CloseOBAMP (void) |
| void | olsr_obamp_gen (void *packet, int len) |
| void | obamp_hello_gen (void *para) |
| void | obamp_alive_gen (void *para) |
| void | purge_nodes (void *para) |
| void | mesh_create (void *para) |
| void | tree_create (void *para) |
| void | outer_tree_create (void *para) |
| void | unsolicited_tree_destroy (void *para) |
| int | addObampNode4 (struct in_addr *ipv4, u_int8_t status) |
| void | olsr_parser (struct olsr_message *, struct interface *, union olsr_ip_addr *, enum duplicate_status) |
Variables | |
| struct ObampNodeState * | myState |
| struct OBAMP_data_message4 | __packed__ |
| #define _MESH_LOCK_ 3 |
Definition at line 75 of file obamp.h.
Referenced by manage_hello().
| #define _Texpire_ 18 |
Definition at line 77 of file obamp.h.
Referenced by addObampNode4(), and init_overlay_neighbor().
| #define _Texpire_timer_ 1 |
Definition at line 78 of file obamp.h.
Referenced by InitOBAMP().
| #define _TREE_REQUEST_DELAY_ 5 |
Definition at line 80 of file obamp.h.
Referenced by tree_link_req().
| #define MOD_DESC PLUGIN_NAME " " PLUGIN_VERSION "\n" PLUGIN_COPYRIGHT "\n" PLUGIN_AUTHOR |
| #define OBAMP_ALIVE 3 |
Definition at line 87 of file obamp.h.
Referenced by obamp_alive_gen(), and PacketReceivedFromOLSR().
| #define OBAMP_ALIVE_EIVAL 3 |
Definition at line 70 of file obamp.h.
Referenced by InitOBAMP().
| #define OBAMP_DATA 0 |
Definition at line 84 of file obamp.h.
Referenced by ObampSignalling(), and SendOBAMPData().
| #define OBAMP_HELLO 1 |
Definition at line 85 of file obamp.h.
Referenced by obamp_hello(), and ObampSignalling().
| #define OBAMP_JITTER 25 |
Definition at line 69 of file obamp.h.
Referenced by InitOBAMP().
| #define OBAMP_MESH_CREATE_IVAL 1 |
Definition at line 71 of file obamp.h.
Referenced by InitOBAMP().
| #define OBAMP_OUTER_TREE_CREATE_IVAL 6 |
Definition at line 74 of file obamp.h.
Referenced by InitOBAMP().
| #define OBAMP_SIGNALLING_PORT 6226 |
Definition at line 92 of file obamp.h.
Referenced by forward_obamp_data(), obamp_hello(), send_destroy_tree_link(), SendOBAMPData(), tree_create_forward_to(), tree_create_gen(), tree_link_ack(), tree_link_req(), and UdpServer().
| #define OBAMP_TREE_ACK 5 |
Definition at line 89 of file obamp.h.
Referenced by ObampSignalling(), and tree_link_ack().
| #define OBAMP_TREE_CREATE_IVAL 2 |
Definition at line 72 of file obamp.h.
Referenced by InitOBAMP().
| #define OBAMP_TREE_DESTROY 6 |
Definition at line 90 of file obamp.h.
Referenced by ObampSignalling(), and send_destroy_tree_link().
| #define OBAMP_TREE_REQ 4 |
Definition at line 88 of file obamp.h.
Referenced by ObampSignalling(), and tree_link_req().
| #define OBAMP_TREECREATE 2 |
Definition at line 86 of file obamp.h.
Referenced by manage_tree_create(), ObampSignalling(), and tree_create_gen().
| #define OBAMP_VALID_TIME 1800 |
Definition at line 56 of file obamp.h.
Referenced by olsr_obamp_gen().
| #define TREE_HEARTBEAT 5 |
Definition at line 73 of file obamp.h.
Referenced by activate_tree_link(), manage_tree_create(), and outer_tree_create().
| int addObampNode4 | ( | struct in_addr * | ipv4, | |
| u_int8_t | status | |||
| ) |
Definition at line 1070 of file obamp.c.
References _Texpire_, CoreElection(), init_overlay_neighbor(), ip4_to_string(), ObampNode::list, list_add_head(), list_add_tail(), list_is_empty(), ListOfObampNodes, LOG_PLUGINS, ObampNode::neighbor_ip_addr, OLSR_DEBUG, OLSR_FOR_ALL_OBAMPNODE_ENTRIES, olsr_malloc(), ObampNode::status, ObampNode::Texpire, and olsr_ip_addr::v4.
Referenced by PacketReceivedFromOLSR().

| int AddObampSniffingIf | ( | const char * | ifName, | |
| void * | data, | |||
| set_plugin_parameter_addon | addon | |||
| ) |
| void CloseOBAMP | ( | void | ) |
Definition at line 1707 of file obamp.c.
Referenced by olsr_plugin_exit().
| void EncapFlowInObamp | ( | int | sd, | |
| void * | x, | |||
| unsigned int | y | |||
| ) |
| int InitOBAMP | ( | void | ) |
Definition at line 1589 of file obamp.c.
References _Texpire_timer_, AF_INET6, ObampNodeState::CoreAddress, CreateObampSniffingInterfaces(), ObampNodeState::DataSequenceNumber, ObampNodeState::iamcore, ip4_to_string(), olsr_config::ip_version, olsr_config::ipsize, list_init_head(), ListOfObampNodes, LOG_PLUGINS, mesh_create(), MSEC_PER_SEC, ObampNodeState::myipaddr, OBAMP_ALIVE_EIVAL, obamp_alive_gen(), OBAMP_JITTER, OBAMP_MESH_CREATE_IVAL, OBAMP_OUTER_TREE_CREATE_IVAL, OBAMP_TREE_CREATE_IVAL, ObampNodeState::OldParentId, olsr_cnf, OLSR_DEBUG, OLSR_ERROR, olsr_malloc(), olsr_parser(), olsr_parser_add_function(), olsr_timer_add(), olsr_timer_start(), outer_tree_create(), ObampNodeState::ParentId, PARSER_TYPE, purge_nodes(), olsr_config::router_id, tree_create(), ObampNodeState::tree_req_sn, ObampNodeState::TreeCreateSequenceNumber, ObampNodeState::TreeHeartBeat, ObampNodeState::TreeRequestDelay, UdpServer(), unsolicited_tree_destroy(), and olsr_ip_addr::v4.
Referenced by olsrd_plugin_init().

| union olsr_ip_addr* MainAddressOf | ( | union olsr_ip_addr * | ip | ) | [write] |
Definition at line 94 of file Bmf.c.
References olsr_lookup_main_addr_by_alias().
Referenced by BmfPacketCaptured(), and FindNeighbors().

| void mesh_create | ( | void * | para | ) |
| void obamp_alive_gen | ( | void * | para | ) |
| void obamp_hello_gen | ( | void * | para | ) |
| void ObampSignalling | ( | int | sd, | |
| void * | x, | |||
| unsigned int | y | |||
| ) |
| void olsr_obamp_gen | ( | void * | packet, | |
| int | len | |||
| ) |
Definition at line 1188 of file obamp.c.
References get_msg_seqno(), olsr_message::hopcnt, ifn, interface::int_name, LOG_PLUGINS, MAX_TTL, MESSAGE_TYPE, MSEC_PER_SEC, net_outbuffer_push(), net_output(), OBAMP_VALID_TIME, olsr_cnf, OLSR_DEBUG, OLSR_FOR_ALL_INTERFACES, olsr_put_msg_hdr(), olsr_message::originator, pkt_put_u16(), olsr_config::router_id, olsr_message::seqno, olsr_message::size, olsr_message::ttl, olsr_message::type, and olsr_message::vtime.
Referenced by obamp_alive_gen().

| void olsr_parser | ( | struct olsr_message * | , | |
| struct interface * | , | |||
| union olsr_ip_addr * | , | |||
| enum | duplicate_status | |||
| ) |
| void outer_tree_create | ( | void * | para | ) |
| int PreInitOBAMP | ( | void | ) |
Definition at line 1579 of file obamp.c.
References list_init_head(), and ListOfObampSniffingIf.
Referenced by obamp_init().

| void purge_nodes | ( | void * | para | ) |
| void tree_create | ( | void * | para | ) |
| void unsolicited_tree_destroy | ( | void * | para | ) |
Definition at line 566 of file obamp.c.
References ObampNode::isTree, ObampNode::neighbor_ip_addr, OLSR_FOR_ALL_OBAMPNODE_ENTRIES, send_destroy_tree_link(), and olsr_ip_addr::v4.
Referenced by InitOBAMP().

| struct OBAMP_data_message4 __packed__ |
| struct ObampNodeState* myState |
1.6.3