blob: f2c895b3805f102f0bdd834c92a63d4e254767c2 (
plain) (
tree)
|
|
#ifndef _HELPER_H_
#define _HELPER_H_
#include "types.h"
#include "ldap.h"
void bail(char *args, ...);
int helper_realloc(char **memory, size_t *curSize, const size_t newSize, const char *location);
int helper_connect4(char *address, int port, char *ip);
void helper_nonblock(const int fd);
void helper_printava(struct AttributeValueAssertion* a,const char* rel);
void helper_printal(struct AttributeDescriptionList* a);
void helper_printpal(struct PartialAttributeList *pal);
void helper_printfilter(struct Filter* f);
static inline int min(const int a, const int b)
{
return a < b ? a : b;
}
static inline int max(const int a, const int b)
{
return a > b ? a : b;
}
typedef enum {
DEBUG_FATAL = 0,
DEBUG_WARNING = 1,
DEBUG_INFO = 2,
DEBUG_VERBOSE = 3,
DEBUG_TRACE = 4,
} DebugLevel;
extern DebugLevel _debugLevel;
void plog(const DebugLevel messageLevel, char *args, ...);
#endif
|