source: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.h@ 321

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

文字コードを設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 17.7 KB
Line 
1/*
2 * TINET (TCP/IP Protocol Stack)
3 *
4 * Copyright (C) 2001-2009 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 IPCP */
158
159#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP
160
161#define NET_COUNT_PPP_IPCP(v,c) ((v)+=(c))
162
163#ifndef _MACRO_ONLY
164
165extern T_NET_COUNT_VAL net_count_ppp_ipcp_in_octets;
166extern T_NET_COUNT_VAL net_count_ppp_ipcp_in_packets;
167
168#endif /* of #ifndef _MACRO_ONLY */
169
170#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP */
171
172#define NET_COUNT_PPP_IPCP(v,c)
173
174#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP */
175
176/* PPP CCP */
177
178#if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP
179
180#define NET_COUNT_PPP_CCP(v,c) ((v)+=(c))
181
182#ifndef _MACRO_ONLY
183
184extern T_NET_COUNT_VAL net_count_ppp_ccp_in_octets;
185extern T_NET_COUNT_VAL net_count_ppp_ccp_in_packets;
186
187#endif /* of #ifndef _MACRO_ONLY */
188
189#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP */
190
191#define NET_COUNT_PPP_CCP(v,c)
192
193#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP */
194
195/* PPP PAP */
196
197#if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP
198
199#define NET_COUNT_PPP_PAP(v,c) ((v)+=(c))
200
201#ifndef _MACRO_ONLY
202
203extern T_NET_COUNT_VAL net_count_ppp_upap_in_octets;
204extern T_NET_COUNT_VAL net_count_ppp_upap_in_packets;
205
206#endif /* of #ifndef _MACRO_ONLY */
207
208#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP */
209
210#define NET_COUNT_PPP_PAP(v,c)
211
212#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP */
213
214#endif /* of #ifdef SUPPORT_PPP */
215
216#ifdef SUPPORT_LOOP
217
218/* ループバック */
219
220#if NET_COUNT_ENABLE & PROTO_FLG_LOOP
221
222#define NET_COUNT_LOOP(v,c) ((v)+=(c))
223
224#ifndef _MACRO_ONLY
225
226extern T_NET_COUNT net_count_loop;
227
228#endif /* of #ifndef _MACRO_ONLY */
229
230#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_LOOP */
231
232#define NET_COUNT_LOOP(v,c)
233
234#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_LOOP */
235
236#endif /* of #ifdef SUPPORT_LOOP */
237
238#ifdef SUPPORT_ETHER
239
240/* Ethernet */
241
242#if NET_COUNT_ENABLE & PROTO_FLG_ETHER
243
244#define NET_COUNT_ETHER(v,c) ((v)+=(c))
245
246#ifndef _MACRO_ONLY
247
248extern T_NET_COUNT net_count_ether;
249
250#endif /* of #ifndef _MACRO_ONLY */
251
252#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER */
253
254#define NET_COUNT_ETHER(v,c)
255
256#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER */
257
258/* NIC (if_ed) */
259
260#if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC
261
262#define NC_ETHER_NIC_RESETS 0 /* リセット数 */
263#define NC_ETHER_NIC_TXB_QOVRS 1 /* 送信セマフォ資源返却上限オーバー数*/
264#define NC_ETHER_NIC_TIMEOUTS 2 /* 送信タイムアウト数 */
265#define NC_ETHER_NIC_COLS 3 /* コリジョン数 */
266#define NC_ETHER_NIC_OUT_ERR_PACKETS 4 /* 送信エラーバケット数 */
267#define NC_ETHER_NIC_OUT_PACKETS 5 /* 送信バケット数 */
268#define NC_ETHER_NIC_OUT_OCTETS 6 /* 送信オクテット数 */
269#define NC_ETHER_NIC_RXB_QOVRS 7 /* 受信セマフォ資源返却上限オーバー数*/
270#define NC_ETHER_NIC_NO_BUFS 8 /* net_buf 割り当て失敗数 */
271#define NC_ETHER_NIC_IN_ERR_PACKETS 9 /* 受信エラーバケット数 */
272#define NC_ETHER_NIC_IN_PACKETS 10 /* 受信バケット数 */
273#define NC_ETHER_NIC_IN_OCTETS 11 /* 受信オクテット数 */
274#define NC_ETHER_NIC_SIZE 12 /* カウンタ数 */
275
276#define NET_COUNT_ETHER_NIC(v,c) ((v)+=(c))
277
278#ifndef _MACRO_ONLY
279
280extern T_NET_COUNT_VAL net_count_ether_nic[NC_ETHER_NIC_SIZE];
281
282#endif /* of #ifndef _MACRO_ONLY */
283
284#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC */
285
286#define NET_COUNT_ETHER_NIC(v,c)
287
288#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC */
289
290#endif /* of #ifdef SUPPORT_ETHER */
291
292/* ネットワークバッファ */
293
294#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
295
296#define NET_COUNT_NET_BUF(v,c) ((v)+=(c))
297
298#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
299
300#define NET_COUNT_NET_BUF(v,c)
301
302#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
303
304#if defined(SUPPORT_INET4)
305
306/* ARP */
307
308#if NET_COUNT_ENABLE & PROTO_FLG_ARP
309
310#define NET_COUNT_ARP(v,c) ((v)+=(c))
311
312#ifndef _MACRO_ONLY
313
314extern T_NET_COUNT net_count_arp;
315
316#endif /* of #ifndef _MACRO_ONLY */
317
318#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ARP */
319
320#define NET_COUNT_ARP(v,c)
321
322#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ARP */
323
324/* IPv4 */
325
326#if NET_COUNT_ENABLE & PROTO_FLG_IP4
327
328#define NC_IP4_FRAG_OUT_FRAGS 0 /* 分割送信、フラグメント数 */
329#define NC_IP4_FRAG_OUT 1 /* 分割送信数 */
330#define NC_IP4_OUT_ERR_PACKETS 2 /* 送信エラーデータグラム数 */
331#define NC_IP4_OUT_PACKETS 3 /* 送信データグラム数 */
332#define NC_IP4_OUT_OCTETS 4 /* 送信オクテット数 */
333#define NC_IP4_FRAG_IN_TMOUT 5 /* 分割受信タイムアウト数 */
334#define NC_IP4_FRAG_IN_NO_BUF 6 /* 分割受信バッファり当て失敗数 */
335#define NC_IP4_FRAG_IN_DROP 7 /* 分割受信破棄数 */
336#define NC_IP4_FRAG_IN_OK 8 /* 分割受信再構成成功数 */
337#define NC_IP4_FRAG_IN_FRAGS 9 /* 分割受信フラグメント数 */
338#define NC_IP4_FRAG_IN 10 /* 分割受信数 */
339#define NC_IP4_OPTS 11 /* オプション入力数 */
340#define NC_IP4_IN_ERR_PROTO 12 /* プロトコルエラー数 */
341#define NC_IP4_IN_ERR_ADDR 13 /* アドレスエラー数 */
342#define NC_IP4_IN_ERR_VER 14 /* バージョンエラー数 */
343#define NC_IP4_IN_ERR_SHORT 15 /* 長さエラー数 */
344#define NC_IP4_IN_ERR_CKSUM 16 /* チェックサムエラー数 */
345#define NC_IP4_IN_ERR_PACKETS 17 /* 受信エラーデータグラム数 */
346#define NC_IP4_IN_PACKETS 18 /* 受信データグラム数 */
347#define NC_IP4_IN_OCTETS 19 /* 受信オクテット数 */
348#define NC_IP4_SIZE 20 /* カウンタ数 */
349
350#define NET_COUNT_IP4(v,c) ((v)+=(c))
351
352#ifndef _MACRO_ONLY
353
354extern T_NET_COUNT_VAL net_count_ip4[NC_IP4_SIZE];
355
356#endif /* of #ifndef _MACRO_ONLY */
357
358#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP4 */
359
360#define NET_COUNT_IP4(v,c)
361
362#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP4 */
363
364/* ICMP4 */
365
366#if NET_COUNT_ENABLE & PROTO_FLG_ICMP4
367
368#define NET_COUNT_ICMP4(v,c) ((v)+=(c))
369
370#ifndef _MACRO_ONLY
371
372extern T_NET_COUNT net_count_icmp4;
373
374#endif /* of #ifndef _MACRO_ONLY */
375
376#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
377
378#define NET_COUNT_ICMP4(v,c)
379
380#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
381
382#endif /* of #if defined(SUPPORT_INET4) */
383
384#if defined(SUPPORT_INET6)
385
386/* IPv6 */
387
388#if NET_COUNT_ENABLE & PROTO_FLG_IP6
389
390#define NC_IP6_FRAG_OUT_FRAGS 0 /* 分割送信、フラグメント数 */
391#define NC_IP6_FRAG_OUT 1 /* 分割送信数 */
392#define NC_IP6_OUT_ERR_PACKETS 2 /* 送信エラーデータグラム数 */
393#define NC_IP6_OUT_PACKETS 3 /* 送信データグラム数 */
394#define NC_IP6_OUT_OCTETS 4 /* 送信オクテット数 */
395#define NC_IP6_FRAG_IN_TMOUT 5 /* 分割受信タイムアウト数 */
396#define NC_IP6_FRAG_IN_NO_BUF 6 /* 分割受信バッファり当て失敗数 */
397#define NC_IP6_FRAG_IN_DROP 7 /* 分割受信破棄数 */
398#define NC_IP6_FRAG_IN_OK 8 /* 分割受信再構成成功数 */
399#define NC_IP6_FRAG_IN_FRAGS 9 /* 分割受信フラグメント数 */
400#define NC_IP6_FRAG_IN 10 /* 分割受信数 */
401#define NC_IP6_IN_ERR_PROTO 11 /* プロトコルエラー数 */
402#define NC_IP6_IN_ERR_ADDR 12 /* アドレスエラー数 */
403#define NC_IP6_IN_ERR_VER 13 /* バージョンエラー数 */
404#define NC_IP6_IN_ERR_SHORT 14 /* 長さエラー数 */
405#define NC_IP6_IN_ERR_PACKETS 15 /* 受信エラーデータグラム数 */
406#define NC_IP6_IN_PACKETS 16 /* 受信データグラム数 */
407#define NC_IP6_IN_OCTETS 17 /* 受信オクテット数 */
408#define NC_IP6_SIZE 18 /* カウンタ数 */
409
410#define NET_COUNT_IP6(v,c) ((v)+=(c))
411
412#ifndef _MACRO_ONLY
413
414extern T_NET_COUNT_VAL net_count_ip6[NC_IP6_SIZE];
415
416#endif /* of #ifndef _MACRO_ONLY */
417
418#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP6 */
419
420#define NET_COUNT_IP6(v,c)
421
422#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_IP6 */
423
424#if NET_COUNT_ENABLE & PROTO_FLG_ICMP6
425
426#define NC_ICMP6_OUT_ERR_PACKETS 0 /* 送信エラー ICMP データ数 */
427#define NC_ICMP6_OUT_PACKETS 1 /* 送信 ICMP データ数 */
428#define NC_ICMP6_OUT_OCTETS 2 /* 送信 ICMP オクテット数 */
429#define NC_ICMP6_IN_ERR_CKSUM 3 /* 長さエラー数 */
430#define NC_ICMP6_IN_ERR_PACKETS 4 /* 受信エラー ICMP データ数 */
431#define NC_ICMP6_IN_PACKETS 5 /* 受信 ICMP データ数 */
432#define NC_ICMP6_IN_OCTETS 6 /* 受信 ICMP オクテット数 */
433#define NC_ICMP6_SIZE 7 /* カウンタ数 */
434
435#define NET_COUNT_ICMP6(v,c) ((v)+=(c))
436
437#ifndef _MACRO_ONLY
438
439extern T_NET_COUNT_VAL net_count_icmp6[NC_ICMP6_SIZE];
440
441#endif /* of #ifndef _MACRO_ONLY */
442
443#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP6 */
444
445#define NET_COUNT_ICMP6(v,c)
446
447#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP6 */
448
449#if NET_COUNT_ENABLE & PROTO_FLG_ND6
450
451#define NC_ND6_DAD_OUT_PACKETS 0 /* 重複アドレス検出送信数 */
452#define NC_ND6_NS_OUT_PACKETS 1 /* 近隣要請送信数 */
453#define NC_ND6_NS_IN_PACKETS 2 /* 近隣要請受信数 */
454#define NC_ND6_NA_OUT_PACKETS 3 /* 近隣通知送信数 */
455#define NC_ND6_NA_IN_PACKETS 4 /* 近隣通知受信数 */
456#define NC_ND6_RS_OUT_PACKETS 5 /* ルータ要請出力数 */
457#define NC_ND6_RA_IN_PACKETS 6 /* ルータ通知受信数 */
458#define NC_ND6_SIZE 7 /* カウンタ数 */
459
460#define NET_COUNT_ND6(v,c) ((v)+=(c))
461
462#ifndef _MACRO_ONLY
463
464extern T_NET_COUNT_VAL net_count_nd6[NC_ND6_SIZE];
465
466#endif /* of #ifndef _MACRO_ONLY */
467
468#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
469
470#define NET_COUNT_ND6(v,c)
471
472#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
473
474#endif /* of #if defined(SUPPORT_INET6) */
475
476#ifdef SUPPORT_TCP
477
478/* TCP */
479
480#if NET_COUNT_ENABLE & PROTO_FLG_TCP
481
482#define NC_TCP_CONNECTS 0 /* 能動オープン数 */
483#define NC_TCP_ACCEPTS 1 /* 受動オープン数 */
484#define NC_TCP_RTT_UPDATES 2 /* RTT 更新数 */
485#define NC_TCP_SEND_RSTS 3 /* 送信、RST 数 */
486#define NC_TCP_SEND_ACKS 4 /* 送信、ACK 数 */
487#define NC_TCP_SEND_URG_SEGS 5 /* 送信、緊急セグメント数 */
488#define NC_TCP_SEND_DATA_SEGS 6 /* 送信データセグメント数 */
489#define NC_TCP_SEND_REXMIT_SEGS 7 /* 再送信セグメント数 */
490#define NC_TCP_SEND_SEGS 8 /* 送信セグメント数 */
491#define NC_TCP_SEND_CNTL_SEGS 9 /* 送信制御セグメント数 */
492#define NC_TCP_SEND_DATA_OCTETS 10 /* 送信データオクテット数 */
493#define NC_TCP_FREE_RCV_QUEUE 11 /* 受信キュー解放数 */
494#define NC_TCP_RECV_DUP_SEGS 12 /* 受信、多重数 */
495#define NC_TCP_RECV_DROP_SEGS 13 /* 受信、破棄数 */
496#define NC_TCP_RECV_RSTS 14 /* 受信、RST 数 */
497#define NC_TCP_RECV_DUP_ACKS 15 /* 受信、多重 ACK 数 */
498#define NC_TCP_RECV_ACKS 16 /* 受信、ACK 数 */
499#define NC_TCP_RECV_BAD_CKSUMS 17 /* 受信、チェックサム不正数 */
500#define NC_TCP_RECV_BAD_HEADERS 18 /* 受信、ヘッダ不正数 */
501#define NC_TCP_RECV_URG_SEGS 19 /* 受信、緊急セグメント数 */
502#define NC_TCP_RECV_DATA_SEGS 20 /* 受信データセグメント数 */
503#define NC_TCP_RECV_SEGS 21 /* 受信セグメント数 */
504#define NC_TCP_RECV_DATA_OCTETS 22 /* 受信データオクテット数 */
505#define NC_TCP_RECV_OCTETS 23 /* 受信オクテット数 */
506#define NC_TCP_SIZE 24 /* カウンタ数 */
507
508#define NET_COUNT_TCP(v,c) ((v)+=(c))
509
510#ifndef _MACRO_ONLY
511
512extern T_NET_COUNT_VAL net_count_tcp[NC_TCP_SIZE];
513
514#endif /* of #ifndef _MACRO_ONLY */
515
516#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_TCP */
517
518#define NET_COUNT_TCP(v,c)
519
520#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_TCP */
521
522#endif /* of #ifdef SUPPORT_TCP */
523
524#ifdef SUPPORT_UDP
525
526/* UDP */
527
528#if NET_COUNT_ENABLE & PROTO_FLG_UDP
529
530#define NET_COUNT_UDP(v,c) ((v)+=(c))
531
532#ifndef _MACRO_ONLY
533
534extern T_NET_COUNT net_count_udp;
535
536#endif /* of #ifndef _MACRO_ONLY */
537
538#else /* of #if NET_COUNT_ENABLE & PROTO_FLG_UDP */
539
540#define NET_COUNT_UDP(v,c)
541
542#endif /* of #if NET_COUNT_ENABLE & PROTO_FLG_UDP */
543
544#endif /* of #ifdef SUPPORT_UDP */
545
546#ifdef SUPPORT_MIB
547
548/*
549 * SNMP の 管理情報ベース (MIB)
550 */
551
552#define NET_COUNT_MIB(v, c) ((v)+=(c))
553
554#else /* of #ifdef SUPPORT_MIB */
555
556#define NET_COUNT_MIB(v, c)
557
558#endif /* of #ifdef SUPPORT_MIB */
559
560#endif /* of #ifndef _NET_COUNT_H_ */
Note: See TracBrowser for help on using the repository browser.