src/session.c
static int
smp_fetch_conn_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_CONN_RATE);
		if (!ptr)
			return 0; /* parameter not stored */
		smp->data.uint = read_freq_ctr_period(&stktable_data_cast(ptr, conn_rate),
					       table->data_arg[STKTABLE_DT_CONN_RATE].u);
	}
	return 1;
}
/* set temp integer to the connection rate in the stksess entry <ts> over the configured period */
set temp integer to the connection rate in the stksess entry  over the configured period
set temp integer to the connection rate in the stksess entry over the configured period
static int
smp_fetch_conn_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_CONN_RATE);
		if (!ptr)
			return 0; 
		smp->data.uint = read_freq_ctr_period(&stktable_data_cast(ptr, conn_rate),
					       table->data_arg[STKTABLE_DT_CONN_RATE].u);
	}
	return 1;
}
static int smp_fetch_conn_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_CONN_RATE ) ; if ( ! ptr ) return 0 ; smp -> data . uint = read_freq_ctr_period ( & stktable_data_cast ( ptr , conn_rate ) , table -> data_arg [ STKTABLE_DT_CONN_RATE ] . u ) ; } return 1 ; }
set temp integer to the connection rate in the stksess entry <ts> over the configured period
set temp integer to the connection rate in the stksess entry <ts > over the configured period
/* parameter not stored */