diff -Nur atftp-0.7.dfsg/PLATFORM atftp-0.7.dfsg-plus_llc/PLATFORM
--- atftp-0.7.dfsg/PLATFORM	2011-05-18 11:30:03.000000000 +0000
+++ atftp-0.7.dfsg-plus_llc/PLATFORM	2011-05-09 18:59:47.000000000 +0000
@@ -1 +1 @@
-pc-i686-linux-gnu
+unknown-x86_64-linux-gnu
diff -Nur atftp-0.7.dfsg/atftp.1 atftp-0.7.dfsg-plus_llc/atftp.1
--- atftp-0.7.dfsg/atftp.1	2003-07-04 00:21:04.000000000 +0000
+++ atftp-0.7.dfsg-plus_llc/atftp.1	2011-05-09 14:13:59.000000000 +0000
@@ -55,6 +55,13 @@
 put. Must be used in conjunction with \-\-get or \-\-put.
 
 .TP
+.B \-r, \-\-ethernet
+Connect using LLC1 directly over Ethernet instead of UDP over IP.
+These are LAN-protocols so they will only work locally, making the
+file transfer even more trivial.  This may be useful to access the
+bootloader of embedded applications, to replace (open) firmware.
+
+.TP
 .B \-\-tftp-timeout <value>
 Number of seconds for timeout, client side. Default is 5 seconds.
 
diff -Nur atftp-0.7.dfsg/tftp.c atftp-0.7.dfsg-plus_llc/tftp.c
--- atftp-0.7.dfsg/tftp.c	2011-05-18 11:30:03.000000000 +0000
+++ atftp-0.7.dfsg-plus_llc/tftp.c	2011-05-10 08:14:21.000000000 +0000
@@ -169,6 +169,7 @@
 #endif
      data.timeout = TIMEOUT;
      data.checkport = 1;
+     data.ethernet = 0;
      data.trace = 0;
      data.verbose = 0;
 #ifdef DEBUG
@@ -404,6 +405,32 @@
 }
 
 /*
+ * Read a MAC address and return it as a struct hostent
+ */
+struct hostent *gethostformacaddr(char *mactxt) {
+     static uint8_t macbin [6];
+     static char *addrlist [2] = { (char *) macbin, NULL };
+     static char *noaliases [1] = { NULL };
+     static struct hostent retval = { NULL, noaliases, PF_LLC, 6, addrlist };
+     int todo = 6;
+     long val;
+     char *here = mactxt;
+     unsigned char *mactodo = macbin;
+     retval.h_name = mactxt;
+     while (todo-- > 0) {
+	  val = strtol (here, &here, 16);
+	  if ((val < 0x00) || (val > 0xff)) {
+	       return NULL;
+	  }
+	  *mactodo++ = val;
+	  if (*here++ != (todo? ':': '\0')) {
+	       return NULL;
+	  }
+     }
+     return &retval;
+}
+
+/*
  * Update sa_peer structure, hostname and port number adequately
  */
 int set_peer(int argc, char **argv)
@@ -426,18 +453,35 @@
      }
 
      /* look up the host */
-     host = gethostbyname(argv[1]);
+     if (data.ethernet) {
+	  host = gethostformacaddr(argv[1]);
+     } else {
+          host = gethostbyname(argv[1]);
+     }
      /* if valid, update s_inn structure */
      if (host)
      {
-          data.sa_peer.sin_family = host->h_addrtype;
-          if (host->h_length > sizeof(data.sa_peer.sin_addr))
-               host->h_length = sizeof(data.sa_peer.sin_addr);
-          memcpy(&data.sa_peer.sin_addr, host->h_addr, host->h_length);
-          Strncpy(data.hostname, host->h_name,
-                  sizeof(data.hostname));
-          data.hostname[sizeof(data.hostname)-1] = 0;
-          data.sa_peer.sin_port = sp->s_port;
+          if (data.ethernet)
+          {
+	       data.esa_peer.sllc_family = host->h_addrtype;
+	       data.esa_peer.sllc_arphrd = ARPHRD_ETHER;
+	       if (host->h_length > sizeof(data.esa_peer.sllc_mac))
+		    host->h_length = sizeof(data.esa_peer.sllc_mac);
+	       memcpy(&data.esa_peer.sllc_mac, host->h_addr, host->h_length);
+	       Strncpy(data.hostname, host->h_name,
+		       sizeof(data.hostname));
+	       data.hostname[sizeof(data.hostname)-1] = 0;
+	       data.esa_peer.sllc_sap = ntohs (sp->s_port);
+          } else {
+               data.sa_peer.sin_family = host->h_addrtype;
+               if (host->h_length > sizeof(data.sa_peer.sin_addr))
+                    host->h_length = sizeof(data.sa_peer.sin_addr);
+               memcpy(&data.sa_peer.sin_addr, host->h_addr, host->h_length);
+               Strncpy(data.hostname, host->h_name,
+                       sizeof(data.hostname));
+               data.hostname[sizeof(data.hostname)-1] = 0;
+               data.sa_peer.sin_port = sp->s_port;
+          }
      } 
      else
      {
@@ -455,7 +499,12 @@
                data.connected = 0;
                return ERR;
           }
-          data.sa_peer.sin_port = sp->s_port;
+	  if (data.ethernet)
+	  {
+                data.esa_peer.sllc_sap = ntohs (sp->s_port);
+	  } else {
+                data.sa_peer.sin_port = sp->s_port;
+	  }
      }
      /* copy port number to data structure */
      data.port = ntohs(sp->s_port);
@@ -602,14 +651,14 @@
      }
      
      /* open a UDP socket */
-     data.sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+     data.sockfd = socket(data.ethernet? PF_LLC: AF_INET, SOCK_DGRAM, 0);
      if (data.sockfd < 0) {
           perror("tftp: ");
           exit(ERR);
      }
      memset(&data.sa_local, 0, sizeof(data.sa_local));
      bind(data.sockfd, (struct sockaddr *)&data.sa_local,
-          sizeof(data.sa_local));
+          data.ethernet? sizeof(data.esa_local): sizeof(data.sa_local));
      getsockname(data.sockfd, (struct sockaddr *)&data.sa_local, &len);
 
      /* do the transfer */
@@ -706,14 +755,14 @@
      }
 
      /* open a UDP socket */
-     data.sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+     data.sockfd = socket(data.ethernet? PF_LLC: AF_INET, SOCK_DGRAM, 0);
      if (data.sockfd < 0) {
           perror("tftp: ");
           exit(ERR);
      }
      memset(&data.sa_local, 0, sizeof(data.sa_local));
      bind(data.sockfd, (struct sockaddr *)&data.sa_local,
-          sizeof(data.sa_local));
+          data.ethernet? sizeof(data.esa_local): sizeof(data.sa_local));
      getsockname(data.sockfd, (struct sockaddr *)&data.sa_local, &len);
 
      /* do the transfer */
@@ -982,6 +1031,7 @@
 #endif
           { "mtftp", 1, NULL, '1'},
           { "no-source-port-checking", 0, NULL, '0'},
+	  { "ethernet", 0, NULL, 'e' },
           { "verbose", 0, NULL, 'v'},
           { "trace", 0, NULL, 'd'},
 #if DEBUG
@@ -993,7 +1043,7 @@
      };
 
      /* Support old argument until 0.8 */
-     while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sm",
+     while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sme",
                              options, &option_index)) != EOF)
      {
           switch (c)
@@ -1086,6 +1136,9 @@
           case '0':
                data.checkport = 0;
                break;
+	  case 'e':
+	       data.ethernet = 1;
+	       break;
           case 'v':
                snprintf(string, sizeof(string), "verbose on");
                make_arg(string, &ac, &av);
@@ -1169,6 +1222,7 @@
              "  -p, --put                : put file\n"
              "  -l, --local-file <file>  : local file name\n"
              "  -r, --remote-file <file> : remote file name\n"
+	     "  -e, --ethernet           : connect over 802.2 ethernet instead of IP\n"
              "  --tftp-timeout <value>   : delay before retransmission, client side\n"
 #if 0
              "  t, --timeout <value>      : delay before retransmission, "
diff -Nur atftp-0.7.dfsg/tftp.h atftp-0.7.dfsg-plus_llc/tftp.h
--- atftp-0.7.dfsg/tftp.h	2003-03-19 04:02:49.000000000 +0000
+++ atftp-0.7.dfsg-plus_llc/tftp.h	2011-05-09 19:05:32.000000000 +0000
@@ -22,6 +22,20 @@
 #include "tftp_def.h"
 #include "config.h"
 
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <linux/llc.h>
+
+// TODO: What includes to use?
+#ifndef PF_LLC
+#  define PF_LLC 26
+#endif
+
+union socketaddress {
+     struct sockaddr_in sin;
+     struct sockaddr_llc sllc;
+};
+
 struct client_data {
      char *data_buffer;         /* used for sending and receiving of data */
      int data_buffer_size;      /* size of the buffer, may be reallocated */
@@ -33,14 +47,15 @@
 
      int timeout;               /* client side timeout for select() */
      int checkport;             /* Disable TID check. Violate RFC */
+     int ethernet;		/* access the remote host over 802.2 Ethernet */
      int trace;                 /* debugging information */
      int verbose;               /* to print message at each step */
 
      char hostname[MAXLEN];     /* peer's hostname */
      short port;                /* tftp port for the server, 69 by default */
 
-     struct sockaddr_in sa_peer; /* peer address and port */
-     struct sockaddr_in sa_local; /* local address and port */
+     union socketaddress peer; /* peer address and port */
+     union socketaddress local; /* local address and port */
      int sockfd;
 
      int connected;             /* we are 'connected' */
@@ -64,6 +79,13 @@
 
 };
 
+#define sa_peer peer.sin
+#define esa_peer peer.sllc
+
+#define sa_local local.sin
+#define esa_local local.sllc
+
+
 /* Defined in tftp_file.c */
 int tftp_find_bitmap_hole(int prev_hole, unsigned int *bitmap);
 int tftp_receive_file(struct client_data *data);
