GETNETENT

Section: Linux Programmer's Manual (3)
Updated: May 15, 1993
Index
Return to Main Contents
 

À̸§

getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent - ³×Æ®¿÷ ¿£Æ®¸®¸¦ °¡Á®¿Â´Ù.  

»ç¿ë¹ý

#include <netdb.h>

struct netent *getnetent(void);

struct netent *getnetbyname(const char *name);

struct netent *getnetbyaddr(long net, int type);

void setnetent(int stayopen);

void endnetent(void);
 

¼³¸í

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

getnetbyname() ÇÔ¼ö´Â /etc/networks¿¡¼­ ³×Æ®¿÷ name°ú ÀÏÄ¡ÇÏ´Â ¶óÀο¡ ÇØ´çÇÏ´Â netent ±¸Á¶Ã¼¸¦ ¹ÝȯÇÑ´Ù.

getnetbyaddr() ÇÔ¼ö´Â ŸÀÔ typeÀÇ ³×Æ®¿÷ ¹øÈ£ net°ú ÀÏÄ¡ÇÏ´Â ¶óÀο¡ ÇØ´çÇÏ´Â netent ±¸Á¶Ã¼¸¦ ¹ÝȯÇÑ´Ù.

setnetent() ÇÔ¼ö´Â /etc/networks ÆÄÀÏÀ» ¿­°í µÇ °¨´Â´Ù. ¸¸ÀÏ stayopen ÀÌ Âü(1)À̶ó¸é, ÆÄÀÏÀº getnetbyname() °ú getnetbyaddr() È£Ãâ½Ã ´ÝÇôÁöÁö ¾ÊÀ» °ÍÀÌ´Ù.

endservent() ÇÔ¼ö´Â /etc/networksÀ» ´Ý´Â´Ù.

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


struct netent {
        char    *n_name;          /* °ø½ÄÀûÀÎ ³×Æ®¿÷ À̸§ */
        char    **n_aliases;      /* º°Äª À̸§ */
        int     n_addrtype;       /* net ÁÖ¼Ò Å¸ÀÔ */
        unsigned long int n_net;  /* ³×Æ®¿÷ ¹øÈ£ */
}

netent ±¸Á¶Ã¼ ¸â¹ö´Â:

n_name
³×Æ®¿÷ÀÇ °ø½ÄÀûÀÎ À̸§
n_aliases
³×Æ®¿÷À» À§ÇØ ¼±ÅÃÇÒ¼ö ÀÖ´Â ³Î·Î Á¾·áµÈ ¸®½ºÆ®
n_addrtype
³×Æ®¿÷ ¹øÈ£ÀÇ Å¸ÀÔ; Ç×»ó AF_INET.
n_net
È£½ºÆ® ¹ÙÀÌÆ® ¼ø¼­·Î µÈ ³×Æ®¿÷ ¹øÈ£.
 

¹Ýȯ°ª

getnetent(), getnetbyname() ±×¸®°í getnetbyaddr() ÇÔ¼ö´Â netent ±¸Á¶Ã¼¸¦ ¹ÝȯÇϰųª, ¸¸ÀÏ ¿¡·¯°¡ ¹ß»ýÇϰųª ÆÄÀÏÀÇ ³¡¿¡ µµÂøÇÑ´Ù¸é NULL Æ÷ÀÎÅ͸¦ ¹ÝȯÇÑ´Ù.  

ÆÄÀÏ

/etc/networks ³×Æ®¿÷ µ¥ÀÌÅͺ£À̽º ÆÄÀÏ  

ȣȯ

BSD 4.3  

°ü·Ã Ç׸ñ

getprotoent(3), getservent(3), networks(5)
RFC 1101  

¿ªÀÚ

Á¤°­ÈÆ <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