From owner-cvs-all@FreeBSD.ORG Tue Apr 5 17:22:05 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 644A216A4CE; Tue, 5 Apr 2005 17:22:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40B2643D5A; Tue, 5 Apr 2005 17:22:05 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j35HM5A4059872; Tue, 5 Apr 2005 17:22:05 GMT (envelope-from glebius@repoman.freebsd.org) Received: (from glebius@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j35HM56X059871; Tue, 5 Apr 2005 17:22:05 GMT (envelope-from glebius) Message-Id: <200504051722.j35HM56X059871@repoman.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Apr 2005 17:22:05 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netgraph ng_source.c ng_source.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 17:22:05 -0000 glebius 2005-04-05 17:22:05 UTC FreeBSD src repository Modified files: sys/netgraph ng_source.c ng_source.h Log: Major overhaul and cleanup of ng_source node. Functional changes: - Cut struct source_hookinfo. Just use hook_p pointer. - Remove "start_now" command. "start" command now requires number of packets to send as argument. "start" command actually starts sending. Move the code that actually starts sending from ng_source_rcvmsg() to ng_source_start(). - Remove check for NG_SOURCE_ACTIVE in ng_source_stop(). We can be called with flag cleared (see begin of ng_source_intr()). - If NG_SEND_DATA_ONLY() use log(LOG_DEBUG) instead of printf(). Otherwise we will *flood* console. - Add ng_connect_t method, which sends NGM_ETHER_GET_IFNAME command to "output" hook. Cut ng_source_request_output_ifp(). Refactor ng_source_store_output_ifp() to use ifunit() and don't muck through interface list. - Add "setiface" command, which gives ability to configure interface in case when ng_source_connect() failed. This happens, when we are not connected directly to ng_ether(4) node. - Remove KASSERTs, which can never fire. - Don't check for M_PKTHDR in rcvdata method. netgraph(4) does this for us. Style: - Assign sc_p = NG_NODE_PRIVATE(node) in declaration, to be consistent with style of other nodes. - Sort variables. - u_intXX -> uintXX. - Dots at ends of comments. Sponsored by: Rambler Revision Changes Path 1.25 +132 -162 src/sys/netgraph/ng_source.c 1.6 +2 -2 src/sys/netgraph/ng_source.h