14 #define IFF_LOWER_UP 0x10000
17 #define IFF_DORMANT 0x20000
24 #define IFLA_WIRELESS 11
26 #ifndef IFLA_OPERSTATE
27 #define IFLA_OPERSTATE 16
30 #define IFLA_LINKMODE 17
31 #define IF_OPER_DORMANT 5
35 #define NLM_F_REQUEST 1
37 #define NETLINK_ROUTE 0
40 #define RTM_NEWLINK (RTM_BASE + 0)
41 #define RTM_DELLINK (RTM_BASE + 1)
42 #define RTM_SETLINK (RTM_BASE + 3)
44 #define NLMSG_ALIGNTO 4
45 #define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1))
46 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
47 #define NLMSG_LENGTH(len) ((len) + NLMSG_ALIGN(sizeof(struct nlmsghdr)))
48 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
49 #define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
50 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
52 (((char *)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
53 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
54 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
55 (int) (nlh)->nlmsg_len <= (len))
56 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
59 #define RTA_ALIGN(len) (((len) + RTA_ALIGNTO - 1) & ~(RTA_ALIGNTO - 1))
60 #define RTA_OK(rta,len) \
61 ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \
62 (rta)->rta_len <= (len))
63 #define RTA_NEXT(rta,attrlen) \
64 ((attrlen) -= RTA_ALIGN((rta)->rta_len), \
65 (struct rtattr *) (((char *)(rta)) + RTA_ALIGN((rta)->rta_len)))
66 #define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
67 #define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len))
68 #define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0)))
69 #define RTA_PAYLOAD(rta) ((int) ((rta)->rta_len) - RTA_LENGTH(0))
74 sa_family_t nl_family;
75 unsigned short nl_pad;
91 unsigned char ifi_family;
92 unsigned char __ifi_pad;
93 unsigned short ifi_type;
101 unsigned short rta_len;
102 unsigned short rta_type;
Definition: priv_netlink.h:80
Definition: priv_netlink.h:99
Definition: priv_netlink.h:72
Definition: priv_netlink.h:89