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