netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
uuid.h File Reference

Go to the source code of this file.

Macros

#define UUID_BINSIZE   16
 
#define UUIDTYPESTR_MASK   3
 

Typedefs

typedef const unsigned char * uuidp_t
 
typedef unsigned char atalk_uuid_t[UUID_BINSIZE]
 

Enumerations

enum  uuidtype_t { UUID_USER = 1 , UUID_GROUP = 2 , UUID_ENOENT = 4 }
 

Functions

int getuuidfromname (const char *name, uuidtype_t type, unsigned char *uuid)
 
int getnamefromuuid (const unsigned char *uuid, char **name, uuidtype_t *type)
 
void localuuid_from_id (unsigned char *buf, uuidtype_t type, unsigned int id)
 
const char * uuid_bin2string (const unsigned char *uuid)
 Convert 16 byte binary uuid to neat ascii represantation including dashes.
 
void uuid_string2bin (const char *uuidstring, unsigned char *uuid)
 convert ascii string that can include dashes to binary uuid.
 
void uuidcache_dump (void)
 

Variables

char * uuidtype []
 

Macro Definition Documentation

◆ UUID_BINSIZE

#define UUID_BINSIZE   16

◆ UUIDTYPESTR_MASK

#define UUIDTYPESTR_MASK   3

Typedef Documentation

◆ atalk_uuid_t

typedef unsigned char atalk_uuid_t[UUID_BINSIZE]

◆ uuidp_t

typedef const unsigned char* uuidp_t

Enumeration Type Documentation

◆ uuidtype_t

enum uuidtype_t

used as bit flag

Enumerator
UUID_USER 
UUID_GROUP 
UUID_ENOENT 

Function Documentation

◆ getnamefromuuid()

int getnamefromuuid ( const uuidp_t  uuidp,
char **  name,
uuidtype_t type 
)
extern
Parameters
uuidppointer to a uuid
namereturns allocated buffer from ldap_getnamefromuuid
typereturns USER, GROUP or LOCAL
Returns
0 on success !=0 on errror
Note
Caller must free name appropriately.

◆ getuuidfromname()

int getuuidfromname ( const char *  name,
uuidtype_t  type,
unsigned char *  uuid 
)
extern
Parameters
namegive me his name
typeand type (UUID_USER or UUID_GROUP)
uuidpointer to uuid_t storage that the caller must provide
Returns
0 on success !=0 on errror

◆ localuuid_from_id()

void localuuid_from_id ( unsigned char *  buf,
uuidtype_t  type,
unsigned int  id 
)
extern

◆ uuid_bin2string()

const char * uuid_bin2string ( const unsigned char *  uuid)
extern

Convert 16 byte binary uuid to neat ascii represantation including dashes.

Use defined or default ascii mask for dash placement

Returns
pointer to static buffer

◆ uuid_string2bin()

void uuid_string2bin ( const char *  uuidstring,
unsigned char *  uuid 
)
extern

convert ascii string that can include dashes to binary uuid.

Note
caller must provide a buffer.

◆ uuidcache_dump()

void uuidcache_dump ( void  )
extern

Variable Documentation

◆ uuidtype

char* uuidtype[]
extern