From owner-freebsd-hackers Sun Jun 17 21:55:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id E245D37B409 for ; Sun, 17 Jun 2001 21:55:19 -0700 (PDT) (envelope-from julian@elischer.org) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA43320; Sun, 17 Jun 2001 23:18:19 -0700 (PDT) Message-ID: <3B2D88C7.1393A08E@elischer.org> Date: Sun, 17 Jun 2001 21:51:19 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: David Preece Cc: freebsd-hackers@freebsd.org Subject: Re: Injecting a packet with explicit route. References: <5.1.0.14.1.20010618114548.01ef31b0@pop.paradise.net.nz> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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