|
@@ -589,6 +589,14 @@ const cmChar_t* cmUdpAddrToString( cmUdpH_t h, const struct sockaddr_in* addr )
|
589
|
589
|
return p->ntopBuf;
|
590
|
590
|
}
|
591
|
591
|
|
|
592
|
+bool cmUdpAddrIsEqual( const struct sockaddr_in* a0, const struct sockaddr_in* a1 )
|
|
593
|
+{
|
|
594
|
+ return a0->sin_family == a1->sin_family
|
|
595
|
+ && a0->sin_port == a1->sin_port
|
|
596
|
+ && memcmp(&a0->sin_addr,&a1->sin_addr,sizeof(a0->sin_addr))==0;
|
|
597
|
+}
|
|
598
|
+
|
|
599
|
+
|
592
|
600
|
const cmChar_t* cmUdpHostName( cmUdpH_t h )
|
593
|
601
|
{
|
594
|
602
|
cmUdp_t* p = _cmUdpHandleToPtr(h);
|