wide-dhcp6c(3)
来源:互联网 发布:解析excel java 流模式 编辑:程序博客网 时间:2024/04/26 17:54
截止目前为止,还能够正常使用wide-dhcp6c。 原因,暂时找不到原因在哪里。 只有通过打印日志来看。 一直怀疑是配置文件出错了,但是也没看到过一个可以使用的配置文件,dhcp6c.conf. 都是example等等,附加e文和缩写。 虽然看过,也是很粗糙的理解其意思。
先修改一下cftoken.l,将yywrap在cfdebug_print函数之前补上,这样make clean ,再make的时候,就不用再生成的cftoken.c 里面加了。
int yywrap(){return 1;}static voidcfdebug_print(w, t, l)char *w, *t;int l;{if (w) {dprintf(LOG_DEBUG, FNAME, "<%d>%s [%s] (%d)", yy_start, w, t, l);} else {dprintf(LOG_DEBUG, FNAME, "<%d>[%s] (%d)", yy_start, t, l);}}
另外将YYDEBUG这个宏打开,设置为1。 同时将全局变量yydebug 也在最开始的地方赋值为1. 这样就可以看到过程中哪里分析错误了。
root@vc0718t-evm:/usrfs# ./dhcp6c -c ./dhcp6c.conf -Df eth0Jan/01/2000 06:11:10: get_duid: extracted an existing DUID from /usr/share/dhcp6c_duid: 00:01:00:01:00:00:3a:35:00:16:8e:a7:8c:f6Jan/01/2000 06:11:10: dhcp6_ctl_authinit: failed to open /usr/share/dhcp6cctlkey: No such file or directoryJan/01/2000 06:11:10: client6_init: failed initialize control message authentication282Jan/01/2000 06:11:10: client6_init: skip opening control port3755should !Starting parseno should !Entering state 0Reducing stack by rule 1 (line 149):-> $$ = nterm statements ()Stack now 0Entering state 1Reading a token: Next token is token INTERFACE ()Shifting token INTERFACE ()Entering state 3Reading a token: Next token is token IFNAME ()Shifting token IFNAME ()Entering state 20Reading a token: Next token is token BCL ()Shifting token BCL ()Entering state 40Reducing stack by rule 36 (line 486):-> $$ = nterm declarations ()Stack now 0 1 3 20 40Entering state 62Reading a token: Next token is token SEND ()Shifting token SEND ()Entering state 87Reading a token: Next token is token IA_NA ()Shifting token IA_NA ()Entering state 126Reading a token: Next token is token NUMBER ()Shifting token NUMBER ()Entering state 185Reducing stack by rule 55 (line 643): $1 = token IA_NA () $2 = token NUMBER ()-> $$ = nterm dhcpoption ()Stack now 0 1 3 20 40 62 87Entering state 142Reading a token: Next token is token EOS ()Reducing stack by rule 50 (line 605): $1 = nterm dhcpoption ()-> $$ = nterm dhcpoption_list ()Stack now 0 1 3 20 40 62 87Entering state 143Next token is token EOS ()Shifting token EOS ()Entering state 189Reducing stack by rule 38 (line 505): $1 = token SEND () $2 = nterm dhcpoption_list () $3 = token EOS ()-> $$ = nterm declaration ()Stack now 0 1 3 20 40 62Entering state 98Reducing stack by rule 37 (line 487): $1 = nterm declarations () $2 = nterm declaration ()-> $$ = nterm declarations ()Stack now 0 1 3 20 40Entering state 62Reading a token: Next token is token SEND ()Shifting token SEND ()Entering state 87Reading a token: Next token is token IA_PD ()Shifting token IA_PD ()Entering state 125Reading a token: Next token is token NUMBER ()Shifting token NUMBER ()Entering state 184Reducing stack by rule 54 (line 635): $1 = token IA_PD () $2 = token NUMBER ()-> $$ = nterm dhcpoption ()Stack now 0 1 3 20 40 62 87Entering state 142Reading a token: Next token is token EOS ()Reducing stack by rule 50 (line 605): $1 = nterm dhcpoption ()-> $$ = nterm dhcpoption_list ()Stack now 0 1 3 20 40 62 87Entering state 143Next token is token EOS ()Shifting token EOS ()Entering state 189Reducing stack by rule 38 (line 505): $1 = token SEND () $2 = nterm dhcpoption_list () $3 = token EOS ()-> $$ = nterm declaration ()Stack now 0 1 3 20 40 62Entering state 98Reducing stack by rule 37 (line 487): $1 = nterm declarations () $2 = nterm declaration ()-> $$ = nterm declarations ()Stack now 0 1 3 20 40Entering state 62Reading a token: Next token is token SEND ()Shifting token SEND ()Entering state 87Reading a token: Next token is token DNS_SERVERS ()Shifting token DNS_SERVERS ()Entering state 128Reducing stack by rule 58 (line 667): $1 = token DNS_SERVERS ()-> $$ = nterm dhcpoption ()Stack now 0 1 3 20 40 62 87Entering state 142Reading a token: Next token is token COMMA ()Shifting token COMMA ()Entering state 188Reading a token: Next token is token DNS_NAME ()Shifting token DNS_NAME ()Entering state 129Reducing stack by rule 59 (line 675): $1 = token DNS_NAME ()-> $$ = nterm dhcpoption ()Stack now 0 1 3 20 40 62 87 142 188Entering state 142Reading a token: Next token is token EOS ()Reducing stack by rule 50 (line 605): $1 = nterm dhcpoption ()-> $$ = nterm dhcpoption_list ()Stack now 0 1 3 20 40 62 87 142 188Entering state 215Reducing stack by rule 51 (line 609): $1 = nterm dhcpoption () $2 = token COMMA () $3 = nterm dhcpoption_list ()-> $$ = nterm dhcpoption_list ()Stack now 0 1 3 20 40 62 87Entering state 143Next token is token EOS ()Shifting token EOS ()Entering state 189Reducing stack by rule 38 (line 505): $1 = token SEND () $2 = nterm dhcpoption_list () $3 = token EOS ()-> $$ = nterm declaration ()Stack now 0 1 3 20 40 62Entering state 98Reducing stack by rule 37 (line 487): $1 = nterm declarations () $2 = nterm declaration ()-> $$ = nterm declarations ()Stack now 0 1 3 20 40Entering state 62Reading a token: Next token is token ECL ()Shifting token ECL ()Entering state 96Reading a token: Next token is token EOS ()Shifting token EOS ()Entering state 154Reducing stack by rule 11 (line 166): $1 = token INTERFACE () $2 = token IFNAME () $3 = token BCL () $4 = nterm declarations () $5 = token ECL () $6 = token EOS ()-> $$ = nterm interface_statement ()Stack now 0 1Entering state 12Reducing stack by rule 3 (line 155): $1 = nterm interface_statement ()-> $$ = nterm statement ()Stack now 0 1Entering state 11Reducing stack by rule 2 (line 151): $1 = nterm statements () $2 = nterm statement ()-> $$ = nterm statements ()Stack now 0Entering state 1Reading a token: Next token is token STRING ()Error: popping nterm statements ()Stack now 0Cleanup: discarding lookahead token STRING ()Stack now 0Jan/01/2000 06:11:10: main: failed to parse configuration file 230
执行程序后,可以看到貌似是 下一步的分析出错,reading a token: Next token is STRING(),看样子是这里分析文件出错了。
那么还是配置文件的问题。。。
待续
配置出来了,配置文件其实也很简单。e文不太好,看了半天很多的看了也似懂非懂的。
然后参考了
www.infradead.org/~tgr/libnl/
上面写的一大堆东西,也没看懂多少。
就是dhcp6c.conf简单的配置文件如下,原先的时候添加几个其他的配置信息,结果反而一大堆错误
interface eth0 {send ia-na 0;};id-assoc na{};然后从日志信息来看
Jan/01/2000 08:41:46: dhcp6_get_options: get DHCP option status code, len 2Jan/01/2000 08:41:46: status code: successJan/01/2000 08:41:46: dhcp6_get_options: get DHCP option DNS, len 16Jan/01/2000 08:41:46: dhcp6_get_options: get DHCP option SIP server address, len 64Jan/01/2000 08:41:46: dhcp6_get_options: get DHCP option NTP server, len 48Jan/01/2000 08:41:46: client6_recvreply: status code: successJan/01/2000 08:41:46: info_printf: nameserver[0] 2001:db8:3333::39cc:fe88:d094Jan/01/2000 08:41:46: info_printf: NTP server[0] 2000::200Jan/01/2000 08:41:46: info_printf: NTP server[1] 2000::201Jan/01/2000 08:41:46: info_printf: NTP server[2] 2000::202Jan/01/2000 08:41:46: info_printf: SIP server address[0] 2000::300Jan/01/2000 08:41:46: info_printf: SIP server address[1] 2000::302Jan/01/2000 08:41:46: info_printf: SIP server address[2] 2000::303Jan/01/2000 08:41:46: info_printf: SIP server address[3] 2000::304Jan/01/2000 08:41:46: get_ia: make an IA: NA-0Jan/01/2000 08:41:46: update_address: create an address 2001:db8:3333::39cc:0:1007 pltime=86400, vltime=86400Jan/01/2000 08:41:46: ifaddrconf: add an address 2001:db8:3333::39cc:0:1007/128 on eth0Jan/01/2000 08:41:46: dhcp6_remove_event: removing an event on eth0, state=REQUEST
以及敲击iconfig,地址都是配置上了。看来兜了好几天的空闲时间。这边用的 是美国netgear作为ipv6分配的服务器。 看样子是ok的 。。。。
阅读全文
0 0
- wide-dhcp6c(3)
- wide-dhcpv6的dhcp6c配置
- dhcp6c
- PROGRAMMING THE WORLD WIDE WEB Chapter 3 Cascading Style Sheets
- Wide.Angle.
- The World Wide Web
- System-Wide Windows Hooks
- Wide Area Networking Protocols
- HTTP: World Wide Web
- Format-Wide 帮助信息
- World Wide Web
- world-wide financial crisis
- 宽字符(wide char)
- Terminal too wide
- Multibyte and Wide Characters
- multi-byte wide-char
- The World Wide Web
- WIDE AREA NERWORKS(WANS)
- 通过web service查询天气
- Javascript学习笔记(数据类型)
- 关于将android项目打成第三方jar包两种情况
- 718. Maximum Length of Repeated Subarray
- c++:成员对象,基类初始化列表 接口与实现分离
- wide-dhcp6c(3)
- -Xmx10240m -Xms10240m -Xmn5120m -XXSurvivorRatio=3 中的意义
- 直接选择排序算法
- 剑指offer之java篇之空格替换(一)
- repo sync
- 用J-LINK的SWD模式下载程序
- 抽象类(abstract)和接口(interface)的区别
- Google Test单元测试框架(1)
- hive简易配置