Lines Matching refs:chassis
66 int chassis; member
149 int chassis, geoslot; in dump_unit_table() local
153 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { in dump_unit_table()
155 if (units[chassis][geoslot].ip != NULL) in dump_unit_table()
156 …printf("%d:%d %2d %s\n", chassis, geoslot, units[chassis][geoslot].fd, units[chassis][geoslot].ip); in dump_unit_table()
157 p = units[chassis][geoslot].iface; in dump_unit_table()
168 static int find_unit_by_fd(int fd, int *chassis, int *geoslot, unit_t **unit_ptr) { in find_unit_by_fd() argument
174 if (chassis) *chassis = c; in find_unit_by_fd()
186 int chassis, geoslot; in read_client_nbytes() local
189 find_unit_by_fd(fd, &chassis, &geoslot, &u); in read_client_nbytes()
212 static void empty_unit(int chassis, int geoslot) { in empty_unit() argument
213 unit_t *u = &units[chassis][geoslot]; in empty_unit()
229 int chassis, geoslot; in empty_unit_table() local
231 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { in empty_unit_table()
233 if (units[chassis][geoslot].ip != NULL) { in empty_unit_table()
234 … free(units[chassis][geoslot].ip); /* get rid of the malloc'ed space that holds the IP address */ in empty_unit_table()
235 units[chassis][geoslot].ip = 0; /* then set the pointer to NULL */ in empty_unit_table()
237 empty_unit(chassis, geoslot); in empty_unit_table()
243 int chassis, geoslot; in find_nth_interface_name() local
248 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { /* scan the table... */ in find_nth_interface_name()
250 if (units[chassis][geoslot].ip != NULL) { in find_nth_interface_name()
251 p = units[chassis][geoslot].iface; in find_nth_interface_name()
270 int chassis, geoslot; in acn_parse_hosts_file() local
294 chassis = *(ptr2 + 3) - '0'; /* extract the chassis number */ in acn_parse_hosts_file()
296 if (chassis < 1 || chassis > MAX_CHASSIS || in acn_parse_hosts_file()
307 u = &units[chassis][geoslot]; in acn_parse_hosts_file()
309 u->chassis = chassis; in acn_parse_hosts_file()
352 static void close_with_IOP(int chassis, int geoslot, int flag) { in close_with_IOP() argument
355 if (flag == LIVE) id = &units[chassis][geoslot].fd; in close_with_IOP()
356 else id = &units[chassis][geoslot].find_fd; in close_with_IOP()
365 int chassis, geoslot; in pcap_cleanup_acn() local
368 if (find_unit_by_fd(handle->fd, &chassis, &geoslot, &u) == 0) in pcap_cleanup_acn()
370 close_with_IOP(chassis, geoslot, LIVE); in pcap_cleanup_acn()
378 int chassis, geoslot; in send_to_fd() local
382 find_unit_by_fd(fd, &chassis, &geoslot, NULL); in send_to_fd()
383 if (units[chassis][geoslot].fd == fd) close_with_IOP(chassis, geoslot, LIVE); in send_to_fd()
384 else if (units[chassis][geoslot].find_fd == fd) close_with_IOP(chassis, geoslot, FIND); in send_to_fd()
385 empty_unit(chassis, geoslot); in send_to_fd()
416 snprintf(buf, bufsize, "%s_%d_%d", proto, u->chassis, u->geoslot); in nonUnified_IOP_port_name()
422 portnum = ((u->chassis - 1) * 64) + ((u->geoslot - 1) * 8) + IOPportnum + 1; in unified_IOP_port_name()
565 int chassis, geoslot; in process_client_data() local
578 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { in process_client_data()
580 u = &units[chassis][geoslot]; in process_client_data()
721 int chassis, geoslot; in read_client_data() local
725 find_unit_by_fd(fd, &chassis, &geoslot, &u); in read_client_data()
740 int chassis, geoslot; in wait_for_all_answers() local
766 find_unit_by_fd(fd, &chassis, &geoslot, NULL); in wait_for_all_answers()
767 close_with_IOP(chassis, geoslot, FIND); /* and close out connection to him */ in wait_for_all_answers()
793 int chassis, geoslot; in acn_findalldevs() local
798 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { in acn_findalldevs()
800 u = &units[chassis][geoslot]; in acn_findalldevs()
804 close_with_IOP(chassis, geoslot, FIND); in acn_findalldevs()
837 int chassis, geoslot; in acn_open_live() local
843 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { /* scan the table... */ in acn_open_live()
845 u = &units[chassis][geoslot]; in acn_open_live()