From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:57:01 2009 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 7EDC01065672; Fri, 9 Jan 2009 20:57:01 +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 6CE938FC0C; Fri, 9 Jan 2009 20:57:01 +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 n09Kv1hS068548; Fri, 9 Jan 2009 20:57:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Kv12s068547; Fri, 9 Jan 2009 20:57:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092057.n09Kv12s068547@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186974 - stable/7/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: Fri, 09 Jan 2009 20:57:02 -0000 Author: mav Date: Fri Jan 9 20:57:01 2009 New Revision: 186974 URL: http://svn.freebsd.org/changeset/base/186974 Log: MFC rev. 183695 Document new NGM_NETFLOW_SETCONFIG control message. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/ng_netflow.4 Modified: stable/7/share/man/man4/ng_netflow.4 ============================================================================== --- stable/7/share/man/man4/ng_netflow.4 Fri Jan 9 20:55:26 2009 (r186973) +++ stable/7/share/man/man4/ng_netflow.4 Fri Jan 9 20:57:01 2009 (r186974) @@ -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