#include <stdio.h>#include <string.h>#include <unistd.h>#include <arpa/inet.h>#include "afpcmd.h"#include "afphelper.h"#include "testhelper.h"Macros | |
| #define | PAG_CORPUS_SMALL 50 |
| #define | PAG_CORPUS_PAGED 250 |
| #define | PAG_PREFIX_530 "paginate530-f-" |
| #define | PAG_PREFIX_531 "paginate531-p-" |
| #define | PAG_DIR_SMALL "pagtest_small" |
| #define | PAG_DIR_PAGED "pagtest_paged" |
Functions | |
| static int | pag_create_dir_get_did (uint16_t vol, uint32_t parent_did, char *name) |
| Create a directory and return its DID. | |
| STATIC void | test547 () |
| STATIC void | test548 () |
| STATIC void | test560 () |
| STATIC void | test561 () |
| STATIC void | test562 () |
| void | FPSpotlightRPC_test () |
| #define PAG_CORPUS_PAGED 250 |
| #define PAG_CORPUS_SMALL 50 |
| #define PAG_DIR_PAGED "pagtest_paged" |
| #define PAG_DIR_SMALL "pagtest_small" |
| #define PAG_PREFIX_530 "paginate530-f-" |
| #define PAG_PREFIX_531 "paginate531-p-" |
| void FPSpotlightRPC_test | ( | ) |
|
static |
Create a directory and return its DID.
Convention reminder: in the testsuite, FPCreate* / FPOpen* helpers return the new DID (NETWORK byte order, treated as int) on success and 0 on failure — they do NOT return AFP error codes.
AFPCreateDir extracts the new DID from dsi->commands with a straight memcpy (no byte swap). The returned value is therefore the on-the-wire NETWORK-byte-order CNID stored as int. It must be passed straight back to FPCreateFile()/FPOpenDir() without an ntohl() — those helpers will memcpy it onto the next request's wire as-is. Applying ntohl() here would silently corrupt the DID.
| STATIC void test547 | ( | ) |
| STATIC void test548 | ( | ) |
| STATIC void test560 | ( | ) |
| STATIC void test561 | ( | ) |
| STATIC void test562 | ( | ) |