Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
ede5fd17
Commit
ede5fd17
authored
Oct 15, 2013
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
table to look up loggp params for a given msg size
parent
074fb9f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
src/models/networks/model-net/loggp.c
src/models/networks/model-net/loggp.c
+23
-0
No files found.
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