GETHOSTNAME
Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Þ´º¾ó (2)
Updated: 1995³â 7¿ù 22ÀÏ
Index
Return to Main Contents
À̸§
gethostname, sethostname - È£½ºÆ®ÀÇ À̸§À» ¾Ë¾Æ³»°Å³ª ¼³Á¤ÇÑ´Ù.
»ç¿ë¹ý
#include <unistd.h>
int gethostname(char *name, size_t len);
int sethostname(const char *name, size_t len);
¼³¸í
ÀÌ ÇÔ¼öµéÀº ÇöÀç ÇÁ·Î¼¼¼(processor)ÀÇ È£½ºÆ® À̸§À» Á¢±ÙÇϰųª º¯°æ½Ãų¶§ »ç¿ëµÈ´Ù.
¹Ýȯ°ª
¼º°ø½Ã, 0ÀÌ ¸®ÅϵȴÙ. ¿¡·¯½Ã, -1ÀÌ ¸®ÅϵǸç,
errno´Â
Àû´çÇÑ °ªÀ¸·Î ¼³Á¤µÈ´Ù.
¿¡·¯
- EINVAL
-
len°¡
À½¼öÀ̰ųª,
sethostname½Ã¿¡
lenÀÌ
ÃÖ´ë Çã¿ë°ªº¸´Ù Å©°Å³ª,
Linux/i386¿¡¼
gethostname½Ã¿¡
lenÀÌ
½ÇÁ¦ Å©±âº¸´Ù ÀÛ´Ù.
- EPERM
-
sethostname¿¡¼,
È£ÃâÇÏ´Â ÇÁ·Î¼¼½ºÀÇ ±ÇÇÑÀÌ ½´ÆÛ À¯Àú°¡ ¾Æ´Ï´Ù.
- EFAULT
-
nameÀÌ
À¯È¿ÇÑ ÁÖ¼Ò°¡ ¾Æ´Ï´Ù.
ȣȯ
SVr4, 4.4BSD (ÀÌ ÇÔ¼ö´Â 4.2BSD¿¡¼ óÀ½À¸·Î ³ªÅ¸³µ´Ù).
POSIX.1Àº ÀÌ ÇÔ¼ö¸¦ Á¤ÀÇÇÏÁö ¾Ê¾Ò´Ù. ±×·¯³ª,
ISO/IEC 9945-1:1990´Â B.4.4.1¿¡¼ ¾ð±ÞÇÏ¿´´Ù.
¹ö±×
gethostnameÀÇ
´Ù¸¥ ±¸Çö¿¡¼´Â
nameÀÌ
±æ ¶§ Á¶Â÷µµ,
len
¹ÙÀÌÆ®¸¦ ¼º°øÀûÀ¸·Î ¸®ÅÏÇÑ´Ù.
Linux/Alpha´Â ÀÌ·± ¹æ¹ýÀ¸·Î ÄÄÆÄÀϵȴÙ.
±×·¯³ª, Linux/i386´Â ÀÌ·± °æ¿ì
EINVAL¸¦
¸®ÅÏÇÑ´Ù.
ÁÖÀÇ
Linux/Alpha¿¡¼,
gethostname˼
½Ã½ºÅÛ ÄÝÀÌ´Ù.
Linux/i386¿¡¼,
gethostname´Â
uname(2)À»
È£ÃâÇÏ¿© ¶óÀ̺귯¸® Â÷¿ø¿¡¼ ¼öÇàµÈ´Ù.
°ü·Ã Ç׸ñ
getdomainname(2),
setdomainname(2),
uname(2)
¿ªÀÚ
Á¤°ÈÆ <skyeyes@soback.kornet.net>, 2000³â 5¿ù 2ÀÏ
Index
- À̸§
-
- »ç¿ë¹ý
-
- ¼³¸í
-
- ¹Ýȯ°ª
-
- ¿¡·¯
-
- ȣȯ
-
- ¹ö±×
-
- ÁÖÀÇ
-
- °ü·Ã Ç׸ñ
-
- ¿ªÀÚ
-
This document was created by
man2html,
using the manual pages.
Time: 08:07:00 GMT, March 25, 2004