Structures
eth32cfg_ip Structure

The eth32cfg_ip structure holds an IP address in binary form. It is used to represent IP address information in the ETH32 device configuration structure, to specify the broadcast address, and to retrieve IP address information about the PC's network interfaces.

public struct eth32cfg_ip
{
	public byte[] bytes;
	public eth32cfg_ip(bool initarray){}
	public override string ToString(){}
}
        

  • bytes - Array containing individual octets of the IP address. If you manually create this array, it must have a length of four elements. Index 0 contains the most significant, e.g. 192 from the address 192.168.1.100

  • Constructor(bool) - If true is passed to this constructor, an array of four elements is created and initialized to zeroes.

  • ToString - Returns a string representation of the IP address.

eth32cfg_mac Structure

The eth32cfg_mac structure holds a MAC address in binary form. It is used within the ETH32 device configuration structure.

public struct eth32cfg_mac
{
	public byte[] bytes;
	public eth32cfg_mac(bool initarray){}
	public override string ToString(){}
}
        

  • bytes - Array containing individual octets of the MAC address. If you manually create this array, it must have a length of six elements. Index 0 contains the first and most significant octet.

  • Constructor(bool) - If true is passed to this constructor, an array of six elements is created and initialized to zeroes.

  • ToString - Returns a string representation of the MAC address.

eth32cfg_data Structure

The eth32cfg_data structure holds all of the network configuration and device information data for a particular ETH32 device. It is provided to your application when retrieving information about detected devices. Your application can also fill in or modify the information and provide it to the API to store new configuration into a device.

public struct eth32cfg_data
{
	public byte product_id;
	public byte firmware_major;
	public byte firmware_minor;
	public byte config_enable;
	public eth32cfg_mac mac; 
	public ushort serialnum_batch;
	public ushort serialnum_unit; 
	public eth32cfg_ip config_ip;
	public eth32cfg_ip config_gateway;
	public eth32cfg_ip config_netmask;
	public eth32cfg_ip active_ip;
	public eth32cfg_ip active_gateway;
	public eth32cfg_ip active_netmask;
	public byte dhcp;
}

  • product_id - Contains the product ID code for the device. This will be 105 for ETH32 devices. This makes up a portion of the serial number.

  • firmware_major - Contains the major portion of the firmware version, e.g. 3 from 3.000

  • firmware_minor - Contains the minor portion of the firmware version, e.g. 0 from 3.000

  • config_enable - Nonzero if the device's Allow Config switch is set to Yes

  • mac - The MAC address of the device

  • serialnum_batch - The batch number portion of the device's serial number

  • serialnum_unit - The unit number portion of the device's serial number

  • config_ip - The static IP address stored in the device. This is ignored if DHCP is active.

  • config_gateway - The static gateway IP address stored in the device. This is ignored if DHCP is active.

  • config_netmask - The static network mask stored in the device. This is ignored if DHCP is active.

  • active_ip - The IP address being used by the device, whether it was provided by DHCP or statically configured.

  • active_gateway - The gateway IP address being used by the device, whether it was provided by DHCP or statically configured.

  • active_netmask - The network mask being used by the device, whether it was provided by DHCP or statically configured.

  • dhcp - Nonzero if DHCP is being used by the device, or zero if the static settings (config_ip, etc) are being used.

If a device is using DHCP, then active_ip will most likely be different than the static (stored) config_ip, and so on for the gateway and netmask. If DHCP is not being used, then active_ip will be the same as config_ip, and so on for the gateway and netmask.

When using this structure with the SetConfig Method, you may modify the config_ip, config_gateway, config_netmask, and dhcp members in order to update the corresponding settings within the ETH32 device. The other members of the structure should not be modified, since they will either be ignored, or are required for the new configuration to be accepted by the device. Specifically, the MAC address and serial number information must match the device's information, or the device will ignore the new configuration data.

Eth32ConfigPluginInterface Structure

The Eth32ConfigPluginInterface structure holds information about a network interface card of the PC. This information can be provided by a plugin loaded into the ETH32 API.

public struct Eth32ConfigPluginInterface
{
    public eth32cfg_ip Ip;
    public eth32cfg_ip Netmask;
    public Eth32ConfigInterfaceType InterfaceType;
    public string StandardName;
    public string FriendlyName;
    public string Description;
}        

  • Ip - The IP address of the network interface

  • Netmask - The network mask of the network interface

  • InterfaceType - The type of network that this network interface is for. This can be one of these values:

    • Eth32ConfigInterfaceType.Unknown - This is used if the current plugin doesn't provide information about the network interface type.

    • Eth32ConfigInterfaceType.Other - This is used if the plugin provides information about the interface type, but it isn't one of the predefined constants.

    • Eth32ConfigInterfaceType.Ethernet - Ethernet interface

    • Eth32ConfigInterfaceType.Tokenring - Token Ring interface

    • Eth32ConfigInterfaceType.Fddi - FDDI (Fiber Distributed Data Interface) interface

    • Eth32ConfigInterfaceType.Ppp - PPP (Point-to-Point Protocol) interface

    • Eth32ConfigInterfaceType.Loopback - Local loopback interface (e.g. 127.0.0.1)

    • Eth32ConfigInterfaceType.Slip - SLIP (Serial Line Internet Protocol) interface

  • StandardName - This is typically an internal identifier string that identifies the interface, but is not very human-readable. The exact value depends on the plugin being used.

  • FriendlyName - The human-readable name for the interface. For example, Local Area Connection. This member will be empty when the WinPcap plugin is being used.

  • Description - A description of the interface. The value of this member depends on the plugin being used, but typically includes the manufacturer or model of the card. This member will be available when using the System plugin or when using the WinPcap plugin.