netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
ea_ad.c File Reference
#include <arpa/inet.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <atalk/adouble.h>
#include <atalk/afp.h>
#include <atalk/compat.h>
#include <atalk/ea.h>
#include <atalk/logger.h>
#include <atalk/unix.h>
#include <atalk/util.h>
#include <atalk/vfs.h>
#include <atalk/volume.h>

Functions

static mode_t ea_header_mode (mode_t mode)
static mode_t ea_mode (mode_t mode)
static char * mtoupath (const struct vol *vol, const char *mpath)
static int unpack_header (struct ea *restrict ea)
static int pack_header (struct ea *restrict ea)
static int ea_addentry (struct ea *restrict ea, const char *restrict attruname, size_t attrsize, int bitmap)
static int create_ea_header (const char *restrict uname, struct ea *restrict ea)
static int write_ea (const struct ea *restrict ea, const char *restrict attruname, const char *restrict ibuf, size_t attrsize)
static int ea_delentry (struct ea *restrict ea, const char *restrict attruname)
static int delete_ea_file (const struct ea *restrict ea, const char *eaname)
char * ea_path (const struct ea *restrict ea, const char *restrict eaname, int macname)
int ea_open (const struct vol *restrict vol, const char *restrict uname, eaflags_t eaflags, struct ea *restrict ea)
int ea_openat (const struct vol *restrict vol, int dirfd, const char *restrict uname, eaflags_t eaflags, struct ea *restrict ea)
int ea_close (struct ea *restrict ea)
int get_easize (VFS_FUNC_ARGS_EA_GETSIZE)
int get_eacontent (VFS_FUNC_ARGS_EA_GETCONTENT)
int list_eas (VFS_FUNC_ARGS_EA_LIST)
int set_ea (VFS_FUNC_ARGS_EA_SET)
int remove_ea (VFS_FUNC_ARGS_EA_REMOVE)
int ea_deletefile (VFS_FUNC_ARGS_DELETEFILE)
int ea_renamefile (VFS_FUNC_ARGS_RENAMEFILE)
int ea_copyfile (VFS_FUNC_ARGS_COPYFILE)
int ea_chown (VFS_FUNC_ARGS_CHOWN)
int ea_chmod_file (VFS_FUNC_ARGS_SETFILEMODE)
int ea_chmod_dir (VFS_FUNC_ARGS_SETDIRUNIXMODE)

Function Documentation

◆ create_ea_header()

int create_ea_header ( const char *restrict uname,
struct ea *restrict ea )
static

◆ delete_ea_file()

int delete_ea_file ( const struct ea *restrict ea,
const char * eaname )
static

◆ ea_addentry()

int ea_addentry ( struct ea *restrict ea,
const char *restrict attruname,
size_t attrsize,
int bitmap )
static

◆ ea_chmod_dir()

int ea_chmod_dir ( VFS_FUNC_ARGS_SETDIRUNIXMODE )

◆ ea_chmod_file()

int ea_chmod_file ( VFS_FUNC_ARGS_SETFILEMODE )

◆ ea_chown()

int ea_chown ( VFS_FUNC_ARGS_CHOWN )

◆ ea_close()

int ea_close ( struct ea *restrict ea)

◆ ea_copyfile()

int ea_copyfile ( VFS_FUNC_ARGS_COPYFILE )

◆ ea_delentry()

int ea_delentry ( struct ea *restrict ea,
const char *restrict attruname )
static

◆ ea_deletefile()

int ea_deletefile ( VFS_FUNC_ARGS_DELETEFILE )

◆ ea_header_mode()

mode_t ea_header_mode ( mode_t mode)
inlinestatic

◆ ea_mode()

mode_t ea_mode ( mode_t mode)
inlinestatic

◆ ea_open()

int ea_open ( const struct vol *restrict vol,
const char *restrict uname,
eaflags_t eaflags,
struct ea *restrict ea )

◆ ea_openat()

int ea_openat ( const struct vol *restrict vol,
int dirfd,
const char *restrict uname,
eaflags_t eaflags,
struct ea *restrict ea )

◆ ea_path()

char * ea_path ( const struct ea *restrict ea,
const char *restrict eaname,
int macname )

◆ ea_renamefile()

int ea_renamefile ( VFS_FUNC_ARGS_RENAMEFILE )

◆ get_eacontent()

int get_eacontent ( VFS_FUNC_ARGS_EA_GETCONTENT )

◆ get_easize()

int get_easize ( VFS_FUNC_ARGS_EA_GETSIZE )

◆ list_eas()

int list_eas ( VFS_FUNC_ARGS_EA_LIST )

◆ mtoupath()

char * mtoupath ( const struct vol * vol,
const char * mpath )
static

◆ pack_header()

int pack_header ( struct ea *restrict ea)
static

◆ remove_ea()

int remove_ea ( VFS_FUNC_ARGS_EA_REMOVE )

◆ set_ea()

int set_ea ( VFS_FUNC_ARGS_EA_SET )

◆ unpack_header()

int unpack_header ( struct ea *restrict ea)
static

◆ write_ea()

int write_ea ( const struct ea *restrict ea,
const char *restrict attruname,
const char *restrict ibuf,
size_t attrsize )
static