net :: dnsserver :: base.

ÀÌ´Â ¸ðµç Çؼ® ¸ðµâ Çڵ鷯ÀÇ ±âº» Ŭ·¡½ºÀÓÀ» ÀǹÌÇÕ´Ï´Ù.
Áö±Ý ´Ù¿î·Îµå

net :: dnsserver :: base. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Rob Brown
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://karmatics.com/aardvark/

net :: dnsserver :: base. ű×


net :: dnsserver :: base. ¼³¸í

ÀÌ´Â ¸ðµç ÇØ°á ¸ðµâ Çڵ鷯ÀÇ ±âº» Ŭ·¡½º°¡µÇ´Â °ÍÀ» ÀǹÌÇÕ´Ï´Ù. net :: dnsserver :: base´Â ¸ðµç ÇØ°á ¸ðµâ Çڵ鷯ÀÇ ±âº» Ŭ·¡½º°¡µÇ´Â perl ¸ðµâÀÔ´Ï´Ù .SnopsisExample »ç¿ë : #! / usr / bin / perl -w -t »ç¿ë ¾ö°Ý; Net :: DNSServer; net :: dnsserver :: cache; mytestresolver¸¦ »ç¿ëÇϽʽÿÀ; MY $ RESOLVER1 = NEW NET :: DNSSERVER :: ij½Ã; MY $ RESOLVER2 = »õ·Î¿î MyTeStresolver {DOM => "test.com"}; Net :: DNSServer {¿ì¼± ¼øÀ§ => ,}; # NOSS RETURNSEXAMPLE MYTESTRESOLVER.PM ³»¿ë : MyTeStresolver ÆÐÅ°Áö; ¾ö°ÝÇÑ »ç¿ë; ¼öÃâ¾÷ÀÚ; net :: dnsserver :: base; Net :: DNS :: Packet; VARS QW (@ISA)¸¦ »ç¿ëÇϽʽÿÀ. @isa = qw (net :: dnsserver :: base); # ÇØ°á ¼­ºê ·çƾÀº ÇÏÀ§ ÇØ°áÀ» Á¤ÀÇÇؾßÇÕ´Ï´Ù. {My $ self = shift; ³» $ dns_packet = $ self-> {question}; My ($ Áú¹®) = $ dns_packet -> Áú¹® (); if ($ Áú¹® -> QName EQ $ self -> {dom} $ Áú¹® -> qtype eq "a") {My $ response = Ãູ \ % {$ dns_packet}, "net :: dns :: packet"|| ´ÙÀÌ "´Â ÀÀ´ä ÆÐŶÀ» ÃʱâÈ­ ÇÒ ¼ö ¾ø½À´Ï´Ù"; $ ÀÀ´ä -> Ǫ½Ã ( "´äº¯", ); $ ÀÀ´ä -> Ǫ½Ã ( "±ÇÇÑ", )); $ ÀÀ´ä -> "Ãß°¡", ); MY $ RESPONTS_HEADER = $ ÀÀ´ä -> Çì´õ; $ response_header-> AA (1); # ±ÇÀ§ÀÖ´Â ¹Ýȯ $ ÀÀ´äÀ»ÇϽʽÿÀ. } undef¸¦ ¹ÝȯÇÕ´Ï´Ù. } ¸ÞÀΠȣÃâÀÚ ÇÁ·Î±×·¥Àº °¢ resolverÀÇ new () ¸Þ¼Òµå¸¦ È£ÃâÇÏ¿© °¢°¢ÀÇ ÀνºÅϽº¸¦ ¸¸µì´Ï´Ù. °¢ resolver isa net :: dnsserver :: base´Â ÇØ°á ¹æ¹ý () ¸Þ¼Òµå¸¦ ¸í½Ã ÀûÀ¸·Î Á¤ÀÇÇؾßÇÕ´Ï´Ù. ÀÌ·¯ÇÑ °´Ã¼ ¸ñ·Ï¿¡ ´ëÇÑ ÂüÁ¶´Â À§ÀÇ ½Ã³ñ½Ã½º¿¡¼­ ½Ã¿¬ µÈ "¿ì¼± ¼øÀ§"Àμö·Î ½ÇÇàµÇµµ·Ï Àü´ÞµË´Ï´Ù. net :: dnserver-> run () °áÄÚ ¹ÝȯÇÏÁö ¾Ê½À´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.


net :: dnsserver :: base. °ü·Ã ¼ÒÇÁÆ®¿þ¾î