blob: aa27d7078e2e8e212a9ff4d98307a2f7c8865306 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef __LINUX_IF_ADDR_H
8#define __LINUX_IF_ADDR_H
9#include <linux/types.h>
10#include <linux/netlink.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070011struct ifaddrmsg {
Tao Baod7db5942015-01-28 10:07:51 -080012 __u8 ifa_family;
13 __u8 ifa_prefixlen;
14 __u8 ifa_flags;
Tao Baod7db5942015-01-28 10:07:51 -080015 __u8 ifa_scope;
16 __u32 ifa_index;
Ben Cheng655a7c02013-10-16 16:09:24 -070017};
18enum {
Tao Baod7db5942015-01-28 10:07:51 -080019 IFA_UNSPEC,
20 IFA_ADDRESS,
21 IFA_LOCAL,
22 IFA_LABEL,
Tao Baod7db5942015-01-28 10:07:51 -080023 IFA_BROADCAST,
24 IFA_ANYCAST,
25 IFA_CACHEINFO,
26 IFA_MULTICAST,
Tao Baod7db5942015-01-28 10:07:51 -080027 IFA_FLAGS,
Christopher Ferris9ce28842018-10-25 12:11:39 -070028 IFA_RT_PRIORITY,
Christopher Ferris86a48372019-01-10 14:14:59 -080029 IFA_TARGET_NETNSID,
Christopher Ferris10a76e62022-06-08 13:31:52 -070030 IFA_PROTO,
Tao Baod7db5942015-01-28 10:07:51 -080031 __IFA_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070032};
33#define IFA_MAX (__IFA_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -070034#define IFA_F_SECONDARY 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define IFA_F_TEMPORARY IFA_F_SECONDARY
36#define IFA_F_NODAD 0x02
37#define IFA_F_OPTIMISTIC 0x04
Christopher Ferris38062f92014-07-09 15:33:25 -070038#define IFA_F_DADFAILED 0x08
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define IFA_F_HOMEADDRESS 0x10
40#define IFA_F_DEPRECATED 0x20
41#define IFA_F_TENTATIVE 0x40
Christopher Ferris38062f92014-07-09 15:33:25 -070042#define IFA_F_PERMANENT 0x80
43#define IFA_F_MANAGETEMPADDR 0x100
44#define IFA_F_NOPREFIXROUTE 0x200
Christopher Ferris05d08e92016-02-04 13:16:38 -080045#define IFA_F_MCAUTOJOIN 0x400
Christopher Ferris05d08e92016-02-04 13:16:38 -080046#define IFA_F_STABLE_PRIVACY 0x800
47struct ifa_cacheinfo {
Tao Baod7db5942015-01-28 10:07:51 -080048 __u32 ifa_prefered;
49 __u32 ifa_valid;
50 __u32 cstamp;
51 __u32 tstamp;
Ben Cheng655a7c02013-10-16 16:09:24 -070052};
Tao Baod7db5942015-01-28 10:07:51 -080053#define IFA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
54#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg))
Christopher Ferris10a76e62022-06-08 13:31:52 -070055#define IFAPROT_UNSPEC 0
56#define IFAPROT_KERNEL_LO 1
57#define IFAPROT_KERNEL_RA 2
58#define IFAPROT_KERNEL_LL 3
Ben Cheng655a7c02013-10-16 16:09:24 -070059#endif