[ntp:questions] Re: sendto(1.2.3.4): Invalid argument

Tom Einertson tome at siemens-emis.com
Fri Aug 19 17:49:43 UTC 2005


"Edrusb" <edrusba at free.fr> wrote in message
news:mquqdd.beh.ln at barnabe.home.fr...
> Detecting when an old interface has "disappeared" should be possible
> looking at the errno global variable when sendto() system call returns
> an error (errno = EINVAL). And I guess, like Bind does, a periodic
> interface scanning plus an "on event" scanning (when sendto() returns an
> error) should be "large" enough to address this problem?
>
> Regards,
> Denis.

Checking errno might be one way to detect when an interface has disappeared.
Assuming that you already have code to read up the list of interfaces on a
server, another simple approach is to run that code again and then compare
the current interface list to what NTP was using previously.





More information about the questions mailing list