Results 1 to 4 of 4
Hello,
i try to sent a VLAN Frame with the help of a PF_Packet RAW Socket but if i write in the protocol field of the frame the ammount 0x8100, ...
- 03-31-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 2
VLAN Frames RAW Socket
Hello,
i try to sent a VLAN Frame with the help of a PF_Packet RAW Socket but if i write in the protocol field of the frame the ammount 0x8100, Linux remove the field and sent it without this 2 bytes. For example i capture this two frames with Wireshark.
If i write 0x8000 the frame send as i create it in the memory.
00 11 22 33 44 55 01 11 22 33 44 55 80 00 22 22 22 22 22 22
But i write 0x8100 the frame send without this 2 bytes
00 11 22 33 44 55 01 11 22 33 44 55 22 22 22 22 22 22
I thought with a RAW Socket i can send what i want.
I use the Linux Kernel 2.6.31 and include the VLAN Support Packet.
With best Regards
ChristianLast edited by soch0082; 03-31-2011 at 10:41 AM.
- 01-05-2012 #2Just Joined!
- Join Date
- Jan 2012
- Posts
- 2
Hi Christian,
Did you find a solution for this? I am seeing the same problem on my system (Ubuntu 3.0.0-14-generic-pae). The odd thing is that when I ran my test applications (same binaries) on another system (Ubuntu 2.6.38-8-generic) everything looks correct and I get the 802.1q tagging from the raw socket.
Thanks!
Shlomo
- 01-05-2012 #3Just Joined!
- Join Date
- Mar 2011
- Posts
- 2
Hallo Shlomo.
In my case i note that linux on my embedded system sent the right frame. Wireshark displayed the frame without 2 bytes on a windows PC, on a other PC Wireshark display the right frame. So in my case not linux was the problem. Windows with Wireshark caused the problem.
Greetings
- 01-05-2012 #4Just Joined!
- Join Date
- Jan 2012
- Posts
- 2
Thanks!
Thanks!
I found out that when using recvmsg(...), I can get the vlan tagging from the auxdata. It's more complicated solution, but still a solution.
Is someone is interested, I can publish the code.
Shlomo


Reply With Quote
