netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afpclient.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/uio.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <atalk/adouble.h>
#include <atalk/afp.h>
#include "dsi.h"

Go to the source code of this file.

Data Structures

struct  CONN
 
struct  afp_filedir_parms
 
struct  afp_volume_parms
 
struct  darwin_ace
 

Macros

#define SA_ONESHOT   SA_RESETHAND
 
#define bswap_64(x)
 
#define AFP_CLOSEVOL   2
 
#define AFP_ENUMERATE   9
 
#define AFP_GETSRVINFO   15
 
#define AFP_GETSRVPARAM   16
 
#define AFP_LOGIN   18
 
#define AFP_LOGOUT   20
 
#define AFP_OPENVOL   24
 
#define AFP_OPENDIR   25
 
#define AFP_OPENFORK   26
 
#define AFP_OPENDT   48
 
#define AFP_CLOSEDT   49
 
#define DIRPBIT_ATTR   0
 
#define DIRPBIT_PDID   1
 
#define DIRPBIT_CDATE   2
 
#define DIRPBIT_MDATE   3
 
#define DIRPBIT_BDATE   4
 
#define DIRPBIT_FINFO   5
 
#define DIRPBIT_LNAME   6
 
#define DIRPBIT_SNAME   7
 
#define DIRPBIT_DID   8
 
#define DIRPBIT_OFFCNT   9
 
#define DIRPBIT_UID   10
 
#define DIRPBIT_GID   11
 
#define DIRPBIT_ACCESS   12
 
#define DIRPBIT_PDINFO   13
 
#define DIRPBIT_UNIXPR   15
 
#define FILDIRBIT_ISDIR   (1 << 7)
 
#define FILDIRBIT_ISFILE   (0)
 
#define DIRDID_ROOT_PARENT   htonl(1)
 
#define DIRDID_ROOT   htonl(2)
 
#define FILPBIT_ATTR   0
 
#define FILPBIT_PDID   1
 
#define FILPBIT_CDATE   2
 
#define FILPBIT_MDATE   3
 
#define FILPBIT_BDATE   4
 
#define FILPBIT_FINFO   5
 
#define FILPBIT_LNAME   6
 
#define FILPBIT_SNAME   7
 
#define FILPBIT_FNUM   8
 
#define FILPBIT_DFLEN   9
 
#define FILPBIT_RFLEN   10
 
#define FILPBIT_EXTDFLEN   11
 
#define FILPBIT_PDINFO   13
 
#define FILPBIT_EXTRFLEN   14
 
#define FILPBIT_UNIXPR   15
 
#define VOLPBIT_ATTR_RO   (1 << 0)
 
#define VOLPBIT_ATTR_PASSWD   (1 << 1)
 
#define VOLPBIT_ATTR_FILEID   (1 << 2)
 
#define VOLPBIT_ATTR_CATSEARCH   (1 << 3)
 
#define VOLPBIT_ATTR_BLANKACCESS   (1 << 4)
 
#define VOLPBIT_ATTR_UNIXPRIV   (1 << 5)
 
#define VOLPBIT_ATTR_UTF8   (1 << 6)
 
#define VOLPBIT_ATTR_NONETUID   (1 << 7)
 
#define VOLPBIT_ATTR_PRIVPARENT   (1 << 8)
 
#define VOLPBIT_ATTR_NOEXCHANGE   (1 << 9)
 
#define VOLPBIT_ATTR_EXTATTRS   (1 << 10)
 
#define VOLPBIT_ATTR_ACLS   (1 << 11)
 
#define VOLPBIT_ATTR_CASESENS   (1 << 12)
 
#define VOLPBIT_ATTR_TM   (1 << 13)
 
#define VOLPBIT_ATTR   0
 
#define VOLPBIT_SIG   1
 
#define VOLPBIT_CDATE   2
 
#define VOLPBIT_MDATE   3
 
#define VOLPBIT_BDATE   4
 
#define VOLPBIT_VID   5
 
#define VOLPBIT_BFREE   6
 
#define VOLPBIT_BTOTAL   7
 
#define VOLPBIT_NAME   8
 
#define VOLPBIT_XBFREE   9
 
#define VOLPBIT_XBTOTAL   10
 
#define VOLPBIT_BSIZE   11
 
#define AFPOF_DFORK   0x00
 
#define AFPOF_RFORK   0x80
 
#define OPENFORK_DATA   (0)
 
#define OPENFORK_RSCS   (1<<7)
 
#define OPENACC_RD   (1<<0)
 
#define OPENACC_WR   (1<<1)
 
#define OPENACC_DRD   (1<<4)
 
#define OPENACC_DWR   (1<<5)
 
#define AFPFORK_OPEN   (1<<0)
 
#define AFPFORK_RSRC   (1<<1)
 
#define AFPFORK_DATA   (1<<2)
 
#define AFPFORK_DIRTY   (1<<3)
 
#define AFPFORK_ACCRD   (1<<4)
 
#define AFPFORK_ACCWR   (1<<5)
 
#define AFPFORK_ACCMASK   (AFPFORK_ACCRD | AFPFORK_ACCWR)
 
#define AD_FILELOCK_BASE   (UINT32_C(0x7FFFFFFF) - 9)
 
#define min(a, b)   ((a) < (b) ? (a) : (b))
 
#define PASSWDLEN   8
 
#define kFileSec_UUID   (1 << 0)
 
#define kFileSec_GRPUUID   (1 << 1)
 
#define kFileSec_ACL   (1 << 2)
 
#define kFileSec_REMOVEACL   (1 << 3)
 
#define kFileSec_Inherit   (1 << 4)
 
#define DARWIN_ACE_FLAGS_PERMIT   0x00000001 /* Bit 0: ALLOW access */
 
#define DARWIN_ACE_FLAGS_DENY   0x00000002 /* Bit 1: DENY access */
 
#define DARWIN_ACE_FLAGS_FILE_INHERIT   0x00000020 /* Bit 5: Inherit to files */
 
#define DARWIN_ACE_FLAGS_DIRECTORY_INHERIT   0x00000040 /* Bit 6: Inherit to dirs */
 
#define DARWIN_ACE_FLAGS_ONLY_INHERIT   0x00000100 /* Bit 8: Inherit only */
 
#define DARWIN_ACE_READ_DATA   0x00000002
 
#define DARWIN_ACE_WRITE_DATA   0x00000004
 
#define DARWIN_ACE_EXECUTE   0x00000008
 

Typedefs

typedef struct CONN CONN
 
typedef struct darwin_ace darwin_ace_t
 

Functions

int dsi_cmd_receive (DSI *x)
 
int dsi_data_receive (DSI *x)
 
void SendInit (DSI *dsi)
 
void SetLen (DSI *dsi, int ofs)
 
void afp_volume_unpack (struct afp_volume_parms *parms, unsigned char *b, uint16_t rbitmap)
 
void afp_filedir_unpack (CONN *conn, struct afp_filedir_parms *filedir, const unsigned char *b, uint16_t rfbitmap, uint16_t rdbitmap)
 
int afp_filedir_pack (CONN *conn, unsigned char *b, struct afp_filedir_parms *filedir, uint16_t rfbitmap, uint16_t rdbitmap)
 
int OpenClientSocket (char *host, int port)
 
int CloseClientSocket (int fd)
 
void dump_header (DSI *dsi)
 
unsigned int DSIOpenSession (CONN *conn)
 
unsigned int DSIGetStatus (CONN *conn)
 
unsigned int DSICloseSession (CONN *conn)
 
unsigned int AFPopenLogin (CONN *conn, const char *vers, const char *uam, const char *usr, const char *pwd)
 
unsigned int AFPopenLoginExt (CONN *conn, const char *vers, const char *uam, const char *usr, const void *auth_info, size_t auth_info_len)
 
unsigned int AFPopenLoginExt_pwd (CONN *conn, const char *vers, const char *uam, const char *usr, const char *pwd)
 
unsigned int AFPLoginCont (CONN *conn, const void *auth_info, size_t auth_info_len)
 
unsigned int AFPLogOut (CONN *conn)
 
unsigned int AFPChangePW (CONN *conn, char *uam, char *usr, char *opwd, char *pwd)
 
unsigned int AFPzzz (CONN *conn, int)
 
unsigned int AFPGetSrvrInfo (CONN *conn)
 
unsigned int AFPGetSrvrParms (CONN *conn)
 
unsigned int AFPGetSrvrMsg (CONN *conn, uint16_t type, uint16_t bitmap)
 
unsigned int AFPCloseVol (CONN *conn, uint16_t vol)
 
unsigned int AFPCloseDT (CONN *conn, uint16_t vol)
 
unsigned int AFPByteLock (CONN *conn, uint16_t fork, int end, int mode, int offset, int size)
 
unsigned int AFPByteLock_ext (CONN *conn, uint16_t fork, int end, int mode, off_t offset, off_t size)
 
unsigned int AFPCloseFork (CONN *conn, uint16_t fork)
 
unsigned int AFPFlush (CONN *conn, uint16_t vol)
 
unsigned int AFPFlushFork (CONN *conn, uint16_t fork)
 
unsigned int AFPDelete (CONN *conn, uint16_t vol, int did, char *name)
 
unsigned int AFPGetComment (CONN *conn, uint16_t vol, int did, char *name)
 
unsigned int AFPRemoveComment (CONN *conn, uint16_t vol, int did, char *name)
 
unsigned int AFPAddComment (CONN *conn, uint16_t vol, int did, char *name, char *cmt)
 
uint16_t AFPOpenVol (CONN *conn, char *vol, uint16_t bitmap)
 
uint16_t AFPOpenFork (CONN *conn, uint16_t vol, char type, uint16_t bitmap, int did, char *name, uint16_t access)
 
unsigned int AFPGetVolParam (CONN *conn, uint16_t vol, uint16_t bitmap)
 
unsigned int AFPSetVolParam (CONN *conn, uint16_t vol, uint16_t bitmap, struct afp_volume_parms *parms)
 
unsigned int AFPCreateFile (CONN *conn, uint16_t vol, char type, int did, char *name)
 
unsigned int AFPCreateDir (CONN *conn, uint16_t vol, int did, char *name)
 
unsigned int AFPWriteHeader (DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence)
 
unsigned int AFPWriteFooter (DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence)
 
unsigned int AFPWrite (CONN *conn, uint16_t fork, int offset, int size, char *data, char whence)
 
unsigned int AFPWrite_ext (CONN *conn, uint16_t fork, off_t offset, off_t size, char *data, char whence)
 
unsigned int AFPWrite_ext_async (CONN *conn, uint16_t fork, off_t offset, off_t size, char *data, char whence)
 
unsigned int AFPReadHeader (DSI *dsi, uint16_t fork, int offset, int size, char *data)
 
unsigned int AFPReadFooter (DSI *dsi, uint16_t fork, int offset, int size, char *data)
 
unsigned int AFPRead (CONN *conn, uint16_t fork, int offset, int size, char *data)
 
unsigned int AFPRead_ext (CONN *conn, uint16_t fork, off_t offset, off_t size, char *data)
 
unsigned int AFPRead_ext_async (CONN *conn, uint16_t fork, off_t offset, off_t size, char *data)
 
unsigned int AFPGetForkParam (CONN *conn, uint16_t fork, uint16_t bitmap)
 
unsigned int AFPGetSessionToken (CONN *conn, int type, uint32_t time, int len, char *token)
 
unsigned int AFPDisconnectOldSession (CONN *conn, uint16_t type, int len, char *token)
 
unsigned int AFPMapID (CONN *conn, char fn, int id)
 
unsigned int AFPMapName (CONN *conn, char fn, char *name)
 
unsigned int AFPAddAPPL (CONN *conn, uint16_t dt, int did, char *creator, uint32_t tag, char *name)
 
unsigned int AFPGetAPPL (CONN *conn, uint16_t dt, char *name, uint16_t index, uint16_t f_bitmap)
 
unsigned int AFPRemoveAPPL (CONN *conn, uint16_t dt, int did, char *creator, char *name)
 
unsigned int AFPGetUserInfo (CONN *conn, char flag, int id, uint16_t bitmap)
 
unsigned int AFPBadPacket (CONN *conn, char fn, char *name)
 
unsigned int AFPCatSearch (CONN *conn, uint16_t vol, uint32_t nbe, char *pos, uint16_t f_bitmap, uint16_t d_bitmap, uint32_t rbitmap, struct afp_filedir_parms *filedir, struct afp_filedir_parms *filedir2)
 
unsigned int AFPCatSearchExt (CONN *conn, uint16_t vol, uint32_t nbe, char *pos, uint16_t f_bitmap, uint16_t d_bitmap, uint32_t rbitmap, struct afp_filedir_parms *filedir, struct afp_filedir_parms *filedir2)
 
unsigned int AFPSetForkParam (CONN *conn, uint16_t fork, uint16_t bitmap, off_t size)
 
unsigned int AFPGetACL (CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *name)
 
unsigned int AFPSetACL (CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *name, uint32_t ace_count, darwin_ace_t *aces)
 
unsigned int AFPListExtAttr (CONN *conn, uint16_t vol, int did, uint16_t bitmap, int maxsize, char *pathname)
 
unsigned int AFPGetExtAttr (CONN *conn, uint16_t vol, int did, uint16_t bitmap, int maxsize, char *pathname, char *attrname)
 
unsigned int AFPSetExtAttr (CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *pathname, char *attrname, char *data)
 
unsigned int AFPRemoveExtAttr (CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *pathname, char *attrname)
 
int FPset_name (CONN *conn, int ofs, char *name)
 
void u2mac (uint8_t *dst, char *name, int len)
 
char * strp2cdup (unsigned char *src)
 

Variables

CONNConn
 
CONNConn2
 

Macro Definition Documentation

◆ AD_FILELOCK_BASE

#define AD_FILELOCK_BASE   (UINT32_C(0x7FFFFFFF) - 9)

◆ AFP_CLOSEDT

#define AFP_CLOSEDT   49

◆ AFP_CLOSEVOL

#define AFP_CLOSEVOL   2

◆ AFP_ENUMERATE

#define AFP_ENUMERATE   9

◆ AFP_GETSRVINFO

#define AFP_GETSRVINFO   15

◆ AFP_GETSRVPARAM

#define AFP_GETSRVPARAM   16

◆ AFP_LOGIN

#define AFP_LOGIN   18

◆ AFP_LOGOUT

#define AFP_LOGOUT   20

◆ AFP_OPENDIR

#define AFP_OPENDIR   25

◆ AFP_OPENDT

#define AFP_OPENDT   48

◆ AFP_OPENFORK

#define AFP_OPENFORK   26

◆ AFP_OPENVOL

#define AFP_OPENVOL   24

◆ AFPFORK_ACCMASK

#define AFPFORK_ACCMASK   (AFPFORK_ACCRD | AFPFORK_ACCWR)

◆ AFPFORK_ACCRD

#define AFPFORK_ACCRD   (1<<4)

◆ AFPFORK_ACCWR

#define AFPFORK_ACCWR   (1<<5)

◆ AFPFORK_DATA

#define AFPFORK_DATA   (1<<2)

◆ AFPFORK_DIRTY

#define AFPFORK_DIRTY   (1<<3)

◆ AFPFORK_OPEN

#define AFPFORK_OPEN   (1<<0)

◆ AFPFORK_RSRC

#define AFPFORK_RSRC   (1<<1)

◆ AFPOF_DFORK

#define AFPOF_DFORK   0x00

◆ AFPOF_RFORK

#define AFPOF_RFORK   0x80

◆ bswap_64

#define bswap_64 (   x)
Value:
((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
| (((x) & 0x0000ff0000000000ull) >> 24) \
| (((x) & 0x000000ff00000000ull) >> 8) \
| (((x) & 0x00000000ff000000ull) << 8) \
| (((x) & 0x0000000000ff0000ull) << 24) \
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56))

◆ DARWIN_ACE_EXECUTE

#define DARWIN_ACE_EXECUTE   0x00000008

◆ DARWIN_ACE_FLAGS_DENY

#define DARWIN_ACE_FLAGS_DENY   0x00000002 /* Bit 1: DENY access */

◆ DARWIN_ACE_FLAGS_DIRECTORY_INHERIT

#define DARWIN_ACE_FLAGS_DIRECTORY_INHERIT   0x00000040 /* Bit 6: Inherit to dirs */

◆ DARWIN_ACE_FLAGS_FILE_INHERIT

#define DARWIN_ACE_FLAGS_FILE_INHERIT   0x00000020 /* Bit 5: Inherit to files */

◆ DARWIN_ACE_FLAGS_ONLY_INHERIT

#define DARWIN_ACE_FLAGS_ONLY_INHERIT   0x00000100 /* Bit 8: Inherit only */

◆ DARWIN_ACE_FLAGS_PERMIT

#define DARWIN_ACE_FLAGS_PERMIT   0x00000001 /* Bit 0: ALLOW access */

◆ DARWIN_ACE_READ_DATA

#define DARWIN_ACE_READ_DATA   0x00000002

◆ DARWIN_ACE_WRITE_DATA

#define DARWIN_ACE_WRITE_DATA   0x00000004

◆ DIRDID_ROOT

#define DIRDID_ROOT   htonl(2)

root directory

◆ DIRDID_ROOT_PARENT

#define DIRDID_ROOT_PARENT   htonl(1)

parent directory of root

◆ DIRPBIT_ACCESS

#define DIRPBIT_ACCESS   12

◆ DIRPBIT_ATTR

#define DIRPBIT_ATTR   0

◆ DIRPBIT_BDATE

#define DIRPBIT_BDATE   4

◆ DIRPBIT_CDATE

#define DIRPBIT_CDATE   2

◆ DIRPBIT_DID

#define DIRPBIT_DID   8

◆ DIRPBIT_FINFO

#define DIRPBIT_FINFO   5

◆ DIRPBIT_GID

#define DIRPBIT_GID   11

◆ DIRPBIT_LNAME

#define DIRPBIT_LNAME   6

◆ DIRPBIT_MDATE

#define DIRPBIT_MDATE   3

◆ DIRPBIT_OFFCNT

#define DIRPBIT_OFFCNT   9

◆ DIRPBIT_PDID

#define DIRPBIT_PDID   1

◆ DIRPBIT_PDINFO

#define DIRPBIT_PDINFO   13

ProDOS Info /UTF8 name

◆ DIRPBIT_SNAME

#define DIRPBIT_SNAME   7

◆ DIRPBIT_UID

#define DIRPBIT_UID   10

◆ DIRPBIT_UNIXPR

#define DIRPBIT_UNIXPR   15

◆ FILDIRBIT_ISDIR

#define FILDIRBIT_ISDIR   (1 << 7)

is a directory

◆ FILDIRBIT_ISFILE

#define FILDIRBIT_ISFILE   (0)

is a file

◆ FILPBIT_ATTR

#define FILPBIT_ATTR   0

◆ FILPBIT_BDATE

#define FILPBIT_BDATE   4

◆ FILPBIT_CDATE

#define FILPBIT_CDATE   2

◆ FILPBIT_DFLEN

#define FILPBIT_DFLEN   9

◆ FILPBIT_EXTDFLEN

#define FILPBIT_EXTDFLEN   11

◆ FILPBIT_EXTRFLEN

#define FILPBIT_EXTRFLEN   14

◆ FILPBIT_FINFO

#define FILPBIT_FINFO   5

◆ FILPBIT_FNUM

#define FILPBIT_FNUM   8

◆ FILPBIT_LNAME

#define FILPBIT_LNAME   6

◆ FILPBIT_MDATE

#define FILPBIT_MDATE   3

◆ FILPBIT_PDID

#define FILPBIT_PDID   1

◆ FILPBIT_PDINFO

#define FILPBIT_PDINFO   13

ProDOS Info/ UTF8 name

◆ FILPBIT_RFLEN

#define FILPBIT_RFLEN   10

◆ FILPBIT_SNAME

#define FILPBIT_SNAME   7

◆ FILPBIT_UNIXPR

#define FILPBIT_UNIXPR   15

◆ kFileSec_ACL

#define kFileSec_ACL   (1 << 2)

◆ kFileSec_GRPUUID

#define kFileSec_GRPUUID   (1 << 1)

◆ kFileSec_Inherit

#define kFileSec_Inherit   (1 << 4)

◆ kFileSec_REMOVEACL

#define kFileSec_REMOVEACL   (1 << 3)

◆ kFileSec_UUID

#define kFileSec_UUID   (1 << 0)

◆ min

#define min (   a,
 
)    ((a) < (b) ? (a) : (b))

◆ OPENACC_DRD

#define OPENACC_DRD   (1<<4)

◆ OPENACC_DWR

#define OPENACC_DWR   (1<<5)

◆ OPENACC_RD

#define OPENACC_RD   (1<<0)

◆ OPENACC_WR

#define OPENACC_WR   (1<<1)

◆ OPENFORK_DATA

#define OPENFORK_DATA   (0)

◆ OPENFORK_RSCS

#define OPENFORK_RSCS   (1<<7)

◆ PASSWDLEN

#define PASSWDLEN   8

◆ SA_ONESHOT

#define SA_ONESHOT   SA_RESETHAND

◆ VOLPBIT_ATTR

#define VOLPBIT_ATTR   0

◆ VOLPBIT_ATTR_ACLS

#define VOLPBIT_ATTR_ACLS   (1 << 11)

◆ VOLPBIT_ATTR_BLANKACCESS

#define VOLPBIT_ATTR_BLANKACCESS   (1 << 4)

◆ VOLPBIT_ATTR_CASESENS

#define VOLPBIT_ATTR_CASESENS   (1 << 12)

◆ VOLPBIT_ATTR_CATSEARCH

#define VOLPBIT_ATTR_CATSEARCH   (1 << 3)

◆ VOLPBIT_ATTR_EXTATTRS

#define VOLPBIT_ATTR_EXTATTRS   (1 << 10)

◆ VOLPBIT_ATTR_FILEID

#define VOLPBIT_ATTR_FILEID   (1 << 2)

◆ VOLPBIT_ATTR_NOEXCHANGE

#define VOLPBIT_ATTR_NOEXCHANGE   (1 << 9)

◆ VOLPBIT_ATTR_NONETUID

#define VOLPBIT_ATTR_NONETUID   (1 << 7)

◆ VOLPBIT_ATTR_PASSWD

#define VOLPBIT_ATTR_PASSWD   (1 << 1)

◆ VOLPBIT_ATTR_PRIVPARENT

#define VOLPBIT_ATTR_PRIVPARENT   (1 << 8)

◆ VOLPBIT_ATTR_RO

#define VOLPBIT_ATTR_RO   (1 << 0)

◆ VOLPBIT_ATTR_TM

#define VOLPBIT_ATTR_TM   (1 << 13)

◆ VOLPBIT_ATTR_UNIXPRIV

#define VOLPBIT_ATTR_UNIXPRIV   (1 << 5)

◆ VOLPBIT_ATTR_UTF8

#define VOLPBIT_ATTR_UTF8   (1 << 6)

◆ VOLPBIT_BDATE

#define VOLPBIT_BDATE   4

◆ VOLPBIT_BFREE

#define VOLPBIT_BFREE   6

◆ VOLPBIT_BSIZE

#define VOLPBIT_BSIZE   11

block size

◆ VOLPBIT_BTOTAL

#define VOLPBIT_BTOTAL   7

◆ VOLPBIT_CDATE

#define VOLPBIT_CDATE   2

◆ VOLPBIT_MDATE

#define VOLPBIT_MDATE   3

◆ VOLPBIT_NAME

#define VOLPBIT_NAME   8

◆ VOLPBIT_SIG

#define VOLPBIT_SIG   1

◆ VOLPBIT_VID

#define VOLPBIT_VID   5

◆ VOLPBIT_XBFREE

#define VOLPBIT_XBFREE   9

◆ VOLPBIT_XBTOTAL

#define VOLPBIT_XBTOTAL   10

Typedef Documentation

◆ CONN

typedef struct CONN CONN

◆ darwin_ace_t

typedef struct darwin_ace darwin_ace_t

Function Documentation

◆ afp_filedir_pack()

int afp_filedir_pack ( CONN conn,
unsigned char *  b,
struct afp_filedir_parms filedir,
uint16_t  rfbitmap,
uint16_t  rdbitmap 
)

◆ afp_filedir_unpack()

void afp_filedir_unpack ( CONN conn,
struct afp_filedir_parms filedir,
const unsigned char *  b,
uint16_t  rfbitmap,
uint16_t  rdbitmap 
)

◆ afp_volume_unpack()

void afp_volume_unpack ( struct afp_volume_parms parms,
unsigned char *  b,
uint16_t  rbitmap 
)

◆ AFPAddAPPL()

unsigned int AFPAddAPPL ( CONN conn,
uint16_t  dt,
int  did,
char *  creator,
uint32_t  tag,
char *  name 
)

◆ AFPAddComment()

unsigned int AFPAddComment ( CONN conn,
uint16_t  vol,
int  did,
char *  name,
char *  cmt 
)

◆ AFPBadPacket()

unsigned int AFPBadPacket ( CONN conn,
char  fn,
char *  name 
)

◆ AFPByteLock()

unsigned int AFPByteLock ( CONN conn,
uint16_t  fork,
int  end,
int  mode,
int  offset,
int  size 
)

◆ AFPByteLock_ext()

unsigned int AFPByteLock_ext ( CONN conn,
uint16_t  fork,
int  end,
int  mode,
off_t  offset,
off_t  size 
)

◆ AFPCatSearch()

unsigned int AFPCatSearch ( CONN conn,
uint16_t  vol,
uint32_t  nbe,
char *  pos,
uint16_t  f_bitmap,
uint16_t  d_bitmap,
uint32_t  rbitmap,
struct afp_filedir_parms filedir,
struct afp_filedir_parms filedir2 
)

◆ AFPCatSearchExt()

unsigned int AFPCatSearchExt ( CONN conn,
uint16_t  vol,
uint32_t  nbe,
char *  pos,
uint16_t  f_bitmap,
uint16_t  d_bitmap,
uint32_t  rbitmap,
struct afp_filedir_parms filedir,
struct afp_filedir_parms filedir2 
)

◆ AFPChangePW()

unsigned int AFPChangePW ( CONN conn,
char *  uam,
char *  usr,
char *  opwd,
char *  pwd 
)

◆ AFPCloseDT()

unsigned int AFPCloseDT ( CONN conn,
uint16_t  vol 
)

◆ AFPCloseFork()

unsigned int AFPCloseFork ( CONN conn,
uint16_t  fork 
)

◆ AFPCloseVol()

unsigned int AFPCloseVol ( CONN conn,
uint16_t  vol 
)

◆ AFPCreateDir()

unsigned int AFPCreateDir ( CONN conn,
uint16_t  vol,
int  did,
char *  name 
)

◆ AFPCreateFile()

unsigned int AFPCreateFile ( CONN conn,
uint16_t  vol,
char  type,
int  did,
char *  name 
)

◆ AFPDelete()

unsigned int AFPDelete ( CONN conn,
uint16_t  vol,
int  did,
char *  name 
)

◆ AFPDisconnectOldSession()

unsigned int AFPDisconnectOldSession ( CONN conn,
uint16_t  type,
int  len,
char *  token 
)

◆ AFPFlush()

unsigned int AFPFlush ( CONN conn,
uint16_t  vol 
)

◆ AFPFlushFork()

unsigned int AFPFlushFork ( CONN conn,
uint16_t  fork 
)

◆ AFPGetACL()

unsigned int AFPGetACL ( CONN conn,
uint16_t  vol,
int  did,
uint16_t  bitmap,
char *  name 
)

◆ AFPGetAPPL()

unsigned int AFPGetAPPL ( CONN conn,
uint16_t  dt,
char *  name,
uint16_t  index,
uint16_t  f_bitmap 
)

◆ AFPGetComment()

unsigned int AFPGetComment ( CONN conn,
uint16_t  vol,
int  did,
char *  name 
)

◆ AFPGetExtAttr()

unsigned int AFPGetExtAttr ( CONN conn,
uint16_t  vol,
int  did,
uint16_t  bitmap,
int  maxsize,
char *  pathname,
char *  attrname 
)

◆ AFPGetForkParam()

unsigned int AFPGetForkParam ( CONN conn,
uint16_t  fork,
uint16_t  bitmap 
)

◆ AFPGetSessionToken()

unsigned int AFPGetSessionToken ( CONN conn,
int  type,
uint32_t  time,
int  len,
char *  token 
)

◆ AFPGetSrvrInfo()

unsigned int AFPGetSrvrInfo ( CONN conn)

◆ AFPGetSrvrMsg()

unsigned int AFPGetSrvrMsg ( CONN conn,
uint16_t  type,
uint16_t  bitmap 
)

◆ AFPGetSrvrParms()

unsigned int AFPGetSrvrParms ( CONN conn)

◆ AFPGetUserInfo()

unsigned int AFPGetUserInfo ( CONN conn,
char  flag,
int  id,
uint16_t  bitmap 
)

◆ AFPGetVolParam()

unsigned int AFPGetVolParam ( CONN conn,
uint16_t  vol,
uint16_t  bitmap 
)

◆ AFPListExtAttr()

unsigned int AFPListExtAttr ( CONN conn,
uint16_t  vol,
int  did,
uint16_t  bitmap,
int  maxsize,
char *  pathname 
)

◆ AFPLoginCont()

unsigned int AFPLoginCont ( CONN conn,
const void *  auth_info,
size_t  auth_info_len 
)

◆ AFPLogOut()

unsigned int AFPLogOut ( CONN conn)

◆ AFPMapID()

unsigned int AFPMapID ( CONN conn,
char  fn,
int  id 
)

◆ AFPMapName()

unsigned int AFPMapName ( CONN conn,
char  fn,
char *  name 
)

◆ AFPOpenFork()

uint16_t AFPOpenFork ( CONN conn,
uint16_t  vol,
char  type,
uint16_t  bitmap,
int  did,
char *  name,
uint16_t  access 
)

◆ AFPopenLogin()

unsigned int AFPopenLogin ( CONN conn,
const char *  vers,
const char *  uam,
const char *  usr,
const char *  pwd 
)
Bug:
spec violation in netatalk FPlogout ==> dsiclose

◆ AFPopenLoginExt()

unsigned int AFPopenLoginExt ( CONN conn,
const char *  vers,
const char *  uam,
const char *  usr,
const void *  auth_info,
size_t  auth_info_len 
)

◆ AFPopenLoginExt_pwd()

unsigned int AFPopenLoginExt_pwd ( CONN conn,
const char *  vers,
const char *  uam,
const char *  usr,
const char *  pwd 
)

◆ AFPOpenVol()

uint16_t AFPOpenVol ( CONN conn,
char *  vol,
uint16_t  bitmap 
)

◆ AFPRead()

unsigned int AFPRead ( CONN conn,
uint16_t  fork,
int  offset,
int  size,
char *  data 
)

◆ AFPRead_ext()

unsigned int AFPRead_ext ( CONN conn,
uint16_t  fork,
off_t  offset,
off_t  size,
char *  data 
)
Note
Assume size < 2GB

◆ AFPRead_ext_async()

unsigned int AFPRead_ext_async ( CONN conn,
uint16_t  fork,
off_t  offset,
off_t  size,
char *  data 
)

◆ AFPReadFooter()

unsigned int AFPReadFooter ( DSI dsi,
uint16_t  fork,
int  offset,
int  size,
char *  data 
)

◆ AFPReadHeader()

unsigned int AFPReadHeader ( DSI dsi,
uint16_t  fork,
int  offset,
int  size,
char *  data 
)

◆ AFPRemoveAPPL()

unsigned int AFPRemoveAPPL ( CONN conn,
uint16_t  dt,
int  did,
char *  creator,
char *  name 
)

◆ AFPRemoveComment()

unsigned int AFPRemoveComment ( CONN conn,
uint16_t  vol,
int  did,
char *  name 
)

◆ AFPRemoveExtAttr()

unsigned int AFPRemoveExtAttr ( CONN conn,
uint16_t  vol,
int  did,
uint16_t  bitmap,
char *  pathname,
char *  attrname 
)

◆ AFPSetACL()

unsigned int AFPSetACL ( CONN conn,
uint16_t  vol,
int  did,
uint16_t  bitmap,
char *  name,
uint32_t  ace_count,
darwin_ace_t aces 
)

◆ AFPSetExtAttr()

unsigned int AFPSetExtAttr ( CONN conn,
uint16_t  vol,
int  did,
uint16_t  bitmap,
char *  pathname,
char *  attrname,
char *  data 
)

◆ AFPSetForkParam()

unsigned int AFPSetForkParam ( CONN conn,
uint16_t  fork,
uint16_t  bitmap,
off_t  size 
)

◆ AFPSetVolParam()

unsigned int AFPSetVolParam ( CONN conn,
uint16_t  vol,
uint16_t  bitmap,
struct afp_volume_parms parms 
)

◆ AFPWrite()

unsigned int AFPWrite ( CONN conn,
uint16_t  fork,
int  offset,
int  size,
char *  data,
char  whence 
)

◆ AFPWrite_ext()

unsigned int AFPWrite_ext ( CONN conn,
uint16_t  fork,
off_t  offset,
off_t  size,
char *  data,
char  whence 
)

◆ AFPWrite_ext_async()

unsigned int AFPWrite_ext_async ( CONN conn,
uint16_t  fork,
off_t  offset,
off_t  size,
char *  data,
char  whence 
)

◆ AFPWriteFooter()

unsigned int AFPWriteFooter ( DSI dsi,
uint16_t  fork,
int  offset,
int  size,
char *  data,
char  whence 
)

◆ AFPWriteHeader()

unsigned int AFPWriteHeader ( DSI dsi,
uint16_t  fork,
int  offset,
int  size,
char *  data,
char  whence 
)

◆ AFPzzz()

unsigned int AFPzzz ( CONN conn,
int  flag 
)

◆ CloseClientSocket()

int CloseClientSocket ( int  fd)

◆ dsi_cmd_receive()

int dsi_cmd_receive ( DSI x)

◆ dsi_data_receive()

int dsi_data_receive ( DSI x)

◆ DSICloseSession()

unsigned int DSICloseSession ( CONN conn)

Close Session no reply

◆ DSIGetStatus()

unsigned int DSIGetStatus ( CONN conn)

GetStatus

◆ DSIOpenSession()

unsigned int DSIOpenSession ( CONN conn)

Open a new session

◆ dump_header()

void dump_header ( DSI dsi)

◆ FPset_name()

int FPset_name ( CONN conn,
int  ofs,
char *  name 
)

◆ OpenClientSocket()

int OpenClientSocket ( char *  host,
int  port 
)

◆ SendInit()

void SendInit ( DSI dsi)

◆ SetLen()

void SetLen ( DSI dsi,
int  ofs 
)

◆ strp2cdup()

char * strp2cdup ( unsigned char *  src)

◆ u2mac()

void u2mac ( uint8_t *  dst,
char *  name,
int  len 
)

Variable Documentation

◆ Conn

CONN* Conn
extern

◆ Conn2

CONN * Conn2