[ntp:questions] server's address in ntp payload?

Danny Mayer mayer at gis.net
Fri Nov 18 02:29:17 UTC 2005

Ulisses wrote:
> Hello all
> I have take a look at ntp_request.h and I found that ntp doesn't put the the ip
> address of the remote server being used in the request. That is, in the
> ntp payload you can obtain the addresses of the peers and reference clocks of the
> server but not the address of the server itself, and therefore the only way
> to get the address of the server is looking at the IP header.
> Am I wrong?

No you are not wrong, but why would you want to? Are you asking about
the server sending the packet? We already know the IP address of the
sending server. The recvfrom() code returns that information so you need
not explicitly look at the header, recvfrom does that implicitly.


> Thanks in advance
> 	Ulisses
>                 Debian GNU/Linux: a dream come true
> -----------------------------------------------------------------------------
> "Computers are useless. They can only give answers."            Pablo Picasso
> "Debugging is twice as hard as writing the code in the first place.
> Therefore, if you write the code as cleverly as possible, you are,
> by definition, not smart enough to debug it." - Brian W. Kernighan
> _______________________________________________
> questions mailing list
> questions at lists.ntp.isc.org
> https://lists.ntp.isc.org/mailman/listinfo/questions

More information about the questions mailing list