From owner-freebsd-net@FreeBSD.ORG Sat Nov 9 14:39:38 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32C0BFEC; Sat, 9 Nov 2013 14:39:38 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com [IPv6:2a00:1450:4010:c04::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 854902151; Sat, 9 Nov 2013 14:39:37 +0000 (UTC) Received: by mail-lb0-f176.google.com with SMTP id z5so2196430lbh.21 for ; Sat, 09 Nov 2013 06:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=reply-to:from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding :content-language:thread-index; bh=8SnyJk8licQWMfjcFqSfg6mD9L16WRo6ULQ6eaIAXzc=; b=PPVINpjZslbA0lBEP07h41OSO4cjhKJqExrnj2oWY6WfdTNEGCE9vseRiHV0y/3HWy oSz5NUW6F4nmn+DejqyPNxDKVEbijREvmNK8lS3GKsk1G5C5KQQ1Bkdt5JcJ/YKUzr41 GioULC/I4x+EzM41VwjPAVU8PBXB1s+xAs4veokQVgcuXUJePr+7j4Xemi7n5HYu99Am 8tONs1WC6VWX2XfxO8sEdyjvITFO6XePankTTLxC7sboBnDJOllhg4mnHVoM9mS+x663 ke6NaqBBf0lbwzkq+rsmr0fyy6GZHI/IeTuoSfQplueeYSVbyjSlamJ8rOAeTK8921av wv0A== X-Received: by 10.112.167.3 with SMTP id zk3mr14455142lbb.23.1384007975599; Sat, 09 Nov 2013 06:39:35 -0800 (PST) Received: from rimwks1w7x64 ([176.99.246.90]) by mx.google.com with ESMTPSA id l10sm10047470lbh.13.2013.11.09.06.39.33 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 09 Nov 2013 06:39:34 -0800 (PST) From: rozhuk.im@gmail.com To: "'Bear'" , "'Gleb Smirnoff'" References: <527C799D.8020208@Gmail.com> <20131108215210.GH7577@FreeBSD.org> <527DDFEA.9050001@Gmail.com> In-Reply-To: <527DDFEA.9050001@Gmail.com> Subject: RE: ng_patch and 802.11Q Date: Sat, 9 Nov 2013 18:39:18 +0400 Message-ID: <527e4926.aa1d700a.02d7.fffff457@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: ru Thread-Index: Ac7dGtARNXnQeAJKSemKlLVltqfpQAAPmYMg Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 14:39:38 -0000 http://www.netlab.linkpc.net/download/software/FreeBSD/mcastbridge/mcastbr2. sh http://www.netlab.linkpc.net/forum/index.php?topic=796.0 > It seems a good idea... Do you have some example working on ng_ether? > The manpage of ng_ether seems no example... > > On 11/8/2013 6:22 PM, Gleb Smirnoff wrote: > > On Fri, Nov 08, 2013 at 02:11:49AM -0330, Bear wrote: > > B> Hi all, > > B> I want to modify VLAN priority by ng_patch. After reading the > > B> manpage of > > B> ng_patch(http://www.freebsd.org/cgi/man.cgi?query=ng_patch) and > the > > B> example it given: > > B> > > B> > /usr/sbin/ngctl -f- <<-SEQ > > B> > mkpeer ipfw: patch 200 in > > B> > name ipfw:200 ttl_add > > B> > msg ttl_add: setconfig { count=1 csum_flags=1 ops=[ \ > > B> > { mode=2 value=3 length=1 offset=8 } ] } > > B> > SEQ > > B> > /sbin/ipfw add 150 netgraph 200 ip from any to > > B> simplex.remote.net > > B> > > B> It seems ng_patch can only modify IP header. However, the position > > B> of VLAN header is before IP header and after Ethernet header. How > > B> can I modify it? > > > > ipfw allows you to intercept packets at IP layer. Tp modify VLAN > > header, you need to capture them earlier. May be ng_ether(4) will > help you. > >