Solved

Enable/Disable Network Upload with C++ (or anything else?)

Posted on 2004-03-25
8
309 Views
Last Modified: 2013-12-03
I'm interested in writing a very simple program that can be scheduled to run every now and then, and if the network upload is enabled, it should disable it. If it's disabled, it should enable it.

I'm wondering where I should look, in which API, or in which language it would be easiest? I'm familiar with C++, and a little visual basic. Any tips?
0
Comment
Question by:dog78
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:millsoft
ID: 10683327
Can you explain what you mean by "network upload"?
0
 
LVL 6

Expert Comment

by:joghurt
ID: 10685833
Do you mean the Upload Manager service, or the complete network connection (both upload and download)?
0
 

Author Comment

by:dog78
ID: 10696230
I'm specifically trying to solve a problem with my ISP and their rate limits. If I constantly upload, they have a fit. The tech support people recommended that for me to avoid having problems, I should cut the upload completely for at least seven minutes of every hour.

The download doesn't matter, but if it's easier to simply stop the whole interface, that's also acceptable.

In linux, I'd use an iptables rule to drop all outgoing packets. That's what I'm looking to do, here.
0
 
LVL 5

Expert Comment

by:millsoft
ID: 10697019
So, you're trying to run a web server at home on a DSL or Cable modem and don't want to irritate the ISP?

0
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.

 

Author Comment

by:dog78
ID: 10697029
To be exact, I'm trying to help a friend who uses his "unlimited" internet connection plan more than his ISP is comfortable with. I use Linux, he uses Windows. I thought, if I were to find the right API for this, I could write something trivial he could then schedule with the windows scheduler.
0
 

Author Comment

by:dog78
ID: 10697032
The problem is caused by his Bittorrent client.
0
 
LVL 5

Accepted Solution

by:
millsoft earned 50 total points
ID: 10697103
I don't know about linux/iptables, but the command line utility ROUTE can reroute packets.

If your computer is behind a firewall/router that can give the computer an IP address via DHCP you could effectively "turn off" the interface by typing:

IPConfig /Release

and turn it on by:

ipconfig /renew

Of course the interface isn't actually "disabled" but it may as well be.

0
 

Author Comment

by:dog78
ID: 10717304
Excellent solution. I'll schedule this as a BAT file.
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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

932 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

12 Experts available now in Live!

Get 1:1 Help Now