]> granicus.if.org Git - fcron/commitdiff
socket.c's header file (creater dyncom.h)
authorthib <thib>
Sat, 2 Mar 2002 17:29:50 +0000 (17:29 +0000)
committerthib <thib>
Sat, 2 Mar 2002 17:29:50 +0000 (17:29 +0000)
socket.h

index 60b1c97945fe3230c70f51c88e17e71e63c77efc..8b090ed51d5cdb5a0e9ae26e36f795a23f927d56 100644 (file)
--- a/socket.h
+++ b/socket.h
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: socket.h,v 1.1 2002-02-25 18:46:54 thib Exp $ */
+ /* $Id: socket.h,v 1.2 2002-03-02 17:29:50 thib Exp $ */
+
+/* This file describe the communication protocol between fcron and fcrondyn */
 
 #ifndef __SOCKET_H__
 #define __SOCKET_H__
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
+#include "dyncom.h"
+
+
+/* public var defined by socket.c */
+extern fd_set read_set;
+extern int set_max_fd;
+
+/* functions prototypes */
+extern void init_socket(void);
+extern void check_socket(int num);
+extern void close_socket(void);
+
+
+
+/* struct used by fcron : */
+typedef struct fcrondyn_cl {
+    struct fcrondyn_cl *fcl_next;
+    int fcl_sock_fd;
+    char *fcl_user;
+    time_t fcl_idle_since;
+    int fcl_cmd_len;
+    long int *fcl_cmd;
+} fcrondyn_cl;
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 
 #endif /* __SOCKET_H__ */