anita goyal
2016-06-20 14:39:58 UTC
Hi, I am working on dnsmasq 2.62 and I am curious to know more about
what exactly is in reply packet when dnsmasq is about to send it to
end-user or client
By looking at source code, I found send_from() function in forward.c
file is what I need .
And inside this function I found char *packet is packet which it sends
to user and size_t len is size of the reply packet. Right??
And Now to know what exactly is in this packet, I tried to iterate over it.
for(i=0;i<len;i++)
printf("packet is %c\n",packet[i]);
when i did this I get some printable as well as non printable
characters which I am not able to understand what exactly it is .
I somehow managed to get the actual request that user has queried for
in char *packet
but unable to get the ip address OR A record that user gets in
response to this request.
can anybody tell me how can i get the ip address information in packet ?
Thanks in advance
Regards
Anita
what exactly is in reply packet when dnsmasq is about to send it to
end-user or client
By looking at source code, I found send_from() function in forward.c
file is what I need .
And inside this function I found char *packet is packet which it sends
to user and size_t len is size of the reply packet. Right??
And Now to know what exactly is in this packet, I tried to iterate over it.
for(i=0;i<len;i++)
printf("packet is %c\n",packet[i]);
when i did this I get some printable as well as non printable
characters which I am not able to understand what exactly it is .
I somehow managed to get the actual request that user has queried for
in char *packet
but unable to get the ip address OR A record that user gets in
response to this request.
can anybody tell me how can i get the ip address information in packet ?
Thanks in advance
Regards
Anita