public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Getting destination address for UDP packets
@ 2001-07-20 21:55 Petru Paler
  2001-07-20 22:30 ` David Schwartz
  0 siblings, 1 reply; 2+ messages in thread
From: Petru Paler @ 2001-07-20 21:55 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm working on a program which binds on all the available interfaces (0.0.0.0)
and listens for/replies with UDP packets.

The problem is that I need to send back responses from the same IP address that
the query arrived to, and this is not usually happening.

Example: supposing I have 1.1.1.2 and 1.1.1.3 aliased on the same interface, and
a query arrives on 1.1.1.3, it's mandatory that the reply packet goes out from
1.1.1.3.

The question is: how do I get (from user space, if possible) the destination
IP address of an UDP packet?

Thanks

Petru

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-20 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-20 21:55 Getting destination address for UDP packets Petru Paler
2001-07-20 22:30 ` David Schwartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox