Reputation:
I am trying to create a header file, within the header file I want to create a string to pass an IP address into my network file (/etc/network/interfaces)
Currently I have a header file set up and it includes the following:
char Board_IP[] = "192.168.40.3";
int n1, n2, n3, n4;
sscanf(ip, "%d.%d.%d.%d", &n1, &n2, &n3, &n4).
Then in my network file:
address n1.n2.n3.n4
Whenever I try to restart my network, I always receive an error saying:
Reconfiguring network interfaces...Error: an inet prefix is expected rather than "n1.n2.n3.n4/255.255.255.224"
I know this is probably a simple question, but I am fairly new to this and would greatly appreciate some help.
Thank You!
Upvotes: 1
Views: 637