diff options
Diffstat (limited to 'src/lib/libc/net/if_indextoname.3')
-rw-r--r-- | src/lib/libc/net/if_indextoname.3 | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/lib/libc/net/if_indextoname.3 b/src/lib/libc/net/if_indextoname.3 index e7bfde4900..b0545a5060 100644 --- a/src/lib/libc/net/if_indextoname.3 +++ b/src/lib/libc/net/if_indextoname.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: if_indextoname.3,v 1.8 2005/02/25 03:12:43 cloder Exp $ | 1 | .\" $OpenBSD: if_indextoname.3,v 1.9 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" Copyright (c) 1983, 1991, 1993 | 2 | .\" Copyright (c) 1983, 1991, 1993 |
3 | .\" The Regents of the University of California. All rights reserved. | 3 | .\" The Regents of the University of California. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -38,6 +38,7 @@ | |||
38 | .Nm if_freenameindex | 38 | .Nm if_freenameindex |
39 | .Nd convert interface index to name, and vice versa | 39 | .Nd convert interface index to name, and vice versa |
40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS |
41 | .Fd #include <sys/socket.h> | ||
41 | .Fd #include <net/if.h> | 42 | .Fd #include <net/if.h> |
42 | .Ft "unsigned int" | 43 | .Ft "unsigned int" |
43 | .Fn if_nametoindex "const char *ifname" | 44 | .Fn if_nametoindex "const char *ifname" |
@@ -81,16 +82,16 @@ is returned. | |||
81 | .Pp | 82 | .Pp |
82 | .Fn if_nameindex | 83 | .Fn if_nameindex |
83 | returns an array of | 84 | returns an array of |
84 | .Fa if_nameindex | 85 | .Vt if_nameindex |
85 | structures. | 86 | structures. |
86 | .Fa if_nametoindex | 87 | .Vt if_nameindex |
87 | is also defined in | 88 | is also defined in |
88 | .Aq Pa net/if.h , | 89 | .Aq Pa net/if.h , |
89 | and is as follows: | 90 | and is as follows: |
90 | .Bd -literal -offset | 91 | .Bd -literal -offset indent |
91 | struct if_nameindex { | 92 | struct if_nameindex { |
92 | unsigned int if_index; /* 1, 2, ... */ | 93 | unsigned int if_index; /* 1, 2, ... */ |
93 | char *if_name; /* NUL-terminated name: "le0", ... */ | 94 | char *if_name; /* NUL-terminated name */ |
94 | }; | 95 | }; |
95 | .Ed | 96 | .Ed |
96 | .Pp | 97 | .Pp |
@@ -128,9 +129,15 @@ on errors. | |||
128 | .Sh SEE ALSO | 129 | .Sh SEE ALSO |
129 | .Xr getifaddrs 3 , | 130 | .Xr getifaddrs 3 , |
130 | .Xr networking 4 | 131 | .Xr networking 4 |
131 | .Pp | 132 | .Rs |
132 | R. Gilligan, S. Thomson, J. Bound, and W. Stevens, | 133 | .%A R. Gilligan |
133 | ``Basic Socket Interface Extensions for IPv6,'' RFC 2553, March 1999. | 134 | .%A S. Thomson |
135 | .%A J. Bound | ||
136 | .%A W. Stevens | ||
137 | .%T Basic Socket Interface Extensions for IPv6 | ||
138 | .%R RFC 2553 | ||
139 | .%D March 1999 | ||
140 | .Re | ||
134 | .Sh STANDARDS | 141 | .Sh STANDARDS |
135 | These functions are defined in ``Basic Socket Interface Extensions for IPv6'' | 142 | These functions are defined in ``Basic Socket Interface Extensions for IPv6'' |
136 | .Pq RFC 2533 . | 143 | .Pq RFC 2533 . |