Get_Dns_List; Get_Ip_Address - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Keywords & Run-Time Library Functions (Cont.)

GET_DNS_LIST

GET_IP_ADDRESS

NetLinx Programming Language Reference Guide
This function returns the domain name and list of DNS server IP addresses that
the specified device is programmed to utilize. The order of the returned list is
the preferred server order.
DNS_STRUCT DnsListresult = GET_DNS_LIST(0:0:0,DnsList)
SLONG GET_DNS_LIST(DEV Device,DNS_STRUCT DnsList )
Parameters:
• Device: Device from which the DNS servers will be retrieved.
• DnsList: A DNS_STRUCT that will receive the device's DNS server list.
Result:
• 0: Operation was not successful
• -1: Specified device is invalid or is not online
• -2: Request timed out
• -3: Busy
The function requires a DNS_STRUCT. The DNS_STRUCT is predefined as fol-
lows:
STRUCTURE DNS_STRUCT
{
CHAR DomainName[68] // domain suffix (e.g. amx.com)
CHAR DNS1[15]
CHAR DNS2[15]
CHAR DNS3[15]
}
This function returns the TCP/IP configuration of the specified device. The con-
figuration information includes DHCP/Static configuration, IP address,
subnet mask, gateway, and host name.
SLONG GET_IP_ADDRESS(DEV Device,IP_ADDRESS_STRUCT
IPAddress)
Parameters:
• Device: Device from which the TCP/IP configuration will be retrieved.
• IPAddress: An IP_ADDRESS_STRUCT that will receive the device's TCP/IP
configuration.
Result:
• 0: Operation was successful
• -1: Specified device is invalid or is not online
• -2: Request timed out
• -3: Busy
The function requires an IP_ADDRESS_STRUCT..
The IP_ADDRESS_STRUCT is predefined as follows:
STRUCTURE IP_ADDRESS_STRUCT
{
CHAR Flags
CHAR HostName[128]
CHAR IPAddress[15]
CHAR SubnetMask[15] // subnet mask
CHAR Gateway[15]
}
The following definitions exist for the Flags member of the
IP_ADDRESS_STRUCT structure.
CONSTANT CHAR IP_Addr_Flg_DHCP = 1 // Use DHCP
Reserved Identifiers
// IP address of 1st DNS server
// IP address of 2nd DNS server
// IP address of 3rd DNS server
// Configuration flags
// Host name
// IP address unit
// IP address of gateway
129

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents