c - Receiving UDP broadcasts on machine with two Etherent ports -
a machine has 2 ethernet ports , connected network using both of them (for redundancy). machine periodically sends udp broadcasts on network.
i need detect through ethernet port did receive broadcast. need know because, in case of 1 ethernet port (line) failure, need mark invalid port.
at moment using recvfrom() socket function receive udp broadcasts, don't know how tell through ethernet port udp packet received.
i've never done in plain c should able bind socket specific adapter before calling recvfrom, you'll have 2 udp listeners here - 1 each adapter.
Comments
Post a Comment