rc_mksid - Man Page

Generate a "unique" session-ID string.

Synopsis

#include <radcli/radcli.h>

char * rc_mksid(
    void     
);

Description

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());

Return Value

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

See Also

radcli.h(3)

Info

2026-08-19 radcli Radius client library