Date: Sun, 17 Jun 2001 21:51:19 -0700 From: Julian Elischer <julian@elischer.org> To: David Preece <davep@afterswish.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Injecting a packet with explicit route. Message-ID: <3B2D88C7.1393A08E@elischer.org> References: <5.1.0.14.1.20010618114548.01ef31b0@pop.paradise.net.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
David Preece wrote: > > Hi, > > Due to the wonder of IPFW and divert sockets I have been merrily catching > packets, modifying them and reinjecting back in from userland to great > effect for some time now. What I would like (need) to do is much the same, > but being able to explicitly state which route to take (for a packet going > outwards), or being able to tell which route a packet came in from (for a > packet coming inwards). > > I suspect the necessary stunts are to have access to sufficiently low level > networking to be able to capture and write a packet with layer 2 > information, which probably involves netgraph? Can anyone think of another > way? Oh, and if I do go to netgraph (in itself not a bad thing), do I have > to use a kernel mode debugger - just too addicted to KDevelop I guess. the address you get from the divert socket includes (if you know where to look) the incoming interface.. you can the resend back to a specific rule and use the 'fwd' rules to send out different interfaces > > Thanks, > Dave > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B2D88C7.1393A08E>