diff --git a/sys/netlink/netlink_sysevent.c b/sys/netlink/netlink_sysevent.c index aeb819e6e85d..9da72a121ecd 100644 --- a/sys/netlink/netlink_sysevent.c +++ b/sys/netlink/netlink_sysevent.c @@ -74,7 +74,7 @@ sysevent_write(struct sysevent_group *se, const char *subsystem, const char *typ return; } ghdr->version = 0; - ghdr->cmd = 0; + ghdr->cmd = NLSE_CMD_NEWEVENT; ghdr->reserved = 0; nlattr_add_string(&nw, NLSE_ATTR_SYSTEM, se->name); nlattr_add_string(&nw, NLSE_ATTR_SUBSYSTEM, subsystem); diff --git a/sys/netlink/netlink_sysevent.h b/sys/netlink/netlink_sysevent.h index 23288d2dd5c3..8434a0de078e 100644 --- a/sys/netlink/netlink_sysevent.h +++ b/sys/netlink/netlink_sysevent.h @@ -30,11 +30,20 @@ enum { NLSE_ATTR_UNSPEC = 0, - NLSE_ATTR_SYSTEM = 1, - NLSE_ATTR_SUBSYSTEM = 2, - NLSE_ATTR_TYPE = 3, - NLSE_ATTR_DATA = 4, + NLSE_ATTR_SYSTEM = 1, /* string reporting the system name */ + NLSE_ATTR_SUBSYSTEM = 2, /* string reporting the subsystem name */ + NLSE_ATTR_TYPE = 3, /* string reporting the type if the event */ + NLSE_ATTR_DATA = 4, /* string reporting the extra data (can be null) */ __NLSE_ATTR_MAX, }; #define NLSE_ATTR_MAX (__NLSE_ATTR_MAX -1) + +/* commands */ +enum { + NLSE_CMD_UNSPEC = 0, + NLSE_CMD_NEWEVENT = 1, + __NLSE_CMD_MAX, +}; +#define NLSE_CMD_MAX (__NLSE_CMD_MAX - 1) + #endif