#include <ctype.h>
#include <errno.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <atalk/adouble.h>
#include <atalk/afp.h>
#include <atalk/cnid_bdb_private.h>
#include <atalk/cnid.h>
#include <atalk/globals.h>
#include <atalk/logger.h>
#include <atalk/netatalk_conf.h>
#include <atalk/unicode.h>
#include <atalk/util.h>
#include "desktop.h"
#include "dircache.h"
#include "directory.h"
#include "file.h"
#include "filedir.h"
#include "fork.h"
#include "volume.h"
Data Structures | |
struct | finderinfo |
struct | scrit |
struct | dsitem |
Macros | |
#define | DS_BSIZE 128 |
#define | CATPBIT_PARTIAL 31 |
#define | VETO_STR "./../.AppleDouble/.AppleDB/Network Trash Folder/TheVolumeSettingsFolder/TheFindByContentFolder/.AppleDesktop/.Parent/" |
#define | NUM_ROUNDS 200 |
Typedefs | |
typedef char | packed_finder[ADEDLEN_FINDERI] |
Functions | |
static void | clearstack (void) |
static int | addstack (char *uname _U_, struct dir *dir, int pidx _U_) |
static int | reducestack (void) |
static struct adouble * | adl_lkup (struct vol *vol, struct path *path, struct adouble *adp) |
static struct finderinfo * | unpack_buffer (struct finderinfo *finfo, char *buffer) |
static struct finderinfo * | unpack_finderinfo (struct vol *vol, struct path *path, struct adouble **adp, struct finderinfo *finfo, int islnk) |
static int | crit_check (struct vol *vol, struct path *path) |
static int | rslt_add (const AFPObj *obj, struct vol *vol, struct path *path, char **buf, int ext) |
static int | catsearch (const AFPObj *obj, struct vol *vol, struct dir *dir, int rmatches, uint32_t *pos, char *rbuf, uint32_t *nrecs, int *rsize, int ext) |
static int | catsearch_db (const AFPObj *obj, struct vol *vol, const char *uname, int rmatches, uint32_t *pos, char *rbuf, uint32_t *nrecs, int *rsize, int ext) |
static int | catsearch_afp (AFPObj *obj _U_, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen, int ext) |
int | afp_catsearch (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
int | afp_catsearch_ext (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
Variables | |
static int | save_cidx = -1 |
static struct dsitem * | dstack = NULL |
static int | dssize = 0 |
static int | dsidx = 0 |
static struct scrit c1 | c2 |
#define CATPBIT_PARTIAL 31 |
#define DS_BSIZE 128 |
#define NUM_ROUNDS 200 |
This function performs a filesystem search
Uses globals c1, c2, the search criteria
vol | (r) volume we are searching on ... |
dir | (rw) directory we are starting from ... |
rmatches | (r) maximum number of matches we can return |
pos | (r) position we've stopped recently |
rbuf | (w) output buffer |
nrecs | (w) number of matches |
rsize | (w) length of data written to output buffer |
ext | (r) extended search flag |
#define VETO_STR "./../.AppleDouble/.AppleDB/Network Trash Folder/TheVolumeSettingsFolder/TheFindByContentFolder/.AppleDesktop/.Parent/" |
typedef char packed_finder[ADEDLEN_FINDERI] |
|
static |
int afp_catsearch | ( | AFPObj * | obj, |
char * | ibuf, | ||
size_t | ibuflen, | ||
char * | rbuf, | ||
size_t * | rbuflen ) |
int afp_catsearch_ext | ( | AFPObj * | obj, |
char * | ibuf, | ||
size_t | ibuflen, | ||
char * | rbuf, | ||
size_t * | rbuflen ) |
|
static |
|
static |
|
static |
This function performs a CNID db search
Uses globals c1, c2, the search criteria Always searches the whole volume, not a subtree
obj | (r) AFP connection object |
vol | (r) volume we are searching on ... |
uname | (r) UNIX name of object to search |
rmatches | (r) maximum number of matches we can return |
pos | (r) position we've stopped recently |
rbuf | (w) output buffer |
nrecs | (w) number of matches |
rsize | (w) length of data written to output buffer |
ext | (r) extended search flag |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |