3 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
4 * All rights reserved. See COPYRIGHT.
9 #endif /* HAVE_CONFIG_H */
12 #include <sys/types.h>
16 #include <atalk/dsi.h>
18 /* server generated tickles. as this is only called by the tickle handler,
19 * we don't need to block signals. */
20 int dsi_tickle(DSI *dsi)
22 char block[DSI_BLOCKSIZ];
25 if ((dsi->flags & DSI_SLEEPING) || dsi->in_write)
28 id = htons(dsi_serverID(dsi));
30 memset(block, 0, sizeof(block));
31 block[0] = DSIFL_REQUEST;
32 block[1] = DSIFUNC_TICKLE;
33 memcpy(block + 2, &id, sizeof(id));
34 /* code = len = reserved = 0 */
36 return dsi_stream_write(dsi, block, DSI_BLOCKSIZ, DSI_NOWAIT);