⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscalls_44.html

📁 Linux系统调用
💻 HTML
字号:
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - getdomainname</TITLE>
<P>Go to the <A HREF="syscalls_43.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_43.html">previous</A>, <A HREF="syscalls_45.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_45.html">next</A> section.<P>
<H2><A NAME="SEC44" HREF="syscalls_toc.html#SEC44" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC44">getdomainname and setdomainname</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int getdomainname(char *<VAR>name</VAR>, size_t <VAR>len</VAR>);</CODE>
<P>
<CODE>int setdomainname(const char *<VAR>name</VAR>, size_t <VAR>len</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>name</VAR>: (For <CODE>getdomainname</CODE>) [out] points to a buffer where to
save the domain name. (For <CODE>setdomainname</CODE>) [in] points to a buffer
containing the new domain name.
<P>
<VAR>len</VAR>: [in] the maximum length of <VAR>name</VAR>.
<P>
<H3>DESCRIPTION</H3>
<P>
Those calls get or set the machine's domainname.
<P>
<H3>RETURN VALUE</H3>
<P>
On success zero is returned. On error, -1 is returned and <CODE>errno</CODE> is
set to one of the following values:
<P>
In the case of <CODE>getdomainname</CODE>: <CODE>EINVAL</CODE>: <VAR>name</VAR> is
<CODE>NULL</CODE> or the domain name is longer than <VAR>len</VAR>.
<P>
In the case of <CODE>setdomainname</CODE>:
<P>
<UL>
<LI><CODE>EPERM</CODE>: the caller is not superuser.
<LI><CODE>EINVAL</CODE>: <VAR>len</VAR> is too long.
</UL>
<P>
<P>Go to the <A HREF="syscalls_43.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_43.html">previous</A>, <A HREF="syscalls_45.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_45.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -