--On 2002-02-04 15:43:10 +0100 [EMAIL PROTECTED] wrote:
> Btw, where could I find some examples on parsing setsockopt() calls to
> selected nodes, if such thing is possible at all?
>
Here's how I do it on a ksocket node (patch on ksocket is required unless
you're using -CURRENT. Check thread on "netgraph: how to setsockopt on
ksocket node ?". )
struct opts {
int level;
int name;
int value;
} myopts = { SOL_SOCKET, SO_REUSEADDR, 1 };
if ( (ret = NgSendMsg(cs, epath, NGM_KSOCKET_COOKIE, NGM_KSOCKET_SETOPT,
(struct ng_ksocket_sockopt *)&myopts,
sizeof(myopts))) < 0) {
fprintf(stderr, "%s Cannot setopt the ksocket node: %s\n",
epath, strerror(errno));
return (-1);
}
Florent
--
Florent Parent
Viag�nie http://www.viagenie.qc.ca
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message