POE :: ±¸¼º ¿ä¼Ò :: ¼¹ö :: DNS.ºñ ºí·ÎÅ·, µ¿½Ã DNS ¼¹ö POE ±¸¼º ¿ä¼Ò | |
Áö±Ý ´Ù¿î·Îµå |
POE :: ±¸¼º ¿ä¼Ò :: ¼¹ö :: DNS. ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Perl Artistic License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Chris Williams
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~bingos/
POE :: ±¸¼º ¿ä¼Ò :: ¼¹ö :: DNS. ű×
POE :: ±¸¼º ¿ä¼Ò :: ¼¹ö :: DNS. ¼³¸í
ºñ Â÷´Ü, µ¿½Ã DNS ¼¹ö PoE ±¸¼º ¿ä¼Ò PoE :: Component :: Server :: DNS´Â DNS Server¸¦ ±¸ÇöÇÏ´Â PoE ±¸¼º ¿ä¼ÒÀÔ´Ï´Ù. PoE :: Component :: Client :: DNS´Â 'Furning_Only'¹× Net :: DNS :: Resolver·Î ±¸¼º µÉ ¶§ ÇØ°áÀ» ó¸®ÇÕ´Ï´Ù. : PoE :: Component :: RecursionÀ» ¼öÇàÇϱâ À§ÇØ ·¡ÇÎ µÈ Àç±Í : Net :: DNS :: Nameerver.Synopsis´Â ¾ö°ÝÇÑ ÈÄ¿¡ ¸·¿¬ÇÏ°Ô ¸ðµ¨¸µ µÈ ƯÁ¤ Äõ¸®¿¡ ´ëÇÑ ÀÀ´äÀ» ¸¶»çÁöÇÏ°í Á¶ÀÛ ÇÒ ¼ö ÀÖ½À´Ï´Ù. net :: dns :: rr; POE QW (Component :: Server :: DNS)¸¦ »ç¿ëÇϽʽÿÀ. MY $ DNS_SERVER = POE :: ±¸¼º ¿ä¼Ò :: ¼¹ö :: DNS-> SPAWN (alias => 'dns_server'); POE :: ¼¼¼Ç -> create (package_states => ,]; $ poe_kernel-> run (); Á¾·á 0; SUB _START {MY ($ kernel, $ heap) = @_ ; # ·Î±× À̺¥Æ®°¡ '·Î±×'$ kernel-> post ( 'dns_server', 'log_event', 'log_event', 'log')·Î À̵¿Çϵµ·Ï ·Î±× À̺¥Æ®¸¦ ¾Ë·ÁÁÝ´Ï´Ù. # foobar.com¿¡ ´ëÇÑ Çڵ鷯 µî·Ï Á¢¹Ì»ç ÇÑ µµ¸ÞÀÎ $ kernel-> post ( 'dns_server, add_handler, {event => add_handler, {event =>'handler ', label =>'foobar ', match =>'foobar.com $ ',}) ...¿¡ undef; } ÇÏÀ§ 󸮱â {My ($ QName, $ qclass, $ qtype, $ Äݹé) = @_ ; MY ($ rcode, @ans, @auth, @add); if ($ qtype eq "a") {my ($ ttl, $ rdata) = (3600, 10.1.2.3 "); Ǫ½Ã @ANS, NET :: DNS :: RR-> NEW ( "$ QNAME $ TTL $ QCLASS $ QTYPE $ RDATA"); $ rcode = "noerror"; } else {$ rcode = "nxdomain"; } $ Äݹé -> ($ rcode, @ans, @auth, @add, {aa => 1}); undef; } ÇÏÀ§ ·Î±× {My ($ IP_PORT, $ nET_DNS_PACKET) = @_ ; $ net_dns_packet-> print (); undef; } ¿ä±¸ »çÇ× : ¡¤ Perl.
POE :: ±¸¼º ¿ä¼Ò :: ¼¹ö :: DNS. °ü·Ã ¼ÒÇÁÆ®¿þ¾î