Anyone has an example on how to setsockopt on a ksocket node in netgraph?

    struct opts {
        int level;
        int name;
        int value;
    } myopts = { SOL_SOCKET, SO_REUSEADDR, 1
    };

    ret = NgSendMsg(cs, epath, NGM_KSOCKET_COOKIE, NGM_KSOCKET_SETOPT,
                          (struct ng_ksocket_sockopt *)&myopts, 
sizeof(myopts)));

return error 14 "Bad address".

Did some tracing in ng_ksocket.c and the struct sockopt sent as argument to 
sosetopt() seems to contains sane values:

sopt.sopt_val = 0xc182452c  (pointer dereferences to 1)
sopt.sopt_valsize = 4

Help appreciated.

Thanks
Florent.




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to