netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
fce_api_internal.h
Go to the documentation of this file.
1
6
7#ifndef _FCE_API_INTERNAL_H
8#define _FCE_API_INTERNAL_H
9
10#include <stdbool.h>
11
12#include <atalk/fce_api.h>
13
14#define FCE_MAX_UDP_SOCKS 5
15#define FCE_SOCKET_RETRY_DELAY_S 600
16#define FCE_HISTORY_LEN 10
17#define MAX_COALESCE_TIME_MS 1000
18
19#define FCE_COALESCE_CREATE (1 << 0)
20#define FCE_COALESCE_DELETE (1 << 1)
21#define FCE_COALESCE_ALL (FCE_COALESCE_CREATE | FCE_COALESCE_DELETE)
22
23 struct udp_entry {
24 int sock;
25 char *addr;
26 char *port;
27 struct addrinfo addrinfo;
28 struct sockaddr_storage sockaddr;
29 time_t next_try_on_error;
30};
31
32 struct fce_history {
33 fce_ev_t fce_h_event;
34 char fce_h_path[MAXPATHLEN + 1];
35 struct timeval fce_h_tv;
36};
37
38 struct fce_close_event {
39 time_t time;
40 char path[MAXPATHLEN + 1];
41};
42
43#define PACKET_HDR_LEN (sizeof(struct fce_packet) - FCE_MAX_PATH_LEN)
44
45 bool fce_handle_coalescation(int event, const char *path);
46 void fce_initialize_history(void);
47
48
49#endif /* _FCE_API_INTERNAL_H */
50
fce_api.h
API calls for file change event api.
fce_initialize_history
void fce_initialize_history(void)
Definition fce_util.c:87
fce_handle_coalescation
bool fce_handle_coalescation(int event, const char *path)
Definition fce_util.c:94
fce_close_event
Definition fce_api_internal.h:38
fce_close_event::time
time_t time
Definition fce_api_internal.h:39
fce_close_event::path
char path[MAXPATHLEN+1]
Definition fce_api_internal.h:40
fce_history
Definition fce_api_internal.h:32
fce_history::fce_h_path
char fce_h_path[MAXPATHLEN+1]
Definition fce_api_internal.h:34
fce_history::fce_h_event
fce_ev_t fce_h_event
Definition fce_api_internal.h:33
fce_history::fce_h_tv
struct timeval fce_h_tv
Definition fce_api_internal.h:35
path
Definition include/atalk/directory.h:123
udp_entry
Definition fce_api_internal.h:23
udp_entry::port
char * port
Definition fce_api_internal.h:26
udp_entry::next_try_on_error
time_t next_try_on_error
Definition fce_api_internal.h:29
udp_entry::sock
int sock
Definition fce_api_internal.h:24
udp_entry::sockaddr
struct sockaddr_storage sockaddr
Definition fce_api_internal.h:28
udp_entry::addrinfo
struct addrinfo addrinfo
Definition fce_api_internal.h:27
udp_entry::addr
char * addr
Definition fce_api_internal.h:25