17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 569bb4bb4Scarlsonj * Common Development and Distribution License (the "License"). 669bb4bb4Scarlsonj * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22e11c3f44Smeem * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate /* Copyright (c) 1990 Mentat Inc. */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _INET_ARP_H 287c478bd9Sstevel@tonic-gate #define _INET_ARP_H 297c478bd9Sstevel@tonic-gate 3069bb4bb4Scarlsonj #include <sys/types.h> 3169bb4bb4Scarlsonj 327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 337c478bd9Sstevel@tonic-gate extern "C" { 347c478bd9Sstevel@tonic-gate #endif 357c478bd9Sstevel@tonic-gate 3669bb4bb4Scarlsonj /* 3769bb4bb4Scarlsonj * Warning: the interfaces described in this file are private to the 3869bb4bb4Scarlsonj * implementation. They may change at any time without notice and are not 3969bb4bb4Scarlsonj * documented. Do not depend on them. 4069bb4bb4Scarlsonj */ 4169bb4bb4Scarlsonj 427c478bd9Sstevel@tonic-gate #define ARP_REQUEST 1 437c478bd9Sstevel@tonic-gate #define ARP_RESPONSE 2 447c478bd9Sstevel@tonic-gate #define RARP_REQUEST 3 457c478bd9Sstevel@tonic-gate #define RARP_RESPONSE 4 467c478bd9Sstevel@tonic-gate 47*bd670b35SErik Nordmark /* Both ace_flags; must also modify arp.c in mdb */ 4869bb4bb4Scarlsonj #define ACE_F_PERMANENT 0x0001 4969bb4bb4Scarlsonj #define ACE_F_PUBLISH 0x0002 5069bb4bb4Scarlsonj #define ACE_F_DYING 0x0004 5169bb4bb4Scarlsonj #define ACE_F_RESOLVED 0x0008 527c478bd9Sstevel@tonic-gate /* Using bit mask extraction from target address */ 5369bb4bb4Scarlsonj #define ACE_F_MAPPING 0x0010 5469bb4bb4Scarlsonj #define ACE_F_MYADDR 0x0020 /* IP claims to own this address */ 5569bb4bb4Scarlsonj #define ACE_F_UNVERIFIED 0x0040 /* DAD not yet complete */ 5669bb4bb4Scarlsonj #define ACE_F_AUTHORITY 0x0080 /* check for duplicate MACs */ 5769bb4bb4Scarlsonj #define ACE_F_DEFEND 0x0100 /* single transmit (area_flags only) */ 5869bb4bb4Scarlsonj #define ACE_F_OLD 0x0200 /* should revalidate when IP asks */ 5969bb4bb4Scarlsonj #define ACE_F_FAST 0x0400 /* fast probe enabled */ 6069bb4bb4Scarlsonj #define ACE_F_DELAYED 0x0800 /* rescheduled on arp_defend_rate */ 6169bb4bb4Scarlsonj #define ACE_F_DAD_ABORTED 0x1000 /* DAD was aborted on link down */ 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate /* Client Notification Codes */ 647c478bd9Sstevel@tonic-gate #define AR_CN_BOGON 1 657c478bd9Sstevel@tonic-gate #define AR_CN_ANNOUNCE 2 6669bb4bb4Scarlsonj #define AR_CN_READY 3 /* DAD complete; address usable */ 6769bb4bb4Scarlsonj #define AR_CN_FAILED 4 /* DAD failed; address unusable */ 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate /* ARP Header */ 707c478bd9Sstevel@tonic-gate typedef struct arh_s { 717c478bd9Sstevel@tonic-gate uchar_t arh_hardware[2]; 727c478bd9Sstevel@tonic-gate uchar_t arh_proto[2]; 737c478bd9Sstevel@tonic-gate uchar_t arh_hlen; 747c478bd9Sstevel@tonic-gate uchar_t arh_plen; 757c478bd9Sstevel@tonic-gate uchar_t arh_operation[2]; 767c478bd9Sstevel@tonic-gate /* The sender and target hw/proto pairs follow */ 777c478bd9Sstevel@tonic-gate } arh_t; 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate #ifdef __cplusplus 807c478bd9Sstevel@tonic-gate } 817c478bd9Sstevel@tonic-gate #endif 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate #endif /* _INET_ARP_H */ 84