bzero ((char *) &addr, sizeof (addr));
__bzero ((char *) &addr, sizeof (addr));
static SVCXPRT *makefd_xprt (int, u_int, u_int) internal_function;struct tcp_rendezvous  {				/* kept in xprt->xp_p1 */    u_int sendsize;    u_int recvsize;  };struct tcp_conn  {				/* kept in xprt->xp_p1 */    enum xprt_stat strm_stat;    u_long x_id;    XDR xdrs;    char verf_body[MAX_AUTH_BYTES];  };/* * Usage: *      xprt = svctcp_create(sock, send_buf_size, recv_buf_size); * * Creates, registers, and returns a (rpc) tcp based transporter. * Once *xprt is initialized, it is registered as a transporter * see (svc.h, xprt_register).  This routine returns * a NULL if a problem occurred. * * If sock<0 then a socket is created, else sock is used. * If the socket, sock is not bound to a port then svctcp_create * binds it to an arbitrary port.  The routine then starts a tcp * listener on the socket's associated port.  In any (successful) case, * xprt->xp_sock is the registered socket number and xprt->xp_port is the * associated port number. * * Since tcp streams do buffered io similar to stdio, the caller can specify * how big the send and receive buffers are via the second and third parms; * 0 => use the system default. */SVCXPRT *svctcp_create (int sock, u_int sendsize, u_int recvsize){  bool_t madesock = FALSE;  SVCXPRT *xprt;  struct tcp_rendezvous *r;  struct sockaddr_in addr;  socklen_t len = sizeof (struct sockaddr_in);  if (sock == RPC_ANYSOCK)    {      if ((sock = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)	{	  perror (_("svctcp_.c - udp socket creation problem"));	  return (SVCXPRT *) NULL;	}      madesock = TRUE;    }  bzero ((char *) &addr, sizeof (addr));  addr.sin_family = AF_INET;  if (bindresvport (sock, &addr))    {      addr.sin_port = 0;      (void) bind (sock, (struct sockaddr *) &addr, len);    }  if ((getsockname (sock, (struct sockaddr *) &addr, &len) != 0) ||      (listen (sock, 2) != 0))    {      perror (_("svctcp_.c - cannot getsockname or listen"));      if (madesock)	(void) close (sock);      return (SVCXPRT *) NULL;    }  r = (struct tcp_rendezvous *) mem_alloc (sizeof (*r));  if (r == NULL)    {      (void) fputs (_("svctcp_create: out of memory\n"), stderr);      return NULL;    }  r->sendsize = sendsize;  r->recvsize = recvsize;  xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT));  if (xprt == NULL)    {      (void) fputs (_("svctcp_create: out of memory\n"), stderr);      return NULL;    }  xprt->xp_p2 = NULL;  xprt->xp_p1 = (caddr_t) r;  xprt->xp_verf = _null_auth;  xprt->xp_ops = &svctcp_rendezvous_op;  xprt->xp_port = ntohs (addr.sin_port);  xprt->xp_sock = sock;  xprt_register (xprt);  return xprt;}