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.

Macros

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

Functions

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

Variables

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

Macro Definition Documentation

◆ CMD_BUFFER_SIZE

#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 
)
static

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

Parameters
ipThe ip address.
ip_lenThe number of bytes in the IP address.
Returns
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 
)
static

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

Parameters
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] =""
static

Definition at line 46 of file ip2name_exec.c.

Referenced by ip2name_exec(), and ip2name_execconfig().

◆ Ip2NameExec

struct Ip2NameProcess Ip2NameExec
Initial value:
=
{
"dns",
NULL,
}

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

Definition at line 38 of file ip2name_exec.c.

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