From owner-freebsd-net@freebsd.org Thu Dec 14 19:20:09 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E3EEE8C2A5 for ; Thu, 14 Dec 2017 19:20:09 +0000 (UTC) (envelope-from Ming.Fu@esentire.com) Received: from mail.esentire.com (mail.iim-support.esentire.com [52.129.34.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A6E2740F0 for ; Thu, 14 Dec 2017 19:20:08 +0000 (UTC) (envelope-from Ming.Fu@esentire.com) Received: from exchange.esentire.com (cas01cmb01p.internal [10.1.120.116]) by mail.esentire.com (Postfix) with ESMTPS id ECB1A180CD7 for ; Thu, 14 Dec 2017 18:00:18 +0000 (UTC) Received: from mbx02cmb01p.esentire.local (10.1.120.125) by mbx02cmb01p.esentire.local (10.1.120.125) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 14 Dec 2017 13:00:18 -0500 Received: from mbx02cmb01p.esentire.local ([fe80::614a:403b:50de:71e4]) by mbx02cmb01p.esentire.local ([fe80::614a:403b:50de:71e4%12]) with mapi id 15.00.1347.000; Thu, 14 Dec 2017 13:00:18 -0500 From: Ming Fu To: "freebsd-net@freebsd.org" Subject: Netmap: Build a network SPAN/TAP from netmap Thread-Topic: Netmap: Build a network SPAN/TAP from netmap Thread-Index: AdN1BBGKP8KaAKpjRZ+/dKMY9O2pUw== Date: Thu, 14 Dec 2017 18:00:18 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.1.120.131] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 19:20:09 -0000 Hi, I am trying to explore the possibility to build a network SPAN/TAP from net= map. Similar to the bridge sample, but all packet going through the bridge = also get copied to a SPAN port. How do I duplicate or clone an incoming pac= ket and send the original to bridge peer and the cloned one to the SPAN por= t? Is there an API like FreeBsd m_copypacket() for netmap? Would it work fo= r Linux as well? Thanks Ming