Solved

Winsock

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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++.

910 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

23 Experts available now in Live!

Get 1:1 Help Now