Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src Pull up revisions:



details:   https://anonhg.NetBSD.org/src/rev/75a21a3ae2c4
branches:  netbsd-6
changeset: 774157:75a21a3ae2c4
user:      jdc <jdc%NetBSD.org@localhost>
date:      Tue Jun 05 15:37:18 2012 +0000

description:
Pull up revisions:
  src/distrib/sets/lists/base/mi revision 1.992
  src/distrib/sets/lists/comp/mi revision 1.1759
  src/distrib/sets/lists/man/mi revision 1.1391
  src/usr.sbin/Makefile revision 1.265
  src/usr.sbin/wake/Makefile delete
  src/usr.sbin/wake/wake.8 delete
  src/usr.sbin/wake/wake.c delete
  src/usr.sbin/wakeonlan/Makefile add
  src/usr.sbin/wakeonlan/wakeonlan.8 add
  src/usr.sbin/wakeonlan/wakeonlan.c add
(requested by uebayasi in ticket #283).

Rename wake(8) to wakeonlan(8). Approved by core@.

diffstat:

 distrib/sets/lists/base/mi     |    5 +-
 distrib/sets/lists/comp/mi     |    5 +-
 distrib/sets/lists/man/mi      |   11 +-
 usr.sbin/Makefile              |    4 +-
 usr.sbin/wake/Makefile         |    8 -
 usr.sbin/wake/wake.8           |   68 ------------
 usr.sbin/wake/wake.c           |  218 -----------------------------------------
 usr.sbin/wakeonlan/Makefile    |    8 +
 usr.sbin/wakeonlan/wakeonlan.8 |   68 ++++++++++++
 usr.sbin/wakeonlan/wakeonlan.c |  218 +++++++++++++++++++++++++++++++++++++++++
 10 files changed, 309 insertions(+), 304 deletions(-)

diffs (truncated from 707 to 300 lines):

diff -r c4c45ca3e794 -r 75a21a3ae2c4 distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Tue Jun 05 15:36:00 2012 +0000
+++ b/distrib/sets/lists/base/mi        Tue Jun 05 15:37:18 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.984.2.3 2012/05/19 15:23:41 riz Exp $
+# $NetBSD: mi,v 1.984.2.4 2012/06/05 15:37:18 jdc Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -1493,7 +1493,8 @@
 ./usr/sbin/veriexecgen                         base-sysutil-bin
 ./usr/sbin/vipw                                        base-sysutil-bin
 ./usr/sbin/vnconfig                            base-sysutil-bin
-./usr/sbin/wake                                        base-netutil-bin
+./usr/sbin/wake                                        base-obsolete
+./usr/sbin/wakeonlan                           base-netutil-bin
 ./usr/sbin/wiconfig                            base-sysutil-bin
 ./usr/sbin/wire-test                           base-netutil-bin
 ./usr/sbin/wlanctl                             base-sysutil-bin
diff -r c4c45ca3e794 -r 75a21a3ae2c4 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Tue Jun 05 15:36:00 2012 +0000
+++ b/distrib/sets/lists/comp/mi        Tue Jun 05 15:37:18 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.1738.2.3 2012/05/19 15:23:39 riz Exp $
+#      $NetBSD: mi,v 1.1738.2.4 2012/06/05 15:37:19 jdc Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4317,7 +4317,8 @@
 ./usr/libdata/debug/usr/sbin/veriexecgen.debug comp-sysutil-debug      debug
 ./usr/libdata/debug/usr/sbin/vipw.debug                comp-sysutil-debug      debug
 ./usr/libdata/debug/usr/sbin/vnconfig.debug    comp-sysutil-debug      debug
-./usr/libdata/debug/usr/sbin/wake.debug                comp-netutil-debug      debug
+./usr/libdata/debug/usr/sbin/wake.debug                comp-obsolete           obsolete
+./usr/libdata/debug/usr/sbin/wakeonlan.debug   comp-netutil-debug      debug
 ./usr/libdata/debug/usr/sbin/wiconfig.debug    comp-sysutil-debug      debug
 ./usr/libdata/debug/usr/sbin/wire-test.debug   comp-netutil-debug      debug
 ./usr/libdata/debug/usr/sbin/wlanctl.debug     comp-sysutil-debug      debug
diff -r c4c45ca3e794 -r 75a21a3ae2c4 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Tue Jun 05 15:36:00 2012 +0000
+++ b/distrib/sets/lists/man/mi Tue Jun 05 15:37:18 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1379.2.4 2012/05/19 15:23:43 riz Exp $
+# $NetBSD: mi,v 1.1379.2.5 2012/06/05 15:37:22 jdc Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2945,7 +2945,8 @@
 ./usr/share/man/cat8/virtual.0                 man-postfix-catman      postfix,.cat
 ./usr/share/man/cat8/vmstat.0                  man-obsolete            obsolete
 ./usr/share/man/cat8/vnconfig.0                        man-sysutil-catman      .cat
-./usr/share/man/cat8/wake.0                    man-netutil-catman      .cat
+./usr/share/man/cat8/wake.0                    man-obsolete            obsolete
+./usr/share/man/cat8/wakeonlan.0               man-netutil-catman      .cat
 ./usr/share/man/cat8/walnut/MAKEDEV.0          man-obsolete            obsolete
 ./usr/share/man/cat8/walnut/makedev.0          man-obsolete            obsolete
 ./usr/share/man/cat8/wdogctl.0                 man-sysutil-catman      .cat
@@ -5517,7 +5518,8 @@
 ./usr/share/man/html8/virecover.html           man-sysutil-htmlman     html
 ./usr/share/man/html8/virtual.html             man-postfix-htmlman     postfix,html
 ./usr/share/man/html8/vnconfig.html            man-sysutil-htmlman     html
-./usr/share/man/html8/wake.html                        man-netutil-htmlman     html
+./usr/share/man/html8/wake.html                        man-obsolete            obsolete
+./usr/share/man/html8/wakeonlan.html           man-netutil-htmlman     html
 ./usr/share/man/html8/wdogctl.html             man-sysutil-htmlman     html
 ./usr/share/man/html8/wiconfig.html            man-netutil-htmlman     html
 ./usr/share/man/html8/wire-test.html           man-netutil-htmlman     html
@@ -8460,7 +8462,8 @@
 ./usr/share/man/man8/virtual.8                 man-postfix-man         postfix,.man
 ./usr/share/man/man8/vmstat.8                  man-obsolete            obsolete
 ./usr/share/man/man8/vnconfig.8                        man-sysutil-man         .man
-./usr/share/man/man8/wake.8                    man-netutil-man         .man
+./usr/share/man/man8/wake.8                    man-obsolete            obsolete
+./usr/share/man/man8/wakeonlan.8               man-netutil-man         .man
 ./usr/share/man/man8/walnut/MAKEDEV.8          man-obsolete            obsolete
 ./usr/share/man/man8/walnut/makedev.8          man-obsolete            obsolete
 ./usr/share/man/man8/wdogctl.8                 man-sysutil-man         .man
diff -r c4c45ca3e794 -r 75a21a3ae2c4 usr.sbin/Makefile
--- a/usr.sbin/Makefile Tue Jun 05 15:36:00 2012 +0000
+++ b/usr.sbin/Makefile Tue Jun 05 15:37:18 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.263 2012/02/13 01:43:22 dholland Exp $
+#      $NetBSD: Makefile,v 1.263.2.1 2012/06/05 15:37:23 jdc Exp $
 #      from: @(#)Makefile      5.20 (Berkeley) 6/12/93
 
 .include <bsd.own.mk>
@@ -29,7 +29,7 @@
        tadpolectl tcpdchk tcpdmatch tcpdrop timed tpctl tprof traceroute trpt \
        unlink usbdevs user \
        videomode vipw veriexecgen vnconfig \
-       wake wiconfig wlanctl wsconscfg wsfontload wsmoused wsmuxctl \
+       wakeonlan wiconfig wlanctl wsconscfg wsfontload wsmoused wsmuxctl \
        zdump zic
 
 .if ${MKMAKEMANDB} != "no"
diff -r c4c45ca3e794 -r 75a21a3ae2c4 usr.sbin/wake/Makefile
--- a/usr.sbin/wake/Makefile    Tue Jun 05 15:36:00 2012 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# $NetBSD: Makefile,v 1.2 2009/07/06 12:47:38 mbalmer Exp $
-
-PROG=          wake
-SRCS=          wake.c
-
-MAN=           wake.8
-
-.include <bsd.prog.mk>
diff -r c4c45ca3e794 -r 75a21a3ae2c4 usr.sbin/wake/wake.8
--- a/usr.sbin/wake/wake.8      Tue Jun 05 15:36:00 2012 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-.\" $NetBSD: wake.8,v 1.8 2010/01/04 11:34:39 mbalmer Exp $
-.\"
-.\" Copyright (c) 2009, 2010 Marc Balmer <marc%msys.ch@localhost>
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd January 4, 2010
-.Dt WAKE 8
-.Os
-.Sh NAME
-.Nm wake
-.Nd send Wake on LAN frames to hosts on a local Ethernet network
-.Sh SYNOPSIS
-.Nm
-.Op Ar interface
-.Ar lladdr
-.Op Ar lladdr ...
-.Sh DESCRIPTION
-The
-.Nm
-program is used to send Wake on LAN (WoL) frames over a local
-Ethernet network to one or more hosts using their link layer (hardware)
-addresses.
-WoL functionality is generally enabled in a machine's BIOS
-and can be used to power on machines from a remote system without
-having physical access to them.
-.Pp
-.Ar interface
-is an Ethernet interface of the local machine and is used to send the
-Wake on LAN frames over it.
-If there is only one Ethernet device available that is up and running, then the
-.Ar interface
-argument can be omitted.
-.Ar lladdr
-is the link layer address of the remote machine.
-This can be specified as the actual hardware address
-(six hexadecimal numbers separated by colons)
-or as a hostname entry in
-.Pa /etc/ethers .
-.Nm
-accepts multiple
-.Ar lladdr
-addresses.
-Link layer addresses can be determined and set using
-.Xr ifconfig 8 .
-.Sh FILES
-.Bl -tag -width "/etc/ethers" -compact
-.It /etc/ethers
-Ethernet host name data base.
-.El
-.Sh SEE ALSO
-.Xr ethers 5 ,
-.Xr ifconfig 8
-.Sh AUTHORS
-.Nm
-was written by
-.An Marc Balmer
-.Aq marc%msys.ch@localhost .
diff -r c4c45ca3e794 -r 75a21a3ae2c4 usr.sbin/wake/wake.c
--- a/usr.sbin/wake/wake.c      Tue Jun 05 15:36:00 2012 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/* $NetBSD: wake.c,v 1.13 2011/08/31 13:32:41 joerg Exp $ */
-
-/*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Marc Balmer <marc%msys.ch@localhost>
- * Copyright (C) 2000 Eugene M. Kim.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Author's name may not be used endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Send Wake on LAN packets to hosts on a local Ethernet network */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/if_types.h>
-
-#include <netinet/in.h>
-#include <netinet/if_ether.h>
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <ifaddrs.h>
-#include <limits.h>
-#include <paths.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sysexits.h>
-#include <unistd.h>
-
-#ifndef SYNC_LEN
-#define SYNC_LEN 6
-#endif
-
-#ifndef DESTADDR_COUNT
-#define DESTADDR_COUNT 16
-#endif
-
-__dead static void usage(void);
-static int wake(int, const char *);
-static int bind_if_to_bpf(char const *, int);
-static int find_ether(char *, size_t);
-static int get_ether(char const *, struct ether_addr *);
-static int send_wakeup(int, struct ether_addr const *);
-
-static void
-usage(void)
-{
-       fprintf(stderr, "usage: %s [interface] lladdr [lladdr ...]\n",
-           getprogname());
-       exit(EXIT_FAILURE);
-}
-
-static int
-wake(int bpf, const char *host)
-{
-       struct ether_addr macaddr;
-
-       if (get_ether(host, &macaddr) == -1)
-               return -1;
-
-       return send_wakeup(bpf, &macaddr);
-}
-
-static int
-bind_if_to_bpf(char const *ifname, int bpf)
-{
-       struct ifreq ifr;
-       u_int dlt;
-
-       if (strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)) >=
-           sizeof(ifr.ifr_name)) {
-               errno = ENAMETOOLONG;
-               return -1;
-       }
-       if (ioctl(bpf, BIOCSETIF, &ifr) == -1)
-               return -1;
-       if (ioctl(bpf, BIOCGDLT, &dlt) == -1)
-               return -1;
-       if (dlt != DLT_EN10MB) {
-               errno = EOPNOTSUPP;
-               return -1;
-       }
-       return 0;
-}
-
-static int
-find_ether(char *dst, size_t len)
-{



Home | Main Index | Thread Index | Old Index