The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions
missing.c File Reference

Replacements for functions that are or can be missing on some platforms. More...

#include <freeradius-devel/missing.h>
#include <ctype.h>
#include <pthread.h>
#include <stdbool.h>
#include <stdlib.h>
+ Include dependency graph for missing.c:

Go to the source code of this file.

Functions

void closefrom (int fd)
 
char * ctime_r (time_t const *l_clock, char *l_buf)
 
struct tm * gmtime_r (time_t const *l_clock, struct tm *result)
 
int inet_aton (char const *cp, struct in_addr *inp)
 
char const * inet_ntop (int af, void const *src, char *dst, size_t cnt)
 
int inet_pton (int af, char const *src, void *dst)
 
static int inet_pton4 (char const *src, struct in_addr *dst)
 
struct tm * localtime_r (time_t const *l_clock, struct tm *result)
 
void * memrchr (void const *s, int c, size_t n)
 GNU libc extension on some platforms. More...
 
void * memset_explicit (void *ptr, int ch, size_t len)
 
int sendmmsg (int sockfd, struct mmsghdr *msgvec, unsigned int vlen, int flags)
 Emulates the real sendmmsg in userland. More...
 
int strcasecmp (char *s1, char *s2)
 
int strncasecmp (char *s1, char *s2, int n)
 
char * strsep (char **stringp, char const *delim)
 
int vdprintf (int fd, char const *format, va_list args)
 

Detailed Description

Replacements for functions that are or can be missing on some platforms.

Definition in file missing.c.

Function Documentation

◆ closefrom()

void closefrom ( int  fd)

Definition at line 551 of file missing.c.

+ Here is the call graph for this function:

◆ ctime_r()

char* ctime_r ( time_t const *  l_clock,
char *  l_buf 
)

Definition at line 182 of file missing.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gmtime_r()

struct tm* gmtime_r ( time_t const *  l_clock,
struct tm *  result 
)

Definition at line 201 of file missing.c.

+ Here is the caller graph for this function:

◆ inet_aton()

int inet_aton ( char const *  cp,
struct in_addr *  inp 
)

Definition at line 97 of file missing.c.

+ Here is the caller graph for this function:

◆ inet_ntop()

char const* inet_ntop ( int  af,
void const *  src,
char *  dst,
size_t  cnt 
)

Definition at line 443 of file missing.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inet_pton()

int inet_pton ( int  af,
char const *  src,
void *  dst 
)

Definition at line 427 of file missing.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inet_pton4()

static int inet_pton4 ( char const *  src,
struct in_addr *  dst 
)
static

Definition at line 276 of file missing.c.

+ Here is the caller graph for this function:

◆ localtime_r()

struct tm* localtime_r ( time_t const *  l_clock,
struct tm *  result 
)

Definition at line 163 of file missing.c.

+ Here is the caller graph for this function:

◆ memrchr()

void* memrchr ( void const *  s,
int  c,
size_t  n 
)

GNU libc extension on some platforms.

Definition at line 83 of file missing.c.

+ Here is the caller graph for this function:

◆ memset_explicit()

void* memset_explicit ( void *  ptr,
int  ch,
size_t  len 
)

Definition at line 620 of file missing.c.

+ Here is the caller graph for this function:

◆ sendmmsg()

int sendmmsg ( int  sockfd,
struct mmsghdr *  msgvec,
unsigned int  vlen,
int  flags 
)

Emulates the real sendmmsg in userland.

The idea behind the proper sendmmsg in FreeBSD and Linux is that multiple datagram messages can be sent using a single system call.

This function doesn't achieve that, but it does reduce ifdefs elsewhere and means we can batch encoding/sending operations.

Parameters
[in]sockfdto write packets to.
[in]msgveca pointer to an array of mmsghdr structures. The size of this array is specified in vlen.
[in]vlenLength of msgvec.
[in]flagssame as for sendmsg(2).
Returns
  • >= 0 The number of messages sent. Check against vlen to determine if overall operation was successful.
  • < 0 on error. Only returned if first operation errors.

Definition at line 500 of file missing.c.

◆ strcasecmp()

int strcasecmp ( char *  s1,
char *  s2 
)

Definition at line 66 of file missing.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ strncasecmp()

int strncasecmp ( char *  s1,
char *  s2,
int  n 
)

Definition at line 36 of file missing.c.

+ Here is the caller graph for this function:

◆ strsep()

char* strsep ( char **  stringp,
char const *  delim 
)

Definition at line 123 of file missing.c.

+ Here is the caller graph for this function:

◆ vdprintf()

int vdprintf ( int  fd,
char const *  format,
va_list  args 
)

Definition at line 210 of file missing.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: