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>
Go to the source code of this file.
|
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) |
|
Replacements for functions that are or can be missing on some platforms.
- Copyright
- 2000,2006 The FreeRADIUS server project
Definition in file missing.c.
◆ closefrom()
◆ ctime_r()
char* ctime_r |
( |
time_t const * |
l_clock, |
|
|
char * |
l_buf |
|
) |
| |
◆ gmtime_r()
struct tm* gmtime_r |
( |
time_t const * |
l_clock, |
|
|
struct tm * |
result |
|
) |
| |
◆ inet_aton()
int inet_aton |
( |
char const * |
cp, |
|
|
struct in_addr * |
inp |
|
) |
| |
◆ inet_ntop()
char const* inet_ntop |
( |
int |
af, |
|
|
void const * |
src, |
|
|
char * |
dst, |
|
|
size_t |
cnt |
|
) |
| |
◆ inet_pton()
int inet_pton |
( |
int |
af, |
|
|
char const * |
src, |
|
|
void * |
dst |
|
) |
| |
◆ inet_pton4()
static int inet_pton4 |
( |
char const * |
src, |
|
|
struct in_addr * |
dst |
|
) |
| |
|
static |
◆ localtime_r()
struct tm* localtime_r |
( |
time_t const * |
l_clock, |
|
|
struct tm * |
result |
|
) |
| |
◆ 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.
◆ memset_explicit()
void* memset_explicit |
( |
void * |
ptr, |
|
|
int |
ch, |
|
|
size_t |
len |
|
) |
| |
◆ 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] | sockfd | to write packets to. |
[in] | msgvec | a pointer to an array of mmsghdr structures. The size of this array is specified in vlen. |
[in] | vlen | Length of msgvec. |
[in] | flags | same 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 |
|
) |
| |
◆ strncasecmp()
int strncasecmp |
( |
char * |
s1, |
|
|
char * |
s2, |
|
|
int |
n |
|
) |
| |
◆ strsep()
char* strsep |
( |
char ** |
stringp, |
|
|
char const * |
delim |
|
) |
| |
◆ vdprintf()
int vdprintf |
( |
int |
fd, |
|
|
char const * |
format, |
|
|
va_list |
args |
|
) |
| |