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 _RMNET_DATA_H_
     20 #define _RMNET_DATA_H_
     21 #define RMNET_LOCAL_LOGICAL_ENDPOINT - 1
     22 #define RMNET_EGRESS_FORMAT__RESERVED__ (1 << 0)
     23 #define RMNET_EGRESS_FORMAT_MAP (1 << 1)
     24 #define RMNET_EGRESS_FORMAT_AGGREGATION (1 << 2)
     25 #define RMNET_EGRESS_FORMAT_MUXING (1 << 3)
     26 #define RMNET_EGRESS_FORMAT_MAP_CKSUMV3 (1 << 4)
     27 #define RMNET_EGRESS_FORMAT_MAP_CKSUMV4 (1 << 5)
     28 #define RMNET_INGRESS_FIX_ETHERNET (1 << 0)
     29 #define RMNET_INGRESS_FORMAT_MAP (1 << 1)
     30 #define RMNET_INGRESS_FORMAT_DEAGGREGATION (1 << 2)
     31 #define RMNET_INGRESS_FORMAT_DEMUXING (1 << 3)
     32 #define RMNET_INGRESS_FORMAT_MAP_COMMANDS (1 << 4)
     33 #define RMNET_INGRESS_FORMAT_MAP_CKSUMV3 (1 << 5)
     34 #define RMNET_INGRESS_FORMAT_MAP_CKSUMV4 (1 << 6)
     35 #define RMNET_NETLINK_PROTO 31
     36 #define RMNET_MAX_STR_LEN 16
     37 #define RMNET_NL_DATA_MAX_LEN 64
     38 #define RMNET_NETLINK_MSG_COMMAND 0
     39 #define RMNET_NETLINK_MSG_RETURNCODE 1
     40 #define RMNET_NETLINK_MSG_RETURNDATA 2
     41 struct rmnet_nl_msg_s {
     42   uint16_t reserved;
     43   uint16_t message_type;
     44   uint16_t reserved2 : 14;
     45   uint16_t crd : 2;
     46   union {
     47     uint16_t arg_length;
     48     uint16_t return_code;
     49   };
     50   union {
     51     uint8_t data[RMNET_NL_DATA_MAX_LEN];
     52     struct {
     53       uint8_t dev[RMNET_MAX_STR_LEN];
     54       uint32_t flags;
     55       uint16_t agg_size;
     56       uint16_t agg_count;
     57       uint8_t tail_spacing;
     58     } data_format;
     59     struct {
     60       uint8_t dev[RMNET_MAX_STR_LEN];
     61       int32_t ep_id;
     62       uint8_t operating_mode;
     63       uint8_t next_dev[RMNET_MAX_STR_LEN];
     64     } local_ep_config;
     65     struct {
     66       uint32_t id;
     67       uint8_t vnd_name[RMNET_MAX_STR_LEN];
     68     } vnd;
     69     struct {
     70       uint32_t id;
     71       uint32_t map_flow_id;
     72       uint32_t tc_flow_id;
     73     } flow_control;
     74   };
     75 };
     76 enum rmnet_netlink_message_types_e {
     77   RMNET_NETLINK_ASSOCIATE_NETWORK_DEVICE,
     78   RMNET_NETLINK_UNASSOCIATE_NETWORK_DEVICE,
     79   RMNET_NETLINK_GET_NETWORK_DEVICE_ASSOCIATED,
     80   RMNET_NETLINK_SET_LINK_EGRESS_DATA_FORMAT,
     81   RMNET_NETLINK_GET_LINK_EGRESS_DATA_FORMAT,
     82   RMNET_NETLINK_SET_LINK_INGRESS_DATA_FORMAT,
     83   RMNET_NETLINK_GET_LINK_INGRESS_DATA_FORMAT,
     84   RMNET_NETLINK_SET_LOGICAL_EP_CONFIG,
     85   RMNET_NETLINK_UNSET_LOGICAL_EP_CONFIG,
     86   RMNET_NETLINK_GET_LOGICAL_EP_CONFIG,
     87   RMNET_NETLINK_NEW_VND,
     88   RMNET_NETLINK_NEW_VND_WITH_PREFIX,
     89   RMNET_NETLINK_GET_VND_NAME,
     90   RMNET_NETLINK_FREE_VND,
     91   RMNET_NETLINK_ADD_VND_TC_FLOW,
     92   RMNET_NETLINK_DEL_VND_TC_FLOW,
     93   RMNET_NETLINK_NEW_VND_WITH_NAME
     94 };
     95 #define RMNET_NETLINK_NEW_VND_WITH_NAME RMNET_NETLINK_NEW_VND_WITH_NAME
     96 enum rmnet_config_endpoint_modes_e {
     97   RMNET_EPMODE_NONE,
     98   RMNET_EPMODE_VND,
     99   RMNET_EPMODE_BRIDGE,
    100   RMNET_EPMODE_LENGTH
    101 };
    102 enum rmnet_config_return_codes_e {
    103   RMNET_CONFIG_OK,
    104   RMNET_CONFIG_UNKNOWN_MESSAGE,
    105   RMNET_CONFIG_UNKNOWN_ERROR,
    106   RMNET_CONFIG_NOMEM,
    107   RMNET_CONFIG_DEVICE_IN_USE,
    108   RMNET_CONFIG_INVALID_REQUEST,
    109   RMNET_CONFIG_NO_SUCH_DEVICE,
    110   RMNET_CONFIG_BAD_ARGUMENTS,
    111   RMNET_CONFIG_BAD_EGRESS_DEVICE,
    112   RMNET_CONFIG_TC_HANDLE_FULL
    113 };
    114 #endif
    115 
    116