Multiple network cards on one PC. Packages sent through the driver.
-
Hello!
On the PC has two network cards.Each card is connected to its subnet.Network is not connected to each other. Creates a UDP socket on the NIC 1 and 2. Send UDP packet from a network card 1 to network card 2. Destination address is the IP address of the NIC 2. Sends a packet from network card 1. On the network card 2, I get a packet from network card 1. The package passed through the driver ethernet.
Pass through the driver from input to output only in such cases:- From IP = To IP(from 192.168.1.1 to 192.168.1.1 )
- From IP = To Localhost(127.0.0.1 ...)
- From IP = broadcast(255.255.255.255)
- From IP = multicast(224.0.0.1 ...)
I guess there is a socket set that prohibit or allow bridging?
Tell me what's wrong? Beforehand thank you! -
Sorry I'm not quite sure what you are trying to achieve and why. Could you explain a little more clearly please? What platform are you on?
-
Windows XP.
I'm trying to define the network cards on one PC that is connected between point-to-point. -
Do you want that your packets do not go through the network stack but are copied directly to the receiving buffer as they are sent to the same host anways?
-
I want to packets reach the physical level and go through it.
The program is written in MSVS 8 is no such problem. -
This stuff is usually handled by the OS. I'm not aware of any means to force a different behavior from application code (despite fiddling around with driver code directly).
-
At first I thought that things in the OS, but then wrote code in Visual Studio 8 and Builder C + + 2010. Packets pass through the physical level and not through the driver to the application layer
-
It seems the case in the loopback, when the driver determines that the recipient is on the same PC, it sends a packet in an input buffer without sending it on a physical level. Please tell me, how to lock the loopback for QUdpSocket?
-
Like this:
@
udpSockect.bind(QHostAddress::LocalHost,12345);
@