Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
Network Security
Collaboration diagram for Network Security:

Functions

MLPIRESULT mlpiSecurityGetNetworkServiceInformation (const MLPIHANDLE connection, MlpiNetworkServiceInfo *serviceInformation, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiSecurityGetNetworkServiceActivation (const MLPIHANDLE connection, const WCHAR16 *service, MlpiSecurityServiceState *state)
 
MLPIRESULT mlpiSecuritySetNetworkServiceActivation (const MLPIHANDLE connection, const WCHAR16 *service, const MlpiSecurityServiceState state)
 
MLPIRESULT mlpiSecurityGetNetworkServiceConfiguration (const MLPIHANDLE connection, const WCHAR16 *service, MlpiNetworkConfigurationValue *const config, const ULONG numElements, ULONG *const numElementsRet)
 
MLPIRESULT mlpiSecuritySetNetworkServiceConfiguration (const MLPIHANDLE connection, const WCHAR16 *service, MlpiNetworkConfigurationValue *const config, const ULONG numElements)
 

Detailed Description

Contains various functions which are handy for controlling the network services on the control.

Function Documentation

MLPIRESULT mlpiSecurityGetNetworkServiceInformation ( const MLPIHANDLE  connection,
MlpiNetworkServiceInfo serviceInformation,
const ULONG  numElements,
ULONG numElementsRet 
)

This function returns information regarding all the network services available on the target device.

Parameters
[in]connectionHandle for multiple connections.
[out]serviceInformationArray of all network services available (name and actual activation state).
[in]numElementsSize of the given serviceInformation array.
[out]numElementsRetReturn count representing the total amount of network services available on the target device.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiNetworkServiceInfo serviceInformations[10];
2 ULONG numElementRet = 0;
3 MLPIRESULT result = mlpiSecurityGetNetworkServiceInformation(connection, serviceInformations, 10, &numElementRet);
MLPIRESULT mlpiSecurityGetNetworkServiceActivation ( const MLPIHANDLE  connection,
const WCHAR16 service,
MlpiSecurityServiceState state 
)

This function obtains the current activation state for a specific network service.

Parameters
[in]connectionHandle for multiple connections.
[in]serviceIdentifier of the network service (i.e. MLPI, MLPIS, FTP or SSH).
[out]stateCurrent state of the specific network service (i.e. MLPI_SECURITY_SERVICE_NOTCHANGEABLE, MLPI_SECURITY_SERVICE_ACTIVATABLE, MLPI_SECURITY_SERVICE_DEACTIVATABLE, MLPI_SECURITY_SERVICE_CHANGEABLE)
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiSecurityServiceState state = MLPI_SECURITY_SERVICE_DISABLED;
2 MLPIRESULT result = mlpiSecurityGetNetworkServiceActivation(connection, MLPI_SECURITY_NETWORKSERVICE_FTP, &state);
MLPIRESULT mlpiSecuritySetNetworkServiceActivation ( const MLPIHANDLE  connection,
const WCHAR16 service,
const MlpiSecurityServiceState  state 
)

This function activates or deactivates a specific network service.

Parameters
[in]connectionHandle for multiple connections.
[in]serviceIdentifier of the network service (i.e. MLPI, MLPIS, FTP or SSH).
[in]stateFuture state of the network service (i.e. MLPI_SECURITY_SERVICE_NOTCHANGEABLE, MLPI_SECURITY_SERVICE_ACTIVATABLE, MLPI_SECURITY_SERVICE_DEACTIVATABLE, MLPI_SECURITY_SERVICE_CHANGEABLE).
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MLPIRESULT result = mlpiSecuritySetNetworkServiceActivation(connection, MLPI_SECURITY_NETWORKSERVICE_SSH, MLPI_SECURITY_SERVICE_ENABLED);
MLPIRESULT mlpiSecurityGetNetworkServiceConfiguration ( const MLPIHANDLE  connection,
const WCHAR16 service,
MlpiNetworkConfigurationValue *const  config,
const ULONG  numElements,
ULONG *const  numElementsRet 
)

This function returns current configuration for all network services.

Parameters
[in]connectionHandle for multiple connections.
[in]serviceIdentifier of the network service (i.e. MLPI, MLPIS, FTP or SSH).
[out]configArray of all configuration options and its values
[in]numElementsSize of the given config array.
[out]numElementsRetReturn count representing the total amount of configuration values available for the services.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiNetworkConfigurationValue config[2];
2 ULONG numElementRet = 0;
3 MLPIRESULT result = mlpiSecurityGetNetworkServiceConfiguration(connection, MLPI_SECURITY_NETWORKSERVICE_SSH, config, 2, &numElementRet);
MLPIRESULT mlpiSecuritySetNetworkServiceConfiguration ( const MLPIHANDLE  connection,
const WCHAR16 service,
MlpiNetworkConfigurationValue *const  config,
const ULONG  numElements 
)

This function sets the configurations for selected network services.

Parameters
[in]connectionHandle for multiple connections.
[in]serviceIdentifier of the network service (i.e. MLPI, MLPIS, FTP or SSH).
[in]configArray of all configuration options and its values
[in]numElementsSize of the given config array.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiNetworkConfigurationValue config[2];
2  wcsncpy( config[0].name, L"config1", MLPI_SECURITY_NETWORKCONFIGVALUE_MAX_NAME_LEN );
3  wcsncpy( config[1].name, L"config2", MLPI_SECURITY_NETWORKCONFIGVALUE_MAX_NAME_LEN );
4  wcsncpy( networkConfig[0].value, L"on", MLPI_SECURITY_NETWORKCONFIGVALUE_MAX_VALUE_LEN );
5  wcsncpy( networkConfig[1].value, L"on", MLPI_SECURITY_NETWORKCONFIGVALUE_MAX_VALUE_LEN );
6 MLPIRESULT result = mlpiSecuritySetNetworkServiceConfiguration(connection, MLPI_SECURITY_NETWORKSERVICE_SSH, config, 2);