inet-3.6.4/src/inet/transportlayer/udp/UDP.cc
/*
 * Multicast memberships are sorted first by multicastAddress, then by interfaceId.
 * The interfaceId -1 comes after any other interfaceId.
 */
Multicast memberships are sorted first by multicastAddress, then by interfaceId.
The interfaceId -1 comes after any other interfaceId.
Multicast memberships are sorted first by multicastAddress then by interfaceId . The interfaceId - 1 comes after any other interfaceId .
static bool lessMembership(const UDP::MulticastMembership *first, const UDP::MulticastMembership *second)
{
    if (first->multicastAddress != second->multicastAddress)
        return first->multicastAddress < second->multicastAddress;
    if (first->interfaceId == -1 || first->interfaceId >= second->interfaceId)
        return false;
    return true;
}
static bool lessMembership ( const UDP :: MulticastMembership * first , const UDP :: MulticastMembership * second ) { if ( first -> multicastAddress != second -> multicastAddress ) return first -> multicastAddress < second -> multicastAddress ; if ( first -> interfaceId == -1 || first -> interfaceId >= second -> interfaceId ) return false ; return true ; }
Multicast memberships are sorted first by multicastAddress, then by interfaceId.
Multicast memberships are sorted first by multicastAddress then by interfaceId .