public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ppetru@ppetru.net (Petru Paler)
To: linux-kernel@vger.kernel.org
Subject: Getting destination address for UDP packets
Date: Fri, 20 Jul 2001 14:55:44 -0700	[thread overview]
Message-ID: <20010720145544.D1267@ppetru.net> (raw)

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

             reply	other threads:[~2001-07-20 21:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-20 21:55 Petru Paler [this message]
2001-07-20 22:30 ` Getting destination address for UDP packets David Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010720145544.D1267@ppetru.net \
    --to=ppetru@ppetru.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox