File: linux.h

package info (click to toggle)
inetutils 2%3A2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,588 kB
  • sloc: ansic: 132,363; sh: 12,498; yacc: 1,651; makefile: 725; perl: 72
file content (116 lines) | stat: -rw-r--r-- 3,752 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
  Copyright (C) 2001-2025 Free Software Foundation, Inc.

  This file is part of GNU Inetutils.

  GNU Inetutils is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or (at
  your option) any later version.

  GNU Inetutils is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see `http://www.gnu.org/licenses/'. */

/* Written by Marcus Brinkmann.  */

#ifndef IFCONFIG_SYSTEM_LINUX_H
# define IFCONFIG_SYSTEM_LINUX_H

# include "../printif.h"
# include "../options.h"


/* Option support.  */

struct system_ifconfig
{
  int valid;
# define IF_VALID_TXQLEN 0x1
  int txqlen;
};



/* Output format support.  */

# define _IU_CAT2(a,b) a ## b
# define _IU_DCL(name,fld)				\
  {#name, _IU_CAT2(system_fh_,fld) }
# define _IU_EXTRN(fld)				\
  extern void _IU_CAT2(system_fh_,fld) (format_data_t, int, char *[]);	\

# define SYSTEM_FORMAT_HANDLER \
  {"linux", fh_nothing}, \
  {"hwaddr?", system_fh_hwaddr_query}, \
  {"hwaddr", system_fh_hwaddr}, \
  {"hwtype?", system_fh_hwtype_query}, \
  {"hwtype", system_fh_hwtype}, \
  {"metric?", system_fh_metric_query}, \
  {"metric", system_fh_metric}, \
  {"txqlen?", system_fh_txqlen_query}, \
  {"txqlen", system_fh_txqlen}, \
  {"ifstat?", system_fh_ifstat_query}, \
  _IU_DCL(rxpackets,rx_packets),\
  _IU_DCL(txpackets,tx_packets),\
  _IU_DCL(rxbytes,rx_bytes),\
  _IU_DCL(txbytes,tx_bytes),\
  _IU_DCL(rxerrors,rx_errors),\
  _IU_DCL(txerrors,tx_errors),\
  _IU_DCL(rxdropped,rx_dropped),\
  _IU_DCL(txdropped,tx_dropped),\
  _IU_DCL(rxmulticast,rx_multicast),\
  _IU_DCL(rxcompressed,rx_compressed),\
  _IU_DCL(txcompressed,tx_compressed),\
  _IU_DCL(collisions,collisions),\
  _IU_DCL(rxlenerr,rx_length_errors),\
  _IU_DCL(rxovererr,rx_over_errors),\
  _IU_DCL(rxcrcerr,rx_crc_errors),\
  _IU_DCL(rxframeerr,rx_frame_errors),\
  _IU_DCL(rxfifoerr,rx_fifo_errors),\
  _IU_DCL(rxmisserr,rx_missed_errors),\
  _IU_DCL(txabrterr,tx_aborted_errors),\
  _IU_DCL(txcarrier,tx_carrier_errors),\
  _IU_DCL(txfifoerr,tx_fifo_errors),\
  _IU_DCL(txhberr,tx_heartbeat_errors),\
  _IU_DCL(txwinerr,tx_window_errors),

void system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]);
void system_fh_hwaddr (format_data_t form, int argc, char *argv[]);
void system_fh_hwtype_query (format_data_t form, int argc, char *argv[]);
void system_fh_hwtype (format_data_t form, int argc, char *argv[]);
void system_fh_metric_query (format_data_t form, int argc, char *argv[]);
void system_fh_metric (format_data_t form, int argc, char *argv[]);
void system_fh_txqlen_query (format_data_t form, int argc, char *argv[]);
void system_fh_txqlen (format_data_t form, int argc, char *argv[]);

void system_fh_ifstat_query (format_data_t form, int argc, char *argv[]);

_IU_EXTRN (rx_packets)
_IU_EXTRN (tx_packets)
_IU_EXTRN (rx_bytes)
_IU_EXTRN (tx_bytes)
_IU_EXTRN (rx_errors)
_IU_EXTRN (tx_errors)
_IU_EXTRN (rx_dropped)
_IU_EXTRN (tx_dropped)
_IU_EXTRN (rx_multicast)
_IU_EXTRN (tx_multicast)
_IU_EXTRN (rx_compressed)
_IU_EXTRN (tx_compressed)
_IU_EXTRN (collisions)
_IU_EXTRN (rx_length_errors)
_IU_EXTRN (rx_over_errors)
_IU_EXTRN (rx_crc_errors)
_IU_EXTRN (rx_frame_errors)
_IU_EXTRN (rx_fifo_errors)
_IU_EXTRN (rx_missed_errors)
_IU_EXTRN (tx_aborted_errors)
_IU_EXTRN (tx_carrier_errors)
_IU_EXTRN (tx_fifo_errors)
_IU_EXTRN (tx_heartbeat_errors) _IU_EXTRN (tx_window_errors)
#endif