/usr/include/freeipmi/cmds/ipmi-lan-cmds.h is in libfreeipmi-dev 0.8.12-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | /*
Copyright (C) 2003-2010 FreeIPMI Core Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _IPMI_LAN_CMDS_H
#define _IPMI_LAN_CMDS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <freeipmi/fiid/fiid.h>
#define IPMI_AUTHENTICATION_TYPE_SUPPORTED 0x1
#define IPMI_AUTHENTICATION_TYPE_UNSUPPORTED 0x0
#define IPMI_AUTHENTICATION_TYPE_ENABLE 0x1
#define IPMI_AUTHENTICATION_TYPE_DISABLE 0x0
#define IPMI_AUTHENTICATION_TYPE_ENABLE_VALID(__val) \
(((__val) == IPMI_AUTHENTICATION_TYPE_ENABLE \
|| (__val) == IPMI_AUTHENTICATION_TYPE_DISABLE) ? 1 : 0)
#define IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED 0x0
#define IPMI_IP_ADDRESS_SOURCE_STATIC 0x1
#define IPMI_IP_ADDRESS_SOURCE_DHCP 0x2
#define IPMI_IP_ADDRESS_SOURCE_BIOS 0x3
#define IPMI_IP_ADDRESS_SOURCE_OTHER 0x4
#define IPMI_IP_ADDRESS_SOURCE_VALID(__val) \
(((__val) == IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED \
|| (__val) == IPMI_IP_ADDRESS_SOURCE_STATIC \
|| (__val) == IPMI_IP_ADDRESS_SOURCE_DHCP \
|| (__val) == IPMI_IP_ADDRESS_SOURCE_BIOS \
|| (__val) == IPMI_IP_ADDRESS_SOURCE_OTHER) ? 1 : 0)
#define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_ENABLE 0x1
#define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_DISABLE 0x0
#define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_VALID(__val) \
(((__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARPS_ENABLE \
|| (__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARPS_DISABLE) ? 1 : 0)
#define IPMI_BMC_GENERATED_ARP_RESPONSES_ENABLE 0x1
#define IPMI_BMC_GENERATED_ARP_RESPONSES_DISABLE 0x0
#define IPMI_BMC_GENERATED_ARP_RESPONSES_VALID(__val) \
(((__val) == IPMI_BMC_GENERATED_ARP_RESPONSES_ENABLE \
|| (__val) == IPMI_BMC_GENERATED_ARP_RESPONSES_DISABLE) ? 1 : 0)
#define IPMI_MAX_COMMUNITY_STRING_LENGTH 18
#define IPMI_DESTINATION_SELECTOR_MIN 0
#define IPMI_DESTINATION_SELECTOR_MAX 15
/* To avoid gcc warnings, add +1 in comparison */
#define IPMI_DESTINATION_SELECTOR_VALID(__val) \
(((__val + 1) >= (IPMI_DESTINATION_SELECTOR_MIN + 1) \
|| (__val) <= IPMI_DESTINATION_SELECTOR_MAX) ? 1 : 0)
#define IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION 0x0
#define IPMI_DESTINATION_TYPE_OEM1 0x6
#define IPMI_DESTINATION_TYPE_OEM2 0x7
#define IPMI_DESTINATION_TYPE_VALID(__val) \
(((__val) == IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION \
|| (__val) == IPMI_DESTINATION_TYPE_OEM1 \
|| (__val) == IPMI_DESTINATION_TYPE_OEM2) ? 1 : 0)
#define IPMI_ALERT_UNACKNOWLEDGED 0
#define IPMI_ALERT_ACKNOWLEDGED 1
#define IPMI_ALERT_VALID(__val) \
(((__val) == IPMI_ALERT_UNACKNOWLEDGED \
|| (__val) == IPMI_ALERT_ACKNOWLEDGED) ? 1 : 0)
#define IPMI_ADDRESS_FORMAT_IPV4 0
#define IPMI_GATEWAY_SELECTOR_DEFAULT 0
#define IPMI_GATEWAY_SELECTOR_BACKUP 1
#define IPMI_GATEWAY_SELECTOR_VALID(__val) \
(((__val) == IPMI_GATEWAY_SELECTOR_DEFAULT \
|| (__val) == IPMI_GATEWAY_SELECTOR_BACKUP) ? 1 : 0)
/* 3 bit number */
#define IPMI_ALERT_RETRIES_MAX 7
#define IPMI_VLAN_ID_ENABLE 0x1
#define IPMI_VLAN_ID_DISABLE 0x0
#define IPMI_VLAN_ID_ENABLE_VALID(__val) \
(((__val) == IPMI_VLAN_ID_ENABLE \
|| (__val) == IPMI_VLAN_ID_DISABLE) ? 1 : 0)
#define IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND 0x0
#define IPMI_BMC_GENERATED_GRATUITOUS_ARP_SUSPEND 0x1
#define IPMI_BMC_GENERATED_GRATUITOUS_ARP_VALID(__val) \
(((__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND \
|| (__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARP_SUSPEND) ? 1 : 0)
#define IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND 0x0
#define IPMI_BMC_GENERATED_ARP_RESPONSE_SUSPEND 0x1
#define IPMI_BMC_GENERATED_ARP_RESPONSE_VALID(__val) \
(((__val) == IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND \
|| (__val) == IPMI_BMC_GENERATED_ARP_RESPONSE_SUSPEND) ? 1 : 0)
#define IPMI_USER_DISABLED_EVENT_MESSAGE_ON 0x1
#define IPMI_USER_DISABLED_EVENT_MESSAGE_OFF 0x0
#define IPMI_USER_DISABLED_EVENT_MESSAGE_VALID(__val) \
(((__val) == IPMI_USER_DISABLED_EVENT_MESSAGE_ON \
|| (__val) == IPMI_USER_DISABLED_EVENT_MESSAGE_OFF) ? 1 : 0)
#define IPMI_GET_LAN_PARAMETER 0x0
#define IPMI_GET_LAN_PARAMETER_REVISION_ONLY 0x1
#define IPMI_GET_LAN_PARAMETER_VALID(__val) \
(((__val) == IPMI_GET_LAN_PARAMETER \
|| (__val) == IPMI_GET_LAN_PARAMETER_REVISION_ONLY) ? 1 : 0)
#define IPMI_CLEAR_ALL_STATISTICS 0x1
#define IPMI_DONT_CLEAR_ALL_STATISTICS 0x0
#define IPMI_CLEAR_ALL_STATISTICS_VALID(__val) \
(((__val) == IPMI_CLEAR_ALL_STATISTICS \
|| (__val) == IPMI_DONT_CLEAR_ALL_STATISTICS) ? 1 : 0)
/*
* fill* functions return 0 on success, -1 on error.
*
* obj_cmd_rq must be for the fill function's respective fiid
* template request.
*
* see freeipmi/templates/ for template definitions
*/
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rs;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_authentication_type_enables_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_source_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_mac_address_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_subnet_mask_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bmc_generated_arp_control_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_gratuitous_arp_interval_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_address_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_mac_address_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_address_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_mac_address_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_community_string_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_type_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_id_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_priority_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rq;
extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bad_password_threshold_rq;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rq;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_support_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_enables_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_source_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_mac_address_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_subnet_mask_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bmc_generated_arp_control_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_gratuitous_arp_interval_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_address_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_mac_address_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_address_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_mac_address_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_community_string_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_type_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_id_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_priority_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rs;
extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bad_password_threshold_rs;
extern fiid_template_t tmpl_cmd_suspend_bmc_arps_rq;
extern fiid_template_t tmpl_cmd_suspend_bmc_arps_rs;
extern fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rq;
extern fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rs;
int fill_cmd_set_lan_configuration_parameters (uint8_t channel_number,
uint8_t parameter_selector,
const void *configuration_parameter_data,
unsigned int configuration_parameter_data_len,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_authentication_type_enables (uint8_t channel_number,
uint8_t callback_level_none,
uint8_t callback_level_md2,
uint8_t callback_level_md5,
uint8_t callback_level_straight_password,
uint8_t callback_level_oem_proprietary,
uint8_t user_level_none,
uint8_t user_level_md2,
uint8_t user_level_md5,
uint8_t user_level_straight_password,
uint8_t user_level_oem_proprietary,
uint8_t operator_level_none,
uint8_t operator_level_md2,
uint8_t operator_level_md5,
uint8_t operator_level_straight_password,
uint8_t operator_level_oem_proprietary,
uint8_t admin_level_none,
uint8_t admin_level_md2,
uint8_t admin_level_md5,
uint8_t admin_level_straight_password,
uint8_t admin_level_oem_proprietary,
uint8_t oem_level_none,
uint8_t oem_level_md2,
uint8_t oem_level_md5,
uint8_t oem_level_straight_password,
uint8_t oem_level_oem_proprietary,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_ip_address (uint8_t channel_number,
uint32_t ip_address,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_ip_address_source (uint8_t channel_number,
uint8_t ip_address_source,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_mac_address (uint8_t channel_number,
uint64_t mac_address,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_subnet_mask (uint8_t channel_number,
uint32_t subnet_mask,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (uint8_t channel_number,
uint8_t bmc_generated_gratuitous_arps,
uint8_t bmc_generated_arp_responses,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (uint8_t channel_number,
uint8_t gratuitous_arp_interval,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_default_gateway_address (uint8_t channel_number,
uint32_t ip_address,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_default_gateway_mac_address (uint8_t channel_number,
uint64_t mac_address,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_backup_gateway_address (uint8_t channel_number,
uint32_t ip_address,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (uint8_t channel_number,
uint64_t mac_address,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_community_string (uint8_t channel_number,
const char *community_string,
unsigned int community_string_len,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_destination_type (uint8_t channel_number,
uint8_t destination_selector,
uint8_t destination_type,
uint8_t alert_acknowledge,
uint8_t alert_acknowledge_timeout,
uint8_t retries,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_destination_addresses (uint8_t channel_number,
uint8_t destination_selector,
uint8_t gateway_selector,
uint32_t alerting_ip_address,
uint64_t alerting_mac_address,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_vlan_id (uint8_t channel_number,
uint16_t vlan_id,
uint8_t vlan_id_enable,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_vlan_priority (uint8_t channel_number,
uint8_t vlan_priority,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (uint8_t channel_number,
uint8_t maximum_privilege_for_cipher_suite_1,
uint8_t maximum_privilege_for_cipher_suite_2,
uint8_t maximum_privilege_for_cipher_suite_3,
uint8_t maximum_privilege_for_cipher_suite_4,
uint8_t maximum_privilege_for_cipher_suite_5,
uint8_t maximum_privilege_for_cipher_suite_6,
uint8_t maximum_privilege_for_cipher_suite_7,
uint8_t maximum_privilege_for_cipher_suite_8,
uint8_t maximum_privilege_for_cipher_suite_9,
uint8_t maximum_privilege_for_cipher_suite_10,
uint8_t maximum_privilege_for_cipher_suite_11,
uint8_t maximum_privilege_for_cipher_suite_12,
uint8_t maximum_privilege_for_cipher_suite_13,
uint8_t maximum_privilege_for_cipher_suite_14,
uint8_t maximum_privilege_for_cipher_suite_15,
uint8_t maximum_privilege_for_cipher_suite_16,
fiid_obj_t obj_cmd_rq);
int fill_cmd_set_lan_configuration_parameters_bad_password_threshold (uint8_t channel_number,
uint8_t user_disabled_event_message,
uint8_t bad_password_threshold_number,
uint16_t attempt_count_reset_interval,
uint16_t user_lockout_interval,
fiid_obj_t obj_cmd_rq);
int fill_cmd_get_lan_configuration_parameters (uint8_t channel_number,
uint8_t get_parameter,
uint8_t parameter_selector,
uint8_t set_selector,
uint8_t block_selector,
fiid_obj_t obj_cmd_rq);
int fill_cmd_suspend_bmc_arps (uint8_t channel_number,
uint8_t gratuitous_arp_suspend,
uint8_t arp_response_suspend,
fiid_obj_t obj_cmd_rq);
int fill_cmd_get_ip_udp_rmcp_statistics (uint8_t channel_number,
uint8_t clear_all_statistics,
fiid_obj_t obj_cmd_rq);
#ifdef __cplusplus
}
#endif
#endif
|