netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
ad_attr.c File Reference
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
#include <atalk/adouble.h>
#include <atalk/errchk.h>
#include <atalk/logger.h>
#include <atalk/util.h>

Macros

#define FILEIOFF_ATTR   14
 
#define AFPFILEIOFF_ATTR   2
 

Functions

int ad_getattr (const struct adouble *ad, uint16_t *attr)
 
int ad_setattr (const struct adouble *ad, const uint16_t attribute)
 
int ad_setid (struct adouble *adp, const dev_t dev, const ino_t ino, const uint32_t id, const cnid_t did, const void *stamp)
 save file/folder ID in AppleDoubleV2 netatalk private parameters
 
uint32_t ad_getid (struct adouble *adp, const dev_t st_dev, const ino_t st_ino, const cnid_t did, const void *stamp)
 Retrieve stored file / folder.
 
uint32_t ad_forcegetid (struct adouble *adp)
 
int ad_setname (struct adouble *ad, const char *path)
 

Macro Definition Documentation

◆ AFPFILEIOFF_ATTR

#define AFPFILEIOFF_ATTR   2

◆ FILEIOFF_ATTR

#define FILEIOFF_ATTR   14

Function Documentation

◆ ad_forcegetid()

uint32_t ad_forcegetid ( struct adouble adp)

◆ ad_getattr()

int ad_getattr ( const struct adouble ad,
uint16_t *  attr 
)
Note
the "shared" and "invisible" attributes are opaque and stored and retrieved from the FinderFlags. This fixes Bug #2802236:
See also
https://sourceforge.net/p/netatalk/bugs/350/

◆ ad_getid()

uint32_t ad_getid ( struct adouble adp,
const dev_t  st_dev,
const ino_t  st_ino,
const cnid_t  did,
const void *  stamp 
)

Retrieve stored file / folder.

Note
Callers should treat a return of CNID_INVALID (0) as an invalid value.

◆ ad_setattr()

int ad_setattr ( const struct adouble ad,
const uint16_t  attribute 
)

◆ ad_setid()

int ad_setid ( struct adouble adp,
const dev_t  dev,
const ino_t  ino,
const uint32_t  id,
const cnid_t  did,
const void *  stamp 
)

save file/folder ID in AppleDoubleV2 netatalk private parameters

Returns
1 if resource fork has been modified
-1 on error.

◆ ad_setname()

int ad_setname ( struct adouble ad,
const char *  path 
)

set resource fork filename attribute.