Macros | |
| #define | UNICODE(a) |
| #define | kTextEncodingUTF8 0x08000103 |
Functions | |
| int | OpenClientSocket (char *host, int port) |
| int | CloseClientSocket (int fd) |
| size_t | my_dsi_stream_read (DSI *dsi, void *data, const size_t length) |
| int | dsi_read_header (DSI *dsi) |
| int | my_dsi_stream_receive (DSI *dsi, void *buf, const size_t ilength, size_t *rlength) |
| size_t | my_dsi_stream_write (DSI *dsi, void *data, const size_t length) |
| int | my_dsi_stream_send (DSI *dsi, void *buf, size_t length) |
| void | my_dsi_tickle (DSI *dsi) |
| static int | my_dsi_receive (DSI *x, unsigned char *buf, size_t length) |
| static int | my_dsi_full_receive (DSI *x, unsigned char *buf, int length) |
| int | my_dsi_cmd_receive (DSI *x) |
| int | my_dsi_data_receive (DSI *x) |
| static void | SendInit (DSI *dsi) |
| static void | SetLen (DSI *dsi, int ofs) |
| static int | SendCmd (DSI *dsi, uint8_t cmd) |
| static int | SendCmdWithU16 (DSI *dsi, uint8_t cmd, uint16_t param) |
| static unsigned int | SendCmdVolDidCname (CONN *conn, uint8_t cmd, uint16_t vol, int did, char *name) |
| unsigned int | DSIOpenSession (CONN *conn) |
| unsigned int | DSIGetStatus (CONN *conn) |
| unsigned int | DSICloseSession (CONN *conn) |
| unsigned int | AFPopenLogin (CONN *conn, char *vers, char *uam, char *usr, char *pwd) |
| unsigned int | AFPopenLoginExt (CONN *conn, char *vers, char *uam, char *usr, char *pwd) |
| unsigned int | AFPChangePW (CONN *conn, char *uam, char *usr, char *opwd, char *pwd) |
| unsigned int | AFPLogOut (CONN *conn) |
| unsigned int | AFPzzz (CONN *conn, int flag) |
| 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 | AFPCloseFork (CONN *conn, uint16_t fork) |
| unsigned int | AFPByteLock (CONN *conn, uint16_t fork, int end, int mode, int offset, int size) |
| static off_t | get_off_t (unsigned char **ibuf, int is64) |
| static int | set_off_t (off_t offset, uint8_t *rbuf, int is64) |
| unsigned int | AFPByteLock_ext (CONN *conn, uint16_t fork, int end, int mode, off_t offset, off_t size) |
| unsigned int | AFPSetForkParam (CONN *conn, uint16_t fork, uint16_t bitmap, off_t size) |
| unsigned int | AFPFlush (CONN *conn, uint16_t vol) |
| unsigned int | AFPFlushFork (CONN *conn, uint16_t vol) |
| uint16_t | AFPOpenVol (CONN *conn, char *vol, uint16_t bitmap) |
| int | strp2c (char *cstr, unsigned char *pstr) |
| void * | fp_malloc (size_t size) |
| char * | strp2cdup (unsigned char *src) |
| void * | fp_realloc (void *ptr, size_t size) |
| void | fp_free (void *ptr) |
| void | afp_volume_unpack (struct afp_volume_parms *parms, unsigned char *b, uint16_t rbitmap) |
| int | afp_volume_pack (unsigned char *b, struct afp_volume_parms *parms, uint16_t bitmap) |
| void | afp_filedir_unpack (struct afp_filedir_parms *filedir, unsigned char *b, uint16_t rfbitmap, uint16_t rdbitmap) |
| int | afp_filedir_pack (unsigned char *b, struct afp_filedir_parms *filedir, uint16_t rfbitmap, uint16_t rdbitmap) |
| 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) |
| void | u2mac (uint8_t *dst, char *name, int len) |
| int | FPset_name (CONN *conn, int ofs, char *name) |
| unsigned int | AFPCreateFile (CONN *conn, uint16_t vol, char type, 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) |
| uint16_t | AFPOpenFork (CONN *conn, uint16_t vol, char type, uint16_t bitmap, int did, char *name, uint16_t access) |
| 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) |
| 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 | AFPGetUserInfo (CONN *conn, char flag, int id, uint16_t bitmap) |
| unsigned int | AFPMapID (CONN *conn, char fn, int id) |
| unsigned int | AFPMapName (CONN *conn, char fn, char *name) |
| unsigned int | AFPBadPacket (CONN *conn, char fn, char *name) |
| 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 | AFPCreateDir (CONN *conn, uint16_t vol, int did, char *name) |
| unsigned int | AFPGetForkParam (CONN *conn, uint16_t fork, uint16_t bitmap) |
| unsigned int | AFPGetAPPL (CONN *conn, uint16_t dt, char *name, uint16_t index, uint16_t f_bitmap) |
| unsigned int | AFPAddAPPL (CONN *conn, uint16_t dt, int did, char *creator, uint32_t tag, char *name) |
| unsigned int | AFPRemoveAPPL (CONN *conn, uint16_t dt, int did, char *creator, 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 | AFPGetACL (CONN *conn, uint16_t vol, int did, uint16_t bitmap, char *name) |
| unsigned int | AFPGetExtAttr (CONN *conn, uint16_t vol, int did, uint16_t bitmap, int maxsize, char *pathname, char *attrname) |
| unsigned int | AFPListExtAttr (CONN *conn, uint16_t vol, int did, uint16_t bitmap, int maxsize, char *pathname) |
| 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) |
Variables | |
| int | Throttle = 0 |
| int | Convert = 1 |
| int | Interactive = 0 |
| int | Quiet = 1 |
| int | Verbose = 0 |
| int | Color = 1 |
| int | Bigendian = 0 |
| static int | use_writev = 1 |
| int | Attention_received |
| int | Force_type2 |
| #define kTextEncodingUTF8 0x08000103 |
| #define UNICODE | ( | a | ) |
| int afp_filedir_pack | ( | unsigned char * | b, |
| struct afp_filedir_parms * | filedir, | ||
| uint16_t | rfbitmap, | ||
| uint16_t | rdbitmap ) |
| void afp_filedir_unpack | ( | struct afp_filedir_parms * | filedir, |
| unsigned char * | b, | ||
| uint16_t | rfbitmap, | ||
| uint16_t | rdbitmap ) |
| int afp_volume_pack | ( | unsigned char * | b, |
| struct afp_volume_parms * | parms, | ||
| uint16_t | bitmap ) |
Only backup date is valid.
| void afp_volume_unpack | ( | struct afp_volume_parms * | parms, |
| unsigned char * | b, | ||
| uint16_t | rbitmap ) |
| unsigned int AFPAddAPPL | ( | CONN * | conn, |
| uint16_t | dt, | ||
| int | did, | ||
| char * | creator, | ||
| uint32_t | tag, | ||
| char * | name ) |
| unsigned int AFPAddComment | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name, | ||
| char * | cmt ) |
| unsigned int AFPBadPacket | ( | CONN * | conn, |
| char | fn, | ||
| char * | name ) |
| 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 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 AFPChangePW | ( | CONN * | conn, |
| char * | uam, | ||
| char * | usr, | ||
| char * | opwd, | ||
| char * | pwd ) |
| unsigned int AFPCloseDT | ( | CONN * | conn, |
| uint16_t | vol ) |
| unsigned int AFPCloseFork | ( | CONN * | conn, |
| uint16_t | fork ) |
| unsigned int AFPCloseVol | ( | CONN * | conn, |
| uint16_t | vol ) |
| unsigned int AFPCreateDir | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name ) |
| unsigned int AFPCreateFile | ( | CONN * | conn, |
| uint16_t | vol, | ||
| char | type, | ||
| int | did, | ||
| char * | name ) |
| unsigned int AFPDelete | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name ) |
| unsigned int AFPDisconnectOldSession | ( | CONN * | conn, |
| uint16_t | type, | ||
| int | len, | ||
| char * | token ) |
| unsigned int AFPFlush | ( | CONN * | conn, |
| uint16_t | vol ) |
| unsigned int AFPFlushFork | ( | CONN * | conn, |
| uint16_t | vol ) |
| unsigned int AFPGetACL | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| uint16_t | bitmap, | ||
| char * | name ) |
| unsigned int AFPGetAPPL | ( | CONN * | conn, |
| uint16_t | dt, | ||
| char * | name, | ||
| uint16_t | index, | ||
| uint16_t | f_bitmap ) |
| unsigned int AFPGetComment | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name ) |
| unsigned int AFPGetExtAttr | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| uint16_t | bitmap, | ||
| int | maxsize, | ||
| char * | pathname, | ||
| char * | attrname ) |
| 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 AFPGetSrvrInfo | ( | CONN * | conn | ) |
| unsigned int AFPGetSrvrMsg | ( | CONN * | conn, |
| uint16_t | type, | ||
| uint16_t | bitmap ) |
| unsigned int AFPGetSrvrParms | ( | CONN * | conn | ) |
| unsigned int AFPGetUserInfo | ( | CONN * | conn, |
| char | flag, | ||
| int | id, | ||
| uint16_t | bitmap ) |
| unsigned int AFPGetVolParam | ( | CONN * | conn, |
| uint16_t | vol, | ||
| uint16_t | bitmap ) |
| unsigned int AFPListExtAttr | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| uint16_t | bitmap, | ||
| int | maxsize, | ||
| char * | pathname ) |
| unsigned int AFPLogOut | ( | CONN * | conn | ) |
| unsigned int AFPMapID | ( | CONN * | conn, |
| char | fn, | ||
| int | id ) |
| unsigned int AFPMapName | ( | CONN * | conn, |
| char | fn, | ||
| char * | name ) |
| uint16_t AFPOpenFork | ( | CONN * | conn, |
| uint16_t | vol, | ||
| char | type, | ||
| uint16_t | bitmap, | ||
| int | did, | ||
| char * | name, | ||
| uint16_t | access ) |
| unsigned int AFPopenLogin | ( | CONN * | conn, |
| char * | vers, | ||
| char * | uam, | ||
| char * | usr, | ||
| char * | pwd ) |
| unsigned int AFPopenLoginExt | ( | CONN * | conn, |
| char * | vers, | ||
| char * | uam, | ||
| char * | usr, | ||
| char * | pwd ) |
| uint16_t AFPOpenVol | ( | CONN * | conn, |
| char * | vol, | ||
| uint16_t | bitmap ) |
| 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 AFPReadFooter | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data ) |
| unsigned int AFPReadHeader | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data ) |
| unsigned int AFPRemoveAPPL | ( | CONN * | conn, |
| uint16_t | dt, | ||
| int | did, | ||
| char * | creator, | ||
| char * | name ) |
| unsigned int AFPRemoveComment | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name ) |
| unsigned int AFPRemoveExtAttr | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| uint16_t | bitmap, | ||
| 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 AFPSetForkParam | ( | CONN * | conn, |
| uint16_t | fork, | ||
| uint16_t | bitmap, | ||
| off_t | size ) |
| unsigned int AFPSetVolParam | ( | CONN * | conn, |
| uint16_t | vol, | ||
| uint16_t | bitmap, | ||
| struct afp_volume_parms * | parms ) |
| 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 AFPWriteFooter | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data, | ||
| char | whence ) |
| unsigned int AFPWriteHeader | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data, | ||
| char | whence ) |
| unsigned int AFPzzz | ( | CONN * | conn, |
| int | flag ) |
| int CloseClientSocket | ( | int | fd | ) |
| int dsi_read_header | ( | DSI * | dsi | ) |
| unsigned int DSICloseSession | ( | CONN * | conn | ) |
Close Session no reply
| unsigned int DSIGetStatus | ( | CONN * | conn | ) |
GetStatus
| unsigned int DSIOpenSession | ( | CONN * | conn | ) |
Open a new session
| void fp_free | ( | void * | ptr | ) |
Our free wrapper. It does nothing special at the moment.
| void * fp_malloc | ( | size_t | size | ) |
Our malloc wrapper. It zeroes allocated memory.
| void * fp_realloc | ( | void * | ptr, |
| size_t | size ) |
| int FPset_name | ( | CONN * | conn, |
| int | ofs, | ||
| char * | name ) |
|
static |
| int my_dsi_cmd_receive | ( | DSI * | x | ) |
| int my_dsi_data_receive | ( | DSI * | x | ) |
|
static |
|
static |
| size_t my_dsi_stream_read | ( | DSI * | dsi, |
| void * | data, | ||
| const size_t | length ) |
read raw data. return actual bytes read. this will wait until it gets length bytes
| int my_dsi_stream_receive | ( | DSI * | dsi, |
| void * | buf, | ||
| const size_t | ilength, | ||
| size_t * | rlength ) |
read data. function on success. 0 on failure. data length gets stored in length variable. this should really use size_t's, but that would require changes elsewhere.
| int my_dsi_stream_send | ( | DSI * | dsi, |
| void * | buf, | ||
| size_t | length ) |
| size_t my_dsi_stream_write | ( | DSI * | dsi, |
| void * | data, | ||
| const size_t | length ) |
| void my_dsi_tickle | ( | DSI * | dsi | ) |
| int OpenClientSocket | ( | char * | host, |
| int | port ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| int strp2c | ( | char * | cstr, |
| unsigned char * | pstr ) |
Converts Pascal string to C (null-terminated) string.
| char * strp2cdup | ( | unsigned char * | src | ) |
| void u2mac | ( | uint8_t * | dst, |
| char * | name, | ||
| int | len ) |
| int Attention_received |
| int Bigendian = 0 |
| int Color = 1 |
| int Convert = 1 |
| int Force_type2 |
| int Interactive = 0 |
| int Quiet = 1 |
| int Throttle = 0 |
|
static |
write data. 0 on failure. this assumes that dsi_len will never cause an overflow in the data buffer.
| int Verbose = 0 |