HomeSort by: relevance | last modified time | path
    Searched refs:qstate (Results 1 - 25 of 69) sorted by relevancy

1 2 3

  /src/external/bsd/unbound/dist/pythonmod/
ubmodule-tst.py 43 def inform_super(id, qstate, superqstate, qdata):
46 def setTTL(qstate, ttl):
48 if qstate.return_msg:
49 qstate.return_msg.rep.ttl = ttl
50 if (qstate.return_msg.rep):
51 for i in range(0,qstate.return_msg.rep.rrset_count):
52 d = qstate.return_msg.rep.rrsets[i].entry.data
77 def printReturnMsg(qstate):
78 print("Return MSG rep :: flags: %04X, QDcount: %d, Security:%d, TTL=%d" % (qstate.return_msg.rep.flags, qstate.return_msg.rep.qdcount,qstate.return_msg.rep.security, qstate.return_msg.rep.ttl)
    [all...]
pythonmod_utils.h 50 * (qstate->msg_cache).
52 * @param qstate: module environment
60 int storeQueryInCache(struct module_qstate* qstate, struct query_info* qinfo,
70 * @param qstate: module environment
73 void invalidateQueryInCache(struct module_qstate* qstate,
79 * This function fills qstate.return_msg up with data of a given packet
81 * @param qstate: module environment
85 int createResponse(struct module_qstate* qstate, struct sldns_buffer* pkt);
ubmodule-msg.py 45 def inform_super(id, qstate, superqstate, qdata):
48 def setTTL(qstate, ttl):
50 if qstate.return_msg:
51 qstate.return_msg.rep.ttl = ttl
52 if (qstate.return_msg.rep):
53 for i in range(0,qstate.return_msg.rep.rrset_count):
54 d = qstate.return_msg.rep.rrsets[i].entry.data
76 def printReturnMsg(qstate):
77 print "Return MSG rep :: flags: %04X, QDcount: %d, Security:%d, TTL=%d" % (qstate.return_msg.rep.flags, qstate.return_msg.rep.qdcount,qstate.return_msg.rep.security, qstate.return_msg.rep.ttl
    [all...]
pythonmod_utils.c 60 * (qstate->msg_cache) */
61 int storeQueryInCache(struct module_qstate* qstate, struct query_info* qinfo,
74 return dns_cache_store(qstate->env, qinfo, msgrep, is_referral,
75 qstate->prefetch_leeway, 0, NULL, qstate->query_flags,
76 qstate->qstarttime, qstate->is_valrec);
80 void invalidateQueryInCache(struct module_qstate* qstate,
88 h = query_info_hash(qinfo, qstate->query_flags);
89 if ((e=slabhash_lookup(qstate->env->msg_cache, h, qinfo, 0)))
    [all...]
pythonmod.h 58 void pythonmod_operate(struct module_qstate* qstate, enum module_ev event,
62 void pythonmod_inform_super(struct module_qstate* qstate, int id,
66 void pythonmod_clear(struct module_qstate* qstate, int id);
73 struct module_qstate* qstate, struct reply_info* rep, int rcode,
80 struct query_info* qinfo, uint16_t flags, struct module_qstate* qstate,
86 int python_inplace_cb_query_response(struct module_qstate* qstate,
90 int python_inplace_cb_edns_back_parsed_call(struct module_qstate* qstate,
  /src/external/bsd/unbound/dist/pythonmod/examples/
resip.py 47 def inform_super(id, qstate, superqstate, qdata): return True
49 def operate(id, event, qstate, qdata):
50 print("Operate {} state: {}".format(event, qstate))
59 if (qstate.qinfo.qname_str.endswith("what.is.my.ip.")): #query name ends with localdomain
61 msg = DNSMessage(qstate.qinfo.qname_str, RR_TYPE_TXT, RR_CLASS_IN, PKT_QR | PKT_RA | PKT_AA)
63 if (qstate.qinfo.qtype == RR_TYPE_TXT) or (qstate.qinfo.qtype == RR_TYPE_ANY):
64 rl = qstate.mesh_info.reply_list
70 msg.answer.append("%s 0 IN TXT \"%s %d (%s)\"" % (qstate.qinfo.qname_str, q.addr,q.port,q.family))
73 #set qstate.return_msg
    [all...]
resmod.py 41 def inform_super(id, qstate, superqstate, qdata): return True
43 def setTTL(qstate, ttl):
45 if qstate.return_msg:
46 qstate.return_msg.rep.ttl = ttl
47 if (qstate.return_msg.rep):
48 for i in range(0,qstate.return_msg.rep.rrset_count):
49 d = qstate.return_msg.rep.rrsets[i].entry.data
53 def operate(id, event, qstate, qdata):
56 qstate.ext_state[id] = MODULE_WAIT_MODULE
62 if not qstate.return_msg
    [all...]
resgen.py 40 def inform_super(id, qstate, superqstate, qdata): return True
42 def operate(id, event, qstate, qdata):
44 if (qstate.qinfo.qname_str.endswith(".localdomain.")): #query name ends with localdomain
46 msg = DNSMessage(qstate.qinfo.qname_str, RR_TYPE_A, RR_CLASS_IN, PKT_QR | PKT_RA | PKT_AA)
48 if (qstate.qinfo.qtype == RR_TYPE_A) or (qstate.qinfo.qtype == RR_TYPE_ANY):
49 msg.answer.append("%s 10 IN A 127.0.0.1" % qstate.qinfo.qname_str)
50 #set qstate.return_msg
51 if not msg.set_return_msg(qstate):
52 qstate.ext_state[id] = MODULE_ERROR
    [all...]
calc.py 42 def inform_super(id, qstate, superqstate, qdata): return True
44 def operate(id, event, qstate, qdata):
48 if qstate.qinfo.qname_str.endswith("._calc_.cz.") and not ("__" in qstate.qinfo.qname_str):
54 res = eval(''.join(qstate.qinfo.qname_list[0:-3]),{"__builtins__":None},{})
58 msg = DNSMessage(qstate.qinfo.qname_str, RR_TYPE_TXT, RR_CLASS_IN, PKT_QR | PKT_RA | PKT_AA) #, 300)
59 msg.answer.append("%s 300 IN TXT \"%s\"" % (qstate.qinfo.qname_str,res))
60 if not msg.set_return_msg(qstate):
61 qstate.ext_state[id] = MODULE_ERROR
64 qstate.return_rcode = RCODE_NOERRO
    [all...]
edns.py 106 def inform_super(id, qstate, superqstate, qdata): return True
109 def operate(id, event, qstate, qdata):
113 if not edns_opt_list_is_empty(qstate.edns_opts_front_in):
116 for o in qstate.edns_opts_front_in_iter:
121 qstate.no_cache_lookup = 1
126 qstate.no_cache_store = 1
130 qstate.ext_state[id] = MODULE_WAIT_MODULE
136 if not edns_opt_list_is_empty(qstate.edns_opts_front_in):
139 for o in qstate.edns_opts_front_in_iter:
142 if not edns_opt_list_append(qstate.edns_opts_front_out
    [all...]
dict.py 71 def operate(id, event, qstate, qdata):
74 if qstate.qinfo.qname_str.endswith("._dict_.cz."):
76 aword = ' '.join(qstate.qinfo.qname_list[0:-4])
77 adict = qstate.qinfo.qname_list[-4]
87 if len(words) and ((qstate.qinfo.qtype == RR_TYPE_TXT) or (qstate.qinfo.qtype == RR_TYPE_ANY)):
89 msg = DNSMessage(qstate.qinfo.qname_str, RR_TYPE_TXT, RR_CLASS_IN, PKT_RD | PKT_RA | PKT_AA)
91 msg.answer.append("%s 300 IN TXT \"%s\"" % (qstate.qinfo.qname_str,w.replace("\"","\\\"")))
93 if not msg.set_return_msg(qstate):
94 qstate.ext_state[id] = MODULE_ERROR
    [all...]
log.py 59 def logDnsMsg(qstate):
62 r = qstate.return_msg.rep
63 q = qstate.return_msg.qinfo
67 qstate.qinfo.qname_str, qstate.qinfo.qtype_str, qstate.qinfo.qtype,
68 qstate.qinfo.qclass_str, qstate.qinfo.qclass))
99 def inform_super(id, qstate, superqstate, qdata):
102 def operate(id, event, qstate, qdata)
    [all...]
  /src/external/bsd/unbound/dist/testdata/pymod.tdir/
pymod.py 47 def inform_super(id, qstate, superqstate, qdata):
50 def setTTL(qstate, ttl):
52 if qstate.return_msg:
53 qstate.return_msg.rep.ttl = ttl
54 if (qstate.return_msg.rep):
55 for i in range(0,qstate.return_msg.rep.rrset_count):
56 d = qstate.return_msg.rep.rrsets[i].entry.data
81 def printReturnMsg(qstate):
82 print ("Return MSG rep :: flags: %04X, QDcount: %d, Security:%d, TTL=%d" % (qstate.return_msg.rep.flags, qstate.return_msg.rep.qdcount, qstate.return_msg.rep.security, qstate.return_msg.rep.ttl)
    [all...]
  /src/external/bsd/unbound/dist/testdata/pymod_thread.tdir/
pymod_thread.py 47 def inform_super(id, qstate, superqstate, qdata):
50 def setTTL(qstate, ttl):
52 if qstate.return_msg:
53 qstate.return_msg.rep.ttl = ttl
54 if (qstate.return_msg.rep):
55 for i in range(0,qstate.return_msg.rep.rrset_count):
56 d = qstate.return_msg.rep.rrsets[i].entry.data
81 def printReturnMsg(qstate):
82 print ("Return MSG rep :: flags: %04X, QDcount: %d, Security:%d, TTL=%d" % (qstate.return_msg.rep.flags, qstate.return_msg.rep.qdcount, qstate.return_msg.rep.security, qstate.return_msg.rep.ttl)
    [all...]
  /src/external/bsd/unbound/dist/cachedb/
cachedb.c 290 cachedb_new(struct module_qstate* qstate, int id)
293 qstate->region, sizeof(struct cachedb_qstate));
294 qstate->minfo[id] = iq;
306 * @param qstate: our query state
313 error_response(struct module_qstate* qstate, int id, int rcode)
318 qstate->return_rcode = rcode;
319 qstate->return_msg = NULL;
320 qstate->ext_state[id] = module_finished;
381 prep_data(struct module_qstate* qstate, struct sldns_buffer* buf)
393 if(!qstate->return_msg || !qstate->return_msg->rep
    [all...]
cachedb.h 97 /** Operate on an event on a query (in qstate). */
98 void cachedb_operate(struct module_qstate* qstate, enum module_ev event,
101 void cachedb_inform_super(struct module_qstate* qstate, int id,
103 /** clear the cachedb query-specific contents out of qstate */
104 void cachedb_clear(struct module_qstate* qstate, int id);
126 * @param qstate: query state.
128 void cachedb_msg_remove(struct module_qstate* qstate);
  /src/external/bsd/unbound/dist/ipsecmod/
ipsecmod.c 102 ipsecmod_new(struct module_qstate* qstate, int id)
105 qstate->region, sizeof(struct ipsecmod_qstate));
106 qstate->minfo[id] = iq;
111 iq->enabled = qstate->env->cfg->ipsecmod_enabled;
113 (struct ipsecmod_env*)qstate->env->modinfo[id], qstate->qinfo.qname,
114 qstate->qinfo.qname_len, qstate->qinfo.qclass);
120 * @param qstate: query state
124 ipsecmod_error(struct module_qstate* qstate, int id
    [all...]
ipsecmod.h 69 /** Pointer to IPSECKEY rrset allocated in the qstate region. NULL if there
80 /** Operate on an event on a query (in qstate). */
81 void ipsecmod_operate(struct module_qstate* qstate, enum module_ev event,
84 void ipsecmod_inform_super(struct module_qstate* qstate, int id,
86 /** clear the ipsecmod query-specific contents out of qstate */
87 void ipsecmod_clear(struct module_qstate* qstate, int id);
  /src/external/bsd/unbound/dist/edns-subnet/
subnetmod.c 95 subnet_new_qstate(struct module_qstate *qstate, int id)
98 qstate->region, sizeof(struct subnet_qstate));
101 qstate->minfo[id] = sq;
103 sq->started_no_cache_store = qstate->no_cache_store;
104 sq->started_no_cache_lookup = qstate->no_cache_lookup;
111 struct module_qstate *qstate, struct regional *region)
114 sldns_buffer* buf = qstate->env->scratch_buffer;
141 qstate->env->cfg->client_subnet_opcode,
148 uint16_t ATTR_UNUSED(flags), struct module_qstate* qstate,
156 if(!(sq=(struct subnet_qstate*)qstate->minfo[id])
    [all...]
  /src/external/bsd/unbound/dist/dynlibmod/examples/
helloworld.c 33 struct module_qstate* qstate, struct reply_info* rep, int rcode,
62 EXPORT void operate(struct module_qstate* qstate, enum module_ev event,
66 qstate->qinfo.qname,
67 sldns_lookup_by_id(sldns_rr_classes, qstate->qinfo.qclass)->name,
68 qstate->qinfo.qclass,
69 sldns_rr_descript(qstate->qinfo.qtype)->_name,
70 qstate->qinfo.qtype);
72 qstate->ext_state[id] = module_wait_module;
73 struct dynlibmod_env* env = qstate->env->modinfo[id];
81 qstate->ext_state[id] = module_error
    [all...]
  /src/external/bsd/unbound/dist/pythonmod/doc/examples/
example0-1.py 13 def inform_super(id, qstate, superqstate, qdata):
16 def operate(id, event, qstate, qdata):
20 qstate.ext_state[id] = MODULE_WAIT_MODULE
25 qstate.ext_state[id] = MODULE_FINISHED
30 qstate.ext_state[id] = MODULE_WAIT_MODULE
34 qstate.ext_state[id] = MODULE_ERROR
  /src/external/bsd/unbound/dist/dns64/
dns64.h 59 void dns64_operate(struct module_qstate* qstate, enum module_ev event, int id,
62 void dns64_inform_super(struct module_qstate* qstate, int id,
66 void dns64_clear(struct module_qstate* qstate, int id);
  /src/external/bsd/unbound/dist/iterator/
iterator.c 128 iter_new(struct module_qstate* qstate, int id)
131 qstate->region, sizeof(struct iter_qstate));
132 qstate->minfo[id] = iq;
156 iq->chase_flags = qstate->query_flags;
158 iq->qchase = qstate->qinfo;
162 if (qstate->env->cfg->qname_minimisation)
202 * The response is stored in the qstate->buf buffer.
216 * @param qstate: query state that failed.
221 error_supers(struct module_qstate* qstate, int id, struct module_qstate* super)
223 struct iter_env* ie = (struct iter_env*)qstate->env->modinfo[id]
    [all...]
  /src/external/bsd/unbound/dist/ipset/
ipset.h 61 /** Operate on an event on a query (in qstate). */
62 void ipset_operate(struct module_qstate* qstate, enum module_ev event,
65 void ipset_inform_super(struct module_qstate* qstate, int id,
67 /** clear the ipset query-specific contents out of qstate */
68 void ipset_clear(struct module_qstate* qstate, int id);
  /src/external/bsd/unbound/dist/validator/
validator.c 73 static void process_ds_response(struct module_qstate* qstate,
284 val_new_getmsg(struct module_qstate* qstate, struct val_qstate* vq)
286 if(!qstate->return_msg || qstate->return_rcode != LDNS_RCODE_NOERROR) {
289 vq->orig_msg = (struct dns_msg*)regional_alloc(qstate->region,
293 vq->orig_msg->qinfo = qstate->qinfo;
295 qstate->region, sizeof(struct reply_info));
299 vq->orig_msg->rep->flags = (uint16_t)(qstate->return_rcode&0xf)
300 |BIT_QR|BIT_RA|(qstate->query_flags|(BIT_CD|BIT_RD));
304 vq->orig_msg = qstate->return_msg
869 struct module_qstate* qstate = (struct module_qstate*)arg; local
    [all...]

Completed in 62 milliseconds

1 2 3