#include <fcntl.h>#include <getopt.h>#include <signal.h>#include <sys/mman.h>#include <sys/stat.h>#include <sys/time.h>#include <sys/types.h>#include <unistd.h>#include "afpclient.h"#include "afpcmd.h"#include "afphelper.h"#include "testhelper.h"Data Structures | |
| struct | vfs |
| struct | test_entry |
Macros | |
| #define | KILOBYTE 1024 |
| #define | MEGABYTE (KILOBYTE*KILOBYTE) |
| #define | MAXDIR 10 |
| #define | MAXVOL 3 |
| #define | O_DIRECT 040000 |
Functions | |
| int32_t | is_there (CONN *conn, uint16_t volume, int32_t did, char *name) |
| uint16_t | local_openvol (CONN *conn, char *vol) |
| unsigned int | local_closevol (CONN *conn, uint16_t vol) |
| static int | local_chdir (uint16_t vol, int did) |
| unsigned int | local_createdir (CONN *conn, uint16_t vol, int did, char *name) |
| unsigned int | local_getfiledirparams (CONN *conn, uint16_t vol, int did, char *name, uint16_t f_bitmap, uint16_t d_bitmap) |
| unsigned int | local_delete (CONN *conn, uint16_t vol, int did, char *name) |
| unsigned int | local_createfile (CONN *conn, uint16_t vol, char type, int did, char *name) |
| uint16_t | local_openfork (CONN *conn, uint16_t vol, int type, uint16_t bitmap, int did, char *name, int access) |
| unsigned int | local_writeheader (DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence) |
| unsigned int | local_writefooter (DSI *dsi, uint16_t fork, int offset, int size, char *data, char whence) |
| unsigned int | local_flushfork (CONN *conn, uint16_t fork) |
| unsigned int | local_closefork (CONN *conn, uint16_t fork) |
| unsigned int | local_setforkparam (CONN *conn, uint16_t fork, uint16_t bitmap, off_t size) |
| unsigned int | local_write (CONN *conn, uint16_t fork, long long offset, int size, char *data, char whence) |
| unsigned int | local_read (CONN *conn, uint16_t fork, long long offset, int size, char *data) |
| unsigned int | local_readheader (DSI *dsi, uint16_t fork, int offset, int size, char *data) |
| unsigned int | local_readfooter (DSI *dsi, uint16_t fork, int offset, int size, char *data) |
| unsigned int | local_copyfile (struct CONN *conn, uint16_t svol, int sdid, uint16_t dvol, int ddid, char *src, char *buf, char *dst) |
| static void | press_enter (char *s) |
| unsigned long long | delta (void) |
| static void | header (void) |
| static void | timer_footer (void) |
| void | Write (void) |
| int | init_fork (int fork) |
| static int | getfd (CONN *conn, int fork) |
| void | Copy (void) |
| void | ServerCopy (void) |
| void | Read (void) |
| static void | run_one (char *name) |
| void | usage (char *av0) |
| int | main (int ac, char **av) |
Variables | |
| uint16_t | VolID |
| uint16_t | VolID2 |
| static DSI * | dsi |
| CONN * | Conn |
| int | ExitCode = 0 |
| DSI * | Dsi |
| char | Data [30000] |
| char * | Buffer |
| struct timeval | Timer_start |
| struct timeval | Timer_end |
| static char * | Server = "localhost" |
| static int | Port = DSI_AFPOVERTCP_PORT |
| static char * | Password = "" |
| char * | Vol = "" |
| char * | Vol2 = "" |
| char * | User |
| int | Version = 34 |
| char * | Test = "Write" |
| static char * | Filename |
| char * | vers = "AFP3.4" |
| char * | uam = "Cleartxt Passwrd" |
| static int | Count = 1 |
| static off_t | Size = 64 * MEGABYTE |
| static size_t | Quantum = 0 |
| static int | Request = 1 |
| static int | Req = 1 |
| static int | Delete = 0 |
| static int | Sparse = 0 |
| static int | Local = 0 |
| static int | Flush = 1 |
| static int | Direct = 0 |
| CONN * | Conn2 |
| int | Mac = 0 |
| int | EmptyVol = 0 |
| int | PassCount = 0 |
| int | FailCount = 0 |
| int | SkipCount = 0 |
| int | NotTestedCount = 0 |
| char | FailedTests [1024][256] = {{0}} |
| char | NotTestedTests [1024][256] = {{0}} |
| char | SkippedTests [1024][256] = {{0}} |
| struct vfs | VFS |
| static char * | Dir_heap [MAXVOL][MAXDIR] |
| static char * | Vol_heap [MAXVOL] |
| static char | temp [MAXPATHLEN+1] |
| struct vfs | local_VFS |
| static struct test_entry | test_table [] |
| #define KILOBYTE 1024 |
| #define MAXDIR 10 |
| #define MAXVOL 3 |
| #define O_DIRECT 040000 |
| void Copy | ( | void | ) |
| unsigned long long delta | ( | void | ) |
|
static |
|
static |
| int init_fork | ( | int | fork | ) |
| int32_t is_there | ( | CONN * | conn, |
| uint16_t | volume, | ||
| int32_t | did, | ||
| char * | name ) |
|
static |
| unsigned int local_closefork | ( | CONN * | conn, |
| uint16_t | fork ) |
| unsigned int local_closevol | ( | CONN * | conn, |
| uint16_t | vol ) |
| unsigned int local_copyfile | ( | struct CONN * | conn, |
| uint16_t | svol, | ||
| int | sdid, | ||
| uint16_t | dvol, | ||
| int | ddid, | ||
| char * | src, | ||
| char * | buf, | ||
| char * | dst ) |
| unsigned int local_createdir | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name ) |
| unsigned int local_createfile | ( | CONN * | conn, |
| uint16_t | vol, | ||
| char | type, | ||
| int | did, | ||
| char * | name ) |
| unsigned int local_delete | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name ) |
| unsigned int local_flushfork | ( | CONN * | conn, |
| uint16_t | fork ) |
| unsigned int local_getfiledirparams | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | did, | ||
| char * | name, | ||
| uint16_t | f_bitmap, | ||
| uint16_t | d_bitmap ) |
| uint16_t local_openfork | ( | CONN * | conn, |
| uint16_t | vol, | ||
| int | type, | ||
| uint16_t | bitmap, | ||
| int | did, | ||
| char * | name, | ||
| int | access ) |
| uint16_t local_openvol | ( | CONN * | conn, |
| char * | vol ) |
| unsigned int local_read | ( | CONN * | conn, |
| uint16_t | fork, | ||
| long long | offset, | ||
| int | size, | ||
| char * | data ) |
| unsigned int local_readfooter | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data ) |
| unsigned int local_readheader | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data ) |
| unsigned int local_setforkparam | ( | CONN * | conn, |
| uint16_t | fork, | ||
| uint16_t | bitmap, | ||
| off_t | size ) |
| unsigned int local_write | ( | CONN * | conn, |
| uint16_t | fork, | ||
| long long | offset, | ||
| int | size, | ||
| char * | data, | ||
| char | whence ) |
| unsigned int local_writefooter | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data, | ||
| char | whence ) |
| unsigned int local_writeheader | ( | DSI * | dsi, |
| uint16_t | fork, | ||
| int | offset, | ||
| int | size, | ||
| char * | data, | ||
| char | whence ) |
| int main | ( | int | ac, |
| char ** | av ) |
|
static |
| void Read | ( | void | ) |
|
static |
| void ServerCopy | ( | void | ) |
|
static |
| void usage | ( | char * | av0 | ) |
| void Write | ( | void | ) |
| char* Buffer |
| CONN* Conn |
| CONN* Conn2 |
|
static |
| char Data[30000] |
|
static |
|
static |
| DSI* Dsi |
|
static |
| int EmptyVol = 0 |
| int ExitCode = 0 |
| int FailCount = 0 |
| char FailedTests[1024][256] = {{0}} |
|
static |
|
static |
|
static |
| struct vfs local_VFS |
| int Mac = 0 |
| int NotTestedCount = 0 |
| char NotTestedTests[1024][256] = {{0}} |
| int PassCount = 0 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| int SkipCount = 0 |
| char SkippedTests[1024][256] = {{0}} |
|
static |
|
static |
| char* Test = "Write" |
|
static |
| struct timeval Timer_end |
| struct timeval Timer_start |
| char* uam = "Cleartxt Passwrd" |
| char* User |
| char* vers = "AFP3.4" |
| int Version = 34 |
| struct vfs VFS |
| char* Vol = "" |
| char* Vol2 = "" |
|
static |
| uint16_t VolID |
| uint16_t VolID2 |