blob: a9fd29317b4d5e2cd577d9f23a33680fc95fab09 [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 ****************************************************************************/
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070019#ifndef _UAPI_CAN_GW_H
20#define _UAPI_CAN_GW_H
Ben Cheng655a7c02013-10-16 16:09:24 -070021#include <linux/types.h>
22#include <linux/can.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct rtcanmsg {
Tao Baod7db5942015-01-28 10:07:51 -080025 __u8 can_family;
26 __u8 gwtype;
27 __u16 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29};
30enum {
Tao Baod7db5942015-01-28 10:07:51 -080031 CGW_TYPE_UNSPEC,
32 CGW_TYPE_CAN_CAN,
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 __CGW_TYPE_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -070035};
36#define CGW_TYPE_MAX (__CGW_TYPE_MAX - 1)
37enum {
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 CGW_UNSPEC,
40 CGW_MOD_AND,
41 CGW_MOD_OR,
42 CGW_MOD_XOR,
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 CGW_MOD_SET,
45 CGW_CS_XOR,
46 CGW_CS_CRC8,
47 CGW_HANDLED,
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 CGW_DROPPED,
50 CGW_SRC_IF,
51 CGW_DST_IF,
52 CGW_FILTER,
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 CGW_DELETED,
55 CGW_LIM_HOPS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080056 CGW_MOD_UID,
Tao Baod7db5942015-01-28 10:07:51 -080057 __CGW_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080059};
Christopher Ferris38062f92014-07-09 15:33:25 -070060#define CGW_MAX (__CGW_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070061#define CGW_FLAGS_CAN_ECHO 0x01
62#define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080064#define CGW_FLAGS_CAN_IIF_TX_OK 0x04
Christopher Ferris38062f92014-07-09 15:33:25 -070065#define CGW_MOD_FUNCS 4
Ben Cheng655a7c02013-10-16 16:09:24 -070066#define CGW_MOD_ID 0x01
67#define CGW_MOD_DLC 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080069#define CGW_MOD_DATA 0x04
Christopher Ferris38062f92014-07-09 15:33:25 -070070#define CGW_FRAME_MODS 3
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS)
72struct cgw_frame_mod {
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080074 struct can_frame cf;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 modtype;
Ben Cheng655a7c02013-10-16 16:09:24 -070076} __attribute__((packed));
77#define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod)
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080079struct cgw_csum_xor {
Tao Baod7db5942015-01-28 10:07:51 -080080 __s8 from_idx;
81 __s8 to_idx;
82 __s8 result_idx;
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080084 __u8 init_xor_val;
Christopher Ferris38062f92014-07-09 15:33:25 -070085} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070086struct cgw_csum_crc8 {
Tao Baod7db5942015-01-28 10:07:51 -080087 __s8 from_idx;
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080089 __s8 to_idx;
Tao Baod7db5942015-01-28 10:07:51 -080090 __s8 result_idx;
91 __u8 init_crc_val;
92 __u8 final_xor_val;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080094 __u8 crctab[256];
Tao Baod7db5942015-01-28 10:07:51 -080095 __u8 profile;
96 __u8 profile_data[20];
Ben Cheng655a7c02013-10-16 16:09:24 -070097} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080099#define CGW_CS_XOR_LEN sizeof(struct cgw_csum_xor)
Christopher Ferris38062f92014-07-09 15:33:25 -0700100#define CGW_CS_CRC8_LEN sizeof(struct cgw_csum_crc8)
Ben Cheng655a7c02013-10-16 16:09:24 -0700101enum {
Tao Baod7db5942015-01-28 10:07:51 -0800102 CGW_CRC8PRF_UNSPEC,
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800104 CGW_CRC8PRF_1U8,
Tao Baod7db5942015-01-28 10:07:51 -0800105 CGW_CRC8PRF_16U8,
106 CGW_CRC8PRF_SFFID_XOR,
107 __CGW_CRC8PRF_MAX
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109};
Christopher Ferris38062f92014-07-09 15:33:25 -0700110#define CGW_CRC8PRF_MAX (__CGW_CRC8PRF_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#endif