Solved

Winsock

Posted on 2003-10-23
5
310 Views
Last Modified: 2010-04-01
I need an application I am writing in C++ to be able to use WinSock (or other method) to block all TCP/IP sockets at the click of a button (and obviously resume the traffic). Does anyone how I would go about this in C++? Thanks.
0
Comment
Question by:dwgebler
  • 2
5 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 125 total points
ID: 9611067
1) This is not a C++ language question.  It's a Windows programming question.

2) WINSOCK is not able to do this.  You want to program such an application using the NDIS Intermediate driver interface.  See: http://www.rawether.net for information and a toolkit.  There is also an NDIS IM sample in the Windows 2000 and XP DDK.
0
 

Expert Comment

by:gdean
ID: 9622062
Id tend to agree with jhance on #1, however could you go into greater detail as to what you mean by block all traffic?  Maybe describe in a little more detail the design of your program.  Are you trying to stop communication internally to your app or throughout the entire system?

mulitthreaded/iterative/async/overlapping? server/client? etc...
0
 

Author Comment

by:dwgebler
ID: 9623037
I nned my app to be able to block all internet traffic, but I am not a networking programmer so I've no experience in this. I guess blocking the ports for TCP/IP communication is what I want to do (and of course enable it again as well). Is there any way to do this without a lot of complex networking knowledge? I use Norton Internet Security 2003 and it notably has the kind of thing I need for this project as one of its features. You can click a button to block all traffic and resume it any point.
0
 

Expert Comment

by:gdean
ID: 9623949
I agree with jhance
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now