我有一个连接到我的网络的Java应用程序。我正在尝试将消息发送回网络中的节点(以建立会话密钥),但是当Java应用程序中的某个线程启动tunslip6时,不会向网络发送任何消息(使用ping6进行测试)。 / p>
什么有用:
通过命令行启动tunslip6并通过命令行ping节点:
sudo ../../contiki/tools/tunslip6 -s /dev/ttyUSB0 aaaa::1/64 -v5
********SLIP started on ``/dev/ttyUSB0''
opened tun device ``/dev/tun0''
ifconfig tun0 inet `hostname` mtu 1500 up
ifconfig tun0 add aaaa::1/64
ifconfig tun0 add fe80::0:0:0:1/64
ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.1.1 P-t-P:127.0.1.1 Mask:255.255.255.255
inet6 addr: aaaa::1/64 Scope:Global
inet6 addr: fe80::8c0d:d6ad:7ead:ef16/64 Scope:Link
inet6 addr: fe80::1/64 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
*** Address:aaaa::1 => aaaa:0000:0000:0000
Got configuration message of type P
Setting prefix aaaa::
Server IPv6 addresses:
aaaa::212:4b00:615:a4a4
fe80::212:4b00:615:a4a4
然后我可以ping aaaa :: 212:4b00:615:a4a4并访问浏览器中的邻居列表。
什么行不通:
产生启动tunslip6的线程(带有Java项目)成功:
ifconfig tun0 inet `hostname` mtu 1500 up
ifconfig tun0 add aaaa:1/64
ifconfig tun0 add fe80::0:0:0:1/64
ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.1.1 P-t-P:127.0.1.1 Mask:255.255.255.255
inet6 addr: fe80::1/64 Scope:Link
inet6 addr: fe80::e831:a2b0:1f6b:e49a/64 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Packet from TUN of length 48 - write SLIP
0000 60 00 00 00 00 08 3a ff fe 80 00 00 00 00 00 00 e8 31 a2 b0 1f 6b e4 9a ff 02 00 00 00 00 00 00 00 00 00 00 00 00 00 02 85 00 ee 4e 00 00 00 00
Got configuration message of type P
Setting prefix ::
Server IPv6 addresses:
::212:4b00:615:a4a4
fe80::212:4b00:615:a4a4
但是不可能ping边界路由器(在:: 212:4b00:615:a4a4下)或以其他方式向网络发送消息。
猜疑:
./tunslip6 -s /dev/ttyUSB0 aaaa:1/64 -v5
)相同,tunslip-output也会因前缀而异。