networkclient
id.c File Reference

Handling of ID allocation / freeing. More...

#include <networkradius-devel/client.h>
#include <unistd.h>
Include dependency graph for id.c:

Functions

int nr_track_id_alloc (nr_track_id_t *s, RADIUS_PACKET *packet)
 
int nr_track_id_release (nr_track_id_t *s, RADIUS_PACKET *packet)
 
int nr_track_id_realloc (nr_track_id_t *s, RADIUS_PACKET *packet)
 
int nr_track_id_init (nr_track_id_t *s, int code, const char *secret)
 
int nr_track_id_close (const nr_track_id_t *s)
 
int nr_track_id_packet_alloc (nr_track_id_t *s, RADIUS_PACKET **packet_p, RADIUS_PACKET *original, size_t sizeof_data)
 
void nr_track_id_packet_free (nr_track_id_t *s, RADIUS_PACKET *packet)
 

Detailed Description

Handling of ID allocation / freeing.

Function Documentation

void nr_track_id_packet_free ( nr_track_id_t s,
RADIUS_PACKET packet 
)

Frees a RADIUS_PACKET structure, and its contents

This function is the counterpart to nr_track_id_packet_alloc() If the pointer passed here was not allocated by nr_track_id_packet_alloc(), this function does nothing, and likely leaks memory.

The RADIUS_PACKET::vp field is also freed.

Parameters
[in]sThe server structure
[in]packetThe packet which is to be freed.

References radius_packet::data, nr_track_id_release(), nr_vp_free(), and radius_packet::vps.

Referenced by main().

Here is the call graph for this function: