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

Attachment: pgp2DBqBEARNL.pgp
Description: PGP signature

Reply via email to