]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/server_child.h
AFP statistics via dbus IPC
[netatalk.git] / include / atalk / server_child.h
index 6f8f18a0b7933837cf03f656f8cda51c6721081e..5e69401886dc7856287248f3e6df11bc1e99621e 100644 (file)
@@ -20,10 +20,13 @@ typedef struct afp_child {
     uid_t           afpch_uid;         /* user id of connected client (from the worker afpd process) */
     int             afpch_valid;       /* 1 if we have a clientid */
     int             afpch_killed;      /* 1 if we already tried to kill the client */
-    uint32_t        afpch_time;        /* client boot time (from the mac client) */
+    uint32_t        afpch_boottime;    /* client boot time (from the mac client) */
+    time_t          afpch_logintime;   /* time the child was added */
     uint32_t        afpch_idlen;       /* clientid len (from the Mac client) */
     char           *afpch_clientid;    /* clientid (from the Mac client) */
     int             afpch_ipc_fd;      /* socket for IPC bw afpd parent and childs */
+    int16_t         afpch_state;       /* state of AFP session (eg active, sleeping, disconnected) */
+    char           *afpch_volumes;     /* mounted volumes */
     struct afp_child **afpch_prevp;
     struct afp_child *afpch_next;
 } afp_child_t;
@@ -34,7 +37,6 @@ typedef struct {
     int             servch_count;                   /* Current count of active AFP sessions */
     int             servch_nsessions;               /* Number of allowed AFP sessions */
     afp_child_t    *servch_table[CHILD_HASHSIZE];   /* Hashtable with data of AFP sesssions */
-    void          (*servch_cleanup)(const pid_t);   /* Cleanup handler */
 } server_child_t;
 
 /* server_child.c */
@@ -42,6 +44,7 @@ extern server_child_t *server_child_alloc(int);
 extern afp_child_t *server_child_add(server_child_t *, pid_t, int ipc_fd);
 extern int  server_child_remove(server_child_t *, pid_t);
 extern void server_child_free(server_child_t *);
+extern afp_child_t *server_child_resolve(server_child_t *childs, id_t pid);
 
 extern void server_child_kill(server_child_t *, int);
 extern void server_child_kill_one_by_id(server_child_t *children, pid_t pid, uid_t,