From owner-freebsd-net@FreeBSD.ORG Mon Dec 9 13:07:05 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08C46A7F for ; Mon, 9 Dec 2013 13:07:05 +0000 (UTC) Received: from mail-pb0-x22c.google.com (mail-pb0-x22c.google.com [IPv6:2607:f8b0:400e:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA856184B for ; Mon, 9 Dec 2013 13:07:04 +0000 (UTC) Received: by mail-pb0-f44.google.com with SMTP id rq2so5415902pbb.17 for ; Mon, 09 Dec 2013 05:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=K5zKPj+cr8UZUYMZAiuKzjSRrwf0pnzzLU1lfIytU8Q=; b=aMIPRqQIFwBm8To8yzxI7CMthICwwjhPibSx/NKNGfGPF+sbHmxT3ATDDRhG9epnB7 1/5SXEi9dyEHsT5BBx2zkrszlvGLmFZS76OtZd/rwI2vhqAzEkDLznxjIFW8CSBFzxc+ pRKYZ45cnvxnZCxhvCx+X2hPe24pv7MYSU9vBpDtw6F9a3iHeZDAvfA7xQbkbzy/ZajY bGptr9MiIe2/jXwIiIw7LdGzrZfmE8YMOUS/Gei3wXCwO5Y2Ly3clUbo7FxF+fpZO0SP TwVdq1/Ny2hKrSIeZtLfgD/ORlwg4ELe74FQSVy1S/cSnUkQqmVqOfByqsjAWxV0qXr8 W2LQ== MIME-Version: 1.0 X-Received: by 10.66.191.162 with SMTP id gz2mr4221535pac.151.1386594424311; Mon, 09 Dec 2013 05:07:04 -0800 (PST) Received: by 10.70.127.143 with HTTP; Mon, 9 Dec 2013 05:07:03 -0800 (PST) Received: by 10.70.127.143 with HTTP; Mon, 9 Dec 2013 05:07:03 -0800 (PST) In-Reply-To: References: <5293E3E7.6090604@freebsd.org> <52A493F1.6040700@freebsd.org> Date: Mon, 9 Dec 2013 15:07:03 +0200 Message-ID: Subject: Re: Netgraph ng_patch and ng_input: where to find packets? From: Sami Halabi To: Victor Gamov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 13:07:05 -0000 Hi, Got that, the manual is too short with no examples, can u share configuration u did? Sami =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A 9 =D7=91=D7=93=D7=A6=D7=9E 2013 13:31,= "Victor Gamov" =D7=9B=D7=AA=D7=91: > > On 09Dec, 2013, at 13:51, Sami Halabi wrote: > > > What is ng_input cant find man page nor kldload it=E2=80=A6 > > ng_ip_input > > sorry > > > Sami > > > > =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A 9 =D7=91=D7=93=D7=A6=D7=9E 2013 11= :30, "Victor Gamov" =D7=9B=D7=AA=D7=91: > > > > On 09Dec, 2013, at 11:36, Sami Halabi wrote: > > > > > Hi, > > > > Hi Sami > > > > > Actually following the ng_patch the following worked for me (using > 9.2-R -amd64): > > > > Yes, ng_patch works fine for me too. Then ng_input works too because I > see patched packets at ipfw. But this packets does not appears on outgoi= ng > interface. > > > > Now I haven't machine for future testing, but I'll do more tests on > upcoming 10.0-R because I want to use 10.0 for my project. > > > > > > > kldload ng_patch > > > kldload ng_ipfw > > > /usr/sbin/ngctl -f- << SEQ > > > mkpeer ipfw: patch 300 in > > > name ipfw:300 src_dst_chg > > > msg src_dst_chg: setconfig { count=3D2 csum_flags=3D= 1 > ops=3D[ \ > > > { mode=3D1 value=3D0xc0a8e609 length=3D4 off= set=3D12 > } \ > > > { mode=3D1 value=3D0xc0a8e680 length=3D4 off= set=3D16 > } ] } > > > SEQ > > > /sbin/ipfw add 600 netgraph 300 log ip from any to 239.0.0.19 dst-por= t > 1234 in via vlan999 > > > > > > Sami > > > > > > > > > On Sun, Dec 8, 2013 at 5:44 PM, Julian Elischer > wrote: > > > On 12/8/13, 6:43 PM, Sami Halabi wrote: > > > Hi Gamov, > > > Have got this to work? > > > If so would share configurations? > > > > > > Thanks in advance, > > > Sami > > > =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A 29 =D7=91=D7=A0=D7=95=D7=91 2013= 19:28, "Victor Gamov" =D7=9B=D7=AA=D7=91: > > > > > > > > > > > > if not then the way to track it it to put a breakpoint on the netgrap= h > node that handles the packet and just single step through until you see > where the packet goes.. > > > kdb would give you a decent idea but a second machine (or a virtual > machine) with kgdb would really show you what's going on. > > -- > CU, > Victor Gamov > >