Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2001 09:18:31 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        net@freebsd.org
Cc:        aihguo1@hotmail.com
Subject:   Re: Trying to find out which interface an IP packet is coming from in ip_output() routine
Message-ID:  <200110101618.f9AGIVA86599@vashon.polstra.com>
In-Reply-To: <OE53vqgStMVhEUsebms0000bf4b@hotmail.com>
References:  <OE53vqgStMVhEUsebms0000bf4b@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <OE53vqgStMVhEUsebms0000bf4b@hotmail.com>,
Aihua Guo <aihguo1@hotmail.com> wrote:
>    Can anybody help me find a way to find out which interface an IP
> packet is coming from in ip_output()/ip_input() routine?

The mb->m_pkthdr.rcvif field of the mbuf points to the interface on
which the packet was received.

John
-- 
  John Polstra
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110101618.f9AGIVA86599>