From mboxrd@z Thu Jan 1 00:00:00 1970 From: bernd@petrovitsch.priv.at (Bernd Petrovitsch) Date: Wed, 19 Oct 2011 09:28:13 +0200 Subject: Problem with a UDP server implements In-Reply-To: References: <201110150151405785431@gmail.com> <1318679904.20227.1.camel@thorin> <1318929612.20227.15.camel@thorin> Message-ID: <1319009294.20227.22.camel@thorin> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi! On Die, 2011-10-18 at 22:48 +0800, tao jiang wrote: [...] > Thanks for your guide. > But there is still a question > if recvfrom() used, how to figure out the client's dest ip for reply ? > i.e. on which ip the server receieved the request > when construct the IP header, i don't know which saddr to fill in Ooops, forgot that we need the destination address of the received packet too to construct the answer for it. Then yes, it seems that you would need the raw packet on the receiving side too. [ Full quote deelted ] Bernd -- Bernd Petrovitsch Email : bernd at petrovitsch.priv.at LUGA : http://www.luga.at