|
Hey there,
ive got a problem with receiving data from the loopback device.
The "sender-software" is a "blackbox" i dont know much about, beside that it sends UDP Packets. I'm able to set the address it uses to send, to the ip address of my network interface (192...) and to the loopback-device (127...).
My c-programm trys to read the packets when running on the same PC as the blackbox. It works when I set the following socket options: AF_INET, SOCK_RAW, IPPROTO_TCP, SIO_RCVALL, SO_REUSEADDR and the bind-ip to 192... with port 0.
Then I receive the whole network traffic including IP-headers. What I see is, that the blackbox sends only broadcasts to 5.255.255.255. Additionally, it doesnt matter which send-address I chose in the blackbox.
The problem is, that I only receive those packets, when my network interface is connected to a network. If I remove the cable, it doesnt work anymore. But it should ...
I think the solution is, to bind my program to the loopback device. I tried every socket option, without receiving data. It seems that raw sockets arent allowed on the loopback address, too.
Anyone has an idea?
thx in advance
|