blob: 7ff9cf9f4f4bcbe3c496e0b7e292cf0fe7e5101a [file] [log] [blame]
Elliott Hughes86ec05a2012-09-11 19:03:02 -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 CAN_H
20#define CAN_H
21#include <linux/types.h>
22#include <linux/socket.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesc95eb572013-01-29 18:15:55 -080024#define CAN_EFF_FLAG 0x80000000U
25#define CAN_RTR_FLAG 0x40000000U
26#define CAN_ERR_FLAG 0x20000000U
27#define CAN_SFF_MASK 0x000007FFU
Elliott Hughes86ec05a2012-09-11 19:03:02 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesc95eb572013-01-29 18:15:55 -080029#define CAN_EFF_MASK 0x1FFFFFFFU
30#define CAN_ERR_MASK 0x1FFFFFFFU
Elliott Hughes86ec05a2012-09-11 19:03:02 -070031typedef __u32 canid_t;
32typedef __u32 can_err_mask_t;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34struct can_frame {
35 canid_t can_id;
36 __u8 can_dlc;
37 __u8 data[8] __attribute__((aligned(8)));
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39};
Elliott Hughesc95eb572013-01-29 18:15:55 -080040#define CAN_RAW 1
41#define CAN_BCM 2
42#define CAN_TP16 3
Elliott Hughes86ec05a2012-09-11 19:03:02 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesc95eb572013-01-29 18:15:55 -080044#define CAN_TP20 4
45#define CAN_MCNET 5
46#define CAN_ISOTP 6
Elliott Hughes86ec05a2012-09-11 19:03:02 -070047#define CAN_NPROTO 7
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define SOL_CAN_BASE 100
50struct sockaddr_can {
51 __kernel_sa_family_t can_family;
52 int can_ifindex;
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 union {
55 struct { canid_t rx_id, tx_id; } tp;
56 } can_addr;
57};
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59struct can_filter {
60 canid_t can_id;
61 canid_t can_mask;
62};
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesc95eb572013-01-29 18:15:55 -080064#define CAN_INV_FILTER 0x20000000U
Elliott Hughes86ec05a2012-09-11 19:03:02 -070065#endif