netatalk  4.6.1
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
nad_adouble.c File Reference
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <ctype.h>
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <atalk/adouble.h>
#include <atalk/volume.h>
#include <atalk/util.h>
#include <netatalk/endian.h>
#include "nad.h"
#include "megatron.h"
#include "nad_adouble.h"

Data Structures

struct  nad_file_data
 

Functions

static int cap_hexval (unsigned char c)
 
static int cap_decode_byte (const unsigned char *in, unsigned char *out)
 
static void cap_escape_byte (unsigned char c, unsigned char **out)
 
static char * mtoupathcap (char *mpath)
 
static char * utompathcap (char *upath)
 
void nad_set_volume (const struct nad_volume *volume)
 
static int nad_adouble_dir (char *dir, size_t dirlen)
 
static int nad_prepare_adouble_dir (int parentfd, char *dir, size_t dirlen, mode_t mode, struct stat *st, int *created)
 
static int nad_set_created_modes (mode_t data_mode, mode_t header_mode, int dirfd, mode_t dir_mode, int created_dir, int created_header)
 
int nad_open (char *path, int openflags, struct FHeader *fh, int options)
 
int nad_header_read (struct FHeader *fh)
 
int nad_header_write (struct FHeader *fh)
 
ssize_t nad_read (int fork, char *forkbuf, size_t bufc)
 
ssize_t nad_write (int fork, char *forkbuf, size_t bufc)
 
static int nad_update_cnid (void)
 
int nad_close (int status)
 

Variables

static const unsigned char hexdig [] = "0123456789abcdef"
 
static char mtou_buf [MAXPATHLEN+1]
 
static char utom_buf [MAXPATHLEN+1]
 
char *(* _mtoupath )(char *mpath) = mtoupathcap
 
char *(* _utompath )(char *upath) = utompathcap
 
static struct nad_file_data nad
 
static int forkeid [] = { ADEID_DFORK, ADEID_RFORK }
 

Function Documentation

◆ cap_decode_byte()

static int cap_decode_byte ( const unsigned char *  in,
unsigned char *  out 
)
static

◆ cap_escape_byte()

static void cap_escape_byte ( unsigned char  c,
unsigned char **  out 
)
static

◆ cap_hexval()

static int cap_hexval ( unsigned char  c)
static

◆ mtoupathcap()

static char * mtoupathcap ( char *  mpath)
static

◆ nad_adouble_dir()

static int nad_adouble_dir ( char *  dir,
size_t  dirlen 
)
static

◆ nad_close()

int nad_close ( int  status)

◆ nad_header_read()

int nad_header_read ( struct FHeader *  fh)

◆ nad_header_write()

int nad_header_write ( struct FHeader *  fh)

◆ nad_open()

int nad_open ( char *  path,
int  openflags,
struct FHeader *  fh,
int  options 
)

◆ nad_prepare_adouble_dir()

static int nad_prepare_adouble_dir ( int  parentfd,
char *  dir,
size_t  dirlen,
mode_t  mode,
struct stat *  st,
int *  created 
)
static

◆ nad_read()

ssize_t nad_read ( int  fork,
char *  forkbuf,
size_t  bufc 
)

◆ nad_set_created_modes()

static int nad_set_created_modes ( mode_t  data_mode,
mode_t  header_mode,
int  dirfd,
mode_t  dir_mode,
int  created_dir,
int  created_header 
)
static

◆ nad_set_volume()

void nad_set_volume ( const struct nad_volume *  volume)

◆ nad_update_cnid()

static int nad_update_cnid ( void  )
static

◆ nad_write()

ssize_t nad_write ( int  fork,
char *  forkbuf,
size_t  bufc 
)

◆ utompathcap()

static char * utompathcap ( char *  upath)
static

Variable Documentation

◆ _mtoupath

char *(* _mtoupath) (char *mpath) ( char *  mpath) = mtoupathcap

◆ _utompath

char *(* _utompath) (char *upath) ( char *  upath) = utompathcap

◆ forkeid

int forkeid[] = { ADEID_DFORK, ADEID_RFORK }
static

◆ hexdig

const unsigned char hexdig[] = "0123456789abcdef"
static

◆ mtou_buf

char mtou_buf[MAXPATHLEN+1]
static

◆ nad

struct nad_file_data nad
static

◆ utom_buf

char utom_buf[MAXPATHLEN+1]
static