• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

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

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
dog78
Asked:
dog78
  • 4
  • 3
1 Solution
 
millsoftCommented:
Can you explain what you mean by "network upload"?
0
 
joghurtCommented:
Do you mean the Upload Manager service, or the complete network connection (both upload and download)?
0
 
dog78Author Commented:
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
millsoftCommented:
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
 
dog78Author Commented:
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
 
dog78Author Commented:
The problem is caused by his Bittorrent client.
0
 
millsoftCommented:
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
 
dog78Author Commented:
Excellent solution. I'll schedule this as a BAT file.
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now