Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Apr 2008 11:20:04 -0700
From:      Christopher Cowart <ccowart@rescomp.berkeley.edu>
To:        net@freebsd.org
Subject:   Re: Redirect functionality in ng_nat
Message-ID:  <20080415182004.GB27135@hal.rescomp.berkeley.edu>
In-Reply-To: <20080412223645.GN81568@hal.rescomp.berkeley.edu>
References:  <20080412223645.GN81568@hal.rescomp.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--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:
|
|     '{' [ <name>=3D<value> ... ] '}'
|
|     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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080415182004.GB27135>