Per command callback
Yves Langisch
yves at langisch.ch
Thu Nov 4 19:26:22 EDT 2010
Is there any possibility on the client side to register callback
handlers on a per command base. I have a bunch of commands and that
would make life easier. Instead of
nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, generic_Receive,
NULL);
I'd like to be able the API as follows
nl_socket_modify_cb(sock, GEN_MY_COMMAND1, handle_command1, NULL);
nl_socket_modify_cb(sock, GEN_MY_COMMAND2, handle_command2, NULL);
Currently I have to figure out the intended command based on the
containing attributes. There must be also an easier way to figure out
the command in my generic receive method. How can that be achieved?
Yves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5198 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20101105/3847b00e/attachment-0001.p7s>
More information about the libnl
mailing list