2 * $Id: asp_init.c,v 1.4 2009-10-13 22:55:37 didg Exp $
4 * Copyright (c) 1990,1991 Regents of The University of Michigan.
7 * Permission to use, copy, modify, and distribute this software and
8 * its documentation for any purpose and without fee is hereby granted,
9 * provided that the above copyright notice appears in all copies and
10 * that both that copyright notice and this permission notice appear
11 * in supporting documentation, and that the name of The University
12 * of Michigan not be used in advertising or publicity pertaining to
13 * distribution of the software without specific, written prior
14 * permission. This software is supplied as is without expressed or
15 * implied warranties of any kind.
17 * Research Systems Unix Group
18 * The University of Michigan
20 * 535 W. William Street
23 * netatalk@itd.umich.edu
28 #endif /* HAVE_CONFIG_H */
30 #include <sys/types.h>
33 #include <sys/socket.h>
34 #include <sys/param.h>
35 #include <netatalk/at.h>
36 #include <atalk/atp.h>
37 #include <atalk/asp.h>
45 if (( asp = (struct ASP *)calloc(1, sizeof( struct ASP ))) == NULL ) {
51 asp->asp_sat.sat_len = sizeof( struct sockaddr_at );
53 asp->asp_sat.sat_family = AF_APPLETALK;
54 asp->asp_sat.sat_addr.s_net = ATADDR_ANYNET;
55 asp->asp_sat.sat_addr.s_node = ATADDR_ANYNODE;
56 asp->asp_sat.sat_port = ATADDR_ANYPORT;
57 asp->asp_status = NULL;
60 asp->asp_flags = ASPFL_SLS;
61 asp->cmdlen = asp->datalen = 0;
62 asp->read_count = asp->write_count = 0;
63 asp->commands = asp->cmdbuf + 4;
68 void asp_setstatus(ASP asp, char *status, const int slen)
70 asp->asp_status = status;