SERVICES

Section: Linux Programmer's Manual (5)
Updated: 11 Jan 1996
Index
Return to Main Contents
 

À̸§

services - ÀÎÅÍ³Ý ³×Æ®¿öÅ© ¼­ºñ½º ¸®½ºÆ®  

¼³¸í

services ´Â ÀÎÅÍ³Ý ¼­ºñ½º¸¦ À§ÇÑ Ä£±ÙÇÑ ÅؽºÆ® ÇüÅÂÀÇ À̸§°ú ¿ø·¡ ÇÒ´çµÈ Æ÷Æ® ¹øÈ£¿Í ÇÁ·ÎÅäÄÝ Å¸ÀÔ °£ÀÇ ¸ÊÇÎÀ» Á¦°øÇÏ´Â ´Ü¼øÇÑ ASCIIÆÄÀÏÀÌ´Ù. ¸ðµç ³×Æ®¿öÅ· ÇÁ·Î±×·¥Àº ¼­ºñ½º¸¦ À§ÇÑ Æ÷Æ® ¹øÈ£(¿Í ÇÁ·ÎÅäÄÝ)À» ¾ò±â À§ÇØ ÀÌ ÆÄÀÏÀ» Á¶»çÇØ ºÁ¾ßÇÑ´Ù. C ¶óÀ̺귯¸® ·çƾ getservent(3), getservbyname(3), getservbyport(3), setservent(3), endservent(3) Àº ÇÁ·Î±×·¥À¸·ÎºÎÅÍ ÀÌ ÆÄÀÏ¿¡ ´ëÇÑ Áú¹®À» Áö¿øÇÑ´Ù. Æ÷Æ® ¹øÈ£´Â IANA (Internet Assigned NumbersAuthority)¿¡ ÀÇÇØ ÇÒ´ç¹Þ°í, Æ÷Æ® ¹øÈ£¸¦ ÇÒ´ç ¹ÞÀ» ¶§ ±×µéÀÇ ÇöÁ¦ Á¤Ã¥Àº TCP¾Æ UDP ÇÁ·ÎÅäÄÝ·Î ÇÒ´çÇÑ´Ù. ±×·¯¹Ç·Î ÇϳªÀÇ ¼­ºñ½º¸¦ ÇÏ´õ¶óµµ ´ëºÎºÐÀÇ ¾ØÆ®¸®´Â µÎ°³¾¿ °¡Áö°í ÀÖ´Ù 1024¹ø ¾Æ·¡ÂÊ Æ÷Æ® ¹øÈ£´Â(º¸Åë 'low numbered' port¶ó°í ºÎ¸£´Â) ·çÆ®¿¡ ÀÇÇؼ­¸¸ ¹­ÀÏ ¼ö ÀÖ´Ù. ( bind(2), tcp(7), udp(7). ¸¦ ÂüÁ¶) ±×·¯¹Ç·Î, ³·Àº ¹øÈ£ÀÇ Æ÷Æ®¿¡ ¿¬°áµÈ Ŭ¶óÀ̾ðÆ®´Â ±× Æ÷Æ®¿¡¼­ÀÇ ¼­ºñ½º°¡ Ç¥ÁØ ½ÇÇàÀÌ°í, »ç¿ëÀÚ¿¡ ÀÇÇØ ½ÇÇàµÇ´Â ³·Àº Ç°ÁúÀÇ ¼­ºñ½º°¡ ¾Æ´Ï¶ó´Â °ÍÀ» ¹ÏÀ» ¼ö ÀÖ´Ù. IANA¿¡ ÀÇÇØ ºÐ·ùµÈ Àß ¾Ë·ÁÁø Æ÷Æ® ¹øÈ£´Â ÀϹÝÀûÀ¸·Î ·çÆ® ¹üÀ§¿¡ À§Ä¡ÇÑ´Ù. The presence of an entry for a service in the services ÆÄÀÏ »ó¿¡ ¼­ºñ½º¸¦ À§ÇÑ ¾ØÆ®¸®°¡ Á¸ÀçÇÑ´Ù´Â °ÍÀº ²À ¼­ºñ½º°¡ ÇöÁ¦ ÄÄÇ»ÅÍ »ó¿¡¼­ ½ÇÇàµÇ°í ÀÖ´Ù´Â °ÍÀ» ¶æÇÏÁø ¾Ê´Â´Ù. Á¦°øµÇ´Â ÀÎÅÍ³Ý ¼­ºñ½ºÀÇ ÇüŸ¦ ¾Ë·Á¸é inetd.conf(5) ¸¦ ÂüÁ¶Ç϶ó. ¸ðµç ³×Æ®¿öÅ· ¼­ºñ½º°¡ inetd(8), ¿¡ ÀÇÇØ ½ÃÀÛµÈ °Íµµ ¾Æ´Ï°í, inetd.conf(5). ¿¡ Àû¿ëµÇ´Â °Íµµ ¾Æ´Ï¶ó´Â °ÍÀ» »ó±âÇÏÀÚ. ƯÈ÷, ´º½º (NNTP)¿Í ¸ÞÀÏ (SMTP) ¼­¹ö´Â Á¾Á¾ ½Ã½ºÅÛ ºÎÆ® ½ºÅ©¸³Æ®·Î ½ÃÀ۵ȴÙ. The location of the services ÆÄÀÏÀÇ À§Ä¡´Â /usr/include/netdb.h ¿¡ ÀÖ´Â _PATH_SERVICES ¿¡ ÀÇÇØ Á¤ÀǵȴÙ. ÀÌ°ÍÀº º¸Åë /etc/services. ·Î ¼³Á¤µÈ´Ù. °¢°¢ÀÇ ¶óÀÎÀº ÇϳªÀÇ ¼­ºñ½º¸¦ Ç¥ÇöÇÏ°í, ¾Æ·¡¿Í °°Àº ÇüŸ¦ °¡Áø´Ù:
service-name   port/protocol   [aliases ...]
°¢°¢ÀÇ Ç׸ñÀº:
service-name
Àº ¼­ºñ½º°¡ ¾Ë·ÁÁö°í, ³Î¸® ÆÛÁø Ä£±ÙÇÑ À̸§ÀÌ´Ù. ÀÌ°ÍÀº ¹Î°¨ÇÑ °æ¿ìÀÌ´Ù. Á¾Á¾ service-name µÚ¿¡ Ŭ¶óÀ̾ðÆ® ÇÁ·Î±×·¥ÀÇ À̸§ÀÌ µé¾î°¡±âµµ ÇÑ´Ù.
port
´Â ÀÌ ¼­¹ö°¡ »ç¿ëÇÏ´Â Æ÷Æ® ¹øÈ£ÀÌ´Ù.(½ÊÁø¼ö)
protocol
Àº »ç¿ëµÇ´Â ÇÁ·ÎÅäÄÝÀÇ Å¸ÀÔÀÌ´Ù. ÀÌ Ç׸ñÀº protocols(5) ÆÄÀÏ¿¡ ÀÖ´Â ¿£Æ®¸®¿Í ¸Â¾Æ¾ßÇÑ´Ù. ÀϹÝÀûÀΠŸÀÔÀº tcp ¿Í udp °¡ ÀÖ´Ù.
aliases
´Â ÀÌ ¼­ºñ½º¸¦ À§ÇÑ ´Ù¸¥ À̸§µéÀÇ ¸®½ºÆ®µé°ú ±¸ºÐµÇ´Â ¼±ÅÃÀûÀÎ °ø°£ ȤÀº ÅÜÀÌ´Ù. (¾Æ·¡ ¹ö±×¶õÀ» ÂüÁ¶ÇÏÀÚ). ÀÌ À̸§µµ ¹Î°¨ÇÑ °æ¿ìÀÌ´Ù.

°ø°£À̳ª ÅÜÀ̳ª ¿µ¿ªÀ» ³ª´©´Âµ¥ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ÁÖ¼®Àº hash sign (#)À¸·Î ½ÃÀÛÇؼ­ ±× ÁÙÀÇ ³¡±îÁö °è¼ÓµÈ´Ù. ºó ÁÙÀº ³Ñ¾î°£´Ù. service-name ´Â ÆÄÀÏÀÇ Ã¹¹ø° ¿­¿¡¼­ ½ÃÀÛÇØ¾ß ÇÑ´Ù. ¿Ö³ÄÇϸé ù °ø°£Àº Áö¿ìÁö ¾Ê±â ¶§¹®ÀÌ´Ù. service-names Àº ºó°ø°£°ú ÅÜÀ» Á¦¿ÜÇÏ°ï ¾î¶² Ãâ·Â °¡´ÉÇÑ ¹®ÀÚ¶óµµ µÈ´Ù. ÇÏÁö¸¸ ¹®ÀÚ¸¦ Æò¹üÇÏ°Ô ¼±ÅÃÇÏ´Â °ÍÀÌ Á¾Á¾ ³»ºÎ¿¡¼­ ÀϾ´Â ¹®Á¦¸¦ ÃÖ¼ÒÈ­ ½ÃÄÑÁֱ⵵ ÇÑ´Ù. Eg: a-z, 0-9, ±×¸®°í ÇÏÀÌÇÂ(-)Àº ÇÕ¸®ÀûÀÎ ¼±ÅÃÀÌ´Ù. ÆÄÀÏ ¾È¿¡ ¸ðµç ¶óÀÎÀº ÀÌ ÇüŸ¦ µû¸¥´Ù. (ÀϹÝÀûÀ¸·Î, getservent(3), getservbyname(3), getservbyport(3). ´Â ±×°ÍµéÀ» Á¶¿ëÈ÷ ³Ñ¾î´Ù´Ñ´Ù. ÇÏÁö¸¸ ÀÌ ÇൿÀÌ ÀÌ°ÍÀÌ È®½ÇÇÑ °ÍÀº ¾Æ´Ï´Ù.) port ¹øÈ£¿Í protocol À̸§ »çÀÌÀÇ ½½·¡½¬(/)´Â ½½·¡½¬µµ µÇ°í ÄÞ¸¶(,)µµ µÈ´Ù. ÃÖ±Ù ¼³Ä¡¿¡¼± ÄÞ¸¶ÀÇ »ç¿ëÀÌ ÁÙ¾ú´Ù. ÀÌ ÆÄÀÏÀº Yellow Pages.NIS³ª BIND.Hesiod¿Í °°ÀÌ ±ä À̸§ÀÇ ¼­ºñ½º ³×Æ®¿÷À» »ç¿ëÇÏ´Â ³×Æ®¿÷¿¡ ¹èÆ÷µÇ¾ú´Ù. °ßº» services ÆÄÀÏÀº ¾Æ·¡¿Í °°´Ù:



msp             18/tcp          # message send protocol
msp             18/udp          # message send protocol
chargen         19/tcp          ttytst sourcechargen         19/udp          ttytst source
ftp             21/tcp
# 22 - unassigned
telnet          23/tcp

 

¹ö±×

ÃÖ´ë 35°³ÀÇ À̸§ÀÌ ÀÖ´Ù. getservent(3) Äڵ带 ¾²´Â ¹æ¹ý¿¡ ´Þ·ÁÀÖ´Ù.. BUFSIZ (ÀϹÝÀûÀ¸·Î 1024) ¹®ÀÚº¸´Ù ±ä ÁÙÀº getservent(3), getservbyname(3), getservbyport(3). °¡ ¹«½ÃÇÑ´Ù. ÇÏÁö¸¸ ÀÌ°ÍÀº ´ÙÀ½ ÁÙÀ» À߸ø Çؼ®ÇÏ°Ô ÇÑ´Ù.  

ÆÄÀÏ

/etc/services
The Internet network services list.TP /usr/include/netdb.h Definition of _PATH_SERVICES
 

°ü·Ã Ç׸ñ

getservent(3), getservbyname(3), getservbyport(3), setservent(3), endservent(3), protocols(5), listen(2), inetd.conf(5),.BRinetd(8). Assigned Numbers RFC, most recently RFC 1700, (AKA STD0002) Guide to Yellow Pages Service Guide to BIND/Hesiod Service


 

Index

À̸§
¼³¸í
¹ö±×
ÆÄÀÏ
°ü·Ã Ç׸ñ

This document was created by man2html, using the manual pages.
Time: 08:07:01 GMT, March 25, 2004