redmine

Fixed headers to be used by clsyncmgr

... ... @@ -23,8 +23,8 @@
#include "output.h"
#include "sync.h"
#include "socket.h"
#include "control.h"
#include "socket.h"
static pthread_t pthread_control;
... ...
... ... @@ -17,6 +17,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CLSYNC_CONTROL_H
#define __CLSYNC_CONTROL_H
extern int control_run(options_t *options_p);
extern int control_cleanup(options_t *options_p);
#endif
... ...
... ... @@ -17,6 +17,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CLSYNC_OPTIONS_H
#define __CLSYNC_OPTIONS_H
#include <regex.h>
#define OPTION_FLAGS (1<<10)
... ... @@ -218,3 +222,5 @@ struct options {
};
typedef struct options options_t;
#endif
... ...
... ... @@ -25,19 +25,6 @@
#include "malloc.h"
#include "socket.h"
#if PIC
# define SOCKET_PROVIDER_LIBCLSYNC
#else
# define SOCKET_PROVIDER_CLSYNC
#endif
#ifdef SOCKET_PROVIDER_LIBCLSYNC
# define SOCKET_MAX SOCKET_MAX_LIBCLSYNC
#endif
#ifdef SOCKET_PROVIDER_CLSYNC
# define SOCKET_MAX SOCKET_MAX_CLSYNC
#endif
pthread_mutex_t socket_thread_mutex = PTHREAD_MUTEX_INITIALIZER;
int clsyncsockthreads_last = -1;
... ...
... ... @@ -20,12 +20,28 @@
#ifndef __CLSYNC_SOCKET_H
#define __CLSYNC_SOCKET_H
#include <stdint.h>
#include <pthread.h>
#define SOCKET_DEFAULT_PROT 0
#define SOCKET_DEFAULT_SUBPROT SUBPROT0_TEXT
// buffer size
#define SOCKET_BUFSIZ (1<<12)
#if PIC
# define SOCKET_PROVIDER_LIBCLSYNC
#else
# define SOCKET_PROVIDER_CLSYNC
#endif
#ifdef SOCKET_PROVIDER_LIBCLSYNC
# define SOCKET_MAX SOCKET_MAX_LIBCLSYNC
#endif
#ifdef SOCKET_PROVIDER_CLSYNC
# define SOCKET_MAX SOCKET_MAX_CLSYNC
#endif
struct clsyncsock {
int sock;
uint16_t prot;
... ... @@ -106,6 +122,7 @@ struct sockcmd_dat_version {
};
typedef struct sockcmd_dat_version sockcmd_dat_version_t;
#ifdef __CLSYNC_OPTIONS_H
struct sockcmd_dat_info {
char config_block[1<<8];
char label[1<<8];
... ... @@ -113,6 +130,7 @@ struct sockcmd_dat_info {
char flags_set[OPTION_FLAGS];
};
typedef struct sockcmd_dat_info sockcmd_dat_info_t;
#endif
struct sockcmd {
uint64_t cmd_num;
... ...