GETSERVENT

Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Å´º¾ó (3)
Updated: 1996³â 4¿ù 22ÀÏ
Index
Return to Main Contents
 

À̸§

getservent, getservbyname, getservbyport, setservent, endservent - ¼­ºñ½º ¿£Æ®¸®¸¦ °¡Á®¿Â´Ù.  

»ç¿ë¹ý

#include <netdb.h>

struct servent *getservent(void);

struct servent *getservbyname(const char *name, const char *proto);

struct servent *getservbyport(int port, const char *proto);

void setservent(int stayopen);

void endservent(void);
 

¼³¸í

getservent() ÇÔ¼ö´Â ÆÄÀÏ /etc/services¿¡¼­ ´ÙÀ½ ¶óÀÎÀ» ÀÐ°í ±× ¶óÀο¡¼­ »Ì¾Æ³½ ÇʵåµéÀ» Æ÷ÇÔÇÏ´Â ±¸Á¶Ã¼ servent¸¦ ¹ÝÇÑÇÑ´Ù. /etc/services ÆÄÀÏÀº ÇÊ¿äÇÏ´Ù¸é ¿­·ÁÁø´Ù.

getservbyname() ÇÔ¼ö´Â /etc/services¿¡¼­ ÇÁ·ÎÅäÄÝ protoÀ» »ç¿ëÇÏ¸ç ¼­ºñ½º name °ú ÀÏÄ¡ÇÏ´Â ¶óÀο¡ ÇØ´çÇÏ´Â servent ±¸Á¶Ã¼¸¦ ¹ÝȯÇÑ´Ù.

getservbyport() ÇÔ¼ö´Â ÇÁ·ÎÅäÄÝ protoÀ» »ç¿ëÇÏ¸ç ³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­·Î ÁÖ¾îÁø Æ÷Æ® port°ú ÀÏÄ¡ÇÏ´Â servent ±¸Á¶Ã¼¸¦ ¹ÝȯÇÑ´Ù.

setservent() ÇÔ¼ö´Â /etc/services ÆÄÀÏÀ» ¿­°í ´Ù½Ã ¿ø·¡´ë·Î µ¹·Á³õ´Â´Ù. ¸¸ÀÏ stayopen °¡ Âü(1)À̶ó¸é, ÆÄÀÏÀº getservbyname() °ú getservbyport() È£Ãâ½Ã ´ÝÇôÁöÁö ¾Ê´Â´Ù.

endservent() ÇÔ¼ö´Â /etc/services¸¦ ´Ý´Â´Ù.

servent ±¸Á¶Ã¼´Â ´ÙÀ½Ã³·³ <netdb.h>¿¡ Á¤ÀǵǾî ÀÖ´Ù:


struct servent {
        char    *s_name;        /* °ø½ÄÀûÀÎ ¼­ºñ½º À̸§ */
        char    **s_aliases;    /* º°Äª ¸®½ºÆ® */
        int     s_port;         /* Æ÷Æ® ¹øÈ£ */
        char    *s_proto;       /* »ç¿ëÇÏ´Â ÇÁ·ÎÅäÄÝ */
}

servent ±¸Á¶Ã¼ÀÇ ¸â¹ö´Â:

s_name
¼­ºñ½ºÀÇ °ø½ÄÀûÀÎ À̸§.
s_aliases
¼­ºñ½º¸¦ À§ÇØ ¼±ÅÃÇÒ¼ö ÀÖ´Â ³Î·Î Á¾·áµÈ ¸®½ºÆ®
s_port
³×Æ®¿÷ ¹ÙÀÌÆ® ¼ø¼­·Î ÁÖ¾îÁø ¼­ºñ½ºÀÇ Æ÷Æ® ¹øÈ£
s_proto
ÀÌ ¼­ºñ½º¿¡¼­ »ç¿ëÇÏ´Â ÇÁ·ÎÅäÄÝ À̸§
 

¹Ýȯ°ª

getservent(), getservbyname() ±×¸®°í getservbyport() ÇÔ¼ö´Â servent ±¸Á¶Ã¼¸¦ ¹ÝȯÇϰųª, ¸¸ÀÏ ¿¡·¯°¡ ÀϾ°Å³ª ÆÄÀÏÀÇ ³¡¿¡ µµÂøÇÑ´Ù¸é NULL Æ÷ÀÎÅ͸¦ ¹ÝȯÇÑ´Ù.  

ÆÄÀÏ

/etc/services
¼­ºñ½º µ¥ÀÌÅÍ ÆÄÀÏ
 

ȣȯ

BSD 4.3  

°ü·Ã Ç׸ñ

getprotoent(3), getnetent(3), services(5)  

¿ªÀÚ

Á¤°­ÈÆ <skyeyes@soback.kornet.net>, 2001³â 4¿ù 30ÀÏ


 

Index

À̸§
»ç¿ë¹ý
¼³¸í
¹Ýȯ°ª
ÆÄÀÏ
ȣȯ
°ü·Ã Ç׸ñ
¿ªÀÚ

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