isc_result_t isc_interfaceiter_next(isc_interfaceiter_t *iter) { isc_result_t result; REQUIRE(VALID_IFITER(iter)); REQUIRE(iter->result == ISC_R_SUCCESS); for (;;) { result = internal_next(iter); if (result == ISC_R_NOMORE) { result = internal_next6(iter); if (result != ISC_R_SUCCESS) break; result = internal_current6(iter); if (result != ISC_R_IGNORE) break; } else if (result != ISC_R_SUCCESS) break; result = internal_current(iter); if (result != ISC_R_IGNORE) break; } iter->result = result; return (result); }
static isc_result_t internal_current(isc_interfaceiter_t *iter) { #if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR) if (iter->mode == 6) { iter->result6 = internal_current6(iter); if (iter->result6 != ISC_R_NOMORE) return (iter->result6); } #endif return (internal_current4(iter)); }
static isc_result_t internal_current(isc_interfaceiter_t *iter) { #if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR) if (iter->mode == 6) { iter->result6 = internal_current6(iter); if (iter->result6 != ISC_R_NOMORE) return (iter->result6); } #endif #ifdef HAVE_TRUCLUSTER if (!iter->clua_done) return(internal_current_clusteralias(iter)); #endif return (internal_current4(iter)); }
isc_result_t isc_interfaceiter_next(isc_interfaceiter_t *iter) { isc_result_t result; REQUIRE(VALID_IFITER(iter)); REQUIRE(iter->result == ISC_R_SUCCESS); REQUIRE(use_GAA_determined); if (use_GAA) { do { result = internal_next_GAA(iter); if (ISC_R_NOMORE == result) goto set_result; result = internal_current_GAA(iter); } while (ISC_R_IGNORE == result); goto set_result; } for (;;) { result = internal_next(iter); if (result == ISC_R_NOMORE) { result = internal_next6(iter); if (result != ISC_R_SUCCESS) break; result = internal_current6(iter); if (result != ISC_R_IGNORE) break; } else if (result != ISC_R_SUCCESS) break; result = internal_current(iter); if (result != ISC_R_IGNORE) break; } set_result: iter->result = result; return (result); }