Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xin Wang
codes-dev
Commits
ede5fd17
Commit
ede5fd17
authored
Oct 15, 2013
by
Philip Carns
Browse files
table to look up loggp params for a given msg size
parent
074fb9f1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/models/networks/model-net/loggp.c
View file @
ede5fd17
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment