Permalink
Browse files

Import source code files from version 0.41

  • Loading branch information...
1 parent 94af4aa commit 4beb45d34adba645b2764d949186fff9c4ed7b51 Jose Pedro Oliveira committed Nov 11, 2011
Showing with 108 additions and 29 deletions.
  1. +5 −0 Changes
  2. +2 −0 MANIFEST
  3. +10 −0 META.yml
  4. +11 −3 Makefile.PL
  5. +21 −2 README
  6. +30 −0 SIGNATURE
  7. +8 −4 examples/lab001.wol
  8. +21 −20 wakeonlan
View
5 Changes
@@ -49,3 +49,8 @@ Revision history for Perl script wakeonlan.
- New command line parameters
- Ability to load ethernet addresses from file
+0.41 2005-01-27 jpo@di.uminho.pt
+
+ - Minor documentation updates (including several typo corrections).
+
+# vim:set ai ts=4 sw=4:
View
2 MANIFEST
@@ -4,3 +4,5 @@ MANIFEST
README
wakeonlan
examples/lab001.wol
+META.yml Module meta-data (added by MakeMaker)
+SIGNATURE
View
10 META.yml
@@ -0,0 +1,10 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: wakeonlan
+version: 0.41
+version_from: wakeonlan
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.17
View
14 Makefile.PL
@@ -1,8 +1,16 @@
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
+
WriteMakefile(
- 'NAME' => 'wakeonlan',
- 'EXE_FILES' => [wakeonlan],
- 'VERSION_FROM' => 'wakeonlan', # finds $VERSION
+ 'NAME' => 'wakeonlan',
+ 'VERSION_FROM' => 'wakeonlan', # finds $VERSION
+ 'EXE_FILES' => [wakeonlan],
+ ($] ge '5.005') ? (
+ 'AUTHOR' => 'Jose Pedro Oliveira (jpo@di.uminho.pt)',
+ 'ABSTRACT' => "Script to send 'magic packets' to wakeable computers"
+ ) : (
+ ),
);
+
+# vim:set ai ts=4 sw=4:
View
23 README
@@ -2,8 +2,8 @@
This is some premature documentation for this project. Feel free to contact
with comments or additions. (good or bad)
- Ico Doornekamp
- ico@edd.dhs.org
+ Jose Pedro Oliveira <jpo[at]di.uminho.pt>
+ Ico Doornekamp <ico[at]edd.dhs.org>
@@ -79,4 +79,23 @@ on the computer... Feel free to experiment on this.
- Intel EtherExpress PRO/100+ (chipset 82559) with a PXE boot agent on
an ASUS P2B motherboard (Jose Pedro Oliveira)
+- Motherboard: ASUS TUSL2-C
+ BIOS: Award BIOS / Power / Power Up Control / Wake On LAN or PCI Modem [Enable]
+ Network card: Intel Pro/100 S Desktop Adapter (chipset 82550)
+ with PXE boot agent v4.0.22
+ (Jos� Pedro Oliveira)
+
+- Motherboard: ASUS TUSL2-C
+ BIOS: Award BIOS / Power / Power Up Control / Wake On LAN or PCI Modem [Enable]
+ Network card: 3Com Fast Etherlink TX 10/100 PCI (3C905C-TXM)
+ with Managed PC Boot Agent (MBA) v4.30 (build 3)
+ Pre-boot eXecution Environment (PXE) v2.20
+ (Jos� Pedro Oliveira)
+
+- nVidia Corporation nForce2 Ethernet Controller on ASUS and EPOX motherboards.
+ (Antoniu-George)
+
+- Macs: Al Powerbook.
+ Energy Prefs: Wake on ethernet network Administrator access
+ (Denis Ahrens)
View
30 SIGNATURE
@@ -0,0 +1,30 @@
+This file contains message digests of all files listed in MANIFEST,
+signed via the Module::Signature module, version 0.44.
+
+To verify the content in this distribution, first make sure you have
+Module::Signature installed, then type:
+
+ % cpansign -v
+
+It will check each file's integrity, as well as the signature's
+validity. If "==> Signature verified OK! <==" is not displayed,
+the distribution may already have been compromised, and you should
+not run its Makefile.PL or Build.PL.
+
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+SHA1 d0aef405a4cd9014c7282def045be4bdaf2dc989 Changes
+SHA1 03b1ea4280c6d0f1f0f8b06990be3271e1f26009 MANIFEST
+SHA1 ccae8de92a2cd8bc7403e217532cf6e188a4f5d7 META.yml
+SHA1 9b72a0a4867ec107e298f19570dd44f41c94e13b Makefile.PL
+SHA1 2efea729ee31a6665a0fddcf30c406d469125c90 README
+SHA1 5d6930f66f58bf33c01de1e4760c2eed6c33170d examples/lab001.wol
+SHA1 03d093883fb557e4e2272600167c02a07f5768ce wakeonlan
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.2.6 (GNU/Linux)
+
+iD8DBQFB+RWXl0metZG9hRsRAudSAJ9zr//9ZzFks59rtjtEht8msX1whQCg7jLL
+5MXJHe/j/TYIX4onAByFDKk=
+=NCeu
+-----END PGP SIGNATURE-----
View
12 examples/lab001.wol
@@ -6,11 +6,15 @@
# - blank lines are ignored
# - comment lines are ignored (lines starting with a hash mark '#')
# - other lines are considered valid records and can have 3 columns:
-# Hardware address, IP address, destination port
-# the last two are opcional, in which case the following defaults
+#
+# Hardware address, IP address, destination port
+#
+# the last two are optional, in which case the following defaults
# are used:
-# IP address: 255.255.255.255 (the limited broadcast address)
-# port: 9 (the discard port)
+#
+# IP address: 255.255.255.255 (the limited broadcast address)
+# port: 9 (the discard port)
+#
01:02:03:04:05:06 192.168.1.255 9
07:09:09:0A:0B:0C 255.255.255.255
View
41 wakeonlan
@@ -1,14 +1,14 @@
#!/usr/bin/perl -w
#
-# $Id: wakeonlan,v 1.4 2000/08/01 03:38:59 jpo Exp $
+# $Id: wakeonlan,v 1.4.2.3 2005/01/27 16:03:54 jpo Exp $
#
#########################################################################
use strict;
use Socket;
use Getopt::Std;
use vars qw($VERSION $opt_v $opt_h $opt_i $opt_p $opt_f);
-$VERSION = '0.40';
+$VERSION = '0.41';
my $DEFAULT_IP = '255.255.255.255';
my $DEFAULT_PORT = getservbyname('discard', 'udp');
@@ -22,12 +22,12 @@ getopts("hvp:i:f:");
if ($opt_h) { usage(); exit(0); }
if ($opt_v) { print "wakeonlan version $VERSION\n"; exit(0); }
if (!$opt_f and !@ARGV) { usage(); exit(0); }
-if ($opt_i) { $DEFAULT_IP = $opt_i; } # override default
-if ($opt_p) { $DEFAULT_PORT = $opt_p; } # override default
+if ($opt_i) { $DEFAULT_IP = $opt_i; } # override default value
+if ($opt_p) { $DEFAULT_PORT = $opt_p; } # override default value
if ($opt_f) { process_file($opt_f); }
-# The rest of the command line are a list of hardware addresses
+# The rest of the command line is a list of hardware addresses
foreach (@ARGV) {
wake($_, $opt_i, $opt_p);
@@ -38,7 +38,8 @@ foreach (@ARGV) {
#
# The 'magic packet' consists of 6 times 0xFF followed by 16 times
# the hardware address of the NIC. This sequence can be encapsulated
-# in any kind of packet, in this case UDP to the discard port (9).
+# in any kind of packet, in this case an UDP packet targeted at the
+# discard port (9).
#
sub wake
@@ -65,7 +66,7 @@ sub wake
}
$pkt = chr(0xFF) x 6 . $pkt x 16;
- # Alocate socket and send packet
+ # Allocate socket and send packet
$raddr = gethostbyname($ipaddr);
$them = pack_sockaddr_in($port, $raddr);
@@ -115,18 +116,18 @@ Options
-h
this information
-v
- dislpays the script version
+ displays the script version
-i ip_address
set the destination IP address
default: 255.255.255.255 (the limited broadcast address)
-p port
set the destination port
- default: 9 (discard port)
+ default: 9 (the discard port)
-f file
uses file as a source of hardware addresses
See also
- wakelan(1)
+ wakeonlan(1)
__USAGE__
}
@@ -154,24 +155,24 @@ The 'magic packet' consists of 6 times 0xFF followed by 16 times the hardware ad
=over
-=item -h
+=item B<-h>
Displays the help information.
-=item -v
+=item B<-v>
-Dislpays the script version.
-
-=item -i ip_address
+Displays the script version.
+
+=item B<-i ip_address>
Destination IP address. Unless you have static ARP tables you should
use some kind of broadcast address (the broadcast address of the network where the computer resides or the limited broadcast address). Default: 255.255.255.255 (the limited broadcast address).
-=item -p port
+=item B<-p port>
-Destination port. Default: 9 (discard port).
+Destination port. Default: 9 (the discard port).
-=item -f file
+=item B<-f file>
File with hardware addresses of wakeable computers. For an example check
the file lab001.wol in the examples subdirectory.
@@ -193,7 +194,7 @@ Using another destination port:
$ wakeonlan -i 192.168.1.255 -p 1234 01:02:03:04:05:06
-Using a file as a source of hardware addresses and IP addresses:
+Using a file as source of hardware and IP addresses:
$ wakeonlan -f examples/lab001.wol
$ wakeonlan -f examples/lab001.wol 01:02:03:04:05:06
@@ -204,7 +205,7 @@ Jos
=head1 COPYRIGHT
-Copyright (c) 2000 José Pedro Oliveira.
+Copyright (c) 2000-2005 José Pedro Oliveira.
This is free software. You may modify it and distribute it under Perl's Artistic Licence. Modified versions must be clearly indicated.

0 comments on commit 4beb45d

Please sign in to comment.