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_INET_DIAG_H_
     20 #define _UAPI_INET_DIAG_H_
     21 #include <linux/types.h>
     22 #define TCPDIAG_GETSOCK 18
     23 #define DCCPDIAG_GETSOCK 19
     24 #define INET_DIAG_GETSOCK_MAX 24
     25 struct inet_diag_sockid {
     26   __be16 idiag_sport;
     27   __be16 idiag_dport;
     28   __be32 idiag_src[4];
     29   __be32 idiag_dst[4];
     30   __u32 idiag_if;
     31   __u32 idiag_cookie[2];
     32 #define INET_DIAG_NOCOOKIE (~0U)
     33 };
     34 struct inet_diag_req {
     35   __u8 idiag_family;
     36   __u8 idiag_src_len;
     37   __u8 idiag_dst_len;
     38   __u8 idiag_ext;
     39   struct inet_diag_sockid id;
     40   __u32 idiag_states;
     41   __u32 idiag_dbs;
     42 };
     43 struct inet_diag_req_v2 {
     44   __u8 sdiag_family;
     45   __u8 sdiag_protocol;
     46   __u8 idiag_ext;
     47   __u8 pad;
     48   __u32 idiag_states;
     49   struct inet_diag_sockid id;
     50 };
     51 struct inet_diag_req_raw {
     52   __u8 sdiag_family;
     53   __u8 sdiag_protocol;
     54   __u8 idiag_ext;
     55   __u8 sdiag_raw_protocol;
     56   __u32 idiag_states;
     57   struct inet_diag_sockid id;
     58 };
     59 enum {
     60   INET_DIAG_REQ_NONE,
     61   INET_DIAG_REQ_BYTECODE,
     62 };
     63 #define INET_DIAG_REQ_MAX INET_DIAG_REQ_BYTECODE
     64 struct inet_diag_bc_op {
     65   unsigned char code;
     66   unsigned char yes;
     67   unsigned short no;
     68 };
     69 enum {
     70   INET_DIAG_BC_NOP,
     71   INET_DIAG_BC_JMP,
     72   INET_DIAG_BC_S_GE,
     73   INET_DIAG_BC_S_LE,
     74   INET_DIAG_BC_D_GE,
     75   INET_DIAG_BC_D_LE,
     76   INET_DIAG_BC_AUTO,
     77   INET_DIAG_BC_S_COND,
     78   INET_DIAG_BC_D_COND,
     79   INET_DIAG_BC_DEV_COND,
     80   INET_DIAG_BC_MARK_COND,
     81   INET_DIAG_BC_S_EQ,
     82   INET_DIAG_BC_D_EQ,
     83 };
     84 struct inet_diag_hostcond {
     85   __u8 family;
     86   __u8 prefix_len;
     87   int port;
     88   __be32 addr[0];
     89 };
     90 struct inet_diag_markcond {
     91   __u32 mark;
     92   __u32 mask;
     93 };
     94 struct inet_diag_msg {
     95   __u8 idiag_family;
     96   __u8 idiag_state;
     97   __u8 idiag_timer;
     98   __u8 idiag_retrans;
     99   struct inet_diag_sockid id;
    100   __u32 idiag_expires;
    101   __u32 idiag_rqueue;
    102   __u32 idiag_wqueue;
    103   __u32 idiag_uid;
    104   __u32 idiag_inode;
    105 };
    106 enum {
    107   INET_DIAG_NONE,
    108   INET_DIAG_MEMINFO,
    109   INET_DIAG_INFO,
    110   INET_DIAG_VEGASINFO,
    111   INET_DIAG_CONG,
    112   INET_DIAG_TOS,
    113   INET_DIAG_TCLASS,
    114   INET_DIAG_SKMEMINFO,
    115   INET_DIAG_SHUTDOWN,
    116   INET_DIAG_DCTCPINFO,
    117   INET_DIAG_PROTOCOL,
    118   INET_DIAG_SKV6ONLY,
    119   INET_DIAG_LOCALS,
    120   INET_DIAG_PEERS,
    121   INET_DIAG_PAD,
    122   INET_DIAG_MARK,
    123   INET_DIAG_BBRINFO,
    124   INET_DIAG_CLASS_ID,
    125   INET_DIAG_MD5SIG,
    126   __INET_DIAG_MAX,
    127 };
    128 #define INET_DIAG_MAX (__INET_DIAG_MAX - 1)
    129 struct inet_diag_meminfo {
    130   __u32 idiag_rmem;
    131   __u32 idiag_wmem;
    132   __u32 idiag_fmem;
    133   __u32 idiag_tmem;
    134 };
    135 struct tcpvegas_info {
    136   __u32 tcpv_enabled;
    137   __u32 tcpv_rttcnt;
    138   __u32 tcpv_rtt;
    139   __u32 tcpv_minrtt;
    140 };
    141 struct tcp_dctcp_info {
    142   __u16 dctcp_enabled;
    143   __u16 dctcp_ce_state;
    144   __u32 dctcp_alpha;
    145   __u32 dctcp_ab_ecn;
    146   __u32 dctcp_ab_tot;
    147 };
    148 struct tcp_bbr_info {
    149   __u32 bbr_bw_lo;
    150   __u32 bbr_bw_hi;
    151   __u32 bbr_min_rtt;
    152   __u32 bbr_pacing_gain;
    153   __u32 bbr_cwnd_gain;
    154 };
    155 union tcp_cc_info {
    156   struct tcpvegas_info vegas;
    157   struct tcp_dctcp_info dctcp;
    158   struct tcp_bbr_info bbr;
    159 };
    160 #endif
    161