Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

mdnshandler.h File Reference


Detailed Description

The mdnshander monitors services via mDNS (Multicast Domain Name Service), also branded by Apple as Bonjour (formally Rendezvous, see references below). You can recieve up and down events that contain the ip, port and name for the service of the type specified.

Wire keywords (standard handler keywords documented in Wire )

You my have multiple servicematch: lines. Example:

// generate events for all iTunes coming up/down in local domain 
set up create event { name: "up" }
set down create event { name: "down" }

create handler mdns { 
	servicematch: $up $down 'daap' '' ''
	servicematch: $up $down 'dacp' '' ''
	servicematch: $up $down 'raop' '' ''
}

Events generated:
Event NameTypeDescription
up AW_EVENT_TYPE_STRING Service with matching name is up, send string as ip|port|service|name
down AW_EVENT_TYPE_STRING Service with matching name is that was up is now down, send string as ip|port|service|name
References:

#include "monitor.h"
#include "wire.h"
#include "mDNSClientAPI.h"
#include "mDNSPosix.h"

Go to the source code of this file.

Data Structures

struct  aw_mdnshandler_events_t
 Events generated. More...

struct  aw_mdnshandler_question_s
struct  aw_mdnshandler_servicematch_t
 Describes service you want up/down events monitored. More...

struct  aw_mdnshandler_t
 Mdns handler object. More...


Typedefs

typedef aw_mdnshandler_question_s aw_mdnshandler_question_t

Functions

aw_mdnshandler_t * aw_create_mdnshandler (u_int32_t nservicematches, aw_mdnshandler_servicematch_t *servicematches, aw_logger_t *logger)
 Create a mdns handler.

void aw_free_mdnshandler (aw_mdnshandler_t *h)
 Free handler and all associated resources.

aw_handler_t * aw_wire_mdnshandler (aw_wire_mkhandler_args_t *args)
 Create a mdns handler using "wire". See header doc for keyword documentation.


Typedef Documentation

typedef struct aw_mdnshandler_question_s aw_mdnshandler_question_t
 


Function Documentation

aw_mdnshandler_t* aw_create_mdnshandler (  u_int32_t  nservicematches,
aw_mdnshandler_servicematch_t *  servicematches,
aw_logger_t *  logger
) 
 

Create a mdns handler.

Parameters:
nservicematches Number of following servicematches
servicematches Array of servicematches describing what to monitor
logger Logger object
Returns:
Handler object

void aw_free_mdnshandler (  aw_mdnshandler_t *  h  ) 
 

Free handler and all associated resources.

Parameters:
h The handler

aw_handler_t* aw_wire_mdnshandler (  aw_wire_mkhandler_args_t *  args  ) 
 

Create a mdns handler using "wire". See header doc for keyword documentation.

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)