Subject: Patches for rsvpd.rel4.2a4-1.tar.gz

From: Craig Rodrigues <[email-masked]>
Date: Thu, 8 Feb 2001 20:57:04 -0500

Hello,

I have downloaded rsvpd.rel4.2a4-1.tar.gz from the ISI
ftp site, and encountered come compiler errors which prevented
me from building rsvpd under Redhat Linux 6.2 with gcc 2.95.2.

I corrected these errors, and fixed a few other things which
caused compiler warnings.

Could the maintainers of RSVP accept my patches
to rsvpd.redl4.2a4-1.tar.gz?

Thank you. 
-- 
Craig Rodrigues        Distributed Systems and Logistics
[email-masked]       BBN Technologies
                       Cambridge, MA
--- rel4.2a4/rsvpd/rsvp_trans.c.orig	Thu Feb  8 20:08:38 2001
+++ rel4.2a4/rsvpd/rsvp_trans.c	Thu Feb  8 20:08:51 2001
@@ -153,12 +153,6 @@
 #endif	/* sun */
 
 #ifdef	linux
-struct in_pktinfo
-{
-	int		ipi_ifindex;
-	struct in_addr	ipi_spec_dst;
-	struct in_addr	ipi_addr;
-};
 
 #define	uh_sport source
 #define	uh_dport dest
--- rel4.2a4/rsvpd/rsvp_key.c.orig	Thu Feb  8 20:14:40 2001
+++ rel4.2a4/rsvpd/rsvp_key.c	Thu Feb  8 20:15:53 2001
@@ -232,17 +232,21 @@
       /*	Check that recomputed digest matches what arrived.
        */
       if (!(memcmp(received_digest, computed_digest, MD5_LENG)))
+      {
 	if(check_seqno(&integrity, kap))     /* Valid sequence number    */
 	  break;
 	else
 	  return PKT_ERR_REPLAY;
+      }
     }
 
   if (!kap)
+  {
     if (i == 0)
       return PKT_ERR_NOINTASS;	             /* No matching key          */
     else
       return PKT_ERR_INTEGRITY;              /* No satisfactory key      */
+  }
 
   return 0;                                /* OK                         */
 }
@@ -452,12 +456,14 @@
 
   /* Previous field not invalid */
   if (!((old[0] == 0xffffffff) && (old[1] == 0xffffffff)))
+  {
     if (LT(new[0], old[0]) && ((old[0] - new[0]) < UINT_MAX/2))
       return 0;
     else if ((new[0] == old[0]) && (LT(new[1], old[1])))
       return 0;
     else if (LT(old[0], new[0]) && ((new[0] - old[0]) > UINT_MAX/2))
       return 0;
+  }
 
   /* Valid sequence number, update stored value */
   old[0] =  new[0];
--- rel4.2a4/rsvpd/rapi_lib.c.orig	Thu Feb  8 20:11:01 2001
+++ rel4.2a4/rsvpd/rapi_lib.c	Thu Feb  8 20:11:16 2001
@@ -1420,7 +1420,6 @@
 static char *
 copy_tspec_i2d(rapi_tspec_t * i_spec, API_TSpec * d_spec, char *endp)
 	{
-	int printf();
 	char *next;
 
 	if ((char *)d_spec + sizeof(rapi_tspec_t) > endp) {
--- rel4.2a4/rsvpd/rsvp_socks.c.orig	Thu Feb  8 20:11:39 2001
+++ rel4.2a4/rsvpd/rsvp_socks.c	Thu Feb  8 20:12:40 2001
@@ -1283,8 +1283,13 @@
  *
  */
 
+#ifndef MSG_TRUNC
 #define MSG_TRUNC	0x20
+#endif /* MSG_TRUNC */
+
+#ifndef MSG_DONTWAIT
 #define MSG_DONTWAIT	0x40	/* Nonblocking io		 */
+#endif /* MSG_DONTWAIT */
 
 int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions)
 {
--- rel4.2a4/rsvpd/rsrr_unicast.c.orig	Thu Feb  8 20:13:16 2001
+++ rel4.2a4/rsvpd/rsrr_unicast.c	Thu Feb  8 20:13:52 2001
@@ -692,8 +692,13 @@
 #define R_STALETIME	15
 #define R_LOAD		30
 
+#ifndef MSG_TRUNC
 #define MSG_TRUNC	0x20
+#endif /* MSG_TRUNC */
+
+#ifndef MSG_DONTWAIT
 #define MSG_DONTWAIT	0x40	/* Nonblocking io		 */
+#endif /* MSG_DONTWAIT */
 
 static struct rtnl_handle rt_nl;
 static const __u32 zerokey[KEYLEN];
--- rel4.2a4/apitools/scrapi.c.orig	Thu Feb  8 20:27:58 2001
+++ rel4.2a4/apitools/scrapi.c	Thu Feb  8 20:29:31 2001
@@ -11,6 +11,8 @@
 #include <strings.h>
 #include <limits.h>
 #include <unistd.h>
+#include <string.h>
+#include <sys/ioctl.h>
 #include <rapi_err.h>
 
 /*
--- rel4.2a4/apitools/rtap_main.c.orig	Thu Feb  8 20:35:02 2001
+++ rel4.2a4/apitools/rtap_main.c	Thu Feb  8 20:36:49 2001
@@ -41,9 +41,9 @@
 /*
  *	External declarations
  */
-int	Do_Command(char *, FILE *);
-void	rtap_cmds_init();
-char	*rapi_errlist[];
+extern int	Do_Command(char *, FILE *);
+extern void	rtap_cmds_init();
+extern char	*rapi_errlist[];
 
 /*
  * Forward Declarations