~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/can/core.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
  2 /*
  3  * linux/can/core.h
  4  *
  5  * Prototypes and definitions for CAN protocol modules using the PF_CAN core
  6  *
  7  * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
  8  *          Urs Thuermann   <urs.thuermann@volkswagen.de>
  9  * Copyright (c) 2002-2017 Volkswagen Group Electronic Research
 10  * All rights reserved.
 11  *
 12  */
 13 
 14 #ifndef _CAN_CORE_H
 15 #define _CAN_CORE_H
 16 
 17 #include <linux/can.h>
 18 #include <linux/skbuff.h>
 19 #include <linux/netdevice.h>
 20 
 21 #define DNAME(dev) ((dev) ? (dev)->name : "any")
 22 
 23 /**
 24  * struct can_proto - CAN protocol structure
 25  * @type:       type argument in socket() syscall, e.g. SOCK_DGRAM.
 26  * @protocol:   protocol number in socket() syscall.
 27  * @ops:        pointer to struct proto_ops for sock->ops.
 28  * @prot:       pointer to struct proto structure.
 29  */
 30 struct can_proto {
 31         int type;
 32         int protocol;
 33         const struct proto_ops *ops;
 34         struct proto *prot;
 35 };
 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 
 45 /* function prototypes for the CAN networklayer core (af_can.c) */
 46 
 47 extern int  can_proto_register(const struct can_proto *cp);
 48 extern void can_proto_unregister(const struct can_proto *cp);
 49 
 50 int can_rx_register(struct net *net, struct net_device *dev,
 51                     canid_t can_id, canid_t mask,
 52                     void (*func)(struct sk_buff *, void *),
 53                     void *data, char *ident, struct sock *sk);
 54 
 55 extern void can_rx_unregister(struct net *net, struct net_device *dev,
 56                               canid_t can_id, canid_t mask,
 57                               void (*func)(struct sk_buff *, void *),
 58                               void *data);
 59 
 60 extern int can_send(struct sk_buff *skb, int loop);
 61 void can_sock_destruct(struct sock *sk);
 62 
 63 #endif /* !_CAN_CORE_H */
 64 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php