2 * $Id: dsi_tickle.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
4 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
5 * All rights reserved. See COPYRIGHT.
10 #endif /* HAVE_CONFIG_H */
13 #include <sys/types.h>
17 #include <atalk/dsi.h>
18 #include <netatalk/endian.h>
20 /* server generated tickles. as this is only called by the tickle handler,
21 * we don't need to block signals. well, actually, we might get it during
23 void dsi_tickle(DSI *dsi)
25 char block[DSI_BLOCKSIZ];
29 id = htons(dsi_serverID(dsi));
31 memset(block, 0, sizeof(block));
32 block[0] = DSIFL_REQUEST;
33 block[1] = DSIFUNC_TICKLE;
34 memcpy(block + 2, &id, sizeof(id));
35 /* code = len = reserved = 0 */
37 sigprocmask(SIG_BLOCK, &dsi->sigblockset, &oldset);
38 dsi_stream_write(dsi, block, DSI_BLOCKSIZ);
39 sigprocmask(SIG_SETMASK, &oldset, NULL);