From owner-freebsd-net@FreeBSD.ORG Tue Apr 15 18:20:10 2008 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A62CE106564A for ; Tue, 15 Apr 2008 18:20:10 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 9146A8FC16 for ; Tue, 15 Apr 2008 18:20:10 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 797463C04F0; Tue, 15 Apr 2008 11:20:10 -0700 (PDT) Date: Tue, 15 Apr 2008 11:20:04 -0700 From: Christopher Cowart To: net@freebsd.org Message-ID: <20080415182004.GB27135@hal.rescomp.berkeley.edu> References: <20080412223645.GN81568@hal.rescomp.berkeley.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K8nIJk4ghYZn606h" Content-Disposition: inline In-Reply-To: <20080412223645.GN81568@hal.rescomp.berkeley.edu> Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Re: Redirect functionality in ng_nat X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2008 18:20:10 -0000 --K8nIJk4ghYZn606h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Christopher Cowart wrote: > I'm a little confused on exactly how to pass a struct as a message to a > netgraph node via ngctl. What am I missing here? I found my answer in the comments of src/sys/netgraph/ng_parse.h: | Structures: | | '{' [ =3D ... ] '}' | | Omitted fields have their default values by implication. | The order in which the fields are specified does not matter. So the command I was looking for was: $ ngctl msg NatNode10: redirectaddr '{ local_addr=3D10.9.128.19=20 alias_addr=3D169.229.127.53 description=3D"StaticNat" }' I hope that helps the next person who can't figure out how to pass a struct in a netgraph message. --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --K8nIJk4ghYZn606h Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iQIVAwUBSATx1CPHEDszU3zYAQIWKw//RRjINTSvO+kxTu+nsDV6xZ4RYOpvWX1y mofqp07nwbd/MJx3RqSs+8cKQk66J2NWO6mlXwPW46s1RRSddLtZBmhuiHBMx5n1 20H+1fe0WXeh1uW0oSrVq86uK0AmQQMXsAH4lQbGYpYxbxdkHFjHol9w4QpXvIic OLKzzZ0S0GAphMVRywTDgRQBwQPET8I67uQts0tvoskW2/SP6uYRlEZC5r0RGyFF M42eu+OEQ5p0DMST9/fZ1d8TI916zQt9YFJbo6Wr8GcG470VexK+Xnv35J8yEkOu YSuQrouInL6QiqOMhOUKuUS5DiQjSCYgrLMyDFhB14rjSoArA65wI5XHWD0Dz1pS UevnL5XvzV6GvY4sMgKnjZK3QaY+rs83jhIh2Wq3cNUpfk0l6PWBFcR1NO/LMLbZ Ltwuqqq7XMe28LWDY4KyKh0BR/rNSnwfwEb/ww3YY2J9G8TS4xQmgnoFk2sQPEsQ FvmrDaMM3pd+h6SyPiT+nWSJ6ohmmWJLAjEu2vMvlBEx+L47t+xjo8Z88rBYC7lL HVl8UZuAf/HUwaq4+7qB1EqpDxskI4nnPziA2TaaiCFMfZpp7WHtm+HS/4mVJeNG nx9n5x8REuaZy38DKbPPDDGyb8IT5g6vvTM8qkdhX9rMfMUL0LBEkz0tRsk2mK/G 1yzIqeYKY7g= =pzP7 -----END PGP SIGNATURE----- --K8nIJk4ghYZn606h--