120 lines
3.7 KiB
HTML
120 lines
3.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>if_indextoname</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
|
|
<basefont size="3"> <a name="if_indextoname"></a> <a name="tag_03_271"></a><!-- if_indextoname -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_03_271_01"></a>NAME</h4>
|
|
|
|
<blockquote>if_indextoname - map a network interface index to its corresponding name</blockquote>
|
|
|
|
<h4><a name="tag_03_271_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<p><code><tt>#include <<a href="../basedefs/net/if.h.html">net/if.h</a>><br>
|
|
<br>
|
|
char *if_indextoname(unsigned</tt> <i>ifindex</i><tt>, char *</tt><i>ifname</i><tt>);<br>
|
|
</tt></code></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>if_indextoname</i>() function shall map an interface index to its corresponding name.</p>
|
|
|
|
<p>When this function is called, <i>ifname</i> shall point to a buffer of at least {IFNAMSIZ} bytes. The function shall place in
|
|
this buffer the name of the interface with index <i>ifindex</i>.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_04"></a>RETURN VALUE</h4>
|
|
|
|
<blockquote>
|
|
<p>If <i>ifindex</i> is an interface index, then the function shall return the value supplied in <i>ifname</i>, which points to a
|
|
buffer now containing the interface name. Otherwise, the function shall return a NULL pointer and set <i>errno</i> to indicate the
|
|
error.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_05"></a>ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>if_indextoname</i>() function shall fail if:</p>
|
|
|
|
<dl compact>
|
|
<dt>[ENXIO]</dt>
|
|
|
|
<dd>The interface does not exist.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_03_271_06"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_07"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_08"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_09"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_10"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="getsockopt.html"><i>getsockopt</i>()</a> , <a href="if_freenameindex.html"><i>if_freenameindex</i>()</a> , <a href=
|
|
"if_nameindex.html"><i>if_nameindex</i>()</a> , <a href="if_nametoindex.html"><i>if_nametoindex</i>()</a> , <a href=
|
|
"setsockopt.html"><i>setsockopt</i>()</a> , the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/net/if.h.html"><i><net/if.h></i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_271_11"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 6. Derived from the XNS, Issue 5.2 specification.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|