示例#1
0
int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group,
		struct nlmsghdr *nlh, gfp_t flags)
{
	int report = 0;

	if (nlh)
		report = nlmsg_report(nlh);

	return nlmsg_notify(rtnl, skb, pid, group, report, flags);
}
示例#2
0
/* This is analogous to rtnl_notify() but uses genl_sock instead of rtnl.
 *
 * This is not (yet) in any upstream kernel. */
void genl_notify(struct sk_buff *skb, struct net *net, u32 portid, u32 group,
		 struct nlmsghdr *nlh, gfp_t flags)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
	struct sock *sk = net->genl_sock;
#else
	struct sock *sk = genl_sock;
#endif
	int report = 0;

	if (nlh)
		report = nlmsg_report(nlh);

	nlmsg_notify(sk, skb, portid, group, report, flags);
}