24RCSIDH(misc_h, 
"$Id: 7d659ea3fe2fd6ff0a1c9472d558e444970a34c9 $")
 
   30#include <freeradius-devel/build.h> 
   31#include <freeradius-devel/missing.h> 
   32#include <freeradius-devel/util/print.h> 
   33#include <freeradius-devel/util/talloc.h> 
   34#include <freeradius-devel/util/time.h> 
   38typedef         int8_t (*
fr_cmp_t)(
void const *a, 
void const *b);
 
   47void            fr_talloc_verify_cb(
const void *ptr, 
int depth,
 
   48                                    int max_depth, 
int is_ref,
 
   50#  define VERIFY_ALL_TALLOC talloc_report_depth_cb(NULL, 0, -1, fr_talloc_verify_cb, NULL) 
   52#  define VERIFY_ALL_TALLOC 
   59#define fr_zero_whitespace(_p)  while (isspace((uint8_t) *_p)) *(_p++) = '\0' 
   70        if (*
value == 
'\0') 
return false;       
 
 
   94        for (i = 0; i < len; i++) {
 
   96                if (clen == 0) 
return false;
 
 
  111#ifdef STATIC_ANALYZER 
  112        if (*
value == 
'\0') 
return false;       
 
 
  130                if (*
value != 
'0') 
return false;
 
 
  143char            *
fr_trim(
char const *str, 
size_t size);
 
static uint8_t depth(fr_minmax_heap_index_t i)
int fr_unset_signal(int sig)
Uninstall a signal for a specific handler.
int fr_strtoull(uint64_t *out, char **end, char const *value)
Consume the integer (or hex) portion of a value string.
int fr_set_signal(int sig, sig_t func)
Sets a signal handler using sigaction if available, else signal.
int rad_unlockfd(int fd, int lock_len)
static bool is_printable(void const *value, size_t len)
Check whether the string is made up of printable UTF8 chars.
static bool is_whitespace(char const *value)
Check whether the string is all whitespace.
char const * fr_filename_common_trim(char const *path, char const *common)
Trim a common prefix from a filename.
ssize_t fr_utf8_to_ucs2(uint8_t *out, size_t outlen, char const *in, size_t inlen)
Convert UTF8 string to UCS2 encoding.
int fr_strtoll(int64_t *out, char **end, char const *value)
Consume the integer (or hex) portion of a value string.
int8_t fr_pointer_cmp(void const *a, void const *b)
Compares two pointers.
char * fr_trim(char const *str, size_t size)
Trim whitespace from the end of a string.
static bool is_integer(char const *value)
Check whether the string is all numbers.
void fr_quick_sort(void const *to_sort[], int min_idx, int max_idx, fr_cmp_t cmp)
Quick sort an array of pointers using a comparator.
int8_t(* fr_cmp_t)(void const *a, void const *b)
char * fr_tolower(char *str)
int rad_lockfd(int fd, int lock_len)
int rad_lockfd_nonblock(int fd, int lock_len)
char const * fr_filename(char const *path)
Get the filename from a path.
size_t fr_snprint_uint128(char *out, size_t outlen, uint128_t const num)
Write 128bit unsigned integer to buffer.
void(* fr_free_t)(void *)
int fr_digest_cmp(uint8_t const *a, uint8_t const *b, size_t length)
Do a comparison of two authentication digests by comparing the FULL data.
static bool is_zero(char const *value)
Check whether the string is all zeros.
size_t fr_utf8_char(uint8_t const *str, ssize_t inlen)
Checks for utf-8, taken from http://www.w3.org/International/questions/qa-forms-utf-8.
Signals that can be sent to a request.
static size_t char fr_sbuff_t size_t inlen
static size_t char ** out