2 ethernet.h -- missing Ethernet related definitions
3 Copyright (C) 2003 Ivo Timmermans <ivo@o2w.nl>
4 2003 Guus Sliepen <guus@sliepen.eu.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 $Id: ethernet.h,v 1.1.2.4 2003/10/06 14:16:51 guus Exp $
23 #ifndef __TINC_ETHERNET_H__
24 #define __TINC_ETHERNET_H__
31 #define ARPHRD_ETHER 1
35 #define ETH_P_IP 0x0800
39 #define ETH_P_ARP 0x0806
43 #define ETH_P_IPV6 0x86DD
46 #ifndef HAVE_STRUCT_ARPHDR
48 unsigned short int ar_hrd;
49 unsigned short int ar_pro;
52 unsigned short int ar_op;
55 #define ARPOP_REQUEST 1
57 #define ARPOP_RREQUEST 3
58 #define ARPOP_RREPLY 4
59 #define ARPOP_InREQUEST 8
60 #define ARPOP_InREPLY 9
64 #ifndef HAVE_STRUCT_ETHER_ARP
67 uint8_t arp_sha[ETH_ALEN];
69 uint8_t arp_tha[ETH_ALEN];
72 #define arp_hrd ea_hdr.ar_hrd
73 #define arp_pro ea_hdr.ar_pro
74 #define arp_hln ea_hdr.ar_hln
75 #define arp_pln ea_hdr.ar_pln
76 #define arp_op ea_hdr.ar_op
79 #endif /* __TINC_ETHERNET_H__ */