Symbol: env
bin/ed/main.c
1366
siglongjmp(env, -1);
bin/ed/main.c
184
if (sigsetjmp(env, 1)) {
bin/ed/main.c
78
sigjmp_buf env;
bin/ksh/c_sh.c
534
struct env *ep;
bin/ksh/c_sh.c
561
struct env *ep, *last_ep = NULL;
bin/ksh/jobs.c
1272
struct env *ep;
bin/ksh/main.c
152
struct env env;
bin/ksh/main.c
174
memset(&env, 0, sizeof(env));
bin/ksh/main.c
175
env.type = E_NONE;
bin/ksh/main.c
176
ainit(&env.area);
bin/ksh/main.c
177
genv = &env;
bin/ksh/main.c
42
struct env *genv;
bin/ksh/main.c
710
struct env *ep;
bin/ksh/main.c
726
struct env *ep = genv;
bin/ksh/main.c
781
struct env *ep;
bin/ksh/main.c
806
struct env *ep;
bin/ksh/sh.h
79
struct env *oenv; /* link to previous environment */
bin/ksh/sh.h
83
extern struct env *genv;
bin/ksh/var.c
849
XPtrV env;
bin/ksh/var.c
853
XPinit(env, 64);
bin/ksh/var.c
876
XPput(env, vp->val.s);
bin/ksh/var.c
878
XPput(env, NULL);
bin/ksh/var.c
879
return (char **) XPclose(env);
games/boggle/boggle/bog.c
272
if (setjmp(env)) {
games/boggle/boggle/bog.c
73
jmp_buf env;
games/boggle/boggle/timer.c
59
extern jmp_buf env;
games/boggle/boggle/timer.c
74
longjmp(env, 1);
games/trek/lose.c
68
extern jmp_buf env;
games/trek/lose.c
83
longjmp(env, 1);
games/trek/main.c
126
jmp_buf env;
games/trek/main.c
162
if (setjmp(env))
games/trek/play.c
80
extern jmp_buf env;
games/trek/play.c
82
longjmp(env, 1);
games/trek/win.c
58
extern jmp_buf env;
games/trek/win.c
85
longjmp(env, 1);
lib/libcrypto/cms/cms_env.c
136
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
138
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_env.c
139
if (!env)
lib/libcrypto/cms/cms_env.c
142
return env->recipientInfos;
lib/libcrypto/cms/cms_env.c
169
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
174
env = cms_enveloped_data_init(cms);
lib/libcrypto/cms/cms_env.c
175
if (env == NULL)
lib/libcrypto/cms/cms_env.c
177
if (!cms_EncryptedContent_init(env->encryptedContentInfo, cipher,
lib/libcrypto/cms/cms_env.c
250
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
253
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_env.c
254
if (!env)
lib/libcrypto/cms/cms_env.c
286
if (!sk_CMS_RecipientInfo_push(env->recipientInfos, ri))
lib/libcrypto/cms/cms_env.c
564
CMS_EnvelopedData *env;
lib/libcrypto/cms/cms_env.c
567
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_env.c
568
if (!env)
lib/libcrypto/cms/cms_env.c
624
if (!sk_CMS_RecipientInfo_push(env->recipientInfos, ri))
lib/libcrypto/cms/cms_env.c
871
cms_env_set_originfo_version(CMS_EnvelopedData *env)
lib/libcrypto/cms/cms_env.c
873
CMS_OriginatorInfo *org = env->originatorInfo;
lib/libcrypto/cms/cms_env.c
883
env->version = 4;
lib/libcrypto/cms/cms_env.c
886
if (env->version < 3)
lib/libcrypto/cms/cms_env.c
887
env->version = 3;
lib/libcrypto/cms/cms_env.c
896
env->version = 4;
lib/libcrypto/cms/cms_env.c
903
cms_env_set_version(CMS_EnvelopedData *env)
lib/libcrypto/cms/cms_env.c
911
if (env->version >= 4)
lib/libcrypto/cms/cms_env.c
914
cms_env_set_originfo_version(env);
lib/libcrypto/cms/cms_env.c
916
if (env->version >= 3)
lib/libcrypto/cms/cms_env.c
919
for (i = 0; i < sk_CMS_RecipientInfo_num(env->recipientInfos); i++) {
lib/libcrypto/cms/cms_env.c
920
ri = sk_CMS_RecipientInfo_value(env->recipientInfos, i);
lib/libcrypto/cms/cms_env.c
922
env->version = 3;
lib/libcrypto/cms/cms_env.c
926
env->version = 2;
lib/libcrypto/cms/cms_env.c
929
if (env->originatorInfo || env->unprotectedAttrs)
lib/libcrypto/cms/cms_env.c
930
env->version = 2;
lib/libcrypto/cms/cms_env.c
931
if (env->version == 2)
lib/libcrypto/cms/cms_env.c
933
env->version = 0;
lib/libcrypto/cms/cms_pwri.c
105
env = cms_get0_enveloped(cms);
lib/libcrypto/cms/cms_pwri.c
106
if (!env)
lib/libcrypto/cms/cms_pwri.c
117
kekciph = env->encryptedContentInfo->cipher;
lib/libcrypto/cms/cms_pwri.c
205
if (!sk_CMS_RecipientInfo_push(env->recipientInfos, ri))
lib/libcrypto/cms/cms_pwri.c
98
CMS_EnvelopedData *env;
lib/libcurses/base/lib_initscr.c
66
const char *env;
lib/libcurses/base/lib_initscr.c
71
env = getenv("TERM");
lib/libcurses/base/lib_initscr.c
72
(void) VALID_TERM_ENV(env, "unknown");
lib/libcurses/base/lib_initscr.c
74
if ((name = strdup(env)) == NULL) {
lib/libcurses/base/lib_mouse.c
487
const char *env = getenv("TERM");
lib/libcurses/base/lib_mouse.c
489
if (env != 0) {
lib/libcurses/base/lib_mouse.c
490
result = _nc_name_match(list, env, "|:");
lib/libcurses/base/lib_mouse.c
500
if (env != 0 && strstr(env, "linux") != 0) {
lib/libcurses/base/lib_set_term.c
326
char *env;
lib/libcurses/base/lib_set_term.c
489
if ((env = getenv("NCURSES_ASSUMED_COLORS")) != 0) {
lib/libcurses/base/lib_set_term.c
492
int count = sscanf(env, "%d%c%d%c", &fg, &sep1, &bg, &sep2);
lib/libcurses/base/lib_set_term.c
653
env = _nc_get_locale();
lib/libcurses/base/lib_set_term.c
654
sp->_legacy_coding = ((env == 0)
lib/libcurses/base/lib_set_term.c
655
|| !strcmp(env, "C")
lib/libcurses/base/lib_set_term.c
656
|| !strcmp(env, "POSIX"));
lib/libcurses/tinfo/lib_setup.c
554
char *env;
lib/libcurses/tinfo/lib_setup.c
560
env = setlocale(LC_CTYPE, 0);
lib/libcurses/tinfo/lib_setup.c
562
if (((env = getenv("LANG")) != 0 && *env != '\0')
lib/libcurses/tinfo/lib_setup.c
563
|| ((env = getenv("LC_CTYPE")) != 0 && *env != '\0')
lib/libcurses/tinfo/lib_setup.c
564
|| ((env = getenv("LC_ALL")) != 0 && *env != '\0')) {
lib/libcurses/tinfo/lib_setup.c
568
T(("_nc_get_locale %s", _nc_visbuf(env)));
lib/libcurses/tinfo/lib_setup.c
569
return env;
lib/libcurses/tinfo/lib_setup.c
582
char *env = nl_langinfo(CODESET);
lib/libcurses/tinfo/lib_setup.c
583
result = !strcmp(env, "UTF-8");
lib/libcurses/tinfo/lib_setup.c
584
T(("_nc_unicode_locale(%s) ->%d", env, result));
lib/libcurses/tinfo/lib_setup.c
586
char *env = _nc_get_locale();
lib/libcurses/tinfo/lib_setup.c
587
if (env != 0) {
lib/libcurses/tinfo/lib_setup.c
588
if (strstr(env, ".UTF-8") != 0) {
lib/libcurses/tinfo/lib_setup.c
590
T(("_nc_unicode_locale(%s) ->%d", env, result));
lib/libcurses/tinfo/lib_setup.c
608
const char *env;
lib/libcurses/tinfo/lib_setup.c
617
} else if ((env = getenv("TERM")) != 0) {
lib/libcurses/tinfo/lib_setup.c
618
if (strstr(env, "linux")) {
lib/libcurses/tinfo/lib_setup.c
620
} else if (strstr(env, "screen") != 0
lib/libcurses/tinfo/lib_setup.c
621
&& ((env = getenv("TERMCAP")) != 0
lib/libcurses/tinfo/lib_setup.c
622
&& strstr(env, "screen") != 0)
lib/libcurses/tinfo/lib_setup.c
623
&& strstr(env, "hhII00") != 0) {
lib/libcurses/tinfo/obsolete.c
268
char *env = getenv("NCURSES_OOM_TESTING");
lib/libcurses/tinfo/obsolete.c
270
if (env != NULL) {
lib/libcurses/tinfo/obsolete.c
272
oom_limit = strtol(env, &check, 0);
lib/libexpat/tests/minicheck.c
140
static jmp_buf env;
lib/libexpat/tests/minicheck.c
206
if (setjmp(env)) {
lib/libexpat/tests/minicheck.c
213
if (setjmp(env)) {
lib/libexpat/tests/minicheck.c
222
if (setjmp(env)) {
lib/libexpat/tests/minicheck.c
258
longjmp(env, 1);
lib/libkeynote/environment.c
722
kn_query(struct environment *env, char **retvalues, int numval,
lib/libkeynote/environment.c
735
for (en = env; en != NULL; en = en->env_next)
lib/libm/src/s_fma.c
100
feupdateenv(&env);
lib/libm/src/s_fma.c
105
feholdexcept(&env);
lib/libm/src/s_fma.c
109
feupdateenv(&env);
lib/libm/src/s_fma.c
114
feholdexcept(&env);
lib/libm/src/s_fma.c
118
feupdateenv(&env);
lib/libm/src/s_fma.c
88
fenv_t env;
lib/libm/src/s_fma.c
96
feholdexcept(&env);
lib/libm/src/s_fmal.c
100
feholdexcept(&env);
lib/libm/src/s_fmal.c
104
feupdateenv(&env);
lib/libm/src/s_fmal.c
109
feholdexcept(&env);
lib/libm/src/s_fmal.c
113
feupdateenv(&env);
lib/libm/src/s_fmal.c
83
fenv_t env;
lib/libm/src/s_fmal.c
91
feholdexcept(&env);
lib/libm/src/s_fmal.c
95
feupdateenv(&env);
lib/libm/src/s_lrint.c
49
fenv_t env;
lib/libm/src/s_lrint.c
52
feholdexcept(&env);
lib/libm/src/s_lrint.c
56
feupdateenv(&env);
lib/libm/src/s_lrintf.c
49
fenv_t env;
lib/libm/src/s_lrintf.c
52
feholdexcept(&env);
lib/libm/src/s_lrintf.c
56
feupdateenv(&env);
lib/libm/src/s_lrintl.c
49
fenv_t env;
lib/libm/src/s_lrintl.c
52
feholdexcept(&env);
lib/libm/src/s_lrintl.c
56
feupdateenv(&env);
libexec/getty/main.c
344
env[i] = environ[i];
libexec/getty/main.c
345
makeenv(&env[i]);
libexec/getty/main.c
350
execle(LO, "login", "-p", "--", name, NULL, env);
libexec/getty/main.c
78
char *env[128];
libexec/getty/subr.c
323
makeenv(char *env[])
libexec/getty/subr.c
329
ep = env;
libexec/ld.so/loader.c
931
_dl_getenv(const char *var, char **env)
libexec/ld.so/loader.c
935
while ((ep = *env++)) {
libexec/ld.so/loader.c
949
_dl_unsetenv(const char *var, char **env)
libexec/ld.so/loader.c
953
while ((ep = *env)) {
libexec/ld.so/loader.c
963
for (P = env;; ++P)
libexec/ld.so/loader.c
967
env++;
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
290
char const *env[2];
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
307
env[0] = options;
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
308
env[1] = NULL;
regress/lib/libc/malloc/malloc_errs/malloc_errs.c
309
execle(argv[0], argv[0], num, NULL, env);
regress/lib/libc/setjmp-fpu/_setjmp.c
11
#define SETJMP(env, savemask) _setjmp(env)
regress/lib/libc/setjmp-fpu/_setjmp.c
12
#define LONGJMP(env, val) _longjmp(env, val)
regress/lib/libc/setjmp-fpu/setjmp-fpu.c
10
JMP_BUF env;
regress/lib/libc/setjmp-fpu/setjmp-fpu.c
21
rv = SETJMP(env, 0);
regress/lib/libc/setjmp-fpu/setjmp-fpu.c
37
LONGJMP(env, 1);
regress/lib/libc/setjmp-fpu/setjmp.c
11
#define SETJMP(env, savemask) setjmp(env)
regress/lib/libc/setjmp-fpu/setjmp.c
12
#define LONGJMP(env, val) longjmp(env, val)
regress/lib/libc/setjmp-fpu/sigsetjmp.c
11
#define SETJMP(env, savemask) sigsetjmp(env, savemask)
regress/lib/libc/setjmp-fpu/sigsetjmp.c
12
#define LONGJMP(env, val) siglongjmp(env, val)
regress/lib/libm/fenv/fenv.c
132
fenv_t env;
regress/lib/libm/fenv/fenv.c
134
fegetenv(&env);
regress/lib/libm/fenv/fenv.c
137
memset(&env.__x87.__others[0], 0, 14);
regress/lib/libm/fenv/fenv.c
139
assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0);
regress/lib/libm/fenv/fenv.c
405
fenv_t env;
regress/lib/libm/fenv/fenv.c
439
assert(feholdexcept(&env) == 0);
regress/lib/libm/fenv/fenv.c
447
assert(feupdateenv(&env) == 0);
regress/lib/libm/msun/fenv_test.c
180
fenv_t env;
regress/lib/libm/msun/fenv_test.c
182
fegetenv(&env);
regress/lib/libm/msun/fenv_test.c
184
hexdump(&env, sizeof(env), "current fenv ", HD_OMIT_CHARS);
regress/lib/libm/msun/fenv_test.c
185
hexdump(FE_DFL_ENV, sizeof(env), "default fenv ", HD_OMIT_CHARS);
regress/lib/libm/msun/fenv_test.c
202
ATF_CHECK(memcmp(&env.__mxcsr, &FE_DFL_ENV->__mxcsr,
regress/lib/libm/msun/fenv_test.c
203
sizeof(env.__mxcsr)) == 0);
regress/lib/libm/msun/fenv_test.c
204
ATF_CHECK(memcmp(&env.__x87.__control, &FE_DFL_ENV->__x87.__control,
regress/lib/libm/msun/fenv_test.c
205
sizeof(env.__x87.__control)) == 0);
regress/lib/libm/msun/fenv_test.c
206
ATF_CHECK(memcmp(&env.__x87.__status, &FE_DFL_ENV->__x87.__status,
regress/lib/libm/msun/fenv_test.c
207
sizeof(env.__x87.__status)) == 0);
regress/lib/libm/msun/fenv_test.c
208
ATF_CHECK(memcmp(&env.__x87.__tag, &FE_DFL_ENV->__x87.__tag,
regress/lib/libm/msun/fenv_test.c
209
sizeof(env.__x87.__tag)) == 0);
regress/lib/libm/msun/fenv_test.c
211
ATF_CHECK_EQ(0, memcmp(&env, FE_DFL_ENV, sizeof(env)));
regress/lib/libm/msun/fenv_test.c
498
fenv_t env;
regress/lib/libm/msun/fenv_test.c
534
ATF_CHECK_EQ(0, feholdexcept(&env));
regress/lib/libm/msun/fenv_test.c
541
ATF_CHECK_EQ(0, feupdateenv(&env));
regress/lib/libm/msun/test-utils.h
123
fenv_t env;
regress/lib/libm/msun/test-utils.h
136
feholdexcept(&env);
regress/lib/libm/msun/test-utils.h
146
fesetenv(&env);
regress/libexec/ld.so/init-env/prog/prog.c
13
main(int argc, char **argv, char **env)
regress/libexec/ld.so/init-env/prog/prog.c
17
if (env == environ)
regress/sbin/iked/parser/common.c
127
timer_set(struct iked *env, struct iked_timer *tmr,
regress/sbin/iked/parser/common.c
133
timer_add(struct iked *env, struct iked_timer *tmr, int timeout)
regress/sbin/iked/parser/common.c
138
timer_del(struct iked *env, struct iked_timer *tmr)
regress/sbin/iked/parser/common.c
143
ikev2_nat_detection(struct iked *env, struct iked_message *msg,
regress/sbin/iked/parser/common.c
150
ca_setreq(struct iked *env, struct iked_sa *sh, struct iked_static_id *localid,
regress/sbin/iked/parser/common.c
188
ikev2_send_informational(struct iked *env, struct iked_message *msg)
regress/sbin/iked/parser/common.c
194
ikev2_msg_decrypt(struct iked *env, struct iked_sa *sa,
regress/sbin/iked/parser/common.c
213
ikev2_msg_flushqueue(struct iked *env, struct iked_msgqueue *queue)
regress/sbin/iked/parser/common.c
218
ikev2_msg_lookup(struct iked *env, struct iked_msgqueue *queue,
regress/sbin/iked/parser/common.c
56
eap_parse(struct iked *env, const struct iked_sa *sa, struct iked_message *msg,
regress/sbin/iked/parser/common.c
69
ikev2_send_ike_e(struct iked *env, struct iked_sa *sa, struct ibuf *buf,
regress/sbin/iked/parser/common.c
76
ikev2_ikesa_recv_delete(struct iked *env, struct iked_sa *sa)
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
139
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
146
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
153
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
168
if (sigsetjmp(env, 1) == 0) {
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
46
static jmp_buf env;
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
55
siglongjmp(env, 1);
regress/usr.bin/ssh/unittests/authopt/tests.c
125
ARRAY_EQ(nenv, env);
regress/usr.bin/ssh/unittests/authopt/tests.c
270
env, nenv, "foo=1,bar=2");
regress/usr.bin/ssh/unittests/authopt/tests.c
272
env, nenv, "foo=1");
regress/usr.bin/ssh/unittests/authopt/tests.c
557
expected->env = commasplit("foo=a,bar=b", &expected->nenv);
sbin/iked/ca.c
1069
ibuf_free(env->sc_certreq);
sbin/iked/ca.c
1070
if ((env->sc_certreq = ibuf_new(NULL, 0)) == NULL)
sbin/iked/ca.c
1091
if (ibuf_add(env->sc_certreq, md, len) != 0) {
sbin/iked/ca.c
1092
ibuf_free(env->sc_certreq);
sbin/iked/ca.c
1093
env->sc_certreq = NULL;
sbin/iked/ca.c
1098
if (ibuf_size(env->sc_certreq)) {
sbin/iked/ca.c
1099
env->sc_certreqtype = IKEV2_CERT_X509_CERT;
sbin/iked/ca.c
1100
iov[0].iov_base = &env->sc_certreqtype;
sbin/iked/ca.c
1101
iov[0].iov_len = sizeof(env->sc_certreqtype);
sbin/iked/ca.c
1103
iov[1].iov_base = ibuf_data(env->sc_certreq);
sbin/iked/ca.c
1104
iov[1].iov_len = ibuf_size(env->sc_certreq);
sbin/iked/ca.c
1108
ibuf_size(env->sc_certreq) / SHA_DIGEST_LENGTH,
sbin/iked/ca.c
1109
ibuf_size(env->sc_certreq) == SHA_DIGEST_LENGTH ?
sbin/iked/ca.c
1112
(void)proc_composev(&env->sc_ps, PROC_IKEV2, IMSG_CERTREQ,
sbin/iked/ca.c
112
struct iked *env = iked_env;
sbin/iked/ca.c
1124
(void)ca_validate_cert(env, NULL, x509, 0, NULL, NULL);
sbin/iked/ca.c
1127
if (!env->sc_certreqtype)
sbin/iked/ca.c
1128
env->sc_certreqtype = store->ca_pubkey.id_type;
sbin/iked/ca.c
1131
print_map(env->sc_certreqtype, ikev2_cert_map));
sbin/iked/ca.c
1133
iov[0].iov_base = &env->sc_certreqtype;
sbin/iked/ca.c
1134
iov[0].iov_len = sizeof(env->sc_certreqtype);
sbin/iked/ca.c
1137
(void)proc_composev(&env->sc_ps, PROC_IKEV2, IMSG_CERTREQ, iov, iovcnt);
sbin/iked/ca.c
127
env->sc_priv = store;
sbin/iked/ca.c
1293
ca_cert_local(struct iked *env, X509 *cert)
sbin/iked/ca.c
1295
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
134
struct iked *env = iked_env;
sbin/iked/ca.c
137
ibuf_free(env->sc_certreq);
sbin/iked/ca.c
138
if ((store = env->sc_priv) == NULL)
sbin/iked/ca.c
1382
ca_store_info(struct iked *env, struct imsg *imsg, const char *msg, X509_STORE *ctx)
sbin/iked/ca.c
1406
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ca.c
150
struct iked *env = iked_env;
sbin/iked/ca.c
151
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
1773
ca_validate_pubkey(struct iked *env, struct iked_static_id *id,
sbin/iked/ca.c
181
ca_reset(struct iked *env)
sbin/iked/ca.c
183
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
1871
ca_validate_cert(struct iked *env, struct iked_static_id *id,
sbin/iked/ca.c
1874
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
1910
ret = ca_validate_pubkey(env, id, pkey, 0, NULL);
sbin/iked/ca.c
1943
if (env->sc_cert_partial_chain)
sbin/iked/ca.c
204
if (ca_reload(env) != 0)
sbin/iked/ca.c
228
ca_decode_cert_bundle(struct iked *env, struct iked_sahdr *sh,
sbin/iked/ca.c
334
struct iked *env = iked_env;
sbin/iked/ca.c
344
proc_compose(&env->sc_ps, PROC_PARENT, imsg->hdr.type, NULL, 0);
sbin/iked/ca.c
351
ca_reset(env);
sbin/iked/ca.c
355
ocsp_receive_fd(env, imsg);
sbin/iked/ca.c
358
config_getocsp(env, imsg);
sbin/iked/ca.c
362
config_getkey(env, imsg);
sbin/iked/ca.c
365
config_getstatic(env, imsg);
sbin/iked/ca.c
377
struct iked *env = iked_env;
sbin/iked/ca.c
381
ca_getreq(env, imsg);
sbin/iked/ca.c
384
ca_getcert(env, imsg);
sbin/iked/ca.c
387
ca_getauth(env, imsg);
sbin/iked/ca.c
399
struct iked *env = iked_env;
sbin/iked/ca.c
400
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
404
ca_store_info(env, imsg, "CA", store->ca_cas);
sbin/iked/ca.c
405
ca_store_info(env, imsg, "CERT", store->ca_certs);
sbin/iked/ca.c
407
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ca.c
419
ca_setcert(struct iked *env, struct iked_sahdr *sh, struct iked_id *id,
sbin/iked/ca.c
457
if (proc_composev(&env->sc_ps, procid, IMSG_CERT, iov, iovcnt) == -1)
sbin/iked/ca.c
463
ca_setscert(struct iked *env, struct iked_sahdr *sh, uint8_t type, X509 *cert)
sbin/iked/ca.c
483
ret = proc_composev(&env->sc_ps, PROC_IKEV2, IMSG_SCERT, iov, iovcnt);
sbin/iked/ca.c
489
ca_setreq(struct iked *env, struct iked_sa *sa,
sbin/iked/ca.c
530
if (proc_composev(&env->sc_ps, procid, IMSG_CERTREQ, iov, iovcnt) == -1)
sbin/iked/ca.c
556
ca_setauth(struct iked *env, struct iked_sa *sa,
sbin/iked/ca.c
581
return (ikev2_msg_authsign(env, sa,
sbin/iked/ca.c
597
if (proc_composev(&env->sc_ps, id, IMSG_AUTH, iov, iovcnt) == -1)
sbin/iked/ca.c
603
ca_getcert(struct iked *env, struct imsg *imsg)
sbin/iked/ca.c
605
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
637
ca_decode_cert_bundle(env, &sh, &ptr, &len, &untrusted) == 0)
sbin/iked/ca.c
656
if (env->sc_ocsp_url == NULL)
sbin/iked/ca.c
657
ret = ca_validate_cert(env, &id, ptr, len, untrusted, NULL);
sbin/iked/ca.c
659
ret = ca_validate_cert(env, &id, ptr, len, untrusted, &issuer);
sbin/iked/ca.c
661
ret = ocsp_validate_cert(env, ptr, len, sh,
sbin/iked/ca.c
674
ret = ca_validate_pubkey(env, &id, ptr, len, NULL);
sbin/iked/ca.c
678
ret = ca_validate_pubkey(env, &id, NULL, 0, &key);
sbin/iked/ca.c
703
ret = proc_composev(&env->sc_ps, PROC_IKEV2, cmd, iov, iovcnt);
sbin/iked/ca.c
756
ca_getreq(struct iked *env, struct imsg *imsg)
sbin/iked/ca.c
758
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
832
if (!ca_cert_local(env, cert)) {
sbin/iked/ca.c
843
ca_setscert(env, &sh, type, chain[i - 2]);
sbin/iked/ca.c
900
ca_setcert(env, &sh, NULL, type,
sbin/iked/ca.c
908
ca_getauth(struct iked *env, struct imsg *imsg)
sbin/iked/ca.c
910
struct ca_store *store = env->sc_priv;
sbin/iked/ca.c
954
if (ikev2_msg_authsign(env, &sa, &policy.pol_auth, authmsg) != 0) {
sbin/iked/ca.c
959
ret = ca_setauth(env, &sa, sa.sa_localauth.id_buf, PROC_IKEV2);
sbin/iked/ca.c
969
ca_reload(struct iked *env)
sbin/iked/ca.c
971
struct ca_store *store = env->sc_priv;
sbin/iked/config.c
1004
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
1007
iov[0].iov_base = &env->sc_ocsp_tolerate;
sbin/iked/config.c
1008
iov[0].iov_len = sizeof(env->sc_ocsp_tolerate);
sbin/iked/config.c
1010
iov[1].iov_base = &env->sc_ocsp_maxage;
sbin/iked/config.c
1011
iov[1].iov_len = sizeof(env->sc_ocsp_maxage);
sbin/iked/config.c
1013
if (env->sc_ocsp_url) {
sbin/iked/config.c
1014
iov[2].iov_base = env->sc_ocsp_url;
sbin/iked/config.c
1015
iov[2].iov_len = strlen(env->sc_ocsp_url);
sbin/iked/config.c
1018
return (proc_composev(&env->sc_ps, PROC_CERT, IMSG_OCSP_CFG,
sbin/iked/config.c
1023
config_getocsp(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1028
free(env->sc_ocsp_url);
sbin/iked/config.c
1033
need = sizeof(env->sc_ocsp_tolerate);
sbin/iked/config.c
1036
memcpy(&env->sc_ocsp_tolerate, ptr, need);
sbin/iked/config.c
1041
need = sizeof(env->sc_ocsp_maxage);
sbin/iked/config.c
1044
memcpy(&env->sc_ocsp_maxage, ptr, need);
sbin/iked/config.c
1050
env->sc_ocsp_url = get_string(ptr, have);
sbin/iked/config.c
1052
env->sc_ocsp_url = NULL;
sbin/iked/config.c
1054
env->sc_ocsp_url ? env->sc_ocsp_url : "none",
sbin/iked/config.c
1055
env->sc_ocsp_tolerate, env->sc_ocsp_maxage);
sbin/iked/config.c
1060
config_setkeys(struct iked *env)
sbin/iked/config.c
1097
if (proc_composev(&env->sc_ps, PROC_CERT, IMSG_PRIVKEY, iov, 2) == -1) {
sbin/iked/config.c
1107
if (proc_composev(&env->sc_ps, PROC_CERT, IMSG_PUBKEY, iov, 2) == -1) {
sbin/iked/config.c
112
config_free_sa(struct iked *env, struct iked_sa *sa)
sbin/iked/config.c
1125
config_getkey(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1140
ca_getkey(&env->sc_ps, &id, imsg->hdr.type);
sbin/iked/config.c
1146
config_setradauth(struct iked *env)
sbin/iked/config.c
1148
proc_compose(&env->sc_ps, PROC_IKEV2, IMSG_CFG_RADAUTH,
sbin/iked/config.c
1149
&env->sc_radauth, sizeof(env->sc_radauth));
sbin/iked/config.c
1154
config_getradauth(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1159
memcpy(&env->sc_radauth, imsg->data, sizeof(struct iked_radopts));
sbin/iked/config.c
116
timer_del(env, &sa->sa_timer);
sbin/iked/config.c
1165
config_setradacct(struct iked *env)
sbin/iked/config.c
1167
proc_compose(&env->sc_ps, PROC_IKEV2, IMSG_CFG_RADACCT,
sbin/iked/config.c
1168
&env->sc_radacct, sizeof(env->sc_radacct));
sbin/iked/config.c
117
timer_del(env, &sa->sa_keepalive);
sbin/iked/config.c
1173
config_getradacct(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1178
memcpy(&env->sc_radacct, imsg->data, sizeof(struct iked_radopts));
sbin/iked/config.c
118
timer_del(env, &sa->sa_rekey);
sbin/iked/config.c
1184
config_setradserver(struct iked *env, struct sockaddr *sa, socklen_t salen,
sbin/iked/config.c
1191
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
1209
proc_composev_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADSERVER, -1,
sbin/iked/config.c
122
config_free_childsas(env, &sa->sa_childsas, NULL, NULL);
sbin/iked/config.c
1220
config_getradserver(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
123
sa_configure_iface(env, sa, 0);
sbin/iked/config.c
1237
server->rs_env = env;
sbin/iked/config.c
124
sa_free_flows(env, &sa->sa_flows);
sbin/iked/config.c
1240
TAILQ_INSERT_TAIL(&env->sc_radauthservers, server, rs_entry);
sbin/iked/config.c
1242
TAILQ_INSERT_TAIL(&env->sc_radacctservers, server, rs_entry);
sbin/iked/config.c
1251
config_setradcfgmap(struct iked *env, int cfg_type, uint32_t vendor_id,
sbin/iked/config.c
1256
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
126
iked_radius_acct_stop(env, sa);
sbin/iked/config.c
1263
proc_compose_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADCFGMAP, -1,
sbin/iked/config.c
1270
config_getradcfgmap(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1281
if (TAILQ_EMPTY(&env->sc_radcfgmaps)) {
sbin/iked/config.c
129
(void)RB_REMOVE(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/config.c
1295
TAILQ_CONCAT(&env->sc_radcfgmaps, &cfgmaps, entry);
sbin/iked/config.c
1299
TAILQ_FOREACH(cfgmap, &env->sc_radcfgmaps, entry) {
sbin/iked/config.c
1313
TAILQ_INSERT_TAIL(&env->sc_radcfgmaps, cfgmap, entry);
sbin/iked/config.c
1319
config_setraddae(struct iked *env, struct sockaddr *sa, socklen_t salen)
sbin/iked/config.c
1324
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
133
(void)RB_REMOVE(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/config.c
1344
proc_compose_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADDAE, -1,
sbin/iked/config.c
1355
config_getraddae(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1368
dae->rd_env = env;
sbin/iked/config.c
1374
TAILQ_INSERT_TAIL(&env->sc_raddaes, dae, rd_entry);
sbin/iked/config.c
1380
config_setradclient(struct iked *env, struct sockaddr *sa, socklen_t salen,
sbin/iked/config.c
139
policy_unref(env, sa->sa_policy);
sbin/iked/config.c
1396
proc_composev_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_CFG_RADDAECLIENT,
sbin/iked/config.c
1403
config_getradclient(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
1419
TAILQ_INSERT_TAIL(&env->sc_raddaeclients, client, rc_entry);
sbin/iked/config.c
142
ikev2_msg_flushqueue(env, &sa->sa_requests);
sbin/iked/config.c
143
ikev2_msg_flushqueue(env, &sa->sa_responses);
sbin/iked/config.c
190
ikestat_dec(env, ikes_sa_established_current);
sbin/iked/config.c
191
ikestat_inc(env, ikes_sa_removed);
sbin/iked/config.c
195
iked_radius_request_free(env, sa->sa_radreq);
sbin/iked/config.c
201
config_new_policy(struct iked *env)
sbin/iked/config.c
219
config_free_policy(struct iked *env, struct iked_policy *pol)
sbin/iked/config.c
233
TAILQ_REMOVE(&env->sc_policies, pol, pol_entry);
sbin/iked/config.c
237
policy_ref(env, pol);
sbin/iked/config.c
256
config_free_flows(env, &pol->pol_flows);
sbin/iked/config.c
309
config_free_flows(struct iked *env, struct iked_flows *head)
sbin/iked/config.c
321
config_free_childsas(struct iked *env, struct iked_childsas *head,
sbin/iked/config.c
344
RB_REMOVE(iked_activesas, &env->sc_activesas, csa);
sbin/iked/config.c
345
(void)pfkey_sa_delete(env, csa);
sbin/iked/config.c
350
(void)pfkey_sa_delete(env, ipcomp);
sbin/iked/config.c
354
ikestat_inc(env, ikes_csa_removed);
sbin/iked/config.c
40
config_new_sa(struct iked *env, int initiator)
sbin/iked/config.c
467
config_new_user(struct iked *env, struct iked_user *new)
sbin/iked/config.c
476
if ((old = RB_INSERT(iked_users, &env->sc_users, usr)) != NULL) {
sbin/iked/config.c
495
config_setcoupled(struct iked *env, unsigned int couple)
sbin/iked/config.c
500
proc_compose(&env->sc_ps, PROC_IKEV2, type, NULL, 0);
sbin/iked/config.c
506
config_getcoupled(struct iked *env, unsigned int type)
sbin/iked/config.c
508
return (pfkey_couple(env, &env->sc_sas,
sbin/iked/config.c
513
config_setmode(struct iked *env, unsigned int passive)
sbin/iked/config.c
524
proc_compose(&env->sc_ps, PROC_CERT, type, NULL, 0);
sbin/iked/config.c
530
config_getmode(struct iked *env, unsigned int type)
sbin/iked/config.c
535
old = env->sc_passive ? 1 : 0;
sbin/iked/config.c
536
env->sc_passive = type == IMSG_CTL_PASSIVE ? 1 : 0;
sbin/iked/config.c
538
if (old == env->sc_passive)
sbin/iked/config.c
542
mode[old], mode[env->sc_passive]);
sbin/iked/config.c
548
config_setreset(struct iked *env, unsigned int mode, enum privsep_procid id)
sbin/iked/config.c
550
proc_compose(&env->sc_ps, id, IMSG_CTL_RESET, &mode, sizeof(mode));
sbin/iked/config.c
555
config_getreset(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
562
return (config_doreset(env, mode));
sbin/iked/config.c
566
config_doreset(struct iked *env, unsigned int mode)
sbin/iked/config.c
574
TAILQ_FOREACH_SAFE(pol, &env->sc_policies, pol_entry, poltmp) {
sbin/iked/config.c
575
config_free_policy(env, pol);
sbin/iked/config.c
581
while ((sa = RB_MIN(iked_sas, &env->sc_sas))) {
sbin/iked/config.c
584
ikev2_ike_sa_delete(env, sa) != 0) {
sbin/iked/config.c
585
RB_REMOVE(iked_sas, &env->sc_sas, sa);
sbin/iked/config.c
587
sa_dstid_remove(env, sa);
sbin/iked/config.c
588
config_free_sa(env, sa);
sbin/iked/config.c
595
while ((usr = RB_MIN(iked_users, &env->sc_users))) {
sbin/iked/config.c
596
RB_REMOVE(iked_users, &env->sc_users, usr);
sbin/iked/config.c
608
TAILQ_FOREACH_SAFE(rad, &env->sc_radauthservers, rs_entry,
sbin/iked/config.c
612
TAILQ_REMOVE(&env->sc_radauthservers, rad, rs_entry);
sbin/iked/config.c
614
iked_radius_request_free(env, req);
sbin/iked/config.c
617
TAILQ_FOREACH_SAFE(rad, &env->sc_radacctservers, rs_entry,
sbin/iked/config.c
621
TAILQ_REMOVE(&env->sc_radacctservers, rad, rs_entry);
sbin/iked/config.c
623
iked_radius_request_free(env, req);
sbin/iked/config.c
626
TAILQ_FOREACH_SAFE(cfg, &env->sc_radcfgmaps, entry, cfgt) {
sbin/iked/config.c
627
TAILQ_REMOVE(&env->sc_radcfgmaps, cfg, entry);
sbin/iked/config.c
63
ikestat_inc(env, ikes_sa_created);
sbin/iked/config.c
630
TAILQ_FOREACH_SAFE(dae, &env->sc_raddaes, rd_entry, daet) {
sbin/iked/config.c
633
TAILQ_REMOVE(&env->sc_raddaes, dae, rd_entry);
sbin/iked/config.c
636
TAILQ_FOREACH_SAFE(client, &env->sc_raddaeclients, rc_entry,
sbin/iked/config.c
638
TAILQ_REMOVE(&env->sc_raddaeclients, client, rc_entry);
sbin/iked/config.c
651
config_setsocket(struct iked *env, struct sockaddr_storage *ss,
sbin/iked/config.c
658
proc_compose_imsg(&env->sc_ps, id, -1,
sbin/iked/config.c
664
config_getsocket(struct iked *env, struct imsg *imsg,
sbin/iked/config.c
676
sock->sock_env = env;
sbin/iked/config.c
682
sock0 = &env->sc_sock4[0];
sbin/iked/config.c
683
sock1 = &env->sc_sock4[1];
sbin/iked/config.c
686
sock0 = &env->sc_sock6[0];
sbin/iked/config.c
687
sock1 = &env->sc_sock6[1];
sbin/iked/config.c
708
config_enablesocket(struct iked *env)
sbin/iked/config.c
713
for (i = 0; i < nitems(env->sc_sock4); i++)
sbin/iked/config.c
714
if ((sock = env->sc_sock4[i]) != NULL)
sbin/iked/config.c
716
for (i = 0; i < nitems(env->sc_sock6); i++)
sbin/iked/config.c
717
if ((sock = env->sc_sock6[i]) != NULL)
sbin/iked/config.c
722
config_setpfkey(struct iked *env)
sbin/iked/config.c
726
if ((s = pfkey_socket(env)) == -1)
sbin/iked/config.c
728
proc_compose_imsg(&env->sc_ps, PROC_IKEV2, -1,
sbin/iked/config.c
734
config_getpfkey(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
739
pfkey_init(env, fd);
sbin/iked/config.c
744
config_setuser(struct iked *env, struct iked_user *usr, enum privsep_procid id)
sbin/iked/config.c
746
if (env->sc_opts & IKED_OPT_NOACTION) {
sbin/iked/config.c
751
proc_compose(&env->sc_ps, id, IMSG_CFG_USER, usr, sizeof(*usr));
sbin/iked/config.c
756
config_getuser(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
764
if (config_new_user(env, &usr) != NULL) {
sbin/iked/config.c
774
config_setpolicy(struct iked *env, struct iked_policy *pol,
sbin/iked/config.c
809
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
812
if (proc_composev(&env->sc_ps, id, IMSG_CFG_POLICY, iov,
sbin/iked/config.c
822
config_setflow(struct iked *env, struct iked_policy *pol,
sbin/iked/config.c
828
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
837
if (proc_composev(&env->sc_ps, id, IMSG_CFG_FLOW,
sbin/iked/config.c
848
config_getpolicy(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
894
TAILQ_INSERT_TAIL(&env->sc_policies, pol, pol_entry);
sbin/iked/config.c
898
if (env->sc_defaultcon != NULL)
sbin/iked/config.c
899
config_free_policy(env, env->sc_defaultcon);
sbin/iked/config.c
900
env->sc_defaultcon = pol;
sbin/iked/config.c
907
config_getflow(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
921
TAILQ_FOREACH(pol, &env->sc_policies, pol_entry) {
sbin/iked/config.c
946
config_setcompile(struct iked *env, enum privsep_procid id)
sbin/iked/config.c
948
if (env->sc_opts & IKED_OPT_NOACTION)
sbin/iked/config.c
951
proc_compose(&env->sc_ps, id, IMSG_COMPILE, NULL, 0);
sbin/iked/config.c
956
config_getcompile(struct iked *env)
sbin/iked/config.c
962
policy_calc_skip_steps(&env->sc_policies);
sbin/iked/config.c
969
config_setstatic(struct iked *env)
sbin/iked/config.c
971
proc_compose(&env->sc_ps, PROC_IKEV2, IMSG_CTL_STATIC,
sbin/iked/config.c
972
&env->sc_static, sizeof(env->sc_static));
sbin/iked/config.c
973
proc_compose(&env->sc_ps, PROC_CERT, IMSG_CTL_STATIC,
sbin/iked/config.c
974
&env->sc_static, sizeof(env->sc_static));
sbin/iked/config.c
979
config_getstatic(struct iked *env, struct imsg *imsg)
sbin/iked/config.c
981
IMSG_SIZE_CHECK(imsg, &env->sc_static);
sbin/iked/config.c
982
memcpy(&env->sc_static, imsg->data, sizeof(env->sc_static));
sbin/iked/config.c
984
log_debug("%s: dpd_check_interval %llu", __func__, env->sc_alive_timeout);
sbin/iked/config.c
986
env->sc_enforcesingleikesa ? "" : "no ");
sbin/iked/config.c
987
log_debug("%s: %sfragmentation", __func__, env->sc_frag ? "" : "no ");
sbin/iked/config.c
988
log_debug("%s: %smobike", __func__, env->sc_mobike ? "" : "no ");
sbin/iked/config.c
989
log_debug("%s: nattport %u", __func__, env->sc_nattport);
sbin/iked/config.c
991
env->sc_stickyaddress ? "" : "no ");
sbin/iked/config.c
993
ikev2_reset_alive_timer(env);
sbin/iked/config.c
999
config_setocsp(struct iked *env)
sbin/iked/control.c
132
cs->cs_env = env;
sbin/iked/control.c
258
struct iked *env = cs->cs_env;
sbin/iked/control.c
313
proc_forward_imsg(&env->sc_ps, &imsg, PROC_PARENT, -1);
sbin/iked/control.c
321
proc_forward_imsg(&env->sc_ps, &imsg, PROC_PARENT, -1);
sbin/iked/control.c
324
proc_forward_imsg(&env->sc_ps, &imsg, PROC_IKEV2, -1);
sbin/iked/control.c
328
proc_forward_imsg(&env->sc_ps, &imsg, PROC_IKEV2, -1);
sbin/iked/control.c
331
proc_forward_imsg(&env->sc_ps, &imsg, PROC_CERT, -1);
sbin/iked/control.c
80
struct iked *env = iked_env;
sbin/iked/eap.c
181
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/eap.c
189
eap_challenge_request(struct iked *env, struct iked_sa *sa,
sbin/iked/eap.c
235
ret = ikev2_send_ike_e(env, sa, e,
sbin/iked/eap.c
243
eap_message_send(struct iked *env, struct iked_sa *sa, int eap_code, int eap_id)
sbin/iked/eap.c
258
ret = ikev2_send_ike_e(env, sa, e,
sbin/iked/eap.c
266
eap_success(struct iked *env, struct iked_sa *sa, int eap_id)
sbin/iked/eap.c
268
return (eap_message_send(env, sa, EAP_CODE_SUCCESS, eap_id));
sbin/iked/eap.c
272
eap_mschap_challenge(struct iked *env, struct iked_sa *sa, int eap_id,
sbin/iked/eap.c
305
ret = ikev2_send_ike_e(env, sa, eapmsg,
sbin/iked/eap.c
313
eap_mschap_success(struct iked *env, struct iked_sa *sa, int eap_id)
sbin/iked/eap.c
332
ret = ikev2_send_ike_e(env, sa, eapmsg,
sbin/iked/eap.c
340
eap_mschap(struct iked *env, const struct iked_sa *sa,
sbin/iked/eap.c
414
eap_parse(struct iked *env, const struct iked_sa *sa, struct iked_message *msg,
sbin/iked/eap.c
584
return (eap_mschap(env, sa, msg, eap));
sbin/iked/eap.c
89
eap_identity_request(struct iked *env, struct iked_sa *sa)
sbin/iked/iked.c
164
if ((env = calloc(1, sizeof(*env))) == NULL)
sbin/iked/iked.c
167
iked_env = env;
sbin/iked/iked.c
168
env->sc_opts = opts;
sbin/iked/iked.c
169
env->sc_nattmode = natt_mode;
sbin/iked/iked.c
170
env->sc_nattport = port;
sbin/iked/iked.c
172
ps = &env->sc_ps;
sbin/iked/iked.c
173
ps->ps_env = env;
sbin/iked/iked.c
175
if (strlcpy(env->sc_conffile, conffile, PATH_MAX) >= PATH_MAX)
sbin/iked/iked.c
179
policy_init(env);
sbin/iked/iked.c
224
vroute_init(env);
sbin/iked/iked.c
231
parent_shutdown(env);
sbin/iked/iked.c
239
struct iked *env = ps->ps_env;
sbin/iked/iked.c
241
if (parent_configure(env) == -1)
sbin/iked/iked.c
246
parent_configure(struct iked *env)
sbin/iked/iked.c
250
if (parse_config(env->sc_conffile, env) == -1) {
sbin/iked/iked.c
251
proc_kill(&env->sc_ps);
sbin/iked/iked.c
255
if (env->sc_opts & IKED_OPT_NOACTION) {
sbin/iked/iked.c
257
proc_kill(&env->sc_ps);
sbin/iked/iked.c
261
env->sc_pfkey = -1;
sbin/iked/iked.c
262
config_setpfkey(env);
sbin/iked/iked.c
265
if (config_setkeys(env) == -1)
sbin/iked/iked.c
267
config_setreset(env, RESET_CA, PROC_CERT);
sbin/iked/iked.c
270
config_setcompile(env, PROC_IKEV2);
sbin/iked/iked.c
276
if (env->sc_nattmode != NATT_FORCE)
sbin/iked/iked.c
277
config_setsocket(env, &ss, htons(IKED_IKE_PORT), PROC_IKEV2);
sbin/iked/iked.c
278
if (env->sc_nattmode != NATT_DISABLE)
sbin/iked/iked.c
279
config_setsocket(env, &ss, htons(env->sc_nattport), PROC_IKEV2);
sbin/iked/iked.c
284
if (env->sc_nattmode != NATT_FORCE)
sbin/iked/iked.c
285
config_setsocket(env, &ss, htons(IKED_IKE_PORT), PROC_IKEV2);
sbin/iked/iked.c
286
if (env->sc_nattmode != NATT_DISABLE)
sbin/iked/iked.c
287
config_setsocket(env, &ss, htons(env->sc_nattport), PROC_IKEV2);
sbin/iked/iked.c
308
config_setstatic(env);
sbin/iked/iked.c
309
config_setcoupled(env, env->sc_decoupled ? 0 : 1);
sbin/iked/iked.c
310
config_setocsp(env);
sbin/iked/iked.c
311
config_setradauth(env);
sbin/iked/iked.c
312
config_setradacct(env);
sbin/iked/iked.c
314
config_setmode(env, env->sc_passive ? 1 : 0);
sbin/iked/iked.c
320
parent_reload(struct iked *env, int reset, const char *filename)
sbin/iked/iked.c
324
filename = env->sc_conffile;
sbin/iked/iked.c
329
config_setreset(env, RESET_POLICY, PROC_IKEV2);
sbin/iked/iked.c
330
config_setreset(env, RESET_RADIUS, PROC_IKEV2);
sbin/iked/iked.c
331
if (config_setkeys(env) == -1)
sbin/iked/iked.c
333
config_setreset(env, RESET_CA, PROC_CERT);
sbin/iked/iked.c
335
if (parse_config(filename, env) == -1) {
sbin/iked/iked.c
341
config_setcompile(env, PROC_IKEV2);
sbin/iked/iked.c
343
config_setstatic(env);
sbin/iked/iked.c
344
config_setcoupled(env, env->sc_decoupled ? 0 : 1);
sbin/iked/iked.c
345
config_setocsp(env);
sbin/iked/iked.c
347
config_setmode(env, env->sc_passive ? 1 : 0);
sbin/iked/iked.c
349
config_setreset(env, reset, PROC_IKEV2);
sbin/iked/iked.c
350
config_setreset(env, reset, PROC_CERT);
sbin/iked/iked.c
432
struct iked *env = iked_env;
sbin/iked/iked.c
437
proc_forward_imsg(&env->sc_ps, imsg, PROC_IKEV2, -1);
sbin/iked/iked.c
440
ocsp_connect(env, imsg);
sbin/iked/iked.c
452
struct iked *env = iked_env;
sbin/iked/iked.c
461
parent_reload(env, v, NULL);
sbin/iked/iked.c
467
proc_compose(&env->sc_ps, PROC_IKEV2, type, NULL, 0);
sbin/iked/iked.c
472
parent_reload(env, 0, str);
sbin/iked/iked.c
476
proc_forward_imsg(&env->sc_ps, imsg, PROC_IKEV2, -1);
sbin/iked/iked.c
477
proc_forward_imsg(&env->sc_ps, imsg, PROC_CERT, -1);
sbin/iked/iked.c
491
struct iked *env = iked_env;
sbin/iked/iked.c
496
return (vroute_getaddr(env, imsg));
sbin/iked/iked.c
499
return (vroute_getdns(env, imsg));
sbin/iked/iked.c
502
return (vroute_getroute(env, imsg));
sbin/iked/iked.c
504
return (vroute_getcloneroute(env, imsg));
sbin/iked/iked.c
513
parent_shutdown(struct iked *env)
sbin/iked/iked.c
515
proc_kill(&env->sc_ps);
sbin/iked/iked.c
517
vroute_cleanup(env);
sbin/iked/iked.c
518
free(env->sc_vroute);
sbin/iked/iked.c
519
free(env);
sbin/iked/iked.c
80
struct iked *env = NULL;
sbin/iked/iked.h
1022
int config_getsocket(struct iked *env, struct imsg *,
sbin/iked/iked.h
1024
void config_enablesocket(struct iked *env);
sbin/iked/iked.h
1170
void ikev2_ike_sa_timeout(struct iked *env, void *);
sbin/iked/iked.h
591
#define ikestat_add(env, c, n) do { env->sc_stats.c += (n); } while(0)
sbin/iked/iked.h
592
#define ikestat_inc(env, c) ikestat_add(env, c, 1)
sbin/iked/iked.h
593
#define ikestat_dec(env, c) ikestat_add(env, c, -1)
sbin/iked/ikev2.c
1001
if (ikev2_handle_certreq(env, msg) != 0)
sbin/iked/ikev2.c
1008
if (policy_lookup(env, msg, &sa->sa_proposals, &old->pol_flows,
sbin/iked/ikev2.c
1017
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
1019
policy_unref(env, old);
sbin/iked/ikev2.c
1035
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
1044
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
1051
ca_setauth(env, sa, authmsg, PROC_CERT);
sbin/iked/ikev2.c
1086
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
1117
ikev2_auth_verify(env, sa);
sbin/iked/ikev2.c
1126
if (ca_setcert(env, &sa->sa_hdr, id, certtype, cert, certlen, PROC_CERT) == -1)
sbin/iked/ikev2.c
1142
return ikev2_ike_auth(env, sa);
sbin/iked/ikev2.c
1146
ikev2_ike_auth(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1150
sa_state(env, sa, IKEV2_STATE_EAP_VALID);
sbin/iked/ikev2.c
1152
sa_state(env, sa, IKEV2_STATE_VALID);
sbin/iked/ikev2.c
1156
return (ikev2_init_done(env, sa));
sbin/iked/ikev2.c
1161
return (ikev2_init_ike_auth(env, sa));
sbin/iked/ikev2.c
1163
return (ikev2_resp_ike_auth(env, sa));
sbin/iked/ikev2.c
1167
ikev2_init_recv(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
1173
if (ikev2_msg_valid_ike_sa(env, hdr, msg) == -1) {
sbin/iked/ikev2.c
1182
if ((sa = sa_new(env,
sbin/iked/ikev2.c
1188
sa_free(env, sa);
sbin/iked/ikev2.c
1203
if (ikev2_pld_parse(env, hdr, msg, msg->msg_offset) != 0) {
sbin/iked/ikev2.c
1212
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
1225
if (ikev2_handle_notifies(env, msg) != 0)
sbin/iked/ikev2.c
1229
ikev2_enable_natt(env, sa, msg, 1);
sbin/iked/ikev2.c
1235
if (ikev2_init_ike_sa_peer(env, pol,
sbin/iked/ikev2.c
1246
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1250
if (ikev2_handle_certreq(env, msg) != 0)
sbin/iked/ikev2.c
1253
if (ikev2_init_auth(env, msg) != 0) {
sbin/iked/ikev2.c
1256
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1270
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1278
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1283
(void)ikev2_ike_auth_recv(env, sa, msg);
sbin/iked/ikev2.c
1290
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
1294
(void)ikev2_init_create_child_sa(env, msg);
sbin/iked/ikev2.c
1307
ikev2_enable_natt(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
1313
sock = ikev2_msg_getsocket(env, sa->sa_local.addr_af, 1);
sbin/iked/ikev2.c
1340
ikev2_init_ike_sa(struct iked *env, void *arg)
sbin/iked/ikev2.c
1344
TAILQ_FOREACH(pol, &env->sc_policies, pol_entry) {
sbin/iked/ikev2.c
1355
if (ikev2_init_ike_sa_peer(env, pol, &pol->pol_peer, NULL))
sbin/iked/ikev2.c
1360
timer_set(env, &env->sc_inittmr, ikev2_init_ike_sa, NULL);
sbin/iked/ikev2.c
1361
timer_add(env, &env->sc_inittmr, IKED_INITIATOR_INTERVAL);
sbin/iked/ikev2.c
1365
ikev2_init_ike_sa_timeout(struct iked *env, void *arg)
sbin/iked/ikev2.c
1374
sa_free(env, sa);
sbin/iked/ikev2.c
1378
ikev2_init_ike_sa_peer(struct iked *env, struct iked_policy *pol,
sbin/iked/ikev2.c
1395
if ((sock = ikev2_msg_getsocket(env, peer->addr_af, 0)) == NULL)
sbin/iked/ikev2.c
1401
sa_state(env, sa, IKEV2_STATE_INIT);
sbin/iked/ikev2.c
1406
(sa = sa_new(env, 0, 0, 1, pol)) == NULL)
sbin/iked/ikev2.c
1418
if (ikev2_sa_initiator(env, sa, NULL, NULL) == -1)
sbin/iked/ikev2.c
1427
if ((buf = ikev2_msg_init(env, &req, &peer->addr, peer->addr.ss_len,
sbin/iked/ikev2.c
1439
req.msg_msgid = ikev2_msg_id(env, sa);
sbin/iked/ikev2.c
1471
if ((len = ikev2_add_proposals(env, sa, buf, &pol->pol_proposals,
sbin/iked/ikev2.c
1502
if (env->sc_vendorid != 0) {
sbin/iked/ikev2.c
1511
if (env->sc_frag) {
sbin/iked/ikev2.c
1517
if (env->sc_nattmode != NATT_DISABLE) {
sbin/iked/ikev2.c
1518
if (ntohs(port) == env->sc_nattport) {
sbin/iked/ikev2.c
1523
if ((len = ikev2_add_nat_detection(env, buf, &pld, &req, len))
sbin/iked/ikev2.c
1537
(void)ikev2_pld_parse(env, hdr, &req, 0);
sbin/iked/ikev2.c
1545
if ((ret = ikev2_msg_send(env, &req)) == 0)
sbin/iked/ikev2.c
1546
sa_state(env, sa, IKEV2_STATE_SA_INIT);
sbin/iked/ikev2.c
1549
timer_set(env, &sa->sa_timer, ikev2_init_ike_sa_timeout, sa);
sbin/iked/ikev2.c
1550
timer_add(env, &sa->sa_timer, IKED_IKE_SA_EXCHANGE_TIMEOUT);
sbin/iked/ikev2.c
1553
ikev2_msg_cleanup(env, &req);
sbin/iked/ikev2.c
1558
sa_free(env, sa);
sbin/iked/ikev2.c
1566
ikev2_init_auth(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
1574
if (ikev2_sa_initiator(env, sa, NULL, msg) == -1) {
sbin/iked/ikev2.c
1579
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
1585
if (ca_setauth(env, sa, authmsg, PROC_CERT) == -1) {
sbin/iked/ikev2.c
1592
return (ikev2_init_ike_auth(env, sa));
sbin/iked/ikev2.c
1596
ikev2_init_ike_auth(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1681
len, env->sc_certreq, env->sc_certreqtype)) == -1)
sbin/iked/ikev2.c
1684
if (env->sc_certreqtype != pol->pol_certreqtype &&
sbin/iked/ikev2.c
1709
if ((len = ikev2_init_add_cp(env, sa, e)) == -1)
sbin/iked/ikev2.c
1714
(len = ikev2_add_ipcompnotify(env, e, &pld, len, sa, 1)) == -1)
sbin/iked/ikev2.c
1717
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
1726
if ((len = ikev2_add_proposals(env, sa, e, &pol->pol_proposals, 0,
sbin/iked/ikev2.c
1736
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
1747
ikev2_enable_timer(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1750
timer_set(env, &sa->sa_timer, ikev2_ike_sa_alive, sa);
sbin/iked/ikev2.c
1751
if (env->sc_alive_timeout > 0)
sbin/iked/ikev2.c
1752
timer_add(env, &sa->sa_timer, env->sc_alive_timeout);
sbin/iked/ikev2.c
1753
timer_set(env, &sa->sa_keepalive, ikev2_ike_sa_keepalive, sa);
sbin/iked/ikev2.c
1755
timer_add(env, &sa->sa_keepalive,
sbin/iked/ikev2.c
1757
timer_set(env, &sa->sa_rekey, ikev2_ike_sa_rekey, sa);
sbin/iked/ikev2.c
1759
ikev2_ike_sa_rekey_schedule(env, sa);
sbin/iked/ikev2.c
1763
ikev2_reset_alive_timer(struct iked *env)
sbin/iked/ikev2.c
1767
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/ikev2.c
1770
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
1771
if (env->sc_alive_timeout > 0)
sbin/iked/ikev2.c
1772
timer_add(env, &sa->sa_timer, env->sc_alive_timeout);
sbin/iked/ikev2.c
1777
ikev2_disable_timer(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1779
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
1780
timer_del(env, &sa->sa_keepalive);
sbin/iked/ikev2.c
1781
timer_del(env, &sa->sa_rekey);
sbin/iked/ikev2.c
1785
ikev2_init_done(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
1792
ret = ikev2_childsa_negotiate(env, sa, &sa->sa_kex, &sa->sa_proposals,
sbin/iked/ikev2.c
1795
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
1797
sa_state(env, sa, IKEV2_STATE_ESTABLISHED);
sbin/iked/ikev2.c
1798
iked_radius_acct_start(env, sa);
sbin/iked/ikev2.c
1800
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
1801
ikev2_enable_timer(env, sa);
sbin/iked/ikev2.c
1803
ikev2_record_dstid(env, sa);
sbin/iked/ikev2.c
1804
sa_configure_iface(env, sa, 1);
sbin/iked/ikev2.c
1808
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
2142
ikev2_add_ipcompnotify(struct iked *env, struct ibuf *e,
sbin/iked/ikev2.c
2164
if (pfkey_sa_init(env, &csa, &spi) == -1)
sbin/iked/ikev2.c
227
struct iked *env = iked_env;
sbin/iked/ikev2.c
229
ibuf_free(env->sc_certreq);
sbin/iked/ikev2.c
2294
ikev2_add_transport_mode(struct iked *env, struct ibuf *e,
sbin/iked/ikev2.c
230
env->sc_certreq = NULL;
sbin/iked/ikev2.c
231
config_doreset(env, RESET_ALL);
sbin/iked/ikev2.c
2321
ikev2_nat_detection(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
237
struct iked *env = iked_env;
sbin/iked/ikev2.c
2404
if (env->sc_nattmode == NATT_FORCE)
sbin/iked/ikev2.c
243
return (config_getreset(env, imsg));
sbin/iked/ikev2.c
2431
ikev2_add_nat_detection(struct iked *env, struct ibuf *buf,
sbin/iked/ikev2.c
2448
len = ikev2_nat_detection(env, msg, NULL, 0, 0, 0);
sbin/iked/ikev2.c
2451
if ((len = ikev2_nat_detection(env, msg, ptr, len,
sbin/iked/ikev2.c
246
return (config_getcoupled(env, imsg->hdr.type));
sbin/iked/ikev2.c
2464
len = ikev2_nat_detection(env, msg, NULL, 0, 0, 0);
sbin/iked/ikev2.c
2467
if ((len = ikev2_nat_detection(env, msg, ptr, len,
sbin/iked/ikev2.c
2475
ikev2_add_cp(struct iked *env, struct iked_sa *sa, int type, struct ibuf *buf)
sbin/iked/ikev2.c
249
if (config_getmode(env, imsg->hdr.type) == -1)
sbin/iked/ikev2.c
251
config_enablesocket(env);
sbin/iked/ikev2.c
252
timer_del(env, &env->sc_inittmr);
sbin/iked/ikev2.c
253
TAILQ_FOREACH(pol, &env->sc_policies, pol_entry) {
sbin/iked/ikev2.c
258
RB_FOREACH_SAFE(sa, iked_sas, &env->sc_sas, satmp) {
sbin/iked/ikev2.c
260
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
262
sa_free(env, sa);
sbin/iked/ikev2.c
2639
ikev2_init_add_cp(struct iked *env, struct iked_sa *sa, struct ibuf *buf)
sbin/iked/ikev2.c
2641
return (ikev2_add_cp(env, sa, IKEV2_CP_REQUEST, buf));
sbin/iked/ikev2.c
2645
ikev2_resp_add_cp(struct iked *env, struct iked_sa *sa, struct ibuf *buf)
sbin/iked/ikev2.c
2651
ret = ikev2_add_cp(env, sa, IKEV2_CP_REPLY, buf);
sbin/iked/ikev2.c
2664
ikev2_add_proposals(struct iked *env, struct iked_sa *sa, struct ibuf *buf,
sbin/iked/ikev2.c
267
if (policy_lookup_sa(env, sa) == -1) {
sbin/iked/ikev2.c
2693
if (pfkey_sa_init(env, &csa, &spi) == -1)
sbin/iked/ikev2.c
271
ikev2_ikesa_delete(env, sa, sa->sa_hdr.sh_initiator);
sbin/iked/ikev2.c
276
policy_unref(env, old);
sbin/iked/ikev2.c
277
policy_ref(env, sa->sa_policy);
sbin/iked/ikev2.c
281
if (!env->sc_passive) {
sbin/iked/ikev2.c
282
timer_set(env, &env->sc_inittmr, ikev2_init_ike_sa,
sbin/iked/ikev2.c
284
timer_add(env, &env->sc_inittmr,
sbin/iked/ikev2.c
2859
ikev2_resp_informational(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
287
iked_radius_acct_on(env);
sbin/iked/ikev2.c
2876
if ((len = ikev2_handle_delete(env, msg, buf, &pld,
sbin/iked/ikev2.c
2887
len = ikev2_add_nat_detection(env, buf, &pld, msg, len);
sbin/iked/ikev2.c
290
return (config_getsocket(env, imsg, ikev2_msg_cb));
sbin/iked/ikev2.c
2917
ret = ikev2_msg_send_encrypt(env, sa, &buf,
sbin/iked/ikev2.c
292
return (config_getpfkey(env, imsg));
sbin/iked/ikev2.c
2928
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
2936
ikev2_resp_recv(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
294
return (config_getpolicy(env, imsg));
sbin/iked/ikev2.c
2947
if ((msg->msg_sa = sa_new(env,
sbin/iked/ikev2.c
2954
timer_set(env, &msg->msg_sa->sa_timer,
sbin/iked/ikev2.c
2956
timer_add(env, &msg->msg_sa->sa_timer,
sbin/iked/ikev2.c
296
return (config_getflow(env, imsg));
sbin/iked/ikev2.c
2960
if (ikev2_msg_valid_ike_sa(env, hdr, msg) == -1)
sbin/iked/ikev2.c
2969
if (ikev2_msg_valid_ike_sa(env, hdr, msg) == -1)
sbin/iked/ikev2.c
2978
if (ikev2_pld_parse(env, hdr, msg, msg->msg_offset) != 0) {
sbin/iked/ikev2.c
298
return (config_getuser(env, imsg));
sbin/iked/ikev2.c
2987
if (ikev2_handle_notifies(env, msg) != 0)
sbin/iked/ikev2.c
2997
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
300
return (config_getradauth(env, imsg));
sbin/iked/ikev2.c
3016
if (ikev2_sa_responder(env, sa, NULL, msg) != 0) {
sbin/iked/ikev2.c
302
return (config_getradacct(env, imsg));
sbin/iked/ikev2.c
3021
ikev2_send_init_error(env, msg);
sbin/iked/ikev2.c
3023
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3026
if (ikev2_resp_ike_sa_init(env, msg) != 0) {
sbin/iked/ikev2.c
3029
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3037
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
304
return (config_getradserver(env, imsg));
sbin/iked/ikev2.c
3043
if (ikev2_resp_ike_eap(env, sa, msg)) {
sbin/iked/ikev2.c
3047
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3053
if (ikev2_ike_auth_recv(env, sa, msg) != 0) {
sbin/iked/ikev2.c
3055
ikev2_send_error(env, sa, msg, hdr->ike_exchange);
sbin/iked/ikev2.c
3057
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
306
return (config_getradcfgmap(env, imsg));
sbin/iked/ikev2.c
3062
if (ikev2_resp_create_child_sa(env, msg) != 0) {
sbin/iked/ikev2.c
3065
ikev2_send_error(env, sa, msg, hdr->ike_exchange);
sbin/iked/ikev2.c
3070
ikev2_update_sa_addresses(env, sa);
sbin/iked/ikev2.c
3071
(void)ikev2_resp_informational(env, sa, msg);
sbin/iked/ikev2.c
3079
ikev2_handle_delete(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2.c
308
return (config_getraddae(env, imsg));
sbin/iked/ikev2.c
310
return (config_getradclient(env, imsg));
sbin/iked/ikev2.c
3114
ikev2_ikesa_recv_delete(env, sa);
sbin/iked/ikev2.c
312
return (config_getcompile(env));
sbin/iked/ikev2.c
314
return (config_getstatic(env, imsg));
sbin/iked/ikev2.c
3163
if (ikev2_childsa_delete(env, sa, msg->msg_del_protoid, spi,
sbin/iked/ikev2.c
3236
ikev2_handle_notifies(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
325
struct iked *env = iked_env;
sbin/iked/ikev2.c
3251
if ((msg->msg_flags & IKED_MSG_FLAGS_FRAGMENTATION) && env->sc_frag) {
sbin/iked/ikev2.c
3256
if ((msg->msg_flags & IKED_MSG_FLAGS_MOBIKE) && env->sc_mobike) {
sbin/iked/ikev2.c
3261
ikev2_enable_natt(env, sa, msg, 0);
sbin/iked/ikev2.c
3267
ikev2_disable_rekeying(env, sa);
sbin/iked/ikev2.c
3278
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3291
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3301
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3307
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3310
timer_set(env, &env->sc_inittmr, ikev2_init_ike_sa, NULL);
sbin/iked/ikev2.c
3311
timer_add(env, &env->sc_inittmr, IKED_INITIATOR_INITIAL);
sbin/iked/ikev2.c
3328
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
3337
(void)ikev2_send_create_child_sa(env, sa,
sbin/iked/ikev2.c
3345
timer_set(env, &sa->sa_rekey,
sbin/iked/ikev2.c
3347
timer_add(env, &sa->sa_rekey, 0);
sbin/iked/ikev2.c
3385
ikev2_resp_ike_sa_init(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
3408
if ((buf = ikev2_msg_init(env, &resp,
sbin/iked/ikev2.c
3428
if ((len = ikev2_add_proposals(env, sa, buf, &sa->sa_proposals,
sbin/iked/ikev2.c
343
ibuf_free(env->sc_certreq);
sbin/iked/ikev2.c
344
env->sc_certreqtype = type;
sbin/iked/ikev2.c
345
env->sc_certreq = ibuf_new(ptr,
sbin/iked/ikev2.c
3459
if (env->sc_vendorid != 0) {
sbin/iked/ikev2.c
3474
if ((env->sc_nattmode != NATT_DISABLE) &&
sbin/iked/ikev2.c
3476
if ((len = ikev2_add_nat_detection(env, buf, &pld, &resp, len))
sbin/iked/ikev2.c
3483
len, env->sc_certreq, env->sc_certreqtype)) == -1)
sbin/iked/ikev2.c
3486
if (env->sc_certreqtype != sa->sa_policy->pol_certreqtype &&
sbin/iked/ikev2.c
350
ibuf_length(env->sc_certreq));
sbin/iked/ikev2.c
3502
(void)ikev2_pld_parse(env, hdr, &resp, 0);
sbin/iked/ikev2.c
3510
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2.c
3514
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2.c
3520
ikev2_send_auth_failed(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
3551
ret = ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_NOTIFY,
sbin/iked/ikev2.c
3559
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
356
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
3560
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
3561
timer_set(env, &sa->sa_timer, ikev2_ike_sa_timeout, sa);
sbin/iked/ikev2.c
3562
timer_add(env, &sa->sa_timer, IKED_IKE_SA_DELETE_TIMEOUT);
sbin/iked/ikev2.c
3570
ikev2_add_error(struct iked *env, struct ibuf *buf, struct iked_message *msg)
sbin/iked/ikev2.c
3641
ikev2_record_dstid(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
3645
osa = sa_dstid_lookup(env, sa);
sbin/iked/ikev2.c
3649
sa_dstid_remove(env, osa);
sbin/iked/ikev2.c
3650
if (env->sc_enforcesingleikesa &&
sbin/iked/ikev2.c
3656
ikev2_disable_timer(env, osa);
sbin/iked/ikev2.c
3658
ikev2_ikesa_delete(env, osa, 0);
sbin/iked/ikev2.c
3659
timer_add(env, &osa->sa_timer,
sbin/iked/ikev2.c
3663
osa = sa_dstid_insert(env, sa);
sbin/iked/ikev2.c
3675
ikev2_send_error(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
3685
if (ikev2_add_error(env, buf, msg) == 0)
sbin/iked/ikev2.c
3687
ret = ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_NOTIFY,
sbin/iked/ikev2.c
3699
ikev2_send_init_error(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
3716
if ((buf = ikev2_msg_init(env, &resp,
sbin/iked/ikev2.c
3736
if ((len = ikev2_add_error(env, buf, msg)) == 0)
sbin/iked/ikev2.c
3743
(void)ikev2_pld_parse(env, hdr, &resp, 0);
sbin/iked/ikev2.c
3744
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2.c
3747
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2.c
3753
ikev2_handle_certreq(struct iked* env, struct iked_message *msg)
sbin/iked/ikev2.c
378
if (sa->sa_peerauth.id_type && ikev2_auth_verify(env, sa))
sbin/iked/ikev2.c
3782
crtype = env->sc_certreqtype;
sbin/iked/ikev2.c
3783
ca_setreq(env, sa, &sa->sa_policy->pol_localid,
sbin/iked/ikev2.c
3784
crtype, 0, ibuf_data(env->sc_certreq),
sbin/iked/ikev2.c
3785
ibuf_size(env->sc_certreq), PROC_CERT);
sbin/iked/ikev2.c
3793
ca_setreq(env, sa, &sa->sa_policy->pol_localid,
sbin/iked/ikev2.c
3808
ikev2_resp_ike_eap_mschap(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
3824
return (eap_challenge_request(env, sa, eap->eam_id));
sbin/iked/ikev2.c
3836
if ((usr = user_lookup(env, name)) == NULL) {
sbin/iked/ikev2.c
384
if (ikev2_ike_auth(env, sa) != 0)
sbin/iked/ikev2.c
3876
ret = eap_mschap_challenge(env, sa, eap->eam_id, eap->eam_msrid,
sbin/iked/ikev2.c
3879
sa_state(env, sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
3882
return (eap_mschap_success(env, sa, eap->eam_id));
sbin/iked/ikev2.c
3886
return (eap_success(env, sa, msg->msg_eap.eam_id));
sbin/iked/ikev2.c
389
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
3895
ikev2_resp_ike_eap(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
3903
return ikev2_resp_ike_eap_mschap(env, sa, msg);
sbin/iked/ikev2.c
3905
return iked_radius_request(env, sa, msg);
sbin/iked/ikev2.c
3911
ikev2_resp_ike_auth(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
3927
return (eap_identity_request(env, sa));
sbin/iked/ikev2.c
393
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
3932
if (ikev2_cp_setaddr(env, sa, AF_INET) < 0 ||
sbin/iked/ikev2.c
3933
ikev2_cp_setaddr(env, sa, AF_INET6) < 0)
sbin/iked/ikev2.c
3936
if (ikev2_childsa_negotiate(env, sa, &sa->sa_kex, &sa->sa_proposals,
sbin/iked/ikev2.c
3946
sa_state(env, sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
4023
if ((len = ikev2_resp_add_cp(env, sa, e)) == -1)
sbin/iked/ikev2.c
4028
(len = ikev2_add_ipcompnotify(env, e, &pld, len, sa, 0)) == -1)
sbin/iked/ikev2.c
4031
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
4045
if ((len = ikev2_add_proposals(env, sa, e, &sa->sa_proposals, 0,
sbin/iked/ikev2.c
4055
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
4058
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
4060
sa_state(env, sa, IKEV2_STATE_ESTABLISHED);
sbin/iked/ikev2.c
4061
iked_radius_acct_start(env, sa);
sbin/iked/ikev2.c
4063
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
4064
ikev2_enable_timer(env, sa);
sbin/iked/ikev2.c
4066
ikev2_record_dstid(env, sa);
sbin/iked/ikev2.c
4071
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
4077
ikev2_send_ike_e(struct iked *env, struct iked_sa *sa, struct ibuf *buf,
sbin/iked/ikev2.c
4100
ret = ikev2_msg_send_encrypt(env, sa, &e, exchange, firstpayload,
sbin/iked/ikev2.c
4137
ikev2_send_create_child_sa(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
4194
(len = ikev2_add_ipcompnotify(env, e, &pld, 0, sa, 1)) == -1)
sbin/iked/ikev2.c
4197
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
4221
if ((len = ikev2_add_proposals(env, sa, e, &sa->sa_proposals,
sbin/iked/ikev2.c
4294
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
4315
ikev2_ike_sa_rekey(struct iked *env, void *arg)
sbin/iked/ikev2.c
432
if (ikev2_ike_auth(env, sa) != 0)
sbin/iked/ikev2.c
4341
ikev2_ike_sa_rekey_schedule_fast(env, sa);
sbin/iked/ikev2.c
4346
timer_set(env, &sa->sa_rekey, ikev2_ike_sa_rekey_timeout, sa);
sbin/iked/ikev2.c
4347
timer_add(env, &sa->sa_rekey, IKED_IKE_SA_REKEY_TIMEOUT);
sbin/iked/ikev2.c
4349
if ((nsa = sa_new(env, 0, 0, 1, sa->sa_policy)) == NULL) {
sbin/iked/ikev2.c
4354
if (ikev2_sa_initiator(env, nsa, sa, NULL)) {
sbin/iked/ikev2.c
4358
sa_state(env, nsa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
436
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
4369
if ((len = ikev2_add_proposals(env, nsa, e, &sa->sa_proposals,
sbin/iked/ikev2.c
4403
ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
4415
sa_free(env, nsa);
sbin/iked/ikev2.c
4442
ikev2_init_create_child_sa(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
4465
sa_free(env, sa->sa_nexti);
sbin/iked/ikev2.c
4467
timer_set(env, &sa->sa_rekey, ikev2_ike_sa_rekey, sa);
sbin/iked/ikev2.c
4468
ikev2_ike_sa_rekey_schedule_fast(env, sa);
sbin/iked/ikev2.c
4482
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
4506
if ((nsa = sa_new(env, sa->sa_nexti->sa_hdr.sh_ispi,
sbin/iked/ikev2.c
4512
sa_free(env, nsa);
sbin/iked/ikev2.c
4515
sa_free(env, sa->sa_nexti);
sbin/iked/ikev2.c
4519
if (ikev2_sa_initiator(env, nsa, sa, msg) == -1) {
sbin/iked/ikev2.c
4565
ikev2_ikesa_delete(env, dsa, dsa->sa_hdr.sh_initiator);
sbin/iked/ikev2.c
4570
return (ikev2_ikesa_enable(env, sa, nsa));
sbin/iked/ikev2.c
4624
ret = ikev2_childsa_delete_proposed(env, sa,
sbin/iked/ikev2.c
4630
if (ikev2_childsa_negotiate(env, sa, &sa->sa_kex, &sa->sa_proposals, 1,
sbin/iked/ikev2.c
4653
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
4660
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
4666
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
4669
ikev2_childsa_delete(env, sa, csa->csa_saproto,
sbin/iked/ikev2.c
4677
ikev2_ikesa_enable(struct iked *env, struct iked_sa *sa, struct iked_sa *nsa)
sbin/iked/ikev2.c
4772
RB_REMOVE(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
4775
RB_INSERT(iked_addrpool, &env->sc_addrpool, nsa);
sbin/iked/ikev2.c
4778
RB_REMOVE(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/ikev2.c
4781
RB_INSERT(iked_addrpool6, &env->sc_addrpool6, nsa);
sbin/iked/ikev2.c
4792
sa_dstid_remove(env, sa);
sbin/iked/ikev2.c
4793
sa_dstid_insert(env, nsa);
sbin/iked/ikev2.c
481
if ((sa = ikev2_getimsgdata(env, imsg,
sbin/iked/ikev2.c
4814
sa_state(env, nsa, IKEV2_STATE_ESTABLISHED);
sbin/iked/ikev2.c
4816
iked_radius_acct_start(env, nsa);
sbin/iked/ikev2.c
4817
ikev2_enable_timer(env, nsa);
sbin/iked/ikev2.c
4819
ikestat_inc(env, ikes_sa_rekeyed);
sbin/iked/ikev2.c
4825
ikev2_disable_timer(env, sa);
sbin/iked/ikev2.c
4828
ikev2_ikesa_delete(env, sa, nsa->sa_hdr.sh_initiator);
sbin/iked/ikev2.c
4833
ikev2_ikesa_delete(struct iked *env, struct iked_sa *sa, int initiator)
sbin/iked/ikev2.c
4850
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
4857
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
4859
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
4863
timer_set(env, &sa->sa_timer, ikev2_ike_sa_timeout, sa);
sbin/iked/ikev2.c
4864
timer_add(env, &sa->sa_timer, IKED_IKE_SA_DELETE_TIMEOUT);
sbin/iked/ikev2.c
4869
ikev2_ikesa_recv_delete(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
4882
ikev2_ikesa_enable(env, sa, sa->sa_nextr);
sbin/iked/ikev2.c
4889
sa_free(env, sa->sa_nexti);
sbin/iked/ikev2.c
4893
if (env->sc_stickyaddress) {
sbin/iked/ikev2.c
4895
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2.c
4896
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2.c
4897
timer_set(env, &sa->sa_timer, ikev2_ike_sa_timeout, sa);
sbin/iked/ikev2.c
4898
timer_add(env, &sa->sa_timer, 3 * IKED_RETRANSMIT_TIMEOUT);
sbin/iked/ikev2.c
4900
sa_state(env, sa, IKEV2_STATE_CLOSED);
sbin/iked/ikev2.c
4905
ikev2_resp_create_child_sa(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
4973
if ((nsa = sa_new(env, spi->spi, 0, 0,
sbin/iked/ikev2.c
4979
if (ikev2_sa_responder(env, nsa, sa, msg)) {
sbin/iked/ikev2.c
4984
sa_state(env, nsa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2.c
5001
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
5071
if (ikev2_childsa_negotiate(env, sa, kex, &proposals, 0, pfs)) {
sbin/iked/ikev2.c
5094
(len = ikev2_add_ipcompnotify(env, e, &pld, 0, sa, 0)) == -1)
sbin/iked/ikev2.c
5097
(len = ikev2_add_transport_mode(env, e, &pld, len, sa)) == -1)
sbin/iked/ikev2.c
5111
if ((len = ikev2_add_proposals(env, nsa ? nsa : sa, e,
sbin/iked/ikev2.c
512
if (ikev2_ike_auth(env, sa) != 0)
sbin/iked/ikev2.c
5153
if ((ret = ikev2_msg_send_encrypt(env, sa, &e,
sbin/iked/ikev2.c
5172
ret = ikev2_ikesa_enable(env, sa, nsa);
sbin/iked/ikev2.c
5174
ret = ikev2_childsa_enable(env, sa);
sbin/iked/ikev2.c
5178
ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
5199
ikev2_ike_sa_timeout(struct iked *env, void *arg)
sbin/iked/ikev2.c
5205
sa_free(env, sa);
sbin/iked/ikev2.c
5209
ikev2_ike_sa_rekey_timeout(struct iked *env, void *arg)
sbin/iked/ikev2.c
5215
sa_free(env, sa);
sbin/iked/ikev2.c
5219
ikev2_ike_sa_rekey_schedule(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
5221
timer_add(env, &sa->sa_rekey, (sa->sa_policy->pol_rekey * 850 +
sbin/iked/ikev2.c
5227
ikev2_ike_sa_rekey_schedule_fast(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
5235
timer_add(env, &sa->sa_rekey, timeout);
sbin/iked/ikev2.c
5239
ikev2_ike_sa_alive(struct iked *env, void *arg)
sbin/iked/ikev2.c
5247
if (env->sc_alive_timeout == 0)
sbin/iked/ikev2.c
525
struct iked *env = iked_env;
sbin/iked/ikev2.c
5254
if (pfkey_sa_last_used(env, csa, &last_used) != 0)
sbin/iked/ikev2.c
5261
if (diff < env->sc_alive_timeout) {
sbin/iked/ikev2.c
5288
ikev2_send_ike_e(env, sa, NULL, IKEV2_PAYLOAD_NONE,
sbin/iked/ikev2.c
529
ikev2_ctl_reset_id(env, imsg, imsg->hdr.type);
sbin/iked/ikev2.c
5291
ikestat_inc(env, ikes_dpd_sent);
sbin/iked/ikev2.c
5295
timer_add(env, &sa->sa_timer, env->sc_alive_timeout);
sbin/iked/ikev2.c
5299
ikev2_ike_sa_keepalive(struct iked *env, void *arg)
sbin/iked/ikev2.c
5315
ikestat_inc(env, ikes_keepalive_sent);
sbin/iked/ikev2.c
5316
timer_add(env, &sa->sa_keepalive, IKED_IKE_SA_KEEPALIVE_TIMEOUT);
sbin/iked/ikev2.c
532
ikev2_ctl_show_sa(env, imsg);
sbin/iked/ikev2.c
5320
ikev2_send_informational(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
5333
if ((buf = ikev2_msg_init(env, &resp,
sbin/iked/ikev2.c
535
ikev2_ctl_show_stats(env, imsg);
sbin/iked/ikev2.c
5370
resp.msg_msgid = ikev2_msg_id(env, sa);
sbin/iked/ikev2.c
5382
if ((e = ikev2_msg_encrypt(env, sa, e, buf)) == NULL) {
sbin/iked/ikev2.c
5396
if (ikev2_msg_integr(env, sa, buf) != 0) {
sbin/iked/ikev2.c
5410
resp.msg_msgid = ikev2_msg_id(env, &sah);
sbin/iked/ikev2.c
5427
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2.c
5431
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2.c
546
ikev2_ike_sa_delete(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
5508
ikev2_sa_negotiate_common(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
5517
ikestat_inc(env, ikes_sa_proposals_negotiate_failures);
sbin/iked/ikev2.c
552
ikev2_disable_timer(env, sa);
sbin/iked/ikev2.c
554
ikev2_ikesa_delete(env, sa, 1);
sbin/iked/ikev2.c
555
timer_add(env, &sa->sa_timer, 0);
sbin/iked/ikev2.c
5581
ikev2_sa_initiator(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
560
ikev2_ctl_reset_id(struct iked *env, struct imsg *imsg, unsigned int type)
sbin/iked/ikev2.c
5609
if (ikev2_sa_negotiate_common(env, sa, msg, -1) != 0)
sbin/iked/ikev2.c
5619
return (ikev2_sa_keys(env, sa, osa ? osa->sa_key_d : NULL));
sbin/iked/ikev2.c
5674
ikev2_sa_responder(struct iked *env, struct iked_sa *sa, struct iked_sa *osa,
sbin/iked/ikev2.c
5683
if (policy_lookup(env, msg, &msg->msg_proposals,
sbin/iked/ikev2.c
5695
policy_unref(env, old);
sbin/iked/ikev2.c
5696
policy_ref(env, sa->sa_policy);
sbin/iked/ikev2.c
5699
sa_state(env, sa, IKEV2_STATE_SA_INIT);
sbin/iked/ikev2.c
570
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/ikev2.c
5721
if (ikev2_sa_negotiate_common(env, sa, msg, msg->msg_dhgroup) != 0)
sbin/iked/ikev2.c
5727
return (ikev2_sa_keys(env, sa, osa ? osa->sa_key_d : NULL));
sbin/iked/ikev2.c
5731
ikev2_sa_keys(struct iked *env, struct iked_sa *sa, struct ibuf *key)
sbin/iked/ikev2.c
578
ikev2_disable_timer(env, sa);
sbin/iked/ikev2.c
584
ikev2_ikesa_delete(env, sa, 1);
sbin/iked/ikev2.c
586
timer_add(env, &sa->sa_timer, 3 * IKED_RETRANSMIT_TIMEOUT);
sbin/iked/ikev2.c
592
ikev2_ctl_show_sa(struct iked *env, struct imsg *imsg)
sbin/iked/ikev2.c
594
ikev2_info(env, imsg, 0);
sbin/iked/ikev2.c
598
ikev2_ctl_show_stats(struct iked *env, struct imsg *imsg)
sbin/iked/ikev2.c
600
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
602
&env->sc_stats, sizeof(env->sc_stats));
sbin/iked/ikev2.c
606
ikev2_getimsgdata(struct iked *env, struct imsg *imsg, struct iked_sahdr *sh,
sbin/iked/ikev2.c
6123
ikev2_childsa_delete_proposed(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
6162
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
6174
ikev2_childsa_negotiate(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
626
sa = sa_lookup(env, sh->sh_ispi, sh->sh_rspi, sh->sh_initiator);
sbin/iked/ikev2.c
6364
if ((ret = pfkey_sa_init(env, csa,
sbin/iked/ikev2.c
6444
if ((ret = pfkey_sa_init(env, csa2,
sbin/iked/ikev2.c
6478
ikestat_add(env, ikes_csa_created, 2);
sbin/iked/ikev2.c
6501
ikev2_childsa_enable(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
6538
if (pfkey_sa_add(env, csa, NULL) != 0) {
sbin/iked/ikev2.c
654
ikev2_recv(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2.c
6545
if (pfkey_sa_add(env, ipcomp, csa) != 0) {
sbin/iked/ikev2.c
6553
if ((ocsa = RB_FIND(iked_activesas, &env->sc_activesas, csa))
sbin/iked/ikev2.c
6560
RB_REMOVE(iked_activesas, &env->sc_activesas, ocsa);
sbin/iked/ikev2.c
6563
RB_INSERT(iked_activesas, &env->sc_activesas, csa);
sbin/iked/ikev2.c
6607
RB_REMOVE(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
6608
(void)pfkey_flow_delete(env, flow);
sbin/iked/ikev2.c
6613
if (pfkey_flow_add(env, flow) != 0) {
sbin/iked/ikev2.c
6618
if ((oflow = RB_FIND(iked_flows, &env->sc_activeflows, flow))
sbin/iked/ikev2.c
6623
RB_REMOVE(iked_flows, &env->sc_activeflows, oflow);
sbin/iked/ikev2.c
6626
RB_INSERT(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
668
ikestat_inc(env, ikes_msg_rcvd);
sbin/iked/ikev2.c
6693
ikev2_childsa_delete(struct iked *env, struct iked_sa *sa, uint8_t saproto,
sbin/iked/ikev2.c
6708
RB_REMOVE(iked_activesas, &env->sc_activesas, csa);
sbin/iked/ikev2.c
6710
if (pfkey_sa_delete(env, csa) != 0)
sbin/iked/ikev2.c
6726
if (pfkey_sa_delete(env, ipcomp) != 0)
sbin/iked/ikev2.c
673
msg->msg_sa = sa_lookup(env,
sbin/iked/ikev2.c
6740
ikestat_inc(env, ikes_csa_removed);
sbin/iked/ikev2.c
677
if (policy_lookup(env, msg, NULL, NULL, 0) != 0) {
sbin/iked/ikev2.c
679
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
6800
ikev2_child_sa_acquire(struct iked *env, struct iked_flow *acquire)
sbin/iked/ikev2.c
6806
if (env->sc_passive)
sbin/iked/ikev2.c
6810
flow = RB_FIND(iked_flows, &env->sc_activeflows, acquire);
sbin/iked/ikev2.c
6822
if ((p = policy_test(env, &pol)) == NULL) {
sbin/iked/ikev2.c
6830
if (ikev2_init_ike_sa_peer(env, p,
sbin/iked/ikev2.c
6844
if (ikev2_send_create_child_sa(env, sa, NULL,
sbin/iked/ikev2.c
6853
ikev2_disable_rekeying(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
6862
(void)ikev2_childsa_delete(env, sa, 0, 0, NULL, 1);
sbin/iked/ikev2.c
6867
ikev2_child_sa_rekey(struct iked *env, struct iked_spi *rekey)
sbin/iked/ikev2.c
6873
csa = RB_FIND(iked_activesas, &env->sc_activesas, &key);
sbin/iked/ikev2.c
6901
if (ikev2_send_create_child_sa(env, sa, rekey, rekey->spi_protoid, 0))
sbin/iked/ikev2.c
6909
ikev2_child_sa_drop(struct iked *env, struct iked_spi *drop)
sbin/iked/ikev2.c
6918
csa = RB_FIND(iked_activesas, &env->sc_activesas, &key);
sbin/iked/ikev2.c
6929
RB_REMOVE(iked_activesas, &env->sc_activesas, csa);
sbin/iked/ikev2.c
6942
if (ikev2_childsa_delete(env, sa, csa->csa_saproto,
sbin/iked/ikev2.c
6959
if (ikev2_send_ike_e(env, sa, buf, IKEV2_PAYLOAD_DELETE,
sbin/iked/ikev2.c
7081
ikev2_cp_setaddr(struct iked *env, struct iked_sa *sa, sa_family_t family)
sbin/iked/ikev2.c
711
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7133
if ((ret = ikev2_cp_setaddr_pool(env, sa,
sbin/iked/ikev2.c
7157
ikev2_cp_setaddr_pool(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
717
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7183
if (env->sc_stickyaddress &&
sbin/iked/ikev2.c
7184
(osa = sa_dstid_lookup(env, sa)) != NULL &&
sbin/iked/ikev2.c
7189
if (RB_REMOVE(iked_addrpool, &env->sc_addrpool, osa)
sbin/iked/ikev2.c
7197
if (RB_REMOVE(iked_addrpool6, &env->sc_addrpool6, osa)
sbin/iked/ikev2.c
720
mr = ikev2_msg_lookup(env, &sa->sa_requests, msg,
sbin/iked/ikev2.c
7204
sa_dstid_remove(env, osa);
sbin/iked/ikev2.c
7211
ikev2_disable_timer(env, osa);
sbin/iked/ikev2.c
7214
ikev2_ikesa_delete(env, osa, 1);
sbin/iked/ikev2.c
7215
timer_add(env, &osa->sa_timer,
sbin/iked/ikev2.c
7219
RB_INSERT(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
7227
RB_INSERT(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/ikev2.c
724
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7259
if (RB_FIND(iked_addrpool, &env->sc_addrpool,
sbin/iked/ikev2.c
7275
RB_INSERT(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
729
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7334
!RB_FIND(iked_addrpool, &env->sc_addrpool, &key)) ||
sbin/iked/ikev2.c
7336
!RB_FIND(iked_addrpool6, &env->sc_addrpool6, &key)))
sbin/iked/ikev2.c
7357
RB_INSERT(iked_addrpool, &env->sc_addrpool, sa);
sbin/iked/ikev2.c
7365
RB_INSERT(iked_addrpool6, &env->sc_addrpool6, sa);
sbin/iked/ikev2.c
742
ikev2_msg_dispose(env, &sa->sa_requests, mr);
sbin/iked/ikev2.c
7470
ikev2_update_sa_addresses(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
7487
if (pfkey_sa_update_addresses(env, csa) != 0)
sbin/iked/ikev2.c
7491
if (pfkey_sa_update_addresses(env, ipcomp)
sbin/iked/ikev2.c
7499
RB_REMOVE(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
7500
(void)pfkey_flow_delete(env, flow);
sbin/iked/ikev2.c
7503
if (pfkey_flow_add(env, flow) != 0)
sbin/iked/ikev2.c
7507
if ((oflow = RB_FIND(iked_flows, &env->sc_activeflows, flow))
sbin/iked/ikev2.c
7512
RB_REMOVE(iked_flows, &env->sc_activeflows, oflow);
sbin/iked/ikev2.c
7514
RB_INSERT(iked_flows, &env->sc_activeflows, flow);
sbin/iked/ikev2.c
7542
ikev2_info_sa(struct iked *env, struct imsg *imsg, int dolog, const char *msg,
sbin/iked/ikev2.c
7575
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
758
sa_free(env, sa);
sbin/iked/ikev2.c
7582
ikev2_info_csa(struct iked *env, struct imsg *imsg, int dolog, const char *msg,
sbin/iked/ikev2.c
7611
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
7618
ikev2_info_flow(struct iked *env, struct imsg *imsg, int dolog, const char *msg,
sbin/iked/ikev2.c
763
ikestat_inc(env, ikes_msg_rcvd_dropped);
sbin/iked/ikev2.c
7658
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1,
sbin/iked/ikev2.c
7665
ikev2_info(struct iked *env, struct imsg *imsg, int dolog)
sbin/iked/ikev2.c
7673
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/ikev2.c
7674
ikev2_info_sa(env, imsg, dolog, "iked_sas", sa);
sbin/iked/ikev2.c
7676
ikev2_info_csa(env, imsg, dolog, " sa_childsas", csa);
sbin/iked/ikev2.c
7678
ikev2_info_csa(env, imsg, dolog, " ",
sbin/iked/ikev2.c
7682
ikev2_info_flow(env, imsg, dolog, " sa_flows", flow);
sbin/iked/ikev2.c
7685
RB_FOREACH(csa, iked_activesas, &env->sc_activesas) {
sbin/iked/ikev2.c
7686
ikev2_info_csa(env, imsg, dolog, "iked_activesas", csa);
sbin/iked/ikev2.c
7688
ikev2_info_csa(env, imsg, dolog, " ", ipcomp);
sbin/iked/ikev2.c
7690
RB_FOREACH(flow, iked_flows, &env->sc_activeflows) {
sbin/iked/ikev2.c
7691
ikev2_info_flow(env, imsg, dolog, "iked_flows", flow);
sbin/iked/ikev2.c
7693
RB_FOREACH(sa, iked_dstid_sas, &env->sc_dstid_sas) {
sbin/iked/ikev2.c
7694
ikev2_info_sa(env, imsg, dolog, "iked_dstid_sas", sa);
sbin/iked/ikev2.c
7699
proc_compose_imsg(&env->sc_ps, PROC_CONTROL, -1, IMSG_CTL_SHOW_SA,
sbin/iked/ikev2.c
772
if ((r = ikev2_msg_retransmit_response(env, sa, msg, hdr))
sbin/iked/ikev2.c
779
sa_free(env, sa);
sbin/iked/ikev2.c
787
ikestat_inc(env, ikes_msg_rcvd_busy);
sbin/iked/ikev2.c
795
ikev2_init_recv(env, msg, hdr);
sbin/iked/ikev2.c
797
ikev2_resp_recv(env, msg, hdr);
sbin/iked/ikev2.c
808
ikev2_msg_prevail(env, &sa->sa_responses, msg);
sbin/iked/ikev2.c
814
sa_free(env, sa);
sbin/iked/ikev2.c
856
ikev2_auth_verify(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2.c
888
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
894
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
898
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
903
ret = ikev2_msg_authverify(env, sa, &ikeauth,
sbin/iked/ikev2.c
911
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
916
if ((authmsg = ikev2_msg_auth(env, sa,
sbin/iked/ikev2.c
925
ret = ikev2_msg_authsign(env, sa, &ikeauth, authmsg);
sbin/iked/ikev2.c
928
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
936
sa_state(env, sa, IKEV2_STATE_EAP_SUCCESS);
sbin/iked/ikev2.c
944
ikev2_ike_auth_recv(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2.c
958
sa_state(env, sa, IKEV2_STATE_AUTH_REQUEST);
sbin/iked/ikev2.c
963
sa_state(env, sa, IKEV2_STATE_EAP);
sbin/iked/ikev2.c
975
if (policy_lookup(env, msg, &sa->sa_proposals, NULL, 0) != 0 ||
sbin/iked/ikev2.c
979
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2.c
981
policy_unref(env, old);
sbin/iked/ikev2.c
987
policy_unref(env, old);
sbin/iked/ikev2.c
990
if (sa_new(env, sa->sa_hdr.sh_ispi,
sbin/iked/ikev2.c
994
ikev2_send_auth_failed(env, sa);
sbin/iked/ikev2_msg.c
1003
ikev2_msg_authverify(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
103
ikev1_recv(env, &msg);
sbin/iked/ikev2_msg.c
105
ikev2_recv(env, &msg);
sbin/iked/ikev2_msg.c
1061
sa_state(env, sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/ikev2_msg.c
1065
sa_state(env, sa, IKEV2_STATE_AUTH_REQUEST);
sbin/iked/ikev2_msg.c
107
ikev2_msg_cleanup(env, &msg);
sbin/iked/ikev2_msg.c
1076
ikev2_msg_authsign(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
111
ikev1_recv(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
1186
ikev2_msg_getsocket(struct iked *env, int af, int natt)
sbin/iked/ikev2_msg.c
1190
return (env->sc_sock4[natt ? 1 : 0]);
sbin/iked/ikev2_msg.c
1192
return (env->sc_sock6[natt ? 1 : 0]);
sbin/iked/ikev2_msg.c
1200
ikev2_msg_enqueue(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1205
if ((mr = ikev2_msg_lookup(env, queue, msg, msg->msg_exchange)) ==
sbin/iked/ikev2_msg.c
1212
timer_set(env, &mr->mrt_timer, msg->msg_response ?
sbin/iked/ikev2_msg.c
1215
timer_add(env, &mr->mrt_timer, timeout);
sbin/iked/ikev2_msg.c
1226
ikev2_msg_prevail(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1233
ikev2_msg_dispose(env, queue, mr);
sbin/iked/ikev2_msg.c
1238
ikev2_msg_dispose(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1245
ikev2_msg_cleanup(env, m);
sbin/iked/ikev2_msg.c
1249
timer_del(env, &mr->mrt_timer);
sbin/iked/ikev2_msg.c
1255
ikev2_msg_flushqueue(struct iked *env, struct iked_msgqueue *queue)
sbin/iked/ikev2_msg.c
1260
ikev2_msg_dispose(env, queue, mr);
sbin/iked/ikev2_msg.c
1264
ikev2_msg_lookup(struct iked *env, struct iked_msgqueue *queue,
sbin/iked/ikev2_msg.c
1280
ikev2_msg_retransmit_response(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
1286
if ((mr = ikev2_msg_lookup(env, &sa->sa_responses, msg,
sbin/iked/ikev2_msg.c
1292
if (ikev2_pld_parse_quick(env, hdr, msg,
sbin/iked/ikev2_msg.c
1306
ikestat_inc(env, ikes_msg_send_failures);
sbin/iked/ikev2_msg.c
1317
timer_add(env, &mr->mrt_timer, IKED_RESPONSE_TIMEOUT);
sbin/iked/ikev2_msg.c
1318
ikestat_inc(env, ikes_retransmit_response);
sbin/iked/ikev2_msg.c
1323
ikev2_msg_response_timeout(struct iked *env, void *arg)
sbin/iked/ikev2_msg.c
1329
ikev2_msg_dispose(env, &sa->sa_responses, mr);
sbin/iked/ikev2_msg.c
1333
ikev2_msg_retransmit_timeout(struct iked *env, void *arg)
sbin/iked/ikev2_msg.c
1348
sa_free(env, sa);
sbin/iked/ikev2_msg.c
1349
ikestat_inc(env, ikes_msg_send_failures);
sbin/iked/ikev2_msg.c
1360
timer_add(env, &mr->mrt_timer,
sbin/iked/ikev2_msg.c
1362
ikestat_inc(env, ikes_retransmit_request);
sbin/iked/ikev2_msg.c
1367
ikestat_inc(env, ikes_retransmit_limit);
sbin/iked/ikev2_msg.c
1368
sa_free(env, sa);
sbin/iked/ikev2_msg.c
138
ikev2_msg_init(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2_msg.c
158
ikev2_msg_copy(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
173
(buf = ikev2_msg_init(env, m, &msg->msg_peer, msg->msg_peerlen,
sbin/iked/ikev2_msg.c
189
ikev2_msg_cleanup(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
245
ikev2_msg_valid_ike_sa(struct iked *env, struct ike_header *oldhdr,
sbin/iked/ikev2_msg.c
272
ikev2_msg_send(struct iked *env, struct iked_message *msg)
sbin/iked/ikev2_msg.c
320
sa_state(env, sa, IKEV2_STATE_CLOSING);
sbin/iked/ikev2_msg.c
321
timer_del(env, &sa->sa_timer);
sbin/iked/ikev2_msg.c
322
timer_set(env, &sa->sa_timer,
sbin/iked/ikev2_msg.c
324
timer_add(env, &sa->sa_timer,
sbin/iked/ikev2_msg.c
327
ikestat_inc(env, ikes_msg_send_failures);
sbin/iked/ikev2_msg.c
329
ikestat_inc(env, ikes_msg_sent);
sbin/iked/ikev2_msg.c
334
if ((m = ikev2_msg_copy(env, msg)) == NULL) {
sbin/iked/ikev2_msg.c
341
if (ikev2_msg_enqueue(env, &sa->sa_responses, m,
sbin/iked/ikev2_msg.c
343
ikev2_msg_cleanup(env, m);
sbin/iked/ikev2_msg.c
348
if (ikev2_msg_enqueue(env, &sa->sa_requests, m,
sbin/iked/ikev2_msg.c
350
ikev2_msg_cleanup(env, m);
sbin/iked/ikev2_msg.c
360
ikev2_msg_id(struct iked *env, struct iked_sa *sa)
sbin/iked/ikev2_msg.c
409
ikev2_msg_encrypt(struct iked *env, struct iked_sa *sa, struct ibuf *src,
sbin/iked/ikev2_msg.c
508
ikev2_msg_integr(struct iked *env, struct iked_sa *sa, struct ibuf *src)
sbin/iked/ikev2_msg.c
573
ikev2_msg_decrypt(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
60
struct iked *env = sock->sock_env;
sbin/iked/ikev2_msg.c
749
ikev2_msg_send_encrypt(struct iked *env, struct iked_sa *sa, struct ibuf **ep,
sbin/iked/ikev2_msg.c
760
return ikev2_send_encrypted_fragments(env, sa, e, exchange,
sbin/iked/ikev2_msg.c
764
if ((buf = ikev2_msg_init(env, &resp, &sa->sa_peer.addr,
sbin/iked/ikev2_msg.c
769
resp.msg_msgid = response ? sa->sa_msgid_current : ikev2_msg_id(env, sa);
sbin/iked/ikev2_msg.c
783
if ((e = ikev2_msg_encrypt(env, sa, e, buf)) == NULL) {
sbin/iked/ikev2_msg.c
791
if (ikev2_msg_integr(env, sa, buf) != 0) {
sbin/iked/ikev2_msg.c
801
(void)ikev2_pld_parse(env, hdr, &resp, 0);
sbin/iked/ikev2_msg.c
803
ret = ikev2_msg_send(env, &resp);
sbin/iked/ikev2_msg.c
808
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2_msg.c
814
ikev2_send_encrypted_fragments(struct iked *env, struct iked_sa *sa,
sbin/iked/ikev2_msg.c
83
env->sc_nattport) {
sbin/iked/ikev2_msg.c
833
ikestat_inc(env, ikes_frag_send_failures);
sbin/iked/ikev2_msg.c
852
msgid = response ? sa->sa_msgid_current : ikev2_msg_id(env, sa);
sbin/iked/ikev2_msg.c
855
if ((buf = ikev2_msg_init(env, &resp, &sa->sa_peer.addr,
sbin/iked/ikev2_msg.c
891
if ((e = ikev2_msg_encrypt(env, sa, e, buf)) == NULL) {
sbin/iked/ikev2_msg.c
899
if (ikev2_msg_integr(env, sa, buf) != 0) {
sbin/iked/ikev2_msg.c
914
if (ikev2_msg_send(env, &resp) == -1)
sbin/iked/ikev2_msg.c
917
ikestat_inc(env, ikes_frag_sent);
sbin/iked/ikev2_msg.c
926
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2_msg.c
933
ikev2_msg_cleanup(env, &resp);
sbin/iked/ikev2_msg.c
935
ikestat_inc(env, ikes_frag_send_failures);
sbin/iked/ikev2_msg.c
940
ikev2_msg_auth(struct iked *env, struct iked_sa *sa, int response)
sbin/iked/ikev2_pld.c
104
int ikev2_pld_ef(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1048
ikev2_pld_notify(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
106
int ikev2_frags_reassemble(struct iked *env,
sbin/iked/ikev2_pld.c
1086
if (ikev2_nat_detection(env, msg, md, sizeof(md), type,
sbin/iked/ikev2_pld.c
118
ikev2_pld_parse(struct iked *env, struct ike_header *hdr,
sbin/iked/ikev2_pld.c
1407
ikev2_pld_delete(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
141
return (ikev2_pld_payloads(env, msg, offset,
sbin/iked/ikev2_pld.c
1473
ikev2_pld_tss(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1504
if (ikev2_pld_ts(env, pld, msg, offset, ts_len, ts.ts_type))
sbin/iked/ikev2_pld.c
1544
ikev2_pld_ts(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1633
ikev2_pld_ef(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1659
ikestat_inc(env, ikes_frag_rcvd);
sbin/iked/ikev2_pld.c
1685
if ((e = ikev2_msg_decrypt(env, msg->msg_sa, msg->msg_data, e))
sbin/iked/ikev2_pld.c
1742
ret = ikev2_frags_reassemble(env, pld, msg);
sbin/iked/ikev2_pld.c
1750
ikestat_inc(env, ikes_frag_rcvd_drop);
sbin/iked/ikev2_pld.c
1754
ikestat_add(env, ikes_frag_rcvd_drop, sa_frag->frag_count + 1);
sbin/iked/ikev2_pld.c
1761
ikev2_frags_reassemble(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1800
ikev2_msg_flushqueue(env, &msg->msg_sa->sa_requests);
sbin/iked/ikev2_pld.c
1812
ret = ikev2_pld_payloads(env, &emsg, 0, ibuf_size(e),
sbin/iked/ikev2_pld.c
1817
ikestat_add(env, ikes_frag_reass_ok, sa_frag->frag_total);
sbin/iked/ikev2_pld.c
1819
ikestat_add(env, ikes_frag_reass_drop, sa_frag->frag_total);
sbin/iked/ikev2_pld.c
1827
ikev2_pld_e(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
1852
e = ikev2_msg_decrypt(env, msg->msg_sa, msg->msg_data, e);
sbin/iked/ikev2_pld.c
1855
e = ikev2_msg_decrypt(env, msg->msg_sa, msg->msg_data, e);
sbin/iked/ikev2_pld.c
186
ikev2_pld_payloads(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2_pld.c
1872
ret = ikev2_pld_payloads(env, &emsg, 0, ibuf_size(e),
sbin/iked/ikev2_pld.c
1898
ikev2_pld_cp(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
2088
ikev2_pld_eap(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
2122
if (eap_parse(env, sa, msg, eap, msg->msg_response) == -1)
sbin/iked/ikev2_pld.c
2141
ikev2_pld_parse_quick(struct iked *env, struct ike_header *hdr,
sbin/iked/ikev2_pld.c
222
ret = ikev2_pld_sa(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
226
ret = ikev2_pld_ke(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
230
ret = ikev2_pld_id(env, &pld, msg, offset, left,
sbin/iked/ikev2_pld.c
234
ret = ikev2_pld_cert(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
238
ret = ikev2_pld_certreq(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
241
ret = ikev2_pld_auth(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
245
ret = ikev2_pld_nonce(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
249
ret = ikev2_pld_notify(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
252
ret = ikev2_pld_delete(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
256
ret = ikev2_pld_tss(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
259
ret = ikev2_pld_e(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
262
ret = ikev2_pld_ef(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
265
ret = ikev2_pld_cp(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
268
ret = ikev2_pld_eap(env, &pld, msg, offset, left);
sbin/iked/ikev2_pld.c
277
(void)ikev2_send_informational(env, msg);
sbin/iked/ikev2_pld.c
343
ikev2_pld_sa(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
438
r = ikev2_pld_xform(env, msg, offset, total);
sbin/iked/ikev2_pld.c
490
ikev2_pld_xform(struct iked *env, struct iked_message *msg,
sbin/iked/ikev2_pld.c
540
if (ikev2_pld_attr(env, &xfrm, msg, offset + sizeof(xfrm),
sbin/iked/ikev2_pld.c
565
ret = ikev2_pld_xform(env, msg, offset, total);
sbin/iked/ikev2_pld.c
593
ikev2_pld_attr(struct iked *env, struct ikev2_transform *xfrm,
sbin/iked/ikev2_pld.c
641
ret = ikev2_pld_attr(env, xfrm, msg, offset, total);
sbin/iked/ikev2_pld.c
664
ikev2_pld_ke(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
727
ikev2_pld_id(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
810
ikev2_pld_cert(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
885
ikev2_pld_certreq(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
959
ikev2_pld_auth(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ikev2_pld.c
999
ikev2_pld_nonce(struct iked *env, struct ikev2_payload *pld,
sbin/iked/ocsp.c
102
else if (env->sc_ocsp_url)
sbin/iked/ocsp.c
103
url = env->sc_ocsp_url;
sbin/iked/ocsp.c
148
oc->oc_sock.sock_env = env;
sbin/iked/ocsp.c
172
ocsp_connect_finish(env, fd, oc);
sbin/iked/ocsp.c
183
ocsp_connect_finish(env, -1, oc);
sbin/iked/ocsp.c
224
ocsp_connect_finish(struct iked *env, int fd, struct ocsp_connect *oc)
sbin/iked/ocsp.c
238
ret = proc_composev_imsg(&env->sc_ps, PROC_CERT, -1,
sbin/iked/ocsp.c
247
ret = proc_composev_imsg(&env->sc_ps, PROC_CERT, -1,
sbin/iked/ocsp.c
265
ocsp_validate_cert(struct iked *env, void *data, size_t len,
sbin/iked/ocsp.c
287
ocsp->ocsp_env = env;
sbin/iked/ocsp.c
306
TAILQ_INSERT_TAIL(&env->sc_ocsp, ioe, ioe_entry);
sbin/iked/ocsp.c
322
ret = proc_composev(&env->sc_ps, PROC_PARENT, IMSG_OCSP_FD,
sbin/iked/ocsp.c
357
ocsp_receive_fd(struct iked *env, struct imsg *imsg)
sbin/iked/ocsp.c
379
TAILQ_FOREACH(ioe, &env->sc_ocsp, ioe_entry) {
sbin/iked/ocsp.c
390
TAILQ_REMOVE(&env->sc_ocsp, ioe, ioe_entry);
sbin/iked/ocsp.c
402
sock->sock_env = env;
sbin/iked/ocsp.c
513
struct iked *env = ocsp->ocsp_env;
sbin/iked/ocsp.c
573
if (env->sc_ocsp_tolerate &&
sbin/iked/ocsp.c
574
!OCSP_check_validity(thisupd, nextupd, env->sc_ocsp_tolerate,
sbin/iked/ocsp.c
575
env->sc_ocsp_maxage)) {
sbin/iked/ocsp.c
605
struct iked *env = ocsp->ocsp_env;
sbin/iked/ocsp.c
615
ret = proc_composev(&env->sc_ps, PROC_IKEV2, cmd, iov, iovcnt);
sbin/iked/ocsp.c
78
ocsp_connect(struct iked *env, struct imsg *imsg)
sbin/iked/parse.y
1302
if ((ret = config_setradserver(env, ai->ai_addr,
sbin/iked/parse.y
1356
config_setradcfgmap(env, cfgtype, $5.vendorid,
sbin/iked/parse.y
1379
if ((ret = config_setraddae(env, ai->ai_addr,
sbin/iked/parse.y
1405
config_setradclient(env, ai->ai_addr, ai->ai_addrlen,
sbin/iked/parse.y
2013
env = x_env;
sbin/iked/parse.y
2037
if (env->sc_opts & IKED_OPT_PASSIVE)
sbin/iked/parse.y
2044
env->sc_passive = passive ? 1 : 0;
sbin/iked/parse.y
2045
env->sc_decoupled = decouple ? 1 : 0;
sbin/iked/parse.y
2046
env->sc_mobike = mobike;
sbin/iked/parse.y
2047
env->sc_enforcesingleikesa = enforcesingleikesa;
sbin/iked/parse.y
2048
env->sc_stickyaddress = stickyaddress;
sbin/iked/parse.y
2049
env->sc_frag = fragmentation;
sbin/iked/parse.y
2050
env->sc_alive_timeout = dpd_interval;
sbin/iked/parse.y
2051
env->sc_ocsp_url = ocsp_url;
sbin/iked/parse.y
2052
env->sc_ocsp_tolerate = ocsp_tolerate;
sbin/iked/parse.y
2053
env->sc_ocsp_maxage = ocsp_maxage;
sbin/iked/parse.y
2054
env->sc_cert_partial_chain = cert_partial_chain;
sbin/iked/parse.y
2055
env->sc_vendorid = vendorid;
sbin/iked/parse.y
2056
env->sc_radauth = radauth;
sbin/iked/parse.y
2057
env->sc_radacct = radacct;
sbin/iked/parse.y
2738
pol.pol_certreqtype = env->sc_certreqtype;
sbin/iked/parse.y
3152
config_setpolicy(env, &pol, PROC_IKEV2);
sbin/iked/parse.y
3153
config_setflow(env, &pol, PROC_IKEV2);
sbin/iked/parse.y
3365
config_setuser(env, &usr, PROC_IKEV2);
sbin/iked/parse.y
98
static struct iked *env = NULL;
sbin/iked/pfkey.c
1042
pfkey_sa_last_used(struct iked *env, struct iked_childsa *sa, uint64_t *last_used)
sbin/iked/pfkey.c
1044
return pfkey_sa_lookup(env, sa, last_used, NULL);
sbin/iked/pfkey.c
1048
pfkey_sa_check_exists(struct iked *env, struct iked_childsa *sa)
sbin/iked/pfkey.c
1050
return pfkey_sa_lookup(env, sa, NULL, NULL);
sbin/iked/pfkey.c
1054
pfkey_sa_sastats(struct iked *env, struct iked_childsa *sa,
sbin/iked/pfkey.c
1057
return pfkey_sa_lookup(env, sa, NULL, stats);
sbin/iked/pfkey.c
1061
pfkey_sa_getspi(struct iked *env, uint8_t satype, struct iked_childsa *sa,
sbin/iked/pfkey.c
1157
if ((ret = pfkey_write(env, &smsg, iov, iov_cnt, &data, &n)) != 0)
sbin/iked/pfkey.c
1182
pfkey_sagroup(struct iked *env, uint8_t satype1, uint8_t action,
sbin/iked/pfkey.c
128
pfkey_couple(struct iked *env, struct iked_sas *sas, int couple)
sbin/iked/pfkey.c
1338
return (pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL));
sbin/iked/pfkey.c
1342
pfkey_write(struct iked *env, struct sadb_msg *smsg, struct iovec *iov, int iov_cnt,
sbin/iked/pfkey.c
136
if (env->sc_pfkey == -1)
sbin/iked/pfkey.c
1364
event_del(&env->sc_pfkeyev);
sbin/iked/pfkey.c
1366
if ((n = writev(env->sc_pfkey, iov, iov_cnt)) == -1) {
sbin/iked/pfkey.c
1375
ret = pfkey_reply(env->sc_pfkey, datap, lenp);
sbin/iked/pfkey.c
1377
event_add(&env->sc_pfkeyev, NULL);
sbin/iked/pfkey.c
1481
pfkey_flow_add(struct iked *env, struct iked_flow *flow)
sbin/iked/pfkey.c
1491
if (pfkey_flow(env, satype, SADB_X_ADDFLOW, flow) == -1)
sbin/iked/pfkey.c
1500
pfkey_flow_delete(struct iked *env, struct iked_flow *flow)
sbin/iked/pfkey.c
151
(void)pfkey_sa_add(env, csa, NULL);
sbin/iked/pfkey.c
1510
if (pfkey_flow(env, satype, SADB_X_DELFLOW, flow) == -1)
sbin/iked/pfkey.c
1519
pfkey_sa_init(struct iked *env, struct iked_childsa *sa, uint32_t *spi)
sbin/iked/pfkey.c
1526
if (pfkey_sa_getspi(env, satype, sa, spi) == -1)
sbin/iked/pfkey.c
153
(void)pfkey_sa_delete(env, csa);
sbin/iked/pfkey.c
1535
pfkey_sa_add(struct iked *env, struct iked_childsa *sa, struct iked_childsa *last)
sbin/iked/pfkey.c
1552
rval = pfkey_sa(env, satype, cmd, sa);
sbin/iked/pfkey.c
1557
if (pfkey_sa_check_exists(env, sa) == 0) {
sbin/iked/pfkey.c
156
(void)pfkey_sa_add(env, ipcomp, csa);
sbin/iked/pfkey.c
1563
(void)pfkey_sa_delete(env, sa);
sbin/iked/pfkey.c
1570
if (pfkey_sa(env, satype, SADB_ADD, sa) == -1)
sbin/iked/pfkey.c
1579
if (pfkey_sagroup(env, satype,
sbin/iked/pfkey.c
158
(void)pfkey_sa_delete(env, ipcomp);
sbin/iked/pfkey.c
1581
(void)pfkey_sa_delete(env, sa);
sbin/iked/pfkey.c
1591
pfkey_sa_update_addresses(struct iked *env, struct iked_childsa *sa)
sbin/iked/pfkey.c
1605
return pfkey_sa(env, satype, IKED_SADB_UPDATE_SA_ADDRESSES, sa);
sbin/iked/pfkey.c
1609
pfkey_sa_delete(struct iked *env, struct iked_childsa *sa)
sbin/iked/pfkey.c
1622
pfkey_sa_sastats(env, sa, &sas);
sbin/iked/pfkey.c
1624
if (pfkey_sa(env, satype, SADB_DELETE, sa) == -1 &&
sbin/iked/pfkey.c
1625
pfkey_sa_check_exists(env, sa) == 0)
sbin/iked/pfkey.c
163
(void)pfkey_flow_add(env, flow);
sbin/iked/pfkey.c
1641
pfkey_flush(struct iked *env)
sbin/iked/pfkey.c
165
(void)pfkey_flow_delete(env, flow);
sbin/iked/pfkey.c
1661
return (pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL));
sbin/iked/pfkey.c
1712
pfkey_socket(struct iked *env)
sbin/iked/pfkey.c
1726
pfkey_init(struct iked *env, int fd)
sbin/iked/pfkey.c
1736
evtimer_set(&pfkey_timer_ev, pfkey_timer_cb, env);
sbin/iked/pfkey.c
1739
env->sc_pfkey = fd;
sbin/iked/pfkey.c
1740
event_set(&env->sc_pfkeyev, env->sc_pfkey,
sbin/iked/pfkey.c
1741
EV_READ|EV_PERSIST, pfkey_dispatch, env);
sbin/iked/pfkey.c
1742
event_add(&env->sc_pfkeyev, NULL);
sbin/iked/pfkey.c
1744
pfkey_flush(env);
sbin/iked/pfkey.c
1758
if (pfkey_write(env, &smsg, &iov, 1, NULL, NULL))
sbin/iked/pfkey.c
1772
if (pfkey_write(env, &smsg, &iov, 1, NULL, NULL))
sbin/iked/pfkey.c
1795
struct iked *env = (struct iked *)arg;
sbin/iked/pfkey.c
1826
pfkey_timer_cb(0, 0, env);
sbin/iked/pfkey.c
1831
if (pfkey_process(env, &pm) == -1 &&
sbin/iked/pfkey.c
1846
struct iked *env = arg;
sbin/iked/pfkey.c
1853
if (pfkey_process(env, pm) == -1) {
sbin/iked/pfkey.c
1873
pfkey_process(struct iked *env, struct pfkey_message *pm)
sbin/iked/pfkey.c
188
pfkey_flow(struct iked *env, uint8_t satype, uint8_t action, struct iked_flow *flow)
sbin/iked/pfkey.c
1895
if (!env || !data || !len)
sbin/iked/pfkey.c
1952
if (pfkey_write(env, &smsg, iov, iov_cnt, &reply, &rlen)) {
sbin/iked/pfkey.c
2069
ret = ikev2_child_sa_acquire(env, &flow);
sbin/iked/pfkey.c
2116
ret = ikev2_child_sa_rekey(env, &spi);
sbin/iked/pfkey.c
2118
ret = ikev2_child_sa_drop(env, &spi);
sbin/iked/pfkey.c
449
ret = pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL);
sbin/iked/pfkey.c
458
pfkey_sa(struct iked *env, uint8_t satype, uint8_t action, struct iked_childsa *sa)
sbin/iked/pfkey.c
869
ret = pfkey_write(env, &smsg, iov, iov_cnt, NULL, NULL);
sbin/iked/pfkey.c
878
pfkey_sa_lookup(struct iked *env, struct iked_childsa *sa, uint64_t *last_used,
sbin/iked/pfkey.c
997
if ((ret = pfkey_write(env, &smsg, iov, iov_cnt, &data, &n)) != 0)
sbin/iked/policy.c
131
if ((msg->msg_policy = policy_test(env, &pol)) != NULL) {
sbin/iked/policy.c
138
if ((msg->msg_policy = env->sc_defaultcon) != NULL)
sbin/iked/policy.c
153
policy_lookup_sa(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
208
if ((pol_found = policy_test(env, &pol)) != NULL) {
sbin/iked/policy.c
227
policy_test(struct iked *env, struct iked_policy *key)
sbin/iked/policy.c
231
p = TAILQ_FIRST(&env->sc_policies);
sbin/iked/policy.c
359
policy_ref(struct iked *env, struct iked_policy *pol)
sbin/iked/policy.c
366
policy_unref(struct iked *env, struct iked_policy *pol)
sbin/iked/policy.c
371
config_free_policy(env, pol);
sbin/iked/policy.c
385
sa_state(struct iked *env, struct iked_sa *sa, int state)
sbin/iked/policy.c
421
ikestat_inc(env, ikes_sa_established_total);
sbin/iked/policy.c
422
ikestat_inc(env, ikes_sa_established_current);
sbin/iked/policy.c
428
ikestat_dec(env, ikes_sa_established_current);
sbin/iked/policy.c
434
ikestat_inc(env, ikes_sa_established_failures);
sbin/iked/policy.c
488
sa_new(struct iked *env, uint64_t ispi, uint64_t rspi,
sbin/iked/policy.c
497
(sa = sa_lookup(env, ispi, rspi, initiator)) == NULL) {
sbin/iked/policy.c
504
sa = config_new_sa(env, initiator);
sbin/iked/policy.c
511
old = RB_INSERT(iked_sas, &env->sc_sas, sa);
sbin/iked/policy.c
514
config_free_sa(env, sa);
sbin/iked/policy.c
525
policy_ref(env, pol);
sbin/iked/policy.c
552
sa_free(env, sa);
sbin/iked/policy.c
59
policy_init(struct iked *env)
sbin/iked/policy.c
602
sa_free(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
61
TAILQ_INIT(&env->sc_policies);
sbin/iked/policy.c
615
RB_REMOVE(iked_sas, &env->sc_sas, sa->sa_nexti);
sbin/iked/policy.c
619
sa_dstid_remove(env, sa->sa_nexti);
sbin/iked/policy.c
62
TAILQ_INIT(&env->sc_ocsp);
sbin/iked/policy.c
621
config_free_sa(env, sa->sa_nexti);
sbin/iked/policy.c
624
RB_REMOVE(iked_sas, &env->sc_sas, sa->sa_nextr);
sbin/iked/policy.c
628
sa_dstid_remove(env, sa->sa_nextr);
sbin/iked/policy.c
63
TAILQ_INIT(&env->sc_radauthservers);
sbin/iked/policy.c
630
config_free_sa(env, sa->sa_nextr);
sbin/iked/policy.c
64
TAILQ_INIT(&env->sc_radacctservers);
sbin/iked/policy.c
65
TAILQ_INIT(&env->sc_radcfgmaps);
sbin/iked/policy.c
657
RB_REMOVE(iked_sas, &env->sc_sas, sa);
sbin/iked/policy.c
659
sa_dstid_remove(env, sa);
sbin/iked/policy.c
66
TAILQ_INIT(&env->sc_raddaes);
sbin/iked/policy.c
660
config_free_sa(env, sa);
sbin/iked/policy.c
664
sa_free_flows(struct iked *env, struct iked_saflows *head)
sbin/iked/policy.c
67
TAILQ_INIT(&env->sc_raddaeclients);
sbin/iked/policy.c
672
RB_REMOVE(iked_flows, &env->sc_activeflows, flow);
sbin/iked/policy.c
674
(void)pfkey_flow_delete(env, flow);
sbin/iked/policy.c
68
RB_INIT(&env->sc_users);
sbin/iked/policy.c
69
RB_INIT(&env->sc_sas);
sbin/iked/policy.c
695
sa_configure_iface(struct iked *env, struct iked_sa *sa, int add)
sbin/iked/policy.c
70
RB_INIT(&env->sc_dstid_sas);
sbin/iked/policy.c
705
if (vroute_setdns(env, add,
sbin/iked/policy.c
71
RB_INIT(&env->sc_activesas);
sbin/iked/policy.c
715
if (vroute_setaddr(env, add,
sbin/iked/policy.c
72
RB_INIT(&env->sc_activeflows);
sbin/iked/policy.c
721
if (vroute_setaddr(env, add,
sbin/iked/policy.c
729
if (vroute_setcloneroute(env, getrtable(),
sbin/iked/policy.c
733
if (vroute_setdelroute(env, getrtable(),
sbin/iked/policy.c
762
if (vroute_setaddroute(env, rdomain,
sbin/iked/policy.c
767
if (vroute_setdelroute(env, rdomain,
sbin/iked/policy.c
822
sa_lookup(struct iked *env, uint64_t ispi, uint64_t rspi,
sbin/iked/policy.c
830
if ((sa = RB_FIND(iked_sas, &env->sc_sas, &key)) != NULL) {
sbin/iked/policy.c
86
policy_lookup(struct iked *env, struct iked_message *msg,
sbin/iked/policy.c
874
sa_dstid_lookup(struct iked *env, struct iked_sa *key)
sbin/iked/policy.c
880
sa = RB_FIND(iked_dstid_sas, &env->sc_dstid_sas, key);
sbin/iked/policy.c
887
sa_dstid_insert(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
895
osa = RB_FIND(iked_dstid_sas, &env->sc_dstid_sas, sa);
sbin/iked/policy.c
897
osa = RB_INSERT(iked_dstid_sas, &env->sc_dstid_sas, sa);
sbin/iked/policy.c
911
sa_dstid_remove(struct iked *env, struct iked_sa *sa)
sbin/iked/policy.c
917
RB_REMOVE(iked_dstid_sas, &env->sc_dstid_sas, sa);
sbin/iked/policy.c
970
user_lookup(struct iked *env, const char *user)
sbin/iked/policy.c
978
return (RB_FIND(iked_users, &env->sc_users, &key));
sbin/iked/radius.c
124
iked_radius_request_send(env, sa->sa_radreq);
sbin/iked/radius.c
130
iked_radius_request_free(struct iked *env, struct iked_radserver_req *req)
sbin/iked/radius.c
134
timer_del(env, &req->rr_timer);
sbin/iked/radius.c
149
struct iked *env;
sbin/iked/radius.c
164
env = server->rs_env;
sbin/iked/radius.c
202
iked_radius_request_free(env, req);
sbin/iked/radius.c
214
timer_del(env, &req->rr_timer);
sbin/iked/radius.c
283
sa_state(env, req->rr_sa, IKEV2_STATE_AUTH_SUCCESS);
sbin/iked/radius.c
286
if (TAILQ_EMPTY(&env->sc_radcfgmaps)) {
sbin/iked/radius.c
293
TAILQ_FOREACH(cfgmap, &env->sc_radcfgmaps, entry)
sbin/iked/radius.c
333
ikev2_send_ike_e(env, req->rr_sa, e, IKEV2_PAYLOAD_EAP,
sbin/iked/radius.c
346
sa_free(env, req->rr_sa);
sbin/iked/radius.c
351
iked_radius_request_send(struct iked *env, void *ctx)
sbin/iked/radius.c
364
max_tries = env->sc_radauth.max_tries;
sbin/iked/radius.c
365
max_failovers = env->sc_radauth.max_failovers;
sbin/iked/radius.c
366
radservers = &env->sc_radauthservers;
sbin/iked/radius.c
368
max_tries = env->sc_radacct.max_tries;
sbin/iked/radius.c
369
max_failovers = env->sc_radacct.max_failovers;
sbin/iked/radius.c
370
radservers = &env->sc_radacctservers;
sbin/iked/radius.c
494
timer_add(env, &req->rr_timer, timeouts[nitems(timeouts) - 1]);
sbin/iked/radius.c
496
timer_add(env, &req->rr_timer, timeouts[req->rr_ntry]);
sbin/iked/radius.c
505
sa_free(env, req->rr_sa);
sbin/iked/radius.c
649
iked_radius_acct_on(struct iked *env)
sbin/iked/radius.c
651
if (TAILQ_EMPTY(&env->sc_radacctservers))
sbin/iked/radius.c
653
if (env->sc_radaccton == 0) { /* trigger once */
sbin/iked/radius.c
654
iked_radius_acct_request(env, NULL,
sbin/iked/radius.c
656
env->sc_radaccton = 1;
sbin/iked/radius.c
66
iked_radius_request(struct iked *env, struct iked_sa *sa,
sbin/iked/radius.c
661
iked_radius_acct_off(struct iked *env)
sbin/iked/radius.c
663
iked_radius_acct_request(env, NULL, RADIUS_ACCT_STATUS_TYPE_ACCT_OFF);
sbin/iked/radius.c
667
iked_radius_acct_start(struct iked *env, struct iked_sa *sa)
sbin/iked/radius.c
669
iked_radius_acct_request(env, sa, RADIUS_ACCT_STATUS_TYPE_START);
sbin/iked/radius.c
673
iked_radius_acct_stop(struct iked *env, struct iked_sa *sa)
sbin/iked/radius.c
675
iked_radius_acct_request(env, sa, RADIUS_ACCT_STATUS_TYPE_STOP);
sbin/iked/radius.c
679
iked_radius_acct_request(struct iked *env, struct iked_sa *sa, uint8_t stype)
sbin/iked/radius.c
691
if (TAILQ_EMPTY(&env->sc_radacctservers))
sbin/iked/radius.c
713
timer_set(env, &req->rr_timer, iked_radius_request_send, req);
sbin/iked/radius.c
730
iked_radius_request_send(env, req);
sbin/iked/radius.c
812
iked_radius_request_send(env, req);
sbin/iked/radius.c
819
struct iked *env = dae->rd_env;
sbin/iked/radius.c
841
TAILQ_FOREACH(client, &env->sc_raddaeclients, rc_entry) {
sbin/iked/radius.c
89
timer_set(env, &sa->sa_radreq->rr_timer,
sbin/iked/radius.c
898
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/radius.c
912
ikev2_ike_sa_delete(env, sa);
sbin/iked/radius.c
915
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/radius.c
919
ikev2_ike_sa_delete(env, sa);
sbin/iked/radius.c
925
RB_FOREACH(sa, iked_sas, &env->sc_sas) {
sbin/iked/radius.c
931
ikev2_ike_sa_delete(env, sa);
sbin/iked/timer.c
37
timer_set(struct iked *env, struct iked_timer *tmr,
sbin/iked/timer.c
44
tmr->tmr_env = env;
sbin/iked/timer.c
51
timer_add(struct iked *env, struct iked_timer *tmr, int timeout)
sbin/iked/timer.c
59
timer_del(struct iked *env, struct iked_timer *tmr)
sbin/iked/timer.c
61
if (tmr->tmr_env == env && tmr->tmr_cb &&
sbin/iked/vroute.c
106
struct iked *env = (struct iked *) arg;
sbin/iked/vroute.c
107
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
142
vroute_dodns(env, (struct sockaddr *) &dns->vd_addr,
sbin/iked/vroute.c
154
vroute_init(struct iked *env)
sbin/iked/vroute.c
183
env->sc_vroute = ivr;
sbin/iked/vroute.c
186
vroute_rtmsg_cb, env);
sbin/iked/vroute.c
191
vroute_cleanup(struct iked *env)
sbin/iked/vroute.c
194
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
201
vroute_doaddr(env, ifname,
sbin/iked/vroute.c
209
vroute_doroute(env, RTF_UP | RTF_GATEWAY | RTF_STATIC,
sbin/iked/vroute.c
219
vroute_dodns(env, (struct sockaddr *)&dns->vd_addr, 0,
sbin/iked/vroute.c
227
vroute_setaddr(struct iked *env, int add, struct sockaddr *addr,
sbin/iked/vroute.c
269
return (proc_composev(&env->sc_ps, PROC_PARENT,
sbin/iked/vroute.c
274
vroute_getaddr(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
317
vroute_insertaddr(env, ifidx, addr, mask);
sbin/iked/vroute.c
319
vroute_removeaddr(env, ifidx, addr, mask);
sbin/iked/vroute.c
322
return (vroute_doaddr(env, ifname, addr, mask, add));
sbin/iked/vroute.c
326
vroute_setdns(struct iked *env, int add, struct sockaddr *addr,
sbin/iked/vroute.c
337
return (proc_composev(&env->sc_ps, PROC_PARENT,
sbin/iked/vroute.c
342
vroute_getdns(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
370
vroute_insertdns(env, ifidx, dns);
sbin/iked/vroute.c
372
vroute_removedns(env, ifidx, dns);
sbin/iked/vroute.c
375
return (vroute_dodns(env, dns, add, ifidx));
sbin/iked/vroute.c
379
vroute_insertroute(struct iked *env, int rdomain, struct sockaddr *dest,
sbin/iked/vroute.c
382
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
403
vroute_removeroute(struct iked *env, int rdomain, struct sockaddr *dest,
sbin/iked/vroute.c
406
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
425
vroute_insertdns(struct iked *env, int ifidx, struct sockaddr *addr)
sbin/iked/vroute.c
427
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
441
vroute_removedns(struct iked *env, int ifidx, struct sockaddr *addr)
sbin/iked/vroute.c
443
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
458
vroute_insertaddr(struct iked *env, int ifidx, struct sockaddr *addr,
sbin/iked/vroute.c
461
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
476
vroute_removeaddr(struct iked *env, int ifidx, struct sockaddr *addr,
sbin/iked/vroute.c
479
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
495
vroute_setaddroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
498
return (vroute_setroute(env, rdomain, dst, mask, ifa,
sbin/iked/vroute.c
503
vroute_setcloneroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
506
return (vroute_setroute(env, rdomain, dst, mask, addr,
sbin/iked/vroute.c
511
vroute_setdelroute(struct iked *env, uint8_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
514
return (vroute_setroute(env, rdomain, dst, mask, addr,
sbin/iked/vroute.c
519
vroute_setroute(struct iked *env, uint32_t rdomain, struct sockaddr *dst,
sbin/iked/vroute.c
570
return (proc_composev(&env->sc_ps, PROC_PARENT, type, iov, iovcnt));
sbin/iked/vroute.c
574
vroute_getroute(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
639
vroute_insertroute(env, rdomain, dest, mask);
sbin/iked/vroute.c
641
vroute_removeroute(env, rdomain, dest, mask);
sbin/iked/vroute.c
642
return (vroute_doroute(env, flags, addrs, rdomain, type,
sbin/iked/vroute.c
647
vroute_getcloneroute(struct iked *env, struct imsg *imsg)
sbin/iked/vroute.c
684
if (vroute_doroute(env, flags, RTA_DST, rdomain, RTM_GET,
sbin/iked/vroute.c
694
vroute_insertroute(env, rdomain, (struct sockaddr *)&dest, NULL);
sbin/iked/vroute.c
698
return (vroute_doroute(env, flags, addrs, rdomain, RTM_ADD,
sbin/iked/vroute.c
704
vroute_dodns(struct iked *env, struct sockaddr *dns, int add,
sbin/iked/vroute.c
711
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
771
vroute_doroute(struct iked *env, int flags, int addrs, int rdomain, uint8_t type,
sbin/iked/vroute.c
776
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/iked/vroute.c
862
return (vroute_process(env, len, &m_rtmsg, dest, mask, addr, need_gw));
sbin/iked/vroute.c
870
vroute_process(struct iked *env, int msglen, struct vroute_msg *m_rtmsg,
sbin/iked/vroute.c
919
vroute_doaddr(struct iked *env, char *ifname, struct sockaddr *addr,
sbin/iked/vroute.c
922
struct iked_vroute_sc *ivr = env->sc_vroute;
sbin/unwind/libunbound/daemon/worker.h
134
struct module_env env;
sbin/unwind/libunbound/dns64/dns64.c
1011
!dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
sbin/unwind/libunbound/dns64/dns64.c
1038
dns64_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/dns64/dns64.c
1040
struct dns64_env* dns64_env = (struct dns64_env*)env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
402
dns64_init(struct module_env* env, int id)
sbin/unwind/libunbound/dns64/dns64.c
410
env->modinfo[id] = (void*)dns64_env;
sbin/unwind/libunbound/dns64/dns64.c
412
if (!dns64_apply_cfg(dns64_env, env->cfg)) {
sbin/unwind/libunbound/dns64/dns64.c
436
dns64_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/dns64/dns64.c
439
if (!env)
sbin/unwind/libunbound/dns64/dns64.c
441
dns64_env = (struct dns64_env*)env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
446
free(env->modinfo[id]);
sbin/unwind/libunbound/dns64/dns64.c
447
env->modinfo[id] = NULL;
sbin/unwind/libunbound/dns64/dns64.c
462
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
498
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
sbin/unwind/libunbound/dns64/dns64.c
499
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0, 0,
sbin/unwind/libunbound/dns64/dns64.c
524
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
sbin/unwind/libunbound/dns64/dns64.c
525
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0,
sbin/unwind/libunbound/dns64/dns64.c
551
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
576
int synth_all_cfg = qstate->env->cfg->dns64_synthall;
sbin/unwind/libunbound/dns64/dns64.c
659
qstate->env, &qstate->qinfo, qstate->return_msg->rep,
sbin/unwind/libunbound/dns64/dns64.c
822
struct dns64_env* dns64_env = (struct dns64_env*)super->env->modinfo[id];
sbin/unwind/libunbound/dns64/dns64.c
877
rrset_cache_remove(super->env->rrset_cache, dk->rk.dname,
sbin/unwind/libunbound/dns64/dns64.c
883
msg_cache_remove(super->env, dk->rk.dname,
sbin/unwind/libunbound/dns64/dns64.h
53
int dns64_init(struct module_env* env, int id);
sbin/unwind/libunbound/dns64/dns64.h
56
void dns64_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/dns64/dns64.h
69
size_t dns64_get_mem(struct module_env* env, int id);
sbin/unwind/libunbound/dnscrypt/dnscrypt.h
107
int dnsc_apply_cfg(struct dnsc_env *env, struct config_file *cfg);
sbin/unwind/libunbound/dnscrypt/dnscrypt.h
113
void dnsc_delete(struct dnsc_env *env);
sbin/unwind/libunbound/dnstap/dnstap.h
107
dt_apply_cfg(struct dt_env *env, struct config_file *cfg);
sbin/unwind/libunbound/dnstap/dnstap.h
114
void dt_apply_logcfg(struct dt_env *env, struct config_file *cfg);
sbin/unwind/libunbound/dnstap/dnstap.h
123
dt_init(struct dt_env *env, struct comm_base* base);
sbin/unwind/libunbound/dnstap/dnstap.h
128
void dt_deinit(struct dt_env *env);
sbin/unwind/libunbound/dnstap/dnstap.h
135
dt_delete(struct dt_env *env);
sbin/unwind/libunbound/dnstap/dnstap.h
147
dt_msg_send_client_query(struct dt_env *env,
sbin/unwind/libunbound/dnstap/dnstap.h
164
dt_msg_send_client_response(struct dt_env *env,
sbin/unwind/libunbound/dnstap/dnstap.h
184
dt_msg_send_outside_query(struct dt_env *env,
sbin/unwind/libunbound/dnstap/dnstap.h
209
dt_msg_send_outside_response(struct dt_env *env,
sbin/unwind/libunbound/iterator/iter_scrub.c
1009
} else if(!env->cfg->harden_glue && (
sbin/unwind/libunbound/iterator/iter_scrub.c
1015
store_rrset(pkt, msg, env, rrset);
sbin/unwind/libunbound/iterator/iter_scrub.c
1048
if(env->cfg->harden_unverified_glue && ns_rrset_dname &&
sbin/unwind/libunbound/iterator/iter_scrub.c
1063
store_rrset(pkt, msg, env, rrset);
sbin/unwind/libunbound/iterator/iter_scrub.c
1077
struct module_env* env, struct module_qstate* qstate,
sbin/unwind/libunbound/iterator/iter_scrub.c
1108
if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename))
sbin/unwind/libunbound/iterator/iter_scrub.c
1111
if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate))
sbin/unwind/libunbound/iterator/iter_scrub.c
427
struct module_env* env, uint8_t* zonename)
sbin/unwind/libunbound/iterator/iter_scrub.c
448
if(cname_length > env->cfg->iter_scrub_cname) {
sbin/unwind/libunbound/iterator/iter_scrub.c
572
rrset->rr_count > env->cfg->iter_scrub_ns) {
sbin/unwind/libunbound/iterator/iter_scrub.c
573
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
sbin/unwind/libunbound/iterator/iter_scrub.c
591
rrset->rr_count > env->cfg->iter_scrub_ns) {
sbin/unwind/libunbound/iterator/iter_scrub.c
592
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
sbin/unwind/libunbound/iterator/iter_scrub.c
617
if(env->cfg->harden_unknown_additional &&
sbin/unwind/libunbound/iterator/iter_scrub.c
655
env->cfg->iter_scrub_promiscuous) {
sbin/unwind/libunbound/iterator/iter_scrub.c
662
&& env->cfg->iter_scrub_promiscuous) {
sbin/unwind/libunbound/iterator/iter_scrub.c
678
&& env->cfg->iter_scrub_promiscuous) {
sbin/unwind/libunbound/iterator/iter_scrub.c
690
if(rrset->rr_count > env->cfg->iter_scrub_ns) {
sbin/unwind/libunbound/iterator/iter_scrub.c
706
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
sbin/unwind/libunbound/iterator/iter_scrub.c
759
if(env->cfg->harden_unknown_additional &&
sbin/unwind/libunbound/iterator/iter_scrub.c
783
store_rrset(sldns_buffer* pkt, struct msg_parse* msg, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_scrub.c
789
time_t now = *env->now;
sbin/unwind/libunbound/iterator/iter_scrub.c
791
k = alloc_special_obtain(env->alloc);
sbin/unwind/libunbound/iterator/iter_scrub.c
796
alloc_special_release(env->alloc, k);
sbin/unwind/libunbound/iterator/iter_scrub.c
804
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, now);
sbin/unwind/libunbound/iterator/iter_scrub.c
915
struct query_info* qinfo, uint8_t* zonename, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_scrub.h
69
struct module_env* env, struct module_qstate* qstate,
sbin/unwind/libunbound/iterator/iter_utils.c
1168
iter_store_parentside_rrset(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
1172
rrset = packed_rrset_copy_alloc(rrset, env->alloc, *env->now);
sbin/unwind/libunbound/iterator/iter_utils.c
1182
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, *env->now);
sbin/unwind/libunbound/iterator/iter_utils.c
1199
iter_store_parentside_NS(struct module_env* env, struct reply_info* rep)
sbin/unwind/libunbound/iterator/iter_utils.c
1204
iter_store_parentside_rrset(env, rrset);
sbin/unwind/libunbound/iterator/iter_utils.c
1208
void iter_store_parentside_neg(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
1223
neg = (struct ub_packed_rrset_key*)regional_alloc(env->scratch,
sbin/unwind/libunbound/iterator/iter_utils.c
1234
neg->rk.dname = regional_alloc_init(env->scratch, qinfo->qname,
sbin/unwind/libunbound/iterator/iter_utils.c
1242
newd = (struct packed_rrset_data*)regional_alloc_zero(env->scratch,
sbin/unwind/libunbound/iterator/iter_utils.c
1264
iter_store_parentside_rrset(env, neg);
sbin/unwind/libunbound/iterator/iter_utils.c
1268
iter_lookup_parent_NS_from_cache(struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.c
1272
akey = rrset_cache_lookup(env->rrset_cache, dp->name,
sbin/unwind/libunbound/iterator/iter_utils.c
1274
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
sbin/unwind/libunbound/iterator/iter_utils.c
1288
int iter_lookup_parent_glue_from_cache(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
1299
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/iterator/iter_utils.c
1301
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
sbin/unwind/libunbound/iterator/iter_utils.c
1311
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/iterator/iter_utils.c
1313
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
sbin/unwind/libunbound/iterator/iter_utils.c
1516
lock_rw_rdlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1517
lock_rw_rdlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1518
stub = hints_lookup_stub(qstate->env->hints, qinf->qname,
sbin/unwind/libunbound/iterator/iter_utils.c
1520
dp = forwards_lookup(qstate->env->fwds, qinf->qname, qinf->qclass,
sbin/unwind/libunbound/iterator/iter_utils.c
1537
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1548
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1558
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1566
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1577
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1586
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1589
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1590
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1599
struct module_env* env, struct outside_network* outnet)
sbin/unwind/libunbound/iterator/iter_utils.c
1605
ie = (struct iter_env*)env->modinfo[m];
sbin/unwind/libunbound/iterator/iter_utils.c
301
iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
321
if(infra_get_lame_rtt(env->infra_cache, &a->addr, a->addrlen,
sbin/unwind/libunbound/iterator/iter_utils.c
360
iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
372
a->sel_rtt = iter_filter_unsuitable(iter_env, env,
sbin/unwind/libunbound/iterator/iter_utils.c
439
iter_filter_order(struct iter_env* iter_env, struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.c
450
got_num = iter_fill_rtt(iter_env, env, name, namelen, qtype, now, dp,
sbin/unwind/libunbound/iterator/iter_utils.c
464
if(env->cfg->fast_server_permil != 0 && prefetch == 0 &&
sbin/unwind/libunbound/iterator/iter_utils.c
465
num_results > env->cfg->fast_server_num &&
sbin/unwind/libunbound/iterator/iter_utils.c
466
ub_random_max(env->rnd, 1000) < env->cfg->fast_server_permil) {
sbin/unwind/libunbound/iterator/iter_utils.c
471
env->cfg->fast_server_num);
sbin/unwind/libunbound/iterator/iter_utils.c
511
if (env->cfg->prefer_ip6) {
sbin/unwind/libunbound/iterator/iter_utils.c
569
} else if (env->cfg->prefer_ip4) {
sbin/unwind/libunbound/iterator/iter_utils.c
633
struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.c
641
int num = iter_filter_order(iter_env, env, name, namelen, qtype,
sbin/unwind/libunbound/iterator/iter_utils.c
642
*env->now, dp, &selrtt, open_target, blacklist, prefetch);
sbin/unwind/libunbound/iterator/iter_utils.c
685
sel = ub_random_max(env->rnd, num);
sbin/unwind/libunbound/iterator/iter_utils.c
737
iter_dns_store(struct module_env* env, struct query_info* msgqinf,
sbin/unwind/libunbound/iterator/iter_utils.c
742
if(!dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
sbin/unwind/libunbound/iterator/iter_utils.c
771
qstate->env->detect_cycle));
sbin/unwind/libunbound/iterator/iter_utils.c
772
return (*qstate->env->detect_cycle)(qstate, &qinf,
sbin/unwind/libunbound/iterator/iter_utils.c
879
iter_qname_indicates_dnssec(struct module_env* env, struct query_info *qinfo)
sbin/unwind/libunbound/iterator/iter_utils.c
882
if(!env || !env->anchors || !qinfo || !qinfo->qname)
sbin/unwind/libunbound/iterator/iter_utils.c
885
if((a=anchors_lookup(env->anchors, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/iterator/iter_utils.c
900
iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.c
905
if(!env || !env->anchors || !dp || !dp->name)
sbin/unwind/libunbound/iterator/iter_utils.c
908
if((a=anchor_find(env->anchors, dp->name, dp->namelabs, dp->namelen,
sbin/unwind/libunbound/iterator/iter_utils.c
924
if(env->key_cache) {
sbin/unwind/libunbound/iterator/iter_utils.c
925
struct key_entry_key* kk = key_cache_obtain(env->key_cache,
sbin/unwind/libunbound/iterator/iter_utils.c
926
dp->name, dp->namelen, dclass, env->scratch, *env->now);
sbin/unwind/libunbound/iterator/iter_utils.c
930
regional_free_all(env->scratch);
sbin/unwind/libunbound/iterator/iter_utils.c
933
regional_free_all(env->scratch);
sbin/unwind/libunbound/iterator/iter_utils.c
937
regional_free_all(env->scratch);
sbin/unwind/libunbound/iterator/iter_utils.h
110
struct module_env* env, struct delegpt* dp, uint8_t* name,
sbin/unwind/libunbound/iterator/iter_utils.h
153
void iter_dns_store(struct module_env* env, struct query_info* qinf,
sbin/unwind/libunbound/iterator/iter_utils.h
211
int iter_qname_indicates_dnssec(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
224
int iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_utils.h
288
void iter_store_parentside_rrset(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
297
void iter_store_parentside_NS(struct module_env* env, struct reply_info* rep);
sbin/unwind/libunbound/iterator/iter_utils.h
307
void iter_store_parentside_neg(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
322
int iter_lookup_parent_NS_from_cache(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
336
int iter_lookup_parent_glue_from_cache(struct module_env* env,
sbin/unwind/libunbound/iterator/iter_utils.h
432
struct module_env* env, struct outside_network* outnet);
sbin/unwind/libunbound/iterator/iterator.c
1014
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
102
if(!iter_apply_cfg(iter_env, env->cfg)) {
sbin/unwind/libunbound/iterator/iterator.c
1027
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1031
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
1032
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
1043
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
sbin/unwind/libunbound/iterator/iterator.c
1045
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1068
lock_rw_rdlock(&qstate->env->auth_zones->lock);
sbin/unwind/libunbound/iterator/iterator.c
1069
z = auth_zones_find_zone(qstate->env->auth_zones, delname, delnamelen,
sbin/unwind/libunbound/iterator/iterator.c
1072
lock_rw_unlock(&qstate->env->auth_zones->lock);
sbin/unwind/libunbound/iterator/iterator.c
1076
lock_rw_unlock(&qstate->env->auth_zones->lock);
sbin/unwind/libunbound/iterator/iterator.c
111
iter_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/iterator/iterator.c
114
if(!env || !env->modinfo[id])
sbin/unwind/libunbound/iterator/iterator.c
1157
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
116
iter_env = (struct iter_env*)env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
1211
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
1217
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
sbin/unwind/libunbound/iterator/iterator.c
123
env->modinfo[id] = NULL;
sbin/unwind/libunbound/iterator/iterator.c
1251
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
1252
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
1294
if(mesh_jostle_exceeded(qstate->env->mesh))
sbin/unwind/libunbound/iterator/iterator.c
1340
dp = forwards_lookup(qstate->env->fwds, delname, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
1346
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iterator.c
1420
!can_have_last_resort(qstate->env, iq->dp->name,
sbin/unwind/libunbound/iterator/iterator.c
1431
if(qstate->env->auth_zones) {
sbin/unwind/libunbound/iterator/iterator.c
1476
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
1495
msg = dns_cache_lookup(qstate->env, iq->qchase.qname,
sbin/unwind/libunbound/iterator/iterator.c
1498
qstate->region, qstate->env->scratch, 0, dpname,
sbin/unwind/libunbound/iterator/iterator.c
1500
if(!msg && qstate->env->neg_cache &&
sbin/unwind/libunbound/iterator/iterator.c
1501
iter_qname_indicates_dnssec(qstate->env, &iq->qchase)) {
sbin/unwind/libunbound/iterator/iterator.c
1504
msg = val_neg_getmsg(qstate->env->neg_cache, &iq->qchase,
sbin/unwind/libunbound/iterator/iterator.c
1505
qstate->region, qstate->env->rrset_cache,
sbin/unwind/libunbound/iterator/iterator.c
1506
qstate->env->scratch_buffer,
sbin/unwind/libunbound/iterator/iterator.c
1507
*qstate->env->now, 1/*add SOA*/, NULL,
sbin/unwind/libunbound/iterator/iterator.c
1508
qstate->env->cfg);
sbin/unwind/libunbound/iterator/iterator.c
1550
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
1573
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
1619
&& can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass, NULL, NULL, NULL))) {
sbin/unwind/libunbound/iterator/iterator.c
162
if (qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
1637
iq->dp = dns_cache_find_delegation(qstate->env, delname,
sbin/unwind/libunbound/iterator/iterator.c
1640
*qstate->env->now+qstate->prefetch_leeway, 1,
sbin/unwind/libunbound/iterator/iterator.c
1662
if(forwards_lookup_root(qstate->env->fwds,
sbin/unwind/libunbound/iterator/iterator.c
1664
lock_rw_unlock(&qstate->env->fwds->lock);
sbin/unwind/libunbound/iterator/iterator.c
1667
iq->dp = hints_find_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
1676
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1717
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen, iq->qchase.qclass, &have_dp, &iq->dp, qstate->region)) {
sbin/unwind/libunbound/iterator/iterator.c
1745
iq->dp = hints_find_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
1755
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
1820
qstate->env->hints, iq->qchase.qname, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
1828
if(stub) { lock_rw_unlock(&qstate->env->hints->lock); }
sbin/unwind/libunbound/iterator/iterator.c
1870
iq->dnssec_expected = iter_indicates_dnssec(qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
1889
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
sbin/unwind/libunbound/iterator/iterator.c
1893
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
1894
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
1933
qstate->env, subiq->dp, NULL,
sbin/unwind/libunbound/iterator/iterator.c
1937
subiq->dp = dns_cache_find_delegation(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
1940
*qstate->env->now+subq->prefetch_leeway,
sbin/unwind/libunbound/iterator/iterator.c
1945
qstate->env, subiq->dp, NULL,
sbin/unwind/libunbound/iterator/iterator.c
2050
if(!iter_ns_probability(qstate->env->rnd, toget, missing)) {
sbin/unwind/libunbound/iterator/iterator.c
2076
if(mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2101
if(mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2145
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
sbin/unwind/libunbound/iterator/iterator.c
2156
if(qstate->env->cfg->harden_unverified_glue) {
sbin/unwind/libunbound/iterator/iterator.c
2157
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
2168
dp = hints_find_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
2183
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
2191
if(!iter_lookup_parent_NS_from_cache(qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
2204
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
2210
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
2218
if(iter_lookup_parent_glue_from_cache(qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
223
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
2266
!can_have_last_resort(qstate->env, ns->name, ns->namelen,
sbin/unwind/libunbound/iterator/iterator.c
2287
if(mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2322
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
245
if(!cache_fill_missing(super->env, super_iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
2655
struct dns_msg* msg = dns_cache_lookup(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
2659
qstate->env->scratch, 0, iq->dp->name,
sbin/unwind/libunbound/iterator/iterator.c
2668
qstate->env->need_to_validate &&
sbin/unwind/libunbound/iterator/iterator.c
2669
qstate->env->cfg->harden_below_nxdomain) {
sbin/unwind/libunbound/iterator/iterator.c
2703
else if(!qstate->env->cfg->qname_minimisation_strict)
sbin/unwind/libunbound/iterator/iterator.c
2716
if(auth_zones_can_fallback(qstate->env->auth_zones,
sbin/unwind/libunbound/iterator/iterator.c
2727
} else if(auth_zones_lookup(qstate->env->auth_zones, &iq->qinfo_out,
sbin/unwind/libunbound/iterator/iterator.c
2738
qstate->env->mesh->num_query_authzone_up++;
sbin/unwind/libunbound/iterator/iterator.c
2777
&& !mesh_jostle_exceeded(qstate->env->mesh)) {
sbin/unwind/libunbound/iterator/iterator.c
2849
if(qstate->env->auth_zones) {
sbin/unwind/libunbound/iterator/iterator.c
2884
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
2889
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
2890
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
2910
target = iter_server_selection(ie, qstate->env, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
3017
&& !ub_random_max(qstate->env->rnd, 10)) {
sbin/unwind/libunbound/iterator/iterator.c
305
if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3074
fptr_ok(fptr_whitelist_modenv_send_query(qstate->env->send_query));
sbin/unwind/libunbound/iterator/iterator.c
3075
outq = (*qstate->env->send_query)(&iq->qinfo_out,
sbin/unwind/libunbound/iterator/iterator.c
3080
(qstate->env->cfg->disable_edns_do?0:EDNS_DO)|
sbin/unwind/libunbound/iterator/iterator.c
3082
!qstate->blacklist&&(!iter_qname_indicates_dnssec(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3087
(iq->dp->tcp_upstream || qstate->env->cfg->tcp_upstream),
sbin/unwind/libunbound/iterator/iterator.c
3088
(iq->dp->ssl_upstream || qstate->env->cfg->ssl_upstream),
sbin/unwind/libunbound/iterator/iterator.c
310
if((msg=msg_cache_lookup(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3103
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
314
qstate->env->cfg->serve_expired)) != NULL) {
sbin/unwind/libunbound/iterator/iterator.c
3151
if(!inplace_cb_query_response_call(qstate->env, qstate, iq->response))
sbin/unwind/libunbound/iterator/iterator.c
3156
if(qstate->env->cfg->qname_minimisation) {
sbin/unwind/libunbound/iterator/iterator.c
316
if(qstate->env->cfg->serve_expired && rep) {
sbin/unwind/libunbound/iterator/iterator.c
317
if(qstate->env->cfg->serve_expired_ttl_reset &&
sbin/unwind/libunbound/iterator/iterator.c
318
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
sbin/unwind/libunbound/iterator/iterator.c
3191
if(!qstate->env->cfg->disable_dnssec_lame_check && iq->dnssec_expected
sbin/unwind/libunbound/iterator/iterator.c
322
rep->serve_expired_ttl = *qstate->env->now +
sbin/unwind/libunbound/iterator/iterator.c
323
qstate->env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/iterator/iterator.c
328
*qstate->env->now;
sbin/unwind/libunbound/iterator/iterator.c
3293
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3294
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3309
iter_dns_store(qstate->env, &iq->response->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3320
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3321
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3331
if(qstate->env->cfg->qname_minimisation_strict) {
sbin/unwind/libunbound/iterator/iterator.c
3359
if(qstate->env->cfg->harden_below_nxdomain &&
sbin/unwind/libunbound/iterator/iterator.c
336
(qstate->env->cfg->serve_expired ||
sbin/unwind/libunbound/iterator/iterator.c
3360
qstate->env->need_to_validate) {
sbin/unwind/libunbound/iterator/iterator.c
337
*qstate->env->now <= rep->ttl)) {
sbin/unwind/libunbound/iterator/iterator.c
3389
(!qstate->env->cfg->harden_referral_path ||
sbin/unwind/libunbound/iterator/iterator.c
3407
iter_dns_store(qstate->env, &iq->response->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3411
iter_store_parentside_NS(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3413
if(qstate->env->neg_cache)
sbin/unwind/libunbound/iterator/iterator.c
3414
val_neg_addreferral(qstate->env->neg_cache,
sbin/unwind/libunbound/iterator/iterator.c
3426
iter_store_parentside_rrset(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3437
if (qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
3452
rrset_cache_remove_above(qstate->env->rrset_cache,
sbin/unwind/libunbound/iterator/iterator.c
3454
iq->qchase.qclass, *qstate->env->now,
sbin/unwind/libunbound/iterator/iterator.c
3457
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
sbin/unwind/libunbound/iterator/iterator.c
3473
iq->dnssec_expected = iter_indicates_dnssec(qstate->env,
sbin/unwind/libunbound/iterator/iterator.c
3476
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
sbin/unwind/libunbound/iterator/iterator.c
3484
if(qstate->env->cfg->harden_referral_path)
sbin/unwind/libunbound/iterator/iterator.c
3494
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3495
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3520
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3521
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3545
iter_dns_store(qstate->env, &iq->response->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
3553
if(qstate->env->auth_zones) {
sbin/unwind/libunbound/iterator/iterator.c
359
iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL,
sbin/unwind/libunbound/iterator/iterator.c
3597
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
3607
qstate->env->detach_subs));
sbin/unwind/libunbound/iterator/iterator.c
3608
(*qstate->env->detach_subs)(qstate);
sbin/unwind/libunbound/iterator/iterator.c
3627
if(!infra_set_lame(qstate->env->infra_cache,
sbin/unwind/libunbound/iterator/iterator.c
3631
*qstate->env->now, dnsseclame, 0,
sbin/unwind/libunbound/iterator/iterator.c
3646
if(!infra_set_lame(qstate->env->infra_cache,
sbin/unwind/libunbound/iterator/iterator.c
3650
*qstate->env->now, 0, 1, iq->qchase.qtype))
sbin/unwind/libunbound/iterator/iterator.c
3667
if (qstate->env->cfg->qname_minimisation &&
sbin/unwind/libunbound/iterator/iterator.c
3668
!qstate->env->cfg->qname_minimisation_strict)
sbin/unwind/libunbound/iterator/iterator.c
3673
if(!auth_zones_can_fallback(qstate->env->auth_zones,
sbin/unwind/libunbound/iterator/iterator.c
3779
if(qstate->env->cfg->harden_referral_path) {
sbin/unwind/libunbound/iterator/iterator.c
3815
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
4064
while(iter_get_next_root(qstate->env->hints,
sbin/unwind/libunbound/iterator/iterator.c
4065
qstate->env->fwds, &c)) {
sbin/unwind/libunbound/iterator/iterator.c
4117
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
4139
if((qstate->env->cfg->val_log_level >= 2 ||
sbin/unwind/libunbound/iterator/iterator.c
4140
qstate->env->cfg->log_servfail) && qstate->errinf &&
sbin/unwind/libunbound/iterator/iterator.c
4141
!qstate->env->cfg->val_log_squelch) {
sbin/unwind/libunbound/iterator/iterator.c
4169
iter_dns_store(qstate->env, &qstate->qinfo,
sbin/unwind/libunbound/iterator/iterator.c
4299
qstate->env->cfg->use_caps_bits_for_id &&
sbin/unwind/libunbound/iterator/iterator.c
4329
prs = (struct msg_parse*)regional_alloc(qstate->env->scratch,
sbin/unwind/libunbound/iterator/iterator.c
4340
if(parse_packet(pkt, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) {
sbin/unwind/libunbound/iterator/iterator.c
4346
if(parse_extract_edns_from_response_msg(prs, &edns, qstate->env->scratch) !=
sbin/unwind/libunbound/iterator/iterator.c
4363
if(!inplace_cb_edns_back_parsed_call(qstate->env, qstate)) {
sbin/unwind/libunbound/iterator/iterator.c
4373
qstate->env->scratch, qstate->env, qstate, ie)) {
sbin/unwind/libunbound/iterator/iterator.c
4400
if(qstate->env->cfg->aggressive_nsec) {
sbin/unwind/libunbound/iterator/iterator.c
4404
if(qstate->env->cfg->qname_minimisation &&
sbin/unwind/libunbound/iterator/iterator.c
4455
qstate->env->scratch)) {
sbin/unwind/libunbound/iterator/iterator.c
4484
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
4546
iter_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/iterator/iterator.c
4548
struct iter_env* ie = (struct iter_env*)env->modinfo[id];
sbin/unwind/libunbound/iterator/iterator.c
632
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
sbin/unwind/libunbound/iterator/iterator.c
684
can_have_last_resort(struct module_env* env, uint8_t* nm, size_t ATTR_UNUSED(nmlen),
sbin/unwind/libunbound/iterator/iterator.c
694
(dp = hints_find(env->hints, nm, qclass, nolock)) &&
sbin/unwind/libunbound/iterator/iterator.c
699
lock_rw_unlock(&env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
704
lock_rw_unlock(&env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
707
if((dp = forwards_find(env->fwds, nm, qclass, nolock)) &&
sbin/unwind/libunbound/iterator/iterator.c
712
lock_rw_unlock(&env->fwds->lock);
sbin/unwind/libunbound/iterator/iterator.c
717
if(dp) { lock_rw_unlock(&env->fwds->lock); }
sbin/unwind/libunbound/iterator/iterator.c
831
qstate->env->add_sub));
sbin/unwind/libunbound/iterator/iterator.c
832
if(!(*qstate->env->add_sub)(qstate, &qinf,
sbin/unwind/libunbound/iterator/iterator.c
840
qstate->env->attach_sub));
sbin/unwind/libunbound/iterator/iterator.c
841
if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime,
sbin/unwind/libunbound/iterator/iterator.c
856
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
857
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
87
iter_init(struct module_env* env, int id)
sbin/unwind/libunbound/iterator/iterator.c
878
if(qstate->env->cfg->qname_minimisation)
sbin/unwind/libunbound/iterator/iterator.c
905
dp = hints_find_root(qstate->env->hints, qclass, nolock);
sbin/unwind/libunbound/iterator/iterator.c
915
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
926
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
930
qstate->env->kill_sub));
sbin/unwind/libunbound/iterator/iterator.c
931
(*qstate->env->kill_sub)(subq);
sbin/unwind/libunbound/iterator/iterator.c
937
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
sbin/unwind/libunbound/iterator/iterator.c
939
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
95
env->modinfo[id] = (void*)iter_env;
sbin/unwind/libunbound/iterator/iterator.c
973
stub = hints_lookup_stub(qstate->env->hints, qname, qclass, iq->dp,
sbin/unwind/libunbound/iterator/iterator.c
982
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.c
993
lock_rw_unlock(&qstate->env->hints->lock);
sbin/unwind/libunbound/iterator/iterator.h
514
int iter_init(struct module_env* env, int id);
sbin/unwind/libunbound/iterator/iterator.h
517
void iter_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/iterator/iterator.h
540
size_t iter_get_mem(struct module_env* env, int id);
sbin/unwind/libunbound/libunbound/context.c
100
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
sbin/unwind/libunbound/libunbound/context.c
102
slabhash_delete(ctx->env->msg_cache);
sbin/unwind/libunbound/libunbound/context.c
103
ctx->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
sbin/unwind/libunbound/libunbound/context.c
107
if(!ctx->env->msg_cache)
sbin/unwind/libunbound/libunbound/context.c
110
ctx->env->rrset_cache = rrset_cache_adjust(ctx->env->rrset_cache,
sbin/unwind/libunbound/libunbound/context.c
111
ctx->env->cfg, ctx->env->alloc);
sbin/unwind/libunbound/libunbound/context.c
112
if(!ctx->env->rrset_cache)
sbin/unwind/libunbound/libunbound/context.c
114
ctx->env->infra_cache = infra_adjust(ctx->env->infra_cache, cfg);
sbin/unwind/libunbound/libunbound/context.c
115
if(!ctx->env->infra_cache)
sbin/unwind/libunbound/libunbound/context.c
63
struct config_file* cfg = ctx->env->cfg;
sbin/unwind/libunbound/libunbound/context.c
78
if(!modstack_call_startup(&ctx->mods, cfg->module_conf, ctx->env))
sbin/unwind/libunbound/libunbound/context.c
80
if(!modstack_call_init(&ctx->mods, cfg->module_conf, ctx->env))
sbin/unwind/libunbound/libunbound/context.c
83
log_edns_known_options(VERB_ALGO, ctx->env);
sbin/unwind/libunbound/libunbound/context.c
89
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
sbin/unwind/libunbound/libunbound/context.c
90
ctx->env, &ctx->mods))
sbin/unwind/libunbound/libunbound/context.c
92
if(!(ctx->env->fwds = forwards_create()) ||
sbin/unwind/libunbound/libunbound/context.c
93
!forwards_apply_cfg(ctx->env->fwds, cfg))
sbin/unwind/libunbound/libunbound/context.c
95
if(!(ctx->env->hints = hints_create()) ||
sbin/unwind/libunbound/libunbound/context.c
96
!hints_apply_cfg(ctx->env->hints, cfg))
sbin/unwind/libunbound/libunbound/context.c
98
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
sbin/unwind/libunbound/libunbound/context.h
118
struct module_env* env;
sbin/unwind/libunbound/libunbound/libunbound.c
1010
if(!ctx->env->cfg->forwards ||
sbin/unwind/libunbound/libunbound/libunbound.c
1011
(ctx->env->cfg->forwards->name &&
sbin/unwind/libunbound/libunbound/libunbound.c
1012
strcmp(ctx->env->cfg->forwards->name, ".") != 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
1026
s->next = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
1027
ctx->env->cfg->forwards = s;
sbin/unwind/libunbound/libunbound/libunbound.c
1029
log_assert(ctx->env->cfg->forwards);
sbin/unwind/libunbound/libunbound/libunbound.c
1030
log_assert(ctx->env->cfg->forwards->name);
sbin/unwind/libunbound/libunbound/libunbound.c
1031
s = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
1056
ctx->env->cfg->ssl_upstream = tls;
sbin/unwind/libunbound/libunbound/libunbound.c
1099
prev = &ctx->env->cfg->stubs;
sbin/unwind/libunbound/libunbound/libunbound.c
1121
elem->next = ctx->env->cfg->stubs;
sbin/unwind/libunbound/libunbound/libunbound.c
1122
ctx->env->cfg->stubs = elem;
sbin/unwind/libunbound/libunbound/libunbound.c
126
ctx->env = (struct module_env*)calloc(1, sizeof(*ctx->env));
sbin/unwind/libunbound/libunbound/libunbound.c
127
if(!ctx->env) {
sbin/unwind/libunbound/libunbound/libunbound.c
1318
if(!cfg_strlist_insert(&ctx->env->cfg->local_data,
sbin/unwind/libunbound/libunbound/libunbound.c
133
ctx->env->cfg = config_create_forlib();
sbin/unwind/libunbound/libunbound/libunbound.c
134
if(!ctx->env->cfg) {
sbin/unwind/libunbound/libunbound/libunbound.c
135
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
142
if(!edns_known_options_init(ctx->env)) {
sbin/unwind/libunbound/libunbound/libunbound.c
143
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
144
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
150
ctx->env->auth_zones = auth_zones_create();
sbin/unwind/libunbound/libunbound/libunbound.c
151
if(!ctx->env->auth_zones) {
sbin/unwind/libunbound/libunbound/libunbound.c
152
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
153
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
154
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
160
ctx->env->edns_strings = edns_strings_create();
sbin/unwind/libunbound/libunbound/libunbound.c
161
if(!ctx->env->edns_strings) {
sbin/unwind/libunbound/libunbound/libunbound.c
162
auth_zones_delete(ctx->env->auth_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
163
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
164
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
165
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
172
ctx->env->alloc = &ctx->superalloc;
sbin/unwind/libunbound/libunbound/libunbound.c
173
ctx->env->worker = NULL;
sbin/unwind/libunbound/libunbound/libunbound.c
174
ctx->env->need_to_validate = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
176
ctx->env->modstack = &ctx->mods;
sbin/unwind/libunbound/libunbound/libunbound.c
190
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
191
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
192
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
195
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
196
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
197
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
206
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
207
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
208
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
211
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
212
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
213
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
367
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
368
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
384
if(ctx->env) {
sbin/unwind/libunbound/libunbound/libunbound.c
385
slabhash_delete(ctx->env->msg_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
386
rrset_cache_delete(ctx->env->rrset_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
387
infra_delete(ctx->env->infra_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
388
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
389
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
390
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
391
forwards_delete(ctx->env->fwds);
sbin/unwind/libunbound/libunbound/libunbound.c
392
hints_delete(ctx->env->hints);
sbin/unwind/libunbound/libunbound/libunbound.c
393
auth_zones_delete(ctx->env->auth_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
394
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
420
if(!config_set_option(ctx->env->cfg, opt, val)) {
sbin/unwind/libunbound/libunbound/libunbound.c
433
r = config_get_option_collate(ctx->env->cfg, opt, str);
sbin/unwind/libunbound/libunbound/libunbound.c
449
if(!config_read(ctx->env->cfg, fname, NULL)) {
sbin/unwind/libunbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
505
if(!cfg_strlist_insert(&ctx->env->cfg->auto_trust_anchor_file_list,
sbin/unwind/libunbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
538
ctx->env->cfg->verbosity = d;
sbin/unwind/libunbound/libunbound/libunbound.c
989
if(ctx->env->cfg->forwards &&
sbin/unwind/libunbound/libunbound/libunbound.c
990
(ctx->env->cfg->forwards->name &&
sbin/unwind/libunbound/libunbound/libunbound.c
991
strcmp(ctx->env->cfg->forwards->name, ".") == 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
992
s = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
993
ctx->env->cfg->forwards = s->next;
sbin/unwind/libunbound/libunbound/libworker.c
100
regional_destroy(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
101
ub_randfree(w->env->rnd);
sbin/unwind/libunbound/libunbound/libworker.c
102
free(w->env);
sbin/unwind/libunbound/libunbound/libworker.c
134
struct config_file* cfg = ctx->env->cfg;
sbin/unwind/libunbound/libunbound/libworker.c
140
w->env = (struct module_env*)malloc(sizeof(*w->env));
sbin/unwind/libunbound/libunbound/libworker.c
141
if(!w->env) {
sbin/unwind/libunbound/libunbound/libworker.c
145
*w->env = *ctx->env;
sbin/unwind/libunbound/libunbound/libworker.c
146
w->env->alloc = context_obtain_alloc(ctx, !w->is_bg || w->is_bg_thread);
sbin/unwind/libunbound/libunbound/libworker.c
147
if(!w->env->alloc) {
sbin/unwind/libunbound/libunbound/libworker.c
151
w->thread_num = w->env->alloc->thread_num;
sbin/unwind/libunbound/libunbound/libworker.c
152
alloc_set_id_cleanup(w->env->alloc, &libworker_alloc_cleanup, w);
sbin/unwind/libunbound/libunbound/libworker.c
156
w->env->scratch = regional_create_custom(cfg->msg_buffer_size);
sbin/unwind/libunbound/libunbound/libworker.c
157
w->env->scratch_buffer = sldns_buffer_new(cfg->msg_buffer_size);
sbin/unwind/libunbound/libunbound/libworker.c
163
sldns_buffer_free(w->env->scratch_buffer);
sbin/unwind/libunbound/libunbound/libworker.c
164
w->env->scratch_buffer = NULL;
sbin/unwind/libunbound/libunbound/libworker.c
170
if(!w->env->scratch || !w->env->scratch_buffer) {
sbin/unwind/libunbound/libunbound/libworker.c
174
w->env->worker = (struct worker*)w;
sbin/unwind/libunbound/libunbound/libworker.c
175
w->env->probe_timer = NULL;
sbin/unwind/libunbound/libunbound/libworker.c
179
if(!(w->env->rnd = ub_initstate(ctx->seed_rnd))) {
sbin/unwind/libunbound/libunbound/libworker.c
199
hash_set_raninit((uint32_t)ub_random(w->env->rnd));
sbin/unwind/libunbound/libunbound/libworker.c
210
w->env->worker_base = w->base;
sbin/unwind/libunbound/libunbound/libworker.c
226
w->env->infra_cache, w->env->rnd, cfg->use_caps_bits_for_id,
sbin/unwind/libunbound/libunbound/libworker.c
233
w->env->outnet = w->back;
sbin/unwind/libunbound/libunbound/libworker.c
242
w->env->mesh = mesh_create(&ctx->mods, w->env);
sbin/unwind/libunbound/libunbound/libworker.c
243
if(!w->env->mesh) {
sbin/unwind/libunbound/libunbound/libworker.c
247
w->env->send_query = &libworker_send_query;
sbin/unwind/libunbound/libunbound/libworker.c
248
w->env->detach_subs = &mesh_detach_subs;
sbin/unwind/libunbound/libunbound/libworker.c
249
w->env->attach_sub = &mesh_attach_sub;
sbin/unwind/libunbound/libunbound/libworker.c
250
w->env->add_sub = &mesh_add_sub;
sbin/unwind/libunbound/libunbound/libworker.c
251
w->env->kill_sub = &mesh_state_delete;
sbin/unwind/libunbound/libunbound/libworker.c
252
w->env->detect_cycle = &mesh_detect_cycle;
sbin/unwind/libunbound/libunbound/libworker.c
253
comm_base_timept(w->base, &w->env->now, &w->env->now_tv);
sbin/unwind/libunbound/libunbound/libworker.c
562
libworker_enter_result(q->res, buf, q->w->env->scratch, s);
sbin/unwind/libunbound/libunbound/libworker.c
623
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
624
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
sbin/unwind/libunbound/libunbound/libworker.c
626
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
633
if(ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
634
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
635
w->back->udp_buff, w->env->scratch)) {
sbin/unwind/libunbound/libunbound/libworker.c
636
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
644
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
704
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
705
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
sbin/unwind/libunbound/libunbound/libworker.c
707
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
713
if(ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
714
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
715
w->back->udp_buff, w->env->scratch)) {
sbin/unwind/libunbound/libunbound/libworker.c
716
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
725
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
805
buf = q->w->env->scratch_buffer;
sbin/unwind/libunbound/libunbound/libworker.c
843
if(local_zones_answer(w->ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
844
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
sbin/unwind/libunbound/libunbound/libworker.c
846
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
852
if(w->ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
853
w->ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
854
w->back->udp_buff, w->env->scratch)) {
sbin/unwind/libunbound/libunbound/libworker.c
855
regional_free_all(w->env->scratch);
sbin/unwind/libunbound/libunbound/libworker.c
863
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
873
slabhash_clear(&w->env->rrset_cache->table);
sbin/unwind/libunbound/libunbound/libworker.c
874
slabhash_clear(w->env->msg_cache);
sbin/unwind/libunbound/libunbound/libworker.c
884
struct libworker* w = (struct libworker*)q->env->worker;
sbin/unwind/libunbound/libunbound/libworker.c
893
libworker_handle_service_reply, e, w->back->udp_buff, q->env,
sbin/unwind/libunbound/libunbound/libworker.c
906
struct libworker* lw = (struct libworker*)e->qstate->env->worker;
sbin/unwind/libunbound/libunbound/libworker.c
909
mesh_report_reply(lw->env->mesh, e, reply_info, error);
sbin/unwind/libunbound/libunbound/libworker.c
919
mesh_report_reply(lw->env->mesh, e, reply_info,
sbin/unwind/libunbound/libunbound/libworker.c
923
mesh_report_reply(lw->env->mesh, e, reply_info, NETEVENT_NOERROR);
sbin/unwind/libunbound/libunbound/libworker.c
94
if(w->env) {
sbin/unwind/libunbound/libunbound/libworker.c
96
mesh_delete(w->env->mesh);
sbin/unwind/libunbound/libunbound/libworker.c
97
context_release_alloc(w->ctx, w->env->alloc,
sbin/unwind/libunbound/libunbound/libworker.c
99
sldns_buffer_free(w->env->scratch_buffer);
sbin/unwind/libunbound/libunbound/libworker.h
82
struct module_env* env;
sbin/unwind/libunbound/respip/respip.c
1076
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
sbin/unwind/libunbound/respip/respip.c
1077
return (*qstate->env->attach_sub)(qstate, &subqi, BIT_RD, 0, 0, &subq);
sbin/unwind/libunbound/respip/respip.c
1122
qstate->region, qstate->env->auth_zones,
sbin/unwind/libunbound/respip/respip.c
1123
&qstate->rpz_passthru, qstate->env->views,
sbin/unwind/libunbound/respip/respip.c
1124
qstate->env->respip_set)) {
sbin/unwind/libunbound/respip/respip.c
1252
super->env->need_to_validate, &new_rep, super->region,
sbin/unwind/libunbound/respip/respip.c
1253
qstate->env->auth_zones, qstate->env->views,
sbin/unwind/libunbound/respip/respip.c
1254
qstate->env->respip_set))
sbin/unwind/libunbound/respip/respip.c
1272
respip_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/respip/respip.c
1274
(void)env;
sbin/unwind/libunbound/respip/respip.c
558
respip_init(struct module_env* env, int id)
sbin/unwind/libunbound/respip/respip.c
560
(void)env;
sbin/unwind/libunbound/respip/respip.c
566
respip_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/respip/respip.c
568
(void)env;
sbin/unwind/libunbound/respip/respip.h
207
int respip_init(struct module_env* env, int id);
sbin/unwind/libunbound/respip/respip.h
210
void respip_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/respip/respip.h
242
size_t respip_get_mem(struct module_env* env, int id);
sbin/unwind/libunbound/services/authzone.c
100
static void xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
104
struct module_env* env);
sbin/unwind/libunbound/services/authzone.c
107
static int xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
1757
struct module_env env;
sbin/unwind/libunbound/services/authzone.c
1761
env = *env_for_val;
sbin/unwind/libunbound/services/authzone.c
1762
env.scratch_buffer = sldns_buffer_new(env.cfg->msg_buffer_size);
sbin/unwind/libunbound/services/authzone.c
1763
if(!env.scratch_buffer) {
sbin/unwind/libunbound/services/authzone.c
1767
env.scratch = regional_create();
sbin/unwind/libunbound/services/authzone.c
1768
if(!env.now) {
sbin/unwind/libunbound/services/authzone.c
1769
env.now = &now;
sbin/unwind/libunbound/services/authzone.c
1772
if(!env.scratch) {
sbin/unwind/libunbound/services/authzone.c
1776
auth_zone_verify_zonemd(z, &env, mods, NULL, 1, 0);
sbin/unwind/libunbound/services/authzone.c
1780
sldns_buffer_free(env.scratch_buffer);
sbin/unwind/libunbound/services/authzone.c
1781
regional_destroy(env.scratch);
sbin/unwind/libunbound/services/authzone.c
1787
struct module_env* env, struct module_stack* mods)
sbin/unwind/libunbound/services/authzone.c
1798
if(z->zonefile && z->zonefile[0]!=0 && env)
sbin/unwind/libunbound/services/authzone.c
1799
zonemd_offline_verify(z, env, mods);
sbin/unwind/libunbound/services/authzone.c
1876
struct module_env* env, char** reason)
sbin/unwind/libunbound/services/authzone.c
1888
region = env->scratch;
sbin/unwind/libunbound/services/authzone.c
1890
buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
2246
int setup, int* is_rpz, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
2263
if(!auth_zones_read_zones(az, cfg, env, mods))
sbin/unwind/libunbound/services/authzone.c
3516
auth_answer_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3527
if(!inplace_cb_reply_local_call(env, qinfo, NULL, msg->rep,
sbin/unwind/libunbound/services/authzone.c
3528
(int)FLAGS_GET_RCODE(msg->rep->flags), edns, repinfo, temp, env->now_tv)
sbin/unwind/libunbound/services/authzone.c
3542
auth_error_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3551
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
sbin/unwind/libunbound/services/authzone.c
3552
rcode, edns, repinfo, temp, env->now_tv))
sbin/unwind/libunbound/services/authzone.c
3559
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3611
env->mesh->num_query_authzone_down++;
sbin/unwind/libunbound/services/authzone.c
3612
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/authzone.c
3624
env->mesh->num_query_authzone_down++;
sbin/unwind/libunbound/services/authzone.c
3628
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/authzone.c
3630
else auth_answer_encode(qinfo, env, edns, repinfo, buf, temp, msg);
sbin/unwind/libunbound/services/authzone.c
3811
xfr_process_notify(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3821
if(!xfr_start_probe(xfr, env, fromhost)) {
sbin/unwind/libunbound/services/authzone.c
3829
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3857
xfr_process_notify(xfr, env, has_serial, serial, fromhost);
sbin/unwind/libunbound/services/authzone.c
3862
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass)
sbin/unwind/libunbound/services/authzone.c
3874
xfr_process_notify(xfr, env, 0, 0, NULL);
sbin/unwind/libunbound/services/authzone.c
3880
auth_xfer_set_expired(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
3891
lock_rw_rdlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
3892
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
sbin/unwind/libunbound/services/authzone.c
3895
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
3899
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
4033
xfr_transfer_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
4037
if(!xfr->task_transfer->lookup_aaaa && env->cfg->do_ip6) {
sbin/unwind/libunbound/services/authzone.c
4045
if(!env->cfg->do_ip4 && xfr->task_transfer->lookup_target!=NULL)
sbin/unwind/libunbound/services/authzone.c
4064
xfr_probe_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
4068
if(!xfr->task_probe->lookup_aaaa && env->cfg->do_ip6) {
sbin/unwind/libunbound/services/authzone.c
4075
if(!env->cfg->do_ip4 && xfr->task_probe->lookup_target!=NULL)
sbin/unwind/libunbound/services/authzone.c
5197
xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5199
struct config_file* cfg = env->cfg;
sbin/unwind/libunbound/services/authzone.c
5207
lock_rw_rdlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5208
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
sbin/unwind/libunbound/services/authzone.c
5211
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5218
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5272
struct module_env* env, struct auth_zone** z)
sbin/unwind/libunbound/services/authzone.c
5276
lock_rw_rdlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5277
*z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
sbin/unwind/libunbound/services/authzone.c
5280
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5287
lock_rw_unlock(&env->auth_zones->lock);
sbin/unwind/libunbound/services/authzone.c
5294
xfr_process_chunk_list(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
5301
if(!xfr_process_reacquire_locks(xfr, env, &z)) {
sbin/unwind/libunbound/services/authzone.c
5309
if(!apply_http(xfr, z, env->scratch_buffer)) {
sbin/unwind/libunbound/services/authzone.c
5317
if(!apply_ixfr(xfr, z, env->scratch_buffer)) {
sbin/unwind/libunbound/services/authzone.c
5325
if(!apply_axfr(xfr, z, env->scratch_buffer)) {
sbin/unwind/libunbound/services/authzone.c
5340
z->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
5341
xfr->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
5347
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 0);
sbin/unwind/libunbound/services/authzone.c
5355
if(!xfr_process_reacquire_locks(xfr, env, &z))
sbin/unwind/libunbound/services/authzone.c
5367
if(!xfr_process_reacquire_locks(xfr, env, &z))
sbin/unwind/libunbound/services/authzone.c
5372
xfr->lease_time = *env->now;
sbin/unwind/libunbound/services/authzone.c
5387
xfr_write_after_update(xfr, env);
sbin/unwind/libunbound/services/authzone.c
5403
xfr->task_transfer->env = NULL;
sbin/unwind/libunbound/services/authzone.c
5408
xfr_transfer_lookup_host(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5417
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
5466
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/services/authzone.c
5479
xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5513
xfr->task_transfer->timer = comm_timer_create(env->worker_base,
sbin/unwind/libunbound/services/authzone.c
5534
env->outnet, auth_xfer_transfer_http_callback, xfr,
sbin/unwind/libunbound/services/authzone.c
5536
master->file, env->cfg);
sbin/unwind/libunbound/services/authzone.c
5560
xfr->task_transfer->id = GET_RANDOM_ID(env->rnd);
sbin/unwind/libunbound/services/authzone.c
5561
xfr_create_ixfr_packet(xfr, env->scratch_buffer,
sbin/unwind/libunbound/services/authzone.c
5565
xfr->task_transfer->cp = outnet_comm_point_for_tcp(env->outnet,
sbin/unwind/libunbound/services/authzone.c
5567
env->scratch_buffer, -1,
sbin/unwind/libunbound/services/authzone.c
5590
xfr_transfer_nexttarget_or_end(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
5592
log_assert(xfr->task_transfer->worker == env->worker);
sbin/unwind/libunbound/services/authzone.c
5596
if(xfr_transfer_lookup_host(xfr, env)) {
sbin/unwind/libunbound/services/authzone.c
5610
xfr_transfer_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
5617
if(xfr_transfer_init_fetch(xfr, env)) {
sbin/unwind/libunbound/services/authzone.c
5637
xfr_set_timeout(xfr, env, 1, 0);
sbin/unwind/libunbound/services/authzone.c
5700
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
5703
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
5704
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
5712
struct regional* temp = env->scratch;
sbin/unwind/libunbound/services/authzone.c
5755
xfr_transfer_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
5756
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6085
process_list_end_transfer(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
6088
if(xfr_process_chunk_list(xfr, env, &ixfr_fail)) {
sbin/unwind/libunbound/services/authzone.c
6105
if(!xfr_start_probe(xfr, env, NULL)) {
sbin/unwind/libunbound/services/authzone.c
6118
xfr_set_timeout(xfr, env, 0, 0);
sbin/unwind/libunbound/services/authzone.c
6131
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6139
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6143
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
6144
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6171
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6180
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6185
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
6186
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6220
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6244
process_list_end_transfer(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6263
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6266
env = xfr->task_transfer->env;
sbin/unwind/libunbound/services/authzone.c
6267
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6289
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6310
process_list_end_transfer(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6326
xfr_start_transfer(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
6333
xfr->task_transfer->worker = env->worker;
sbin/unwind/libunbound/services/authzone.c
6334
xfr->task_transfer->env = env;
sbin/unwind/libunbound/services/authzone.c
6343
xfr_transfer_nexttarget_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6358
xfr->task_probe->env = NULL;
sbin/unwind/libunbound/services/authzone.c
6363
xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
6395
== env->cfg->ssl_port)
sbin/unwind/libunbound/services/authzone.c
6397
= htons((uint16_t)env->cfg->port);
sbin/unwind/libunbound/services/authzone.c
6400
== env->cfg->ssl_port)
sbin/unwind/libunbound/services/authzone.c
6402
= htons((uint16_t)env->cfg->port);
sbin/unwind/libunbound/services/authzone.c
6410
xfr->task_probe->id = GET_RANDOM_ID(env->rnd);
sbin/unwind/libunbound/services/authzone.c
6411
xfr_create_soa_probe_packet(xfr, env->scratch_buffer,
sbin/unwind/libunbound/services/authzone.c
6425
xfr->task_probe->cp = outnet_comm_point_for_udp(env->outnet,
sbin/unwind/libunbound/services/authzone.c
6437
xfr->task_probe->timer = comm_timer_create(env->worker_base,
sbin/unwind/libunbound/services/authzone.c
6446
if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer,
sbin/unwind/libunbound/services/authzone.c
6477
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6480
env = xfr->task_probe->env;
sbin/unwind/libunbound/services/authzone.c
6481
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6493
if(xfr_probe_send_probe(xfr, env, xfr->task_probe->timeout*2)) {
sbin/unwind/libunbound/services/authzone.c
6504
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6513
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6516
env = xfr->task_probe->env;
sbin/unwind/libunbound/services/authzone.c
6517
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6555
xfr_start_transfer(xfr, env, master);
sbin/unwind/libunbound/services/authzone.c
6595
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6601
xfr_probe_lookup_host(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
6610
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
6661
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/services/authzone.c
6673
xfr_probe_send_or_end(struct auth_xfer* xfr, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
6677
if(xfr_probe_lookup_host(xfr, env)) {
sbin/unwind/libunbound/services/authzone.c
6691
xfr_probe_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6711
xfr_set_timeout(xfr, env, 0, 0);
sbin/unwind/libunbound/services/authzone.c
6718
if(xfr_probe_send_probe(xfr, env, AUTH_PROBE_TIMEOUT)) {
sbin/unwind/libunbound/services/authzone.c
6737
xfr->lease_time = *env->now;
sbin/unwind/libunbound/services/authzone.c
6739
xfr_set_timeout(xfr, env, 0, 0);
sbin/unwind/libunbound/services/authzone.c
6751
xfr_set_timeout(xfr, env, 1, 0);
sbin/unwind/libunbound/services/authzone.c
6763
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6766
env = xfr->task_probe->env;
sbin/unwind/libunbound/services/authzone.c
6767
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6775
struct regional* temp = env->scratch;
sbin/unwind/libunbound/services/authzone.c
6818
xfr_probe_move_to_next_lookup(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6819
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6833
xfr->task_nextprobe->env = NULL;
sbin/unwind/libunbound/services/authzone.c
6841
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
6844
env = xfr->task_nextprobe->env;
sbin/unwind/libunbound/services/authzone.c
6845
if(!env || env->outnet->want_to_quit) {
sbin/unwind/libunbound/services/authzone.c
6852
*env->now >= xfr->lease_time + xfr->expiry) {
sbin/unwind/libunbound/services/authzone.c
6854
auth_xfer_set_expired(xfr, env, 1);
sbin/unwind/libunbound/services/authzone.c
6860
if(!xfr_start_probe(xfr, env, NULL)) {
sbin/unwind/libunbound/services/authzone.c
6882
xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
6894
xfr_start_transfer(xfr, env, spec);
sbin/unwind/libunbound/services/authzone.c
6902
xfr->task_probe->worker = env->worker;
sbin/unwind/libunbound/services/authzone.c
6903
xfr->task_probe->env = env;
sbin/unwind/libunbound/services/authzone.c
6916
xfr_probe_send_or_end(xfr, env);
sbin/unwind/libunbound/services/authzone.c
6930
xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
6936
xfr->task_nextprobe->worker == env->worker);
sbin/unwind/libunbound/services/authzone.c
6940
xfr->task_nextprobe->next_probe = *env->now;
sbin/unwind/libunbound/services/authzone.c
6967
xfr->lease_time+xfr->expiry > *env->now)
sbin/unwind/libunbound/services/authzone.c
6977
env->worker_base, auth_xfer_timer, xfr);
sbin/unwind/libunbound/services/authzone.c
6988
xfr->task_nextprobe->worker = env->worker;
sbin/unwind/libunbound/services/authzone.c
6989
xfr->task_nextprobe->env = env;
sbin/unwind/libunbound/services/authzone.c
6990
if(*(xfr->task_nextprobe->env->now) <= xfr->task_nextprobe->next_probe)
sbin/unwind/libunbound/services/authzone.c
6992
*(xfr->task_nextprobe->env->now);
sbin/unwind/libunbound/services/authzone.c
7011
void auth_zone_pickup_initial_zone(struct auth_zone* z, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
7016
z->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
7019
void auth_xfer_pickup_initial_zone(struct auth_xfer* x, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
7025
x->lease_time = *env->now;
sbin/unwind/libunbound/services/authzone.c
7026
x->soa_zone_acquired = *env->now;
sbin/unwind/libunbound/services/authzone.c
7029
xfr_set_timeout(x, env, 0, 1);
sbin/unwind/libunbound/services/authzone.c
7035
auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
7042
auth_zone_pickup_initial_zone(z, env);
sbin/unwind/libunbound/services/authzone.c
7047
auth_xfer_pickup_initial_zone(x, env);
sbin/unwind/libunbound/services/authzone.c
7822
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
7838
ve = (struct val_env*)env->modinfo[m];
sbin/unwind/libunbound/services/authzone.c
7854
sec = dnskeyset_verify_rrset(env, ve, &pk, dnskey, sigalg, why_bogus, NULL,
sbin/unwind/libunbound/services/authzone.c
7896
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
7910
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
7953
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, match,
sbin/unwind/libunbound/services/authzone.c
7973
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
7988
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex, soa,
sbin/unwind/libunbound/services/authzone.c
7993
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
8010
static void auth_zone_zonemd_fail(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8032
if(env->cfg->zonemd_permissive_mode) {
sbin/unwind/libunbound/services/authzone.c
8058
auth_zone_verify_zonemd_with_key(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8086
auth_zone_zonemd_fail(z, env, "DNSKEY missing", NULL, result);
sbin/unwind/libunbound/services/authzone.c
8090
if(!zonemd_check_dnssec_absence(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
8093
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
sbin/unwind/libunbound/services/authzone.c
8099
if(!zonemd_check_dnssec_soazonemd(z, env, mods, dnskey, apex,
sbin/unwind/libunbound/services/authzone.c
8102
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
sbin/unwind/libunbound/services/authzone.c
8108
auth_zone_zonemd_fail(z, env, "ZONEMD absent and that is not allowed by config", NULL, result);
sbin/unwind/libunbound/services/authzone.c
8129
if(!auth_zone_zonemd_check_hash(z, env, &reason)) {
sbin/unwind/libunbound/services/authzone.c
8130
auth_zone_zonemd_fail(z, env, reason, NULL, result);
sbin/unwind/libunbound/services/authzone.c
8164
zonemd_get_dnskey_from_anchor(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8192
ve = (struct val_env*)env->modinfo[m];
sbin/unwind/libunbound/services/authzone.c
8203
sec = val_verify_DNSKEY_with_TA(env, ve, keystorage, anchor->ds_rrset,
sbin/unwind/libunbound/services/authzone.c
8206
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8226
struct module_env* env, struct module_stack* mods,
sbin/unwind/libunbound/services/authzone.c
8254
ve = (struct val_env*)env->modinfo[m];
sbin/unwind/libunbound/services/authzone.c
8264
sec = val_verify_DNSKEY_with_DS(env, ve, keystorage, ds, sigalg,
sbin/unwind/libunbound/services/authzone.c
8266
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8290
struct module_env* env;
sbin/unwind/libunbound/services/authzone.c
8299
env = z->zonemd_callback_env;
sbin/unwind/libunbound/services/authzone.c
8303
if(!env || env->outnet->want_to_quit || z->zone_deleted) {
sbin/unwind/libunbound/services/authzone.c
8309
downprot = env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/services/authzone.c
8323
struct regional* temp = env->scratch;
sbin/unwind/libunbound/services/authzone.c
8401
dnskey = auth_zone_verify_zonemd_key_with_ds(z, env,
sbin/unwind/libunbound/services/authzone.c
8402
&env->mesh->mods, ds, &is_insecure, &ds_bogus,
sbin/unwind/libunbound/services/authzone.c
8410
auth_zone_zonemd_fail(z, env, reason, ds_bogus, NULL);
sbin/unwind/libunbound/services/authzone.c
8412
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8416
auth_zone_verify_zonemd_with_key(z, env, &env->mesh->mods, dnskey,
sbin/unwind/libunbound/services/authzone.c
8418
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8424
zonemd_lookup_dnskey(struct auth_zone* z, struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
8429
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/services/authzone.c
8479
z->zonemd_callback_env = env;
sbin/unwind/libunbound/services/authzone.c
8483
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/services/authzone.c
8494
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.c
8515
if(env->anchors)
sbin/unwind/libunbound/services/authzone.c
8516
anchor = anchors_lookup(env->anchors, z->name, z->namelen,
sbin/unwind/libunbound/services/authzone.c
8531
dnskey = zonemd_get_dnskey_from_anchor(z, env, mods, anchor,
sbin/unwind/libunbound/services/authzone.c
8544
if(zonemd_lookup_dnskey(z, env)) {
sbin/unwind/libunbound/services/authzone.c
8558
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
sbin/unwind/libunbound/services/authzone.c
8559
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8563
auth_zone_verify_zonemd_with_key(z, env, mods, dnskey, is_insecure,
sbin/unwind/libunbound/services/authzone.c
8565
regional_free_all(env->scratch);
sbin/unwind/libunbound/services/authzone.c
8569
struct module_env* env)
sbin/unwind/libunbound/services/authzone.c
8593
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 1);
sbin/unwind/libunbound/services/authzone.h
301
struct module_env* env;
sbin/unwind/libunbound/services/authzone.h
327
struct module_env* env;
sbin/unwind/libunbound/services/authzone.h
375
struct module_env* env;
sbin/unwind/libunbound/services/authzone.h
496
int setup, int* is_rpz, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
504
void auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env);
sbin/unwind/libunbound/services/authzone.h
557
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
625
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
638
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass);
sbin/unwind/libunbound/services/authzone.h
775
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/authzone.h
792
struct module_env* env);
sbin/unwind/libunbound/services/authzone.h
805
struct module_env* env);
sbin/unwind/libunbound/services/authzone.h
813
struct module_env* env);
sbin/unwind/libunbound/services/cache/dns.c
1013
if(env->cfg->harden_below_nxdomain) {
sbin/unwind/libunbound/services/cache/dns.c
1020
e = slabhash_lookup(env->msg_cache, h, &k, 0);
sbin/unwind/libunbound/services/cache/dns.c
1022
env->cfg->qname_minimisation) {
sbin/unwind/libunbound/services/cache/dns.c
1025
e = slabhash_lookup(env->msg_cache, h, &k, 0);
sbin/unwind/libunbound/services/cache/dns.c
1034
&& (msg=tomsg(env, &k, data, region, now, 0, scratch))) {
sbin/unwind/libunbound/services/cache/dns.c
1051
return fill_any(env, qname, qnamelen, qtype, qclass, region);
sbin/unwind/libunbound/services/cache/dns.c
1058
dns_cache_store(struct module_env* env, struct query_info* msgqinf,
sbin/unwind/libunbound/services/cache/dns.c
1067
struct msgreply_entry* e = msg_cache_lookup(env,
sbin/unwind/libunbound/services/cache/dns.c
1072
if(cached->ttl < *env->now
sbin/unwind/libunbound/services/cache/dns.c
1073
&& reply_info_could_use_expired(cached, *env->now)
sbin/unwind/libunbound/services/cache/dns.c
1082
&& (env->need_to_validate &&
sbin/unwind/libunbound/services/cache/dns.c
1105
NORR_TTL + *env->now;
sbin/unwind/libunbound/services/cache/dns.c
1106
if(env->cfg->serve_expired_ttl_reset &&
sbin/unwind/libunbound/services/cache/dns.c
1108
< *env->now +
sbin/unwind/libunbound/services/cache/dns.c
1109
env->cfg->serve_expired_ttl) {
sbin/unwind/libunbound/services/cache/dns.c
1116
*env->now +
sbin/unwind/libunbound/services/cache/dns.c
1117
env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/services/cache/dns.c
1130
rep = reply_info_copy(msgrep, env->alloc, NULL);
sbin/unwind/libunbound/services/cache/dns.c
1142
rep->rrsets[i]->entry.data, *env->now);
sbin/unwind/libunbound/services/cache/dns.c
1147
(void)rrset_cache_update(env->rrset_cache, &ref,
sbin/unwind/libunbound/services/cache/dns.c
1148
env->alloc,
sbin/unwind/libunbound/services/cache/dns.c
1150
&& !pside) ? qstarttime:*env->now + leeway));
sbin/unwind/libunbound/services/cache/dns.c
1162
reply_info_parsedelete(rep, env->alloc);
sbin/unwind/libunbound/services/cache/dns.c
1171
dns_cache_store_msg(env, &qinf, h, rep, leeway, pside, msgrep,
sbin/unwind/libunbound/services/cache/dns.c
1181
dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.c
1185
msg = msg_cache_lookup(env, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/services/cache/dns.c
1186
qinfo->qtype, qinfo->qclass, flags, *env->now, 1);
sbin/unwind/libunbound/services/cache/dns.c
139
msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
151
slabhash_remove(env->msg_cache, h, &k);
sbin/unwind/libunbound/services/cache/dns.c
155
dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.c
172
reply_info_set_ttls(rep, *env->now);
sbin/unwind/libunbound/services/cache/dns.c
173
store_rrsets(env, rep, *env->now, leeway, pside, qrep, region,
sbin/unwind/libunbound/services/cache/dns.c
191
msg_cache_remove(env, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/services/cache/dns.c
203
slabhash_insert(env->msg_cache, hash, &e->entry, rep, env->alloc);
sbin/unwind/libunbound/services/cache/dns.c
208
find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
224
if((rrset = rrset_cache_lookup(env->rrset_cache, qname,
sbin/unwind/libunbound/services/cache/dns.c
243
if(!rrset_cache_expired_above(env->rrset_cache, &qname,
sbin/unwind/libunbound/services/cache/dns.c
250
if((rrset = rrset_cache_lookup(env->
sbin/unwind/libunbound/services/cache/dns.c
282
msg_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
295
e = slabhash_lookup(env->msg_cache, h, &k, wr);
sbin/unwind/libunbound/services/cache/dns.c
307
find_add_addrs(struct module_env* env, uint16_t qclass,
sbin/unwind/libunbound/services/cache/dns.c
315
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
328
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
335
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
348
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
355
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
368
cache_fill_missing(struct module_env* env, uint16_t qclass,
sbin/unwind/libunbound/services/cache/dns.c
374
time_t now = *env->now;
sbin/unwind/libunbound/services/cache/dns.c
379
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
393
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
400
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
sbin/unwind/libunbound/services/cache/dns.c
414
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
421
neg = msg_cache_lookup(env, ns->name, ns->namelen,
sbin/unwind/libunbound/services/cache/dns.c
434
find_add_ds(struct module_env* env, struct regional* region,
sbin/unwind/libunbound/services/cache/dns.c
439
env->rrset_cache, dp->name, dp->namelen, LDNS_RR_TYPE_DS,
sbin/unwind/libunbound/services/cache/dns.c
444
rrset = rrset_cache_lookup(env->rrset_cache, dp->name,
sbin/unwind/libunbound/services/cache/dns.c
522
dns_cache_find_delegation(struct module_env* env, uint8_t* qname,
sbin/unwind/libunbound/services/cache/dns.c
532
nskey = find_closest_of_type(env, qname, qnamelen, qclass, now,
sbin/unwind/libunbound/services/cache/dns.c
564
find_add_ds(env, region, *msg, dp, now);
sbin/unwind/libunbound/services/cache/dns.c
566
if(!find_add_addrs(env, qclass, region, dp, now, msg))
sbin/unwind/libunbound/services/cache/dns.c
601
tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
sbin/unwind/libunbound/services/cache/dns.c
615
now_control = r->ttl - env->cfg->serve_expired_reply_ttl;
sbin/unwind/libunbound/services/cache/dns.c
666
if(env)
sbin/unwind/libunbound/services/cache/dns.c
667
rrset_array_unlock_touch(env->rrset_cache, scratch, r->ref,
sbin/unwind/libunbound/services/cache/dns.c
78
store_rrsets(struct module_env* env, struct reply_info* rep, time_t now,
sbin/unwind/libunbound/services/cache/dns.c
825
fill_any(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.c
829
time_t now = *env->now;
sbin/unwind/libunbound/services/cache/dns.c
837
if(env->cfg->deny_any) {
sbin/unwind/libunbound/services/cache/dns.c
853
env->rrset_cache, qname, qnamelen, lookup[i],
sbin/unwind/libunbound/services/cache/dns.c
89
switch(rrset_cache_update(env->rrset_cache, &rep->ref[i],
sbin/unwind/libunbound/services/cache/dns.c
890
dns_cache_lookup(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.c
898
time_t now = *env->now;
sbin/unwind/libunbound/services/cache/dns.c
90
env->alloc, ((ntohs(rep->ref[i].key->rk.type)==
sbin/unwind/libunbound/services/cache/dns.c
908
e = slabhash_lookup(env->msg_cache, h, &k, 0);
sbin/unwind/libunbound/services/cache/dns.c
912
struct dns_msg* msg = tomsg(env, &key->key, data, region, now, 0,
sbin/unwind/libunbound/services/cache/dns.c
926
(rrset=find_closest_of_type(env, qname, qnamelen, qclass, now,
sbin/unwind/libunbound/services/cache/dns.c
948
env->rrset_cache, qname, qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
965
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
sbin/unwind/libunbound/services/cache/dns.c
984
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
sbin/unwind/libunbound/services/cache/dns.h
124
void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.h
148
struct delegpt* dns_cache_find_delegation(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.h
166
struct dns_msg* tomsg(struct module_env* env, struct query_info* q,
sbin/unwind/libunbound/services/cache/dns.h
197
struct dns_msg* dns_cache_lookup(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.h
211
int cache_fill_missing(struct module_env* env, uint16_t qclass,
sbin/unwind/libunbound/services/cache/dns.h
262
int dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/cache/dns.h
267
struct msgreply_entry* msg_cache_lookup(struct module_env* env,
sbin/unwind/libunbound/services/cache/dns.h
280
void msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
sbin/unwind/libunbound/services/cache/dns.h
97
int dns_cache_store(struct module_env* env, struct query_info* qinf,
sbin/unwind/libunbound/services/localzone.c
1310
local_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1332
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
sbin/unwind/libunbound/services/localzone.c
1333
repinfo, temp, env->now_tv) || !reply_info_answer_encode(qinfo, &rep,
sbin/unwind/libunbound/services/localzone.c
1345
local_error_encode(struct query_info* qinfo, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1355
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
sbin/unwind/libunbound/services/localzone.c
1356
rcode, edns, repinfo, temp, env->now_tv))
sbin/unwind/libunbound/services/localzone.c
1359
if(ede_code != LDNS_EDE_NONE && env->cfg->ede) {
sbin/unwind/libunbound/services/localzone.c
1481
local_data_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1513
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1559
local_error_encode(qinfo, env, edns, repinfo,
sbin/unwind/libunbound/services/localzone.c
1607
return local_encode(qinfo, env, edns, repinfo, buf, temp, &r, 1,
sbin/unwind/libunbound/services/localzone.c
1610
return local_encode(qinfo, env, edns, repinfo, buf, temp, lr->rrset, 1,
sbin/unwind/libunbound/services/localzone.c
1653
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1667
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1692
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1694
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1704
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1743
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1747
local_error_encode(qinfo, env, edns, repinfo, buf,
sbin/unwind/libunbound/services/localzone.c
1760
return local_encode(qinfo, env, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/localzone.c
1763
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
sbin/unwind/libunbound/services/localzone.c
1845
local_zones_answer(struct local_zones* zones, struct module_env* env,
sbin/unwind/libunbound/services/localzone.c
1916
if((env->cfg->log_local_actions ||
sbin/unwind/libunbound/services/localzone.c
1930
&& local_data_answer(z, env, qinfo, edns, repinfo, buf, temp, labs,
sbin/unwind/libunbound/services/localzone.c
1937
r = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp, ld, lzt);
sbin/unwind/libunbound/services/localzone.h
324
int local_zones_answer(struct local_zones* zones, struct module_env* env,
sbin/unwind/libunbound/services/localzone.h
345
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/localzone.h
608
local_data_answer(struct local_zone* z, struct module_env* env,
sbin/unwind/libunbound/services/mesh.c
1004
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/mesh.c
1017
mstate->s.env = env;
sbin/unwind/libunbound/services/mesh.c
1025
mstate->s.qstarttime = *env->now;
sbin/unwind/libunbound/services/mesh.c
1028
for(i=0; i<env->mesh->mods.num; i++) {
sbin/unwind/libunbound/services/mesh.c
1054
mesh = mstate->s.env->mesh;
sbin/unwind/libunbound/services/mesh.c
1069
infra_wait_limit_dec(mesh->env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
1070
&rep->query_reply, mesh->env->cfg);
sbin/unwind/libunbound/services/mesh.c
1094
alloc_reg_release(mstate->s.env->alloc, mstate->s.region);
sbin/unwind/libunbound/services/mesh.c
1106
mesh = mstate->s.env->mesh;
sbin/unwind/libunbound/services/mesh.c
1167
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
1197
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
1209
*sub = mesh_state_create(qstate->env, qinfo, NULL, qflags, prime,
sbin/unwind/libunbound/services/mesh.c
1241
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
1328
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
sbin/unwind/libunbound/services/mesh.c
1332
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
sbin/unwind/libunbound/services/mesh.c
1346
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
sbin/unwind/libunbound/services/mesh.c
1349
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
sbin/unwind/libunbound/services/mesh.c
1353
m->s.env->scratch, udp_size, &r->edns,
sbin/unwind/libunbound/services/mesh.c
1367
log_assert(m->s.env->mesh->num_reply_addrs > 0);
sbin/unwind/libunbound/services/mesh.c
1368
m->s.env->mesh->num_reply_addrs--;
sbin/unwind/libunbound/services/mesh.c
1444
if(m->s.env->need_to_validate && (!(r->qflags&BIT_CD) ||
sbin/unwind/libunbound/services/mesh.c
1445
m->s.env->cfg->ignore_cd) && rep &&
sbin/unwind/libunbound/services/mesh.c
1449
if(m->s.env->cfg->stat_extended)
sbin/unwind/libunbound/services/mesh.c
1450
m->s.env->mesh->ans_bogus++;
sbin/unwind/libunbound/services/mesh.c
1473
!m->s.env->inplace_cb_lists[inplace_cb_reply]) ||
sbin/unwind/libunbound/services/mesh.c
1475
!m->s.env->inplace_cb_lists[inplace_cb_reply_servfail])) &&
sbin/unwind/libunbound/services/mesh.c
1497
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
sbin/unwind/libunbound/services/mesh.c
1501
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
sbin/unwind/libunbound/services/mesh.c
1509
if(m->s.env->cfg->ede && rep) {
sbin/unwind/libunbound/services/mesh.c
1523
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
sbin/unwind/libunbound/services/mesh.c
1531
if(m->s.env->cfg->ede && rep &&
sbin/unwind/libunbound/services/mesh.c
1537
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
sbin/unwind/libunbound/services/mesh.c
1540
r->qflags, r_buffer, 0, 1, m->s.env->scratch,
sbin/unwind/libunbound/services/mesh.c
1544
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
sbin/unwind/libunbound/services/mesh.c
1556
infra_wait_limit_dec(m->s.env->infra_cache, &r->query_reply,
sbin/unwind/libunbound/services/mesh.c
1557
m->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
1559
log_assert(m->s.env->mesh->num_reply_addrs > 0);
sbin/unwind/libunbound/services/mesh.c
1560
m->s.env->mesh->num_reply_addrs--;
sbin/unwind/libunbound/services/mesh.c
1561
end_time = *m->s.env->now_tv;
sbin/unwind/libunbound/services/mesh.c
1565
m->s.env->mesh->replies_sent++;
sbin/unwind/libunbound/services/mesh.c
1566
timeval_add(&m->s.env->mesh->replies_sum_wait, &duration);
sbin/unwind/libunbound/services/mesh.c
1567
timehist_insert(m->s.env->mesh->histogram, &duration);
sbin/unwind/libunbound/services/mesh.c
1568
if(m->s.env->cfg->stat_extended) {
sbin/unwind/libunbound/services/mesh.c
1571
if(secure) m->s.env->mesh->ans_secure++;
sbin/unwind/libunbound/services/mesh.c
1572
m->s.env->mesh->ans_rcode[ rc ] ++;
sbin/unwind/libunbound/services/mesh.c
1574
m->s.env->mesh->ans_nodata++;
sbin/unwind/libunbound/services/mesh.c
1577
if(m->s.env->cfg->log_replies) {
sbin/unwind/libunbound/services/mesh.c
1581
(m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr:NULL),
sbin/unwind/libunbound/services/mesh.c
1688
qstate->env->mesh->num_dns_error_reports++;
sbin/unwind/libunbound/services/mesh.c
1714
if(mstate->s.env->cfg->serve_expired) {
sbin/unwind/libunbound/services/mesh.c
1719
&& mstate->s.env->cfg->log_servfail
sbin/unwind/libunbound/services/mesh.c
1720
&& !mstate->s.env->cfg->val_log_squelch) {
sbin/unwind/libunbound/services/mesh.c
1726
if(mstate->reply_list && mstate->s.env->cfg->dns_error_reporting)
sbin/unwind/libunbound/services/mesh.c
1731
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
sbin/unwind/libunbound/services/mesh.c
1732
if(mstate->s.env->cfg->discard_timeout != 0 &&
sbin/unwind/libunbound/services/mesh.c
1734
mstate->s.env->cfg->discard_timeout) {
sbin/unwind/libunbound/services/mesh.c
1743
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
1744
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
1750
mstate->s.env->mesh->num_queries_discard_timeout++;
sbin/unwind/libunbound/services/mesh.c
1777
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
1778
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
1806
mstate->s.env->cfg->stat_extended &&
sbin/unwind/libunbound/services/mesh.c
1809
mstate->s.env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
1811
mstate->s.env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
1813
mstate->s.env->mesh->rpz_action[respip_action_to_rpz_action(
sbin/unwind/libunbound/services/mesh.c
1817
if(mstate->s.env->cfg->stat_extended
sbin/unwind/libunbound/services/mesh.c
1819
mstate->s.env->mesh->ans_cachedb += i;
sbin/unwind/libunbound/services/mesh.c
1828
log_assert(mstate->s.env->mesh->num_reply_states > 0);
sbin/unwind/libunbound/services/mesh.c
1829
mstate->s.env->mesh->num_reply_states--;
sbin/unwind/libunbound/services/mesh.c
1833
mstate->s.env->mesh->num_detached_states++;
sbin/unwind/libunbound/services/mesh.c
1842
log_assert(mstate->s.env->mesh->num_reply_states > 0);
sbin/unwind/libunbound/services/mesh.c
1843
mstate->s.env->mesh->num_reply_states--;
sbin/unwind/libunbound/services/mesh.c
1848
mstate->s.env->mesh->num_detached_states++;
sbin/unwind/libunbound/services/mesh.c
1962
r->start_time = *s->s.env->now_tv;
sbin/unwind/libunbound/services/mesh.c
2028
struct regional* region = mstate->s.env->scratch;
sbin/unwind/libunbound/services/mesh.c
207
mesh_create(struct module_stack* stack, struct module_env* env)
sbin/unwind/libunbound/services/mesh.c
2123
mstate->s.env->unique_mesh) {
sbin/unwind/libunbound/services/mesh.c
2142
mstate->s.env->cfg->client_subnet_opcode)) != NULL) {
sbin/unwind/libunbound/services/mesh.c
2146
mstate->s.env->scratch);
sbin/unwind/libunbound/services/mesh.c
215
mesh->qbuf_bak = sldns_buffer_new(env->cfg->msg_buffer_size);
sbin/unwind/libunbound/services/mesh.c
2185
regional_free_all(mstate->s.env->scratch);
sbin/unwind/libunbound/services/mesh.c
222
mesh->env = env;
sbin/unwind/libunbound/services/mesh.c
2297
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
2342
infra_wait_limit_dec(mesh->env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
2343
&n->query_reply, mesh->env->cfg);
sbin/unwind/libunbound/services/mesh.c
236
mesh->max_reply_states = env->cfg->num_queries_per_thread;
sbin/unwind/libunbound/services/mesh.c
2378
alias_rrset, 0, qstate->region, az, NULL, qstate->env->views,
sbin/unwind/libunbound/services/mesh.c
2379
qstate->env->respip_set))
sbin/unwind/libunbound/services/mesh.c
239
mesh->jostle_max.tv_sec = (time_t)(env->cfg->jostle_time / 1000);
sbin/unwind/libunbound/services/mesh.c
2398
struct mesh_area* mesh = qstate->env->mesh;
sbin/unwind/libunbound/services/mesh.c
240
mesh->jostle_max.tv_usec = (time_t)((env->cfg->jostle_time % 1000)
sbin/unwind/libunbound/services/mesh.c
2412
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
sbin/unwind/libunbound/services/mesh.c
2449
qstate->env->auth_zones)) {
sbin/unwind/libunbound/services/mesh.c
2454
qstate->env->auth_zones, qstate->env->views,
sbin/unwind/libunbound/services/mesh.c
2455
qstate->env->respip_set)) {
sbin/unwind/libunbound/services/mesh.c
2494
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
sbin/unwind/libunbound/services/mesh.c
2495
if(mstate->s.env->cfg->discard_timeout != 0 &&
sbin/unwind/libunbound/services/mesh.c
2497
mstate->s.env->cfg->discard_timeout) {
sbin/unwind/libunbound/services/mesh.c
2506
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
2507
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
2513
mstate->s.env->mesh->num_queries_discard_timeout++;
sbin/unwind/libunbound/services/mesh.c
2532
qstate->env->cfg->ede_serve_expired &&
sbin/unwind/libunbound/services/mesh.c
2533
qstate->env->cfg->ede &&
sbin/unwind/libunbound/services/mesh.c
2547
infra_wait_limit_dec(mstate->s.env->infra_cache,
sbin/unwind/libunbound/services/mesh.c
2548
&r->query_reply, mstate->s.env->cfg);
sbin/unwind/libunbound/services/mesh.c
2555
if(actinfo.addrinfo && qstate->env->cfg->stat_extended &&
sbin/unwind/libunbound/services/mesh.c
2558
qstate->env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
2560
qstate->env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
sbin/unwind/libunbound/services/mesh.c
2562
qstate->env->mesh->rpz_action[
sbin/unwind/libunbound/services/mesh.c
2584
log_assert(qstate->env->mesh->num_reply_states > 0);
sbin/unwind/libunbound/services/mesh.c
2585
qstate->env->mesh->num_reply_states--;
sbin/unwind/libunbound/services/mesh.c
2590
qstate->env->mesh->num_detached_states++;
sbin/unwind/libunbound/services/mesh.c
302
timeval_subtract(&age, mesh->env->now_tv,
sbin/unwind/libunbound/services/mesh.c
340
time_t timenow = *qstate->env->now;
sbin/unwind/libunbound/services/mesh.c
342
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
sbin/unwind/libunbound/services/mesh.c
346
e = slabhash_lookup(qstate->env->msg_cache, h, lookup_qinfo, 0);
sbin/unwind/libunbound/services/mesh.c
352
msg = tomsg(qstate->env, &key->key, data, qstate->region, timenow,
sbin/unwind/libunbound/services/mesh.c
353
qstate->env->cfg->serve_expired, qstate->env->scratch);
sbin/unwind/libunbound/services/mesh.c
412
mstate->s.env->worker_base, mesh_serve_expired_callback, mstate);
sbin/unwind/libunbound/services/mesh.c
430
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
sbin/unwind/libunbound/services/mesh.c
434
int timeout = mesh->env->cfg->serve_expired?
sbin/unwind/libunbound/services/mesh.c
435
mesh->env->cfg->serve_expired_client_timeout:0;
sbin/unwind/libunbound/services/mesh.c
441
if(!infra_wait_limit_allowed(mesh->env->infra_cache, rep,
sbin/unwind/libunbound/services/mesh.c
442
edns->cookie_valid, mesh->env->cfg)) {
sbin/unwind/libunbound/services/mesh.c
477
s = mesh_state_create(mesh->env, qinfo, cinfo,
sbin/unwind/libunbound/services/mesh.c
481
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
sbin/unwind/libunbound/services/mesh.c
482
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
sbin/unwind/libunbound/services/mesh.c
500
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL,
sbin/unwind/libunbound/services/mesh.c
501
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
sbin/unwind/libunbound/services/mesh.c
546
if(!timeout && mesh->env->cfg->serve_expired &&
sbin/unwind/libunbound/services/mesh.c
547
!mesh->env->cfg->serve_expired_client_timeout &&
sbin/unwind/libunbound/services/mesh.c
548
(mesh->env->cachedb_enabled &&
sbin/unwind/libunbound/services/mesh.c
549
mesh->env->cfg->cachedb_check_when_serve_expired)) {
sbin/unwind/libunbound/services/mesh.c
556
infra_wait_limit_inc(mesh->env->infra_cache, rep, *mesh->env->now,
sbin/unwind/libunbound/services/mesh.c
557
mesh->env->cfg);
sbin/unwind/libunbound/services/mesh.c
585
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s,
sbin/unwind/libunbound/services/mesh.c
586
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
sbin/unwind/libunbound/services/mesh.c
604
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
sbin/unwind/libunbound/services/mesh.c
605
int timeout = mesh->env->cfg->serve_expired?
sbin/unwind/libunbound/services/mesh.c
606
mesh->env->cfg->serve_expired_client_timeout:0;
sbin/unwind/libunbound/services/mesh.c
621
s = mesh_state_create(mesh->env, qinfo, NULL,
sbin/unwind/libunbound/services/mesh.c
667
if(!timeout && mesh->env->cfg->serve_expired &&
sbin/unwind/libunbound/services/mesh.c
668
!mesh->env->cfg->serve_expired_client_timeout &&
sbin/unwind/libunbound/services/mesh.c
669
(mesh->env->cachedb_enabled &&
sbin/unwind/libunbound/services/mesh.c
670
mesh->env->cfg->cachedb_check_when_serve_expired)) {
sbin/unwind/libunbound/services/mesh.c
726
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
sbin/unwind/libunbound/services/mesh.c
797
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
sbin/unwind/libunbound/services/mesh.c
804
opt = edns_opt_list_find(edns_list, mesh->env->cfg->client_subnet_opcode);
sbin/unwind/libunbound/services/mesh.c
963
mesh_state_create(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/mesh.c
967
struct regional* region = alloc_reg_obtain(env->alloc);
sbin/unwind/libunbound/services/mesh.c
975
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/mesh.c
998
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/mesh.h
291
struct module_env* env);
sbin/unwind/libunbound/services/mesh.h
492
struct mesh_state* mesh_state_create(struct module_env* env,
sbin/unwind/libunbound/services/mesh.h
86
struct module_env* env;
sbin/unwind/libunbound/services/modstack.c
237
struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
252
if(!(*stack->mod[i]->startup)(env, i)) {
sbin/unwind/libunbound/services/modstack.c
263
struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
266
env->need_to_validate = 0; /* set by module init below */
sbin/unwind/libunbound/services/modstack.c
292
if(!(*stack->mod[i]->init)(env, i)) {
sbin/unwind/libunbound/services/modstack.c
302
modstack_call_deinit(struct module_stack* stack, struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
307
(*stack->mod[i]->deinit)(env, i);
sbin/unwind/libunbound/services/modstack.c
312
modstack_call_destartup(struct module_stack* stack, struct module_env* env)
sbin/unwind/libunbound/services/modstack.c
319
(*stack->mod[i]->destartup)(env, i);
sbin/unwind/libunbound/services/modstack.c
335
mod_get_mem(struct module_env* env, const char* name)
sbin/unwind/libunbound/services/modstack.c
337
int m = modstack_find(&env->mesh->mods, name);
sbin/unwind/libunbound/services/modstack.c
339
fptr_ok(fptr_whitelist_mod_get_mem(env->mesh->
sbin/unwind/libunbound/services/modstack.c
341
return (*env->mesh->mods.mod[m]->get_mem)(env, m);
sbin/unwind/libunbound/services/modstack.h
113
struct module_env* env);
sbin/unwind/libunbound/services/modstack.h
120
void modstack_call_deinit(struct module_stack* stack, struct module_env* env);
sbin/unwind/libunbound/services/modstack.h
127
void modstack_call_destartup(struct module_stack* stack, struct module_env* env);
sbin/unwind/libunbound/services/modstack.h
138
size_t mod_get_mem(struct module_env* env, const char* name);
sbin/unwind/libunbound/services/modstack.h
78
struct module_env* env);
sbin/unwind/libunbound/services/outside_network.c
3429
sldns_buffer* buff, struct module_env* env, int* was_ratelimited)
sbin/unwind/libunbound/services/outside_network.c
3444
region = alloc_reg_obtain(env->alloc);
sbin/unwind/libunbound/services/outside_network.c
3450
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3456
if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen, zone,
sbin/unwind/libunbound/services/outside_network.c
3458
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3467
&env->edns_strings->client_strings, addr, addrlen))) {
sbin/unwind/libunbound/services/outside_network.c
3469
env->edns_strings->client_string_opcode,
sbin/unwind/libunbound/services/outside_network.c
3481
timenow = *env->now;
sbin/unwind/libunbound/services/outside_network.c
3482
if(!infra_ratelimit_inc(env->infra_cache, zone,
sbin/unwind/libunbound/services/outside_network.c
3483
zonelen, timenow, env->cfg->ratelimit_backoff,
sbin/unwind/libunbound/services/outside_network.c
3489
if(env->cfg->ratelimit_factor == 0 ||
sbin/unwind/libunbound/services/outside_network.c
3490
ub_random_max(env->rnd,
sbin/unwind/libunbound/services/outside_network.c
3491
env->cfg->ratelimit_factor) != 1) {
sbin/unwind/libunbound/services/outside_network.c
3493
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3507
( ssl_upstream && env->cfg->pad_queries
sbin/unwind/libunbound/services/outside_network.c
3508
? env->cfg->pad_queries_block_size : 0 ),
sbin/unwind/libunbound/services/outside_network.c
3509
env->alloc, region);
sbin/unwind/libunbound/services/outside_network.c
3512
infra_ratelimit_dec(env->infra_cache,
sbin/unwind/libunbound/services/outside_network.c
3520
infra_ratelimit_dec(env->infra_cache,
sbin/unwind/libunbound/services/outside_network.c
3531
alloc_reg_release(env->alloc, region);
sbin/unwind/libunbound/services/outside_network.h
665
struct sldns_buffer* buff, struct module_env* env, int* was_ratelimited);
sbin/unwind/libunbound/services/rpz.c
1773
rpz_local_encode(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/rpz.c
1806
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
sbin/unwind/libunbound/services/rpz.c
1807
repinfo, temp, env->now_tv) ||
sbin/unwind/libunbound/services/rpz.c
1842
struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/services/rpz.c
1891
rpz_local_encode(env, qinfo, edns, repinfo, buf, temp, rp,
sbin/unwind/libunbound/services/rpz.c
2236
rpz_synthesize_qname_localdata(struct module_env* env, struct rpz* r,
sbin/unwind/libunbound/services/rpz.c
2254
if(lzt == local_zone_redirect && local_data_answer(z, env, qinfo,
sbin/unwind/libunbound/services/rpz.c
2266
ret = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp,
sbin/unwind/libunbound/services/rpz.c
2360
if(ms->env->worker)
sbin/unwind/libunbound/services/rpz.c
2361
ms->env->worker->stats.rpz_action[action]++;
sbin/unwind/libunbound/services/rpz.c
2422
if(ms->env->worker)
sbin/unwind/libunbound/services/rpz.c
2423
ms->env->worker->stats.rpz_action[action]++;
sbin/unwind/libunbound/services/rpz.c
2481
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
sbin/unwind/libunbound/services/rpz.c
2483
az = ms->env->auth_zones;
sbin/unwind/libunbound/services/rpz.c
2555
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
sbin/unwind/libunbound/services/rpz.c
2556
az = ms->env->auth_zones;
sbin/unwind/libunbound/services/rpz.c
2581
if(ms->env->worker)
sbin/unwind/libunbound/services/rpz.c
2582
ms->env->worker->stats.rpz_action[r->action_override]++;
sbin/unwind/libunbound/services/rpz.c
2657
rpz_apply_maybe_clientip_trigger(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/rpz.c
2698
rpz_apply_clientip_localdata_action(node, env, qinfo,
sbin/unwind/libunbound/services/rpz.c
2709
local_zones_zone_answer(*z_out /*likely NULL, no zone*/, env, qinfo, edns,
sbin/unwind/libunbound/services/rpz.c
2736
rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/services/rpz.c
2747
int clientip_trigger = rpz_apply_maybe_clientip_trigger(az, env, qinfo,
sbin/unwind/libunbound/services/rpz.c
2791
ret = rpz_synthesize_qname_localdata(env, r, z, lzt, qinfo, edns, buf, temp,
sbin/unwind/libunbound/services/rpz.h
180
int rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1231
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.c
1237
env->inplace_cb_lists[inplace_cb_reply], inplace_cb_reply, qinfo,
sbin/unwind/libunbound/util/data/msgreply.c
1241
int inplace_cb_reply_cache_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1248
env->inplace_cb_lists[inplace_cb_reply_cache], inplace_cb_reply_cache,
sbin/unwind/libunbound/util/data/msgreply.c
1252
int inplace_cb_reply_local_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1259
env->inplace_cb_lists[inplace_cb_reply_local], inplace_cb_reply_local,
sbin/unwind/libunbound/util/data/msgreply.c
1263
int inplace_cb_reply_servfail_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1273
env->inplace_cb_lists[inplace_cb_reply_servfail],
sbin/unwind/libunbound/util/data/msgreply.c
1278
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.c
1283
struct inplace_cb* cb = env->inplace_cb_lists[inplace_cb_query];
sbin/unwind/libunbound/util/data/msgreply.c
1294
int inplace_cb_edns_back_parsed_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1298
env->inplace_cb_lists[inplace_cb_edns_back_parsed];
sbin/unwind/libunbound/util/data/msgreply.c
1308
int inplace_cb_query_response_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.c
1311
env->inplace_cb_lists[inplace_cb_query_response];
sbin/unwind/libunbound/util/data/msgreply.h
658
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.h
678
int inplace_cb_reply_cache_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
699
int inplace_cb_reply_local_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
721
int inplace_cb_reply_servfail_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
744
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
sbin/unwind/libunbound/util/data/msgreply.h
757
int inplace_cb_edns_back_parsed_call(struct module_env* env,
sbin/unwind/libunbound/util/data/msgreply.h
769
int inplace_cb_query_response_call(struct module_env* env,
sbin/unwind/libunbound/util/fptr_wlist.c
416
fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
444
fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
472
fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
483
fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.c
581
fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id))
sbin/unwind/libunbound/util/fptr_wlist.h
271
int fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
279
int fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
287
int fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
295
int fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/fptr_wlist.h
330
int fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id));
sbin/unwind/libunbound/util/module.c
115
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
sbin/unwind/libunbound/util/module.c
223
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !rr)
sbin/unwind/libunbound/util/module.c
236
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !str || !dname)
sbin/unwind/libunbound/util/module.c
244
edns_known_options_init(struct module_env* env)
sbin/unwind/libunbound/util/module.c
246
env->edns_known_options_num = 0;
sbin/unwind/libunbound/util/module.c
247
env->edns_known_options = (struct edns_known_option*)calloc(
sbin/unwind/libunbound/util/module.c
249
if(!env->edns_known_options) return 0;
sbin/unwind/libunbound/util/module.c
254
edns_known_options_delete(struct module_env* env)
sbin/unwind/libunbound/util/module.c
256
free(env->edns_known_options);
sbin/unwind/libunbound/util/module.c
257
env->edns_known_options = NULL;
sbin/unwind/libunbound/util/module.c
258
env->edns_known_options_num = 0;
sbin/unwind/libunbound/util/module.c
263
int no_aggregation, struct module_env* env)
sbin/unwind/libunbound/util/module.c
266
if(env->worker) {
sbin/unwind/libunbound/util/module.c
278
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
279
if(env->edns_known_options[i].opt_code == opt_code)
sbin/unwind/libunbound/util/module.c
282
if(i == env->edns_known_options_num) {
sbin/unwind/libunbound/util/module.c
283
if(env->edns_known_options_num >= MAX_KNOWN_EDNS_OPTS) {
sbin/unwind/libunbound/util/module.c
287
env->edns_known_options_num++;
sbin/unwind/libunbound/util/module.c
289
env->edns_known_options[i].opt_code = opt_code;
sbin/unwind/libunbound/util/module.c
290
env->edns_known_options[i].bypass_cache_stage = bypass_cache_stage;
sbin/unwind/libunbound/util/module.c
291
env->edns_known_options[i].no_aggregation = no_aggregation;
sbin/unwind/libunbound/util/module.c
297
struct module_env* env, int id)
sbin/unwind/libunbound/util/module.c
301
if(env->worker) {
sbin/unwind/libunbound/util/module.c
317
prevp = (struct inplace_cb**) &env->inplace_cb_lists[type];
sbin/unwind/libunbound/util/module.c
326
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
sbin/unwind/libunbound/util/module.c
329
struct inplace_cb* temp = env->inplace_cb_lists[type];
sbin/unwind/libunbound/util/module.c
335
env->inplace_cb_lists[type] = temp->next;
sbin/unwind/libunbound/util/module.c
337
temp = env->inplace_cb_lists[type];
sbin/unwind/libunbound/util/module.c
353
edns_option_is_known(uint16_t opt_code, struct module_env* env)
sbin/unwind/libunbound/util/module.c
356
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
357
if(env->edns_known_options[i].opt_code == opt_code)
sbin/unwind/libunbound/util/module.c
358
return env->edns_known_options + i;
sbin/unwind/libunbound/util/module.c
363
edns_bypass_cache_stage(struct edns_option* list, struct module_env* env)
sbin/unwind/libunbound/util/module.c
367
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
368
if(env->edns_known_options[i].opt_code == list->opt_code &&
sbin/unwind/libunbound/util/module.c
369
env->edns_known_options[i].bypass_cache_stage == 1)
sbin/unwind/libunbound/util/module.c
375
unique_mesh_state(struct edns_option* list, struct module_env* env)
sbin/unwind/libunbound/util/module.c
378
if(env->unique_mesh)
sbin/unwind/libunbound/util/module.c
381
for(i=0; i<env->edns_known_options_num; i++)
sbin/unwind/libunbound/util/module.c
382
if(env->edns_known_options[i].opt_code == list->opt_code &&
sbin/unwind/libunbound/util/module.c
383
env->edns_known_options[i].no_aggregation == 1)
sbin/unwind/libunbound/util/module.c
389
log_edns_known_options(enum verbosity_value level, struct module_env* env)
sbin/unwind/libunbound/util/module.c
394
if(env->edns_known_options_num > 0 && verbosity >= level) {
sbin/unwind/libunbound/util/module.c
397
for(i=0; i<env->edns_known_options_num; i++) {
sbin/unwind/libunbound/util/module.c
401
env->edns_known_options[i].opt_code);
sbin/unwind/libunbound/util/module.c
403
env->edns_known_options[i].bypass_cache_stage?"YES":"NO",
sbin/unwind/libunbound/util/module.c
404
env->edns_known_options[i].no_aggregation?"NO":"YES");
sbin/unwind/libunbound/util/module.c
87
if(!str || (qstate->env->cfg->val_log_level < 2 &&
sbin/unwind/libunbound/util/module.c
88
!qstate->env->cfg->log_servfail)) {
sbin/unwind/libunbound/util/module.h
664
struct module_env* env;
sbin/unwind/libunbound/util/module.h
732
int (*startup)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
742
void (*destartup)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
752
int (*init)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
760
void (*deinit)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
809
size_t (*get_mem)(struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
897
int edns_known_options_init(struct module_env* env);
sbin/unwind/libunbound/util/module.h
903
void edns_known_options_delete(struct module_env* env);
sbin/unwind/libunbound/util/module.h
918
int no_aggregation, struct module_env* env);
sbin/unwind/libunbound/util/module.h
932
struct module_env* env, int id);
sbin/unwind/libunbound/util/module.h
941
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
sbin/unwind/libunbound/util/module.h
948
void inplace_cb_lists_delete(struct module_env* env);
sbin/unwind/libunbound/util/module.h
958
struct module_env* env);
sbin/unwind/libunbound/util/module.h
968
struct module_env* env);
sbin/unwind/libunbound/util/module.h
978
int unique_mesh_state(struct edns_option* list, struct module_env* env);
sbin/unwind/libunbound/util/module.h
986
struct module_env* env);
sbin/unwind/libunbound/validator/autotrust.c
1192
void autr_write_file(struct module_env* env, struct trust_anchor* tp)
sbin/unwind/libunbound/validator/autotrust.c
1201
if(!env) {
sbin/unwind/libunbound/validator/autotrust.c
1215
env->worker?*(int*)env->worker:0, llvalue);
sbin/unwind/libunbound/validator/autotrust.c
1265
verify_dnskey(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1272
int downprot = env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/validator/autotrust.c
1273
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve, rrset,
sbin/unwind/libunbound/validator/autotrust.c
1296
min_expiry(struct module_env* env, struct packed_rrset_data* dd)
sbin/unwind/libunbound/validator/autotrust.c
1302
if((int32_t)t - (int32_t)*env->now > 0) {
sbin/unwind/libunbound/validator/autotrust.c
1303
t -= (int32_t)*env->now;
sbin/unwind/libunbound/validator/autotrust.c
1313
rr_is_selfsigned_revoked(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1323
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset, i,
sbin/unwind/libunbound/validator/autotrust.c
1538
check_contains_revoked(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1560
if(rr_is_selfsigned_revoked(env, ve, dnskey_rrset, i, qstate)) {
sbin/unwind/libunbound/validator/autotrust.c
1578
do_revoked(env, ta, changed);
sbin/unwind/libunbound/validator/autotrust.c
1585
key_matches_a_ds(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1606
if(!ds_digest_match_dnskey(env, dnskey_rrset, key_idx,
sbin/unwind/libunbound/validator/autotrust.c
1630
update_events(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
1671
if(ta && tp->ds_rrset && key_matches_a_ds(env, ve,
sbin/unwind/libunbound/validator/autotrust.c
1683
set_tp_times(tp, min_expiry(env, dd), key_ttl(dnskey_rrset), changed);
sbin/unwind/libunbound/validator/autotrust.c
1697
check_holddown(struct module_env* env, struct autr_ta* ta,
sbin/unwind/libunbound/validator/autotrust.c
1701
if(*env->now < ta->last_change) {
sbin/unwind/libunbound/validator/autotrust.c
1705
elapsed = *env->now - ta->last_change;
sbin/unwind/libunbound/validator/autotrust.c
1717
reset_holddown(struct module_env* env, struct autr_ta* ta, int* changed)
sbin/unwind/libunbound/validator/autotrust.c
1719
ta->last_change = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
1725
set_trustanchor_state(struct module_env* env, struct autr_ta* ta, int* changed,
sbin/unwind/libunbound/validator/autotrust.c
1731
reset_holddown(env, ta, changed);
sbin/unwind/libunbound/validator/autotrust.c
1737
do_newkey(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1740
set_trustanchor_state(env, anchor, c, AUTR_STATE_ADDPEND);
sbin/unwind/libunbound/validator/autotrust.c
1745
do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1750
time_t exceeded = check_holddown(env, anchor, env->cfg->add_holddown);
sbin/unwind/libunbound/validator/autotrust.c
1756
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
sbin/unwind/libunbound/validator/autotrust.c
1767
do_remtime(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1769
time_t exceeded = check_holddown(env, anchor, env->cfg->del_holddown);
sbin/unwind/libunbound/validator/autotrust.c
1773
set_trustanchor_state(env, anchor, c, AUTR_STATE_REMOVED);
sbin/unwind/libunbound/validator/autotrust.c
1779
do_keyrem(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1782
set_trustanchor_state(env, anchor, c, AUTR_STATE_START);
sbin/unwind/libunbound/validator/autotrust.c
1785
set_trustanchor_state(env, anchor, c, AUTR_STATE_MISSING);
sbin/unwind/libunbound/validator/autotrust.c
1790
do_keypres(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1793
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
sbin/unwind/libunbound/validator/autotrust.c
1798
do_revoked(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1801
set_trustanchor_state(env, anchor, c, AUTR_STATE_REVOKED);
sbin/unwind/libunbound/validator/autotrust.c
1810
anchor_state_update(struct module_env* env, struct autr_ta* anchor, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1818
do_newkey(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1824
do_keyrem(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1826
else do_addtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1832
do_revoked(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1835
do_keyrem(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1838
reset_holddown(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1845
do_revoked(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1848
do_keypres(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1853
reset_holddown(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1855
else do_remtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
1866
init_zsk_to_ksk(struct module_env* env, struct trust_anchor* tp, int* changed)
sbin/unwind/libunbound/validator/autotrust.c
1888
set_trustanchor_state(env, anchor, changed,
sbin/unwind/libunbound/validator/autotrust.c
1898
remove_missing_trustanchors(struct module_env* env, struct trust_anchor* tp,
sbin/unwind/libunbound/validator/autotrust.c
1920
valid = init_zsk_to_ksk(env, tp, changed);
sbin/unwind/libunbound/validator/autotrust.c
1934
set_trustanchor_state(env, anchor, changed,
sbin/unwind/libunbound/validator/autotrust.c
1942
if(env->cfg->keep_missing == 0)
sbin/unwind/libunbound/validator/autotrust.c
1945
exceeded = check_holddown(env, anchor, env->cfg->keep_missing);
sbin/unwind/libunbound/validator/autotrust.c
1952
set_trustanchor_state(env, anchor, changed,
sbin/unwind/libunbound/validator/autotrust.c
1960
do_statetable(struct module_env* env, struct trust_anchor* tp, int* changed)
sbin/unwind/libunbound/validator/autotrust.c
1967
anchor_state_update(env, anchor, changed);
sbin/unwind/libunbound/validator/autotrust.c
1969
remove_missing_trustanchors(env, tp, changed);
sbin/unwind/libunbound/validator/autotrust.c
1975
autr_holddown_exceed(struct module_env* env, struct trust_anchor* tp, int* c)
sbin/unwind/libunbound/validator/autotrust.c
1981
do_addtime(env, anchor, c);
sbin/unwind/libunbound/validator/autotrust.c
2016
calc_next_probe(struct module_env* env, time_t wait)
sbin/unwind/libunbound/validator/autotrust.c
2028
rnd = (time_t)ub_random_max(env->rnd, (long int)rnd);
sbin/unwind/libunbound/validator/autotrust.c
2029
return (time_t)(*env->now + rest + rnd);
sbin/unwind/libunbound/validator/autotrust.c
2044
reset_worker_timer_at(struct module_env* env, time_t next)
sbin/unwind/libunbound/validator/autotrust.c
2049
if(!env->probe_timer)
sbin/unwind/libunbound/validator/autotrust.c
2051
if(next > *env->now)
sbin/unwind/libunbound/validator/autotrust.c
2052
tv.tv_sec = (time_t)(next - *env->now);
sbin/unwind/libunbound/validator/autotrust.c
2058
comm_timer_set(env->probe_timer, &tv);
sbin/unwind/libunbound/validator/autotrust.c
2065
reset_worker_timer(struct module_env* env)
sbin/unwind/libunbound/validator/autotrust.c
2068
if(!env->anchors)
sbin/unwind/libunbound/validator/autotrust.c
2070
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2071
next = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2072
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2073
reset_worker_timer_at(env, next);
sbin/unwind/libunbound/validator/autotrust.c
2078
set_next_probe(struct module_env* env, struct trust_anchor* tp,
sbin/unwind/libunbound/validator/autotrust.c
2092
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2093
tp2 = (struct trust_anchor*)rbtree_search(env->anchors->tree, &key);
sbin/unwind/libunbound/validator/autotrust.c
2096
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2103
mold = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2104
(void)rbtree_delete(&env->anchors->autr->probe, tp);
sbin/unwind/libunbound/validator/autotrust.c
2105
tp->autr->next_probe_time = calc_next_probe(env,
sbin/unwind/libunbound/validator/autotrust.c
2107
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
sbin/unwind/libunbound/validator/autotrust.c
2108
mnew = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2110
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2112
(int)tp->autr->next_probe_time - (int)*env->now);
sbin/unwind/libunbound/validator/autotrust.c
2114
reset_worker_timer_at(env, mnew);
sbin/unwind/libunbound/validator/autotrust.c
2121
autr_tp_remove(struct module_env* env, struct trust_anchor* tp,
sbin/unwind/libunbound/validator/autotrust.c
2149
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2150
del_tp = (struct trust_anchor*)rbtree_delete(env->anchors->tree, &key);
sbin/unwind/libunbound/validator/autotrust.c
2151
mold = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2152
(void)rbtree_delete(&env->anchors->autr->probe, &key);
sbin/unwind/libunbound/validator/autotrust.c
2153
mnew = wait_probe_time(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2154
anchors_init_parents_locked(env->anchors);
sbin/unwind/libunbound/validator/autotrust.c
2155
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2163
autr_write_file(env, del_tp);
sbin/unwind/libunbound/validator/autotrust.c
2169
reset_worker_timer_at(env, mnew);
sbin/unwind/libunbound/validator/autotrust.c
2173
int autr_process_prime(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/autotrust.c
2193
tp->autr->last_queried = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2198
autr_holddown_exceed(env, tp, &changed);
sbin/unwind/libunbound/validator/autotrust.c
2216
check_contains_revoked(env, ve, tp, dnskey_rrset, &changed, qstate);
sbin/unwind/libunbound/validator/autotrust.c
2226
tp->autr->last_success = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2227
autr_tp_remove(env, tp, dnskey_rrset);
sbin/unwind/libunbound/validator/autotrust.c
2232
if(!verify_dnskey(env, ve, tp, dnskey_rrset, qstate)) {
sbin/unwind/libunbound/validator/autotrust.c
2238
autr_write_file(env, tp);
sbin/unwind/libunbound/validator/autotrust.c
2243
tp->autr->last_success = *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2251
if(!update_events(env, ve, tp, dnskey_rrset, &changed)) {
sbin/unwind/libunbound/validator/autotrust.c
2260
if(!do_statetable(env, tp, &changed)) {
sbin/unwind/libunbound/validator/autotrust.c
2267
if(!set_next_probe(env, tp, dnskey_rrset))
sbin/unwind/libunbound/validator/autotrust.c
2269
autr_write_file(env, tp);
sbin/unwind/libunbound/validator/autotrust.c
2278
autr_tp_remove(env, tp, dnskey_rrset);
sbin/unwind/libunbound/validator/autotrust.c
2372
struct module_env* env = (struct module_env*)arg;
sbin/unwind/libunbound/validator/autotrust.c
2374
reset_worker_timer(env);
sbin/unwind/libunbound/validator/autotrust.c
2379
probe_anchor(struct module_env* env, struct trust_anchor* tp)
sbin/unwind/libunbound/validator/autotrust.c
2384
sldns_buffer* buf = env->scratch_buffer;
sbin/unwind/libunbound/validator/autotrust.c
2385
qinfo.qname = regional_alloc_init(env->scratch, tp->name, tp->namelen);
sbin/unwind/libunbound/validator/autotrust.c
2396
(int)tp->autr->next_probe_time - (int)*env->now);
sbin/unwind/libunbound/validator/autotrust.c
2417
rrset_cache_remove(env->rrset_cache, qinfo.qname, qinfo.qname_len,
sbin/unwind/libunbound/validator/autotrust.c
2419
key_cache_remove(env->key_cache, qinfo.qname, qinfo.qname_len,
sbin/unwind/libunbound/validator/autotrust.c
2422
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
sbin/unwind/libunbound/validator/autotrust.c
2423
&probe_answer_cb, env, 0)) {
sbin/unwind/libunbound/validator/autotrust.c
2430
todo_probe(struct module_env* env, time_t* next)
sbin/unwind/libunbound/validator/autotrust.c
2435
lock_basic_lock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2436
if( (el=rbtree_first(&env->anchors->autr->probe)) == RBTREE_NULL) {
sbin/unwind/libunbound/validator/autotrust.c
2438
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2447
if((time_t)tp->autr->next_probe_time > *env->now) {
sbin/unwind/libunbound/validator/autotrust.c
2449
*next = (time_t)tp->autr->next_probe_time - *env->now;
sbin/unwind/libunbound/validator/autotrust.c
2451
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2456
(void)rbtree_delete(&env->anchors->autr->probe, tp);
sbin/unwind/libunbound/validator/autotrust.c
2457
tp->autr->next_probe_time = calc_next_probe(env, tp->autr->retry_time);
sbin/unwind/libunbound/validator/autotrust.c
2458
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
sbin/unwind/libunbound/validator/autotrust.c
2459
lock_basic_unlock(&env->anchors->lock);
sbin/unwind/libunbound/validator/autotrust.c
2465
autr_probe_timer(struct module_env* env)
sbin/unwind/libunbound/validator/autotrust.c
2473
while( (tp = todo_probe(env, &next_probe)) ) {
sbin/unwind/libunbound/validator/autotrust.c
2475
probe_anchor(env, tp);
sbin/unwind/libunbound/validator/autotrust.c
2478
regional_free_all(env->scratch);
sbin/unwind/libunbound/validator/autotrust.c
72
static void do_revoked(struct module_env* env, struct autr_ta* anchor, int* c);
sbin/unwind/libunbound/validator/autotrust.h
158
time_t autr_probe_timer(struct module_env* env);
sbin/unwind/libunbound/validator/autotrust.h
176
void autr_write_file(struct module_env* env, struct trust_anchor* tp);
sbin/unwind/libunbound/validator/autotrust.h
197
int autr_process_prime(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec.c
177
nsec_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec.c
188
rrset_check_sec_status(env->rrset_cache, nsec, *env->now);
sbin/unwind/libunbound/validator/val_nsec.c
191
d->security = val_verify_rrset_entry(env, ve, nsec, kkey, reason,
sbin/unwind/libunbound/validator/val_nsec.c
195
rrset_update_sec_status(env->rrset_cache, nsec, *env->now);
sbin/unwind/libunbound/validator/val_nsec.c
202
val_nsec_prove_nodata_dsreply(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec.c
223
if(!nsec_verify_rrset(env, ve, nsec, kkey, reason,
sbin/unwind/libunbound/validator/val_nsec.c
254
if(!nsec_verify_rrset(env, ve, rep->rrsets[i], kkey, reason,
sbin/unwind/libunbound/validator/val_nsec.h
79
enum sec_status val_nsec_prove_nodata_dsreply(struct module_env* env,
sbin/unwind/libunbound/validator/val_nsec3.c
1010
nsec3_prove_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
1019
if(!nsec3_find_closest_encloser(env, flt, ct, qinfo, ce, calculations)) {
sbin/unwind/libunbound/validator/val_nsec3.c
1073
if(!find_covering_nsec3(env, flt, ct, nc, nc_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1118
nsec3_do_prove_nameerror(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
1131
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1155
if(!find_covering_nsec3(env, flt, ct, wc, wclen, &wc_rrset, &wc_rr, calc)) {
sbin/unwind/libunbound/validator/val_nsec3.c
1183
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1199
return nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1209
nsec3_do_prove_nodata(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
1220
if(find_matching_nsec3(env, flt, ct, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1281
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1299
if(wc && find_matching_nsec3(env, flt, ct, wc, wclen, &rrset, &rr,
sbin/unwind/libunbound/validator/val_nsec3.c
1369
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1383
return nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1387
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1418
if(!find_covering_nsec3(env, &flt, ct, nc, nc_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1447
list_is_secure(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1461
rrset_check_sec_status(env->rrset_cache, list[i], *env->now);
sbin/unwind/libunbound/validator/val_nsec3.c
1464
d->security = val_verify_rrset_entry(env, ve, list[i], kkey,
sbin/unwind/libunbound/validator/val_nsec3.c
1471
rrset_update_sec_status(env->rrset_cache, list[i], *env->now);
sbin/unwind/libunbound/validator/val_nsec3.c
1477
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1496
if(!list_is_secure(env, ve, list, num, kkey, reason, reason_bogus,
sbin/unwind/libunbound/validator/val_nsec3.c
1511
if(find_matching_nsec3(env, &flt, ct, qinfo->qname, qinfo->qname_len,
sbin/unwind/libunbound/validator/val_nsec3.c
1549
sec = nsec3_prove_closest_encloser(env, &flt, ct, qinfo, 1, &ce, &calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1585
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.c
1605
secnx = nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
1610
sec = nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
sbin/unwind/libunbound/validator/val_nsec3.c
764
find_matching_nsec3(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
787
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
sbin/unwind/libunbound/validator/val_nsec3.c
874
find_covering_nsec3(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
897
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
sbin/unwind/libunbound/validator/val_nsec3.c
910
env->scratch_buffer)) {
sbin/unwind/libunbound/validator/val_nsec3.c
936
nsec3_find_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
sbin/unwind/libunbound/validator/val_nsec3.c
957
if(find_matching_nsec3(env, flt, ct, nm, nmlen,
sbin/unwind/libunbound/validator/val_nsec3.h
130
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
168
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
193
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
223
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_nsec3.h
248
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
1683
if(qstate && qstate->env && qstate->env->mesh)
sbin/unwind/libunbound/validator/val_sigcrypt.c
1684
qstate->env->mesh->val_ops++;
sbin/unwind/libunbound/validator/val_sigcrypt.c
294
ds_create_dnskey_digest(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.c
299
sldns_buffer* b = env->scratch_buffer;
sbin/unwind/libunbound/validator/val_sigcrypt.c
319
int ds_digest_match_dnskey(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.c
346
digest = regional_alloc(env->scratch, digestlen);
sbin/unwind/libunbound/validator/val_sigcrypt.c
351
if(!ds_create_dnskey_digest(env, dnskey_rrset, dnskey_idx, ds_rrset,
sbin/unwind/libunbound/validator/val_sigcrypt.c
556
dnskeyset_verify_rrset_sig(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
589
sec = dnskey_verify_rrset_sig(env->scratch,
sbin/unwind/libunbound/validator/val_sigcrypt.c
590
env->scratch_buffer, ve, now, rrset, dnskey, i,
sbin/unwind/libunbound/validator/val_sigcrypt.c
624
dnskeyset_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
659
sec = dnskeyset_verify_rrset_sig(env, ve, *env->now, rrset,
sbin/unwind/libunbound/validator/val_sigcrypt.c
707
dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_sigcrypt.c
735
sec = dnskey_verify_rrset_sig(env->scratch,
sbin/unwind/libunbound/validator/val_sigcrypt.c
736
env->scratch_buffer, ve, *env->now, rrset,
sbin/unwind/libunbound/validator/val_sigcrypt.h
156
int ds_digest_match_dnskey(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.h
272
enum sec_status dnskeyset_verify_rrset(struct module_env* env,
sbin/unwind/libunbound/validator/val_sigcrypt.h
293
enum sec_status dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
1093
val_check_nonsecure(struct module_env* env, struct reply_info* rep)
sbin/unwind/libunbound/validator/val_utils.c
1141
if(!env->cfg->val_clean_additional)
sbin/unwind/libunbound/validator/val_utils.c
1178
struct rrset_cache* r, struct module_env* env)
sbin/unwind/libunbound/validator/val_utils.c
1191
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
sbin/unwind/libunbound/validator/val_utils.c
1198
struct rrset_cache* r, struct module_env* env)
sbin/unwind/libunbound/validator/val_utils.c
1208
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
sbin/unwind/libunbound/validator/val_utils.c
1301
val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c,
sbin/unwind/libunbound/validator/val_utils.c
1307
env->rrset_cache, nm, nmlen, LDNS_RR_TYPE_DS, c, 0,
sbin/unwind/libunbound/validator/val_utils.c
1308
*env->now, 0);
sbin/unwind/libunbound/validator/val_utils.c
1312
rrset, region, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
1331
msg = val_neg_getmsg(env->neg_cache, &qinfo, region, env->rrset_cache,
sbin/unwind/libunbound/validator/val_utils.c
1332
env->scratch_buffer, *env->now, 0, topname, env->cfg);
sbin/unwind/libunbound/validator/val_utils.c
405
val_verify_rrset(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
423
rrset_check_sec_status(env->rrset_cache, rrset, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
433
sec = dnskeyset_verify_rrset(env, ve, rrset, keys, sigalg, reason,
sbin/unwind/libunbound/validator/val_utils.c
436
regional_free_all(env->scratch);
sbin/unwind/libunbound/validator/val_utils.c
458
rrset_update_sec_status(env->rrset_cache, rrset, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
465
val_verify_rrset_entry(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
482
sec = val_verify_rrset(env, ve, rrset, &dnskey, kd->algo, reason,
sbin/unwind/libunbound/validator/val_utils.c
489
verify_dnskeys_with_ds_rr(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
514
if(!ds_digest_match_dnskey(env, dnskey_rrset, i, ds_rrset,
sbin/unwind/libunbound/validator/val_utils.c
535
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
576
val_verify_DNSKEY_with_DS(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
617
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
677
val_verify_new_DNSKEYs(struct regional* region, struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.c
684
enum sec_status sec = val_verify_DNSKEY_with_DS(env, ve,
sbin/unwind/libunbound/validator/val_utils.c
693
*env->now);
sbin/unwind/libunbound/validator/val_utils.c
699
*env->now);
sbin/unwind/libunbound/validator/val_utils.c
703
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
707
val_verify_DNSKEY_with_TA(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.c
762
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
807
sec = dnskey_verify_rrset(env, ve, dnskey_rrset,
sbin/unwind/libunbound/validator/val_utils.c
851
val_verify_new_DNSKEYs_with_ta(struct regional* region, struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.c
859
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve,
sbin/unwind/libunbound/validator/val_utils.c
868
downprot?sigalg:NULL, LDNS_EDE_NONE, NULL, *env->now);
sbin/unwind/libunbound/validator/val_utils.c
874
*env->now);
sbin/unwind/libunbound/validator/val_utils.c
878
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
sbin/unwind/libunbound/validator/val_utils.h
132
enum sec_status val_verify_rrset_entry(struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.h
157
enum sec_status val_verify_DNSKEY_with_DS(struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.h
183
enum sec_status val_verify_DNSKEY_with_TA(struct module_env* env,
sbin/unwind/libunbound/validator/val_utils.h
218
struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.h
251
struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/val_utils.h
332
void val_check_nonsecure(struct module_env* env, struct reply_info* rep);
sbin/unwind/libunbound/validator/val_utils.h
344
struct module_env* env);
sbin/unwind/libunbound/validator/val_utils.h
355
struct rrset_cache* r, struct module_env* env);
sbin/unwind/libunbound/validator/val_utils.h
427
struct dns_msg* val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen,
sbin/unwind/libunbound/validator/validator.c
1007
validate_positive_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1036
if(wc && !wc_cached && env->cfg->aggressive_nsec) {
sbin/unwind/libunbound/validator/validator.c
1037
rrset_cache_update_wildcard(env->rrset_cache, s, wc, wl,
sbin/unwind/libunbound/validator/validator.c
1038
env->alloc, *env->now);
sbin/unwind/libunbound/validator/validator.c
1073
enum sec_status sec = nsec3_prove_wildcard(env, ve,
sbin/unwind/libunbound/validator/validator.c
1126
validate_nodata_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1187
enum sec_status sec = nsec3_prove_nodata(env, ve,
sbin/unwind/libunbound/validator/validator.c
1240
validate_nameerror_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1288
chase_reply->security = nsec3_prove_nameerror(env, ve,
sbin/unwind/libunbound/validator/validator.c
1307
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
sbin/unwind/libunbound/validator/validator.c
1323
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
sbin/unwind/libunbound/validator/validator.c
1401
validate_any_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1473
enum sec_status sec = nsec3_prove_wildcard(env, ve,
sbin/unwind/libunbound/validator/validator.c
1528
validate_cname_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1606
enum sec_status sec = nsec3_prove_wildcard(env, ve,
sbin/unwind/libunbound/validator/validator.c
1658
validate_cname_noanswer_response(struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
1744
enum sec_status sec = nsec3_prove_nxornodata(env, ve,
sbin/unwind/libunbound/validator/validator.c
181
val_apply_cfg(struct module_env* env, struct val_env* val_env,
sbin/unwind/libunbound/validator/validator.c
1846
val_mark_indeterminate(vq->chase_reply, qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
1847
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
1851
anchor = anchors_lookup(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
186
if(!env->anchors)
sbin/unwind/libunbound/validator/validator.c
187
env->anchors = anchors_create();
sbin/unwind/libunbound/validator/validator.c
1876
anchor = anchors_lookup(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
188
if(!env->anchors) {
sbin/unwind/libunbound/validator/validator.c
1908
vq->qchase.qclass, qstate->region, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
192
if (env->key_cache)
sbin/unwind/libunbound/validator/validator.c
1927
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
193
val_env->kcache = env->key_cache;
sbin/unwind/libunbound/validator/validator.c
1955
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
200
env->key_cache = val_env->kcache;
sbin/unwind/libunbound/validator/validator.c
201
if(!anchors_apply_cfg(env->anchors, cfg)) {
sbin/unwind/libunbound/validator/validator.c
210
if (env->neg_cache)
sbin/unwind/libunbound/validator/validator.c
211
val_env->neg_cache = env->neg_cache;
sbin/unwind/libunbound/validator/validator.c
2121
(msg=val_find_DS(qstate->env, target_key_name,
sbin/unwind/libunbound/validator/validator.c
219
env->neg_cache = val_env->neg_cache;
sbin/unwind/libunbound/validator/validator.c
2192
qstate->env->rrset_cache, qstate->env);
sbin/unwind/libunbound/validator/validator.c
2194
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
2209
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
2233
if(!validate_msg_signatures(qstate, vq, qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2268
validate_positive_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
227
val_init(struct module_env* env, int id)
sbin/unwind/libunbound/validator/validator.c
2284
validate_nodata_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2301
validate_nameerror_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2319
validate_cname_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2336
validate_cname_noanswer_response(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
235
env->modinfo[id] = (void*)val_env;
sbin/unwind/libunbound/validator/validator.c
236
env->need_to_validate = 1;
sbin/unwind/libunbound/validator/validator.c
2361
validate_any_response(qstate->env, ve, &vq->qchase,
sbin/unwind/libunbound/validator/validator.c
243
if(!val_apply_cfg(env, val_env, env->cfg)) {
sbin/unwind/libunbound/validator/validator.c
2462
val_check_nonsecure(qstate->env, vq->orig_msg->rep);
sbin/unwind/libunbound/validator/validator.c
2467
val_neg_addreply(qstate->env->neg_cache,
sbin/unwind/libunbound/validator/validator.c
247
if(env->cfg->disable_edns_do) {
sbin/unwind/libunbound/validator/validator.c
249
env->anchors);
sbin/unwind/libunbound/validator/validator.c
2492
if(qstate->env->cfg->serve_expired &&
sbin/unwind/libunbound/validator/validator.c
2493
(e=msg_cache_lookup(qstate->env, qstate->qinfo.qname,
sbin/unwind/libunbound/validator/validator.c
2500
(!qstate->env->cfg->serve_expired_ttl ||
sbin/unwind/libunbound/validator/validator.c
2501
qstate->env->cfg->serve_expired_ttl_reset ||
sbin/unwind/libunbound/validator/validator.c
2502
*qstate->env->now <= rep->serve_expired_ttl)) {
sbin/unwind/libunbound/validator/validator.c
2508
*qstate->env->now;
sbin/unwind/libunbound/validator/validator.c
2509
if(qstate->env->cfg->serve_expired_ttl_reset &&
sbin/unwind/libunbound/validator/validator.c
2510
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
sbin/unwind/libunbound/validator/validator.c
2514
rep->serve_expired_ttl = *qstate->env->now +
sbin/unwind/libunbound/validator/validator.c
2515
qstate->env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/validator/validator.c
2537
vq->orig_msg->rep->ttl + qstate->env->cfg->serve_expired_ttl;
sbin/unwind/libunbound/validator/validator.c
2538
if((qstate->env->cfg->val_log_level >= 1 ||
sbin/unwind/libunbound/validator/validator.c
2539
qstate->env->cfg->log_servfail) &&
sbin/unwind/libunbound/validator/validator.c
2540
!qstate->env->cfg->val_log_squelch) {
sbin/unwind/libunbound/validator/validator.c
2541
if(qstate->env->cfg->val_log_level < 2 &&
sbin/unwind/libunbound/validator/validator.c
2542
!qstate->env->cfg->log_servfail)
sbin/unwind/libunbound/validator/validator.c
255
env->cfg->disable_edns_do = 0;
sbin/unwind/libunbound/validator/validator.c
2561
if(qstate->env->cfg->val_permissive_mode)
sbin/unwind/libunbound/validator/validator.c
2566
qstate->env->cfg->root_key_sentinel &&
sbin/unwind/libunbound/validator/validator.c
2576
!anchor_has_keytag(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
2586
anchor_has_keytag(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
2610
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
sbin/unwind/libunbound/validator/validator.c
2620
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
sbin/unwind/libunbound/validator/validator.c
263
val_deinit(struct module_env* env, int id)
sbin/unwind/libunbound/validator/validator.c
266
if(!env || !env->modinfo[id])
sbin/unwind/libunbound/validator/validator.c
2676
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
268
val_env = (struct val_env*)env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
270
anchors_delete(env->anchors);
sbin/unwind/libunbound/validator/validator.c
271
env->anchors = NULL;
sbin/unwind/libunbound/validator/validator.c
273
env->key_cache = NULL;
sbin/unwind/libunbound/validator/validator.c
275
env->neg_cache = NULL;
sbin/unwind/libunbound/validator/validator.c
2782
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
2788
int downprot = qstate->env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/validator/validator.c
279
env->modinfo[id] = NULL;
sbin/unwind/libunbound/validator/validator.c
2803
if(qstate->env->cfg->harden_dnssec_stripped) {
sbin/unwind/libunbound/validator/validator.c
2807
reason_bogus, rstr, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2810
reason_bogus, rstr, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2818
kkey = val_verify_new_DNSKEYs_with_ta(qstate->region, qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
2838
if(qstate->env->cfg->harden_dnssec_stripped) {
sbin/unwind/libunbound/validator/validator.c
2843
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2847
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2888
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
2931
sec = val_verify_rrset_entry(qstate->env, ve, ds,
sbin/unwind/libunbound/validator/validator.c
2951
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2959
NULL, LDNS_EDE_NONE, NULL, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
2983
qstate->env, ve, qinfo, msg->rep, vq->key_entry,
sbin/unwind/libunbound/validator/validator.c
2994
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3019
sec = nsec3_prove_nods(qstate->env, ve,
sbin/unwind/libunbound/validator/validator.c
3036
*qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3088
sec = val_verify_rrset_entry(qstate->env, ve, cname,
sbin/unwind/libunbound/validator/validator.c
3120
reason_bogus, reason, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3150
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
3249
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
3293
BOGUS_KEY_TTL, reason_bogus, rstr, *qstate->env->now);
sbin/unwind/libunbound/validator/validator.c
3310
downprot = qstate->env->cfg->harden_algo_downgrade;
sbin/unwind/libunbound/validator/validator.c
3311
vq->key_entry = val_verify_new_DNSKEYs(qstate->region, qstate->env,
sbin/unwind/libunbound/validator/validator.c
3347
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
3371
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
3373
struct trust_anchor* ta = anchor_find(qstate->env->anchors,
sbin/unwind/libunbound/validator/validator.c
3393
if(!autr_process_prime(qstate->env, ve, ta, dnskey_rrset,
sbin/unwind/libunbound/validator/validator.c
3420
qstate->env->cfg->val_log_level >= 2);
sbin/unwind/libunbound/validator/validator.c
3504
val_get_mem(struct module_env* env, int id)
sbin/unwind/libunbound/validator/validator.c
3506
struct val_env* ve = (struct val_env*)env->modinfo[id];
sbin/unwind/libunbound/validator/validator.c
488
fptr_ok(fptr_whitelist_modenv_detect_cycle(qstate->env->detect_cycle));
sbin/unwind/libunbound/validator/validator.c
489
if((*qstate->env->detect_cycle)(qstate, &ask,
sbin/unwind/libunbound/validator/validator.c
498
qstate->env->add_sub));
sbin/unwind/libunbound/validator/validator.c
499
if(!(*qstate->env->add_sub)(qstate, &ask,
sbin/unwind/libunbound/validator/validator.c
507
qstate->env->attach_sub));
sbin/unwind/libunbound/validator/validator.c
508
if(!(*qstate->env->attach_sub)(qstate, &ask,
sbin/unwind/libunbound/validator/validator.c
629
if(newq && qstate->env->cfg->trust_anchor_signaling &&
sbin/unwind/libunbound/validator/validator.c
679
struct module_env* env, struct val_env* ve,
sbin/unwind/libunbound/validator/validator.c
723
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
sbin/unwind/libunbound/validator/validator.c
746
i+1 < (env->cfg->val_clean_additional?
sbin/unwind/libunbound/validator/validator.c
768
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
sbin/unwind/libunbound/validator/validator.c
786
i+1 < (env->cfg->val_clean_additional?
sbin/unwind/libunbound/validator/validator.c
800
if(!env->cfg->val_clean_additional)
sbin/unwind/libunbound/validator/validator.c
814
(void)val_verify_rrset_entry(env, ve, s, key_entry,
sbin/unwind/libunbound/validator/validator.c
840
mesh_run(qstate->env->mesh, qstate->mesh_info, module_event_pass,
sbin/unwind/libunbound/validator/validator.c
864
qstate->env->worker_base,
sbin/unwind/libunbound/validator/validator.c
879
if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states)
sbin/unwind/libunbound/validator/validator.c
881
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/2)
sbin/unwind/libunbound/validator/validator.c
883
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/4)
sbin/unwind/libunbound/validator/validator.c
894
usec = base + ub_random_max(qstate->env->rnd, usec-base);
sbin/unwind/libunbound/validator/validator.h
250
int val_init(struct module_env* env, int id);
sbin/unwind/libunbound/validator/validator.h
253
void val_deinit(struct module_env* env, int id);
sbin/unwind/libunbound/validator/validator.h
279
size_t val_get_mem(struct module_env* env, int id);
sbin/unwind/resolver.c
1194
if (res->ctx->env->msg_cache != NULL) {
sbin/unwind/resolver.c
1196
if (res->ctx->env->msg_cache != unified_msg_cache ||
sbin/unwind/resolver.c
1197
res->ctx->env->rrset_cache != unified_rrset_cache ||
sbin/unwind/resolver.c
1198
res->ctx->env->key_cache != unified_key_cache ||
sbin/unwind/resolver.c
1199
res->ctx->env->neg_cache != unified_neg_cache)
sbin/unwind/resolver.c
1206
res->ctx->env->msg_cache = unified_msg_cache;
sbin/unwind/resolver.c
1207
res->ctx->env->rrset_cache = unified_rrset_cache;
sbin/unwind/resolver.c
1208
res->ctx->env->key_cache = unified_key_cache;
sbin/unwind/resolver.c
1209
res->ctx->env->neg_cache = unified_neg_cache;
sbin/unwind/resolver.c
1213
if (res->ctx->env->msg_cache != unified_msg_cache ||
sbin/unwind/resolver.c
1214
res->ctx->env->rrset_cache != unified_rrset_cache ||
sbin/unwind/resolver.c
1215
res->ctx->env->key_cache != unified_key_cache ||
sbin/unwind/resolver.c
1216
res->ctx->env->neg_cache != unified_neg_cache)
sbin/unwind/resolver.c
1436
if (res->ctx->env->msg_cache == unified_msg_cache) {
sbin/unwind/resolver.c
1440
res->ctx->env->modinfo[val_id];
sbin/unwind/resolver.c
1441
res->ctx->env->msg_cache = NULL;
sbin/unwind/resolver.c
1442
res->ctx->env->rrset_cache = NULL;
sbin/unwind/resolver.c
1444
res->ctx->env->key_cache = NULL;
sbin/unwind/resolver.c
1446
res->ctx->env->neg_cache = NULL;
sbin/unwind/resolver.c
1478
if (ctx->env->msg_cache == NULL || ctx->env->rrset_cache == NULL ||
sbin/unwind/resolver.c
1479
ctx->env->key_cache == NULL || ctx->env->neg_cache == NULL)
sbin/unwind/resolver.c
1482
unified_msg_cache = ctx->env->msg_cache;
sbin/unwind/resolver.c
1483
unified_rrset_cache = ctx->env->rrset_cache;
sbin/unwind/resolver.c
1484
unified_key_cache = ctx->env->key_cache;
sbin/unwind/resolver.c
1485
unified_neg_cache = ctx->env->neg_cache;
sbin/unwind/resolver.c
1498
val_env = (struct val_env*)ctx->env->modinfo[val_id];
sbin/unwind/resolver.c
1499
ctx->env->msg_cache = NULL;
sbin/unwind/resolver.c
1500
ctx->env->rrset_cache = NULL;
sbin/unwind/resolver.c
1501
ctx->env->key_cache = NULL;
sbin/unwind/resolver.c
1503
ctx->env->neg_cache = NULL;
sys/arch/alpha/alpha/dec_6600.c
330
mc_env_ev6 *env = (mc_env_ev6 *)(logout + hdr->la_system_offset);
sys/arch/alpha/alpha/dec_6600.c
353
if ((env->cpuir & EV6_ENV_CPUIR_CPU_ENABLE(itemno)) != 0 &&
sys/arch/alpha/alpha/dec_6600.c
354
(env->cpuir & EV6_ENV_CPUIR_CPU_FAIL(itemno)) != 0) {
sys/arch/alpha/alpha/dec_6600.c
361
if (env->smir & EV6_ENV_SMIR_PSU_FAILURE) {
sys/arch/alpha/alpha/dec_6600.c
363
if ((env->psir & EV6_ENV_PSIR_PSU_FAIL(itemno)) != 0) {
sys/arch/alpha/alpha/dec_6600.c
364
if ((env->psir &
sys/arch/alpha/alpha/dec_6600.c
370
if ((env->psir &
sys/arch/alpha/alpha/dec_6600.c
383
printf("Flags\t%016lx\n", (unsigned long)env->flags);
sys/arch/alpha/alpha/dec_6600.c
384
printf("DIR\t%016lx\n", (unsigned long)env->c_dir);
sys/arch/alpha/alpha/dec_6600.c
385
printf("SMIR\t%016lx\n", (unsigned long)env->smir);
sys/arch/alpha/alpha/dec_6600.c
386
printf("CPUIR\t%016lx\n", (unsigned long)env->cpuir);
sys/arch/alpha/alpha/dec_6600.c
387
printf("PSIR\t%016lx\n", (unsigned long)env->psir);
sys/arch/alpha/alpha/dec_6600.c
388
printf("LM78_ISR\t%016lx\n", (unsigned long)env->lm78_isr);
sys/arch/alpha/alpha/dec_6600.c
389
printf("Doors\t%016lx\n", (unsigned long)env->doors);
sys/arch/alpha/alpha/dec_6600.c
391
(unsigned long)env->temp_warning);
sys/arch/alpha/alpha/dec_6600.c
393
(unsigned long)env->fan_control);
sys/arch/alpha/alpha/dec_6600.c
395
(unsigned long)env->fatal_power_down);
sys/arch/alpha/alpha/dec_6600.c
406
if (mces == 0 && env->fatal_power_down == 0)
sys/arch/loongson/loongson/pmon.c
180
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
185
return &env->reset;
sys/arch/loongson/loongson/pmon.c
191
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
196
return &env->efi.bios;
sys/arch/loongson/loongson/pmon.c
202
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
203
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
209
(va + env->efi.bios.ptrs.offs_mem);
sys/arch/loongson/loongson/pmon.c
215
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
216
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
222
(va + env->efi.bios.ptrs.offs_cpu);
sys/arch/loongson/loongson/pmon.c
228
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
229
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
235
(va + env->efi.bios.ptrs.offs_sys);
sys/arch/loongson/loongson/pmon.c
241
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
242
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
248
(va + env->efi.bios.ptrs.offs_irq);
sys/arch/loongson/loongson/pmon.c
254
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
255
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
261
(va + env->efi.bios.ptrs.offs_iface);
sys/arch/loongson/loongson/pmon.c
267
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
268
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
274
(va + env->efi.bios.ptrs.offs_special);
sys/arch/loongson/loongson/pmon.c
280
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
281
uint64_t va = (uint64_t)&env->efi.bios.ptrs;
sys/arch/loongson/loongson/pmon.c
287
(va + env->efi.bios.ptrs.offs_device);
sys/arch/loongson/loongson/pmon.c
67
struct pmon_env *env = (struct pmon_env *)pmon_envp;
sys/arch/loongson/loongson/pmon.c
89
if (env->efi.bios.version < 0x2000 &&
sys/arch/loongson/loongson/pmon.c
90
env->efi.bios.vga_bios >= CKSEG0_BASE &&
sys/arch/loongson/loongson/pmon.c
91
env->efi.bios.vga_bios < CKSEG0_BASE + CKSEG_SIZE) {
sys/arch/macppc/dev/pm_direct.c
690
int env, old;
sys/arch/macppc/dev/pm_direct.c
695
env = pmdata->data[3];
sys/arch/macppc/dev/pm_direct.c
698
pm_lid_sens.value = !(env & PMU_ENV_LID_CLOSED);
sys/arch/macppc/dev/pm_direct.c
699
if (!(old & PMU_ENV_LID_CLOSED) && (env & PMU_ENV_LID_CLOSED))
sys/arch/macppc/dev/pm_direct.c
702
hw_power = !!(env & PMU_ENV_AC_POWER);
sys/arch/macppc/dev/pm_direct.c
708
if ((old & PMU_ENV_POWER_BUTTON) && !(env & PMU_ENV_POWER_BUTTON))
sys/arch/macppc/dev/pm_direct.c
711
pm_old_env = env;
sys/arch/macppc/macppc/machdep.c
875
faultbuf env;
sys/arch/macppc/macppc/machdep.c
878
if (setfault(&env)) {
sys/arch/macppc/pci/mpcpcibus.c
490
faultbuf env;
sys/arch/macppc/pci/mpcpcibus.c
512
if (setfault(&env)) {
sys/arch/powerpc/ddb/db_memrw.c
59
faultbuf env;
sys/arch/powerpc/ddb/db_memrw.c
61
if (setfault(&env)) {
sys/arch/powerpc/ddb/db_memrw.c
86
faultbuf env;
sys/arch/powerpc/ddb/db_memrw.c
89
if (setfault(&env)) {
sys/arch/powerpc/include/pcb.h
65
int setfault(faultbuf *env) __returns_twice;
sys/arch/powerpc/powerpc/pmap.c
1761
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1770
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1791
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1800
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1821
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1829
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1851
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1862
if (setfault(&env)) {
sys/arch/powerpc/powerpc/pmap.c
1907
faultbuf env;
sys/arch/powerpc/powerpc/pmap.c
1918
if (setfault(&env)) {
sys/arch/powerpc/powerpc/trap.c
544
faultbuf env;
sys/arch/powerpc/powerpc/trap.c
548
if (setfault(&env)) {
sys/arch/sparc64/dev/ldc.c
222
if (lp->env & LDC_FRAG_START) {
sys/arch/sparc64/dev/ldc.c
223
lc->lc_len = (lp->env & LDC_LEN_MASK) + 8;
sys/arch/sparc64/dev/ldc.c
227
len = (lp->env & LDC_LEN_MASK);
sys/arch/sparc64/dev/ldc.c
237
if (lp->env & LDC_FRAG_STOP)
sys/arch/sparc64/dev/ldc.c
330
lp->env = LDC_MODE_UNRELIABLE;
sys/arch/sparc64/dev/ldc.c
365
lp->env = LDC_MODE_UNRELIABLE;
sys/arch/sparc64/dev/ldc.c
400
lp->env = LDC_MODE_UNRELIABLE;
sys/arch/sparc64/dev/ldc.c
445
lp->env = min(len, LDC_PKT_PAYLOAD);
sys/arch/sparc64/dev/ldc.c
447
lp->env |= LDC_FRAG_START;
sys/arch/sparc64/dev/ldc.c
449
lp->env |= LDC_FRAG_STOP;
sys/arch/sparc64/dev/ldcvar.h
48
uint8_t env;
sys/arch/sparc64/dev/vdsk.c
476
if ((lp->env & LDC_FRAG_START) == 0 &&
sys/arch/sparc64/dev/vdsk.c
477
(lp->env & LDC_FRAG_STOP) == 0)
sys/arch/sparc64/dev/vdsk.c
483
if((lp->env & LDC_FRAG_START) == 0)
sys/arch/sparc64/dev/vdsp.c
506
if ((lp->env & LDC_FRAG_START) == 0 &&
sys/arch/sparc64/dev/vdsp.c
507
(lp->env & LDC_FRAG_STOP) == 0)
sys/arch/sparc64/dev/vdsp.c
513
if((lp->env & LDC_FRAG_START) == 0)
sys/arch/sparc64/dev/vnet.c
466
if ((lp->env & LDC_FRAG_START) == 0 &&
sys/arch/sparc64/dev/vnet.c
467
(lp->env & LDC_FRAG_STOP) == 0)
sys/arch/sparc64/dev/vnet.c
473
if((lp->env & LDC_FRAG_START) == 0)
sys/dev/acpi/dsdt.c
4703
struct aml_value env;
sys/dev/acpi/dsdt.c
4708
memset(&env, 0, sizeof(env));
sys/dev/acpi/dsdt.c
4709
env.type = AML_OBJTYPE_INTEGER;
sys/dev/acpi/dsdt.c
4710
env.v_integer = val;
sys/dev/acpi/dsdt.c
4712
return aml_evalnode(sc, node, 1, &env, NULL);
sys/dev/pci/drm/drm_mipi_dsi.c
71
static int mipi_dsi_uevent(const struct device *dev, struct kobj_uevent_env *env)
sys/dev/pci/drm/drm_mipi_dsi.c
76
err = of_device_uevent_modalias(dev, env);
sys/dev/pci/drm/drm_mipi_dsi.c
80
add_uevent_var(env, "MODALIAS=%s%s", MIPI_DSI_MODULE_PREFIX,
sys/dev/pci/drm/i915/gvt/handlers.c
1521
char *env[3] = {NULL, NULL, NULL};
sys/dev/pci/drm/i915/gvt/handlers.c
1526
env[0] = display_ready_str;
sys/dev/pci/drm/i915/gvt/handlers.c
1529
env[1] = vmid_str;
sys/dev/pci/drm/i915/gvt/handlers.c
1531
return kobject_uevent_env(kobj, KOBJ_ADD, env);
usr.bin/awk/run.c
188
if (setjmp(env) != 0)
usr.bin/awk/run.c
206
if (setjmp(env) != 0) /* handles exit within END */
usr.bin/awk/run.c
371
longjmp(env, 1);
usr.bin/awk/run.c
77
jmp_buf env;
usr.bin/cvs/client.c
1034
char *env, *envdup, buf[PATH_MAX], fpath[PATH_MAX];
usr.bin/cvs/client.c
1044
if ((env = getenv("CVS_CLIENT_LOG")) == NULL)
usr.bin/cvs/client.c
1047
envdup = xstrdup(env);
usr.bin/cvs/client.c
1051
if (strlcpy(buf, env, sizeof(buf)) >= sizeof(buf))
usr.bin/doas/env.c
100
RB_INIT(&env->root);
usr.bin/doas/env.c
101
env->count = 0;
usr.bin/doas/env.c
103
addnode(env, "DOAS_USER", mypw->pw_name);
usr.bin/doas/env.c
104
addnode(env, "HOME", targpw->pw_dir);
usr.bin/doas/env.c
105
addnode(env, "LOGNAME", targpw->pw_name);
usr.bin/doas/env.c
106
addnode(env, "PATH", getenv("PATH"));
usr.bin/doas/env.c
107
addnode(env, "SHELL", targpw->pw_shell);
usr.bin/doas/env.c
108
addnode(env, "USER", targpw->pw_name);
usr.bin/doas/env.c
110
fillenv(env, copyset);
usr.bin/doas/env.c
133
if (RB_INSERT(envtree, &env->root, node)) {
usr.bin/doas/env.c
137
env->count++;
usr.bin/doas/env.c
142
return env;
usr.bin/doas/env.c
146
flattenenv(struct env *env)
usr.bin/doas/env.c
152
envp = reallocarray(NULL, env->count + 1, sizeof(char *));
usr.bin/doas/env.c
156
RB_FOREACH(node, envtree, &env->root) {
usr.bin/doas/env.c
166
fillenv(struct env *env, const char **envlist)
usr.bin/doas/env.c
192
if ((node = RB_FIND(envtree, &env->root, &key))) {
usr.bin/doas/env.c
193
RB_REMOVE(envtree, &env->root, node);
usr.bin/doas/env.c
195
env->count--;
usr.bin/doas/env.c
218
RB_INSERT(envtree, &env->root, node);
usr.bin/doas/env.c
219
env->count++;
usr.bin/doas/env.c
228
struct env *env;
usr.bin/doas/env.c
230
env = createenv(rule, mypw, targpw);
usr.bin/doas/env.c
232
fillenv(env, rule->envlist);
usr.bin/doas/env.c
234
return flattenenv(env);
usr.bin/doas/env.c
44
static void fillenv(struct env *env, const char **envlist);
usr.bin/doas/env.c
77
addnode(struct env *env, const char *key, const char *value)
usr.bin/doas/env.c
82
RB_INSERT(envtree, &env->root, node);
usr.bin/doas/env.c
83
env->count++;
usr.bin/doas/env.c
86
static struct env *
usr.bin/doas/env.c
94
struct env *env;
usr.bin/doas/env.c
97
env = malloc(sizeof(*env));
usr.bin/doas/env.c
98
if (!env)
usr.bin/less/option.c
293
s = optstring(s, &str, printopt, o->odesc[1], env);
usr.bin/less/option.c
562
optstring(char *s, char **p_str, char *printopt, char *validchars, int env)
usr.bin/less/option.c
580
if ((*p == END_OPTION_STRING && env == 1) ||
usr.bin/less/option.c
69
scan_option(char *s, int env)
usr.bin/lex/scanopt.c
121
char *env;
usr.bin/lex/scanopt.c
131
if ((env = getenv ("COLUMNS")) != NULL)
usr.bin/lex/scanopt.c
132
cols = atoi (env);
usr.bin/mail/vars.c
103
char *env;
usr.bin/mail/vars.c
107
else if ((env = getenv(name)))
usr.bin/mail/vars.c
108
return(env);
usr.bin/make/var.c
466
char *env;
usr.bin/make/var.c
468
env = getenv(v->name);
usr.bin/make/var.c
469
if (env == NULL)
usr.bin/make/var.c
472
var_set_value(v, env);
usr.bin/rdist/docmd.c
609
rcmptime(struct stat *st, struct subcmd *sbcmds, char **env)
usr.bin/rdist/docmd.c
638
cmptime(target, sbcmds, env);
usr.bin/rdist/docmd.c
649
cmptime(char *name, struct subcmd *sbcmds, char **env)
usr.bin/rdist/docmd.c
680
rcmptime(&stb, sbcmds, env);
usr.bin/rdist/docmd.c
698
if (*env) {
usr.bin/rdist/docmd.c
699
size_t len = strlen(*env) + strlen(name) + 2;
usr.bin/rdist/docmd.c
700
*env = xrealloc(*env, len);
usr.bin/rdist/docmd.c
701
(void) strlcat(*env, name, len);
usr.bin/rdist/docmd.c
702
(void) strlcat(*env, ":", len);
usr.bin/rdist/docmd.c
724
char *env, *stamp = cmd->c_name;
usr.bin/rdist/docmd.c
740
env = NULL;
usr.bin/rdist/docmd.c
743
env = xmalloc(sizeof(E_FILES) + 3);
usr.bin/rdist/docmd.c
744
(void) snprintf(env, sizeof(E_FILES) + 3,
usr.bin/rdist/docmd.c
769
cmptime(f->n_name, sbcmds, &env);
usr.bin/rdist/docmd.c
775
else if (sc->sc_type == CMDSPECIAL && env) {
usr.bin/rdist/docmd.c
776
size_t len = strlen(env);
usr.bin/rdist/docmd.c
777
if (env[len - 1] == ':')
usr.bin/rdist/docmd.c
778
env[--len] = CNULL;
usr.bin/rdist/docmd.c
780
env = xrealloc(env, len);
usr.bin/rdist/docmd.c
781
(void) strlcat(env, "';", len);
usr.bin/rdist/docmd.c
782
(void) strlcat(env, sc->sc_name, len);
usr.bin/rdist/docmd.c
783
message(MT_CHANGE, "cmdspecial \"%s\"", env);
usr.bin/rdist/docmd.c
785
runcommand(env);
usr.bin/rdist/docmd.c
786
(void) free(env);
usr.bin/rdist/docmd.c
787
env = NULL; /* so cmdspecial is only called once */
usr.bin/rdistd/filesys.c
205
longjmp(env, 1);
usr.bin/rdistd/filesys.c
228
if (setjmp(env)) {
usr.bin/rdistd/filesys.c
46
jmp_buf env;
usr.bin/rdistd/server.c
492
char *cmd, *env = NULL;
usr.bin/rdistd/server.c
508
if (env == NULL) {
usr.bin/rdistd/server.c
510
env = xmalloc(len);
usr.bin/rdistd/server.c
511
(void) snprintf(env, len, "export %s;%s=%s",
usr.bin/rdistd/server.c
514
len = strlen(env) + 1 + strlen(cp) + 1;
usr.bin/rdistd/server.c
515
env = xrealloc(env, len);
usr.bin/rdistd/server.c
516
(void) strlcat(env, ":", len);
usr.bin/rdistd/server.c
517
(void) strlcat(env, cp, len);
usr.bin/rdistd/server.c
523
if (env) {
usr.bin/rdistd/server.c
524
len = strlen(env) + 1 + strlen(cp) + 1;
usr.bin/rdistd/server.c
525
env = xrealloc(env, len);
usr.bin/rdistd/server.c
526
(void) strlcat(env, ";", len);
usr.bin/rdistd/server.c
527
(void) strlcat(env, cp, len);
usr.bin/rdistd/server.c
528
cmd = env;
usr.bin/rdistd/server.c
533
if (env)
usr.bin/rdistd/server.c
534
(void) free(env);
usr.bin/ssh/auth-options.c
215
free(opts->env[i]);
usr.bin/ssh/auth-options.c
216
free(opts->env);
usr.bin/ssh/auth-options.c
427
if (strncmp(ret->env[i], cp, l) == 0 &&
usr.bin/ssh/auth-options.c
428
ret->env[i][l] == '=')
usr.bin/ssh/auth-options.c
435
oarray = ret->env;
usr.bin/ssh/auth-options.c
436
if ((ret->env = recallocarray(ret->env,
usr.bin/ssh/auth-options.c
438
sizeof(*ret->env))) == NULL) {
usr.bin/ssh/auth-options.c
441
ret->env = oarray;
usr.bin/ssh/auth-options.c
444
ret->env[ret->nenv++] = opt;
usr.bin/ssh/auth-options.c
566
if (dup_strings(&ret->env, &ret->nenv,
usr.bin/ssh/auth-options.c
567
primary->env, primary->nenv) != 0)
usr.bin/ssh/auth-options.c
570
if (dup_strings(&ret->env, &ret->nenv,
usr.bin/ssh/auth-options.c
571
additional->env, additional->nenv) != 0)
usr.bin/ssh/auth-options.c
690
if (dup_strings(&ret->env, &ret->nenv, orig->env, orig->nenv) != 0 ||
usr.bin/ssh/auth-options.c
833
if ((r = serialise_array(m, opts->env,
usr.bin/ssh/auth-options.c
894
if ((r = deserialise_array(m, &opts->env, &opts->nenv)) != 0 ||
usr.bin/ssh/auth-options.h
58
char **env;
usr.bin/ssh/auth.c
627
debug("%s: environment: %s", loc, opts->env[i]);
usr.bin/ssh/auth.c
630
loc, opts->env[i]);
usr.bin/ssh/clientloop.c
2696
char **env)
usr.bin/ssh/clientloop.c
2734
if (options.num_send_env != 0 && env != NULL) {
usr.bin/ssh/clientloop.c
2736
for (i = 0; env[i] != NULL; i++) {
usr.bin/ssh/clientloop.c
2738
name = xstrdup(env[i]);
usr.bin/ssh/misc.c
2324
char **env;
usr.bin/ssh/misc.c
2338
env = *envp;
usr.bin/ssh/misc.c
2340
for (i = 0; env[i]; i++)
usr.bin/ssh/misc.c
2341
if (strncmp(env[i], name, namelen) == 0 && env[i][namelen] == '=')
usr.bin/ssh/misc.c
2343
if (env[i]) {
usr.bin/ssh/misc.c
2345
free(env[i]);
usr.bin/ssh/misc.c
2353
env = (*envp) = xreallocarray(env, envsize, sizeof(char *));
usr.bin/ssh/misc.c
2357
env[i + 1] = NULL;
usr.bin/ssh/misc.c
2362
env[i] = xmalloc(strlen(name) + 1 + strlen(value) + 1);
usr.bin/ssh/misc.c
2363
snprintf(env[i], strlen(name) + 1 + strlen(value) + 1, "%s=%s", name, value);
usr.bin/ssh/misc.c
2739
char **env = NULL;
usr.bin/ssh/misc.c
2808
env = xcalloc(sizeof(*env), nenv);
usr.bin/ssh/misc.c
2809
child_set_env(&env, &nenv, "PATH", _PATH_STDPATH);
usr.bin/ssh/misc.c
2810
child_set_env(&env, &nenv, "USER", pw->pw_name);
usr.bin/ssh/misc.c
2811
child_set_env(&env, &nenv, "LOGNAME", pw->pw_name);
usr.bin/ssh/misc.c
2812
child_set_env(&env, &nenv, "HOME", pw->pw_dir);
usr.bin/ssh/misc.c
2814
child_set_env(&env, &nenv, "LANG", cp);
usr.bin/ssh/misc.c
2864
if (env != NULL)
usr.bin/ssh/misc.c
2865
execve(av[0], av, env);
usr.bin/ssh/misc.c
2868
error("%s %s \"%s\": %s", tag, env == NULL ? "execv" : "execve",
usr.bin/ssh/misc.c
2895
lookup_env_in_list(const char *env, char * const *envs, size_t nenvs)
usr.bin/ssh/misc.c
2899
envlen = strlen(env);
usr.bin/ssh/misc.c
2901
if (strncmp(envs[i], env, envlen) == 0 &&
usr.bin/ssh/misc.c
2910
lookup_setenv_in_list(const char *env, char * const *envs, size_t nenvs)
usr.bin/ssh/misc.c
2915
name = xstrdup(env);
usr.bin/ssh/misc.h
197
const char *lookup_env_in_list(const char *env,
usr.bin/ssh/misc.h
199
const char *lookup_setenv_in_list(const char *env,
usr.bin/ssh/mux.c
1450
cctx->term, &cctx->tio, c->rfd, cctx->cmd, cctx->env);
usr.bin/ssh/mux.c
1471
if (cctx->env != NULL) {
usr.bin/ssh/mux.c
1472
for (i = 0; cctx->env[i] != NULL; i++)
usr.bin/ssh/mux.c
1473
free(cctx->env[i]);
usr.bin/ssh/mux.c
1474
free(cctx->env);
usr.bin/ssh/mux.c
231
env_permitted(const char *env)
usr.bin/ssh/mux.c
237
if ((cp = strchr(env, '=')) == NULL || cp == env)
usr.bin/ssh/mux.c
239
ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env);
usr.bin/ssh/mux.c
241
error_f("name '%.100s...' too long", env);
usr.bin/ssh/mux.c
340
cctx->env = NULL;
usr.bin/ssh/mux.c
353
free(cctx->env[j]);
usr.bin/ssh/mux.c
354
free(cctx->env);
usr.bin/ssh/mux.c
369
cctx->env = xreallocarray(cctx->env, env_len + 2,
usr.bin/ssh/mux.c
370
sizeof(*cctx->env));
usr.bin/ssh/mux.c
371
cctx->env[env_len++] = cp;
usr.bin/ssh/mux.c
372
cctx->env[env_len] = NULL;
usr.bin/ssh/mux.c
399
free(cctx->env[j]);
usr.bin/ssh/mux.c
400
free(cctx->env);
usr.bin/ssh/mux.c
425
free(cctx->env[i]);
usr.bin/ssh/mux.c
426
free(cctx->env);
usr.bin/ssh/mux.c
67
char **env;
usr.bin/ssh/session.c
1191
char **env, *argv[ARGV_MAX], remote_id[512];
usr.bin/ssh/session.c
1226
env = do_setup_env(ssh, s, shell);
usr.bin/ssh/session.c
1243
environ = env;
usr.bin/ssh/session.c
1342
execve(shell, argv, env);
usr.bin/ssh/session.c
1356
execve(shell, argv, env);
usr.bin/ssh/session.c
1738
s->env = xrecallocarray(s->env, s->num_env,
usr.bin/ssh/session.c
1739
s->num_env + 1, sizeof(*s->env));
usr.bin/ssh/session.c
1740
s->env[s->num_env].name = name;
usr.bin/ssh/session.c
1741
s->env[s->num_env].val = val;
usr.bin/ssh/session.c
2089
if (s->env != NULL) {
usr.bin/ssh/session.c
2091
free(s->env[i].name);
usr.bin/ssh/session.c
2092
free(s->env[i].val);
usr.bin/ssh/session.c
2094
free(s->env);
usr.bin/ssh/session.c
747
read_environment_file(char ***env, u_int *envsize,
usr.bin/ssh/session.c
784
child_set_env(env, envsize, cp, value);
usr.bin/ssh/session.c
796
char *ocp, *cp, *value, **env, *laddr;
usr.bin/ssh/session.c
801
env = xcalloc(envsize, sizeof(char *));
usr.bin/ssh/session.c
802
env[0] = NULL;
usr.bin/ssh/session.c
808
ssh_gssapi_do_child(&env, &envsize);
usr.bin/ssh/session.c
813
child_set_env(&env, &envsize, s->env[i].name, s->env[i].val);
usr.bin/ssh/session.c
815
child_set_env(&env, &envsize, "USER", pw->pw_name);
usr.bin/ssh/session.c
816
child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
usr.bin/ssh/session.c
817
child_set_env(&env, &envsize, "HOME", pw->pw_dir);
usr.bin/ssh/session.c
819
child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
usr.bin/ssh/session.c
821
child_set_env(&env, &envsize, "PATH", getenv("PATH"));
usr.bin/ssh/session.c
824
child_set_env(&env, &envsize, "MAIL", buf);
usr.bin/ssh/session.c
827
child_set_env(&env, &envsize, "SHELL", shell);
usr.bin/ssh/session.c
830
child_set_env(&env, &envsize, "TZ", getenv("TZ"));
usr.bin/ssh/session.c
832
child_set_env(&env, &envsize, "XDG_RUNTIME_DIR",
usr.bin/ssh/session.c
836
child_set_env(&env, &envsize, "TERM", s->term);
usr.bin/ssh/session.c
838
child_set_env(&env, &envsize, "DISPLAY", s->display);
usr.bin/ssh/session.c
841
child_set_env(&env, &envsize, "KRB5CCNAME",
usr.bin/ssh/session.c
845
child_set_env(&env, &envsize, SSH_AUTHSOCKET_ENV_NAME,
usr.bin/ssh/session.c
852
ocp = xstrdup(auth_opts->env[n]);
usr.bin/ssh/session.c
860
child_set_env(&env, &envsize,
usr.bin/ssh/session.c
871
read_environment_file(&env, &envsize, buf,
usr.bin/ssh/session.c
883
child_set_env(&env, &envsize, cp, value);
usr.bin/ssh/session.c
891
child_set_env(&env, &envsize, "SSH_CLIENT", buf);
usr.bin/ssh/session.c
898
child_set_env(&env, &envsize, "SSH_CONNECTION", buf);
usr.bin/ssh/session.c
901
child_set_env(&env, &envsize, "SSH_TUNNEL", tun_fwd_ifnames);
usr.bin/ssh/session.c
903
child_set_env(&env, &envsize, "SSH_USER_AUTH", auth_info_file);
usr.bin/ssh/session.c
905
child_set_env(&env, &envsize, "SSH_TTY", s->tty);
usr.bin/ssh/session.c
907
child_set_env(&env, &envsize, "SSH_ORIGINAL_COMMAND",
usr.bin/ssh/session.c
913
for (i = 0; env[i]; i++)
usr.bin/ssh/session.c
914
fprintf(stderr, " %.200s\n", env[i]);
usr.bin/ssh/session.c
916
return env;
usr.bin/ssh/session.h
63
} *env;
usr.bin/tmux/cmd-display-menu.c
405
struct environ *env = NULL;
usr.bin/tmux/cmd-display-menu.c
464
env = environ_create();
usr.bin/tmux/cmd-display-menu.c
467
environ_put(env, av->string, 0);
usr.bin/tmux/cmd-display-menu.c
512
if (popup_display(flags, lines, item, px, py, w, h, env, shellcmd, argc,
usr.bin/tmux/cmd-display-menu.c
515
environ_free(env);
usr.bin/tmux/cmd-display-menu.c
523
environ_free(env);
usr.bin/tmux/cmd-display-menu.c
531
environ_free(env);
usr.bin/tmux/cmd-new-session.c
271
env = environ_create();
usr.bin/tmux/cmd-new-session.c
273
environ_update(global_s_options, c->environ, env);
usr.bin/tmux/cmd-new-session.c
276
environ_put(env, av->string, 0);
usr.bin/tmux/cmd-new-session.c
279
s = session_create(prefix, newname, cwd, env, oo, tiop);
usr.bin/tmux/cmd-new-session.c
75
struct environ *env;
usr.bin/tmux/cmd-set-environment.c
102
environ_clear(env, name);
usr.bin/tmux/cmd-set-environment.c
111
environ_set(env, name, ENVIRON_HIDDEN, "%s", value);
usr.bin/tmux/cmd-set-environment.c
113
environ_set(env, name, 0, "%s", value);
usr.bin/tmux/cmd-set-environment.c
51
struct environ *env;
usr.bin/tmux/cmd-set-environment.c
75
env = global_environ;
usr.bin/tmux/cmd-set-environment.c
86
env = target->s->environ;
usr.bin/tmux/cmd-set-environment.c
95
environ_unset(env, name);
usr.bin/tmux/cmd-show-environment.c
102
struct environ *env;
usr.bin/tmux/cmd-show-environment.c
114
env = global_environ;
usr.bin/tmux/cmd-show-environment.c
124
env = target->s->environ;
usr.bin/tmux/cmd-show-environment.c
128
envent = environ_find(env, name);
usr.bin/tmux/cmd-show-environment.c
137
envent = environ_first(env);
usr.bin/tmux/environ.c
102
environ_find(struct environ *env, const char *name)
usr.bin/tmux/environ.c
107
return (RB_FIND(environ, env, &envent));
usr.bin/tmux/environ.c
112
environ_set(struct environ *env, const char *name, int flags, const char *fmt,
usr.bin/tmux/environ.c
119
if ((envent = environ_find(env, name)) != NULL) {
usr.bin/tmux/environ.c
128
RB_INSERT(environ, env, envent);
usr.bin/tmux/environ.c
135
environ_clear(struct environ *env, const char *name)
usr.bin/tmux/environ.c
139
if ((envent = environ_find(env, name)) != NULL) {
usr.bin/tmux/environ.c
147
RB_INSERT(environ, env, envent);
usr.bin/tmux/environ.c
153
environ_put(struct environ *env, const char *var, int flags)
usr.bin/tmux/environ.c
165
environ_set(env, name, flags, "%s", value);
usr.bin/tmux/environ.c
171
environ_unset(struct environ *env, const char *name)
usr.bin/tmux/environ.c
175
if ((envent = environ_find(env, name)) == NULL)
usr.bin/tmux/environ.c
177
RB_REMOVE(environ, env, envent);
usr.bin/tmux/environ.c
215
environ_push(struct environ *env)
usr.bin/tmux/environ.c
220
RB_FOREACH(envent, environ, env) {
usr.bin/tmux/environ.c
230
environ_log(struct environ *env, const char *fmt, ...)
usr.bin/tmux/environ.c
240
RB_FOREACH(envent, environ, env) {
usr.bin/tmux/environ.c
254
struct environ *env;
usr.bin/tmux/environ.c
258
env = environ_create();
usr.bin/tmux/environ.c
259
environ_copy(global_environ, env);
usr.bin/tmux/environ.c
261
environ_copy(s->environ, env);
usr.bin/tmux/environ.c
265
environ_set(env, "TERM", 0, "%s", value);
usr.bin/tmux/environ.c
266
environ_set(env, "TERM_PROGRAM", 0, "%s", "tmux");
usr.bin/tmux/environ.c
267
environ_set(env, "TERM_PROGRAM_VERSION", 0, "%s", getversion());
usr.bin/tmux/environ.c
268
environ_set(env, "COLORTERM", 0, "truecolor");
usr.bin/tmux/environ.c
275
environ_set(env, "TMUX", 0, "%s,%ld,%d", socket_path, (long)getpid(),
usr.bin/tmux/environ.c
278
return (env);
usr.bin/tmux/environ.c
46
struct environ *env;
usr.bin/tmux/environ.c
48
env = xcalloc(1, sizeof *env);
usr.bin/tmux/environ.c
49
RB_INIT(env);
usr.bin/tmux/environ.c
51
return (env);
usr.bin/tmux/environ.c
56
environ_free(struct environ *env)
usr.bin/tmux/environ.c
60
if (env == NULL)
usr.bin/tmux/environ.c
63
RB_FOREACH_SAFE(envent, environ, env, envent1) {
usr.bin/tmux/environ.c
64
RB_REMOVE(environ, env, envent);
usr.bin/tmux/environ.c
69
free(env);
usr.bin/tmux/environ.c
73
environ_first(struct environ *env)
usr.bin/tmux/environ.c
75
return (RB_MIN(environ, env));
usr.bin/tmux/environ.c
81
return (RB_NEXT(environ, env, envent));
usr.bin/tmux/job.c
146
environ_set(env, "PWD", 0, "%s", cwd);
usr.bin/tmux/job.c
148
environ_set(env, "PWD", 0, "%s", home);
usr.bin/tmux/job.c
150
environ_set(env, "PWD", 0, "/");
usr.bin/tmux/job.c
155
environ_push(env);
usr.bin/tmux/job.c
156
environ_free(env);
usr.bin/tmux/job.c
197
environ_free(env);
usr.bin/tmux/job.c
238
environ_free(env);
usr.bin/tmux/job.c
80
struct environ *env;
usr.bin/tmux/job.c
94
env = environ_for_session(s, !cfg_finished);
usr.bin/tmux/job.c
96
environ_copy(e, env);
usr.bin/tmux/popup.c
768
u_int py, u_int sx, u_int sy, struct environ *env, const char *shellcmd,
usr.bin/tmux/popup.c
858
pd->job = job_run(shellcmd, argc, argv, env, s, cwd,
usr.bin/tmux/session.c
114
struct environ *env, struct options *oo, struct termios *tio)
usr.bin/tmux/session.c
127
s->environ = env;
usr.sbin/amd/amd/opts.c
591
char *env = getenv(nbuf);
usr.sbin/amd/amd/opts.c
592
if (env) {
usr.sbin/amd/amd/opts.c
593
int vlen = strlen(env);
usr.sbin/amd/amd/opts.c
596
strlcpy(ep, env, expbuf + sizeof expbuf - ep);
usr.sbin/amd/amd/opts.c
604
plog(XLOG_DEBUG, "Environment gave \"%s\" -> \"%s\"", nbuf, env);
usr.sbin/bgplgd/slowcgi.c
111
struct env_head env;
usr.sbin/bgplgd/slowcgi.c
1192
while (!SLIST_EMPTY(&c->env)) {
usr.sbin/bgplgd/slowcgi.c
1193
env_entry = SLIST_FIRST(&c->env);
usr.sbin/bgplgd/slowcgi.c
1194
SLIST_REMOVE_HEAD(&c->env, entry);
usr.sbin/bgplgd/slowcgi.c
721
SLIST_INIT(&c->env);
usr.sbin/bgplgd/slowcgi.c
812
SLIST_INSERT_HEAD(&c->env, env_entry, entry);
usr.sbin/bgplgd/slowcgi.c
876
struct env_val *env;
usr.sbin/bgplgd/slowcgi.c
878
SLIST_FOREACH(env, &c->env, entry) {
usr.sbin/bgplgd/slowcgi.c
879
if (strcmp(env->key, key) == 0)
usr.sbin/bgplgd/slowcgi.c
880
return (env->val);
usr.sbin/cron/do_command.c
380
char **env;
usr.sbin/cron/do_command.c
404
for (env = e->envp; *env; env++)
usr.sbin/cron/do_command.c
406
*env);
usr.sbin/httpd/config.c
100
if (what & CONFIG_MEDIA && env->sc_mediatypes != NULL)
usr.sbin/httpd/config.c
101
media_purge(env->sc_mediatypes);
usr.sbin/httpd/config.c
103
if (what & CONFIG_AUTH && env->sc_auth != NULL) {
usr.sbin/httpd/config.c
104
while ((auth = TAILQ_FIRST(env->sc_auth)) != NULL) {
usr.sbin/httpd/config.c
105
auth_free(env->sc_auth, auth);
usr.sbin/httpd/config.c
112
config_setreset(struct httpd *env, unsigned int reset)
usr.sbin/httpd/config.c
114
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
129
config_getreset(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
136
config_purge(env, mode);
usr.sbin/httpd/config.c
142
config_getcfg(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
151
env->sc_opts = cf.cf_opts;
usr.sbin/httpd/config.c
152
env->sc_flags = cf.cf_flags;
usr.sbin/httpd/config.c
153
memcpy(env->sc_tls_sid, cf.cf_tls_sid, sizeof(env->sc_tls_sid));
usr.sbin/httpd/config.c
156
proc_compose(env->sc_ps, PROC_PARENT,
usr.sbin/httpd/config.c
206
config_setserver(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
208
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
273
config_setserver_tls(env, srv);
usr.sbin/httpd/config.c
284
config_setserver_fcgiparams(env, srv);
usr.sbin/httpd/config.c
301
config_settls(struct httpd *env, struct server *srv, enum tls_config_type type,
usr.sbin/httpd/config.c
304
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
349
config_getserver_fcgiparams(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
378
TAILQ_FOREACH(srv, env->sc_servers, srv_entry) {
usr.sbin/httpd/config.c
405
config_setserver_fcgiparams(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
407
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
41
config_init(struct httpd *env)
usr.sbin/httpd/config.c
43
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
447
config_setserver_tls(struct httpd *env, struct server *srv)
usr.sbin/httpd/config.c
456
if (config_settls(env, srv, TLS_CFG_CA, "ca", srv_conf->tls_ca,
usr.sbin/httpd/config.c
460
if (config_settls(env, srv, TLS_CFG_CERT, "cert", srv_conf->tls_cert,
usr.sbin/httpd/config.c
464
if (config_settls(env, srv, TLS_CFG_CRL, "crl", srv_conf->tls_crl,
usr.sbin/httpd/config.c
468
if (config_settls(env, srv, TLS_CFG_KEY, "key", srv_conf->tls_key,
usr.sbin/httpd/config.c
472
if (config_settls(env, srv, TLS_CFG_OCSP_STAPLE, "ocsp staple",
usr.sbin/httpd/config.c
48
env->sc_prefork_server = SERVER_NUMPROC;
usr.sbin/httpd/config.c
480
config_getserver_auth(struct httpd *env, struct server_config *srv_conf)
usr.sbin/httpd/config.c
482
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
488
if ((srv_conf->auth = auth_byid(env->sc_auth,
usr.sbin/httpd/config.c
496
config_getserver_config(struct httpd *env, struct server *srv,
usr.sbin/httpd/config.c
500
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
529
if (config_getserver_auth(env, srv_conf) != 0)
usr.sbin/httpd/config.c
55
(void)strlcpy(env->sc_errdocroot, "",
usr.sbin/httpd/config.c
56
sizeof(env->sc_errdocroot));
usr.sbin/httpd/config.c
62
if ((env->sc_servers =
usr.sbin/httpd/config.c
63
calloc(1, sizeof(*env->sc_servers))) == NULL)
usr.sbin/httpd/config.c
65
TAILQ_INIT(env->sc_servers);
usr.sbin/httpd/config.c
673
config_getserver(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
676
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
69
if ((env->sc_mediatypes =
usr.sbin/httpd/config.c
70
calloc(1, sizeof(*env->sc_mediatypes))) == NULL)
usr.sbin/httpd/config.c
708
return (config_getserver_config(env, srv, imsg));
usr.sbin/httpd/config.c
72
RB_INIT(env->sc_mediatypes);
usr.sbin/httpd/config.c
721
if (config_getserver_auth(env, &srv->srv_conf) != 0)
usr.sbin/httpd/config.c
737
TAILQ_INSERT_TAIL(env->sc_servers, srv, srv_entry);
usr.sbin/httpd/config.c
757
config_gettls(struct httpd *env, struct server_config *srv_conf,
usr.sbin/httpd/config.c
76
if ((env->sc_auth =
usr.sbin/httpd/config.c
762
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
77
calloc(1, sizeof(*env->sc_auth))) == NULL)
usr.sbin/httpd/config.c
79
TAILQ_INIT(env->sc_auth);
usr.sbin/httpd/config.c
803
config_getserver_tls(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
829
if (config_gettls(env, srv_conf, &tls_conf, "ca", p, len,
usr.sbin/httpd/config.c
835
if (config_gettls(env, srv_conf, &tls_conf, "cert", p, len,
usr.sbin/httpd/config.c
841
if (config_gettls(env, srv_conf, &tls_conf, "crl", p, len,
usr.sbin/httpd/config.c
847
if (config_gettls(env, srv_conf, &tls_conf, "key", p, len,
usr.sbin/httpd/config.c
853
if (config_gettls(env, srv_conf, &tls_conf, "ocsp staple",
usr.sbin/httpd/config.c
86
config_purge(struct httpd *env, unsigned int reset)
usr.sbin/httpd/config.c
872
config_setmedia(struct httpd *env, struct media_type *media)
usr.sbin/httpd/config.c
874
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
88
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
900
config_getmedia(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
903
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
911
if (media_add(env->sc_mediatypes, &media) == NULL) {
usr.sbin/httpd/config.c
925
config_setauth(struct httpd *env, struct auth *auth)
usr.sbin/httpd/config.c
927
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
95
if (what & CONFIG_SERVERS && env->sc_servers != NULL) {
usr.sbin/httpd/config.c
955
config_getauth(struct httpd *env, struct imsg *imsg)
usr.sbin/httpd/config.c
958
struct privsep *ps = env->sc_ps;
usr.sbin/httpd/config.c
96
while ((srv = TAILQ_FIRST(env->sc_servers)) != NULL)
usr.sbin/httpd/config.c
966
if (auth_add(env->sc_auth, &auth) == NULL) {
usr.sbin/httpd/control.c
230
struct httpd *env = cs->cs_env;
usr.sbin/httpd/control.c
272
proc_forward_imsg(env->sc_ps, &imsg, PROC_PARENT, -1);
usr.sbin/httpd/control.c
280
0, env->sc_ps->ps_instance + 1, -1,
usr.sbin/httpd/control.c
291
proc_forward_imsg(env->sc_ps, &imsg, PROC_PARENT, -1);
usr.sbin/httpd/control.c
292
proc_forward_imsg(env->sc_ps, &imsg, PROC_SERVER, -1);
usr.sbin/httpd/control.c
295
control_imsg_forward(env->sc_ps, &imsg);
usr.sbin/httpd/control.c
46
struct httpd *env = ps->ps_env;
usr.sbin/httpd/control.c
98
cs->cs_env = env;
usr.sbin/httpd/httpd.c
1147
media_find_config(struct httpd *env, struct server_config *srv_conf,
usr.sbin/httpd/httpd.c
1152
if ((match = media_find(env->sc_mediatypes, file)) != NULL)
usr.sbin/httpd/httpd.c
1158
return (&env->sc_default_type);
usr.sbin/httpd/httpd.c
122
struct httpd *env;
usr.sbin/httpd/httpd.c
175
if ((env = calloc(1, sizeof(*env))) == NULL ||
usr.sbin/httpd/httpd.c
179
httpd_env = env;
usr.sbin/httpd/httpd.c
180
env->sc_ps = ps;
usr.sbin/httpd/httpd.c
181
ps->ps_env = env;
usr.sbin/httpd/httpd.c
183
env->sc_conffile = conffile;
usr.sbin/httpd/httpd.c
184
env->sc_opts = opts;
usr.sbin/httpd/httpd.c
186
if (parse_config(env->sc_conffile, env) == -1)
usr.sbin/httpd/httpd.c
201
if (env->sc_opts & HTTPD_OPT_NOACTION)
usr.sbin/httpd/httpd.c
204
ps->ps_instances[PROC_SERVER] = env->sc_prefork_server;
usr.sbin/httpd/httpd.c
209
if (env->sc_chroot == NULL)
usr.sbin/httpd/httpd.c
210
env->sc_chroot = ps->ps_pw->pw_dir;
usr.sbin/httpd/httpd.c
212
procs[proc].p_chroot = env->sc_chroot;
usr.sbin/httpd/httpd.c
214
if (env->sc_logdir == NULL) {
usr.sbin/httpd/httpd.c
215
if (asprintf(&env->sc_logdir, "%s%s", env->sc_chroot,
usr.sbin/httpd/httpd.c
247
if (load_config(env->sc_conffile, env) == -1) {
usr.sbin/httpd/httpd.c
248
proc_kill(env->sc_ps);
usr.sbin/httpd/httpd.c
252
if (env->sc_opts & HTTPD_OPT_NOACTION) {
usr.sbin/httpd/httpd.c
254
proc_kill(env->sc_ps);
usr.sbin/httpd/httpd.c
259
arc4random_buf(env->sc_tls_sid, sizeof(env->sc_tls_sid));
usr.sbin/httpd/httpd.c
261
if (parent_configure(env) == -1)
usr.sbin/httpd/httpd.c
266
parent_shutdown(env);
usr.sbin/httpd/httpd.c
273
parent_configure(struct httpd *env)
usr.sbin/httpd/httpd.c
284
RB_FOREACH(media, mediatypes, env->sc_mediatypes) {
usr.sbin/httpd/httpd.c
285
if (config_setmedia(env, media) == -1)
usr.sbin/httpd/httpd.c
289
TAILQ_FOREACH(auth, env->sc_auth, auth_entry) {
usr.sbin/httpd/httpd.c
290
if (config_setauth(env, auth) == -1)
usr.sbin/httpd/httpd.c
295
TAILQ_FOREACH(srv, env->sc_servers, srv_entry) {
usr.sbin/httpd/httpd.c
302
if (config_setserver(env, srv) == -1)
usr.sbin/httpd/httpd.c
306
TAILQ_FOREACH(srv, env->sc_servers, srv_entry) {
usr.sbin/httpd/httpd.c
309
if (config_setserver(env, srv) == -1)
usr.sbin/httpd/httpd.c
314
env->sc_reload = env->sc_prefork_server + 1;
usr.sbin/httpd/httpd.c
319
cf.cf_opts = env->sc_opts;
usr.sbin/httpd/httpd.c
320
cf.cf_flags = env->sc_flags;
usr.sbin/httpd/httpd.c
321
memcpy(cf.cf_tls_sid, env->sc_tls_sid, sizeof(cf.cf_tls_sid));
usr.sbin/httpd/httpd.c
323
proc_compose(env->sc_ps, id, IMSG_CFG_DONE, &cf, sizeof(cf));
usr.sbin/httpd/httpd.c
328
config_purge(env, CONFIG_ALL & ~CONFIG_SERVERS);
usr.sbin/httpd/httpd.c
333
parent_reload(struct httpd *env, unsigned int reset, const char *filename)
usr.sbin/httpd/httpd.c
335
if (env->sc_reload) {
usr.sbin/httpd/httpd.c
337
__func__, env->sc_reload);
usr.sbin/httpd/httpd.c
343
filename = env->sc_conffile;
usr.sbin/httpd/httpd.c
347
config_purge(env, CONFIG_ALL);
usr.sbin/httpd/httpd.c
350
if (load_config(filename, env) == -1) {
usr.sbin/httpd/httpd.c
355
config_setreset(env, CONFIG_ALL);
usr.sbin/httpd/httpd.c
357
if (parent_configure(env) == -1) {
usr.sbin/httpd/httpd.c
362
config_setreset(env, reset);
usr.sbin/httpd/httpd.c
366
parent_reopen(struct httpd *env)
usr.sbin/httpd/httpd.c
368
proc_compose(env->sc_ps, PROC_LOGGER, IMSG_CTL_REOPEN, NULL, 0);
usr.sbin/httpd/httpd.c
372
parent_configure_done(struct httpd *env)
usr.sbin/httpd/httpd.c
376
if (env->sc_reload == 0) {
usr.sbin/httpd/httpd.c
381
env->sc_reload--;
usr.sbin/httpd/httpd.c
382
if (env->sc_reload == 0) {
usr.sbin/httpd/httpd.c
387
proc_compose(env->sc_ps, id, IMSG_CTL_START, NULL, 0);
usr.sbin/httpd/httpd.c
393
parent_shutdown(struct httpd *env)
usr.sbin/httpd/httpd.c
395
config_purge(env, CONFIG_ALL);
usr.sbin/httpd/httpd.c
397
proc_kill(env->sc_ps);
usr.sbin/httpd/httpd.c
398
control_cleanup(&env->sc_ps->ps_csock);
usr.sbin/httpd/httpd.c
399
if (env->sc_ps->ps_csock.cs_name != NULL)
usr.sbin/httpd/httpd.c
400
(void)unlink(env->sc_ps->ps_csock.cs_name);
usr.sbin/httpd/httpd.c
402
free(env->sc_ps);
usr.sbin/httpd/httpd.c
403
free(env);
usr.sbin/httpd/httpd.c
414
struct httpd *env = ps->ps_env;
usr.sbin/httpd/httpd.c
418
parent_configure_done(env);
usr.sbin/httpd/httpd.c
431
struct httpd *env = ps->ps_env;
usr.sbin/httpd/httpd.c
439
parent_reload(env, v, NULL);
usr.sbin/httpd/httpd.c
444
parent_reload(env, CONFIG_RELOAD, str);
usr.sbin/httpd/httpd.c
448
parent_shutdown(env);
usr.sbin/httpd/httpd.c
451
parent_reopen(env);
usr.sbin/httpd/httpd.c
454
parent_configure_done(env);
usr.sbin/httpd/server_fcgi.c
90
server_fcgi(struct httpd *env, struct client *clt)
usr.sbin/httpd/server_file.c
128
return (server_file(env, clt));
usr.sbin/httpd/server_file.c
137
ret = server_file_access(env, clt, path, len);
usr.sbin/httpd/server_file.c
150
return (server_file_index(env, clt, fd, &st));
usr.sbin/httpd/server_file.c
160
media = media_find_config(env, srv_conf, path);
usr.sbin/httpd/server_file.c
167
return (server_partial_file_request(env, clt, media,
usr.sbin/httpd/server_file.c
211
return (server_file_request(env, clt, media, fd, &st));
usr.sbin/httpd/server_file.c
215
server_file(struct httpd *env, struct client *clt)
usr.sbin/httpd/server_file.c
224
return (server_fcgi(env, clt));
usr.sbin/httpd/server_file.c
238
if ((ret = server_file_access(env, clt, path, sizeof(path))) > 0) {
usr.sbin/httpd/server_file.c
271
server_file_request(struct httpd *env, struct client *clt, struct media_type
usr.sbin/httpd/server_file.c
346
server_partial_file_request(struct httpd *env, struct client *clt,
usr.sbin/httpd/server_file.c
482
server_file_index(struct httpd *env, struct client *clt, int fd,
usr.sbin/httpd/server_file.c
60
server_file_access(struct httpd *env, struct client *clt,
usr.sbin/httpd/server_file.c
613
media = media_find_config(env, srv_conf, "index.html");
usr.sbin/ldapctl/ldapctl.c
235
ssl_load_certfile(struct ldapd_config *env, const char *name, u_int8_t flags)
usr.sbin/ldapd/parse.y
1234
load_certfile(struct ldapd_config *env, const char *name, u_int8_t flags,
usr.sbin/ldapd/parse.y
1249
s = SPLAY_FIND(ssltree, env->sc_ssl, &key);
usr.sbin/ldapd/parse.y
1328
SPLAY_INSERT(ssltree, env->sc_ssl, s);
usr.sbin/ldomd/ds.c
125
if (lp->env != LDC_MODE_RELIABLE) {
usr.sbin/ldomd/ds.c
161
if (lp->env != LDC_MODE_RELIABLE) {
usr.sbin/ldomd/ds.c
256
if (lp->env & LDC_FRAG_START) {
usr.sbin/ldomd/ds.c
257
lc->lc_len = (lp->env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
260
len = (lp->env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
270
if (lp->env & LDC_FRAG_STOP) {
usr.sbin/ldomd/ds.c
346
lp.env = LDC_MODE_RELIABLE;
usr.sbin/ldomd/ds.c
366
lp.env = LDC_MODE_RELIABLE;
usr.sbin/ldomd/ds.c
386
lp.env = LDC_MODE_RELIABLE;
usr.sbin/ldomd/ds.c
574
int env = LDC_FRAG_START;
usr.sbin/ldomd/ds.c
590
if ((lp.env & LDC_FRAG_START) != env) {
usr.sbin/ldomd/ds.c
595
bcopy(&lp.data, p, (lp.env & LDC_LEN_MASK));
usr.sbin/ldomd/ds.c
596
p += (lp.env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
597
len -= (lp.env & LDC_LEN_MASK);
usr.sbin/ldomd/ds.c
599
if (lp.env & LDC_FRAG_STOP)
usr.sbin/ldomd/ds.c
602
env = (lp.env & LDC_FRAG_STOP) ? LDC_FRAG_START : 0;
usr.sbin/ldomd/ds.c
617
lp.env = min(len, LDC_PKT_PAYLOAD);
usr.sbin/ldomd/ds.c
619
lp.env |= LDC_FRAG_START;
usr.sbin/ldomd/ds.c
621
lp.env |= LDC_FRAG_STOP;
usr.sbin/ldomd/ds.h
35
uint8_t env;
usr.sbin/lpd/frontend.c
144
TAILQ_FOREACH(l, &env->listeners, entry)
usr.sbin/lpd/frontend.c
295
env = tmpconf;
usr.sbin/lpd/lpd.c
128
env = parse_config(conffile, verbose);
usr.sbin/lpd/lpd.c
129
if (env == NULL)
usr.sbin/lpd/lpd.c
156
TAILQ_FOREACH(l, &env->listeners, entry)
usr.sbin/lpd/lpd.c
342
TAILQ_FOREACH(l, &env->listeners, entry) {
usr.sbin/lpd/lpd.c
39
struct lpd_conf *env;
usr.sbin/lpd/lpd.h
101
extern struct lpd_conf *env;
usr.sbin/nsd/dnstap/dnstap.c
103
res = fstrm_iothr_submit(env->iothr, env->ioq, buf, len_buf,
usr.sbin/nsd/dnstap/dnstap.c
110
dt_msg_init(const struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.c
120
if (env->identity != NULL) {
usr.sbin/nsd/dnstap/dnstap.c
121
dm->d.identity.data = (uint8_t *) env->identity;
usr.sbin/nsd/dnstap/dnstap.c
122
dm->d.identity.len = (size_t) env->len_identity;
usr.sbin/nsd/dnstap/dnstap.c
125
if (env->version != NULL) {
usr.sbin/nsd/dnstap/dnstap.c
126
dm->d.version.data = (uint8_t *) env->version;
usr.sbin/nsd/dnstap/dnstap.c
127
dm->d.version.len = (size_t) env->len_version;
usr.sbin/nsd/dnstap/dnstap.c
530
struct dt_env *env;
usr.sbin/nsd/dnstap/dnstap.c
548
env = (struct dt_env *) calloc(1, sizeof(struct dt_env));
usr.sbin/nsd/dnstap/dnstap.c
549
if (!env)
usr.sbin/nsd/dnstap/dnstap.c
580
env->tls_writer = tls_writer_init(ip, tls_server_name,
usr.sbin/nsd/dnstap/dnstap.c
590
if(!env->tls_writer) {
usr.sbin/nsd/dnstap/dnstap.c
593
free(env);
usr.sbin/nsd/dnstap/dnstap.c
604
fw = dt_tls_make_writer(fwopt, env->tls_writer);
usr.sbin/nsd/dnstap/dnstap.c
610
env->iothr = fstrm_iothr_init(fopt, &fw);
usr.sbin/nsd/dnstap/dnstap.c
611
if (env->iothr == NULL) {
usr.sbin/nsd/dnstap/dnstap.c
614
free(env);
usr.sbin/nsd/dnstap/dnstap.c
615
env = NULL;
usr.sbin/nsd/dnstap/dnstap.c
625
return env;
usr.sbin/nsd/dnstap/dnstap.c
629
dt_apply_identity(struct dt_env *env, struct nsd_options *cfg)
usr.sbin/nsd/dnstap/dnstap.c
634
free(env->identity);
usr.sbin/nsd/dnstap/dnstap.c
638
env->identity = strdup(buf);
usr.sbin/nsd/dnstap/dnstap.c
643
env->identity = strdup(cfg->dnstap_identity);
usr.sbin/nsd/dnstap/dnstap.c
645
if (env->identity == NULL)
usr.sbin/nsd/dnstap/dnstap.c
647
env->len_identity = (unsigned int)strlen(env->identity);
usr.sbin/nsd/dnstap/dnstap.c
649
env->identity));
usr.sbin/nsd/dnstap/dnstap.c
653
dt_apply_version(struct dt_env *env, struct nsd_options *cfg)
usr.sbin/nsd/dnstap/dnstap.c
657
free(env->version);
usr.sbin/nsd/dnstap/dnstap.c
659
env->version = strdup(PACKAGE_STRING);
usr.sbin/nsd/dnstap/dnstap.c
661
env->version = strdup(cfg->dnstap_version);
usr.sbin/nsd/dnstap/dnstap.c
662
if (env->version == NULL)
usr.sbin/nsd/dnstap/dnstap.c
664
env->len_version = (unsigned int)strlen(env->version);
usr.sbin/nsd/dnstap/dnstap.c
666
env->version));
usr.sbin/nsd/dnstap/dnstap.c
670
dt_apply_cfg(struct dt_env *env, struct nsd_options *cfg)
usr.sbin/nsd/dnstap/dnstap.c
675
dt_apply_identity(env, cfg);
usr.sbin/nsd/dnstap/dnstap.c
676
dt_apply_version(env, cfg);
usr.sbin/nsd/dnstap/dnstap.c
677
if ((env->log_auth_query_messages = (unsigned int)
usr.sbin/nsd/dnstap/dnstap.c
682
if ((env->log_auth_response_messages = (unsigned int)
usr.sbin/nsd/dnstap/dnstap.c
690
dt_init(struct dt_env *env)
usr.sbin/nsd/dnstap/dnstap.c
692
env->ioq = fstrm_iothr_get_input_queue(env->iothr);
usr.sbin/nsd/dnstap/dnstap.c
693
if (env->ioq == NULL)
usr.sbin/nsd/dnstap/dnstap.c
699
dt_delete(struct dt_env *env)
usr.sbin/nsd/dnstap/dnstap.c
701
if (!env)
usr.sbin/nsd/dnstap/dnstap.c
704
fstrm_iothr_destroy(&env->iothr);
usr.sbin/nsd/dnstap/dnstap.c
705
free(env->identity);
usr.sbin/nsd/dnstap/dnstap.c
706
free(env->version);
usr.sbin/nsd/dnstap/dnstap.c
707
free(env);
usr.sbin/nsd/dnstap/dnstap.c
826
dt_msg_send_auth_query(struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.c
842
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__AUTH_QUERY);
usr.sbin/nsd/dnstap/dnstap.c
868
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/nsd/dnstap/dnstap.c
872
dt_msg_send_auth_response(struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.c
888
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__AUTH_RESPONSE);
usr.sbin/nsd/dnstap/dnstap.c
913
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/nsd/dnstap/dnstap.c
98
dt_send(const struct dt_env *env, void *buf, size_t len_buf)
usr.sbin/nsd/dnstap/dnstap.h
106
dt_apply_cfg(struct dt_env *env, struct nsd_options *cfg);
usr.sbin/nsd/dnstap/dnstap.h
114
dt_init(struct dt_env *env);
usr.sbin/nsd/dnstap/dnstap.h
121
dt_delete(struct dt_env *env);
usr.sbin/nsd/dnstap/dnstap.h
135
dt_msg_send_auth_query(struct dt_env *env,
usr.sbin/nsd/dnstap/dnstap.h
157
dt_msg_send_auth_response(struct dt_env *env,
usr.sbin/relayd/agentx_control.c
1086
snmp_hosttrap(struct relayd *env, struct table *table, struct host *host)
usr.sbin/relayd/agentx_control.c
1090
if (snmp_agentx == NULL || env->sc_snmp == -1)
usr.sbin/relayd/agentx_control.c
1116
snmp_event_add(env, EV_WRITE);
usr.sbin/relayd/agentx_control.c
130
struct relayd *env;
usr.sbin/relayd/agentx_control.c
213
env = nenv;
usr.sbin/relayd/agentx_control.c
215
if ((env->sc_conf.flags & F_AGENTX) == 0) {
usr.sbin/relayd/agentx_control.c
231
env->sc_conf.agentx_context[0] == '\0' ? NULL :
usr.sbin/relayd/agentx_control.c
232
env->sc_conf.agentx_context)) == NULL)
usr.sbin/relayd/agentx_control.c
431
proc_compose(env->sc_ps, PROC_PARENT, IMSG_AGENTXSOCK, NULL, 0);
usr.sbin/relayd/agentx_control.c
434
agentx_init(env);
usr.sbin/relayd/agentx_control.c
435
event_del(&(env->sc_agentxev));
usr.sbin/relayd/agentx_control.c
472
event_del(&(env->sc_agentxev));
usr.sbin/relayd/agentx_control.c
473
event_set(&(env->sc_agentxev), fd, EV_READ | EV_PERSIST,
usr.sbin/relayd/agentx_control.c
474
agentx_sock, env);
usr.sbin/relayd/agentx_control.c
475
event_add(&(env->sc_agentxev), NULL);
usr.sbin/relayd/agentx_control.c
480
evtimer_set(&env->sc_agentxev, agentx_sock, env);
usr.sbin/relayd/agentx_control.c
481
evtimer_add(&env->sc_agentxev, &tv);
usr.sbin/relayd/agentx_control.c
488
proc_compose(env->sc_ps, PROC_PARENT, IMSG_AGENTXSOCK, NULL, 0);
usr.sbin/relayd/agentx_control.c
492
event_del(&(env->sc_agentxev));
usr.sbin/relayd/agentx_control.c
493
event_set(&(env->sc_agentxev), fd, EV_READ | EV_PERSIST,
usr.sbin/relayd/agentx_control.c
495
event_add(&(env->sc_agentxev), NULL);
usr.sbin/relayd/agentx_control.c
528
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/agentx_control.c
593
TAILQ_FOREACH(rly, env->sc_relays, rl_entry) {
usr.sbin/relayd/agentx_control.c
615
int i, nrelay = env->sc_conf.prefork_relay;
usr.sbin/relayd/agentx_control.c
670
TAILQ_FOREACH(router, env->sc_rts, rt_entry) {
usr.sbin/relayd/agentx_control.c
725
TAILQ_FOREACH(nr, env->sc_routes, nr_route) {
usr.sbin/relayd/agentx_control.c
780
TAILQ_FOREACH(host, &(env->sc_hosts), globalentry) {
usr.sbin/relayd/agentx_control.c
860
TAILQ_FOREACH(session, &(env->sc_sessions), se_entry) {
usr.sbin/relayd/agentx_control.c
954
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/ca.c
110
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/ca.c
142
if (pkey_add(env, pkey, hash) == NULL)
usr.sbin/relayd/ca.c
149
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/ca.c
183
if (pkey_add(env, pkey, hash) == NULL)
usr.sbin/relayd/ca.c
198
config_getrelay(env, imsg);
usr.sbin/relayd/ca.c
201
config_getrelayfd(env, imsg);
usr.sbin/relayd/ca.c
204
config_getcfg(env, imsg);
usr.sbin/relayd/ca.c
210
config_getreset(env, imsg);
usr.sbin/relayd/ca.c
234
if (cko.cko_proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/ca.c
239
if ((pkey = pkey_find(env, cko.cko_hash)) == NULL) {
usr.sbin/relayd/ca.c
246
if (proc_composev_imsg(env->sc_ps, PROC_RELAY,
usr.sbin/relayd/ca.c
287
if (proc_composev_imsg(env->sc_ps, PROC_RELAY, cko.cko_proc,
usr.sbin/relayd/ca.c
312
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/ca.c
448
if (env == NULL)
usr.sbin/relayd/ca.c
449
env = x_env;
usr.sbin/relayd/ca.c
48
static struct relayd *env = NULL;
usr.sbin/relayd/ca.c
58
env = ps->ps_env;
usr.sbin/relayd/ca.c
72
env->sc_id = getpid() & 0xffff;
usr.sbin/relayd/check_icmp.c
103
check_icmp(struct relayd *env, struct timeval *tv)
usr.sbin/relayd/check_icmp.c
105
if (env->sc_has_icmp) {
usr.sbin/relayd/check_icmp.c
106
check_icmp_add(&env->sc_icmp_recv, EV_READ, tv, recv_icmp);
usr.sbin/relayd/check_icmp.c
107
check_icmp_add(&env->sc_icmp_send, EV_WRITE, tv, send_icmp);
usr.sbin/relayd/check_icmp.c
109
if (env->sc_has_icmp6) {
usr.sbin/relayd/check_icmp.c
110
check_icmp_add(&env->sc_icmp6_recv, EV_READ, tv, recv_icmp);
usr.sbin/relayd/check_icmp.c
111
check_icmp_add(&env->sc_icmp6_send, EV_WRITE, tv, send_icmp);
usr.sbin/relayd/check_icmp.c
121
TAILQ_FOREACH(table, cie->env->sc_tables, entry) {
usr.sbin/relayd/check_icmp.c
142
TAILQ_FOREACH(table, cie->env->sc_tables, entry) {
usr.sbin/relayd/check_icmp.c
184
icp->icmp_id = htons(cie->env->sc_id);
usr.sbin/relayd/check_icmp.c
191
icp6->icmp6_id = htons(cie->env->sc_id);
usr.sbin/relayd/check_icmp.c
195
TAILQ_FOREACH(table, cie->env->sc_tables, entry) {
usr.sbin/relayd/check_icmp.c
282
&cie->tv_start, &cie->env->sc_conf.timeout, cie);
usr.sbin/relayd/check_icmp.c
325
if (icpid != cie->env->sc_id)
usr.sbin/relayd/check_icmp.c
328
host = host_find(cie->env, id);
usr.sbin/relayd/check_icmp.c
347
&cie->tv_start, &cie->env->sc_conf.timeout, cie);
usr.sbin/relayd/check_icmp.c
50
icmp_setup(struct relayd *env, struct ctl_icmp_event *cie, int af)
usr.sbin/relayd/check_icmp.c
61
cie->env = env;
usr.sbin/relayd/check_icmp.c
66
icmp_init(struct relayd *env)
usr.sbin/relayd/check_icmp.c
68
icmp_setup(env, &env->sc_icmp_send, AF_INET);
usr.sbin/relayd/check_icmp.c
69
icmp_setup(env, &env->sc_icmp_recv, AF_INET);
usr.sbin/relayd/check_icmp.c
70
icmp_setup(env, &env->sc_icmp6_send, AF_INET6);
usr.sbin/relayd/check_icmp.c
71
icmp_setup(env, &env->sc_icmp6_recv, AF_INET6);
usr.sbin/relayd/check_icmp.c
72
env->sc_id = getpid() & 0xffff;
usr.sbin/relayd/check_icmp.c
76
schedule_icmp(struct relayd *env, struct host *host)
usr.sbin/relayd/check_icmp.c
82
env->sc_has_icmp = 1;
usr.sbin/relayd/check_icmp.c
84
env->sc_has_icmp6 = 1;
usr.sbin/relayd/check_icmp.c
95
bcopy(&cie->env->sc_conf.timeout, &tv, sizeof(tv));
usr.sbin/relayd/check_script.c
104
if ((env->sc_conf.flags & F_SCRIPT) == 0) {
usr.sbin/relayd/check_script.c
37
check_script(struct relayd *env, struct host *host)
usr.sbin/relayd/check_script.c
45
if ((table = table_find(env, host->conf.tableid)) == NULL)
usr.sbin/relayd/check_script.c
59
if (proc_compose(env->sc_ps, PROC_PARENT, IMSG_SCRIPT, &scr,
usr.sbin/relayd/check_script.c
65
script_done(struct relayd *env, struct ctl_script *scr)
usr.sbin/relayd/check_script.c
69
if ((host = host_find(env, scr->host)) == NULL)
usr.sbin/relayd/check_script.c
95
script_exec(struct relayd *env, struct ctl_script *scr)
usr.sbin/relayd/config.c
100
TAILQ_INIT(env->sc_protos);
usr.sbin/relayd/config.c
1006
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/config.c
102
bzero(&env->sc_proto_default, sizeof(env->sc_proto_default));
usr.sbin/relayd/config.c
1028
config_getrelay(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
103
env->sc_proto_default.id = EMPTY_ID;
usr.sbin/relayd/config.c
1030
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
104
env->sc_proto_default.flags = F_USED;
usr.sbin/relayd/config.c
1049
rlay->rl_proto = &env->sc_proto_default;
usr.sbin/relayd/config.c
105
env->sc_proto_default.tcpflags = TCPFLAG_DEFAULT;
usr.sbin/relayd/config.c
1051
proto_find(env, rlay->rl_conf.proto)) == NULL) {
usr.sbin/relayd/config.c
106
env->sc_proto_default.tcpbacklog = RELAY_BACKLOG;
usr.sbin/relayd/config.c
107
env->sc_proto_default.tlsflags = TLSFLAG_DEFAULT;
usr.sbin/relayd/config.c
1071
TAILQ_INSERT_TAIL(env->sc_relays, rlay, rl_entry);
usr.sbin/relayd/config.c
1073
env->sc_relaycount++;
usr.sbin/relayd/config.c
108
TAILQ_INIT(&env->sc_proto_default.tlscerts);
usr.sbin/relayd/config.c
1089
config_getrelaytable(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
109
(void)strlcpy(env->sc_proto_default.tlsciphers,
usr.sbin/relayd/config.c
1100
if ((rlay = relay_find(env, crt.relayid)) == NULL) {
usr.sbin/relayd/config.c
1105
if ((table = table_find(env, crt.id)) == NULL) {
usr.sbin/relayd/config.c
111
sizeof(env->sc_proto_default.tlsciphers));
usr.sbin/relayd/config.c
112
(void)strlcpy(env->sc_proto_default.tlsecdhecurves,
usr.sbin/relayd/config.c
1120
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
1131
config_getrelayfd(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
114
sizeof(env->sc_proto_default.tlsecdhecurves));
usr.sbin/relayd/config.c
1145
if ((cert = cert_find(env, crfd.id)) == NULL) {
usr.sbin/relayd/config.c
1146
if ((cert = cert_add(env, crfd.id)) == NULL)
usr.sbin/relayd/config.c
115
(void)strlcpy(env->sc_proto_default.tlsdhparams,
usr.sbin/relayd/config.c
1152
if ((rlay = relay_find(env, crfd.relayid)) == NULL) {
usr.sbin/relayd/config.c
117
sizeof(env->sc_proto_default.tlsdhparams));
usr.sbin/relayd/config.c
118
env->sc_proto_default.type = RELAY_PROTO_TCP;
usr.sbin/relayd/config.c
1181
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
119
(void)strlcpy(env->sc_proto_default.name, "default",
usr.sbin/relayd/config.c
120
sizeof(env->sc_proto_default.name));
usr.sbin/relayd/config.c
123
if ((env->sc_rts =
usr.sbin/relayd/config.c
124
calloc(1, sizeof(*env->sc_rts))) == NULL)
usr.sbin/relayd/config.c
126
TAILQ_INIT(env->sc_rts);
usr.sbin/relayd/config.c
129
if ((env->sc_routes =
usr.sbin/relayd/config.c
130
calloc(1, sizeof(*env->sc_routes))) == NULL)
usr.sbin/relayd/config.c
132
TAILQ_INIT(env->sc_routes);
usr.sbin/relayd/config.c
139
config_purge(struct relayd *env, u_int reset)
usr.sbin/relayd/config.c
141
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
156
if (what & CONFIG_TABLES && env->sc_tables != NULL) {
usr.sbin/relayd/config.c
157
while ((table = TAILQ_FIRST(env->sc_tables)) != NULL)
usr.sbin/relayd/config.c
158
purge_table(env, env->sc_tables, table);
usr.sbin/relayd/config.c
159
env->sc_tablecount = 0;
usr.sbin/relayd/config.c
161
if (what & CONFIG_RDRS && env->sc_rdrs != NULL) {
usr.sbin/relayd/config.c
162
while ((rdr = TAILQ_FIRST(env->sc_rdrs)) != NULL) {
usr.sbin/relayd/config.c
163
TAILQ_REMOVE(env->sc_rdrs, rdr, entry);
usr.sbin/relayd/config.c
170
env->sc_rdrcount = 0;
usr.sbin/relayd/config.c
172
if (what & CONFIG_RELAYS && env->sc_pkeys != NULL) {
usr.sbin/relayd/config.c
173
while ((pkey = TAILQ_FIRST(env->sc_pkeys)) != NULL) {
usr.sbin/relayd/config.c
174
TAILQ_REMOVE(env->sc_pkeys, pkey, pkey_entry);
usr.sbin/relayd/config.c
178
if (what & CONFIG_RELAYS && env->sc_relays != NULL) {
usr.sbin/relayd/config.c
179
while ((rlay = TAILQ_FIRST(env->sc_relays)) != NULL)
usr.sbin/relayd/config.c
180
purge_relay(env, rlay);
usr.sbin/relayd/config.c
181
env->sc_relaycount = 0;
usr.sbin/relayd/config.c
183
if (what & CONFIG_PROTOS && env->sc_protos != NULL) {
usr.sbin/relayd/config.c
184
while ((proto = TAILQ_FIRST(env->sc_protos)) != NULL) {
usr.sbin/relayd/config.c
185
TAILQ_REMOVE(env->sc_protos, proto, entry);
usr.sbin/relayd/config.c
199
env->sc_protocount = 0;
usr.sbin/relayd/config.c
201
if (what & CONFIG_RTS && env->sc_rts != NULL) {
usr.sbin/relayd/config.c
202
while ((rt = TAILQ_FIRST(env->sc_rts)) != NULL) {
usr.sbin/relayd/config.c
203
TAILQ_REMOVE(env->sc_rts, rt, rt_entry);
usr.sbin/relayd/config.c
206
TAILQ_REMOVE(env->sc_routes, nr, nr_route);
usr.sbin/relayd/config.c
208
env->sc_routecount--;
usr.sbin/relayd/config.c
212
env->sc_routercount = 0;
usr.sbin/relayd/config.c
214
if (what & CONFIG_ROUTES && env->sc_routes != NULL) {
usr.sbin/relayd/config.c
215
while ((nr = TAILQ_FIRST(env->sc_routes)) != NULL) {
usr.sbin/relayd/config.c
218
TAILQ_REMOVE(env->sc_routes, nr, nr_route);
usr.sbin/relayd/config.c
221
env->sc_routecount = 0;
usr.sbin/relayd/config.c
226
config_setreset(struct relayd *env, u_int reset)
usr.sbin/relayd/config.c
228
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
250
config_getreset(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
257
config_purge(env, mode);
usr.sbin/relayd/config.c
263
config_getcfg(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
265
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
274
memcpy(&env->sc_conf, imsg->data, sizeof(env->sc_conf));
usr.sbin/relayd/config.c
280
TAILQ_FOREACH(tb, env->sc_tables, entry) {
usr.sbin/relayd/config.c
282
if (h->conf.parentid && (ph = host_find(env,
usr.sbin/relayd/config.c
291
if (env->sc_conf.flags & (F_TLS|F_TLSCLIENT)) {
usr.sbin/relayd/config.c
293
ca_engine_init(env);
usr.sbin/relayd/config.c
297
proc_compose(env->sc_ps, PROC_PARENT, IMSG_CFG_DONE, NULL, 0);
usr.sbin/relayd/config.c
303
config_settable(struct relayd *env, struct table *tb)
usr.sbin/relayd/config.c
305
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
320
tb->conf.name, tb->conf.id, env->sc_ps->ps_title[id]);
usr.sbin/relayd/config.c
342
config_gettable(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
35
config_init(struct relayd *env)
usr.sbin/relayd/config.c
37
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
372
TAILQ_INSERT_TAIL(env->sc_tables, tb, entry);
usr.sbin/relayd/config.c
374
env->sc_tablecount++;
usr.sbin/relayd/config.c
377
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
384
config_gethost(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
395
if (host_find(env, host->conf.id) != NULL) {
usr.sbin/relayd/config.c
402
if ((tb = table_find(env, host->conf.tableid)) == NULL) {
usr.sbin/relayd/config.c
415
TAILQ_INSERT_TAIL(&env->sc_hosts, host, globalentry);
usr.sbin/relayd/config.c
418
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
42
env->sc_conf.timeout.tv_sec = CHECK_TIMEOUT / 1000;
usr.sbin/relayd/config.c
425
config_setrdr(struct relayd *env, struct rdr *rdr)
usr.sbin/relayd/config.c
427
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
43
env->sc_conf.timeout.tv_usec = (CHECK_TIMEOUT % 1000) * 1000;
usr.sbin/relayd/config.c
44
env->sc_conf.interval.tv_sec = CHECK_INTERVAL;
usr.sbin/relayd/config.c
45
env->sc_conf.interval.tv_usec = 0;
usr.sbin/relayd/config.c
453
config_getrdr(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
46
env->sc_conf.prefork_relay = RELAY_NUMPROC;
usr.sbin/relayd/config.c
463
if ((rdr->table = table_find(env, rdr->conf.table_id)) == NULL) {
usr.sbin/relayd/config.c
468
if ((rdr->backup = table_find(env, rdr->conf.backup_id)) == NULL) {
usr.sbin/relayd/config.c
47
env->sc_conf.statinterval.tv_sec = RELAY_STATINTERVAL;
usr.sbin/relayd/config.c
470
rdr->backup = &env->sc_empty_table;
usr.sbin/relayd/config.c
474
TAILQ_INSERT_TAIL(env->sc_rdrs, rdr, entry);
usr.sbin/relayd/config.c
476
env->sc_rdrcount++;
usr.sbin/relayd/config.c
479
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
48
env->sc_ps->ps_csock.cs_name = RELAYD_SOCKET;
usr.sbin/relayd/config.c
486
config_getvirt(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
497
if ((rdr = rdr_find(env, virt->rdrid)) == NULL) {
usr.sbin/relayd/config.c
506
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
513
config_setrt(struct relayd *env, struct router *rt)
usr.sbin/relayd/config.c
515
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
540
config_getrt(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
550
if ((rt->rt_gwtable = table_find(env, rt->rt_conf.gwtable)) == NULL) {
usr.sbin/relayd/config.c
557
TAILQ_INSERT_TAIL(env->sc_rts, rt, rt_entry);
usr.sbin/relayd/config.c
559
env->sc_routercount++;
usr.sbin/relayd/config.c
562
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
569
config_getroute(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
580
if (route_find(env, nr->nr_conf.id) != NULL) {
usr.sbin/relayd/config.c
587
if ((rt = router_find(env, nr->nr_conf.routerid)) == NULL) {
usr.sbin/relayd/config.c
595
TAILQ_INSERT_TAIL(env->sc_routes, nr, nr_route);
usr.sbin/relayd/config.c
598
env->sc_routecount++;
usr.sbin/relayd/config.c
601
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
608
config_setproto(struct relayd *env, struct protocol *proto)
usr.sbin/relayd/config.c
61
if ((env->sc_tables =
usr.sbin/relayd/config.c
610
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
62
calloc(1, sizeof(*env->sc_tables))) == NULL)
usr.sbin/relayd/config.c
639
config_setrule(struct relayd *env, struct protocol *proto)
usr.sbin/relayd/config.c
64
TAILQ_INIT(env->sc_tables);
usr.sbin/relayd/config.c
641
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
66
memset(&env->sc_empty_table, 0, sizeof(env->sc_empty_table));
usr.sbin/relayd/config.c
67
env->sc_empty_table.conf.id = EMPTY_TABLE;
usr.sbin/relayd/config.c
68
env->sc_empty_table.conf.flags |= F_DISABLE;
usr.sbin/relayd/config.c
69
(void)strlcpy(env->sc_empty_table.conf.name, "empty",
usr.sbin/relayd/config.c
691
config_getproto(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
70
sizeof(env->sc_empty_table.conf.name));
usr.sbin/relayd/config.c
718
TAILQ_INSERT_TAIL(env->sc_protos, proto, entry);
usr.sbin/relayd/config.c
720
env->sc_protocount++;
usr.sbin/relayd/config.c
723
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
730
config_getrule(struct relayd *env, struct imsg *imsg)
usr.sbin/relayd/config.c
74
if ((env->sc_rdrs =
usr.sbin/relayd/config.c
746
if ((proto = proto_find(env, rule->rule_protoid)) == NULL) {
usr.sbin/relayd/config.c
75
calloc(1, sizeof(*env->sc_rdrs))) == NULL)
usr.sbin/relayd/config.c
77
TAILQ_INIT(env->sc_rdrs);
usr.sbin/relayd/config.c
792
env->sc_ps->ps_title[privsep_process], env->sc_ps->ps_instance,
usr.sbin/relayd/config.c
81
if ((env->sc_relays =
usr.sbin/relayd/config.c
819
config_setrelay(struct relayd *env, struct relay *rlay)
usr.sbin/relayd/config.c
82
calloc(1, sizeof(*env->sc_relays))) == NULL)
usr.sbin/relayd/config.c
821
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/config.c
84
TAILQ_INIT(env->sc_relays);
usr.sbin/relayd/config.c
86
if ((env->sc_certs =
usr.sbin/relayd/config.c
87
calloc(1, sizeof(*env->sc_certs))) == NULL)
usr.sbin/relayd/config.c
89
TAILQ_INIT(env->sc_certs);
usr.sbin/relayd/config.c
891
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/config.c
91
if ((env->sc_pkeys =
usr.sbin/relayd/config.c
92
calloc(1, sizeof(*env->sc_pkeys))) == NULL)
usr.sbin/relayd/config.c
94
TAILQ_INIT(env->sc_pkeys);
usr.sbin/relayd/config.c
97
if ((env->sc_protos =
usr.sbin/relayd/config.c
98
calloc(1, sizeof(*env->sc_protos))) == NULL)
usr.sbin/relayd/control.c
232
struct relayd *env = cs->cs_env;
usr.sbin/relayd/control.c
233
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/control.c
364
proc_forward_imsg(env->sc_ps, &imsg, PROC_PARENT, -1);
usr.sbin/relayd/control.c
367
proc_compose(env->sc_ps, PROC_HCE,
usr.sbin/relayd/control.c
388
proc_forward_imsg(env->sc_ps, &imsg, PROC_PARENT, -1);
usr.sbin/relayd/control.c
389
proc_forward_imsg(env->sc_ps, &imsg, PROC_HCE, -1);
usr.sbin/relayd/control.c
390
proc_forward_imsg(env->sc_ps, &imsg, PROC_RELAY, -1);
usr.sbin/relayd/control.c
46
struct relayd *env = ps->ps_env;
usr.sbin/relayd/control.c
98
cs->cs_env = env;
usr.sbin/relayd/hce.c
109
evtimer_del(&env->sc_ev);
usr.sbin/relayd/hce.c
110
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/hce.c
119
if (env->sc_has_icmp) {
usr.sbin/relayd/hce.c
120
event_del(&env->sc_icmp_send.ev);
usr.sbin/relayd/hce.c
121
event_del(&env->sc_icmp_recv.ev);
usr.sbin/relayd/hce.c
123
if (env->sc_has_icmp6) {
usr.sbin/relayd/hce.c
124
event_del(&env->sc_icmp6_send.ev);
usr.sbin/relayd/hce.c
125
event_del(&env->sc_icmp6_recv.ev);
usr.sbin/relayd/hce.c
139
proc_compose(env->sc_ps, PROC_PFE, IMSG_SYNC, NULL, 0);
usr.sbin/relayd/hce.c
140
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/hce.c
154
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/hce.c
173
schedule_icmp(env, host);
usr.sbin/relayd/hce.c
176
check_script(env, host);
usr.sbin/relayd/hce.c
188
check_icmp(env, &tv);
usr.sbin/relayd/hce.c
190
bcopy(&env->sc_conf.interval, &tv, sizeof(tv));
usr.sbin/relayd/hce.c
191
evtimer_add(&env->sc_ev, &tv);
usr.sbin/relayd/hce.c
207
if ((hostnst = host_find(env, host->conf.id)) == NULL)
usr.sbin/relayd/hce.c
210
if ((table = table_find(env, host->conf.tableid)) == NULL)
usr.sbin/relayd/hce.c
214
if (env->sc_conf.opts & RELAYD_OPT_LOGUPDATE) {
usr.sbin/relayd/hce.c
249
proc_compose(env->sc_ps, PROC_PFE, IMSG_HOST_STATUS, &st, sizeof(st));
usr.sbin/relayd/hce.c
260
if (env->sc_conf.opts & logopt) {
usr.sbin/relayd/hce.c
295
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
305
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
313
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
321
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/hce.c
328
evtimer_del(&env->sc_ev);
usr.sbin/relayd/hce.c
329
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/hce.c
331
hce_launch_checks(-1, EV_TIMEOUT, env);
usr.sbin/relayd/hce.c
349
script_done(env, &scr);
usr.sbin/relayd/hce.c
352
config_gettable(env, imsg);
usr.sbin/relayd/hce.c
355
config_gethost(env, imsg);
usr.sbin/relayd/hce.c
358
config_getcfg(env, imsg);
usr.sbin/relayd/hce.c
364
config_getreset(env, imsg);
usr.sbin/relayd/hce.c
42
static struct relayd *env = NULL;
usr.sbin/relayd/hce.c
54
env = ps->ps_env;
usr.sbin/relayd/hce.c
57
icmp_init(env);
usr.sbin/relayd/hce.c
68
env->sc_id = getpid() & 0xffff;
usr.sbin/relayd/hce.c
83
if (!event_initialized(&env->sc_ev)) {
usr.sbin/relayd/hce.c
84
evtimer_set(&env->sc_ev, hce_launch_checks, env);
usr.sbin/relayd/hce.c
86
evtimer_add(&env->sc_ev, &tv);
usr.sbin/relayd/hce.c
89
if (env->sc_conf.flags & F_TLS) {
usr.sbin/relayd/hce.c
90
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/pfe.c
107
if (!event_initialized(&env->sc_statev)) {
usr.sbin/relayd/pfe.c
108
evtimer_set(&env->sc_statev, pfe_statistics, NULL);
usr.sbin/relayd/pfe.c
109
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/pfe.c
110
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/pfe.c
117
event_del(&env->sc_statev);
usr.sbin/relayd/pfe.c
133
if ((host = host_find(env, st.id)) == NULL)
usr.sbin/relayd/pfe.c
154
proc_compose(env->sc_ps, PROC_RELAY,
usr.sbin/relayd/pfe.c
157
if ((table = table_find(env, host->conf.tableid))
usr.sbin/relayd/pfe.c
166
snmp_hosttrap(env, table, host);
usr.sbin/relayd/pfe.c
204
config_gettable(env, imsg);
usr.sbin/relayd/pfe.c
207
config_gethost(env, imsg);
usr.sbin/relayd/pfe.c
210
config_getrdr(env, imsg);
usr.sbin/relayd/pfe.c
213
config_getvirt(env, imsg);
usr.sbin/relayd/pfe.c
216
config_getrt(env, imsg);
usr.sbin/relayd/pfe.c
219
config_getroute(env, imsg);
usr.sbin/relayd/pfe.c
222
config_getproto(env, imsg);
usr.sbin/relayd/pfe.c
225
config_getrelay(env, imsg);
usr.sbin/relayd/pfe.c
228
config_getrelaytable(env, imsg);
usr.sbin/relayd/pfe.c
231
config_getcfg(env, imsg);
usr.sbin/relayd/pfe.c
232
init_tables(env);
usr.sbin/relayd/pfe.c
233
agentx_init(env);
usr.sbin/relayd/pfe.c
240
config_getreset(env, imsg);
usr.sbin/relayd/pfe.c
267
if (cnl.proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/pfe.c
269
if (natlook(env, &cnl) != 0)
usr.sbin/relayd/pfe.c
271
proc_compose_imsg(env->sc_ps, PROC_RELAY, cnl.proc,
usr.sbin/relayd/pfe.c
277
if (crs.proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/pfe.c
279
if ((rlay = relay_find(env, crs.id)) == NULL)
usr.sbin/relayd/pfe.c
283
env->sc_conf.statinterval.tv_sec;
usr.sbin/relayd/pfe.c
319
TAILQ_FOREACH(t, &env->sc_sessions, se_entry) {
usr.sbin/relayd/pfe.c
331
TAILQ_INSERT_TAIL(&env->sc_sessions, s, se_entry);
usr.sbin/relayd/pfe.c
336
TAILQ_FOREACH(s, &env->sc_sessions, se_entry)
usr.sbin/relayd/pfe.c
340
TAILQ_REMOVE(&env->sc_sessions, s, se_entry);
usr.sbin/relayd/pfe.c
363
if (env->sc_rdrs == NULL)
usr.sbin/relayd/pfe.c
365
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe.c
391
if (env->sc_relays == NULL)
usr.sbin/relayd/pfe.c
393
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/pfe.c
394
rlay->rl_stats[env->sc_conf.prefork_relay].id = EMPTY_ID;
usr.sbin/relayd/pfe.c
413
if (env->sc_rts == NULL)
usr.sbin/relayd/pfe.c
415
TAILQ_FOREACH(rt, env->sc_rts, rt_entry) {
usr.sbin/relayd/pfe.c
441
for (proc = 0; proc < env->sc_conf.prefork_relay; proc++) {
usr.sbin/relayd/pfe.c
447
proc_compose_imsg(env->sc_ps, PROC_RELAY, proc,
usr.sbin/relayd/pfe.c
459
rdr = rdr_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
461
rdr = rdr_find(env, id->id);
usr.sbin/relayd/pfe.c
485
rdr = rdr_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
487
rdr = rdr_find(env, id->id);
usr.sbin/relayd/pfe.c
49
static struct relayd *env = NULL;
usr.sbin/relayd/pfe.c
521
table = table_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
523
table = table_find(env, id->id);
usr.sbin/relayd/pfe.c
527
if (table->conf.rdrid > 0 && rdr_find(env, table->conf.rdrid) == NULL)
usr.sbin/relayd/pfe.c
536
proc_compose(env->sc_ps, PROC_HCE, IMSG_TABLE_DISABLE,
usr.sbin/relayd/pfe.c
540
proc_compose(env->sc_ps, PROC_RELAY, IMSG_TABLE_DISABLE,
usr.sbin/relayd/pfe.c
555
table = table_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
557
table = table_find(env, id->id);
usr.sbin/relayd/pfe.c
562
if (table->conf.rdrid > 0 && rdr_find(env, table->conf.rdrid) == NULL)
usr.sbin/relayd/pfe.c
572
proc_compose(env->sc_ps, PROC_HCE, IMSG_TABLE_ENABLE,
usr.sbin/relayd/pfe.c
576
proc_compose(env->sc_ps, PROC_RELAY, IMSG_TABLE_ENABLE,
usr.sbin/relayd/pfe.c
593
host = host_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
597
host = host_find(env, id->id);
usr.sbin/relayd/pfe.c
607
if ((table = table_find(env, host->conf.tableid)) == NULL)
usr.sbin/relayd/pfe.c
620
proc_compose(env->sc_ps, PROC_HCE, IMSG_HOST_DISABLE,
usr.sbin/relayd/pfe.c
624
proc_compose(env->sc_ps, PROC_RELAY, IMSG_HOST_DISABLE,
usr.sbin/relayd/pfe.c
63
env = ps->ps_env;
usr.sbin/relayd/pfe.c
635
TAILQ_FOREACH(t, env->sc_tables, entry)
usr.sbin/relayd/pfe.c
657
host = host_findbyname(env, id->name);
usr.sbin/relayd/pfe.c
661
host = host_find(env, id->id);
usr.sbin/relayd/pfe.c
675
proc_compose(env->sc_ps, PROC_HCE, IMSG_HOST_ENABLE,
usr.sbin/relayd/pfe.c
679
proc_compose(env->sc_ps, PROC_RELAY, IMSG_HOST_ENABLE,
usr.sbin/relayd/pfe.c
68
if (env->sc_pf == NULL) {
usr.sbin/relayd/pfe.c
69
if ((env->sc_pf = calloc(1, sizeof(*(env->sc_pf)))) == NULL)
usr.sbin/relayd/pfe.c
691
TAILQ_FOREACH(t, env->sc_tables, entry)
usr.sbin/relayd/pfe.c
71
env->sc_pf->dev = s;
usr.sbin/relayd/pfe.c
716
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe.c
73
if (ioctl(env->sc_pf->dev, DIOCGETSTATUS, &status) == -1)
usr.sbin/relayd/pfe.c
739
sync_table(env, rdr, active);
usr.sbin/relayd/pfe.c
740
control_imsg_forward(env->sc_ps, &imsg);
usr.sbin/relayd/pfe.c
745
flush_table(env, rdr);
usr.sbin/relayd/pfe.c
752
sync_ruleset(env, rdr, 0);
usr.sbin/relayd/pfe.c
753
control_imsg_forward(env->sc_ps, &imsg);
usr.sbin/relayd/pfe.c
762
sync_ruleset(env, rdr, 1);
usr.sbin/relayd/pfe.c
763
control_imsg_forward(env->sc_ps, &imsg);
usr.sbin/relayd/pfe.c
767
TAILQ_FOREACH(rt, env->sc_rts, rt_entry) {
usr.sbin/relayd/pfe.c
772
sync_routes(env, rt);
usr.sbin/relayd/pfe.c
775
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/pfe.c
804
proc_compose(env->sc_ps, PROC_PARENT, IMSG_DEMOTE,
usr.sbin/relayd/pfe.c
821
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe.c
822
cnt = check_table(env, rdr, rdr->table);
usr.sbin/relayd/pfe.c
824
cnt += check_table(env, rdr, rdr->backup);
usr.sbin/relayd/pfe.c
836
(3600 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/pfe.c
842
(86400 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/pfe.c
851
rdr->stats.interval = env->sc_conf.statinterval.tv_sec;
usr.sbin/relayd/pfe.c
855
evtimer_set(&env->sc_statev, pfe_statistics, NULL);
usr.sbin/relayd/pfe.c
856
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/pfe.c
857
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/pfe.c
97
flush_rulesets(env);
usr.sbin/relayd/pfe.c
98
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/pfe_filter.c
107
kill_tables(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
113
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
116
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe_filter.c
124
if (ioctl(env->sc_pf->dev, DIOCRCLRTABLES, &io) == -1)
usr.sbin/relayd/pfe_filter.c
136
sync_table(struct relayd *env, struct rdr *rdr, struct table *table)
usr.sbin/relayd/pfe_filter.c
145
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
152
flush_table(env, rdr);
usr.sbin/relayd/pfe_filter.c
204
if (ioctl(env->sc_pf->dev, DIOCRSETADDRS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
207
cnt = kill_srcnodes(env, table);
usr.sbin/relayd/pfe_filter.c
210
if (env->sc_conf.opts & RELAYD_OPT_LOGUPDATE)
usr.sbin/relayd/pfe_filter.c
221
kill_srcnodes(struct relayd *env, struct table *table)
usr.sbin/relayd/pfe_filter.c
260
if (ioctl(env->sc_pf->dev,
usr.sbin/relayd/pfe_filter.c
270
flush_table(struct relayd *env, struct rdr *rdr)
usr.sbin/relayd/pfe_filter.c
274
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
288
if (ioctl(env->sc_pf->dev, DIOCRCLRADDRS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
294
if (ioctl(env->sc_pf->dev, DIOCRCLRTSTATS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
305
transaction_init(struct relayd *env, const char *anchor)
usr.sbin/relayd/pfe_filter.c
307
env->sc_pf->pft.size = 1;
usr.sbin/relayd/pfe_filter.c
308
env->sc_pf->pft.esize = sizeof(env->sc_pf->pfte);
usr.sbin/relayd/pfe_filter.c
309
env->sc_pf->pft.array = &env->sc_pf->pfte;
usr.sbin/relayd/pfe_filter.c
311
bzero(&env->sc_pf->pfte, sizeof(env->sc_pf->pfte));
usr.sbin/relayd/pfe_filter.c
312
(void)strlcpy(env->sc_pf->pfte.anchor,
usr.sbin/relayd/pfe_filter.c
314
env->sc_pf->pfte.type = PF_TRANS_RULESET;
usr.sbin/relayd/pfe_filter.c
316
if (ioctl(env->sc_pf->dev, DIOCXBEGIN,
usr.sbin/relayd/pfe_filter.c
317
&env->sc_pf->pft) == -1)
usr.sbin/relayd/pfe_filter.c
324
transaction_commit(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
326
if (ioctl(env->sc_pf->dev, DIOCXCOMMIT,
usr.sbin/relayd/pfe_filter.c
327
&env->sc_pf->pft) == -1)
usr.sbin/relayd/pfe_filter.c
334
sync_ruleset(struct relayd *env, struct rdr *rdr, int enable)
usr.sbin/relayd/pfe_filter.c
343
if ((env->sc_conf.flags & F_NEEDPF) == 0)
usr.sbin/relayd/pfe_filter.c
353
if (transaction_init(env, anchor) == -1) {
usr.sbin/relayd/pfe_filter.c
359
if (transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
406
rio.ticket = env->sc_pf->pfte.ticket;
usr.sbin/relayd/pfe_filter.c
416
rio.rule.onrdomain = env->sc_rtable;
usr.sbin/relayd/pfe_filter.c
417
DPRINTF("%s rtable %d",__func__,env->sc_rtable);
usr.sbin/relayd/pfe_filter.c
49
init_tables(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
492
if (ioctl(env->sc_pf->dev, DIOCADDRULE, &rio) == -1)
usr.sbin/relayd/pfe_filter.c
496
if (transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
505
flush_rulesets(struct relayd *env)
usr.sbin/relayd/pfe_filter.c
510
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
513
kill_tables(env);
usr.sbin/relayd/pfe_filter.c
514
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe_filter.c
521
if (transaction_init(env, anchor) == -1 ||
usr.sbin/relayd/pfe_filter.c
522
transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
529
if (transaction_init(env, anchor) == -1 ||
usr.sbin/relayd/pfe_filter.c
530
transaction_commit(env) == -1)
usr.sbin/relayd/pfe_filter.c
541
natlook(struct relayd *env, struct ctl_natlook *cnl)
usr.sbin/relayd/pfe_filter.c
548
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
56
if (!(env->sc_conf.flags & F_NEEDPF))
usr.sbin/relayd/pfe_filter.c
576
if (ioctl(env->sc_pf->dev, DIOCNATLOOK, &pnl) == -1) {
usr.sbin/relayd/pfe_filter.c
579
if (ioctl(env->sc_pf->dev, DIOCNATLOOK, &pnl) == -1) {
usr.sbin/relayd/pfe_filter.c
59
if ((tables = calloc(env->sc_rdrcount, sizeof(*tables))) == NULL)
usr.sbin/relayd/pfe_filter.c
617
check_table(struct relayd *env, struct rdr *rdr, struct table *table)
usr.sbin/relayd/pfe_filter.c
63
TAILQ_FOREACH(rdr, env->sc_rdrs, entry) {
usr.sbin/relayd/pfe_filter.c
640
if (ioctl(env->sc_pf->dev, DIOCRGETTSTATS, &io) == -1)
usr.sbin/relayd/pfe_filter.c
77
if (i != env->sc_rdrcount)
usr.sbin/relayd/pfe_filter.c
81
io.pfrio_size = env->sc_rdrcount;
usr.sbin/relayd/pfe_filter.c
85
if (ioctl(env->sc_pf->dev, DIOCRADDTABLES, &io) == -1)
usr.sbin/relayd/pfe_filter.c
91
if (io.pfrio_nadd == env->sc_rdrcount)
usr.sbin/relayd/pfe_filter.c
97
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/pfe_filter.c
98
flush_table(env, rdr);
usr.sbin/relayd/pfe_route.c
124
pfe_route(struct relayd *env, struct ctl_netroute *crt)
usr.sbin/relayd/pfe_route.c
138
hdr.rtm_seq = env->sc_rtseq++;
usr.sbin/relayd/pfe_route.c
174
if (writev(env->sc_rtsock, iov, iovcnt) == -1) {
usr.sbin/relayd/pfe_route.c
39
init_routes(struct relayd *env)
usr.sbin/relayd/pfe_route.c
43
if (!(env->sc_conf.flags & F_NEEDRT))
usr.sbin/relayd/pfe_route.c
46
if ((env->sc_rtsock = socket(AF_ROUTE, SOCK_RAW, 0)) == -1)
usr.sbin/relayd/pfe_route.c
50
if (setsockopt(env->sc_rtsock, AF_ROUTE, ROUTE_MSGFILTER,
usr.sbin/relayd/pfe_route.c
56
sync_routes(struct relayd *env, struct router *rt)
usr.sbin/relayd/pfe_route.c
63
if (!(env->sc_conf.flags & F_NEEDRT))
usr.sbin/relayd/pfe_route.c
85
proc_compose(env->sc_ps, PROC_PARENT,
usr.sbin/relayd/relay.c
107
env = ps->ps_env;
usr.sbin/relayd/relay.c
109
relay_http(env);
usr.sbin/relayd/relay.c
1110
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/relay.c
115
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/relay.c
1236
proc_compose(env->sc_ps, PROC_PFE, IMSG_NATLOOK,
usr.sbin/relayd/relay.c
1484
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/relay.c
1495
proc_compose(env->sc_ps, PROC_PARENT, IMSG_BINDANY,
usr.sbin/relayd/relay.c
1752
if ((env->sc_conf.opts & (RELAYD_OPT_LOGCON|RELAYD_OPT_LOGCONERR)) &&
usr.sbin/relayd/relay.c
1763
if (err == 0 && (env->sc_conf.opts & RELAYD_OPT_LOGCON))
usr.sbin/relayd/relay.c
1771
if (err == 1 && (env->sc_conf.opts & RELAYD_OPT_LOGCONERR))
usr.sbin/relayd/relay.c
1818
proc_compose_imsg(env->sc_ps, PROC_PFE, -1, IMSG_KILLSTATES, -1,
usr.sbin/relayd/relay.c
1874
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1876
if ((table = table_find(env, host->conf.tableid)) ==
usr.sbin/relayd/relay.c
1886
if ((host = host_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1893
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1902
if ((table = table_find(env, id)) == NULL)
usr.sbin/relayd/relay.c
1912
if ((host = host_find(env, st.id)) == NULL)
usr.sbin/relayd/relay.c
1922
if ((table = table_find(env, host->conf.tableid))
usr.sbin/relayd/relay.c
1943
if ((con = session_find(env, cnl.id)) == NULL ||
usr.sbin/relayd/relay.c
1958
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
1963
proc_compose(env->sc_ps, p->p_id,
usr.sbin/relayd/relay.c
1967
proc_compose(env->sc_ps, p->p_id, IMSG_CTL_END,
usr.sbin/relayd/relay.c
2003
if ((con = session_find(env, id)) == NULL) {
usr.sbin/relayd/relay.c
2018
config_gettable(env, imsg);
usr.sbin/relayd/relay.c
2021
config_gethost(env, imsg);
usr.sbin/relayd/relay.c
2024
config_getproto(env, imsg);
usr.sbin/relayd/relay.c
2027
config_getrule(env, imsg);
usr.sbin/relayd/relay.c
2030
config_getrelay(env, imsg);
usr.sbin/relayd/relay.c
2033
config_getrelaytable(env, imsg);
usr.sbin/relayd/relay.c
2036
config_getrelayfd(env, imsg);
usr.sbin/relayd/relay.c
2039
config_getcfg(env, imsg);
usr.sbin/relayd/relay.c
2045
config_getreset(env, imsg);
usr.sbin/relayd/relay.c
2049
memcpy(&env->sc_ticket, imsg->data, sizeof(env->sc_ticket));
usr.sbin/relayd/relay.c
2050
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
2053
env->sc_ticket.tt_keyrev,
usr.sbin/relayd/relay.c
2054
env->sc_ticket.tt_key,
usr.sbin/relayd/relay.c
2055
sizeof(env->sc_ticket.tt_key));
usr.sbin/relayd/relay.c
2105
if (tls_config_set_session_id(tls_cfg, env->sc_conf.tls_sid,
usr.sbin/relayd/relay.c
2106
sizeof(env->sc_conf.tls_sid)) == -1) {
usr.sbin/relayd/relay.c
2118
env->sc_ticket.tt_keyrev, env->sc_ticket.tt_key,
usr.sbin/relayd/relay.c
2119
sizeof(env->sc_ticket.tt_key));
usr.sbin/relayd/relay.c
2207
TAILQ_FOREACH(cert, env->sc_certs, cert_entry) {
usr.sbin/relayd/relay.c
354
evtimer_set(&env->sc_statev, relay_statistics, ps);
usr.sbin/relayd/relay.c
355
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/relay.c
356
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/relay.c
362
proc_compose(env->sc_ps, PROC_PFE, IMSG_SESS_PUBLISH, s, sizeof(*s));
usr.sbin/relayd/relay.c
368
proc_compose(env->sc_ps, PROC_PFE, IMSG_SESS_UNPUBLISH,
usr.sbin/relayd/relay.c
390
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
400
(3600 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/relay.c
406
(86400 / env->sc_conf.statinterval.tv_sec)) == 0) {
usr.sbin/relayd/relay.c
420
proc_compose(env->sc_ps, PROC_PFE, IMSG_STATISTICS,
usr.sbin/relayd/relay.c
434
evtimer_set(&env->sc_statev, relay_statistics, ps);
usr.sbin/relayd/relay.c
435
bcopy(&env->sc_conf.statinterval, &tv, sizeof(tv));
usr.sbin/relayd/relay.c
436
evtimer_add(&env->sc_statev, &tv);
usr.sbin/relayd/relay.c
447
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relay.c
476
relay_udp_init(env, rlay);
usr.sbin/relayd/relay.c
731
(env->sc_conf.opts & (RELAYD_OPT_LOGCON|RELAYD_OPT_LOGCONERR))) {
usr.sbin/relayd/relay.c
95
static struct relayd *env = NULL;
usr.sbin/relayd/relay_http.c
85
static struct relayd *env = NULL;
usr.sbin/relayd/relay_http.c
94
env = x_env;
usr.sbin/relayd/relay_udp.c
214
struct privsep *ps = env->sc_ps;
usr.sbin/relayd/relay_udp.c
319
proc_compose(env->sc_ps, PROC_PFE,
usr.sbin/relayd/relay_udp.c
44
static struct relayd *env = NULL;
usr.sbin/relayd/relay_udp.c
73
if (env == NULL)
usr.sbin/relayd/relay_udp.c
74
env = x_env;
usr.sbin/relayd/relayd.c
1059
host_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1064
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1072
table_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1076
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1083
rdr_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1087
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/relayd.c
1094
relay_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1098
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1105
proto_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1109
TAILQ_FOREACH(p, env->sc_protos, entry)
usr.sbin/relayd/relayd.c
1116
session_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1121
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1129
route_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1133
TAILQ_FOREACH(nr, env->sc_routes, nr_route)
usr.sbin/relayd/relayd.c
1140
router_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1144
TAILQ_FOREACH(rt, env->sc_rts, rt_entry)
usr.sbin/relayd/relayd.c
1151
host_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1156
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1164
table_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1168
TAILQ_FOREACH(table, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
1175
table_findbyconf(struct relayd *env, struct table *tb)
usr.sbin/relayd/relayd.c
1184
TAILQ_FOREACH(table, env->sc_tables, entry) {
usr.sbin/relayd/relayd.c
1203
rdr_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1207
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/relayd.c
1214
relay_findbyname(struct relayd *env, const char *name)
usr.sbin/relayd/relayd.c
1218
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1225
relay_findbyaddr(struct relayd *env, struct relay_config *rc)
usr.sbin/relayd/relayd.c
1229
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
usr.sbin/relayd/relayd.c
1237
pkey_find(struct relayd *env, char * hash)
usr.sbin/relayd/relayd.c
1241
TAILQ_FOREACH(pkey, env->sc_pkeys, pkey_entry)
usr.sbin/relayd/relayd.c
1248
pkey_add(struct relayd *env, EVP_PKEY *pkey, char *hash)
usr.sbin/relayd/relayd.c
1252
if (env->sc_pkeys == NULL)
usr.sbin/relayd/relayd.c
126
struct relayd *env;
usr.sbin/relayd/relayd.c
1265
TAILQ_INSERT_TAIL(env->sc_pkeys, ca_pkey, pkey_entry);
usr.sbin/relayd/relayd.c
1271
cert_add(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1292
TAILQ_INSERT_TAIL(env->sc_certs, cert, cert_entry);
usr.sbin/relayd/relayd.c
1298
cert_find(struct relayd *env, objid_t id)
usr.sbin/relayd/relayd.c
1302
TAILQ_FOREACH(cert, env->sc_certs, cert_entry)
usr.sbin/relayd/relayd.c
1338
relay_load_certfiles(struct relayd *env, struct relay *rlay, const char *name)
usr.sbin/relayd/relayd.c
1364
ssl_load_key(env, proto->tlscakey,
usr.sbin/relayd/relayd.c
1429
if ((cert = cert_add(env, 0)) == NULL)
usr.sbin/relayd/relayd.c
179
if ((env = calloc(1, sizeof(*env))) == NULL ||
usr.sbin/relayd/relayd.c
183
relayd_env = env;
usr.sbin/relayd/relayd.c
184
env->sc_ps = ps;
usr.sbin/relayd/relayd.c
185
ps->ps_env = env;
usr.sbin/relayd/relayd.c
187
env->sc_conffile = conffile;
usr.sbin/relayd/relayd.c
188
env->sc_conf.opts = opts;
usr.sbin/relayd/relayd.c
189
TAILQ_INIT(&env->sc_hosts);
usr.sbin/relayd/relayd.c
1891
struct relayd *env = arg;
usr.sbin/relayd/relayd.c
190
TAILQ_INIT(&env->sc_sessions);
usr.sbin/relayd/relayd.c
1900
proc_compose_imsg(env->sc_ps, PROC_RELAY, -1, IMSG_TLSTICKET_REKEY,
usr.sbin/relayd/relayd.c
1903
evtimer_set(&rekeyev, parent_tls_ticket_rekey, env);
usr.sbin/relayd/relayd.c
191
env->sc_rtable = getrtable();
usr.sbin/relayd/relayd.c
193
arc4random_buf(env->sc_conf.tls_sid, sizeof(env->sc_conf.tls_sid));
usr.sbin/relayd/relayd.c
195
if (parse_config(env->sc_conffile, env) == -1)
usr.sbin/relayd/relayd.c
199
env->sc_conf.opts |= RELAYD_OPT_LOGUPDATE;
usr.sbin/relayd/relayd.c
210
if (env->sc_conf.opts & RELAYD_OPT_NOACTION)
usr.sbin/relayd/relayd.c
213
ps->ps_instances[PROC_RELAY] = env->sc_conf.prefork_relay;
usr.sbin/relayd/relayd.c
214
ps->ps_instances[PROC_CA] = env->sc_conf.prefork_relay;
usr.sbin/relayd/relayd.c
229
if (env->sc_conf.flags & F_AGENTX) {
usr.sbin/relayd/relayd.c
230
if (unveil(env->sc_conf.agentx_path, "w") == -1)
usr.sbin/relayd/relayd.c
231
err(1, "unveil %s", env->sc_conf.agentx_path);
usr.sbin/relayd/relayd.c
234
err(1, "unveil %s", env->sc_conf.agentx_path);
usr.sbin/relayd/relayd.c
256
if (load_config(env->sc_conffile, env) == -1) {
usr.sbin/relayd/relayd.c
257
proc_kill(env->sc_ps);
usr.sbin/relayd/relayd.c
261
if (env->sc_conf.opts & RELAYD_OPT_NOACTION) {
usr.sbin/relayd/relayd.c
263
proc_kill(env->sc_ps);
usr.sbin/relayd/relayd.c
268
parent_tls_ticket_rekey(0, 0, env);
usr.sbin/relayd/relayd.c
269
if (parent_configure(env) == -1)
usr.sbin/relayd/relayd.c
272
init_routes(env);
usr.sbin/relayd/relayd.c
276
parent_shutdown(env);
usr.sbin/relayd/relayd.c
283
parent_configure(struct relayd *env)
usr.sbin/relayd/relayd.c
293
TAILQ_FOREACH(tb, env->sc_tables, entry)
usr.sbin/relayd/relayd.c
294
config_settable(env, tb);
usr.sbin/relayd/relayd.c
295
TAILQ_FOREACH(rdr, env->sc_rdrs, entry)
usr.sbin/relayd/relayd.c
296
config_setrdr(env, rdr);
usr.sbin/relayd/relayd.c
297
TAILQ_FOREACH(rt, env->sc_rts, rt_entry)
usr.sbin/relayd/relayd.c
298
config_setrt(env, rt);
usr.sbin/relayd/relayd.c
299
TAILQ_FOREACH(proto, env->sc_protos, entry)
usr.sbin/relayd/relayd.c
300
config_setproto(env, proto);
usr.sbin/relayd/relayd.c
301
TAILQ_FOREACH(proto, env->sc_protos, entry)
usr.sbin/relayd/relayd.c
302
config_setrule(env, proto);
usr.sbin/relayd/relayd.c
303
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
usr.sbin/relayd/relayd.c
309
config_setrelay(env, rlay);
usr.sbin/relayd/relayd.c
313
env->sc_reload = 2 + (2 * env->sc_conf.prefork_relay);
usr.sbin/relayd/relayd.c
318
proc_compose_imsg(env->sc_ps, id, -1, IMSG_CFG_DONE, -1,
usr.sbin/relayd/relayd.c
319
-1, &env->sc_conf, sizeof(env->sc_conf));
usr.sbin/relayd/relayd.c
324
config_purge(env, CONFIG_ALL & ~CONFIG_RELAYS);
usr.sbin/relayd/relayd.c
329
parent_reload(struct relayd *env, u_int reset, const char *filename)
usr.sbin/relayd/relayd.c
331
if (env->sc_reload) {
usr.sbin/relayd/relayd.c
333
__func__, env->sc_reload);
usr.sbin/relayd/relayd.c
339
filename = env->sc_conffile;
usr.sbin/relayd/relayd.c
343
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/relayd.c
346
if (load_config(filename, env) == -1) {
usr.sbin/relayd/relayd.c
351
config_setreset(env, CONFIG_ALL);
usr.sbin/relayd/relayd.c
353
if (parent_configure(env) == -1) {
usr.sbin/relayd/relayd.c
358
config_setreset(env, reset);
usr.sbin/relayd/relayd.c
362
parent_configure_done(struct relayd *env)
usr.sbin/relayd/relayd.c
366
if (env->sc_reload == 0) {
usr.sbin/relayd/relayd.c
371
env->sc_reload--;
usr.sbin/relayd/relayd.c
372
if (env->sc_reload == 0) {
usr.sbin/relayd/relayd.c
377
proc_compose(env->sc_ps, id, IMSG_CTL_START, NULL, 0);
usr.sbin/relayd/relayd.c
383
parent_shutdown(struct relayd *env)
usr.sbin/relayd/relayd.c
385
config_purge(env, CONFIG_ALL);
usr.sbin/relayd/relayd.c
387
proc_kill(env->sc_ps);
usr.sbin/relayd/relayd.c
388
control_cleanup(&env->sc_ps->ps_csock);
usr.sbin/relayd/relayd.c
391
free(env->sc_ps);
usr.sbin/relayd/relayd.c
392
free(env);
usr.sbin/relayd/relayd.c
403
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
422
pfe_route(env, &crt);
usr.sbin/relayd/relayd.c
427
parent_reload(env, v, NULL);
usr.sbin/relayd/relayd.c
432
parent_reload(env, CONFIG_RELOAD, str);
usr.sbin/relayd/relayd.c
436
parent_shutdown(env);
usr.sbin/relayd/relayd.c
439
parent_configure_done(env);
usr.sbin/relayd/relayd.c
442
agentx_setsock(env, p->p_id);
usr.sbin/relayd/relayd.c
455
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
464
scr.retval = script_exec(env, &scr);
usr.sbin/relayd/relayd.c
468
parent_configure_done(env);
usr.sbin/relayd/relayd.c
481
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
489
if (bnd.bnd_proc < 0 || bnd.bnd_proc > env->sc_conf.prefork_relay)
usr.sbin/relayd/relayd.c
505
parent_configure_done(env);
usr.sbin/relayd/relayd.c
518
struct relayd *env = ps->ps_env;
usr.sbin/relayd/relayd.c
522
parent_configure_done(env);
usr.sbin/relayd/relayd.c
532
purge_table(struct relayd *env, struct tablelist *head, struct table *table)
usr.sbin/relayd/relayd.c
538
TAILQ_REMOVE(&env->sc_hosts, host, globalentry);
usr.sbin/relayd/relayd.c
565
purge_relay(struct relayd *env, struct relay *rlay)
usr.sbin/relayd/relayd.c
575
TAILQ_REMOVE(env->sc_relays, rlay, rl_entry);
usr.sbin/relayd/relayd.c
612
TAILQ_FOREACH_SAFE(cert, env->sc_certs, cert_entry, tmpcert) {
usr.sbin/relayd/relayd.c
623
TAILQ_REMOVE(env->sc_certs, cert, cert_entry);
usr.sbin/relayd/relayd.h
168
struct relayd *env;
usr.sbin/relayd/ssl.c
50
ssl_load_key(struct relayd *env, const char *name, off_t *len, char *pass)
usr.sbin/slowcgi/slowcgi.c
1149
while (!SLIST_EMPTY(&c->env)) {
usr.sbin/slowcgi/slowcgi.c
1150
env_entry = SLIST_FIRST(&c->env);
usr.sbin/slowcgi/slowcgi.c
1151
SLIST_REMOVE_HEAD(&c->env, entry);
usr.sbin/slowcgi/slowcgi.c
129
struct env_head env;
usr.sbin/slowcgi/slowcgi.c
695
SLIST_INIT(&c->env);
usr.sbin/slowcgi/slowcgi.c
792
SLIST_INSERT_HEAD(&c->env, env_entry, entry);
usr.sbin/slowcgi/slowcgi.c
878
char **env;
usr.sbin/slowcgi/slowcgi.c
949
if ((env = calloc(c->env_count + 1, sizeof(char*))) == NULL)
usr.sbin/slowcgi/slowcgi.c
951
SLIST_FOREACH(env_entry, &c->env, entry)
usr.sbin/slowcgi/slowcgi.c
952
env[i++] = env_entry->val;
usr.sbin/slowcgi/slowcgi.c
953
env[i++] = NULL;
usr.sbin/slowcgi/slowcgi.c
954
execve(c->script_name, argv, env);
usr.sbin/smtpd/aliases.c
106
pbuf = strchr(user, *env->sc_subaddressing_delim);
usr.sbin/smtpd/aliases.c
117
user, *env->sc_subaddressing_delim, tag, domain))
usr.sbin/smtpd/aliases.c
138
user, *env->sc_subaddressing_delim, tag))
usr.sbin/smtpd/aliases.c
40
dsp = dict_xget(env->sc_dispatchers, expand->rule->dispatcher);
usr.sbin/smtpd/aliases.c
41
mapping = table_find(env, dsp->u.local.table_alias);
usr.sbin/smtpd/aliases.c
46
pbuf = strchr(buf, *env->sc_subaddressing_delim);
usr.sbin/smtpd/aliases.c
95
dsp = dict_xget(env->sc_dispatchers, expand->rule->dispatcher);
usr.sbin/smtpd/aliases.c
96
mapping = table_find(env, dsp->u.local.table_virtual);
usr.sbin/smtpd/ca.c
109
while (dict_iter(env->sc_pki_dict, &iter_dict, &k, (void **)&pki)) {
usr.sbin/smtpd/compress_backend.c
40
return (env->sc_comp->compress_chunk(ib, ibsz, ob, obsz));
usr.sbin/smtpd/compress_backend.c
46
return (env->sc_comp->uncompress_chunk(ib, ibsz, ob, obsz));
usr.sbin/smtpd/compress_backend.c
52
return (env->sc_comp->compress_file(ifile, ofile));
usr.sbin/smtpd/compress_backend.c
58
return (env->sc_comp->uncompress_file(ifile, ofile));
usr.sbin/smtpd/config.c
234
while ((l = TAILQ_FIRST(env->sc_listeners)) != NULL) {
usr.sbin/smtpd/config.c
235
TAILQ_REMOVE(env->sc_listeners, l, entry);
usr.sbin/smtpd/config.c
241
free(env->sc_listeners);
usr.sbin/smtpd/config.c
242
env->sc_listeners = NULL;
usr.sbin/smtpd/config.c
245
while (dict_root(env->sc_tables_dict, NULL, (void **)&t))
usr.sbin/smtpd/config.c
246
table_destroy(env, t);
usr.sbin/smtpd/config.c
247
free(env->sc_tables_dict);
usr.sbin/smtpd/config.c
248
env->sc_tables_dict = NULL;
usr.sbin/smtpd/config.c
251
while ((r = TAILQ_FIRST(env->sc_rules)) != NULL) {
usr.sbin/smtpd/config.c
252
TAILQ_REMOVE(env->sc_rules, r, r_entry);
usr.sbin/smtpd/config.c
255
free(env->sc_rules);
usr.sbin/smtpd/config.c
256
env->sc_rules = NULL;
usr.sbin/smtpd/config.c
259
while (dict_poproot(env->sc_dispatchers, (void **)&d)) {
usr.sbin/smtpd/config.c
262
free(env->sc_dispatchers);
usr.sbin/smtpd/config.c
263
env->sc_dispatchers = NULL;
usr.sbin/smtpd/config.c
266
while (dict_poproot(env->sc_pki_dict, (void **)&p)) {
usr.sbin/smtpd/config.c
271
free(env->sc_pki_dict);
usr.sbin/smtpd/config.c
272
env->sc_pki_dict = NULL;
usr.sbin/smtpd/config.c
275
while (dict_iter(env->sc_pki_dict, &iter_dict, &k,
usr.sbin/smtpd/control.c
209
stat_backend = env->sc_stat;
usr.sbin/smtpd/control.c
439
if (env->sc_flags & SMTPD_SMTP_PAUSED) {
usr.sbin/smtpd/control.c
556
if (env->sc_flags & SMTPD_MDA_PAUSED) {
usr.sbin/smtpd/control.c
561
env->sc_flags |= SMTPD_MDA_PAUSED;
usr.sbin/smtpd/control.c
570
if (env->sc_flags & SMTPD_MTA_PAUSED) {
usr.sbin/smtpd/control.c
575
env->sc_flags |= SMTPD_MTA_PAUSED;
usr.sbin/smtpd/control.c
584
if (env->sc_flags & SMTPD_SMTP_PAUSED) {
usr.sbin/smtpd/control.c
589
env->sc_flags |= SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/control.c
606
if (!(env->sc_flags & SMTPD_MDA_PAUSED)) {
usr.sbin/smtpd/control.c
611
env->sc_flags &= ~SMTPD_MDA_PAUSED;
usr.sbin/smtpd/control.c
620
if (!(env->sc_flags & SMTPD_MTA_PAUSED)) {
usr.sbin/smtpd/control.c
625
env->sc_flags &= ~SMTPD_MTA_PAUSED;
usr.sbin/smtpd/control.c
634
if (!(env->sc_flags & SMTPD_SMTP_PAUSED)) {
usr.sbin/smtpd/control.c
639
env->sc_flags &= ~SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/control.c
682
m_compose(p, IMSG_CTL_SHOW_STATUS, 0, 0, -1, &env->sc_flags,
usr.sbin/smtpd/control.c
683
sizeof(env->sc_flags));
usr.sbin/smtpd/lka.c
209
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
259
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
291
table_dump_all(env);
usr.sbin/smtpd/lka.c
294
table_open_all(env);
usr.sbin/smtpd/lka.c
333
table = table_find(env, imsg->data);
usr.sbin/smtpd/lka.c
729
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
778
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
821
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
851
table = table_find(env, tablename);
usr.sbin/smtpd/lka.c
879
table = table_find(env, tablename);
usr.sbin/smtpd/lka_filter.c
204
env->sc_admd != NULL ? env->sc_admd : env->sc_hostname);
usr.sbin/smtpd/lka_filter.c
367
while (dict_iter(env->sc_filters_dict, &iter, &name, (void **)&filter_config)) {
usr.sbin/smtpd/lka_filter.c
396
while (dict_iter(env->sc_filters_dict, &iter, &name, (void **)&filter_config)) {
usr.sbin/smtpd/lka_session.c
110
dsp = dict_get(env->sc_dispatchers, lks->rule->dispatcher);
usr.sbin/smtpd/lka_session.c
128
dsp = dict_get(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
281
if (env->sc_srs_key != NULL &&
usr.sbin/smtpd/lka_session.c
307
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
357
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
380
if ((tag = strchr(xn->u.user, *env->sc_subaddressing_delim)) != NULL) {
usr.sbin/smtpd/lka_session.c
385
userbase = table_find(env, dsp->u.local.table_userbase);
usr.sbin/smtpd/lka_session.c
447
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
459
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
481
dsp = dict_xget(env->sc_dispatchers, rule->dispatcher);
usr.sbin/smtpd/lka_session.c
518
dsp = dict_xget(env->sc_dispatchers, ep->dispatcher);
usr.sbin/smtpd/makemap.c
425
if (parse_config(env, cfgpath, 0))
usr.sbin/smtpd/makemap.c
428
table = table_find(env, "aliases");
usr.sbin/smtpd/makemap.c
84
if ((env = config_default()) == NULL)
usr.sbin/smtpd/mda.c
158
if (u->evpcount >= env->sc_mda_task_hiwat) {
usr.sbin/smtpd/mda.c
588
if (u->running >= env->sc_mda_max_user_session) {
usr.sbin/smtpd/mda.c
596
if (tree_count(&sessions) >= env->sc_mda_max_session) {
usr.sbin/smtpd/mda.c
605
if (u->evpcount == env->sc_mda_task_lowat) {
usr.sbin/smtpd/mda.c
616
m_add_int(p_queue, env->sc_mda_task_release);
usr.sbin/smtpd/mda.c
723
dsp = dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/mda_unpriv.c
76
mda_command_wrap = dict_get(env->sc_mda_wrappers,
usr.sbin/smtpd/mda_variables.c
353
if ((tag = strchr(buf, *env->sc_subaddressing_delim)) != NULL) {
usr.sbin/smtpd/mta.c
1805
dispatcher = dict_xget(env->sc_dispatchers, e->dispatcher);
usr.sbin/smtpd/mta.c
2664
if (tree_count(&hs->deferred) >= env->sc_mta_max_deferred)
usr.sbin/smtpd/mta.c
464
while (dict_iter(env->sc_dispatchers, &iter, &key, (void **)&dispatcher)) {
usr.sbin/smtpd/mta.c
489
ciphers = env->sc_tls_ciphers;
usr.sbin/smtpd/mta.c
505
pki = dict_get(env->sc_pki_dict, remote->pki);
usr.sbin/smtpd/mta.c
518
ca = dict_get(env->sc_ca_dict, remote->ca);
usr.sbin/smtpd/mta.c
697
dispatcher = dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/mta.c
949
relay->limits = dict_get(env->sc_limits_dict, relay->domain->name);
usr.sbin/smtpd/mta.c
951
relay->limits = dict_get(env->sc_limits_dict, "default");
usr.sbin/smtpd/mta.c
989
dispatcher = dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/mta_session.c
470
s->helo = xstrdup(env->sc_hostname);
usr.sbin/smtpd/mta_session.c
778
if (env->sc_srs_key != NULL &&
usr.sbin/smtpd/queue.c
621
env->sc_queue_flags |= QUEUE_EVPCACHE;
usr.sbin/smtpd/queue.c
622
env->sc_queue_evpcache_size = 1024;
usr.sbin/smtpd/queue.c
631
if (env->sc_queue_flags & QUEUE_COMPRESSION)
usr.sbin/smtpd/queue.c
634
if (env->sc_queue_key) {
usr.sbin/smtpd/queue.c
635
if (!crypto_setup(env->sc_queue_key, strlen(env->sc_queue_key)))
usr.sbin/smtpd/queue_backend.c
220
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
242
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
301
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
323
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
386
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
394
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
420
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/queue_backend.c
428
if (env->sc_queue_flags & QUEUE_COMPRESSION) {
usr.sbin/smtpd/queue_backend.c
444
while (tree_count(&evpcache_tree) >= env->sc_queue_evpcache_size)
usr.sbin/smtpd/queue_backend.c
513
if (r && env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
524
if (env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
546
if ((env->sc_queue_flags & QUEUE_EVPCACHE) &&
usr.sbin/smtpd/queue_backend.c
568
if (env->sc_queue_flags & QUEUE_EVPCACHE) {
usr.sbin/smtpd/queue_backend.c
595
if (r && env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
665
if (env->sc_queue_flags & QUEUE_EVPCACHE)
usr.sbin/smtpd/queue_backend.c
721
if (dict_get(env->sc_dispatchers, ep->dispatcher) == NULL)
usr.sbin/smtpd/ruleset.c
104
table = table_find(env, r->table_for);
usr.sbin/smtpd/ruleset.c
123
table = table_find(env, r->table_smtp_helo);
usr.sbin/smtpd/ruleset.c
158
table = table_find(env, r->table_smtp_auth);
usr.sbin/smtpd/ruleset.c
184
table = table_find(env, r->table_smtp_mail_from);
usr.sbin/smtpd/ruleset.c
207
table = table_find(env, r->table_smtp_rcpt_to);
usr.sbin/smtpd/ruleset.c
225
TAILQ_FOREACH(r, env->sc_rules, r_entry) {
usr.sbin/smtpd/ruleset.c
39
table = table_find(env, r->table_tag);
usr.sbin/smtpd/ruleset.c
85
table = table_find(env, r->table_from);
usr.sbin/smtpd/scheduler.c
192
if (env->sc_bounce_warn[i] == 0)
usr.sbin/smtpd/scheduler.c
194
timestamp = si.creation + env->sc_bounce_warn[i];
usr.sbin/smtpd/scheduler.c
200
req.bounce.delay = env->sc_bounce_warn[i];
usr.sbin/smtpd/scheduler.c
267
env->sc_flags |= SMTPD_MDA_PAUSED;
usr.sbin/smtpd/scheduler.c
272
env->sc_flags &= ~SMTPD_MDA_PAUSED;
usr.sbin/smtpd/scheduler.c
278
env->sc_flags |= SMTPD_MTA_PAUSED;
usr.sbin/smtpd/scheduler.c
283
env->sc_flags &= ~SMTPD_MTA_PAUSED;
usr.sbin/smtpd/scheduler.c
303
n = backend->messages(msgid, msgids, env->sc_scheduler_max_msg_batch_size);
usr.sbin/smtpd/scheduler.c
310
n = backend->envelopes(id, state, env->sc_scheduler_max_evp_batch_size);
usr.sbin/smtpd/scheduler.c
437
evpids = xcalloc(env->sc_scheduler_max_schedule, sizeof *evpids);
usr.sbin/smtpd/scheduler.c
438
types = xcalloc(env->sc_scheduler_max_schedule, sizeof *types);
usr.sbin/smtpd/scheduler.c
439
msgids = xcalloc(env->sc_scheduler_max_msg_batch_size, sizeof *msgids);
usr.sbin/smtpd/scheduler.c
440
state = xcalloc(env->sc_scheduler_max_evp_batch_size, sizeof *state);
usr.sbin/smtpd/scheduler.c
483
if (ninflight < env->sc_scheduler_max_inflight) {
usr.sbin/smtpd/scheduler.c
485
if (!(env->sc_flags & SMTPD_MDA_PAUSED))
usr.sbin/smtpd/scheduler.c
487
if (!(env->sc_flags & SMTPD_MTA_PAUSED))
usr.sbin/smtpd/scheduler.c
491
count = env->sc_scheduler_max_schedule;
usr.sbin/smtpd/scheduler_backend.c
44
env->sc_dispatcher_bounce :
usr.sbin/smtpd/scheduler_backend.c
45
dict_xget(env->sc_dispatchers, evp->dispatcher);
usr.sbin/smtpd/scheduler_backend.c
58
sched->ttl = disp->ttl ? disp->ttl : env->sc_ttl;
usr.sbin/smtpd/smtp.c
130
TAILQ_FOREACH(l, env->sc_listeners, entry) {
usr.sbin/smtpd/smtp.c
165
ciphers = env->sc_tls_ciphers;
usr.sbin/smtpd/smtp.c
206
ca = dict_get(env->sc_ca_dict, l->ca_name);
usr.sbin/smtpd/smtp.c
234
TAILQ_FOREACH(l, env->sc_listeners, entry) {
usr.sbin/smtpd/smtp.c
243
if (!(env->sc_flags & SMTPD_SMTP_PAUSED))
usr.sbin/smtpd/smtp.c
258
if (env->sc_flags & (SMTPD_SMTP_DISABLED|SMTPD_SMTP_PAUSED))
usr.sbin/smtpd/smtp.c
261
TAILQ_FOREACH(l, env->sc_listeners, entry)
usr.sbin/smtpd/smtp.c
270
if (env->sc_flags & (SMTPD_SMTP_DISABLED|SMTPD_SMTP_PAUSED))
usr.sbin/smtpd/smtp.c
273
TAILQ_FOREACH(l, env->sc_listeners, entry)
usr.sbin/smtpd/smtp.c
280
struct listener *listener = env->sc_sock_listener;
usr.sbin/smtpd/smtp.c
288
if (env->sc_flags & SMTPD_SMTP_PAUSED)
usr.sbin/smtpd/smtp.c
294
if ((smtp_session(listener, fd[0], &listener->ss, env->sc_hostname, NULL)) == -1) {
usr.sbin/smtpd/smtp.c
315
if (env->sc_flags & SMTPD_SMTP_PAUSED)
usr.sbin/smtpd/smtp.c
351
env->sc_flags |= SMTPD_SMTP_DISABLED;
usr.sbin/smtpd/smtp.c
372
if (env->sc_flags & SMTPD_SMTP_DISABLED) {
usr.sbin/smtpd/smtp.c
375
env->sc_flags &= ~SMTPD_SMTP_DISABLED;
usr.sbin/smtpd/smtp.c
94
env->sc_flags |= SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/smtp.c
99
env->sc_flags &= ~SMTPD_SMTP_PAUSED;
usr.sbin/smtpd/smtp_session.c
1140
if (s->tx->datain > env->sc_maxsize)
usr.sbin/smtpd/smtp_session.c
1545
if (s->mailcount >= env->sc_session_max_mails) {
usr.sbin/smtpd/smtp_session.c
1579
if (s->tx->rcptcount >= env->sc_session_max_rcpt) {
usr.sbin/smtpd/smtp_session.c
1785
smtp_reply(s, "250-SIZE %zu", env->sc_maxsize);
usr.sbin/smtpd/smtp_session.c
2429
if (tx->rcptcount >= env->sc_session_max_rcpt) {
usr.sbin/smtpd/smtpctl.c
69
struct smtpd *env;
usr.sbin/smtpd/smtpd.c
1103
while (dict_iter(env->sc_pki_dict, &iter_dict, &k, (void **)&pki)) {
usr.sbin/smtpd/smtpd.c
1116
while (dict_iter(env->sc_ca_dict, &iter_dict, &k, (void **)&sca)) {
usr.sbin/smtpd/smtpd.c
1132
while (dict_iter(env->sc_pki_dict, &iter_dict, &k, (void **)&pki)) {
usr.sbin/smtpd/smtpd.c
122
struct smtpd *env = NULL;
usr.sbin/smtpd/smtpd.c
1281
while (dict_iter(env->sc_filters_dict, &iter, (const char **)&fn, (void **)&fc)) {
usr.sbin/smtpd/smtpd.c
1284
fcs = dict_xget(env->sc_filters_dict, fc->chain[i]);
usr.sbin/smtpd/smtpd.c
1292
while (dict_iter(env->sc_filters_dict, &iter, (const char **)&fn, (void **)&fc)) {
usr.sbin/smtpd/smtpd.c
1294
fp = dict_xget(env->sc_filter_processes_dict, fc->proc);
usr.sbin/smtpd/smtpd.c
1300
while (dict_iter(env->sc_filter_processes_dict, &iter, &name, (void **)&fp))
usr.sbin/smtpd/smtpd.c
1340
processor = dict_xget(env->sc_filter_processes_dict, name);
usr.sbin/smtpd/smtpd.c
1419
dsp = dict_xget(env->sc_dispatchers, deliver->dispatcher);
usr.sbin/smtpd/smtpd.c
262
processor = dict_xget(env->sc_filter_processes_dict, procname);
usr.sbin/smtpd/smtpd.c
493
env = conf;
usr.sbin/smtpd/smtpd.c
606
env->sc_opts |= opts;
usr.sbin/smtpd/smtpd.c
611
if (strlcpy(env->sc_conffile, conffile, PATH_MAX)
usr.sbin/smtpd/smtpd.c
615
if (env->sc_opts & SMTPD_OPT_NOACTION) {
usr.sbin/smtpd/smtpd.c
616
if (env->sc_queue_key &&
usr.sbin/smtpd/smtpd.c
617
crypto_setup(env->sc_queue_key,
usr.sbin/smtpd/smtpd.c
618
strlen(env->sc_queue_key)) == 0) {
usr.sbin/smtpd/smtpd.c
628
env->sc_flags |= flags;
usr.sbin/smtpd/smtpd.c
643
if (env->sc_hostname[0] == '\0')
usr.sbin/smtpd/smtpd.c
645
env->sc_uptime = time(NULL);
usr.sbin/smtpd/smtpd.c
650
if (env->sc_queue_flags & QUEUE_ENCRYPTION) {
usr.sbin/smtpd/smtpd.c
651
if (env->sc_queue_key == NULL) {
usr.sbin/smtpd/smtpd.c
658
env->sc_queue_key = strdup(password);
usr.sbin/smtpd/smtpd.c
660
if (env->sc_queue_key == NULL)
usr.sbin/smtpd/smtpd.c
668
if (strcasecmp(env->sc_queue_key, "stdin") == 0) {
usr.sbin/smtpd/smtpd.c
673
env->sc_queue_key = buf;
usr.sbin/smtpd/smtpd.c
715
if (env->sc_queue_key) {
usr.sbin/smtpd/smtpd.c
717
0, -1, env->sc_queue_key, strlen(env->sc_queue_key)
usr.sbin/smtpd/smtpd.c
750
env->sc_stat = stat_backend_lookup(backend_stat);
usr.sbin/smtpd/smtpd.c
751
if (env->sc_stat == NULL)
usr.sbin/smtpd/smtpd.c
775
if (env->sc_queue_flags & QUEUE_COMPRESSION)
usr.sbin/smtpd/smtpd.c
776
env->sc_comp = compress_backend_lookup("gzip");
usr.sbin/smtpd/smtpd.c
789
if (env->sc_bounce_warn[i] == 0)
usr.sbin/smtpd/smtpd.c
792
duration_to_text(env->sc_bounce_warn[i]));
usr.sbin/smtpd/smtpd.c
928
env->sc_queue_key = strdup(imsg.data);
usr.sbin/smtpd/smtpd.h
1014
extern struct smtpd *env;
usr.sbin/smtpd/srs.c
107
base64_encode_rfc3548(srs_hash(env->sc_srs_key, tmp), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
139
base64_encode_rfc3548(srs_hash(env->sc_srs_key, tmp), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
178
base64_encode_rfc3548(srs_hash(env->sc_srs_key, tmp + 5), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
216
base64_encode_rfc3548(srs_hash(env->sc_srs_key, rcpt+5), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
221
if (env->sc_srs_key_backup == NULL)
usr.sbin/smtpd/srs.c
223
base64_encode_rfc3548(srs_hash(env->sc_srs_key_backup, rcpt+5),
usr.sbin/smtpd/srs.c
284
base64_encode_rfc3548(srs_hash(env->sc_srs_key, rcpt+5), SHA_DIGEST_LENGTH,
usr.sbin/smtpd/srs.c
289
if (env->sc_srs_key_backup == NULL)
usr.sbin/smtpd/srs.c
291
base64_encode_rfc3548(srs_hash(env->sc_srs_key_backup, rcpt+5),
usr.sbin/smtpd/srs.c
61
if (! minrange(tref, t2, env->sc_srs_ttl, 1024) &&
usr.sbin/smtpd/stat_ramstat.c
57
ramstat_set("uptime", stat_timestamp(env->sc_uptime));
usr.sbin/smtpd/util.c
398
if (strchr(m2.user, *env->sc_subaddressing_delim) == NULL) {
usr.sbin/smtpd/util.c
400
p = strchr(m1.user, *env->sc_subaddressing_delim);
usr.sbin/snmpd/snmpd.c
106
snmpd_shutdown(env);
usr.sbin/snmpd/snmpd.c
133
struct snmpd *env;
usr.sbin/snmpd/snmpd.c
197
if ((env = parse_config(conffile, flags)) == NULL)
usr.sbin/snmpd/snmpd.c
200
ps = &env->sc_ps;
usr.sbin/snmpd/snmpd.c
201
ps->ps_env = env;
usr.sbin/snmpd/snmpd.c
202
snmpd_env = env;
usr.sbin/snmpd/snmpd.c
221
env->sc_engine_boots = 0;
usr.sbin/snmpd/snmpd.c
245
snmpd_backend(env);
usr.sbin/snmpd/snmpd.c
258
snmpd_shutdown(struct snmpd *env)
usr.sbin/snmpd/snmpd.c
260
proc_kill(&env->sc_ps);
usr.sbin/snmpd/snmpd.c
262
free(env);
usr.sbin/snmpd/snmpd.c
341
snmpd_backend(struct snmpd *env)
usr.sbin/snmpd/snmpd.c
354
if (env->sc_rtfilter) {
usr.sbin/snmpd/snmpd.c
358
if (env->sc_flags & SNMPD_F_VERBOSE)
usr.sbin/snmpd/snmpd.c
360
if (env->sc_flags & SNMPD_F_DEBUG)
usr.sbin/snmpd/snmpd.c
385
if (proc_compose_imsg(&env->sc_ps, PROC_SNMPE, -1,
usr.sbin/snmpd/snmpd.c
55
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/snmpe.c
117
tohexstr(env->sc_engineid.value, env->sc_engineid.length));
usr.sbin/snmpd/snmpe.c
238
struct snmpd *env = snmpd_env;
usr.sbin/snmpd/snmpe.c
239
struct snmp_stats *stats = &env->sc_stats;
usr.sbin/snmpd/snmpe.c
298
if (MSG_SECLEVEL(msg) < env->sc_min_seclevel ||
usr.sbin/snmpd/snmpe.c
358
strcmp(env->sc_rdcommunity, msg->sm_community) != 0 &&
usr.sbin/snmpd/snmpe.c
359
strcmp(env->sc_rwcommunity, msg->sm_community) != 0) {
usr.sbin/snmpd/snmpe.c
373
strcmp(env->sc_rwcommunity, msg->sm_community) != 0) {
usr.sbin/snmpd/snmpe.c
374
if (strcmp(env->sc_rdcommunity, msg->sm_community) != 0)
usr.sbin/snmpd/snmpe.c
409
if (strcmp(env->sc_trcommunity, msg->sm_community) != 0) {
usr.sbin/snmpd/snmpe.c
71
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/snmpe.c
80
TAILQ_FOREACH(h, &env->sc_addresses, entry)
usr.sbin/snmpd/snmpe.c
90
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/snmpe.c
97
TAILQ_FOREACH(h, &env->sc_addresses, entry) {
usr.sbin/snmpd/traphandler.c
276
struct snmpd *env = ps->ps_env;
usr.sbin/snmpd/traphandler.c
297
log_init((env->sc_flags & SNMPD_F_DEBUG) ? 1 : 0, LOG_DAEMON);
usr.sbin/unbound/cachedb/cachedb.c
1001
cachedb_is_enabled(struct module_stack* mods, struct module_env* env)
usr.sbin/unbound/cachedb/cachedb.c
1007
ie = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
1015
cachedb_msg_remove_qinfo(qstate->env, &qstate->qinfo);
usr.sbin/unbound/cachedb/cachedb.c
1018
void cachedb_msg_remove_qinfo(struct module_env* env, struct query_info* qinfo)
usr.sbin/unbound/cachedb/cachedb.c
1021
int id = modstack_find(env->modstack, "cachedb");
usr.sbin/unbound/cachedb/cachedb.c
1022
struct cachedb_env* ie = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
1025
calc_hash(qinfo, env, key, sizeof(key));
usr.sbin/unbound/cachedb/cachedb.c
1026
sldns_buffer_clear(env->scratch_buffer);
usr.sbin/unbound/cachedb/cachedb.c
1027
sldns_buffer_write_u32(env->scratch_buffer, 0);
usr.sbin/unbound/cachedb/cachedb.c
1028
sldns_buffer_flip(env->scratch_buffer);
usr.sbin/unbound/cachedb/cachedb.c
1031
(*ie->backend->store)(env, ie, key,
usr.sbin/unbound/cachedb/cachedb.c
1032
sldns_buffer_begin(env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
1033
sldns_buffer_limit(env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
105
testframe_init(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/cachedb.c
120
0 /* no aggregation */, env)) {
usr.sbin/unbound/cachedb/cachedb.c
131
testframe_deinit(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/cachedb.c
135
(void)env;
usr.sbin/unbound/cachedb/cachedb.c
146
testframe_lookup(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/cachedb.c
151
(void)env;
usr.sbin/unbound/cachedb/cachedb.c
173
testframe_store(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/cachedb.c
178
(void)env;
usr.sbin/unbound/cachedb/cachedb.c
245
cachedb_init(struct module_env* env, int id)
usr.sbin/unbound/cachedb/cachedb.c
253
env->modinfo[id] = (void*)cachedb_env;
usr.sbin/unbound/cachedb/cachedb.c
254
if(!cachedb_apply_cfg(cachedb_env, env->cfg)) {
usr.sbin/unbound/cachedb/cachedb.c
257
env->modinfo[id] = NULL;
usr.sbin/unbound/cachedb/cachedb.c
263
if(!(*cachedb_env->backend->init)(env, cachedb_env)) {
usr.sbin/unbound/cachedb/cachedb.c
267
env->modinfo[id] = NULL;
usr.sbin/unbound/cachedb/cachedb.c
275
cachedb_deinit(struct module_env* env, int id)
usr.sbin/unbound/cachedb/cachedb.c
278
if(!env || !env->modinfo[id])
usr.sbin/unbound/cachedb/cachedb.c
280
cachedb_env = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
282
(*cachedb_env->backend->deinit)(env, cachedb_env);
usr.sbin/unbound/cachedb/cachedb.c
285
env->modinfo[id] = NULL;
usr.sbin/unbound/cachedb/cachedb.c
332
calc_hash(struct query_info* qinfo, struct module_env* env, char* buf,
usr.sbin/unbound/cachedb/cachedb.c
339
const char* secret = env->cfg->cachedb_secret;
usr.sbin/unbound/cachedb/cachedb.c
409
!qstate->env->cfg->serve_expired)
usr.sbin/unbound/cachedb/cachedb.c
413
if (qstate->env->cfg->ede && qstate->return_msg->rep->reason_bogus != LDNS_EDE_NONE) {
usr.sbin/unbound/cachedb/cachedb.c
414
edns_opt_list_append_ede(&edns.opt_list_out, qstate->env->scratch,
usr.sbin/unbound/cachedb/cachedb.c
424
buf, 0, 1, qstate->env->scratch, 65535, &edns, 1, 0))
usr.sbin/unbound/cachedb/cachedb.c
431
timestamp = (uint64_t)*qstate->env->now;
usr.sbin/unbound/cachedb/cachedb.c
463
if((time_t)expiry < *qstate->env->now &&
usr.sbin/unbound/cachedb/cachedb.c
464
(!qstate->env->cfg->serve_expired ||
usr.sbin/unbound/cachedb/cachedb.c
466
*qstate->env->now - (time_t)expiry > SERVE_EXPIRED_TTL)))
usr.sbin/unbound/cachedb/cachedb.c
559
regional_free_all(qstate->env->scratch);
usr.sbin/unbound/cachedb/cachedb.c
560
prs = (struct msg_parse*)regional_alloc(qstate->env->scratch,
usr.sbin/unbound/cachedb/cachedb.c
567
if(parse_packet(buf, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) {
usr.sbin/unbound/cachedb/cachedb.c
571
if(parse_extract_edns_from_response_msg(prs, &edns, qstate->env->scratch) !=
usr.sbin/unbound/cachedb/cachedb.c
583
if(qstate->env->cfg->ede &&
usr.sbin/unbound/cachedb/cachedb.c
603
if(*qstate->env->now <= (time_t)timestamp) {
usr.sbin/unbound/cachedb/cachedb.c
607
adjust = *qstate->env->now - (time_t)timestamp;
usr.sbin/unbound/cachedb/cachedb.c
613
if(!qstate->env->cfg->serve_expired ||
usr.sbin/unbound/cachedb/cachedb.c
626
if(qstate->env->cfg->aggressive_nsec) {
usr.sbin/unbound/cachedb/cachedb.c
635
if(qstate->env->cfg->serve_expired &&
usr.sbin/unbound/cachedb/cachedb.c
636
!qstate->env->cfg->serve_expired_client_timeout &&
usr.sbin/unbound/cachedb/cachedb.c
637
(adjust == -1 || (time_t)expiry < *qstate->env->now)) {
usr.sbin/unbound/cachedb/cachedb.c
653
calc_hash(&qstate->qinfo, qstate->env, key, sizeof(key));
usr.sbin/unbound/cachedb/cachedb.c
656
if( !(*ie->backend->lookup)(qstate->env, ie, key,
usr.sbin/unbound/cachedb/cachedb.c
657
qstate->env->scratch_buffer)) {
usr.sbin/unbound/cachedb/cachedb.c
662
if( !good_expiry_and_qinfo(qstate, qstate->env->scratch_buffer) ) {
usr.sbin/unbound/cachedb/cachedb.c
667
if( !parse_data(qstate, qstate->env->scratch_buffer, msg_expired) ) {
usr.sbin/unbound/cachedb/cachedb.c
680
calc_hash(&qstate->qinfo, qstate->env, key, sizeof(key));
usr.sbin/unbound/cachedb/cachedb.c
683
if(!prep_data(qstate, qstate->env->scratch_buffer))
usr.sbin/unbound/cachedb/cachedb.c
687
(*ie->backend->store)(qstate->env, ie, key,
usr.sbin/unbound/cachedb/cachedb.c
688
sldns_buffer_begin(qstate->env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
689
sldns_buffer_limit(qstate->env->scratch_buffer),
usr.sbin/unbound/cachedb/cachedb.c
710
msg = dns_cache_lookup(qstate->env, qstate->qinfo.qname,
usr.sbin/unbound/cachedb/cachedb.c
713
qstate->region, qstate->env->scratch,
usr.sbin/unbound/cachedb/cachedb.c
717
if(!msg && qstate->env->neg_cache &&
usr.sbin/unbound/cachedb/cachedb.c
718
iter_qname_indicates_dnssec(qstate->env, &qstate->qinfo)) {
usr.sbin/unbound/cachedb/cachedb.c
721
msg = val_neg_getmsg(qstate->env->neg_cache, &qstate->qinfo,
usr.sbin/unbound/cachedb/cachedb.c
722
qstate->region, qstate->env->rrset_cache,
usr.sbin/unbound/cachedb/cachedb.c
723
qstate->env->scratch_buffer,
usr.sbin/unbound/cachedb/cachedb.c
724
*qstate->env->now, 1/*add SOA*/, NULL,
usr.sbin/unbound/cachedb/cachedb.c
725
qstate->env->cfg);
usr.sbin/unbound/cachedb/cachedb.c
742
int serve_expired = qstate->env->cfg->serve_expired;
usr.sbin/unbound/cachedb/cachedb.c
744
if(qstate->env->cfg->serve_expired)
usr.sbin/unbound/cachedb/cachedb.c
755
if(qstate->env->cfg->cachedb_check_when_serve_expired)
usr.sbin/unbound/cachedb/cachedb.c
758
(void)dns_cache_store(qstate->env, &qstate->qinfo,
usr.sbin/unbound/cachedb/cachedb.c
763
if(qstate->env->cfg->serve_expired_client_timeout) {
usr.sbin/unbound/cachedb/cachedb.c
838
if(qstate->env->cfg->serve_expired && msg_expired) {
usr.sbin/unbound/cachedb/cachedb.c
860
qstate->env->cfg->cachedb_check_when_serve_expired &&
usr.sbin/unbound/cachedb/cachedb.c
861
!qstate->env->cfg->serve_expired_client_timeout) {
usr.sbin/unbound/cachedb/cachedb.c
891
if(qstate->env->cfg->cachedb_no_store) {
usr.sbin/unbound/cachedb/cachedb.c
908
struct cachedb_env* ie = (struct cachedb_env*)qstate->env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.c
977
cachedb_get_mem(struct module_env* env, int id)
usr.sbin/unbound/cachedb/cachedb.c
979
struct cachedb_env* ie = (struct cachedb_env*)env->modinfo[id];
usr.sbin/unbound/cachedb/cachedb.h
106
size_t cachedb_get_mem(struct module_env* env, int id);
usr.sbin/unbound/cachedb/cachedb.h
120
int cachedb_is_enabled(struct module_stack* mods, struct module_env* env);
usr.sbin/unbound/cachedb/cachedb.h
135
void cachedb_msg_remove_qinfo(struct module_env* env,
usr.sbin/unbound/cachedb/cachedb.h
94
int cachedb_init(struct module_env* env, int id);
usr.sbin/unbound/cachedb/cachedb.h
96
void cachedb_deinit(struct module_env* env, int id);
usr.sbin/unbound/cachedb/redis.c
252
redis_init(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/redis.c
271
moddata->numctxs = env->cfg->num_threads;
usr.sbin/unbound/cachedb/redis.c
275
moddata->server_host = env->cfg->redis_server_host;
usr.sbin/unbound/cachedb/redis.c
276
moddata->replica_server_host = env->cfg->redis_replica_server_host;
usr.sbin/unbound/cachedb/redis.c
278
moddata->server_port = env->cfg->redis_server_port;
usr.sbin/unbound/cachedb/redis.c
279
moddata->replica_server_port = env->cfg->redis_replica_server_port;
usr.sbin/unbound/cachedb/redis.c
281
moddata->server_path = env->cfg->redis_server_path;
usr.sbin/unbound/cachedb/redis.c
282
moddata->replica_server_path = env->cfg->redis_replica_server_path;
usr.sbin/unbound/cachedb/redis.c
284
moddata->server_password = env->cfg->redis_server_password;
usr.sbin/unbound/cachedb/redis.c
285
moddata->replica_server_password = env->cfg->redis_replica_server_password;
usr.sbin/unbound/cachedb/redis.c
288
env->cfg->redis_timeout,
usr.sbin/unbound/cachedb/redis.c
289
env->cfg->redis_command_timeout);
usr.sbin/unbound/cachedb/redis.c
291
env->cfg->redis_replica_timeout,
usr.sbin/unbound/cachedb/redis.c
292
env->cfg->redis_replica_command_timeout);
usr.sbin/unbound/cachedb/redis.c
294
env->cfg->redis_timeout,
usr.sbin/unbound/cachedb/redis.c
295
env->cfg->redis_connect_timeout);
usr.sbin/unbound/cachedb/redis.c
297
env->cfg->redis_replica_timeout,
usr.sbin/unbound/cachedb/redis.c
298
env->cfg->redis_replica_connect_timeout);
usr.sbin/unbound/cachedb/redis.c
302
moddata->logical_db = env->cfg->redis_logical_db;
usr.sbin/unbound/cachedb/redis.c
303
moddata->replica_logical_db = env->cfg->redis_replica_logical_db;
usr.sbin/unbound/cachedb/redis.c
305
moddata->ctxs = calloc(env->cfg->num_threads, sizeof(redisContext*));
usr.sbin/unbound/cachedb/redis.c
313
moddata->replica_ctxs = calloc(env->cfg->num_threads, sizeof(redisContext*));
usr.sbin/unbound/cachedb/redis.c
332
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
356
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
368
if(env->cfg->redis_expire_records &&
usr.sbin/unbound/cachedb/redis.c
369
moddata->ctxs[env->alloc->thread_num] != NULL) {
usr.sbin/unbound/cachedb/redis.c
373
rep = redis_command(env, cachedb_env,
usr.sbin/unbound/cachedb/redis.c
403
redis_deinit(struct module_env* env, struct cachedb_env* cachedb_env)
usr.sbin/unbound/cachedb/redis.c
407
(void)env;
usr.sbin/unbound/cachedb/redis.c
426
redis_command(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/redis.c
439
log_assert(env->alloc->thread_num < d->numctxs);
usr.sbin/unbound/cachedb/redis.c
444
ctx = ctx_selector[env->alloc->thread_num];
usr.sbin/unbound/cachedb/redis.c
463
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
478
env->now_tv,
usr.sbin/unbound/cachedb/redis.c
481
ctx_selector[env->alloc->thread_num] = ctx;
usr.sbin/unbound/cachedb/redis.c
493
ctx_selector[env->alloc->thread_num] = NULL;
usr.sbin/unbound/cachedb/redis.c
507
redis_lookup(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/redis.c
530
rep = redis_command(env, cachedb_env, cmdbuf, NULL, 0, 0);
usr.sbin/unbound/cachedb/redis.c
562
redis_store(struct module_env* env, struct cachedb_env* cachedb_env,
usr.sbin/unbound/cachedb/redis.c
570
env->cfg->redis_expire_records &&
usr.sbin/unbound/cachedb/redis.c
571
(!env->cfg->serve_expired || env->cfg->serve_expired_ttl > 0));
usr.sbin/unbound/cachedb/redis.c
600
ttl += env->cfg->serve_expired_ttl;
usr.sbin/unbound/cachedb/redis.c
614
rep = redis_command(env, cachedb_env, cmdbuf, data, data_len, 1);
usr.sbin/unbound/daemon/cachedump.c
1006
(worker->env.cfg->do_ip4 && worker->back->num_ip4 != 0),
usr.sbin/unbound/daemon/cachedump.c
1007
(worker->env.cfg->do_ip6 && worker->back->num_ip6 != 0),
usr.sbin/unbound/daemon/cachedump.c
1008
worker->env.cfg->do_nat64)) {
usr.sbin/unbound/daemon/cachedump.c
1029
stub = hints_lookup_stub(worker->env.hints, nm, qinfo.qclass,
usr.sbin/unbound/daemon/cachedump.c
1035
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/cachedump.c
1041
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/cachedump.c
1047
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/cachedump.c
269
*dump_info->worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
277
struct rrset_cache* r = worker->env.rrset_cache;
usr.sbin/unbound/daemon/cachedump.c
402
dump_msg(txt, k, d, *dump_info->worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
413
if(!dump_slabhash(worker->env.msg_cache, &dump_msg_entry, ssl,
usr.sbin/unbound/daemon/cachedump.c
557
(void)rrset_cache_update(worker->env.rrset_cache, &ref,
usr.sbin/unbound/daemon/cachedump.c
558
worker->alloc, *worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
611
d->ttl = (time_t)ttl + *worker->env.now;
usr.sbin/unbound/daemon/cachedump.c
627
&go_on, *worker->env.now)) {
usr.sbin/unbound/daemon/cachedump.c
634
&go_on, *worker->env.now)) {
usr.sbin/unbound/daemon/cachedump.c
651
sldns_buffer* buf = worker->env.scratch_buffer;
usr.sbin/unbound/daemon/cachedump.c
732
k = rrset_cache_lookup(worker->env.rrset_cache, qinfo.qname,
usr.sbin/unbound/daemon/cachedump.c
734
(uint32_t)flags, *worker->env.now, 0);
usr.sbin/unbound/daemon/cachedump.c
742
*rrset = packed_rrset_copy_region(k, region, *worker->env.now);
usr.sbin/unbound/daemon/cachedump.c
817
if(!dns_cache_store(&worker->env, &qinf, &rep, 0, 0, 0, NULL, flags,
usr.sbin/unbound/daemon/cachedump.c
818
*worker->env.now, 1)) {
usr.sbin/unbound/daemon/cachedump.c
829
sldns_buffer* buf = worker->env.scratch_buffer;
usr.sbin/unbound/daemon/cachedump.c
846
return read_fixed(ssl, worker->env.scratch_buffer, "EOF");
usr.sbin/unbound/daemon/cachedump.c
870
entry_ttl = infra_get_host_rto(worker->env.infra_cache,
usr.sbin/unbound/daemon/cachedump.c
872
&ri, &delay, *worker->env.now, &tA, &tAAAA, &tother);
usr.sbin/unbound/daemon/cachedump.c
888
if(!infra_get_lame_rtt(worker->env.infra_cache,
usr.sbin/unbound/daemon/cachedump.c
891
*worker->env.now)) {
usr.sbin/unbound/daemon/cachedump.c
907
if(infra_host(worker->env.infra_cache, &a->addr, a->addrlen,
usr.sbin/unbound/daemon/cachedump.c
908
dp->name, dp->namelen, *worker->env.now, &edns_vs,
usr.sbin/unbound/daemon/cachedump.c
984
dp = forwards_lookup(worker->env.fwds, nm, qinfo.qclass, nolock);
usr.sbin/unbound/daemon/cachedump.c
987
lock_rw_unlock(&worker->env.fwds->lock);
usr.sbin/unbound/daemon/cachedump.c
992
lock_rw_unlock(&worker->env.fwds->lock);
usr.sbin/unbound/daemon/cachedump.c
997
dp = dns_cache_find_delegation(&worker->env, nm, nmlen,
usr.sbin/unbound/daemon/cachedump.c
999
*worker->env.now, 0, NULL, 0);
usr.sbin/unbound/daemon/daemon.c
1044
!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1046
!slabhash_is_size(&daemon->env->rrset_cache->table,
usr.sbin/unbound/daemon/daemon.c
1050
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
1051
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1055
if(!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1057
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1058
daemon->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
usr.sbin/unbound/daemon/daemon.c
1062
if(!daemon->env->msg_cache) {
usr.sbin/unbound/daemon/daemon.c
1066
if((daemon->env->rrset_cache = rrset_cache_adjust(
usr.sbin/unbound/daemon/daemon.c
1067
daemon->env->rrset_cache, cfg, &daemon->superalloc)) == 0)
usr.sbin/unbound/daemon/daemon.c
1069
if((daemon->env->infra_cache = infra_adjust(daemon->env->infra_cache,
usr.sbin/unbound/daemon/daemon.c
263
if(!(daemon->env = (struct module_env*)calloc(1,
usr.sbin/unbound/daemon/daemon.c
264
sizeof(*daemon->env)))) {
usr.sbin/unbound/daemon/daemon.c
268
daemon->env->modstack = &daemon->mods;
usr.sbin/unbound/daemon/daemon.c
270
if(!edns_known_options_init(daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
271
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
278
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
279
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
286
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
287
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
295
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
296
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
304
if((daemon->env->auth_zones = auth_zones_create()) == 0) {
usr.sbin/unbound/daemon/daemon.c
308
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
309
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
313
if(!(daemon->env->edns_strings = edns_strings_create())) {
usr.sbin/unbound/daemon/daemon.c
314
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
318
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
319
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
449
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
450
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
451
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
453
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
465
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
466
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
467
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
469
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
471
daemon->env->need_to_validate = 0; /* set by module init below */
usr.sbin/unbound/daemon/daemon.c
473
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
477
log_edns_known_options(VERB_ALGO, daemon->env);
usr.sbin/unbound/daemon/daemon.c
719
if(!(daemon->env->views = views_create()))
usr.sbin/unbound/daemon/daemon.c
722
if(!views_apply_cfg(daemon->env->views, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
725
if(!acl_list_apply_cfg(daemon->acl, daemon->cfg, daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
728
daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
756
if(!(daemon->env->fwds = forwards_create()) ||
usr.sbin/unbound/daemon/daemon.c
757
!forwards_apply_cfg(daemon->env->fwds, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
759
if(!(daemon->env->hints = hints_create()) ||
usr.sbin/unbound/daemon/daemon.c
760
!hints_apply_cfg(daemon->env->hints, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
764
if(!(daemon->env->respip_set = respip_set_create()))
usr.sbin/unbound/daemon/daemon.c
766
if(!respip_global_apply_cfg(daemon->env->respip_set, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
768
if(!respip_views_apply_cfg(daemon->env->views, daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
772
daemon->env->respip_set) || have_view_respip_cfg;
usr.sbin/unbound/daemon/daemon.c
778
if(!auth_zones_apply_cfg(daemon->env->auth_zones, daemon->cfg, 1,
usr.sbin/unbound/daemon/daemon.c
779
&daemon->use_rpz, daemon->env, &daemon->mods))
usr.sbin/unbound/daemon/daemon.c
783
if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
787
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/daemon.c
788
daemon->env);
usr.sbin/unbound/daemon/daemon.c
878
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
879
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
882
forwards_delete(daemon->env->fwds);
usr.sbin/unbound/daemon/daemon.c
883
daemon->env->fwds = NULL;
usr.sbin/unbound/daemon/daemon.c
884
hints_delete(daemon->env->hints);
usr.sbin/unbound/daemon/daemon.c
885
daemon->env->hints = NULL;
usr.sbin/unbound/daemon/daemon.c
888
respip_set_delete(daemon->env->respip_set);
usr.sbin/unbound/daemon/daemon.c
889
daemon->env->respip_set = NULL;
usr.sbin/unbound/daemon/daemon.c
890
views_delete(daemon->env->views);
usr.sbin/unbound/daemon/daemon.c
891
daemon->env->views = NULL;
usr.sbin/unbound/daemon/daemon.c
892
if(daemon->env->auth_zones)
usr.sbin/unbound/daemon/daemon.c
893
auth_zones_cleanup(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
932
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
933
modstack_call_destartup(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
940
if(daemon->env) {
usr.sbin/unbound/daemon/daemon.c
941
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
942
rrset_cache_delete(daemon->env->rrset_cache);
usr.sbin/unbound/daemon/daemon.c
943
infra_delete(daemon->env->infra_cache);
usr.sbin/unbound/daemon/daemon.c
944
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
945
edns_strings_delete(daemon->env->edns_strings);
usr.sbin/unbound/daemon/daemon.c
946
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
958
free(daemon->env);
usr.sbin/unbound/daemon/daemon.h
125
struct module_env* env;
usr.sbin/unbound/daemon/remote.c
1572
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1604
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1626
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1651
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1692
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1715
v = views_find_view(worker->env.views, arg, 1 /* get write lock*/);
usr.sbin/unbound/daemon/remote.c
1800
*inf->worker->env.now)) {
usr.sbin/unbound/daemon/remote.c
1806
s, cl, tp, (long long)(ttl-*inf->worker->env.now))) {
usr.sbin/unbound/daemon/remote.c
1814
(long long)(d->ttl-*inf->worker->env.now),
usr.sbin/unbound/daemon/remote.c
1827
*inf->worker->env.now, s, sizeof(s))) {
usr.sbin/unbound/daemon/remote.c
1904
addrtree_traverse(d->tree4, 0, *inf->worker->env.now, &k->key,
usr.sbin/unbound/daemon/remote.c
1908
addrtree_traverse(d->tree6, 1, *inf->worker->env.now, &k->key,
usr.sbin/unbound/daemon/remote.c
1920
if(*inf->worker->env.now < d->ttl &&
usr.sbin/unbound/daemon/remote.c
1926
if(!packed_rr_to_string(k, i, *inf->worker->env.now,
usr.sbin/unbound/daemon/remote.c
1943
if(*inf->worker->env.now < d->ttl &&
usr.sbin/unbound/daemon/remote.c
1963
*inf->worker->env.now)) {
usr.sbin/unbound/daemon/remote.c
1971
(long long)(d->ttl-*inf->worker->env.now),
usr.sbin/unbound/daemon/remote.c
1984
*inf->worker->env.now, s, sizeof(s))) {
usr.sbin/unbound/daemon/remote.c
2013
m = modstack_find(worker->env.modstack, "subnetcache");
usr.sbin/unbound/daemon/remote.c
2014
if(m != -1) sn_env = (struct subnet_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/remote.c
2023
slabhash_traverse(&worker->env.rrset_cache->table, 0,
usr.sbin/unbound/daemon/remote.c
2025
slabhash_traverse(worker->env.msg_cache, 0, &cache_lookup_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2097
rrset_cache_remove(worker->env.rrset_cache, nm, nmlen, t, c, 0);
usr.sbin/unbound/daemon/remote.c
2099
rrset_cache_remove(worker->env.rrset_cache, nm, nmlen, t, c,
usr.sbin/unbound/daemon/remote.c
2107
slabhash_remove(worker->env.msg_cache, h, &k);
usr.sbin/unbound/daemon/remote.c
2111
slabhash_remove(worker->env.msg_cache, h, &k);
usr.sbin/unbound/daemon/remote.c
2114
if(remcachedb && worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2115
cachedb_msg_remove_qinfo(&worker->env, &k);
usr.sbin/unbound/daemon/remote.c
2231
slabhash_clear(worker->env.infra_cache->hosts);
usr.sbin/unbound/daemon/remote.c
2245
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2253
slabhash_traverse(worker->env.infra_cache->hosts, 1, &infra_del_host,
usr.sbin/unbound/daemon/remote.c
2262
mesh_delete_all(worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
2299
if(inf->remcachedb && inf->worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2300
cachedb_msg_remove_qinfo(&inf->worker->env, &k->key);
usr.sbin/unbound/daemon/remote.c
2340
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2346
slabhash_traverse(&worker->env.rrset_cache->table, 1,
usr.sbin/unbound/daemon/remote.c
2349
slabhash_traverse(worker->env.msg_cache, 1, &zone_del_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2352
if(worker->env.key_cache) {
usr.sbin/unbound/daemon/remote.c
2353
slabhash_traverse(worker->env.key_cache->slab, 1,
usr.sbin/unbound/daemon/remote.c
2390
if(inf->remcachedb && inf->worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2391
cachedb_msg_remove_qinfo(&inf->worker->env,
usr.sbin/unbound/daemon/remote.c
2420
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2426
slabhash_traverse(&worker->env.rrset_cache->table, 1,
usr.sbin/unbound/daemon/remote.c
2429
slabhash_traverse(worker->env.msg_cache, 1, &bogus_del_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2432
if(worker->env.key_cache) {
usr.sbin/unbound/daemon/remote.c
2433
slabhash_traverse(worker->env.key_cache->slab, 1,
usr.sbin/unbound/daemon/remote.c
2476
if(inf->remcachedb && inf->worker->env.cachedb_enabled)
usr.sbin/unbound/daemon/remote.c
2477
cachedb_msg_remove_qinfo(&inf->worker->env,
usr.sbin/unbound/daemon/remote.c
2508
inf.expired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
2514
slabhash_traverse(&worker->env.rrset_cache->table, 1,
usr.sbin/unbound/daemon/remote.c
2517
slabhash_traverse(worker->env.msg_cache, 1, &negative_del_msg, &inf);
usr.sbin/unbound/daemon/remote.c
2520
if(worker->env.key_cache) {
usr.sbin/unbound/daemon/remote.c
2521
slabhash_traverse(worker->env.key_cache->slab, 1,
usr.sbin/unbound/daemon/remote.c
2680
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2694
mesh_delete_all(worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
2759
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2770
if(insecure && worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2771
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2795
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2803
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2804
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2816
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2827
lock_rw_wrlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2828
if(insecure && worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2829
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2832
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2840
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2841
anchors_delete_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2844
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2850
if(!hints_add_stub(worker->env.hints, LDNS_RR_CLASS_IN, dp, !prime,
usr.sbin/unbound/daemon/remote.c
2854
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2855
anchors_delete_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2858
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2863
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2872
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2880
lock_rw_wrlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2881
if(insecure && worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2882
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
usr.sbin/unbound/daemon/remote.c
2885
hints_delete_stub(worker->env.hints, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2887
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
2901
if(worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2902
if(!anchors_add_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2922
if(worker->env.anchors)
usr.sbin/unbound/daemon/remote.c
2923
anchors_delete_insecure(worker->env.anchors,
usr.sbin/unbound/daemon/remote.c
2934
if(worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
2935
RBTREE_FOR(a, struct trust_anchor*, worker->env.anchors->tree) {
usr.sbin/unbound/daemon/remote.c
2982
struct module_env* env)
usr.sbin/unbound/daemon/remote.c
2990
timeval_subtract(&d, env->now_tv, &r->start_time);
usr.sbin/unbound/daemon/remote.c
3067
mesh = worker->env.mesh;
usr.sbin/unbound/daemon/remote.c
3073
get_mesh_age(m, timebuf, sizeof(timebuf), &worker->env);
usr.sbin/unbound/daemon/remote.c
3151
arg.infra = worker->env.infra_cache;
usr.sbin/unbound/daemon/remote.c
3153
arg.now = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3162
struct config_file* cfg = worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
3174
struct auth_zones* az = worker->env.auth_zones;
usr.sbin/unbound/daemon/remote.c
3200
if(!auth_zone_read_zonefile(z, worker->env.cfg)) {
usr.sbin/unbound/daemon/remote.c
3225
xfr->lease_time = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3226
xfr->soa_zone_acquired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3230
z->soa_zone_acquired = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3232
auth_zone_verify_zonemd(z, &worker->env, &worker->env.mesh->mods,
usr.sbin/unbound/daemon/remote.c
3256
struct auth_zones* az = worker->env.auth_zones;
usr.sbin/unbound/daemon/remote.c
3259
if(!az || !auth_zones_startprobesequence(az, &worker->env, nm, nmlen,
usr.sbin/unbound/daemon/remote.c
3276
if(!config_set_option(worker->env.cfg, arg, arg2)) {
usr.sbin/unbound/daemon/remote.c
3282
int m = modstack_find(&worker->env.mesh->mods, "validator");
usr.sbin/unbound/daemon/remote.c
3284
if(m != -1) val_env = (struct val_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/remote.c
3286
val_env->date_override = worker->env.cfg->val_date_override;
usr.sbin/unbound/daemon/remote.c
3303
r = config_get_option(worker->env.cfg, arg, remote_get_opt_ssl, ssl);
usr.sbin/unbound/daemon/remote.c
3315
struct iter_forwards* fwds = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
3325
if(worker->env.anchors &&
usr.sbin/unbound/daemon/remote.c
3326
(a=anchor_find(worker->env.anchors, z->name,
usr.sbin/unbound/daemon/remote.c
3350
lock_rw_rdlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
3351
RBTREE_FOR(z, struct iter_hints_stub*, &worker->env.hints->tree) {
usr.sbin/unbound/daemon/remote.c
3355
if(worker->env.anchors &&
usr.sbin/unbound/daemon/remote.c
3356
(a=anchor_find(worker->env.anchors, z->node.name,
usr.sbin/unbound/daemon/remote.c
3367
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
3371
lock_rw_unlock(&worker->env.hints->lock);
usr.sbin/unbound/daemon/remote.c
3456
char* s = (char*)sldns_buffer_begin(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/remote.c
3457
size_t slen = sldns_buffer_capacity(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/remote.c
3492
struct view* v = views_find_view(worker->env.views,
usr.sbin/unbound/daemon/remote.c
3508
struct view* v = views_find_view(worker->env.views,
usr.sbin/unbound/daemon/remote.c
3578
a.infra = worker->env.infra_cache;
usr.sbin/unbound/daemon/remote.c
3579
a.now = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3581
a.backoff = worker->env.cfg->ratelimit_backoff;
usr.sbin/unbound/daemon/remote.c
3597
a.infra = worker->env.infra_cache;
usr.sbin/unbound/daemon/remote.c
3598
a.now = *worker->env.now;
usr.sbin/unbound/daemon/remote.c
3600
a.backoff = worker->env.cfg->ip_ratelimit_backoff;
usr.sbin/unbound/daemon/remote.c
3616
struct auth_zones *az = worker->env.auth_zones;
usr.sbin/unbound/daemon/remote.c
3665
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
3707
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
3742
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
3778
char const* secret_file = worker->env.cfg->cookie_secret_file;
usr.sbin/unbound/daemon/remote.c
4000
do_list_auth_zones(ssl, worker->env.auth_zones);
usr.sbin/unbound/daemon/remote.c
4890
struct config_file* cfg = fr->worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
4962
struct config_file* cfg = fr->worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
5431
struct module_env* env = &fr->worker->env;
usr.sbin/unbound/daemon/remote.c
5440
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5441
RBTREE_FOR(old_z, struct auth_zone*, &env->auth_zones->ztree) {
usr.sbin/unbound/daemon/remote.c
5448
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5454
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5458
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5459
old_z = auth_zone_find(env->auth_zones, new_z->name,
usr.sbin/unbound/daemon/remote.c
5463
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5477
old_xfr = auth_xfer_find(env->auth_zones, old_z->name,
usr.sbin/unbound/daemon/remote.c
5485
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
5591
fr->worker->daemon->env, &fr->worker->daemon->mods)) {
usr.sbin/unbound/daemon/remote.c
5665
if(fr->worker->env.anchors) {
usr.sbin/unbound/daemon/remote.c
6185
fr_adjust_cache(struct module_env* env, struct config_file* oldcfg)
usr.sbin/unbound/daemon/remote.c
6187
if(env->cfg->msg_cache_size != oldcfg->msg_cache_size)
usr.sbin/unbound/daemon/remote.c
6188
slabhash_adjust_size(env->msg_cache, env->cfg->msg_cache_size);
usr.sbin/unbound/daemon/remote.c
6189
if(env->cfg->rrset_cache_size != oldcfg->rrset_cache_size)
usr.sbin/unbound/daemon/remote.c
6190
slabhash_adjust_size(&env->rrset_cache->table,
usr.sbin/unbound/daemon/remote.c
6191
env->cfg->rrset_cache_size);
usr.sbin/unbound/daemon/remote.c
6192
if(env->key_cache &&
usr.sbin/unbound/daemon/remote.c
6193
env->cfg->key_cache_size != oldcfg->key_cache_size)
usr.sbin/unbound/daemon/remote.c
6194
slabhash_adjust_size(env->key_cache->slab,
usr.sbin/unbound/daemon/remote.c
6195
env->cfg->key_cache_size);
usr.sbin/unbound/daemon/remote.c
6196
if(env->cfg->infra_cache_numhosts != oldcfg->infra_cache_numhosts) {
usr.sbin/unbound/daemon/remote.c
6197
size_t inframem = env->cfg->infra_cache_numhosts *
usr.sbin/unbound/daemon/remote.c
6200
slabhash_adjust_size(env->infra_cache->hosts, inframem);
usr.sbin/unbound/daemon/remote.c
6202
if(env->cfg->ratelimit_size != oldcfg->ratelimit_size) {
usr.sbin/unbound/daemon/remote.c
6203
slabhash_adjust_size(env->infra_cache->domain_rates,
usr.sbin/unbound/daemon/remote.c
6204
env->cfg->ratelimit_size);
usr.sbin/unbound/daemon/remote.c
6205
slabhash_adjust_size(env->infra_cache->client_ip_rates,
usr.sbin/unbound/daemon/remote.c
6206
env->cfg->ratelimit_size);
usr.sbin/unbound/daemon/remote.c
6208
if(env->neg_cache &&
usr.sbin/unbound/daemon/remote.c
6209
env->cfg->neg_cache_size != oldcfg->neg_cache_size) {
usr.sbin/unbound/daemon/remote.c
6210
val_neg_adjust_size(env->neg_cache, env->cfg->neg_cache_size);
usr.sbin/unbound/daemon/remote.c
6216
fr_adjust_iter_env(struct module_env* env, struct fast_reload_construct* ct)
usr.sbin/unbound/daemon/remote.c
6228
m = modstack_find(env->modstack, "iterator");
usr.sbin/unbound/daemon/remote.c
6229
if(m != -1) iter_env = (struct iter_env*)env->modinfo[m];
usr.sbin/unbound/daemon/remote.c
6245
iter_env->outbound_msg_retry = env->cfg->outbound_msg_retry;
usr.sbin/unbound/daemon/remote.c
6246
iter_env->max_sent_count = env->cfg->max_sent_count;
usr.sbin/unbound/daemon/remote.c
6247
iter_env->max_query_restarts = env->cfg->max_query_restarts;
usr.sbin/unbound/daemon/remote.c
6260
fr_adjust_val_env(struct module_env* env, struct fast_reload_construct* ct,
usr.sbin/unbound/daemon/remote.c
6265
if(env->cfg->bogus_ttl == oldcfg->bogus_ttl &&
usr.sbin/unbound/daemon/remote.c
6266
env->cfg->val_date_override == oldcfg->val_date_override &&
usr.sbin/unbound/daemon/remote.c
6267
env->cfg->val_sig_skew_min == oldcfg->val_sig_skew_min &&
usr.sbin/unbound/daemon/remote.c
6268
env->cfg->val_sig_skew_max == oldcfg->val_sig_skew_max &&
usr.sbin/unbound/daemon/remote.c
6269
env->cfg->val_max_restart == oldcfg->val_max_restart &&
usr.sbin/unbound/daemon/remote.c
6270
strcmp(env->cfg->val_nsec3_key_iterations,
usr.sbin/unbound/daemon/remote.c
6277
m = modstack_find(env->modstack, "validator");
usr.sbin/unbound/daemon/remote.c
6278
if(m != -1) val_env = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/daemon/remote.c
6285
val_env_apply_cfg(val_env, env->cfg, ct->nsec3_keysize,
usr.sbin/unbound/daemon/remote.c
6289
if(env->neg_cache) {
usr.sbin/unbound/daemon/remote.c
6290
lock_basic_lock(&env->neg_cache->lock);
usr.sbin/unbound/daemon/remote.c
6291
env->neg_cache->nsec3_max_iter = val_env->
usr.sbin/unbound/daemon/remote.c
6293
lock_basic_unlock(&env->neg_cache->lock);
usr.sbin/unbound/daemon/remote.c
6300
fr_adjust_infra(struct module_env* env, struct fast_reload_construct* ct)
usr.sbin/unbound/daemon/remote.c
6302
struct infra_cache* infra = env->infra_cache;
usr.sbin/unbound/daemon/remote.c
6303
struct config_file* cfg = env->cfg;
usr.sbin/unbound/daemon/remote.c
6332
struct module_env* env = daemon->env;
usr.sbin/unbound/daemon/remote.c
6341
lock_rw_wrlock(&env->views->lock);
usr.sbin/unbound/daemon/remote.c
6343
lock_rw_wrlock(&env->respip_set->lock);
usr.sbin/unbound/daemon/remote.c
6347
lock_rw_wrlock(&env->auth_zones->rpz_lock);
usr.sbin/unbound/daemon/remote.c
6349
lock_rw_wrlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
6351
lock_rw_wrlock(&env->fwds->lock);
usr.sbin/unbound/daemon/remote.c
6353
lock_rw_wrlock(&env->hints->lock);
usr.sbin/unbound/daemon/remote.c
6356
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/daemon/remote.c
6361
fr_atomic_copy_cfg(ct->oldcfg, env->cfg, newcfg);
usr.sbin/unbound/daemon/remote.c
6365
*ct->oldcfg = *env->cfg;
usr.sbin/unbound/daemon/remote.c
6367
*env->cfg = *newcfg;
usr.sbin/unbound/daemon/remote.c
6372
if(env->cfg->log_identity || ct->oldcfg->log_identity) {
usr.sbin/unbound/daemon/remote.c
6374
log_ident_set_or_default(env->cfg->log_identity);
usr.sbin/unbound/daemon/remote.c
6388
forwards_swap_tree(env->fwds, ct->fwds);
usr.sbin/unbound/daemon/remote.c
6389
hints_swap_tree(env->hints, ct->hints);
usr.sbin/unbound/daemon/remote.c
6390
views_swap_tree(env->views, ct->views);
usr.sbin/unbound/daemon/remote.c
6395
respip_set_swap_tree(env->respip_set, ct->respip_set);
usr.sbin/unbound/daemon/remote.c
6398
auth_zones_swap(env->auth_zones, ct->auth_zones);
usr.sbin/unbound/daemon/remote.c
6399
edns_strings_swap_tree(env->edns_strings, ct->edns_strings);
usr.sbin/unbound/daemon/remote.c
6400
anchors_swap_tree(env->anchors, ct->anchors);
usr.sbin/unbound/daemon/remote.c
6402
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/remote.c
6403
daemon->env);
usr.sbin/unbound/daemon/remote.c
6406
if(env->cfg->dnstap) {
usr.sbin/unbound/daemon/remote.c
6408
dt_apply_cfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6409
else dt_apply_logcfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6412
fr_adjust_cache(env, ct->oldcfg);
usr.sbin/unbound/daemon/remote.c
6414
fr_adjust_iter_env(env, ct);
usr.sbin/unbound/daemon/remote.c
6415
fr_adjust_val_env(env, ct, ct->oldcfg);
usr.sbin/unbound/daemon/remote.c
6416
fr_adjust_infra(env, ct);
usr.sbin/unbound/daemon/remote.c
6420
config_apply(env->cfg);
usr.sbin/unbound/daemon/remote.c
6423
lock_rw_unlock(&env->views->lock);
usr.sbin/unbound/daemon/remote.c
6425
lock_rw_unlock(&env->respip_set->lock);
usr.sbin/unbound/daemon/remote.c
6429
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
6431
lock_rw_unlock(&env->auth_zones->rpz_lock);
usr.sbin/unbound/daemon/remote.c
6433
lock_rw_unlock(&env->fwds->lock);
usr.sbin/unbound/daemon/remote.c
6435
lock_rw_unlock(&env->hints->lock);
usr.sbin/unbound/daemon/remote.c
6438
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/daemon/remote.c
7291
struct mesh_area* mesh = worker->env.mesh;
usr.sbin/unbound/daemon/remote.c
7292
struct config_file* cfg = worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
7369
lock_rw_wrlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7380
*xfr = auth_xfer_find(worker->env.auth_zones, nm, nmlen,
usr.sbin/unbound/daemon/remote.c
7403
auth_zone_zonemd_stop_lookup(item->old_z, worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
7411
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7434
(void)rbtree_delete(&worker->env.auth_zones->xtree,
usr.sbin/unbound/daemon/remote.c
7436
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7440
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7480
xfr = auth_xfer_create(worker->env.auth_zones, item->new_z);
usr.sbin/unbound/daemon/remote.c
7491
auth_zone_pickup_initial_zone(item->new_z, &worker->env);
usr.sbin/unbound/daemon/remote.c
7493
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7499
auth_xfer_pickup_initial_zone(xfr, &worker->env);
usr.sbin/unbound/daemon/remote.c
7509
auth_zone_verify_zonemd(item->new_z, &worker->env,
usr.sbin/unbound/daemon/remote.c
7510
&worker->env.mesh->mods, NULL, 0, 1);
usr.sbin/unbound/daemon/remote.c
7543
(void)rbtree_delete(&worker->env.auth_zones->xtree,
usr.sbin/unbound/daemon/remote.c
7549
xfr = auth_xfer_create(worker->env.auth_zones, item->new_z);
usr.sbin/unbound/daemon/remote.c
7556
lock_rw_unlock(&worker->env.auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7596
struct config_file* cfg = worker->env.cfg;
usr.sbin/unbound/daemon/remote.c
7639
worker->env.cachedb_enabled = worker->daemon->env->cachedb_enabled;
usr.sbin/unbound/daemon/remote.c
7679
mesh_delete_all(fr->worker->env.mesh);
usr.sbin/unbound/daemon/remote.c
906
msg = slabhash_get_mem(daemon->env->msg_cache);
usr.sbin/unbound/daemon/remote.c
907
rrset = slabhash_get_mem(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/remote.c
908
val = mod_get_mem(&worker->env, "validator");
usr.sbin/unbound/daemon/remote.c
909
iter = mod_get_mem(&worker->env, "iterator");
usr.sbin/unbound/daemon/remote.c
910
respip = mod_get_mem(&worker->env, "respip");
usr.sbin/unbound/daemon/remote.c
912
subnet = mod_get_mem(&worker->env, "subnetcache");
usr.sbin/unbound/daemon/remote.c
915
ipsecmod = mod_get_mem(&worker->env, "ipsecmod");
usr.sbin/unbound/daemon/remote.c
925
dynlib = mod_get_mem(&worker->env, "dynlib");
usr.sbin/unbound/daemon/remote.c
978
struct timeval now = *worker->env.now_tv;
usr.sbin/unbound/daemon/stats.c
100
if((long long)worker->env.mesh->all.count > stats->max_query_list_size)
usr.sbin/unbound/daemon/stats.c
101
stats->max_query_list_size = (long long)worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
108
stats->sum_query_list_size += worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
109
if((long long)worker->env.mesh->all.count > stats->max_query_list_size)
usr.sbin/unbound/daemon/stats.c
110
stats->max_query_list_size = (long long)worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
132
(unsigned)worker->env.mesh->stats_dropped,
usr.sbin/unbound/daemon/stats.c
133
(unsigned)worker->env.mesh->stats_jostled);
usr.sbin/unbound/daemon/stats.c
143
int m = modstack_find(&worker->env.mesh->mods, "subnetcache");
usr.sbin/unbound/daemon/stats.c
147
sne = (struct subnet_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
148
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
155
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
168
int m = modstack_find(&worker->env.mesh->mods, "validator");
usr.sbin/unbound/daemon/stats.c
173
ve = (struct val_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
180
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
191
int m = modstack_find(&worker->env.mesh->mods, "validator");
usr.sbin/unbound/daemon/stats.c
196
ve = (struct val_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
199
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
209
int m = modstack_find(&worker->env.mesh->mods, "iterator");
usr.sbin/unbound/daemon/stats.c
214
ie = (struct iter_env*)worker->env.modinfo[m];
usr.sbin/unbound/daemon/stats.c
217
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
234
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
249
if(reset && !worker->env.cfg->stat_cumulative)
usr.sbin/unbound/daemon/stats.c
263
s->mesh_num_states = (long long)worker->env.mesh->all.count;
usr.sbin/unbound/daemon/stats.c
264
s->mesh_num_reply_states = (long long)worker->env.mesh->num_reply_states;
usr.sbin/unbound/daemon/stats.c
265
s->mesh_jostled = (long long)worker->env.mesh->stats_jostled;
usr.sbin/unbound/daemon/stats.c
266
s->mesh_dropped = (long long)worker->env.mesh->stats_dropped;
usr.sbin/unbound/daemon/stats.c
267
s->mesh_replies_sent = (long long)worker->env.mesh->replies_sent;
usr.sbin/unbound/daemon/stats.c
268
s->mesh_replies_sum_wait_sec = (long long)worker->env.mesh->replies_sum_wait.tv_sec;
usr.sbin/unbound/daemon/stats.c
269
s->mesh_replies_sum_wait_usec = (long long)worker->env.mesh->replies_sum_wait.tv_usec;
usr.sbin/unbound/daemon/stats.c
270
s->mesh_time_median = timehist_quartile(worker->env.mesh->histogram,
usr.sbin/unbound/daemon/stats.c
274
s->svr.ans_secure += (long long)worker->env.mesh->ans_secure;
usr.sbin/unbound/daemon/stats.c
275
s->svr.ans_bogus += (long long)worker->env.mesh->ans_bogus;
usr.sbin/unbound/daemon/stats.c
276
s->svr.val_ops += (long long)worker->env.mesh->val_ops;
usr.sbin/unbound/daemon/stats.c
277
s->svr.ans_rcode_nodata += (long long)worker->env.mesh->ans_nodata;
usr.sbin/unbound/daemon/stats.c
278
s->svr.ans_expired += (long long)worker->env.mesh->ans_expired;
usr.sbin/unbound/daemon/stats.c
280
s->svr.ans_rcode[i] += (long long)worker->env.mesh->ans_rcode[i];
usr.sbin/unbound/daemon/stats.c
282
s->svr.rpz_action[i] += (long long)worker->env.mesh->rpz_action[i];
usr.sbin/unbound/daemon/stats.c
283
timehist_export(worker->env.mesh->histogram, s->svr.hist,
usr.sbin/unbound/daemon/stats.c
286
(long long)worker->env.mesh->num_queries_discard_timeout;
usr.sbin/unbound/daemon/stats.c
288
(long long)worker->env.mesh->num_queries_wait_limit;
usr.sbin/unbound/daemon/stats.c
290
(long long)worker->env.mesh->num_dns_error_reports;
usr.sbin/unbound/daemon/stats.c
303
get_slabhash_stats(worker->env.msg_cache,
usr.sbin/unbound/daemon/stats.c
305
get_slabhash_stats(&worker->env.rrset_cache->table,
usr.sbin/unbound/daemon/stats.c
307
s->svr.infra_cache_count = (long long)count_slabhash_entries(worker->env.infra_cache->hosts);
usr.sbin/unbound/daemon/stats.c
308
if(worker->env.key_cache)
usr.sbin/unbound/daemon/stats.c
309
s->svr.key_cache_count = (long long)count_slabhash_entries(worker->env.key_cache->slab);
usr.sbin/unbound/daemon/stats.c
334
if(worker->env.auth_zones) {
usr.sbin/unbound/daemon/stats.c
335
s->svr.num_query_authzone_up += (long long)worker->env.mesh->num_query_authzone_up;
usr.sbin/unbound/daemon/stats.c
336
s->svr.num_query_authzone_down += (long long)worker->env.mesh->num_query_authzone_down;
usr.sbin/unbound/daemon/stats.c
361
s->svr.num_query_cachedb = (long long)worker->env.mesh->ans_cachedb;
usr.sbin/unbound/daemon/stats.c
373
if(reset && !worker->env.cfg->stat_cumulative) {
usr.sbin/unbound/daemon/stats.c
99
stats->sum_query_list_size += worker->env.mesh->all.count;
usr.sbin/unbound/daemon/worker.c
1040
if(!w->env.need_to_validate) {
usr.sbin/unbound/daemon/worker.c
1047
lock_basic_lock(&w->env.anchors->lock);
usr.sbin/unbound/daemon/worker.c
1048
RBTREE_FOR(ta, struct trust_anchor*, w->env.anchors->tree) {
usr.sbin/unbound/daemon/worker.c
1074
lock_basic_unlock(&w->env.anchors->lock);
usr.sbin/unbound/daemon/worker.c
1093
struct config_file* cfg = w->env.cfg;
usr.sbin/unbound/daemon/worker.c
1160
if(!w->env.auth_zones) return;
usr.sbin/unbound/daemon/worker.c
1162
if(auth_zones_notify(w->env.auth_zones, &w->env, qinfo->qname,
usr.sbin/unbound/daemon/worker.c
134
msg = slabhash_get_mem(worker->env.msg_cache);
usr.sbin/unbound/daemon/worker.c
135
rrset = slabhash_get_mem(&worker->env.rrset_cache->table);
usr.sbin/unbound/daemon/worker.c
136
infra = infra_get_mem(worker->env.infra_cache);
usr.sbin/unbound/daemon/worker.c
137
mesh = mesh_get_mem(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
140
anch = anchors_get_mem(worker->env.anchors);
usr.sbin/unbound/daemon/worker.c
1428
if(!infra_ip_ratelimit_inc(worker->env.infra_cache, addr, addrlen,
usr.sbin/unbound/daemon/worker.c
1429
*worker->env.now, has_cookie,
usr.sbin/unbound/daemon/worker.c
143
for(i=0; i<worker->env.mesh->mods.num; i++) {
usr.sbin/unbound/daemon/worker.c
1430
worker->env.cfg->ip_ratelimit_backoff, pkt)) {
usr.sbin/unbound/daemon/worker.c
1432
if(!has_cookie && worker->env.cfg->ip_ratelimit_factor != 0 &&
usr.sbin/unbound/daemon/worker.c
1433
ub_random_max(worker->env.rnd,
usr.sbin/unbound/daemon/worker.c
1434
worker->env.cfg->ip_ratelimit_factor) == 0) {
usr.sbin/unbound/daemon/worker.c
144
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->
usr.sbin/unbound/daemon/worker.c
146
if(strcmp(worker->env.mesh->mods.mod[i]->name, "validator")==0)
usr.sbin/unbound/daemon/worker.c
147
val += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
148
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
1485
if (worker->env.cfg->sock_queue_timeout && timeval_isset(&c->recv_tv)) {
usr.sbin/unbound/daemon/worker.c
1486
timeval_subtract(&wait_time, worker->env.now_tv, &c->recv_tv);
usr.sbin/unbound/daemon/worker.c
1491
(long long)(worker->env.cfg->sock_queue_timeout * 1000000)) {
usr.sbin/unbound/daemon/worker.c
150
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
usr.sbin/unbound/daemon/worker.c
152
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
153
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
155
else iter += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
1551
((worker->env.cfg->sock_queue_timeout && timeval_isset(&c->recv_tv))?&c->recv_tv:NULL));
usr.sbin/unbound/daemon/worker.c
1557
worker->env.cfg->ede, 1, &check_result)) != -1) {
usr.sbin/unbound/daemon/worker.c
156
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
1564
worker->env.cfg->ede, 0, &check_result)) != -1) {
usr.sbin/unbound/daemon/worker.c
1585
pre_edns_ip_ratelimit = !worker->env.cfg->do_answer_cookie
usr.sbin/unbound/daemon/worker.c
1617
if(worker->env.cfg->log_queries) {
usr.sbin/unbound/daemon/worker.c
162
+ sizeof(*worker->env.scratch_buffer)
usr.sbin/unbound/daemon/worker.c
163
+ sldns_buffer_capacity(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/worker.c
164
if(worker->daemon->env->fwds)
usr.sbin/unbound/daemon/worker.c
165
log_info("forwards=%u", (unsigned)forwards_get_mem(worker->env.fwds));
usr.sbin/unbound/daemon/worker.c
1659
c->buffer, &edns, worker->env.cfg, c, repinfo,
usr.sbin/unbound/daemon/worker.c
166
if(worker->daemon->env->hints)
usr.sbin/unbound/daemon/worker.c
1660
(worker->env.now ? *worker->env.now : time(NULL)),
usr.sbin/unbound/daemon/worker.c
167
log_info("hints=%u", (unsigned)hints_get_mem(worker->env.hints));
usr.sbin/unbound/daemon/worker.c
1796
if(local_zones_answer(worker->daemon->local_zones, &worker->env, &qinfo,
usr.sbin/unbound/daemon/worker.c
1809
if(worker->env.auth_zones &&
usr.sbin/unbound/daemon/worker.c
1810
rpz_callback_from_worker_request(worker->env.auth_zones,
usr.sbin/unbound/daemon/worker.c
1811
&worker->env, &qinfo, &edns, c->buffer, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
1821
if(worker->env.auth_zones &&
usr.sbin/unbound/daemon/worker.c
1822
auth_zones_downstream_answer(worker->env.auth_zones,
usr.sbin/unbound/daemon/worker.c
1823
&worker->env, &qinfo, &edns, repinfo, c->buffer,
usr.sbin/unbound/daemon/worker.c
1841
worker->env.cfg->ede, &check_result)) != -1)
usr.sbin/unbound/daemon/worker.c
1860
if(worker->env.cfg->ede) {
usr.sbin/unbound/daemon/worker.c
1912
if(!edns_bypass_cache_stage(edns.opt_list_in, &worker->env)) {
usr.sbin/unbound/daemon/worker.c
1916
if((e=slabhash_lookup(worker->env.msg_cache, h, lookup_qinfo, 0))) {
usr.sbin/unbound/daemon/worker.c
1929
if((worker->env.cfg->prefetch &&
usr.sbin/unbound/daemon/worker.c
1930
rep->prefetch_ttl <= *worker->env.now) ||
usr.sbin/unbound/daemon/worker.c
1931
(worker->env.cfg->serve_expired &&
usr.sbin/unbound/daemon/worker.c
1932
rep->ttl < *worker->env.now &&
usr.sbin/unbound/daemon/worker.c
1933
!(*worker->env.now < rep->serve_expired_norec_ttl))) {
usr.sbin/unbound/daemon/worker.c
1934
time_t leeway = rep->ttl - *worker->env.now;
usr.sbin/unbound/daemon/worker.c
1935
if(rep->ttl < *worker->env.now)
usr.sbin/unbound/daemon/worker.c
2006
mesh_new_client(worker->env.mesh, &qinfo, cinfo,
usr.sbin/unbound/daemon/worker.c
2038
if(worker->env.cfg->log_replies)
usr.sbin/unbound/daemon/worker.c
204
for(i=0; i<worker->env.mesh->mods.num; i++) {
usr.sbin/unbound/daemon/worker.c
205
fptr_ok(fptr_whitelist_mod_get_mem(worker->env.mesh->
usr.sbin/unbound/daemon/worker.c
2050
(worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
usr.sbin/unbound/daemon/worker.c
2056
(worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
usr.sbin/unbound/daemon/worker.c
207
if(strcmp(worker->env.mesh->mods.mod[i]->name, "validator")==0)
usr.sbin/unbound/daemon/worker.c
208
val += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
209
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
2107
if(worker->env.cfg->stat_interval > 0) {
usr.sbin/unbound/daemon/worker.c
211
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
usr.sbin/unbound/daemon/worker.c
2110
tv.tv_sec = worker->env.cfg->stat_interval;
usr.sbin/unbound/daemon/worker.c
2121
mesh_stats(worker->env.mesh, "mesh has");
usr.sbin/unbound/daemon/worker.c
213
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
usr.sbin/unbound/daemon/worker.c
2139
tv.tv_sec = (time_t)autr_probe_timer(&worker->env);
usr.sbin/unbound/daemon/worker.c
214
(&worker->env, i);
usr.sbin/unbound/daemon/worker.c
2143
comm_timer_set(worker->env.probe_timer, &tv);
usr.sbin/unbound/daemon/worker.c
220
(unsigned)slabhash_get_mem(worker->env.msg_cache),
usr.sbin/unbound/daemon/worker.c
221
(unsigned)slabhash_get_mem(&worker->env.rrset_cache->table),
usr.sbin/unbound/daemon/worker.c
222
(unsigned)infra_get_mem(worker->env.infra_cache),
usr.sbin/unbound/daemon/worker.c
226
(unsigned)slabhash_get_mem(worker->env.msg_cache),
usr.sbin/unbound/daemon/worker.c
2261
dtenv, worker->daemon->doq_table, worker->env.rnd,
usr.sbin/unbound/daemon/worker.c
227
(unsigned)slabhash_get_mem(&worker->env.rrset_cache->table),
usr.sbin/unbound/daemon/worker.c
2272
worker->daemon->env->infra_cache, worker->rndstate,
usr.sbin/unbound/daemon/worker.c
228
(unsigned)infra_get_mem(worker->env.infra_cache),
usr.sbin/unbound/daemon/worker.c
2286
iterator_set_ip46_support(&worker->daemon->mods, worker->daemon->env,
usr.sbin/unbound/daemon/worker.c
2313
worker->env = *worker->daemon->env;
usr.sbin/unbound/daemon/worker.c
2314
comm_base_timept(worker->base, &worker->env.now, &worker->env.now_tv);
usr.sbin/unbound/daemon/worker.c
2315
worker->env.worker = worker;
usr.sbin/unbound/daemon/worker.c
2316
worker->env.worker_base = worker->base;
usr.sbin/unbound/daemon/worker.c
2317
worker->env.send_query = &worker_send_query;
usr.sbin/unbound/daemon/worker.c
2318
worker->env.alloc = worker->alloc;
usr.sbin/unbound/daemon/worker.c
2319
worker->env.outnet = worker->back;
usr.sbin/unbound/daemon/worker.c
2320
worker->env.rnd = worker->rndstate;
usr.sbin/unbound/daemon/worker.c
2326
worker->env.scratch = regional_create_custom(cfg->msg_buffer_size);
usr.sbin/unbound/daemon/worker.c
2327
if(!worker->env.scratch) {
usr.sbin/unbound/daemon/worker.c
2332
worker->env.mesh = mesh_create(&worker->daemon->mods, &worker->env);
usr.sbin/unbound/daemon/worker.c
2333
if(!worker->env.mesh) {
usr.sbin/unbound/daemon/worker.c
2339
worker->env.mesh->use_response_ip = worker->daemon->use_response_ip;
usr.sbin/unbound/daemon/worker.c
2340
worker->env.mesh->use_rpz = worker->daemon->use_rpz;
usr.sbin/unbound/daemon/worker.c
2342
worker->env.detach_subs = &mesh_detach_subs;
usr.sbin/unbound/daemon/worker.c
2343
worker->env.attach_sub = &mesh_attach_sub;
usr.sbin/unbound/daemon/worker.c
2344
worker->env.add_sub = &mesh_add_sub;
usr.sbin/unbound/daemon/worker.c
2345
worker->env.kill_sub = &mesh_state_delete;
usr.sbin/unbound/daemon/worker.c
2346
worker->env.detect_cycle = &mesh_detect_cycle;
usr.sbin/unbound/daemon/worker.c
2347
worker->env.scratch_buffer = sldns_buffer_new(cfg->msg_buffer_size);
usr.sbin/unbound/daemon/worker.c
2348
if(!worker->env.scratch_buffer) {
usr.sbin/unbound/daemon/worker.c
2354
if(autr_get_num_anchors(worker->env.anchors) > 0
usr.sbin/unbound/daemon/worker.c
2362
worker->env.probe_timer = comm_timer_create(worker->base,
usr.sbin/unbound/daemon/worker.c
2364
if(!worker->env.probe_timer) {
usr.sbin/unbound/daemon/worker.c
2368
comm_timer_set(worker->env.probe_timer, &tv);
usr.sbin/unbound/daemon/worker.c
2372
if(worker->env.auth_zones
usr.sbin/unbound/daemon/worker.c
2377
auth_xfer_pickup_initial(worker->env.auth_zones, &worker->env);
usr.sbin/unbound/daemon/worker.c
2378
auth_zones_pickup_zonemd_verify(worker->env.auth_zones,
usr.sbin/unbound/daemon/worker.c
2379
&worker->env);
usr.sbin/unbound/daemon/worker.c
2397
if(worker->env.cfg->stat_interval > 0) {
usr.sbin/unbound/daemon/worker.c
2399
worker->env.cfg->stat_interval);
usr.sbin/unbound/daemon/worker.c
2417
if(worker->env.mesh && verbosity >= VERB_OPS) {
usr.sbin/unbound/daemon/worker.c
2419
mesh_stats(worker->env.mesh, "mesh has");
usr.sbin/unbound/daemon/worker.c
2423
mesh_delete(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
2424
sldns_buffer_free(worker->env.scratch_buffer);
usr.sbin/unbound/daemon/worker.c
2430
comm_timer_delete(worker->env.probe_timer);
usr.sbin/unbound/daemon/worker.c
2450
regional_destroy(worker->env.scratch);
usr.sbin/unbound/daemon/worker.c
2462
struct worker* worker = q->env->worker;
usr.sbin/unbound/daemon/worker.c
2471
worker_handle_service_reply, e, worker->back->udp_buff, q->env,
usr.sbin/unbound/daemon/worker.c
248
struct worker* worker = e->qstate->env->worker;
usr.sbin/unbound/daemon/worker.c
2483
slabhash_clear(&worker->env.rrset_cache->table);
usr.sbin/unbound/daemon/worker.c
2484
slabhash_clear(worker->env.msg_cache);
usr.sbin/unbound/daemon/worker.c
2489
server_stats_init(&worker->stats, worker->env.cfg);
usr.sbin/unbound/daemon/worker.c
2490
mesh_stats_clear(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
253
mesh_report_reply(worker->env.mesh, e, reply_info, error);
usr.sbin/unbound/daemon/worker.c
265
mesh_report_reply(worker->env.mesh, e, reply_info,
usr.sbin/unbound/daemon/worker.c
270
mesh_report_reply(worker->env.mesh, e, reply_info, NETEVENT_NOERROR);
usr.sbin/unbound/daemon/worker.c
283
if(worker->err_limit_time == *worker->env.now) {
usr.sbin/unbound/daemon/worker.c
289
worker->err_limit_time = *worker->env.now;
usr.sbin/unbound/daemon/worker.c
445
mesh_delete_all(worker->env.mesh);
usr.sbin/unbound/daemon/worker.c
567
time_t timenow = *worker->env.now;
usr.sbin/unbound/daemon/worker.c
569
int must_validate = (!has_cd_bit || worker->env.cfg->ignore_cd)
usr.sbin/unbound/daemon/worker.c
570
&& worker->env.need_to_validate;
usr.sbin/unbound/daemon/worker.c
574
dp = dns_cache_find_delegation(&worker->env, qinfo->qname,
usr.sbin/unbound/daemon/worker.c
597
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL,
usr.sbin/unbound/daemon/worker.c
599
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
602
if(worker->env.cfg->ede &&
usr.sbin/unbound/daemon/worker.c
618
if(worker->env.cfg->val_clean_additional)
usr.sbin/unbound/daemon/worker.c
635
if(worker->env.cfg->disable_edns_do && (edns->bits & EDNS_DO))
usr.sbin/unbound/daemon/worker.c
637
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, msg->rep,
usr.sbin/unbound/daemon/worker.c
639
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
644
if(worker->env.cfg->ede && has_cd_bit &&
usr.sbin/unbound/daemon/worker.c
655
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
usr.sbin/unbound/daemon/worker.c
657
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
691
worker->env.views, worker->env.respip_set))
usr.sbin/unbound/daemon/worker.c
739
time_t timenow = *worker->env.now;
usr.sbin/unbound/daemon/worker.c
744
int must_validate = (!has_cd_bit || worker->env.cfg->ignore_cd)
usr.sbin/unbound/daemon/worker.c
745
&& worker->env.need_to_validate;
usr.sbin/unbound/daemon/worker.c
751
if(worker->env.cfg->serve_expired &&
usr.sbin/unbound/daemon/worker.c
756
(!worker->env.cfg->serve_expired_client_timeout ||
usr.sbin/unbound/daemon/worker.c
759
&& !(worker->env.cachedb_enabled &&
usr.sbin/unbound/daemon/worker.c
760
worker->env.cfg->cachedb_check_when_serve_expired)
usr.sbin/unbound/daemon/worker.c
799
if(worker->env.cfg->disable_edns_do && (edns->bits & EDNS_DO))
usr.sbin/unbound/daemon/worker.c
801
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep,
usr.sbin/unbound/daemon/worker.c
803
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
806
if(worker->env.cfg->ede && rep->reason_bogus != LDNS_EDE_NONE) {
usr.sbin/unbound/daemon/worker.c
813
rrset_array_unlock_touch(worker->env.rrset_cache,
usr.sbin/unbound/daemon/worker.c
841
if(worker->env.cfg->disable_edns_do && (edns->bits & EDNS_DO))
usr.sbin/unbound/daemon/worker.c
847
&encode_rep, worker->env.auth_zones)) {
usr.sbin/unbound/daemon/worker.c
852
worker->env.auth_zones, worker->env.views,
usr.sbin/unbound/daemon/worker.c
853
worker->env.respip_set)) {
usr.sbin/unbound/daemon/worker.c
874
worker->env.cfg->ede_serve_expired && worker->env.cfg->ede) {
usr.sbin/unbound/daemon/worker.c
881
worker->env.cfg->ede && has_cd_bit &&
usr.sbin/unbound/daemon/worker.c
887
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, encode_rep,
usr.sbin/unbound/daemon/worker.c
889
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
895
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo,
usr.sbin/unbound/daemon/worker.c
897
worker->scratchpad, worker->env.now_tv))
usr.sbin/unbound/daemon/worker.c
905
rrset_array_unlock_touch(worker->env.rrset_cache, worker->scratchpad,
usr.sbin/unbound/daemon/worker.c
911
rrset_array_unlock_touch(worker->env.rrset_cache,
usr.sbin/unbound/daemon/worker.c
938
if(modstack_find(&worker->env.mesh->mods, "subnetcache") != -1
usr.sbin/unbound/daemon/worker.c
939
&& worker->env.unique_mesh) {
usr.sbin/unbound/daemon/worker.c
940
mesh_new_prefetch(worker->env.mesh, qinfo, flags, leeway +
usr.sbin/unbound/daemon/worker.c
950
mesh_new_prefetch(worker->env.mesh, qinfo, flags, leeway +
usr.sbin/unbound/daemon/worker.c
975
if(!inplace_cb_reply_local_call(&worker->env, NULL, NULL, NULL,
usr.sbin/unbound/daemon/worker.c
977
worker->env.now_tv))
usr.sbin/unbound/daemon/worker.h
134
struct module_env env;
usr.sbin/unbound/dns64/dns64.c
1011
!dns_cache_store(super->env, &super->qinfo, super->return_msg->rep,
usr.sbin/unbound/dns64/dns64.c
1038
dns64_get_mem(struct module_env* env, int id)
usr.sbin/unbound/dns64/dns64.c
1040
struct dns64_env* dns64_env = (struct dns64_env*)env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
402
dns64_init(struct module_env* env, int id)
usr.sbin/unbound/dns64/dns64.c
410
env->modinfo[id] = (void*)dns64_env;
usr.sbin/unbound/dns64/dns64.c
412
if (!dns64_apply_cfg(dns64_env, env->cfg)) {
usr.sbin/unbound/dns64/dns64.c
436
dns64_deinit(struct module_env* env, int id)
usr.sbin/unbound/dns64/dns64.c
439
if (!env)
usr.sbin/unbound/dns64/dns64.c
441
dns64_env = (struct dns64_env*)env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
446
free(env->modinfo[id]);
usr.sbin/unbound/dns64/dns64.c
447
env->modinfo[id] = NULL;
usr.sbin/unbound/dns64/dns64.c
462
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
498
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/dns64/dns64.c
499
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0, 0,
usr.sbin/unbound/dns64/dns64.c
524
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/dns64/dns64.c
525
if(!(*qstate->env->attach_sub)(qstate, &qinfo, qstate->query_flags, 0,
usr.sbin/unbound/dns64/dns64.c
551
struct dns64_env* dns64_env = (struct dns64_env*)qstate->env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
576
int synth_all_cfg = qstate->env->cfg->dns64_synthall;
usr.sbin/unbound/dns64/dns64.c
659
qstate->env, &qstate->qinfo, qstate->return_msg->rep,
usr.sbin/unbound/dns64/dns64.c
822
struct dns64_env* dns64_env = (struct dns64_env*)super->env->modinfo[id];
usr.sbin/unbound/dns64/dns64.c
877
rrset_cache_remove(super->env->rrset_cache, dk->rk.dname,
usr.sbin/unbound/dns64/dns64.c
883
msg_cache_remove(super->env, dk->rk.dname,
usr.sbin/unbound/dns64/dns64.h
53
int dns64_init(struct module_env* env, int id);
usr.sbin/unbound/dns64/dns64.h
56
void dns64_deinit(struct module_env* env, int id);
usr.sbin/unbound/dns64/dns64.h
69
size_t dns64_get_mem(struct module_env* env, int id);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1004
lock_basic_unlock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1009
dnsc_delete(struct dnsc_env *env)
usr.sbin/unbound/dnscrypt/dnscrypt.c
1011
if(!env) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
1015
sodium_free(env->signed_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1016
sodium_free(env->rotated_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1017
sodium_free(env->certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1018
sodium_free(env->keypairs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1019
lock_basic_destroy(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1020
lock_basic_destroy(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1021
slabhash_delete(env->shared_secrets_cache);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1022
slabhash_delete(env->nonces_cache);
usr.sbin/unbound/dnscrypt/dnscrypt.c
1023
free(env);
usr.sbin/unbound/dnscrypt/dnscrypt.c
244
dnscrypt_server_uncurve(struct dnsc_env* env,
usr.sbin/unbound/dnscrypt/dnscrypt.c
273
lock_basic_lock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
275
env->nonces_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
283
env->num_query_dnscrypt_replay++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
284
lock_basic_unlock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
289
env->nonces_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
294
lock_basic_unlock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
301
entry = dnsc_shared_secrets_lookup(env->shared_secrets_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
306
lock_basic_lock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
307
env->num_query_dnscrypt_secret_missed_cache++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
308
lock_basic_unlock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
327
dnsc_shared_secret_cache_insert(env->shared_secrets_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
577
dnsc_parse_certs(struct dnsc_env *env, struct config_file *cfg)
usr.sbin/unbound/dnscrypt/dnscrypt.c
584
env->signed_certs_count = 0U;
usr.sbin/unbound/dnscrypt/dnscrypt.c
585
env->rotated_certs_count = 0U;
usr.sbin/unbound/dnscrypt/dnscrypt.c
587
env->signed_certs_count++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
590
env->rotated_certs_count++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
592
env->signed_certs = sodium_allocarray(env->signed_certs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
593
sizeof *env->signed_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
595
env->rotated_certs = sodium_allocarray(env->rotated_certs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
596
sizeof env->signed_certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
603
(char *)(env->signed_certs + signed_cert_id),
usr.sbin/unbound/dnscrypt/dnscrypt.c
609
*(env->rotated_certs + rotated_cert_id) = env->signed_certs + signed_cert_id;
usr.sbin/unbound/dnscrypt/dnscrypt.c
791
dnsc_parse_keys(struct dnsc_env *env, struct config_file *cfg)
usr.sbin/unbound/dnscrypt/dnscrypt.c
798
env->keypairs_count = 0U;
usr.sbin/unbound/dnscrypt/dnscrypt.c
800
env->keypairs_count++;
usr.sbin/unbound/dnscrypt/dnscrypt.c
803
env->keypairs = sodium_allocarray(env->keypairs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
804
sizeof *env->keypairs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
805
env->certs = sodium_allocarray(env->signed_certs_count,
usr.sbin/unbound/dnscrypt/dnscrypt.c
806
sizeof *env->certs);
usr.sbin/unbound/dnscrypt/dnscrypt.c
813
KeyPair *current_keypair = &env->keypairs[keypair_id];
usr.sbin/unbound/dnscrypt/dnscrypt.c
829
for(c = 0; c < env->signed_certs_count; c++) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
831
env->signed_certs[c].server_publickey,
usr.sbin/unbound/dnscrypt/dnscrypt.c
833
dnsccert *current_cert = &env->certs[cert_id++];
usr.sbin/unbound/dnscrypt/dnscrypt.c
837
env->signed_certs[c].magic_query,
usr.sbin/unbound/dnscrypt/dnscrypt.c
838
sizeof env->signed_certs[c].magic_query);
usr.sbin/unbound/dnscrypt/dnscrypt.c
840
env->signed_certs[c].version_major,
usr.sbin/unbound/dnscrypt/dnscrypt.c
841
sizeof env->signed_certs[c].version_major
usr.sbin/unbound/dnscrypt/dnscrypt.c
940
struct dnsc_env *env;
usr.sbin/unbound/dnscrypt/dnscrypt.c
947
env = (struct dnsc_env *) calloc(1, sizeof(struct dnsc_env));
usr.sbin/unbound/dnscrypt/dnscrypt.c
948
lock_basic_init(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
949
lock_protect(&env->shared_secrets_cache_lock,
usr.sbin/unbound/dnscrypt/dnscrypt.c
950
&env->num_query_dnscrypt_secret_missed_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
951
sizeof(env->num_query_dnscrypt_secret_missed_cache));
usr.sbin/unbound/dnscrypt/dnscrypt.c
952
lock_basic_init(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
953
lock_protect(&env->nonces_cache_lock,
usr.sbin/unbound/dnscrypt/dnscrypt.c
954
&env->nonces_cache,
usr.sbin/unbound/dnscrypt/dnscrypt.c
955
sizeof(env->nonces_cache));
usr.sbin/unbound/dnscrypt/dnscrypt.c
956
lock_protect(&env->nonces_cache_lock,
usr.sbin/unbound/dnscrypt/dnscrypt.c
957
&env->num_query_dnscrypt_replay,
usr.sbin/unbound/dnscrypt/dnscrypt.c
958
sizeof(env->num_query_dnscrypt_replay));
usr.sbin/unbound/dnscrypt/dnscrypt.c
960
return env;
usr.sbin/unbound/dnscrypt/dnscrypt.c
964
dnsc_apply_cfg(struct dnsc_env *env, struct config_file *cfg)
usr.sbin/unbound/dnscrypt/dnscrypt.c
966
if(dnsc_parse_certs(env, cfg) <= 0) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
969
if(dnsc_parse_keys(env, cfg) <= 0) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
972
randombytes_buf(env->hash_key, sizeof env->hash_key);
usr.sbin/unbound/dnscrypt/dnscrypt.c
973
env->provider_name = cfg->dnscrypt_provider;
usr.sbin/unbound/dnscrypt/dnscrypt.c
975
if(dnsc_load_local_data(env, cfg) <= 0) {
usr.sbin/unbound/dnscrypt/dnscrypt.c
978
lock_basic_lock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
979
env->shared_secrets_cache = slabhash_create(
usr.sbin/unbound/dnscrypt/dnscrypt.c
989
lock_basic_unlock(&env->shared_secrets_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
990
if(!env->shared_secrets_cache){
usr.sbin/unbound/dnscrypt/dnscrypt.c
993
lock_basic_lock(&env->nonces_cache_lock);
usr.sbin/unbound/dnscrypt/dnscrypt.c
994
env->nonces_cache = slabhash_create(
usr.sbin/unbound/dnscrypt/dnscrypt.h
107
int dnsc_apply_cfg(struct dnsc_env *env, struct config_file *cfg);
usr.sbin/unbound/dnscrypt/dnscrypt.h
113
void dnsc_delete(struct dnsc_env *env);
usr.sbin/unbound/dnstap/dnstap.c
103
env->sample_rate_count = 0;
usr.sbin/unbound/dnstap/dnstap.c
106
env->sample_rate_count++;
usr.sbin/unbound/dnstap/dnstap.c
107
lock_basic_unlock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
110
lock_basic_unlock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
115
dt_send(const struct dt_env *env, void *buf, size_t len_buf)
usr.sbin/unbound/dnstap/dnstap.c
117
dt_msg_queue_submit(env->msgqueue, buf, len_buf);
usr.sbin/unbound/dnstap/dnstap.c
121
dt_msg_init(const struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
131
if (env->identity != NULL) {
usr.sbin/unbound/dnstap/dnstap.c
132
dm->d.identity.data = (uint8_t *) env->identity;
usr.sbin/unbound/dnstap/dnstap.c
133
dm->d.identity.len = (size_t) env->len_identity;
usr.sbin/unbound/dnstap/dnstap.c
136
if (env->version != NULL) {
usr.sbin/unbound/dnstap/dnstap.c
137
dm->d.version.data = (uint8_t *) env->version;
usr.sbin/unbound/dnstap/dnstap.c
138
dm->d.version.len = (size_t) env->len_version;
usr.sbin/unbound/dnstap/dnstap.c
158
struct dt_env *env;
usr.sbin/unbound/dnstap/dnstap.c
171
env = (struct dt_env *) calloc(1, sizeof(struct dt_env));
usr.sbin/unbound/dnstap/dnstap.c
172
if (!env)
usr.sbin/unbound/dnstap/dnstap.c
174
lock_basic_init(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
176
env->dtio = dt_io_thread_create();
usr.sbin/unbound/dnstap/dnstap.c
177
if(!env->dtio) {
usr.sbin/unbound/dnstap/dnstap.c
179
free(env);
usr.sbin/unbound/dnstap/dnstap.c
182
if(!dt_io_thread_apply_cfg(env->dtio, cfg)) {
usr.sbin/unbound/dnstap/dnstap.c
183
dt_io_thread_delete(env->dtio);
usr.sbin/unbound/dnstap/dnstap.c
184
free(env);
usr.sbin/unbound/dnstap/dnstap.c
187
dt_apply_cfg(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
188
return env;
usr.sbin/unbound/dnstap/dnstap.c
192
dt_apply_identity(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
196
free(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
197
env->identity = NULL;
usr.sbin/unbound/dnstap/dnstap.c
200
free(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
204
env->identity = strdup(buf);
usr.sbin/unbound/dnstap/dnstap.c
209
env->identity = strdup(cfg->dnstap_identity);
usr.sbin/unbound/dnstap/dnstap.c
211
if (env->identity == NULL)
usr.sbin/unbound/dnstap/dnstap.c
213
env->len_identity = (unsigned int)strlen(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
215
env->identity);
usr.sbin/unbound/dnstap/dnstap.c
219
dt_apply_version(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
222
free(env->version);
usr.sbin/unbound/dnstap/dnstap.c
223
env->version = NULL;
usr.sbin/unbound/dnstap/dnstap.c
226
free(env->version);
usr.sbin/unbound/dnstap/dnstap.c
228
env->version = strdup(PACKAGE_STRING);
usr.sbin/unbound/dnstap/dnstap.c
230
env->version = strdup(cfg->dnstap_version);
usr.sbin/unbound/dnstap/dnstap.c
231
if (env->version == NULL)
usr.sbin/unbound/dnstap/dnstap.c
233
env->len_version = (unsigned int)strlen(env->version);
usr.sbin/unbound/dnstap/dnstap.c
235
env->version);
usr.sbin/unbound/dnstap/dnstap.c
239
dt_apply_logcfg(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
241
if ((env->log_resolver_query_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
246
if ((env->log_resolver_response_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
251
if ((env->log_client_query_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
256
if ((env->log_client_response_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
261
if ((env->log_forwarder_query_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
266
if ((env->log_forwarder_response_messages = (unsigned int)
usr.sbin/unbound/dnstap/dnstap.c
271
lock_basic_lock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
272
if((env->sample_rate = (unsigned int)cfg->dnstap_sample_rate))
usr.sbin/unbound/dnstap/dnstap.c
274
verbose(VERB_OPS, "dnstap SAMPLE_RATE enabled and set to \"%d\"", (int)env->sample_rate);
usr.sbin/unbound/dnstap/dnstap.c
276
lock_basic_unlock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
280
dt_apply_cfg(struct dt_env *env, struct config_file *cfg)
usr.sbin/unbound/dnstap/dnstap.c
285
dt_apply_identity(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
286
dt_apply_version(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
287
dt_apply_logcfg(env, cfg);
usr.sbin/unbound/dnstap/dnstap.c
291
dt_init(struct dt_env *env, struct comm_base* base)
usr.sbin/unbound/dnstap/dnstap.c
293
env->msgqueue = dt_msg_queue_create(base);
usr.sbin/unbound/dnstap/dnstap.c
294
if(!env->msgqueue) {
usr.sbin/unbound/dnstap/dnstap.c
298
if(!dt_io_thread_register_queue(env->dtio, env->msgqueue)) {
usr.sbin/unbound/dnstap/dnstap.c
300
dt_msg_queue_delete(env->msgqueue);
usr.sbin/unbound/dnstap/dnstap.c
301
env->msgqueue = NULL;
usr.sbin/unbound/dnstap/dnstap.c
308
dt_deinit(struct dt_env* env)
usr.sbin/unbound/dnstap/dnstap.c
310
dt_io_thread_unregister_queue(env->dtio, env->msgqueue);
usr.sbin/unbound/dnstap/dnstap.c
311
dt_msg_queue_delete(env->msgqueue);
usr.sbin/unbound/dnstap/dnstap.c
315
dt_delete(struct dt_env *env)
usr.sbin/unbound/dnstap/dnstap.c
317
if (!env)
usr.sbin/unbound/dnstap/dnstap.c
319
dt_io_thread_delete(env->dtio);
usr.sbin/unbound/dnstap/dnstap.c
320
lock_basic_destroy(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
321
free(env->identity);
usr.sbin/unbound/dnstap/dnstap.c
322
free(env->version);
usr.sbin/unbound/dnstap/dnstap.c
323
free(env);
usr.sbin/unbound/dnstap/dnstap.c
446
dt_msg_send_client_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
457
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
465
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_QUERY);
usr.sbin/unbound/dnstap/dnstap.c
484
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
488
dt_msg_send_client_response(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
498
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
504
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_RESPONSE);
usr.sbin/unbound/dnstap/dnstap.c
522
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
526
dt_msg_send_outside_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
538
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
546
if (!env->log_forwarder_query_messages)
usr.sbin/unbound/dnstap/dnstap.c
548
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_QUERY);
usr.sbin/unbound/dnstap/dnstap.c
550
if (!env->log_resolver_query_messages)
usr.sbin/unbound/dnstap/dnstap.c
552
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_QUERY);
usr.sbin/unbound/dnstap/dnstap.c
576
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
580
dt_msg_send_outside_response(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.c
594
if(dt_sample_rate_limited(env))
usr.sbin/unbound/dnstap/dnstap.c
603
if (!env->log_forwarder_response_messages)
usr.sbin/unbound/dnstap/dnstap.c
605
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_RESPONSE);
usr.sbin/unbound/dnstap/dnstap.c
607
if (!env->log_resolver_response_messages)
usr.sbin/unbound/dnstap/dnstap.c
609
dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_RESPONSE);
usr.sbin/unbound/dnstap/dnstap.c
638
dt_send(env, dm.buf, dm.len_buf);
usr.sbin/unbound/dnstap/dnstap.c
91
dt_sample_rate_limited(struct dt_env* env)
usr.sbin/unbound/dnstap/dnstap.c
93
lock_basic_lock(&env->sample_lock);
usr.sbin/unbound/dnstap/dnstap.c
95
if(env->sample_rate > 1) {
usr.sbin/unbound/dnstap/dnstap.c
98
if (env->sample_rate_count > env->sample_rate) {
usr.sbin/unbound/dnstap/dnstap.h
107
dt_apply_cfg(struct dt_env *env, struct config_file *cfg);
usr.sbin/unbound/dnstap/dnstap.h
114
void dt_apply_logcfg(struct dt_env *env, struct config_file *cfg);
usr.sbin/unbound/dnstap/dnstap.h
123
dt_init(struct dt_env *env, struct comm_base* base);
usr.sbin/unbound/dnstap/dnstap.h
128
void dt_deinit(struct dt_env *env);
usr.sbin/unbound/dnstap/dnstap.h
135
dt_delete(struct dt_env *env);
usr.sbin/unbound/dnstap/dnstap.h
147
dt_msg_send_client_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.h
164
dt_msg_send_client_response(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.h
184
dt_msg_send_outside_query(struct dt_env *env,
usr.sbin/unbound/dnstap/dnstap.h
209
dt_msg_send_outside_response(struct dt_env *env,
usr.sbin/unbound/dynlibmod/dynlibmod.c
163
return de->func_init(env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
167
void dynlibmod_deinit(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
168
struct dynlibmod_env* de = env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
171
de->func_deinit(env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
181
struct dynlibmod_env* de = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
189
struct dynlibmod_env* de = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
196
struct dynlibmod_env* de = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
202
size_t dynlibmod_get_mem(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
203
struct dynlibmod_env* de = (struct dynlibmod_env*)env->modinfo[id];
usr.sbin/unbound/dynlibmod/dynlibmod.c
209
size = de->func_get_mem(env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
244
struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
253
return inplace_cb_register(&dynlib_inplace_cb_reply_generic, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
255
return inplace_cb_register(&dynlib_inplace_cb_query_generic, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
257
return inplace_cb_register(&dynlib_inplace_cb_query_response, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
259
return inplace_cb_register(&dynlib_inplace_cb_edns_back_parsed, type, (void*) cb_pair, env, id);
usr.sbin/unbound/dynlibmod/dynlibmod.c
267
inplace_cb_delete_wrapped(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/dynlibmod/dynlibmod.c
269
struct inplace_cb* temp = env->inplace_cb_lists[type];
usr.sbin/unbound/dynlibmod/dynlibmod.c
275
env->inplace_cb_lists[type] = temp->next;
usr.sbin/unbound/dynlibmod/dynlibmod.c
278
temp = env->inplace_cb_lists[type];
usr.sbin/unbound/dynlibmod/dynlibmod.c
73
int dynlibmod_init(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/dynlibmod.c
75
struct config_strlist* cfg_item = env->cfg->dynlib_file;
usr.sbin/unbound/dynlibmod/dynlibmod.c
85
env->modinfo[id] = (void*) de;
usr.sbin/unbound/dynlibmod/dynlibmod.h
51
int dynlibmod_init(struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
54
void dynlibmod_deinit(struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
68
size_t dynlibmod_get_mem(struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
89
struct module_env* env, int id);
usr.sbin/unbound/dynlibmod/dynlibmod.h
92
inplace_cb_delete_wrapped(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/dynlibmod/examples/helloworld.c
102
struct dynlibmod_env* env = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
103
if (env->dyn_env != NULL) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
104
free(env->dyn_env);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
105
env->dyn_env = NULL;
usr.sbin/unbound/dynlibmod/examples/helloworld.c
111
EXPORT size_t get_mem(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
124
struct dynlibmod_env* env = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
125
if (env->dyn_env != NULL) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
127
((int *)env->dyn_env)[0],
usr.sbin/unbound/dynlibmod/examples/helloworld.c
128
((int *)env->dyn_env)[1],
usr.sbin/unbound/dynlibmod/examples/helloworld.c
129
((int *)env->dyn_env)[2]);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
40
EXPORT int init(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
42
struct dynlibmod_env* de = (struct dynlibmod_env*) env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
45
NULL, env, id);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
46
struct dynlibmod_env* local_env = env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
53
EXPORT void deinit(struct module_env* env, int id) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
55
struct dynlibmod_env* de = (struct dynlibmod_env*) env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
56
de->inplace_cb_delete_wrapped(env, inplace_cb_reply, id);
usr.sbin/unbound/dynlibmod/examples/helloworld.c
73
struct dynlibmod_env* env = qstate->env->modinfo[id];
usr.sbin/unbound/dynlibmod/examples/helloworld.c
74
if (env->dyn_env == NULL) {
usr.sbin/unbound/dynlibmod/examples/helloworld.c
75
env->dyn_env = calloc(3, sizeof(int));
usr.sbin/unbound/dynlibmod/examples/helloworld.c
76
((int *)env->dyn_env)[0] = 42;
usr.sbin/unbound/dynlibmod/examples/helloworld.c
77
((int *)env->dyn_env)[1] = 102;
usr.sbin/unbound/dynlibmod/examples/helloworld.c
78
((int *)env->dyn_env)[2] = 192;
usr.sbin/unbound/edns-subnet/addrtree.c
123
size_t (*sizefunc)(void *), void *env, uint32_t max_node_count)
usr.sbin/unbound/edns-subnet/addrtree.c
142
tree->env = env;
usr.sbin/unbound/edns-subnet/addrtree.c
158
tree->delfunc(tree->env, node->elem);
usr.sbin/unbound/edns-subnet/addrtree.h
144
size_t (*sizefunc)(void *), void *env, uint32_t max_node_count);
usr.sbin/unbound/edns-subnet/addrtree.h
81
void *env;
usr.sbin/unbound/edns-subnet/subnetmod.c
1000
qstate->env->cfg->prefetch)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1013
qstate->env->cfg->
usr.sbin/unbound/edns-subnet/subnetmod.c
1022
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
1036
qstate->env->cfg->max_client_subnet_ipv4)
usr.sbin/unbound/edns-subnet/subnetmod.c
1038
qstate->env->cfg->max_client_subnet_ipv4;
usr.sbin/unbound/edns-subnet/subnetmod.c
1041
qstate->env->cfg->max_client_subnet_ipv6)
usr.sbin/unbound/edns-subnet/subnetmod.c
1043
qstate->env->cfg->max_client_subnet_ipv6;
usr.sbin/unbound/edns-subnet/subnetmod.c
1052
qstate->env->cfg->client_subnet_always_forward &&
usr.sbin/unbound/edns-subnet/subnetmod.c
1078
qstate->env->cfg->
usr.sbin/unbound/edns-subnet/subnetmod.c
111
sldns_buffer* buf = qstate->env->scratch_buffer;
usr.sbin/unbound/edns-subnet/subnetmod.c
1138
subnetmod_get_mem(struct module_env *env, int id)
usr.sbin/unbound/edns-subnet/subnetmod.c
1140
struct subnet_env *sn_env = env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
138
qstate->env->cfg->client_subnet_opcode,
usr.sbin/unbound/edns-subnet/subnetmod.c
155
sn_env = (struct subnet_env*)qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
181
qstate->env->cfg->client_subnet_always_forward) ||
usr.sbin/unbound/edns-subnet/subnetmod.c
189
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
207
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
209
qstate->env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
226
subnetmod_init(struct module_env *env, int id)
usr.sbin/unbound/edns-subnet/subnetmod.c
235
env->modinfo[id] = (void*)sn_env;
usr.sbin/unbound/edns-subnet/subnetmod.c
239
if(env->cfg->serve_expired)
usr.sbin/unbound/edns-subnet/subnetmod.c
243
if(env->cfg->prefetch)
usr.sbin/unbound/edns-subnet/subnetmod.c
248
sn_env->subnet_msg_cache = slabhash_create(env->cfg->msg_cache_slabs,
usr.sbin/unbound/edns-subnet/subnetmod.c
249
HASH_DEFAULT_STARTARRAY, env->cfg->msg_cache_size,
usr.sbin/unbound/edns-subnet/subnetmod.c
255
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
262
!ecs_whitelist_apply_cfg(sn_env->whitelist, env->cfg)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
266
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
271
env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
273
env->unique_mesh = 1;
usr.sbin/unbound/edns-subnet/subnetmod.c
274
if(!edns_register_option(env->cfg->client_subnet_opcode,
usr.sbin/unbound/edns-subnet/subnetmod.c
275
env->cfg->client_subnet_always_forward /* bypass cache */,
usr.sbin/unbound/edns-subnet/subnetmod.c
276
1 /* no aggregation */, env)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
281
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
285
env, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
287
inplace_cb_edns_back_parsed, NULL, env, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
289
inplace_cb_query_response, NULL, env, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
295
subnetmod_deinit(struct module_env *env, int id)
usr.sbin/unbound/edns-subnet/subnetmod.c
298
if(!env || !env->modinfo[id])
usr.sbin/unbound/edns-subnet/subnetmod.c
300
sn_env = (struct subnet_env*)env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
302
inplace_cb_delete(env, inplace_cb_edns_back_parsed, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
303
inplace_cb_delete(env, inplace_cb_query, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
304
inplace_cb_delete(env, inplace_cb_query_response, id);
usr.sbin/unbound/edns-subnet/subnetmod.c
309
env->modinfo[id] = NULL;
usr.sbin/unbound/edns-subnet/subnetmod.c
326
struct subnet_env *env = (struct subnet_env *)envptr;
usr.sbin/unbound/edns-subnet/subnetmod.c
327
reply_info_parsedelete(elem, &env->alloc);
usr.sbin/unbound/edns-subnet/subnetmod.c
353
struct subnet_env *env, struct config_file* cfg)
usr.sbin/unbound/edns-subnet/subnetmod.c
360
&sizefunc, env, cfg->max_ecs_tree_size_ipv4);
usr.sbin/unbound/edns-subnet/subnetmod.c
366
&sizefunc, env, cfg->max_ecs_tree_size_ipv6);
usr.sbin/unbound/edns-subnet/subnetmod.c
379
struct subnet_env *sne = qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
424
if (!(tree = get_tree(lru_entry->data, edns, sne, qstate->env->cfg))) {
usr.sbin/unbound/edns-subnet/subnetmod.c
443
reply_info_set_ttls(rep, *qstate->env->now);
usr.sbin/unbound/edns-subnet/subnetmod.c
453
rep->ttl, *qstate->env->now, only_match_scope_zero);
usr.sbin/unbound/edns-subnet/subnetmod.c
471
struct module_env *env = qstate->env;
usr.sbin/unbound/edns-subnet/subnetmod.c
472
struct subnet_env *sne = (struct subnet_env*)env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
496
ecs->subnet_source_mask, *env->now);
usr.sbin/unbound/edns-subnet/subnetmod.c
503
(struct reply_info *)node->elem, qstate->region, *env->now, 0,
usr.sbin/unbound/edns-subnet/subnetmod.c
504
env->scratch);
usr.sbin/unbound/edns-subnet/subnetmod.c
521
if (prefetch && *qstate->env->now >= ((struct reply_info *)node->elem)->prefetch_ttl) {
usr.sbin/unbound/edns-subnet/subnetmod.c
569
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/edns-subnet/subnetmod.c
570
if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime, valrec,
usr.sbin/unbound/edns-subnet/subnetmod.c
589
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
622
struct subnet_env *sne = qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
683
qstate->env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
700
if(qstate->env->cfg->serve_expired) {
usr.sbin/unbound/edns-subnet/subnetmod.c
701
msg_cache_remove(qstate->env, qstate->qinfo.qname,
usr.sbin/unbound/edns-subnet/subnetmod.c
705
if(qstate->env->cachedb_enabled)
usr.sbin/unbound/edns-subnet/subnetmod.c
720
qstate->env->cfg->max_client_subnet_ipv4) {
usr.sbin/unbound/edns-subnet/subnetmod.c
722
qstate->env->cfg->max_client_subnet_ipv4;
usr.sbin/unbound/edns-subnet/subnetmod.c
726
qstate->env->cfg->max_client_subnet_ipv6) {
usr.sbin/unbound/edns-subnet/subnetmod.c
728
qstate->env->cfg->max_client_subnet_ipv6;
usr.sbin/unbound/edns-subnet/subnetmod.c
818
qstate->env->cfg->client_subnet_opcode);
usr.sbin/unbound/edns-subnet/subnetmod.c
868
qstate->env->cfg->client_subnet_opcode)) &&
usr.sbin/unbound/edns-subnet/subnetmod.c
897
struct subnet_env *sne = qstate->env->modinfo[id];
usr.sbin/unbound/edns-subnet/subnetmod.c
909
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
946
qstate->env->cfg->client_subnet_opcode))) {
usr.sbin/unbound/edns-subnet/subnetmod.c
960
&sq->ecs_client_in, qstate->env->cfg);
usr.sbin/unbound/edns-subnet/subnetmod.c
965
&sq->ecs_client_in, qstate->env->cfg);
usr.sbin/unbound/edns-subnet/subnetmod.c
973
qstate->env->cfg->client_subnet_opcode)) {
usr.sbin/unbound/edns-subnet/subnetmod.c
988
sq->ecs_client_in.subnet_source_mask < qstate->env->cfg->min_client_subnet_ipv4) ||
usr.sbin/unbound/edns-subnet/subnetmod.c
990
sq->ecs_client_in.subnet_source_mask < qstate->env->cfg->min_client_subnet_ipv6))) {
usr.sbin/unbound/edns-subnet/subnetmod.h
125
int subnetmod_init(struct module_env* env, int id);
usr.sbin/unbound/edns-subnet/subnetmod.h
128
void subnetmod_deinit(struct module_env* env, int id);
usr.sbin/unbound/edns-subnet/subnetmod.h
142
size_t subnetmod_get_mem(struct module_env* env, int id);
usr.sbin/unbound/ipsecmod/ipsecmod.c
111
iq->enabled = qstate->env->cfg->ipsecmod_enabled;
usr.sbin/unbound/ipsecmod/ipsecmod.c
113
(struct ipsecmod_env*)qstate->env->modinfo[id], qstate->qinfo.qname,
usr.sbin/unbound/ipsecmod/ipsecmod.c
158
fptr_ok(fptr_whitelist_modenv_detect_cycle(qstate->env->detect_cycle));
usr.sbin/unbound/ipsecmod/ipsecmod.c
159
if((*qstate->env->detect_cycle)(qstate, &ask,
usr.sbin/unbound/ipsecmod/ipsecmod.c
165
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/ipsecmod/ipsecmod.c
166
if(!(*qstate->env->attach_sub)(qstate, &ask,
usr.sbin/unbound/ipsecmod/ipsecmod.c
271
w += sldns_str_print(&s, &slen, "%s", qstate->env->cfg->ipsecmod_hook);
usr.sbin/unbound/ipsecmod/ipsecmod.c
419
if(!qstate->env->cfg->ipsecmod_ignore_bogus &&
usr.sbin/unbound/ipsecmod/ipsecmod.c
428
qstate->env->cfg->ipsecmod_strict) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
439
if(rrset_data->ttl > (time_t)qstate->env->cfg->ipsecmod_max_ttl) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
441
rrset_data->ttl = qstate->env->cfg->ipsecmod_max_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
443
rrset_data->rr_ttl[i] = qstate->env->cfg->ipsecmod_max_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
445
if(qstate->return_msg->rep->ttl > (time_t)qstate->env->cfg->ipsecmod_max_ttl) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
447
qstate->env->cfg->ipsecmod_max_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
451
qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/ipsecmod/ipsecmod.c
457
if(!dns_cache_store(qstate->env, &qstate->qinfo,
usr.sbin/unbound/ipsecmod/ipsecmod.c
516
struct ipsecmod_env* ie = (struct ipsecmod_env*)qstate->env->modinfo[id];
usr.sbin/unbound/ipsecmod/ipsecmod.c
606
ipsecmod_get_mem(struct module_env* env, int id)
usr.sbin/unbound/ipsecmod/ipsecmod.c
608
struct ipsecmod_env* ie = (struct ipsecmod_env*)env->modinfo[id];
usr.sbin/unbound/ipsecmod/ipsecmod.c
70
ipsecmod_init(struct module_env* env, int id)
usr.sbin/unbound/ipsecmod/ipsecmod.c
78
env->modinfo[id] = (void*)ipsecmod_env;
usr.sbin/unbound/ipsecmod/ipsecmod.c
80
if(!ipsecmod_apply_cfg(ipsecmod_env, env->cfg)) {
usr.sbin/unbound/ipsecmod/ipsecmod.c
88
ipsecmod_deinit(struct module_env* env, int id)
usr.sbin/unbound/ipsecmod/ipsecmod.c
91
if(!env || !env->modinfo[id])
usr.sbin/unbound/ipsecmod/ipsecmod.c
93
ipsecmod_env = (struct ipsecmod_env*)env->modinfo[id];
usr.sbin/unbound/ipsecmod/ipsecmod.c
97
env->modinfo[id] = NULL;
usr.sbin/unbound/ipsecmod/ipsecmod.h
77
int ipsecmod_init(struct module_env* env, int id);
usr.sbin/unbound/ipsecmod/ipsecmod.h
79
void ipsecmod_deinit(struct module_env* env, int id);
usr.sbin/unbound/ipsecmod/ipsecmod.h
89
size_t ipsecmod_get_mem(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.c
225
ipset_check_zones_for_rrset(struct module_env *env, struct ipset_env *ie,
usr.sbin/unbound/ipset/ipset.c
248
for (p = env->cfg->local_zones_ipset; p; p = p->next) {
usr.sbin/unbound/ipset/ipset.c
272
static int ipset_update(struct module_env *env, struct dns_msg *return_msg,
usr.sbin/unbound/ipset/ipset.c
315
if(ipset_check_zones_for_rrset(env, ie, rrset, qname,
usr.sbin/unbound/ipset/ipset.c
324
int ipset_startup(struct module_env* env, int id) {
usr.sbin/unbound/ipset/ipset.c
333
env->modinfo[id] = (void *)ipset_env;
usr.sbin/unbound/ipset/ipset.c
347
void ipset_destartup(struct module_env* env, int id) {
usr.sbin/unbound/ipset/ipset.c
351
if (!env || !env->modinfo[id]) {
usr.sbin/unbound/ipset/ipset.c
354
ipset_env = (struct ipset_env *)env->modinfo[id];
usr.sbin/unbound/ipset/ipset.c
367
env->modinfo[id] = NULL;
usr.sbin/unbound/ipset/ipset.c
370
int ipset_init(struct module_env* env, int id) {
usr.sbin/unbound/ipset/ipset.c
371
struct ipset_env *ipset_env = env->modinfo[id];
usr.sbin/unbound/ipset/ipset.c
373
ipset_env->name_v4 = env->cfg->ipset_name_v4;
usr.sbin/unbound/ipset/ipset.c
374
ipset_env->name_v6 = env->cfg->ipset_name_v6;
usr.sbin/unbound/ipset/ipset.c
387
void ipset_deinit(struct module_env *ATTR_UNUSED(env), int ATTR_UNUSED(id)) {
usr.sbin/unbound/ipset/ipset.c
408
struct ipset_env *ie = (struct ipset_env *)qstate->env->modinfo[id];
usr.sbin/unbound/ipset/ipset.c
432
ipset_update(qstate->env, qstate->return_msg, qstate->qinfo, ie);
usr.sbin/unbound/ipset/ipset.c
481
size_t ipset_get_mem(struct module_env *env, int id) {
usr.sbin/unbound/ipset/ipset.c
482
struct ipset_env *ie = (struct ipset_env *)env->modinfo[id];
usr.sbin/unbound/ipset/ipset.h
54
int ipset_startup(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
56
void ipset_destartup(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
58
int ipset_init(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
60
void ipset_deinit(struct module_env* env, int id);
usr.sbin/unbound/ipset/ipset.h
70
size_t ipset_get_mem(struct module_env* env, int id);
usr.sbin/unbound/iterator/iter_scrub.c
1009
} else if(!env->cfg->harden_glue && (
usr.sbin/unbound/iterator/iter_scrub.c
1015
store_rrset(pkt, msg, env, rrset);
usr.sbin/unbound/iterator/iter_scrub.c
1048
if(env->cfg->harden_unverified_glue && ns_rrset_dname &&
usr.sbin/unbound/iterator/iter_scrub.c
1063
store_rrset(pkt, msg, env, rrset);
usr.sbin/unbound/iterator/iter_scrub.c
1077
struct module_env* env, struct module_qstate* qstate,
usr.sbin/unbound/iterator/iter_scrub.c
1108
if(!scrub_normalize(pkt, msg, qinfo, region, env, zonename))
usr.sbin/unbound/iterator/iter_scrub.c
1111
if(!scrub_sanitize(pkt, msg, qinfo, zonename, env, ie, qstate))
usr.sbin/unbound/iterator/iter_scrub.c
427
struct module_env* env, uint8_t* zonename)
usr.sbin/unbound/iterator/iter_scrub.c
448
if(cname_length > env->cfg->iter_scrub_cname) {
usr.sbin/unbound/iterator/iter_scrub.c
572
rrset->rr_count > env->cfg->iter_scrub_ns) {
usr.sbin/unbound/iterator/iter_scrub.c
573
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
usr.sbin/unbound/iterator/iter_scrub.c
591
rrset->rr_count > env->cfg->iter_scrub_ns) {
usr.sbin/unbound/iterator/iter_scrub.c
592
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
usr.sbin/unbound/iterator/iter_scrub.c
617
if(env->cfg->harden_unknown_additional &&
usr.sbin/unbound/iterator/iter_scrub.c
655
env->cfg->iter_scrub_promiscuous) {
usr.sbin/unbound/iterator/iter_scrub.c
662
&& env->cfg->iter_scrub_promiscuous) {
usr.sbin/unbound/iterator/iter_scrub.c
678
&& env->cfg->iter_scrub_promiscuous) {
usr.sbin/unbound/iterator/iter_scrub.c
690
if(rrset->rr_count > env->cfg->iter_scrub_ns) {
usr.sbin/unbound/iterator/iter_scrub.c
706
shorten_rrset(pkt, rrset, env->cfg->iter_scrub_ns);
usr.sbin/unbound/iterator/iter_scrub.c
759
if(env->cfg->harden_unknown_additional &&
usr.sbin/unbound/iterator/iter_scrub.c
783
store_rrset(sldns_buffer* pkt, struct msg_parse* msg, struct module_env* env,
usr.sbin/unbound/iterator/iter_scrub.c
789
time_t now = *env->now;
usr.sbin/unbound/iterator/iter_scrub.c
791
k = alloc_special_obtain(env->alloc);
usr.sbin/unbound/iterator/iter_scrub.c
796
alloc_special_release(env->alloc, k);
usr.sbin/unbound/iterator/iter_scrub.c
804
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, now);
usr.sbin/unbound/iterator/iter_scrub.c
915
struct query_info* qinfo, uint8_t* zonename, struct module_env* env,
usr.sbin/unbound/iterator/iter_scrub.h
69
struct module_env* env, struct module_qstate* qstate,
usr.sbin/unbound/iterator/iter_utils.c
1168
iter_store_parentside_rrset(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
1172
rrset = packed_rrset_copy_alloc(rrset, env->alloc, *env->now);
usr.sbin/unbound/iterator/iter_utils.c
1182
(void)rrset_cache_update(env->rrset_cache, &ref, env->alloc, *env->now);
usr.sbin/unbound/iterator/iter_utils.c
1199
iter_store_parentside_NS(struct module_env* env, struct reply_info* rep)
usr.sbin/unbound/iterator/iter_utils.c
1204
iter_store_parentside_rrset(env, rrset);
usr.sbin/unbound/iterator/iter_utils.c
1208
void iter_store_parentside_neg(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
1223
neg = (struct ub_packed_rrset_key*)regional_alloc(env->scratch,
usr.sbin/unbound/iterator/iter_utils.c
1234
neg->rk.dname = regional_alloc_init(env->scratch, qinfo->qname,
usr.sbin/unbound/iterator/iter_utils.c
1242
newd = (struct packed_rrset_data*)regional_alloc_zero(env->scratch,
usr.sbin/unbound/iterator/iter_utils.c
1264
iter_store_parentside_rrset(env, neg);
usr.sbin/unbound/iterator/iter_utils.c
1268
iter_lookup_parent_NS_from_cache(struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.c
1272
akey = rrset_cache_lookup(env->rrset_cache, dp->name,
usr.sbin/unbound/iterator/iter_utils.c
1274
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
usr.sbin/unbound/iterator/iter_utils.c
1288
int iter_lookup_parent_glue_from_cache(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
1299
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/iterator/iter_utils.c
1301
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
usr.sbin/unbound/iterator/iter_utils.c
1311
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/iterator/iter_utils.c
1313
PACKED_RRSET_PARENT_SIDE, *env->now, 0);
usr.sbin/unbound/iterator/iter_utils.c
1516
lock_rw_rdlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1517
lock_rw_rdlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1518
stub = hints_lookup_stub(qstate->env->hints, qinf->qname,
usr.sbin/unbound/iterator/iter_utils.c
1520
dp = forwards_lookup(qstate->env->fwds, qinf->qname, qinf->qclass,
usr.sbin/unbound/iterator/iter_utils.c
1537
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1548
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1558
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1566
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1577
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1586
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1589
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iter_utils.c
1590
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iter_utils.c
1599
struct module_env* env, struct outside_network* outnet)
usr.sbin/unbound/iterator/iter_utils.c
1605
ie = (struct iter_env*)env->modinfo[m];
usr.sbin/unbound/iterator/iter_utils.c
301
iter_filter_unsuitable(struct iter_env* iter_env, struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
321
if(infra_get_lame_rtt(env->infra_cache, &a->addr, a->addrlen,
usr.sbin/unbound/iterator/iter_utils.c
360
iter_fill_rtt(struct iter_env* iter_env, struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
372
a->sel_rtt = iter_filter_unsuitable(iter_env, env,
usr.sbin/unbound/iterator/iter_utils.c
439
iter_filter_order(struct iter_env* iter_env, struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.c
450
got_num = iter_fill_rtt(iter_env, env, name, namelen, qtype, now, dp,
usr.sbin/unbound/iterator/iter_utils.c
464
if(env->cfg->fast_server_permil != 0 && prefetch == 0 &&
usr.sbin/unbound/iterator/iter_utils.c
465
num_results > env->cfg->fast_server_num &&
usr.sbin/unbound/iterator/iter_utils.c
466
ub_random_max(env->rnd, 1000) < env->cfg->fast_server_permil) {
usr.sbin/unbound/iterator/iter_utils.c
471
env->cfg->fast_server_num);
usr.sbin/unbound/iterator/iter_utils.c
511
if (env->cfg->prefer_ip6) {
usr.sbin/unbound/iterator/iter_utils.c
569
} else if (env->cfg->prefer_ip4) {
usr.sbin/unbound/iterator/iter_utils.c
633
struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.c
641
int num = iter_filter_order(iter_env, env, name, namelen, qtype,
usr.sbin/unbound/iterator/iter_utils.c
642
*env->now, dp, &selrtt, open_target, blacklist, prefetch);
usr.sbin/unbound/iterator/iter_utils.c
685
sel = ub_random_max(env->rnd, num);
usr.sbin/unbound/iterator/iter_utils.c
737
iter_dns_store(struct module_env* env, struct query_info* msgqinf,
usr.sbin/unbound/iterator/iter_utils.c
742
if(!dns_cache_store(env, msgqinf, msgrep, is_referral, leeway,
usr.sbin/unbound/iterator/iter_utils.c
771
qstate->env->detect_cycle));
usr.sbin/unbound/iterator/iter_utils.c
772
return (*qstate->env->detect_cycle)(qstate, &qinf,
usr.sbin/unbound/iterator/iter_utils.c
879
iter_qname_indicates_dnssec(struct module_env* env, struct query_info *qinfo)
usr.sbin/unbound/iterator/iter_utils.c
882
if(!env || !env->anchors || !qinfo || !qinfo->qname)
usr.sbin/unbound/iterator/iter_utils.c
885
if((a=anchors_lookup(env->anchors, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/iterator/iter_utils.c
900
iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.c
905
if(!env || !env->anchors || !dp || !dp->name)
usr.sbin/unbound/iterator/iter_utils.c
908
if((a=anchor_find(env->anchors, dp->name, dp->namelabs, dp->namelen,
usr.sbin/unbound/iterator/iter_utils.c
924
if(env->key_cache) {
usr.sbin/unbound/iterator/iter_utils.c
925
struct key_entry_key* kk = key_cache_obtain(env->key_cache,
usr.sbin/unbound/iterator/iter_utils.c
926
dp->name, dp->namelen, dclass, env->scratch, *env->now);
usr.sbin/unbound/iterator/iter_utils.c
930
regional_free_all(env->scratch);
usr.sbin/unbound/iterator/iter_utils.c
933
regional_free_all(env->scratch);
usr.sbin/unbound/iterator/iter_utils.c
937
regional_free_all(env->scratch);
usr.sbin/unbound/iterator/iter_utils.h
110
struct module_env* env, struct delegpt* dp, uint8_t* name,
usr.sbin/unbound/iterator/iter_utils.h
153
void iter_dns_store(struct module_env* env, struct query_info* qinf,
usr.sbin/unbound/iterator/iter_utils.h
211
int iter_qname_indicates_dnssec(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
224
int iter_indicates_dnssec(struct module_env* env, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_utils.h
288
void iter_store_parentside_rrset(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
297
void iter_store_parentside_NS(struct module_env* env, struct reply_info* rep);
usr.sbin/unbound/iterator/iter_utils.h
307
void iter_store_parentside_neg(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
322
int iter_lookup_parent_NS_from_cache(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
336
int iter_lookup_parent_glue_from_cache(struct module_env* env,
usr.sbin/unbound/iterator/iter_utils.h
432
struct module_env* env, struct outside_network* outnet);
usr.sbin/unbound/iterator/iterator.c
1014
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
102
if(!iter_apply_cfg(iter_env, env->cfg)) {
usr.sbin/unbound/iterator/iterator.c
1027
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1031
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
1032
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
1043
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
usr.sbin/unbound/iterator/iterator.c
1045
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1068
lock_rw_rdlock(&qstate->env->auth_zones->lock);
usr.sbin/unbound/iterator/iterator.c
1069
z = auth_zones_find_zone(qstate->env->auth_zones, delname, delnamelen,
usr.sbin/unbound/iterator/iterator.c
1072
lock_rw_unlock(&qstate->env->auth_zones->lock);
usr.sbin/unbound/iterator/iterator.c
1076
lock_rw_unlock(&qstate->env->auth_zones->lock);
usr.sbin/unbound/iterator/iterator.c
111
iter_deinit(struct module_env* env, int id)
usr.sbin/unbound/iterator/iterator.c
114
if(!env || !env->modinfo[id])
usr.sbin/unbound/iterator/iterator.c
1157
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
116
iter_env = (struct iter_env*)env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
1211
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
1217
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
usr.sbin/unbound/iterator/iterator.c
123
env->modinfo[id] = NULL;
usr.sbin/unbound/iterator/iterator.c
1251
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
1252
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
1294
if(mesh_jostle_exceeded(qstate->env->mesh))
usr.sbin/unbound/iterator/iterator.c
1340
dp = forwards_lookup(qstate->env->fwds, delname, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
1346
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iterator.c
1420
!can_have_last_resort(qstate->env, iq->dp->name,
usr.sbin/unbound/iterator/iterator.c
1431
if(qstate->env->auth_zones) {
usr.sbin/unbound/iterator/iterator.c
1476
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
1495
msg = dns_cache_lookup(qstate->env, iq->qchase.qname,
usr.sbin/unbound/iterator/iterator.c
1498
qstate->region, qstate->env->scratch, 0, dpname,
usr.sbin/unbound/iterator/iterator.c
1500
if(!msg && qstate->env->neg_cache &&
usr.sbin/unbound/iterator/iterator.c
1501
iter_qname_indicates_dnssec(qstate->env, &iq->qchase)) {
usr.sbin/unbound/iterator/iterator.c
1504
msg = val_neg_getmsg(qstate->env->neg_cache, &iq->qchase,
usr.sbin/unbound/iterator/iterator.c
1505
qstate->region, qstate->env->rrset_cache,
usr.sbin/unbound/iterator/iterator.c
1506
qstate->env->scratch_buffer,
usr.sbin/unbound/iterator/iterator.c
1507
*qstate->env->now, 1/*add SOA*/, NULL,
usr.sbin/unbound/iterator/iterator.c
1508
qstate->env->cfg);
usr.sbin/unbound/iterator/iterator.c
1550
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
1573
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
1619
&& can_have_last_resort(qstate->env, delname, delnamelen, iq->qchase.qclass, NULL, NULL, NULL))) {
usr.sbin/unbound/iterator/iterator.c
162
if (qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
1637
iq->dp = dns_cache_find_delegation(qstate->env, delname,
usr.sbin/unbound/iterator/iterator.c
1640
*qstate->env->now+qstate->prefetch_leeway, 1,
usr.sbin/unbound/iterator/iterator.c
1662
if(forwards_lookup_root(qstate->env->fwds,
usr.sbin/unbound/iterator/iterator.c
1664
lock_rw_unlock(&qstate->env->fwds->lock);
usr.sbin/unbound/iterator/iterator.c
1667
iq->dp = hints_find_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
1676
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1717
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen, iq->qchase.qclass, &have_dp, &iq->dp, qstate->region)) {
usr.sbin/unbound/iterator/iterator.c
1745
iq->dp = hints_find_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
1755
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
1820
qstate->env->hints, iq->qchase.qname, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
1828
if(stub) { lock_rw_unlock(&qstate->env->hints->lock); }
usr.sbin/unbound/iterator/iterator.c
1870
iq->dnssec_expected = iter_indicates_dnssec(qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
1889
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
usr.sbin/unbound/iterator/iterator.c
1893
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
1894
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
1933
qstate->env, subiq->dp, NULL,
usr.sbin/unbound/iterator/iterator.c
1937
subiq->dp = dns_cache_find_delegation(qstate->env,
usr.sbin/unbound/iterator/iterator.c
1940
*qstate->env->now+subq->prefetch_leeway,
usr.sbin/unbound/iterator/iterator.c
1945
qstate->env, subiq->dp, NULL,
usr.sbin/unbound/iterator/iterator.c
2050
if(!iter_ns_probability(qstate->env->rnd, toget, missing)) {
usr.sbin/unbound/iterator/iterator.c
2076
if(mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2101
if(mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2145
if(!can_have_last_resort(qstate->env, iq->dp->name, iq->dp->namelen,
usr.sbin/unbound/iterator/iterator.c
2156
if(qstate->env->cfg->harden_unverified_glue) {
usr.sbin/unbound/iterator/iterator.c
2157
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
2168
dp = hints_find_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
2183
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
2191
if(!iter_lookup_parent_NS_from_cache(qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
2204
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
2210
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
2218
if(iter_lookup_parent_glue_from_cache(qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
223
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
2266
!can_have_last_resort(qstate->env, ns->name, ns->namelen,
usr.sbin/unbound/iterator/iterator.c
2287
if(mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2322
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
245
if(!cache_fill_missing(super->env, super_iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
2655
struct dns_msg* msg = dns_cache_lookup(qstate->env,
usr.sbin/unbound/iterator/iterator.c
2659
qstate->env->scratch, 0, iq->dp->name,
usr.sbin/unbound/iterator/iterator.c
2668
qstate->env->need_to_validate &&
usr.sbin/unbound/iterator/iterator.c
2669
qstate->env->cfg->harden_below_nxdomain) {
usr.sbin/unbound/iterator/iterator.c
2703
else if(!qstate->env->cfg->qname_minimisation_strict)
usr.sbin/unbound/iterator/iterator.c
2716
if(auth_zones_can_fallback(qstate->env->auth_zones,
usr.sbin/unbound/iterator/iterator.c
2727
} else if(auth_zones_lookup(qstate->env->auth_zones, &iq->qinfo_out,
usr.sbin/unbound/iterator/iterator.c
2738
qstate->env->mesh->num_query_authzone_up++;
usr.sbin/unbound/iterator/iterator.c
2777
&& !mesh_jostle_exceeded(qstate->env->mesh)) {
usr.sbin/unbound/iterator/iterator.c
2849
if(qstate->env->auth_zones) {
usr.sbin/unbound/iterator/iterator.c
2884
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
2889
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
2890
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
2910
target = iter_server_selection(ie, qstate->env, iq->dp,
usr.sbin/unbound/iterator/iterator.c
3017
&& !ub_random_max(qstate->env->rnd, 10)) {
usr.sbin/unbound/iterator/iterator.c
305
if(dns_cache_prefetch_adjust(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
3074
fptr_ok(fptr_whitelist_modenv_send_query(qstate->env->send_query));
usr.sbin/unbound/iterator/iterator.c
3075
outq = (*qstate->env->send_query)(&iq->qinfo_out,
usr.sbin/unbound/iterator/iterator.c
3080
(qstate->env->cfg->disable_edns_do?0:EDNS_DO)|
usr.sbin/unbound/iterator/iterator.c
3082
!qstate->blacklist&&(!iter_qname_indicates_dnssec(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3087
(iq->dp->tcp_upstream || qstate->env->cfg->tcp_upstream),
usr.sbin/unbound/iterator/iterator.c
3088
(iq->dp->ssl_upstream || qstate->env->cfg->ssl_upstream),
usr.sbin/unbound/iterator/iterator.c
310
if((msg=msg_cache_lookup(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3103
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
314
qstate->env->cfg->serve_expired)) != NULL) {
usr.sbin/unbound/iterator/iterator.c
3151
if(!inplace_cb_query_response_call(qstate->env, qstate, iq->response))
usr.sbin/unbound/iterator/iterator.c
3156
if(qstate->env->cfg->qname_minimisation) {
usr.sbin/unbound/iterator/iterator.c
316
if(qstate->env->cfg->serve_expired && rep) {
usr.sbin/unbound/iterator/iterator.c
317
if(qstate->env->cfg->serve_expired_ttl_reset &&
usr.sbin/unbound/iterator/iterator.c
318
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
usr.sbin/unbound/iterator/iterator.c
3191
if(!qstate->env->cfg->disable_dnssec_lame_check && iq->dnssec_expected
usr.sbin/unbound/iterator/iterator.c
322
rep->serve_expired_ttl = *qstate->env->now +
usr.sbin/unbound/iterator/iterator.c
323
qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/iterator/iterator.c
328
*qstate->env->now;
usr.sbin/unbound/iterator/iterator.c
3293
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3294
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3309
iter_dns_store(qstate->env, &iq->response->qinfo,
usr.sbin/unbound/iterator/iterator.c
3320
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3321
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3331
if(qstate->env->cfg->qname_minimisation_strict) {
usr.sbin/unbound/iterator/iterator.c
3359
if(qstate->env->cfg->harden_below_nxdomain &&
usr.sbin/unbound/iterator/iterator.c
336
(qstate->env->cfg->serve_expired ||
usr.sbin/unbound/iterator/iterator.c
3360
qstate->env->need_to_validate) {
usr.sbin/unbound/iterator/iterator.c
337
*qstate->env->now <= rep->ttl)) {
usr.sbin/unbound/iterator/iterator.c
3389
(!qstate->env->cfg->harden_referral_path ||
usr.sbin/unbound/iterator/iterator.c
3407
iter_dns_store(qstate->env, &iq->response->qinfo,
usr.sbin/unbound/iterator/iterator.c
3411
iter_store_parentside_NS(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3413
if(qstate->env->neg_cache)
usr.sbin/unbound/iterator/iterator.c
3414
val_neg_addreferral(qstate->env->neg_cache,
usr.sbin/unbound/iterator/iterator.c
3426
iter_store_parentside_rrset(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3437
if (qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
3452
rrset_cache_remove_above(qstate->env->rrset_cache,
usr.sbin/unbound/iterator/iterator.c
3454
iq->qchase.qclass, *qstate->env->now,
usr.sbin/unbound/iterator/iterator.c
3457
if(!cache_fill_missing(qstate->env, iq->qchase.qclass,
usr.sbin/unbound/iterator/iterator.c
3473
iq->dnssec_expected = iter_indicates_dnssec(qstate->env,
usr.sbin/unbound/iterator/iterator.c
3476
if(iq->dnssec_expected && qstate->env->cfg->prefetch_key &&
usr.sbin/unbound/iterator/iterator.c
3484
if(qstate->env->cfg->harden_referral_path)
usr.sbin/unbound/iterator/iterator.c
3494
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3495
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3520
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3521
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3545
iter_dns_store(qstate->env, &iq->response->qinfo,
usr.sbin/unbound/iterator/iterator.c
3553
if(qstate->env->auth_zones) {
usr.sbin/unbound/iterator/iterator.c
359
iter_dns_store(qstate->env, &qstate->qinfo, &err, 0, 0, 0, NULL,
usr.sbin/unbound/iterator/iterator.c
3597
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
3607
qstate->env->detach_subs));
usr.sbin/unbound/iterator/iterator.c
3608
(*qstate->env->detach_subs)(qstate);
usr.sbin/unbound/iterator/iterator.c
3627
if(!infra_set_lame(qstate->env->infra_cache,
usr.sbin/unbound/iterator/iterator.c
3631
*qstate->env->now, dnsseclame, 0,
usr.sbin/unbound/iterator/iterator.c
3646
if(!infra_set_lame(qstate->env->infra_cache,
usr.sbin/unbound/iterator/iterator.c
3650
*qstate->env->now, 0, 1, iq->qchase.qtype))
usr.sbin/unbound/iterator/iterator.c
3667
if (qstate->env->cfg->qname_minimisation &&
usr.sbin/unbound/iterator/iterator.c
3668
!qstate->env->cfg->qname_minimisation_strict)
usr.sbin/unbound/iterator/iterator.c
3673
if(!auth_zones_can_fallback(qstate->env->auth_zones,
usr.sbin/unbound/iterator/iterator.c
3779
if(qstate->env->cfg->harden_referral_path) {
usr.sbin/unbound/iterator/iterator.c
3815
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
4064
while(iter_get_next_root(qstate->env->hints,
usr.sbin/unbound/iterator/iterator.c
4065
qstate->env->fwds, &c)) {
usr.sbin/unbound/iterator/iterator.c
4117
iter_store_parentside_neg(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
4139
if((qstate->env->cfg->val_log_level >= 2 ||
usr.sbin/unbound/iterator/iterator.c
4140
qstate->env->cfg->log_servfail) && qstate->errinf &&
usr.sbin/unbound/iterator/iterator.c
4141
!qstate->env->cfg->val_log_squelch) {
usr.sbin/unbound/iterator/iterator.c
4169
iter_dns_store(qstate->env, &qstate->qinfo,
usr.sbin/unbound/iterator/iterator.c
4299
qstate->env->cfg->use_caps_bits_for_id &&
usr.sbin/unbound/iterator/iterator.c
4329
prs = (struct msg_parse*)regional_alloc(qstate->env->scratch,
usr.sbin/unbound/iterator/iterator.c
4340
if(parse_packet(pkt, prs, qstate->env->scratch) != LDNS_RCODE_NOERROR) {
usr.sbin/unbound/iterator/iterator.c
4346
if(parse_extract_edns_from_response_msg(prs, &edns, qstate->env->scratch) !=
usr.sbin/unbound/iterator/iterator.c
4363
if(!inplace_cb_edns_back_parsed_call(qstate->env, qstate)) {
usr.sbin/unbound/iterator/iterator.c
4373
qstate->env->scratch, qstate->env, qstate, ie)) {
usr.sbin/unbound/iterator/iterator.c
4400
if(qstate->env->cfg->aggressive_nsec) {
usr.sbin/unbound/iterator/iterator.c
4404
if(qstate->env->cfg->qname_minimisation &&
usr.sbin/unbound/iterator/iterator.c
4455
qstate->env->scratch)) {
usr.sbin/unbound/iterator/iterator.c
4484
struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
4546
iter_get_mem(struct module_env* env, int id)
usr.sbin/unbound/iterator/iterator.c
4548
struct iter_env* ie = (struct iter_env*)env->modinfo[id];
usr.sbin/unbound/iterator/iterator.c
632
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
usr.sbin/unbound/iterator/iterator.c
684
can_have_last_resort(struct module_env* env, uint8_t* nm, size_t ATTR_UNUSED(nmlen),
usr.sbin/unbound/iterator/iterator.c
694
(dp = hints_find(env->hints, nm, qclass, nolock)) &&
usr.sbin/unbound/iterator/iterator.c
699
lock_rw_unlock(&env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
704
lock_rw_unlock(&env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
707
if((dp = forwards_find(env->fwds, nm, qclass, nolock)) &&
usr.sbin/unbound/iterator/iterator.c
712
lock_rw_unlock(&env->fwds->lock);
usr.sbin/unbound/iterator/iterator.c
717
if(dp) { lock_rw_unlock(&env->fwds->lock); }
usr.sbin/unbound/iterator/iterator.c
831
qstate->env->add_sub));
usr.sbin/unbound/iterator/iterator.c
832
if(!(*qstate->env->add_sub)(qstate, &qinf,
usr.sbin/unbound/iterator/iterator.c
840
qstate->env->attach_sub));
usr.sbin/unbound/iterator/iterator.c
841
if(!(*qstate->env->attach_sub)(qstate, &qinf, qflags, prime,
usr.sbin/unbound/iterator/iterator.c
856
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
857
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
87
iter_init(struct module_env* env, int id)
usr.sbin/unbound/iterator/iterator.c
878
if(qstate->env->cfg->qname_minimisation)
usr.sbin/unbound/iterator/iterator.c
905
dp = hints_find_root(qstate->env->hints, qclass, nolock);
usr.sbin/unbound/iterator/iterator.c
915
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
926
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
930
qstate->env->kill_sub));
usr.sbin/unbound/iterator/iterator.c
931
(*qstate->env->kill_sub)(subq);
usr.sbin/unbound/iterator/iterator.c
937
qstate->env, subiq->dp, NULL, subq->qinfo.qclass);
usr.sbin/unbound/iterator/iterator.c
939
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
95
env->modinfo[id] = (void*)iter_env;
usr.sbin/unbound/iterator/iterator.c
973
stub = hints_lookup_stub(qstate->env->hints, qname, qclass, iq->dp,
usr.sbin/unbound/iterator/iterator.c
982
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.c
993
lock_rw_unlock(&qstate->env->hints->lock);
usr.sbin/unbound/iterator/iterator.h
514
int iter_init(struct module_env* env, int id);
usr.sbin/unbound/iterator/iterator.h
517
void iter_deinit(struct module_env* env, int id);
usr.sbin/unbound/iterator/iterator.h
540
size_t iter_get_mem(struct module_env* env, int id);
usr.sbin/unbound/libunbound/context.c
100
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/libunbound/context.c
102
slabhash_delete(ctx->env->msg_cache);
usr.sbin/unbound/libunbound/context.c
103
ctx->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
usr.sbin/unbound/libunbound/context.c
107
if(!ctx->env->msg_cache)
usr.sbin/unbound/libunbound/context.c
110
ctx->env->rrset_cache = rrset_cache_adjust(ctx->env->rrset_cache,
usr.sbin/unbound/libunbound/context.c
111
ctx->env->cfg, ctx->env->alloc);
usr.sbin/unbound/libunbound/context.c
112
if(!ctx->env->rrset_cache)
usr.sbin/unbound/libunbound/context.c
114
ctx->env->infra_cache = infra_adjust(ctx->env->infra_cache, cfg);
usr.sbin/unbound/libunbound/context.c
115
if(!ctx->env->infra_cache)
usr.sbin/unbound/libunbound/context.c
63
struct config_file* cfg = ctx->env->cfg;
usr.sbin/unbound/libunbound/context.c
78
if(!modstack_call_startup(&ctx->mods, cfg->module_conf, ctx->env))
usr.sbin/unbound/libunbound/context.c
80
if(!modstack_call_init(&ctx->mods, cfg->module_conf, ctx->env))
usr.sbin/unbound/libunbound/context.c
83
log_edns_known_options(VERB_ALGO, ctx->env);
usr.sbin/unbound/libunbound/context.c
89
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
usr.sbin/unbound/libunbound/context.c
90
ctx->env, &ctx->mods))
usr.sbin/unbound/libunbound/context.c
92
if(!(ctx->env->fwds = forwards_create()) ||
usr.sbin/unbound/libunbound/context.c
93
!forwards_apply_cfg(ctx->env->fwds, cfg))
usr.sbin/unbound/libunbound/context.c
95
if(!(ctx->env->hints = hints_create()) ||
usr.sbin/unbound/libunbound/context.c
96
!hints_apply_cfg(ctx->env->hints, cfg))
usr.sbin/unbound/libunbound/context.c
98
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
usr.sbin/unbound/libunbound/context.h
118
struct module_env* env;
usr.sbin/unbound/libunbound/libunbound.c
1010
if(!ctx->env->cfg->forwards ||
usr.sbin/unbound/libunbound/libunbound.c
1011
(ctx->env->cfg->forwards->name &&
usr.sbin/unbound/libunbound/libunbound.c
1012
strcmp(ctx->env->cfg->forwards->name, ".") != 0)) {
usr.sbin/unbound/libunbound/libunbound.c
1026
s->next = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
1027
ctx->env->cfg->forwards = s;
usr.sbin/unbound/libunbound/libunbound.c
1029
log_assert(ctx->env->cfg->forwards);
usr.sbin/unbound/libunbound/libunbound.c
1030
log_assert(ctx->env->cfg->forwards->name);
usr.sbin/unbound/libunbound/libunbound.c
1031
s = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
1056
ctx->env->cfg->ssl_upstream = tls;
usr.sbin/unbound/libunbound/libunbound.c
1099
prev = &ctx->env->cfg->stubs;
usr.sbin/unbound/libunbound/libunbound.c
1121
elem->next = ctx->env->cfg->stubs;
usr.sbin/unbound/libunbound/libunbound.c
1122
ctx->env->cfg->stubs = elem;
usr.sbin/unbound/libunbound/libunbound.c
126
ctx->env = (struct module_env*)calloc(1, sizeof(*ctx->env));
usr.sbin/unbound/libunbound/libunbound.c
127
if(!ctx->env) {
usr.sbin/unbound/libunbound/libunbound.c
1318
if(!cfg_strlist_insert(&ctx->env->cfg->local_data,
usr.sbin/unbound/libunbound/libunbound.c
133
ctx->env->cfg = config_create_forlib();
usr.sbin/unbound/libunbound/libunbound.c
134
if(!ctx->env->cfg) {
usr.sbin/unbound/libunbound/libunbound.c
135
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
142
if(!edns_known_options_init(ctx->env)) {
usr.sbin/unbound/libunbound/libunbound.c
143
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
144
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
150
ctx->env->auth_zones = auth_zones_create();
usr.sbin/unbound/libunbound/libunbound.c
151
if(!ctx->env->auth_zones) {
usr.sbin/unbound/libunbound/libunbound.c
152
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
153
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
154
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
160
ctx->env->edns_strings = edns_strings_create();
usr.sbin/unbound/libunbound/libunbound.c
161
if(!ctx->env->edns_strings) {
usr.sbin/unbound/libunbound/libunbound.c
162
auth_zones_delete(ctx->env->auth_zones);
usr.sbin/unbound/libunbound/libunbound.c
163
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
164
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
165
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
172
ctx->env->alloc = &ctx->superalloc;
usr.sbin/unbound/libunbound/libunbound.c
173
ctx->env->worker = NULL;
usr.sbin/unbound/libunbound/libunbound.c
174
ctx->env->need_to_validate = 0;
usr.sbin/unbound/libunbound/libunbound.c
176
ctx->env->modstack = &ctx->mods;
usr.sbin/unbound/libunbound/libunbound.c
190
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
191
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
192
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
195
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
196
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
197
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
206
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
207
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
208
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
211
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
212
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
213
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
367
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
368
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
384
if(ctx->env) {
usr.sbin/unbound/libunbound/libunbound.c
385
slabhash_delete(ctx->env->msg_cache);
usr.sbin/unbound/libunbound/libunbound.c
386
rrset_cache_delete(ctx->env->rrset_cache);
usr.sbin/unbound/libunbound/libunbound.c
387
infra_delete(ctx->env->infra_cache);
usr.sbin/unbound/libunbound/libunbound.c
388
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
389
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
390
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
391
forwards_delete(ctx->env->fwds);
usr.sbin/unbound/libunbound/libunbound.c
392
hints_delete(ctx->env->hints);
usr.sbin/unbound/libunbound/libunbound.c
393
auth_zones_delete(ctx->env->auth_zones);
usr.sbin/unbound/libunbound/libunbound.c
394
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
420
if(!config_set_option(ctx->env->cfg, opt, val)) {
usr.sbin/unbound/libunbound/libunbound.c
433
r = config_get_option_collate(ctx->env->cfg, opt, str);
usr.sbin/unbound/libunbound/libunbound.c
449
if(!config_read(ctx->env->cfg, fname, NULL)) {
usr.sbin/unbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
505
if(!cfg_strlist_insert(&ctx->env->cfg->auto_trust_anchor_file_list,
usr.sbin/unbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
538
ctx->env->cfg->verbosity = d;
usr.sbin/unbound/libunbound/libunbound.c
989
if(ctx->env->cfg->forwards &&
usr.sbin/unbound/libunbound/libunbound.c
990
(ctx->env->cfg->forwards->name &&
usr.sbin/unbound/libunbound/libunbound.c
991
strcmp(ctx->env->cfg->forwards->name, ".") == 0)) {
usr.sbin/unbound/libunbound/libunbound.c
992
s = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
993
ctx->env->cfg->forwards = s->next;
usr.sbin/unbound/libunbound/libworker.c
100
regional_destroy(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
101
ub_randfree(w->env->rnd);
usr.sbin/unbound/libunbound/libworker.c
102
free(w->env);
usr.sbin/unbound/libunbound/libworker.c
134
struct config_file* cfg = ctx->env->cfg;
usr.sbin/unbound/libunbound/libworker.c
140
w->env = (struct module_env*)malloc(sizeof(*w->env));
usr.sbin/unbound/libunbound/libworker.c
141
if(!w->env) {
usr.sbin/unbound/libunbound/libworker.c
145
*w->env = *ctx->env;
usr.sbin/unbound/libunbound/libworker.c
146
w->env->alloc = context_obtain_alloc(ctx, !w->is_bg || w->is_bg_thread);
usr.sbin/unbound/libunbound/libworker.c
147
if(!w->env->alloc) {
usr.sbin/unbound/libunbound/libworker.c
151
w->thread_num = w->env->alloc->thread_num;
usr.sbin/unbound/libunbound/libworker.c
152
alloc_set_id_cleanup(w->env->alloc, &libworker_alloc_cleanup, w);
usr.sbin/unbound/libunbound/libworker.c
156
w->env->scratch = regional_create_custom(cfg->msg_buffer_size);
usr.sbin/unbound/libunbound/libworker.c
157
w->env->scratch_buffer = sldns_buffer_new(cfg->msg_buffer_size);
usr.sbin/unbound/libunbound/libworker.c
163
sldns_buffer_free(w->env->scratch_buffer);
usr.sbin/unbound/libunbound/libworker.c
164
w->env->scratch_buffer = NULL;
usr.sbin/unbound/libunbound/libworker.c
170
if(!w->env->scratch || !w->env->scratch_buffer) {
usr.sbin/unbound/libunbound/libworker.c
174
w->env->worker = (struct worker*)w;
usr.sbin/unbound/libunbound/libworker.c
175
w->env->probe_timer = NULL;
usr.sbin/unbound/libunbound/libworker.c
179
if(!(w->env->rnd = ub_initstate(ctx->seed_rnd))) {
usr.sbin/unbound/libunbound/libworker.c
199
hash_set_raninit((uint32_t)ub_random(w->env->rnd));
usr.sbin/unbound/libunbound/libworker.c
210
w->env->worker_base = w->base;
usr.sbin/unbound/libunbound/libworker.c
226
w->env->infra_cache, w->env->rnd, cfg->use_caps_bits_for_id,
usr.sbin/unbound/libunbound/libworker.c
233
w->env->outnet = w->back;
usr.sbin/unbound/libunbound/libworker.c
242
w->env->mesh = mesh_create(&ctx->mods, w->env);
usr.sbin/unbound/libunbound/libworker.c
243
if(!w->env->mesh) {
usr.sbin/unbound/libunbound/libworker.c
247
w->env->send_query = &libworker_send_query;
usr.sbin/unbound/libunbound/libworker.c
248
w->env->detach_subs = &mesh_detach_subs;
usr.sbin/unbound/libunbound/libworker.c
249
w->env->attach_sub = &mesh_attach_sub;
usr.sbin/unbound/libunbound/libworker.c
250
w->env->add_sub = &mesh_add_sub;
usr.sbin/unbound/libunbound/libworker.c
251
w->env->kill_sub = &mesh_state_delete;
usr.sbin/unbound/libunbound/libworker.c
252
w->env->detect_cycle = &mesh_detect_cycle;
usr.sbin/unbound/libunbound/libworker.c
253
comm_base_timept(w->base, &w->env->now, &w->env->now_tv);
usr.sbin/unbound/libunbound/libworker.c
562
libworker_enter_result(q->res, buf, q->w->env->scratch, s);
usr.sbin/unbound/libunbound/libworker.c
623
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
624
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
usr.sbin/unbound/libunbound/libworker.c
626
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
633
if(ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
634
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
635
w->back->udp_buff, w->env->scratch)) {
usr.sbin/unbound/libunbound/libworker.c
636
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
644
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
usr.sbin/unbound/libunbound/libworker.c
704
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
705
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
usr.sbin/unbound/libunbound/libworker.c
707
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
713
if(ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
714
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
715
w->back->udp_buff, w->env->scratch)) {
usr.sbin/unbound/libunbound/libworker.c
716
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
725
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
usr.sbin/unbound/libunbound/libworker.c
805
buf = q->w->env->scratch_buffer;
usr.sbin/unbound/libunbound/libworker.c
843
if(local_zones_answer(w->ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
844
w->back->udp_buff, w->env->scratch, NULL, NULL, 0, NULL, 0,
usr.sbin/unbound/libunbound/libworker.c
846
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
852
if(w->ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
853
w->ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
854
w->back->udp_buff, w->env->scratch)) {
usr.sbin/unbound/libunbound/libworker.c
855
regional_free_all(w->env->scratch);
usr.sbin/unbound/libunbound/libworker.c
863
if(!mesh_new_callback(w->env->mesh, &qinfo, qflags, &edns,
usr.sbin/unbound/libunbound/libworker.c
873
slabhash_clear(&w->env->rrset_cache->table);
usr.sbin/unbound/libunbound/libworker.c
874
slabhash_clear(w->env->msg_cache);
usr.sbin/unbound/libunbound/libworker.c
884
struct libworker* w = (struct libworker*)q->env->worker;
usr.sbin/unbound/libunbound/libworker.c
893
libworker_handle_service_reply, e, w->back->udp_buff, q->env,
usr.sbin/unbound/libunbound/libworker.c
906
struct libworker* lw = (struct libworker*)e->qstate->env->worker;
usr.sbin/unbound/libunbound/libworker.c
909
mesh_report_reply(lw->env->mesh, e, reply_info, error);
usr.sbin/unbound/libunbound/libworker.c
919
mesh_report_reply(lw->env->mesh, e, reply_info,
usr.sbin/unbound/libunbound/libworker.c
923
mesh_report_reply(lw->env->mesh, e, reply_info, NETEVENT_NOERROR);
usr.sbin/unbound/libunbound/libworker.c
94
if(w->env) {
usr.sbin/unbound/libunbound/libworker.c
96
mesh_delete(w->env->mesh);
usr.sbin/unbound/libunbound/libworker.c
97
context_release_alloc(w->ctx, w->env->alloc,
usr.sbin/unbound/libunbound/libworker.c
99
sldns_buffer_free(w->env->scratch_buffer);
usr.sbin/unbound/libunbound/libworker.h
82
struct module_env* env;
usr.sbin/unbound/respip/respip.c
1076
fptr_ok(fptr_whitelist_modenv_attach_sub(qstate->env->attach_sub));
usr.sbin/unbound/respip/respip.c
1077
return (*qstate->env->attach_sub)(qstate, &subqi, BIT_RD, 0, 0, &subq);
usr.sbin/unbound/respip/respip.c
1122
qstate->region, qstate->env->auth_zones,
usr.sbin/unbound/respip/respip.c
1123
&qstate->rpz_passthru, qstate->env->views,
usr.sbin/unbound/respip/respip.c
1124
qstate->env->respip_set)) {
usr.sbin/unbound/respip/respip.c
1252
super->env->need_to_validate, &new_rep, super->region,
usr.sbin/unbound/respip/respip.c
1253
qstate->env->auth_zones, qstate->env->views,
usr.sbin/unbound/respip/respip.c
1254
qstate->env->respip_set))
usr.sbin/unbound/respip/respip.c
1272
respip_get_mem(struct module_env* env, int id)
usr.sbin/unbound/respip/respip.c
1274
(void)env;
usr.sbin/unbound/respip/respip.c
558
respip_init(struct module_env* env, int id)
usr.sbin/unbound/respip/respip.c
560
(void)env;
usr.sbin/unbound/respip/respip.c
566
respip_deinit(struct module_env* env, int id)
usr.sbin/unbound/respip/respip.c
568
(void)env;
usr.sbin/unbound/respip/respip.h
207
int respip_init(struct module_env* env, int id);
usr.sbin/unbound/respip/respip.h
210
void respip_deinit(struct module_env* env, int id);
usr.sbin/unbound/respip/respip.h
242
size_t respip_get_mem(struct module_env* env, int id);
usr.sbin/unbound/services/authzone.c
100
static void xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
104
struct module_env* env);
usr.sbin/unbound/services/authzone.c
107
static int xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
1757
struct module_env env;
usr.sbin/unbound/services/authzone.c
1761
env = *env_for_val;
usr.sbin/unbound/services/authzone.c
1762
env.scratch_buffer = sldns_buffer_new(env.cfg->msg_buffer_size);
usr.sbin/unbound/services/authzone.c
1763
if(!env.scratch_buffer) {
usr.sbin/unbound/services/authzone.c
1767
env.scratch = regional_create();
usr.sbin/unbound/services/authzone.c
1768
if(!env.now) {
usr.sbin/unbound/services/authzone.c
1769
env.now = &now;
usr.sbin/unbound/services/authzone.c
1772
if(!env.scratch) {
usr.sbin/unbound/services/authzone.c
1776
auth_zone_verify_zonemd(z, &env, mods, NULL, 1, 0);
usr.sbin/unbound/services/authzone.c
1780
sldns_buffer_free(env.scratch_buffer);
usr.sbin/unbound/services/authzone.c
1781
regional_destroy(env.scratch);
usr.sbin/unbound/services/authzone.c
1787
struct module_env* env, struct module_stack* mods)
usr.sbin/unbound/services/authzone.c
1798
if(z->zonefile && z->zonefile[0]!=0 && env)
usr.sbin/unbound/services/authzone.c
1799
zonemd_offline_verify(z, env, mods);
usr.sbin/unbound/services/authzone.c
1876
struct module_env* env, char** reason)
usr.sbin/unbound/services/authzone.c
1888
region = env->scratch;
usr.sbin/unbound/services/authzone.c
1890
buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
2246
int setup, int* is_rpz, struct module_env* env,
usr.sbin/unbound/services/authzone.c
2263
if(!auth_zones_read_zones(az, cfg, env, mods))
usr.sbin/unbound/services/authzone.c
3516
auth_answer_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3527
if(!inplace_cb_reply_local_call(env, qinfo, NULL, msg->rep,
usr.sbin/unbound/services/authzone.c
3528
(int)FLAGS_GET_RCODE(msg->rep->flags), edns, repinfo, temp, env->now_tv)
usr.sbin/unbound/services/authzone.c
3542
auth_error_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3551
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
usr.sbin/unbound/services/authzone.c
3552
rcode, edns, repinfo, temp, env->now_tv))
usr.sbin/unbound/services/authzone.c
3559
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3611
env->mesh->num_query_authzone_down++;
usr.sbin/unbound/services/authzone.c
3612
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/authzone.c
3624
env->mesh->num_query_authzone_down++;
usr.sbin/unbound/services/authzone.c
3628
auth_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/authzone.c
3630
else auth_answer_encode(qinfo, env, edns, repinfo, buf, temp, msg);
usr.sbin/unbound/services/authzone.c
3811
xfr_process_notify(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3821
if(!xfr_start_probe(xfr, env, fromhost)) {
usr.sbin/unbound/services/authzone.c
3829
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3857
xfr_process_notify(xfr, env, has_serial, serial, fromhost);
usr.sbin/unbound/services/authzone.c
3862
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass)
usr.sbin/unbound/services/authzone.c
3874
xfr_process_notify(xfr, env, 0, 0, NULL);
usr.sbin/unbound/services/authzone.c
3880
auth_xfer_set_expired(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
3891
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
3892
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
usr.sbin/unbound/services/authzone.c
3895
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
3899
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
4033
xfr_transfer_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
4037
if(!xfr->task_transfer->lookup_aaaa && env->cfg->do_ip6) {
usr.sbin/unbound/services/authzone.c
4045
if(!env->cfg->do_ip4 && xfr->task_transfer->lookup_target!=NULL)
usr.sbin/unbound/services/authzone.c
4064
xfr_probe_move_to_next_lookup(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
4068
if(!xfr->task_probe->lookup_aaaa && env->cfg->do_ip6) {
usr.sbin/unbound/services/authzone.c
4075
if(!env->cfg->do_ip4 && xfr->task_probe->lookup_target!=NULL)
usr.sbin/unbound/services/authzone.c
5197
xfr_write_after_update(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5199
struct config_file* cfg = env->cfg;
usr.sbin/unbound/services/authzone.c
5207
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5208
z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
usr.sbin/unbound/services/authzone.c
5211
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5218
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5272
struct module_env* env, struct auth_zone** z)
usr.sbin/unbound/services/authzone.c
5276
lock_rw_rdlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5277
*z = auth_zone_find(env->auth_zones, xfr->name, xfr->namelen,
usr.sbin/unbound/services/authzone.c
5280
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5287
lock_rw_unlock(&env->auth_zones->lock);
usr.sbin/unbound/services/authzone.c
5294
xfr_process_chunk_list(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
5301
if(!xfr_process_reacquire_locks(xfr, env, &z)) {
usr.sbin/unbound/services/authzone.c
5309
if(!apply_http(xfr, z, env->scratch_buffer)) {
usr.sbin/unbound/services/authzone.c
5317
if(!apply_ixfr(xfr, z, env->scratch_buffer)) {
usr.sbin/unbound/services/authzone.c
5325
if(!apply_axfr(xfr, z, env->scratch_buffer)) {
usr.sbin/unbound/services/authzone.c
5340
z->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
5341
xfr->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
5347
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 0);
usr.sbin/unbound/services/authzone.c
5355
if(!xfr_process_reacquire_locks(xfr, env, &z))
usr.sbin/unbound/services/authzone.c
5367
if(!xfr_process_reacquire_locks(xfr, env, &z))
usr.sbin/unbound/services/authzone.c
5372
xfr->lease_time = *env->now;
usr.sbin/unbound/services/authzone.c
5387
xfr_write_after_update(xfr, env);
usr.sbin/unbound/services/authzone.c
5403
xfr->task_transfer->env = NULL;
usr.sbin/unbound/services/authzone.c
5408
xfr_transfer_lookup_host(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5417
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
5466
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/services/authzone.c
5479
xfr_transfer_init_fetch(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5513
xfr->task_transfer->timer = comm_timer_create(env->worker_base,
usr.sbin/unbound/services/authzone.c
5534
env->outnet, auth_xfer_transfer_http_callback, xfr,
usr.sbin/unbound/services/authzone.c
5536
master->file, env->cfg);
usr.sbin/unbound/services/authzone.c
5560
xfr->task_transfer->id = GET_RANDOM_ID(env->rnd);
usr.sbin/unbound/services/authzone.c
5561
xfr_create_ixfr_packet(xfr, env->scratch_buffer,
usr.sbin/unbound/services/authzone.c
5565
xfr->task_transfer->cp = outnet_comm_point_for_tcp(env->outnet,
usr.sbin/unbound/services/authzone.c
5567
env->scratch_buffer, -1,
usr.sbin/unbound/services/authzone.c
5590
xfr_transfer_nexttarget_or_end(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
5592
log_assert(xfr->task_transfer->worker == env->worker);
usr.sbin/unbound/services/authzone.c
5596
if(xfr_transfer_lookup_host(xfr, env)) {
usr.sbin/unbound/services/authzone.c
5610
xfr_transfer_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
5617
if(xfr_transfer_init_fetch(xfr, env)) {
usr.sbin/unbound/services/authzone.c
5637
xfr_set_timeout(xfr, env, 1, 0);
usr.sbin/unbound/services/authzone.c
5700
struct module_env* env;
usr.sbin/unbound/services/authzone.c
5703
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
5704
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
5712
struct regional* temp = env->scratch;
usr.sbin/unbound/services/authzone.c
5755
xfr_transfer_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
5756
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6085
process_list_end_transfer(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
6088
if(xfr_process_chunk_list(xfr, env, &ixfr_fail)) {
usr.sbin/unbound/services/authzone.c
6105
if(!xfr_start_probe(xfr, env, NULL)) {
usr.sbin/unbound/services/authzone.c
6118
xfr_set_timeout(xfr, env, 0, 0);
usr.sbin/unbound/services/authzone.c
6131
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6139
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6143
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
6144
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6171
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6180
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6185
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
6186
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6220
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6244
process_list_end_transfer(xfr, env);
usr.sbin/unbound/services/authzone.c
6263
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6266
env = xfr->task_transfer->env;
usr.sbin/unbound/services/authzone.c
6267
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6289
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6310
process_list_end_transfer(xfr, env);
usr.sbin/unbound/services/authzone.c
6326
xfr_start_transfer(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
6333
xfr->task_transfer->worker = env->worker;
usr.sbin/unbound/services/authzone.c
6334
xfr->task_transfer->env = env;
usr.sbin/unbound/services/authzone.c
6343
xfr_transfer_nexttarget_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6358
xfr->task_probe->env = NULL;
usr.sbin/unbound/services/authzone.c
6363
xfr_probe_send_probe(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
6395
== env->cfg->ssl_port)
usr.sbin/unbound/services/authzone.c
6397
= htons((uint16_t)env->cfg->port);
usr.sbin/unbound/services/authzone.c
6400
== env->cfg->ssl_port)
usr.sbin/unbound/services/authzone.c
6402
= htons((uint16_t)env->cfg->port);
usr.sbin/unbound/services/authzone.c
6410
xfr->task_probe->id = GET_RANDOM_ID(env->rnd);
usr.sbin/unbound/services/authzone.c
6411
xfr_create_soa_probe_packet(xfr, env->scratch_buffer,
usr.sbin/unbound/services/authzone.c
6425
xfr->task_probe->cp = outnet_comm_point_for_udp(env->outnet,
usr.sbin/unbound/services/authzone.c
6437
xfr->task_probe->timer = comm_timer_create(env->worker_base,
usr.sbin/unbound/services/authzone.c
6446
if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer,
usr.sbin/unbound/services/authzone.c
6477
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6480
env = xfr->task_probe->env;
usr.sbin/unbound/services/authzone.c
6481
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6493
if(xfr_probe_send_probe(xfr, env, xfr->task_probe->timeout*2)) {
usr.sbin/unbound/services/authzone.c
6504
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6513
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6516
env = xfr->task_probe->env;
usr.sbin/unbound/services/authzone.c
6517
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6555
xfr_start_transfer(xfr, env, master);
usr.sbin/unbound/services/authzone.c
6595
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6601
xfr_probe_lookup_host(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
6610
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
6661
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/services/authzone.c
6673
xfr_probe_send_or_end(struct auth_xfer* xfr, struct module_env* env)
usr.sbin/unbound/services/authzone.c
6677
if(xfr_probe_lookup_host(xfr, env)) {
usr.sbin/unbound/services/authzone.c
6691
xfr_probe_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
6711
xfr_set_timeout(xfr, env, 0, 0);
usr.sbin/unbound/services/authzone.c
6718
if(xfr_probe_send_probe(xfr, env, AUTH_PROBE_TIMEOUT)) {
usr.sbin/unbound/services/authzone.c
6737
xfr->lease_time = *env->now;
usr.sbin/unbound/services/authzone.c
6739
xfr_set_timeout(xfr, env, 0, 0);
usr.sbin/unbound/services/authzone.c
6751
xfr_set_timeout(xfr, env, 1, 0);
usr.sbin/unbound/services/authzone.c
6763
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6766
env = xfr->task_probe->env;
usr.sbin/unbound/services/authzone.c
6767
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6775
struct regional* temp = env->scratch;
usr.sbin/unbound/services/authzone.c
6818
xfr_probe_move_to_next_lookup(xfr, env);
usr.sbin/unbound/services/authzone.c
6819
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6833
xfr->task_nextprobe->env = NULL;
usr.sbin/unbound/services/authzone.c
6841
struct module_env* env;
usr.sbin/unbound/services/authzone.c
6844
env = xfr->task_nextprobe->env;
usr.sbin/unbound/services/authzone.c
6845
if(!env || env->outnet->want_to_quit) {
usr.sbin/unbound/services/authzone.c
6852
*env->now >= xfr->lease_time + xfr->expiry) {
usr.sbin/unbound/services/authzone.c
6854
auth_xfer_set_expired(xfr, env, 1);
usr.sbin/unbound/services/authzone.c
6860
if(!xfr_start_probe(xfr, env, NULL)) {
usr.sbin/unbound/services/authzone.c
6882
xfr_start_probe(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
6894
xfr_start_transfer(xfr, env, spec);
usr.sbin/unbound/services/authzone.c
6902
xfr->task_probe->worker = env->worker;
usr.sbin/unbound/services/authzone.c
6903
xfr->task_probe->env = env;
usr.sbin/unbound/services/authzone.c
6916
xfr_probe_send_or_end(xfr, env);
usr.sbin/unbound/services/authzone.c
6930
xfr_set_timeout(struct auth_xfer* xfr, struct module_env* env,
usr.sbin/unbound/services/authzone.c
6936
xfr->task_nextprobe->worker == env->worker);
usr.sbin/unbound/services/authzone.c
6940
xfr->task_nextprobe->next_probe = *env->now;
usr.sbin/unbound/services/authzone.c
6967
xfr->lease_time+xfr->expiry > *env->now)
usr.sbin/unbound/services/authzone.c
6977
env->worker_base, auth_xfer_timer, xfr);
usr.sbin/unbound/services/authzone.c
6988
xfr->task_nextprobe->worker = env->worker;
usr.sbin/unbound/services/authzone.c
6989
xfr->task_nextprobe->env = env;
usr.sbin/unbound/services/authzone.c
6990
if(*(xfr->task_nextprobe->env->now) <= xfr->task_nextprobe->next_probe)
usr.sbin/unbound/services/authzone.c
6992
*(xfr->task_nextprobe->env->now);
usr.sbin/unbound/services/authzone.c
7011
void auth_zone_pickup_initial_zone(struct auth_zone* z, struct module_env* env)
usr.sbin/unbound/services/authzone.c
7016
z->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
7019
void auth_xfer_pickup_initial_zone(struct auth_xfer* x, struct module_env* env)
usr.sbin/unbound/services/authzone.c
7025
x->lease_time = *env->now;
usr.sbin/unbound/services/authzone.c
7026
x->soa_zone_acquired = *env->now;
usr.sbin/unbound/services/authzone.c
7029
xfr_set_timeout(x, env, 0, 1);
usr.sbin/unbound/services/authzone.c
7035
auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env)
usr.sbin/unbound/services/authzone.c
7042
auth_zone_pickup_initial_zone(z, env);
usr.sbin/unbound/services/authzone.c
7047
auth_xfer_pickup_initial_zone(x, env);
usr.sbin/unbound/services/authzone.c
7822
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
7838
ve = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/services/authzone.c
7854
sec = dnskeyset_verify_rrset(env, ve, &pk, dnskey, sigalg, why_bogus, NULL,
usr.sbin/unbound/services/authzone.c
7896
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
7910
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
7953
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, match,
usr.sbin/unbound/services/authzone.c
7973
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
7988
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex, soa,
usr.sbin/unbound/services/authzone.c
7993
if(!zonemd_dnssec_verify_rrset(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
8010
static void auth_zone_zonemd_fail(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8032
if(env->cfg->zonemd_permissive_mode) {
usr.sbin/unbound/services/authzone.c
8058
auth_zone_verify_zonemd_with_key(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8086
auth_zone_zonemd_fail(z, env, "DNSKEY missing", NULL, result);
usr.sbin/unbound/services/authzone.c
8090
if(!zonemd_check_dnssec_absence(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
8093
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
usr.sbin/unbound/services/authzone.c
8099
if(!zonemd_check_dnssec_soazonemd(z, env, mods, dnskey, apex,
usr.sbin/unbound/services/authzone.c
8102
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
usr.sbin/unbound/services/authzone.c
8108
auth_zone_zonemd_fail(z, env, "ZONEMD absent and that is not allowed by config", NULL, result);
usr.sbin/unbound/services/authzone.c
8129
if(!auth_zone_zonemd_check_hash(z, env, &reason)) {
usr.sbin/unbound/services/authzone.c
8130
auth_zone_zonemd_fail(z, env, reason, NULL, result);
usr.sbin/unbound/services/authzone.c
8164
zonemd_get_dnskey_from_anchor(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8192
ve = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/services/authzone.c
8203
sec = val_verify_DNSKEY_with_TA(env, ve, keystorage, anchor->ds_rrset,
usr.sbin/unbound/services/authzone.c
8206
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8226
struct module_env* env, struct module_stack* mods,
usr.sbin/unbound/services/authzone.c
8254
ve = (struct val_env*)env->modinfo[m];
usr.sbin/unbound/services/authzone.c
8264
sec = val_verify_DNSKEY_with_DS(env, ve, keystorage, ds, sigalg,
usr.sbin/unbound/services/authzone.c
8266
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8290
struct module_env* env;
usr.sbin/unbound/services/authzone.c
8299
env = z->zonemd_callback_env;
usr.sbin/unbound/services/authzone.c
8303
if(!env || env->outnet->want_to_quit || z->zone_deleted) {
usr.sbin/unbound/services/authzone.c
8309
downprot = env->cfg->harden_algo_downgrade;
usr.sbin/unbound/services/authzone.c
8323
struct regional* temp = env->scratch;
usr.sbin/unbound/services/authzone.c
8401
dnskey = auth_zone_verify_zonemd_key_with_ds(z, env,
usr.sbin/unbound/services/authzone.c
8402
&env->mesh->mods, ds, &is_insecure, &ds_bogus,
usr.sbin/unbound/services/authzone.c
8410
auth_zone_zonemd_fail(z, env, reason, ds_bogus, NULL);
usr.sbin/unbound/services/authzone.c
8412
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8416
auth_zone_verify_zonemd_with_key(z, env, &env->mesh->mods, dnskey,
usr.sbin/unbound/services/authzone.c
8418
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8424
zonemd_lookup_dnskey(struct auth_zone* z, struct module_env* env)
usr.sbin/unbound/services/authzone.c
8429
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/services/authzone.c
8479
z->zonemd_callback_env = env;
usr.sbin/unbound/services/authzone.c
8483
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/services/authzone.c
8494
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.c
8515
if(env->anchors)
usr.sbin/unbound/services/authzone.c
8516
anchor = anchors_lookup(env->anchors, z->name, z->namelen,
usr.sbin/unbound/services/authzone.c
8531
dnskey = zonemd_get_dnskey_from_anchor(z, env, mods, anchor,
usr.sbin/unbound/services/authzone.c
8544
if(zonemd_lookup_dnskey(z, env)) {
usr.sbin/unbound/services/authzone.c
8558
auth_zone_zonemd_fail(z, env, reason, why_bogus, result);
usr.sbin/unbound/services/authzone.c
8559
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8563
auth_zone_verify_zonemd_with_key(z, env, mods, dnskey, is_insecure,
usr.sbin/unbound/services/authzone.c
8565
regional_free_all(env->scratch);
usr.sbin/unbound/services/authzone.c
8569
struct module_env* env)
usr.sbin/unbound/services/authzone.c
8593
auth_zone_verify_zonemd(z, env, &env->mesh->mods, NULL, 0, 1);
usr.sbin/unbound/services/authzone.h
301
struct module_env* env;
usr.sbin/unbound/services/authzone.h
327
struct module_env* env;
usr.sbin/unbound/services/authzone.h
375
struct module_env* env;
usr.sbin/unbound/services/authzone.h
496
int setup, int* is_rpz, struct module_env* env,
usr.sbin/unbound/services/authzone.h
504
void auth_xfer_pickup_initial(struct auth_zones* az, struct module_env* env);
usr.sbin/unbound/services/authzone.h
557
int auth_zones_downstream_answer(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.h
625
int auth_zones_notify(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/authzone.h
638
struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t dclass);
usr.sbin/unbound/services/authzone.h
775
void auth_zone_verify_zonemd(struct auth_zone* z, struct module_env* env,
usr.sbin/unbound/services/authzone.h
792
struct module_env* env);
usr.sbin/unbound/services/authzone.h
805
struct module_env* env);
usr.sbin/unbound/services/authzone.h
813
struct module_env* env);
usr.sbin/unbound/services/cache/dns.c
1013
if(env->cfg->harden_below_nxdomain) {
usr.sbin/unbound/services/cache/dns.c
1020
e = slabhash_lookup(env->msg_cache, h, &k, 0);
usr.sbin/unbound/services/cache/dns.c
1022
env->cfg->qname_minimisation) {
usr.sbin/unbound/services/cache/dns.c
1025
e = slabhash_lookup(env->msg_cache, h, &k, 0);
usr.sbin/unbound/services/cache/dns.c
1034
&& (msg=tomsg(env, &k, data, region, now, 0, scratch))) {
usr.sbin/unbound/services/cache/dns.c
1051
return fill_any(env, qname, qnamelen, qtype, qclass, region);
usr.sbin/unbound/services/cache/dns.c
1058
dns_cache_store(struct module_env* env, struct query_info* msgqinf,
usr.sbin/unbound/services/cache/dns.c
1067
struct msgreply_entry* e = msg_cache_lookup(env,
usr.sbin/unbound/services/cache/dns.c
1072
if(cached->ttl < *env->now
usr.sbin/unbound/services/cache/dns.c
1073
&& reply_info_could_use_expired(cached, *env->now)
usr.sbin/unbound/services/cache/dns.c
1082
&& (env->need_to_validate &&
usr.sbin/unbound/services/cache/dns.c
1105
NORR_TTL + *env->now;
usr.sbin/unbound/services/cache/dns.c
1106
if(env->cfg->serve_expired_ttl_reset &&
usr.sbin/unbound/services/cache/dns.c
1108
< *env->now +
usr.sbin/unbound/services/cache/dns.c
1109
env->cfg->serve_expired_ttl) {
usr.sbin/unbound/services/cache/dns.c
1116
*env->now +
usr.sbin/unbound/services/cache/dns.c
1117
env->cfg->serve_expired_ttl;
usr.sbin/unbound/services/cache/dns.c
1130
rep = reply_info_copy(msgrep, env->alloc, NULL);
usr.sbin/unbound/services/cache/dns.c
1142
rep->rrsets[i]->entry.data, *env->now);
usr.sbin/unbound/services/cache/dns.c
1147
(void)rrset_cache_update(env->rrset_cache, &ref,
usr.sbin/unbound/services/cache/dns.c
1148
env->alloc,
usr.sbin/unbound/services/cache/dns.c
1150
&& !pside) ? qstarttime:*env->now + leeway));
usr.sbin/unbound/services/cache/dns.c
1162
reply_info_parsedelete(rep, env->alloc);
usr.sbin/unbound/services/cache/dns.c
1171
dns_cache_store_msg(env, &qinf, h, rep, leeway, pside, msgrep,
usr.sbin/unbound/services/cache/dns.c
1181
dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.c
1185
msg = msg_cache_lookup(env, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/services/cache/dns.c
1186
qinfo->qtype, qinfo->qclass, flags, *env->now, 1);
usr.sbin/unbound/services/cache/dns.c
139
msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.c
151
slabhash_remove(env->msg_cache, h, &k);
usr.sbin/unbound/services/cache/dns.c
155
dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.c
172
reply_info_set_ttls(rep, *env->now);
usr.sbin/unbound/services/cache/dns.c
173
store_rrsets(env, rep, *env->now, leeway, pside, qrep, region,
usr.sbin/unbound/services/cache/dns.c
191
msg_cache_remove(env, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/services/cache/dns.c
203
slabhash_insert(env->msg_cache, hash, &e->entry, rep, env->alloc);
usr.sbin/unbound/services/cache/dns.c
208
find_closest_of_type(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.c
224
if((rrset = rrset_cache_lookup(env->rrset_cache, qname,
usr.sbin/unbound/services/cache/dns.c
243
if(!rrset_cache_expired_above(env->rrset_cache, &qname,
usr.sbin/unbound/services/cache/dns.c
250
if((rrset = rrset_cache_lookup(env->
usr.sbin/unbound/services/cache/dns.c
282
msg_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.c
295
e = slabhash_lookup(env->msg_cache, h, &k, wr);
usr.sbin/unbound/services/cache/dns.c
307
find_add_addrs(struct module_env* env, uint16_t qclass,
usr.sbin/unbound/services/cache/dns.c
315
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
328
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
335
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
348
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
355
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
368
cache_fill_missing(struct module_env* env, uint16_t qclass,
usr.sbin/unbound/services/cache/dns.c
374
time_t now = *env->now;
usr.sbin/unbound/services/cache/dns.c
379
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
393
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
400
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
usr.sbin/unbound/services/cache/dns.c
414
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
421
neg = msg_cache_lookup(env, ns->name, ns->namelen,
usr.sbin/unbound/services/cache/dns.c
434
find_add_ds(struct module_env* env, struct regional* region,
usr.sbin/unbound/services/cache/dns.c
439
env->rrset_cache, dp->name, dp->namelen, LDNS_RR_TYPE_DS,
usr.sbin/unbound/services/cache/dns.c
444
rrset = rrset_cache_lookup(env->rrset_cache, dp->name,
usr.sbin/unbound/services/cache/dns.c
522
dns_cache_find_delegation(struct module_env* env, uint8_t* qname,
usr.sbin/unbound/services/cache/dns.c
532
nskey = find_closest_of_type(env, qname, qnamelen, qclass, now,
usr.sbin/unbound/services/cache/dns.c
564
find_add_ds(env, region, *msg, dp, now);
usr.sbin/unbound/services/cache/dns.c
566
if(!find_add_addrs(env, qclass, region, dp, now, msg))
usr.sbin/unbound/services/cache/dns.c
601
tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
usr.sbin/unbound/services/cache/dns.c
615
now_control = r->ttl - env->cfg->serve_expired_reply_ttl;
usr.sbin/unbound/services/cache/dns.c
666
if(env)
usr.sbin/unbound/services/cache/dns.c
667
rrset_array_unlock_touch(env->rrset_cache, scratch, r->ref,
usr.sbin/unbound/services/cache/dns.c
78
store_rrsets(struct module_env* env, struct reply_info* rep, time_t now,
usr.sbin/unbound/services/cache/dns.c
825
fill_any(struct module_env* env,
usr.sbin/unbound/services/cache/dns.c
829
time_t now = *env->now;
usr.sbin/unbound/services/cache/dns.c
837
if(env->cfg->deny_any) {
usr.sbin/unbound/services/cache/dns.c
853
env->rrset_cache, qname, qnamelen, lookup[i],
usr.sbin/unbound/services/cache/dns.c
89
switch(rrset_cache_update(env->rrset_cache, &rep->ref[i],
usr.sbin/unbound/services/cache/dns.c
890
dns_cache_lookup(struct module_env* env,
usr.sbin/unbound/services/cache/dns.c
898
time_t now = *env->now;
usr.sbin/unbound/services/cache/dns.c
90
env->alloc, ((ntohs(rep->ref[i].key->rk.type)==
usr.sbin/unbound/services/cache/dns.c
908
e = slabhash_lookup(env->msg_cache, h, &k, 0);
usr.sbin/unbound/services/cache/dns.c
912
struct dns_msg* msg = tomsg(env, &key->key, data, region, now, 0,
usr.sbin/unbound/services/cache/dns.c
926
(rrset=find_closest_of_type(env, qname, qnamelen, qclass, now,
usr.sbin/unbound/services/cache/dns.c
948
env->rrset_cache, qname, qnamelen,
usr.sbin/unbound/services/cache/dns.c
965
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
usr.sbin/unbound/services/cache/dns.c
984
(rrset=rrset_cache_lookup(env->rrset_cache, qname, qnamelen,
usr.sbin/unbound/services/cache/dns.h
124
void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.h
148
struct delegpt* dns_cache_find_delegation(struct module_env* env,
usr.sbin/unbound/services/cache/dns.h
166
struct dns_msg* tomsg(struct module_env* env, struct query_info* q,
usr.sbin/unbound/services/cache/dns.h
197
struct dns_msg* dns_cache_lookup(struct module_env* env,
usr.sbin/unbound/services/cache/dns.h
211
int cache_fill_missing(struct module_env* env, uint16_t qclass,
usr.sbin/unbound/services/cache/dns.h
262
int dns_cache_prefetch_adjust(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/cache/dns.h
267
struct msgreply_entry* msg_cache_lookup(struct module_env* env,
usr.sbin/unbound/services/cache/dns.h
280
void msg_cache_remove(struct module_env* env, uint8_t* qname, size_t qnamelen,
usr.sbin/unbound/services/cache/dns.h
97
int dns_cache_store(struct module_env* env, struct query_info* qinf,
usr.sbin/unbound/services/localzone.c
1310
local_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1332
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
usr.sbin/unbound/services/localzone.c
1333
repinfo, temp, env->now_tv) || !reply_info_answer_encode(qinfo, &rep,
usr.sbin/unbound/services/localzone.c
1345
local_error_encode(struct query_info* qinfo, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1355
if(!inplace_cb_reply_local_call(env, qinfo, NULL, NULL,
usr.sbin/unbound/services/localzone.c
1356
rcode, edns, repinfo, temp, env->now_tv))
usr.sbin/unbound/services/localzone.c
1359
if(ede_code != LDNS_EDE_NONE && env->cfg->ede) {
usr.sbin/unbound/services/localzone.c
1481
local_data_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1513
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1559
local_error_encode(qinfo, env, edns, repinfo,
usr.sbin/unbound/services/localzone.c
1607
return local_encode(qinfo, env, edns, repinfo, buf, temp, &r, 1,
usr.sbin/unbound/services/localzone.c
1610
return local_encode(qinfo, env, edns, repinfo, buf, temp, lr->rrset, 1,
usr.sbin/unbound/services/localzone.c
1653
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1667
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1692
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1694
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1704
local_error_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1743
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1747
local_error_encode(qinfo, env, edns, repinfo, buf,
usr.sbin/unbound/services/localzone.c
1760
return local_encode(qinfo, env, edns, repinfo, buf, temp,
usr.sbin/unbound/services/localzone.c
1763
local_error_encode(qinfo, env, edns, repinfo, buf, temp, rcode,
usr.sbin/unbound/services/localzone.c
1845
local_zones_answer(struct local_zones* zones, struct module_env* env,
usr.sbin/unbound/services/localzone.c
1916
if((env->cfg->log_local_actions ||
usr.sbin/unbound/services/localzone.c
1930
&& local_data_answer(z, env, qinfo, edns, repinfo, buf, temp, labs,
usr.sbin/unbound/services/localzone.c
1937
r = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp, ld, lzt);
usr.sbin/unbound/services/localzone.h
324
int local_zones_answer(struct local_zones* zones, struct module_env* env,
usr.sbin/unbound/services/localzone.h
345
local_zones_zone_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/localzone.h
608
local_data_answer(struct local_zone* z, struct module_env* env,
usr.sbin/unbound/services/mesh.c
1004
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/mesh.c
1017
mstate->s.env = env;
usr.sbin/unbound/services/mesh.c
1025
mstate->s.qstarttime = *env->now;
usr.sbin/unbound/services/mesh.c
1028
for(i=0; i<env->mesh->mods.num; i++) {
usr.sbin/unbound/services/mesh.c
1054
mesh = mstate->s.env->mesh;
usr.sbin/unbound/services/mesh.c
1069
infra_wait_limit_dec(mesh->env->infra_cache,
usr.sbin/unbound/services/mesh.c
1070
&rep->query_reply, mesh->env->cfg);
usr.sbin/unbound/services/mesh.c
1094
alloc_reg_release(mstate->s.env->alloc, mstate->s.region);
usr.sbin/unbound/services/mesh.c
1106
mesh = mstate->s.env->mesh;
usr.sbin/unbound/services/mesh.c
1167
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
1197
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
1209
*sub = mesh_state_create(qstate->env, qinfo, NULL, qflags, prime,
usr.sbin/unbound/services/mesh.c
1241
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
1328
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
usr.sbin/unbound/services/mesh.c
1332
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
usr.sbin/unbound/services/mesh.c
1346
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
usr.sbin/unbound/services/mesh.c
1349
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
usr.sbin/unbound/services/mesh.c
1353
m->s.env->scratch, udp_size, &r->edns,
usr.sbin/unbound/services/mesh.c
1367
log_assert(m->s.env->mesh->num_reply_addrs > 0);
usr.sbin/unbound/services/mesh.c
1368
m->s.env->mesh->num_reply_addrs--;
usr.sbin/unbound/services/mesh.c
1444
if(m->s.env->need_to_validate && (!(r->qflags&BIT_CD) ||
usr.sbin/unbound/services/mesh.c
1445
m->s.env->cfg->ignore_cd) && rep &&
usr.sbin/unbound/services/mesh.c
1449
if(m->s.env->cfg->stat_extended)
usr.sbin/unbound/services/mesh.c
1450
m->s.env->mesh->ans_bogus++;
usr.sbin/unbound/services/mesh.c
1473
!m->s.env->inplace_cb_lists[inplace_cb_reply]) ||
usr.sbin/unbound/services/mesh.c
1475
!m->s.env->inplace_cb_lists[inplace_cb_reply_servfail])) &&
usr.sbin/unbound/services/mesh.c
1497
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
usr.sbin/unbound/services/mesh.c
1501
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
usr.sbin/unbound/services/mesh.c
1509
if(m->s.env->cfg->ede && rep) {
usr.sbin/unbound/services/mesh.c
1523
if(m->s.env->cfg->disable_edns_do && (r->edns.bits&EDNS_DO))
usr.sbin/unbound/services/mesh.c
1531
if(m->s.env->cfg->ede && rep &&
usr.sbin/unbound/services/mesh.c
1537
if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
usr.sbin/unbound/services/mesh.c
1540
r->qflags, r_buffer, 0, 1, m->s.env->scratch,
usr.sbin/unbound/services/mesh.c
1544
if(!inplace_cb_reply_servfail_call(m->s.env, &m->s.qinfo, &m->s,
usr.sbin/unbound/services/mesh.c
1556
infra_wait_limit_dec(m->s.env->infra_cache, &r->query_reply,
usr.sbin/unbound/services/mesh.c
1557
m->s.env->cfg);
usr.sbin/unbound/services/mesh.c
1559
log_assert(m->s.env->mesh->num_reply_addrs > 0);
usr.sbin/unbound/services/mesh.c
1560
m->s.env->mesh->num_reply_addrs--;
usr.sbin/unbound/services/mesh.c
1561
end_time = *m->s.env->now_tv;
usr.sbin/unbound/services/mesh.c
1565
m->s.env->mesh->replies_sent++;
usr.sbin/unbound/services/mesh.c
1566
timeval_add(&m->s.env->mesh->replies_sum_wait, &duration);
usr.sbin/unbound/services/mesh.c
1567
timehist_insert(m->s.env->mesh->histogram, &duration);
usr.sbin/unbound/services/mesh.c
1568
if(m->s.env->cfg->stat_extended) {
usr.sbin/unbound/services/mesh.c
1571
if(secure) m->s.env->mesh->ans_secure++;
usr.sbin/unbound/services/mesh.c
1572
m->s.env->mesh->ans_rcode[ rc ] ++;
usr.sbin/unbound/services/mesh.c
1574
m->s.env->mesh->ans_nodata++;
usr.sbin/unbound/services/mesh.c
1577
if(m->s.env->cfg->log_replies) {
usr.sbin/unbound/services/mesh.c
1581
(m->s.env->cfg->log_destaddr?(void*)r->query_reply.c->socket->addr:NULL),
usr.sbin/unbound/services/mesh.c
1688
qstate->env->mesh->num_dns_error_reports++;
usr.sbin/unbound/services/mesh.c
1714
if(mstate->s.env->cfg->serve_expired) {
usr.sbin/unbound/services/mesh.c
1719
&& mstate->s.env->cfg->log_servfail
usr.sbin/unbound/services/mesh.c
1720
&& !mstate->s.env->cfg->val_log_squelch) {
usr.sbin/unbound/services/mesh.c
1726
if(mstate->reply_list && mstate->s.env->cfg->dns_error_reporting)
usr.sbin/unbound/services/mesh.c
1731
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
usr.sbin/unbound/services/mesh.c
1732
if(mstate->s.env->cfg->discard_timeout != 0 &&
usr.sbin/unbound/services/mesh.c
1734
mstate->s.env->cfg->discard_timeout) {
usr.sbin/unbound/services/mesh.c
1743
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
1744
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
1750
mstate->s.env->mesh->num_queries_discard_timeout++;
usr.sbin/unbound/services/mesh.c
1777
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
1778
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
1806
mstate->s.env->cfg->stat_extended &&
usr.sbin/unbound/services/mesh.c
1809
mstate->s.env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
usr.sbin/unbound/services/mesh.c
1811
mstate->s.env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
usr.sbin/unbound/services/mesh.c
1813
mstate->s.env->mesh->rpz_action[respip_action_to_rpz_action(
usr.sbin/unbound/services/mesh.c
1817
if(mstate->s.env->cfg->stat_extended
usr.sbin/unbound/services/mesh.c
1819
mstate->s.env->mesh->ans_cachedb += i;
usr.sbin/unbound/services/mesh.c
1828
log_assert(mstate->s.env->mesh->num_reply_states > 0);
usr.sbin/unbound/services/mesh.c
1829
mstate->s.env->mesh->num_reply_states--;
usr.sbin/unbound/services/mesh.c
1833
mstate->s.env->mesh->num_detached_states++;
usr.sbin/unbound/services/mesh.c
1842
log_assert(mstate->s.env->mesh->num_reply_states > 0);
usr.sbin/unbound/services/mesh.c
1843
mstate->s.env->mesh->num_reply_states--;
usr.sbin/unbound/services/mesh.c
1848
mstate->s.env->mesh->num_detached_states++;
usr.sbin/unbound/services/mesh.c
1962
r->start_time = *s->s.env->now_tv;
usr.sbin/unbound/services/mesh.c
2028
struct regional* region = mstate->s.env->scratch;
usr.sbin/unbound/services/mesh.c
207
mesh_create(struct module_stack* stack, struct module_env* env)
usr.sbin/unbound/services/mesh.c
2123
mstate->s.env->unique_mesh) {
usr.sbin/unbound/services/mesh.c
2142
mstate->s.env->cfg->client_subnet_opcode)) != NULL) {
usr.sbin/unbound/services/mesh.c
2146
mstate->s.env->scratch);
usr.sbin/unbound/services/mesh.c
215
mesh->qbuf_bak = sldns_buffer_new(env->cfg->msg_buffer_size);
usr.sbin/unbound/services/mesh.c
2185
regional_free_all(mstate->s.env->scratch);
usr.sbin/unbound/services/mesh.c
222
mesh->env = env;
usr.sbin/unbound/services/mesh.c
2297
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
2342
infra_wait_limit_dec(mesh->env->infra_cache,
usr.sbin/unbound/services/mesh.c
2343
&n->query_reply, mesh->env->cfg);
usr.sbin/unbound/services/mesh.c
236
mesh->max_reply_states = env->cfg->num_queries_per_thread;
usr.sbin/unbound/services/mesh.c
2378
alias_rrset, 0, qstate->region, az, NULL, qstate->env->views,
usr.sbin/unbound/services/mesh.c
2379
qstate->env->respip_set))
usr.sbin/unbound/services/mesh.c
239
mesh->jostle_max.tv_sec = (time_t)(env->cfg->jostle_time / 1000);
usr.sbin/unbound/services/mesh.c
2398
struct mesh_area* mesh = qstate->env->mesh;
usr.sbin/unbound/services/mesh.c
240
mesh->jostle_max.tv_usec = (time_t)((env->cfg->jostle_time % 1000)
usr.sbin/unbound/services/mesh.c
2412
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
usr.sbin/unbound/services/mesh.c
2449
qstate->env->auth_zones)) {
usr.sbin/unbound/services/mesh.c
2454
qstate->env->auth_zones, qstate->env->views,
usr.sbin/unbound/services/mesh.c
2455
qstate->env->respip_set)) {
usr.sbin/unbound/services/mesh.c
2494
timeval_subtract(&old, mstate->s.env->now_tv, &r->start_time);
usr.sbin/unbound/services/mesh.c
2495
if(mstate->s.env->cfg->discard_timeout != 0 &&
usr.sbin/unbound/services/mesh.c
2497
mstate->s.env->cfg->discard_timeout) {
usr.sbin/unbound/services/mesh.c
2506
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
2507
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
2513
mstate->s.env->mesh->num_queries_discard_timeout++;
usr.sbin/unbound/services/mesh.c
2532
qstate->env->cfg->ede_serve_expired &&
usr.sbin/unbound/services/mesh.c
2533
qstate->env->cfg->ede &&
usr.sbin/unbound/services/mesh.c
2547
infra_wait_limit_dec(mstate->s.env->infra_cache,
usr.sbin/unbound/services/mesh.c
2548
&r->query_reply, mstate->s.env->cfg);
usr.sbin/unbound/services/mesh.c
2555
if(actinfo.addrinfo && qstate->env->cfg->stat_extended &&
usr.sbin/unbound/services/mesh.c
2558
qstate->env->mesh->rpz_action[RPZ_DISABLED_ACTION] += i;
usr.sbin/unbound/services/mesh.c
2560
qstate->env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION] += i;
usr.sbin/unbound/services/mesh.c
2562
qstate->env->mesh->rpz_action[
usr.sbin/unbound/services/mesh.c
2584
log_assert(qstate->env->mesh->num_reply_states > 0);
usr.sbin/unbound/services/mesh.c
2585
qstate->env->mesh->num_reply_states--;
usr.sbin/unbound/services/mesh.c
2590
qstate->env->mesh->num_detached_states++;
usr.sbin/unbound/services/mesh.c
302
timeval_subtract(&age, mesh->env->now_tv,
usr.sbin/unbound/services/mesh.c
340
time_t timenow = *qstate->env->now;
usr.sbin/unbound/services/mesh.c
342
|| qstate->env->cfg->ignore_cd) && qstate->env->need_to_validate;
usr.sbin/unbound/services/mesh.c
346
e = slabhash_lookup(qstate->env->msg_cache, h, lookup_qinfo, 0);
usr.sbin/unbound/services/mesh.c
352
msg = tomsg(qstate->env, &key->key, data, qstate->region, timenow,
usr.sbin/unbound/services/mesh.c
353
qstate->env->cfg->serve_expired, qstate->env->scratch);
usr.sbin/unbound/services/mesh.c
412
mstate->s.env->worker_base, mesh_serve_expired_callback, mstate);
usr.sbin/unbound/services/mesh.c
430
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
usr.sbin/unbound/services/mesh.c
434
int timeout = mesh->env->cfg->serve_expired?
usr.sbin/unbound/services/mesh.c
435
mesh->env->cfg->serve_expired_client_timeout:0;
usr.sbin/unbound/services/mesh.c
441
if(!infra_wait_limit_allowed(mesh->env->infra_cache, rep,
usr.sbin/unbound/services/mesh.c
442
edns->cookie_valid, mesh->env->cfg)) {
usr.sbin/unbound/services/mesh.c
477
s = mesh_state_create(mesh->env, qinfo, cinfo,
usr.sbin/unbound/services/mesh.c
481
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL, NULL,
usr.sbin/unbound/services/mesh.c
482
LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
usr.sbin/unbound/services/mesh.c
500
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, NULL,
usr.sbin/unbound/services/mesh.c
501
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
usr.sbin/unbound/services/mesh.c
546
if(!timeout && mesh->env->cfg->serve_expired &&
usr.sbin/unbound/services/mesh.c
547
!mesh->env->cfg->serve_expired_client_timeout &&
usr.sbin/unbound/services/mesh.c
548
(mesh->env->cachedb_enabled &&
usr.sbin/unbound/services/mesh.c
549
mesh->env->cfg->cachedb_check_when_serve_expired)) {
usr.sbin/unbound/services/mesh.c
556
infra_wait_limit_inc(mesh->env->infra_cache, rep, *mesh->env->now,
usr.sbin/unbound/services/mesh.c
557
mesh->env->cfg);
usr.sbin/unbound/services/mesh.c
585
if(!inplace_cb_reply_servfail_call(mesh->env, qinfo, &s->s,
usr.sbin/unbound/services/mesh.c
586
NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
usr.sbin/unbound/services/mesh.c
604
int unique = unique_mesh_state(edns->opt_list_in, mesh->env);
usr.sbin/unbound/services/mesh.c
605
int timeout = mesh->env->cfg->serve_expired?
usr.sbin/unbound/services/mesh.c
606
mesh->env->cfg->serve_expired_client_timeout:0;
usr.sbin/unbound/services/mesh.c
621
s = mesh_state_create(mesh->env, qinfo, NULL,
usr.sbin/unbound/services/mesh.c
667
if(!timeout && mesh->env->cfg->serve_expired &&
usr.sbin/unbound/services/mesh.c
668
!mesh->env->cfg->serve_expired_client_timeout &&
usr.sbin/unbound/services/mesh.c
669
(mesh->env->cachedb_enabled &&
usr.sbin/unbound/services/mesh.c
670
mesh->env->cfg->cachedb_check_when_serve_expired)) {
usr.sbin/unbound/services/mesh.c
726
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
usr.sbin/unbound/services/mesh.c
797
s = mesh_state_create(mesh->env, qinfo, NULL, mesh_flags, 0, 0);
usr.sbin/unbound/services/mesh.c
804
opt = edns_opt_list_find(edns_list, mesh->env->cfg->client_subnet_opcode);
usr.sbin/unbound/services/mesh.c
963
mesh_state_create(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/mesh.c
967
struct regional* region = alloc_reg_obtain(env->alloc);
usr.sbin/unbound/services/mesh.c
975
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/mesh.c
998
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/mesh.h
291
struct module_env* env);
usr.sbin/unbound/services/mesh.h
492
struct mesh_state* mesh_state_create(struct module_env* env,
usr.sbin/unbound/services/mesh.h
86
struct module_env* env;
usr.sbin/unbound/services/modstack.c
237
struct module_env* env)
usr.sbin/unbound/services/modstack.c
252
if(!(*stack->mod[i]->startup)(env, i)) {
usr.sbin/unbound/services/modstack.c
263
struct module_env* env)
usr.sbin/unbound/services/modstack.c
266
env->need_to_validate = 0; /* set by module init below */
usr.sbin/unbound/services/modstack.c
292
if(!(*stack->mod[i]->init)(env, i)) {
usr.sbin/unbound/services/modstack.c
302
modstack_call_deinit(struct module_stack* stack, struct module_env* env)
usr.sbin/unbound/services/modstack.c
307
(*stack->mod[i]->deinit)(env, i);
usr.sbin/unbound/services/modstack.c
312
modstack_call_destartup(struct module_stack* stack, struct module_env* env)
usr.sbin/unbound/services/modstack.c
319
(*stack->mod[i]->destartup)(env, i);
usr.sbin/unbound/services/modstack.c
335
mod_get_mem(struct module_env* env, const char* name)
usr.sbin/unbound/services/modstack.c
337
int m = modstack_find(&env->mesh->mods, name);
usr.sbin/unbound/services/modstack.c
339
fptr_ok(fptr_whitelist_mod_get_mem(env->mesh->
usr.sbin/unbound/services/modstack.c
341
return (*env->mesh->mods.mod[m]->get_mem)(env, m);
usr.sbin/unbound/services/modstack.h
113
struct module_env* env);
usr.sbin/unbound/services/modstack.h
120
void modstack_call_deinit(struct module_stack* stack, struct module_env* env);
usr.sbin/unbound/services/modstack.h
127
void modstack_call_destartup(struct module_stack* stack, struct module_env* env);
usr.sbin/unbound/services/modstack.h
138
size_t mod_get_mem(struct module_env* env, const char* name);
usr.sbin/unbound/services/modstack.h
78
struct module_env* env);
usr.sbin/unbound/services/outside_network.c
3429
sldns_buffer* buff, struct module_env* env, int* was_ratelimited)
usr.sbin/unbound/services/outside_network.c
3444
region = alloc_reg_obtain(env->alloc);
usr.sbin/unbound/services/outside_network.c
3450
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3456
if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen, zone,
usr.sbin/unbound/services/outside_network.c
3458
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3467
&env->edns_strings->client_strings, addr, addrlen))) {
usr.sbin/unbound/services/outside_network.c
3469
env->edns_strings->client_string_opcode,
usr.sbin/unbound/services/outside_network.c
3481
timenow = *env->now;
usr.sbin/unbound/services/outside_network.c
3482
if(!infra_ratelimit_inc(env->infra_cache, zone,
usr.sbin/unbound/services/outside_network.c
3483
zonelen, timenow, env->cfg->ratelimit_backoff,
usr.sbin/unbound/services/outside_network.c
3489
if(env->cfg->ratelimit_factor == 0 ||
usr.sbin/unbound/services/outside_network.c
3490
ub_random_max(env->rnd,
usr.sbin/unbound/services/outside_network.c
3491
env->cfg->ratelimit_factor) != 1) {
usr.sbin/unbound/services/outside_network.c
3493
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3507
( ssl_upstream && env->cfg->pad_queries
usr.sbin/unbound/services/outside_network.c
3508
? env->cfg->pad_queries_block_size : 0 ),
usr.sbin/unbound/services/outside_network.c
3509
env->alloc, region);
usr.sbin/unbound/services/outside_network.c
3512
infra_ratelimit_dec(env->infra_cache,
usr.sbin/unbound/services/outside_network.c
3520
infra_ratelimit_dec(env->infra_cache,
usr.sbin/unbound/services/outside_network.c
3531
alloc_reg_release(env->alloc, region);
usr.sbin/unbound/services/outside_network.h
665
struct sldns_buffer* buff, struct module_env* env, int* was_ratelimited);
usr.sbin/unbound/services/rpz.c
1773
rpz_local_encode(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/rpz.c
1806
if(!inplace_cb_reply_local_call(env, qinfo, NULL, &rep, rcode, edns,
usr.sbin/unbound/services/rpz.c
1807
repinfo, temp, env->now_tv) ||
usr.sbin/unbound/services/rpz.c
1842
struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/services/rpz.c
1891
rpz_local_encode(env, qinfo, edns, repinfo, buf, temp, rp,
usr.sbin/unbound/services/rpz.c
2236
rpz_synthesize_qname_localdata(struct module_env* env, struct rpz* r,
usr.sbin/unbound/services/rpz.c
2254
if(lzt == local_zone_redirect && local_data_answer(z, env, qinfo,
usr.sbin/unbound/services/rpz.c
2266
ret = local_zones_zone_answer(z, env, qinfo, edns, repinfo, buf, temp,
usr.sbin/unbound/services/rpz.c
2360
if(ms->env->worker)
usr.sbin/unbound/services/rpz.c
2361
ms->env->worker->stats.rpz_action[action]++;
usr.sbin/unbound/services/rpz.c
2422
if(ms->env->worker)
usr.sbin/unbound/services/rpz.c
2423
ms->env->worker->stats.rpz_action[action]++;
usr.sbin/unbound/services/rpz.c
2481
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
usr.sbin/unbound/services/rpz.c
2483
az = ms->env->auth_zones;
usr.sbin/unbound/services/rpz.c
2555
if(ms->env == NULL || ms->env->auth_zones == NULL) { return 0; }
usr.sbin/unbound/services/rpz.c
2556
az = ms->env->auth_zones;
usr.sbin/unbound/services/rpz.c
2581
if(ms->env->worker)
usr.sbin/unbound/services/rpz.c
2582
ms->env->worker->stats.rpz_action[r->action_override]++;
usr.sbin/unbound/services/rpz.c
2657
rpz_apply_maybe_clientip_trigger(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/rpz.c
2698
rpz_apply_clientip_localdata_action(node, env, qinfo,
usr.sbin/unbound/services/rpz.c
2709
local_zones_zone_answer(*z_out /*likely NULL, no zone*/, env, qinfo, edns,
usr.sbin/unbound/services/rpz.c
2736
rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/services/rpz.c
2747
int clientip_trigger = rpz_apply_maybe_clientip_trigger(az, env, qinfo,
usr.sbin/unbound/services/rpz.c
2791
ret = rpz_synthesize_qname_localdata(env, r, z, lzt, qinfo, edns, buf, temp,
usr.sbin/unbound/services/rpz.h
180
int rpz_callback_from_worker_request(struct auth_zones* az, struct module_env* env,
usr.sbin/unbound/smallapp/unbound-checkconf.c
134
struct module_env env;
usr.sbin/unbound/smallapp/unbound-checkconf.c
135
memset(&env, 0, sizeof(env));
usr.sbin/unbound/smallapp/unbound-checkconf.c
136
env.cfg = cfg;
usr.sbin/unbound/smallapp/unbound-checkconf.c
137
env.scratch = regional_create();
usr.sbin/unbound/smallapp/unbound-checkconf.c
138
env.scratch_buffer = sldns_buffer_new(BUFSIZ);
usr.sbin/unbound/smallapp/unbound-checkconf.c
139
if(!env.scratch || !env.scratch_buffer)
usr.sbin/unbound/smallapp/unbound-checkconf.c
141
if(!edns_known_options_init(&env))
usr.sbin/unbound/smallapp/unbound-checkconf.c
143
if(fb->startup && !(*fb->startup)(&env, 0))
usr.sbin/unbound/smallapp/unbound-checkconf.c
145
if(!(*fb->init)(&env, 0))
usr.sbin/unbound/smallapp/unbound-checkconf.c
147
(*fb->deinit)(&env, 0);
usr.sbin/unbound/smallapp/unbound-checkconf.c
149
(*fb->destartup)(&env, 0);
usr.sbin/unbound/smallapp/unbound-checkconf.c
150
sldns_buffer_free(env.scratch_buffer);
usr.sbin/unbound/smallapp/unbound-checkconf.c
151
regional_destroy(env.scratch);
usr.sbin/unbound/smallapp/unbound-checkconf.c
152
edns_known_options_delete(&env);
usr.sbin/unbound/testcode/fake_event.c
1278
struct module_env* env, int* ATTR_UNUSED(was_ratelimited))
usr.sbin/unbound/testcode/fake_event.c
1322
if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen,
usr.sbin/unbound/testcode/fake_event.c
1332
&env->edns_strings->client_strings,
usr.sbin/unbound/testcode/fake_event.c
1335
env->edns_strings->client_string_opcode,
usr.sbin/unbound/testcode/fake_event.c
733
slabhash_remove(runtime->daemon->env->msg_cache, h, &k);
usr.sbin/unbound/testcode/fake_event.c
759
e = slabhash_lookup(runtime->daemon->env->msg_cache, h, &k, 0);
usr.sbin/unbound/testcode/unitecs.c
164
struct module_env env;
usr.sbin/unbound/testcode/unitecs.c
170
t = addrtree_create(100, &elemfree, &unittest_wrapper_subnetmod_sizefunc, &env, 0);
usr.sbin/unbound/testcode/unitecs.c
187
t = addrtree_create(8, &elemfree, &unittest_wrapper_subnetmod_sizefunc, &env, 0);
usr.sbin/unbound/testcode/unitecs.c
199
t = addrtree_create(8, &elemfree, &unittest_wrapper_subnetmod_sizefunc, &env, 27);
usr.sbin/unbound/testcode/unitverify.c
182
verifytest_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/testcode/unitverify.c
198
sec = dnskeyset_verify_rrset(env, ve, rrset, dnskey, sigalg, &reason,
usr.sbin/unbound/testcode/unitverify.c
216
struct ub_packed_rrset_key* dnskey, struct module_env* env,
usr.sbin/unbound/testcode/unitverify.c
233
verifytest_rrset(env, ve, rep->rrsets[i], dnskey, &qinfo);
usr.sbin/unbound/testcode/unitverify.c
255
struct regional* region, sldns_buffer* pkt, struct module_env* env)
usr.sbin/unbound/testcode/unitverify.c
275
ret = ds_digest_match_dnskey(env, dnskey, 0, ds, 0);
usr.sbin/unbound/testcode/unitverify.c
310
struct module_env env;
usr.sbin/unbound/testcode/unitverify.c
318
memset(&env, 0, sizeof(env));
usr.sbin/unbound/testcode/unitverify.c
320
env.scratch = region;
usr.sbin/unbound/testcode/unitverify.c
321
env.scratch_buffer = buf;
usr.sbin/unbound/testcode/unitverify.c
322
env.now = &now;
usr.sbin/unbound/testcode/unitverify.c
331
verifytest_entry(e, &alloc, region, buf, dnskey, &env, &ve);
usr.sbin/unbound/testcode/unitverify.c
355
struct module_env env;
usr.sbin/unbound/testcode/unitverify.c
361
memset(&env, 0, sizeof(env));
usr.sbin/unbound/testcode/unitverify.c
362
env.scratch = region;
usr.sbin/unbound/testcode/unitverify.c
363
env.scratch_buffer = buf;
usr.sbin/unbound/testcode/unitverify.c
368
dstest_entry(e, &alloc, region, buf, &env);
usr.sbin/unbound/testcode/unitzonemd.c
255
struct module_env env;
usr.sbin/unbound/testcode/unitzonemd.c
260
memset(&env, 0, sizeof(env));
usr.sbin/unbound/testcode/unitzonemd.c
261
env.scratch = regional_create();
usr.sbin/unbound/testcode/unitzonemd.c
262
if(!env.scratch)
usr.sbin/unbound/testcode/unitzonemd.c
264
env.scratch_buffer = sldns_buffer_new(65553);
usr.sbin/unbound/testcode/unitzonemd.c
265
if(!env.scratch_buffer)
usr.sbin/unbound/testcode/unitzonemd.c
267
env.cfg = config_create();
usr.sbin/unbound/testcode/unitzonemd.c
268
if(!env.cfg)
usr.sbin/unbound/testcode/unitzonemd.c
270
config_auto_slab_values(env.cfg);
usr.sbin/unbound/testcode/unitzonemd.c
271
env.now = &now;
usr.sbin/unbound/testcode/unitzonemd.c
272
env.cfg->val_date_override = cfg_convert_timeval(date_override);
usr.sbin/unbound/testcode/unitzonemd.c
273
if(!env.cfg->val_date_override)
usr.sbin/unbound/testcode/unitzonemd.c
275
if(env.cfg->module_conf)
usr.sbin/unbound/testcode/unitzonemd.c
276
free(env.cfg->module_conf);
usr.sbin/unbound/testcode/unitzonemd.c
277
env.cfg->module_conf = strdup("validator iterator");
usr.sbin/unbound/testcode/unitzonemd.c
278
if(!env.cfg->module_conf)
usr.sbin/unbound/testcode/unitzonemd.c
281
if(!cfg_strlist_insert(&env.cfg->trust_anchor_list,
usr.sbin/unbound/testcode/unitzonemd.c
285
env.anchors = anchors_create();
usr.sbin/unbound/testcode/unitzonemd.c
286
if(!env.anchors)
usr.sbin/unbound/testcode/unitzonemd.c
288
env.auth_zones = auth_zones_create();
usr.sbin/unbound/testcode/unitzonemd.c
289
if(!env.auth_zones)
usr.sbin/unbound/testcode/unitzonemd.c
292
if(!modstack_call_startup(&mods, env.cfg->module_conf, &env))
usr.sbin/unbound/testcode/unitzonemd.c
294
if(!modstack_call_init(&mods, env.cfg->module_conf, &env))
usr.sbin/unbound/testcode/unitzonemd.c
296
env.mesh = mesh_create(&mods, &env);
usr.sbin/unbound/testcode/unitzonemd.c
297
if(!env.mesh)
usr.sbin/unbound/testcode/unitzonemd.c
301
z = authtest_addzone(env.auth_zones, zname, zfile);
usr.sbin/unbound/testcode/unitzonemd.c
308
auth_zone_verify_zonemd(z, &env, &mods, &result, 1, 0);
usr.sbin/unbound/testcode/unitzonemd.c
332
mesh_delete(env.mesh);
usr.sbin/unbound/testcode/unitzonemd.c
333
modstack_call_deinit(&mods, &env);
usr.sbin/unbound/testcode/unitzonemd.c
334
modstack_call_destartup(&mods, &env);
usr.sbin/unbound/testcode/unitzonemd.c
336
auth_zones_delete(env.auth_zones);
usr.sbin/unbound/testcode/unitzonemd.c
337
anchors_delete(env.anchors);
usr.sbin/unbound/testcode/unitzonemd.c
338
config_delete(env.cfg);
usr.sbin/unbound/testcode/unitzonemd.c
339
regional_destroy(env.scratch);
usr.sbin/unbound/testcode/unitzonemd.c
340
sldns_buffer_free(env.scratch_buffer);
usr.sbin/unbound/util/data/msgreply.c
1231
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.c
1237
env->inplace_cb_lists[inplace_cb_reply], inplace_cb_reply, qinfo,
usr.sbin/unbound/util/data/msgreply.c
1241
int inplace_cb_reply_cache_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1248
env->inplace_cb_lists[inplace_cb_reply_cache], inplace_cb_reply_cache,
usr.sbin/unbound/util/data/msgreply.c
1252
int inplace_cb_reply_local_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1259
env->inplace_cb_lists[inplace_cb_reply_local], inplace_cb_reply_local,
usr.sbin/unbound/util/data/msgreply.c
1263
int inplace_cb_reply_servfail_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1273
env->inplace_cb_lists[inplace_cb_reply_servfail],
usr.sbin/unbound/util/data/msgreply.c
1278
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.c
1283
struct inplace_cb* cb = env->inplace_cb_lists[inplace_cb_query];
usr.sbin/unbound/util/data/msgreply.c
1294
int inplace_cb_edns_back_parsed_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1298
env->inplace_cb_lists[inplace_cb_edns_back_parsed];
usr.sbin/unbound/util/data/msgreply.c
1308
int inplace_cb_query_response_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.c
1311
env->inplace_cb_lists[inplace_cb_query_response];
usr.sbin/unbound/util/data/msgreply.h
658
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.h
678
int inplace_cb_reply_cache_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
699
int inplace_cb_reply_local_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
721
int inplace_cb_reply_servfail_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
744
int inplace_cb_query_call(struct module_env* env, struct query_info* qinfo,
usr.sbin/unbound/util/data/msgreply.h
757
int inplace_cb_edns_back_parsed_call(struct module_env* env,
usr.sbin/unbound/util/data/msgreply.h
769
int inplace_cb_query_response_call(struct module_env* env,
usr.sbin/unbound/util/fptr_wlist.c
416
fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
444
fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
472
fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
483
fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.c
581
fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id))
usr.sbin/unbound/util/fptr_wlist.h
271
int fptr_whitelist_mod_init(int (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
279
int fptr_whitelist_mod_deinit(void (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
287
int fptr_whitelist_mod_startup(int (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
295
int fptr_whitelist_mod_destartup(void (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/fptr_wlist.h
330
int fptr_whitelist_mod_get_mem(size_t (*fptr)(struct module_env* env, int id));
usr.sbin/unbound/util/module.c
115
if(qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail)
usr.sbin/unbound/util/module.c
223
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !rr)
usr.sbin/unbound/util/module.c
236
if((qstate->env->cfg->val_log_level < 2 && !qstate->env->cfg->log_servfail) || !str || !dname)
usr.sbin/unbound/util/module.c
244
edns_known_options_init(struct module_env* env)
usr.sbin/unbound/util/module.c
246
env->edns_known_options_num = 0;
usr.sbin/unbound/util/module.c
247
env->edns_known_options = (struct edns_known_option*)calloc(
usr.sbin/unbound/util/module.c
249
if(!env->edns_known_options) return 0;
usr.sbin/unbound/util/module.c
254
edns_known_options_delete(struct module_env* env)
usr.sbin/unbound/util/module.c
256
free(env->edns_known_options);
usr.sbin/unbound/util/module.c
257
env->edns_known_options = NULL;
usr.sbin/unbound/util/module.c
258
env->edns_known_options_num = 0;
usr.sbin/unbound/util/module.c
263
int no_aggregation, struct module_env* env)
usr.sbin/unbound/util/module.c
266
if(env->worker) {
usr.sbin/unbound/util/module.c
278
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
279
if(env->edns_known_options[i].opt_code == opt_code)
usr.sbin/unbound/util/module.c
282
if(i == env->edns_known_options_num) {
usr.sbin/unbound/util/module.c
283
if(env->edns_known_options_num >= MAX_KNOWN_EDNS_OPTS) {
usr.sbin/unbound/util/module.c
287
env->edns_known_options_num++;
usr.sbin/unbound/util/module.c
289
env->edns_known_options[i].opt_code = opt_code;
usr.sbin/unbound/util/module.c
290
env->edns_known_options[i].bypass_cache_stage = bypass_cache_stage;
usr.sbin/unbound/util/module.c
291
env->edns_known_options[i].no_aggregation = no_aggregation;
usr.sbin/unbound/util/module.c
297
struct module_env* env, int id)
usr.sbin/unbound/util/module.c
301
if(env->worker) {
usr.sbin/unbound/util/module.c
317
prevp = (struct inplace_cb**) &env->inplace_cb_lists[type];
usr.sbin/unbound/util/module.c
326
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/util/module.c
329
struct inplace_cb* temp = env->inplace_cb_lists[type];
usr.sbin/unbound/util/module.c
335
env->inplace_cb_lists[type] = temp->next;
usr.sbin/unbound/util/module.c
337
temp = env->inplace_cb_lists[type];
usr.sbin/unbound/util/module.c
353
edns_option_is_known(uint16_t opt_code, struct module_env* env)
usr.sbin/unbound/util/module.c
356
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
357
if(env->edns_known_options[i].opt_code == opt_code)
usr.sbin/unbound/util/module.c
358
return env->edns_known_options + i;
usr.sbin/unbound/util/module.c
363
edns_bypass_cache_stage(struct edns_option* list, struct module_env* env)
usr.sbin/unbound/util/module.c
367
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
368
if(env->edns_known_options[i].opt_code == list->opt_code &&
usr.sbin/unbound/util/module.c
369
env->edns_known_options[i].bypass_cache_stage == 1)
usr.sbin/unbound/util/module.c
375
unique_mesh_state(struct edns_option* list, struct module_env* env)
usr.sbin/unbound/util/module.c
378
if(env->unique_mesh)
usr.sbin/unbound/util/module.c
381
for(i=0; i<env->edns_known_options_num; i++)
usr.sbin/unbound/util/module.c
382
if(env->edns_known_options[i].opt_code == list->opt_code &&
usr.sbin/unbound/util/module.c
383
env->edns_known_options[i].no_aggregation == 1)
usr.sbin/unbound/util/module.c
389
log_edns_known_options(enum verbosity_value level, struct module_env* env)
usr.sbin/unbound/util/module.c
394
if(env->edns_known_options_num > 0 && verbosity >= level) {
usr.sbin/unbound/util/module.c
397
for(i=0; i<env->edns_known_options_num; i++) {
usr.sbin/unbound/util/module.c
401
env->edns_known_options[i].opt_code);
usr.sbin/unbound/util/module.c
403
env->edns_known_options[i].bypass_cache_stage?"YES":"NO",
usr.sbin/unbound/util/module.c
404
env->edns_known_options[i].no_aggregation?"NO":"YES");
usr.sbin/unbound/util/module.c
87
if(!str || (qstate->env->cfg->val_log_level < 2 &&
usr.sbin/unbound/util/module.c
88
!qstate->env->cfg->log_servfail)) {
usr.sbin/unbound/util/module.h
664
struct module_env* env;
usr.sbin/unbound/util/module.h
732
int (*startup)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
742
void (*destartup)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
752
int (*init)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
760
void (*deinit)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
809
size_t (*get_mem)(struct module_env* env, int id);
usr.sbin/unbound/util/module.h
897
int edns_known_options_init(struct module_env* env);
usr.sbin/unbound/util/module.h
903
void edns_known_options_delete(struct module_env* env);
usr.sbin/unbound/util/module.h
918
int no_aggregation, struct module_env* env);
usr.sbin/unbound/util/module.h
932
struct module_env* env, int id);
usr.sbin/unbound/util/module.h
941
inplace_cb_delete(struct module_env* env, enum inplace_cb_list_type type,
usr.sbin/unbound/util/module.h
948
void inplace_cb_lists_delete(struct module_env* env);
usr.sbin/unbound/util/module.h
958
struct module_env* env);
usr.sbin/unbound/util/module.h
968
struct module_env* env);
usr.sbin/unbound/util/module.h
978
int unique_mesh_state(struct edns_option* list, struct module_env* env);
usr.sbin/unbound/util/module.h
986
struct module_env* env);
usr.sbin/unbound/util/shm_side/shm_main.c
234
worker->thread_num, worker->daemon, (unsigned)worker->env.now_tv->tv_sec, (unsigned)worker->daemon->time_boot.tv_sec);
usr.sbin/unbound/util/shm_side/shm_main.c
253
shm_stat->time.now_sec = (long long)worker->env.now_tv->tv_sec;
usr.sbin/unbound/util/shm_side/shm_main.c
254
shm_stat->time.now_usec = (long long)worker->env.now_tv->tv_usec;
usr.sbin/unbound/util/shm_side/shm_main.c
257
stat_timeval_subtract(&shm_stat->time.up_sec, &shm_stat->time.up_usec, worker->env.now_tv, &worker->daemon->time_boot);
usr.sbin/unbound/util/shm_side/shm_main.c
258
stat_timeval_subtract(&shm_stat->time.elapsed_sec, &shm_stat->time.elapsed_usec, worker->env.now_tv, &worker->daemon->time_last_stat);
usr.sbin/unbound/util/shm_side/shm_main.c
260
shm_stat->mem.msg = (long long)slabhash_get_mem(worker->env.msg_cache);
usr.sbin/unbound/util/shm_side/shm_main.c
261
shm_stat->mem.rrset = (long long)slabhash_get_mem(&worker->env.rrset_cache->table);
usr.sbin/unbound/util/shm_side/shm_main.c
271
shm_stat->mem.val = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/util/shm_side/shm_main.c
273
shm_stat->mem.iter = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/util/shm_side/shm_main.c
275
shm_stat->mem.respip = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/util/shm_side/shm_main.c
283
shm_stat->mem.subnet = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/util/shm_side/shm_main.c
291
shm_stat->mem.ipsecmod = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/util/shm_side/shm_main.c
295
shm_stat->mem.dynlib = (long long)mod_get_mem(&worker->env,
usr.sbin/unbound/validator/autotrust.c
1188
void autr_write_file(struct module_env* env, struct trust_anchor* tp)
usr.sbin/unbound/validator/autotrust.c
1197
if(!env) {
usr.sbin/unbound/validator/autotrust.c
1211
env->worker?*(int*)env->worker:0, llvalue);
usr.sbin/unbound/validator/autotrust.c
1261
verify_dnskey(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1268
int downprot = env->cfg->harden_algo_downgrade;
usr.sbin/unbound/validator/autotrust.c
1269
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve, rrset,
usr.sbin/unbound/validator/autotrust.c
1292
min_expiry(struct module_env* env, struct packed_rrset_data* dd)
usr.sbin/unbound/validator/autotrust.c
1298
if((int32_t)t - (int32_t)*env->now > 0) {
usr.sbin/unbound/validator/autotrust.c
1299
t -= (int32_t)*env->now;
usr.sbin/unbound/validator/autotrust.c
1309
rr_is_selfsigned_revoked(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1319
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset, i,
usr.sbin/unbound/validator/autotrust.c
1534
check_contains_revoked(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1556
if(rr_is_selfsigned_revoked(env, ve, dnskey_rrset, i, qstate)) {
usr.sbin/unbound/validator/autotrust.c
1574
do_revoked(env, ta, changed);
usr.sbin/unbound/validator/autotrust.c
1581
key_matches_a_ds(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1602
if(!ds_digest_match_dnskey(env, dnskey_rrset, key_idx,
usr.sbin/unbound/validator/autotrust.c
1626
update_events(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
1667
if(ta && tp->ds_rrset && key_matches_a_ds(env, ve,
usr.sbin/unbound/validator/autotrust.c
1679
set_tp_times(tp, min_expiry(env, dd), key_ttl(dnskey_rrset), changed);
usr.sbin/unbound/validator/autotrust.c
1693
check_holddown(struct module_env* env, struct autr_ta* ta,
usr.sbin/unbound/validator/autotrust.c
1697
if(*env->now < ta->last_change) {
usr.sbin/unbound/validator/autotrust.c
1701
elapsed = *env->now - ta->last_change;
usr.sbin/unbound/validator/autotrust.c
1713
reset_holddown(struct module_env* env, struct autr_ta* ta, int* changed)
usr.sbin/unbound/validator/autotrust.c
1715
ta->last_change = *env->now;
usr.sbin/unbound/validator/autotrust.c
1721
set_trustanchor_state(struct module_env* env, struct autr_ta* ta, int* changed,
usr.sbin/unbound/validator/autotrust.c
1727
reset_holddown(env, ta, changed);
usr.sbin/unbound/validator/autotrust.c
1733
do_newkey(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1736
set_trustanchor_state(env, anchor, c, AUTR_STATE_ADDPEND);
usr.sbin/unbound/validator/autotrust.c
1741
do_addtime(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1746
time_t exceeded = check_holddown(env, anchor, env->cfg->add_holddown);
usr.sbin/unbound/validator/autotrust.c
1752
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
usr.sbin/unbound/validator/autotrust.c
1763
do_remtime(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1765
time_t exceeded = check_holddown(env, anchor, env->cfg->del_holddown);
usr.sbin/unbound/validator/autotrust.c
1769
set_trustanchor_state(env, anchor, c, AUTR_STATE_REMOVED);
usr.sbin/unbound/validator/autotrust.c
1775
do_keyrem(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1778
set_trustanchor_state(env, anchor, c, AUTR_STATE_START);
usr.sbin/unbound/validator/autotrust.c
1781
set_trustanchor_state(env, anchor, c, AUTR_STATE_MISSING);
usr.sbin/unbound/validator/autotrust.c
1786
do_keypres(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1789
set_trustanchor_state(env, anchor, c, AUTR_STATE_VALID);
usr.sbin/unbound/validator/autotrust.c
1794
do_revoked(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1797
set_trustanchor_state(env, anchor, c, AUTR_STATE_REVOKED);
usr.sbin/unbound/validator/autotrust.c
1806
anchor_state_update(struct module_env* env, struct autr_ta* anchor, int* c)
usr.sbin/unbound/validator/autotrust.c
1814
do_newkey(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1820
do_keyrem(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1822
else do_addtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1828
do_revoked(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1831
do_keyrem(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1834
reset_holddown(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1841
do_revoked(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1844
do_keypres(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1849
reset_holddown(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1851
else do_remtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
1862
init_zsk_to_ksk(struct module_env* env, struct trust_anchor* tp, int* changed)
usr.sbin/unbound/validator/autotrust.c
1884
set_trustanchor_state(env, anchor, changed,
usr.sbin/unbound/validator/autotrust.c
1894
remove_missing_trustanchors(struct module_env* env, struct trust_anchor* tp,
usr.sbin/unbound/validator/autotrust.c
1916
valid = init_zsk_to_ksk(env, tp, changed);
usr.sbin/unbound/validator/autotrust.c
1930
set_trustanchor_state(env, anchor, changed,
usr.sbin/unbound/validator/autotrust.c
1938
if(env->cfg->keep_missing == 0)
usr.sbin/unbound/validator/autotrust.c
1941
exceeded = check_holddown(env, anchor, env->cfg->keep_missing);
usr.sbin/unbound/validator/autotrust.c
1948
set_trustanchor_state(env, anchor, changed,
usr.sbin/unbound/validator/autotrust.c
1956
do_statetable(struct module_env* env, struct trust_anchor* tp, int* changed)
usr.sbin/unbound/validator/autotrust.c
1963
anchor_state_update(env, anchor, changed);
usr.sbin/unbound/validator/autotrust.c
1965
remove_missing_trustanchors(env, tp, changed);
usr.sbin/unbound/validator/autotrust.c
1971
autr_holddown_exceed(struct module_env* env, struct trust_anchor* tp, int* c)
usr.sbin/unbound/validator/autotrust.c
1977
do_addtime(env, anchor, c);
usr.sbin/unbound/validator/autotrust.c
2012
calc_next_probe(struct module_env* env, time_t wait)
usr.sbin/unbound/validator/autotrust.c
2024
rnd = (time_t)ub_random_max(env->rnd, (long int)rnd);
usr.sbin/unbound/validator/autotrust.c
2025
return (time_t)(*env->now + rest + rnd);
usr.sbin/unbound/validator/autotrust.c
2040
reset_worker_timer_at(struct module_env* env, time_t next)
usr.sbin/unbound/validator/autotrust.c
2045
if(!env->probe_timer)
usr.sbin/unbound/validator/autotrust.c
2047
if(next > *env->now)
usr.sbin/unbound/validator/autotrust.c
2048
tv.tv_sec = (time_t)(next - *env->now);
usr.sbin/unbound/validator/autotrust.c
2054
comm_timer_set(env->probe_timer, &tv);
usr.sbin/unbound/validator/autotrust.c
2061
reset_worker_timer(struct module_env* env)
usr.sbin/unbound/validator/autotrust.c
2064
if(!env->anchors)
usr.sbin/unbound/validator/autotrust.c
2066
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2067
next = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2068
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2069
reset_worker_timer_at(env, next);
usr.sbin/unbound/validator/autotrust.c
2074
set_next_probe(struct module_env* env, struct trust_anchor* tp,
usr.sbin/unbound/validator/autotrust.c
2088
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2089
tp2 = (struct trust_anchor*)rbtree_search(env->anchors->tree, &key);
usr.sbin/unbound/validator/autotrust.c
2092
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2099
mold = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2100
(void)rbtree_delete(&env->anchors->autr->probe, tp);
usr.sbin/unbound/validator/autotrust.c
2101
tp->autr->next_probe_time = calc_next_probe(env,
usr.sbin/unbound/validator/autotrust.c
2103
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
usr.sbin/unbound/validator/autotrust.c
2104
mnew = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2106
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2108
(int)tp->autr->next_probe_time - (int)*env->now);
usr.sbin/unbound/validator/autotrust.c
2110
reset_worker_timer_at(env, mnew);
usr.sbin/unbound/validator/autotrust.c
2117
autr_tp_remove(struct module_env* env, struct trust_anchor* tp,
usr.sbin/unbound/validator/autotrust.c
2145
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2146
del_tp = (struct trust_anchor*)rbtree_delete(env->anchors->tree, &key);
usr.sbin/unbound/validator/autotrust.c
2147
mold = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2148
(void)rbtree_delete(&env->anchors->autr->probe, &key);
usr.sbin/unbound/validator/autotrust.c
2149
mnew = wait_probe_time(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2150
anchors_init_parents_locked(env->anchors);
usr.sbin/unbound/validator/autotrust.c
2151
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2159
autr_write_file(env, del_tp);
usr.sbin/unbound/validator/autotrust.c
2165
reset_worker_timer_at(env, mnew);
usr.sbin/unbound/validator/autotrust.c
2169
int autr_process_prime(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/autotrust.c
2189
tp->autr->last_queried = *env->now;
usr.sbin/unbound/validator/autotrust.c
2194
autr_holddown_exceed(env, tp, &changed);
usr.sbin/unbound/validator/autotrust.c
2212
check_contains_revoked(env, ve, tp, dnskey_rrset, &changed, qstate);
usr.sbin/unbound/validator/autotrust.c
2222
tp->autr->last_success = *env->now;
usr.sbin/unbound/validator/autotrust.c
2223
autr_tp_remove(env, tp, dnskey_rrset);
usr.sbin/unbound/validator/autotrust.c
2228
if(!verify_dnskey(env, ve, tp, dnskey_rrset, qstate)) {
usr.sbin/unbound/validator/autotrust.c
2234
autr_write_file(env, tp);
usr.sbin/unbound/validator/autotrust.c
2239
tp->autr->last_success = *env->now;
usr.sbin/unbound/validator/autotrust.c
2247
if(!update_events(env, ve, tp, dnskey_rrset, &changed)) {
usr.sbin/unbound/validator/autotrust.c
2256
if(!do_statetable(env, tp, &changed)) {
usr.sbin/unbound/validator/autotrust.c
2263
if(!set_next_probe(env, tp, dnskey_rrset))
usr.sbin/unbound/validator/autotrust.c
2265
autr_write_file(env, tp);
usr.sbin/unbound/validator/autotrust.c
2274
autr_tp_remove(env, tp, dnskey_rrset);
usr.sbin/unbound/validator/autotrust.c
2368
struct module_env* env = (struct module_env*)arg;
usr.sbin/unbound/validator/autotrust.c
2370
reset_worker_timer(env);
usr.sbin/unbound/validator/autotrust.c
2375
probe_anchor(struct module_env* env, struct trust_anchor* tp)
usr.sbin/unbound/validator/autotrust.c
2380
sldns_buffer* buf = env->scratch_buffer;
usr.sbin/unbound/validator/autotrust.c
2381
qinfo.qname = regional_alloc_init(env->scratch, tp->name, tp->namelen);
usr.sbin/unbound/validator/autotrust.c
2392
(int)tp->autr->next_probe_time - (int)*env->now);
usr.sbin/unbound/validator/autotrust.c
2413
rrset_cache_remove(env->rrset_cache, qinfo.qname, qinfo.qname_len,
usr.sbin/unbound/validator/autotrust.c
2415
key_cache_remove(env->key_cache, qinfo.qname, qinfo.qname_len,
usr.sbin/unbound/validator/autotrust.c
2418
if(!mesh_new_callback(env->mesh, &qinfo, qflags, &edns, buf, 0,
usr.sbin/unbound/validator/autotrust.c
2419
&probe_answer_cb, env, 0)) {
usr.sbin/unbound/validator/autotrust.c
2426
todo_probe(struct module_env* env, time_t* next)
usr.sbin/unbound/validator/autotrust.c
2431
lock_basic_lock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2432
if( (el=rbtree_first(&env->anchors->autr->probe)) == RBTREE_NULL) {
usr.sbin/unbound/validator/autotrust.c
2434
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2443
if((time_t)tp->autr->next_probe_time > *env->now) {
usr.sbin/unbound/validator/autotrust.c
2445
*next = (time_t)tp->autr->next_probe_time - *env->now;
usr.sbin/unbound/validator/autotrust.c
2447
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2452
(void)rbtree_delete(&env->anchors->autr->probe, tp);
usr.sbin/unbound/validator/autotrust.c
2453
tp->autr->next_probe_time = calc_next_probe(env, tp->autr->retry_time);
usr.sbin/unbound/validator/autotrust.c
2454
(void)rbtree_insert(&env->anchors->autr->probe, &tp->autr->pnode);
usr.sbin/unbound/validator/autotrust.c
2455
lock_basic_unlock(&env->anchors->lock);
usr.sbin/unbound/validator/autotrust.c
2461
autr_probe_timer(struct module_env* env)
usr.sbin/unbound/validator/autotrust.c
2469
while( (tp = todo_probe(env, &next_probe)) ) {
usr.sbin/unbound/validator/autotrust.c
2471
probe_anchor(env, tp);
usr.sbin/unbound/validator/autotrust.c
2474
regional_free_all(env->scratch);
usr.sbin/unbound/validator/autotrust.c
72
static void do_revoked(struct module_env* env, struct autr_ta* anchor, int* c);
usr.sbin/unbound/validator/autotrust.h
158
time_t autr_probe_timer(struct module_env* env);
usr.sbin/unbound/validator/autotrust.h
176
void autr_write_file(struct module_env* env, struct trust_anchor* tp);
usr.sbin/unbound/validator/autotrust.h
197
int autr_process_prime(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec.c
177
nsec_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec.c
188
rrset_check_sec_status(env->rrset_cache, nsec, *env->now);
usr.sbin/unbound/validator/val_nsec.c
191
d->security = val_verify_rrset_entry(env, ve, nsec, kkey, reason,
usr.sbin/unbound/validator/val_nsec.c
195
rrset_update_sec_status(env->rrset_cache, nsec, *env->now);
usr.sbin/unbound/validator/val_nsec.c
202
val_nsec_prove_nodata_dsreply(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec.c
223
if(!nsec_verify_rrset(env, ve, nsec, kkey, reason,
usr.sbin/unbound/validator/val_nsec.c
254
if(!nsec_verify_rrset(env, ve, rep->rrsets[i], kkey, reason,
usr.sbin/unbound/validator/val_nsec.h
79
enum sec_status val_nsec_prove_nodata_dsreply(struct module_env* env,
usr.sbin/unbound/validator/val_nsec3.c
1010
nsec3_prove_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
1019
if(!nsec3_find_closest_encloser(env, flt, ct, qinfo, ce, calculations)) {
usr.sbin/unbound/validator/val_nsec3.c
1073
if(!find_covering_nsec3(env, flt, ct, nc, nc_len,
usr.sbin/unbound/validator/val_nsec3.c
1118
nsec3_do_prove_nameerror(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
1131
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
usr.sbin/unbound/validator/val_nsec3.c
1155
if(!find_covering_nsec3(env, flt, ct, wc, wclen, &wc_rrset, &wc_rr, calc)) {
usr.sbin/unbound/validator/val_nsec3.c
1183
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1199
return nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
1209
nsec3_do_prove_nodata(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
1220
if(find_matching_nsec3(env, flt, ct, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/validator/val_nsec3.c
1281
sec = nsec3_prove_closest_encloser(env, flt, ct, qinfo, 1, &ce, calc);
usr.sbin/unbound/validator/val_nsec3.c
1299
if(wc && find_matching_nsec3(env, flt, ct, wc, wclen, &rrset, &rr,
usr.sbin/unbound/validator/val_nsec3.c
1369
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1383
return nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
1387
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1418
if(!find_covering_nsec3(env, &flt, ct, nc, nc_len,
usr.sbin/unbound/validator/val_nsec3.c
1447
list_is_secure(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1461
rrset_check_sec_status(env->rrset_cache, list[i], *env->now);
usr.sbin/unbound/validator/val_nsec3.c
1464
d->security = val_verify_rrset_entry(env, ve, list[i], kkey,
usr.sbin/unbound/validator/val_nsec3.c
1471
rrset_update_sec_status(env->rrset_cache, list[i], *env->now);
usr.sbin/unbound/validator/val_nsec3.c
1477
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1496
if(!list_is_secure(env, ve, list, num, kkey, reason, reason_bogus,
usr.sbin/unbound/validator/val_nsec3.c
1511
if(find_matching_nsec3(env, &flt, ct, qinfo->qname, qinfo->qname_len,
usr.sbin/unbound/validator/val_nsec3.c
1549
sec = nsec3_prove_closest_encloser(env, &flt, ct, qinfo, 1, &ce, &calc);
usr.sbin/unbound/validator/val_nsec3.c
1585
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.c
1605
secnx = nsec3_do_prove_nameerror(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
1610
sec = nsec3_do_prove_nodata(env, &flt, ct, qinfo, calc);
usr.sbin/unbound/validator/val_nsec3.c
764
find_matching_nsec3(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
787
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
usr.sbin/unbound/validator/val_nsec3.c
874
find_covering_nsec3(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
897
r = nsec3_hash_name(ct->ct, ct->region, env->scratch_buffer,
usr.sbin/unbound/validator/val_nsec3.c
910
env->scratch_buffer)) {
usr.sbin/unbound/validator/val_nsec3.c
936
nsec3_find_closest_encloser(struct module_env* env, struct nsec3_filter* flt,
usr.sbin/unbound/validator/val_nsec3.c
957
if(find_matching_nsec3(env, flt, ct, nm, nmlen,
usr.sbin/unbound/validator/val_nsec3.h
130
nsec3_prove_nameerror(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
168
nsec3_prove_nodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
193
nsec3_prove_wildcard(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
223
nsec3_prove_nods(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_nsec3.h
248
nsec3_prove_nxornodata(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
1683
if(qstate && qstate->env && qstate->env->mesh)
usr.sbin/unbound/validator/val_sigcrypt.c
1684
qstate->env->mesh->val_ops++;
usr.sbin/unbound/validator/val_sigcrypt.c
294
ds_create_dnskey_digest(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.c
299
sldns_buffer* b = env->scratch_buffer;
usr.sbin/unbound/validator/val_sigcrypt.c
319
int ds_digest_match_dnskey(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.c
346
digest = regional_alloc(env->scratch, digestlen);
usr.sbin/unbound/validator/val_sigcrypt.c
351
if(!ds_create_dnskey_digest(env, dnskey_rrset, dnskey_idx, ds_rrset,
usr.sbin/unbound/validator/val_sigcrypt.c
556
dnskeyset_verify_rrset_sig(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
589
sec = dnskey_verify_rrset_sig(env->scratch,
usr.sbin/unbound/validator/val_sigcrypt.c
590
env->scratch_buffer, ve, now, rrset, dnskey, i,
usr.sbin/unbound/validator/val_sigcrypt.c
624
dnskeyset_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
659
sec = dnskeyset_verify_rrset_sig(env, ve, *env->now, rrset,
usr.sbin/unbound/validator/val_sigcrypt.c
707
dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_sigcrypt.c
735
sec = dnskey_verify_rrset_sig(env->scratch,
usr.sbin/unbound/validator/val_sigcrypt.c
736
env->scratch_buffer, ve, *env->now, rrset,
usr.sbin/unbound/validator/val_sigcrypt.h
156
int ds_digest_match_dnskey(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.h
272
enum sec_status dnskeyset_verify_rrset(struct module_env* env,
usr.sbin/unbound/validator/val_sigcrypt.h
293
enum sec_status dnskey_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
1093
val_check_nonsecure(struct module_env* env, struct reply_info* rep)
usr.sbin/unbound/validator/val_utils.c
1141
if(!env->cfg->val_clean_additional)
usr.sbin/unbound/validator/val_utils.c
1178
struct rrset_cache* r, struct module_env* env)
usr.sbin/unbound/validator/val_utils.c
1191
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
usr.sbin/unbound/validator/val_utils.c
1198
struct rrset_cache* r, struct module_env* env)
usr.sbin/unbound/validator/val_utils.c
1208
rrset_update_sec_status(r, rep->rrsets[i], *env->now);
usr.sbin/unbound/validator/val_utils.c
1301
val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen, uint16_t c,
usr.sbin/unbound/validator/val_utils.c
1307
env->rrset_cache, nm, nmlen, LDNS_RR_TYPE_DS, c, 0,
usr.sbin/unbound/validator/val_utils.c
1308
*env->now, 0);
usr.sbin/unbound/validator/val_utils.c
1312
rrset, region, *env->now);
usr.sbin/unbound/validator/val_utils.c
1331
msg = val_neg_getmsg(env->neg_cache, &qinfo, region, env->rrset_cache,
usr.sbin/unbound/validator/val_utils.c
1332
env->scratch_buffer, *env->now, 0, topname, env->cfg);
usr.sbin/unbound/validator/val_utils.c
405
val_verify_rrset(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
423
rrset_check_sec_status(env->rrset_cache, rrset, *env->now);
usr.sbin/unbound/validator/val_utils.c
433
sec = dnskeyset_verify_rrset(env, ve, rrset, keys, sigalg, reason,
usr.sbin/unbound/validator/val_utils.c
436
regional_free_all(env->scratch);
usr.sbin/unbound/validator/val_utils.c
458
rrset_update_sec_status(env->rrset_cache, rrset, *env->now);
usr.sbin/unbound/validator/val_utils.c
465
val_verify_rrset_entry(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
482
sec = val_verify_rrset(env, ve, rrset, &dnskey, kd->algo, reason,
usr.sbin/unbound/validator/val_utils.c
489
verify_dnskeys_with_ds_rr(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
514
if(!ds_digest_match_dnskey(env, dnskey_rrset, i, ds_rrset,
usr.sbin/unbound/validator/val_utils.c
535
sec = dnskey_verify_rrset(env, ve, dnskey_rrset, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
576
val_verify_DNSKEY_with_DS(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
617
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
677
val_verify_new_DNSKEYs(struct regional* region, struct module_env* env,
usr.sbin/unbound/validator/val_utils.c
684
enum sec_status sec = val_verify_DNSKEY_with_DS(env, ve,
usr.sbin/unbound/validator/val_utils.c
693
*env->now);
usr.sbin/unbound/validator/val_utils.c
699
*env->now);
usr.sbin/unbound/validator/val_utils.c
703
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
usr.sbin/unbound/validator/val_utils.c
707
val_verify_DNSKEY_with_TA(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.c
762
sec = verify_dnskeys_with_ds_rr(env, ve, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
807
sec = dnskey_verify_rrset(env, ve, dnskey_rrset,
usr.sbin/unbound/validator/val_utils.c
851
val_verify_new_DNSKEYs_with_ta(struct regional* region, struct module_env* env,
usr.sbin/unbound/validator/val_utils.c
859
enum sec_status sec = val_verify_DNSKEY_with_TA(env, ve,
usr.sbin/unbound/validator/val_utils.c
868
downprot?sigalg:NULL, LDNS_EDE_NONE, NULL, *env->now);
usr.sbin/unbound/validator/val_utils.c
874
*env->now);
usr.sbin/unbound/validator/val_utils.c
878
BOGUS_KEY_TTL, *reason_bogus, *reason, *env->now);
usr.sbin/unbound/validator/val_utils.h
132
enum sec_status val_verify_rrset_entry(struct module_env* env,
usr.sbin/unbound/validator/val_utils.h
157
enum sec_status val_verify_DNSKEY_with_DS(struct module_env* env,
usr.sbin/unbound/validator/val_utils.h
183
enum sec_status val_verify_DNSKEY_with_TA(struct module_env* env,
usr.sbin/unbound/validator/val_utils.h
218
struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.h
251
struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/val_utils.h
332
void val_check_nonsecure(struct module_env* env, struct reply_info* rep);
usr.sbin/unbound/validator/val_utils.h
344
struct module_env* env);
usr.sbin/unbound/validator/val_utils.h
355
struct rrset_cache* r, struct module_env* env);
usr.sbin/unbound/validator/val_utils.h
427
struct dns_msg* val_find_DS(struct module_env* env, uint8_t* nm, size_t nmlen,
usr.sbin/unbound/validator/validator.c
1007
validate_positive_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1036
if(wc && !wc_cached && env->cfg->aggressive_nsec) {
usr.sbin/unbound/validator/validator.c
1037
rrset_cache_update_wildcard(env->rrset_cache, s, wc, wl,
usr.sbin/unbound/validator/validator.c
1038
env->alloc, *env->now);
usr.sbin/unbound/validator/validator.c
1073
enum sec_status sec = nsec3_prove_wildcard(env, ve,
usr.sbin/unbound/validator/validator.c
1126
validate_nodata_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1187
enum sec_status sec = nsec3_prove_nodata(env, ve,
usr.sbin/unbound/validator/validator.c
1240
validate_nameerror_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1288
chase_reply->security = nsec3_prove_nameerror(env, ve,
usr.sbin/unbound/validator/validator.c
1307
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
usr.sbin/unbound/validator/validator.c
1323
validate_nodata_response(env, ve, qchase, chase_reply, kkey,
usr.sbin/unbound/validator/validator.c
1401
validate_any_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1473
enum sec_status sec = nsec3_prove_wildcard(env, ve,
usr.sbin/unbound/validator/validator.c
1528
validate_cname_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1606
enum sec_status sec = nsec3_prove_wildcard(env, ve,
usr.sbin/unbound/validator/validator.c
1658
validate_cname_noanswer_response(struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
1744
enum sec_status sec = nsec3_prove_nxornodata(env, ve,
usr.sbin/unbound/validator/validator.c
181
val_apply_cfg(struct module_env* env, struct val_env* val_env,
usr.sbin/unbound/validator/validator.c
1846
val_mark_indeterminate(vq->chase_reply, qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
1847
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
1851
anchor = anchors_lookup(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
186
if(!env->anchors)
usr.sbin/unbound/validator/validator.c
187
env->anchors = anchors_create();
usr.sbin/unbound/validator/validator.c
1876
anchor = anchors_lookup(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
188
if(!env->anchors) {
usr.sbin/unbound/validator/validator.c
1908
vq->qchase.qclass, qstate->region, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
192
if (env->key_cache)
usr.sbin/unbound/validator/validator.c
1927
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
193
val_env->kcache = env->key_cache;
usr.sbin/unbound/validator/validator.c
1955
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
200
env->key_cache = val_env->kcache;
usr.sbin/unbound/validator/validator.c
201
if(!anchors_apply_cfg(env->anchors, cfg)) {
usr.sbin/unbound/validator/validator.c
210
if (env->neg_cache)
usr.sbin/unbound/validator/validator.c
211
val_env->neg_cache = env->neg_cache;
usr.sbin/unbound/validator/validator.c
2121
(msg=val_find_DS(qstate->env, target_key_name,
usr.sbin/unbound/validator/validator.c
219
env->neg_cache = val_env->neg_cache;
usr.sbin/unbound/validator/validator.c
2192
qstate->env->rrset_cache, qstate->env);
usr.sbin/unbound/validator/validator.c
2194
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
2209
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
2233
if(!validate_msg_signatures(qstate, vq, qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2268
validate_positive_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
227
val_init(struct module_env* env, int id)
usr.sbin/unbound/validator/validator.c
2284
validate_nodata_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2301
validate_nameerror_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2319
validate_cname_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2336
validate_cname_noanswer_response(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
235
env->modinfo[id] = (void*)val_env;
usr.sbin/unbound/validator/validator.c
236
env->need_to_validate = 1;
usr.sbin/unbound/validator/validator.c
2361
validate_any_response(qstate->env, ve, &vq->qchase,
usr.sbin/unbound/validator/validator.c
243
if(!val_apply_cfg(env, val_env, env->cfg)) {
usr.sbin/unbound/validator/validator.c
2462
val_check_nonsecure(qstate->env, vq->orig_msg->rep);
usr.sbin/unbound/validator/validator.c
2467
val_neg_addreply(qstate->env->neg_cache,
usr.sbin/unbound/validator/validator.c
247
if(env->cfg->disable_edns_do) {
usr.sbin/unbound/validator/validator.c
249
env->anchors);
usr.sbin/unbound/validator/validator.c
2492
if(qstate->env->cfg->serve_expired &&
usr.sbin/unbound/validator/validator.c
2493
(e=msg_cache_lookup(qstate->env, qstate->qinfo.qname,
usr.sbin/unbound/validator/validator.c
2500
(!qstate->env->cfg->serve_expired_ttl ||
usr.sbin/unbound/validator/validator.c
2501
qstate->env->cfg->serve_expired_ttl_reset ||
usr.sbin/unbound/validator/validator.c
2502
*qstate->env->now <= rep->serve_expired_ttl)) {
usr.sbin/unbound/validator/validator.c
2508
*qstate->env->now;
usr.sbin/unbound/validator/validator.c
2509
if(qstate->env->cfg->serve_expired_ttl_reset &&
usr.sbin/unbound/validator/validator.c
2510
*qstate->env->now + qstate->env->cfg->serve_expired_ttl
usr.sbin/unbound/validator/validator.c
2514
rep->serve_expired_ttl = *qstate->env->now +
usr.sbin/unbound/validator/validator.c
2515
qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/validator/validator.c
2537
vq->orig_msg->rep->ttl + qstate->env->cfg->serve_expired_ttl;
usr.sbin/unbound/validator/validator.c
2538
if((qstate->env->cfg->val_log_level >= 1 ||
usr.sbin/unbound/validator/validator.c
2539
qstate->env->cfg->log_servfail) &&
usr.sbin/unbound/validator/validator.c
2540
!qstate->env->cfg->val_log_squelch) {
usr.sbin/unbound/validator/validator.c
2541
if(qstate->env->cfg->val_log_level < 2 &&
usr.sbin/unbound/validator/validator.c
2542
!qstate->env->cfg->log_servfail)
usr.sbin/unbound/validator/validator.c
255
env->cfg->disable_edns_do = 0;
usr.sbin/unbound/validator/validator.c
2561
if(qstate->env->cfg->val_permissive_mode)
usr.sbin/unbound/validator/validator.c
2566
qstate->env->cfg->root_key_sentinel &&
usr.sbin/unbound/validator/validator.c
2576
!anchor_has_keytag(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
2586
anchor_has_keytag(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
2610
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
usr.sbin/unbound/validator/validator.c
2620
if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo,
usr.sbin/unbound/validator/validator.c
263
val_deinit(struct module_env* env, int id)
usr.sbin/unbound/validator/validator.c
266
if(!env || !env->modinfo[id])
usr.sbin/unbound/validator/validator.c
2676
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
268
val_env = (struct val_env*)env->modinfo[id];
usr.sbin/unbound/validator/validator.c
270
anchors_delete(env->anchors);
usr.sbin/unbound/validator/validator.c
271
env->anchors = NULL;
usr.sbin/unbound/validator/validator.c
273
env->key_cache = NULL;
usr.sbin/unbound/validator/validator.c
275
env->neg_cache = NULL;
usr.sbin/unbound/validator/validator.c
2782
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
2788
int downprot = qstate->env->cfg->harden_algo_downgrade;
usr.sbin/unbound/validator/validator.c
279
env->modinfo[id] = NULL;
usr.sbin/unbound/validator/validator.c
2803
if(qstate->env->cfg->harden_dnssec_stripped) {
usr.sbin/unbound/validator/validator.c
2807
reason_bogus, rstr, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
2810
reason_bogus, rstr, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
2818
kkey = val_verify_new_DNSKEYs_with_ta(qstate->region, qstate->env, ve,
usr.sbin/unbound/validator/validator.c
2838
if(qstate->env->cfg->harden_dnssec_stripped) {
usr.sbin/unbound/validator/validator.c
2843
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
2847
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
2888
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
2931
sec = val_verify_rrset_entry(qstate->env, ve, ds,
usr.sbin/unbound/validator/validator.c
2951
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
2959
NULL, LDNS_EDE_NONE, NULL, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
2983
qstate->env, ve, qinfo, msg->rep, vq->key_entry,
usr.sbin/unbound/validator/validator.c
2994
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
3019
sec = nsec3_prove_nods(qstate->env, ve,
usr.sbin/unbound/validator/validator.c
3036
*qstate->env->now);
usr.sbin/unbound/validator/validator.c
3088
sec = val_verify_rrset_entry(qstate->env, ve, cname,
usr.sbin/unbound/validator/validator.c
3120
reason_bogus, reason, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
3150
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
3249
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
3293
BOGUS_KEY_TTL, reason_bogus, rstr, *qstate->env->now);
usr.sbin/unbound/validator/validator.c
3310
downprot = qstate->env->cfg->harden_algo_downgrade;
usr.sbin/unbound/validator/validator.c
3311
vq->key_entry = val_verify_new_DNSKEYs(qstate->region, qstate->env,
usr.sbin/unbound/validator/validator.c
3347
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
3371
struct val_env* ve = (struct val_env*)qstate->env->modinfo[id];
usr.sbin/unbound/validator/validator.c
3373
struct trust_anchor* ta = anchor_find(qstate->env->anchors,
usr.sbin/unbound/validator/validator.c
3393
if(!autr_process_prime(qstate->env, ve, ta, dnskey_rrset,
usr.sbin/unbound/validator/validator.c
3420
qstate->env->cfg->val_log_level >= 2);
usr.sbin/unbound/validator/validator.c
3504
val_get_mem(struct module_env* env, int id)
usr.sbin/unbound/validator/validator.c
3506
struct val_env* ve = (struct val_env*)env->modinfo[id];
usr.sbin/unbound/validator/validator.c
488
fptr_ok(fptr_whitelist_modenv_detect_cycle(qstate->env->detect_cycle));
usr.sbin/unbound/validator/validator.c
489
if((*qstate->env->detect_cycle)(qstate, &ask,
usr.sbin/unbound/validator/validator.c
498
qstate->env->add_sub));
usr.sbin/unbound/validator/validator.c
499
if(!(*qstate->env->add_sub)(qstate, &ask,
usr.sbin/unbound/validator/validator.c
507
qstate->env->attach_sub));
usr.sbin/unbound/validator/validator.c
508
if(!(*qstate->env->attach_sub)(qstate, &ask,
usr.sbin/unbound/validator/validator.c
629
if(newq && qstate->env->cfg->trust_anchor_signaling &&
usr.sbin/unbound/validator/validator.c
679
struct module_env* env, struct val_env* ve,
usr.sbin/unbound/validator/validator.c
723
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
usr.sbin/unbound/validator/validator.c
746
i+1 < (env->cfg->val_clean_additional?
usr.sbin/unbound/validator/validator.c
768
sec = val_verify_rrset_entry(env, ve, s, key_entry, &reason,
usr.sbin/unbound/validator/validator.c
786
i+1 < (env->cfg->val_clean_additional?
usr.sbin/unbound/validator/validator.c
800
if(!env->cfg->val_clean_additional)
usr.sbin/unbound/validator/validator.c
814
(void)val_verify_rrset_entry(env, ve, s, key_entry,
usr.sbin/unbound/validator/validator.c
840
mesh_run(qstate->env->mesh, qstate->mesh_info, module_event_pass,
usr.sbin/unbound/validator/validator.c
864
qstate->env->worker_base,
usr.sbin/unbound/validator/validator.c
879
if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states)
usr.sbin/unbound/validator/validator.c
881
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/2)
usr.sbin/unbound/validator/validator.c
883
else if(qstate->env->mesh->all.count >= qstate->env->mesh->max_reply_states/4)
usr.sbin/unbound/validator/validator.c
894
usec = base + ub_random_max(qstate->env->rnd, usec-base);
usr.sbin/unbound/validator/validator.h
250
int val_init(struct module_env* env, int id);
usr.sbin/unbound/validator/validator.h
253
void val_deinit(struct module_env* env, int id);
usr.sbin/unbound/validator/validator.h
279
size_t val_get_mem(struct module_env* env, int id);
usr.sbin/vmd/config.c
101
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
111
config_init_localprefix(&env->vmd_cfg);
usr.sbin/vmd/config.c
115
if (what & CONFIG_VMS && env->vmd_vms != NULL) {
usr.sbin/vmd/config.c
116
while ((vm = TAILQ_FIRST(env->vmd_vms)) != NULL) {
usr.sbin/vmd/config.c
119
while ((n2i = TAILQ_FIRST(env->vmd_known)) != NULL) {
usr.sbin/vmd/config.c
120
TAILQ_REMOVE(env->vmd_known, n2i, entry);
usr.sbin/vmd/config.c
123
env->vmd_nvm = 0;
usr.sbin/vmd/config.c
125
if (what & CONFIG_SWITCHES && env->vmd_switches != NULL) {
usr.sbin/vmd/config.c
126
while ((vsw = TAILQ_FIRST(env->vmd_switches)) != NULL)
usr.sbin/vmd/config.c
128
env->vmd_nswitches = 0;
usr.sbin/vmd/config.c
133
config_setconfig(struct vmd *env)
usr.sbin/vmd/config.c
135
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
143
proc_compose(ps, id, IMSG_VMDOP_CONFIG, &env->vmd_cfg,
usr.sbin/vmd/config.c
144
sizeof(env->vmd_cfg));
usr.sbin/vmd/config.c
151
config_getconfig(struct vmd *env, struct imsg *imsg)
usr.sbin/vmd/config.c
153
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
157
vmop_config_read(imsg, &env->vmd_cfg);
usr.sbin/vmd/config.c
163
config_setreset(struct vmd *env, unsigned int reset)
usr.sbin/vmd/config.c
165
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
65
config_init(struct vmd *env)
usr.sbin/vmd/config.c
67
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/config.c
75
if (config_init_localprefix(&env->vmd_cfg) == -1)
usr.sbin/vmd/config.c
81
if ((env->vmd_vms = calloc(1, sizeof(*env->vmd_vms))) == NULL)
usr.sbin/vmd/config.c
83
if ((env->vmd_known = calloc(1, sizeof(*env->vmd_known))) == NULL)
usr.sbin/vmd/config.c
85
TAILQ_INIT(env->vmd_vms);
usr.sbin/vmd/config.c
86
TAILQ_INIT(env->vmd_known);
usr.sbin/vmd/config.c
89
if ((env->vmd_switches = calloc(1,
usr.sbin/vmd/config.c
90
sizeof(*env->vmd_switches))) == NULL)
usr.sbin/vmd/config.c
92
TAILQ_INIT(env->vmd_switches);
usr.sbin/vmd/config.c
99
config_purge(struct vmd *env, unsigned int reset)
usr.sbin/vmd/parse.y
101
extern struct vmd *env;
usr.sbin/vmd/parse.y
1215
env->vmd_cfg.cfg_agentx.ax_enabled = 0;
usr.sbin/vmd/parse.y
1216
env->vmd_cfg.cfg_agentx.ax_context[0] = '\0';
usr.sbin/vmd/parse.y
1217
env->vmd_cfg.cfg_agentx.ax_path[0] = '\0';
usr.sbin/vmd/parse.y
188
env->vmd_cfg.cfg_flags |= VMD_CFG_INET6;
usr.sbin/vmd/parse.y
193
if (parse_prefix6($4, &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/parse.y
198
env->vmd_cfg.cfg_flags |= VMD_CFG_INET6;
usr.sbin/vmd/parse.y
199
env->vmd_cfg.cfg_flags &= ~VMD_CFG_AUTOINET6;
usr.sbin/vmd/parse.y
206
if (parse_prefix4($3, &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/parse.y
214
env->vmd_ps.ps_csock.cs_uid = $3.uid;
usr.sbin/vmd/parse.y
215
env->vmd_ps.ps_csock.cs_gid = $3.gid == -1 ? 0 : $3.gid;
usr.sbin/vmd/parse.y
218
env->vmd_cfg.cfg_agentx.ax_enabled = 1;
usr.sbin/vmd/parse.y
220
if (env->vmd_cfg.cfg_agentx.ax_path[0] == '\0')
usr.sbin/vmd/parse.y
221
if (strlcpy(env->vmd_cfg.cfg_agentx.ax_path,
usr.sbin/vmd/parse.y
223
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) >=
usr.sbin/vmd/parse.y
224
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) {
usr.sbin/vmd/parse.y
230
env->vmd_cfg.cfg_flags |= VMD_CFG_STAGGERED_START;
usr.sbin/vmd/parse.y
231
env->vmd_cfg.delay.tv_sec = $6;
usr.sbin/vmd/parse.y
232
env->vmd_cfg.parallelism = $4;
usr.sbin/vmd/parse.y
240
vsw->sw_id = env->vmd_nswitches + 1;
usr.sbin/vmd/parse.y
258
} else if (!env->vmd_noaction) {
usr.sbin/vmd/parse.y
259
TAILQ_INSERT_TAIL(env->vmd_switches,
usr.sbin/vmd/parse.y
261
env->vmd_nswitches++;
usr.sbin/vmd/parse.y
369
if (!env->vmd_noaction) {
usr.sbin/vmd/parse.y
370
ret = vm_register(&env->vmd_ps, &vmc,
usr.sbin/vmd/parse.y
616
if (strlcpy(env->vmd_cfg.cfg_agentx.ax_context, $2,
usr.sbin/vmd/parse.y
617
sizeof(env->vmd_cfg.cfg_agentx.ax_context)) >=
usr.sbin/vmd/parse.y
618
sizeof(env->vmd_cfg.cfg_agentx.ax_context)) {
usr.sbin/vmd/parse.y
626
if (strlcpy(env->vmd_cfg.cfg_agentx.ax_path, $2,
usr.sbin/vmd/parse.y
627
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) >=
usr.sbin/vmd/parse.y
628
sizeof(env->vmd_cfg.cfg_agentx.ax_path)) {
usr.sbin/vmd/parse.y
634
if (env->vmd_cfg.cfg_agentx.ax_path[0] != '/') {
usr.sbin/vmd/priv.c
127
if (ioctl(env->vmd_fd, SIOCSIFDESCR, &ifr) == -1)
usr.sbin/vmd/priv.c
133
if (ioctl(env->vmd_fd, SIOCSIFRDOMAIN, &ifr) == -1)
usr.sbin/vmd/priv.c
146
if (ioctl(env->vmd_fd, SIOCBRDGADD, &ifbr) == -1 &&
usr.sbin/vmd/priv.c
153
if (ioctl(env->vmd_fd, SIOCGIFFLAGS, &ifr) == -1)
usr.sbin/vmd/priv.c
161
if (ioctl(env->vmd_fd, SIOCGIFFLAGS, &ifr) == -1) {
usr.sbin/vmd/priv.c
169
if (ioctl(env->vmd_fd, SIOCSIFFLAGS, &ifr) == -1)
usr.sbin/vmd/priv.c
182
if (ioctl(env->vmd_fd, SIOCAIFGROUP, &ifgr) == -1 &&
usr.sbin/vmd/priv.c
201
if (ioctl(env->vmd_fd, SIOCAIFADDR, &ifra) == -1)
usr.sbin/vmd/priv.c
224
if (ioctl(env->vmd_fd6, SIOCDIFADDR_IN6, &in6_ifra) == -1 &&
usr.sbin/vmd/priv.c
228
if (ioctl(env->vmd_fd6, SIOCAIFADDR_IN6, &in6_ifra) == -1)
usr.sbin/vmd/priv.c
248
config_getconfig(env, imsg);
usr.sbin/vmd/priv.c
252
config_purge(env, mode);
usr.sbin/vmd/priv.c
328
struct vmd *env = ps->ps_env;
usr.sbin/vmd/priv.c
450
vm_priv_addr(&env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/priv.c
463
(env->vmd_cfg.cfg_flags & VMD_CFG_INET6)) {
usr.sbin/vmd/priv.c
477
if (vm_priv_addr6(&env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/priv.c
58
struct vmd *env = ps->ps_env;
usr.sbin/vmd/priv.c
66
if ((env->vmd_fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
usr.sbin/vmd/priv.c
70
if ((env->vmd_fd6 = socket(AF_INET6, SOCK_DGRAM, 0)) == -1)
usr.sbin/vmd/priv.c
80
struct vmd *env = ps->ps_env;
usr.sbin/vmd/psp.c
101
if (ioctl(env->vmd_psp_fd, PSP_IOC_GET_GSTATUS, &gst) < 0) {
usr.sbin/vmd/psp.c
134
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_START, &ls) < 0) {
usr.sbin/vmd/psp.c
159
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_UPDATE_DATA, &lud) < 0) {
usr.sbin/vmd/psp.c
188
if (ioctl(env->vmd_psp_fd, PSP_IOC_ENCRYPT_STATE, &es) < 0) {
usr.sbin/vmd/psp.c
211
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_MEASURE, &lm) < 0) {
usr.sbin/vmd/psp.c
252
if (ioctl(env->vmd_psp_fd, PSP_IOC_LAUNCH_FINISH, &lf) < 0) {
usr.sbin/vmd/psp.c
275
if (ioctl(env->vmd_psp_fd, PSP_IOC_ACTIVATE, &act) < 0) {
usr.sbin/vmd/psp.c
298
if (ioctl(env->vmd_psp_fd, PSP_IOC_GUEST_SHUTDOWN, &gshutdown) < 0) {
usr.sbin/vmd/psp.c
30
extern struct vmd *env;
usr.sbin/vmd/psp.c
312
if (ioctl(env->vmd_psp_fd, PSP_IOC_INIT) < 0) {
usr.sbin/vmd/psp.c
326
if (ioctl(env->vmd_psp_fd, PSP_IOC_SHUTDOWN) < 0) {
usr.sbin/vmd/psp.c
356
env->vmd_psp_fd = open(PSP_NODE, O_RDWR);
usr.sbin/vmd/psp.c
357
if (env->vmd_psp_fd == -1) {
usr.sbin/vmd/psp.c
50
if (ioctl(env->vmd_psp_fd, PSP_IOC_GET_PSTATUS, &pst) < 0) {
usr.sbin/vmd/psp.c
80
if (ioctl(env->vmd_psp_fd, PSP_IOC_DF_FLUSH) < 0) {
usr.sbin/vmd/virtio.c
1065
&env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/virtio.c
1610
snprintf(vmm_fd, sizeof(vmm_fd), "%d", env->vmd_fd);
usr.sbin/vmd/virtio.c
1619
nargv[i++] = env->argv0;
usr.sbin/vmd/virtio.c
1628
if (env->vmd_debug)
usr.sbin/vmd/virtio.c
1630
if (env->vmd_verbose == 1)
usr.sbin/vmd/virtio.c
1632
else if (env->vmd_verbose > 1)
usr.sbin/vmd/virtio.c
56
extern struct vmd *env;
usr.sbin/vmd/vm.c
124
sz = atomicio(read, fd, &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/vm.c
125
sizeof(env->vmd_cfg.cfg_localprefix));
usr.sbin/vmd/vm.c
126
if (sz != sizeof(env->vmd_cfg.cfg_localprefix)) {
usr.sbin/vmd/vm.c
140
if (vm.vm_params.vmc_sev && env->vmd_psp_fd < 0) {
usr.sbin/vmd/vm.c
510
if (ioctl(env->vmd_fd, VMM_IOC_RESETCPU, &vrp) == -1)
usr.sbin/vmd/vm.c
560
if (ioctl(env->vmd_fd, VMM_IOC_CREATE, &vcp) == -1)
usr.sbin/vmd/vm.c
59
extern struct vmd *env;
usr.sbin/vmd/vm.c
897
if (ioctl(env->vmd_fd, VMM_IOC_RUN, vrp) == -1) {
usr.sbin/vmd/vm.c
92
env->vmd_fd = fd_vmm;
usr.sbin/vmd/vm.c
944
if (ioctl(env->vmd_fd, VMM_IOC_INTR, &vip) == -1)
usr.sbin/vmd/vm.c
97
if (unveil(env->argv0, "x") == -1)
usr.sbin/vmd/vm.c
98
fatal("unveil %s", env->argv0);
usr.sbin/vmd/vm_agentx.c
135
struct vmd *env = p->p_ps->ps_env;
usr.sbin/vmd/vm_agentx.c
250
config_getconfig(env, imsg);
usr.sbin/vmd/vm_agentx.c
251
vm_agentx_configure(&env->vmd_cfg.cfg_agentx);
usr.sbin/vmd/vm_agentx.c
260
vm_agentx_configure(struct vmd_agentx *env)
usr.sbin/vmd/vm_agentx.c
262
static char curpath[sizeof(env->ax_path)];
usr.sbin/vmd/vm_agentx.c
263
static char curcontext[sizeof(env->ax_context)];
usr.sbin/vmd/vm_agentx.c
268
char *context = env->ax_context[0] == '\0' ? NULL : env->ax_context;
usr.sbin/vmd/vm_agentx.c
271
vmd_agentx = env;
usr.sbin/vmd/vm_agentx.c
508
extern struct vmd *env;
usr.sbin/vmd/vm_agentx.c
524
if (proc_compose_imsg(&(env->vmd_ps), PROC_PARENT,
usr.sbin/vmd/vmd.c
1011
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
1022
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/vmd.c
1075
struct privsep *ps = &env->vmd_ps;
usr.sbin/vmd/vmd.c
1084
TAILQ_REMOVE(env->vmd_vms, vm, vm_entry);
usr.sbin/vmd/vmd.c
1097
TAILQ_FOREACH(n2i, env->vmd_known, entry)
usr.sbin/vmd/vmd.c
1101
if (++env->vmd_nvm == 0) {
usr.sbin/vmd/vmd.c
1109
n2i->id = env->vmd_nvm;
usr.sbin/vmd/vmd.c
1116
TAILQ_INSERT_TAIL(env->vmd_known, n2i, entry);
usr.sbin/vmd/vmd.c
1261
TAILQ_INSERT_TAIL(env->vmd_vms, vm, vm_entry);
usr.sbin/vmd/vmd.c
1615
if (fdopenpty(env->vmd_ptmfd, &vm->vm_tty, &tty_slave, vm->vm_ttyname,
usr.sbin/vmd/vmd.c
1707
TAILQ_REMOVE(env->vmd_switches, vsw, sw_entry);
usr.sbin/vmd/vmd.c
1721
TAILQ_FOREACH(vsw, env->vmd_switches, sw_entry) {
usr.sbin/vmd/vmd.c
426
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
554
if ((env = calloc(1, sizeof(*env))) == NULL)
usr.sbin/vmd/vmd.c
556
env->vmd_fd = -1;
usr.sbin/vmd/vmd.c
557
env->vmd_fd6 = -1;
usr.sbin/vmd/vmd.c
567
env->vmd_debug = 2;
usr.sbin/vmd/vmd.c
573
env->vmd_verbose++;
usr.sbin/vmd/vmd.c
577
env->vmd_noaction = 1;
usr.sbin/vmd/vmd.c
631
if (env->vmd_noaction && !env->vmd_debug)
usr.sbin/vmd/vmd.c
632
env->vmd_debug = 1;
usr.sbin/vmd/vmd.c
634
log_init(env->vmd_debug, LOG_DAEMON);
usr.sbin/vmd/vmd.c
635
log_setverbose(env->vmd_verbose);
usr.sbin/vmd/vmd.c
638
if (proc_id == PROC_PARENT && *argv[0] != '/' && !env->vmd_noaction)
usr.sbin/vmd/vmd.c
640
env->argv0 = argv[0];
usr.sbin/vmd/vmd.c
643
if (env->vmd_noaction == 0 && !vm_launch) {
usr.sbin/vmd/vmd.c
648
ps = &env->vmd_ps;
usr.sbin/vmd/vmd.c
649
ps->ps_env = env;
usr.sbin/vmd/vmd.c
650
env->vmd_psp_fd = psp_fd;
usr.sbin/vmd/vmd.c
652
if (config_init(env) == -1)
usr.sbin/vmd/vmd.c
66
struct vmd *env;
usr.sbin/vmd/vmd.c
686
if (env->vmd_noaction == 0 && proc_id == PROC_PARENT) {
usr.sbin/vmd/vmd.c
687
env->vmd_fd = open(VMM_NODE, O_RDWR | O_CLOEXEC);
usr.sbin/vmd/vmd.c
688
if (env->vmd_fd == -1)
usr.sbin/vmd/vmd.c
697
env->vmd_conffile = conffile;
usr.sbin/vmd/vmd.c
699
if (env->vmd_noaction)
usr.sbin/vmd/vmd.c
705
proc_init(ps, procs, nitems(procs), env->vmd_debug, argc0, argv,
usr.sbin/vmd/vmd.c
725
if (!env->vmd_noaction)
usr.sbin/vmd/vmd.c
728
env->vmd_psp_fd = -1;
usr.sbin/vmd/vmd.c
729
if (env->vmd_noaction == 0 && proc_id == PROC_PARENT)
usr.sbin/vmd/vmd.c
749
env->vmd_cfg.parallelism);
usr.sbin/vmd/vmd.c
750
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
757
if (i > env->vmd_cfg.parallelism) {
usr.sbin/vmd/vmd.c
759
&env->vmd_cfg.delay);
usr.sbin/vmd/vmd.c
763
config_setvm(&env->vmd_ps, vm, -1, vm->vm_params.vmc_owner.uid);
usr.sbin/vmd/vmd.c
793
if ((env->vmd_ptmfd = getptmfd()) == -1)
usr.sbin/vmd/vmd.c
796
if (parse_config(env->vmd_conffile) == -1) {
usr.sbin/vmd/vmd.c
797
proc_kill(&env->vmd_ps);
usr.sbin/vmd/vmd.c
801
if (env->vmd_noaction) {
usr.sbin/vmd/vmd.c
803
proc_kill(&env->vmd_ps);
usr.sbin/vmd/vmd.c
808
proc_compose_imsg(&env->vmd_ps, PROC_VMM,
usr.sbin/vmd/vmd.c
809
IMSG_VMDOP_RECEIVE_VMM_FD, -1, env->vmd_fd, NULL, 0);
usr.sbin/vmd/vmd.c
812
if (env->vmd_psp_fd != -1) {
usr.sbin/vmd/vmd.c
813
proc_compose_imsg(&env->vmd_ps, PROC_VMM,
usr.sbin/vmd/vmd.c
814
IMSG_VMDOP_RECEIVE_PSP_FD, -1, env->vmd_psp_fd, NULL, 0);
usr.sbin/vmd/vmd.c
818
if (config_setconfig(env) == -1)
usr.sbin/vmd/vmd.c
821
TAILQ_FOREACH(vsw, env->vmd_switches, sw_entry) {
usr.sbin/vmd/vmd.c
824
if (vm_priv_brconfig(&env->vmd_ps, vsw) == -1) {
usr.sbin/vmd/vmd.c
832
if (!(env->vmd_cfg.cfg_flags & VMD_CFG_STAGGERED_START)) {
usr.sbin/vmd/vmd.c
833
env->vmd_cfg.delay.tv_sec = VMD_DEFAULT_STAGGERED_START_DELAY;
usr.sbin/vmd/vmd.c
836
env->vmd_cfg.parallelism = ncpus;
usr.sbin/vmd/vmd.c
839
__func__, ncpus, (long long) env->vmd_cfg.delay.tv_sec);
usr.sbin/vmd/vmd.c
859
filename = env->vmd_conffile;
usr.sbin/vmd/vmd.c
867
config_purge(env, reset);
usr.sbin/vmd/vmd.c
868
config_setreset(env, reset);
usr.sbin/vmd/vmd.c
879
TAILQ_FOREACH_SAFE(vm, env->vmd_vms, vm_entry,
usr.sbin/vmd/vmd.c
897
if (config_setconfig(env) == -1)
usr.sbin/vmd/vmd.c
901
TAILQ_FOREACH(vsw, env->vmd_switches, sw_entry) {
usr.sbin/vmd/vmd.c
904
if (vm_priv_brconfig(&env->vmd_ps, vsw) == -1) {
usr.sbin/vmd/vmd.c
929
TAILQ_FOREACH_SAFE(vm, env->vmd_vms, vm_entry, vm_next) {
usr.sbin/vmd/vmd.c
933
proc_kill(&env->vmd_ps);
usr.sbin/vmd/vmd.c
934
free(env);
usr.sbin/vmd/vmd.c
947
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
963
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmd.c
998
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmm.c
220
config_getconfig(env, imsg);
usr.sbin/vmd/vmm.c
229
config_purge(env, mode);
usr.sbin/vmd/vmm.c
234
env->vmd_verbose = verbose;
usr.sbin/vmd/vmm.c
236
TAILQ_FOREACH(vm, env->vmd_vms, vm_entry) {
usr.sbin/vmd/vmm.c
274
if (env->vmd_fd > -1)
usr.sbin/vmd/vmm.c
276
env->vmd_fd = imsg_get_fd(imsg);
usr.sbin/vmd/vmm.c
282
if (env->vmd_psp_fd > -1)
usr.sbin/vmd/vmm.c
284
env->vmd_psp_fd = imsg_get_fd(imsg);
usr.sbin/vmd/vmm.c
403
TAILQ_FOREACH_SAFE(vm, env->vmd_vms, vm_entry, vm_next) {
usr.sbin/vmd/vmm.c
53
extern struct vmd *env;
usr.sbin/vmd/vmm.c
533
if (ioctl(env->vmd_fd, VMM_IOC_TERM, vtp) == -1)
usr.sbin/vmd/vmm.c
669
sz = atomicio(vwrite, fds[0], &env->vmd_cfg.cfg_localprefix,
usr.sbin/vmd/vmm.c
670
sizeof(env->vmd_cfg.cfg_localprefix));
usr.sbin/vmd/vmm.c
671
if (sz != sizeof(env->vmd_cfg.cfg_localprefix)) {
usr.sbin/vmd/vmm.c
708
if (!env->vmd_debug) {
usr.sbin/vmd/vmm.c
716
if (env->vmd_psp_fd > 0)
usr.sbin/vmd/vmm.c
717
fcntl(env->vmd_psp_fd, F_SETFD, 0); /* psp device fd */
usr.sbin/vmd/vmm.c
726
snprintf(vmm_fd, sizeof(vmm_fd), "%d", env->vmd_fd);
usr.sbin/vmd/vmm.c
728
snprintf(psp_fd, sizeof(psp_fd), "%d", env->vmd_psp_fd);
usr.sbin/vmd/vmm.c
731
nargv[i++] = env->argv0;
usr.sbin/vmd/vmm.c
738
if (env->vmd_debug)
usr.sbin/vmd/vmm.c
740
if (env->vmd_verbose == 1)
usr.sbin/vmd/vmm.c
742
else if (env->vmd_verbose > 1)
usr.sbin/vmd/vmm.c
75
if (!env->vmd_debug) {
usr.sbin/vmd/vmm.c
809
if (ioctl(env->vmd_fd, VMM_IOC_INFO, &vip) == -1)
usr.sbin/vmd/vmm.c
821
if (ioctl(env->vmd_fd, VMM_IOC_INFO, &vip) == -1) {
usr.sbin/vmd/vmm.c
84
if (unveil(env->argv0, "x") == -1)
usr.sbin/vmd/vmm.c
85
fatal("unveil %s", env->argv0);
usr.sbin/ypldap/entries.c
100
RB_FOREACH(ge, group_name_tree, env->sc_group_names) {
usr.sbin/ypldap/entries.c
114
env->sc_group_lines = linep;
usr.sbin/ypldap/entries.c
40
flatten_entries(struct env *env)
usr.sbin/ypldap/entries.c
57
if ((linep = calloc(1, env->sc_user_line_len + 1)) == NULL) {
usr.sbin/ypldap/entries.c
65
RB_FOREACH(ue, user_name_tree, env->sc_user_names) {
usr.sbin/ypldap/entries.c
90
env->sc_user_lines = linep;
usr.sbin/ypldap/entries.c
93
if ((linep = calloc(1, env->sc_group_line_len + 1)) == NULL) {
usr.sbin/ypldap/ldapclient.c
136
struct env *env = p;
usr.sbin/ypldap/ldapclient.c
137
struct imsgev *iev = env->sc_iev_dns;
usr.sbin/ypldap/ldapclient.c
166
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry)
usr.sbin/ypldap/ldapclient.c
206
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ldapclient.c
208
if (client_try_idm(env, idm, h) == -1)
usr.sbin/ypldap/ldapclient.c
218
imsg_compose_event(env->sc_iev, IMSG_END_UPDATE, 0, 0, -1,
usr.sbin/ypldap/ldapclient.c
236
struct env *env = p;
usr.sbin/ypldap/ldapclient.c
237
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ldapclient.c
266
struct env params;
usr.sbin/ypldap/ldapclient.c
268
if (env->sc_flags & F_CONFIGURING) {
usr.sbin/ypldap/ldapclient.c
274
env->sc_flags |= F_CONFIGURING;
usr.sbin/ypldap/ldapclient.c
275
purge_config(env);
usr.sbin/ypldap/ldapclient.c
276
memcpy(&env->sc_conf_tv, &params.sc_conf_tv,
usr.sbin/ypldap/ldapclient.c
277
sizeof(env->sc_conf_tv));
usr.sbin/ypldap/ldapclient.c
278
env->sc_flags |= params.sc_flags;
usr.sbin/ypldap/ldapclient.c
284
if (!(env->sc_flags & F_CONFIGURING))
usr.sbin/ypldap/ldapclient.c
289
idm->idm_env = env;
usr.sbin/ypldap/ldapclient.c
290
TAILQ_INSERT_TAIL(&env->sc_idms, idm, idm_entry);
usr.sbin/ypldap/ldapclient.c
294
env->sc_flags &= ~F_CONFIGURING;
usr.sbin/ypldap/ldapclient.c
296
client_configure(env);
usr.sbin/ypldap/ldapclient.c
332
struct env env;
usr.sbin/ypldap/ldapclient.c
344
memset(&env, 0, sizeof(env));
usr.sbin/ypldap/ldapclient.c
345
TAILQ_INIT(&env.sc_idms);
usr.sbin/ypldap/ldapclient.c
389
if ((env.sc_iev = calloc(1, sizeof(*env.sc_iev))) == NULL)
usr.sbin/ypldap/ldapclient.c
391
if ((env.sc_iev_dns = calloc(1, sizeof(*env.sc_iev_dns))) == NULL)
usr.sbin/ypldap/ldapclient.c
394
env.sc_iev->events = EV_READ;
usr.sbin/ypldap/ldapclient.c
395
env.sc_iev->data = &env;
usr.sbin/ypldap/ldapclient.c
396
if (imsgbuf_init(&env.sc_iev->ibuf, pipe_main2client[1]) == -1)
usr.sbin/ypldap/ldapclient.c
398
env.sc_iev->handler = client_dispatch_parent;
usr.sbin/ypldap/ldapclient.c
399
event_set(&env.sc_iev->ev, env.sc_iev->ibuf.fd, env.sc_iev->events,
usr.sbin/ypldap/ldapclient.c
400
env.sc_iev->handler, &env);
usr.sbin/ypldap/ldapclient.c
401
event_add(&env.sc_iev->ev, NULL);
usr.sbin/ypldap/ldapclient.c
403
env.sc_iev_dns->events = EV_READ;
usr.sbin/ypldap/ldapclient.c
404
env.sc_iev_dns->data = &env;
usr.sbin/ypldap/ldapclient.c
405
if (imsgbuf_init(&env.sc_iev_dns->ibuf, pipe_dns[0]) == -1)
usr.sbin/ypldap/ldapclient.c
407
env.sc_iev_dns->handler = client_dispatch_dns;
usr.sbin/ypldap/ldapclient.c
408
event_set(&env.sc_iev_dns->ev, env.sc_iev_dns->ibuf.fd,
usr.sbin/ypldap/ldapclient.c
409
env.sc_iev_dns->events, env.sc_iev_dns->handler, &env);
usr.sbin/ypldap/ldapclient.c
410
event_add(&env.sc_iev_dns->ev, NULL);
usr.sbin/ypldap/ldapclient.c
49
void client_configure(struct env *);
usr.sbin/ypldap/ldapclient.c
493
client_search_idm(struct env *env, struct idm *idm, struct aldap *al,
usr.sbin/ypldap/ldapclient.c
53
int client_search_idm(struct env *, struct idm *, struct aldap *,
usr.sbin/ypldap/ldapclient.c
540
imsg_compose_event(env->sc_iev, type, 0, 0, -1,
usr.sbin/ypldap/ldapclient.c
55
int client_try_idm(struct env *, struct idm *, struct ypldap_addr *);
usr.sbin/ypldap/ldapclient.c
560
client_try_idm(struct env *env, struct idm *idm, struct ypldap_addr *addr)
usr.sbin/ypldap/ldapclient.c
668
if (client_search_idm(env, idm, al, attrs,
usr.sbin/ypldap/ldapclient.c
685
if (client_search_idm(env, idm, al, attrs,
usr.sbin/ypldap/ldapclient.c
705
struct env *env = p;
usr.sbin/ypldap/ldapclient.c
712
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ldapclient.c
722
imsg_compose_event(env->sc_iev, IMSG_TRASH_UPDATE, 0, 0, -1,
usr.sbin/ypldap/ldapclient.c
726
client_configure(env);
usr.sbin/ypldap/ldapclient.c
730
client_configure(struct env *env)
usr.sbin/ypldap/ldapclient.c
738
imsg_compose_event(env->sc_iev, IMSG_START_UPDATE, 0, 0, -1, NULL, 0);
usr.sbin/ypldap/ldapclient.c
741
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ldapclient.c
743
imsg_compose_event(env->sc_iev_dns, IMSG_HOST_DNS, idm->idm_id,
usr.sbin/ypldap/ldapclient.c
747
tv.tv_sec = env->sc_conf_tv.tv_sec;
usr.sbin/ypldap/ldapclient.c
748
tv.tv_usec = env->sc_conf_tv.tv_usec;
usr.sbin/ypldap/ldapclient.c
749
evtimer_set(&env->sc_conf_ev, client_periodic_update, env);
usr.sbin/ypldap/ldapclient.c
750
evtimer_add(&env->sc_conf_ev, &tv);
usr.sbin/ypldap/parse.y
920
parse_config(struct env *x_conf, const char *filename, int opts)
usr.sbin/ypldap/parse.y
94
struct env *conf = NULL;
usr.sbin/ypldap/yp.c
113
yp_init(struct env *x_env)
usr.sbin/ypldap/yp.c
123
env = x_env;
usr.sbin/ypldap/yp.c
124
env->sc_yp = yp;
usr.sbin/ypldap/yp.c
126
switch (env->sc_bind_mode) {
usr.sbin/ypldap/yp.c
199
snprintf(path, sizeof path, "%s/%s.%ld", BINDINGDIR, env->sc_domainname,
usr.sbin/ypldap/yp.c
397
if (strcmp(domain, env->sc_domainname) != 0) {
usr.sbin/ypldap/yp.c
410
if (strcmp(*arg, env->sc_domainname) != 0)
usr.sbin/ypldap/yp.c
420
if (strcmp(*arg, env->sc_domainname) != 0)
usr.sbin/ypldap/yp.c
444
if (env->sc_user_names == NULL) {
usr.sbin/ypldap/yp.c
461
if ((ue = RB_FIND(user_name_tree, env->sc_user_names,
usr.sbin/ypldap/yp.c
477
if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids,
usr.sbin/ypldap/yp.c
491
if ((ge = RB_FIND(group_gid_tree, &env->sc_group_gids,
usr.sbin/ypldap/yp.c
501
if ((ge = RB_FIND(group_name_tree, env->sc_group_names,
usr.sbin/ypldap/yp.c
540
if ((ue = RB_FIND(user_uid_tree, &env->sc_user_uids,
usr.sbin/ypldap/yp.c
566
if (env->sc_user_lines == NULL)
usr.sbin/ypldap/yp.c
569
yp_make_keyval(&res, env->sc_user_lines, env->sc_user_lines);
usr.sbin/ypldap/yp.c
571
if (env->sc_group_lines == NULL)
usr.sbin/ypldap/yp.c
574
yp_make_keyval(&res, env->sc_group_lines, env->sc_group_lines);
usr.sbin/ypldap/yp.c
60
static struct env *env;
usr.sbin/ypldap/yp.c
603
if ((ue = RB_NFIND(user_name_tree, env->sc_user_names,
usr.sbin/ypldap/yp.c
620
if ((ge = RB_NFIND(group_name_tree, env->sc_group_names,
usr.sbin/ypldap/yp.c
691
if (!(env->sc_flags & mapnames[i].cond))
usr.sbin/ypldap/yp.c
78
while ((ye = TAILQ_FIRST(&env->sc_yp->yd_events)) != NULL) {
usr.sbin/ypldap/yp.c
79
TAILQ_REMOVE(&env->sc_yp->yd_events, ye, ye_entry);
usr.sbin/ypldap/yp.c
99
TAILQ_INSERT_TAIL(&env->sc_yp->yd_events, ye, ye_entry);
usr.sbin/ypldap/ypldap.c
126
main_start_update(struct env *env)
usr.sbin/ypldap/ypldap.c
128
env->update_trashed = 0;
usr.sbin/ypldap/ypldap.c
131
env->sc_user_line_len = 0;
usr.sbin/ypldap/ypldap.c
132
env->sc_group_line_len = 0;
usr.sbin/ypldap/ypldap.c
133
if ((env->sc_user_names_t = calloc(1,
usr.sbin/ypldap/ypldap.c
134
sizeof(*env->sc_user_names_t))) == NULL ||
usr.sbin/ypldap/ypldap.c
135
(env->sc_group_names_t = calloc(1,
usr.sbin/ypldap/ypldap.c
136
sizeof(*env->sc_group_names_t))) == NULL)
usr.sbin/ypldap/ypldap.c
138
RB_INIT(env->sc_user_names_t);
usr.sbin/ypldap/ypldap.c
139
RB_INIT(env->sc_group_names_t);
usr.sbin/ypldap/ypldap.c
148
main_trash_update(struct env *env)
usr.sbin/ypldap/ypldap.c
153
env->update_trashed = 1;
usr.sbin/ypldap/ypldap.c
155
while ((ue = RB_ROOT(env->sc_user_names_t)) != NULL) {
usr.sbin/ypldap/ypldap.c
157
env->sc_user_names_t, ue);
usr.sbin/ypldap/ypldap.c
162
free(env->sc_user_names_t);
usr.sbin/ypldap/ypldap.c
163
env->sc_user_names_t = NULL;
usr.sbin/ypldap/ypldap.c
164
while ((ge = RB_ROOT(env->sc_group_names_t))
usr.sbin/ypldap/ypldap.c
167
env->sc_group_names_t, ge);
usr.sbin/ypldap/ypldap.c
171
free(env->sc_group_names_t);
usr.sbin/ypldap/ypldap.c
172
env->sc_group_names_t = NULL;
usr.sbin/ypldap/ypldap.c
176
main_create_user_groups(struct env *env)
usr.sbin/ypldap/ypldap.c
187
RB_FOREACH(ue, user_name_tree, env->sc_user_names_t) {
usr.sbin/ypldap/ypldap.c
224
RB_FOREACH(ge, group_name_tree, env->sc_group_names_t) {
usr.sbin/ypldap/ypldap.c
244
if ((ue = RB_FIND(user_name_tree, env->sc_user_names_t,
usr.sbin/ypldap/ypldap.c
274
main_end_update(struct env *env)
usr.sbin/ypldap/ypldap.c
279
if (env->update_trashed)
usr.sbin/ypldap/ypldap.c
284
if (main_create_user_groups(env) == -1) {
usr.sbin/ypldap/ypldap.c
285
main_trash_update(env);
usr.sbin/ypldap/ypldap.c
289
if (env->sc_user_names == NULL) {
usr.sbin/ypldap/ypldap.c
290
env->sc_user_names = env->sc_user_names_t;
usr.sbin/ypldap/ypldap.c
291
env->sc_user_lines = NULL;
usr.sbin/ypldap/ypldap.c
292
env->sc_user_names_t = NULL;
usr.sbin/ypldap/ypldap.c
294
env->sc_group_names = env->sc_group_names_t;
usr.sbin/ypldap/ypldap.c
295
env->sc_group_lines = NULL;
usr.sbin/ypldap/ypldap.c
296
env->sc_group_names_t = NULL;
usr.sbin/ypldap/ypldap.c
298
flatten_entries(env);
usr.sbin/ypldap/ypldap.c
305
while ((ue = RB_ROOT(env->sc_user_names)) != NULL) {
usr.sbin/ypldap/ypldap.c
306
RB_REMOVE(user_name_tree, env->sc_user_names,
usr.sbin/ypldap/ypldap.c
311
free(env->sc_user_names);
usr.sbin/ypldap/ypldap.c
312
free(env->sc_user_lines);
usr.sbin/ypldap/ypldap.c
314
env->sc_user_names = env->sc_user_names_t;
usr.sbin/ypldap/ypldap.c
315
env->sc_user_lines = NULL;
usr.sbin/ypldap/ypldap.c
316
env->sc_user_names_t = NULL;
usr.sbin/ypldap/ypldap.c
318
while ((ge = RB_ROOT(env->sc_group_names)) != NULL) {
usr.sbin/ypldap/ypldap.c
320
env->sc_group_names, ge);
usr.sbin/ypldap/ypldap.c
323
free(env->sc_group_names);
usr.sbin/ypldap/ypldap.c
324
free(env->sc_group_lines);
usr.sbin/ypldap/ypldap.c
326
env->sc_group_names = env->sc_group_names_t;
usr.sbin/ypldap/ypldap.c
327
env->sc_group_lines = NULL;
usr.sbin/ypldap/ypldap.c
328
env->sc_group_names_t = NULL;
usr.sbin/ypldap/ypldap.c
331
flatten_entries(env);
usr.sbin/ypldap/ypldap.c
338
RB_INIT(&env->sc_user_uids);
usr.sbin/ypldap/ypldap.c
339
RB_INIT(&env->sc_group_gids);
usr.sbin/ypldap/ypldap.c
340
RB_FOREACH(ue, user_name_tree, env->sc_user_names)
usr.sbin/ypldap/ypldap.c
342
&env->sc_user_uids, ue);
usr.sbin/ypldap/ypldap.c
343
RB_FOREACH(ge, group_name_tree, env->sc_group_names)
usr.sbin/ypldap/ypldap.c
345
&env->sc_group_gids, ge);
usr.sbin/ypldap/ypldap.c
354
struct env *env = p;
usr.sbin/ypldap/ypldap.c
355
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ypldap.c
386
main_start_update(env);
usr.sbin/ypldap/ypldap.c
392
if (env->update_trashed)
usr.sbin/ypldap/ypldap.c
406
if (RB_INSERT(user_name_tree, env->sc_user_names_t,
usr.sbin/ypldap/ypldap.c
411
env->sc_user_line_len += len;
usr.sbin/ypldap/ypldap.c
418
if (env->update_trashed)
usr.sbin/ypldap/ypldap.c
432
if (RB_INSERT(group_name_tree, env->sc_group_names_t,
usr.sbin/ypldap/ypldap.c
437
env->sc_group_line_len += len;
usr.sbin/ypldap/ypldap.c
441
main_trash_update(env);
usr.sbin/ypldap/ypldap.c
444
main_end_update(env);
usr.sbin/ypldap/ypldap.c
465
main_configure_client(struct env *env)
usr.sbin/ypldap/ypldap.c
468
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ypldap.c
47
void main_configure_client(struct env *);
usr.sbin/ypldap/ypldap.c
470
imsg_compose_event(iev, IMSG_CONF_START, 0, 0, -1, env, sizeof(*env));
usr.sbin/ypldap/ypldap.c
471
TAILQ_FOREACH(idm, &env->sc_idms, idm_entry) {
usr.sbin/ypldap/ypldap.c
481
struct env *env = p;
usr.sbin/ypldap/ypldap.c
483
main_configure_client(env);
usr.sbin/ypldap/ypldap.c
487
purge_config(struct env *env)
usr.sbin/ypldap/ypldap.c
49
void main_start_update(struct env *);
usr.sbin/ypldap/ypldap.c
491
while ((idm = TAILQ_FIRST(&env->sc_idms)) != NULL) {
usr.sbin/ypldap/ypldap.c
492
TAILQ_REMOVE(&env->sc_idms, idm, idm_entry);
usr.sbin/ypldap/ypldap.c
50
void main_trash_update(struct env *);
usr.sbin/ypldap/ypldap.c
503
struct env env;
usr.sbin/ypldap/ypldap.c
51
void main_end_update(struct env *);
usr.sbin/ypldap/ypldap.c
52
int main_create_user_groups(struct env *);
usr.sbin/ypldap/ypldap.c
53
void purge_config(struct env *);
usr.sbin/ypldap/ypldap.c
549
RB_INIT(&env.sc_user_uids);
usr.sbin/ypldap/ypldap.c
550
RB_INIT(&env.sc_group_gids);
usr.sbin/ypldap/ypldap.c
552
if (parse_config(&env, conffile, opts))
usr.sbin/ypldap/ypldap.c
580
signal_set(&ev_sigint, SIGINT, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
581
signal_set(&ev_sigterm, SIGTERM, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
582
signal_set(&ev_sighup, SIGHUP, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
583
signal_set(&ev_sigchld, SIGCHLD, main_sig_handler, &env);
usr.sbin/ypldap/ypldap.c
590
if ((env.sc_iev = calloc(1, sizeof(*env.sc_iev))) == NULL)
usr.sbin/ypldap/ypldap.c
592
if (imsgbuf_init(&env.sc_iev->ibuf, pipe_main2client[0]) == -1)
usr.sbin/ypldap/ypldap.c
594
env.sc_iev->handler = main_dispatch_client;
usr.sbin/ypldap/ypldap.c
596
env.sc_iev->events = EV_READ;
usr.sbin/ypldap/ypldap.c
597
env.sc_iev->data = &env;
usr.sbin/ypldap/ypldap.c
598
event_set(&env.sc_iev->ev, env.sc_iev->ibuf.fd, env.sc_iev->events,
usr.sbin/ypldap/ypldap.c
599
env.sc_iev->handler, &env);
usr.sbin/ypldap/ypldap.c
600
event_add(&env.sc_iev->ev, NULL);
usr.sbin/ypldap/ypldap.c
602
yp_init(&env);
usr.sbin/ypldap/ypldap.c
620
evtimer_set(&ev_timer, main_init_timer, &env);
usr.sbin/ypldap/ypldap.h
131
struct env *idm_env;
usr.sbin/ypldap/ypldap.h
197
int parse_config(struct env *, const char *, int);
usr.sbin/ypldap/ypldap.h
204
void purge_config(struct env *);
usr.sbin/ypldap/ypldap.h
210
void flatten_entries(struct env *);
usr.sbin/ypldap/ypldap.h
221
void yp_init(struct env *);
usr.sbin/ypldap/ypldap_dns.c
113
if ((env.sc_iev = calloc(1, sizeof(*env.sc_iev))) == NULL)
usr.sbin/ypldap/ypldap_dns.c
116
env.sc_iev->events = EV_READ;
usr.sbin/ypldap/ypldap_dns.c
117
env.sc_iev->data = &env;
usr.sbin/ypldap/ypldap_dns.c
118
if (imsgbuf_init(&env.sc_iev->ibuf, pipe_ntp[1]) == -1)
usr.sbin/ypldap/ypldap_dns.c
120
env.sc_iev->handler = dns_dispatch_imsg;
usr.sbin/ypldap/ypldap_dns.c
121
event_set(&env.sc_iev->ev, env.sc_iev->ibuf.fd, env.sc_iev->events,
usr.sbin/ypldap/ypldap_dns.c
122
env.sc_iev->handler, &env);
usr.sbin/ypldap/ypldap_dns.c
123
event_add(&env.sc_iev->ev, NULL);
usr.sbin/ypldap/ypldap_dns.c
140
struct env *env = p;
usr.sbin/ypldap/ypldap_dns.c
141
struct imsgev *iev = env->sc_iev;
usr.sbin/ypldap/ypldap_dns.c
81
struct env env;