Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Apr 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Limit bandwidth using Win32API?

    Hi people,

    I've registered at this forum specifically to ask this question, so I really hope I get some useful replies...

    I am a member of an Unreal Tournament 2004 2on2 TDM clan, and we play competitively against other clans. As probably most of you know, you need to have a good ping to the server to have a smooth, non-laggy game. Which means you need all the bandwidth you can get from your connection.

    The problem is, that my PC is part of a home-network, with a router between the PC's and my cable modem. My family members know next to nothing about computers, and don't even know what the word "bandwidth" means . So, stuff like this happens:
    I'm in a clanwar, trying to be at least of SOME assistance to my teammates, when my little sister (16 years old, thinks the world revolves around her) decides this is a good time for her to fire up her webcam on MSN, or start DLing a movie on Kazaa . This ofcourse stuff like this costs us the game, and a lot of nerves aswell

    So now I was thinking to write a client-server C++ program that can limit bandwith on the machine it runs on. The server would be run on the 2 other networked PC's and the client on mine, so that I can connect to the other PC's and tell them to limit bandwidth to (for example) 1 kb/s up and down.
    Now I'm 99% certain there are a couple of simple Win32 API functions that can do just that, but MSDN so far hasn't come up with anything useful. I DID find some info on the Traffic Control part of MS QoS services thingy, but I don't think it's what I'm looking for.

    Any help I can get with this is MUCH appreciated, thanks in advance,

    -=[BeR]=-

    PS: Sorry for my bad English, it is not my primary language

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    First off, welcome to the board! I try to be as helpful as I can, but usually find my knowledge lacking so hopefully someone else can help you better.

    I don't think you need to write this from scratch, unless you REALLY want to (but in that case I couldn't help you too much..). There is software out there.

    I found a few links that may spark some thoughts in your mind to help you out in your quest:
    http://dbforums.com/arch/183/2003/2/675508
    http://www.experts-exchange.com/Hard..._20937798.html
    http://support.earthlink.net/mu/1/ps.../6800.psc.html
    http://www.softpedia.com/public/cat/10/7/10-7-115.shtml
    http://fileforum.betanews.com/detail...fid=1045636603

    I'm not very knowledgeable as far as networks go, but I'd imagine that you'd need a gateway of some sort.

    Like the internet comes into the house, probably into a router and then gets "split" into each individual computer. Well there's not a whole lot of room to stick a server in between there. Unless of course your router has that feature...

    I've never setup a gateway, but I'd imagine that's what you'd need and I'm sure there's lots of info online as to how to go about doing something like that. I've heard of e-smith, and that's supposed to be a good one, but you can do your own research and see what works best for you.

    Post back and let me know if that's what you were looking to do or if I was totally off.

    Good luck,
    Sadiq.

  • #3
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    I'm facing the same problem. Is there any solution? i had go google, yahoo to find the material, but i still cannot get any information about Limiting Bandwidth.

    Most of the forum ask us to purchase netlimiter (www.netlimiter.com). But i plan to do one. I'm still waiting for expert to give us some hint. Thanks

  • #4
    Regular Coder
    Join Date
    May 2002
    Location
    Virginia, USA
    Posts
    621
    Thanks
    0
    Thanked 6 Times in 6 Posts
    I'm not exactly sure how to go about creating the bandwidth monitor for your network. One problem is that to be effective, the application would have to inspect every single packet. This process takes time, and could have an adverse effect on your network.

    Look at products like Squid and Packet Shaper. (Here's an article on setting up and using squid)

    There is a whitepaper available here, but i've not yet read it.

    Your switch/router may have built-in throttling. One option would be to simply disable the kazaa port in the router while you're playing in your clan matches, but that would only be a temporary, single-application solution.

    A bandwidth throttling application would be a pain in the rump to code, I think. It would have to low-level listen on the nic, and adjust corresponding traffic, which (I don't think) will be an easy task. (you'd have to do this because not all applications are QoS aware).

    I think you could setup a gateway linux box and use iptables to do some bandwidth throttling...

    Also take a look at this link: http://www.tweakxp.com/tweak282.aspx , as it has some more information on setting QoS options.

    HTH,
    -Celt

  • #5
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The problem are they will like to download mp3, avi thru flashget or kazaa and so on. Thus we are allow them to download but limit their bandwidth according to the services are needed. Some of software control the whole bandwidth of their nic but it will affect the bandwidth of files sharing in LAN.

    In market, there are lot of software about bandwidth control. So means that a lot experts know how to control the bandwidth of workstation. I hope you all really can give us some hints. Thanks.

  • #6
    Regular Coder
    Join Date
    May 2002
    Location
    Virginia, USA
    Posts
    621
    Thanks
    0
    Thanked 6 Times in 6 Posts
    one way to seriously help is to go into the network properties of each nic you want to limit bandwidth on, and click the "configure" / "properties" button for the nic. Adjust the duplex mode to 10/half. That should help a bit :P

    -Celt

  • #7
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Is not winroute a program that does this?
    Omnis mico antequam dominus Spookster!

  • #8
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what we like to do is similar to "netlimiter" but simple/lite version. We would like to create a program to control the bandwidth of the programs in workstation.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •