#ifndef INCtransferh #define INCtransferh #include /* finds #includes to define the types used in the HEADER */ typedef struct block_header { /* format of data block */ uint16_t hdr_flags; /* see below */ uint16_t hdr_stream; /* =0 for forced ack request or 1=>MAX_STREAM */ uint16_t hdr_endian; /* =1 transmitted in host byte order */ uint16_t hdr_spare; uint32_t hdr_sequence; /* for this stream */ uint32_t hdr_blocklength; /* total length of this block including the header */ uint32_t hdr_datalength; /* length of user data in the block */ uint32_t hdr_offset; /* very large blocks may be fragmented */ uint32_t hdr_id1; /* for spy to locate header =0x19062002 */ uint32_t hdr_id2; /* for spy to locate header =0x09592400 */ } HEADER; /* flags (bit 0 is lsb) bit 0 request = 0; ack = 1 bit 1 = 1 suppress ack; =0 normal ack bit 2 = 1 force ack (no data follows) */ #define HDR_ID1 0x19062002 #define HDR_ID2 0x09592400 typedef struct ack { uint16_t acq_flags; /* bit 0 = 1 for ack */ uint16_t acq_code; /* =0 for good ack otherwise error reason */ uint16_t acq_ts_state; /* tape server state - see below */ uint16_t acq_stream; /* =0 for forced ack ack or 1=>MAX_STREAM */ uint16_t acq_endian; /* =1 transmitted in host byte order */ uint16_t acq_spare; uint32_t acq_sequence; /* for stream != 0 is sequence being acked */ uint16_t acq_stream_state1; /* see below */ uint16_t acq_stream_state2; /* */ uint16_t acq_stream_state3; /* */ uint16_t acq_stream_state4; /* */ uint16_t acq_stream_window1; /* */ uint16_t acq_stream_window2; /* */ uint16_t acq_stream_window3; /* */ uint16_t acq_stream_window4; /* */ } ACK; typedef struct stream_status { uint32_t str_state; uint32_t str_sequence; uint32_t str_window; } STREAM; int transferTxData (char *, unsigned int, int); int transferTxRestart (); int transferBlockSize(int); int transferMode(int); int transferEndian(int); int trasnferBlockMode(int); int transferPort(int); int transferInit (char *); void transferClose (); int transferStatus (); int transferSetVerbose(int); int transferSetUser(int); int transferNice(int); int transferUseOverlap(int); int transferTxWait(); int transferState(); int transferSndBufSize(int); #endif