Default LSPs in WM 5.0 [autobind_lsp].
The following description of the autobind_lsp is copied from
https://www.intrinsyc.com/whitepapers/RIL\_whitepaper\_MS\_Intrinsyc\_June2004.pdf"
When an application makes a Connection Manager connection request, Connection Manager determines which IP interface the application should use to reach the destination network requested. Connection manager passes this information to the AutoBind LSP. If the application does not explicitly bind its sockets to an interface, then the AutoBind LSP will implicitly bind the sockets to the interface specified by Connection Manager, ensuring that the packets sent over the socket will take the correct route to reach the intended destination.
autobind_LSP effects the following winsock calls:
def WSPConnect(addr):
if not alreadyBound() and not isLoopback(addr):
doHardBindIfRequired()
let_connect_call_passthrough_to(addr)
def WSPBind(addr):
if not alreadyBound():
doHardBindIfRequired()
let_bind_call_passthrough_to(addr)
def WSPRecvFrom(addr):
if not alreadyBound():
doHardBindIfRequired()
let_recvFrom_call_passthrough_to(addr)
def WSPSendTo(addr):
if not alreadyBound():
doHardBindIfRequired()
let_sendTo_call_passthrough_to(addr)
def doHardBindIfRequired():
interfaceToBindTo = ConnectionManager::GetInterfaceToBindTo(GetProcessID())
if (interfaceToBindTo)
TCPStack::ForceHardBind(interfaceToBindTo)
alreadyBound = True
[Author: Igor Dvorkin]
Comments
- Anonymous
December 28, 2005
Thanks for good information. I have found this very helpful. I have one additional question. How do you tell the connection manager which interface to use? We want it to bind to our ethernet NIC, but when I enable the built WiFi NIC on the device I am testing on (a QTEK9100) it will always use that regardless that our NIC reports a much higher bandwidth. Are there registry entries that are needed? If Yes, do you know where those are documented?
Thanks in advance,
HP - Anonymous
June 13, 2006
Hi Igor,
From MS document, it states "It is still possible for applications to override this behavior by explicitly binding sockets to the desired interface before connecting. In this way it is possible for a single application to have open sockets on multiple IP interfaces.", so an application can perform binding to an interface on its own, and to avoid AutoBind's hard binding.
My question is, how does an application perform bind to an interface so that the AutoBind knows a socket has been hard binded to an interface? I tried use bind(..) API, to bind to an WIFI's IP while the device is dual-home for both WIFI and DTPT. But then, it will fail to connect to a remote site via the WIFI interface. I also tried to use WSAIoctl(.., SIO_UCAST_IF, ..) followed by bind(..). But it still wouldn't work under dual-homing.
Thanks in advance,
iping - Anonymous
August 21, 2006
The comment has been removed - Anonymous
July 29, 2008
I am trying to build a connection manager kind of fucntionality in WinCE. For that I need knowledge on autobind LSP. How does it really do the hardbinding. Any detail explanation other than what is given above? If connection manager is not present then how canwe do it? - Anonymous
July 30, 2008
Hardbinding a socket to a particular interface entails first finding an IP address on the chosen interface using iphlpapi, then calling bind() specifying that IP address, and finally calling ioctlsocket(SIO_UCAST_IF).