Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
#ifndef _NET_IF_ARP_H
2
#define _NET_IF_ARP_H
3
 
4
#include 
5
 
6
__BEGIN_DECLS
7
 
8
#define MAX_ADDR_LEN	7
9
 
10
/* ARP protocol HARDWARE identifiers. */
11
#define ARPHRD_NETROM	0		/* from KA9Q: NET/ROM pseudo	*/
12
#define ARPHRD_ETHER 	1		/* Ethernet 10Mbps		*/
13
#define ARPHRD_EETHER	2		/* Experimental Ethernet	*/
14
#define ARPHRD_AX25	3		/* AX.25 Level 2		*/
15
#define ARPHRD_PRONET	4		/* PROnet token ring		*/
16
#define ARPHRD_CHAOS	5		/* Chaosnet			*/
17
#define ARPHRD_IEEE802	6		/* IEEE 802.2 Ethernet/TR/TB	*/
18
#define ARPHRD_ARCNET	7		/* ARCnet			*/
19
#define ARPHRD_APPLETLK	8		/* APPLEtalk			*/
20
#define ARPHRD_DLCI	15		/* Frame Relay DLCI		*/
21
#define ARPHRD_ATM	19		/* ATM 				*/
22
#define ARPHRD_METRICOM	23		/* Metricom STRIP (new IANA id)	*/
23
 
24
/* Dummy types for non ARP hardware */
25
#define ARPHRD_SLIP	256
26
#define ARPHRD_CSLIP	257
27
#define ARPHRD_SLIP6	258
28
#define ARPHRD_CSLIP6	259
29
#define ARPHRD_RSRVD	260		/* Notional KISS type 		*/
30
#define ARPHRD_ADAPT	264
31
#define ARPHRD_ROSE	270
32
#define ARPHRD_X25	271		/* CCITT X.25			*/
33
#define ARPHRD_HWX25	272		/* Boards with X.25 in firmware	*/
34
#define ARPHRD_PPP	512
35
#define ARPHRD_CISCO	513		/* Cisco HDLC	 		*/
36
#define ARPHRD_HDLC	ARPHRD_CISCO
37
#define ARPHRD_LAPB	516		/* LAPB				*/
38
#define ARPHRD_DDCMP    517		/* Digital's DDCMP protocol     */
39
#define ARPHRD_RAWHDLC	518		/* Raw HDLC			*/
40
 
41
#define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
42
#define ARPHRD_TUNNEL6	769		/* IPIP6 tunnel			*/
43
#define ARPHRD_FRAD	770             /* Frame Relay Access Device    */
44
#define ARPHRD_SKIP	771		/* SKIP vif			*/
45
#define ARPHRD_LOOPBACK	772		/* Loopback device		*/
46
#define ARPHRD_LOCALTLK 773		/* Localtalk device		*/
47
#define ARPHRD_FDDI	774		/* Fiber Distributed Data Interface */
48
#define ARPHRD_BIF      775             /* AP1000 BIF                   */
49
#define ARPHRD_SIT	776		/* sit0 device - IPv6-in-IPv4	*/
50
#define ARPHRD_IPDDP	777		/* IP over DDP tunneller	*/
51
#define ARPHRD_IPGRE	778		/* GRE over IP			*/
52
#define ARPHRD_PIMREG	779		/* PIMSM register interface	*/
53
#define ARPHRD_HIPPI	780		/* High Performance Parallel Interface */
54
#define ARPHRD_ASH	781		/* Nexus 64Mbps Ash		*/
55
#define ARPHRD_ECONET	782		/* Acorn Econet			*/
56
#define ARPHRD_IRDA 	783		/* Linux-IrDA			*/
57
/* ARP works differently on different FC media .. so  */
58
#define ARPHRD_FCPP	784		/* Point to point fibrechannel	*/
59
#define ARPHRD_FCAL	785		/* Fibrechannel arbitrated loop */
60
#define ARPHRD_FCPL	786		/* Fibrechannel public loop	*/
61
#define ARPHRD_FCFABRIC	787		/* Fibrechannel fabric		*/
62
	/* 787->799 reserved for fibrechannel media types */
63
#define ARPHRD_IEEE802_TR 800		/* Magic type ident for TR	*/
64
#define ARPHRD_IEEE80211 801		/* IEEE 802.11			*/
65
 
66
#define ARPHRD_VOID	  0xFFFF	/* Void type, nothing is known */
67
 
68
/* ARP protocol opcodes. */
69
#define ARPOP_REQUEST	1		/* ARP request			*/
70
#define ARPOP_REPLY	2		/* ARP reply			*/
71
#define ARPOP_RREQUEST	3		/* RARP request			*/
72
#define ARPOP_RREPLY	4		/* RARP reply			*/
73
#define ARPOP_InREQUEST	8		/* InARP request		*/
74
#define ARPOP_InREPLY	9		/* InARP reply			*/
75
#define ARPOP_NAK	10		/* (ATM)ARP NAK			*/
76
 
77
 
78
/* ARP ioctl request. */
79
struct arpreq {
80
  struct sockaddr	arp_pa;		/* protocol address		*/
81
  struct sockaddr	arp_ha;		/* hardware address		*/
82
  int			arp_flags;	/* flags			*/
83
  struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
84
  char			arp_dev[16];
85
};
86
 
87
struct arpreq_old {
88
  struct sockaddr	arp_pa;		/* protocol address		*/
89
  struct sockaddr	arp_ha;		/* hardware address		*/
90
  int			arp_flags;	/* flags			*/
91
  struct sockaddr       arp_netmask;    /* netmask (only for proxy arps) */
92
};
93
 
94
/* ARP Flag values. */
95
#define ATF_COM		0x02		/* completed entry (ha valid)	*/
96
#define ATF_PERM	0x04		/* permanent entry		*/
97
#define ATF_PUBL	0x08		/* publish entry		*/
98
#define ATF_USETRAILERS	0x10		/* has requested trailers	*/
99
#define ATF_NETMASK     0x20            /* want to use a netmask (only
100
					   for proxy entries) */
101
#define ATF_DONTPUB	0x40		/* don't answer this addresses	*/
102
 
103
/*
104
 *	This structure defines an ethernet arp header.
105
 */
106
 
107
struct arphdr
108
{
109
  unsigned short ar_hrd;	/* format of hardware address	*/
110
  unsigned short ar_pro;	/* format of protocol address	*/
111
  unsigned char ar_hln;		/* length of hardware address	*/
112
  unsigned char ar_pln;		/* length of protocol address	*/
113
  unsigned short ar_op;		/* ARP opcode (command)		*/
114
};
115
 
116
__END_DECLS
117
 
118
#endif