• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/netatalk-2.2.0/etc/afpd/

Lines Matching defs:dsi

32 #include <atalk/dsi.h>
77 DSI *dsi = obj->handle;
99 dsi->read_count/1024.0, dsi->write_count/1024.0);
102 dsi_close(dsi);
111 DSI *dsi = (DSI *)AFPobj->handle;
113 if (dsi->flags & DSI_RECONINPROG) {
115 dsi->flags &= ~DSI_RECONINPROG;
119 if (dsi->flags & DSI_DISCONNECTED) {
140 DSI *dsi = (DSI *)AFPobj->handle;
161 DSI *dsi = (DSI *)AFPobj->handle;
179 dsi->proto_close(dsi);
180 dsi->socket = socket;
181 dsi->flags = DSI_RECONSOCKET;
182 dsi->datalen = 0;
183 dsi->eof = dsi->start = dsi->buffer;
184 dsi->in_write = 0;
185 dsi->header.dsi_requestID = dsiID;
186 dsi->header.dsi_command = DSIFUNC_CMD;
192 if (!dsi_cmdreply(dsi, AFP_OK)) {
212 DSI *dsi = (DSI *)AFPobj->handle;
213 dsi->flags |= DSI_DIE;
218 DSI *dsi = (DSI *)AFPobj->handle;
219 dsi->down_request = 1;
275 DSI *dsi = (DSI *)AFPobj->handle;
277 dsi->msg_request = 1;
279 dsi->msg_request = 2;
285 DSI *dsi = (DSI *)AFPobj->handle;
288 setitimer(ITIMER_REAL, &dsi->timer, NULL);
291 if ((dsi->flags & DSI_DATA)) {
292 dsi->flags &= ~DSI_DATA;
296 dsi->tickle++;
298 dsi->tickle,
299 (dsi->flags & DSI_DATA) ? "DSI_DATA" : "-",
300 (dsi->flags & DSI_RUNNING) ? "DSI_RUNNING" : "-",
301 (dsi->flags & DSI_SLEEPING) ? "DSI_SLEEPING" : "-",
302 (dsi->flags & DSI_EXTSLEEP) ? "DSI_EXTSLEEP" : "-",
303 (dsi->flags & DSI_DISCONNECTED) ? "DSI_DISCONNECTED" : "-",
304 (dsi->flags & DSI_DIE) ? "DSI_DIE" : "-",
305 (dsi->flags & DSI_NOREPLY) ? "DSI_NOREPLY" : "-",
306 (dsi->flags & DSI_RECONSOCKET) ? "DSI_RECONSOCKET" : "-",
307 (dsi->flags & DSI_RECONINPROG) ? "DSI_RECONINPROG" : "-");
309 if (dsi->flags & DSI_SLEEPING) {
310 if (dsi->tickle > AFPobj->options.sleep) {
317 if (dsi->flags & DSI_DISCONNECTED) {
322 if (dsi->tickle > AFPobj->options.disconnected) {
330 if ( !(dsi->flags & DSI_RUNNING) && (dsi->tickle >= AFPobj->options.timeout)) {
332 if (dsi_disconnect(dsi) != 0)
346 if (dsi_disconnect(dsi) != 0)
352 if dsi->in_write is set attention, tickle (and close?) msg
355 static void pending_request(DSI *dsi)
360 if (dsi->msg_request) {
361 if (dsi->msg_request == 2) {
365 dsi->msg_request = 0;
368 if (dsi->down_request) {
369 dsi->down_request = 0;
376 afp over dsi. this never returns.
380 DSI *dsi = (DSI *) obj->handle;
387 dsi->AFPobj = obj;
391 dsi->tickle = 0;
451 (setitimer(ITIMER_REAL, &dsi->timer, NULL) < 0)) {
461 if (setsockopt(dsi->socket,
470 if (setsockopt(dsi->socket,
486 cmd = dsi_receive(dsi);
490 if (dsi->flags & DSI_RECONSOCKET) {
492 dsi->flags &= ~DSI_RECONSOCKET;
497 if (dsi->flags & DSI_AFP_LOGGED_OUT) {
504 if (dsi->flags & DSI_GOT_ECONNRESET) {
511 if (dsi_disconnect(dsi) != 0)
519 if (!(dsi->flags & DSI_EXTSLEEP) && (dsi->flags & DSI_SLEEPING)) {
521 dsi->flags &= ~DSI_SLEEPING;
522 dsi->tickle = 0;
553 dsi->flags |= DSI_DATA;
554 dsi->tickle = 0;
565 dsi->flags &= ~DSI_DATA; /* thats no data in the sense we use it in alarm_handler */
568 if ((dsi->flags & DSI_DIE))
569 dsi_tickle(dsi);
582 function = (u_char) dsi->commands[0];
585 rc_idx = dsi->clientID % REPLAYCACHE_SIZE;
586 LOG(log_debug, logtype_afpd, "DSI request ID: %u", dsi->clientID);
588 if (replaycache[rc_idx].DSIreqID == dsi->clientID
591 dsi->clientID, AfpNum2name(function));
598 dsi->datalen = DSI_DATASIZ;
599 dsi->flags |= DSI_RUNNING;
604 (char *)&dsi->commands, dsi->cmdlen,
605 (char *)&dsi->data, &dsi->datalen);
617 dsi->flags &= ~DSI_RUNNING;
620 replaycache[rc_idx].DSIreqID = dsi->clientID;
625 dsi->datalen = 0;
631 if (dsi->flags & DSI_NOREPLY) {
632 dsi->flags &= ~DSI_NOREPLY;
636 if (!dsi_cmdreply(dsi, err)) {
637 LOG(log_error, logtype_afpd, "dsi_cmdreply(%d): %s", dsi->socket, strerror(errno) );
638 if (dsi_disconnect(dsi) != 0)
644 function = (u_char) dsi->commands[0];
646 dsi->datalen = DSI_DATASIZ;
647 dsi->flags |= DSI_RUNNING;
652 (char *)&dsi->commands, dsi->cmdlen,
653 (char *)&dsi->data, &dsi->datalen);
658 dsi->flags &= ~DSI_RUNNING;
666 dsi->datalen = 0;
670 if (!dsi_wrtreply(dsi, err)) {
672 if (dsi_disconnect(dsi) != 0)
685 dsi_writeinit(dsi, dsi->data, DSI_DATASIZ);
686 dsi_writeflush(dsi);
689 pending_request(dsi);