libmcm  1.4.0
A client library for Moxa Connection Management
mcm-network-info.h File Reference
#include "mcm-base-info.h"

Go to the source code of this file.

Enumerations

enum  McmConnectionState {
  CON_STATE_ERROR = -1 , CON_STATE_INITIAL = 0 , CON_STATE_DEVICE_UNAVAILABLE = 1 , CON_STATE_DEVICE_READY = 2 ,
  CON_STATE_DISABLING = 3 , CON_STATE_DISABLED = 4 , CON_STATE_CONFIGURED = 5 , CON_STATE_CONFIGURE_FAILED = 6 ,
  CON_STATE_DISCONNECTED = 7 , CON_STATE_RECONNECT = 8 , CON_STATE_CONNECTED = 9
}
 

Functions

int mcm_get_network_info (char *interfaceName, mcm_network_info *network_info)
 A help function for get network informations. More...
 
int mcm_get_network_status (char *interfaceName, mcm_network_status *network_status)
 A help function for get network status. More...
 
int mcm_get_network_profiles (char *interfaceName, int *num, mcm_profiles **profiles)
 A help function for get network profiles. More...
 
int mcm_network_get_property (char *interfaceName, char *propertyName, char **propertyValue)
 A help function for get network property. More...
 

Detailed Description

This library is for Moxa Connection Management

Author
York LY Chang YorkL.nosp@m.Y.Ch.nosp@m.ang@m.nosp@m.oxa..nosp@m.com

Enumeration Type Documentation

◆ McmConnectionState

McmConnectionState:

Enumeration of possible connection states.

Enumerator
CON_STATE_ERROR 

Fatal error

CON_STATE_INITIAL 

The connection is currently being initialized

CON_STATE_DEVICE_UNAVAILABLE 

The network interface unavailable to use

CON_STATE_DEVICE_READY 

The network interface ready for next action

CON_STATE_DISABLING 

The network interface is currently transitioning to the CON_STATE_DISABLED state.

CON_STATE_DISABLED 

The network interface is not enabled and is down.

CON_STATE_CONFIGURED 

The network interface applied connection setting from profile.

CON_STATE_CONFIGURE_FAILED 

setting connection failed, probably lower layer failure or wrong setting

CON_STATE_DISCONNECTED 

The network interface connection configured but data connection disconnect.

CON_STATE_RECONNECT 

Under data recovery process

CON_STATE_CONNECTED 

The network interface connection configured and data connection connected.

Function Documentation

◆ mcm_get_network_info()

int mcm_get_network_info ( char *  interfaceName,
mcm_network_info network_info 
)

A help function for get network informations.

Parameters
interfaceName(input) Interface name.
network_info(output) A network infomations structure.
Returns
If get ethernet properties success return 0. If fail, return error number.

◆ mcm_get_network_profiles()

int mcm_get_network_profiles ( char *  interfaceName,
int *  num,
mcm_profiles **  profiles 
)

A help function for get network profiles.

Parameters
interfaceName(input) Interface name.
profiles(output) A network profiles structure.
num(output) network profiles numbers.
Returns
If get ethernet properties success return 0. If fail, return error number.

◆ mcm_get_network_status()

int mcm_get_network_status ( char *  interfaceName,
mcm_network_status network_status 
)

A help function for get network status.

Parameters
interfaceName(input) Interface name.
network_status(output) A network status structure.
Returns
If get ethernet properties success return 0. If fail, return error number.

◆ mcm_network_get_property()

int mcm_network_get_property ( char *  interfaceName,
char *  propertyName,
char **  propertyValue 
)

A help function for get network property.

Parameters
interfaceName(input) Interface name.
propertyName(input) property name.
propertyValue(output) property value.
Returns
If get ethernet properties success return 0. If fail, return error number.