#include <netinet/in.h>#include "olsr_types.h"#include "plugin.h"#include "Packet.h"#include "mdns.h"

Go to the source code of this file.
| #define BMF_BUFFER_SIZE 2048 |
Definition at line 57 of file NetworkInterfaces.h.
| #define ETHERTUNTAPDEFAULTIP 0x0AFFFFFD |
Definition at line 116 of file NetworkInterfaces.h.
| #define FRAGMENT_HISTORY_SIZE 10 |
Definition at line 85 of file NetworkInterfaces.h.
| #define MAX_UNICAST_NEIGHBORS 10 |
Definition at line 133 of file NetworkInterfaces.h.
| enum TBmfMechanism |
Definition at line 123 of file NetworkInterfaces.h.
| void AddInterface | ( | struct interface * | newIntf | ) |
Definition at line 1199 of file NetworkInterfaces.c.
References CreateInterface(), interface::int_name, LOG_PLUGINS, and OLSR_DEBUG.
Referenced by InterfaceChange().

| void AddMulticastRoute | ( | void | ) |
Definition at line 1419 of file NetworkInterfaces.c.
References ARM_NOWARN_ALIGN, EtherTunTapIfName, LOG_PLUGINS, OLSR_WARN, and RTF_UP.
Referenced by InitBmf().
| int AddNonOlsrBmfIf | ( | const char * | ifName, | |
| void * | data, | |||
| set_plugin_parameter_addon | addon | |||
| ) |
| void CheckAndUpdateLocalBroadcast | ( | unsigned char * | ipPacket, | |
| union olsr_ip_addr * | broadAddr | |||
| ) |
Definition at line 1359 of file NetworkInterfaces.c.
References ARM_NOWARN_ALIGN, GetIpHeaderLength(), IsMulticast(), and olsr_ip_addr::v4.
Referenced by BmfEncapsulationPacketReceived(), BmfPacketCaptured(), and BmfTunPacketCaptured().

| void CloseBmfNetworkInterfaces | ( | void | ) |
Definition at line 1227 of file NetworkInterfaces.c.
References TBmfInterface::capturingSkfd, TBmfInterface::encapsulatingSkfd, EtherTunTapFd, EtherTunTapIfName, TBmfInterface::ifName, LOG_PLUGINS, TBmfInterface::nBmfPacketsRx, TBmfInterface::nBmfPacketsRxDup, TBmfInterface::nBmfPacketsTx, TBmfInterface::next, OLSR_DEBUG, and TBmfInterface::olsrIntf.
Referenced by CloseBmf(), and CloseMDNS().
| int CreateBmfNetworkInterfaces | ( | struct interface * | skipThisIntf | ) |
Definition at line 1102 of file NetworkInterfaces.c.
References ARM_NOWARN_ALIGN, BmfPError(), CreateInterface(), CreateLocalEtherTunTap(), EtherTunTapFd, EtherTunTapIfName, if_ifwithaddr(), InputSet, IsNonOlsrBmfIf(), LOG_PLUGINS, OLSR_WARN, and olsr_ip_addr::v4.
Referenced by InitBmf(), and InitMDNS().

| int DeactivateSpoofFilter | ( | void | ) |
Definition at line 301 of file NetworkInterfaces.c.
References EtherTunTapIfName, LOG_PLUGINS, and OLSR_WARN.
Referenced by InitBmf().
| void DeleteMulticastRoute | ( | void | ) |
Definition at line 1461 of file NetworkInterfaces.c.
References ARM_NOWARN_ALIGN, ETHERTUNTAPDEFAULTIP, EtherTunTapIfName, EtherTunTapIp, LOG_PLUGINS, OLSR_WARN, and RTF_UP.
Referenced by CloseBmf().
| void FindNeighbors | ( | struct TBestNeighbors * | neighbors, | |
| struct link_entry ** | bestNeighbor, | |||
| struct TBmfInterface * | intf, | |||
| union olsr_ip_addr * | source, | |||
| union olsr_ip_addr * | forwardedBy, | |||
| union olsr_ip_addr * | forwardedTo, | |||
| int * | nPossibleNeighbors | |||
| ) |
Definition at line 386 of file NetworkInterfaces.c.
References ipaddr_str::buf, tc_edge_entry::cost, FanOutLimit, get_best_link_to_neighbor_ip(), if_ifwithaddr(), TBmfInterface::ifName, interface::int_name, TBmfInterface::intAddr, LINK_COST_BROKEN, link_entry::linkcost, TBestNeighbors::links, link_entry::local_iface_addr, LOG_PLUGINS, LQTEXT_MAXLENGTH, MainAddressOf(), MAX_UNICAST_NEIGHBORS, link_entry::neighbor_iface_addr, OLSR_DEBUG, OLSR_FOR_ALL_LINK_ENTRIES, olsr_get_linkcost_text(), olsr_ip_to_string(), olsr_ipcmp(), olsr_lookup_tc_edge(), and olsr_lookup_tc_entry().
Referenced by BmfEncapsulationPacketReceived(), and EncapsulateAndForwardPacket().

| int IsNonOlsrBmfIf | ( | const char * | ifName | ) |
Definition at line 1332 of file NetworkInterfaces.c.
References nNonOlsrIfs, and NonOlsrIfNames.
Referenced by CreateBmfNetworkInterfaces().
| void RestoreSpoofFilter | ( | void | ) |
Definition at line 351 of file NetworkInterfaces.c.
References EtherTunTapIfName, LOG_PLUGINS, and OLSR_WARN.
Referenced by CloseBmf().
| int set_MDNS_TTL | ( | const char * | MDNS_TTL, | |
| void * | data, | |||
| set_plugin_parameter_addon | addon | |||
| ) |
| int SetBmfInterfaceIp | ( | const char * | ip, | |
| void * | data, | |||
| set_plugin_parameter_addon | addon | |||
| ) |
| int SetBmfInterfaceName | ( | const char * | ifname, | |
| void * | data, | |||
| set_plugin_parameter_addon | addon | |||
| ) |
| int SetBmfMechanism | ( | const char * | mechanism, | |
| void * | data, | |||
| set_plugin_parameter_addon | addon | |||
| ) |
| int SetCapturePacketsOnOlsrInterfaces | ( | const char * | enable, | |
| void * | data, | |||
| set_plugin_parameter_addon | addon | |||
| ) |
| struct TBmfInterface* BmfInterfaces |
Definition at line 79 of file NetworkInterfaces.c.
Referenced by BmfEncapsulationPacketReceived(), BmfPacketCaptured(), BmfTunPacketCaptured(), DoBmf(), and PacketReceivedFromOLSR().
Definition at line 100 of file NetworkInterfaces.c.
Referenced by BmfEncapsulationPacketReceived(), CreateInterface(), EncapsulateAndForwardPacket(), and SetBmfMechanism().
| int EtherTunTapFd |
Definition at line 90 of file NetworkInterfaces.c.
Referenced by BmfEncapsulationPacketReceived(), CloseBmf(), CloseBmfNetworkInterfaces(), CreateBmfNetworkInterfaces(), DoBmf(), and InitBmf().
| char EtherTunTapIfName[] |
Definition at line 94 of file NetworkInterfaces.c.
Referenced by AddMulticastRoute(), BmfEncapsulationPacketReceived(), BmfTunPacketCaptured(), CloseBmfNetworkInterfaces(), CreateBmfNetworkInterfaces(), CreateLocalEtherTunTap(), DeactivateSpoofFilter(), DeleteMulticastRoute(), DoBmf(), RestoreSpoofFilter(), and SetBmfInterfaceName().
| u_int32_t EtherTunTapIp |
Definition at line 106 of file NetworkInterfaces.c.
Referenced by CreateLocalEtherTunTap(), DeleteMulticastRoute(), InitBmf(), and SetBmfInterfaceIp().
| u_int32_t EtherTunTapIpBroadcast |
Definition at line 114 of file NetworkInterfaces.c.
Referenced by BmfEncapsulationPacketReceived(), BmfTunPacketCaptured(), CreateLocalEtherTunTap(), and SetBmfInterfaceIp().
| u_int32_t EtherTunTapIpMask |
Definition at line 110 of file NetworkInterfaces.c.
Referenced by CreateLocalEtherTunTap(), and SetBmfInterfaceIp().
| int HighestSkfd |
Definition at line 84 of file NetworkInterfaces.c.
Referenced by AddDescriptorToInputSet(), and DoBmf().
| fd_set InputSet |
Definition at line 87 of file NetworkInterfaces.c.
Referenced by AddDescriptorToInputSet(), CreateBmfNetworkInterfaces(), and DoBmf().
| int my_MDNS_TTL |
Definition at line 77 of file NetworkInterfaces.c.
Referenced by olsr_mdns_gen(), and set_MDNS_TTL().
1.6.3