[mc1322x] Binding UDP socket to tunslip6 interface

Daniel Berenguer dberenguer at usapiens.com
Tue Jun 29 02:33:43 EDT 2010


Thank you very much George.

I've followed your advice but socat is not showing any incoming
traffic either so I guess this is a PC-related problem.

George, I'm guessing that socat is binding the socket to the only ipv6
interface available in the computer but, how could I explicitly
configure socat to use my "tun0" interface?

Thanks again,

Daniel.


On 28 June 2010 22:33, George Lu <lu at goodxense.com> wrote:
> Hi Daniel,
> You can use "$ socat -x udp6-recv:69 -" to act as a simple IPv6 UDP server
> on port 69. I have used this approach to validate 6lowpan udp packets from
> econotags before switching over to Java application.
> George
>
> On Mon, Jun 28, 2010 at 9:49 AM, Daniel Berenguer <dberenguer at usapiens.com>
> wrote:
>>
>> 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.
>>
>> _______________________________________________
>> mc1322x mailing list
>> mc1322x at devl.org
>> http://devl.org/cgi-bin/mailman/listinfo/mc1322x
>
>



-- 
Daniel Berenguer
http://www.usapiens.com
http://www.opnode.org



More information about the mc1322x mailing list