shithub: riscv

ref: ec737b6a2e464330946d5800841a1e631cd36acd
dir: /sys/man/8/aan/

View raw version
.TH AAN 8
.SH NAME
aan, aanuke \- always available network
.SH SYNOPSIS
.B aan
.B -c
[
.B -d
]
[
.B -m maxto
]
.I dialstring
.br
.B aan
[
.B -d
]
[
.B -m maxto
]
.I netdir
.br
.B aanuke
.SH DESCRIPTION
.I Aan
tunnels traffic between a client and a server through a persistent
network connection.  If the connection breaks (voluntarily or
due to networking problems), the
.I aan
client re-establishes the connection by redialing the server.
.PP
.I Aan 
uses a unique protocol to make sure no data is ever lost even
when the connection breaks.
After a reconnection,
.I aan
retransmits all unacknowledged data between client and server.
.PP
A connection can be broken voluntarily (e.g. by roaming over IP networks), 
or a connection can break when the IP service is unreliable.
In either case,
.I aan
re-establishes the client's connection automatically.
.PP 
When the server part has not heard from the client in
.I maxto
seconds, the server part of
.I aan
exits.
The default
.I maxto
is one day.
The client side (option
.BR -c )
calls the server by its
.IR dialstring ,
while the server side listens for connections in the 
already-announced network directory
.IR netdir .
.PP
.I Aan
is usually run automatically through the
.B -p
option of
.IR import (4)
and
.IR cpu (1).
.PP
.I Aanuke
prints commands that will cause all processes called
.I aan
that are owned by the current user and do not have an
active tcp connection to be terminated.
Use the
.B send
command of
.IR rio (1),
or pipe the output of
.I kill
into
.IR rc (1)
to execute the commands.
.SH EXAMPLES
Assume the server part of
.I aan
is encapsulated in
.I exportfs
on the machine
.B sob
and started through
.B aux/listen
as follows:
.IP
.EX
netdir=`{echo $3 | sed 's;/[0-9]+$;!*!0;'}
exec exportfs -a -A $netdir
.EE
.PP
Then machine
.BR astro6 's
name space can be imported through
.I aan
using this command:
.IP
.EX
import -p astro6 / /mnt/term
.EE
.PP
Kill idle instances of
.I aan
left behind by a terminal that has been powered off:
.IP
.EX
aanuke | rc
.EE
.SH FILES
.TF /sys/log/aan
.TP
.B /sys/log/aan
Log file
.SH SOURCE
.B /sys/src/cmd/aan.c
.br
.B /rc/bin/aanuke
.SH SEE ALSO
.IR import (4),
.IR exportfs (4),
.IR cpu (1)
.SH HISTORY
.I Aanuke
first appeared in 9front (April, 2014).