Relative Content

Tag Archive for clinuxnetworkingtcpinet

inet_ntoa() returns IP in the wrong order

I’m trying to solve a bug in which I try to print the IP adress of my machine. The machine is using a RedHat OS. The goal is to obtain the host id using gethostid(), and then use the function inet_ntoa to convert its value to a string.

inet_ntoa return IP in the wrong order

I’m trying to solve a bug in which I try to print the ip adress of my machine. The machine is using a redhat OS. The goal is to obtain the host id using gethostid(), and then use the function inet_ntoa to convert its value to a string.