LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 682|回复: 4

求助:在编译包含上面的代码的程序时老是通不过,提示如下

[复制链接]
发表于 2004-5-23 12:41:19 | 显示全部楼层 |阅读模式
static struct nf_hook_ops netdev_ops

={ { NULL,NULL },netdev_hook,PF_INET,NF_IP_LOCAL_OUT,NF_IP_PRI_FILTER-1};

在编译包含上面的代码的程序时老是通不过,提示如下:

variable `netdev_ops' has initializer but incomplete type
extra brace group at end of initializer
(near initialization for `netdev_ops')
warning: excess elements in struct initializer
warning: (near initialization for `netdev_ops')
发表于 2004-5-23 20:28:37 | 显示全部楼层
看看nf_hook_ops结构的定义。
 楼主| 发表于 2004-5-23 22:23:57 | 显示全部楼层
在/usr/src/linux-*/include/linux/netfilter.h
中这样定义的
struct nf_hook_ops
{
        struct list_head list;

        /* User fills in from here down. */
        nf_hookfn *hook;
        int pf;
        int hooknum;
        /* Hooks are ordered in ascending priority. */
        int priority;
};


但是在/usr/include/linux/netfilter.c
中却没有定义这个结构体,
我是新手,请指点一下,是否系统安装的有问题?
 楼主| 发表于 2004-5-24 09:52:12 | 显示全部楼层
请大大帮忙解答一下啦。
发表于 2004-5-24 19:44:19 | 显示全部楼层
我对内核不熟悉, 没有办法.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表