NAME
|
Netutil, netmkaddr, authfd – Network utility functions |
SYNOPSIS
|
include "netutil.m"; util := load Netutil Netutil–>PATH; Client, Server: con iota; netmkaddr: fn(addr, net, svc: string): string; authfd: fn(fd: ref Sys–>FD, role: int, alg, kfile, addr: string):
|
DESCRIPTION
|
Netutil provides functions used in many programs providing or
using network services. Netmkaddr is similar to the Plan 9 function of the same name. It builds a network address given a default network to use, net , and a default service name, svc .
Authfd performs Client or Server authentication (according to
the role indicated) on the fd given. The alg, kfile, and addr
parameters may be left as nil if desired. They correspond to the
algorithm used, the keyfile used, and the address to authentify
for. The function returns a file descriptor (perhaps encrypted
using alg), and a string with authentication information. Upon
error, the system error string is updated and a null descriptor
returned. |
SOURCE
|
/usr/octopus/port/lib/netutil.b |
SEE ALSO
|
security–auth(2), dial(2). |