eduardo1966 wrote on Tuesday, April 30, 2019:
Hi
I would like to know what is the purpose of mainDEVICE_NAME and mainHOST_NAME that are used by the two Hook functions below:
BaseType_t xApplicationDNSQueryHook( const char *pcName )
{
BaseType_t xReturn;
/* Determine if a name lookup is for this node. Two names are given
to this node: that returned by pcApplicationHostnameHook() and that set
by mainDEVICE_NAME. */
if( strcmp( pcName, pcApplicationHostnameHook() ) == 0 )
{
xReturn = pdPASS;
}
else if( strcmp( pcName, mainDEVICE_NAME ) == 0 )
{
xReturn = pdPASS;
}
else
{
xReturn = pdFAIL;
}
return xReturn;
}
const char *pcApplicationHostnameHook( void )
{
/* Assign the name "rtosdemo" to this network node. This function will be
called during the DHCP: the machine will be registered with an IP address
plus this name. */
return mainHOST_NAME;
}
thanks