inet_ntoafrom an RPG program.
Eventually found what I needed in Scott Klement's Socket Programming tutorial. Not an obvious place, but it's there nonetheless. I couldn't get
gethostbynameto work until I trimmed all trailing blanks from the host name during the call.
Still have to sort out
gethostbyaddr, that I did previously. Only seems to return one entry, sometimes a nonsense one. (I expect an array or a bunch of pointers). Even when I've solved that, I don't know how to choose the 'right' one.