Ping request (input), Ping results (output), Mac address (output) – CTI Products NCB/FL with Fiber Interface User Manual
Page 22

CTI Products, Inc.
NCB-EL/FL User Guide
3. Network Variable (NV) Control
19
Ping Request (Input)
C Language Syntax
typedef struct U_PING_REQ
{
unsigned char ip[4];
4 byte IP address
unsigned char rpt;
repeat count
unsigned short t_out;
time-out (ms)
16 bits (2 bytes)
0;
required zero
}
Usage
This input network variable structure requests an IP ping of the specified IP address. The Repeat
Count specifies the number of pings issued and must have a value between 1 and 255. The Time-
out parameter specifies the duration to wait for a ping response from a device. The last parameter
must be the numeral zero.
Ping Results (Output)
C Language Syntax
typedef struct U_PING_STATUS
{
U_PING_REQ request;
echoes Ping Request info
4 byte IP address
repeat count
time-out
required zero
unsigned char n_tx, n_fail;
number of actual ping
transmissions and failures
unsigned short mx, mn, avg, err;
ping response times
(maximum, minimum, average,
and 16 bit error code)
}
Usage
This output network variable structure contains the Ping Request information such as IP address,
repeat count, and time-out. It also reports the actual number of ping transmissions and number of
ping response failures. Finally, ping response times are reported in terms of maximum, minimum,
and average. An error code is also returned.
When Transmitted
On Ping Request.
MAC Address (Output)
C Language Syntax
typedef struct MacAddress
{
unsigned char mac[6];
6 byte MAC address
}
Usage
This output network variable contains 6 decimal bytes representing the MAC address.
When Transmitted
Unsolicited at power-up and reset, or when polled.