Solved

Winsock

Posted on 2003-10-23
5
316 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

839 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