X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Fnetlink.h;h=670558170bbdd19ce477c18eb952a62550b3750e;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=0602eaffbad25189c1462cff1dd6037d3aa9ad5a;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 0602eaffb..670558170 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -73,7 +73,8 @@ struct nlmsghdr #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) -#define NLMSG_OK(nlh,len) ((len) > 0 && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ +#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ + (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ (nlh)->nlmsg_len <= (len)) #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) @@ -90,6 +91,11 @@ struct nlmsgerr #define NET_MAJOR 36 /* Major 36 is reserved for networking */ +enum { + NETLINK_UNCONNECTED = 0, + NETLINK_CONNECTED, +}; + #ifdef __KERNEL__ #include