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 [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message