00001 /* 00002 ** gethostname.h for lseos in lseos-lib/libc/posix 00003 ** 00004 ** Copyright (c)2004 Vianney Rancurel 00005 ** Login <vianney@epita.fr> 00006 ** 00007 ** Started on Tue Oct 26 11:04:18 2004 Vianney Rancurel 00008 ** Last update Mon Nov 29 18:57:59 2004 Vianney Rancurel 00009 */ 00010 #ifndef __POSIX_GETHOSTNAME_H__ 00011 #define __POSIX_GETHOSTNAME_H__ 1 00012 #include <libc.h> 00013 00014 struct utsname 00015 { 00016 #define SYS_NMLN 256 00017 char sysname[SYS_NMLN]; /* Name of this OS. */ 00018 char nodename[SYS_NMLN]; /* Name of this network node. */ 00019 char release[SYS_NMLN]; /* Release level. */ 00020 char version[SYS_NMLN]; /* Version level. */ 00021 char machine[SYS_NMLN]; /* Hardware type. */ 00022 }; 00023 00024 /* PROTO gethostname.c */ 00025 /* gethostname.c */ 00026 int gethostname(char *name, size_t namelen); 00027 int sethostname(const char *name, size_t namelen); 00028 int getdomainname(char *name, size_t namelen); 00029 int setdomainname(const char *name, size_t namelen); 00030 int uname(struct utsname *name); 00031 #endif