summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraaron <>2000-02-23 17:04:32 +0000
committeraaron <>2000-02-23 17:04:32 +0000
commitfa44c6e09caa5d89451c8803d8e57259b7c6d501 (patch)
tree0d065539f52eaf28441b8e3cdb850e9411dcae75
parentc8f8fcd5d63235b42dbae0cf029c1939e98d40b5 (diff)
downloadopenbsd-fa44c6e09caa5d89451c8803d8e57259b7c6d501.tar.gz
openbsd-fa44c6e09caa5d89451c8803d8e57259b7c6d501.tar.bz2
openbsd-fa44c6e09caa5d89451c8803d8e57259b7c6d501.zip
- Put structure field descriptions in a tagged list.
- More mdoc macros where appropriate. - Mention OpenBSD in HISTORY.
-rw-r--r--src/lib/libc/net/getifaddrs.399
1 files changed, 46 insertions, 53 deletions
diff --git a/src/lib/libc/net/getifaddrs.3 b/src/lib/libc/net/getifaddrs.3
index c081a0602c..09088f482d 100644
--- a/src/lib/libc/net/getifaddrs.3
+++ b/src/lib/libc/net/getifaddrs.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getifaddrs.3,v 1.2 2000/02/23 15:39:53 itojun Exp $ 1.\" $OpenBSD: getifaddrs.3,v 1.3 2000/02/23 17:04:32 aaron Exp $
2.\" BSDI getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp 2.\" BSDI getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp
3.\" 3.\"
4.\" Copyright (c) 1995, 1999 4.\" Copyright (c) 1995, 1999
@@ -58,66 +58,57 @@ structure contains at least the following entries:
58 void *ifa_data; /* Address specific data */ 58 void *ifa_data; /* Address specific data */
59.Ed 59.Ed
60.Pp 60.Pp
61The 61.Bl -tag -width Ds
62.Li ifa_next 62.It Fa ifa_next
63field contains a pointer to the next structure on the list. 63Contains a pointer to the next structure on the list.
64This field is 64This field is set to
65.Dv NULL 65.Dv NULL
66in last structure on the list. 66in last structure on the list.
67.Pp 67.It Fa ifa_name
68The 68Contains the interface name.
69.Li ifa_name 69.It Fa ifa_flags
70field contains the interface name. 70Contains the interface flags, as set by
71.Pp 71.Xr ifconfig 8 .
72The 72.It Fa ifa_addr
73.Li ifa_flags 73References either the address of the interface or the link level
74field contains the interface flags, as set by 74address of the interface, if one exists, otherwise it is
75.Xr ifconfig 8 75.Dv NULL .
76utility.
77.Pp
78The
79.Li ifa_addr
80field references either the address of the interface or the link level
81address of the interface, if one exists, otherwise it is NULL.
82(The 76(The
83.Li sa_family 77.Fa sa_family
84field of the 78field of the
85.Li ifa_addr 79.Fa ifa_addr
86field should be consulted to determine the format of the 80field should be consulted to determine the format of the
87.Li ifa_addr 81.Fa ifa_addr
88address.) 82address.)
89.Pp 83.It Fa ifa_netmask
90The 84References the netmask associated with
91.Li ifa_netmask 85.Fa ifa_addr ,
92field references the netmask associated with 86if one is set, otherwise it is
93.Li ifa_addr , 87.Dv NULL .
94if one is set, otherwise it is NULL. 88.It Fa ifa_broadaddr
95.Pp 89This field, which should only be referenced for non-P2P interfaces,
96The
97.Li ifa_broadaddr
98field,
99which should only be referenced for non-P2P interfaces,
100references the broadcast address associated with 90references the broadcast address associated with
101.Li ifa_addr , 91.Fa ifa_addr ,
102if one exists, otherwise it is NULL. 92if one exists, otherwise it is
103.Pp 93.Dv NULL .
104The 94.It Fa ifa_dstaddr
105.Li ifa_dstaddr 95References the destination address on a P2P interface,
106field references the destination address on a P2P interface, 96if one exists, otherwise it is
107if one exists, otherwise it is NULL. 97.Dv NULL .
108.Pp 98.It Fa ifa_data
109The 99References address family specific data. For
110.Li ifa_data
111field references address family specific data. For
112.Dv AF_LINK 100.Dv AF_LINK
113addresses it contains a pointer to the 101addresses it contains a pointer to the
114.Fa struct if_data 102.Li struct if_data
115.Pq as defined in include file Aq Pa net/if.h 103(as defined in include file
104.Aq Pa net/if.h )
116which contains various interface attributes and statistics. 105which contains various interface attributes and statistics.
117For all other address families, it contains a pointer to the 106For all other address families, it contains a pointer to the
118.Fa struct ifa_data 107.Li struct ifa_data
119.Pq as defined in include file Aq Pa net/if.h 108(as defined in include file
109.Aq Pa net/if.h )
120which contains per-address interface statistics. 110which contains per-address interface statistics.
111.El
121.Pp 112.Pp
122The data returned by 113The data returned by
123.Fn getifaddrs 114.Fn getifaddrs
@@ -126,7 +117,7 @@ is dynamically allocated and should be freed using
126when no longer needed. 117when no longer needed.
127.Sh RETURN VALUES 118.Sh RETURN VALUES
128Upon successful completion, a value of 0 is returned. 119Upon successful completion, a value of 0 is returned.
129Otherwise, a value of -1 is returned and 120Otherwise, a value of \-1 is returned and
130.Va errno 121.Va errno
131is set to indicate the error. 122is set to indicate the error.
132.Sh ERRORS 123.Sh ERRORS
@@ -137,7 +128,7 @@ may fail and set
137for any of the errors specified for the library routines 128for any of the errors specified for the library routines
138.Xr ioctl 2 , 129.Xr ioctl 2 ,
139.Xr socket 2 , 130.Xr socket 2 ,
140.Xr malloc 3 131.Xr malloc 3 ,
141or 132or
142.Xr sysctl 3 . 133.Xr sysctl 3 .
143.Sh BUGS 134.Sh BUGS
@@ -158,5 +149,7 @@ be included before
158.Xr ifconfig 8 149.Xr ifconfig 8
159.Sh HISTORY 150.Sh HISTORY
160The 151The
161.Nm 152.Fn getifaddrs
162implementation first appeared in BSDI BSD/OS. 153function first appeared in BSDI BSD/OS.
154This implementation first appeared in
155.Ox 2.7 .