1 mike 1.1 /*
2 **==============================================================================
3 **
4 ** Open Management Infrastructure (OMI)
5 **
6 ** Copyright (c) Microsoft Corporation
7 **
8 ** Licensed under the Apache License, Version 2.0 (the "License"); you may not
9 ** use this file except in compliance with the License. You may obtain a copy
10 ** of the License at
11 **
12 ** http://www.apache.org/licenses/LICENSE-2.0
13 **
14 ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
16 ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
17 ** MERCHANTABLITY OR NON-INFRINGEMENT.
18 **
19 ** See the Apache 2 License for the specific language governing permissions
20 ** and limitations under the License.
21 **
22 mike 1.1 **==============================================================================
23 */
24
25 #ifndef _omi_header_h
26 #define _omi_header_h
27
28 #include "config.h"
29 #include <common.h>
30 #include <base/batch.h>
31
32 BEGIN_EXTERNC
33
34 /*
35 **==============================================================================
36 **
37 ** Header:
38 **
39 ** All protocol messages start with this header. The size of this header
40 ** should be a multiple of 8 (to ensure that the body that follows is
41 ** aligned on an 8-byte boundary).
42 **
43 mike 1.1 **==============================================================================
44 */
45
46 #define PROTOCOL_MAGIC 0xB1A87E2F
47
48 #define PROTOCOL_VERSION 0x00010000 /* 1.0.0 */
49
50 #define PROTOCOL_HEADER_MAX_PAGES 64
51
52 typedef struct _HeaderBase
53 {
54 /* Magic number (can be used to detect endianess of request) */
55 MI_Uint32 magic;
56
57 /* Version number of protocol */
58 MI_Uint32 version;
59
60 /* Type of message */
61 MI_Uint32 msgType;
62
63 /* batch information 0-64 */
64 mike 1.1 MI_Uint32 pageCount;
65
66 void* originalMessagePointer;
67 /*ATTN pointer has to be padded to 64 bit for 32/64 compatability */
68
69 /* A correlation identifier borne by matching request and response */
70 MI_Uint64 msgID;
71 }
72 HeaderBase;
73
74 typedef struct _Header
75 {
76 HeaderBase base;
77
78 /* folowed by */
79 Header_BatchInfoItem batchInfo[PROTOCOL_HEADER_MAX_PAGES];
80 }
81 Header;
82
83
84
85 mike 1.1 END_EXTERNC
86
87 #endif /* _omi_header_h */
|