New upstream version 8.1.0
This commit is contained in:
35
client_module/source/common/net/sock/NicAddressList.c
Normal file
35
client_module/source/common/net/sock/NicAddressList.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <common/net/sock/RDMASocket.h>
|
||||
#include <common/net/sock/StandardSocket.h>
|
||||
#include <common/net/sock/NetworkInterfaceCard.h>
|
||||
#include <common/net/sock/NicAddressList.h>
|
||||
|
||||
#if 0
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/inetdevice.h>
|
||||
#include <net/sock.h>
|
||||
#endif
|
||||
|
||||
bool NicAddressList_equals(NicAddressList* this, NicAddressList* other)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (NicAddressList_length(this) == NicAddressList_length(other))
|
||||
{
|
||||
PointerListIter thisIter;
|
||||
PointerListIter otherIter;
|
||||
|
||||
PointerListIter_init(&thisIter, (PointerList*) this);
|
||||
PointerListIter_init(&otherIter, (PointerList*) other);
|
||||
|
||||
for (result = true;
|
||||
result == true && !PointerListIter_end(&thisIter) && !PointerListIter_end(&otherIter);
|
||||
PointerListIter_next(&thisIter), PointerListIter_next(&otherIter))
|
||||
{
|
||||
result = NicAddress_equals((NicAddress*) PointerListIter_value(&thisIter),
|
||||
(NicAddress*) PointerListIter_value(&otherIter));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user