I wish to assign ip address to P2020RDB-PCA through my C Code , instead of defining by ifconfig command at the serial console prompt.
Pls tell a way out.
Please refer to the attached ifconfig.c file coming from net-tools package.
Please refer to set_ifstate function regarding how to set IP address with socket programming.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Have a great day,
Please check answers for
How to set the IP address from C in linux - Stack Overflow
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------