projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check the return value of fscanf() when reading a PID file.
[tinc]
/
lib
/
ethernet.h
diff --git
a/lib/ethernet.h
b/lib/ethernet.h
index
697aa44
..
42bee4c
100644
(file)
--- a/
lib/ethernet.h
+++ b/
lib/ethernet.h
@@
-1,7
+1,7
@@
/*
ethernet.h -- missing Ethernet related definitions
/*
ethernet.h -- missing Ethernet related definitions
- Copyright (C) 200
3 Ivo Timmermans <ivo@o2w.nl>
- 200
3 Guus Sliepen <guus@sliepen.eu
.org>
+ Copyright (C) 200
5 Ivo Timmermans
+ 200
6 Guus Sliepen <guus@tinc-vpn
.org>
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
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
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id
: ethernet.h,v 1.1.2.4 2003/10/06 14:16:51 guus Exp
$
+ $Id$
*/
#ifndef __TINC_ETHERNET_H__
*/
#ifndef __TINC_ETHERNET_H__
@@
-43,14
+43,22
@@
#define ETH_P_IPV6 0x86DD
#endif
#define ETH_P_IPV6 0x86DD
#endif
+#ifndef HAVE_STRUCT_ETHER_HEADER
+struct ether_header {
+ uint8_t ether_dhost[ETH_ALEN];
+ uint8_t ether_shost[ETH_ALEN];
+ uint16_t ether_type;
+} __attribute__ ((__packed__));
+#endif
+
#ifndef HAVE_STRUCT_ARPHDR
struct arphdr {
#ifndef HAVE_STRUCT_ARPHDR
struct arphdr {
- u
nsigned short in
t ar_hrd;
- u
nsigned short in
t ar_pro;
- u
nsigned char
ar_hln;
- u
nsigned char
ar_pln;
- u
nsigned short in
t ar_op;
-};
+ u
int16_
t ar_hrd;
+ u
int16_
t ar_pro;
+ u
int8_t
ar_hln;
+ u
int8_t
ar_pln;
+ u
int16_
t ar_op;
+}
__attribute__ ((__packed__))
;
#define ARPOP_REQUEST 1
#define ARPOP_REPLY 2
#define ARPOP_REQUEST 1
#define ARPOP_REPLY 2
@@
-68,7
+76,7
@@
struct ether_arp {
uint8_t arp_spa[4];
uint8_t arp_tha[ETH_ALEN];
uint8_t arp_tpa[4];
uint8_t arp_spa[4];
uint8_t arp_tha[ETH_ALEN];
uint8_t arp_tpa[4];
-};
+}
__attribute__ ((__packed__))
;
#define arp_hrd ea_hdr.ar_hrd
#define arp_pro ea_hdr.ar_pro
#define arp_hln ea_hdr.ar_hln
#define arp_hrd ea_hdr.ar_hrd
#define arp_pro ea_hdr.ar_pro
#define arp_hln ea_hdr.ar_hln