getEthernetDetail.lua
[INDEX]

ABSTRACT

Get current (or specified) Ethernet detail information

ARGUMENTS

HTTP Arguments submit: GET; POST

Test this API over HTTP - (URL):

DeviceObject

Optional. If specified, then it is ObjectID of network interface (please refer to getNetInterface.lua); otherwise, it is the default Ethernet interface.

Test value:

RETURNS

Return a JSON style result. The JSON format is:

{
/*OBJECT*/

"Result":
NUMBER

200 means OK, other error code meanings are similar to HTTP Response.

"Status":
"STRING"

Status message. Responsing result status of API executive, if there errors, it will describe reasons.

"Data": {
/*OBJECT*/

"Device":
"STRING"

Ethernet device name (E.g. eth0, usb1, ...)

"Object":
"STRING"

Ethernet device object name (NOTE: it's device object name but not connection object name)

"State":
"STRING"

Current Ethernet connection status, as one of below:

disabled

Disabled

off

No connection

connecting

Connect in progress

connected

Connected

"ConnectionObject":
"STRING"

The current connection object name, this is needed in setEthernet.lua

"ConnectionUuid":
"STRING"

Current Uuid of current connection, this is needed in setEthernet.lua

"Carrier":
INTEGER

0

Cable is not connected

1

Cable connected

"Speed":
INTEGER

Connection speed (10/100/1000, in Mbps)

"HwAddress":
"STRING"

MAC address (it may be Cloned MAC address)

"PermHwAddress":
"STRING"

Original MAC address (not be cloned)

"DHCP":
INTEGER

0

Manually specified IP addresses

1

Get IP addresses by DHCP

"IP":
"STRING"

Current IP address

"Prefix":
"STRING"

Subnet mask represented as 'prefix' ( E.g. 24 is 255.255.255.0, 16 is 255.255.0.0)

"Gateway":
"STRING"

Default gateway

"Dns1":
"STRING"

DNS1

"Dns2":
"STRING"

DNS2

}
}

OTHER NOTES

Device HTTP API, v1.0