Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
f1f89328
Commit
f1f89328
authored
Dec 07, 2011
by
Jiri Popelka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netstat -s reports negative octet counts
(RHBZ #579854, Debian #561161) original patch from Sami Farin
parent
c8d4f437
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
189 additions
and
189 deletions
+189
-189
statistics.c
statistics.c
+189
-189
No files found.
statistics.c
View file @
f1f89328
...
...
@@ -64,115 +64,115 @@ static enum State state;
struct
entry
Iptab
[]
=
{
{
"Forwarding"
,
N_
(
"Forwarding is %s"
),
i_forward
|
I_STATIC
},
{
"DefaultTTL"
,
N_
(
"Default TTL is %u"
),
number
|
I_STATIC
},
{
"InReceives"
,
N_
(
"%u total packets received"
),
number
},
{
"InHdrErrors"
,
N_
(
"%u with invalid headers"
),
opt_number
},
{
"InAddrErrors"
,
N_
(
"%u with invalid addresses"
),
opt_number
},
{
"ForwDatagrams"
,
N_
(
"%u forwarded"
),
number
},
{
"InUnknownProtos"
,
N_
(
"%u with unknown protocol"
),
opt_number
},
{
"InDiscards"
,
N_
(
"%u incoming packets discarded"
),
number
},
{
"InDelivers"
,
N_
(
"%u incoming packets delivered"
),
number
},
{
"OutRequests"
,
N_
(
"%u requests sent out"
),
number
},
/*? */
{
"OutDiscards"
,
N_
(
"%u outgoing packets dropped"
),
opt_number
},
{
"OutNoRoutes"
,
N_
(
"%u dropped because of missing route"
),
opt_number
},
{
"ReasmTimeout"
,
N_
(
"%u fragments dropped after timeout"
),
opt_number
},
{
"ReasmReqds"
,
N_
(
"%u reassemblies required"
),
opt_number
},
/* ? */
{
"ReasmOKs"
,
N_
(
"%u packets reassembled ok"
),
opt_number
},
{
"ReasmFails"
,
N_
(
"%u packet reassembles failed"
),
opt_number
},
{
"FragOKs"
,
N_
(
"%u fragments received ok"
),
opt_number
},
{
"FragFails"
,
N_
(
"%u fragments failed"
),
opt_number
},
{
"FragCreates"
,
N_
(
"%u fragments created"
),
opt_number
}
{
"DefaultTTL"
,
N_
(
"Default TTL is %
ll
u"
),
number
|
I_STATIC
},
{
"InReceives"
,
N_
(
"%
ll
u total packets received"
),
number
},
{
"InHdrErrors"
,
N_
(
"%
ll
u with invalid headers"
),
opt_number
},
{
"InAddrErrors"
,
N_
(
"%
ll
u with invalid addresses"
),
opt_number
},
{
"ForwDatagrams"
,
N_
(
"%
ll
u forwarded"
),
number
},
{
"InUnknownProtos"
,
N_
(
"%
ll
u with unknown protocol"
),
opt_number
},
{
"InDiscards"
,
N_
(
"%
ll
u incoming packets discarded"
),
number
},
{
"InDelivers"
,
N_
(
"%
ll
u incoming packets delivered"
),
number
},
{
"OutRequests"
,
N_
(
"%
ll
u requests sent out"
),
number
},
/*? */
{
"OutDiscards"
,
N_
(
"%
ll
u outgoing packets dropped"
),
opt_number
},
{
"OutNoRoutes"
,
N_
(
"%
ll
u dropped because of missing route"
),
opt_number
},
{
"ReasmTimeout"
,
N_
(
"%
ll
u fragments dropped after timeout"
),
opt_number
},
{
"ReasmReqds"
,
N_
(
"%
ll
u reassemblies required"
),
opt_number
},
/* ? */
{
"ReasmOKs"
,
N_
(
"%
ll
u packets reassembled ok"
),
opt_number
},
{
"ReasmFails"
,
N_
(
"%
ll
u packet reassembles failed"
),
opt_number
},
{
"FragOKs"
,
N_
(
"%
ll
u fragments received ok"
),
opt_number
},
{
"FragFails"
,
N_
(
"%
ll
u fragments failed"
),
opt_number
},
{
"FragCreates"
,
N_
(
"%
ll
u fragments created"
),
opt_number
}
};
struct
entry
Ip6tab
[]
=
{
{
"Ip6InReceives"
,
N_
(
"%u total packets received"
),
number
},
{
"Ip6InHdrErrors"
,
N_
(
"%u with invalid headers"
),
opt_number
},
{
"Ip6InTooBigErrors"
,
N_
(
"%u with packets too big"
),
opt_number
},
{
"Ip6InNoRoutes"
,
N_
(
"%u incoming packets with no route"
),
opt_number
},
{
"Ip6InAddrErrors"
,
N_
(
"%u with invalid addresses"
),
opt_number
},
{
"Ip6InUnknownProtos"
,
N_
(
"%u with unknown protocol"
),
opt_number
},
{
"Ip6InTruncatedPkts"
,
N_
(
"%u with truncated packets"
),
opt_number
},
{
"Ip6InDiscards"
,
N_
(
"%u incoming packets discarded"
),
number
},
{
"Ip6InDelivers"
,
N_
(
"%u incoming packets delivered"
),
number
},
{
"Ip6OutForwDatagrams"
,
N_
(
"%u forwarded"
),
number
},
{
"Ip6OutRequests"
,
N_
(
"%u requests sent out"
),
number
},
/*? */
{
"Ip6OutDiscards"
,
N_
(
"%u outgoing packets dropped"
),
opt_number
},
{
"Ip6OutNoRoutes"
,
N_
(
"%u dropped because of missing route"
),
opt_number
},
{
"Ip6ReasmTimeout"
,
N_
(
"%u fragments dropped after timeout"
),
opt_number
},
{
"Ip6ReasmReqds"
,
N_
(
"%u reassemblies required"
),
opt_number
},
/* ? */
{
"Ip6ReasmOKs"
,
N_
(
"%u packets reassembled ok"
),
opt_number
},
{
"Ip6ReasmFails"
,
N_
(
"%u packet reassembles failed"
),
opt_number
},
{
"Ip6FragOKs"
,
N_
(
"%u fragments received ok"
),
opt_number
},
{
"Ip6FragFails"
,
N_
(
"%u fragments failed"
),
opt_number
},
{
"Ip6FragCreates"
,
N_
(
"%u fragments created"
),
opt_number
},
{
"Ip6InMcastPkts"
,
N_
(
"%u incoming multicast packets"
),
opt_number
},
{
"Ip6OutMcastPkts"
,
N_
(
"%u outgoing multicast packets"
),
opt_number
}
{
"Ip6InReceives"
,
N_
(
"%
ll
u total packets received"
),
number
},
{
"Ip6InHdrErrors"
,
N_
(
"%
ll
u with invalid headers"
),
opt_number
},
{
"Ip6InTooBigErrors"
,
N_
(
"%
ll
u with packets too big"
),
opt_number
},
{
"Ip6InNoRoutes"
,
N_
(
"%
ll
u incoming packets with no route"
),
opt_number
},
{
"Ip6InAddrErrors"
,
N_
(
"%
ll
u with invalid addresses"
),
opt_number
},
{
"Ip6InUnknownProtos"
,
N_
(
"%
ll
u with unknown protocol"
),
opt_number
},
{
"Ip6InTruncatedPkts"
,
N_
(
"%
ll
u with truncated packets"
),
opt_number
},
{
"Ip6InDiscards"
,
N_
(
"%
ll
u incoming packets discarded"
),
number
},
{
"Ip6InDelivers"
,
N_
(
"%
ll
u incoming packets delivered"
),
number
},
{
"Ip6OutForwDatagrams"
,
N_
(
"%
ll
u forwarded"
),
number
},
{
"Ip6OutRequests"
,
N_
(
"%
ll
u requests sent out"
),
number
},
/*? */
{
"Ip6OutDiscards"
,
N_
(
"%
ll
u outgoing packets dropped"
),
opt_number
},
{
"Ip6OutNoRoutes"
,
N_
(
"%
ll
u dropped because of missing route"
),
opt_number
},
{
"Ip6ReasmTimeout"
,
N_
(
"%
ll
u fragments dropped after timeout"
),
opt_number
},
{
"Ip6ReasmReqds"
,
N_
(
"%
ll
u reassemblies required"
),
opt_number
},
/* ? */
{
"Ip6ReasmOKs"
,
N_
(
"%
ll
u packets reassembled ok"
),
opt_number
},
{
"Ip6ReasmFails"
,
N_
(
"%
ll
u packet reassembles failed"
),
opt_number
},
{
"Ip6FragOKs"
,
N_
(
"%
ll
u fragments received ok"
),
opt_number
},
{
"Ip6FragFails"
,
N_
(
"%
ll
u fragments failed"
),
opt_number
},
{
"Ip6FragCreates"
,
N_
(
"%
ll
u fragments created"
),
opt_number
},
{
"Ip6InMcastPkts"
,
N_
(
"%
ll
u incoming multicast packets"
),
opt_number
},
{
"Ip6OutMcastPkts"
,
N_
(
"%
ll
u outgoing multicast packets"
),
opt_number
}
};
struct
entry
Icmptab
[]
=
{
{
"InMsgs"
,
N_
(
"%u ICMP messages received"
),
number
},
{
"InErrors"
,
N_
(
"%u input ICMP message failed."
),
number
},
{
"InDestUnreachs"
,
N_
(
"destination unreachable: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InTimeExcds"
,
N_
(
"timeout in transit: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InParmProbs"
,
N_
(
"wrong parameters: %u"
),
i_inp_icmp
|
I_TITLE
},
/*? */
{
"InSrcQuenchs"
,
N_
(
"source quenches: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InRedirects"
,
N_
(
"redirects: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InEchos"
,
N_
(
"echo requests: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InEchoReps"
,
N_
(
"echo replies: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InTimestamps"
,
N_
(
"timestamp request: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InTimestampReps"
,
N_
(
"timestamp reply: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"InAddrMasks"
,
N_
(
"address mask request: %u"
),
i_inp_icmp
|
I_TITLE
},
/*? */
{
"InAddrMaskReps"
,
N_
(
"address mask replies: %u"
),
i_inp_icmp
|
I_TITLE
},
/*? */
{
"OutMsgs"
,
N_
(
"%u ICMP messages sent"
),
number
},
{
"OutErrors"
,
N_
(
"%u ICMP messages failed"
),
number
},
{
"OutDestUnreachs"
,
N_
(
"destination unreachable: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutTimeExcds"
,
N_
(
"time exceeded: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutParmProbs"
,
N_
(
"wrong parameters: %u"
),
i_outp_icmp
|
I_TITLE
},
/*? */
{
"OutSrcQuenchs"
,
N_
(
"source quench: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutRedirects"
,
N_
(
"redirect: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutEchos"
,
N_
(
"echo request: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutEchoReps"
,
N_
(
"echo replies: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutTimestamps"
,
N_
(
"timestamp requests: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutTimestampReps"
,
N_
(
"timestamp replies: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutAddrMasks"
,
N_
(
"address mask requests: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutAddrMaskReps"
,
N_
(
"address mask replies: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"InMsgs"
,
N_
(
"%
ll
u ICMP messages received"
),
number
},
{
"InErrors"
,
N_
(
"%
ll
u input ICMP message failed."
),
number
},
{
"InDestUnreachs"
,
N_
(
"destination unreachable: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InTimeExcds"
,
N_
(
"timeout in transit: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InParmProbs"
,
N_
(
"wrong parameters: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
/*? */
{
"InSrcQuenchs"
,
N_
(
"source quenches: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InRedirects"
,
N_
(
"redirects: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InEchos"
,
N_
(
"echo requests: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InEchoReps"
,
N_
(
"echo replies: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InTimestamps"
,
N_
(
"timestamp request: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InTimestampReps"
,
N_
(
"timestamp reply: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"InAddrMasks"
,
N_
(
"address mask request: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
/*? */
{
"InAddrMaskReps"
,
N_
(
"address mask replies: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
/*? */
{
"OutMsgs"
,
N_
(
"%
ll
u ICMP messages sent"
),
number
},
{
"OutErrors"
,
N_
(
"%
ll
u ICMP messages failed"
),
number
},
{
"OutDestUnreachs"
,
N_
(
"destination unreachable: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutTimeExcds"
,
N_
(
"time exceeded: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutParmProbs"
,
N_
(
"wrong parameters: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
/*? */
{
"OutSrcQuenchs"
,
N_
(
"source quench: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutRedirects"
,
N_
(
"redirect: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutEchos"
,
N_
(
"echo request: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutEchoReps"
,
N_
(
"echo replies: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutTimestamps"
,
N_
(
"timestamp requests: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutTimestampReps"
,
N_
(
"timestamp replies: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutAddrMasks"
,
N_
(
"address mask requests: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"OutAddrMaskReps"
,
N_
(
"address mask replies: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
};
struct
entry
Icmp6tab
[]
=
{
{
"Icmp6InMsgs"
,
N_
(
"%u ICMP messages received"
),
number
},
{
"Icmp6InErrors"
,
N_
(
"%u input ICMP message failed."
),
number
},
{
"Icmp6InDestUnreachs"
,
N_
(
"destination unreachable: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InPktTooBigs"
,
N_
(
"packets too big: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InTimeExcds"
,
N_
(
"received ICMPv6 time exceeded: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InParmProblems"
,
N_
(
"parameter problem: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InEchos"
,
N_
(
"echo requests: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InEchoReplies"
,
N_
(
"echo replies: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InGroupMembQueries"
,
N_
(
"group member queries: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InGroupMembResponses"
,
N_
(
"group member responses: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InGroupMembReductions"
,
N_
(
"group member reductions: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InRouterSolicits"
,
N_
(
"router solicits: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InRouterAdvertisements"
,
N_
(
"router advertisement: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InNeighborSolicits"
,
N_
(
"neighbour solicits: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InNeighborAdvertisements"
,
N_
(
"neighbour advertisement: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InRedirects"
,
N_
(
"redirects: %u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6OutMsgs"
,
N_
(
"%u ICMP messages sent"
),
number
},
{
"Icmp6OutDestUnreachs"
,
N_
(
"destination unreachable: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutPktTooBigs"
,
N_
(
"packets too big: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutTimeExcds"
,
N_
(
"sent ICMPv6 time exceeded: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutParmProblems"
,
N_
(
"parameter problem: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutEchos"
,
N_
(
"echo requests: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutEchoReplies"
,
N_
(
"echo replies: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutGroupMembQueries"
,
N_
(
"group member queries: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutGroupMembResponses"
,
N_
(
"group member responses: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutGroupMembReductions"
,
N_
(
"group member reductions: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutRouterSolicits"
,
N_
(
"router solicits: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutRouterAdvertisements "
,
N_
(
"router advertisement: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutNeighborSolicits"
,
N_
(
"neighbor solicits: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutNeighborAdvertisements"
,
N_
(
"neighbor advertisements: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutRedirects"
,
N_
(
"redirects: %u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6InMsgs"
,
N_
(
"%
ll
u ICMP messages received"
),
number
},
{
"Icmp6InErrors"
,
N_
(
"%
ll
u input ICMP message failed."
),
number
},
{
"Icmp6InDestUnreachs"
,
N_
(
"destination unreachable: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InPktTooBigs"
,
N_
(
"packets too big: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InTimeExcds"
,
N_
(
"received ICMPv6 time exceeded: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InParmProblems"
,
N_
(
"parameter problem: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InEchos"
,
N_
(
"echo requests: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InEchoReplies"
,
N_
(
"echo replies: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InGroupMembQueries"
,
N_
(
"group member queries: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InGroupMembResponses"
,
N_
(
"group member responses: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InGroupMembReductions"
,
N_
(
"group member reductions: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InRouterSolicits"
,
N_
(
"router solicits: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InRouterAdvertisements"
,
N_
(
"router advertisement: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InNeighborSolicits"
,
N_
(
"neighbour solicits: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InNeighborAdvertisements"
,
N_
(
"neighbour advertisement: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6InRedirects"
,
N_
(
"redirects: %
ll
u"
),
i_inp_icmp
|
I_TITLE
},
{
"Icmp6OutMsgs"
,
N_
(
"%
ll
u ICMP messages sent"
),
number
},
{
"Icmp6OutDestUnreachs"
,
N_
(
"destination unreachable: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutPktTooBigs"
,
N_
(
"packets too big: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutTimeExcds"
,
N_
(
"sent ICMPv6 time exceeded: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutParmProblems"
,
N_
(
"parameter problem: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutEchos"
,
N_
(
"echo requests: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutEchoReplies"
,
N_
(
"echo replies: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutGroupMembQueries"
,
N_
(
"group member queries: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutGroupMembResponses"
,
N_
(
"group member responses: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutGroupMembReductions"
,
N_
(
"group member reductions: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutRouterSolicits"
,
N_
(
"router solicits: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutRouterAdvertisements "
,
N_
(
"router advertisement: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutNeighborSolicits"
,
N_
(
"neighbor solicits: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutNeighborAdvertisements"
,
N_
(
"neighbor advertisements: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
{
"Icmp6OutRedirects"
,
N_
(
"redirects: %
ll
u"
),
i_outp_icmp
|
I_TITLE
},
};
struct
entry
Tcptab
[]
=
...
...
@@ -181,122 +181,122 @@ struct entry Tcptab[] =
{
"RtoMin"
,
""
,
number
},
{
"RtoMax"
,
""
,
number
},
{
"MaxConn"
,
""
,
number
},
{
"ActiveOpens"
,
N_
(
"%u active connections openings"
),
number
},
{
"PassiveOpens"
,
N_
(
"%u passive connection openings"
),
number
},
{
"AttemptFails"
,
N_
(
"%u failed connection attempts"
),
number
},
{
"EstabResets"
,
N_
(
"%u connection resets received"
),
number
},
{
"CurrEstab"
,
N_
(
"%u connections established"
),
number
},
{
"InSegs"
,
N_
(
"%u segments received"
),
number
},
{
"OutSegs"
,
N_
(
"%u segments send out"
),
number
},
{
"RetransSegs"
,
N_
(
"%u segments retransmited"
),
number
},
{
"InErrs"
,
N_
(
"%u bad segments received."
),
number
},
{
"OutRsts"
,
N_
(
"%u resets sent"
),
number
},
{
"ActiveOpens"
,
N_
(
"%
ll
u active connections openings"
),
number
},
{
"PassiveOpens"
,
N_
(
"%
ll
u passive connection openings"
),
number
},
{
"AttemptFails"
,
N_
(
"%
ll
u failed connection attempts"
),
number
},
{
"EstabResets"
,
N_
(
"%
ll
u connection resets received"
),
number
},
{
"CurrEstab"
,
N_
(
"%
ll
u connections established"
),
number
},
{
"InSegs"
,
N_
(
"%
ll
u segments received"
),
number
},
{
"OutSegs"
,
N_
(
"%
ll
u segments send out"
),
number
},
{
"RetransSegs"
,
N_
(
"%
ll
u segments retransmited"
),
number
},
{
"InErrs"
,
N_
(
"%
ll
u bad segments received."
),
number
},
{
"OutRsts"
,
N_
(
"%
ll
u resets sent"
),
number
},
};
struct
entry
Udptab
[]
=
{
{
"InDatagrams"
,
N_
(
"%u packets received"
),
number
},
{
"NoPorts"
,
N_
(
"%u packets to unknown port received."
),
number
},
{
"InErrors"
,
N_
(
"%u packet receive errors"
),
number
},
{
"OutDatagrams"
,
N_
(
"%u packets sent"
),
number
},
{
"RcvbufErrors"
,
N_
(
"%u receive buffer errors"
),
number
},
{
"SndbufErrors"
,
N_
(
"%u send buffer errors"
),
number
},
{
"InDatagrams"
,
N_
(
"%
ll
u packets received"
),
number
},
{
"NoPorts"
,
N_
(
"%
ll
u packets to unknown port received."
),
number
},
{
"InErrors"
,
N_
(
"%
ll
u packet receive errors"
),
number
},
{
"OutDatagrams"
,
N_
(
"%
ll
u packets sent"
),
number
},
{
"RcvbufErrors"
,
N_
(
"%
ll
u receive buffer errors"
),
number
},
{
"SndbufErrors"
,
N_
(
"%
ll
u send buffer errors"
),
number
},
};
struct
entry
Udp6tab
[]
=
{
{
"Udp6InDatagrams"
,
N_
(
"%u packets received"
),
number
},
{
"Udp6NoPorts"
,
N_
(
"%u packets to unknown port received."
),
number
},
{
"Udp6InErrors"
,
N_
(
"%u packet receive errors"
),
number
},
{
"Udp6OutDatagrams"
,
N_
(
"%u packets sent"
),
number
},
{
"Udp6InDatagrams"
,
N_
(
"%
ll
u packets received"
),
number
},
{
"Udp6NoPorts"
,
N_
(
"%
ll
u packets to unknown port received."
),
number
},
{
"Udp6InErrors"
,
N_
(
"%
ll
u packet receive errors"
),
number
},
{
"Udp6OutDatagrams"
,
N_
(
"%
ll
u packets sent"
),
number
},
};
struct
entry
Tcpexttab
[]
=
{
{
"SyncookiesSent"
,
N_
(
"%u SYN cookies sent"
),
opt_number
},
{
"SyncookiesRecv"
,
N_
(
"%u SYN cookies received"
),
opt_number
},
{
"SyncookiesFailed"
,
N_
(
"%u invalid SYN cookies received"
),
opt_number
},
{
"SyncookiesSent"
,
N_
(
"%
ll
u SYN cookies sent"
),
opt_number
},
{
"SyncookiesRecv"
,
N_
(
"%
ll
u SYN cookies received"
),
opt_number
},
{
"SyncookiesFailed"
,
N_
(
"%
ll
u invalid SYN cookies received"
),
opt_number
},
{
"EmbryonicRsts"
,
N_
(
"%u resets received for embryonic SYN_RECV sockets"
),
{
"EmbryonicRsts"
,
N_
(
"%
ll
u resets received for embryonic SYN_RECV sockets"
),
opt_number
},
{
"PruneCalled"
,
N_
(
"%u packets pruned from receive queue because of socket"
{
"PruneCalled"
,
N_
(
"%
ll
u packets pruned from receive queue because of socket"
" buffer overrun"
),
opt_number
},
/* obsolete: 2.2.0 doesn't do that anymore */
{
"RcvPruned"
,
N_
(
"%u packets pruned from receive queue"
),
opt_number
},
{
"OfoPruned"
,
N_
(
"%u packets dropped from out-of-order queue because of"
{
"RcvPruned"
,
N_
(
"%
ll
u packets pruned from receive queue"
),
opt_number
},
{
"OfoPruned"
,
N_
(
"%
ll
u packets dropped from out-of-order queue because of"
" socket buffer overrun"
),
opt_number
},
{
"OutOfWindowIcmps"
,
N_
(
"%u ICMP packets dropped because they were "
{
"OutOfWindowIcmps"
,
N_
(
"%
ll
u ICMP packets dropped because they were "
"out-of-window"
),
opt_number
},
{
"LockDroppedIcmps"
,
N_
(
"%u ICMP packets dropped because"
{
"LockDroppedIcmps"
,
N_
(
"%
ll
u ICMP packets dropped because"
" socket was locked"
),
opt_number
},
{
"TW"
,
N_
(
"%u TCP sockets finished time wait in fast timer"
),
opt_number
},
{
"TWRecycled"
,
N_
(
"%u time wait sockets recycled by time stamp"
),
opt_number
},
{
"TWKilled"
,
N_
(
"%u TCP sockets finished time wait in slow timer"
),
opt_number
},
{
"PAWSPassive"
,
N_
(
"%u passive connections rejected because of"
{
"TW"
,
N_
(
"%
ll
u TCP sockets finished time wait in fast timer"
),
opt_number
},
{
"TWRecycled"
,
N_
(
"%
ll
u time wait sockets recycled by time stamp"
),
opt_number
},
{
"TWKilled"
,
N_
(
"%
ll
u TCP sockets finished time wait in slow timer"
),
opt_number
},
{
"PAWSPassive"
,
N_
(
"%
ll
u passive connections rejected because of"
" time stamp"
),
opt_number
},
{
"PAWSActive"
,
N_
(
"%u active connections rejected because of "
{
"PAWSActive"
,
N_
(
"%
ll
u active connections rejected because of "
"time stamp"
),
opt_number
},
{
"PAWSEstab"
,
N_
(
"%u packets rejects in established connections because of"
{
"PAWSEstab"
,
N_
(
"%
ll
u packets rejects in established connections because of"
" timestamp"
),
opt_number
},
{
"DelayedACKs"
,
N_
(
"%u delayed acks sent"
),
opt_number
},
{
"DelayedACKLocked"
,
N_
(
"%u delayed acks further delayed because of"
{
"DelayedACKs"
,
N_
(
"%
ll
u delayed acks sent"
),
opt_number
},
{
"DelayedACKLocked"
,
N_
(
"%
ll
u delayed acks further delayed because of"
" locked socket"
),
opt_number
},
{
"DelayedACKLost"
,
N_
(
"Quick ack mode was activated %u times"
),
opt_number
},
{
"ListenOverflows"
,
N_
(
"%u times the listen queue of a socket overflowed"
),
{
"DelayedACKLost"
,
N_
(
"Quick ack mode was activated %
ll
u times"
),
opt_number
},
{
"ListenOverflows"
,
N_
(
"%
ll
u times the listen queue of a socket overflowed"
),
opt_number
},
{
"ListenDrops"
,
N_
(
"%u SYNs to LISTEN sockets dropped"
),
opt_number
},
{
"TCPPrequeued"
,
N_
(
"%
u packets directly queued to recvmsg prequeue."
),
{
"ListenDrops"
,
N_
(
"%
ll
u SYNs to LISTEN sockets dropped"
),
opt_number
},
{
"TCPPrequeued"
,
N_
(
"%
llu packets directly queued to recvmsg prequeue."
),
opt_number
},
{
"TCPDirectCopyFromBacklog"
,
N_
(
"%u bytes directly in process context from backlog"
),
opt_number
},
{
"TCPDirectCopyFromPrequeue"
,
N_
(
"%u bytes directly received in process context from prequeue"
),
{
"TCPDirectCopyFromBacklog"
,
N_
(
"%
ll
u bytes directly in process context from backlog"
),
opt_number
},
{
"TCPDirectCopyFromPrequeue"
,
N_
(
"%
ll
u bytes directly received in process context from prequeue"
),
opt_number
},
{
"TCPPrequeueDropped"
,
N_
(
"%u packets dropped from prequeue"
),
opt_number
},
{
"TCPHPHits"
,
N_
(
"%u packet headers predicted"
),
number
},
{
"TCPHPHitsToUser"
,
N_
(
"%u packets header predicted and "
{
"TCPPrequeueDropped"
,
N_
(
"%
ll
u packets dropped from prequeue"
),
opt_number
},
{
"TCPHPHits"
,
N_
(
"%
ll
u packet headers predicted"
),
number
},
{
"TCPHPHitsToUser"
,
N_
(
"%
ll
u packets header predicted and "
"directly queued to user"
),
opt_number
},
{
"SockMallocOOM"
,
N_
(
"Ran %u times out of system memory during "
{
"SockMallocOOM"
,
N_
(
"Ran %
ll
u times out of system memory during "
"packet sending"
),
opt_number
},
{
"TCPPureAcks"
,
N_
(
"%u acknowledgments not containing data payload received"
),
opt_number
},
{
"TCPHPAcks"
,
N_
(
"%u predicted acknowledgments"
),
opt_number
},
{
"TCPRenoRecovery"
,
N_
(
"%u times recovered from packet loss due to fast retransmit"
),
opt_number
},
{
"TCPSackRecovery"
,
N_
(
"%u times recovered from packet loss by selective acknowledgements"
),
opt_number
},
{
"TCPSACKReneging"
,
N_
(
"%u bad SACK blocks received"
),
opt_number
},
{
"TCPFACKReorder"
,
N_
(
"Detected reordering %u times using FACK"
),
opt_number
},
{
"TCPSACKReorder"
,
N_
(
"Detected reordering %u times using SACK"
),
opt_number
},
{
"TCPTSReorder"
,
N_
(
"Detected reordering %u times using time stamp"
),
opt_number
},
{
"TCPRenoReorder"
,
N_
(
"Detected reordering %u times using reno fast retransmit"
),
opt_number
},
{
"TCPFullUndo"
,
N_
(
"%
u congestion windows fully recovered without slow start"
),
opt_number
},
{
"TCPPartialUndo"
,
N_
(
"%u congestion windows partially recovered using Hoe heuristic"
),
opt_number
},
{
"TCPDSackUndo"
,
N_
(
"%u congestion window recovered without slow start using DSACK"
),
opt_number
},
{
"TCPLossUndo"
,
N_
(
"%u congestion windows recovered without slow start after partial ack"
),
opt_number
},
{
"TCPLostRetransmits"
,
N_
(
"%u retransmits lost"
),
opt_number
},
{
"TCPRenoFailures"
,
N_
(
"%u timeouts after reno fast retransmit"
),
opt_number
},
{
"TCPSackFailures"
,
N_
(
"%u timeouts after SACK recovery"
),
opt_number
},
{
"TCPLossFailures"
,
N_
(
"%u timeouts in loss state"
),
opt_number
},
{
"TCPFastRetrans"
,
N_
(
"%u fast retransmits"
),
opt_number
},
{
"TCPForwardRetrans"
,
N_
(
"%
u forward retransmits"
),
opt_number
},
{
"TCPSlowStartRetrans"
,
N_
(
"%u retransmits in slow start"
),
opt_number
},
{
"TCPTimeouts"
,
N_
(
"%u other TCP timeouts"
),
opt_number
},
{
"TCPRenoRecoveryFailed"
,
N_
(
"%u reno fast retransmits failed"
),
opt_number
},
{
"TCPSackRecoveryFail"
,
N_
(
"%u SACK retransmits failed"
),
opt_number
},
{
"TCPSchedulerFailed"
,
N_
(
"%u times receiver scheduled too late for direct processing"
),
opt_number
},
{
"TCPRcvCollapsed"
,
N_
(
"%u packets collapsed in receive queue due to low socket buffer"
),
opt_number
},
{
"TCPDSACKOldSent"
,
N_
(
"%u DSACKs sent for old packets"
),
opt_number
},
{
"TCPDSACKOfoSent"
,
N_
(
"%u DSACKs sent for out of order packets"
),
opt_number
},
{
"TCPDSACKRecv"
,
N_
(
"%u DSACKs received"
),
opt_number
},
{
"TCPDSACKOfoRecv"
,
N_
(
"%u DSACKs for out of order packets received"
),
opt_number
},
{
"TCPAbortOnSyn"
,
N_
(
"%u connections reset due to unexpected SYN"
),
opt_number
},
{
"TCPAbortOnData"
,
N_
(
"%u connections reset due to unexpected data"
),
opt_number
},
{
"TCPAbortOnClose"
,
N_
(
"%u connections reset due to early user close"
),
opt_number
},
{
"TCPAbortOnMemory"
,
N_
(
"%u connections aborted due to memory pressure"
),
opt_number
},
{
"TCPAbortOnTimeout"
,
N_
(
"%u connections aborted due to timeout"
),
opt_number
},
{
"TCPAbortOnLinger"
,
N_
(
"%u connections aborted after user close in linger timeout"
),
opt_number
},
{
"TCPAbortFailed"
,
N_
(
"%
u times unabled to send RST due to no memory"
),
opt_number
},
{
"TCPMemoryPressures"
,
N_
(
"TCP ran low on memory %
u times"
),
opt_number
},
{
"TCPLoss"
,
N_
(
"%u TCP data loss events"
),
opt_number
},
{
"TCPDSACKUndo"
,
N_
(
"%
u congestion windows recovered without slow start by DSACK"
),
{
"TCPPureAcks"
,
N_
(
"%
ll
u acknowledgments not containing data payload received"
),
opt_number
},
{
"TCPHPAcks"
,
N_
(
"%
ll
u predicted acknowledgments"
),
opt_number
},
{
"TCPRenoRecovery"
,
N_
(
"%
ll
u times recovered from packet loss due to fast retransmit"
),
opt_number
},
{
"TCPSackRecovery"
,
N_
(
"%
ll
u times recovered from packet loss by selective acknowledgements"
),
opt_number
},
{
"TCPSACKReneging"
,
N_
(
"%
ll
u bad SACK blocks received"
),
opt_number
},
{
"TCPFACKReorder"
,
N_
(
"Detected reordering %
ll
u times using FACK"
),
opt_number
},
{
"TCPSACKReorder"
,
N_
(
"Detected reordering %
ll
u times using SACK"
),
opt_number
},
{
"TCPTSReorder"
,
N_
(
"Detected reordering %
ll
u times using time stamp"
),
opt_number
},
{
"TCPRenoReorder"
,
N_
(
"Detected reordering %
ll
u times using reno fast retransmit"
),
opt_number
},
{
"TCPFullUndo"
,
N_
(
"%
llu congestion windows fully recovered without slow start"
),
opt_number
},
{
"TCPPartialUndo"
,
N_
(
"%
ll
u congestion windows partially recovered using Hoe heuristic"
),
opt_number
},
{
"TCPDSackUndo"
,
N_
(
"%
ll
u congestion window recovered without slow start using DSACK"
),
opt_number
},
{
"TCPLossUndo"
,
N_
(
"%
ll
u congestion windows recovered without slow start after partial ack"
),
opt_number
},
{
"TCPLostRetransmits"
,
N_
(
"%
ll
u retransmits lost"
),
opt_number
},
{
"TCPRenoFailures"
,
N_
(
"%
ll
u timeouts after reno fast retransmit"
),
opt_number
},
{
"TCPSackFailures"
,
N_
(
"%
ll
u timeouts after SACK recovery"
),
opt_number
},
{
"TCPLossFailures"
,
N_
(
"%
ll
u timeouts in loss state"
),
opt_number
},
{
"TCPFastRetrans"
,
N_
(
"%
ll
u fast retransmits"
),
opt_number
},
{
"TCPForwardRetrans"
,
N_
(
"%
llu forward retransmits"
),
opt_number
},
{
"TCPSlowStartRetrans"
,
N_
(
"%
ll
u retransmits in slow start"
),
opt_number
},
{
"TCPTimeouts"
,
N_
(
"%
ll
u other TCP timeouts"
),
opt_number
},
{
"TCPRenoRecoveryFailed"
,
N_
(
"%
ll
u reno fast retransmits failed"
),
opt_number
},
{
"TCPSackRecoveryFail"
,
N_
(
"%
ll
u SACK retransmits failed"
),
opt_number
},
{
"TCPSchedulerFailed"
,
N_
(
"%
ll
u times receiver scheduled too late for direct processing"
),
opt_number
},
{
"TCPRcvCollapsed"
,
N_
(
"%
ll
u packets collapsed in receive queue due to low socket buffer"
),
opt_number
},
{
"TCPDSACKOldSent"
,
N_
(
"%
ll
u DSACKs sent for old packets"
),
opt_number
},
{
"TCPDSACKOfoSent"
,
N_
(
"%
ll
u DSACKs sent for out of order packets"
),
opt_number
},
{
"TCPDSACKRecv"
,
N_
(
"%
ll
u DSACKs received"
),
opt_number
},
{
"TCPDSACKOfoRecv"
,
N_
(
"%
ll
u DSACKs for out of order packets received"
),
opt_number
},
{
"TCPAbortOnSyn"
,
N_
(
"%
ll
u connections reset due to unexpected SYN"
),
opt_number
},
{
"TCPAbortOnData"
,
N_
(
"%
ll
u connections reset due to unexpected data"
),
opt_number
},
{
"TCPAbortOnClose"
,
N_
(
"%
ll
u connections reset due to early user close"
),
opt_number
},
{
"TCPAbortOnMemory"
,
N_
(
"%
ll
u connections aborted due to memory pressure"
),
opt_number
},
{
"TCPAbortOnTimeout"
,
N_
(
"%
ll
u connections aborted due to timeout"
),
opt_number
},
{
"TCPAbortOnLinger"
,
N_
(
"%
ll
u connections aborted after user close in linger timeout"
),
opt_number
},
{
"TCPAbortFailed"
,
N_
(
"%
llu times unabled to send RST due to no memory"
),
opt_number
},
{
"TCPMemoryPressures"
,
N_
(
"TCP ran low on memory %
llu times"
),
opt_number
},
{
"TCPLoss"
,
N_
(
"%
ll
u TCP data loss events"
),
opt_number
},
{
"TCPDSACKUndo"
,
N_
(
"%
llu congestion windows recovered without slow start by DSACK"
),
opt_number
},
{
"TCPRenoRecoveryFail"
,
N_
(
"%u classic Reno fast retransmits failed"
),
opt_number
},
{
"TCPRenoRecoveryFail"
,
N_
(
"%
ll
u classic Reno fast retransmits failed"
),
opt_number
},
};
struct
tabtab
{
...
...
@@ -332,7 +332,7 @@ int cmpentries(const void *a, const void *b)
return
strcmp
(((
struct
entry
*
)
a
)
->
title
,
((
struct
entry
*
)
b
)
->
title
);
}
void
printval
(
struct
tabtab
*
tab
,
char
*
title
,
int
val
)
void
printval
(
struct
tabtab
*
tab
,
char
*
title
,
unsigned
long
long
val
)
{
struct
entry
*
ent
=
NULL
,
key
;
int
type
;
...
...
@@ -344,7 +344,7 @@ void printval(struct tabtab *tab, char *title, int val)
sizeof
(
struct
entry
),
cmpentries
);
if
(
!
ent
)
{
/* try our best */
if
(
val
)
printf
(
"%*s%s: %
d
\n
"
,
states
[
state
].
indent
,
""
,
title
,
val
);
printf
(
"%*s%s: %
llu
\n
"
,
states
[
state
].
indent
,
""
,
title
,
val
);
return
;
}
type
=
ent
->
type
;
...
...
@@ -454,7 +454,7 @@ int process_fd(FILE *f, int all, char *filter)
*
p
=
'\0'
;
if
(
*
sp
!=
'\0'
&&
*
(
tab
->
flag
))
printval
(
tab
,
sp
,
strtoul
(
np
,
&
np
,
10
));
printval
(
tab
,
sp
,
strtoul
l
(
np
,
&
np
,
10
));
sp
=
p
+
1
;
}
...
...
@@ -481,12 +481,12 @@ void cpytitle(char *original, char *new)
void
process6_fd
(
FILE
*
f
)
{
char
buf1
[
1024
],
buf2
[
50
],
buf3
[
1024
];
unsigned
long
val
;
unsigned
long
long
val
;
struct
tabtab
*
tab
=
NULL
;
int
cpflg
=
0
;
while
(
fgets
(
buf1
,
sizeof
buf1
,
f
))
{
sscanf
(
buf1
,
"%s %lu"
,
buf2
,
&
val
);
sscanf
(
buf1
,
"%s %l
l
u"
,
buf2
,
&
val
);
if
(
!
cpflg
)
{
cpytitle
(
buf2
,
buf3
);
tab
=
newtable
(
snmp6tabs
,
buf3
);
...
...
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