10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 52546Scarlsonj * Common Development and Distribution License (the "License"). 62546Scarlsonj * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 228485SPeter.Memishian@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate /* Copyright (c) 1990 Mentat Inc. */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _INET_ARP_H 280Sstevel@tonic-gate #define _INET_ARP_H 290Sstevel@tonic-gate 302546Scarlsonj #include <sys/types.h> 312546Scarlsonj 320Sstevel@tonic-gate #ifdef __cplusplus 330Sstevel@tonic-gate extern "C" { 340Sstevel@tonic-gate #endif 350Sstevel@tonic-gate 362546Scarlsonj /* 372546Scarlsonj * Warning: the interfaces described in this file are private to the 382546Scarlsonj * implementation. They may change at any time without notice and are not 392546Scarlsonj * documented. Do not depend on them. 402546Scarlsonj */ 412546Scarlsonj 420Sstevel@tonic-gate #define ARP_REQUEST 1 430Sstevel@tonic-gate #define ARP_RESPONSE 2 440Sstevel@tonic-gate #define RARP_REQUEST 3 450Sstevel@tonic-gate #define RARP_RESPONSE 4 460Sstevel@tonic-gate 47*11042SErik.Nordmark@Sun.COM /* Both ace_flags; must also modify arp.c in mdb */ 482546Scarlsonj #define ACE_F_PERMANENT 0x0001 492546Scarlsonj #define ACE_F_PUBLISH 0x0002 502546Scarlsonj #define ACE_F_DYING 0x0004 512546Scarlsonj #define ACE_F_RESOLVED 0x0008 520Sstevel@tonic-gate /* Using bit mask extraction from target address */ 532546Scarlsonj #define ACE_F_MAPPING 0x0010 542546Scarlsonj #define ACE_F_MYADDR 0x0020 /* IP claims to own this address */ 552546Scarlsonj #define ACE_F_UNVERIFIED 0x0040 /* DAD not yet complete */ 562546Scarlsonj #define ACE_F_AUTHORITY 0x0080 /* check for duplicate MACs */ 572546Scarlsonj #define ACE_F_DEFEND 0x0100 /* single transmit (area_flags only) */ 582546Scarlsonj #define ACE_F_OLD 0x0200 /* should revalidate when IP asks */ 592546Scarlsonj #define ACE_F_FAST 0x0400 /* fast probe enabled */ 602546Scarlsonj #define ACE_F_DELAYED 0x0800 /* rescheduled on arp_defend_rate */ 612546Scarlsonj #define ACE_F_DAD_ABORTED 0x1000 /* DAD was aborted on link down */ 620Sstevel@tonic-gate 630Sstevel@tonic-gate /* Client Notification Codes */ 640Sstevel@tonic-gate #define AR_CN_BOGON 1 650Sstevel@tonic-gate #define AR_CN_ANNOUNCE 2 662546Scarlsonj #define AR_CN_READY 3 /* DAD complete; address usable */ 672546Scarlsonj #define AR_CN_FAILED 4 /* DAD failed; address unusable */ 680Sstevel@tonic-gate 690Sstevel@tonic-gate /* ARP Header */ 700Sstevel@tonic-gate typedef struct arh_s { 710Sstevel@tonic-gate uchar_t arh_hardware[2]; 720Sstevel@tonic-gate uchar_t arh_proto[2]; 730Sstevel@tonic-gate uchar_t arh_hlen; 740Sstevel@tonic-gate uchar_t arh_plen; 750Sstevel@tonic-gate uchar_t arh_operation[2]; 760Sstevel@tonic-gate /* The sender and target hw/proto pairs follow */ 770Sstevel@tonic-gate } arh_t; 780Sstevel@tonic-gate 790Sstevel@tonic-gate #ifdef __cplusplus 800Sstevel@tonic-gate } 810Sstevel@tonic-gate #endif 820Sstevel@tonic-gate 830Sstevel@tonic-gate #endif /* _INET_ARP_H */ 84