Set_Dns_List; Set_Ip_Address - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Keywords & Run-Time Library Functions (Cont.)

SET_DNS_LIST

SET_IP_ADDRESS

NetLinx Programming Language Reference Guide
This function programs a domain name and the list of DNS servers that the
specified device will use to lookup domain names. It requires a pre-initialized
DNS_STRUCT structure that will be sent to the specified device.
SLONG SET_DNS_LIST(DEV Device,DNS_STRUCT DnsList )
Parameters:
• Device: Device to which the DNS list will be sent
• DnsList: A DNS_STRUCT that contains the list of DNS server IP addresses
that will be programmed in to the device
Result:
• 0: Operation was successful
• -1: Specified device is invalid or is not online
• -2: Time out occurred
• -3: Function is already actively attempting to set a DNS list (i.e. busy)
• -4: Set DNS failed
• -5: A portion of the DNS structure contains invalid information
DNS_STRUCT DnsList
DnsList.DomainName = 'amx.com'
DnsList.DNS1 = '19.00.100.00'
DnsList.DNS2 = ''
DnsList.DNS3 = ''
Result = SET_DNS_LIST(0:0:0,DnsList) // set master's list
See GET_DNS_LIST, on page 129, for a description of the DNS_STRUCT struc-
ture.
This function programs the TCP/IP configuration of the specified device. The
function requires a pre-initialized IP_ADDRESS_STRUCT structure that will be
sent to the specified device.
SLONG SET_IP_ADDRESS(DEV Device,IP_ADDRESS_STRUCT
IPAddress )
Note: SET_IP_ADDRESS takes effect after the system is rebooted.
Parameters:
• Device: Device to which the IPAddress list will be sent.
• IPAddress: An IP_ADDRESS_STRUCT containing the desired TCP/IP
configuration for the specified device.
Result:
• 0: Operation was successful.
• -1: Specified device is invalid or is not online.
• -2: Time out occurred.
• -3: Function is already actively attempting to set an IP Address (i.e. 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]
}
Reserved Identifiers
// Configuration flags
// Host name
// IP address unit
// IP address of gateway
149

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents