include/net/mctpdevice.h

Source file repositories/reference/linux-study-clean/include/net/mctpdevice.h

File Facts

System
Linux kernel
Corpus path
include/net/mctpdevice.h
Extension
.h
Size
1363 bytes
Lines
59
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: implementation source
Status
source implementation candidate

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mctp_dev {
	struct net_device	*dev;

	refcount_t		refs;

	unsigned int		net;
	enum mctp_phys_binding	binding;

	const struct mctp_netdev_ops *ops;

	/* Only modified under RTNL. Reads have addrs_lock held */
	u8			*addrs;
	size_t			num_addrs;
	spinlock_t		addrs_lock;

	struct rcu_head		rcu;
};

struct mctp_netdev_ops {
	void			(*release_flow)(struct mctp_dev *dev,
						struct mctp_sk_key *key);
};

#define MCTP_INITIAL_DEFAULT_NET	1

struct mctp_dev *mctp_dev_get_rtnl(const struct net_device *dev);
struct mctp_dev *__mctp_dev_get(const struct net_device *dev);

int mctp_register_netdev(struct net_device *dev,
			 const struct mctp_netdev_ops *ops,
			 enum mctp_phys_binding binding);
void mctp_unregister_netdev(struct net_device *dev);

void mctp_dev_hold(struct mctp_dev *mdev);
void mctp_dev_put(struct mctp_dev *mdev);

void mctp_dev_set_key(struct mctp_dev *dev, struct mctp_sk_key *key);
void mctp_dev_release_key(struct mctp_dev *dev, struct mctp_sk_key *key);

#endif /* __NET_MCTPDEVICE_H */

Annotation

Implementation Notes