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.
31 * User configuration and display program
32 * --------------------------------------
38 #define MAX_NIFS 256 /* Max network interfaces */
39 #define MIN_VCI 32 /* Smallest non-reserved VCI */
53 const char *name; /* Command name */
54 int minp; /* Minimum number of parameters */
55 int maxp; /* Maximum number of parameters */
56 void (*func)(int, char **,
57 const struct cmd *);/* Processing function */
58 const char *help; /* User help string */
63 * Supported signalling protocols
66 const char *p_name; /* Protocol name */
67 u_char p_id; /* Protocol id */
72 * Table of state names
75 const char *s_name; /* State name */
76 u_char s_id; /* State id */
81 * Supported signalling protocol states
84 const char *p_name; /* Signalling manager name */
85 const struct state *p_state; /* Protocol state table */
86 const struct state *v_state; /* Protocol VCC state table */
87 u_char p_id; /* Protocol ID */
92 * Supported VCC owners
95 const char *o_name; /* Owner name */
96 u_int o_sap; /* Owner's SAP */
97 void (*o_pvcadd)(int, char **, const struct cmd *,
98 struct atmaddreq *, struct air_int_rsp *);
99 /* PVC ADD processing function */
107 const char *a_name; /* AAL name */
108 u_char a_id; /* AAL code */
113 * Supported encapsulations
116 const char *e_name; /* Encapsulation name */
117 u_char e_id; /* Encapsulation code */
121 * Supported traffic type
124 const char *t_name; /* Traffic name: CBR, VBR, UBR, ... */
125 uint8_t t_type; /* HARP code T_ATM_XXX */
126 int t_argc; /* Number of args */
127 const char *help; /* User help string */
133 extern char *prog; /* Program invocation */
134 extern char prefix[]; /* Current command prefix */
137 * Global function declarations
141 void show_eni_stats(char *, int, char **);
144 void show_fore200_stats(char *, int, char **);
147 void ip_pvcadd(int, char **, const struct cmd *, struct atmaddreq *,
148 struct air_int_rsp *);
151 void print_arp_info(struct air_arp_rsp *);
152 void print_asrv_info(struct air_asrv_rsp *);
153 void print_cfg_info(struct air_cfg_rsp *);
154 void print_intf_info(struct air_int_rsp *);
155 void print_ip_vcc_info(struct air_ip_vcc_rsp *);
156 void print_netif_info(struct air_netif_rsp *);
157 void print_intf_stats(struct air_phy_stat_rsp *);
158 void print_vcc_stats(struct air_vcc_rsp *);
159 void print_vcc_info(struct air_vcc_rsp *);
160 void print_version_info(struct air_version_rsp *);
163 void set_arpserver(int, char **, const struct cmd *);
164 void set_macaddr(int, char **, const struct cmd *);
165 void set_netif(int, char **, const struct cmd *);
166 void set_prefix(int, char **, const struct cmd *);
169 void show_arp(int, char **, const struct cmd *);
170 void show_arpserv(int, char **, const struct cmd *);
171 void show_config(int, char **, const struct cmd *);
172 void show_intf(int, char **, const struct cmd *);
173 void show_ip_vcc(int, char **, const struct cmd *);
174 void show_netif(int, char **, const struct cmd *);
175 void show_vcc(int, char **, const struct cmd *);
176 void show_version(int, char **, const struct cmd *);
177 void show_intf_stats(int, char **, const struct cmd *);
178 void show_vcc_stats(int, char **, const struct cmd *);
181 const char * get_vendor(int);
182 const char * get_adapter(int);
183 const char * get_media_type(int);
184 const char * get_bus_type(int);
185 const char * get_bus_slot_info(int, u_long);
186 const char * get_adapter_name(const char *);
187 int get_hex_addr(char *, u_char *, int);
188 const char * format_mac_addr(const Mac_addr *);
189 int parse_ip_prefix(const char *, struct in_addr *);
190 size_t compress_prefix_list(struct in_addr *, size_t);
191 void check_netif_name(const char *);
192 void sock_error(int);
194 extern const struct aal aals[];
195 extern const struct encaps encaps[];