2 * Copyright (c) 1996 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
10 #include <netatalk/endian.h>
11 #include <netatalk/at.h>
12 #include <atalk/atp.h>
13 #include <atalk/asp.h>
15 int asp_shutdown( asp )
18 struct atp_block atpb;
29 memcpy( p, &seq, sizeof(seq));
32 oport = asp->asp_sat.sat_port;
33 atpb.atp_saddr = &asp->asp_sat;
34 atpb.atp_saddr->sat_port = asp->asp_wss;
35 atpb.atp_sreqdata = asp->commands;
36 atpb.atp_sreqdlen = p - asp->commands;
38 atpb.atp_sreqtries = 5;
40 if ( atp_sreq( asp->asp_atp, &atpb, 1, ATP_XO ) < 0 ) {
41 asp->asp_sat.sat_port = oport;
45 iov.iov_base = asp->commands;
46 iov.iov_len = ASP_CMDSIZ;
47 atpb.atp_rresiov = &iov;
48 atpb.atp_rresiovcnt = 1;
50 if ( atp_rresp( asp->asp_atp, &atpb ) < 0 ) {
51 asp->asp_sat.sat_port = oport;
54 asp->asp_sat.sat_port = oport;