I am attempting to use NetOS 7.4’s naIamEnable() and naIamDisable() to switch between DHCP and Static IPs after I write the changes with customizeIamSetInterfaceConfig(). It disables, but does not start a new connection. Do I need to call naIamAquire or naIamStart? Anyone have any idea how to use these functions?
I have not tested this, but reading thru the API, it mentions that if you are using your own IP address acquisition protocol, you must enable the method using naIamEnable. However, the document did not discuss switching methods midstream.
During startup, customizeIamStart is called to handle the initialization. The function naIamStart will then start any methods that have been enabled.
One item to note: naIamStart() should always be called with configuration parameters returned by naIfConfigGetInterfaceParams() as they are platform specific and should not be modified by the application.
For your review of how customizeIamStart handles things, I have attached a file “iamCallbacks.c”.
So what you are saying is that if the method is switched, I should reboot and only use the inline method for reloading DHCP if already loaded or for switching static IP addresses.