38 lines
936 B
Plaintext
38 lines
936 B
Plaintext
$OpenBSD: patch-emulate_ether_cc,v 1.2 2007/10/24 15:01:09 steven Exp $
|
|
--- emulate/ether.cc.orig Wed Feb 9 00:35:12 2000
|
|
+++ emulate/ether.cc Sat Oct 13 22:22:22 2007
|
|
@@ -43,12 +43,32 @@ static const char rcsid[] =
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <sys/ioctl.h>
|
|
-#include <net/ethernet.h>
|
|
+#include <net/ethertypes.h>
|
|
|
|
#include "config.h"
|
|
#include "ether.h"
|
|
|
|
char Ethernet::hex[] = "0123456789abcdef";
|
|
+
|
|
+/*
|
|
+ * Structure of a 10Mb/s Ethernet header. [ported from ether.h]
|
|
+ */
|
|
+#ifndef HAVE_ETHER_HEADER_STRUCT
|
|
+struct ether_header {
|
|
+ u_char ether_dhost[ETHER_ADDR_LEN];
|
|
+ u_char ether_shost[ETHER_ADDR_LEN];
|
|
+ u_short ether_type;
|
|
+};
|
|
+
|
|
+#endif
|
|
+/*
|
|
+ * Structure of a 48-bit Ethernet address. [ported from ether.h]
|
|
+ */
|
|
+#ifndef HAVE_ETHER_ADDRESS_STRUCT
|
|
+struct ether_addr {
|
|
+ u_char octet[ETHER_ADDR_LEN];
|
|
+};
|
|
+#endif
|
|
|
|
void
|
|
Ethernet::ether_print(const u_char *bp)
|