netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
fce_api.h
Go to the documentation of this file.
1
9
10#ifndef _FCE_API_H
11#define _FCE_API_H
12
13#ifdef WITH_FCE
14
15#include <atalk/globals.h>
16
17#define FCE_PACKET_VERSION 2
18
19/*
20 * Public FCE events
21 */
22#define FCE_FILE_MODIFY 1
23#define FCE_FILE_DELETE 2
24#define FCE_DIR_DELETE 3
25#define FCE_FILE_CREATE 4
26#define FCE_DIR_CREATE 5
27#define FCE_FILE_MOVE 6
28#define FCE_DIR_MOVE 7
29#define FCE_LOGIN 8
30#define FCE_LOGOUT 9
31/* keep in sync with public FCE events */
32#define FCE_FIRST_EVENT FCE_FILE_MODIFY
33#define FCE_LAST_EVENT FCE_LOGOUT
34
35
36/*
37 * Private FCE events
38 */
39#define FCE_CONN_START 42
40#define FCE_CONN_BROKEN 99
41
42
44#define FCE_PACKET_MAGIC "at_fcapi"
45
46/* flags for "fce_ev_info" of additional info to send in events */
47#define FCE_EV_INFO_PID (1 << 0)
48#define FCE_EV_INFO_USER (1 << 1)
49#define FCE_EV_INFO_SRCPATH (1 << 2)
50
116
117 struct fce_packet {
118 char fcep_magic[8];
119 unsigned char fcep_version;
120 unsigned char fcep_options;
121 unsigned char fcep_event;
122 uint32_t fcep_event_id;
123 uint64_t fcep_pid;
124 uint16_t fcep_userlen;
125 char fcep_user[MAXPATHLEN];
126 uint16_t fcep_pathlen1;
127 char fcep_path1[MAXPATHLEN];
128 uint16_t fcep_pathlen2;
129 char fcep_path2[MAXPATHLEN];
130};
131
132 typedef uint32_t fce_ev_t;
133
134 struct path;
135 struct ofork;
136
137 void fce_pending_events(const AFPObj *obj);
138 int fce_register(const AFPObj *obj, fce_ev_t event, const char *path,
139 const char *oldpath);
141 int fce_add_udp_socket(const char *target);
143 int fce_set_coalesce(const char *coalesce_opt);
145 int fce_set_events(const char *events);
146
147#define FCE_DEFAULT_PORT 12250
148#define FCE_DEFAULT_PORT_STRING "12250"
149
150#endif /* WITH_FCE */
151
152#endif /* _FCE_API_H */
target
static struct sockaddr_at target
Definition aecho.c:58
fce_register
int fce_register(const AFPObj *obj, fce_ev_t event, const char *path, const char *oldpath)
Definition fce_api.c:616
fce_set_events
int fce_set_events(const char *events)
Definition fce_api.c:749
fce_add_udp_socket
int fce_add_udp_socket(const char *target)
Extern connect to afpd parameter.
Definition fce_api.c:734
fce_pending_events
void fce_pending_events(const AFPObj *obj)
Definition fce_api.c:721
fce_set_coalesce
int fce_set_coalesce(const char *opt)
Set event coalescation to reduce number of events sent over UDP.
Definition fce_util.c:172
globals.h
obj
static AFPObj obj
Definition netatalk.c:69
AFPObj
Definition globals.h:166
ofork
Definition fork.h:22
path
Definition include/atalk/directory.h:123