Reading the ip address from a packet raw sockets
Hi
I'm trying to read the ip address from a packet buffer from recvfrom, I can read the mac address but when i try the ip useing printf("%s",inet_itoa(ip->saddr)); it says wrong argument.
struct iphdr *ip;
I would perfer not to use libpcap. I've tryed to use sturct sockaddr_in *in printf("%s",inet_itoa(in->sin_addr)); ,and ip address is show ,but isn't correct
If you need anymore info just say.
Thanks
|