Lines Matching refs:geoslot
71 int geoslot; member
145 int chassis, geoslot; in dump_unit_table() local
150 for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) { in dump_unit_table()
151 if (units[chassis][geoslot].ip != NULL) in dump_unit_table()
152 …printf("%d:%d %2d %s\n", chassis, geoslot, units[chassis][geoslot].fd, units[chassis][geoslot].ip); in dump_unit_table()
153 p = units[chassis][geoslot].iface; in dump_unit_table()
164 static int find_unit_by_fd(int fd, int *chassis, int *geoslot, unit_t **unit_ptr) { in find_unit_by_fd() argument
171 if (geoslot) *geoslot = s; in find_unit_by_fd()
182 int chassis, geoslot; in read_client_nbytes() local
185 find_unit_by_fd(fd, &chassis, &geoslot, &u); in read_client_nbytes()
208 static void empty_unit(int chassis, int geoslot) { argument
209 unit_t *u = &units[chassis][geoslot];
221 int chassis, geoslot; local
224 for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) {
225 if (units[chassis][geoslot].ip != NULL) {
226 … free(units[chassis][geoslot].ip); /* get rid of the malloc'ed space that holds the IP address */
227 units[chassis][geoslot].ip = 0; /* then set the pointer to NULL */
229 empty_unit(chassis, geoslot);
235 int chassis, geoslot; local
241 for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) {
242 if (units[chassis][geoslot].ip != NULL) {
243 p = units[chassis][geoslot].iface;
262 int chassis, geoslot; local
287 geoslot = *(ptr2 + 5) - '0'; /* and geo-slot number */
289 …geoslot < 1 || geoslot > MAX_GEOSLOT) { /* if the chassis and/or slot numbers appear to be bad...…
298 u = &units[chassis][geoslot];
301 u->geoslot = geoslot;
343 static void close_with_IOP(int chassis, int geoslot, int flag) {
346 if (flag == LIVE) id = &units[chassis][geoslot].fd;
347 else id = &units[chassis][geoslot].find_fd;
356 int chassis, geoslot; local
359 if (find_unit_by_fd(handle->fd, &chassis, &geoslot, &u) == 0)
361 close_with_IOP(chassis, geoslot, LIVE);
369 int chassis, geoslot; local
373 find_unit_by_fd(fd, &chassis, &geoslot, NULL);
374 if (units[chassis][geoslot].fd == fd) close_with_IOP(chassis, geoslot, LIVE);
375 else if (units[chassis][geoslot].find_fd == fd) close_with_IOP(chassis, geoslot, FIND);
376 empty_unit(chassis, geoslot);
407 snprintf(buf, bufsize, "%s_%d_%d", proto, u->chassis, u->geoslot);
413 portnum = ((u->chassis - 1) * 64) + ((u->geoslot - 1) * 8) + IOPportnum + 1;
563 int chassis, geoslot; local
576 for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) { /* now loop over all the devices */
577 u = &units[chassis][geoslot];
700 int chassis, geoslot; local
704 find_unit_by_fd(fd, &chassis, &geoslot, &u);
719 int chassis, geoslot; local
745 find_unit_by_fd(fd, &chassis, &geoslot, NULL);
746 close_with_IOP(chassis, geoslot, FIND); /* and close out connection to him */
772 int chassis, geoslot; local
778 for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) {
779 u = &units[chassis][geoslot];
783 close_with_IOP(chassis, geoslot, FIND);
816 int chassis, geoslot; local
823 for (geoslot = 0; geoslot <= MAX_GEOSLOT; geoslot++) {
824 u = &units[chassis][geoslot];