Skip to content

hepek/erldnsclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

erldnsclient

Simplest possible Erlang DNS client. It sends one question and just parses first response. Nothing really useful, but what more can you expect from jus a few lines of code.

You can choose requested hostname and nameserver.

$ erl
1> dns:query("github.com", "8.8.8.8").
[{dnsh,3838,1,0,0,0,1,1,0,1,1,0,0},
 {question,["github","com"],1,1},
  {response,{record,type_A,1,222,<<192,30,252,130>>}}]
2> dns:query("blabla.github.com", "8.8.8.8").
[{dnsh,1872,1,0,0,0,1,1,0,1,2,0,0},
 {question,["blabla","github","com"],1,1},
  {response,{record,type_CNAME,1,29,
                     ["github","map","fastly","net"]}}]

About

Very simple Erlang dns client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages