Questions tagged [winsock-lsp]

Winsock Layered Service Provider (LSP)

A layered service provider (LSP) is a DLL that can be loaded into the Windows TCP/IP stack. It is provided by the 2 service provider interface.

24 questions
18
votes
4 answers

Layered Service Provider in C#

I'm looking to write a LSP in C# to capture and re-direct UDP packets.. I have little experience with LSP's but I've heard they can do this sort of thing, please correct me if I'm wrong, but is this possible? I would love some example code but I…
caesay
  • 16,932
  • 15
  • 95
  • 160
4
votes
1 answer

Unable to set WSPStartup as a dll export

I am trying to write a LSP for winsock and as per MSDN documentation the dll is supposed to export a single function viz. WSPStartup() as defined in Ws2spi.h While compiling I get an error: error C2375: 'WSPStartup' : redefinition; different…
Surojit
  • 1,282
  • 14
  • 26
3
votes
2 answers

Is it possible to intercept dns queries using LSP/SPI?

I wrote my own LSP which is working fine. However, I can not catch dns queries. For example there is no function like WSPGetHostByName or WSPGetAddrInfo. My lsp also supports UDP protocol but it is not working. If I run nslookup from console…
blacksun
  • 733
  • 7
  • 24
3
votes
0 answers

Communicating with a DLL

I have an LSP (Layered Service Provider) DLL, but once it's installed in the catalog, how to i communicate with it in my program? My LSP is based largely off of Microsoft's sample LSP. I was reading komodia's write up on LSP DLL's and they state…
Dacto
  • 2,901
  • 9
  • 45
  • 54
3
votes
0 answers

SendMessage gives ACCESS DENIED error when trying to send from IE process

I'm working on a Download Manager and I'm writing an LSP for browser integration. It works perfectly on every browser except IE. When I try to communicate with my application process using SendMessage API, it fails with error 5 (Access Denied). When…
Javid
  • 2,755
  • 2
  • 33
  • 60
1
vote
3 answers

Building Microsoft's LSP sample code

Building with/ Using VS2010 Platform SDK (Microsoft Windows SDK v7.1) installed. When i try to build the Sample LSP (located in C:\Program Files\Microsoft Platform SDK\Samples\NetDS\WinSock\LSP) !--BEGIN RESOLVED--! I get 16 of the same two errors…
Dacto
  • 2,901
  • 9
  • 45
  • 54
1
vote
1 answer

how custom route for a process?

In my computer, there are two network adapters, connecting to different subnet. As below: adapter A: 10.20.30.201 adapter B: 10.20.31.201 I want to make all outgoing data of a special process (for example Process A) through adapter A. That is I want…
xjdrew
  • 373
  • 4
  • 13
1
vote
1 answer

Get destination port in WSPSend

I am having a problem in getting the destination port number in the WSPSend function in the sample LSP provided with Microsoft platform SDK. Here is the code that I am using. As shown below, the if statement is not entered. I verified this using a…
Khaled
  • 1,114
  • 14
  • 31
1
vote
1 answer

LSP software conflict with antivirus anti spyware etc programs?

Hello I write LSP program for reading and changing traffic. Questions is, do software like anti virus, firewall, anti spyware etc see my program as virus because LSP function?
lebron2323
  • 990
  • 2
  • 14
  • 29
1
vote
0 answers

How can I list what LSPs are installed, using C#?

Just to clarify, I don't aim to create or install a LSP(Layered Service Provider) in C#. Is there any way to just find a list of which ones are installed, or perhaps at least which applications have installed an LSP on a machine? Maybe that…
Garrett
  • 545
  • 1
  • 7
  • 21
0
votes
1 answer

How to control shared internet connection (ICS - Internet Connection Sharing) using LSP/SPI?

I am trying to write an application for myself to learn things and to use in my own office. What I am trying to write is: I have two nics. First one is connected to internet and the other one is connected to network I have enabled ICS (Internet…
blacksun
  • 733
  • 7
  • 24
0
votes
0 answers

Communication between Private address class' on same LAN possible?

In my testing, both computers have the same PUBLIC IPV4 address: Two computers bound to the same private class range (192.168.X.X) PC_0 (192.168.1.2) -> SendsTo -> PC_1 (192.168.1.40) (PC_1 - SUCCESSFULLY RECIEVED MSG) Two computers bound to the…
Zachwuzhere
  • 329
  • 3
  • 12
0
votes
1 answer

IPC between windows service and LSP DLL

I'm writing a Winsock LSP (Layered Service Provider) DLL that needs to communicate with a windows service. The communication is done using memory mapped files and events for synchronization. Everything works fine if the application is not running as…
MtrX
  • 3
  • 1
  • 3
0
votes
1 answer

display http blocking page from LSP with chrome

I have modified Microsoft's LSP (Winsosk Layered Service Provider) example to make web filter application for desktop. I am able to block access to websites by comparing host in http header to a list of banned websites in a file. If a web is…
0
votes
3 answers

System-wide Ad Blocker

I intend to build an Ad Blocker application that blocks ads on all browsers. Some Ad Blockers have plugins for each browser, but I think that's a lot of work and incompatibilities. I'm thinking on an application that works like a firewall for…
Andrew
  • 19
  • 2
  • 4
1
2