Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_system.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_system.h
28 *
29 * @purpose System Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @create 28/01/2013
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_SYSTEM_H_INCLUDED
39 #define OPENAPI_SYSTEM_H_INCLUDED
40 #define OPENAPI_HW_VERSION_STR_SIZE 128
41 #define OPENAPI_OS_REVISION_STR_SIZE 100
42 
43 #include "openapi_common.h"
44 
46 typedef enum
47 {
53 
54 #define OPEN_MANUFACTURER_SIZE 6 + 1
55 #define OPEN_OS_VERSION_SIZE 60
56 #define OPEN_SYSTEM_PARAM_SIZE 256
57 
58 /*****************************************************************/
78  open_buffdesc *systemPrompt);
79 
80 /*****************************************************************/
95  uint32_t *promptSize);
96 
97 /*****************************************************************/
119  open_buffdesc *sysHostName);
120 
121 /*****************************************************************/
138  open_buffdesc *sysHostName);
139 
140 /*****************************************************************/
155  uint32_t *hostNameSize);
156 
157 /*****************************************************************/
173  uint32_t *unit);
174 
175 /*****************************************************************/
192  open_buffdesc *systemName);
193 
194 /*****************************************************************/
209  uint32_t *systemNameSize);
210 
211 /*****************************************************************/
234  OPEN_ACCESS_LINE_t accessLine,
235  uint32_t termLength);
236 
237 /*****************************************************************/
255  OPEN_ACCESS_LINE_t accessLine);
256 
257 /*****************************************************************/
276  OPEN_ACCESS_LINE_t accessLine,
277  uint32_t *termLength);
278 
279 /*****************************************************************/
295  uint32_t serialTimeout);
296 
297 /*****************************************************************/
312 
313 /*****************************************************************/
328  uint32_t *serialTimeout);
329 
330 /*****************************************************************/
345  uint32_t *mgmtVlan);
346 
347 /*****************************************************************/
368  uint32_t mgmtVlan);
369 
370 /*****************************************************************/
385  OPEN_LINK_STATE_t *linkState);
386 
387 /*****************************************************************/
413  open_inet_addr_t *ipAddr,
414  open_inet_addr_t *netMask,
415  open_inet_addr_t *gateway);
416 
417 /*****************************************************************/
435 
436 /*****************************************************************/
453  open_inet_addr_t *ipAddr,
454  open_inet_addr_t *netMask);
455 
456 /*****************************************************************/
472  open_inet_addr_t *gateway);
473 
474 /*****************************************************************/
492  OPEN_CONTROL_t adminMode);
493 
494 /*****************************************************************/
512  OPEN_CONTROL_t *adminMode);
513 
514 /*****************************************************************/
532  OPEN_CONTROL_t autoConfigMode);
533 
534 /*****************************************************************/
551  OPEN_CONTROL_t *autoConfigMode);
552 
553 /*****************************************************************/
571  OPEN_PROTOCOL_MODE_t protoMode);
572 
573 /*****************************************************************/
589  OPEN_PROTOCOL_MODE_t *protoMode);
590 
591 /*****************************************************************/
613  open_inet_pfx_t *ipv6Addr);
614 
615 /*****************************************************************/
636  open_inet_addr_t *gateway);
637 
638 /*****************************************************************/
658  open_inet_pfx_t *ipv6Addr);
659 
660 /*****************************************************************/
677  open_inet_addr_t *gateway);
678 
679 /*****************************************************************/
701  open_inet_pfx_t *ipv6Addr);
702 
703 /*****************************************************************/
727  open_inet_addr_t *ipAddr,
728  open_inet_addr_t *netMask,
729  open_inet_addr_t *gateway);
730 
731 /*****************************************************************/
749 
750 /*****************************************************************/
767  open_inet_addr_t *ipAddr,
768  open_inet_addr_t *netMask);
769 
770 /*****************************************************************/
785  open_inet_addr_t *netMask);
786 
787 /*****************************************************************/
803  open_inet_addr_t *gateway);
804 
805 /*****************************************************************/
823  OPEN_CONTROL_t adminMode);
824 
825 /*****************************************************************/
843  OPEN_CONTROL_t *adminMode);
844 
845 /*****************************************************************/
863  OPEN_CONTROL_t autoConfigMode);
864 
865 /*****************************************************************/
882  OPEN_CONTROL_t *autoConfigMode);
883 
884 /*****************************************************************/
902  OPEN_PROTOCOL_MODE_t protoMode);
903 
904 /*****************************************************************/
920  OPEN_PROTOCOL_MODE_t *protoMode);
921 
922 /*****************************************************************/
945  open_inet_pfx_t *ipv6Addr);
946 
947 /*****************************************************************/
968  open_inet_addr_t *gateway);
969 
970 /*****************************************************************/
993  open_inet_pfx_t *ipv6Addr);
994 
995 /*****************************************************************/
1015  open_inet_pfx_t *ipv6Addr);
1016 
1017 /*****************************************************************/
1034  open_inet_addr_t *gateway);
1035 
1036 /*****************************************************************/
1056  OPEN_PROTOCOL_MODE_t protoMode);
1057 
1058 /*****************************************************************/
1075  OPEN_PROTOCOL_MODE_t *protoMode);
1076 
1077 /*****************************************************************/
1098  OPEN_PROTOCOL_MODE_t protoMode);
1099 
1100 /*****************************************************************/
1117  OPEN_PROTOCOL_MODE_t *protoMode);
1118 
1119 /*****************************************************************/
1136  OPEN_CONTROL_t telnetServerMode);
1137 
1138 /*****************************************************************/
1155  OPEN_CONTROL_t *telnetServerMode);
1156 
1157 /*****************************************************************/
1171  uint32_t bytes);
1172 
1173 /*****************************************************************/
1191  uint32_t *sysUpTimeSec);
1192 
1193 /*****************************************************************/
1207  uint32_t *sysUpTimeMsec);
1208 
1209 /*****************************************************************/
1222  OPEN_BOOL_t *warmRestartStatus);
1223 
1224 /*****************************************************************/
1240  open_buffdesc *macAddress);
1241 
1242 /*****************************************************************/
1259  open_buffdesc *mac_address );
1260 
1261 /*****************************************************************/
1280  uint32_t *memTotal,
1281  uint32_t *memAlloc,
1282  uint32_t *memFree);
1283 
1284 /*****************************************************************/
1297 
1298 /*****************************************************************/
1315 
1316 /*****************************************************************/
1329 
1330 /*****************************************************************/
1348  uint32_t unit,
1349  open_buffdesc *manufacturer);
1350 
1351 /*****************************************************************/
1366  uint32_t *timeZoneOffsetMin);
1367 
1368 /*****************************************************************/
1385  open_buffdesc *operSys);
1386 
1387 /*****************************************************************/
1405  uint32_t *arpIndex,
1406  uint32_t *intf,
1407  open_inet_addr_t *ipAddr,
1408  open_buffdesc *mac_addr);
1409 
1410 /*****************************************************************/
1426 
1427 /*****************************************************************/
1444  open_buffdesc *maintenanceLevel);
1445 
1446 /*****************************************************************/
1464  OPEN_CONTROL_t trackingControl);
1465 
1466 /*****************************************************************/
1483  open_buffdesc *featureName,
1484  OPEN_BOOL_t *enabled);
1485 #endif
1486 
open_error_t openapiSystemUpTimeMsecGet(openapiClientHandle_t *client_handle, uint32_t *sysUpTimeMsec)
Get the stack up time in milliseconds.
open_error_t openapiNetworkPortIPv4ProtocolModeGet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
Get the network port IPv4 protocol mode.
Protocol mode BOOTP.
open_error_t openapiServicePortIPv4ParametersSet(openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask, open_inet_addr_t *gateway)
Set the service port IPv4 parameters.
OPEN_PROTOCOL_MODE_t
OpEN uses this enumeration to define network connectivity protocol modes.
open_error_t openapiResetConfigurationSet(openapiClientHandle_t *client_handle)
Clear the switch configuration to factory defaults.
open_error_t openapiLineTerminalLengthGet(openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, uint32_t *termLength)
Get the terminal length of an access line.
open_error_t openapiSystemMacAddrGet(openapiClientHandle_t *client_handle, open_buffdesc *macAddress)
Get System MAC Address.
open_error_t openapiTransferBytesCompletedSet(openapiClientHandle_t *client_handle, uint32_t bytes)
Set the transferred bytes.
open_error_t openapiTelnetServerAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t telnetServerMode)
Set the telnet server admin mode.
open_error_t openapiSerialTimeoutDefaultSet(openapiClientHandle_t *client_handle)
Set the serial timeout to default value.
open_error_t openapiNetworkPortIPv6GatewayGet(openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
Get the network port IPv6 gateway address.
open_error_t openapiSystemLocalUnitGet(openapiClientHandle_t *client_handle, uint32_t *unit)
Get the current unit's ID.
open_error_t openapiServicePortIPv6GatewaySet(openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
Set the service port IPv6 gateway.
open_error_t openapiSystemHostnameGet(openapiClientHandle_t *client_handle, open_buffdesc *sysHostName)
Get the system hostname.
open_error_t openapiSystemNameGet(openapiClientHandle_t *client_handle, open_buffdesc *systemName)
Get the administratively-assigned system name.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiSystemMemoryInfoGet(openapiClientHandle_t *client_handle, uint32_t *memTotal, uint32_t *memAlloc, uint32_t *memFree)
Get current system memory allocation information.
open_error_t openapiOperSysGet(openapiClientHandle_t *client_handle, open_buffdesc *operSys)
Get the operating system.
open_error_t openapiServicePortIPv6AdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get IPv6 administrative mode of service port.
open_error_t openapiSerialTimeoutSet(openapiClientHandle_t *client_handle, uint32_t serialTimeout)
Set the serial timeout.
open_error_t openapiNetworkPortIPv4ProtocolModeSet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
Set the network port IPv4 protocol mode.
open_error_t openapiNetworkPortIPv6PrefixSet(openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
Set the network IPv6 prefix and prefix length.
open_error_t openapiUidGet(openapiClientHandle_t *client_handle, open_buffdesc *uid)
Get UID of the System Uid of the system is Datapath ID of the ofdb.
open_error_t openapiServicePortIPv6AutoConfigModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *autoConfigMode)
Get IPv6 auto-config mode of service port.
open_error_t openapiNetworkPortIPv6AdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get IPv6 administrative mode of network port.
open_error_t openapiSystemPromptSet(openapiClientHandle_t *client_handle, open_buffdesc *systemPrompt)
Set the system prompt.
open_error_t openapiNetworkPortIPv4AddrGet(openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask)
Get the network port IPv4 address and subnet mask.
open_error_t openapiSystemReload(openapiClientHandle_t *client_handle)
Resets the switch.
open_error_t openapiNetworkPortIPv6PrefixDelete(openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
Delete IPv6 prefix(es) on network port.
open_error_t openapiServicePortIPv6AutoConfigModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t autoConfigMode)
Set IPv6 auto-config mode on service port.
open_error_t openapiNetworkPortGatewayIPv4AddrGet(openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
Get the network port gateway IPv4 address.
open_error_t openapiNetworkPortIPv6AutoConfigModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *autoConfigMode)
Get IPv6 auto-config mode on network port.
open_error_t openapiSystemHostnameSizeGet(openapiClientHandle_t *client_handle, uint32_t *hostNameSize)
Get the maximum size of system hostname.
open_error_t openapiServicePortIPv6GatewayGet(openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
Get the service port IPv6 gateway address.
open_error_t openapiServicePortIPv6ProtocolModeSet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
Set IPv6 protocol mode on service port.
open_error_t openapiServicePortIPv6AdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Set IPv6 administrative mode of service port.
Protocol mode DHCP.
open_error_t openapiServicePortIPv4ProtocolModeSet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
Set the service port IPv4 protocol mode.
open_error_t openapiNetworkPortIPv6AutoConfigModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t autoConfigMode)
Set IPv6 auto-config mode on Network port.
open_error_t openapiTelnetServerAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *telnetServerMode)
Get the telnet server admin mode.
open_error_t openapiServicePortGatewayIPv4AddrGet(openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
Get the service port gateway IPv4 address.
open_error_t openapiNetworkPortIPv6GatewaySet(openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
Set the network port IPv6 gateway.
open_error_t openapiLineTerminalLengthSet(openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, uint32_t termLength)
Set the terminal length of an access line.
open_error_t openapiNetworkPortIPv6ProtocolModeSet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
Set IPv6 protocol mode on network port.
open_error_t openapiServicePortIPv4AddrGet(openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask)
Get the service port IPv4 address and subnet mask.
open_error_t openapiNetworkPortIPv4ParametersSet(openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask, open_inet_addr_t *gateway)
Set the network parameters.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiSystemNameMaxSizeGet(openapiClientHandle_t *client_handle, uint32_t *systemNameSize)
Get the maximum size of the system name.
open_error_t openapiSystemUpTimeGet(openapiClientHandle_t *client_handle, uint32_t *sysUpTimeSec)
Get the stack up time in seconds.
open_error_t openapiTimeZoneOffsetGet(openapiClientHandle_t *client_handle, uint32_t *timeZoneOffsetMin)
Get the time zone minutes parameter.
open_error_t openapiSystemHostnameSet(openapiClientHandle_t *client_handle, open_buffdesc *sysHostName)
Set the system hostname.
open_error_t openapiServicePortIPv6AddressesNextGet(openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
Get next service port IPv6 address and prefix length.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiSaveConfigurationSet(openapiClientHandle_t *client_handle)
Saves the configuration to non-volatile storage.
OPEN_ACCESS_LINE_t
open_error_t openapiSystemBurnedInMacAddrGet(openapiClientHandle_t *client_handle, open_buffdesc *mac_address)
Gets System Burned in MAC Address.
open_error_t openapiServicePortIPv6PrefixSet(openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
Set the service port IPv6 parameters.
open_error_t openapiServicePortIPv4ProtocolModeGet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
Get the service port IPv4 protocol mode.
open_error_t openapiNetworkPortIPv6ProtocolModeGet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
Set IPv6 protocol mode on network port.
open_error_t openapiServicePortIPv6PrefixDelete(openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
Delete IPv6 parameters set on a service port.
open_error_t openapiNetworkPortLinkStateGet(openapiClientHandle_t *client_handle, OPEN_LINK_STATE_t *linkState)
Get network interface link state.
open_error_t openapiServicePortIPv4ParametersDelete(openapiClientHandle_t *client_handle)
Delete IPv4 service port parameters.
open_error_t openapiMaintenanceLevelGet(openapiClientHandle_t *client_handle, open_buffdesc *maintenanceLevel)
Get the maintenance level of the system.
open_error_t openapiClientResourceTrackingSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t trackingControl)
Sets resource tracking flag for an OpEN API client.
open_error_t openapiNetworkPortIPv6AddressesNextGet(openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
Get next network port configured IPv6 address and prefix length.
open_error_t openapiLineTerminalLengthDefaultSet(openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine)
Set the terminal length of an access line to default.
open_error_t openapiManufacturerGet(openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *manufacturer)
Get the manufacturer.
open_error_t openapiArpInfoNextGet(openapiClientHandle_t *client_handle, uint32_t *arpIndex, uint32_t *intf, open_inet_addr_t *ipAddr, open_buffdesc *mac_addr)
Get the next ARP info entry.
open_error_t openapiLicenseFeatureStatusGet(openapiClientHandle_t *client_handle, open_buffdesc *featureName, OPEN_BOOL_t *enabled)
Get license status for component.
open_error_t openapiNetworkPortIPv6AdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Set IPv6 administrative mode on network port.
open_error_t openapiServicePortMaskGet(openapiClientHandle_t *client_handle, open_inet_addr_t *netMask)
Get the service port subnet mask.
open_error_t openapiNetworkMgmtVlanGet(openapiClientHandle_t *client_handle, uint32_t *mgmtVlan)
Get the network management VLAN of the system.
OPEN_LINK_STATE_t
OPEN uses these enumerators to indicate the link status.
Protocol mode none.
open_error_t openapiNetworkPortIPv4ParametersDelete(openapiClientHandle_t *client_handle)
Delete network port IPv4 parameters.
open_error_t openapiSerialTimeoutGet(openapiClientHandle_t *client_handle, uint32_t *serialTimeout)
Get the serial timeout.
open_error_t openapiServicePortIPv6ProtocolModeGet(openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
Get IPv6 protocol mode of service port.
open_error_t openapiSystemPromptMaxSizeGet(openapiClientHandle_t *client_handle, uint32_t *promptSize)
Get the maximum size of system prompt.
open_error_t openapiWarmRestartStatusGet(openapiClientHandle_t *client_handle, OPEN_BOOL_t *warmRestartStatus)
Get warm restart status.
Invalid Protocol mode.
open_error_t openapiNetworkMgmtVlanSet(openapiClientHandle_t *client_handle, uint32_t mgmtVlan)
Set the network management VLAN on the system.