citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

locate_host.c File Reference
#include "sysdep.h"
#include <string.h>
#include <stdio.h>
#include <syslog.h>
#include <ctype.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <libcitadel.h>
#include "context.h"
#include <arpa/nameser.h>
#include <arpa/nameser_compat.h>
#include <resolv.h>
#include "domain.h"
#include "locate_host.h"
Include dependency graph for locate_host.c:

Go to the source code of this file.

Macros

#define NS_CMPRSFLGS   0xc0
 
#define NS_INT16SZ   INT16SZ
 
#define NS_INT32SZ   INT32SZ
 
#define NS_GET16   GETSHORT
 
#define RESULT_SIZE   4096 /* What is the longest result text we support? */
 

Functions

void locate_host (char *tbuf, size_t n, char *abuf, size_t na, int client_socket)
 
int rblcheck_backend (char *domain, char *txtbuf, int txtbufsize)
 
int rbl_check (char *cs_addr, char *message_to_spammer)
 
int hostname_to_dotted_quad (char *addr, char *host)
 

Macro Definition Documentation

◆ NS_CMPRSFLGS

#define NS_CMPRSFLGS   0xc0

Definition at line 39 of file locate_host.c.

◆ NS_GET16

#define NS_GET16   GETSHORT

Definition at line 49 of file locate_host.c.

◆ NS_INT16SZ

#define NS_INT16SZ   INT16SZ

Definition at line 45 of file locate_host.c.

◆ NS_INT32SZ

#define NS_INT32SZ   INT32SZ

Definition at line 46 of file locate_host.c.

◆ RESULT_SIZE

#define RESULT_SIZE   4096 /* What is the longest result text we support? */

Definition at line 85 of file locate_host.c.

Function Documentation

◆ hostname_to_dotted_quad()

int hostname_to_dotted_quad ( char *  addr,
char *  host 
)

Definition at line 344 of file locate_host.c.

◆ locate_host()

void locate_host ( char *  tbuf,
size_t  n,
char *  abuf,
size_t  na,
int  client_socket 
)

Definition at line 58 of file locate_host.c.

Referenced by begin_session().

◆ rbl_check()

int rbl_check ( char *  cs_addr,
char *  message_to_spammer 
)

Definition at line 233 of file locate_host.c.

References get_hosts(), rblcheck_backend(), and SIZ.

Referenced by smtp_greeting(), and smtp_rcpt().

◆ rblcheck_backend()

int rblcheck_backend ( char *  domain,
char *  txtbuf,
int  txtbufsize 
)

Definition at line 86 of file locate_host.c.

References free(), malloc(), NS_GET16, NS_INT16SZ, NS_INT32SZ, RESULT_SIZE, and server_shutting_down.

Referenced by rbl_check().