Changeset 6582

Show
Ignore:
Timestamp:
11/28/10 17:36:18 (2 years ago)
Author:
Cyrus
Message:

libunl: Add unl_genlmsg_parse

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci2/libunl/unl/msg.h

    r6266 r6582  
    277277} 
    278278 
     279/** 
     280 * Drop in replacement for unl_msg_parse for generic netlink. 
     281 * Automatically skips the generic netlink header. 
     282 */ 
     283static inline int unl_genlmsg_parse(struct nlmsghdr *nh, size_t skip, struct nlattr *nlatbl[], uint16_t maxtype) { 
     284    return unl_msg_parse(nh, NLMSG_ALIGN(sizeof(struct genlmsghdr)) + skip, nlatbl, maxtype); 
     285} 
     286 
    279287 
    280288/****** NETLINK attribute helpers ******/