source: asp3_tinet_ecnl_arm/trunk/asp3_dcre/tinet/net/net_count.h@ 352

Last change on this file since 352 was 352, checked in by coas-nagasima, 6 years ago

arm向けASP3版ECNLを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 18.4 KB
Line 
1/*
2 * TINET (TCP/IP Protocol Stack)
3 *
4 * Copyright (C) 2001-2017 by Dep. of Computer Science and Engineering
5 * Tomakomai National College of Technology, JAPAN
6 *
7 * 上記著作権者は,以下の (1)~(4) の条件か,Free Software Foundation
8 * によって公表されている GNU General Public License の Version 2 に記
9 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
10 * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下,
11 * 利用と呼ぶ)することを無償で許諾する.
12 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
13 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
14 * スコード中に含まれていること.
15 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
16 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
17 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
18 * の無保証規定を掲載すること.
19 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
20 * 用できない形で再配布する場合には,次の条件を満たすこと.
21 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
22 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
23 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
24 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
25 *
26 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
27 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
28 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
29 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
30 *
31 * @(#) $Id$
32 */
33
34/*
35 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
36 * The Regents of the University of California. All rights reserved.
37 *
38 * Redistribution and use in source and binary forms, with or without
39 * modification, are permitted provided that the following conditions
40 * are met:
41 * 1. Redistributions of source code must retain the above copyright
42 * notice, this list of conditions and the following disclaimer.
43 * 2. Redistributions in binary form must reproduce the above copyright
44 * notice, this list of conditions and the following disclaimer in the
45 * documentation and/or other materials provided with the distribution.
46 * 3. All advertising materials mentioning features or use of this software
47 * must display the following acknowledgement:
48 * This product includes software developed by the University of
49 * California, Berkeley and its contributors.
50 * 4. Neither the name of the University nor the names of its contributors
51 * may be used to endorse or promote products derived from this software
52 * without specific prior written permission.
53 *
54 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
55 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
56 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
57 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
58 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
60 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
62 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 * SUCH DAMAGE.
65 */
66
67#ifndef _NET_COUNT_H_
68#define _NET_COUNT_H_
69
70/*
71 * ネットワーク統計情報の計測
72 */
73
74#if NET_COUNT_ENABLE != 0
75
76#ifndef _MACRO_ONLY
77
78#ifdef _int64_
79typedef uint64_t T_NET_COUNT_VAL;
80#else
81typedef uint32_t T_NET_COUNT_VAL;
82#endif
83
84typedef struct t_net_count {
85 T_NET_COUNT_VAL in_octets; /* 受信オクテット数 */
86 T_NET_COUNT_VAL out_octets; /* 送信オクテット数 */
87 T_NET_COUNT_VAL in_packets; /* 受信バケット数 */
88 T_NET_COUNT_VAL out_packets; /* 送信バケット数 */
89 T_NET_COUNT_VAL in_err_packets; /* 受信エラーバケット数 */
90 T_NET_COUNT_VAL out_err_packets; /* 送信エラーバケット数 */
91 } T_NET_COUNT;
92
93#endif /* of #ifndef _MACRO_ONLY */
94
95#endif /* of #if NET_COUNT_ENABLE != 0 */
96
97#ifdef SUPPORT_PPP
98
99/* PPP */
100
101#if NET_COUNT_ENABLE & PROTO_FLG_PPP
102
103#define NET_COUNT_PPP(v,c) ((v)+=(c))
104
105#ifndef _MACRO_ONLY
106
107extern T_NET_COUNT net_count_ppp;
108extern T_NET_COUNT_VAL net_count_ppp_no_bufs; /* net_buf 割り当て失敗数 */
109
110#endif /* of #ifndef _MACRO_ONLY */
111
112#define NC_PPP_SIZE 7 /* カウンタ数 */
113
114#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP */
115
116#define NET_COUNT_PPP(v,c)
117
118#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP */
119
120/* PPP HDLC */
121
122#if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC
123
124#define NET_COUNT_PPP_HDLC(v,c) ((v)+=(c))
125
126#ifndef _MACRO_ONLY
127
128extern T_NET_COUNT net_count_hdlc;
129
130#endif /* of #ifndef _MACRO_ONLY */
131
132#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC */
133
134#define NET_COUNT_PPP_HDLC(v,c)
135
136#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC */
137
138/* PPP LCP */
139
140#if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP
141
142#define NET_COUNT_PPP_LCP(v,c) ((v)+=(c))
143
144#ifndef _MACRO_ONLY
145
146extern T_NET_COUNT_VAL net_count_ppp_lcp_in_octets;
147extern T_NET_COUNT_VAL net_count_ppp_lcp_in_packets;
148
149#endif /* of #ifndef _MACRO_ONLY */
150
151#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP */
152
153#define NET_COUNT_PPP_LCP(v,c)
154
155#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP */
156
157/* PPP IPV6CP */
158
159#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP
160
161#define NET_COUNT_PPP_IPV6CP(v,c) ((v)+=(c))
162
163#ifndef _MACRO_ONLY
164
165extern T_NET_COUNT_VAL net_count_ppp_ipv6cp_in_octets;
166extern T_NET_COUNT_VAL net_count_ppp_ipv6cp_in_packets;
167
168#endif /* of #ifndef _MACRO_ONLY */
169
170#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP */
171
172#define NET_COUNT_PPP_IPV6CP(v,c)
173
174#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP */
175
176/* PPP IPCP */
177
178#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP
179
180#define NET_COUNT_PPP_IPCP(v,c) ((v)+=(c))
181
182#ifndef _MACRO_ONLY
183
184extern T_NET_COUNT_VAL net_count_ppp_ipcp_in_octets;
185extern T_NET_COUNT_VAL net_count_ppp_ipcp_in_packets;
186
187#endif /* of #ifndef _MACRO_ONLY */
188
189#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP */
190
191#define NET_COUNT_PPP_IPCP(v,c)
192
193#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP */
194
195/* PPP CCP */
196
197#if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP
198
199#define NET_COUNT_PPP_CCP(v,c) ((v)+=(c))
200
201#ifndef _MACRO_ONLY
202
203extern T_NET_COUNT_VAL net_count_ppp_ccp_in_octets;
204extern T_NET_COUNT_VAL net_count_ppp_ccp_in_packets;
205
206#endif /* of #ifndef _MACRO_ONLY */
207
208#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP */
209
210#define NET_COUNT_PPP_CCP(v,c)
211
212#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP */
213
214/* PPP PAP */
215
216#if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP
217
218#define NET_COUNT_PPP_PAP(v,c) ((v)+=(c))
219
220#ifndef _MACRO_ONLY
221
222extern T_NET_COUNT_VAL net_count_ppp_upap_in_octets;
223extern T_NET_COUNT_VAL net_count_ppp_upap_in_packets;
224
225#endif /* of #ifndef _MACRO_ONLY */
226
227#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP */
228
229#define NET_COUNT_PPP_PAP(v,c)
230
231#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP */
232
233#endif /* of #ifdef SUPPORT_PPP */
234
235#ifdef SUPPORT_LOOP
236
237/* ループバック */
238
239#if NET_COUNT_ENABLE & PROTO_FLG_LOOP
240
241#define NET_COUNT_LOOP(v,c) ((v)+=(c))
242
243#ifndef _MACRO_ONLY
244
245extern T_NET_COUNT net_count_loop;
246
247#endif /* of #ifndef _MACRO_ONLY */
248
249#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_LOOP */
250
251#define NET_COUNT_LOOP(v,c)
252
253#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_LOOP */
254
255#endif /* of #ifdef SUPPORT_LOOP */
256
257#ifdef SUPPORT_ETHER
258
259/* Ethernet */
260
261#if NET_COUNT_ENABLE & PROTO_FLG_ETHER
262
263#define NET_COUNT_ETHER(v,c) ((v)+=(c))
264
265#ifndef _MACRO_ONLY
266
267extern T_NET_COUNT net_count_ether;
268
269#endif /* of #ifndef _MACRO_ONLY */
270
271#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER */
272
273#define NET_COUNT_ETHER(v,c)
274
275#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER */
276
277/* NIC (if_ed) */
278
279#if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC
280
281#define NC_ETHER_NIC_RESETS 0 /* リセット数 */
282#define NC_ETHER_NIC_TXB_QOVRS 1 /* 送信セマフォ資源返却上限オーバー数*/
283#define NC_ETHER_NIC_TIMEOUTS 2 /* 送信タイムアウト数 */
284#define NC_ETHER_NIC_COLS 3 /* コリジョン数 */
285#define NC_ETHER_NIC_OUT_ERR_PACKETS 4 /* 送信エラーバケット数 */
286#define NC_ETHER_NIC_OUT_PACKETS 5 /* 送信バケット数 */
287#define NC_ETHER_NIC_OUT_OCTETS 6 /* 送信オクテット数 */
288#define NC_ETHER_NIC_RXB_QOVRS 7 /* 受信セマフォ資源返却上限オーバー数*/
289#define NC_ETHER_NIC_NO_BUFS 8 /* net_buf 割り当て失敗数 */
290#define NC_ETHER_NIC_IN_ERR_PACKETS 9 /* 受信エラーバケット数 */
291#define NC_ETHER_NIC_IN_PACKETS 10 /* 受信バケット数 */
292#define NC_ETHER_NIC_IN_OCTETS 11 /* 受信オクテット数 */
293#define NC_ETHER_NIC_SIZE 12 /* カウンタ数 */
294
295#define NET_COUNT_ETHER_NIC(v,c) ((v)+=(c))
296
297#ifndef _MACRO_ONLY
298
299extern T_NET_COUNT_VAL net_count_ether_nic[NC_ETHER_NIC_SIZE];
300
301#endif /* of #ifndef _MACRO_ONLY */
302
303#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC */
304
305#define NET_COUNT_ETHER_NIC(v,c)
306
307#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC */
308
309#endif /* of #ifdef SUPPORT_ETHER */
310
311/* ネットワークバッファ */
312
313#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
314
315#define NET_COUNT_NET_BUF(v,c) ((v)+=(c))
316
317#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
318
319#define NET_COUNT_NET_BUF(v,c)
320
321#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
322
323#if defined(_IP4_CFG)
324
325/* ARP */
326
327#if NET_COUNT_ENABLE & PROTO_FLG_ARP
328
329#define NET_COUNT_ARP(v,c) ((v)+=(c))
330
331#ifndef _MACRO_ONLY
332
333extern T_NET_COUNT net_count_arp;
334
335#endif /* of #ifndef _MACRO_ONLY */
336
337#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ARP */
338
339#define NET_COUNT_ARP(v,c)
340
341#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ARP */
342
343/* IPv4 */
344
345#if NET_COUNT_ENABLE & PROTO_FLG_IP4
346
347#define NC_IP4_FRAG_OUT_FRAGS 0 /* 分割送信、フラグメント数 */
348#define NC_IP4_FRAG_OUT 1 /* 分割送信数 */
349#define NC_IP4_OUT_ERR_PACKETS 2 /* 送信エラーデータグラム数 */
350#define NC_IP4_OUT_PACKETS 3 /* 送信データグラム数 */
351#define NC_IP4_OUT_OCTETS 4 /* 送信オクテット数 */
352#define NC_IP4_FRAG_IN_TMOUT 5 /* 分割受信タイムアウト数 */
353#define NC_IP4_FRAG_IN_NO_BUF 6 /* 分割受信バッファり当て失敗数 */
354#define NC_IP4_FRAG_IN_DROP 7 /* 分割受信破棄数 */
355#define NC_IP4_FRAG_IN_OK 8 /* 分割受信再構成成功数 */
356#define NC_IP4_FRAG_IN_FRAGS 9 /* 分割受信フラグメント数 */
357#define NC_IP4_FRAG_IN 10 /* 分割受信数 */
358#define NC_IP4_OPTS 11 /* オプション入力数 */
359#define NC_IP4_IN_ERR_PROTO 12 /* プロトコルエラー数 */
360#define NC_IP4_IN_ERR_ADDR 13 /* アドレスエラー数 */
361#define NC_IP4_IN_ERR_VER 14 /* バージョンエラー数 */
362#define NC_IP4_IN_ERR_SHORT 15 /* 長さエラー数 */
363#define NC_IP4_IN_ERR_CKSUM 16 /* チェックサムエラー数 */
364#define NC_IP4_IN_ERR_PACKETS 17 /* 受信エラーデータグラム数 */
365#define NC_IP4_IN_PACKETS 18 /* 受信データグラム数 */
366#define NC_IP4_IN_OCTETS 19 /* 受信オクテット数 */
367#define NC_IP4_SIZE 20 /* カウンタ数 */
368
369#define NET_COUNT_IP4(v,c) ((v)+=(c))
370
371#ifndef _MACRO_ONLY
372
373extern T_NET_COUNT_VAL net_count_ip4[NC_IP4_SIZE];
374
375#endif /* of #ifndef _MACRO_ONLY */
376
377#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP4 */
378
379#define NET_COUNT_IP4(v,c)
380
381#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP4 */
382
383/* ICMP4 */
384
385#if NET_COUNT_ENABLE & PROTO_FLG_ICMP4
386
387#define NET_COUNT_ICMP4(v,c) ((v)+=(c))
388
389#ifndef _MACRO_ONLY
390
391extern T_NET_COUNT net_count_icmp4;
392
393#endif /* of #ifndef _MACRO_ONLY */
394
395#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
396
397#define NET_COUNT_ICMP4(v,c)
398
399#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
400
401/* IGMP */
402
403#if NET_COUNT_ENABLE & PROTO_FLG_IGMP
404
405#define NET_COUNT_IGMP(v,c) ((v)+=(c))
406
407#ifndef _MACRO_ONLY
408
409extern T_NET_COUNT net_count_igmp;
410
411#endif /* of #ifndef _MACRO_ONLY */
412
413#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_IGMP */
414
415#define NET_COUNT_IGMP(v,c)
416
417#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_IGMP */
418
419#endif /* of #if defined(_IP4_CFG) */
420
421#if defined(_IP6_CFG)
422
423/* IPv6 */
424
425#if NET_COUNT_ENABLE & PROTO_FLG_IP6
426
427#define NC_IP6_FRAG_OUT_FRAGS 0 /* 分割送信、フラグメント数 */
428#define NC_IP6_FRAG_OUT 1 /* 分割送信数 */
429#define NC_IP6_OUT_ERR_PACKETS 2 /* 送信エラーデータグラム数 */
430#define NC_IP6_OUT_PACKETS 3 /* 送信データグラム数 */
431#define NC_IP6_OUT_OCTETS 4 /* 送信オクテット数 */
432#define NC_IP6_FRAG_IN_TMOUT 5 /* 分割受信タイムアウト数 */
433#define NC_IP6_FRAG_IN_NO_BUF 6 /* 分割受信バッファり当て失敗数 */
434#define NC_IP6_FRAG_IN_DROP 7 /* 分割受信破棄数 */
435#define NC_IP6_FRAG_IN_OK 8 /* 分割受信再構成成功数 */
436#define NC_IP6_FRAG_IN_FRAGS 9 /* 分割受信フラグメント数 */
437#define NC_IP6_FRAG_IN 10 /* 分割受信数 */
438#define NC_IP6_IN_ERR_PROTO 11 /* プロトコルエラー数 */
439#define NC_IP6_IN_ERR_ADDR 12 /* アドレスエラー数 */
440#define NC_IP6_IN_ERR_VER 13 /* バージョンエラー数 */
441#define NC_IP6_IN_ERR_SHORT 14 /* 長さエラー数 */
442#define NC_IP6_IN_ERR_PACKETS 15 /* 受信エラーデータグラム数 */
443#define NC_IP6_IN_PACKETS 16 /* 受信データグラム数 */
444#define NC_IP6_IN_OCTETS 17 /* 受信オクテット数 */
445#define NC_IP6_SIZE 18 /* カウンタ数 */
446
447#define NET_COUNT_IP6(v,c) ((v)+=(c))
448
449#ifndef _MACRO_ONLY
450
451extern T_NET_COUNT_VAL net_count_ip6[NC_IP6_SIZE];
452
453#endif /* of #ifndef _MACRO_ONLY */
454
455#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP6 */
456
457#define NET_COUNT_IP6(v,c)
458
459#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP6 */
460
461#if NET_COUNT_ENABLE & PROTO_FLG_ICMP6
462
463#define NC_ICMP6_OUT_ERR_PACKETS 0 /* 送信エラー ICMP データ数 */
464#define NC_ICMP6_OUT_PACKETS 1 /* 送信 ICMP データ数 */
465#define NC_ICMP6_OUT_OCTETS 2 /* 送信 ICMP オクテット数 */
466#define NC_ICMP6_IN_ERR_CKSUM 3 /* 長さエラー数 */
467#define NC_ICMP6_IN_ERR_PACKETS 4 /* 受信エラー ICMP データ数 */
468#define NC_ICMP6_IN_PACKETS 5 /* 受信 ICMP データ数 */
469#define NC_ICMP6_IN_OCTETS 6 /* 受信 ICMP オクテット数 */
470#define NC_ICMP6_SIZE 7 /* カウンタ数 */
471
472#define NET_COUNT_ICMP6(v,c) ((v)+=(c))
473
474#ifndef _MACRO_ONLY
475
476extern T_NET_COUNT_VAL net_count_icmp6[NC_ICMP6_SIZE];
477
478#endif /* of #ifndef _MACRO_ONLY */
479
480#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP6 */
481
482#define NET_COUNT_ICMP6(v,c)
483
484#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP6 */
485
486#if NET_COUNT_ENABLE & PROTO_FLG_ND6
487
488#define NC_ND6_DAD_OUT_PACKETS 0 /* 重複アドレス検出送信数 */
489#define NC_ND6_NS_OUT_PACKETS 1 /* 近隣要請送信数 */
490#define NC_ND6_NS_IN_PACKETS 2 /* 近隣要請受信数 */
491#define NC_ND6_NA_OUT_PACKETS 3 /* 近隣通知送信数 */
492#define NC_ND6_NA_IN_PACKETS 4 /* 近隣通知受信数 */
493#define NC_ND6_RS_OUT_PACKETS 5 /* ルータ要請出力数 */
494#define NC_ND6_RA_IN_PACKETS 6 /* ルータ通知受信数 */
495#define NC_ND6_SIZE 7 /* カウンタ数 */
496
497#define NET_COUNT_ND6(v,c) ((v)+=(c))
498
499#ifndef _MACRO_ONLY
500
501extern T_NET_COUNT_VAL net_count_nd6[NC_ND6_SIZE];
502
503#endif /* of #ifndef _MACRO_ONLY */
504
505#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
506
507#define NET_COUNT_ND6(v,c)
508
509#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
510
511#endif /* of #if defined(_IP6_CFG) */
512
513#ifdef SUPPORT_TCP
514
515/* TCP */
516
517#if NET_COUNT_ENABLE & PROTO_FLG_TCP
518
519#define NC_TCP_CONNECTS 0 /* 能動オープン数 */
520#define NC_TCP_ACCEPTS 1 /* 受動オープン数 */
521#define NC_TCP_RTT_UPDATES 2 /* RTT 更新数 */
522#define NC_TCP_SEND_RSTS 3 /* 送信、RST 数 */
523#define NC_TCP_SEND_ACKS 4 /* 送信、ACK 数 */
524#define NC_TCP_SEND_URG_SEGS 5 /* 送信、緊急セグメント数 */
525#define NC_TCP_SEND_DATA_SEGS 6 /* 送信データセグメント数 */
526#define NC_TCP_SEND_REXMIT_SEGS 7 /* 再送信セグメント数 */
527#define NC_TCP_SEND_SEGS 8 /* 送信セグメント数 */
528#define NC_TCP_SEND_CNTL_SEGS 9 /* 送信制御セグメント数 */
529#define NC_TCP_SEND_DATA_OCTETS 10 /* 送信データオクテット数 */
530#define NC_TCP_FREE_RCV_QUEUE 11 /* 受信キュー解放数 */
531#define NC_TCP_RECV_DUP_SEGS 12 /* 受信、多重数 */
532#define NC_TCP_RECV_DROP_SEGS 13 /* 受信、破棄数 */
533#define NC_TCP_RECV_RSTS 14 /* 受信、RST 数 */
534#define NC_TCP_RECV_DUP_ACKS 15 /* 受信、多重 ACK 数 */
535#define NC_TCP_RECV_ACKS 16 /* 受信、ACK 数 */
536#define NC_TCP_RECV_BAD_CKSUMS 17 /* 受信、チェックサム不正数 */
537#define NC_TCP_RECV_BAD_HEADERS 18 /* 受信、ヘッダ不正数 */
538#define NC_TCP_RECV_URG_SEGS 19 /* 受信、緊急セグメント数 */
539#define NC_TCP_RECV_DATA_SEGS 20 /* 受信データセグメント数 */
540#define NC_TCP_RECV_SEGS 21 /* 受信セグメント数 */
541#define NC_TCP_RECV_DATA_OCTETS 22 /* 受信データオクテット数 */
542#define NC_TCP_RECV_OCTETS 23 /* 受信オクテット数 */
543#define NC_TCP_SIZE 24 /* カウンタ数 */
544
545#define NET_COUNT_TCP(v,c) ((v)+=(c))
546
547#ifndef _MACRO_ONLY
548
549extern T_NET_COUNT_VAL net_count_tcp[NC_TCP_SIZE];
550
551#endif /* of #ifndef _MACRO_ONLY */
552
553#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_TCP */
554
555#define NET_COUNT_TCP(v,c)
556
557#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_TCP */
558
559#endif /* of #ifdef SUPPORT_TCP */
560
561#ifdef SUPPORT_UDP
562
563/* UDP */
564
565#if NET_COUNT_ENABLE & PROTO_FLG_UDP
566
567#define NET_COUNT_UDP(v,c) ((v)+=(c))
568
569#ifndef _MACRO_ONLY
570
571extern T_NET_COUNT net_count_udp;
572
573#endif /* of #ifndef _MACRO_ONLY */
574
575#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_UDP */
576
577#define NET_COUNT_UDP(v,c)
578
579#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_UDP */
580
581#endif /* of #ifdef SUPPORT_UDP */
582
583#ifdef SUPPORT_MIB
584
585/*
586 * SNMP の 管理情報ベース (MIB)
587 */
588
589#define NET_COUNT_MIB(v, c) ((v)+=(c))
590
591#else /* of #ifdef SUPPORT_MIB */
592
593#define NET_COUNT_MIB(v, c)
594
595#endif /* of #ifdef SUPPORT_MIB */
596
597#endif /* of #ifndef _NET_COUNT_H_ */
Note: See TracBrowser for help on using the repository browser.