[PATCH] netinet/igmp.h without kernel headers

Thorsten Kukuk kukuk@suse.de
Mon May 12 14:18:00 GMT 2003


Hi,

On Sat, May 10, Ulrich Drepper wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Thorsten Kukuk wrote:
> 
> > I decided to move it to ient/netinet, new patch appended.
> 
> OK, I've applied it.  Thanks,

As discussed with Roland offline (seems libc-alpha got lost from CC),
I synced the file with BSD and with the latest Linux kernel.

I tested this with all of our 3500 source packages and none failed
to build or need changes, so I think it is compatible with the old
version and we don't break any obscure application.

I append a new patch against current CVS.

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B
-------------- next part --------------
2003-05-12  Thorsten Kukuk <kukuk@suse.de>

	* inet/netinet/igmp.h: Sync with Linux Kernel 2.5.69 and *BSD

--- inet/netinet/igmp.h	2003-05-10 10:34:08.000000000 +0200
+++ inet/netinet/igmp.h	2003-05-12 15:36:45.000000000 +0200
@@ -22,44 +22,6 @@
 #include <sys/cdefs.h>
 #include <sys/types.h>
 
-#define IGMP_HOST_MEMBERSHIP_QUERY      0x11    /* From RFC1112 */
-#define IGMP_HOST_MEMBERSHIP_REPORT     0x12    /* Ditto */
-#define IGMP_DVMRP                      0x13    /* DVMRP routing */
-#define IGMP_PIM                        0x14    /* PIM routing */
-#define IGMP_TRACE                      0x15
-#define IGMP_HOST_NEW_MEMBERSHIP_REPORT 0x16    /* New version of 0x11 */
-#define IGMP_HOST_LEAVE_MESSAGE         0x17
-
-#define IGMP_MTRACE_RESP                0x1e
-#define IGMP_MTRACE                     0x1f
-
-/*
- *      Use the BSD names for these for compatibility
- */
-
-#define IGMP_DELAYING_MEMBER            0x01
-#define IGMP_IDLE_MEMBER                0x02
-#define IGMP_LAZY_MEMBER                0x03
-#define IGMP_SLEEPING_MEMBER            0x04
-#define IGMP_AWAKENING_MEMBER           0x05
-
-#define IGMP_MINLEN                     8
-
-#define IGMP_MAX_HOST_REPORT_DELAY      10      /* max delay for response to */
-                                                /* query (in seconds)   */
-
-#define IGMP_TIMER_SCALE                10      /* denotes that the igmphdr->timer field */
-                                                /* specifies time in 10th of seconds     */
-
-#define IGMP_AGE_THRESHOLD              400     /* If this host don't hear any IGMP V1  */
-                                                /* message in this period of time,      */
-                                                /* revert to IGMP v2 router.            */
-
-#define IGMP_ALL_HOSTS          htonl(0xE0000001L)
-#define IGMP_ALL_ROUTER         htonl(0xE0000002L)
-#define IGMP_LOCAL_GROUP        htonl(0xE0000000L)
-#define IGMP_LOCAL_GROUP_MASK   htonl(0xFFFFFF00L)
-
 #ifdef __USE_BSD
 
 #include <netinet/in.h>
@@ -109,6 +71,8 @@
   struct in_addr igmp_group;      /* group address */
 };
 
+#define IGMP_MINLEN			8
+
 /*
  * Message types, including version number.
  */
@@ -117,6 +81,44 @@
 #define IGMP_V2_MEMBERSHIP_REPORT	0x16	/* Ver. 2 membership report */
 #define IGMP_V2_LEAVE_GROUP		0x17	/* Leave-group message	    */
 
+#define IGMP_DVMRP			0x13	/* DVMRP routing message    */
+#define IGMP_PIM			0x14	/* PIM routing message      */
+#define IGMP_TRACE			0x15
+
+#define IGMP_MTRACE_RESP		0x1e	/* traceroute resp.(to sender)*/
+#define IGMP_MTRACE			0x1f	/* mcast traceroute messages  */
+
+#define IGMP_MAX_HOST_REPORT_DELAY	10	/* max delay for response to     */
+						/*  query (in seconds) according */
+						/*  to RFC1112                   */
+#define IGMP_TIMER_SCALE		10	/* denotes that the igmp code field */
+						/* specifies time in 10th of seconds*/
+
+/*
+ * States for the IGMP v2 state table.
+ */
+#define IGMP_DELAYING_MEMBER	1
+#define IGMP_IDLE_MEMBER	2
+#define IGMP_LAZY_MEMBER	3
+#define IGMP_SLEEPING_MEMBER	4
+#define IGMP_AWAKENING_MEMBER	5
+
+/*
+ * States for IGMP router version cache.
+ */
+#define IGMP_v1_ROUTER		1
+#define IGMP_v2_ROUTER		2
+
+/*
+ * The following four defininitions are for backwards compatibility.
+ * They should be removed as soon as all applications are updated to
+ * use the new constant names.
+ */
+#define IGMP_HOST_MEMBERSHIP_QUERY	IGMP_MEMBERSHIP_QUERY
+#define IGMP_HOST_MEMBERSHIP_REPORT	IGMP_V1_MEMBERSHIP_REPORT
+#define IGMP_HOST_NEW_MEMBERSHIP_REPORT	IGMP_V2_MEMBERSHIP_REPORT
+#define IGMP_HOST_LEAVE_MESSAGE		IGMP_V2_LEAVE_GROUP
+
 __END_DECLS
 
 #endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20030512/7e127fea/attachment.sig>


More information about the Libc-alpha mailing list