libspf2 1.2.11
Data Structures | Macros | Functions
spfd.c File Reference
#include <sys/types.h>
#include "libreplace/getopt.h"
#include <unistd.h>
#include <netdb.h>
#include <fcntl.h>
#include <time.h>
#include <signal.h>
#include <syslog.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <ctype.h>
#include <sys/wait.h>
#include <pthread.h>
#include "spf.h"
#include "spf_dns.h"
#include "spf_dns_null.h"
#include "spf_dns_resolv.h"
#include "spf_dns_test.h"
#include "spf_dns_cache.h"
Include dependency graph for spfd.c:

Go to the source code of this file.

Data Structures

struct  config_t
 
struct  request_t
 
struct  state_t
 

Macros

#define TRUE   1
 
#define FALSE   0
 
#define bool   int
 
#define FREE(x, f)   do { if ((x)) (f)((x)); (x) = NULL; } while(0)
 
#define FREE_REQUEST(x)   FREE((x), SPF_request_free)
 
#define FREE_RESPONSE(x)   FREE((x), SPF_response_free)
 
#define FREE_STRING(x)   FREE((x), free)
 
#define UNLESS(x)   err = (x); if (err)
 
#define FAIL(x)   do { goto fail; } while(0)
 
#define WARN(x, r)   response_print_errors((x), (r), err)
 
#define DIE(x)   do { fprintf(stderr, "%s\n", x); exit(1); } while(0)
 
#define STREQ(a, b)   (strcmp((a), (b)) == 0)
 
#define NEW_REQUEST   ((request_t *)calloc(1, sizeof(request_t)));
 

Functions

void usage (void)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ bool

#define bool   int

Definition at line 126 of file spfd.c.

◆ DIE

#define DIE (   x)    do { fprintf(stderr, "%s\n", x); exit(1); } while(0)

Definition at line 469 of file spfd.c.

◆ FAIL

#define FAIL (   x)    do { goto fail; } while(0)

◆ FALSE

#define FALSE   0

Definition at line 124 of file spfd.c.

◆ FREE

#define FREE (   x,
 
)    do { if ((x)) (f)((x)); (x) = NULL; } while(0)

Definition at line 128 of file spfd.c.

◆ FREE_REQUEST

#define FREE_REQUEST (   x)    FREE((x), SPF_request_free)

Definition at line 129 of file spfd.c.

◆ FREE_RESPONSE

#define FREE_RESPONSE (   x)    FREE((x), SPF_response_free)

Definition at line 130 of file spfd.c.

◆ FREE_STRING

#define FREE_STRING (   x)    FREE((x), free)

Definition at line 131 of file spfd.c.

◆ NEW_REQUEST

#define NEW_REQUEST   ((request_t *)calloc(1, sizeof(request_t)));

◆ STREQ

#define STREQ (   a,
 
)    (strcmp((a), (b)) == 0)

◆ TRUE

#define TRUE   1

Definition at line 123 of file spfd.c.

◆ UNLESS

#define UNLESS (   x)    err = (x); if (err)

◆ WARN

#define WARN (   x,
 
)    response_print_errors((x), (r), err)

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 968 of file spfd.c.

◆ usage()

void usage ( void  )

Definition at line 446 of file spfd.c.

Referenced by main().