samba - update to version 4.21.2
[oi-userland.git] / components / library / libdnet / patches / 02-dnet.3.patch
blob4ff90b18dcc2ffc82cc4837716633b26e7be34be
1 --- libdnet-libdnet-1.14/man/dnet.3.orig 2020-07-17 18:56:28.000000000 +0000
2 +++ libdnet-libdnet-1.14/man/dnet.3 2021-09-12 15:14:12.657877359 +0000
3 @@ -181,26 +181,295 @@
4 .Pp
5 .Sh DESCRIPTION
6 .Nm
8 +.TH "DNET" "3" "August 21, 2001" "SunOS 5.11" "Library Functions Manual"
9 +.SH "NAME"
10 +\fBdnet\fP
11 +\- dumb networking library
12 +.SH "SYNOPSIS"
13 +#include <dnet.h>
14 +.SS "Network addressing"
15 +.LP
16 +.nf
17 +int
18 +addr_cmp(const struct addr *a, const struct addr *b);
20 +int
21 +addr_bcast(const struct addr *a, struct addr *b);
23 +int
24 +addr_net(const struct addr *a, struct addr *b);
26 +char *
27 +addr_ntop(const struct addr *src, char *dst size_t size);
29 +int
30 +addr_pton(const char *src, struct addr *dst);
32 +char *
33 +addr_ntoa(const struct addr *a);
35 +int
36 +addr_aton(const char *src, struct addr *dst);
38 +int
39 +addr_ntos(const struct addr *a, struct sockaddr *sa);
41 +int
42 +addr_ston(const struct sockaddr *sa, struct addr *a);
44 +int
45 +addr_btos(uint16_t bits, struct sockaddr *sa);
47 +int
48 +addr_stob(const struct sockaddr *sa, uint16_t *bits);
50 +int
51 +addr_btom(uint16_t bits, void *mask, size_t size);
53 +int
54 +addr_mtob(const void *mask, size_t size, uint16_t *bits);
55 +.fi
56 +.SS "Address Resolution Protocol"
57 +.LP
58 +.nf
59 +typedef int (*arp_handler)(const struct arp_entry *entry, void *arg);
61 +arp_t *
62 +arp_open(void);
64 +int
65 +arp_add(arp_t *a, const struct arp_entry *entry);
67 +int
68 +arp_delete(arp_t *a, const struct arp_entry *entry);
70 +int
71 +arp_get(arp_t *a, struct arp_entry *entry);
73 +int
74 +arp_loop(arp_t *a, arp_handler callback, void *arg);
76 +arp_t *
77 +arp_close(arp_t *a);
78 +.fi
79 +.SS "Binary buffers"
80 +.LP
81 +.nf
82 +blob_t *
83 +blob_new(void);
85 +int
86 +blob_read(blob_t *b, void *buf, int len);
88 +int
89 +blob_write(blob_t *b, const void *buf, int len);
91 +int
92 +blob_seek(blob_t *b, int off, int whence);
94 +int
95 +blob_index(blob_t *b, const void *buf, int len);
97 +int
98 +blob_rindex(blob_t *b, const void *buf, int len);
100 +int
101 +blob_pack(blob_t *b, const void *fmt, ...);
103 +int
104 +blob_unpack(blob_t *b, const void *fmt, ...);
106 +int
107 +blob_print(blob_t *b, char *style, int len);
109 +blob_t *
110 +blob_free(blob_t *b);
111 +.fi
112 +.SS "Ethernet"
113 +.LP
114 +.nf
115 +eth_t *
116 +eth_open(const char *device);
118 +int
119 +eth_get(eth_t *e, eth_addr_t *ea);
121 +int
122 +eth_set(eth_t *e, const eth_addr_t *ea);
124 +ssize_t
125 +eth_send(eth_t *e, const void *buf, size_t len);
127 +eth_t *
128 +eth_close(eth_t *e);
129 +.fi
130 +.SS "Firewalling"
131 +.LP
132 +.nf
133 +typedef int (*fw_handler)(const struct fw_rule *rule, void *arg);
135 +fw_t *
136 +fw_open void
138 +int
139 +fw_add(fw_t *f, const struct fw_rule *rule);
141 +int
142 +fw_delete(fw_t *f, const struct fw_rule *rule);
144 +int
145 +fw_loop(fw_t *f, fw_handler callback, void *arg);
147 +fw_t *
148 +fw_close(fw_t *f);
149 +.fi
150 +.SS "Network interfaces"
151 +.LP
152 +.nf
153 +typedef int (*intf_handler)(const struct intf_entry *entry void *arg);
155 +intf_t *
156 +intf_open(void);
158 +int
159 +intf_get(intf_t *i, struct intf_entry *entry);
161 +int
162 +intf_get_src(intf_t *i, struct intf_entry *entry, struct addr *src);
164 +int
165 +intf_get_dst(intf_t *i, struct intf_entry *entry, struct addr *dst);
167 +int
168 +intf_set(intf_t *i, const struct intf_entry *entry);
170 +int
171 +intf_loop(intf_t *i, intf_handler callback, void *arg);
173 +intf_t *
174 +intf_close(intf_t *i);
175 +.fi
176 +.SS "Internet Protocol"
177 +.LP
178 +.nf
179 +ip_t *
180 +ip_open(void);
182 +ssize_t
183 +ip_add_option(void *buf, size_t len, int proto, const void *optbuf, size_t optlen);
185 +void
186 +ip_checksum(void *buf, size_t len);
188 +ssize_t
189 +ip_send(ip_t *i, const void *buf, size_t len);
191 +ip_t *
192 +ip_close(ip_t *i);
193 +.fi
194 +.SS "Internet Protocol Version 6"
195 +.LP
196 +.nf
197 +void
198 +ip6_checksum(void *buf, size_t len);
199 +.fi
200 +.SS "Random number generation"
201 +.LP
202 +.nf
203 +rand_t *
204 +rand_open(void);
206 +int
207 +rand_get(rand_t *r, void *buf, size_t len);
209 +int
210 +rand_set(rand_t *r, const void *seed, size_t len);
212 +int
213 +rand_add(rand_t *r, const void *buf, size_t len);
215 +uint8_t
216 +rand_uint8(rand_t *r);
218 +uint16_t
219 +rand_uint16(rand_t *r);
221 +uint32_t
222 +rand_uint32(rand_t *r);
224 +int
225 +rand_shuffle(rand_t *r, void *base, size_t nmemb, size_t size);
227 +rand_t *
228 +rand_close(rand_t *r);
229 +.fi
230 +.SS "Routing"
231 +.LP
232 +.nf
233 +typedef int (*route_handler)(const struct route_entry *entry void *arg);
235 +route_t *
236 +route_open(void);
238 +int
239 +route_add(route_t *r, const struct route_entry *entry);
241 +int
242 +route_delete(route_t *r, const struct route_entry *entry);
244 +int
245 +route_get(route_t *r, struct route_entry *entry);
247 +int
248 +route_loop(route_t *r, route_handler callback, void *arg);
250 +route_t *
251 +route_close(route_t *r);
252 +.fi
253 +.SS "Tunnel interface"
254 +.LP
255 +.nf
256 +tun_t *
257 +tun_open(struct addr *src, struct addr *dst, int mtu);
259 +int
260 +tun_fileno(tun_t *t);
262 +const char *
263 +tun_name(tun_t *t);
265 +ssize_t
266 +tun_send(tun_t *t, const void *buf, size_t size);
268 +ssize_t
269 +tun_recv(tun_t *t, void *buf, size_t size);
271 +tun_t *
272 +tun_close(tun_t *t);
273 +.fi
274 +.SH "DESCRIPTION"
275 +\fBdnet\fP
276 provides a simplified, portable interface to several low-level
277 networking routines, including network address manipulation, kernel
278 -.Xr arp 4
279 -cache and
280 -.Xr route 4
281 +arp(4)
282 +cache and
283 +route(4)
284 table lookup and manipulation, network firewalling, network interface
285 lookup and manipulation, and raw IP packet and Ethernet frame
286 transmission. It is intended to complement the functionality provided
288 -.Xr pcap 3 .
289 -.Pp
290 -In addition,
291 -.Nm
292 +pcap(3).
293 +.PP
294 +In addition,
295 +\fBdnet\fP
296 also provides platform-independent definitions of various network
297 protocol formats and values for portable low-level network
298 programming, as well as a simple binary buffer handling API.
299 -.Pp
300 -.Ss Network addressing
301 +.PP
302 +.SS "Network addressing"
303 Network addresses are described by the following structure:
304 -.Bd -literal
305 +.nf
306 struct addr {
307 uint16_t addr_type;
308 uint16_t addr_bits;