Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Multiple network cards on one PC. Packages sent through the driver.

    General and Desktop
    5
    9
    4840
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MedEx last edited by

      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:

      1. From IP = To IP(from 192.168.1.1 to 192.168.1.1 )
      2. From IP = To Localhost(127.0.0.1 ...)
      3. From IP = broadcast(255.255.255.255)
      4. 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!

      1 Reply Last reply Reply Quote 0
      • Z
        ZapB last edited by

        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?

        Nokia Certified Qt Specialist
        Interested in hearing about Qt related work

        1 Reply Last reply Reply Quote 0
        • M
          MedEx last edited by

          Windows XP.
          I'm trying to define the network cards on one PC that is connected between point-to-point.

          1 Reply Last reply Reply Quote 0
          • L
            lgeyer last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • M
              MedEx last edited by

              I want to packets reach the physical level and go through it.
              The program is written in MSVS 8 is no such problem.

              1 Reply Last reply Reply Quote 0
              • G
                goetz last edited by

                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).

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply Reply Quote 0
                • M
                  MedEx last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • M
                    MedEx last edited by

                    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?

                    1 Reply Last reply Reply Quote 0
                    • L
                      loladiro last edited by

                      Like this:
                      @
                      udpSockect.bind(QHostAddress::LocalHost,12345);
                      @

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post