]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/bsock.h
kes Add dynamic dll entry point for SHGetFolderPath to Win32 code.
[bacula/bacula] / bacula / src / lib / bsock.h
index fa4a6c46d90e98e1a985cbaa0394eaae2dfd28b7..05e9a905a038652ff073b381dc6effb8e4fae7bd 100644 (file)
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000-2004 Kern Sibbald and John Walker
+   Bacula® - The Network Backup Solution
 
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
+   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
 
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
 
-   You should have received a copy of the GNU Lesser General Public
-   License along with this library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-   MA 02111-1307, USA.
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
 
- */
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
 
 struct BSOCK {
    uint64_t read_seqno;               /* read sequence number */
@@ -58,6 +66,7 @@ struct BSOCK {
    FILE *spool_fd;                    /* spooling file */
    JCR *jcr;                          /* jcr or NULL for error msgs */
    struct sockaddr client_addr;    /* client's IP address */
+   struct sockaddr_in peer_addr;    /* peer's IP address */
 };
 
 /* Signal definitions for use in bnet_sig() */
@@ -71,7 +80,9 @@ enum {
    BNET_HB_RESPONSE    = -7,          /* Only response permited to HB */
    BNET_PROMPT         = -8,          /* Prompt for UA */
    BNET_BTIME          = -9,          /* Send UTC btime */
-   BNET_BREAK          = -10          /* Stop current command -- ctl-c */
+   BNET_BREAK          = -10,         /* Stop current command -- ctl-c */
+   BNET_START_SELECT   = -11,         /* Start of a selection list */
+   BNET_END_SELECT     = -12          /* End of a select list */
 };
 
 #define BNET_SETBUF_READ  1           /* Arg for bnet_set_buffer_size */
@@ -89,36 +100,3 @@ enum {
 #define BNET_TLS_NONE     0           /* cannot do TLS */
 #define BNET_TLS_OK       1           /* can do, but not required on my end */
 #define BNET_TLS_REQUIRED 2           /* TLS is required */
-
-/*
- * This is the structure of the in memory BPKT
- */
-typedef struct s_bpkt {
-   char *id;                          /* String identifier or name of field */
-   uint8_t type;                      /* field type */
-   uint32_t len;                      /* field length for string, name, bytes */
-   void *value;                       /* pointer to value */
-} BPKT;
-
-/*
- * These are the data types that can be sent.
- * For all values other than string, the storage space
- *  is assumed to be allocated in the receiving packet.
- *  For BP_STRING if the *value is non-zero, it is a
- *  pointer to a POOLMEM buffer, and the Memory Pool
- *  routines will be used to assure that the length is
- *  adequate. NOTE!!! This pointer will be changed
- *  if the memory is reallocated (sort of like Mmsg(&pool)
- *  does). If the pointer is NULL, a POOLMEM
- *  buffer will be allocated.
- */
-#define BP_EOF       0                /* end of file */
-#define BP_CHAR      1                /* Character */
-#define BP_INT32     1                /* 32 bit integer */
-#define BP_UINT32    3                /* Unsigned 32 bit integer */
-#define BP_INT64     4                /* 64 bit integer */
-#define BP_STRING    5                /* string */
-#define BP_NAME      6                /* Name string -- limited length */
-#define BP_BYTES     7                /* Binary bytes */
-#define BP_FLOAT32   8                /* 32 bit floating point */
-#define BP_FLOAT64   9                /* 64 bit floating point */