Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
062b0aa3
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
062b0aa3
编写于
3月 30, 2010
作者:
S
Stefan Berger
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
A cosmetic change that makes the entries in the int-2-string maps look
more readable. Add some missing entries: ipv6 and icmpv6.
上级
0e0f6021
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
69 deletion
+28
-69
src/conf/nwfilter_conf.c
src/conf/nwfilter_conf.c
+28
-69
未找到文件。
src/conf/nwfilter_conf.c
浏览文件 @
062b0aa3
...
...
@@ -105,6 +105,9 @@ struct int_map {
const
char
*
val
;
};
#define INTMAP_ENTRY(ATT, VAL) { .attr = ATT, .val = VAL }
#define INTMAP_ENTRY_LAST { .val = NULL }
/*
* only one filter update allowed
...
...
@@ -388,18 +391,10 @@ struct _virXMLAttr2Struct
static
const
struct
int_map
macProtoMap
[]
=
{
{
.
attr
=
ETHERTYPE_ARP
,
.
val
=
"arp"
,
},
{
.
attr
=
ETHERTYPE_IP
,
.
val
=
"ipv4"
,
},
{
.
attr
=
ETHERTYPE_IPV6
,
.
val
=
"ipv6"
,
},
{
.
val
=
NULL
,
}
INTMAP_ENTRY
(
ETHERTYPE_ARP
,
"arp"
),
INTMAP_ENTRY
(
ETHERTYPE_IP
,
"ipv4"
),
INTMAP_ENTRY
(
ETHERTYPE_IPV6
,
"ipv6"
),
INTMAP_ENTRY_LAST
};
...
...
@@ -486,36 +481,16 @@ checkMACMask(enum attrDatatype datatype ATTRIBUTE_UNUSED,
* supported arp opcode -- see 'ebtables -h arp' for the naming
*/
static
const
struct
int_map
arpOpcodeMap
[]
=
{
{
.
attr
=
1
,
.
val
=
"Request"
,
}
,
{
.
attr
=
2
,
.
val
=
"Reply"
,
}
,
{
.
attr
=
3
,
.
val
=
"Request_Reverse"
,
}
,
{
.
attr
=
4
,
.
val
=
"Reply_Reverse"
,
}
,
{
.
attr
=
5
,
.
val
=
"DRARP_Request"
,
}
,
{
.
attr
=
6
,
.
val
=
"DRARP_Reply"
,
}
,
{
.
attr
=
7
,
.
val
=
"DRARP_Error"
,
}
,
{
.
attr
=
8
,
.
val
=
"InARP_Request"
,
}
,
{
.
attr
=
9
,
.
val
=
"ARP_NAK"
,
}
,
{
.
val
=
NULL
,
}
INTMAP_ENTRY
(
1
,
"Request"
),
INTMAP_ENTRY
(
2
,
"Reply"
),
INTMAP_ENTRY
(
3
,
"Request_Reverse"
),
INTMAP_ENTRY
(
4
,
"Reply_Reverse"
),
INTMAP_ENTRY
(
5
,
"DRARP_Request"
),
INTMAP_ENTRY
(
6
,
"DRARP_Reply"
),
INTMAP_ENTRY
(
7
,
"DRARP_Error"
),
INTMAP_ENTRY
(
8
,
"InARP_Request"
),
INTMAP_ENTRY
(
9
,
"ARP_NAK"
),
INTMAP_ENTRY_LAST
};
...
...
@@ -562,37 +537,21 @@ arpOpcodeFormatter(virBufferPtr buf,
static
const
struct
int_map
ipProtoMap
[]
=
{
{
.
attr
=
IPPROTO_TCP
,
.
val
=
"tcp"
,
}
,
{
.
attr
=
IPPROTO_UDP
,
.
val
=
"udp"
,
INTMAP_ENTRY
(
IPPROTO_TCP
,
"tcp"
),
INTMAP_ENTRY
(
IPPROTO_UDP
,
"udp"
),
#ifdef IPPROTO_UDPLITE
}
,
{
.
attr
=
IPPROTO_UDPLITE
,
.
val
=
"udplite"
,
INTMAP_ENTRY
(
IPPROTO_UDPLITE
,
"udplite"
),
#endif
}
,
{
.
attr
=
IPPROTO_ESP
,
.
val
=
"esp"
,
}
,
{
.
attr
=
IPPROTO_AH
,
.
val
=
"ah"
,
}
,
{
.
attr
=
IPPROTO_ICMP
,
.
val
=
"icmp"
,
}
,
{
.
attr
=
IPPROTO_IGMP
,
.
val
=
"igmp"
,
INTMAP_ENTRY
(
IPPROTO_ESP
,
"esp"
),
INTMAP_ENTRY
(
IPPROTO_AH
,
"ah"
),
INTMAP_ENTRY
(
IPPROTO_ICMP
,
"icmp"
),
INTMAP_ENTRY
(
IPPROTO_IGMP
,
"igmp"
),
#ifdef IPPROTO_SCTP
}
,
{
.
attr
=
IPPROTO_SCTP
,
.
val
=
"sctp"
,
INTMAP_ENTRY
(
IPPROTO_SCTP
,
"sctp"
),
#endif
}
,
{
.
val
=
NULL
,
}
INTMAP_ENTRY
(
IPPROTO_IPV6
,
"ipv6"
),
INTMAP_ENTRY
(
IPPROTO_ICMPV6
,
"icmpv6"
)
,
INTMAP_ENTRY_LAST
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录