Lines Matching refs:chassis
68 int chassis; member
143 int chassis, geoslot; in dump_unit_table() local
147 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { in dump_unit_table()
149 if (units[chassis][geoslot].ip != NULL) in dump_unit_table()
150 …printf("%d:%d %2d %s\n", chassis, geoslot, units[chassis][geoslot].fd, units[chassis][geoslot].ip); in dump_unit_table()
151 p = units[chassis][geoslot].iface; in dump_unit_table()
162 static int find_unit_by_fd(int fd, int *chassis, int *geoslot, unit_t **unit_ptr) { in find_unit_by_fd() argument
168 if (chassis) *chassis = c; in find_unit_by_fd()
180 int chassis, geoslot; in read_client_nbytes() local
183 find_unit_by_fd(fd, &chassis, &geoslot, &u); in read_client_nbytes()
206 static void empty_unit(int chassis, int geoslot) { argument
207 unit_t *u = &units[chassis][geoslot];
219 int chassis, geoslot; local
221 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) {
223 if (units[chassis][geoslot].ip != NULL) {
224 … free(units[chassis][geoslot].ip); /* get rid of the malloc'ed space that holds the IP address */
225 units[chassis][geoslot].ip = 0; /* then set the pointer to NULL */
227 empty_unit(chassis, geoslot);
233 int chassis, geoslot; local
238 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { /* scan the table... */
240 if (units[chassis][geoslot].ip != NULL) {
241 p = units[chassis][geoslot].iface;
260 int chassis, geoslot; local
284 chassis = *(ptr2 + 3) - '0'; /* extract the chassis number */
286 if (chassis < 1 || chassis > MAX_CHASSIS ||
296 u = &units[chassis][geoslot];
298 u->chassis = chassis;
341 static void close_with_IOP(int chassis, int geoslot, int flag) {
344 if (flag == LIVE) id = &units[chassis][geoslot].fd;
345 else id = &units[chassis][geoslot].find_fd;
354 int chassis, geoslot; local
357 if (find_unit_by_fd(handle->fd, &chassis, &geoslot, &u) == 0)
359 close_with_IOP(chassis, geoslot, LIVE);
367 int chassis, geoslot; local
371 find_unit_by_fd(fd, &chassis, &geoslot, NULL);
372 if (units[chassis][geoslot].fd == fd) close_with_IOP(chassis, geoslot, LIVE);
373 else if (units[chassis][geoslot].find_fd == fd) close_with_IOP(chassis, geoslot, FIND);
374 empty_unit(chassis, geoslot);
405 snprintf(buf, bufsize, "%s_%d_%d", proto, u->chassis, u->geoslot);
411 portnum = ((u->chassis - 1) * 64) + ((u->geoslot - 1) * 8) + IOPportnum + 1;
561 int chassis, geoslot; local
573 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) {
575 u = &units[chassis][geoslot];
698 int chassis, geoslot; local
702 find_unit_by_fd(fd, &chassis, &geoslot, &u);
717 int chassis, geoslot; local
743 find_unit_by_fd(fd, &chassis, &geoslot, NULL);
744 close_with_IOP(chassis, geoslot, FIND); /* and close out connection to him */
770 int chassis, geoslot; local
775 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) {
777 u = &units[chassis][geoslot];
781 close_with_IOP(chassis, geoslot, FIND);
814 int chassis, geoslot; local
820 for (chassis = 0; chassis <= MAX_CHASSIS; chassis++) { /* scan the table... */
822 u = &units[chassis][geoslot];