Redirect functionality in ng_nat

Christopher Cowart ccowart at rescomp.berkeley.edu
Tue Apr 15 18:20:10 UTC 2008


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>=<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=10.9.128.19 
    alias_addr=169.229.127.53 description="StaticNat" }'

I hope that helps the next person who can't figure out how to pass a
struct in a netgraph message.

-- 
Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 825 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20080415/ea4f614a/attachment.pgp


More information about the freebsd-net mailing list