Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

int rtnl_tc_calc_bufsize ( int  txtime,
int  rate 

Calculate buffer size able to transmit in a specific time and rate.

  • txtime Available transmit time in micro seconds.
  • rate Transmit rate in bytes per second.
Calculates the size of the buffer that can be transmitted in a specific time period at a specific transmit rate.

\[ bufsize=\frac{{txtime} \times {rate}}{10^6} \]

Size of buffer in bytes.

Definition at line 398 of file tc.c.

      double bufsize;

      bufsize = (double) txtime * (double) rate;

      return bufsize / 1000000.;

Generated by  Doxygen 1.6.0   Back to index