Home | History | Annotate | Download | only in linux
      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 #include <linux/sockios.h>
     24 #define MRT6_BASE 200
     25 #define MRT6_INIT (MRT6_BASE)
     26 #define MRT6_DONE (MRT6_BASE + 1)
     27 #define MRT6_ADD_MIF (MRT6_BASE + 2)
     28 #define MRT6_DEL_MIF (MRT6_BASE + 3)
     29 #define MRT6_ADD_MFC (MRT6_BASE + 4)
     30 #define MRT6_DEL_MFC (MRT6_BASE + 5)
     31 #define MRT6_VERSION (MRT6_BASE + 6)
     32 #define MRT6_ASSERT (MRT6_BASE + 7)
     33 #define MRT6_PIM (MRT6_BASE + 8)
     34 #define MRT6_TABLE (MRT6_BASE + 9)
     35 #define MRT6_ADD_MFC_PROXY (MRT6_BASE + 10)
     36 #define MRT6_DEL_MFC_PROXY (MRT6_BASE + 11)
     37 #define MRT6_MAX (MRT6_BASE + 11)
     38 #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE
     39 #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE + 1)
     40 #define SIOCGETRPF (SIOCPROTOPRIVATE + 2)
     41 #define MAXMIFS 32
     42 typedef unsigned long mifbitmap_t;
     43 typedef unsigned short mifi_t;
     44 #define ALL_MIFS ((mifi_t) (- 1))
     45 #ifndef IF_SETSIZE
     46 #define IF_SETSIZE 256
     47 #endif
     48 typedef __u32 if_mask;
     49 #define NIFBITS (sizeof(if_mask) * 8)
     50 typedef struct if_set {
     51   if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
     52 } if_set;
     53 #define IF_SET(n,p) ((p)->ifs_bits[(n) / NIFBITS] |= (1 << ((n) % NIFBITS)))
     54 #define IF_CLR(n,p) ((p)->ifs_bits[(n) / NIFBITS] &= ~(1 << ((n) % NIFBITS)))
     55 #define IF_ISSET(n,p) ((p)->ifs_bits[(n) / NIFBITS] & (1 << ((n) % NIFBITS)))
     56 #define IF_COPY(f,t) bcopy(f, t, sizeof(* (f)))
     57 #define IF_ZERO(p) bzero(p, sizeof(* (p)))
     58 struct mif6ctl {
     59   mifi_t mif6c_mifi;
     60   unsigned char mif6c_flags;
     61   unsigned char vifc_threshold;
     62   __u16 mif6c_pifi;
     63   unsigned int vifc_rate_limit;
     64 };
     65 #define MIFF_REGISTER 0x1
     66 struct mf6cctl {
     67   struct sockaddr_in6 mf6cc_origin;
     68   struct sockaddr_in6 mf6cc_mcastgrp;
     69   mifi_t mf6cc_parent;
     70   struct if_set mf6cc_ifset;
     71 };
     72 struct sioc_sg_req6 {
     73   struct sockaddr_in6 src;
     74   struct sockaddr_in6 grp;
     75   unsigned long pktcnt;
     76   unsigned long bytecnt;
     77   unsigned long wrong_if;
     78 };
     79 struct sioc_mif_req6 {
     80   mifi_t mifi;
     81   unsigned long icount;
     82   unsigned long ocount;
     83   unsigned long ibytes;
     84   unsigned long obytes;
     85 };
     86 struct mrt6msg {
     87 #define MRT6MSG_NOCACHE 1
     88 #define MRT6MSG_WRONGMIF 2
     89 #define MRT6MSG_WHOLEPKT 3
     90   __u8 im6_mbz;
     91   __u8 im6_msgtype;
     92   __u16 im6_mif;
     93   __u32 im6_pad;
     94   struct in6_addr im6_src, im6_dst;
     95 };
     96 #endif
     97