linux/net/mctp/neigh.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Management Component Transport Protocol (MCTP) - routing
 * implementation.
 *
 * This is currently based on a simple routing table, with no dst cache. The
 * number of routes should stay fairly small, so the lookup cost is small.
 *
 * Copyright (c) 2021 Code Construct
 * Copyright (c) 2021 Google
 */

#include <linux/idr.h>
#include <linux/mctp.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
#include <linux/skbuff.h>

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

static int mctp_neigh_add(struct mctp_dev *mdev, mctp_eid_t eid,
			  enum mctp_neigh_source source,
			  size_t lladdr_len, const void *lladdr)
{}

static void __mctp_neigh_free(struct rcu_head *rcu)
{}

/* Removes all neighbour entries referring to a device */
void mctp_neigh_remove_dev(struct mctp_dev *mdev)
{}

static int mctp_neigh_remove(struct mctp_dev *mdev, mctp_eid_t eid,
			     enum mctp_neigh_source source)
{}

static const struct nla_policy nd_mctp_policy[NDA_MAX + 1] =;

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

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

static int mctp_fill_neigh(struct sk_buff *skb, u32 portid, u32 seq, int event,
			   unsigned int flags, struct mctp_neigh *neigh)
{}

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

int mctp_neigh_lookup(struct mctp_dev *mdev, mctp_eid_t eid, void *ret_hwaddr)
{}

/* namespace registration */
static int __net_init mctp_neigh_net_init(struct net *net)
{}

static void __net_exit mctp_neigh_net_exit(struct net *net)
{}

/* net namespace implementation */

static struct pernet_operations mctp_net_ops =;

int __init mctp_neigh_init(void)
{}

void __exit mctp_neigh_exit(void)
{}