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
8 +.TH "DNET" "3" "August 21, 2001" "SunOS 5.11" "Library Functions Manual"
11 +\- dumb networking library
14 +.SS "Network addressing"
18 +addr_cmp(const struct addr *a, const struct addr *b);
21 +addr_bcast(const struct addr *a, struct addr *b);
24 +addr_net(const struct addr *a, struct addr *b);
27 +addr_ntop(const struct addr *src, char *dst size_t size);
30 +addr_pton(const char *src, struct addr *dst);
33 +addr_ntoa(const struct addr *a);
36 +addr_aton(const char *src, struct addr *dst);
39 +addr_ntos(const struct addr *a, struct sockaddr *sa);
42 +addr_ston(const struct sockaddr *sa, struct addr *a);
45 +addr_btos(uint16_t bits, struct sockaddr *sa);
48 +addr_stob(const struct sockaddr *sa, uint16_t *bits);
51 +addr_btom(uint16_t bits, void *mask, size_t size);
54 +addr_mtob(const void *mask, size_t size, uint16_t *bits);
56 +.SS "Address Resolution Protocol"
59 +typedef int (*arp_handler)(const struct arp_entry *entry, void *arg);
65 +arp_add(arp_t *a, const struct arp_entry *entry);
68 +arp_delete(arp_t *a, const struct arp_entry *entry);
71 +arp_get(arp_t *a, struct arp_entry *entry);
74 +arp_loop(arp_t *a, arp_handler callback, void *arg);
86 +blob_read(blob_t *b, void *buf, int len);
89 +blob_write(blob_t *b, const void *buf, int len);
92 +blob_seek(blob_t *b, int off, int whence);
95 +blob_index(blob_t *b, const void *buf, int len);
98 +blob_rindex(blob_t *b, const void *buf, int len);
101 +blob_pack(blob_t *b, const void *fmt, ...);
104 +blob_unpack(blob_t *b, const void *fmt, ...);
107 +blob_print(blob_t *b, char *style, int len);
110 +blob_free(blob_t *b);
116 +eth_open(const char *device);
119 +eth_get(eth_t *e, eth_addr_t *ea);
122 +eth_set(eth_t *e, const eth_addr_t *ea);
125 +eth_send(eth_t *e, const void *buf, size_t len);
128 +eth_close(eth_t *e);
133 +typedef int (*fw_handler)(const struct fw_rule *rule, void *arg);
139 +fw_add(fw_t *f, const struct fw_rule *rule);
142 +fw_delete(fw_t *f, const struct fw_rule *rule);
145 +fw_loop(fw_t *f, fw_handler callback, void *arg);
150 +.SS "Network interfaces"
153 +typedef int (*intf_handler)(const struct intf_entry *entry void *arg);
159 +intf_get(intf_t *i, struct intf_entry *entry);
162 +intf_get_src(intf_t *i, struct intf_entry *entry, struct addr *src);
165 +intf_get_dst(intf_t *i, struct intf_entry *entry, struct addr *dst);
168 +intf_set(intf_t *i, const struct intf_entry *entry);
171 +intf_loop(intf_t *i, intf_handler callback, void *arg);
174 +intf_close(intf_t *i);
176 +.SS "Internet Protocol"
183 +ip_add_option(void *buf, size_t len, int proto, const void *optbuf, size_t optlen);
186 +ip_checksum(void *buf, size_t len);
189 +ip_send(ip_t *i, const void *buf, size_t len);
194 +.SS "Internet Protocol Version 6"
198 +ip6_checksum(void *buf, size_t len);
200 +.SS "Random number generation"
207 +rand_get(rand_t *r, void *buf, size_t len);
210 +rand_set(rand_t *r, const void *seed, size_t len);
213 +rand_add(rand_t *r, const void *buf, size_t len);
216 +rand_uint8(rand_t *r);
219 +rand_uint16(rand_t *r);
222 +rand_uint32(rand_t *r);
225 +rand_shuffle(rand_t *r, void *base, size_t nmemb, size_t size);
228 +rand_close(rand_t *r);
233 +typedef int (*route_handler)(const struct route_entry *entry void *arg);
239 +route_add(route_t *r, const struct route_entry *entry);
242 +route_delete(route_t *r, const struct route_entry *entry);
245 +route_get(route_t *r, struct route_entry *entry);
248 +route_loop(route_t *r, route_handler callback, void *arg);
251 +route_close(route_t *r);
253 +.SS "Tunnel interface"
257 +tun_open(struct addr *src, struct addr *dst, int mtu);
260 +tun_fileno(tun_t *t);
266 +tun_send(tun_t *t, const void *buf, size_t size);
269 +tun_recv(tun_t *t, void *buf, size_t size);
272 +tun_close(tun_t *t);
276 provides a simplified, portable interface to several low-level
277 networking routines, including network address manipulation, kernel
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
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.
300 -.Ss Network addressing
302 +.SS "Network addressing"
303 Network addresses are described by the following structure: