blob: d4da98c33e80829990179f5412a4a2aecbe44e5e [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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
Christopher Ferris106b3a82016-08-24 12:15:38 -070021#include <linux/kernel.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070024#include <linux/sockios.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define MRT6_BASE 200
26#define MRT6_INIT (MRT6_BASE)
Tao Baod7db5942015-01-28 10:07:51 -080027#define MRT6_DONE (MRT6_BASE + 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070029#define MRT6_ADD_MIF (MRT6_BASE + 2)
Tao Baod7db5942015-01-28 10:07:51 -080030#define MRT6_DEL_MIF (MRT6_BASE + 3)
31#define MRT6_ADD_MFC (MRT6_BASE + 4)
32#define MRT6_DEL_MFC (MRT6_BASE + 5)
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070034#define MRT6_VERSION (MRT6_BASE + 6)
Tao Baod7db5942015-01-28 10:07:51 -080035#define MRT6_ASSERT (MRT6_BASE + 7)
36#define MRT6_PIM (MRT6_BASE + 8)
37#define MRT6_TABLE (MRT6_BASE + 9)
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070039#define MRT6_ADD_MFC_PROXY (MRT6_BASE + 10)
Tao Baod7db5942015-01-28 10:07:51 -080040#define MRT6_DEL_MFC_PROXY (MRT6_BASE + 11)
41#define MRT6_MAX (MRT6_BASE + 11)
Ben Cheng655a7c02013-10-16 16:09:24 -070042#define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070044#define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE + 1)
Tao Baod7db5942015-01-28 10:07:51 -080045#define SIOCGETRPF (SIOCPROTOPRIVATE + 2)
Ben Cheng655a7c02013-10-16 16:09:24 -070046#define MAXMIFS 32
47typedef unsigned long mifbitmap_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070049typedef unsigned short mifi_t;
Tao Baod7db5942015-01-28 10:07:51 -080050#define ALL_MIFS ((mifi_t) (- 1))
Ben Cheng655a7c02013-10-16 16:09:24 -070051#ifndef IF_SETSIZE
52#define IF_SETSIZE 256
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070054#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070055typedef __u32 if_mask;
56#define NIFBITS (sizeof(if_mask) * 8)
Ben Cheng655a7c02013-10-16 16:09:24 -070057typedef struct if_set {
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070059 if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
60} if_set;
Tao Baod7db5942015-01-28 10:07:51 -080061#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)))
Christopher Ferris106b3a82016-08-24 12:15:38 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064#define IF_ISSET(n,p) ((p)->ifs_bits[(n) / NIFBITS] & (1 << ((n) % NIFBITS)))
65#define IF_COPY(f,t) bcopy(f, t, sizeof(* (f)))
Tao Baod7db5942015-01-28 10:07:51 -080066#define IF_ZERO(p) bzero(p, sizeof(* (p)))
Ben Cheng655a7c02013-10-16 16:09:24 -070067struct mif6ctl {
Christopher Ferris106b3a82016-08-24 12:15:38 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 mifi_t mif6c_mifi;
70 unsigned char mif6c_flags;
Tao Baod7db5942015-01-28 10:07:51 -080071 unsigned char vifc_threshold;
72 __u16 mif6c_pifi;
Christopher Ferris106b3a82016-08-24 12:15:38 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 unsigned int vifc_rate_limit;
Ben Cheng655a7c02013-10-16 16:09:24 -070075};
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define MIFF_REGISTER 0x1
77struct mf6cctl {
Christopher Ferris106b3a82016-08-24 12:15:38 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 struct sockaddr_in6 mf6cc_origin;
80 struct sockaddr_in6 mf6cc_mcastgrp;
Tao Baod7db5942015-01-28 10:07:51 -080081 mifi_t mf6cc_parent;
82 struct if_set mf6cc_ifset;
Christopher Ferris106b3a82016-08-24 12:15:38 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070084};
85struct sioc_sg_req6 {
Tao Baod7db5942015-01-28 10:07:51 -080086 struct sockaddr_in6 src;
87 struct sockaddr_in6 grp;
Christopher Ferris106b3a82016-08-24 12:15:38 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 unsigned long pktcnt;
90 unsigned long bytecnt;
Tao Baod7db5942015-01-28 10:07:51 -080091 unsigned long wrong_if;
Ben Cheng655a7c02013-10-16 16:09:24 -070092};
Christopher Ferris106b3a82016-08-24 12:15:38 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094struct sioc_mif_req6 {
Tao Baod7db5942015-01-28 10:07:51 -080095 mifi_t mifi;
Tao Baod7db5942015-01-28 10:07:51 -080096 unsigned long icount;
97 unsigned long ocount;
Christopher Ferris106b3a82016-08-24 12:15:38 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 unsigned long ibytes;
100 unsigned long obytes;
Ben Cheng655a7c02013-10-16 16:09:24 -0700101};
102struct mrt6msg {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#define MRT6MSG_NOCACHE 1
105#define MRT6MSG_WRONGMIF 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700106#define MRT6MSG_WHOLEPKT 3
Tao Baod7db5942015-01-28 10:07:51 -0800107 __u8 im6_mbz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 __u8 im6_msgtype;
110 __u16 im6_mif;
Tao Baod7db5942015-01-28 10:07:51 -0800111 __u32 im6_pad;
112 struct in6_addr im6_src, im6_dst;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114};
115#endif