3 * ===================================
4 * HARP | Host ATM Research Platform
5 * ===================================
8 * This Host ATM Research Platform ("HARP") file (the "Software") is
9 * made available by Network Computing Services, Inc. ("NetworkCS")
10 * "AS IS". NetworkCS does not provide maintenance, improvements or
11 * support of any kind.
13 * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14 * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15 * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16 * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17 * In no event shall NetworkCS be responsible for any damages, including
18 * but not limited to consequential damages, arising from or relating to
19 * any use of the Software or related support.
21 * Copyright 1994-1998 Network Computing Services, Inc.
23 * Copies of this Software may be made, however, the above copyright
24 * notice must be reproduced on all copies.
26 * @(#) $FreeBSD: src/sbin/atm/atm/atm.h,v 1.4 1999/08/28 00:12:17 peter Exp $
27 * @(#) $DragonFly: src/sbin/atm/atm/atm.h,v 1.4 2003/11/03 19:51:04 eirikn Exp $
32 * User configuration and display program
33 * --------------------------------------
39 #define MAX_NIFS 256 /* Max network interfaces */
40 #define MIN_VCI 32 /* Smallest non-reserved VCI */
54 char *name; /* Command name */
55 int minp; /* Minimum number of parameters */
56 int maxp; /* Maximum number of parameters */
57 void (*func) /* Processing function */
58 (int, char **, struct cmd *);
59 char *help; /* User help string */
64 * Supported signalling protocols
67 char *p_name; /* Protocol name */
68 u_char p_id; /* Protocol id */
73 * Table of state names
76 char *s_name; /* State name */
77 u_char s_id; /* State id */
82 * Supported signalling protocol states
85 char *p_name; /* Signalling manager name */
86 struct state *p_state; /* Protocol state table */
87 struct state *v_state; /* Protocol VCC state table */
88 u_char p_id; /* Protocol ID */
93 * Supported VCC owners
96 char *o_name; /* Owner name */
97 u_int o_sap; /* Owner's SAP */
98 void (*o_pvcadd) /* PVC ADD processing function */
99 (int, char **, struct cmd *, struct atmaddreq *,
100 struct air_int_rsp *);
108 char *a_name; /* AAL name */
109 u_char a_id; /* AAL code */
114 * Supported encapsulations
117 char *e_name; /* Encapsulation name */
118 u_char e_id; /* Encapsulation code */
125 extern char *prog; /* Program invocation */
126 extern char prefix[]; /* Current command prefix */
129 * Global function declarations
132 int do_cmd(struct cmd *, int, char **);
133 void usage(struct cmd *, char *);
134 void attach(int, char **, struct cmd *);
135 void detach(int, char **, struct cmd *);
136 void pvc_add(int, char **, struct cmd *);
137 void arp_add(int, char **, struct cmd *);
138 void pvc_dlt(int, char **, struct cmd *);
139 void svc_dlt(int, char **, struct cmd *);
140 void vcc_dlt(int, char **, struct cmd *, struct atmdelreq *);
141 void arp_dlt(int, char **, struct cmd *);
142 void help(int, char **, struct cmd *);
145 void show_eni_stats(char *, int, char **);
146 void print_eni_oc3(struct air_vinfo_rsp *);
147 void print_eni_atm(struct air_vinfo_rsp *);
148 void print_eni_aal0(struct air_vinfo_rsp *);
149 void print_eni_aal5(struct air_vinfo_rsp *);
150 void print_eni_driver(struct air_vinfo_rsp *);
153 void show_fore200_stats(char *, int, char **);
154 void print_fore200_taxi(struct air_vinfo_rsp *);
155 void print_fore200_oc3(struct air_vinfo_rsp *);
156 void print_fore200_dev(struct air_vinfo_rsp *);
157 void print_fore200_atm(struct air_vinfo_rsp *);
158 void print_fore200_aal0(struct air_vinfo_rsp *);
159 void print_fore200_aal4(struct air_vinfo_rsp *);
160 void print_fore200_aal5(struct air_vinfo_rsp *);
161 void print_fore200_driver(struct air_vinfo_rsp *);
164 void ip_pvcadd (int, char **, struct cmd *, struct atmaddreq *,
165 struct air_int_rsp *);
168 void print_arp_info(struct air_arp_rsp *);
169 void print_asrv_info(struct air_asrv_rsp *);
170 void print_cfg_info(struct air_cfg_rsp *);
171 void print_intf_info(struct air_int_rsp *);
172 void print_ip_vcc_info(struct air_ip_vcc_rsp *);
173 void print_netif_info(struct air_netif_rsp *);
174 void print_intf_stats(struct air_phy_stat_rsp *);
175 void print_vcc_stats(struct air_vcc_rsp *);
176 void print_vcc_info(struct air_vcc_rsp *);
177 void print_version_info(struct air_version_rsp *);
180 void set_arpserver(int, char **, struct cmd *);
181 void set_macaddr(int, char **, struct cmd *);
182 void set_netif(int, char **, struct cmd *);
183 void set_prefix(int, char **, struct cmd *);
186 void show_arp(int, char **, struct cmd *);
187 void show_arpserv(int, char **, struct cmd *);
188 void show_config(int, char **, struct cmd *);
189 void show_intf(int, char **, struct cmd *);
190 void show_ip_vcc(int, char **, struct cmd *);
191 void show_netif(int, char **, struct cmd *);
192 void show_intf_stats(int, char **, struct cmd *);
193 void show_vcc_stats(int, char **, struct cmd *);
194 void show_vcc(int, char **, struct cmd *);
195 void show_version(int, char **, struct cmd *);
198 char * get_vendor(int);
199 char * get_adapter(int);
200 char * get_media_type(int);
201 char * get_bus_type(int);
202 char * get_bus_slot_info(int, u_long);
203 char * get_adapter_name(char *);
204 int do_info_ioctl(struct atminfreq *, int);
205 int get_vcc_info(char *, struct air_vcc_rsp **);
206 int verify_nif_name(char *);
209 int get_hex_addr(char *, u_char *, int);
210 char * format_mac_addr(Mac_addr *);
211 int parse_ip_prefix(char *, struct in_addr *);
212 int compress_prefix_list(struct in_addr *, int);
213 void check_netif_name(char *);
214 void sock_error(int);