Page 1 of 1

Is it allowed to manually edit the Bandwidth Usage Table?

Posted: Sun Oct 06, 2019 5:58 pm
by lollapalooza
Is it possible to manually edit the values in the bandwith usage table?

The values are stored in bin files, so a text editor is not an optionb.

I found the commands bw_get and bw_set, but that seems not to be very clear if that's their purpose, or how to use them.

TIA

Re: Is it allowed to manually edit the Bandwidth Usage Table?

Posted: Mon Oct 07, 2019 1:44 am
by Lantis
Yes that is what they are used for, but no it isn't supposed to be user friendly.

You would need to craft a very specific binary file in order to do this, which is well beyond the scope of what this forum can assist with.
You need a complete understanding of the save_history_to_file function in ipt_bwctl. This is used by bw_get, which is of course the inverse of bw_set.

Reading one by hand is incredibly slow and painful. I just tried it out of interest and there are bits that i don't understand completely either.

You also need to keep in mind the endianness of your router, and also the fact that ip addresses in the file appear to be stored in network byte order.

Re: Is it allowed to manually edit the Bandwidth Usage Table?

Posted: Mon Oct 07, 2019 3:03 am
by lollapalooza
Ok, I'll give up :-(
In any case, thanks a lot for your answer.

I wish you a nice day.