This chapter contains a description of all NetX Duo AutoIP services (listed below) in alphabetic order.
In the “Return Values” section in the following API descriptions, values in BOLD are not affected by the NX_DISABLE_ERROR_CHECKING define that is used to disable API error checking, while non-bold values are completely disabled.
Create AutoIP instance
UINT nx_auto_ip_create(
NX_AUTO_IP *auto_ip_ptr,
CHAR *name,
NX_IP *ip_ptr,
VOID *stack_ptr,
ULONG stack_size,
UINT priority);
This service creates an AutoIP instance on the specified IP instance.
Note: If DHCP is used, the DHCP thread must have a higher priority than the IP instance thread and the AutoIP thread.
Initialization, Threads
/* Create the AutoIP instance "auto_ip_0" on "ip_0". */
status = nx_auto_ip_create(&auto_ip_0, "AutoIP 0", &ip_0, pointer, 4096, 1);
/* If status is NX_SUCCESS an AutoIP instance was successfully created. */
nx_auto_ip_delete, nx_auto_ip_set_interface, nx_auto_ip_get_address, nx_auto_ip_start, nx_auto_ip_stop
Delete AutoIP instance
UINT nx_auto_ip_delete(NX_AUTO_IP *auto_ip_ptr);
This service deletes a previously created AutoIP instance on the specified IP instance.
Threads
/* Delete the AutoIP instance "auto_ip_0." */
status = nx_auto_ip_delete(&auto_ip_0);
/* If status is NX_SUCCESS an AutoIP instance was successfully deleted. */
nx_auto_ip_create, nx_auto_ip_set_interface, nx_auto_ip_get_address, nx_auto_ip_start, nx_auto_ip_stop
Get current AutoIP address
UINT nx_auto_ip_get_address(
NX_AUTO_IP *auto_ip_ptr,
ULONG *local_ip_address);
This service retrieves the currently setup AutoIP address. If there isn’t one, an IP address of 0.0.0.0 is returned.
Initialization, Timers, Threads, ISRs
ULONG local_address;
/* Get the AutoIP address resolved by the instance "auto_ip_0." */
status = nx_auto_ip_get_address(&auto_ip_0, &local_address);
/* If status is NX_SUCCESS the local IP address is in "local_address." */
nx_auto_ip_create, nx_auto_ip_set_interface, nx_auto_ip_delete, nx_auto_ip_start, nx_auto_ip_stop
Set network interface for AutoIP
UINT nx_auto_ip_set_interface(
NX_AUTO_IP *auto_ip_ptr,
UINT interface_index);
This service sets the index for the network interface AutoIP will probe for a network IP address. The default is zero (the primary network interface). Only applicable for multihomed devices.
Initialization, Timers, Threads, ISRs
ULONG interface_index;
/* Set the network interface on which AutoIP probes for host address. */
status = nx_auto_ip_set_interface(&auto_ip_0, interface_index);
/* If status is NX_SUCCESS the network interface is valid and set in the AutoIP control block *auto_ip_0*. */
nx_auto_ip_create, nx_auto_ip_get_address, nx_auto_ip_delete, nx_auto_ip_start, nx_auto_ip_stop
Start AutoIP processing
UINT nx_auto_ip_start(
NX_AUTO_IP *auto_ip_ptr,
ULONG starting_local_address);
This service starts the AutoIP protocol on a previously created AutoIP instance.
Initialization, Threads
/* Start the AutoIP instance "auto_ip_0." */
status = nx_auto_ip_start(&auto_ip_0, IP_ADDRESS(0,0,0,0));
/* If status is NX_SUCCESS an AutoIP instance was successfully started. */
nx_auto_ip_create, nx_auto_ip_set_interface, nx_auto_ip_delete, nx_auto_ip_get_address, nx_auto_ip_stop
Stop AutoIP processing
UINT nx_auto_ip_stop(NX_AUTO_IP *auto_ip_ptr);
This service stops the AutoIP protocol on a previously created and started AutoIP instance. This service is typically used when the IP address is changed via DHCP or manually to a non-AutoIP address.
Threads
/* Stop the AutoIP instance "auto_ip_0." */
status = nx_auto_ip_stop(&auto_ip_0);
/* If status is NX_SUCCESS an AutoIP instance was successfully stopped. */
nx_auto_ip_create, nx_auto_ip_set_interface, nx_auto_ip_delete, nx_auto_ip_get_address, nx_auto_ip_start