*/
-typedef struct s_bsock {
+struct BSOCK {
uint64_t read_seqno; /* read sequence number */
- uint32_t in_msg_no; /* intput message number */
+ uint32_t in_msg_no; /* input message number */
uint32_t out_msg_no; /* output message number */
int fd; /* socket file descriptor */
int32_t msglen; /* message length */
int port; /* desired port */
- int errors; /* set if errors on socket */
+ volatile int errors; /* set if errors on socket */
+ volatile int suppress_error_msgs; /* set to suppress error messages */
int b_errno; /* bsock errno */
- time_t timer_start; /* time started read/write */
- int timed_out; /* timed out in read/write */
- int timeout; /* time out after this value */
- int terminated; /* set when BNET_TERMINATE arrives */
+ volatile time_t timer_start; /* time started read/write */
+ volatile int timed_out; /* timed out in read/write */
+ volatile int timeout; /* time out after this value */
+ volatile int terminated; /* set when BNET_TERMINATE arrives */
int duped; /* set if duped BSOCK */
POOLMEM *msg; /* message pool buffer */
char *who; /* Name of daemon to which we are talking */
char *host; /* Host name/IP */
POOLMEM *errmsg; /* edited error message (to be implemented) */
RES *res; /* Resource to which we are connected */
- struct s_bsock *next; /* next BSOCK if duped */
+ BSOCK *next; /* next BSOCK if duped */
int spool; /* set for spooling */
FILE *spool_fd; /* spooling file */
- void *jcr; /* jcr or NULL for error msgs */
-} BSOCK;
+ JCR *jcr; /* jcr or NULL for error msgs */
+};
/* Signal definitions for use in bnet_sig() */
#define BNET_EOD -1 /* End of data stream, new data may follow */
#define BNET_HEARTBEAT -6 /* Heartbeat Response requested */
#define BNET_HB_RESPONSE -7 /* Only response permited to HB */
#define BNET_PROMPT -8 /* Prompt for UA */
+#define BNET_BTIME -9 /* Send UTC btime */
#define BNET_SETBUF_READ 1 /* Arg for bnet_set_buffer_size */
#define BNET_SETBUF_WRITE 2 /* Arg for bnet_set_buffer_size */
#define BNET_HARDEOF -2
#define BNET_ERROR -3
+/* SSL enabling values */
+#define BNET_SSL_NONE 0 /* cannot do SSL */
+#define BNET_SSL_OK 1 /* can do, but not required on my end */
+#define BNET_SSL_REQUIRED 2 /* SSL is required */
+
/*
* This is the structure of the in memory BPKT
*/