The code, something that i dont understand

Evan Hunt Evan_Hunt at isc.org
Tue Jul 15 17:08:34 UTC 2008


> In this line:
> void add_timeout PROTO ((TIME, void? (*) PROTO ((void *)), void *, tvref_t, tvunref_t));
> what does it mean, PROTO?

It means "prototype", it's defined in cdefs.h, and its function is to
change the appearance of the function prototype so that it will work in
very old C compilers as well as modern ones.  If the compiler allows
you to set arguments in a function prototype, then the argument list
is kept in place; otherwise it's removed, and the line ends up
looking like:

        void add_timeout();

> And someone knows what exactly does the function add_timeout do? I know
> it adds a timeout, but how and what are in the code exactly? 

It causes the process to run a specified function at a specified time
in the future.

-- 
Evan Hunt -- evan_hunt at isc.org
Internet Systems Consortium, Inc.


More information about the dhcp-users mailing list