Hey all, haven't been to the board in awhile but I have a question on sockets.
I've made a server where a telnet client can telnet to on port 3550, everything works fine. Now I want to extend it so it logs all activities so I made it create a file and put in it:
IP:[ip] connected to the server.
One thing that doesn't work is the [ip] part.
Isn't this supposed to go from machine order to usual ip number with dots?Code:inet_ntoa(client.sin_addr.s_addr);
Well I did this and it gives me an error saying:
Second thing I want to add to the logging is date and time but I've never found out how to use those functions so if someone could help me out on that that would be great!Code:conversion from 'u_long' to non-scalar type 'in_addr' requested
Thanx very much for any help you may be able to offer me.