Whenever I try to read data returned from the inet_ntoa() command, I get a segmentation fault. I can run the function itself without setting a variable to the return value, and it gets past that line fine as you can see in my first trial.
Prototype for inet_ntoa: char *inet_ntoa(struct in_addr in);
I have tried several things to get at the data returned by this function, but all have failed. You can see my trials in the 'attached code'.
It seems this guy has a very similar problem, but it's beyond me what they did to fix it.
I'd appreciate it if someone could tell me where to go from here. Thanks in advance.
Edit: fixed link.
Prototype for inet_ntoa: char *inet_ntoa(struct in_addr in);
I have tried several things to get at the data returned by this function, but all have failed. You can see my trials in the 'attached code'.
It seems this guy has a very similar problem, but it's beyond me what they did to fix it.
I'd appreciate it if someone could tell me where to go from here. Thanks in advance.
Edit: fixed link.