struct netlink_skb_parms
来源:互联网 发布:淘宝后台管理系统 编辑:程序博客网 时间:2024/06/14 06:39
struct netlink_skb_parms {
struct scm_creds creds; /* Skb credentials */
__u32 portid;
__u32 dst_group;
__u32 flags;
struct sock *sk;
bool nsid_is_set;
int nsid;
};
#define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb))
#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
##############################################################
NETLINK_CB(skb).creds.pid
##############################################################
struct netlink_kernel_cfg cfg = {
.input = sample_input,
};
static int init_netlink(void)
{
//nl_sk = netlink_kernel_create(&init_net, NETLINK_SAMPLE, 0, sample_input, NULL, THIS_MODULE);
nl_sk = netlink_kernel_create(&init_net, NETLINK_SAMPLE, &cfg);
if (!nl_sk)
{
printk("net_link: Cannot create netlink socket.\n");
return -EIO;
}
printk("net_link: create socket ok.\n");
return 0;
}
- struct netlink_skb_parms
- Struct
- struct
- struct
- struct
- Struct
- struct
- struct
- struct
- struct
- struct
- struct
- struct
- struct
- struct
- struct
- struct
- struct
- 20171202日记账流水
- 1028. 人口普查(20) PAT乙级真题
- Rhyme/Spring 1.2.3. Using the container 容器的使用
- spice源码解析之qemu-2.9.1/vl.c
- solr7-安装教程
- struct netlink_skb_parms
- 微信小程序上线时加载运行环境失败
- Using a URDF in Gazebo
- Web集群与负载均衡服务实现
- 算法训练 9-7链表数据求和操作
- itop4412 uboot 学习详细记录(一丶Exynos4412 的启动)
- WEB页面_批量操作提交数据(批量删除)
- C++类库开发
- leetCode-Subsets