Skip to content

Commit ab80feb

Browse files
committed
Auto merge of #3278 - dragan-cecavac-nordsec:android/add-uapi-linux-neighbour, r=JohnTitor
android: Add kernel/uapi/linux/neighbour.h constants Introduce Android constants defined in https://android.googlesource.com/platform/bionic/+/refs/heads/master/libc/kernel/uapi/linux/neighbour.h
2 parents 45ee1cb + 983bdca commit ab80feb

File tree

2 files changed

+154
-0
lines changed

2 files changed

+154
-0
lines changed

libc-test/semver/android.txt

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ FD_ISSET
597597
FD_SET
598598
FD_SETSIZE
599599
FD_ZERO
600+
FDB_NOTIFY_BIT
601+
FDB_NOTIFY_INACTIVE_BIT
600602
FF0
601603
FF1
602604
FFDLY
@@ -1257,6 +1259,54 @@ MS_SYNCHRONOUS
12571259
MS_UNBINDABLE
12581260
NCCS
12591261
NCP_SUPER_MAGIC
1262+
NDA_CACHEINFO
1263+
NDA_DST
1264+
NDA_FDB_EXT_ATTRS
1265+
NDA_FLAGS_EXT
1266+
NDA_IFINDEX
1267+
NDA_LINK_NETNSID
1268+
NDA_LLADDR
1269+
NDA_MASTER
1270+
NDA_NDM_FLAGS_MASK
1271+
NDA_NDM_STATE_MASK
1272+
NDA_NH_ID
1273+
NDA_PORT
1274+
NDA_PROBES
1275+
NDA_PROTOCOL
1276+
NDA_SRC_VNI
1277+
NDA_UNSPEC
1278+
NDA_VLAN
1279+
NDA_VNI
1280+
NDTA_CONFIG
1281+
NDTA_GC_INTERVAL
1282+
NDTA_NAME
1283+
NDTA_PAD
1284+
NDTA_PARMS
1285+
NDTA_STATS
1286+
NDTA_THRESH1
1287+
NDTA_THRESH2
1288+
NDTA_THRESH3
1289+
NDTA_UNSPEC
1290+
NDTPA_ANYCAST_DELAY
1291+
NDTPA_APP_PROBES
1292+
NDTPA_BASE_REACHABLE_TIME
1293+
NDTPA_DELAY_PROBE_TIME
1294+
NDTPA_GC_STALETIME
1295+
NDTPA_IFINDEX
1296+
NDTPA_INTERVAL_PROBE_TIME_MS
1297+
NDTPA_LOCKTIME
1298+
NDTPA_MCAST_PROBES
1299+
NDTPA_MCAST_REPROBES
1300+
NDTPA_PAD
1301+
NDTPA_PROXY_DELAY
1302+
NDTPA_PROXY_QLEN
1303+
NDTPA_QUEUE_LEN
1304+
NDTPA_QUEUE_LENBYTES
1305+
NDTPA_REACHABLE_TIME
1306+
NDTPA_REFCNT
1307+
NDTPA_RETRANS_TIME
1308+
NDTPA_UCAST_PROBES
1309+
NDTPA_UNSPEC
12601310
NETLINK_ADD_MEMBERSHIP
12611311
NETLINK_AUDIT
12621312
NETLINK_BROADCAST_ERROR
@@ -1622,6 +1672,9 @@ NF_VERDICT_FLAG_QUEUE_BYPASS
16221672
NF_VERDICT_MASK
16231673
NF_VERDICT_QBITS
16241674
NF_VERDICT_QMASK
1675+
NFEA_ACTIVITY_NOTIFY
1676+
NFEA_DONT_REFRESH
1677+
NFEA_UNSPEC
16251678
NI_DGRAM
16261679
NI_MAXHOST
16271680
NI_MAXSERV
@@ -1656,6 +1709,25 @@ NLM_F_REPLACE
16561709
NLM_F_REQUEST
16571710
NLM_F_ROOT
16581711
NOFLSH
1712+
NTF_EXT_LEARNED
1713+
NTF_EXT_LOCKED
1714+
NTF_EXT_MANAGED
1715+
NTF_MASTER
1716+
NTF_OFFLOADED
1717+
NTF_PROXY
1718+
NTF_ROUTER
1719+
NTF_SELF
1720+
NTF_STICKY
1721+
NTF_USE
1722+
NUD_DELAY
1723+
NUD_FAILED
1724+
NUD_INCOMPLETE
1725+
NUD_NOARP
1726+
NUD_NONE
1727+
NUD_PERMANENT
1728+
NUD_PROBE
1729+
NUD_REACHABLE
1730+
NUD_STALE
16591731
OCRNL
16601732
OFDEL
16611733
OFILL

src/unix/linux_like/android/mod.rs

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,6 +2580,88 @@ pub const ETH_P_XDSA: ::c_int = 0x00F8;
25802580
/* see rust-lang/libc#924 pub const ETH_P_MAP: ::c_int = 0x00F9;*/
25812581
// end android/platform/bionic/libc/kernel/uapi/linux/if_ether.h
25822582

2583+
// start android/platform/bionic/libc/kernel/uapi/linux/neighbour.h
2584+
pub const NDA_UNSPEC: ::c_ushort = 0;
2585+
pub const NDA_DST: ::c_ushort = 1;
2586+
pub const NDA_LLADDR: ::c_ushort = 2;
2587+
pub const NDA_CACHEINFO: ::c_ushort = 3;
2588+
pub const NDA_PROBES: ::c_ushort = 4;
2589+
pub const NDA_VLAN: ::c_ushort = 5;
2590+
pub const NDA_PORT: ::c_ushort = 6;
2591+
pub const NDA_VNI: ::c_ushort = 7;
2592+
pub const NDA_IFINDEX: ::c_ushort = 8;
2593+
pub const NDA_MASTER: ::c_ushort = 9;
2594+
pub const NDA_LINK_NETNSID: ::c_ushort = 10;
2595+
pub const NDA_SRC_VNI: ::c_ushort = 11;
2596+
pub const NDA_PROTOCOL: ::c_ushort = 12;
2597+
pub const NDA_NH_ID: ::c_ushort = 13;
2598+
pub const NDA_FDB_EXT_ATTRS: ::c_ushort = 14;
2599+
pub const NDA_FLAGS_EXT: ::c_ushort = 15;
2600+
pub const NDA_NDM_STATE_MASK: ::c_ushort = 16;
2601+
pub const NDA_NDM_FLAGS_MASK: ::c_ushort = 17;
2602+
2603+
pub const NTF_USE: u8 = 0x01;
2604+
pub const NTF_SELF: u8 = 0x02;
2605+
pub const NTF_MASTER: u8 = 0x04;
2606+
pub const NTF_PROXY: u8 = 0x08;
2607+
pub const NTF_EXT_LEARNED: u8 = 0x10;
2608+
pub const NTF_OFFLOADED: u8 = 0x20;
2609+
pub const NTF_STICKY: u8 = 0x40;
2610+
pub const NTF_ROUTER: u8 = 0x80;
2611+
2612+
pub const NTF_EXT_MANAGED: u8 = 0x01;
2613+
pub const NTF_EXT_LOCKED: u8 = 0x02;
2614+
2615+
pub const NUD_NONE: u16 = 0x00;
2616+
pub const NUD_INCOMPLETE: u16 = 0x01;
2617+
pub const NUD_REACHABLE: u16 = 0x02;
2618+
pub const NUD_STALE: u16 = 0x04;
2619+
pub const NUD_DELAY: u16 = 0x08;
2620+
pub const NUD_PROBE: u16 = 0x10;
2621+
pub const NUD_FAILED: u16 = 0x20;
2622+
pub const NUD_NOARP: u16 = 0x40;
2623+
pub const NUD_PERMANENT: u16 = 0x80;
2624+
2625+
pub const NDTPA_UNSPEC: ::c_ushort = 0;
2626+
pub const NDTPA_IFINDEX: ::c_ushort = 1;
2627+
pub const NDTPA_REFCNT: ::c_ushort = 2;
2628+
pub const NDTPA_REACHABLE_TIME: ::c_ushort = 3;
2629+
pub const NDTPA_BASE_REACHABLE_TIME: ::c_ushort = 4;
2630+
pub const NDTPA_RETRANS_TIME: ::c_ushort = 5;
2631+
pub const NDTPA_GC_STALETIME: ::c_ushort = 6;
2632+
pub const NDTPA_DELAY_PROBE_TIME: ::c_ushort = 7;
2633+
pub const NDTPA_QUEUE_LEN: ::c_ushort = 8;
2634+
pub const NDTPA_APP_PROBES: ::c_ushort = 9;
2635+
pub const NDTPA_UCAST_PROBES: ::c_ushort = 10;
2636+
pub const NDTPA_MCAST_PROBES: ::c_ushort = 11;
2637+
pub const NDTPA_ANYCAST_DELAY: ::c_ushort = 12;
2638+
pub const NDTPA_PROXY_DELAY: ::c_ushort = 13;
2639+
pub const NDTPA_PROXY_QLEN: ::c_ushort = 14;
2640+
pub const NDTPA_LOCKTIME: ::c_ushort = 15;
2641+
pub const NDTPA_QUEUE_LENBYTES: ::c_ushort = 16;
2642+
pub const NDTPA_MCAST_REPROBES: ::c_ushort = 17;
2643+
pub const NDTPA_PAD: ::c_ushort = 18;
2644+
pub const NDTPA_INTERVAL_PROBE_TIME_MS: ::c_ushort = 19;
2645+
2646+
pub const NDTA_UNSPEC: ::c_ushort = 0;
2647+
pub const NDTA_NAME: ::c_ushort = 1;
2648+
pub const NDTA_THRESH1: ::c_ushort = 2;
2649+
pub const NDTA_THRESH2: ::c_ushort = 3;
2650+
pub const NDTA_THRESH3: ::c_ushort = 4;
2651+
pub const NDTA_CONFIG: ::c_ushort = 5;
2652+
pub const NDTA_PARMS: ::c_ushort = 6;
2653+
pub const NDTA_STATS: ::c_ushort = 7;
2654+
pub const NDTA_GC_INTERVAL: ::c_ushort = 8;
2655+
pub const NDTA_PAD: ::c_ushort = 9;
2656+
2657+
pub const FDB_NOTIFY_BIT: u16 = 0x01;
2658+
pub const FDB_NOTIFY_INACTIVE_BIT: u16 = 0x02;
2659+
2660+
pub const NFEA_UNSPEC: ::c_ushort = 0;
2661+
pub const NFEA_ACTIVITY_NOTIFY: ::c_ushort = 1;
2662+
pub const NFEA_DONT_REFRESH: ::c_ushort = 2;
2663+
// end android/platform/bionic/libc/kernel/uapi/linux/neighbour.h
2664+
25832665
pub const SIOCADDRT: ::c_ulong = 0x0000890B;
25842666
pub const SIOCDELRT: ::c_ulong = 0x0000890C;
25852667
pub const SIOCGIFNAME: ::c_ulong = 0x00008910;

0 commit comments

Comments
 (0)