#include <linux/compat.h>
#include <linux/if_arp.h>
#include <linux/net.h>
#include <linux/mctp.h>
#include <linux/module.h>
#include <linux/socket.h>
#include <net/mctp.h>
#include <net/mctpdevice.h>
#include <net/sock.h>
#define CREATE_TRACE_POINTS
#include <trace/events/mctp.h>
static void mctp_sk_expire_keys(struct timer_list *timer);
static int mctp_release(struct socket *sock)
{ … }
static bool mctp_sockaddr_is_ok(const struct sockaddr_mctp *addr)
{ … }
static bool mctp_sockaddr_ext_is_ok(const struct sockaddr_mctp_ext *addr)
{ … }
static int mctp_bind(struct socket *sock, struct sockaddr *addr, int addrlen)
{ … }
static int mctp_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
{ … }
static int mctp_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
int flags)
{ … }
static void __mctp_key_remove(struct mctp_sk_key *key, struct net *net,
unsigned long flags, unsigned long reason)
__releases(&key->lock)
__must_hold(&net->mctp.keys_lock)
{ … }
static int mctp_setsockopt(struct socket *sock, int level, int optname,
sockptr_t optval, unsigned int optlen)
{ … }
static int mctp_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{ … }
static int mctp_ioctl_tag_copy_from_user(unsigned long arg,
struct mctp_ioc_tag_ctl2 *ctl,
bool tagv2)
{ … }
static int mctp_ioctl_tag_copy_to_user(unsigned long arg,
struct mctp_ioc_tag_ctl2 *ctl,
bool tagv2)
{ … }
static int mctp_ioctl_alloctag(struct mctp_sock *msk, bool tagv2,
unsigned long arg)
{ … }
static int mctp_ioctl_droptag(struct mctp_sock *msk, bool tagv2,
unsigned long arg)
{ … }
static int mctp_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{ … }
#ifdef CONFIG_COMPAT
static int mctp_compat_ioctl(struct socket *sock, unsigned int cmd,
unsigned long arg)
{ … }
#endif
static const struct proto_ops mctp_dgram_ops = …;
static void mctp_sk_expire_keys(struct timer_list *timer)
{ … }
static int mctp_sk_init(struct sock *sk)
{ … }
static void mctp_sk_close(struct sock *sk, long timeout)
{ … }
static int mctp_sk_hash(struct sock *sk)
{ … }
static void mctp_sk_unhash(struct sock *sk)
{ … }
static void mctp_sk_destruct(struct sock *sk)
{ … }
static struct proto mctp_proto = …;
static int mctp_pf_create(struct net *net, struct socket *sock,
int protocol, int kern)
{ … }
static struct net_proto_family mctp_pf = …;
static __init int mctp_init(void)
{ … }
static __exit void mctp_exit(void)
{ … }
subsys_initcall(mctp_init);
module_exit(mctp_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_ALIAS_NETPROTO(…);