Hello Xenomai team,
I am working on sending the raw Ethernet packets through RTnet driver
(rt_8139t). I am using the the example i.e. raw-ethernet.c as my starting point
for sending the raw Ethernet packets from Rtnet source file. I have managed to
compile the using skin=Posix and also able run it with rteth0 interface. The
code file is attached with this email along with makefile. I have configured
the rteth0 interface with ip and netmask with promisc mode. Morover over i have
added the route by using the command "./rtroute solicit 10.0.0.11 dev rteth0".
I am able to ping also as below:
root@cpc:/usr/xenomai/sbin# ./rtping 10.0.0.11
Real-time PING 10.0.0.11 56(84) bytes of data.
ioctl: No route to host
root@cpc:/usr/xenomai/sbin# ./rtroute solicit 10.0.0.11 dev rteth0
root@cpc:/usr/xenomai/sbin# ./rtping 10.0.0.11
Real-time PING 10.0.0.11 56(84) bytes of data.
64 bytes from 10.0.0.11: icmp_seq=1 time=408.6 us
64 bytes from 10.0.0.11: icmp_seq=2 time=370.1 us
64 bytes from 10.0.0.11: icmp_seq=3 time=387.2 us
64 bytes from 10.0.0.11: icmp_seq=4 time=413.4 us
^C
--- 10.0.0.11 rtping statistics ---
4 packets transmitted, 4 received, 0% packet loss
worst case rtt = 413.4 us"
The other PC is non real time windows PC. And I can see the ping traffic on the
windows PC. But when i run the code after compilation I can not see the traffic
on the network. The output of the code is
root@cpc:/usr/xenomai# ./raw_packet rteth0 aliumair
sock: 3
string copy: rteth0
ioctl: 0
addr.sll_family: 17
addr.sll_protocol: 13330
addr.sll_ifindex: 1
Sent frame of 1514 bytes
Sent frame of 1514 bytes
My first question is what i am doing wrong due to which i am able to see the
traffic on the network even though i can see the ping traffic.
Now my second problem is when i am running the code after the compilation and
look a the threads with output such as
root@cpc:/home/cpc# cat /proc/xenomai/sched/threads
CPU PID CLASS TYPE PRI TIMEOUT STAT NAME
0 0 idle core -1 - R
[ROOT/0]
1 0 idle core -1 - R
[ROOT/1]
0 405 rt core 98 - W
[rtnet-stack]
0 406 rt core 0 - W
[rtnet-rtpc]
1 2282 rt core 0 - W
[rtnetproxy]
0 2737 rt cobalt 100 140ms47us D
raw_packet
root@cpc:/home/cpc# cat /proc/xenomai/sched/threads
CPU PID CLASS TYPE PRI TIMEOUT STAT NAME
0 0 idle core -1 - R
[ROOT/0]
1 0 idle core -1 - R
[ROOT/1]
0 405 rt core 98 - W
[rtnet-stack]
0 406 rt core 0 - W
[rtnet-rtpc]
1 2282 rt core 0 - W
[rtnetproxy]
0 2737 rt cobalt 100 924ms122us D
raw_packet
I have found that the time out for the raw_packet thread is varying. I think if
the the thread is running in real time it should be constant and deterministic.
So Please guide me if i am missing anything.
Details of my setup are
root@cpc:/home/cpc# dmesg | grep xenomai
[ 0.000000] Linux version 3.14.39-xenomai-3.0.1 (root@cpc) (gcc version
4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) ) #2 SMP PREEMPT Tue Nov 10 18:02:47 EET
2015
[ 0.000000] Kernel command line:
BOOT_IMAGE=/boot/vmlinuz-3.14.39-xenomai-3.0.1
root=UUID=e29fa266-6a54-4815-b5bd-ea0168f18fd7 ro quiet splash
crashkernel=384M-:128M vt.handoff=7
[ 0.836257] (see xenomai.smi parameter). You might encounter
[ 1.640220] usb usb1: Manufacturer: Linux 3.14.39-xenomai-3.0.1 ehci_hcd
[ 1.641529] usb usb2: Manufacturer: Linux 3.14.39-xenomai-3.0.1 uhci_hcd
[ 1.642402] usb usb3: Manufacturer: Linux 3.14.39-xenomai-3.0.1 uhci_hcd
[ 1.643256] usb usb4: Manufacturer: Linux 3.14.39-xenomai-3.0.1 uhci_hcd
[ 1.644153] usb usb5: Manufacturer: Linux 3.14.39-xenomai-3.0.1 uhci_hcd
And i have run all the modules in order to make the rteth0 to be up as
explained in the link
https://sir.upc.edu/wikis/roblab/index.php/Development/RTnet
Thanks in advance
Best regards
Ali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raw_packet.c
Type: text/x-csrc
Size: 3665 bytes
Desc: raw_packet.c
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20151126/73f5d95b/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile
Type: application/octet-stream
Size: 2319 bytes
Desc: makefile
URL:
<http://xenomai.org/pipermail/xenomai/attachments/20151126/73f5d95b/attachment.obj>
_______________________________________________
Xenomai mailing list
[email protected]
http://xenomai.org/mailman/listinfo/xenomai