summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h
blob: 6fb929721172ef5b3be487dc45c94a2484984f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
/** @file
  IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1.

  This file contains all NetFn Transport commands, including:
    IPM LAN Commands (Chapter 23)
    IPMI Serial/Modem Commands (Chapter 25)
    SOL Commands (Chapter 26)
    Command Forwarding Commands (Chapter 35b)

  See IPMI specification, Appendix G, Command Assignments
  and Appendix H, Sub-function Assignments.

  Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>
  This program and the accompanying materials
  are licensed and made available under the terms and conditions of the BSD License
  which accompanies this distribution.  The full text of the license may be found at
  http://opensource.org/licenses/bsd-license.php

  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/

#ifndef _IPMI_NET_FN_TRANSPORT_H_
#define _IPMI_NET_FN_TRANSPORT_H_

#pragma pack(1)
//
// Net function definition for Transport command
//
#define IPMI_NETFN_TRANSPORT  0x0C

//
//  Below is Definitions for IPM LAN Commands (Chapter 23)
//

//
//  Definitions for Set Lan Configuration Parameters command
//
#define IPMI_TRANSPORT_SET_LAN_CONFIG_PARAMETERS 0x01

//
//  Constants and Structure definitions for "Set Lan Configuration Parameters" command to follow here
//

//
// LAN Management Structure
//
typedef enum {
  IpmiLanReserved1,
  IpmiLanReserved2,
  IpmiLanAuthType,
  IpmiLanIpAddress,
  IpmiLanIpAddressSource,
  IpmiLanMacAddress,
  IpmiLanSubnetMask,
  IpmiLanIpv4HeaderParam,
  IpmiLanPrimaryRcmpPort,
  IpmiLanSecondaryRcmpPort,
  IpmiLanBmcGeneratedArpCtrl,
  IpmiLanArpInterval,
  IpmiLanDefaultGateway,
  IpmiLanDefaultGatewayMac,
  IpmiLanBackupGateway,
  IpmiLanBackupGatewayMac,
  IpmiLanCommunityString,
  IpmiLanReserved3,
  IpmiLanDestinationType,
  IpmiLanDestinationAddress
} IPMI_LAN_OPTION_TYPE;

//
// IP Address Source
//
typedef enum {
  IpmiUnspecified,
  IpmiStaticAddrsss,
  IpmiDynamicAddressBmcDhcp,
  IpmiDynamicAddressBiosDhcp,
  IpmiDynamicAddressBmcNonDhcp
} IPMI_IP_ADDRESS_SRC;

//
// Destination Type
//
typedef enum {
  IpmiPetTrapDestination,
  IpmiDirectedEventDestination,
  IpmiReserved1,
  IpmiReserved2,
  IpmiReserved3,
  IpmiReserved4,
  IpmiReserved5,
  IpmiOem1,
  IpmiOem2
} IPMI_LAN_DEST_TYPE_DEST_TYPE;

typedef struct {
  UINT8 NoAuth : 1;
  UINT8 MD2Auth : 1;
  UINT8 MD5Auth : 1;
  UINT8 Reserved1 : 1;
  UINT8 StraightPswd : 1;
  UINT8 OemType : 1;
  UINT8 Reserved2 : 2;
} IPMI_LAN_AUTH_TYPE;

typedef struct {
  UINT8 IpAddress[4];
} IPMI_LAN_IP_ADDRESS;

typedef struct {
  UINT8 AddressSrc : 4;
  UINT8 Reserved : 4;
} IPMI_LAN_IP_ADDRESS_SRC;

typedef struct {
  UINT8 MacAddress[6];
} IPMI_LAN_MAC_ADDRESS;

typedef struct {
  UINT8 IpAddress[4];
} IPMI_LAN_SUBNET_MASK;

typedef struct {
  UINT8 TimeToLive;
  UINT8 IpFlag : 3;
  UINT8 Reserved1 : 5;
  UINT8 Precedence : 3;
  UINT8 Reserved2 : 1;
  UINT8 ServiceType : 4;
} IPMI_LAN_IPV4_HDR_PARAM;

typedef struct {
  UINT8 RcmpPortMsb;
  UINT8 RcmpPortLsb;
} IPMI_LAN_RCMP_PORT;

typedef struct {
  UINT8 EnableBmcArpResponse : 1;
  UINT8 EnableBmcGratuitousArp : 1;
  UINT8 Reserved : 6;
} IPMI_LAN_BMC_GENERATED_ARP_CONTROL;

typedef struct {
  UINT8 ArpInterval;
} IPMI_LAN_ARP_INTERVAL;

typedef struct {
  UINT8 Data[18];
} IPMI_LAN_COMMUNITY_STRING;

typedef struct {
  UINT8 DestinationSelector : 4;
  UINT8 Reserved2 : 4;
  UINT8 DestinationType : 3;
  UINT8 Reserved1 : 4;
  UINT8 AlertAcknowledged : 1;
} IPMI_LAN_DEST_TYPE;

typedef struct {
  UINT8               DestinationSelector : 4;
  UINT8               Reserved1 : 4;
  UINT8               AlertingIpAddressSelector : 4;
  UINT8               AddressFormat : 4;
  UINT8               UseDefaultGateway : 1;
  UINT8               Reserved2 : 7;
  IPMI_LAN_IP_ADDRESS  AlertingIpAddress;
  IPMI_LAN_MAC_ADDRESS AlertingMacAddress;
} IPMI_LAN_DEST_ADDRESS;

typedef union {
  IPMI_LAN_AUTH_TYPE                 IpmiLanAuthType;
  IPMI_LAN_IP_ADDRESS                IpmiLanIpAddress;
  IPMI_LAN_IP_ADDRESS_SRC            IpmiLanIpAddressSrc;
  IPMI_LAN_MAC_ADDRESS               IpmiLanMacAddress;
  IPMI_LAN_SUBNET_MASK               IpmiLanSubnetMask;
  IPMI_LAN_IPV4_HDR_PARAM            IpmiLanIpv4HdrParam;
  IPMI_LAN_RCMP_PORT                 IpmiLanPrimaryRcmpPort;
  IPMI_LAN_BMC_GENERATED_ARP_CONTROL IpmiLanArpControl;
  IPMI_LAN_ARP_INTERVAL              IpmiLanArpInterval;
  IPMI_LAN_COMMUNITY_STRING          IpmiLanCommunityString;
  IPMI_LAN_DEST_TYPE                 IpmiLanDestType;
  IPMI_LAN_DEST_ADDRESS              IpmiLanDestAddress;
} IPMI_LAN_OPTIONS;

//
//  Definitions for Get Lan Configuration Parameters command
//
#define IPMI_TRANSPORT_GET_LAN_CONFIG_PARAMETERS 0x02

//
//  Constants and Structure definitions for "Get Lan Configuration Parameters" command to follow here
//

//
//  Definitions for Suspend BMC ARPs command
//
#define IPMI_TRANSPORT_SUSPEND_BMC_ARPS  0x03

//
//  Constants and Structure definitions for "Suspend BMC ARPs" command to follow here
//

//
//  Definitions for Get IP-UDP-RMCP Statistics command
//
#define IPMI_TRANSPORT_GET_PACKET_STATISTICS 0x04

//
//  Constants and Structure definitions for "Get IP-UDP-RMCP Statistics" command to follow here
//

//
//  Below is Definitions for IPMI Serial/Modem Commands (Chapter 25)
//

//
//  Definitions for Set Serial/Modem Configuration command
//
#define IPMI_TRANSPORT_SET_SERIAL_CONFIGURATION  0x10

//
//  Constants and Structure definitions for "Set Serial/Modem Configuration" command to follow here
//

//
// EMP OPTION DATA
//
typedef struct {
  UINT8 NoAuthentication : 1;
  UINT8 MD2Authentication : 1;
  UINT8 MD5Authentication : 1;
  UINT8 Reserved1 : 1;
  UINT8 StraightPassword : 1;
  UINT8 OemProprietary : 1;
  UINT8 Reservd2 : 2;
} IPMI_EMP_AUTH_TYPE;

typedef struct {
  UINT8 EnableBasicMode : 1;
  UINT8 EnablePPPMode : 1;
  UINT8 EnableTerminalMode : 1;
  UINT8 Reserved1 : 2;
  UINT8 SnoopOsPPPNegotiation : 1;
  UINT8 Reserved2 : 1;
  UINT8 DirectConnect : 1;
} IPMI_EMP_CONNECTION_TYPE;

typedef struct {
  UINT8 InactivityTimeout : 4;
  UINT8 Reserved : 4;
} IPMI_EMP_INACTIVITY_TIMEOUT;

typedef struct {
  UINT8 IpmiCallback : 1;
  UINT8 CBCPCallback : 1;
  UINT8 Reserved1 : 6;
  UINT8 CbcpEnableNoCallback : 1;
  UINT8 CbcpEnablePreSpecifiedNumber : 1;
  UINT8 CbcpEnableUserSpecifiedNumber : 1;
  UINT8 CbcpEnableCallbackFromList : 1;
  UINT8 Reserved : 4;
  UINT8 CallbackDestination1;
  UINT8 CallbackDestination2;
  UINT8 CallbackDestination3;
} IPMI_EMP_CHANNEL_CALLBACK_CONTROL;

typedef struct {
  UINT8 CloseSessionOnDCDLoss : 1;
  UINT8 EnableSessionInactivityTimeout : 1;
  UINT8 Reserved : 6;
} IPMI_EMP_SESSION_TERMINATION;

typedef struct {
  UINT8 Reserved1 : 5;
  UINT8 EnableDtrHangup : 1;
  UINT8 FlowControl : 2;
  UINT8 BitRate : 4;
  UINT8 Reserved2 : 4;
  UINT8 SaveSetting : 1;
  UINT8 SetComPort : 1;
  UINT8 Reserved3 : 6;
} IPMI_EMP_MESSAGING_COM_SETTING;

typedef struct {
  UINT8 RingDurationInterval : 6;
  UINT8 Reserved1 : 2;
  UINT8 RingDeadTime : 4;
  UINT8 Reserved : 4;
} IPMI_EMP_MODEM_RING_TIME;

typedef struct {
  UINT8 Reserved;
  UINT8 InitString[48];
} IPMI_EMP_MODEM_INIT_STRING;

typedef struct {
  UINT8 EscapeSequence[5];
} IPMI_EMP_MODEM_ESC_SEQUENCE;

typedef struct {
  UINT8 HangupSequence[8];
} IPMI_EMP_MODEM_HANGUP_SEQUENCE;

typedef struct {
  UINT8 ModelDialCommend[8];
} IPMI_MODEM_DIALUP_COMMAND;

typedef struct {
  UINT8 PageBlackoutInterval;
} IPMI_PAGE_BLACKOUT_INTERVAL;

typedef struct {
  UINT8 CommunityString[18];
} IPMI_EMP_COMMUNITY_STRING;

typedef struct {
  UINT8 Reserved5 : 4;
  UINT8 DialStringSelector : 4;
} IPMI_DIAL_PAGE_DESTINATION;

typedef struct {
  UINT8 TapAccountSelector : 4;
  UINT8 Reserved : 4;
} IPMI_TAP_PAGE_DESTINATION;

typedef struct {
  UINT8 PPPAccountSetSelector;
  UINT8 DialStringSelector;
} IPMI_PPP_ALERT_DESTINATION;

typedef union {
  IPMI_DIAL_PAGE_DESTINATION    DialPageDestination;
  IPMI_TAP_PAGE_DESTINATION     TapPageDestination;
  IPMI_PPP_ALERT_DESTINATION    PppAlertDestination;
} IPMI_DEST_TYPE_SPECIFIC;

typedef struct {
  UINT8 DestinationSelector : 4;
  UINT8 Reserved1 : 4;
  UINT8 DestinationType : 4;
  UINT8 Reserved2 : 3;
  UINT8 AlertAckRequired : 1;
  UINT8 AlertAckTimeoutSeconds;
  UINT8 NumRetriesCall : 3;
  UINT8 Reserved3 : 1;
  UINT8 NumRetryAlert : 3;
  UINT8 Reserved4 : 1;
  IPMI_DEST_TYPE_SPECIFIC DestinationTypeSpecific;
} IPMI_EMP_DESTINATION_INFO;

typedef struct {
  UINT8 DestinationSelector : 4;
  UINT8 Reserved1 : 4;
  UINT8 Parity : 3;
  UINT8 CharacterSize : 1;
  UINT8 StopBit : 1;
  UINT8 DtrHangup : 1;
  UINT8 FlowControl : 2;
  UINT8 BitRate : 4;
  UINT8 Reserved2 : 4;
  UINT8 SaveSetting : 1;
  UINT8 SetComPort : 1;
  UINT8 Reserved3 : 6;
} IPMI_EMP_DESTINATION_COM_SETTING;

typedef struct {
  UINT8 DialStringSelector : 4;
  UINT8 Reserved1 : 4;
  UINT8 Reserved2;
  UINT8 DialString[48];
} IPMI_DESTINATION_DIAL_STRING;

typedef union {
  UINT32  IpAddressLong;
  UINT8   IpAddress[4];
} IPMI_PPP_IP_ADDRESS;

typedef struct {
  UINT8 IpAddressSelector : 4;
  UINT8 Reserved1 : 4;
  IPMI_PPP_IP_ADDRESS PppIpAddress;
} IPMI_DESTINATION_IP_ADDRESS;

typedef struct {
  UINT8 TapSelector;
  UINT8 TapServiceSelector : 4;
  UINT8 TapDialStringSelector : 4;
} IPMI_DESTINATION_TAP_ACCOUNT;

typedef struct {
  UINT8 TapSelector;
  UINT8 PagerIdString[16];
} IPMI_TAP_PAGER_ID_STRING;

typedef union {
  UINT8                              OptionData;
  IPMI_EMP_AUTH_TYPE                 EmpAuthType;
  IPMI_EMP_CONNECTION_TYPE           EmpConnectionType;
  IPMI_EMP_INACTIVITY_TIMEOUT        EmpInactivityTimeout;
  IPMI_EMP_CHANNEL_CALLBACK_CONTROL  EmpCallbackControl;
  IPMI_EMP_SESSION_TERMINATION       EmpSessionTermination;
  IPMI_EMP_MESSAGING_COM_SETTING     EmpMessagingComSetting;
  IPMI_EMP_MODEM_RING_TIME           EmpModemRingTime;
  IPMI_EMP_MODEM_INIT_STRING         EmpModemInitString;
  IPMI_EMP_MODEM_ESC_SEQUENCE        EmpModemEscSequence;
  IPMI_EMP_MODEM_HANGUP_SEQUENCE     EmpModemHangupSequence;
  IPMI_MODEM_DIALUP_COMMAND          EmpModemDialupCommand;
  IPMI_PAGE_BLACKOUT_INTERVAL        EmpPageBlackoutInterval;
  IPMI_EMP_COMMUNITY_STRING          EmpCommunityString;
  IPMI_EMP_DESTINATION_INFO          EmpDestinationInfo;
  IPMI_EMP_DESTINATION_COM_SETTING   EmpDestinationComSetting;
  UINT8                              CallRetryBusySignalInterval;
  IPMI_DESTINATION_DIAL_STRING       DestinationDialString;
  IPMI_DESTINATION_IP_ADDRESS        DestinationIpAddress;
  IPMI_DESTINATION_TAP_ACCOUNT       DestinationTapAccount;
  IPMI_TAP_PAGER_ID_STRING           TapPagerIdString;
} IPMI_EMP_OPTIONS;

//
//  Definitions for Get Serial/Modem Configuration command
//
#define IPMI_TRANSPORT_GET_SERIAL_CONFIGURATION  0x11

//
//  Constants and Structure definitions for "Get Serial/Modem Configuration" command to follow here
//

//
//  Definitions for Set Serial/Modem Mux command
//
#define IPMI_TRANSPORT_SET_SERIAL_MUX  0x12

//
//  Constants and Structure definitions for "Set Serial/Modem Mux" command to follow here
//
typedef struct {
  UINT8 ChannelNo : 4;
  UINT8 Reserved1 : 4;
  UINT8 MuxSetting : 4;
  UINT8 Reserved2 : 4;
} IPMI_SET_MUX_COMMAND;

typedef struct {
  UINT8 MuxSetToBmc : 1;
  UINT8 CommandStatus : 1;
  UINT8 MessagingSessionActive : 1;
  UINT8 AlertInProgress : 1;
  UINT8 Reserved2 : 2;
  UINT8 MuxToBmcAllowed : 1;
  UINT8 MuxToSystemBlocked : 1;
} IPMI_MUX_CONFIG;

//
//  Definitions for Get TAP Response Code command
//
#define IPMI_TRANSPORT_GET_TAP_RESPONSE_CODE 0x13

//
//  Constants and Structure definitions for "Get TAP Response Code" command to follow here
//

//
//  Definitions for Set PPP UDP Proxy Transmit Data command
//
#define IPMI_TRANSPORT_SET_PPP_UDP_PROXY_TXDATA  0x14

//
//  Constants and Structure definitions for "Set PPP UDP Proxy Transmit Data" command to follow here
//

//
//  Definitions for Get PPP UDP Proxy Transmit Data command
//
#define IPMI_TRANSPORT_GET_PPP_UDP_PROXY_TXDATA  0x15

//
//  Constants and Structure definitions for "Get PPP UDP Proxy Transmit Data" command to follow here
//

//
//  Definitions for Send PPP UDP Proxy Packet command
//
#define IPMI_TRANSPORT_SEND_PPP_UDP_PROXY_PACKET 0x16

//
//  Constants and Structure definitions for "Send PPP UDP Proxy Packet" command to follow here
//

//
//  Definitions for Get PPP UDP Proxy Receive Data command
//
#define IPMI_TRANSPORT_GET_PPP_UDP_PROXY_RX  0x17

//
//  Constants and Structure definitions for "Get PPP UDP Proxy Receive Data" command to follow here
//

//
//  Definitions for Serial/Modem connection active command
//
#define IPMI_TRANSPORT_SERIAL_CONNECTION_ACTIVE  0x18

//
//  Constants and Structure definitions for "Serial/Modem connection active" command to follow here
//

//
//  Definitions for Callback command
//
#define IPMI_TRANSPORT_CALLBACK  0x19

//
//  Constants and Structure definitions for "Callback" command to follow here
//

//
//  Definitions for Set user Callback Options command
//
#define IPMI_TRANSPORT_SET_USER_CALLBACK_OPTIONS 0x1A

//
//  Constants and Structure definitions for "Set user Callback Options" command to follow here
//

//
//  Definitions for Get user Callback Options command
//
#define IPMI_TRANSPORT_GET_USER_CALLBACK_OPTIONS 0x1B

//
//  Constants and Structure definitions for "Get user Callback Options" command to follow here
//

//
//  Below is Definitions for SOL Commands (Chapter 26)
//

//
//  Definitions for SOL activating command
//
#define IPMI_TRANSPORT_SOL_ACTIVATING  0x20

//
//  Constants and Structure definitions for "SOL activating" command to follow here
//

//
//  Definitions for Set SOL Configuration Parameters command
//
#define IPMI_TRANSPORT_SET_SOL_CONFIG_PARAM  0x21

//
//  Constants and Structure definitions for "Set SOL Configuration Parameters" command to follow here
//

//
//  Definitions for Get SOL Configuration Parameters command
//
#define IPMI_TRANSPORT_GET_SOL_CONFIG_PARAM  0x22

//
//  Constants and Structure definitions for "Get SOL Configuration Parameters" command to follow here
//
#pragma pack()
#endif