/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <sys/hook_event.h>
#include <mdb/mdb_modapi.h>
typedef struct {
char *act_name;
char *act_type;
} arp_cmd_tbl;
/*
* is code for dealing with ioctls and printing out arp header that
*/
/*
* Print an ARP hardware and protocol address pair; used when printing an ARP
* message.
*/
static void
{
else
} else if (ptype == IP_ARP_PROTO_TYPE) {
} else {
}
}
/*
* Decode an ARP message and display it.
*/
/* ARGSUSED2 */
static int
{
struct {
} arp;
const char *cp;
if (!(flags & DCMD_ADDRSPEC)) {
mdb_warn("address required to print ARP header\n");
return (DCMD_ERR);
}
return (DCMD_ERR);
}
switch (htype) {
case ARPHRD_ETHER:
cp = "Ether";
break;
case ARPHRD_IEEE802:
cp = "IEEE802";
break;
case ARPHRD_IB:
cp = "InfiniBand";
break;
default:
cp = "Unknown";
break;
}
switch (op) {
case ARPOP_REQUEST:
cp = "ares_op$REQUEST";
break;
case ARPOP_REPLY:
cp = "ares_op$REPLY";
break;
case REVARP_REQUEST:
cp = "arev_op$REQUEST";
break;
case REVARP_REPLY:
cp = "arev_op$REPLY";
break;
default:
cp = "Unknown";
break;
}
/*
* Note that we go to some length to attempt to print out the fixed
* header data before trying to decode the variable-length data. This
* is done to maximize the amount of useful information shown when the
* buffer is truncated or otherwise corrupt.
*/
return (DCMD_ERR);
}
return (DCMD_OK);
}
{ NULL }
};
{ NULL }
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}
void
_mdb_fini(void)
{
}