#include "mdns.h"#include <stddef.h>#include <sys/types.h>#include <string.h>#include <stdarg.h>#include <errno.h>#include <assert.h>#include <linux/if_ether.h>#include <linux/if_packet.h>#include <signal.h>#include <netinet/ip.h>#include <netinet/udp.h>#include <unistd.h>#include <stdio.h>#include <netinet/in.h>#include <netinet/ip6.h>#include "plugin_util.h"#include "defs.h"#include "ipcalc.h"#include "olsr.h"#include "mid_set.h"#include "link_set.h"#include "net_olsr.h"#include "olsr_logging.h"#include "NetworkInterfaces.h"#include "Address.h"#include "Packet.h"
Go to the source code of this file.
Defines | |
| #define | MAX_STR_DESC 255 |
Functions | |
| static void | PacketReceivedFromOLSR (const uint8_t *encapsulationUdpData, int len) |
| void | olsr_parser (struct olsr_message *msg, struct interface *in_if __attribute__((unused)), union olsr_ip_addr *ipaddr, enum duplicate_status status __attribute__((unused))) |
| void | olsr_mdns_gen (unsigned char *packet, int len) |
| void | BmfPError (const char *format,...) |
| union olsr_ip_addr * | MainAddressOf (union olsr_ip_addr *ip) |
| static void | BmfPacketCaptured (unsigned char *encapsulationUdpData, int nBytes) |
| void | DoMDNS (int skfd, void *data __attribute__((unused)), unsigned int flags __attribute__((unused))) |
| int | InitMDNS (struct interface *skipThisIntf) |
| void | CloseMDNS (void) |
Variables | |
| int | my_DNS_TTL = 0 |
| #define MAX_STR_DESC 255 |
Referenced by BmfPError().
| static void BmfPacketCaptured | ( | unsigned char * | encapsulationUdpData, | |
| int | nBytes | |||
| ) | [static] |
Definition at line 308 of file mdns.c.
References ARM_NOWARN_ALIGN, GetIpHeaderLength(), IsMulticast(), MainAddressOf(), olsr_mdns_gen(), and olsr_ip_addr::v4.
Referenced by DoMDNS().

| void BmfPError | ( | const char * | format, | |
| ... | ||||
| ) |
Definition at line 247 of file mdns.c.
References LOG_PLUGINS, MAX_STR_DESC, OLSR_DEBUG, and PLUGIN_NAME.
Referenced by CreateBmfNetworkInterfaces(), CreateCaptureSocket(), CreateInterface(), and PacketReceivedFromOLSR().
| void CloseMDNS | ( | void | ) |
Definition at line 465 of file mdns.c.
References CloseBmfNetworkInterfaces().
Referenced by olsr_plugin_exit().

| void DoMDNS | ( | int | skfd, | |
| void *data | __attribute__(unused), | |||
| unsigned int flags | __attribute__(unused) | |||
| ) |
Definition at line 389 of file mdns.c.
References BMF_BUFFER_SIZE, BmfPacketCaptured(), and GetIpPacket().
Referenced by CreateCaptureSocket().

| int InitMDNS | ( | struct interface * | skipThisIntf | ) |
Definition at line 444 of file mdns.c.
References CreateBmfNetworkInterfaces(), olsr_parser(), olsr_parser_add_function(), and PARSER_TYPE.
Referenced by olsrd_plugin_init().

| union olsr_ip_addr* MainAddressOf | ( | union olsr_ip_addr * | ip | ) | [write] |
Definition at line 280 of file mdns.c.
References olsr_lookup_main_addr_by_alias().

| void olsr_mdns_gen | ( | unsigned char * | packet, | |
| int | len | |||
| ) |
Definition at line 180 of file mdns.c.
References get_msg_seqno(), olsr_message::hopcnt, ifn, MAX_TTL, MDNS_VALID_TIME, MESSAGE_TYPE, MSEC_PER_SEC, my_MDNS_TTL, net_outbuffer_push(), net_output(), olsr_cnf, 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 BmfPacketCaptured().

| void olsr_parser | ( | struct olsr_message * | msg, | |
| struct interface *in_if | __attribute__(unused), | |||
| union olsr_ip_addr * | ipaddr, | |||
| enum duplicate_status status | __attribute__(unused) | |||
| ) |
Definition at line 157 of file mdns.c.
References check_neighbor_link(), olsr_message::end, LOG_PLUGINS, MESSAGE_TYPE, OLSR_DEBUG, PacketReceivedFromOLSR(), olsr_message::payload, SYM_LINK, and olsr_message::type.

| static void PacketReceivedFromOLSR | ( | const uint8_t * | encapsulationUdpData, | |
| int | len | |||
| ) | [static] |
Definition at line 89 of file mdns.c.
References ARM_CONST_NOWARN_ALIGN, BmfInterfaces, BmfPError(), TBmfInterface::capturingSkfd, TBmfInterface::ifName, LOG_PLUGINS, TBmfInterface::next, OLSR_DEBUG, and TBmfInterface::olsrIntf.
Referenced by olsr_parser().

| int my_DNS_TTL = 0 |
1.6.3