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 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__LINUX_MROUTE6_H
20#define _UAPI__LINUX_MROUTE6_H
21#include <linux/kernel.h>
22#include <linux/types.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <linux/sockios.h>
25#define MRT6_BASE 200
26#define MRT6_INIT (MRT6_BASE)
27#define MRT6_DONE (MRT6_BASE + 1)
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define MRT6_ADD_MIF (MRT6_BASE + 2)
30#define MRT6_DEL_MIF (MRT6_BASE + 3)
31#define MRT6_ADD_MFC (MRT6_BASE + 4)
32#define MRT6_DEL_MFC (MRT6_BASE + 5)
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define MRT6_VERSION (MRT6_BASE + 6)
35#define MRT6_ASSERT (MRT6_BASE + 7)
36#define MRT6_PIM (MRT6_BASE + 8)
37#define MRT6_TABLE (MRT6_BASE + 9)
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define MRT6_ADD_MFC_PROXY (MRT6_BASE + 10)
40#define MRT6_DEL_MFC_PROXY (MRT6_BASE + 11)
41#define MRT6_MAX (MRT6_BASE + 11)
42#define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE + 1)
45#define SIOCGETRPF (SIOCPROTOPRIVATE + 2)
46#define MAXMIFS 32
47typedef unsigned long mifbitmap_t;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49typedef unsigned short mifi_t;
50#define ALL_MIFS ((mifi_t) (- 1))
51#ifndef IF_SETSIZE
52#define IF_SETSIZE 256
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#endif
55typedef __u32 if_mask;
56#define NIFBITS (sizeof(if_mask) * 8)
57typedef struct if_set {
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
60} if_set;
61#define IF_SET(n,p) ((p)->ifs_bits[(n) / NIFBITS] |= (1 << ((n) % NIFBITS)))
62#define IF_CLR(n,p) ((p)->ifs_bits[(n) / NIFBITS] &= ~(1 << ((n) % NIFBITS)))
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define IF_ISSET(n,p) ((p)->ifs_bits[(n) / NIFBITS] & (1 << ((n) % NIFBITS)))
65#define IF_COPY(f,t) bcopy(f, t, sizeof(* (f)))
66#define IF_ZERO(p) bzero(p, sizeof(* (p)))
67struct mif6ctl {
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  mifi_t mif6c_mifi;
70  unsigned char mif6c_flags;
71  unsigned char vifc_threshold;
72  __u16 mif6c_pifi;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  unsigned int vifc_rate_limit;
75};
76#define MIFF_REGISTER 0x1
77struct mf6cctl {
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  struct sockaddr_in6 mf6cc_origin;
80  struct sockaddr_in6 mf6cc_mcastgrp;
81  mifi_t mf6cc_parent;
82  struct if_set mf6cc_ifset;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84};
85struct sioc_sg_req6 {
86  struct sockaddr_in6 src;
87  struct sockaddr_in6 grp;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  unsigned long pktcnt;
90  unsigned long bytecnt;
91  unsigned long wrong_if;
92};
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94struct sioc_mif_req6 {
95  mifi_t mifi;
96  unsigned long icount;
97  unsigned long ocount;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  unsigned long ibytes;
100  unsigned long obytes;
101};
102struct mrt6msg {
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define MRT6MSG_NOCACHE 1
105#define MRT6MSG_WRONGMIF 2
106#define MRT6MSG_WHOLEPKT 3
107  __u8 im6_mbz;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  __u8 im6_msgtype;
110  __u16 im6_mif;
111  __u32 im6_pad;
112  struct in6_addr im6_src, im6_dst;
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114};
115#endif
116