.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "GEN_NEW_ESTIMATOR" "9" "09 October 2005" "" ""
.SH NAME
gen_new_estimator \- create a new rate estimator
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int gen_new_estimator (struct gnet_stats_basic * \fIbstats\fB, struct gnet_stats_rate_est * \fIrate_est\fB, spinlock_t * \fIstats_lock\fB, struct rtattr * \fIopt\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIbstats\fB\fR
basic statistics
.TP
\fB\fIrate_est\fB\fR
rate estimator statistics
.TP
\fB\fIstats_lock\fB\fR
statistics lock
.TP
\fB\fIopt\fB\fR
rate estimator configuration TLV
.SH "DESCRIPTION"
.PP
Creates a new rate estimator with &bstats as source and &rate_est
as destination. A new timer with the interval specified in the
configuration TLV is created. Upon each interval, the latest statistics
will be read from &bstats and the estimated rate will be stored in
&rate_est with the statistics lock grabed during this period.
.PP
Returns 0 on success or a negative error code.