if_gre, ip_gre and the like (pseudo-interfaces)

Bruce M Simpson bms at spc.org
Tue Sep 2 12:15:32 PDT 2003


On Sun, Aug 31, 2003 at 11:03:40PM -0700, Jerry Toung wrote:
> My understanding is that gre_input is called by IP everytime it receives a 
> packet with a gre headers which after some processing performs 
> IF_ENQUEUE(ifq,m) to put it back on the IPqueue so that higher protocol such 
> TCP can do their thing. :-)

Not quite correct. This is what my legacy GRE code does. The NetBSD-derived
if_gre in the tree passes the mbuf to netisr_dispatch(), which in turn calls
if_handoff(), which does something similar.

>  I don't see how /dev/gre is ever used on receiving or sending, through  
> if_clone_attach??. Somebody educate me on my missing link.

I don't see /dev/gre on my system.

If you're referring to the line 'device gre' in the kernel configuration,
that is there purely to ensure that the gre driver is statically linked
into the kernel.

BMS


More information about the freebsd-hackers mailing list