- AFPObj *AFPobj;
- dsi_proto protocol;
- struct dsi_block header;
- struct sockaddr_storage server, client;
- struct itimerval timer;
- int tickle; /* tickle count */
- int in_write; /* in the middle of writing multiple packets,
- signal handlers can't write to the socket */
- int msg_request; /* pending message to the client */
- int down_request; /* pending SIGUSR1 down in 5 mn */
-
- u_int32_t attn_quantum, datasize, server_quantum;
- u_int16_t serverID, clientID;
- char *status;
- u_int8_t commands[DSI_CMDSIZ], data[DSI_DATASIZ];
- size_t statuslen;
- size_t datalen, cmdlen;
- off_t read_count, write_count;
- uint32_t flags; /* DSI flags like DSI_SLEEPING, DSI_DISCONNECTED */
- const char *program;
- int socket, serversock;
-
- /* protocol specific open/close, send/receive
- * send/receive fill in the header and use dsi->commands.
- * write/read just write/read data */
- pid_t (*proto_open)(struct DSI *);
- void (*proto_close)(struct DSI *);
-
- /* url registered with slpd */
-#ifdef USE_SRVLOC
- char srvloc_url[512];
-#endif
+ struct DSI *next; /* multiple listening addresses */
+ AFPObj *AFPobj;
+ int statuslen;
+ char status[1400];
+ char *signature;
+ struct dsi_block header;
+ struct sockaddr_storage server, client;
+ struct itimerval timer;
+ int tickle; /* tickle count */
+ int in_write; /* in the middle of writing multiple packets,
+ signal handlers can't write to the socket */
+ int msg_request; /* pending message to the client */
+ int down_request; /* pending SIGUSR1 down in 5 mn */
+
+ uint32_t attn_quantum, datasize, server_quantum;
+ uint16_t serverID, clientID;
+ uint8_t commands[DSI_CMDSIZ], data[DSI_DATASIZ];
+ size_t datalen, cmdlen;
+ off_t read_count, write_count;
+ uint32_t flags; /* DSI flags like DSI_SLEEPING, DSI_DISCONNECTED */
+ int socket; /* AFP session socket */
+ int serversock; /* listening socket */
+
+ /* DSI readahead buffer used for buffered reads in dsi_peek */
+ size_t dsireadbuf; /* size of the DSI readahead buffer used in dsi_peek() */
+ char *buffer; /* buffer start */
+ char *start; /* current buffer head */
+ char *eof; /* end of currently used buffer */
+ char *end;