include: import header files from kernel v4.15-rc5
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>pull/63/merge
parent
6bbcf9d90c
commit
9a967265bc
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||||
/*
|
/*
|
||||||
* linux/can.h
|
* linux/can.h
|
||||||
*
|
*
|
||||||
|
|
@ -42,8 +43,8 @@
|
||||||
* DAMAGE.
|
* DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CAN_H
|
#ifndef _UAPI_CAN_H
|
||||||
#define CAN_H
|
#define _UAPI_CAN_H
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/socket.h>
|
#include <linux/socket.h>
|
||||||
|
|
@ -95,11 +96,17 @@ typedef __u32 can_err_mask_t;
|
||||||
* @can_dlc: frame payload length in byte (0 .. 8) aka data length code
|
* @can_dlc: frame payload length in byte (0 .. 8) aka data length code
|
||||||
* N.B. the DLC field from ISO 11898-1 Chapter 8.4.2.3 has a 1:1
|
* N.B. the DLC field from ISO 11898-1 Chapter 8.4.2.3 has a 1:1
|
||||||
* mapping of the 'data length code' to the real payload length
|
* mapping of the 'data length code' to the real payload length
|
||||||
|
* @__pad: padding
|
||||||
|
* @__res0: reserved / padding
|
||||||
|
* @__res1: reserved / padding
|
||||||
* @data: CAN frame payload (up to 8 byte)
|
* @data: CAN frame payload (up to 8 byte)
|
||||||
*/
|
*/
|
||||||
struct can_frame {
|
struct can_frame {
|
||||||
canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
|
canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
|
||||||
__u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */
|
__u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */
|
||||||
|
__u8 __pad; /* padding */
|
||||||
|
__u8 __res0; /* reserved / padding */
|
||||||
|
__u8 __res1; /* reserved / padding */
|
||||||
__u8 data[CAN_MAX_DLEN] __attribute__((aligned(8)));
|
__u8 data[CAN_MAX_DLEN] __attribute__((aligned(8)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -173,7 +180,10 @@ struct sockaddr_can {
|
||||||
int can_ifindex;
|
int can_ifindex;
|
||||||
union {
|
union {
|
||||||
/* transport protocol class address information (e.g. ISOTP) */
|
/* transport protocol class address information (e.g. ISOTP) */
|
||||||
struct { canid_t rx_id, tx_id; } tp;
|
struct {
|
||||||
|
canid_t rx_id;
|
||||||
|
canid_t tx_id;
|
||||||
|
} tp;
|
||||||
|
|
||||||
/* reserved for future CAN protocols address information */
|
/* reserved for future CAN protocols address information */
|
||||||
} can_addr;
|
} can_addr;
|
||||||
|
|
@ -198,5 +208,6 @@ struct can_filter {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
|
#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
|
||||||
|
#define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */
|
||||||
|
|
||||||
#endif /* CAN_H */
|
#endif /* !_UAPI_CAN_H */
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||||
/*
|
/*
|
||||||
* linux/can/bcm.h
|
* linux/can/bcm.h
|
||||||
*
|
*
|
||||||
|
|
@ -41,8 +42,8 @@
|
||||||
* DAMAGE.
|
* DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CAN_BCM_H
|
#ifndef _UAPI_CAN_BCM_H
|
||||||
#define CAN_BCM_H
|
#define _UAPI_CAN_BCM_H
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/can.h>
|
#include <linux/can.h>
|
||||||
|
|
@ -101,4 +102,4 @@ enum {
|
||||||
#define RX_RTR_FRAME 0x0400
|
#define RX_RTR_FRAME 0x0400
|
||||||
#define CAN_FD_FRAME 0x0800
|
#define CAN_FD_FRAME 0x0800
|
||||||
|
|
||||||
#endif /* CAN_BCM_H */
|
#endif /* !_UAPI_CAN_BCM_H */
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||||
/*
|
/*
|
||||||
* linux/can/error.h
|
* linux/can/error.h
|
||||||
*
|
*
|
||||||
|
|
@ -41,8 +42,8 @@
|
||||||
* DAMAGE.
|
* DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CAN_ERROR_H
|
#ifndef _UAPI_CAN_ERROR_H
|
||||||
#define CAN_ERROR_H
|
#define _UAPI_CAN_ERROR_H
|
||||||
|
|
||||||
#define CAN_ERR_DLC 8 /* dlc for error message frames */
|
#define CAN_ERR_DLC 8 /* dlc for error message frames */
|
||||||
|
|
||||||
|
|
@ -71,6 +72,7 @@
|
||||||
#define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */
|
#define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */
|
||||||
/* (at least one error counter exceeds */
|
/* (at least one error counter exceeds */
|
||||||
/* the protocol-defined level of 127) */
|
/* the protocol-defined level of 127) */
|
||||||
|
#define CAN_ERR_CRTL_ACTIVE 0x40 /* recovered to error active state */
|
||||||
|
|
||||||
/* error in CAN protocol (type) / data[2] */
|
/* error in CAN protocol (type) / data[2] */
|
||||||
#define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */
|
#define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */
|
||||||
|
|
@ -120,4 +122,4 @@
|
||||||
|
|
||||||
/* controller specific additional information / data[5..7] */
|
/* controller specific additional information / data[5..7] */
|
||||||
|
|
||||||
#endif /* CAN_ERROR_H */
|
#endif /* _UAPI_CAN_ERROR_H */
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||||
/*
|
/*
|
||||||
* linux/can/gw.h
|
* linux/can/gw.h
|
||||||
*
|
*
|
||||||
|
|
@ -41,8 +42,8 @@
|
||||||
* DAMAGE.
|
* DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CAN_GW_H
|
#ifndef _UAPI_CAN_GW_H
|
||||||
#define CAN_GW_H
|
#define _UAPI_CAN_GW_H
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/can.h>
|
#include <linux/can.h>
|
||||||
|
|
@ -205,4 +206,4 @@ enum {
|
||||||
* Beware of sending unpacked or aligned structs!
|
* Beware of sending unpacked or aligned structs!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif
|
#endif /* !_UAPI_CAN_GW_H */
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
/*
|
/*
|
||||||
* linux/can/netlink.h
|
* linux/can/netlink.h
|
||||||
*
|
*
|
||||||
|
|
@ -15,8 +16,8 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CAN_NETLINK_H
|
#ifndef _UAPI_CAN_NETLINK_H
|
||||||
#define CAN_NETLINK_H
|
#define _UAPI_CAN_NETLINK_H
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
|
|
@ -96,6 +97,9 @@ struct can_ctrlmode {
|
||||||
#define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */
|
#define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */
|
||||||
#define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */
|
#define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */
|
||||||
#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
|
#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
|
||||||
|
#define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */
|
||||||
|
#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */
|
||||||
|
#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CAN device statistics
|
* CAN device statistics
|
||||||
|
|
@ -122,9 +126,18 @@ enum {
|
||||||
IFLA_CAN_RESTART_MS,
|
IFLA_CAN_RESTART_MS,
|
||||||
IFLA_CAN_RESTART,
|
IFLA_CAN_RESTART,
|
||||||
IFLA_CAN_BERR_COUNTER,
|
IFLA_CAN_BERR_COUNTER,
|
||||||
|
IFLA_CAN_DATA_BITTIMING,
|
||||||
|
IFLA_CAN_DATA_BITTIMING_CONST,
|
||||||
|
IFLA_CAN_TERMINATION,
|
||||||
|
IFLA_CAN_TERMINATION_CONST,
|
||||||
|
IFLA_CAN_BITRATE_CONST,
|
||||||
|
IFLA_CAN_DATA_BITRATE_CONST,
|
||||||
__IFLA_CAN_MAX
|
__IFLA_CAN_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1)
|
#define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1)
|
||||||
|
|
||||||
#endif /* CAN_NETLINK_H */
|
/* u16 termination range: 1..65535 Ohms */
|
||||||
|
#define CAN_TERMINATION_DISABLED 0
|
||||||
|
|
||||||
|
#endif /* !_UAPI_CAN_NETLINK_H */
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
||||||
/*
|
/*
|
||||||
* linux/can/raw.h
|
* linux/can/raw.h
|
||||||
*
|
*
|
||||||
|
|
@ -42,8 +43,8 @@
|
||||||
* DAMAGE.
|
* DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CAN_RAW_H
|
#ifndef _UAPI_CAN_RAW_H
|
||||||
#define CAN_RAW_H
|
#define _UAPI_CAN_RAW_H
|
||||||
|
|
||||||
#include <linux/can.h>
|
#include <linux/can.h>
|
||||||
|
|
||||||
|
|
@ -60,4 +61,4 @@ enum {
|
||||||
CAN_RAW_JOIN_FILTERS, /* all filters must match to trigger */
|
CAN_RAW_JOIN_FILTERS, /* all filters must match to trigger */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif /* !_UAPI_CAN_RAW_H */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||||
|
#ifndef _UAPI_CAN_VXCAN_H
|
||||||
|
#define _UAPI_CAN_VXCAN_H
|
||||||
|
|
||||||
|
enum {
|
||||||
|
VXCAN_INFO_UNSPEC,
|
||||||
|
VXCAN_INFO_PEER,
|
||||||
|
|
||||||
|
__VXCAN_INFO_MAX
|
||||||
|
#define VXCAN_INFO_MAX (__VXCAN_INFO_MAX - 1)
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue