components/libdnet/patches/dnet.3.patch
author Rich Burridge <rich.burridge@oracle.com>
Wed, 09 Nov 2016 09:06:55 -0800
changeset 7276 eae106639cae
parent 1043 585b09419d1c
permissions -rw-r--r--
25035973 libdnet contains some man page problems
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1043
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
--- libdnet-1.12/man/dnet.3.orig	2012-05-23 08:31:15.785689693 -0700
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
+++ libdnet-1.12/man/dnet.3	2012-05-23 08:46:23.327040849 -0700
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
@@ -1,206 +1,296 @@
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
-.\"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
+.\"    
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
 .\" Copyright (c) 2000 Dug Song <[email protected]>
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
-.\"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
+.\"    
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
 .\" $Id: dnet.3 604 2005-02-25 22:59:04Z dugsong $
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
 .\"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
-.Dd August 21, 2001
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
-.Dt DNET 3
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
-.Os
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
-.Sh NAME
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
-.Nm dnet
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
-.Nd dumb networking library
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
-.Sh SYNOPSIS
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
-.Fd #include <dnet.h>
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
-.Ss Network addressing
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
-.Fn addr_cmp "const struct addr *a" "const struct addr *b"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
-.Fn addr_bcast "const struct addr *a" "struct addr *b"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
-.Fn addr_net "const struct addr *a" "struct addr *b"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
-.Ft char *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
-.Fn addr_ntop "const struct addr *src" "char *dst" "size_t size"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
-.Fn addr_pton "const char *src" "struct addr *dst"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
-.Ft char *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
-.Fn addr_ntoa "const struct addr *a"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
-.Fn addr_aton "const char *src" "struct addr *dst"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
-.Fn addr_ntos "const struct addr *a" "struct sockaddr *sa"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
-.Fn addr_ston "const struct sockaddr *sa" "struct addr *a"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
-.Fn addr_btos "uint16_t bits" "struct sockaddr *sa"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
-.Fn addr_stob "const struct sockaddr *sa" "uint16_t *bits"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
-.Fn addr_btom "uint16_t bits" "void *mask" "size_t size"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
-.Fn addr_mtob "const void *mask" "size_t size" "uint16_t *bits"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
-.Ss Address Resolution Protocol
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
-.Li typedef Ar int Fn (*arp_handler) "const struct arp_entry *entry" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
-.Ft arp_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
-.Fn arp_open "void"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
-.Fn arp_add "arp_t *a" "const struct arp_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
-.Fn arp_delete "arp_t *a" "const struct arp_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
-.Fn arp_get "arp_t *a" "struct arp_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
-.Fn arp_loop "arp_t *a" "arp_handler callback" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
-.Ft arp_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
-.Fn arp_close "arp_t *a"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
-.Ss Binary buffers
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
-.Ft blob_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
-.Fn blob_new "void"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
-.Fn blob_read "blob_t *b" "void *buf" "int len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
-.Fn blob_write "blob_t *b" "const void *buf" "int len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
-.Fn blob_seek "blob_t *b" "int off" "int whence"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
-.Fn blob_index "blob_t *b" "const void *buf" "int len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    73
-.Fn blob_rindex "blob_t *b" "const void *buf" "int len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    74
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
-.Fn blob_pack "blob_t *b" "const void *fmt" "..."
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    76
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
-.Fn blob_unpack "blob_t *b" "const void *fmt" "..."
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    78
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    79
-.Fn blob_print "blob_t *b" "char *style" "int len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    80
-.Ft blob_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    81
-.Fn blob_free "blob_t *b"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    82
-.Ss Ethernet
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    83
-.Ft eth_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    84
-.Fn eth_open "const char *device"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    85
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    86
-.Fn eth_get "eth_t *e" "eth_addr_t *ea"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    87
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    88
-.Fn eth_set "eth_t *e" "const eth_addr_t *ea"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    89
-.Ft ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    90
-.Fn eth_send "eth_t *e" "const void *buf" "size_t len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    91
-.Ft eth_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    92
-.Fn eth_close "eth_t *e"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    93
-.Ss Firewalling
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    94
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    95
-.Li typedef Ar int Fn (*fw_handler) "const struct fw_rule *rule" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    96
-.Ft fw_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    97
-.Fn fw_open "void"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    98
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    99
-.Fn fw_add "fw_t *f" "const struct fw_rule *rule"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   100
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   101
-.Fn fw_delete "fw_t *f" "const struct fw_rule *rule"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   102
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   103
-.Fn fw_loop "fw_t *f" "fw_handler callback" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   104
-.Ft fw_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   105
-.Fn fw_close "fw_t *f"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   106
-.Ss Network interfaces
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   107
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   108
-.Li typedef Ar int Fn (*intf_handler) "const struct intf_entry *entry" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   109
-.Ft intf_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   110
-.Fn intf_open "void"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   111
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   112
-.Fn intf_get "intf_t *i" "struct intf_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   113
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   114
-.Fn intf_get_src "intf_t *i" "struct intf_entry *entry" "struct addr *src"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   115
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   116
-.Fn intf_get_dst "intf_t *i" "struct intf_entry *entry" "struct addr *dst"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   117
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   118
-.Fn intf_set "intf_t *i" "const struct intf_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   119
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   120
-.Fn intf_loop "intf_t *i" "intf_handler callback" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   121
-.Ft intf_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   122
-.Fn intf_close "intf_t *i"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   123
-.Ss Internet Protocol
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   124
-.Ft ip_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   125
-.Fn ip_open "void"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   126
-.Ft ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   127
-.Fn ip_add_option "void *buf" "size_t len" "int proto" "const void *optbuf" "size_t optlen"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   128
-.Ft void
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   129
-.Fn ip_checksum "void *buf" "size_t len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   130
-.Ft ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   131
-.Fn ip_send "ip_t *i" "const void *buf" "size_t len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   132
-.Ft ip_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   133
-.Fn ip_close "ip_t *i"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   134
-.Ss Internet Protocol Version 6
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   135
-.Ft void
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   136
-.Fn ip6_checksum "void *buf" "size_t len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   137
-.Ss Random number generation
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   138
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   139
-.Ft rand_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   140
-.Fn rand_open "void"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   141
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   142
-.Fn rand_get "rand_t *r" "void *buf" "size_t len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   143
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   144
-.Fn rand_set "rand_t *r" "const void *seed" "size_t len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   145
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   146
-.Fn rand_add "rand_t *r" "const void *buf" "size_t len"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   147
-.Ft uint8_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   148
-.Fn rand_uint8 "rand_t *r"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   149
-.Ft uint16_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   150
-.Fn rand_uint16 "rand_t *r"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   151
-.Ft uint32_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   152
-.Fn rand_uint32 "rand_t *r"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   153
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   154
-.Fn rand_shuffle "rand_t *r" "void *base" "size_t nmemb" "size_t size"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   155
-.Ft rand_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   156
-.Fn rand_close "rand_t *r"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   157
-.Ss Routing
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   158
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   159
-.Li typedef Ar int Fn (*route_handler) "const struct route_entry *entry" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   160
-.Ft route_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   161
-.Fn route_open "void"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   162
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   163
-.Fn route_add "route_t *r" "const struct route_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   164
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   165
-.Fn route_delete "route_t *r" "const struct route_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   166
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   167
-.Fn route_get "route_t *r" "struct route_entry *entry"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   168
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   169
-.Fn route_loop "route_t *r" "route_handler callback" "void *arg"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   170
-.Ft route_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   171
-.Fn route_close "route_t *r"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   172
-.Ss Tunnel interface
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   173
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   174
-.Ft tun_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   175
-.Fn tun_open "struct addr *src" "struct addr *dst" "int mtu"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   176
-.Ft int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   177
-.Fn tun_fileno "tun_t *t"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   178
-.Ft const char *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   179
-.Fn tun_name "tun_t *t"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   180
-.Ft ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   181
-.Fn tun_send "tun_t *t" "const void *buf" "size_t size"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   182
-.Ft ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   183
-.Fn tun_recv "tun_t *t" "void *buf" "size_t size"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   184
-.Ft tun_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   185
-.Fn tun_close "tun_t *t"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   186
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   187
-.Sh DESCRIPTION
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   188
-.Nm
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   189
+.TH "DNET" "3" "August 21, 2001" "SunOS 5.11" "Library Functions Manual"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   190
+.SH "NAME"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   191
+\fBdnet\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   192
+\- dumb networking library
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   193
+.SH "SYNOPSIS"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   194
+#include <dnet.h>
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   195
+.SS "Network addressing"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   196
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   197
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   198
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   199
+addr_cmp(const struct addr *a, const struct addr *b);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   200
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   201
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   202
+addr_bcast(const struct addr *a, struct addr *b);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   203
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   204
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   205
+addr_net(const struct addr *a, struct addr *b);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   206
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   207
+char *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   208
+addr_ntop(const struct addr *src, char *dst size_t size);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   209
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   210
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   211
+addr_pton(const char *src, struct addr *dst);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   212
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   213
+char *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   214
+addr_ntoa(const struct addr *a);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   215
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   216
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   217
+addr_aton(const char *src, struct addr *dst);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   218
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   219
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   220
+addr_ntos(const struct addr *a, struct sockaddr *sa);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   221
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   222
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   223
+addr_ston(const struct sockaddr *sa, struct addr *a);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   224
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   225
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   226
+addr_btos(uint16_t bits, struct sockaddr *sa);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   227
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   228
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   229
+addr_stob(const struct sockaddr *sa, uint16_t *bits);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   230
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   231
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   232
+addr_btom(uint16_t bits, void *mask, size_t size);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   233
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   234
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   235
+addr_mtob(const void *mask, size_t size, uint16_t *bits);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   236
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   237
+.SS "Address Resolution Protocol"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   238
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   239
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   240
+typedef int (*arp_handler)(const struct arp_entry *entry, void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   241
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   242
+arp_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   243
+arp_open(void);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   244
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   245
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   246
+arp_add(arp_t *a, const struct arp_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   247
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   248
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   249
+arp_delete(arp_t *a, const struct arp_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   250
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   251
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   252
+arp_get(arp_t *a, struct arp_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   253
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   254
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   255
+arp_loop(arp_t *a, arp_handler callback, void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   256
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   257
+arp_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   258
+arp_close(arp_t *a);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   259
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   260
+.SS "Binary buffers"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   261
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   262
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   263
+blob_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   264
+blob_new(void);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   265
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   266
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   267
+blob_read(blob_t *b, void *buf, int len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   268
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   269
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   270
+blob_write(blob_t *b, const void *buf, int len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   271
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   272
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   273
+blob_seek(blob_t *b, int off, int whence);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   274
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   275
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   276
+blob_index(blob_t *b, const void *buf, int len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   277
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   278
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   279
+blob_rindex(blob_t *b, const void *buf, int len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   280
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   281
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   282
+blob_pack(blob_t *b, const void *fmt, ...);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   283
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   284
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   285
+blob_unpack(blob_t *b, const void *fmt, ...);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   286
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   287
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   288
+blob_print(blob_t *b, char *style, int len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   289
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   290
+blob_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   291
+blob_free(blob_t *b);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   292
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   293
+.SS "Ethernet"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   294
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   295
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   296
+eth_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   297
+eth_open(const char *device);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   298
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   299
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   300
+eth_get(eth_t *e, eth_addr_t *ea);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   301
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   302
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   303
+eth_set(eth_t *e, const eth_addr_t *ea);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   304
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   305
+ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   306
+eth_send(eth_t *e, const void *buf, size_t len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   307
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   308
+eth_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   309
+eth_close(eth_t *e);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   310
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   311
+.SS "Firewalling"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   312
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   313
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   314
+typedef int (*fw_handler)(const struct fw_rule *rule, void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   315
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   316
+fw_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   317
+fw_open void
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   318
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   319
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   320
+fw_add(fw_t *f, const struct fw_rule *rule);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   321
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   322
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   323
+fw_delete(fw_t *f, const struct fw_rule *rule);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   324
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   325
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   326
+fw_loop(fw_t *f, fw_handler callback, void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   327
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   328
+fw_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   329
+fw_close(fw_t *f);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   330
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   331
+.SS "Network interfaces"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   332
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   333
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   334
+typedef int (*intf_handler)(const struct intf_entry *entry void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   335
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   336
+intf_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   337
+intf_open(void);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   338
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   339
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   340
+intf_get(intf_t *i, struct intf_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   341
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   342
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   343
+intf_get_src(intf_t *i, struct intf_entry *entry, struct addr *src);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   344
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   345
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   346
+intf_get_dst(intf_t *i, struct intf_entry *entry, struct addr *dst);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   347
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   348
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   349
+intf_set(intf_t *i, const struct intf_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   350
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   351
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   352
+intf_loop(intf_t *i, intf_handler callback, void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   353
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   354
+intf_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   355
+intf_close(intf_t *i);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   356
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   357
+.SS "Internet Protocol"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   358
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   359
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   360
+ip_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   361
+ip_open(void);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   362
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   363
+ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   364
+ip_add_option(void *buf, size_t len, int proto, const void *optbuf, size_t optlen);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   365
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   366
+void
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   367
+ip_checksum(void *buf, size_t len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   368
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   369
+ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   370
+ip_send(ip_t *i, const void *buf, size_t len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   371
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   372
+ip_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   373
+ip_close(ip_t *i);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   374
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   375
+.SS "Internet Protocol Version 6"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   376
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   377
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   378
+void
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   379
+ip6_checksum(void *buf, size_t len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   380
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   381
+.SS "Random number generation"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   382
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   383
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   384
+rand_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   385
+rand_open(void);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   386
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   387
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   388
+rand_get(rand_t *r, void *buf, size_t len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   389
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   390
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   391
+rand_set(rand_t *r, const void *seed, size_t len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   392
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   393
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   394
+rand_add(rand_t *r, const void *buf, size_t len);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   395
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   396
+uint8_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   397
+rand_uint8(rand_t *r);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   398
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   399
+uint16_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   400
+rand_uint16(rand_t *r);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   401
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   402
+uint32_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   403
+rand_uint32(rand_t *r);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   404
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   405
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   406
+rand_shuffle(rand_t *r, void *base, size_t nmemb, size_t size);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   407
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   408
+rand_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   409
+rand_close(rand_t *r);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   410
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   411
+.SS "Routing"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   412
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   413
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   414
+typedef int (*route_handler)(const struct route_entry *entry void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   415
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   416
+route_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   417
+route_open(void);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   418
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   419
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   420
+route_add(route_t *r, const struct route_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   421
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   422
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   423
+route_delete(route_t *r, const struct route_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   424
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   425
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   426
+route_get(route_t *r, struct route_entry *entry);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   427
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   428
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   429
+route_loop(route_t *r, route_handler callback, void *arg);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   430
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   431
+route_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   432
+route_close(route_t *r);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   433
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   434
+.SS "Tunnel interface"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   435
+.LP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   436
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   437
+tun_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   438
+tun_open(struct addr *src, struct addr *dst, int mtu);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   439
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   440
+int
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   441
+tun_fileno(tun_t *t);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   442
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   443
+const char *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   444
+tun_name(tun_t *t);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   445
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   446
+ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   447
+tun_send(tun_t *t, const void *buf, size_t size);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   448
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   449
+ssize_t
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   450
+tun_recv(tun_t *t, void *buf, size_t size);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   451
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   452
+tun_t *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   453
+tun_close(tun_t *t);
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   454
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   455
+.SH "DESCRIPTION"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   456
+\fBdnet\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   457
 provides a simplified, portable interface to several low-level
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   458
 networking routines, including network address manipulation, kernel
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   459
-.Xr arp 4
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   460
-cache and 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   461
-.Xr route 4
7276
eae106639cae 25035973 libdnet contains some man page problems
Rich Burridge <rich.burridge@oracle.com>
parents: 1043
diff changeset
   462
+arp(8)
1043
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   463
+cache and
7276
eae106639cae 25035973 libdnet contains some man page problems
Rich Burridge <rich.burridge@oracle.com>
parents: 1043
diff changeset
   464
+route(8)
1043
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   465
 table lookup and manipulation, network firewalling, network interface
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   466
 lookup and manipulation, and raw IP packet and Ethernet frame
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   467
 transmission. It is intended to complement the functionality provided
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   468
 by
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   469
-.Xr pcap 3 .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   470
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   471
-In addition, 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   472
-.Nm
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   473
+pcap(3).
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   474
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   475
+In addition,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   476
+\fBdnet\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   477
 also provides platform-independent definitions of various network
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   478
 protocol formats and values for portable low-level network
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   479
 programming, as well as a simple binary buffer handling API.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   480
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   481
-.Ss Network addressing
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   482
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   483
+.SS "Network addressing"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   484
 Network addresses are described by the following structure:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   485
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   486
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   487
 struct addr {
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   488
 	uint16_t		addr_type;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   489
 	uint16_t		addr_bits;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   490
@@ -208,7 +298,7 @@
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   491
 		eth_addr_t	__eth;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   492
 		ip_addr_t	__ip;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   493
 		ip6_addr_t	__ip6;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   494
-		
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   495
+
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   496
 		uint8_t		__data8[16];
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   497
 		uint16_t	__data16[8];
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   498
 		uint32_t	__data32[4];
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   499
@@ -220,279 +310,281 @@
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   500
 #define addr_data8	__addr_u.__data8
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   501
 #define addr_data16	__addr_u.__data16
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   502
 #define addr_data32	__addr_u.__data32
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   503
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   504
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   505
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   506
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   507
 The following values are defined for
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   508
-.Ar addr_type :
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   509
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   510
+\fIaddr_type\fP:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   511
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   512
 #define ADDR_TYPE_NONE		0	/* No address set */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   513
 #define	ADDR_TYPE_ETH		1	/* Ethernet */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   514
 #define	ADDR_TYPE_IP		2	/* Internet Protocol v4 */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   515
 #define	ADDR_TYPE_IP6		3	/* Internet Protocol v6 */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   516
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   517
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   518
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   519
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   520
 The field
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   521
-.Ar addr_bits
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   522
+\fIaddr_bits\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   523
 denotes the length of the network mask in bits.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   524
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   525
-.Fn addr_cmp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   526
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   527
+addr_cmp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   528
 compares network addresses
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   529
-.Fa a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   530
+a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   531
 and
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   532
-.Fa b ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   533
+b,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   534
 returning an integer less than, equal to, or greater than zero if
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   535
-.Fa a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   536
+a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   537
 is found, respectively, to be less than, equal to, or greater than
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   538
-.Fa b .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   539
+b.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   540
 Both addresses must be of the same address type.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   541
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   542
-.Fn addr_bcast
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   543
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   544
+addr_bcast
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   545
 computes the broadcast address for the network specified in
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   546
-.Fa a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   547
+a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   548
 and writes it into
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   549
-.Fa b .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   550
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   551
-.Fn addr_net
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   552
+b.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   553
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   554
+addr_net
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   555
 computes the network address for the network specified in
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   556
-.Fa a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   557
+a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   558
 and writes it into
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   559
-.Fa b .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   560
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   561
-.Fn addr_ntop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   562
+b.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   563
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   564
+addr_ntop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   565
 converts an address from network format to a string.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   566
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   567
-.Fn addr_pton
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   568
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   569
+addr_pton
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   570
 converts an address (or hostname) from a string to network format.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   571
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   572
-.Fn addr_ntoa
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   573
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   574
+addr_ntoa
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   575
 converts an address from network format to a string, returning a
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   576
 pointer to the result in static memory.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   577
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   578
-.Fn addr_aton
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   579
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   580
+addr_aton
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   581
 is a synonym for
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   582
-.Fn addr_pton .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   583
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   584
-.Fn addr_ntos
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   585
+addr_pton.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   586
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   587
+addr_ntos
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   588
 converts an address from network format to the appropriate struct
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   589
 sockaddr.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   590
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   591
-.Fn addr_ston
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   592
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   593
+addr_ston
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   594
 converts an address from a struct sockaddr to network format.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   595
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   596
-.Fn addr_btos
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   597
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   598
+addr_btos
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   599
 converts a network mask length to a network mask specified as a struct
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   600
 sockaddr.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   601
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   602
-.Fn addr_stob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   603
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   604
+addr_stob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   605
 converts a network mask specified in a struct sockaddr to a network
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   606
 mask length.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   607
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   608
-.Fn addr_btom
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   609
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   610
+addr_btom
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   611
 converts a network mask length to a network mask in network byte
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   612
 order.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   613
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   614
-.Fn addr_mtob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   615
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   616
+addr_mtob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   617
 converts a network mask in network byte order to a network mask length.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   618
-.Ss Address Resolution Protocol
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   619
+.SS "Address Resolution Protocol"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   620
 ARP cache entries are described by the following structure:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   621
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   622
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   623
 struct arp_entry {
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   624
 	struct addr	arp_pa;		/* protocol address */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   625
 	struct addr	arp_ha;		/* hardware address */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   626
 };
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   627
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   628
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   629
-.Fn arp_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   630
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   631
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   632
+arp_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   633
 is used to obtain a handle to access the kernel
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   634
-.Xr arp 4
7276
eae106639cae 25035973 libdnet contains some man page problems
Rich Burridge <rich.burridge@oracle.com>
parents: 1043
diff changeset
   635
+arp(8)
1043
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   636
 cache.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   637
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   638
-.Fn arp_add
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   639
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   640
+arp_add
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   641
 adds a new ARP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   642
-.Fa entry .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   643
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   644
-.Fn arp_delete
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   645
+entry.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   646
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   647
+arp_delete
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   648
 deletes the ARP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   649
-.Fa entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   650
+entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   651
 for the protocol address specified by
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   652
-.Fa arp_pa .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   653
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   654
-.Fn arp_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   655
+arp_pa.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   656
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   657
+arp_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   658
 retrieves the ARP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   659
-.Fa entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   660
+entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   661
 for the protocol address specified by
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   662
-.Fa arp_pa .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   663
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   664
-.Fn arp_loop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   665
+arp_pa.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   666
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   667
+arp_loop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   668
 iterates over the kernel
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   669
-.Xr arp 4
7276
eae106639cae 25035973 libdnet contains some man page problems
Rich Burridge <rich.burridge@oracle.com>
parents: 1043
diff changeset
   670
+arp(8)
1043
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   671
 cache, invoking the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   672
-.Fa callback
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   673
+callback
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   674
 with each
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   675
-.Fa entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   676
+entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   677
 and the context
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   678
-.Fa arg
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   679
+arg
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   680
 passed to
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   681
-.Fn arp_loop .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   682
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   683
-.Fn arp_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   684
+arp_loop.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   685
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   686
+arp_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   687
 closes the specified handle.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   688
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   689
-.Ss Binary buffers
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   690
+.SS "Binary buffers"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   691
 Binary buffers are described by the following structure:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   692
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   693
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   694
 typedef struct blob {
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   695
 	u_char		*base;		/* start of data */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   696
 	int		 off;		/* offset into data */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   697
 	int		 end;		/* end of data */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   698
 	int		 size;		/* size of allocation */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   699
 } blob_t;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   700
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   701
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   702
-.Fn blob_new
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   703
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   704
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   705
+blob_new
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   706
 is used to allocate a new dynamic binary buffer, returning NULL on failure.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   707
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   708
-.Fn blob_read
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   709
-reads 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   710
-.Fa len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   711
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   712
+blob_read
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   713
+reads
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   714
+len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   715
 bytes from the current offset in blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   716
-.Fa b 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   717
+b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   718
 into
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   719
-.Fa buf ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   720
+buf,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   721
 returning the total number of bytes read, or -1 on failure.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   722
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   723
-.Fn blob_write
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   724
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   725
+blob_write
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   726
 writes
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   727
-.Fa len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   728
+len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   729
 bytes from
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   730
-.Fa buf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   731
+buf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   732
 to blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   733
-.Fa b ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   734
+b,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   735
 advancing the current offset. It returns the number of bytes written,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   736
 or -1 on failure.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   737
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   738
-.Fn blob_seek
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   739
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   740
+blob_seek
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   741
 repositions the offset within blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   742
-.Fa b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   743
-to 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   744
-.Fa off ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   745
+b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   746
+to
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   747
+off,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   748
 according to the directive
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   749
-.Fa whence
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   750
+whence
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   751
 (see
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   752
-.Xr lseek 2
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   753
+lseek(2)
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   754
 for details), returning the new absolute offset, or -1 on failure.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   755
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   756
-.Fn blob_index
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   757
-returns the offset of the first occurence in blob 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   758
-.Fa b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   759
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   760
+blob_index
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   761
+returns the offset of the first occurence in blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   762
+b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   763
 of the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   764
-.Fa buf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   765
+buf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   766
 of length
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   767
-.Fa len ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   768
+len,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   769
 or -1 on failure.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   770
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   771
-.Fn blob_rindex
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   772
-returns the offset of the last occurence in blob 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   773
-.Fa b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   774
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   775
+blob_rindex
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   776
+returns the offset of the last occurence in blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   777
+b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   778
 of the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   779
-.Fa buf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   780
+buf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   781
 of length
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   782
-.Fa len ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   783
+len,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   784
 or -1 on failure.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   785
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   786
-.Fn blob_pack
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   787
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   788
+blob_pack
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   789
 converts and writes, and
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   790
-.Fn blob_unpack
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   791
+blob_unpack
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   792
 reads and converts data in blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   793
-.Fa b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   794
+b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   795
 according to the given format
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   796
-.Fa fmt
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   797
+fmt
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   798
 as described below, returning 0 on success, and -1 on failure.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   799
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   800
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   801
 The format string is composed of zero or more directives: ordinary
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   802
 characters (not
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   803
-.Cm %
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   804
+\fB%\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   805
 ),
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   806
 which are copied to / read from the blob, and conversion
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   807
 specifications, each of which results in reading / writing zero or
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   808
 more subsequent arguments.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   809
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   810
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   811
 Each conversion specification is introduced by the character
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   812
-.Cm % ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   813
+\fB%\fP,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   814
 and may be prefixed by length specifier. The arguments must correspond
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   815
 properly (after type promotion) with the length and conversion specifiers.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   816
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   817
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   818
 The length specifier is either a a decimal digit string specifying the
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   819
 length of the following argument, or the literal character
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   820
-.Cm *
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   821
+\fB*\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   822
 indicating that the length should be read from an integer argument for
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   823
 the argument following it.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   824
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   825
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   826
 The conversion specifiers and their meanings are:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   827
-.Bl -tag -width indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   828
-.It Cm D
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   829
+.TP indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   830
+\fBD\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   831
 An unsigned 32-bit integer in network byte order.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   832
-.It Cm H
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   833
+.TP indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   834
+\fBH\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   835
 An unsigned 16-bit integer in network byte order.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   836
-.It Cm b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   837
+.TP indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   838
+\fBb\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   839
 A binary buffer (length specifier required).
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   840
-.It Cm c
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   841
+.TP indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   842
+\fBc\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   843
 An unsigned character.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   844
-.It Cm d
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   845
+.TP indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   846
+\fBd\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   847
 An unsigned 32-bit integer in host byte order.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   848
-.It Cm h
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   849
+.TP indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   850
+\fBh\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   851
 An unsigned 16-bit integer in host byte order.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   852
-.It Cm s
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   853
+.TP indent
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   854
+\fBs\fP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   855
 A C-style null-terminated string, whose maximum length must be
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   856
 specified when unpacking.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   857
-.El
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   858
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   859
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   860
 Custom conversion routines and their specifiers may be registered via
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   861
-.Fn blob_register_pack ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   862
+blob_register_pack,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   863
 currently undocumented.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   864
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   865
-.Fn blob_print
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   866
-prints 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   867
-.Fa len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   868
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   869
+blob_print
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   870
+prints
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   871
+len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   872
 bytes of the contents of blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   873
-.Fa b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   874
+b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   875
 from the current offset in the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   876
-.Fa style ;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   877
+style;
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   878
 currently only
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   879
-.Dq hexl 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   880
+``hexl''
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   881
 is available.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   882
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   883
-.Fn blob_free
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   884
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   885
+blob_free
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   886
 deallocates the memory associated with blob
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   887
-.Fa b 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   888
+b
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   889
 and returns NULL.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   890
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   891
-.Ss Ethernet
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   892
-.Fn eth_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   893
+.SS "Ethernet"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   894
+eth_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   895
 is used to obtain a handle to transmit raw Ethernet frames via the
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   896
 specified network
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   897
-.Fa device .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   898
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   899
-.Fn eth_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   900
+device.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   901
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   902
+eth_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   903
 retrieves the hardware MAC address for the interface specified by
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   904
-.Ar e .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   905
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   906
-.Fn eth_set
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   907
+\fIe\fP.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   908
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   909
+eth_set
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   910
 configures the hardware MAC address for the interface specified by
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   911
-.Ar e .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   912
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   913
-.Fn eth_send
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   914
-transmits 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   915
-.Fa len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   916
+\fIe\fP.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   917
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   918
+eth_send
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   919
+transmits
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   920
+len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   921
 bytes of the Ethernet frame pointed to by
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   922
-.Fa buf .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   923
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   924
-.Fn eth_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   925
+buf.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   926
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   927
+eth_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   928
 closes the specified handle.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   929
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   930
-.Ss Firewalling
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   931
+.SS "Firewalling"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   932
 Firewall rules are described by the following structure:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   933
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   934
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   935
 struct fw_rule {
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   936
 	char		fw_device[INTF_NAME_LEN]; /* interface name */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   937
 	uint8_t		fw_op;			  /* operation */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   938
@@ -503,51 +595,50 @@
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   939
 	uint16_t	fw_sport[2];		  /* range / ICMP type */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   940
 	uint16_t	fw_dport[2];		  /* range / ICMP code */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   941
 };
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   942
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   943
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   944
-The following values are defined for 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   945
-.Ar fw_op :
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   946
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   947
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   948
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   949
+The following values are defined for
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   950
+\fIfw_op\fP:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   951
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   952
 #define FW_OP_ALLOW	1
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   953
 #define FW_OP_BLOCK	2
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   954
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   955
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   956
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   957
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   958
 The following values are defined for
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   959
-.Ar fw_dir :
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   960
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   961
+\fIfw_dir\fP:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   962
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   963
 #define FW_DIR_IN	1
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   964
 #define FW_DIR_OUT	2
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   965
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   966
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   967
-.Fn fw_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   968
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   969
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   970
+fw_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   971
 is used to obtain a handle to access the local network firewall
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   972
 configuration.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   973
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   974
-.Fn fw_add
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   975
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   976
+fw_add
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   977
 adds the specified firewall
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   978
-.Fa rule .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   979
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   980
-.Fn fw_delete
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   981
+rule.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   982
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   983
+fw_delete
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   984
 deletes the specified firewall
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   985
-.Fa rule .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   986
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   987
-.Fn fw_loop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   988
+rule.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   989
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   990
+fw_loop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   991
 iterates over the active firewall ruleset, invoking
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   992
-the specified 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   993
-.Fa callback
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   994
-with each 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   995
-.Fa rule
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   996
+the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   997
+callback
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   998
+with each
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   999
+rule
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1000
 and the context
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1001
-.Fa arg
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1002
-passed to 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1003
-.Fn fw_loop .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1004
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1005
-.Fn fw_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1006
+arg
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1007
+passed to
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1008
+fw_loop.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1009
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1010
+fw_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1011
 closes the specified handle.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1012
-.Pp 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1013
-.Ss Network interfaces
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1014
+.SS "Network interfaces"
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1015
 Network interface information is described by the following structure:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1016
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1017
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1018
 #define INTF_NAME_LEN	16
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1019
 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1020
 struct intf_entry {
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1021
@@ -562,292 +653,286 @@
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1022
 	u_int		intf_alias_num;		    /* number of aliases */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1023
 	struct addr	intf_alias_addrs __flexarr; /* array of aliases */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1024
 };
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1025
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1026
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1027
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1028
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1029
 The following bitmask values are defined for
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1030
-.Ar intf_type :
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1031
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1032
+\fIintf_type\fP:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1033
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1034
 #define INTF_TYPE_OTHER		1	/* other */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1035
 #define INTF_TYPE_ETH		6	/* Ethernet */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1036
 #define INTF_TYPE_LOOPBACK	24	/* software loopback */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1037
 #define INTF_TYPE_TUN		53	/* proprietary virtual/internal */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1038
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1039
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1040
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1041
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1042
 The following bitmask values are defined for
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1043
-.Ar intf_flags :
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1044
-.Bd -literal
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1045
+\fIintf_flags\fP:
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1046
+.nf
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1047
 #define INTF_FLAG_UP		0x01	/* enable interface */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1048
 #define INTF_FLAG_LOOPBACK	0x02	/* is a loopback net (r/o) */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1049
 #define INTF_FLAG_POINTOPOINT	0x04	/* point-to-point link (r/o) */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1050
 #define INTF_FLAG_NOARP		0x08	/* disable ARP */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1051
 #define INTF_FLAG_BROADCAST	0x10	/* supports broadcast (r/o) */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1052
 #define INTF_FLAG_MULTICAST	0x20	/* supports multicast (r/o) */
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1053
-.Ed
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1054
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1055
-.Fn intf_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1056
+.fi
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1057
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1058
+intf_open
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1059
 is used to obtain a handle to access the network interface
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1060
 configuration.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1061
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1062
-.Fn intf_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1063
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1064
+intf_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1065
 retrieves an interface configuration
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1066
-.Fa entry ,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1067
+entry,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1068
 keyed on
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1069
-.Fa intf_name .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1070
-For all 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1071
-.Fn intf_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1072
-functions, 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1073
-.Fa intf_len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1074
+intf_name.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1075
+For all
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1076
+intf_get
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1077
+functions,
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1078
+intf_len
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1079
 should be set to the size of the buffer pointed to by
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1080
-.Fa entry 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1081
+entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1082
 (usually sizeof(struct intf_entry), but should be larger to accomodate
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1083
 any interface alias addresses.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1084
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1085
-.Fn intf_get_src
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1086
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1087
+intf_get_src
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1088
 retrieves the configuration for the interface whose primary address
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1089
 matches the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1090
-.Fa src .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1091
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1092
-.Fn intf_get_dst
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1093
+src.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1094
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1095
+intf_get_dst
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1096
 retrieves the configuration for the best interface with which to reach
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1097
 the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1098
-.Fa dst .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1099
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1100
-.Fn intf_set
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1101
+dst.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1102
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1103
+intf_set
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1104
 sets the interface configuration
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1105
-.Fa entry .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1106
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1107
-.Fn intf_loop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1108
-iterates over all network interfaces, invoking the specified 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1109
-.Fa callback
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1110
+entry.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1111
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1112
+intf_loop
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1113
+iterates over all network interfaces, invoking the specified
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1114
+callback
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1115
 with each interface configuration
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1116
-.Fa entry 
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1117
+entry
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1118
 and the context
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1119
-.Fa arg
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1120
+arg
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1121
 passed to
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1122
-.Fn intf_loop .
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1123
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1124
-.Fn intf_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1125
+intf_loop.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1126
+.PP
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1127
+intf_close
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1128
 closes the specified handle.
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
  1129
-.Pp
585b09419d1c PSARC 2012/202 libdnet 1.12
Rich Burridge <rich.burridge@oracle.com>