From owner-freebsd-current@FreeBSD.ORG Fri May 19 08:04:35 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9056416A420; Fri, 19 May 2006 08:04:35 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88F9743D45; Fri, 19 May 2006 08:04:34 +0000 (GMT) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=[192.168.0.18]) by publicd.ub.mng.net with esmtpa (Exim 4.61 (FreeBSD)) (envelope-from ) id 1FgzyD-000LKT-IF; Fri, 19 May 2006 17:04:25 +0900 Message-ID: <446D7C09.3090003@micom.mng.net> Date: Fri, 19 May 2006 17:04:25 +0900 From: Ganbold User-Agent: Thunderbird 1.5.0.2 (X11/20060425) MIME-Version: 1.0 To: Harti Brandt References: <446D7741.10102@micom.mng.net> <20060519095344.P13833@beagle.kn.op.dlr.de> In-Reply-To: <20060519095344.P13833@beagle.kn.op.dlr.de> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, Gleb Smirnoff Subject: Re: small patch for ngctl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2006 08:04:35 -0000 Harti Brandt wrote: > Hi, > > On Fri, 19 May 2006, Ganbold wrote: > > I did not yet look at your patch, but does it work with ngctl receiving > unexpected messages? How can I test this? I tested on RELENG_6 machine which has following hooks: ngctl mkpeer xl1: tee lower right ngctl connect xl1: xl1:lower upper left ngctl name xl1:lower xl1_tee ngctl mkpeer xl1_tee: netflow left2right iface0 ngctl name xl1:lower.left2right netflow ngctl connect xl1_tee: netflow: right2left iface1 ngctl msg netflow: setifindex { iface=0 index=2 } ngctl msg netflow: setifindex { iface=1 index=1 } ngctl mkpeer netflow: ksocket export inet/dgram/udp ngctl msg netflow:export connect inet/127.0.0.1:8818 ngctl mkpeer xl0: tee lower right ngctl connect xl0: xl0:lower upper left ngctl name xl0:lower xl0_tee ngctl mkpeer xl0_tee: netflow left2right iface2 ngctl name xl0:lower.left2right netflow0 ngctl msg netflow0: setifindex { iface=2 index=4 } ngctl connect xl0_tee: netflow0: right2left iface3 ngctl msg netflow0: setifindex { iface=3 index=3 } ngctl mkpeer netflow0: ksocket export inet/dgram/udp ngctl msg netflow0:export connect inet/127.0.0.1:8818 It seems like works at a first glance. > I remember we had something like this in the tree > already, but it was backed out, because readline (or libedit, don't > remember which one) waiting for input blocked receiving control messages, > as far as I remember. > I see. How can I make system to send unexpected messages to ngctl? Ganbold > harti > > G>I've made a small patch enhancement for ngctl to support commands history via > G>up/down keys when ngctl works under interactive mode. > G>It was tested on 7.0-CURRENT machine (FreeBSD 7.0-CURRENT #3: Tue May 16 > G>19:17:48 ULAST 2006). > G> > G>I thought this feature might be useful for all. I hope my patch follows > G>style(9) and it is made against CURRENT, it should also cleanly apply on > G>RELENG_6. > G> > G>I saw a similar enhancement patch in PR > G>http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/87352 which adds line edit and > G>history support to ngctl(8) via libedit. > G> > G>My patch uses TERMIOS(4) structure which I thought more portable. Maybe I'm > G>wrong. > G> > G>Please let me know if there is anything that I did wrong. > G> > G>thanks, > G> > G>Ganbold > G> > G> > G> > > > >