Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Multiple network cards on one PC. Packages sent through the driver.
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
9 Posts 5 Posters 5.4k Views 1 Watching
  • 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 Offline
    M Offline
    MedEx
    wrote on last edited by
    #1

    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
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      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
      0
      • M Offline
        M Offline
        MedEx
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgeyer
          wrote on last edited by
          #4

          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
          0
          • M Offline
            M Offline
            MedEx
            wrote on last edited by
            #5

            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
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              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
              0
              • M Offline
                M Offline
                MedEx
                wrote on last edited by
                #7

                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
                0
                • M Offline
                  M Offline
                  MedEx
                  wrote on last edited by
                  #8

                  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
                  0
                  • L Offline
                    L Offline
                    loladiro
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved