sctp.c (332227) | sctp.c (332637) |
---|---|
1/*- 2 * Copyright (c) 2015 3 * The Regents of the University of California. All rights reserved. 4 * Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2015 3 * The Regents of the University of California. All rights reserved. 4 * Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: stable/11/usr.bin/systat/sctp.c 332227 2018-04-07 20:22:04Z tuexen $"); | 32__FBSDID("$FreeBSD: stable/11/usr.bin/systat/sctp.c 332637 2018-04-16 21:22:12Z tuexen $"); |
33 34#include <sys/param.h> 35#include <sys/types.h> 36#include <sys/socket.h> 37#include <sys/sysctl.h> 38 39#include <netinet/sctp.h> 40 --- 7 unchanged lines hidden (view full) --- 48static struct sctpstat curstat, initstat, oldstat; 49 50/*- 51--0 1 2 3 4 5 6 7 52--0123456789012345678901234567890123456789012345678901234567890123456789012345 5300 SCTP Associations SCTP Packets 5401999999999999 associations initiated 999999999999 packets sent 5502999999999999 associations accepted 999999999999 packets received | 33 34#include <sys/param.h> 35#include <sys/types.h> 36#include <sys/socket.h> 37#include <sys/sysctl.h> 38 39#include <netinet/sctp.h> 40 --- 7 unchanged lines hidden (view full) --- 48static struct sctpstat curstat, initstat, oldstat; 49 50/*- 51--0 1 2 3 4 5 6 7 52--0123456789012345678901234567890123456789012345678901234567890123456789012345 5300 SCTP Associations SCTP Packets 5401999999999999 associations initiated 999999999999 packets sent 5502999999999999 associations accepted 999999999999 packets received |
5603999999999999 associations established 999999999999 - out of the blue 5704999999999999 associations restarted 999999999999 - bad vtag 5805999999999999 associations terminated 999999999999 - bad crc32c 5906999999999999 associations aborted 6007 6108 SCTP Timers SCTP Chunks 6209999999999999 init timeouts 999999999999 control chunks sent 6310999999999999 cookie timeouts 999999999999 data chunks sent 6411999999999999 data timeouts 999999999999 - ordered 6512999999999999 delayed sack timeouts 999999999999 - unordered 6613999999999999 shutdown timeouts 999999999999 control chunks received 6714999999999999 shutdown-ack timeouts 999999999999 data chunks received 6815999999999999 shutdown guard timeouts 999999999999 - ordered 6916999999999999 heartbeat timeouts 999999999999 - unordered 7017999999999999 path MTU timeouts 7118999999999999 autoclose timeouts SCTP user messages 7219999999999999 asconf timeouts 999999999999 fragmented 7320999999999999 stream reset timeouts 999999999999 reassembled | 5603999999999999 associations restarted 999999999999 - out of the blue 5704999999999999 associations terminated 999999999999 - bad vtag 5805999999999999 associations aborted 999999999999 - bad crc32c 5906 6007 SCTP Timers SCTP Chunks 6108999999999999 init timeouts 999999999999 control chunks sent 6209999999999999 cookie timeouts 999999999999 data chunks sent 6310999999999999 data timeouts 999999999999 - ordered 6411999999999999 delayed sack timeouts 999999999999 - unordered 6512999999999999 shutdown timeouts 999999999999 control chunks received 6613999999999999 shutdown-ack timeouts 999999999999 data chunks received 6714999999999999 shutdown guard timeouts 999999999999 - ordered 6815999999999999 heartbeat timeouts 999999999999 - unordered 6916999999999999 path MTU timeouts 7017999999999999 autoclose timeouts SCTP user messages 7118999999999999 asconf timeouts 999999999999 fragmented 7219999999999999 stream reset timeouts 999999999999 reassembled |
74--0123456789012345678901234567890123456789012345678901234567890123456789012345 75--0 1 2 3 4 5 6 7 76*/ 77 78WINDOW * 79opensctp(void) 80{ 81 return (subwin(stdscr, LINES-3-1, 0, MAINWIN_ROW, 0)); --- 13 unchanged lines hidden (view full) --- 95labelsctp(void) 96{ 97 wmove(wnd, 0, 0); wclrtoeol(wnd); 98#define L(row, str) mvwprintw(wnd, row, 13, str) 99#define R(row, str) mvwprintw(wnd, row, 51, str); 100 L(0, "SCTP Associations"); R(0, "SCTP Packets"); 101 L(1, "associations initiated"); R(1, "packets sent"); 102 L(2, "associations accepted"); R(2, "packets received"); | 73--0123456789012345678901234567890123456789012345678901234567890123456789012345 74--0 1 2 3 4 5 6 7 75*/ 76 77WINDOW * 78opensctp(void) 79{ 80 return (subwin(stdscr, LINES-3-1, 0, MAINWIN_ROW, 0)); --- 13 unchanged lines hidden (view full) --- 94labelsctp(void) 95{ 96 wmove(wnd, 0, 0); wclrtoeol(wnd); 97#define L(row, str) mvwprintw(wnd, row, 13, str) 98#define R(row, str) mvwprintw(wnd, row, 51, str); 99 L(0, "SCTP Associations"); R(0, "SCTP Packets"); 100 L(1, "associations initiated"); R(1, "packets sent"); 101 L(2, "associations accepted"); R(2, "packets received"); |
103 L(3, "associations established"); R(3, "- out of the blue"); 104 L(4, "associations restarted"); R(4, "- bad vtag"); 105 L(5, "associations terminated"); R(5, "- bad crc32c"); 106 L(6, "associations aborted"); | 102 L(3, "associations restarted"); R(3, "- out of the blue"); 103 L(4, "associations terminated"); R(4, "- bad vtag"); 104 L(5, "associations aborted"); R(5, "- bad crc32c"); |
107 | 105 |
108 L(8, "SCTP Timers"); R(8, "SCTP Chunks"); 109 L(9, "init timeouts"); R(9, "control chunks sent"); 110 L(10, "cookie timeouts"); R(10, "data chunks sent"); 111 L(11, "data timeouts"); R(11, "- ordered"); 112 L(12, "delayed sack timeouts"); R(12, "- unordered"); 113 L(13, "shutdown timeouts"); R(13, "control chunks received"); 114 L(14, "shutdown-ack timeouts"); R(14, "data chunks received"); 115 L(15, "shutdown guard timeouts"); R(15, "- ordered"); 116 L(16, "heartbeat timeouts"); R(16, "- unordered"); 117 L(17, "path MTU timeouts"); 118 L(18, "autoclose timeouts"); R(18, "SCTP User Messages"); 119 L(19, "asconf timeouts"); R(19, "fragmented"); 120 L(20, "stream reset timeouts"); R(20, "reassembled"); | 106 L(7, "SCTP Timers"); R(7, "SCTP Chunks"); 107 L(8, "init timeouts"); R(8, "control chunks sent"); 108 L(9, "cookie timeouts"); R(9, "data chunks sent"); 109 L(10, "data timeouts"); R(10, "- ordered"); 110 L(11, "delayed sack timeouts"); R(11, "- unordered"); 111 L(12, "shutdown timeouts"); R(12, "control chunks received"); 112 L(13, "shutdown-ack timeouts"); R(13, "data chunks received"); 113 L(14, "shutdown guard timeouts"); R(14, "- ordered"); 114 L(15, "heartbeat timeouts"); R(15, "- unordered"); 115 L(16, "path MTU timeouts"); 116 L(17, "autoclose timeouts"); R(17, "SCTP User Messages"); 117 L(18, "asconf timeouts"); R(18, "fragmented"); 118 L(19, "stream reset timeouts"); R(19, "reassembled"); |
121#undef L 122#undef R 123} 124 125static void 126domode(struct sctpstat *ret) 127{ 128 const struct sctpstat *sub; --- 152 unchanged lines hidden (view full) --- 281 domode(&stats); 282 283#define DO(stat, row, col) \ 284 mvwprintw(wnd, row, col, "%12lu", stats.stat) 285#define L(row, stat) DO(stat, row, 0) 286#define R(row, stat) DO(stat, row, 38) 287 L(1, sctps_activeestab); R(1, sctps_outpackets); 288 L(2, sctps_passiveestab); R(2, sctps_inpackets); | 119#undef L 120#undef R 121} 122 123static void 124domode(struct sctpstat *ret) 125{ 126 const struct sctpstat *sub; --- 152 unchanged lines hidden (view full) --- 279 domode(&stats); 280 281#define DO(stat, row, col) \ 282 mvwprintw(wnd, row, col, "%12lu", stats.stat) 283#define L(row, stat) DO(stat, row, 0) 284#define R(row, stat) DO(stat, row, 38) 285 L(1, sctps_activeestab); R(1, sctps_outpackets); 286 L(2, sctps_passiveestab); R(2, sctps_inpackets); |
289 L(3, sctps_currestab); R(3, sctps_outoftheblue); 290 L(4, sctps_restartestab); R(4, sctps_badvtag); 291 L(5, sctps_shutdown); R(5, sctps_checksumerrors); 292 L(6, sctps_aborted); | 287 L(3, sctps_restartestab); R(3, sctps_outoftheblue); 288 L(4, sctps_shutdown); R(4, sctps_badvtag); 289 L(5, sctps_aborted); R(5, sctps_checksumerrors); |
293 294 | 290 291 |
295 L(9, sctps_timoinit); R(9, sctps_outcontrolchunks); 296 L(10, sctps_timocookie); R(10, sctps_senddata); 297 L(11, sctps_timodata); R(11, sctps_outorderchunks); 298 L(12, sctps_timosack); R(12, sctps_outunorderchunks); 299 L(13, sctps_timoshutdown); R(13, sctps_incontrolchunks); 300 L(14, sctps_timoshutdownack); R(14, sctps_recvdata); 301 L(15, sctps_timoshutdownguard); R(15, sctps_inorderchunks); 302 L(16, sctps_timoheartbeat); R(16, sctps_inunorderchunks); 303 L(17, sctps_timopathmtu); 304 L(18, sctps_timoautoclose); 305 L(19, sctps_timoasconf); R(19, sctps_fragusrmsgs); 306 L(20, sctps_timostrmrst); R(20, sctps_reasmusrmsgs); | 292 L(8, sctps_timoinit); R(8, sctps_outcontrolchunks); 293 L(9, sctps_timocookie); R(9, sctps_senddata); 294 L(10, sctps_timodata); R(10, sctps_outorderchunks); 295 L(11, sctps_timosack); R(11, sctps_outunorderchunks); 296 L(12, sctps_timoshutdown); R(12, sctps_incontrolchunks); 297 L(13, sctps_timoshutdownack); R(13, sctps_recvdata); 298 L(14, sctps_timoshutdownguard); R(14, sctps_inorderchunks); 299 L(15, sctps_timoheartbeat); R(15, sctps_inunorderchunks); 300 L(16, sctps_timopathmtu); 301 L(17, sctps_timoautoclose); 302 L(18, sctps_timoasconf); R(18, sctps_fragusrmsgs); 303 L(19, sctps_timostrmrst); R(19, sctps_reasmusrmsgs); |
307#undef DO 308#undef L 309#undef R 310} 311 312int 313initsctp(void) 314{ --- 46 unchanged lines hidden --- | 304#undef DO 305#undef L 306#undef R 307} 308 309int 310initsctp(void) 311{ --- 46 unchanged lines hidden --- |