ose

How to send data over a raw ethernet socket using sendto without using sockaddr_ll?

≡放荡痞女 提交于 2019-12-07 04:01:08
问题 I am working on a project where we use Enea OSE which is a real time embedded operating system. I guess many of you are not familiar with this OS but I think you could answer my question anyway. I want to send a raw ethernet frame between 2 cards using interface "eth1" which are directly connected to oneanother by an ethernet cable (no switch or anything). The "eth1" interface is not assigned any ip-address. I can simply declare a socket using int s = socket(AF_INET, RAW_SOCKET, ...) I can

How to send data over a raw ethernet socket using sendto without using sockaddr_ll?

本小妞迷上赌 提交于 2019-12-05 06:16:17
I am working on a project where we use Enea OSE which is a real time embedded operating system. I guess many of you are not familiar with this OS but I think you could answer my question anyway. I want to send a raw ethernet frame between 2 cards using interface "eth1" which are directly connected to oneanother by an ethernet cable (no switch or anything). The "eth1" interface is not assigned any ip-address. I can simply declare a socket using int s = socket(AF_INET, RAW_SOCKET, ...) I can then bind the socket to the appropriate device interface using: setsockopt(sock, SOL_SOCKET, SO