arp.h revision 11042:2d6e217af1b4
155682Smarkm/* 2178825Sdfr * CDDL HEADER START 355682Smarkm * 455682Smarkm * The contents of this file are subject to the terms of the 555682Smarkm * Common Development and Distribution License (the "License"). 655682Smarkm * You may not use this file except in compliance with the License. 755682Smarkm * 855682Smarkm * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 955682Smarkm * or http://www.opensolaris.org/os/licensing. 1055682Smarkm * See the License for the specific language governing permissions 1155682Smarkm * and limitations under the License. 1255682Smarkm * 1355682Smarkm * When distributing Covered Code, include this CDDL HEADER in each 1455682Smarkm * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1555682Smarkm * If applicable, add the following below this CDDL HEADER, with the 1655682Smarkm * fields enclosed by brackets "[]" replaced with your own identifying 1755682Smarkm * information: Portions Copyright [yyyy] [name of copyright owner] 1855682Smarkm * 1955682Smarkm * CDDL HEADER END 2055682Smarkm */ 2155682Smarkm/* 2255682Smarkm * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2355682Smarkm * Use is subject to license terms. 2455682Smarkm */ 2555682Smarkm/* Copyright (c) 1990 Mentat Inc. */ 2655682Smarkm 2755682Smarkm#ifndef _INET_ARP_H 2855682Smarkm#define _INET_ARP_H 2955682Smarkm 3055682Smarkm#include <sys/types.h> 3155682Smarkm 3255682Smarkm#ifdef __cplusplus 3355682Smarkmextern "C" { 34178825Sdfr#endif 3555682Smarkm 3655682Smarkm/* 3755682Smarkm * Warning: the interfaces described in this file are private to the 3855682Smarkm * implementation. They may change at any time without notice and are not 3955682Smarkm * documented. Do not depend on them. 4055682Smarkm */ 4155682Smarkm 4255682Smarkm#define ARP_REQUEST 1 4355682Smarkm#define ARP_RESPONSE 2 4455682Smarkm#define RARP_REQUEST 3 4590926Snectar#define RARP_RESPONSE 4 4655682Smarkm 4778527Sassar/* Both ace_flags; must also modify arp.c in mdb */ 4855682Smarkm#define ACE_F_PERMANENT 0x0001 49102644Snectar#define ACE_F_PUBLISH 0x0002 50102644Snectar#define ACE_F_DYING 0x0004 51102644Snectar#define ACE_F_RESOLVED 0x0008 52102644Snectar/* Using bit mask extraction from target address */ 53102644Snectar#define ACE_F_MAPPING 0x0010 5455682Smarkm#define ACE_F_MYADDR 0x0020 /* IP claims to own this address */ 5555682Smarkm#define ACE_F_UNVERIFIED 0x0040 /* DAD not yet complete */ 5655682Smarkm#define ACE_F_AUTHORITY 0x0080 /* check for duplicate MACs */ 5755682Smarkm#define ACE_F_DEFEND 0x0100 /* single transmit (area_flags only) */ 5855682Smarkm#define ACE_F_OLD 0x0200 /* should revalidate when IP asks */ 5955682Smarkm#define ACE_F_FAST 0x0400 /* fast probe enabled */ 6055682Smarkm#define ACE_F_DELAYED 0x0800 /* rescheduled on arp_defend_rate */ 6155682Smarkm#define ACE_F_DAD_ABORTED 0x1000 /* DAD was aborted on link down */ 6255682Smarkm 6355682Smarkm/* Client Notification Codes */ 6455682Smarkm#define AR_CN_BOGON 1 6555682Smarkm#define AR_CN_ANNOUNCE 2 6655682Smarkm#define AR_CN_READY 3 /* DAD complete; address usable */ 67178825Sdfr#define AR_CN_FAILED 4 /* DAD failed; address unusable */ 6855682Smarkm 6955682Smarkm/* ARP Header */ 7055682Smarkmtypedef struct arh_s { 7155682Smarkm uchar_t arh_hardware[2]; 7255682Smarkm uchar_t arh_proto[2]; 7355682Smarkm uchar_t arh_hlen; 7455682Smarkm uchar_t arh_plen; 75178825Sdfr uchar_t arh_operation[2]; 76178825Sdfr /* The sender and target hw/proto pairs follow */ 77178825Sdfr} arh_t; 78178825Sdfr 79178825Sdfr#ifdef __cplusplus 80178825Sdfr} 81178825Sdfr#endif 82178825Sdfr 83178825Sdfr#endif /* _INET_ARP_H */ 84178825Sdfr