include/uapi/linux/if_arp.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/if_arp.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/if_arp.h
Extension
.h
Size
6604 bytes
Lines
166
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct arpreq {
	struct sockaddr	arp_pa;		/* protocol address		 */
	struct sockaddr	arp_ha;		/* hardware address		 */
	int		arp_flags;	/* flags			 */
	struct sockaddr arp_netmask;    /* netmask (only for proxy arps) */
	char		arp_dev[IFNAMSIZ];
};

struct arpreq_old {
	struct sockaddr	arp_pa;		/* protocol address		 */
	struct sockaddr	arp_ha;		/* hardware address		 */
	int		arp_flags;	/* flags			 */
	struct sockaddr	arp_netmask;    /* netmask (only for proxy arps) */
};

/* ARP Flag values. */
#define ATF_COM		0x02		/* completed entry (ha valid)	*/
#define	ATF_PERM	0x04		/* permanent entry		*/
#define	ATF_PUBL	0x08		/* publish entry		*/
#define	ATF_USETRAILERS	0x10		/* has requested trailers	*/
#define ATF_NETMASK     0x20            /* want to use a netmask (only
					   for proxy entries) */
#define ATF_DONTPUB	0x40		/* don't answer this addresses	*/

/*
 *	This structure defines an ethernet arp header.
 */

struct arphdr {
	__be16		ar_hrd;		/* format of hardware address	*/
	__be16		ar_pro;		/* format of protocol address	*/
	unsigned char	ar_hln;		/* length of hardware address	*/
	unsigned char	ar_pln;		/* length of protocol address	*/
	__be16		ar_op;		/* ARP opcode (command)		*/

#if 0
	 /*
	  *	 Ethernet looks like this : This bit is variable sized however...
	  */
	unsigned char		ar_sha[ETH_ALEN];	/* sender hardware address	*/
	unsigned char		ar_sip[4];		/* sender IP address		*/
	unsigned char		ar_tha[ETH_ALEN];	/* target hardware address	*/
	unsigned char		ar_tip[4];		/* target IP address		*/
#endif

};


#endif /* _UAPI_LINUX_IF_ARP_H */

Annotation

Implementation Notes