소스 검색

* Forgotten header

tags/0.3.0
Vsevolod Stakhov 14 년 전
부모
커밋
79f25c80c3
1개의 변경된 파일49개의 추가작업 그리고 0개의 파일을 삭제
  1. 49
    0
      src/spf.h

+ 49
- 0
src/spf.h 파일 보기

@@ -0,0 +1,49 @@
#ifndef RSPAMD_SPF_H
#define RSPAMD_SPF_H

#include "config.h"

struct worker_task;
struct spf_record;

typedef void (*spf_cb_t)(struct spf_record *record, struct worker_task *task);

typedef enum spf_mech_e {
SPF_FAIL,
SPF_SOFT_FAIL,
SPF_PASS,
SPF_NEUTRAL
} spf_mech_t;

typedef enum spf_action_e {
SPF_RESOLVE_MX,
SPF_RESOLVE_A,
SPF_RESOLVE_PTR,
SPF_RESOLVE_REDIRECT,
SPF_RESOLVE_INCLUDE,
SPF_RESOLVE_EXP
} spf_action_t;

struct spf_addr {
uint32_t addr;
uint32_t mask;
spf_mech_t mech;
};

struct spf_record {
char **elts;

char **cur_elt;
spf_action_t cur_action;

GList *addrs;
char *cur_domain;
struct worker_task *task;
spf_cb_t callback;
};


gboolean resolve_spf (struct worker_task *task, spf_cb_t callback);


#endif

Loading…
취소
저장