4 * Protoypes and definitions for CAN protocol modules using the PF_CAN core
8 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
18 #include <linux/can.h>
19 #include <linux/skbuff.h>
20 #include <linux/netdevice.h>
22 #define CAN_VERSION "20090105"
24 /* increment this number each time you change some user-space interface */
25 #define CAN_ABI_VERSION "8"
27 #define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION
29 #define DNAME(dev) ((dev) ? (dev)->name : "any")
32 * struct can_proto - CAN protocol structure
33 * @type: type argument in socket() syscall, e.g. SOCK_DGRAM.
34 * @protocol: protocol number in socket() syscall.
35 * @ops: pointer to struct proto_ops for sock->ops.
36 * @prot: pointer to struct proto structure.
41 const struct proto_ops *ops;
45 /* function prototypes for the CAN networklayer core (af_can.c) */
47 extern int can_proto_register(const struct can_proto *cp);
48 extern void can_proto_unregister(const struct can_proto *cp);
50 extern int can_rx_register(struct net_device *dev, canid_t can_id,
52 void (*func)(struct sk_buff *, void *),
53 void *data, char *ident);
55 extern void can_rx_unregister(struct net_device *dev, canid_t can_id,
57 void (*func)(struct sk_buff *, void *),
60 extern int can_send(struct sk_buff *skb, int loop);
61 extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
63 #endif /* CAN_CORE_H */