1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

Make it compile and (except for mrouted which is untested as yet) run.

Some of these ``modified'' files aren't really modified at all, but CVS
isn't smart enough to know the difference.
This commit is contained in:
Garrett Wollman 1994-09-08 02:51:37 +00:00
parent 7c680644c9
commit bb49371b5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2560
13 changed files with 116 additions and 4 deletions

View File

@ -0,0 +1,5 @@
# $Id$
SUBDIR= common mrouted mrinfo map-mbone mtrace
.include <bsd.subdir.mk>

View File

@ -0,0 +1 @@
.include "${.CURDIR}/../../Makefile.inc"

View File

@ -0,0 +1,17 @@
# $Id$
LIB= mrouted
NOPROFILE=
NOSHARED=
S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
SRCS= igmp.c inet.c kern.c
NOMAN=
# nothing to install
install:
.include <bsd.lib.mk>

View File

@ -85,7 +85,9 @@ extern char s3[];
extern int errno;
extern int sys_nerr;
#ifndef __FreeBSD__
extern char * sys_errlist[];
#endif
extern void log();

View File

@ -41,6 +41,8 @@ void init_igmp()
k_set_loop(FALSE); /* disable multicast loopback */
ip = (struct ip *)send_buf;
ip->ip_hl = sizeof(struct ip) >> 2;
ip->ip_v = IPVERSION;
ip->ip_tos = 0;
ip->ip_off = 0;
ip->ip_p = IPPROTO_IGMP;
@ -255,7 +257,7 @@ void send_igmp(src, dst, type, code, group, datalen)
u_long group;
int datalen;
{
static struct sockaddr_in sdst = {AF_INET};
static struct sockaddr_in sdst = {AF_INET, sizeof sdst};
struct ip *ip;
struct igmp *igmp;

View File

@ -0,0 +1,20 @@
# $Id$
PROG= map-mbone
S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
.if exists($S/common/obj)
LDDESTDIR+= -L$S/common/obj
DPADD+= $S/common/obj/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
.endif
SRCS= mapper.c
NOMAN=
.include <bsd.prog.mk>

View File

@ -575,7 +575,7 @@ char *inet_name(addr)
{
struct hostent *e;
e = gethostbyaddr(&addr, sizeof(addr), AF_INET);
e = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET);
return e ? e->h_name : 0;
}
@ -862,6 +862,7 @@ main(argc, argv)
int addrlen = sizeof(addr);
addr.sin_family = AF_INET;
addr.sin_len = sizeof addr;
addr.sin_addr.s_addr = dvmrp_group;
addr.sin_port = htons(2000); /* any port over 1024 will do... */
if ((udp = socket(AF_INET, SOCK_DGRAM, 0)) < 0

View File

@ -88,7 +88,7 @@ inet_name(addr)
{
struct hostent *e;
e = gethostbyaddr(&addr, sizeof(addr), AF_INET);
e = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET);
return e ? e->h_name : "?";
}
@ -326,6 +326,7 @@ usage: fprintf(stderr,
int addrlen = sizeof(addr);
addr.sin_family = AF_INET;
addr.sin_len = sizeof addr;
addr.sin_addr.s_addr = target_addr;
addr.sin_port = htons(2000); /* any port over 1024 will
* do... */

View File

@ -0,0 +1,20 @@
# $Id$
PROG= mrinfo
S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
.if exists($S/common/obj)
LDDESTDIR+= -L$S/common/obj
DPADD+= $S/common/obj/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
.endif
SRCS= mrinfo.c
NOMAN=
.include <bsd.prog.mk>

View File

@ -0,0 +1,20 @@
# $Id$
PROG= mrouted
S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
.if exists($S/common/obj)
LDDESTDIR+= -L$S/common/obj
DPADD+= $S/common/obj/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
.endif
SRCS= config.c main.c route.c vif.c prune.c callout.c
MAN8= ${.CURDIR}/../mrouted.8
.include <bsd.prog.mk>

View File

@ -16,7 +16,7 @@ inet_name(addr)
{
struct hostent *e;
e = gethostbyaddr(&addr, sizeof(addr), AF_INET);
e = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET);
return e ? e->h_name : "?";
}
@ -219,6 +219,7 @@ usage: printf("usage: mtrace -s <src> -g <grp> -d <dst> -n <# reports> \n");
/* Obtain the local address from which to send out packets */
addr.sin_family = AF_INET;
addr.sin_len = sizeof addr;
addr.sin_addr.s_addr = qgrp;
addr.sin_port = htons(2000);

View File

@ -0,0 +1,20 @@
# $Id$
PROG= mtrace
S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
.if exists($S/common/obj)
LDDESTDIR+= -L$S/common/obj
DPADD+= $S/common/obj/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
.endif
SRCS= mtrace.c
NOMAN=
.include <bsd.prog.mk>

View File

@ -569,6 +569,7 @@ void accept_neighbor_request(src, dst)
int addrlen = sizeof(addr);
addr.sin_family = AF_INET;
addr.sin_len = sizeof addr;
addr.sin_addr.s_addr = dst;
addr.sin_port = htons(2000); /* any port over 1024 will do... */
if ((udp = socket(AF_INET, SOCK_DGRAM, 0)) < 0
@ -652,6 +653,7 @@ void accept_neighbor_request2(src, dst)
int addrlen = sizeof(addr);
addr.sin_family = AF_INET;
addr.sin_len = sizeof addr;
addr.sin_addr.s_addr = dst;
addr.sin_port = htons(2000); /* any port over 1024 will do... */
if ((udp = socket(AF_INET, SOCK_DGRAM, 0)) < 0