Setup:
Serial connection to Linux OS.
Reading IP packets being sent across serial connection
I am trying to take a DHCP IP packet sent from the serial connection and send it to regular ethernet DHCP Server.
I create a RAW socket connection as follows:
socket(PF_PACKET, SOCK_RAW, ETH_P_ALL);
I am able to get the packet from the serial connection, I then add on the ETH HDR to the front of this packet and then sendto the socket. Using a sniffer on another PC I can see that the packet is sent to the network, but no DHCP server reply's to this DHCP request...
Is there something extra I need to do so that this DHCP packet is responded to?
My ETH HDR PAcket added to the front of the DHCP IP header is:
SRC ADDR: xx:xx:xx:xx:xx:xx // note: not the MAC addr of the Linux PC
DEST Addr: ff:ff:ff:ff:ff:ff
Proto: 0x0800
Start Free Trial