EtherNet/IP™ Adapter  1.04.06
User Reference Manual
TCP/IP Interface Object (Class Code: 0xF5)

Overview

The TCP/IP Interface Object provides the mechanisms to configure a device's TCP/IP network interface. Example of configurable items include the device's IP Address, Network Mask, and Gateway Address.

The underlying physical communications interface associated with the TCP/IP Interface Object shall be any interface that supports the TCP/IP protocol. For example, a TCP/IP Interface Object may be associated with any of the following: an IEEE 802.3 interface, an ATM interface, a serial port running SLIP, a serial port running PPP, etc. The TCP/IP Interface Object provides an attribute that identifies the link-specific object for the associated physical communications interface. The link-specific object is generally expected to provide link-specific counters as well as any link-specific configuration attributes.

Each device shall support exactly one instance of the TCP/IP Interface Object for each TCP/IP-capable communications interface on the module.

Instance attributes with application access
Attribute ID Access Rule NV Name Data Type Value Description
3 Get,
Set ¹
NV Configuration Control DWORD Bit Content Interface control flags
0..3: 0..2 Configuration Method
Determines how the device shall obtain its IP-related configuration
0:
The devices shall use statically-assigned IP configuration values.
1:
Obtaining values via BOOTP is not supported.
2:
The device shall obtain its interface configuration values via DHCP.
3..15:
Reserved for future use.
4: 0/1 DNS Enable
If 1 (TRUE), the device shall resolve host names by querying a DNS server.
5..31: 0 reserved
Reserved for future and shall be set to 0.
5 Get,
Set ¹
NV when Configuration Method is 0.

V when obtained via DHCP.
Interface Configuration STRUCT of: TCP/IP network interface configuration
If configured to use a static IP address (Configuration Method value is 0), the Interface Configuration values shall be those which have been statically assigned and stored in NV storage.
If configured to use DHCP (Configuration Method value is 2), the Interface Configuration values shall contain the configuration obtained from the DHCP server. The Interface Configuration attribute shall be 0 until the DHCP reply is received.
Some devices optionally provide additional, non-CIP mechanisms for setting IP-related configuration (e.g. a web server interface, rotary switch for configuring IP addresses, etc.) When such a mechanism is used, the Interface Configuration attribute shall reflect the IP configuration values in use.
IP Address UDINT <IP address> The device's IP address
Value of 0 indicates no IP address has been configured.
Otherwise, the IP address shall be set to a valid Class A, B or C address and shall not be set to the loopback address (127.0.0.1).
Network Mask UDINT <network mask> The device's network mask
Value of 0 indicates no network mask address has been configured.
Gateway Address UDINT <IP address> Default gateway address
Value of 0 indicates no IP address has been configured.
Otherwise, the IP address shall be set to a valid Class A, B or C address and shall not be set to the loopback address (127.0.0.1).
Name Server UDINT <server address> Primary name server
Value of 0 indicates no name server address has been configured.
Otherwise, the name server address shall be set to a valid Class A, B or C address.
Name Server 2 UDINT <server address> Secondary name server
Value of 0 indicates no secondary name server address has been configured.
Otherwise, the name server address shall be set to a valid Class A, B or C address.
Domain Name STRING <domain name> Default domain name
ASCII characters. Maximum length is 48 characters. Shall be padded to an even number of characters (pad not included in length).
A length of 0 shall indicate no Domain Name is configured.
6 Get,
Set ¹
NV Host Name STRING <host name> ASCII characters
Maximum length is 64 characters
Shall be padded to an even number of characters (pad not included in length).
A length of 0 shall indicate no Host Name is configured.
8 Get,
Set ¹
NV TTL Value USINT 1..255 Time-to-Live (TTL) value for EtherNet/IP multicast packets
  • Minimum = 1 (default)
  • Maximum = 255
NOTE:
Unicast packets use the TTL configured for the TCP/IP stack.
Users should exercise caution when setting the TTL value greater than 1, to prevent unwanted multicast traffic from propagating through the network.
9 Get,
Set ¹
NV Mcast Config STRUCT of: <multicast address> IP multicast address configuration
The Mcast Config attribute contains the configuration of the device's IP multicast addresses to be used for EtherNet/IP multicast packets. There are three elements to the Mcast Config structure:
  • Alloc Control
  • Num Mcast
  • Mcast Start Addr
Alloc Control USINT 0..2 Multicast address allocation control word
Determines whether multicast addresses are generated via algorithm or are explicitly set.
0:
Multicast addresses shall be generated using the default allocation algorithm. When this value is specified on a set-attribute, the values of Num Mcast and Mcast Start Addr in the set-attribute request shall be 0.
1:
Multicast addresses shall be allocated according to the values specified in Num Mcast and Mcast Start Addr.
2:
reserved
Reserved USINT 0 Shall be 0.
Num Mcast UINT <number> Number of IP multicast addresses to allocate for EtherNet/IP
The number of IP multicast addresses allocated, starting at Mcast Start Addr.
Maximum value is device specific, however shall not exceed the number of EtherNet/IP multicast connections supported by the device.
Mcast Start Addr UDINT <start address> Starting multicast address from which to begin allocation
IP multicast address (Class D). A block of "Num Mcast" addresses is allocated starting with this address.
10 Get ²,
Set
NV SelectAcd BOOL 0/1 Activates the use od ACD.
1:
Enable (default)
0:
Disable
NOTE:
When the value of SelectAcd is changed by a Set_Attribute service, the new value of SelectAcd shall not be applied until the device executes a restart.
11 Get ²,
Set
NV LastConflictDetected STRUCT of: Structure containing information related to the last IP Address conflict detected
This attribute shall be updated by the device whenever an incoming ARP packet is received that represents a conflict with the device's IP address as described in IETF RFC 5227.
To reset this attribute the Set_Attribute_Single service is invoked with an attribute value of all 0. Values other than 0 shall result in an error response (status code 0x09, Invalid Attribute Value).
AcdActivity USINT 0..3 State of ACD activity when last conflict detected
0:
NoConflictDetected (default)
No conflict has been detected since the attribute was last cleared.
1:
ProbeIpv4Address
Last conflict detected during ProbeIpv4Address state.
2:
OngoingDetection
Last conflict detected during OngoingDetection state or subsequent DefendWithPolicyB state.
3:
SemiActiveProbe
Last conflict detected during SemiActiveProbe state or subsequent DefendWithPolicyB state.
RemoteMAC Array of 6 USINT <MAC address> MAC Address of remote node from the ARP PDU in which a conflict was detected
The IEEE 802.3 source MAC address from the header of the received Ethernet packet which was sent by a device reporting a conflict.
ArpPdu Array of 28 USINT <ARP response PDU bytes> Copy of the raw ARP PDU in which a conflict was detected

ARP Response PDU in binary format
[2 byte]
Hardware Address Type: 1 for Ethernet H/W
[2 byte]
Protocol Address Type: 0x800 for IP
[3 byte]
HDDR LEN: 6 for Ethernet h/w
[1 byte]
PADDR LEN: 4 for IP
[2 byte]
OPERATION: 1 for Req or 2 for Rsp
[6 byte]
SENDER HDDR: Sender's h/w addr
[4 byte]
SENDER PADDR: Sender's proto addr
[6 byte]
TARGET HDDR: Target's h/w addr
[4 byte]
TARGET PADDR: Target's proto addr
12 Get,
Set
NV EtherNet/IP QuickConnect BOOL 0/1

Enable/Disable of QuickConnect feature

0:
Disable (default)
1:
Enable

13 Get,
Set ¹
NV Encapsulation Inactivity Timeout UINT 0,
1..3600
Number of seconds of inactivity before TCP connection is closed
0:
Disable timeout
1..3600:
Timeout in seconds
Default:
120
The Encapsulation Inactivity Timeout attribute is used to enable TCP socket cleanup (closing) when the defined number of seconds have elapsed with no Encapsulation activity.
When set, the Encapsulation Inactivity Timeout attribute shall be saved in non-volatile memory and applied to all subsequently-opened connections. Devices should also, if feasible, apply Encapsulation Inactivity Timeout changes to all currently-opened connections.

Table Footnotes:
¹ Set access only with application's Set function
² Get access only with application's Get function

Functions

uint32_t EI_API_ADP_setIpConfig (T *pAdp_p, EIP_SConfigurationControl_t configurationControl_p, uint32_t ipAddr_p, uint32_t netwMask_p, uint32_t gateway_p, uint32_t nameServer1_p, uint32_t nameServer2_p, char *pDomainName_p, bool applyChanges_p)
 Set the IP configuration of the selected adapter (Instance Attribute ID: 3 and 5). More...
 
uint32_t EI_API_ADP_getConfigurationControl (T *pAdp_p, EIP_SConfigurationControl_t *pConfigurationControl_p)
 Get the current configuration control setting (Instance Attribute ID: 3). More...
 
uint32_t EI_API_ADP_getDHCP (T *pAdp_p, bool *pDhcpEnabled_p)
 Get the current DHCP setting (Instance Attribute ID: 3). More...
 
uint32_t EI_API_ADP_getIpAddr (T *pAdp_p, uint32_t *pIpAddr_p)
 Get the IP address of the selected adapter (Instance Attribute ID: 5). More...
 
uint32_t EI_API_ADP_getIpNwMask (T *pAdp_p, uint32_t *pIpNwMask_p)
 Get the network mask (Instance Attribute ID: 5). More...
 
uint32_t EI_API_ADP_getIpGateway (T *pAdp_p, uint32_t *pIpGateway_p)
 Get the IP address of the default gateway (Instance Attribute ID: 5). More...
 
uint32_t EI_API_ADP_getIpPriNameServer (T *pAdp_p, uint32_t *pIpNameServer1_p)
 Get the IP address of the primary name server (Instance Attribute ID: 5). More...
 
uint32_t EI_API_ADP_getIpSecNameServer (T *pAdp_p, uint32_t *pIpNameServer2_p)
 Get the IP address of the secondary name server (Instance Attribute ID: 5). More...
 
uint32_t EI_API_ADP_getDomainName (T *pAdp_p, char *pDomainName_p)
 Get the domain name (Instance Attribute ID: 5). More...
 
uint32_t EI_API_ADP_getHostName (T *pAdp_p, char *pHostName_p)
 Get the host name (Instance Attribute ID: 6). More...
 
uint32_t EI_API_ADP_setHostName (T *pAdp_p, const char *pHostName_p)
 Set the host name (Instance Attribute ID: 6). More...
 
uint32_t EI_API_ADP_getIpTTL (T *pAdp_p, uint8_t *pIpTTL_p)
 Get the current TTL value (Instance Attribute ID: 8). More...
 
uint32_t EI_API_ADP_setIpTTL (T *pAdp_p, uint8_t ipTTL_p)
 Set the adapter IP TTL value (Instance Attribute ID: 8). More...
 
uint32_t EI_API_ADP_getMcastConfiguration (T *pAdp_p, EI_API_ADP_SMcastConfig_t *pMcastConfig_p)
 Get the current Mcast configuration (Instance Attribute ID: 9). More...
 
uint32_t EI_API_ADP_setMcastConfiguration (T *pAdp_p, const EI_API_ADP_SMcastConfig_t *pMcastConfig_p)
 Set the current Mcast configuration (Instance Attribute ID: 9). More...
 
uint32_t EI_API_ADP_getACD (T *pAdp_p, bool *pAcdEnabled_p)
 Get the current address conflict detection setting (Instance Attribute ID: 10). More...
 
uint32_t EI_API_ADP_setACD (T *pAdp_p, bool enable_p)
 Enable or disable address conflict detection (Instance Attribute ID: 10). More...
 
uint32_t EI_API_ADP_getEnipAcdState (T *pAdp_p, uint8_t *pEnipAcdState_p)
 Get the current adapter Ethernet IP address conflict detection status (Instance Attribute ID: 11). More...
 
uint32_t EI_API_ADP_setEnipAcdState (T *pAdp_p, uint8_t enipAcdState_p)
 Set the current adapter Ethernet IP address conflict detection state (Instance Attribute ID: 11). More...
 
uint32_t EI_API_ADP_getEnipAcdAddr (T *pAdp_p, EI_API_ADP_SParam_t *pEnipAcdAddr_p)
 Get the adapter address conflict detection MAC address (Instance Attribute ID: 11). More...
 
uint32_t EI_API_ADP_setEnipAcdAddr (T *pAdp_p, const EI_API_ADP_SParam_t *pEnipAcdAddr_p)
 Set the address conflict detection MAC address (Instance Attribute ID: 11). More...
 
uint32_t EI_API_ADP_getEnipAcdHdr (T *pAdp_p, EI_API_ADP_SParam_t *pEnipAcdHdr_p)
 Get the adapter address conflict detection header (Instance Attribute ID: 11). More...
 
uint32_t EI_API_ADP_setEnipAcdHdr (T *pAdp_p, const EI_API_ADP_SParam_t *pEnipAcdHdr_p)
 Set the address conflict detection header (Instance Attribute ID: 11). More...
 
uint32_t EI_API_ADP_setQuickConnectSupported (T *pAdp_p)
 Enable QuickConnect support. More...
 
uint32_t EI_API_ADP_getQuickConnectEnabled (T *pAdp_p, bool *pQuickConnectEnabled_p)
 Get the current adapter QuickConnect state (Instance Attribute ID: 12). More...
 
uint32_t EI_API_ADP_setQuickConnectEnabled (T *pAdp_p, bool quickConnectEnabled_p)
 Set the current adapter QuickConnect state (Instance Attribute ID: 12). More...
 
uint32_t EI_API_ADP_getEncapInactTimeout (T *pAdp_p, uint16_t *pEncapInactTimeout_p)
 Get the current adapter encapsulation inactivity timeout (Instance Attribute ID: 13). More...
 
uint32_t EI_API_ADP_setEncapInactTimeout (T *pAdp_p, uint16_t encapInactTimeout_p)
 Set the current adapter encapsulation inactivity timeout (Instance Attribute ID: 13). More...
 
uint32_t EI_API_ADP_setHwSettings (T *pAdp_p, bool hwSettingsEnabled_p, bool dhcpEnabled_p)
 Set the current HW settings. More...
 
uint32_t EI_API_ADP_isDhcpEnabled (T *pAdp_p, bool *pHwDhcpEnabled_p)
 This function returns the hardware settings. More...
 
uint32_t EI_API_ADP_isHwSettingEnabled (T *pAdp_p, bool *pHwConfigEnabled_p)
 This function returns the hardware settings. More...
 
uint32_t EI_API_ADP_setHwConfigurable (T *pAdp_p, bool bHwConfigurable_p)
 Sets the capability to set the IP address by hardware. More...