2 * $Id: dsi_init.c,v 1.10 2009-11-05 14:38:08 franklahm Exp $
4 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
5 * All rights reserved. See COPYRIGHT.
10 #endif /* HAVE_CONFIG_H */
15 #include <atalk/dsi.h>
16 #include "dsi_private.h"
18 DSI *dsi_init(const dsi_proto protocol, const char *program,
19 const char *hostname, const char *address,
20 const char *port, const int proxy, const u_int32_t quantum)
24 if ((dsi = (DSI *) calloc(1, sizeof(DSI))) == NULL) {
27 dsi->attn_quantum = DSI_DEFQUANT; /* default quantum size */
28 dsi->server_quantum = quantum; /* default server quantum */
29 dsi->program = program;
32 /* currently the only transport protocol that exists for dsi */
34 if (!dsi_tcp_init(dsi, hostname, address, port, proxy)) {
40 default: /* unknown protocol */
49 void dsi_setstatus(DSI *dsi, char *status, const size_t slen)
52 dsi->statuslen = slen;