Re: How to get a useful peer address when doing accept(3, ...) on a systemd supplied listening socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mantas


> I have a feeling it "changes" because you're trying to give the whole
> struct sockaddr to inet_pton() instead of giving just the .sin6_addr field,
> so your program is trying to interpret the *port number*
> (i.e. the .sin6_port which precedes .sin_addr) as part of the address...

That was exactly my mistake! Thanks.

At some point in my hopeless odyssey down a wrong track I tried giving the whole struct to inet_ntop() and forgot to change it back when I got everything else to work.

Thanks for your help and sorry for the inconvenience.

Cheers,
Klaus


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux