Retail Products:

Forth LSP Tip

Windows Vista introduced two new “features” to Winsock LSP that were meant to improve the user experience when the LSP was installed, but these mechanisms cause headaches for LSP programmers, knowing how to deal with these mechanisms can save you valuable QA time because ignoring them means that your LSP will not work at various scenarios.

First mechanism is used to protect against faulty WSPSelect, so what’s the problem you ask? under Vista and above TCP/IPv6 has become more relevant and there are situations when the user app (i.e. Internet Explorer or Firefox) are doing a single select with multiple sockets, some are IPv4 and some are IPv6, if the LSP isn’t layering over both IPv4 and IPv6 base providers one socket type (the type that the LSP didn’t layer over) will not have it’s lower layer WSPSelect call and will never get the information needed, therefore Microsoft had decided that LSPs must tell the OS if they support layering over both protocols or not, if they don’t the LSP will never get WSPSelect calls, basically if your LSP doesn’t need to intercept WSPSelect then it’s not an issue for you, but if you do, that’s a big issue.

So what are the steps neccessary? First you must layer over both providers, you can do it with the -a flag on the default installer, or you can use Komodia’s Advanced LSP installer which handles this automatically, then you must insert a code snippest into WSPSelect which is shown here.

What happends if you insert the code snippest and but don’t layer over both providers? then networking will break on some occasions which will be hard to debug whether it’s a normal bug in the LSP or this issue.