summaryrefslogtreecommitdiff
path: root/usr.sbin/mld6query
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2001-06-11 12:39:29 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2001-06-11 12:39:29 +0000
commit33841545909f4a4ee94aa148b3a9cbcdc1abb02a (patch)
treea79fc7ad2b97862c4a404f352f0211ad93a7b5f1 /usr.sbin/mld6query
parent52ebde4fbaab8a8b79de6b17892943783abec7be (diff)
Notes
Diffstat (limited to 'usr.sbin/mld6query')
-rw-r--r--usr.sbin/mld6query/mld6.c9
-rw-r--r--usr.sbin/mld6query/mld6query.84
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/mld6query/mld6.c b/usr.sbin/mld6query/mld6.c
index 473e0f4f00fc..9b0b30ad644f 100644
--- a/usr.sbin/mld6query/mld6.c
+++ b/usr.sbin/mld6query/mld6.c
@@ -1,3 +1,6 @@
+/* $KAME: mld6.c,v 1.11 2001/05/13 15:45:07 suz Exp $ */
+/* $FreeBSD$ */
+
/*
* Copyright (C) 1998 WIDE Project.
* All rights reserved.
@@ -75,7 +78,7 @@ main(int argc, char *argv[])
int ch;
type = MLD6_LISTENER_QUERY;
- while ((ch = getopt(argc, argv, "d")) != EOF) {
+ while ((ch = getopt(argc, argv, "dr")) != -1) {
switch (ch) {
case 'd':
type = MLD6_LISTENER_DONE;
@@ -98,7 +101,7 @@ main(int argc, char *argv[])
ifindex = (u_short)if_nametoindex(argv[0]);
if (ifindex == 0)
usage();
- if (argc == 3 && inet_pton(AF_INET6, argv[1], &maddr) != 1)
+ if (argc == 2 && inet_pton(AF_INET6, argv[1], &maddr) != 1)
usage();
if ((s = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0)
@@ -188,7 +191,7 @@ make_msg(int index, struct in6_addr *addr, u_int type)
m.msg_control = (caddr_t)cmsgbuf;
m.msg_controllen = cmsglen;
/* specify the outgoing interface */
- cmsgp->cmsg_len = CMSG_SPACE(sizeof(struct in6_pktinfo));
+ cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo));
cmsgp->cmsg_level = IPPROTO_IPV6;
cmsgp->cmsg_type = IPV6_PKTINFO;
pi = (struct in6_pktinfo *)CMSG_DATA(cmsgp);
diff --git a/usr.sbin/mld6query/mld6query.8 b/usr.sbin/mld6query/mld6query.8
index 470e18ae63f7..4b7bf9c58d19 100644
--- a/usr.sbin/mld6query/mld6query.8
+++ b/usr.sbin/mld6query/mld6query.8
@@ -1,3 +1,5 @@
+.\" $KAME: mld6query.8,v 1.5 2000/12/04 06:28:23 itojun Exp $
+.\"
.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
.\" All rights reserved.
.\"
@@ -25,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: mld6query.8,v 1.3 1999/08/20 10:00:06 itojun Exp $
+.\" $FreeBSD$
.\"
.Dd May 17, 1998
.Dt MLD6QUERY 8