netatalk
4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Toggle main menu visibility
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
#include <
atalk/globals.h
>
14
15
#define FCE_PACKET_VERSION 2
16
17
/*
18
* Public FCE events
19
*/
20
#define FCE_FILE_MODIFY 1
21
#define FCE_FILE_DELETE 2
22
#define FCE_DIR_DELETE 3
23
#define FCE_FILE_CREATE 4
24
#define FCE_DIR_CREATE 5
25
#define FCE_FILE_MOVE 6
26
#define FCE_DIR_MOVE 7
27
#define FCE_LOGIN 8
28
#define FCE_LOGOUT 9
29
/* keep in sync with public FCE events */
30
#define FCE_FIRST_EVENT FCE_FILE_MODIFY
31
#define FCE_LAST_EVENT FCE_LOGOUT
32
33
34
/*
35
* Private FCE events
36
*/
37
#define FCE_CONN_START 42
38
#define FCE_CONN_BROKEN 99
39
40
42
#define FCE_PACKET_MAGIC "at_fcapi"
43
44
/* flags for "fce_ev_info" of additional info to send in events */
45
#define FCE_EV_INFO_PID (1 << 0)
46
#define FCE_EV_INFO_USER (1 << 1)
47
#define FCE_EV_INFO_SRCPATH (1 << 2)
48
114
115
struct
fce_packet
{
116
char
fcep_magic
[8];
117
unsigned
char
fcep_version
;
118
unsigned
char
fcep_options
;
119
unsigned
char
fcep_event
;
120
uint32_t
fcep_event_id
;
121
uint64_t
fcep_pid
;
122
uint16_t
fcep_userlen
;
123
char
fcep_user
[MAXPATHLEN];
124
uint16_t
fcep_pathlen1
;
125
char
fcep_path1
[MAXPATHLEN];
126
uint16_t
fcep_pathlen2
;
127
char
fcep_path2
[MAXPATHLEN];
128
};
129
130
typedef
uint32_t
fce_ev_t
;
131
132
struct
path
;
133
struct
ofork
;
134
135
void
fce_pending_events
(
const
AFPObj
*
obj
);
136
int
fce_register
(
const
AFPObj
*
obj
,
fce_ev_t
event,
const
char
*
path
,
137
const
char
*oldpath);
139
int
fce_add_udp_socket
(
const
char
*
target
);
141
int
fce_set_coalesce
(
const
char
*coalesce_opt);
143
int
fce_set_events
(
const
char
*events);
144
145
#define FCE_DEFAULT_PORT 12250
146
#define FCE_DEFAULT_PORT_STRING "12250"
147
148
#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_ev_t
uint32_t fce_ev_t
Definition
fce_api.h:130
fce_set_coalesce
int fce_set_coalesce(const char *coalesce_opt)
Set event coalescation to reduce number of events sent over UDP.
Definition
fce_util.c:172
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
globals.h
obj
static AFPObj obj
Definition
netatalk.c:62
AFPObj
Definition
globals.h:158
fce_packet
Definition
fce_api.h:115
fce_packet::fcep_options
unsigned char fcep_options
Definition
fce_api.h:118
fce_packet::fcep_userlen
uint16_t fcep_userlen
Definition
fce_api.h:122
fce_packet::fcep_event
unsigned char fcep_event
Definition
fce_api.h:119
fce_packet::fcep_path1
char fcep_path1[MAXPATHLEN]
Definition
fce_api.h:125
fce_packet::fcep_pathlen2
uint16_t fcep_pathlen2
Definition
fce_api.h:126
fce_packet::fcep_user
char fcep_user[MAXPATHLEN]
Definition
fce_api.h:123
fce_packet::fcep_version
unsigned char fcep_version
Definition
fce_api.h:117
fce_packet::fcep_pathlen1
uint16_t fcep_pathlen1
Definition
fce_api.h:124
fce_packet::fcep_event_id
uint32_t fcep_event_id
Definition
fce_api.h:120
fce_packet::fcep_magic
char fcep_magic[8]
Definition
fce_api.h:116
fce_packet::fcep_pid
uint64_t fcep_pid
Definition
fce_api.h:121
fce_packet::fcep_path2
char fcep_path2[MAXPATHLEN]
Definition
fce_api.h:127
ofork
Definition
fork.h:22
path
Definition
include/atalk/directory.h:82
include
atalk
fce_api.h
Generated by
1.17.0