Commit ede5fd17 authored by Philip Carns's avatar Philip Carns

table to look up loggp params for a given msg size

parent 074fb9f1
......@@ -590,6 +590,29 @@ static void loggp_packet_event_rc(tw_lp *sender)
return;
}
/* find the parameters corresponding to the message size we are transmitting
*/
static struct param_table_entry* find_params(int msg_size)
{
int i;
/* pick parameters based on the next smallest size in the table, but
* default to beginning or end of table if we are out of range
*/
for(i=0; i<param_table_size; i++)
{
if(param_table[i].size > msg_size)
{
if(i > 0)
i--;
break;
}
}
return(&param_table[i]);
}
/*
* Local variables:
* c-indent-level: 4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment