From owner-freebsd-net@freebsd.org Fri Jan 8 19:24:32 2016 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 31006A6899E for ; Fri, 8 Jan 2016 19:24:32 +0000 (UTC) (envelope-from pavel.odintsov@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F38511C99 for ; Fri, 8 Jan 2016 19:24:31 +0000 (UTC) (envelope-from pavel.odintsov@gmail.com) Received: by mail-io0-x232.google.com with SMTP id g73so98652645ioe.3 for ; Fri, 08 Jan 2016 11:24:31 -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=rvVr+Dm7NR/m1OHELRVuE8BzMmz5XoHe1nJdEDTnB/4=; b=bbW5cl9fxX9W2+lfzNnfUWLI7rLmYoirjWNyvsT5jJVgyG+TgnN6RXX+sM5nioGQgw D/xUf4Z9hpMbHaRBgg5JdyOmP7Bn32Y0hOPh/y+j6ksHGlKnhtLYYt86OXMTefNHRW1U 5+XJXlGXAYp7EfT0VF/FWZd5epQ/dxWAIhiWgnhGFPvV801G3y17k90KiQrBtZZtQlVe T98/T0Y7sBZb+OOYFQwSKJR9Sbvi4x0phW45AO8vvX83q9/YErBaM49pxDMQCt6lt5Td RThgchLYpZqQ83uJViX0ye0p2NEHz0e9fQsSlC3qoul6lbftOd9WDQDxQxbtfVwzcrKk 9jpg== MIME-Version: 1.0 X-Received: by 10.107.34.14 with SMTP id i14mr52160286ioi.9.1452281071400; Fri, 08 Jan 2016 11:24:31 -0800 (PST) Received: by 10.79.36.79 with HTTP; Fri, 8 Jan 2016 11:24:31 -0800 (PST) In-Reply-To: References: Date: Fri, 8 Jan 2016 22:24:31 +0300 Message-ID: Subject: Re: Netmap software interface mirror / netmap monitor From: Pavel Odintsov To: Luigi Rizzo Cc: "freebsd-net@freebsd.org" , Giuseppe Lettieri Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2016 19:24:32 -0000 That's awesome! Thanks for lightning fast answer! Will check soon! On Fri, Jan 8, 2016 at 9:46 PM, Luigi Rizzo wrote: > On Fri, Jan 8, 2016 at 10:35 AM, Pavel Odintsov > wrote: >> Hello, Dear Community! >> >> I'm working with netmap and my application uses netmap for traffic >> capture. It's works really well. >> >> But I need some way to feed same data from physical interface to two >> or more applications. >> >> I have found this code >> https://github.com/luigirizzo/netmap/blob/master/sys/dev/netmap/netmap_monitor.c >> but could not find any docs about it. >> >> Could you help me with examples and use cases? > > look at netmap_user.h, where it explains how to open a port > in monitor mode. > Essentially, once you have an active netmap port say netmap:ix0, you can > sniff the traffic opening additional netmap ports named > netmap:ix0/r (for rx traffic) or netmap:ix0/t (for tx) > or even netmap:ix0/rt (for both tx and rx) > > Giuseppe (in Cc) can give more details > > cheers > luigi -- Sincerely yours, Pavel Odintsov