blob: a48059fd5c51ab33ef559a2f0781076abcbc9a5d [file] [log] [blame]
vishwabmcba0bd5f2015-09-30 16:50:23 +05301#include "apphandler.h"
2#include "ipmid-api.h"
Chris Austen6caf28b2015-10-13 12:40:40 -05003#include "ipmid.H"
vishwabmcba0bd5f2015-09-30 16:50:23 +05304#include <stdio.h>
5#include <string.h>
Chris Austen6caf28b2015-10-13 12:40:40 -05006#include <stdint.h>
Adriana Kobylak3a552e12015-10-19 16:11:00 -05007#include <systemd/sd-bus.h>
8
9extern sd_bus *bus;
vishwabmcba0bd5f2015-09-30 16:50:23 +053010
Chris Austen6caf28b2015-10-13 12:40:40 -050011void register_netfn_app_functions() __attribute__((constructor));
vishwabmcba0bd5f2015-09-30 16:50:23 +053012
vishwa36993272015-11-20 12:43:49 -060013//---------------------------------------------------------------------
14// Called by Host on seeing a SMS_ATN bit set. Return a hardcoded
15// value of 0x2 indicating we need Host read some data.
16//-------------------------------------------------------------------
17ipmi_ret_t ipmi_app_get_msg_flags(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
18 ipmi_request_t request, ipmi_response_t response,
19 ipmi_data_len_t data_len, ipmi_context_t context)
20{
21 // Generic return from IPMI commands.
22 ipmi_ret_t rc = IPMI_CC_OK;
Chris Austen6caf28b2015-10-13 12:40:40 -050023
vishwa36993272015-11-20 12:43:49 -060024 printf("IPMI APP GET MSG FLAGS returning with [bit:2] set\n");
25
26 // From IPMI spec V2.0 for Get Message Flags Command :
27 // bit:[1] from LSB : 1b = Event Message Buffer Full.
28 // Return as 0 if Event Message Buffer is not supported,
29 // or when the Event Message buffer is disabled.
30 // TODO. For now. assume its not disabled and send "0x2" anyway:
31
32 uint8_t set_event_msg_buffer_full = 0x2;
33 *data_len = sizeof(set_event_msg_buffer_full);
34
35 // Pack the actual response
36 memcpy(response, &set_event_msg_buffer_full, *data_len);
37
38 return rc;
39}
40
41//-------------------------------------------------------------------
42// Called by Host post response from Get_Message_Flags
43//-------------------------------------------------------------------
Adriana Kobylak3a552e12015-10-19 16:11:00 -050044ipmi_ret_t ipmi_app_read_event(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
45 ipmi_request_t request, ipmi_response_t response,
Chris Austen6caf28b2015-10-13 12:40:40 -050046 ipmi_data_len_t data_len, ipmi_context_t context)
47{
48 ipmi_ret_t rc = IPMI_CC_OK;
vishwa36993272015-11-20 12:43:49 -060049 printf("IPMI APP READ EVENT command received\n");
Chris Austen6caf28b2015-10-13 12:40:40 -050050
vishwa36993272015-11-20 12:43:49 -060051 // TODO : For now, this is catering only to the Soft Power Off via OEM SEL
52 // mechanism. If we need to make this generically used for some
53 // other conditions, then we can take advantage of context pointer.
54
55 struct oem_sel_timestamped soft_off = {0};
56 *data_len = sizeof(struct oem_sel_timestamped);
57
58 // either id[0] -or- id[1] can be filled in. We will use id[0]
59 soft_off.id[0] = SEL_OEM_ID_0;
60 soft_off.id[1] = SEL_OEM_ID_0;
61 soft_off.type = SEL_RECORD_TYPE_OEM;
62
63 // Following 3 bytes are from IANA Manufactre_Id field. See below
64 soft_off.manuf_id[0]= 0x41;
65 soft_off.manuf_id[1]= 0xA7;
66 soft_off.manuf_id[2]= 0x00;
67
68 // per IPMI spec NetFuntion for OEM
69 soft_off.netfun = 0x3A;
70
71 // Mechanism to kick start soft shutdown.
72 soft_off.cmd = CMD_POWER;
73 soft_off.data[0] = SOFT_OFF;
74
75 // All '0xFF' since unused.
76 memset(&soft_off.data[1], 0xFF, 3);
77
78 // Pack the actual response
79 memcpy(response, &soft_off, *data_len);
Chris Austen6caf28b2015-10-13 12:40:40 -050080 return rc;
Chris Austen6caf28b2015-10-13 12:40:40 -050081}
82
Adriana Kobylak3a552e12015-10-19 16:11:00 -050083ipmi_ret_t ipmi_app_set_acpi_power_state(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
84 ipmi_request_t request, ipmi_response_t response,
Chris Austen6caf28b2015-10-13 12:40:40 -050085 ipmi_data_len_t data_len, ipmi_context_t context)
86{
87 ipmi_ret_t rc = IPMI_CC_OK;
88 *data_len = 0;
89
90 printf("IPMI SET ACPI STATE Ignoring for now\n");
91 return rc;
92}
93
Adriana Kobylak3a552e12015-10-19 16:11:00 -050094ipmi_ret_t ipmi_app_get_device_id(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
95 ipmi_request_t request, ipmi_response_t response,
Chris Austen6caf28b2015-10-13 12:40:40 -050096 ipmi_data_len_t data_len, ipmi_context_t context)
97{
98 ipmi_ret_t rc = IPMI_CC_OK;
99
Patrick Williams76b51f62015-10-28 12:14:56 -0500100 // TODO:
101 // This value is the IANA number assigned to "IBM Platform Firmware
102 // Division", which is also used by our service processor. We may want
103 // a different number or at least a different version?
Chris Austen6caf28b2015-10-13 12:40:40 -0500104 uint8_t str[] = {0x00, 0, 1, 1,2, 0xD, 0x41, 0xA7, 0x00, 0x43, 0x40};
105
106 // Data length
107 *data_len = sizeof(str);
108
109 // Pack the actual response
110 memcpy(response, &str, *data_len);
111 return rc;
112}
113
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500114ipmi_ret_t ipmi_app_get_device_guid(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
115 ipmi_request_t request, ipmi_response_t response,
116 ipmi_data_len_t data_len, ipmi_context_t context)
117{
118 const char *busname = "org.openbmc.control.Chassis";
119 const char *objname = "/org/openbmc/control/chassis0";
Adriana Kobylak31bccae2015-11-05 13:31:06 -0600120 const char *iface = "org.freedesktop.DBus.Properties";
121 const char *chassis_iface = "org.openbmc.control.Chassis";
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500122 sd_bus_message *reply = NULL, *m = NULL;
123 sd_bus_error error = SD_BUS_ERROR_NULL;
124 int r = 0;
125 char *uuid = NULL;
126
127 // Status code.
128 ipmi_ret_t rc = IPMI_CC_OK;
129 *data_len = 0;
130
131 printf("IPMI GET DEVICE GUID\n");
132
Adriana Kobylak31bccae2015-11-05 13:31:06 -0600133 // Call Get properties method with the interface and property name
134 r = sd_bus_message_new_method_call(bus,&m,busname,objname,iface,"Get");
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500135 if (r < 0) {
Adriana Kobylak31bccae2015-11-05 13:31:06 -0600136 fprintf(stderr, "Failed to add the Get method object: %s\n", strerror(-r));
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500137 return IPMI_CC_UNSPECIFIED_ERROR;
138 }
Adriana Kobylak31bccae2015-11-05 13:31:06 -0600139 r = sd_bus_message_append(m, "ss", chassis_iface, "uuid");
140 if (r < 0) {
141 fprintf(stderr, "Failed to append arguments: %s\n", strerror(-r));
142 return -1;
143 }
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500144 r = sd_bus_call(bus, m, 0, &error, &reply);
145 if (r < 0) {
Adriana Kobylak31bccae2015-11-05 13:31:06 -0600146 fprintf(stderr, "Failed to call the Get method: %s\n", strerror(-r));
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500147 return IPMI_CC_UNSPECIFIED_ERROR;
148 }
Adriana Kobylak31bccae2015-11-05 13:31:06 -0600149 r = sd_bus_message_read(reply, "v", "s", &uuid);
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500150 if (r < 0) {
151 fprintf(stderr, "Failed to get a response: %s", strerror(-r));
152 return IPMI_CC_RESPONSE_ERROR;
153 }
154 if (uuid == NULL)
155 {
156 fprintf(stderr, "Failed to get a valid response: %s", strerror(-r));
157 return IPMI_CC_RESPONSE_ERROR;
158 }
159
160 // UUID is in RFC4122 format. Ex: 61a39523-78f2-11e5-9862-e6402cfc3223
161 // Per IPMI Spec 2.0 need to convert to 16 hex bytes and reverse the byte order
162 // Ex: 0x2332fc2c40e66298e511f2782395a361
163
164 const int resp_size = 16; // Response is 16 hex bytes per IPMI Spec
165 uint8_t resp_uuid[resp_size]; // Array to hold the formatted response
166 int resp_loc = resp_size-1; // Point resp end of array to save in reverse order
167 int i = 0;
168 char *tokptr = NULL;
169
170 // Traverse the UUID
171 char* id_octet = strtok_r(uuid, "-", &tokptr); // Get the UUID octects separated by dash
172
173 if (id_octet == NULL)
174 { // Error
175 fprintf(stderr, "Unexpected UUID format: %s", uuid);
176 return IPMI_CC_RESPONSE_ERROR;
177 }
178
179 while (id_octet != NULL)
180 {
181 // Calculate the octet string size since it varies
182 // Divide it by 2 for the array size since 1 byte is built from 2 chars
183 int tmp_size = strlen(id_octet)/2;
184
185 for(i = 0; i < tmp_size; i++)
186 {
Joel Stanley38310cd2015-11-25 17:32:08 +1030187 char tmp_array[3] = {0}; // Holder of the 2 chars that will become a byte
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500188 strncpy(tmp_array, id_octet, 2); // 2 chars at a time
189
190 int resp_byte = strtoul(tmp_array, NULL, 16); // Convert to hex byte
191 memcpy((void*)&resp_uuid[resp_loc], &resp_byte, 1); // Copy end to first
192 resp_loc--;
193 id_octet+=2; // Finished with the 2 chars, advance
194 }
195 id_octet=strtok_r(NULL, "-", &tokptr); // Get next octet
196 }
197
198 // Data length
199 *data_len = resp_size;
200
201 // Pack the actual response
202 memcpy(response, &resp_uuid, *data_len);
203
204 sd_bus_error_free(&error);
205 sd_bus_message_unref(m);
206
207 return rc;
208}
Chris Austen6caf28b2015-10-13 12:40:40 -0500209
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500210ipmi_ret_t ipmi_app_get_bt_capabilities(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
211 ipmi_request_t request, ipmi_response_t response,
vishwabmcba0bd5f2015-09-30 16:50:23 +0530212 ipmi_data_len_t data_len, ipmi_context_t context)
213{
214 printf("Handling Netfn:[0x%X], Cmd:[0x%X]\n",netfn,cmd);
215
216 // Status code.
217 ipmi_ret_t rc = IPMI_CC_OK;
218
Chris Austen6caf28b2015-10-13 12:40:40 -0500219 uint8_t str[] = {0x01, MAX_IPMI_BUFFER, MAX_IPMI_BUFFER, 0x0A, 0x01};
vishwabmcba0bd5f2015-09-30 16:50:23 +0530220
221 // Data length
222 *data_len = sizeof(str);
223
224 // Pack the actual response
225 memcpy(response, &str, *data_len);
226
227 return rc;
228}
229
Chris Austen6caf28b2015-10-13 12:40:40 -0500230
231struct set_wd_data_t {
232 uint8_t t_use;
233 uint8_t t_action;
234 uint8_t preset;
235 uint8_t flags;
236 uint8_t ls;
237 uint8_t ms;
238} __attribute__ ((packed));
239
240
241
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500242ipmi_ret_t ipmi_app_set_watchdog(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
243 ipmi_request_t request, ipmi_response_t response,
Chris Austen6caf28b2015-10-13 12:40:40 -0500244 ipmi_data_len_t data_len, ipmi_context_t context)
245{
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500246 const char *busname = "org.openbmc.watchdog.Host";
Chris Austen454acfe2015-10-29 23:03:34 -0500247 const char *objname = "/org/openbmc/watchdog/host0";
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500248 const char *iface = "org.openbmc.Watchdog";
249 sd_bus_message *reply = NULL, *m = NULL;
250 sd_bus_error error = SD_BUS_ERROR_NULL;
251 int r = 0;
Chris Austen6caf28b2015-10-13 12:40:40 -0500252
253 set_wd_data_t *reqptr = (set_wd_data_t*) request;
254 uint16_t timer = 0;
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500255 uint32_t timer_ms = 0;
Chris Austen6caf28b2015-10-13 12:40:40 -0500256 // Status code.
257 ipmi_ret_t rc = IPMI_CC_OK;
258
259 *data_len = 0;
260
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500261 // Get number of 100ms intervals
Chris Austen6caf28b2015-10-13 12:40:40 -0500262 timer = (((uint16_t)reqptr->ms) << 8) + reqptr->ls;
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500263 // Get timer value in ms
264 timer_ms = timer * 100;
Chris Austen6caf28b2015-10-13 12:40:40 -0500265
266 printf("WATCHDOG SET Timer:[0x%X] 100ms intervals\n",timer);
267
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500268 // Set watchdog timer
269 r = sd_bus_message_new_method_call(bus,&m,busname,objname,iface,"set");
270 if (r < 0) {
271 fprintf(stderr, "Failed to add the set method object: %s\n", strerror(-r));
272 return -1;
273 }
274 r = sd_bus_message_append(m, "i", timer_ms);
275 if (r < 0) {
276 fprintf(stderr, "Failed to add timer value: %s\n", strerror(-r));
277 return -1;
278 }
279 r = sd_bus_call(bus, m, 0, &error, &reply);
280 if (r < 0) {
281 fprintf(stderr, "Failed to call the set method: %s\n", strerror(-r));
282 return -1;
283 }
284
Adriana Kobylak0896be32015-10-22 13:27:23 -0500285 // Stop the current watchdog if any
286 r = sd_bus_message_new_method_call(bus,&m,busname,objname,iface,"stop");
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500287 if (r < 0) {
288 fprintf(stderr, "Failed to add the start method object: %s\n", strerror(-r));
289 return -1;
290 }
291 r = sd_bus_call(bus, m, 0, &error, &reply);
292 if (r < 0) {
293 fprintf(stderr, "Failed to call the start method: %s\n", strerror(-r));
294 return -1;
295 }
296
Adriana Kobylak0896be32015-10-22 13:27:23 -0500297 // Start the watchdog if requested
298 if (reqptr->t_use & 0x40)
299 {
300 r = sd_bus_message_new_method_call(bus,&m,busname,objname,iface,"start");
301 if (r < 0) {
302 fprintf(stderr, "Failed to add the start method object: %s\n", strerror(-r));
303 return -1;
304 }
305 r = sd_bus_call(bus, m, 0, &error, &reply);
306 if (r < 0) {
307 fprintf(stderr, "Failed to call the start method: %s\n", strerror(-r));
308 return -1;
309 }
310 }
311
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500312 sd_bus_error_free(&error);
313 sd_bus_message_unref(m);
Chris Austen6caf28b2015-10-13 12:40:40 -0500314
315 return rc;
316}
317
318
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500319ipmi_ret_t ipmi_app_reset_watchdog(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
320 ipmi_request_t request, ipmi_response_t response,
Chris Austen6caf28b2015-10-13 12:40:40 -0500321 ipmi_data_len_t data_len, ipmi_context_t context)
322{
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500323 const char *busname = "org.openbmc.watchdog.Host";
Chris Austen454acfe2015-10-29 23:03:34 -0500324 const char *objname = "/org/openbmc/watchdog/host0";
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500325 const char *iface = "org.openbmc.Watchdog";
326 sd_bus_message *reply = NULL, *m = NULL;
327 sd_bus_error error = SD_BUS_ERROR_NULL;
328 int r = 0;
329
Chris Austen6caf28b2015-10-13 12:40:40 -0500330 // Status code.
331 ipmi_ret_t rc = IPMI_CC_OK;
332 *data_len = 0;
333
334 printf("WATCHDOG RESET\n");
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500335
336 // Refresh watchdog
337 r = sd_bus_message_new_method_call(bus,&m,busname,objname,iface,"poke");
338 if (r < 0) {
339 fprintf(stderr, "Failed to add the method object: %s\n", strerror(-r));
340 return -1;
341 }
342 r = sd_bus_call(bus, m, 0, &error, &reply);
343 if (r < 0) {
344 fprintf(stderr, "Failed to call the method: %s\n", strerror(-r));
345 return -1;
346 }
347
348 sd_bus_error_free(&error);
349 sd_bus_message_unref(m);
350
Chris Austen6caf28b2015-10-13 12:40:40 -0500351 return rc;
352}
353
Chris Austenc2cd29d2016-02-05 20:02:29 -0600354// ATTENTION: This ipmi function is very hardcoded on purpose
355// OpenBMC does not fully support IPMI. This command is useful
356// to have around because it enables testing of interfaces with
357// the IPMI tool.
358#define GET_CHANNEL_INFO_CHANNEL_OFFSET 0
359// IPMI Table 6-2
360#define IPMI_CHANNEL_TYPE_IPMB 1
361// IPMI Table 6-3
362#define IPMI_CHANNEL_MEDIUM_TYPE_OTHER 6
363
364ipmi_ret_t ipmi_app_channel_info(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
365 ipmi_request_t request, ipmi_response_t response,
366 ipmi_data_len_t data_len, ipmi_context_t context)
367{
368 ipmi_ret_t rc = IPMI_CC_OK;
369 uint8_t resp[] = {
370 1,
371 IPMI_CHANNEL_MEDIUM_TYPE_OTHER,
372 IPMI_CHANNEL_TYPE_IPMB,
373 1,0x41,0xA7,0x00,0,0};
374 uint8_t *p = (uint8_t*) request;
375
376 printf("IPMI APP GET CHANNEL INFO\n");
377
378 // I"m only supporting channel 1. 0xE is the 'default channel'
379 if (*p == 0xe || *p == 1) {
380
381 *data_len = sizeof(resp);
382 memcpy(response, resp, *data_len);
383
384 } else {
385 rc = IPMI_CC_PARM_OUT_OF_RANGE;
386 *data_len = 0;
387 }
388
389 return rc;
390}
391
Adriana Kobylakdfc8d772015-10-20 09:34:48 -0500392ipmi_ret_t ipmi_app_set_bmc_global_enables(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
393 ipmi_request_t request, ipmi_response_t response,
394 ipmi_data_len_t data_len, ipmi_context_t context)
395{
396 ipmi_ret_t rc = IPMI_CC_OK;
397 *data_len = 0;
Chris Austen6caf28b2015-10-13 12:40:40 -0500398
Adriana Kobylakdfc8d772015-10-20 09:34:48 -0500399 // Event and message logging enabled by default so return for now
400 printf("IPMI APP SET BMC GLOBAL ENABLES Ignoring for now\n");
401
402 return rc;
403}
Chris Austen6caf28b2015-10-13 12:40:40 -0500404
405
406
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500407ipmi_ret_t ipmi_app_wildcard_handler(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
408 ipmi_request_t request, ipmi_response_t response,
vishwabmcba0bd5f2015-09-30 16:50:23 +0530409 ipmi_data_len_t data_len, ipmi_context_t context)
410{
411 printf("Handling WILDCARD Netfn:[0x%X], Cmd:[0x%X]\n",netfn, cmd);
412
413 // Status code.
414 ipmi_ret_t rc = IPMI_CC_OK;
415
416 *data_len = strlen("THIS IS WILDCARD");
417
418 // Now pack actual response
419 memcpy(response, "THIS IS WILDCARD", *data_len);
420
421 return rc;
422}
423
Chris Austen6caf28b2015-10-13 12:40:40 -0500424void register_netfn_app_functions()
vishwabmcba0bd5f2015-09-30 16:50:23 +0530425{
426 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_CAP_BIT);
Chris Austen6caf28b2015-10-13 12:40:40 -0500427 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_CAP_BIT, NULL, ipmi_app_get_bt_capabilities);
428
429 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_WILDCARD);
430 ipmi_register_callback(NETFUN_APP, IPMI_CMD_WILDCARD, NULL, ipmi_app_wildcard_handler);
431
432 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_RESET_WD);
433 ipmi_register_callback(NETFUN_APP, IPMI_CMD_RESET_WD, NULL, ipmi_app_reset_watchdog);
434
435 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_SET_WD);
436 ipmi_register_callback(NETFUN_APP, IPMI_CMD_SET_WD, NULL, ipmi_app_set_watchdog);
437
438 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_DEVICE_ID);
439 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_DEVICE_ID, NULL, ipmi_app_get_device_id);
440
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500441 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_DEVICE_GUID);
442 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_DEVICE_GUID, NULL, ipmi_app_get_device_guid);
443
Chris Austen6caf28b2015-10-13 12:40:40 -0500444 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_SET_ACPI);
445 ipmi_register_callback(NETFUN_APP, IPMI_CMD_SET_ACPI, NULL, ipmi_app_set_acpi_power_state);
446
447 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_READ_EVENT);
448 ipmi_register_callback(NETFUN_APP, IPMI_CMD_READ_EVENT, NULL, ipmi_app_read_event);
Adriana Kobylakdfc8d772015-10-20 09:34:48 -0500449
450 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP,
451 IPMI_CMD_SET_BMC_GLOBAL_ENABLES);
452 ipmi_register_callback(NETFUN_APP, IPMI_CMD_SET_BMC_GLOBAL_ENABLES, NULL,
453 ipmi_app_set_bmc_global_enables);
454
vishwa36993272015-11-20 12:43:49 -0600455 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_MSG_FLAGS);
456 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_MSG_FLAGS, NULL, ipmi_app_get_msg_flags);
457
Chris Austenc2cd29d2016-02-05 20:02:29 -0600458
459 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_CHAN_INFO);
460 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_CHAN_INFO, NULL, ipmi_app_channel_info);
461
462
463
vishwabmcba0bd5f2015-09-30 16:50:23 +0530464 return;
465}
466
Chris Austen6caf28b2015-10-13 12:40:40 -0500467