netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
globals.h File Reference
#include <grp.h>
#include <iniparser.h>
#include <netdb.h>
#include <stdbool.h>
#include <sys/param.h>
#include <sys/types.h>
#include <netatalk/at.h>
#include <atalk/afp.h>
#include <atalk/compat.h>
#include <atalk/uam.h>
#include <atalk/unicode.h>

Go to the source code of this file.

Data Structures

struct  afp_volume_name
struct  afp_options
struct  AFPObj

Macros

#define AFP_AFPFUNC_START(a, b)
#define AFP_AFPFUNC_DONE(a, b)
#define AFP_CNID_START(a)
#define AFP_CNID_DONE()
#define AFP_READ_START(a)
#define AFP_READ_DONE()
#define AFP_WRITE_START(a)
#define AFP_WRITE_DONE()
#define MACFILELEN   31 /* Type2, HFS-compat */
#define UTF8FILELEN_EARLY   255 /* Type3, early Mac OS X 10.0-10.4.? */
#define MAXUSERLEN   256
#define MAXOPTLEN   256
#define DEFAULT_MAX_DIRCACHE_SIZE   8192
#define DEFAULT_DIRCACHE_VALIDATION_FREQ   1 /* Validate every Nth access (default 1 for backward compatibility) */
#define DEFAULT_DIRCACHE_METADATA_WINDOW   300 /* Metadata change window (seconds) */
#define DEFAULT_DIRCACHE_METADATA_THRESHOLD   60 /* Metadata change threshold (seconds) */
#define OPTION_DEBUG   (1 << 0)
#define OPTION_CLOSEVOL   (1 << 1)
#define OPTION_SERVERNOTIF   (1 << 2)
#define OPTION_NOSENDFILE   (1 << 3)
#define OPTION_VETOMSG   (1 << 4) /* whether to send an AFP message for veto file access */
#define OPTION_AFP_READ_LOCK   (1 << 5) /* whether to do AFP spec conforming read locks (default: no) */
#define OPTION_ANNOUNCESSH   (1 << 6)
#define OPTION_UUID   (1 << 7)
#define OPTION_ACL2MACCESS   (1 << 8)
#define OPTION_NOZEROCONF   (1 << 9)
#define OPTION_ACL2MODE   (1 << 10)
#define OPTION_SHARE_RESERV   (1 << 11) /* whether to use Solaris fcntl F_SHARE locks */
#define OPTION_DBUS_AFPSTATS   (1 << 12) /* whether to run dbus thread for afpstats */
#define OPTION_SPOTLIGHT   (1 << 13) /* whether to initialize Spotlight support */
#define OPTION_SPOTLIGHT_VOL   (1 << 14) /* whether spotlight shall be enabled by default for volumes */
#define OPTION_RECVFILE   (1 << 15)
#define OPTION_SPOTLIGHT_EXPR   (1 << 16) /* whether to allow Spotlight logic expressions */
#define OPTION_DDP   (1 << 17) /* whether to allow connections via appletalk/ddp */
#define OPTION_VALID_SHELLCHECK   (1 << 18) /* whether to check for valid login shell */
#define PASSWD_NONE   0
#define PASSWD_SET   (1 << 0)
#define PASSWD_NOSAVE   (1 << 1)
#define PASSWD_ALL   (PASSWD_SET | PASSWD_NOSAVE)
#define IS_AFP_SESSION(obj)
#define AFPOBJ_TMPSIZ   (MAXPATHLEN)

Typedefs

typedef struct AFPObj AFPObj
typedef int(* AFPCmd) (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)

Functions

int get_afp_errno (const int param)
void afp_options_init (struct afp_options *)
void afp_options_parse_cmdline (AFPObj *obj, int ac, char **av)
int setmessage (const char *)
void readmessage (AFPObj *)
void afp_over_asp (AFPObj *)
void afp_over_dsi (AFPObj *)
void afp_over_dsi_sighandlers (AFPObj *obj)

Variables

AFPObjAFPobj
int afp_version
int afp_errno
unsigned char nologin
struct dircurdir
char getwdbuf []
struct afp_options default_options
const char * Cnid_srv
const char * Cnid_port

Macro Definition Documentation

◆ AFP_AFPFUNC_DONE

#define AFP_AFPFUNC_DONE ( a,
b )

◆ AFP_AFPFUNC_START

#define AFP_AFPFUNC_START ( a,
b )

◆ AFP_CNID_DONE

#define AFP_CNID_DONE ( )

◆ AFP_CNID_START

#define AFP_CNID_START ( a)

◆ AFP_READ_DONE

#define AFP_READ_DONE ( )

◆ AFP_READ_START

#define AFP_READ_START ( a)

◆ AFP_WRITE_DONE

#define AFP_WRITE_DONE ( )

◆ AFP_WRITE_START

#define AFP_WRITE_START ( a)

◆ AFPOBJ_TMPSIZ

#define AFPOBJ_TMPSIZ   (MAXPATHLEN)

◆ DEFAULT_DIRCACHE_METADATA_THRESHOLD

#define DEFAULT_DIRCACHE_METADATA_THRESHOLD   60 /* Metadata change threshold (seconds) */

◆ DEFAULT_DIRCACHE_METADATA_WINDOW

#define DEFAULT_DIRCACHE_METADATA_WINDOW   300 /* Metadata change window (seconds) */

◆ DEFAULT_DIRCACHE_VALIDATION_FREQ

#define DEFAULT_DIRCACHE_VALIDATION_FREQ   1 /* Validate every Nth access (default 1 for backward compatibility) */

◆ DEFAULT_MAX_DIRCACHE_SIZE

#define DEFAULT_MAX_DIRCACHE_SIZE   8192

◆ IS_AFP_SESSION

#define IS_AFP_SESSION ( obj)
Value:
(((obj)->dsi && (obj)->dsi->serversock == -1) || ((obj)->Type))
static AFPObj obj
Definition netatalk.c:62

◆ MACFILELEN

#define MACFILELEN   31 /* Type2, HFS-compat */

◆ MAXOPTLEN

#define MAXOPTLEN   256

◆ MAXUSERLEN

#define MAXUSERLEN   256

◆ OPTION_ACL2MACCESS

#define OPTION_ACL2MACCESS   (1 << 8)

◆ OPTION_ACL2MODE

#define OPTION_ACL2MODE   (1 << 10)

◆ OPTION_AFP_READ_LOCK

#define OPTION_AFP_READ_LOCK   (1 << 5) /* whether to do AFP spec conforming read locks (default: no) */

◆ OPTION_ANNOUNCESSH

#define OPTION_ANNOUNCESSH   (1 << 6)

◆ OPTION_CLOSEVOL

#define OPTION_CLOSEVOL   (1 << 1)

◆ OPTION_DBUS_AFPSTATS

#define OPTION_DBUS_AFPSTATS   (1 << 12) /* whether to run dbus thread for afpstats */

◆ OPTION_DDP

#define OPTION_DDP   (1 << 17) /* whether to allow connections via appletalk/ddp */

◆ OPTION_DEBUG

#define OPTION_DEBUG   (1 << 0)

◆ OPTION_NOSENDFILE

#define OPTION_NOSENDFILE   (1 << 3)

◆ OPTION_NOZEROCONF

#define OPTION_NOZEROCONF   (1 << 9)

◆ OPTION_RECVFILE

#define OPTION_RECVFILE   (1 << 15)

◆ OPTION_SERVERNOTIF

#define OPTION_SERVERNOTIF   (1 << 2)

◆ OPTION_SHARE_RESERV

#define OPTION_SHARE_RESERV   (1 << 11) /* whether to use Solaris fcntl F_SHARE locks */

◆ OPTION_SPOTLIGHT

#define OPTION_SPOTLIGHT   (1 << 13) /* whether to initialize Spotlight support */

◆ OPTION_SPOTLIGHT_EXPR

#define OPTION_SPOTLIGHT_EXPR   (1 << 16) /* whether to allow Spotlight logic expressions */

◆ OPTION_SPOTLIGHT_VOL

#define OPTION_SPOTLIGHT_VOL   (1 << 14) /* whether spotlight shall be enabled by default for volumes */

◆ OPTION_UUID

#define OPTION_UUID   (1 << 7)

◆ OPTION_VALID_SHELLCHECK

#define OPTION_VALID_SHELLCHECK   (1 << 18) /* whether to check for valid login shell */

◆ OPTION_VETOMSG

#define OPTION_VETOMSG   (1 << 4) /* whether to send an AFP message for veto file access */

◆ PASSWD_ALL

#define PASSWD_ALL   (PASSWD_SET | PASSWD_NOSAVE)

◆ PASSWD_NONE

#define PASSWD_NONE   0

◆ PASSWD_NOSAVE

#define PASSWD_NOSAVE   (1 << 1)

◆ PASSWD_SET

#define PASSWD_SET   (1 << 0)

◆ UTF8FILELEN_EARLY

#define UTF8FILELEN_EARLY   255 /* Type3, early Mac OS X 10.0-10.4.? */

Typedef Documentation

◆ AFPCmd

typedef int(* AFPCmd) (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)

◆ AFPObj

typedef struct AFPObj AFPObj

Function Documentation

◆ afp_options_init()

void afp_options_init ( struct afp_options * )
extern

◆ afp_options_parse_cmdline()

void afp_options_parse_cmdline ( AFPObj * obj,
int ac,
char ** av )
extern

◆ afp_over_asp()

void afp_over_asp ( AFPObj * obj)
extern

◆ afp_over_dsi()

void afp_over_dsi ( AFPObj * obj)
extern

◆ afp_over_dsi_sighandlers()

void afp_over_dsi_sighandlers ( AFPObj * obj)
extern

◆ get_afp_errno()

int get_afp_errno ( const int param)
extern

◆ readmessage()

void readmessage ( AFPObj * obj)
extern

◆ setmessage()

int setmessage ( const char * message)
extern

Copy AFP message to message buffer

Parameters
message(r) message to send
Returns
0 if this message is being set the first time, return 1 if the preceeding message was the same

Variable Documentation

◆ afp_errno

int afp_errno
extern

◆ afp_version

int afp_version
extern

◆ AFPobj

AFPObj* AFPobj
extern

◆ Cnid_port

const char* Cnid_port
extern

◆ Cnid_srv

const char* Cnid_srv
extern

◆ curdir

struct dir* curdir
extern

◆ default_options

struct afp_options default_options
extern

◆ getwdbuf

char getwdbuf[]
extern

◆ nologin

unsigned char nologin
extern