From owner-svn-src-all@FreeBSD.ORG Wed Oct 8 11:19:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BBC8106568B; Wed, 8 Oct 2008 11:19:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AFCB8FC30; Wed, 8 Oct 2008 11:19:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m98BJGRh032484; Wed, 8 Oct 2008 11:19:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m98BJGZZ032483; Wed, 8 Oct 2008 11:19:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200810081119.m98BJGZZ032483@svn.freebsd.org> From: Alexander Motin Date: Wed, 8 Oct 2008 11:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183695 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 11:19:16 -0000 Author: mav Date: Wed Oct 8 11:19:16 2008 New Revision: 183695 URL: http://svn.freebsd.org/changeset/base/183695 Log: Document new NGM_NETFLOW_SETCONFIG control message. Modified: head/share/man/man4/ng_netflow.4 Modified: head/share/man/man4/ng_netflow.4 ============================================================================== --- head/share/man/man4/ng_netflow.4 Wed Oct 8 11:11:36 2008 (r183694) +++ head/share/man/man4/ng_netflow.4 Wed Oct 8 11:19:16 2008 (r183695) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 2, 2006 +.Dd October 8, 2008 .Os .Dt NG_NETFLOW 4 .Sh NAME @@ -71,7 +71,8 @@ and the same number of hooks named etc., plus a single hook named .Va export . -The node does NetFlow accounting of data received on +By default (ingress NetFlow enabled) node does NetFlow accounting of data +received on .Va iface* hooks. If corresponding @@ -81,7 +82,7 @@ If data is received on .Va out hook, it is bypassed to corresponding .Va iface -hook without any processing. +hook without any processing (egress NetFlow disabled by default). When full export datagram is built it is sent to the .Va export hook. @@ -162,6 +163,31 @@ struct ng_netflow_settimeouts { uint32_t active_timeout; }; .Ed +.It Dv NGM_NETFLOW_SETCONFIG +Sets configuration for the specified interface. +This message requires +.Vt "struct ng_netflow_setconfig" +as an argument: +.Bd -literal -offset 4n +struct ng_netflow_setconfig { + u_int16_t iface; + u_int32_t conf; +#define NG_NETFLOW_CONF_INGRESS 1 +#define NG_NETFLOW_CONF_EGRESS 2 +#define NG_NETFLOW_CONF_ONCE 4 +#define NG_NETFLOW_CONF_THISONCE 8 +}; +.Ed +.Pp +Configuration is a bitmask of several options. Option NG_NETFLOW_CONF_INGRESS +enabled by default enables ingress NetFlow generation (for data coming from +ifaceX hook). Option NG_NETFLOW_CONF_EGRESS enables egress NetFlow (for data +coming from outX hook). Option NG_NETFLOW_CONF_ONCE defines that packet should +be accounted only once if it several times passes via netflow node. Option +NG_NETFLOW_CONF_THISONCE defines that packet should be accounted only once +if it several times passes via exactly this netflow node. Last two options are +important to avoid duplicate accounting when both ingress and egress NetFlow +are enabled. .It Dv NGM_NETFLOW_SHOW This control message asks a node to dump the entire contents of the flow cache. It is called from @@ -191,6 +217,8 @@ commands are: .Qq Li "setifindex { iface = %u index = %u }" .It Dv NGM_NETFLOW_SETTIMEOUTS .Qq Li "settimeouts { inactive = %u active = %u }" +.It Dv NGM_NETFLOW_SETCONFIG +.Qq Li "setconfig { iface = %u conf = %u }" .El .Sh SHUTDOWN This node shuts down upon receipt of a