/home/aaron/olsrd-current/olsrd/lib/mdns/src/mdns.c File Reference

#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"
Include dependency graph for mdns.c:

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_addrMainAddressOf (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 Documentation

#define MAX_STR_DESC   255

Referenced by BmfPError().


Function Documentation

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().

Here is the call graph for this function:

void BmfPError ( const char *  format,
  ... 
)
void CloseMDNS ( void   ) 

Definition at line 465 of file mdns.c.

References CloseBmfNetworkInterfaces().

Referenced by olsr_plugin_exit().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

void olsr_mdns_gen ( unsigned char *  packet,
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) 
)

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.

Here is the call graph for this function:

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().

Here is the call graph for this function:


Variable Documentation

int my_DNS_TTL = 0

Definition at line 78 of file mdns.c.

Generated on Wed Jun 19 06:00:04 2013 for olsrd by  doxygen 1.6.3