netatalk  4.4.0dev
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/*
2 * File: fce_api_internal.h
3 * Author: mw
4 *
5 * Created on 1. Oktober 2010, 23:48
6 */
7
8#ifndef _FCE_API_INTERNAL_H
9#define _FCE_API_INTERNAL_H
10
11#include <stdbool.h>
12
13#include <atalk/fce_api.h>
14
15#define FCE_MAX_UDP_SOCKS 5 /* Allow a maximum of udp listeners for file change events */
16#define FCE_SOCKET_RETRY_DELAY_S 600 /* Pause this time in s after socket was broken */
17#define FCE_HISTORY_LEN 10 /* This is used to coalesce events */
18#define MAX_COALESCE_TIME_MS 1000 /* Events oldeer than this are not coalesced */
19
20#define FCE_COALESCE_CREATE (1 << 0)
21#define FCE_COALESCE_DELETE (1 << 1)
22#define FCE_COALESCE_ALL (FCE_COALESCE_CREATE | FCE_COALESCE_DELETE)
23
24struct udp_entry {
25 int sock;
26 char *addr;
27 char *port;
29 struct sockaddr_storage sockaddr;
30 time_t next_try_on_error; /* In case of error set next timestamp to retry */
31};
32
35 char fce_h_path[MAXPATHLEN + 1];
36 struct timeval fce_h_tv;
37};
38
40 time_t time;
41 char path[MAXPATHLEN + 1];
42};
43
44#define PACKET_HDR_LEN (sizeof(struct fce_packet) - FCE_MAX_PATH_LEN)
45
46bool fce_handle_coalescation(int event, const char *path);
47void fce_initialize_history(void);
48
49
50#endif /* _FCE_API_INTERNAL_H */
51
uint32_t fce_ev_t
Definition fce_api.h:127
void fce_initialize_history(void)
Definition fce_util.c:87
bool fce_handle_coalescation(int event, const char *path)
Definition fce_util.c:94
Definition fce_api_internal.h:39
time_t time
Definition fce_api_internal.h:40
char path[MAXPATHLEN+1]
Definition fce_api_internal.h:41
Definition fce_api_internal.h:33
char fce_h_path[MAXPATHLEN+1]
Definition fce_api_internal.h:35
fce_ev_t fce_h_event
Definition fce_api_internal.h:34
struct timeval fce_h_tv
Definition fce_api_internal.h:36
Definition include/atalk/directory.h:97
Definition fce_api_internal.h:24
char * port
Definition fce_api_internal.h:27
time_t next_try_on_error
Definition fce_api_internal.h:30
int sock
Definition fce_api_internal.h:25
struct sockaddr_storage sockaddr
Definition fce_api_internal.h:29
struct addrinfo addrinfo
Definition fce_api_internal.h:28
char * addr
Definition fce_api_internal.h:26