Re: Generic netlink interface help
From: Rodolfo Giometti <giometti@enneenne.com>
Date: 2007-05-28 07:41:28
On Mon, May 28, 2007 at 04:42:47AM +0300, Samuel Ortiz wrote:
quoted
Is that right?At first glance, this could work yes.
Great! Now I have only to write the userland tool. :)
However, it seems you're trying to encapsulate your pps_netlink_msg into a generic netlink message which itself is already encapsulated into a netlink message, and then multiplex all your PPS commands on ppl_genl_data_ready(). IMHO, you should have your different PPS commands declared as a genl_ops array, and then have a specific doit routine per PPS command. This would make your code cleaner and more secure (see the "Operation Granularity" section at http://linux-net.osdl.org/index.php/Generic_Netlink_HOWTO).
I see. I already supposed that but currently I'm trying to do minimal changes to my code in order to verify that everythink works well again, then I'll do the complete work. Thanks a lot, Rodolfo -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@gnudd.com Embedded Systems giometti@linux.it UNIX programming phone: +39 349 2432127