sarg  2.4.0
About: SARG ia a Squid Analysis Report Generator.
  Fossies Dox: sarg-2.4.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

sort.c File Reference
#include "include/conf.h"
#include "include/defs.h"
Include dependency graph for sort.c:

Go to the source code of this file.

Functions

void tmpsort (const struct userinfostruct *uinfo)
 
void sort_users_log (const char *tmp, int debug, struct userinfostruct *uinfo)
 
void sort_labels (const char **label, const char **order)
 

Function Documentation

◆ sort_labels()

void sort_labels ( const char **  label,
const char **  order 
)

Get the internationalized text to display when reporting the sort criterion and order of a user list.

Parameters
labelA pointer to set to the string of the sort criterion name.
orderA pointer to set to the string of the sort order name

Definition at line 160 of file sort.c.

References _, userinfostruct::label, pgettext, USER_SORT_CONNECT, USER_SORT_REVERSE, USER_SORT_SITE, USER_SORT_TIME, and UserSort.

Referenced by gerarel(), and htmlrel().

Here is the caller graph for this function:

◆ sort_users_log()

void sort_users_log ( const char *  tmp,
int  debug,
struct userinfostruct uinfo 
)

The function sorts the unsort file in the temporary directory. These files correspond to the format described in Output files.

Parameters
tmpThe temorary directory of the sarg files.
debugTrue to output debug information.
uinfoThe user whose log must be sorted.

The user's files are sorted by columns 5, 1 and 2 that are the columns of the number of bytes transfered, the date of the access and the time of the access.

The sorted files are written in files with the extension log and the name of the unsorted file without the unsort extension. The unsorted file is deleted just after the sorting.

Definition at line 112 of file sort.c.

References _, debug, debuga(), debuga_more(), userinfostruct::filename, KeepTempLog, MAXLEN, and tmp.

Referenced by data_file(), and gerarel().

Here is the caller graph for this function:

◆ tmpsort()

void tmpsort ( const struct userinfostruct uinfo)

Sort all the utmp files form the temporary directory. The sort can be made according to the number of connections, the accessed sites or the time of the access depending on the value of ::UserSortField. The sorting is either made in increasing or decreasing order as specified by the value of ::UserSortOrder.

Definition at line 36 of file sort.c.

References _, debug, debuga(), debuga_more(), userinfostruct::filename, KeepTempLog, MAXLEN, tmp, USER_SORT_CONNECT, USER_SORT_REVERSE, USER_SORT_SITE, USER_SORT_TIME, and UserSort.

Referenced by htmlrel().

Here is the caller graph for this function: