summaryrefslogtreecommitdiff
path: root/include/ipmitool/ipmi_lanp.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-09-10 15:44:41 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-09-10 15:44:41 +0200
commita9ee361f27e0439530387765924574e5358c8a5c (patch)
tree3104aecc4d574f7d7bbb269223814586277b1797 /include/ipmitool/ipmi_lanp.h
parent82ac6c87ce0b0af2fb8de25d70442fec406bb742 (diff)
New upstream version 1.8.19upstream/1.8.19upstream
Diffstat (limited to 'include/ipmitool/ipmi_lanp.h')
-rw-r--r--include/ipmitool/ipmi_lanp.h55
1 files changed, 8 insertions, 47 deletions
diff --git a/include/ipmitool/ipmi_lanp.h b/include/ipmitool/ipmi_lanp.h
index 0ef2d96..e312b25 100644
--- a/include/ipmitool/ipmi_lanp.h
+++ b/include/ipmitool/ipmi_lanp.h
@@ -30,8 +30,7 @@
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
-#ifndef IPMI_LANP_H
-#define IPMI_LANP_H
+#pragma once
#include <ipmitool/ipmi.h>
@@ -50,6 +49,13 @@
#define IPMI_LANP_WRITE_LOCK 1
#define IPMI_LANP_WRITE_COMMIT 2
+#define IPMI_LANP_VLAN_ID_MAX 4094
+#define IPMI_LANP_VLAN_ID_MIN 1
+#define IPMI_LANP_VLAN_DISABLE 0 /* ID 0 = VLAN is disabled for the channel */
+
+#define IPMI_LANP_IS_VLAN_VALID(x) \
+ ((x) >= IPMI_LANP_VLAN_ID_MIN && (x) <= IPMI_LANP_VLAN_ID_MAX)
+
enum {
IPMI_LANP_SET_IN_PROGRESS,
IPMI_LANP_AUTH_TYPE,
@@ -118,51 +124,6 @@ enum {
IPMI_LANP_CHAN_ACCESS_MODE=201,
};
-static struct lan_param {
- int cmd;
- int size;
- char desc[24];
- uint8_t * data;
- int data_len;
-} ipmi_lan_params[] __attribute__((unused)) = {
- { IPMI_LANP_SET_IN_PROGRESS, 1, "Set in Progress", NULL, 0 },
- { IPMI_LANP_AUTH_TYPE, 1, "Auth Type Support", NULL, 0 },
- { IPMI_LANP_AUTH_TYPE_ENABLE, 5, "Auth Type Enable", NULL, 0 },
- { IPMI_LANP_IP_ADDR, 4, "IP Address", NULL, 0 },
- { IPMI_LANP_IP_ADDR_SRC, 1, "IP Address Source", NULL, 0 },
- { IPMI_LANP_MAC_ADDR, 6, "MAC Address", NULL, 0 }, /* 5 */
- { IPMI_LANP_SUBNET_MASK, 4, "Subnet Mask", NULL, 0 },
- { IPMI_LANP_IP_HEADER, 3, "IP Header", NULL, 0 },
- { IPMI_LANP_PRI_RMCP_PORT, 2, "Primary RMCP Port", NULL, 0 },
- { IPMI_LANP_SEC_RMCP_PORT, 2, "Secondary RMCP Port", NULL, 0 },
- { IPMI_LANP_BMC_ARP, 1, "BMC ARP Control", NULL, 0}, /* 10 */
- { IPMI_LANP_GRAT_ARP, 1, "Gratituous ARP Intrvl", NULL, 0 },
- { IPMI_LANP_DEF_GATEWAY_IP, 4, "Default Gateway IP", NULL, 0 },
- { IPMI_LANP_DEF_GATEWAY_MAC, 6, "Default Gateway MAC", NULL, 0 },
- { IPMI_LANP_BAK_GATEWAY_IP, 4, "Backup Gateway IP", NULL, 0 },
- { IPMI_LANP_BAK_GATEWAY_MAC, 6, "Backup Gateway MAC", NULL, 0 }, /* 15 */
- { IPMI_LANP_SNMP_STRING, 18, "SNMP Community String", NULL, 0 },
- { IPMI_LANP_NUM_DEST, 1, "Number of Destinations", NULL, 0 },
- { IPMI_LANP_DEST_TYPE, 4, "Destination Type", NULL, 0 },
- { IPMI_LANP_DEST_ADDR, 13, "Destination Addresses", NULL, 0 },
- { IPMI_LANP_VLAN_ID, 2, "802.1q VLAN ID", NULL, 0 }, /* 20 */
- { IPMI_LANP_VLAN_PRIORITY, 1, "802.1q VLAN Priority", NULL, 0 },
- { IPMI_LANP_RMCP_CIPHER_SUPPORT,1, "RMCP+ Cipher Suite Count", NULL, 0 },
- { IPMI_LANP_RMCP_CIPHERS, 16, "RMCP+ Cipher Suites", NULL, 0 },
- { IPMI_LANP_RMCP_PRIV_LEVELS, 9, "Cipher Suite Priv Max", NULL, 0 },
- { IPMI_LANP_BAD_PASS_THRESH, 6, "Bad Password Threshold", NULL, 0 },
- { IPMI_LANP_OEM_ALERT_STRING, 28, "OEM Alert String", NULL, 0 }, /* 25 */
- { IPMI_LANP_ALERT_RETRY, 1, "Alert Retry Algorithm", NULL, 0 },
- { IPMI_LANP_UTC_OFFSET, 3, "UTC Offset", NULL, 0 },
- { IPMI_LANP_DHCP_SERVER_IP, 4, "DHCP Server IP", NULL, 0 },
- { IPMI_LANP_DHCP_SERVER_MAC, 6, "DHDP Server MAC", NULL, 0},
- { IPMI_LANP_DHCP_ENABLE, 1, "DHCP Enable", NULL, 0 }, /* 30 */
- { IPMI_LANP_CHAN_ACCESS_MODE, 2, "Channel Access Mode", NULL, 0 },
- { -1, -1, "", NULL, -1 }
-};
-
int ipmi_lanp_main(struct ipmi_intf *, int, char **);
uint8_t find_lan_channel(struct ipmi_intf *intf, uint8_t start);
-
-#endif /*IPMI_LANP_H*/