summaryrefslogtreecommitdiffstats
path: root/contrib/wakeonlan
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/wakeonlan')
-rw-r--r--contrib/wakeonlan/README40
-rw-r--r--contrib/wakeonlan/wol.c108
-rw-r--r--contrib/wakeonlan/wol.h12
3 files changed, 0 insertions, 160 deletions
diff --git a/contrib/wakeonlan/README b/contrib/wakeonlan/README
deleted file mode 100644
index 5b03f9b8..00000000
--- a/contrib/wakeonlan/README
+++ /dev/null
@@ -1,40 +0,0 @@
-From level42@sympatico.ca Tue Mar 18 04:35:31 2008
-Date: Mon, 17 Mar 2008 23:47:39 -0400
-From: Bill <level42@sympatico.ca>
-To: etherboot-developers@lists.sourceforge.net
-Subject: [Etherboot-developers] WOL Routine
-
-Attached is a WOL routine that can be used to wake a remote server from
-gpxe. I put wol.c in src/usr and wol.h in src/include/usr. This is really
-in improved replacement of that in contrib\wakeonlan\wakeserver.patch. This
-version will no longer work since the eth_transmit routine no longer works
-with the newer driver arhitecture such as the e1000 driver.
-
-Please consider adding it to gpxe preferrably in the main src directory or
-in the contrib directory.
-
-Thank you
-
-
- [ Part 2, Text/PLAIN (Name: "wol.c") 109 lines. ]
- [ Unable to print this part. ]
-
-
- [ Part 3, Text/PLAIN (Name: "wol.h") 12 lines. ]
- [ Unable to print this part. ]
-
-
- [ Part 4: "Attached Text" ]
-
--------------------------------------------------------------------------
-This SF.net email is sponsored by: Microsoft
-Defy all challenges. Microsoft(R) Visual Studio 2008.
-http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-
- [ Part 5: "Attached Text" ]
-
-_______________________________________________
-Etherboot-developers mailing list
-Etherboot-developers@lists.sourceforge.net
-https://lists.sourceforge.net/lists/listinfo/etherboot-developers
-
diff --git a/contrib/wakeonlan/wol.c b/contrib/wakeonlan/wol.c
deleted file mode 100644
index 40a8415a..00000000
--- a/contrib/wakeonlan/wol.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2008 William Stewart.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <byteswap.h>
-#include <gpxe/features.h>
-#include <gpxe/netdevice.h>
-#include <gpxe/if_ether.h>
-#include <gpxe/iobuf.h>
-#include <usr/ifmgmt.h>
-#include <usr/wol.h>
-#include <timer.h>
-
-/** @file
- *
- * Wake on lan
- *
- */
-
-/**
- * Boot from a network device
- *
- * @v netdev Network device
- * @ret rc Return status code
- */
-#define WOL_MSG_LEN (6 + 16*6)
-
-void wakeup_server(char *server_adr)
-{
- int rc, i,j;
- unsigned char *buf;
- uint8_t eth_broadcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- unsigned int len;
- struct io_buffer *iobuf;
- struct ethhdr *ethhdr;
- struct net_device *netdev;
-
- for_each_netdev ( netdev ) {
- break;
- }
-
- if (netdev == NULL)
- {
- printf("Could not find netdev\n");
- return;
- }
-
- /* Open device and display device status */
- if ( (ifopen ( netdev ) ) != 0 )
- {
- printf("Could not open netdev\n");
- return;
- }
-
- /* Create outgoing I/O buffer */
- iobuf = alloc_iob ((ETH_HLEN + WOL_MSG_LEN)*2);
- if (!iobuf)
- {
- printf("Could not allocate iob\n");
- return;
- }
-
- ethhdr = iob_put(iobuf, sizeof(*ethhdr));
-
- /* Build Ethernet header */
- memcpy (ethhdr->h_dest, eth_broadcast, ETH_ALEN );
- memcpy (ethhdr->h_source, netdev->ll_addr, ETH_ALEN );
- ethhdr->h_protocol = htons (0x0842);
-
- buf = iob_put (iobuf, WOL_MSG_LEN);
-
- /* Build the message to send - 6 x 0xff then 16 x dest address */
- len =0;
- for (i = 0; i < 6; i++)
- buf[len++] = 0xff;
- for (j = 0; j < 16; j++)
- for (i = 0; i < 6; i++)
- buf[len++] = server_adr[i];
-
- rc = netdev_tx (netdev, iobuf);
-
- if (rc !=0)
- printf("Failed to transmit WOL packet\n");
-
- /* Give the controller a chance to send it before checking */
- mdelay(100);
-
- netdev_poll(netdev);
-}
-
diff --git a/contrib/wakeonlan/wol.h b/contrib/wakeonlan/wol.h
deleted file mode 100644
index 0bae6b66..00000000
--- a/contrib/wakeonlan/wol.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _USR_WOL_H
-#define _USR_WOL_H
-
-/** @file
- *
- * Wakeon lan
- *
- */
-
-extern void wakeup_server(char *);
-
-#endif /* _USR_WOL_H */