openslp/openslp.v1sladdr.diff

35 lines
1.5 KiB
Diff
Raw Normal View History

--- ./common/slp_message.h.orig 2005-04-13 17:21:37.000000000 +0000
+++ ./common/slp_message.h 2005-04-13 17:22:47.527724927 +0000
@@ -93,6 +93,7 @@
#define SLP_RESERVED_PORT 427
#define SLP_MCAST_ADDRESS 0xeffffffd /* 239.255.255.253 */
#define SLP_BCAST_ADDRESS 0xffffffff /* 255.255.255.255 */
+#define SLPv1_SL_MCAST_ADDRESS 0xe0000116 /* 224.0.1.22 */
#define SLPv1_DA_MCAST_ADDRESS 0xe0000123 /* 224.0.1.35 */
#define LOOPBACK_ADDRESS 0x7f000001 /* 127.0.0.1 */
#define SLP_MAX_DATAGRAM_SIZE 1400
--- ./slpd/slpd_incoming.c.orig 2005-04-13 15:58:18.000000000 +0000
+++ ./slpd/slpd_incoming.c 2005-04-13 17:29:26.486900643 +0000
@@ -534,6 +531,21 @@
}
#if defined(ENABLE_SLPv1)
+ /*------------------------------------------------------------*/
+ /* Create socket that will handle multicast UDP for SLPv1 */
+ /* Service Location General Multicast address. */
+ /*------------------------------------------------------------*/
+ mcastaddr.s_addr = htonl(SLPv1_SL_MCAST_ADDRESS);
+ sock = SLPDSocketCreateBoundDatagram(&myaddr,
+ &mcastaddr,
+ DATAGRAM_MULTICAST);
+ if (sock)
+ {
+ SLPListLinkTail(&G_IncomingSocketList,(SLPListItem*)sock);
+ SLPDLog("SLPv1 Service Location General Multicast socket on %s ready\n",
+ inet_ntoa(myaddr));
+ }
+
if (G_SlpdProperty.isDA)
{
/*------------------------------------------------------------*/