S
satish.burnwal
I am facing an issue in my app that is analysing network packets. I
see that inet_ntoa function (defined in <arpa/inet.h> is not printing
correctly.
When I print (I have ip pointer variable populated), it prints
correctly:
printf(log_msg, "From %lu to %lu", (ip->ip_src).s_addr, (ip-
But when I print, it is printing src and dest ip same:
printf(log_msg, "From %s to %s", inet_ntoa(ip->ip_src), inet_ntoa(ip-
Anything wrong here ?
-Satish
see that inet_ntoa function (defined in <arpa/inet.h> is not printing
correctly.
When I print (I have ip pointer variable populated), it prints
correctly:
printf(log_msg, "From %lu to %lu", (ip->ip_src).s_addr, (ip-
//prints From 192.168.10.2 to 192.168.10.15ip_dest).s_addr);
But when I print, it is printing src and dest ip same:
printf(log_msg, "From %s to %s", inet_ntoa(ip->ip_src), inet_ntoa(ip-
//prints From 192.168.10.2 to 192.168.10.2ip_dest));
Anything wrong here ?
-Satish