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