diff options
author | aaron <> | 2000-02-23 17:04:32 +0000 |
---|---|---|
committer | aaron <> | 2000-02-23 17:04:32 +0000 |
commit | fa44c6e09caa5d89451c8803d8e57259b7c6d501 (patch) | |
tree | 0d065539f52eaf28441b8e3cdb850e9411dcae75 | |
parent | c8f8fcd5d63235b42dbae0cf029c1939e98d40b5 (diff) | |
download | openbsd-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.3 | 99 |
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 |
61 | The | 61 | .Bl -tag -width Ds |
62 | .Li ifa_next | 62 | .It Fa ifa_next |
63 | field contains a pointer to the next structure on the list. | 63 | Contains a pointer to the next structure on the list. |
64 | This field is | 64 | This field is set to |
65 | .Dv NULL | 65 | .Dv NULL |
66 | in last structure on the list. | 66 | in last structure on the list. |
67 | .Pp | 67 | .It Fa ifa_name |
68 | The | 68 | Contains the interface name. |
69 | .Li ifa_name | 69 | .It Fa ifa_flags |
70 | field contains the interface name. | 70 | Contains the interface flags, as set by |
71 | .Pp | 71 | .Xr ifconfig 8 . |
72 | The | 72 | .It Fa ifa_addr |
73 | .Li ifa_flags | 73 | References either the address of the interface or the link level |
74 | field contains the interface flags, as set by | 74 | address of the interface, if one exists, otherwise it is |
75 | .Xr ifconfig 8 | 75 | .Dv NULL . |
76 | utility. | ||
77 | .Pp | ||
78 | The | ||
79 | .Li ifa_addr | ||
80 | field references either the address of the interface or the link level | ||
81 | address of the interface, if one exists, otherwise it is NULL. | ||
82 | (The | 76 | (The |
83 | .Li sa_family | 77 | .Fa sa_family |
84 | field of the | 78 | field of the |
85 | .Li ifa_addr | 79 | .Fa ifa_addr |
86 | field should be consulted to determine the format of the | 80 | field should be consulted to determine the format of the |
87 | .Li ifa_addr | 81 | .Fa ifa_addr |
88 | address.) | 82 | address.) |
89 | .Pp | 83 | .It Fa ifa_netmask |
90 | The | 84 | References the netmask associated with |
91 | .Li ifa_netmask | 85 | .Fa ifa_addr , |
92 | field references the netmask associated with | 86 | if one is set, otherwise it is |
93 | .Li ifa_addr , | 87 | .Dv NULL . |
94 | if one is set, otherwise it is NULL. | 88 | .It Fa ifa_broadaddr |
95 | .Pp | 89 | This field, which should only be referenced for non-P2P interfaces, |
96 | The | ||
97 | .Li ifa_broadaddr | ||
98 | field, | ||
99 | which should only be referenced for non-P2P interfaces, | ||
100 | references the broadcast address associated with | 90 | references the broadcast address associated with |
101 | .Li ifa_addr , | 91 | .Fa ifa_addr , |
102 | if one exists, otherwise it is NULL. | 92 | if one exists, otherwise it is |
103 | .Pp | 93 | .Dv NULL . |
104 | The | 94 | .It Fa ifa_dstaddr |
105 | .Li ifa_dstaddr | 95 | References the destination address on a P2P interface, |
106 | field references the destination address on a P2P interface, | 96 | if one exists, otherwise it is |
107 | if one exists, otherwise it is NULL. | 97 | .Dv NULL . |
108 | .Pp | 98 | .It Fa ifa_data |
109 | The | 99 | References address family specific data. For |
110 | .Li ifa_data | ||
111 | field references address family specific data. For | ||
112 | .Dv AF_LINK | 100 | .Dv AF_LINK |
113 | addresses it contains a pointer to the | 101 | addresses 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 ) | ||
116 | which contains various interface attributes and statistics. | 105 | which contains various interface attributes and statistics. |
117 | For all other address families, it contains a pointer to the | 106 | For 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 ) | ||
120 | which contains per-address interface statistics. | 110 | which contains per-address interface statistics. |
111 | .El | ||
121 | .Pp | 112 | .Pp |
122 | The data returned by | 113 | The data returned by |
123 | .Fn getifaddrs | 114 | .Fn getifaddrs |
@@ -126,7 +117,7 @@ is dynamically allocated and should be freed using | |||
126 | when no longer needed. | 117 | when no longer needed. |
127 | .Sh RETURN VALUES | 118 | .Sh RETURN VALUES |
128 | Upon successful completion, a value of 0 is returned. | 119 | Upon successful completion, a value of 0 is returned. |
129 | Otherwise, a value of -1 is returned and | 120 | Otherwise, a value of \-1 is returned and |
130 | .Va errno | 121 | .Va errno |
131 | is set to indicate the error. | 122 | is set to indicate the error. |
132 | .Sh ERRORS | 123 | .Sh ERRORS |
@@ -137,7 +128,7 @@ may fail and set | |||
137 | for any of the errors specified for the library routines | 128 | for 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 , |
141 | or | 132 | or |
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 |
160 | The | 151 | The |
161 | .Nm | 152 | .Fn getifaddrs |
162 | implementation first appeared in BSDI BSD/OS. | 153 | function first appeared in BSDI BSD/OS. |
154 | This implementation first appeared in | ||
155 | .Ox 2.7 . | ||