% Copyright (c) 1988 Massachusetts Institute of Technology
%	$Source: /afs/stacken.kth.se/src/SourceRepository/stacken-zephyr/doc/progman/destination-addr.tex,v $
%	$Author: lha $
%	$Header: /afs/stacken.kth.se/src/SourceRepository/stacken-zephyr/doc/progman/destination-addr.tex,v 1.1.1.1 1998/01/27 11:07:12 lha Exp $
%
\subsection{Changing the Destination Address}
\label{destination-addr}

Applications normally want to send all outgoing notices to the
HostManager, which will redistribute them to the proper server.  In
some cases, though, an application may want to communicate directly
with a specific client or server, bypassing the normal routing
mechanisms.  The following functions facilitate this.

\subsubsection{ZGetDestAddr}
\label{ZGetDestAddr}

\template{struct sockaddr_in}{ZGetDestAddr}{}
\etemplate
\prereq{ZInitialize}
\errors{None}

The ZGetDestAddr function returns the current destination address used
by the \Zephyr\ library.  This sockaddr_in (internet address and port
number) is the destination for all packets transmitted by the 
\Zephyr\ library.


\subsubsection{ZSetDestAddr}
\label{ZSetDestAddr}

\template{Code_t}{ZSetDestAddr}{addr}
\tline{struct}{sockaddr_in *addr}
\etemplate
\prereq{ZInitialize}
\errors{None}

The ZSetDestAddr function sets the destination address for all packets
transmitted by the \Zephyr\ library.
