[En-Nut-Discussion] NutRegisterDiscovery: what's the purpose?

Rodrigue rodrigue.roland at gmail.com
Sun Apr 22 14:04:09 CEST 2007


Hello,

Sorry for this stupid question but what's the purpose of
NutRegisterDiscovery?
Following the documentation of Nut/OS API:
int NutRegisterDiscovery  	(   	u_long   	 ipmask,
		u_short  	port,
		u_int  	flags
	)  	
  	

Register discovery telegram responder.

The first call will activate the responder thread. Any subsequent calls will
return a failure.

Note:
    Enabling a discovery responder is a potential security hole.

Parameters:
    	ipmask 	Update datagrams from remote hosts, which do not fit to this
mask are ignored. Set to INADDR_BROADCAST to allow any. If zero, no updates
are allowed.
    	port 	The responder will listen to this UDP port. If zero, the default
port 9806 will be used.
    	flags 	Option value, may contain any combination of DISF_ flags.

Returns:
    0 if a handler thread had been started, -1 otherwise

I don't understand what the following line does:
NutRegisterDiscovery((u_long)-1, 0, DISF_INITAL_ANN

Could you help me, please?

-- 
View this message in context: http://www.nabble.com/NutRegisterDiscovery%3A-what%27s-the-purpose--tf3626359.html#a10125911
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.




More information about the En-Nut-Discussion mailing list