Discussion:
[Dnsmasq-discuss] Dynapic IP
Gopalkrishna Mudaliar
2016-10-28 22:58:25 UTC
Permalink
Hello All            I am trying to return the IP address of domains (DNS response) depending on a specific pattern that computes (decide ) IP to be returned.
Eg 
         http://my100.machine1.com        return 192.168.1.100         http://my101.machine1.com      return 192.168.1.101         http://myhost2.machine1.com     return 192.168.1.100 

          The logic to decide the IP is something internal.
         Could any help me where can i make this change. I have been trying to understand the code but didn't get the point to add my logic.         I looked at files.   rfc1035.c, forward.c, cache.c.
        Would really appreciate  if any one could help me understand the flow or any pointers.

ThanksKrishna.
 
Albert ARIBAUD
2016-11-01 15:13:09 UTC
Permalink
Hi,

Le Fri, 28 Oct 2016 22:58:25 +0000 (UTC)
Hello All            I am trying to return the IP address of domains
(DNS response) depending on a specific pattern that computes (decide
) IP to be returned. Eg http://my100.machine1.com        return
192.168.1.100         http://my101.machine1.com      return
192.168.1.101         http://myhost2.machine1.com     return
192.168.1.100 
          The logic to decide the IP is something internal.
What do you mean exactly by that?

/If/ you just want to have a map between a name and IP address, that
can be achieved using a "hosts file" -- but I suspect it is more
complicated than that.
         Could any help me where can i make this change. I have been
trying to understand the code but didn't get the point to add my
logic.         I looked at files.   rfc1035.c, forward.c, cache.c.
Would really appreciate  if any one could help me understand the flow
or any pointers.
ThanksKrishna.
Amicalement,
--
Albert.
Loading...