1Libdnet(3)            User Contributed Perl Documentation           Libdnet(3)
2
3
4

NAME

6       Net::Libdnet - Perl interface to libdnet
7

SYNOPSIS

9       use Net::Libdnet;
10

DESCRIPTION

12       All the following functions return undef and print a warning message to
13       the standard error when a problem occurs.
14
15       Some of the functions in the original dnet were omited, because we only
16       deal with the string representation of addresses. We also avoid passing
17       handlers to the user, as we open and subsequently close them for each
18       request. Moreover, the XXX_loop() functions are not implemented yet.
19
20       Network addressing
21
22       * addr_cmp($address_a, $address_b) -> $int_distance
23           Compares network addresses a and b, returning an integer less than,
24           equal to, or greater than zero if a is found, respectively, to be
25           less than, equal to, or greater than b.  Both addresses must be of
26           the same address type.
27
28       * addr_bcast($address/netmask) -> $address_broadcast
29           Computes the broadcast address for the specified network.
30
31       * addr_net($address/netmask) -> $address_network
32           Computes the network address for the specified network.
33
34       Address Resolution Protocol
35
36       * arp_add($protocol_address, $hardware_address) -> 1
37           Adds a new ARP entry.
38
39       * arp_delete($protocol_address) -> 1
40           Deletes the ARP entry for the specified protocol address.
41
42       * arp_get($protocol_address) -> $hardware_address
43           retrieves the ARP entry for the specified protocol address.
44
45       Binary buffers
46
47       Not implemented yet.
48
49       Ethernet
50
51       Not implemented yet.
52
53       Firewalling
54
55       Not implemented yet.
56
57       Network interfaces
58
59       Interfaces are manipulated as hashes with the following structure:
60
61        {
62            len => ... ,
63            name => ... ,
64            type => ... ,
65            flags => ... ,
66            mtu => ... ,
67            addr => ... ,
68            dst_addr => ... ,
69            link_addr => ... ,
70        #   alias_num => ... ,
71        #   alias_addrs => ... ,
72        };
73
74       Processing interface aliases is not implemented yet.
75
76       * intf_get($name) -> %interface
77           Retrieves an interface configuration entry, keyed on name.
78
79       * intf_get_src($local_address) -> %interface
80           Retrieves the configuration for the interface with the specified
81           primary address.
82
83       * intf_get_dst($remote_address) -> %interface
84           Retrieves the configuration for the best interface with which to
85           reach the specified destination address.
86
87       * intf_set(%interface) -> 1
88           Not implemented yet.
89
90           Sets the interface configuration entry. Please retrieve first the
91           configuration, and do not build from scratch.
92
93       Internet Protocol
94
95       Not implemented yet.
96
97       Random number generation
98
99       Not implemented yet.
100
101       Routing
102
103* route_add($destination_address, $gateway_address) -> 1
104Adds a new route, to the specified destination prefix over the given gateway.
105
106* route_delete($destination_address) -> 1
107Deletes the routing table entry for the destination prefix.
108
109* route_get($destination_address) -> $gateway_address
110Retrieves the routing table entry for the destination prefix.
111

TODO

113       intf_set, hash2intf
114

SEE ALSO

116       dnet(3)
117
118
119
120perl v5.8.8                       2004-09-06                        Libdnet(3)
Impressum