I have same network cards in computer. All cards has identical IP. I need to bind socket to specific card. In linux I can use flag SO_BINDTODEVICE. How I can do this in windows.
P.S. This needed for UDP sockets.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I answered a similar question here: Using a specific network interface for a socket in windows
AFIK: in Windows XP and Windows Server 2003 IP4 I believe you can’t, but for IP6 you can. And for Windows Vista and Windows 2008 you can (except for certain circumstances).
Hope that helps