rc_mksid(3) Radius client library rc_mksid(3)

rc_mksid - Generate a "unique" session-ID string.

#include <radcli/radcli.h>

char * rc_mksid(
    void     
);

This function is retained only for source compatibility with freeradius-client and radiusclient-ng. It returns a pointer to a static non-reentrant buffer that is overwritten on each call, making it unsafe in multi-threaded applications. Use snprintf into your own buffer instead:

charsid[15];

snprintf(sid,sizeof(sid),"%08lX%04X",(unsignedlong)time(NULL),getpid());

pointer to a static buffer containing the ID string; overwritten by subsequent calls.

radcli.h(3)

2026-08-19 radcli