I need to use IP address of the eth0 interface of a PC (Linux OS – IPv4). How can I define it as a constant variable without knowing the IP address in advance?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have them as pointer to an address buffer you can. Export a pointer to
constqualified typeYou’d have to have your library code see something like
Inside your library you can then initialize
my_addressproperly, client code only would seeaddrand wouldn’t be able to change it.