#include <linux/module.h>
#include <linux/init.h>
#include <linux/uio.h>
#include <linux/net.h>
#include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/socket.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <linux/can.h>
#include <linux/can/core.h>
#include <linux/can/dev.h>
#include <linux/can/skb.h>
#include <linux/can/raw.h>
#include <net/sock.h>
#include <net/net_namespace.h>
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_ALIAS(…) …;
#define RAW_MIN_NAMELEN …
#define MASK_ALL …
struct uniqframe { … };
struct raw_sock { … };
static LIST_HEAD(raw_notifier_list);
static DEFINE_SPINLOCK(raw_notifier_lock);
static struct raw_sock *raw_busy_notifier;
static inline unsigned int *raw_flags(struct sk_buff *skb)
{ … }
static inline struct raw_sock *raw_sk(const struct sock *sk)
{ … }
static void raw_rcv(struct sk_buff *oskb, void *data)
{ … }
static int raw_enable_filters(struct net *net, struct net_device *dev,
struct sock *sk, struct can_filter *filter,
int count)
{ … }
static int raw_enable_errfilter(struct net *net, struct net_device *dev,
struct sock *sk, can_err_mask_t err_mask)
{ … }
static void raw_disable_filters(struct net *net, struct net_device *dev,
struct sock *sk, struct can_filter *filter,
int count)
{ … }
static inline void raw_disable_errfilter(struct net *net,
struct net_device *dev,
struct sock *sk,
can_err_mask_t err_mask)
{ … }
static inline void raw_disable_allfilters(struct net *net,
struct net_device *dev,
struct sock *sk)
{ … }
static int raw_enable_allfilters(struct net *net, struct net_device *dev,
struct sock *sk)
{ … }
static void raw_notify(struct raw_sock *ro, unsigned long msg,
struct net_device *dev)
{ … }
static int raw_notifier(struct notifier_block *nb, unsigned long msg,
void *ptr)
{ … }
static int raw_init(struct sock *sk)
{ … }
static int raw_release(struct socket *sock)
{ … }
static int raw_bind(struct socket *sock, struct sockaddr *uaddr, int len)
{ … }
static int raw_getname(struct socket *sock, struct sockaddr *uaddr,
int peer)
{ … }
static int raw_setsockopt(struct socket *sock, int level, int optname,
sockptr_t optval, unsigned int optlen)
{ … }
static int raw_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{ … }
static void raw_put_canxl_vcid(struct raw_sock *ro, struct sk_buff *skb)
{ … }
static unsigned int raw_check_txframe(struct raw_sock *ro, struct sk_buff *skb, int mtu)
{ … }
static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
{ … }
static int raw_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
int flags)
{ … }
static int raw_sock_no_ioctlcmd(struct socket *sock, unsigned int cmd,
unsigned long arg)
{ … }
static const struct proto_ops raw_ops = …;
static struct proto raw_proto __read_mostly = …;
static const struct can_proto raw_can_proto = …;
static struct notifier_block canraw_notifier = …;
static __init int raw_module_init(void)
{ … }
static __exit void raw_module_exit(void)
{ … }
module_init(…) …;
module_exit(raw_module_exit);