src/session.c
static int
smp_fetch_bytes_out_rate(struct stktable *table, struct sample *smp, struct stksess *ts)
{
	smp->flags = SMP_F_VOL_TEST;
	smp->type = SMP_T_UINT;
	smp->data.uint = 0;
	if (ts != NULL) {
		void *ptr = stktable_data_ptr(table, ts, STKTABLE_DT_BYTES_OUT_RATE);
		if (!ptr)
			return 0; /* parameter not stored */
		smp->data.uint = read_freq_ctr_period(&stktable_data_cast(ptr, bytes_out_rate),
					       table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u);
	}
	return 1;
}
/* set temp integer to the bytes rate to clients in the stksess entry <ts> over the
 * configured period.
 */
set temp integer to the bytes rate to clients in the stksess entry  over the
configured period.
set temp integer to the bytes rate to clients in the stksess entry over the configured period .
static int
smp_fetch_bytes_out_rate(struct stktable *table, struct sample *smp, struct stksess *ts)
{
	smp->flags = SMP_F_VOL_TEST;
	smp->type = SMP_T_UINT;
	smp->data.uint = 0;
	if (ts != NULL) {
		void *ptr = stktable_data_ptr(table, ts, STKTABLE_DT_BYTES_OUT_RATE);
		if (!ptr)
			return 0; 
		smp->data.uint = read_freq_ctr_period(&stktable_data_cast(ptr, bytes_out_rate),
					       table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u);
	}
	return 1;
}
static int smp_fetch_bytes_out_rate ( struct stktable * table , struct sample * smp , struct stksess * ts ) { smp -> flags = SMP_F_VOL_TEST ; smp -> type = SMP_T_UINT ; smp -> data . uint = 0 ; if ( ts != NULL ) { void * ptr = stktable_data_ptr ( table , ts , STKTABLE_DT_BYTES_OUT_RATE ) ; if ( ! ptr ) return 0 ; smp -> data . uint = read_freq_ctr_period ( & stktable_data_cast ( ptr , bytes_out_rate ) , table -> data_arg [ STKTABLE_DT_BYTES_OUT_RATE ] . u ) ; } return 1 ; }
set temp integer to the bytes rate to clients in the stksess entry <ts> over the
 configured period.
set temp integer to the bytes rate to clients in the stksess entry <ts > over the configured period .
/* parameter not stored */