include/linux/mroute6.h

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

File Facts

System
Linux kernel
Corpus path
include/linux/mroute6.h
Extension
.h
Size
3204 bytes
Lines
148
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mfc6_cache_cmp_arg {
	struct in6_addr mf6c_mcastgrp;
	struct in6_addr mf6c_origin;
};

struct mfc6_cache {
	struct mr_mfc _c;
	union {
		struct {
			struct in6_addr mf6c_mcastgrp;
			struct in6_addr mf6c_origin;
		};
		struct mfc6_cache_cmp_arg cmparg;
	};
};

#define MFC_ASSERT_THRESH (3*HZ)		/* Maximal freq. of asserts */

struct rtmsg;
extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
			   struct rtmsg *rtm, u32 portid);

#ifdef CONFIG_IPV6_MROUTE
bool mroute6_is_socket(struct net *net, struct sk_buff *skb);
extern int ip6mr_sk_done(struct sock *sk);
static inline int ip6mr_sk_ioctl(struct sock *sk, unsigned int cmd,
				 void __user *arg)
{
	switch (cmd) {
	/* These userspace buffers will be consumed by ip6mr_ioctl() */
	case SIOCGETMIFCNT_IN6: {
		struct sioc_mif_req6 buffer;

		return sock_ioctl_inout(sk, cmd, arg, &buffer,
					sizeof(buffer));
		}
	case SIOCGETSGCNT_IN6: {
		struct sioc_sg_req6 buffer;

		return sock_ioctl_inout(sk, cmd, arg, &buffer,
					sizeof(buffer));
		}
	}

	return 1;
}
#else
static inline bool mroute6_is_socket(struct net *net, struct sk_buff *skb)
{
	return false;
}
static inline int ip6mr_sk_done(struct sock *sk)
{
	return 0;
}

static inline int ip6mr_sk_ioctl(struct sock *sk, unsigned int cmd,
				 void __user *arg)
{
	return 1;
}
#endif
#endif

Annotation

Implementation Notes