## net-db.api
# Compiled by:
#
src/lib/std/src/standard-core.sublibstipulate
package hu = host_unt_guts; # host_unt_guts is from
src/lib/std/src/bind-sysword-32.pkg package ns = number_string; # number_string is from
src/lib/std/src/number-string.pkg package ps = proto_socket__premicrothread; # proto_socket__premicrothread is from
src/lib/std/src/socket/proto-socket--premicrothread.pkgherein
api Net_Db {
#
eqtype Network_Address;
Address_Family;
Entry;
name: Entry -> String;
aliases: Entry -> List( String );
address_type: Entry -> Address_Family;
address: Entry -> Network_Address;
get_by_name: String -> Null_Or( Entry );
get_by_address: (Network_Address, Address_Family) -> Null_Or( Entry );
scan: ns::Reader (Char, X) -> ns::Reader (Network_Address, X);
from_string: String -> Null_Or( Network_Address );
to_string: Network_Address -> String;
#######################################################################
# Below stuff is intended only for one-time use during
# booting, to switch from direct to indirect syscalls: # For background see Note[1] in
src/lib/std/src/unsafe/mythryl-callable-c-library-interface.pkg Netent;
get_network_by_name__sysref: String -> Null_Or(Netent);
set__get_network_by_name__ref: ({ lib_name: String, fun_name: String, io_call: (String -> Null_Or(Netent)) } -> (String -> Null_Or(Netent))) -> Void;
get_network_by_address__syscall: (hu::Unt, ps::Raw_Address_Family) -> Null_Or( Netent );
set__get_network_by_address__ref: ({ lib_name: String, fun_name: String, io_call: ((hu::Unt, ps::Raw_Address_Family) -> Null_Or( Netent )) } -> ((hu::Unt, ps::Raw_Address_Family) -> Null_Or( Netent ))) -> Void;
};
end;
## COPYRIGHT (c) 1995 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.