Trying to "extract" from a pcap file source and destination IP addresses. Is my first contact with this stuff and networking so I'm lil bit confused. How I will get IP and print it out in dotted decimal notation?
For now I have...
struct ip *ip_hdr = (struct ip *)pkt_pointer;In this struct there are references for ip_src and ip_dst but those are type of struct in_addr. So, I don't know what to do next in order to get those addresses and in what variable type need to store them. and how to convert them in decimal dotted notation.