| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 1 | +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * linux/can/core.h |
|---|
| 4 | 4 | * |
|---|
| 5 | | - * Protoypes and definitions for CAN protocol modules using the PF_CAN core |
|---|
| 5 | + * Prototypes and definitions for CAN protocol modules using the PF_CAN core |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> |
|---|
| 8 | 8 | * Urs Thuermann <urs.thuermann@volkswagen.de> |
|---|
| .. | .. |
|---|
| 17 | 17 | #include <linux/can.h> |
|---|
| 18 | 18 | #include <linux/skbuff.h> |
|---|
| 19 | 19 | #include <linux/netdevice.h> |
|---|
| 20 | | - |
|---|
| 21 | | -#define CAN_VERSION "20170425" |
|---|
| 22 | | - |
|---|
| 23 | | -/* increment this number each time you change some user-space interface */ |
|---|
| 24 | | -#define CAN_ABI_VERSION "9" |
|---|
| 25 | | - |
|---|
| 26 | | -#define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION |
|---|
| 27 | 20 | |
|---|
| 28 | 21 | #define DNAME(dev) ((dev) ? (dev)->name : "any") |
|---|
| 29 | 22 | |
|---|
| .. | .. |
|---|
| 41 | 34 | struct proto *prot; |
|---|
| 42 | 35 | }; |
|---|
| 43 | 36 | |
|---|
| 37 | +/* required_size |
|---|
| 38 | + * macro to find the minimum size of a struct |
|---|
| 39 | + * that includes a requested member |
|---|
| 40 | + */ |
|---|
| 41 | +#define CAN_REQUIRED_SIZE(struct_type, member) \ |
|---|
| 42 | + (offsetof(typeof(struct_type), member) + \ |
|---|
| 43 | + sizeof(((typeof(struct_type) *)(NULL))->member)) |
|---|
| 44 | + |
|---|
| 44 | 45 | /* function prototypes for the CAN networklayer core (af_can.c) */ |
|---|
| 45 | 46 | |
|---|
| 46 | 47 | extern int can_proto_register(const struct can_proto *cp); |
|---|
| .. | .. |
|---|
| 57 | 58 | void *data); |
|---|
| 58 | 59 | |
|---|
| 59 | 60 | extern int can_send(struct sk_buff *skb, int loop); |
|---|
| 60 | | -extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
|---|
| 61 | +void can_sock_destruct(struct sock *sk); |
|---|
| 61 | 62 | |
|---|
| 62 | 63 | #endif /* !_CAN_CORE_H */ |
|---|