talk:generic_netlink_howto

What was the purpose of this last edit, 00:18, 18 April 2007 by JyqXan, it seems to remove large chunks of the text for no apparent reason? Unless JyqXan has an explanation I propose we revert the latest change.

There are a few of these random mutilations going on by randomly named users. No idea why! I think I might have accidentaly marked this as patrolled but don't know how to reverse. User:Imcdnzl

Okay, thanks both for the explanation and the fix.


enum/macro confusion

What is the reason for:

enum {
       DOC_EXMPL_A_UNSPEC,
       DOC_EXMPL_A_MSG,
       __DOC_EXMPL_A_MAX,
 };
#define DOC_EXMPL_A_MAX (__DOC_EXMPL_A_MAX - 1)

in place of the seemingly more consistent:

enum {
       DOC_EXMPL_A_UNSPEC,
       DOC_EXMPL_A_MSG,
       __DOC_EXMPL_A_MAX,
       DOC_EXMPL_A_MAX = __DOC_EXMPL_A_MAX - 1
 };

It seems weird to me to mix macros and enums the former way. Blp 22:59, 1 September 2007 (PDT)

Defining DOC_EXMPL_A_MAX as you have done, inside the enum, would create a conflict between DOC_EXMPL_A_MAX and DOC_EXMPL_A_MSG. Also, please look at the existing kernel sources for subsystems which make use of Netlink attributes, existing convention can be very important.

"A conflict"? There is no such thing: nothing prevents two constants in a single enumeration from sharing a value. As for convention, I suppose that's as good a reason as any. Blp 10:29, 2 September 2007 (PDT)

Groups: