Date: Wed, 10 Oct 2001 18:06:21 -0700 (PDT) From: Archie Cobbs <archie@dellroad.org> To: John Polstra <jdp@polstra.com> Cc: net@FreeBSD.ORG, aihguo1@hotmail.com Subject: Re: Trying to find out which interface an IP packet is coming from in ip_output() routine Message-ID: <200110110106.f9B16L514629@arch20m.dellroad.org> In-Reply-To: <200110101618.f9AGIVA86599@vashon.polstra.com> "from John Polstra at Oct 10, 2001 09:18:31 am"
next in thread | previous in thread | raw e-mail | index | archive | help
John Polstra writes: > > 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. ...if any. In ip_input(), mb->m_pkthdr.rcvif is always non-NULL, but in ip_output() it may be NULL e.g. if the packet was locally generated. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com 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?200110110106.f9B16L514629>