Blame include/uapi/linux/if_arp.h

Packit Service 3880ab
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
Packit Service 3880ab
/*
Packit Service 3880ab
 * INET		An implementation of the TCP/IP protocol suite for the LINUX
Packit Service 3880ab
 *		operating system.  INET is implemented using the  BSD Socket
Packit Service 3880ab
 *		interface as the means of communication with the user level.
Packit Service 3880ab
 *
Packit Service 3880ab
 *		Global definitions for the ARP (RFC 826) protocol.
Packit Service 3880ab
 *
Packit Service 3880ab
 * Version:	@(#)if_arp.h	1.0.1	04/16/93
Packit Service 3880ab
 *
Packit Service 3880ab
 * Authors:	Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
Packit Service 3880ab
 *		Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source.
Packit Service 3880ab
 *		Ross Biro
Packit Service 3880ab
 *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
Packit Service 3880ab
 *		Florian La Roche,
Packit Service 3880ab
 *		Jonathan Layes <layes@loran.com>
Packit Service 3880ab
 *		Arnaldo Carvalho de Melo <acme@conectiva.com.br> ARPHRD_HWX25
Packit Service 3880ab
 *
Packit Service 3880ab
 *		This program is free software; you can redistribute it and/or
Packit Service 3880ab
 *		modify it under the terms of the GNU General Public License
Packit Service 3880ab
 *		as published by the Free Software Foundation; either version
Packit Service 3880ab
 *		2 of the License, or (at your option) any later version.
Packit Service 3880ab
 */
Packit Service 3880ab
#ifndef _LINUX_IF_ARP_H
Packit Service 3880ab
#define _LINUX_IF_ARP_H
Packit Service 3880ab
Packit Service 3880ab
#include <linux/netdevice.h>
Packit Service 3880ab
Packit Service 3880ab
/* ARP protocol HARDWARE identifiers. */
Packit Service 3880ab
#define ARPHRD_NETROM	0		/* from KA9Q: NET/ROM pseudo	*/
Packit Service 3880ab
#define ARPHRD_ETHER 	1		/* Ethernet 10Mbps		*/
Packit Service 3880ab
#define	ARPHRD_EETHER	2		/* Experimental Ethernet	*/
Packit Service 3880ab
#define	ARPHRD_AX25	3		/* AX.25 Level 2		*/
Packit Service 3880ab
#define	ARPHRD_PRONET	4		/* PROnet token ring		*/
Packit Service 3880ab
#define	ARPHRD_CHAOS	5		/* Chaosnet			*/
Packit Service 3880ab
#define	ARPHRD_IEEE802	6		/* IEEE 802.2 Ethernet/TR/TB	*/
Packit Service 3880ab
#define	ARPHRD_ARCNET	7		/* ARCnet			*/
Packit Service 3880ab
#define	ARPHRD_APPLETLK	8		/* APPLEtalk			*/
Packit Service 3880ab
#define ARPHRD_DLCI	15		/* Frame Relay DLCI		*/
Packit Service 3880ab
#define ARPHRD_ATM	19		/* ATM 				*/
Packit Service 3880ab
#define ARPHRD_METRICOM	23		/* Metricom STRIP (new IANA id)	*/
Packit Service 3880ab
#define	ARPHRD_IEEE1394	24		/* IEEE 1394 IPv4 - RFC 2734	*/
Packit Service 3880ab
#define ARPHRD_EUI64	27		/* EUI-64                       */
Packit Service 3880ab
#define ARPHRD_INFINIBAND 32		/* InfiniBand			*/
Packit Service 3880ab
Packit Service 3880ab
/* Dummy types for non ARP hardware */
Packit Service 3880ab
#define ARPHRD_SLIP	256
Packit Service 3880ab
#define ARPHRD_CSLIP	257
Packit Service 3880ab
#define ARPHRD_SLIP6	258
Packit Service 3880ab
#define ARPHRD_CSLIP6	259
Packit Service 3880ab
#define ARPHRD_RSRVD	260		/* Notional KISS type 		*/
Packit Service 3880ab
#define ARPHRD_ADAPT	264
Packit Service 3880ab
#define ARPHRD_ROSE	270
Packit Service 3880ab
#define ARPHRD_X25	271		/* CCITT X.25			*/
Packit Service 3880ab
#define ARPHRD_HWX25	272		/* Boards with X.25 in firmware	*/
Packit Service 3880ab
#define ARPHRD_CAN	280		/* Controller Area Network      */
Packit Service 3880ab
#define ARPHRD_PPP	512
Packit Service 3880ab
#define ARPHRD_CISCO	513		/* Cisco HDLC	 		*/
Packit Service 3880ab
#define ARPHRD_HDLC	ARPHRD_CISCO
Packit Service 3880ab
#define ARPHRD_LAPB	516		/* LAPB				*/
Packit Service 3880ab
#define ARPHRD_DDCMP    517		/* Digital's DDCMP protocol     */
Packit Service 3880ab
#define ARPHRD_RAWHDLC	518		/* Raw HDLC			*/
Packit Service 3880ab
#define ARPHRD_RAWIP    519		/* Raw IP                       */
Packit Service 3880ab
Packit Service 3880ab
#define ARPHRD_TUNNEL	768		/* IPIP tunnel			*/
Packit Service 3880ab
#define ARPHRD_TUNNEL6	769		/* IP6IP6 tunnel       		*/
Packit Service 3880ab
#define ARPHRD_FRAD	770             /* Frame Relay Access Device    */
Packit Service 3880ab
#define ARPHRD_SKIP	771		/* SKIP vif			*/
Packit Service 3880ab
#define ARPHRD_LOOPBACK	772		/* Loopback device		*/
Packit Service 3880ab
#define ARPHRD_LOCALTLK 773		/* Localtalk device		*/
Packit Service 3880ab
#define ARPHRD_FDDI	774		/* Fiber Distributed Data Interface */
Packit Service 3880ab
#define ARPHRD_BIF      775             /* AP1000 BIF                   */
Packit Service 3880ab
#define ARPHRD_SIT	776		/* sit0 device - IPv6-in-IPv4	*/
Packit Service 3880ab
#define ARPHRD_IPDDP	777		/* IP over DDP tunneller	*/
Packit Service 3880ab
#define ARPHRD_IPGRE	778		/* GRE over IP			*/
Packit Service 3880ab
#define ARPHRD_PIMREG	779		/* PIMSM register interface	*/
Packit Service 3880ab
#define ARPHRD_HIPPI	780		/* High Performance Parallel Interface */
Packit Service 3880ab
#define ARPHRD_ASH	781		/* Nexus 64Mbps Ash		*/
Packit Service 3880ab
#define ARPHRD_ECONET	782		/* Acorn Econet			*/
Packit Service 3880ab
#define ARPHRD_IRDA 	783		/* Linux-IrDA			*/
Packit Service 3880ab
/* ARP works differently on different FC media .. so  */
Packit Service 3880ab
#define ARPHRD_FCPP	784		/* Point to point fibrechannel	*/
Packit Service 3880ab
#define ARPHRD_FCAL	785		/* Fibrechannel arbitrated loop */
Packit Service 3880ab
#define ARPHRD_FCPL	786		/* Fibrechannel public loop	*/
Packit Service 3880ab
#define ARPHRD_FCFABRIC	787		/* Fibrechannel fabric		*/
Packit Service 3880ab
	/* 787->799 reserved for fibrechannel media types */
Packit Service 3880ab
#define ARPHRD_IEEE802_TR 800		/* Magic type ident for TR	*/
Packit Service 3880ab
#define ARPHRD_IEEE80211 801		/* IEEE 802.11			*/
Packit Service 3880ab
#define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header  */
Packit Service 3880ab
#define ARPHRD_IEEE80211_RADIOTAP 803	/* IEEE 802.11 + radiotap header */
Packit Service 3880ab
#define ARPHRD_IEEE802154	  804
Packit Service 3880ab
#define ARPHRD_IEEE802154_MONITOR 805	/* IEEE 802.15.4 network monitor */
Packit Service 3880ab
Packit Service 3880ab
#define ARPHRD_PHONET	820		/* PhoNet media type		*/
Packit Service 3880ab
#define ARPHRD_PHONET_PIPE 821		/* PhoNet pipe header		*/
Packit Service 3880ab
#define ARPHRD_CAIF	822		/* CAIF media type		*/
Packit Service 3880ab
#define ARPHRD_IP6GRE	823		/* GRE over IPv6		*/
Packit Service 3880ab
#define ARPHRD_NETLINK	824		/* Netlink header		*/
Packit Service 3880ab
#define ARPHRD_6LOWPAN	825		/* IPv6 over LoWPAN             */
Packit Service 3880ab
#define ARPHRD_VSOCKMON	826		/* Vsock monitor header		*/
Packit Service 3880ab
Packit Service 3880ab
#define ARPHRD_VOID	  0xFFFF	/* Void type, nothing is known */
Packit Service 3880ab
#define ARPHRD_NONE	  0xFFFE	/* zero header length */
Packit Service 3880ab
Packit Service 3880ab
/* ARP protocol opcodes. */
Packit Service 3880ab
#define	ARPOP_REQUEST	1		/* ARP request			*/
Packit Service 3880ab
#define	ARPOP_REPLY	2		/* ARP reply			*/
Packit Service 3880ab
#define	ARPOP_RREQUEST	3		/* RARP request			*/
Packit Service 3880ab
#define	ARPOP_RREPLY	4		/* RARP reply			*/
Packit Service 3880ab
#define	ARPOP_InREQUEST	8		/* InARP request		*/
Packit Service 3880ab
#define	ARPOP_InREPLY	9		/* InARP reply			*/
Packit Service 3880ab
#define	ARPOP_NAK	10		/* (ATM)ARP NAK			*/
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
/* ARP ioctl request. */
Packit Service 3880ab
struct arpreq {
Packit Service 3880ab
	struct sockaddr	arp_pa;		/* protocol address		 */
Packit Service 3880ab
	struct sockaddr	arp_ha;		/* hardware address		 */
Packit Service 3880ab
	int		arp_flags;	/* flags			 */
Packit Service 3880ab
	struct sockaddr arp_netmask;    /* netmask (only for proxy arps) */
Packit Service 3880ab
	char		arp_dev[IFNAMSIZ];
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
struct arpreq_old {
Packit Service 3880ab
	struct sockaddr	arp_pa;		/* protocol address		 */
Packit Service 3880ab
	struct sockaddr	arp_ha;		/* hardware address		 */
Packit Service 3880ab
	int		arp_flags;	/* flags			 */
Packit Service 3880ab
	struct sockaddr	arp_netmask;    /* netmask (only for proxy arps) */
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
/* ARP Flag values. */
Packit Service 3880ab
#define ATF_COM		0x02		/* completed entry (ha valid)	*/
Packit Service 3880ab
#define	ATF_PERM	0x04		/* permanent entry		*/
Packit Service 3880ab
#define	ATF_PUBL	0x08		/* publish entry		*/
Packit Service 3880ab
#define	ATF_USETRAILERS	0x10		/* has requested trailers	*/
Packit Service 3880ab
#define ATF_NETMASK     0x20            /* want to use a netmask (only
Packit Service 3880ab
					   for proxy entries) */
Packit Service 3880ab
#define ATF_DONTPUB	0x40		/* don't answer this addresses	*/
Packit Service 3880ab
Packit Service 3880ab
/*
Packit Service 3880ab
 *	This structure defines an ethernet arp header.
Packit Service 3880ab
 */
Packit Service 3880ab
Packit Service 3880ab
struct arphdr {
Packit Service 3880ab
	__be16		ar_hrd;		/* format of hardware address	*/
Packit Service 3880ab
	__be16		ar_pro;		/* format of protocol address	*/
Packit Service 3880ab
	unsigned char	ar_hln;		/* length of hardware address	*/
Packit Service 3880ab
	unsigned char	ar_pln;		/* length of protocol address	*/
Packit Service 3880ab
	__be16		ar_op;		/* ARP opcode (command)		*/
Packit Service 3880ab
Packit Service 3880ab
#if 0
Packit Service 3880ab
	 /*
Packit Service 3880ab
	  *	 Ethernet looks like this : This bit is variable sized however...
Packit Service 3880ab
	  */
Packit Service 3880ab
	unsigned char		ar_sha[ETH_ALEN];	/* sender hardware address	*/
Packit Service 3880ab
	unsigned char		ar_sip[4];		/* sender IP address		*/
Packit Service 3880ab
	unsigned char		ar_tha[ETH_ALEN];	/* target hardware address	*/
Packit Service 3880ab
	unsigned char		ar_tip[4];		/* target IP address		*/
Packit Service 3880ab
#endif
Packit Service 3880ab
Packit Service 3880ab
};
Packit Service 3880ab
Packit Service 3880ab
Packit Service 3880ab
#endif /* _LINUX_IF_ARP_H */