send_fallback definition

David W. Hankins dhankins at isc.org
Thu Jul 15 21:54:14 UTC 2010


On Thu, Jul 15, 2010 at 12:46:09PM +0530, Isaac wrote:
> I want to understand send_fallback function, but couldn't find the
> definition.
> do you have an idea about it?

The original author of ISC DHCP had a tendency to use #define to
provide modularity or simulated object oriented constructs.

In this case you want to look into common/socket.c;

#ifdef USE_SOCKET_FALLBACK
# if !defined (USE_SOCKET_SEND)
#  define if_register_send if_register_fallback
#  define send_packet send_fallback
#  define if_reinitialize_send if_reinitialize_fallback
# endif
#endif


The various "socket API" layers in common/ all define their own
send_packet() functions.  Many of them rely upon a fallback BSD
socket, so the common/socket.c module optionally defines itself as
send_fallback().

-- 
David W. Hankins	"If you don't do it right the first time,
Software Engineer		     you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-workers/attachments/20100715/8e053244/attachment.bin>


More information about the dhcp-workers mailing list