lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E42C4B5.7010201@mit.edu>
Date:	Wed, 10 Aug 2011 13:49:41 -0400
From:	Andy Lutomirski <luto@....EDU>
To:	Sreeram B S <sreeramb@...app.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: UDP requires 2 reads to obtain vital information - Kindly comment

On 08/10/2011 12:57 PM, Sreeram B S wrote:
> Respected people,
> I am Sreeram. I work on TCP/IP network applications.
> This mail is regarding UDP.
> Whenever a UDP datagram arrives, the receiver may wish to know the
> sender's IP address and also the destination address of that datagram.
> The recvfrom() function will return the sender's IP address. If the
> destination address of the datagram is required, then the user has to
> set the IP_PKTINFO socket option for the UDP socket and get the
> address as ancillary data in recvmsg(). So, the point here is that the
> user has to issue 2 reads on the same datagram (with the flag MSG_PEEK
> in first read call enabled) in order to obtain the sender's IP and the
> destination IP of the datagram.

Does the msg_name field of struct msghdr not work?

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ