Resolving records
[Multicast DNS]


Detailed Description

The module includes 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 resolving 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.

Definition at line 697 of file mdns.c.

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.

Definition at line 708 of file mdns.c.

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.

Definition at line 729 of file mdns.c.

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.

Definition at line 756 of file mdns.c.

void MDNSStopResolving ( void   ) 

A pending resolving process will be stopped.

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

Definition at line 721 of file mdns.c.


Generated on Sun Nov 27 20:02:40 2011 for eWicht by  doxygen 1.5.5