summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mrouted/defs.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-01-06 21:10:30 +0000
committerpeter <peter@FreeBSD.org>1996-01-06 21:10:30 +0000
commitd4c03f31b99ac4bd269582b4d2fee704364a2c1e (patch)
treef1d0a40a2a6e33e9f309cdfe59bfbb0d9a7d4628 /usr.sbin/mrouted/defs.h
parenta8e9d6a2eaa9df5881201d40c5c05c6154333fef (diff)
downloadFreeBSD-src-d4c03f31b99ac4bd269582b4d2fee704364a2c1e.zip
FreeBSD-src-d4c03f31b99ac4bd269582b4d2fee704364a2c1e.tar.gz
Resync our mainline to mrouted release 3.8.
This will make FreeBSD boxes better behaved 'MBONE Citizens', based on a couple of the comments about the severity of fixes.. Agreed to by: wollman, fenner@parc.xerox.com
Diffstat (limited to 'usr.sbin/mrouted/defs.h')
-rw-r--r--usr.sbin/mrouted/defs.h41
1 files changed, 33 insertions, 8 deletions
diff --git a/usr.sbin/mrouted/defs.h b/usr.sbin/mrouted/defs.h
index 5829314..63aef77 100644
--- a/usr.sbin/mrouted/defs.h
+++ b/usr.sbin/mrouted/defs.h
@@ -7,7 +7,7 @@
* Leland Stanford Junior University.
*
*
- * $Id: defs.h,v 3.6.1.1 1995/06/26 00:18:18 fenner Exp $
+ * $Id: defs.h,v 3.8 1995/11/29 22:36:34 fenner Rel $
*/
@@ -23,6 +23,9 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
+#ifdef SYSV
+#include <sys/sockio.h>
+#endif
#include <sys/time.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -46,7 +49,7 @@ typedef u_int u_int32;
#endif
typedef void (*cfunc_t) __P((void *));
-typedef void (*ihfunc_t) __P((fd_set *));
+typedef void (*ihfunc_t) __P((int, fd_set *));
#include "dvmrp.h"
#include "vif.h"
@@ -68,13 +71,17 @@ typedef void (*ihfunc_t) __P((fd_set *));
#define TIMER_INTERVAL ROUTE_MAX_REPORT_DELAY
+#define VENDOR_CODE 1 /* Get a new vendor code if you make significant
+ * changes to mrouted. */
+
#define PROTOCOL_VERSION 3 /* increment when packet format/content changes */
-#define MROUTED_VERSION 6 /* increment on local changes or bug fixes, */
+#define MROUTED_VERSION 8 /* increment on local changes or bug fixes, */
/* reset to 0 whever PROTOCOL_VERSION increments */
-#define MROUTED_LEVEL ( (MROUTED_VERSION << 8) | PROTOCOL_VERSION | \
- ((NF_PRUNE | NF_GENID | NF_MTRACE) << 16))
+#define MROUTED_LEVEL ((MROUTED_VERSION << 8) | PROTOCOL_VERSION | \
+ ((NF_PRUNE | NF_GENID | NF_MTRACE) << 16) | \
+ (VENDOR_CODE << 24))
/* for IGMP 'group' field of DVMRP messages */
#define LEAF_FLAGS (( vifs_with_neighbors == 1 ) ? 0x010000 : 0)
@@ -98,10 +105,17 @@ typedef void (*ihfunc_t) __P((fd_set *));
#define BIT_TST(X,n) ((X) & 1 << (n))
#endif /* RSRR */
+#ifdef SYSV
+#define bcopy(a, b, c) memcpy(b, a, c)
+#define bzero(s, n) memset((s), 0, (n))
+#define setlinebuf(s) setvbuf(s, NULL, _IOLBF, 0)
+#define signal(s,f) sigset(s,f)
+#endif
+
/*
* External declarations for global variables and functions.
*/
-#define RECV_BUF_SIZE MAX_IP_PACKET_LEN
+#define RECV_BUF_SIZE 8192
extern char *recv_buf;
extern char *send_buf;
extern int igmp_socket;
@@ -139,6 +153,17 @@ extern int sys_nerr;
extern char * sys_errlist[];
#endif
+#ifdef OLD_KERNEL
+#define MRT_INIT DVMRP_INIT
+#define MRT_DONE DVMRP_DONE
+#define MRT_ADD_VIF DVMRP_ADD_VIF
+#define MRT_DEL_VIF DVMRP_DEL_VIF
+#define MRT_ADD_MFC DVMRP_ADD_MFC
+#define MRT_DEL_MFC DVMRP_DEL_MFC
+
+#define IGMP_PIM 0x14
+#endif
+
/* main.c */
extern void log __P((int, int, char *, ...));
extern int register_input_handler __P((int fd, ihfunc_t func));
@@ -161,7 +186,7 @@ extern void timer_clearTimer __P((int timer_id));
extern void init_routes __P((void));
extern void start_route_updates __P((void));
extern void update_route __P((u_int32 origin, u_int32 mask,
- int metric, u_int32 src,
+ u_int metric, u_int32 src,
vifi_t vifi));
extern void age_routes __P((void));
extern void expire_all_routes __P((void));
@@ -285,7 +310,7 @@ extern int find_src_grp __P((u_int32 src, u_int32 mask,
/* rsrr.c */
extern void rsrr_init __P((void));
-extern void rsrr_read __P((fd_set *rfd));
+extern void rsrr_read __P((int f, fd_set *rfd));
extern void rsrr_clean __P((void));
extern void rsrr_cache_send __P((struct gtable *gt, int notify));
extern void rsrr_cache_clean __P((struct gtable *gt));
OpenPOWER on IntegriCloud