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)  

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

Go to the source code of this file.


#define CMD_BUFFER_SIZE   2048
 The buffer size to store the command. More...


static void ip2name_execconfig (const char *name, const char *param)
static enum ip2name_retcode ip2name_exec (char *ip, int ip_len)


struct Ip2NameProcess Ip2NameExec
 The functions to resolve an IP address using an external executable. More...
static char ExecCmd [2048] =""

Macro Definition Documentation


#define CMD_BUFFER_SIZE   2048

The buffer size to store the command.

Definition at line 32 of file ip2name_exec.c.

Function Documentation

◆ ip2name_exec()

static enum ip2name_retcode ip2name_exec ( char *  ip,
int  ip_len 

Run an external process to get the name of a computer.

ipThe ip address.
ip_lenThe number of bytes in the IP address.
One of the ip2name_retcode value.

Definition at line 75 of file ip2name_exec.c.

References _, cmd, CMD_BUFFER_SIZE, debuga(), ExecCmd, INRC_Error, INRC_Found, INRC_NotFound, and safe_strcpy().

◆ ip2name_execconfig()

static void ip2name_execconfig ( const char *  name,
const char *  param 

Configure the module to resolve an IP address using an external program.

nameThe name of the module as invoked by the user in the configuration file.
paramThe parameters passed to the module.

Definition at line 55 of file ip2name_exec.c.

References _, debuga(), and ExecCmd.

Variable Documentation

◆ ExecCmd

char ExecCmd[2048] =""

Definition at line 46 of file ip2name_exec.c.

Referenced by ip2name_exec(), and ip2name_execconfig().

◆ Ip2NameExec

struct Ip2NameProcess Ip2NameExec
Initial value:

The functions to resolve an IP address using an external executable.

Definition at line 38 of file ip2name_exec.c.

static enum ip2name_retcode ip2name_exec(char *ip, int ip_len)
Definition: ip2name_exec.c:75
static void ip2name_execconfig(const char *name, const char *param)
Definition: ip2name_exec.c:55