[mc1322x] Binding UDP socket to tunslip6 interface

Daniel Berenguer dberenguer at usapiens.com
Mon Jun 28 12:49:06 EDT 2010


This is an off-topic, nothing to do with Mar's MC1322x work.

I'm trying to receive some 6lowPAN UDP traffic on my Ubuntu machine
through the Econotag connected to one of the USB ports, running
border-router-rpl as firmware and tunslip6 on the PC. This is the
output of ifconfig:

eth0    Link encap:Ethernet  HWaddr 00:11:43:c8:bd:1c
          inet addr:192.168.1.17  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::211:43ff:fec8:bd1c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:190105 errors:0 dropped:0 overruns:0 frame:0
          TX packets:144725 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:217419986 (217.4 MB)  TX bytes:14752209 (14.7 MB)
          Interrupt:16

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1168 (1.1 KB)  TX bytes:1168 (1.1 KB)

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
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:1 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:76 (76.0 B)  TX bytes:0 (0.0 B)

I've tried to bind the UDP socket to the 6lowPAN address (aaaa::1) and
also to tun0's loopback address (127.0.1.1) with apparent success.
However, I don't seem to be able to receive any UDP traffic on the
port (69 for TFTP). I first did the try under Java and then I switched
to C but no luck. I'm sniffing the UDP traffic from Wireshark so I
know that tun0 is a valid interface.

Since this is my first ipv6 experience I have some doubts about the
validity of the legacy ipv4 C/Java functions. The information found in
Internet is quite rare and, although I'm used to work with sockets
under Java, C and C++ I'm feeling this time like a newbie...

Is anyone in this list successfully writing PC applications for the
6lowPAN "Econotag NIC's"?

Any comment is welcome! Thanks!

Daniel.



More information about the mc1322x mailing list