Comparison

net/dns.lua @ 3513:4cf5962747fc

net.dns: Support for parsing PTR records
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 Oct 2010 00:13:24 +0100
parent 3512:e344b00f2cc9
child 3540:bc139431830b
comparison
equal deleted inserted replaced
3512:e344b00f2cc9 3513:4cf5962747fc
436 rr.srv.weight = self:word(); 436 rr.srv.weight = self:word();
437 rr.srv.port = self:word(); 437 rr.srv.port = self:word();
438 rr.srv.target = self:name(); 438 rr.srv.target = self:name();
439 end 439 end
440 440
441 function resolver:PTR(rr)
442 rr.ptr = self:name();
443 end
441 444
442 function SRV_tostring(rr) -- - - - - - - - - - - - - - - - - - SRV_tostring 445 function SRV_tostring(rr) -- - - - - - - - - - - - - - - - - - SRV_tostring
443 local s = rr.srv; 446 local s = rr.srv;
444 return string.format( '%5d %5d %5d %s', s.priority, s.weight, s.port, s.target ); 447 return string.format( '%5d %5d %5d %s', s.priority, s.weight, s.port, s.target );
445 end 448 end