Resolving records
[Multicast DNS]


Detailed Description

The module include functions for resolving unique records like hostname or service records.

For all the included functions the precondition takes affect that the MDNS responder was successfully initialized by bInitMDNSResponder and started by StartMDNSResponder.


Functions

void MDNSResolveService (char *pName, ROM char *pServiceName)
 The function resolves a service record via MDNS.
void MDNSResolveName (char *pName)
 The function resolves a hostname record via MDNS to an IP address.
void MDNSStopResolving (void)
 A pending resolvation process will be stopped.
BOOL bMDNSServiceIsResolved (IP_ADDR *pIP, WORD_VAL *pu16Port)
 After calling MDNSResolveService the application should check periodically the resolvation progress with a call of this function.
BOOL bMDNSNameIsResolved (IP_ADDR *pIP)
 After calling MDNSResolveName the application should check periodically the resolvation progress with a call of this function.


Function Documentation

BOOL bMDNSNameIsResolved ( IP_ADDR *  pIP  ) 

After calling MDNSResolveName the application should check periodically the resolvation progress with a call of this function.

Return values:
TRUE The hostname was completely resolved. Check the pIP parameter.
FALSE The resolvation progress is pending or not yet started.
Parameters:
[out] pIP In case the hostname is resolved this parameter stores the IP address of the requested host.
Precondition:
MDNSResolveName must be called.

BOOL bMDNSServiceIsResolved ( IP_ADDR *  pIP,
WORD_VAL *  pu16Port 
)

After calling MDNSResolveService the application should check periodically the resolvation progress with a call of this function.

Return values:
TRUE The service was completely resolved. Check the parameters pIP and pu16Port for the requested information.
FALSE The resolvation progress is pending or not yet started.
Parameters:
[out] pIP In case the service is resolved this parameter stores the IP address of the host where the service is running.
[out] pu16Port In case the service is resolved this parameter stores the port number of the service.
Precondition:
MDNSResolveService must be called.

void MDNSResolveName ( char *  pName  ) 

The function resolves a hostname record via MDNS to an IP address.

The hostname is set to the .local domain automatically.

Parameters:
pName A pointer to a hostname label in RAM. The label must be DNS conform.

void MDNSResolveService ( char *  pName,
ROM char *  pServiceName 
)

The function resolves a service record via MDNS.

The resolve is done in two steps. First the service record query is answered by a remote network device with a valid service record. The service record includes the port of the requested service for example. The query answer also includes the hostname where the service is running. The second step resolves the hostname into an IP address. For this issue the function MDNSResolveName is called internally.

Example: From the given parameters (pName = "DDW-Server", pServiceName = "_srcp") the search string is "DDW-Server._srcp._tcp.local.".

Parameters:
pName A pointer to a name label in RAM. The label must be DNS conform. The name is the name of the service, NOT of a hostname!
pServiceName A pointer to a service name label in ROM (i.e. _srcp). The label must be DNS conform.
Remarks:
Actually the function only supports the resolvation of TCP services.

void MDNSStopResolving ( void   ) 

A pending resolvation process will be stopped.

This function will be called automatically when stopping the MDNS service with StopMDNSResponder.


Generated on Fri Mar 29 10:34:28 2013 for Netzer by  doxygen 1.5.5