• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __LINUX_IF_ADDR_H
13 #define __LINUX_IF_ADDR_H
14 
15 #include <linux/types.h>
16 #include <linux/netlink.h>
17 
18 struct ifaddrmsg
19 {
20  __u8 ifa_family;
21  __u8 ifa_prefixlen;
22  __u8 ifa_flags;
23  __u8 ifa_scope;
24  __u32 ifa_index;
25 };
26 
27 enum
28 {
29  IFA_UNSPEC,
30  IFA_ADDRESS,
31  IFA_LOCAL,
32  IFA_LABEL,
33  IFA_BROADCAST,
34  IFA_ANYCAST,
35  IFA_CACHEINFO,
36  IFA_MULTICAST,
37  __IFA_MAX,
38 };
39 
40 #define IFA_MAX (__IFA_MAX - 1)
41 
42 #define IFA_F_SECONDARY 0x01
43 #define IFA_F_TEMPORARY IFA_F_SECONDARY
44 
45 #define IFA_F_NODAD 0x02
46 #define IFA_F_OPTIMISTIC 0x04
47 #define IFA_F_DADFAILED 0x08
48 #define IFA_F_HOMEADDRESS 0x10
49 #define IFA_F_DEPRECATED 0x20
50 #define IFA_F_TENTATIVE 0x40
51 #define IFA_F_PERMANENT 0x80
52 
53 struct ifa_cacheinfo
54 {
55  __u32 ifa_prefered;
56  __u32 ifa_valid;
57  __u32 cstamp;
58  __u32 tstamp;
59 };
60 
61 #define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
62 #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
63 
64 #endif
65