Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iftop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Warren
iftop
Commits
e533714b
Commit
e533714b
authored
Nov 27, 2010
by
pdw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed sort behaviour to be based on what is displayed when displaying only
to/from traffic. Damián Viano <des@debian.org>
parent
6197223f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
ui.c
ui.c
+23
-3
No files found.
ui.c
View file @
e533714b
...
...
@@ -97,10 +97,30 @@ int dontshowdisplay = 0;
*/
int
screen_line_bandwidth_compare
(
host_pair_line
*
aa
,
host_pair_line
*
bb
,
int
start_div
)
{
int
i
;
for
(
i
=
start_div
;
i
<
HISTORY_DIVISIONS
;
i
++
)
{
if
(
aa
->
recv
[
i
]
+
aa
->
sent
[
i
]
!=
bb
->
recv
[
i
]
+
bb
->
sent
[
i
])
{
return
(
aa
->
recv
[
i
]
+
aa
->
sent
[
i
]
<
bb
->
recv
[
i
]
+
bb
->
sent
[
i
]);
switch
(
options
.
linedisplay
)
{
case
OPTION_LINEDISPLAY_ONE_LINE_SENT
:
for
(
i
=
start_div
;
i
<
HISTORY_DIVISIONS
;
i
++
)
{
if
(
aa
->
sent
[
i
]
!=
bb
->
sent
[
i
])
{
return
(
aa
->
sent
[
i
]
<
bb
->
sent
[
i
]);
}
}
break
;
case
OPTION_LINEDISPLAY_ONE_LINE_RECV
:
for
(
i
=
start_div
;
i
<
HISTORY_DIVISIONS
;
i
++
)
{
if
(
aa
->
recv
[
i
]
!=
bb
->
recv
[
i
])
{
return
(
aa
->
recv
[
i
]
<
bb
->
recv
[
i
]);
}
}
break
;
case
OPTION_LINEDISPLAY_TWO_LINE
:
case
OPTION_LINEDISPLAY_ONE_LINE_BOTH
:
/* fallback to the combined sent+recv that also act as fallback for sent/recv */
break
;
}
for
(
i
=
start_div
;
i
<
HISTORY_DIVISIONS
;
i
++
)
{
if
(
aa
->
recv
[
i
]
+
aa
->
sent
[
i
]
!=
bb
->
recv
[
i
]
+
bb
->
sent
[
i
])
{
return
(
aa
->
recv
[
i
]
+
aa
->
sent
[
i
]
<
bb
->
recv
[
i
]
+
bb
->
sent
[
i
]);
}
}
return
1
;
}
...
...
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