![]() |
| | #1 |
| Registered User Join Date: Oct 2009
Posts: 3
| send/receive udp from specific NIC FYI I'll be running in a linux enviroment. Thanks. |
| dsollen is offline | |
| | #2 |
| Registered User Join Date: Jun 2008 Location: RING 0
Posts: 462
| You can specify what interface you are binding to when calling bind(). That being said which ever interface gets to this port first will own it until it releases it. |
| valaris is offline | |
| | #3 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| When you bind, instead of specifying INADDR_ANY, specify the actual IP address of the interface you want to bind to. EDIT: The answer is the same if you want to specify the interface for OUTGOING packets as well. Normally, for outgoing packets, you do not bother binding, but that doesn't mean you can't. bind to the proper IP and it should work how you want.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with UDP | AlexS | C# Programming | 0 | 07-07-2009 06:21 PM |
| Reading from UDP socket on specific interface | uriel | Networking/Device Communication | 2 | 11-29-2007 11:09 PM |
| simultaneously waiting for data on FIFO and UDP using select call | yogesh3073 | Networking/Device Communication | 2 | 01-05-2007 09:53 AM |
| Traceroute using UDP and ICMP | Unregistered | C++ Programming | 1 | 08-09-2002 07:09 PM |
| Traceroute using UDP + ICMP | Unregistered | Windows Programming | 0 | 08-05-2002 10:50 AM |