Book HomeJava and XSLTSearch this book

8.156. Net::netent

Returns information for a network. Overrides the core getnetbyname and getnetbyaddr functions with object-oriented versions that return Net::netent objects. The objects have methods that return the fields of the same name from the netent structure in netdb.h:

Field

Description

addrtype

Net address type

aliases

Array of aliases

name

Name of net

net

Network number

You can access the structure fields with the methods or by importing the fields into your namespace with the :FIELDS import tag and accessing them by prepending n_ to the field name:

$net_obj->name( )
$n_name

Net::netent exports the following.

getnet

getnet (net)

Frontend for getnetbyaddr and getnetbyname. If net is numeric, calls getnetbyaddr; otherwise, calls getnetbyname.

getnetbyaddr

getnetbyaddr (addr, addrtype)

Returns information about the net with address addr of type addrtype.

getnetbyname

getnetbyname (netname)

Returns information about the net with name netname.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.