Dillo v3.1.1-98-g318d1f14
|
#include <errno.h>
#include <unistd.h>
#include <time.h>
#include <sys/stat.h>
#include <stdlib.h>
#include "../dlib/dlib.h"
#include "dpid_common.h"
#include "misc_new.h"
Go to the source code of this file.
Functions | |
Dstr * | a_Misc_rdtag (int socket) |
char * | a_Misc_readtag (int sock) |
char * | a_Misc_mkdtemp (char *template) |
Alternative to mkdtemp(). | |
char * | a_Misc_mkfname (char *template) |
Return a new, nonexistent file name from a template. | |
char * | a_Misc_mksecret (int nchar) |
Return a new, random hexadecimal string of 'nchar' characters. | |
char * a_Misc_mkdtemp | ( | char * | template | ) |
Alternative to mkdtemp().
Reads a dpi tag from a socket without hanging on read.
Definition at line 131 of file misc_new.c.
References a_Misc_mkfname().
Referenced by mk_sockdir().
char * a_Misc_mkfname | ( | char * | template | ) |
Return a new, nonexistent file name from a template.
(adapted from dietlibc; alternative to mkdtemp())
Definition at line 147 of file misc_new.c.
References error(), and MSG_ERR.
Referenced by a_Misc_mkdtemp().
char * a_Misc_mksecret | ( | int | nchar | ) |
Return a new, random hexadecimal string of 'nchar' characters.
Definition at line 181 of file misc_new.c.
Referenced by init_ids_srs_socket().
Dstr * a_Misc_rdtag | ( | int | socket | ) |
Reads a dpi tag from a socket
Definition at line 28 of file misc_new.c.
References dStr_append_c(), dStr_free(), dStr_sized_new(), and TRUE.
char * a_Misc_readtag | ( | int | sock | ) |
Read a dpi tag from sock
Definition at line 58 of file misc_new.c.
References dMalloc(), dRealloc(), and ERRMSG.