| net :: ifconfig :: ·¡ÆÛ NET :: IFCONFIG :: Wrapper´Â FreeBSD ¹× Linux OS¿¡¼ ³×Æ®¿öÅ© ÀÎÅÍÆäÀ̽º¸¦ ±¸¼ºÇÏ´Â ÅëÇÕ µÈ ¹æ¹ýÀ» Á¦°øÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
net :: ifconfig :: ·¡ÆÛ ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Daniel Podolsky
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~tpaba/Net-Socket-NonBlock-0.15/NonBlock.pm
net :: ifconfig :: ·¡ÆÛ Å±×
net :: ifconfig :: ·¡ÆÛ ¼³¸í
net :: ifconfig :: wrapper´Â FreeBSD ¹× Linux OS¿¡¼ ³×Æ®¿öÅ© ÀÎÅÍÆäÀ̽º¸¦ ±¸¼ºÇÏ´Â ÅëÇÕ µÈ ¹æ¹ýÀ» Á¦°øÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. net :: ifconfig :: wrapper´Â freebsd, openbsd, solaris, linux, os x ¹× winnt (win2k)¿¡¼ ³×Æ®¿öÅ© ÀÎÅÍÆäÀ̽º¸¦ ±¸¼ºÇÏ´Â ÅëÇÕ µÈ ¹æ¹ýÀ» Á¦°øÇÏ´Â perl ¸ðµâÀÔ´Ï´Ù. ½Ä ³ëÇÁ #! / usr / local / bin / perl -w # uni-ifconfig.pl # ÅëÇÕ ifconfig ¸í·ÉÀÔ´Ï´Ù. # FreeBSD, OpenBSD, Solaris, Linux, OS X, Winnt (Win2K¿¡¼)¿¡¼ µ¿ÀÏÇÑ ¹æ½ÄÀ¸·Î ÀÛµ¿ÇÕ´Ï´Ù. # Âü°í : net :: ifconfig :: ·¦ÆÛ Á¦ÇÑ 'inet'¹× 'down'¸í·É #Àº Winnt¿¡¼ ÀÛµ¿ÇÏÁö ¾Ê½À´Ï´Ù. ¹°·Ð +/- º°ÄªÀÌ ÀÛµ¿ÇÏ°í ÀÖ½À´Ï´Ù. ¾ö°ÝÇÑ »ç¿ë; net :: ifconfig :: wrapper; MY $ USAGE = {$ ARGV } ¶Ç´Â "ÀÎÅÍÆäÀ̽º '$ ARGV '´Â ¾Ë·ÁÁöÁö ¾Ê¾Ò½À´Ï´Ù"; if (! Á¤ÀÇ ($ argv )) {Àμâ ifaceinfo ($ Á¤º¸, $ argv ); Á¾·á 0; } My $ cmdline = JOIN ( '', @ARGV); ³» $ result = undef; if ($ cmdline = ~ m / as * ( +) s + downs * z / i) {$ RETETAM NET :: IFCONFIG :: WRAPPER :: IFCONFIG ( '´Ù¿î', $ 1, '' , ''); } ELSIF ($ cmdline = m / as * ( +) s + inets + (d {1,3} (? : d {1,3}) {3}) s + ¸¶½ºÅ© + (d {1,3} (? :. D {1,3}) {3}) s * z / i) {$ result = net :: ifconfig :: ·¡ÆÛ :: ifconfig ( 'inet', $ 1, $ 2, $ 3 ); } ELSIF ($ cmdline = m / as * ( +) s + inets + (d {1,3} (? : d {1,3}) {3}) s + ¸¶½ºÅ© + (d {1,3} (? :. d {1,3}) {3}) s ++? aliass * z / i) {$ result = net :: ifconfig :: wrapper :: ifconfig ( '+ º°Äª', $ 1, $ 2, $ 3); } ELSIF ($ cmdline = m / as * ( +) s + inets + (d {1,3} (? : d {1,3}) {3}) s + (:? masks + (d {1,3} (? : d} {1,3}) {3}) s +)? - aliass * z / i) {$ result = net :: ifconfig :: wrapper :: ifconfig ( 'º°Äª ', $ 1, $ 2,' '); } else {Die $ »ç¿ë¹ý; }; $ °á°ú ¶Ç´Â DIE @ @; Á¾·á 0; sub ifaceInfo {my ($ Á¤º¸, $ iface) = @_; MY $ RES = "$ IFACE : T". ($ INFO -> {$ IFACE} { 'Status'}? 'up': '´Ù¿î'). "n"; while (my ($ addr, $ mask) = °¢ (% {$ info-> {$ IFACE} { 'inet'inet '}}) {$ res. = sprintf ( "Tinet % -15S Mask $ Maskn", $ addr) ); }; $ info -> {$ IFACE} { 'Ether'} ¹× $ res. = "tether". $ info -> {$ IFACE} { 'Ether'}. "n"; $ info -> {$ IFACE} { 'DESCRATE} ¹× $ RES. = "TDESCR". $ info -> {$ IFACE} {'DESCRATE ";"n "; ¹Ýȯ $ res; }; ¿ä±¸ »çÇ× : ¡¤ Perl ¿ä±¸ »çÇ× : ¡¤ Perl.
net :: ifconfig :: ·¡ÆÛ °ü·Ã ¼ÒÇÁÆ®¿þ¾î