Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Achou.Wang
accel-ppp
提交
91952064
A
accel-ppp
项目概览
Achou.Wang
/
accel-ppp
通知
6
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
accel-ppp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
91952064
编写于
5月 12, 2016
作者:
V
Vladislav Grishenko
提交者:
Dmitry Kozlov
12月 05, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ipv6: dhcpv6: fix Vendor-Class, Vendor-Specific and Interface-ID options print parsing
上级
66f63b92
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
9 deletion
+13
-9
accel-pppd/ipv6/dhcpv6_packet.c
accel-pppd/ipv6/dhcpv6_packet.c
+13
-9
未找到文件。
accel-pppd/ipv6/dhcpv6_packet.c
浏览文件 @
91952064
...
...
@@ -22,12 +22,12 @@ static void print_ia_na(struct dhcpv6_option *opt, void (*print)(const char *fmt
static
void
print_ia_ta
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_ia_addr
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_oro
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_hex_array
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_uint8
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_time
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_ipv6addr
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_ipv6addr_array
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_status
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_uint64
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_reconf
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_dnssl
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
static
void
print_ia_prefix
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...));
...
...
@@ -47,9 +47,9 @@ static struct dict_option known_options[] = {
{
D6_OPTION_STATUS_CODE
,
"Status"
,
0
,
0
,
print_status
},
{
D6_OPTION_RAPID_COMMIT
,
"Rapid-Commit"
,
1
,
0
},
{
D6_OPTION_USER_CLASS
,
"User-Class"
,
1
,
0
},
{
D6_OPTION_VENDOR_CLASS
,
"Vendor-Class"
,
1
,
0
,
print_
uint64
},
{
D6_OPTION_VENDOR_SPECIFIC
,
"Vendor-Specific"
,
1
,
0
,
print_
uint64
},
{
D6_OPTION_INTERFACE_ID
,
"Interface-ID"
,
1
,
0
,
print_
uint64
},
{
D6_OPTION_VENDOR_CLASS
,
"Vendor-Class"
,
1
,
0
,
print_
hex_array
},
{
D6_OPTION_VENDOR_SPECIFIC
,
"Vendor-Specific"
,
1
,
0
,
print_
hex_array
},
{
D6_OPTION_INTERFACE_ID
,
"Interface-ID"
,
1
,
0
,
print_
hex_array
},
{
D6_OPTION_RECONF_MSG
,
"Reconfigure"
,
0
,
0
,
print_reconf
},
{
D6_OPTION_RECONF_ACCEPT
,
"Reconfigure-Accept"
,
1
,
0
},
{
D6_OPTION_DNS_SERVERS
,
"DNS"
,
1
,
0
,
print_ipv6addr_array
},
...
...
@@ -375,6 +375,15 @@ static void print_oro(struct dhcpv6_option *opt, void (*print)(const char *fmt,
}
}
static
void
print_hex_array
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...))
{
int
i
;
print
(
" "
);
for
(
i
=
0
;
i
<
ntohs
(
opt
->
hdr
->
len
);
i
++
)
print
(
"%02x"
,
opt
->
hdr
->
data
[
i
]);
}
static
void
print_uint8
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...))
{
print
(
" %i"
,
*
(
uint8_t
*
)
opt
->
hdr
->
data
);
...
...
@@ -427,11 +436,6 @@ static void print_status(struct dhcpv6_option *opt, void (*print)(const char *fm
print
(
" %s"
,
status_name
[
ntohs
(
o
->
code
)]);
}
static
void
print_uint64
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...))
{
print
(
" %llu"
,
*
(
uint64_t
*
)
opt
->
hdr
->
data
);
}
static
void
print_reconf
(
struct
dhcpv6_option
*
opt
,
void
(
*
print
)(
const
char
*
fmt
,
...))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录