[PATCH v2 06/18] ptpd: Add debug prints for ipv4 in net.c
Gabriel Moyano
gabriel.moyano at dlr.de
Mon Apr 17 07:59:19 UTC 2023
From: Chris Johns <chrisj at rtems.org>
---
rtemsbsd/ptpd/src/dep/net.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/rtemsbsd/ptpd/src/dep/net.c b/rtemsbsd/ptpd/src/dep/net.c
index edee5dc6..a0f44098 100644
--- a/rtemsbsd/ptpd/src/dep/net.c
+++ b/rtemsbsd/ptpd/src/dep/net.c
@@ -102,6 +102,12 @@ netShutdownMulticastIPv4(NetPath * netPath, Integer32 multicastAddr)
return TRUE;
}
+ DBG("shutdown multicast ipv4: %02d.%02d.%02d.%02d\n",
+ (multicastAddr >> 24) & 0xff,
+ (multicastAddr >> 16) & 0xff,
+ (multicastAddr >> 8) & 0xff,
+ (multicastAddr >> 0) & 0xff);
+
/* Close General Multicast */
imr.imr_multiaddr.s_addr = multicastAddr;
imr.imr_interface.s_addr = netPath->interfaceAddr.s_addr;
@@ -614,6 +620,12 @@ netInitMulticastIPv4(NetPath * netPath, Integer32 multicastAddr)
imr.imr_multiaddr.s_addr = multicastAddr;
imr.imr_interface.s_addr = netPath->interfaceAddr.s_addr;
+ DBG("init multicast ipv4: %02d.%02d.%02d.%02d\n",
+ (multicastAddr >> 24) & 0xff,
+ (multicastAddr >> 16) & 0xff,
+ (multicastAddr >> 8) & 0xff,
+ (multicastAddr >> 0) & 0xff);
+
if (setsockopt(netPath->eventSock, IPPROTO_IP, IP_MULTICAST_IF,
&netPath->interfaceAddr, sizeof(struct in_addr)) < 0
|| setsockopt(netPath->generalSock, IPPROTO_IP, IP_MULTICAST_IF,
--
2.25.1
More information about the devel
mailing list