1*1772Sjl139090 /* 2*1772Sjl139090 * CDDL HEADER START 3*1772Sjl139090 * 4*1772Sjl139090 * The contents of this file are subject to the terms of the 5*1772Sjl139090 * Common Development and Distribution License (the "License"). 6*1772Sjl139090 * You may not use this file except in compliance with the License. 7*1772Sjl139090 * 8*1772Sjl139090 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*1772Sjl139090 * or http://www.opensolaris.org/os/licensing. 10*1772Sjl139090 * See the License for the specific language governing permissions 11*1772Sjl139090 * and limitations under the License. 12*1772Sjl139090 * 13*1772Sjl139090 * When distributing Covered Code, include this CDDL HEADER in each 14*1772Sjl139090 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*1772Sjl139090 * If applicable, add the following below this CDDL HEADER, with the 16*1772Sjl139090 * fields enclosed by brackets "[]" replaced with your own identifying 17*1772Sjl139090 * information: Portions Copyright [yyyy] [name of copyright owner] 18*1772Sjl139090 * 19*1772Sjl139090 * CDDL HEADER END 20*1772Sjl139090 */ 21*1772Sjl139090 22*1772Sjl139090 /* 23*1772Sjl139090 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*1772Sjl139090 * Use is subject to license terms. 25*1772Sjl139090 */ 26*1772Sjl139090 27*1772Sjl139090 /* 28*1772Sjl139090 * FMA ETM-to-ETM Protocol header 29*1772Sjl139090 * 30*1772Sjl139090 * const/type defns for protocol used between two event transport 31*1772Sjl139090 * modules (ETMs) 32*1772Sjl139090 */ 33*1772Sjl139090 34*1772Sjl139090 #ifndef _ETM_PROTO_H 35*1772Sjl139090 #define _ETM_PROTO_H 36*1772Sjl139090 37*1772Sjl139090 #pragma ident "%Z%%M% %I% %E% SMI" 38*1772Sjl139090 39*1772Sjl139090 #ifdef __cplusplus 40*1772Sjl139090 extern "C" { 41*1772Sjl139090 #endif 42*1772Sjl139090 43*1772Sjl139090 #include <sys/types.h> 44*1772Sjl139090 45*1772Sjl139090 #define ETM_DELIM "\177ETM" /* Start of header delimiter */ 46*1772Sjl139090 #define ETM_DELIMLEN 4 /* Length of header deimiter */ 47*1772Sjl139090 48*1772Sjl139090 typedef struct etm_proto_header { 49*1772Sjl139090 char hdr_delim[ETM_DELIMLEN]; /* Start of header delimiter */ 50*1772Sjl139090 uint8_t hdr_ver; /* ETM protocol version */ 51*1772Sjl139090 uint8_t hdr_type; /* Header type */ 52*1772Sjl139090 uint8_t hdr_pad1; /* reserved/padding/alignment */ 53*1772Sjl139090 uint8_t hdr_pad2; /* reserved/padding/alignment */ 54*1772Sjl139090 uint32_t hdr_msglen; /* Length of following message */ 55*1772Sjl139090 } etm_proto_hdr_t; 56*1772Sjl139090 57*1772Sjl139090 typedef enum etm_proto_header_type { 58*1772Sjl139090 ETM_HDR_TYPE_TOO_LOW = 0, /* Range check place holder */ 59*1772Sjl139090 ETM_HDR_MSG, /* FMA event to follow */ 60*1772Sjl139090 ETM_HDR_S_RESTART, /* Server re-start indication */ 61*1772Sjl139090 ETM_HDR_C_HELLO, /* Client startup indication */ 62*1772Sjl139090 ETM_HDR_S_HELLO, /* Server response to C_HELLO */ 63*1772Sjl139090 ETM_HDR_ACK, /* Acknowledgement */ 64*1772Sjl139090 ETM_HDR_NAK, /* Negative acknowledgement */ 65*1772Sjl139090 ETM_HDR_SHUTDOWN, /* Notify remote ETM of shutdown */ 66*1772Sjl139090 ETM_HDR_TYPE_TOO_HIGH /* Range check place holder */ 67*1772Sjl139090 } etm_proto_hdr_type_t; 68*1772Sjl139090 69*1772Sjl139090 #define ETM_HDRLEN sizeof (etm_proto_hdr_t) 70*1772Sjl139090 #define ETM_PROTO_V1 1 71*1772Sjl139090 72*1772Sjl139090 #ifdef __cplusplus 73*1772Sjl139090 } 74*1772Sjl139090 #endif 75*1772Sjl139090 76*1772Sjl139090 #endif /* _ETM_PROTO_H */ 77