blob: fc6c81185aaad8c1bb38290f3337a81e5a8c88bb [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";
vishwa1eaea4f2016-02-26 11:57:40 -0600122 sd_bus_message *reply = NULL;
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500123 sd_bus_error error = SD_BUS_ERROR_NULL;
124 int r = 0;
125 char *uuid = NULL;
126
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500127 // UUID is in RFC4122 format. Ex: 61a39523-78f2-11e5-9862-e6402cfc3223
128 // Per IPMI Spec 2.0 need to convert to 16 hex bytes and reverse the byte order
129 // Ex: 0x2332fc2c40e66298e511f2782395a361
130
131 const int resp_size = 16; // Response is 16 hex bytes per IPMI Spec
132 uint8_t resp_uuid[resp_size]; // Array to hold the formatted response
133 int resp_loc = resp_size-1; // Point resp end of array to save in reverse order
134 int i = 0;
135 char *tokptr = NULL;
vishwa1eaea4f2016-02-26 11:57:40 -0600136 char *id_octet = NULL;
137
138 // Status code.
139 ipmi_ret_t rc = IPMI_CC_OK;
140 *data_len = 0;
141
142 printf("IPMI GET DEVICE GUID\n");
143
144 // Call Get properties method with the interface and property name
145 r = sd_bus_call_method(bus,busname,objname,iface,
146 "Get",&error, &reply, "ss",
147 chassis_iface, "uuid");
148 if (r < 0)
149 {
150 fprintf(stderr, "Failed to call Get Method: %s\n", strerror(-r));
151 rc = IPMI_CC_UNSPECIFIED_ERROR;
152 goto finish;
153 }
154
155 r = sd_bus_message_read(reply, "v", "s", &uuid);
156 if (r < 0 || uuid == NULL)
157 {
158 fprintf(stderr, "Failed to get a response: %s", strerror(-r));
159 rc = IPMI_CC_RESPONSE_ERROR;
160 goto finish;
161 }
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500162
163 // Traverse the UUID
vishwa1eaea4f2016-02-26 11:57:40 -0600164 id_octet = strtok_r(uuid, "-", &tokptr); // Get the UUID octects separated by dash
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500165
166 if (id_octet == NULL)
vishwa1eaea4f2016-02-26 11:57:40 -0600167 {
168 // Error
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500169 fprintf(stderr, "Unexpected UUID format: %s", uuid);
vishwa1eaea4f2016-02-26 11:57:40 -0600170 rc = IPMI_CC_RESPONSE_ERROR;
171 goto finish;
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500172 }
173
174 while (id_octet != NULL)
175 {
176 // Calculate the octet string size since it varies
177 // Divide it by 2 for the array size since 1 byte is built from 2 chars
178 int tmp_size = strlen(id_octet)/2;
179
180 for(i = 0; i < tmp_size; i++)
181 {
Joel Stanley38310cd2015-11-25 17:32:08 +1030182 char tmp_array[3] = {0}; // Holder of the 2 chars that will become a byte
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500183 strncpy(tmp_array, id_octet, 2); // 2 chars at a time
184
185 int resp_byte = strtoul(tmp_array, NULL, 16); // Convert to hex byte
186 memcpy((void*)&resp_uuid[resp_loc], &resp_byte, 1); // Copy end to first
187 resp_loc--;
188 id_octet+=2; // Finished with the 2 chars, advance
189 }
190 id_octet=strtok_r(NULL, "-", &tokptr); // Get next octet
191 }
192
193 // Data length
194 *data_len = resp_size;
195
196 // Pack the actual response
197 memcpy(response, &resp_uuid, *data_len);
198
vishwa1eaea4f2016-02-26 11:57:40 -0600199finish:
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500200 sd_bus_error_free(&error);
vishwa1eaea4f2016-02-26 11:57:40 -0600201 reply = sd_bus_message_unref(reply);
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500202
203 return rc;
204}
Chris Austen6caf28b2015-10-13 12:40:40 -0500205
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500206ipmi_ret_t ipmi_app_get_bt_capabilities(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
207 ipmi_request_t request, ipmi_response_t response,
vishwabmcba0bd5f2015-09-30 16:50:23 +0530208 ipmi_data_len_t data_len, ipmi_context_t context)
209{
210 printf("Handling Netfn:[0x%X], Cmd:[0x%X]\n",netfn,cmd);
211
212 // Status code.
213 ipmi_ret_t rc = IPMI_CC_OK;
214
Chris Austen6caf28b2015-10-13 12:40:40 -0500215 uint8_t str[] = {0x01, MAX_IPMI_BUFFER, MAX_IPMI_BUFFER, 0x0A, 0x01};
vishwabmcba0bd5f2015-09-30 16:50:23 +0530216
217 // Data length
218 *data_len = sizeof(str);
219
220 // Pack the actual response
221 memcpy(response, &str, *data_len);
222
223 return rc;
224}
225
Chris Austen6caf28b2015-10-13 12:40:40 -0500226
227struct set_wd_data_t {
228 uint8_t t_use;
229 uint8_t t_action;
230 uint8_t preset;
231 uint8_t flags;
232 uint8_t ls;
233 uint8_t ms;
234} __attribute__ ((packed));
235
236
237
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500238ipmi_ret_t ipmi_app_set_watchdog(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
239 ipmi_request_t request, ipmi_response_t response,
Chris Austen6caf28b2015-10-13 12:40:40 -0500240 ipmi_data_len_t data_len, ipmi_context_t context)
241{
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500242 const char *busname = "org.openbmc.watchdog.Host";
Chris Austen454acfe2015-10-29 23:03:34 -0500243 const char *objname = "/org/openbmc/watchdog/host0";
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500244 const char *iface = "org.openbmc.Watchdog";
vishwa1eaea4f2016-02-26 11:57:40 -0600245 sd_bus_message *reply = NULL;
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500246 sd_bus_error error = SD_BUS_ERROR_NULL;
247 int r = 0;
Chris Austen6caf28b2015-10-13 12:40:40 -0500248
249 set_wd_data_t *reqptr = (set_wd_data_t*) request;
250 uint16_t timer = 0;
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500251 uint32_t timer_ms = 0;
Chris Austen6caf28b2015-10-13 12:40:40 -0500252
253 *data_len = 0;
254
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500255 // Get number of 100ms intervals
Chris Austen6caf28b2015-10-13 12:40:40 -0500256 timer = (((uint16_t)reqptr->ms) << 8) + reqptr->ls;
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500257 // Get timer value in ms
258 timer_ms = timer * 100;
Chris Austen6caf28b2015-10-13 12:40:40 -0500259
260 printf("WATCHDOG SET Timer:[0x%X] 100ms intervals\n",timer);
261
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500262 // Set watchdog timer
vishwa1eaea4f2016-02-26 11:57:40 -0600263 r = sd_bus_call_method(bus, busname, objname, iface,
264 "set", &error, &reply, "i", timer_ms);
265 if(r < 0)
Adriana Kobylak0896be32015-10-22 13:27:23 -0500266 {
vishwa1eaea4f2016-02-26 11:57:40 -0600267 fprintf(stderr, "Failed to call the SET method: %s\n", strerror(-r));
268 goto finish;
Adriana Kobylak0896be32015-10-22 13:27:23 -0500269 }
270
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500271 sd_bus_error_free(&error);
vishwa1eaea4f2016-02-26 11:57:40 -0600272 reply = sd_bus_message_unref(reply);
Chris Austen6caf28b2015-10-13 12:40:40 -0500273
vishwa1eaea4f2016-02-26 11:57:40 -0600274 // Stop the current watchdog if any
275 r = sd_bus_call_method(bus, busname, objname, iface,
276 "stop", &error, &reply, NULL);
277 if(r < 0)
278 {
279 fprintf(stderr, "Failed to call the STOP method: %s\n", strerror(-r));
280 goto finish;
281 }
282
283 if (reqptr->t_use & 0x40)
284 {
285 sd_bus_error_free(&error);
286 reply = sd_bus_message_unref(reply);
287
288 // Start the watchdog if requested
289 r = sd_bus_call_method(bus, busname, objname, iface,
290 "start", &error, &reply, NULL);
291 if(r < 0)
292 {
293 fprintf(stderr, "Failed to call the START method: %s\n", strerror(-r));
294 }
295 }
296
297finish:
298 sd_bus_error_free(&error);
299 reply = sd_bus_message_unref(reply);
300
301 return (r < 0) ? -1 : IPMI_CC_OK;
Chris Austen6caf28b2015-10-13 12:40:40 -0500302}
303
304
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500305ipmi_ret_t ipmi_app_reset_watchdog(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
306 ipmi_request_t request, ipmi_response_t response,
Chris Austen6caf28b2015-10-13 12:40:40 -0500307 ipmi_data_len_t data_len, ipmi_context_t context)
308{
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500309 const char *busname = "org.openbmc.watchdog.Host";
Chris Austen454acfe2015-10-29 23:03:34 -0500310 const char *objname = "/org/openbmc/watchdog/host0";
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500311 const char *iface = "org.openbmc.Watchdog";
vishwa1eaea4f2016-02-26 11:57:40 -0600312 sd_bus_message *reply = NULL;
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500313 sd_bus_error error = SD_BUS_ERROR_NULL;
314 int r = 0;
315
Chris Austen6caf28b2015-10-13 12:40:40 -0500316 // Status code.
317 ipmi_ret_t rc = IPMI_CC_OK;
318 *data_len = 0;
319
320 printf("WATCHDOG RESET\n");
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500321
322 // Refresh watchdog
vishwa1eaea4f2016-02-26 11:57:40 -0600323 r = sd_bus_call_method(bus, busname, objname, iface,
324 "poke", &error, &reply, NULL);
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500325 if (r < 0) {
vishwa1eaea4f2016-02-26 11:57:40 -0600326 fprintf(stderr, "Failed to add reset watchdog: %s\n", strerror(-r));
327 rc = -1;
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500328 }
329
330 sd_bus_error_free(&error);
vishwa1eaea4f2016-02-26 11:57:40 -0600331 reply = sd_bus_message_unref(reply);
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500332
Chris Austen6caf28b2015-10-13 12:40:40 -0500333 return rc;
334}
335
Chris Austenc2cd29d2016-02-05 20:02:29 -0600336// ATTENTION: This ipmi function is very hardcoded on purpose
337// OpenBMC does not fully support IPMI. This command is useful
338// to have around because it enables testing of interfaces with
339// the IPMI tool.
340#define GET_CHANNEL_INFO_CHANNEL_OFFSET 0
341// IPMI Table 6-2
342#define IPMI_CHANNEL_TYPE_IPMB 1
343// IPMI Table 6-3
344#define IPMI_CHANNEL_MEDIUM_TYPE_OTHER 6
345
346ipmi_ret_t ipmi_app_channel_info(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
347 ipmi_request_t request, ipmi_response_t response,
348 ipmi_data_len_t data_len, ipmi_context_t context)
349{
350 ipmi_ret_t rc = IPMI_CC_OK;
351 uint8_t resp[] = {
352 1,
353 IPMI_CHANNEL_MEDIUM_TYPE_OTHER,
354 IPMI_CHANNEL_TYPE_IPMB,
355 1,0x41,0xA7,0x00,0,0};
356 uint8_t *p = (uint8_t*) request;
357
358 printf("IPMI APP GET CHANNEL INFO\n");
359
360 // I"m only supporting channel 1. 0xE is the 'default channel'
tomjose13fb4412016-03-08 14:02:34 -0600361 if (*p == 0xe || *p == 1 || *p == 8) {
Chris Austenc2cd29d2016-02-05 20:02:29 -0600362
363 *data_len = sizeof(resp);
364 memcpy(response, resp, *data_len);
365
366 } else {
367 rc = IPMI_CC_PARM_OUT_OF_RANGE;
368 *data_len = 0;
369 }
370
371 return rc;
372}
373
Adriana Kobylakdfc8d772015-10-20 09:34:48 -0500374ipmi_ret_t ipmi_app_set_bmc_global_enables(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
375 ipmi_request_t request, ipmi_response_t response,
376 ipmi_data_len_t data_len, ipmi_context_t context)
377{
378 ipmi_ret_t rc = IPMI_CC_OK;
379 *data_len = 0;
Chris Austen6caf28b2015-10-13 12:40:40 -0500380
Adriana Kobylakdfc8d772015-10-20 09:34:48 -0500381 // Event and message logging enabled by default so return for now
382 printf("IPMI APP SET BMC GLOBAL ENABLES Ignoring for now\n");
383
384 return rc;
385}
Chris Austen6caf28b2015-10-13 12:40:40 -0500386
387
388
Adriana Kobylak3a552e12015-10-19 16:11:00 -0500389ipmi_ret_t ipmi_app_wildcard_handler(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
390 ipmi_request_t request, ipmi_response_t response,
vishwabmcba0bd5f2015-09-30 16:50:23 +0530391 ipmi_data_len_t data_len, ipmi_context_t context)
392{
393 printf("Handling WILDCARD Netfn:[0x%X], Cmd:[0x%X]\n",netfn, cmd);
394
395 // Status code.
396 ipmi_ret_t rc = IPMI_CC_OK;
397
398 *data_len = strlen("THIS IS WILDCARD");
399
400 // Now pack actual response
401 memcpy(response, "THIS IS WILDCARD", *data_len);
402
403 return rc;
404}
405
Chris Austen6caf28b2015-10-13 12:40:40 -0500406void register_netfn_app_functions()
vishwabmcba0bd5f2015-09-30 16:50:23 +0530407{
408 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_CAP_BIT);
Chris Austen6caf28b2015-10-13 12:40:40 -0500409 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_CAP_BIT, NULL, ipmi_app_get_bt_capabilities);
410
411 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_WILDCARD);
412 ipmi_register_callback(NETFUN_APP, IPMI_CMD_WILDCARD, NULL, ipmi_app_wildcard_handler);
413
414 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_RESET_WD);
415 ipmi_register_callback(NETFUN_APP, IPMI_CMD_RESET_WD, NULL, ipmi_app_reset_watchdog);
416
417 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_SET_WD);
418 ipmi_register_callback(NETFUN_APP, IPMI_CMD_SET_WD, NULL, ipmi_app_set_watchdog);
419
420 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_DEVICE_ID);
421 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_DEVICE_ID, NULL, ipmi_app_get_device_id);
422
Adriana Kobylakd100ee52015-10-20 17:02:37 -0500423 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_DEVICE_GUID);
424 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_DEVICE_GUID, NULL, ipmi_app_get_device_guid);
425
Chris Austen6caf28b2015-10-13 12:40:40 -0500426 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_SET_ACPI);
427 ipmi_register_callback(NETFUN_APP, IPMI_CMD_SET_ACPI, NULL, ipmi_app_set_acpi_power_state);
428
429 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_READ_EVENT);
430 ipmi_register_callback(NETFUN_APP, IPMI_CMD_READ_EVENT, NULL, ipmi_app_read_event);
Adriana Kobylakdfc8d772015-10-20 09:34:48 -0500431
432 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP,
433 IPMI_CMD_SET_BMC_GLOBAL_ENABLES);
434 ipmi_register_callback(NETFUN_APP, IPMI_CMD_SET_BMC_GLOBAL_ENABLES, NULL,
435 ipmi_app_set_bmc_global_enables);
436
vishwa36993272015-11-20 12:43:49 -0600437 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_MSG_FLAGS);
438 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_MSG_FLAGS, NULL, ipmi_app_get_msg_flags);
439
Chris Austenc2cd29d2016-02-05 20:02:29 -0600440
441 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_APP, IPMI_CMD_GET_CHAN_INFO);
442 ipmi_register_callback(NETFUN_APP, IPMI_CMD_GET_CHAN_INFO, NULL, ipmi_app_channel_info);
443
444
445
vishwabmcba0bd5f2015-09-30 16:50:23 +0530446 return;
447}
448
Chris Austen6caf28b2015-10-13 12:40:40 -0500449