source: azure_iot_hub/trunk/asp3_dcre/tinet/net/net_count.h@ 388

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

Azure IoT Hub Device C SDK を使ったサンプルの追加

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