Struct:tsMdnsConfig

Jump to: navigation, search
#include "trsocket.h"
 
/*
 * mDNS server configuration (per mDNS descriptor handle).
 *  . Host name must be unique on the physical link, e.g. "Motor Control 2".
 *  . Interface handle and IPv4 multihome index must be specified
 *      (see tfConfigInterface, tfGetIpAddress and tfSetMcastInterface).
 *  . List of services is optional.  If provided, each service instance must
 *      be unique on the physical link, e.g. "Printer at Mary's Desk".
 *  . Flags must be zero (not currently used).
 */
struct tsMdnsConfig
{
    ttUserConstCharPtr mcHostName;
    ttUserInterface mcInterface;
    int mcMultihome;
    ttMdnsConstConfigServicePtr mcServiceArr;
    int mcServiceCount;
    unsigned int mcFlags;
};
 
typedef struct tsMdnsConfig ttMdnsConfig;
typedef ttMdnsConfig TM_FAR * ttMdnsConfigPtr;
typedef ttMdnsConfigPtr TM_FAR * ttMdnsConfigPtrPtr;
typedef const ttMdnsConfig TM_FAR * ttConstMdnsConfigPtr;

Structure Description

This structure supplies all configuration information for one mDNS server. The user must define a variable of type ttMdnsConfig or struct tsMdnsConfig, set the values and call tfMdnsStart() to create the server. The user is free to discard the structure or change its contents after tfMdnsStart() returns.


Members

  • mcHostName
    A user-friendly name by which the host identifies itself to other hosts on the local network. This name must be unique on the link. The name may contain spaces, punctuation and UTF-8 characters (see section 16 of RFC 6762 for discussion). This is a required field that must not be NULL.
  • mcInterface
    The interface with which to send and receive mDNS messages (see tfNgConfigInterface()). Because mDNS uses multicast messaging, this field is required and must not be NULL.
  • mcMultihome
    The interface multihome address index with which to send mDNS messages (see tfNgConfigInterface()). Because mDNS messages include a source IP address, this field is required and must be set. Set to zero if you are using TM_SINGLE_INTERFACE_HOME.
  • mcServiceArr
    If your host is running servers that other hosts may need to locate, provide an array of pointers to service configuration structures (struct tsMdnsConfigService). This field is optional and may be set to NULL.
  • mcServiceCount
    Specify the number of entries you are providing via member mcServiceArr above. Specify zero if you set a NULL pointer for mcServiceArr.
  • mcFlags
    Currently unused. Must be set to zero.