src/tcpkali_iface.c
static const char *
interface_by_addr(struct ifaddrs *ifp, struct sockaddr *addr) {
    for(; ifp; ifp = ifp->ifa_next) {
        if(ifp->ifa_addr
           && sockaddrs_match(addr, ifp->ifa_addr, SMATCH_ADDR_ONLY)) {
            return ifp->ifa_name;
        }
    }

    return NULL;
}
/*
 * Return the name of the interface which contains given IP.
 */
Return the name of the interface which contains given IP.
Return the name of the interface which contains given IP .
static const char *
interface_by_addr(struct ifaddrs *ifp, struct sockaddr *addr) {
    for(; ifp; ifp = ifp->ifa_next) {
        if(ifp->ifa_addr
           && sockaddrs_match(addr, ifp->ifa_addr, SMATCH_ADDR_ONLY)) {
            return ifp->ifa_name;
        }
    }
    return NULL;
}
static const char * interface_by_addr ( struct ifaddrs * ifp , struct sockaddr * addr ) { for ( ; ifp ; ifp = ifp -> ifa_next ) { if ( ifp -> ifa_addr && sockaddrs_match ( addr , ifp -> ifa_addr , SMATCH_ADDR_ONLY ) ) { return ifp -> ifa_name ; } } return NULL ; }
Return the name of the interface which contains given IP.
Return the name of the interface which contains given IP .