linux/net/mctp/device.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Management Component Transport Protocol (MCTP) - device implementation.
 *
 * Copyright (c) 2021 Code Construct
 * Copyright (c) 2021 Google
 */

#include <linux/if_arp.h>
#include <linux/if_link.h>
#include <linux/mctp.h>
#include <linux/netdevice.h>
#include <linux/rcupdate.h>
#include <linux/rtnetlink.h>

#include <net/addrconf.h>
#include <net/netlink.h>
#include <net/mctp.h>
#include <net/mctpdevice.h>
#include <net/sock.h>

struct mctp_dump_cb {};

/* unlocked: caller must hold rcu_read_lock.
 * Returned mctp_dev has its refcount incremented, or NULL if unset.
 */
struct mctp_dev *__mctp_dev_get(const struct net_device *dev)
{}

/* Returned mctp_dev does not have refcount incremented. The returned pointer
 * remains live while rtnl_lock is held, as that prevents mctp_unregister()
 */
struct mctp_dev *mctp_dev_get_rtnl(const struct net_device *dev)
{}

static int mctp_addrinfo_size(void)
{}

/* flag should be NLM_F_MULTI for dump calls */
static int mctp_fill_addrinfo(struct sk_buff *skb,
			      struct mctp_dev *mdev, mctp_eid_t eid,
			      int msg_type, u32 portid, u32 seq, int flag)
{}

static int mctp_dump_dev_addrinfo(struct mctp_dev *mdev, struct sk_buff *skb,
				  struct netlink_callback *cb)
{}

static int mctp_dump_addrinfo(struct sk_buff *skb, struct netlink_callback *cb)
{}

static void mctp_addr_notify(struct mctp_dev *mdev, mctp_eid_t eid, int msg_type,
			     struct sk_buff *req_skb, struct nlmsghdr *req_nlh)
{}

static const struct nla_policy ifa_mctp_policy[IFA_MAX + 1] =;

static int mctp_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh,
			    struct netlink_ext_ack *extack)
{}

static int mctp_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh,
			    struct netlink_ext_ack *extack)
{}

void mctp_dev_hold(struct mctp_dev *mdev)
{}

void mctp_dev_put(struct mctp_dev *mdev)
{}

void mctp_dev_release_key(struct mctp_dev *dev, struct mctp_sk_key *key)
	__must_hold(&key->lock)
{}

void mctp_dev_set_key(struct mctp_dev *dev, struct mctp_sk_key *key)
	__must_hold(&key->lock)
{}

static struct mctp_dev *mctp_add_dev(struct net_device *dev)
{}

static int mctp_fill_link_af(struct sk_buff *skb,
			     const struct net_device *dev, u32 ext_filter_mask)
{}

static size_t mctp_get_link_af_size(const struct net_device *dev,
				    u32 ext_filter_mask)
{}

static const struct nla_policy ifla_af_mctp_policy[IFLA_MCTP_MAX + 1] =;

static int mctp_set_link_af(struct net_device *dev, const struct nlattr *attr,
			    struct netlink_ext_ack *extack)
{}

/* Matches netdev types that should have MCTP handling */
static bool mctp_known(struct net_device *dev)
{}

static void mctp_unregister(struct net_device *dev)
{}

static int mctp_register(struct net_device *dev)
{}

static int mctp_dev_notify(struct notifier_block *this, unsigned long event,
			   void *ptr)
{}

static int mctp_register_netdevice(struct net_device *dev,
				   const struct mctp_netdev_ops *ops)
{}

int mctp_register_netdev(struct net_device *dev,
			 const struct mctp_netdev_ops *ops)
{}
EXPORT_SYMBOL_GPL();

void mctp_unregister_netdev(struct net_device *dev)
{}
EXPORT_SYMBOL_GPL();

static struct rtnl_af_ops mctp_af_ops =;

static struct notifier_block mctp_dev_nb =;

void __init mctp_device_init(void)
{}

void __exit mctp_device_exit(void)
{}