2 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
3 * All rights reserved. See COPYRIGHT.
11 #include <atalk/dsi.h>
12 #include <netatalk/endian.h>
14 /* this assumes that the reply follows right after the command, saving
15 * on a couple assignments. specifically, command, requestID, and
16 * reserved field are assumed to already be set. */
17 int dsi_cmdreply(DSI *dsi, const int err)
19 dsi->header.dsi_flags = DSIFL_REPLY;
20 /*dsi->header.dsi_command = DSIFUNC_CMD;*/
21 dsi->header.dsi_len = htonl(dsi->datalen);
22 dsi->header.dsi_code = htonl(err);
24 return dsi_stream_send(dsi, dsi->data, dsi->datalen);