LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Raw sockets for layer 2 ethernet on a 2.4 kernel (http://www.linuxquestions.org/questions/linux-kernel-70/raw-sockets-for-layer-2-ethernet-on-a-2-4-kernel-811371/)

rjcarlson49 05-31-2010 08:49 PM

Raw sockets for layer 2 ethernet on a 2.4 kernel
 
We are trying to add an LLDP-MED client to a 2.4(.31 I think) kernel from Monte Vista. This requires a raw socket (AF_Packet) with an Ethertype of 88cc. The program gets no error messages, but no packets are being sent or received. This same code works on other distributions with newer kernels (CentOS and Ubuntu.)

Does anyone know where the problem might be? Whether anyone has done an LLDP-MED implementation on 2.4?

Thanks in advance.

Bob

ggeagle 06-20-2010 01:14 AM

sorry for my poor english.
This is a part of my english studying....

To understanding 'Ether Type' value in ethernet frame is main concept to solve your problem.

All sytems which want to communicate with TCP/IP compatible way must to have ability to treat three ether type value IPV4(0X0800),ARP(0X0806),RARP(0x8035).
These three values are indispensable to all kernel.
Other point of view, except three of 65536 ether type values,all others are optional.
NOT essential part.regardless of kernel VERSION and linux,window,unix,,,


0x88cc matchs LLDP.
So you can use kernel image which pre compiled inclusive of this routine,or you can insert this into kernel module.

This means if sending system's kernel use LLDP module to construct user data and pass through out ethernet then receiving system's kernel needs LLDP module to unconstruct that data and pass through user program's file discriptor(fd what returned from socket call).

If receiving system has no proper module,then data will be droped and may returns error message like "unknowen protocol".

because of my poor english,I can't describe more detail..

You can find open source LLDP module at search engine.


All times are GMT -5. The time now is 04:00 AM.