Lines Matching refs:request_state
91 typedef struct request_state request_state;
93 typedef void (*req_termination_fn)(request_state *request);
100 request_state *request;
112 request_state *request;
130 struct request_state
132 request_state *next;
133 request_state *primary; // If this operation is on a shared socket, pointer to primary
134 // request_state for the original DNSServiceCreateConnection() operation
142 // operation is, we don't know if we're going to need to allocate a new request_state or not.
255 static request_state *all_requests = NULL;
308 mDNSlocal void abort_request(request_state *req)
321 // Now, if this request_state is not subordinate to some other primary, close file descriptor and discard replies
349 mDNSlocal void AbortUnlinkAndFree(request_state *req)
351 request_state **p = &all_requests;
354 if (*p) { *p = req->next; freeL("request_state/AbortUnlinkAndFree", req); }
358 mDNSlocal reply_state *create_reply(const reply_op_t op, const size_t datalen, request_state *const request)
387 mDNSlocal void append_reply(request_state *req, reply_state *rep)
389 request_state *r = req->primary ? req->primary : req;
400 request_state *const request, reply_state **const rep, reply_op_t op, DNSServiceFlags flags, mStatus err)
446 request_state *const request, reply_state **const rep, reply_op_t op, DNSServiceFlags flags, mStatus err)
486 mDNSlocal AuthRecord *read_rr_from_ipc_msg(request_state *request, int GetTTL, int validate_flags)
574 mDNSlocal mDNSBool AuthorizedDomain(const request_state * const request, const domainname * const d, const DNameListElem * const doms)
888 request_state *request = re->request;
934 mDNSlocal void connection_termination(request_state *request)
938 request_state **req = &all_requests;
947 request_state *tmp = *req;
952 freeL("request_state/connection_termination", tmp);
974 mDNSlocal void handle_cancel_request(request_state *request)
976 request_state **req = &all_requests;
985 request_state *tmp = *req;
988 freeL("request_state/handle_cancel_request", tmp);
995 mDNSlocal mStatus handle_regrecord_request(request_state *request)
1049 mDNSlocal void regservice_termination_callback(request_state *request)
1081 mDNSlocal request_state *LocateSubordinateRequest(request_state *request)
1083 request_state *req;
1091 mDNSlocal mStatus add_record_to_service(request_state *request, service_instance *instance, mDNSu16 rrtype, mDNSu16 rdlen, const char *rdata, mDNSu32 ttl)
1118 mDNSlocal mStatus handle_add_request(request_state *request)
1132 // If this is a shared connection, check if the operation actually applies to a subordinate request_state object
1204 mDNSlocal mStatus handle_update_request(request_state *request)
1220 // If this is a shared connection, check if the operation actually applies to a subordinate request_state object
1289 mDNSlocal mStatus remove_record(request_state *request)
1317 mDNSlocal mStatus remove_extra(const request_state *const request, service_instance *const serv, mDNSu16 *const rrtype)
1335 mDNSlocal mStatus handle_removerecord_request(request_state *request)
1342 // If this is a shared connection, check if the operation actually applies to a subordinate request_state object
1438 mDNSlocal mStatus register_service_instance(request_state *request, const domainname *domain)
1529 request_state *request;
1575 // instance, clearing the backpointers, and then disposing the parent request_state object.
1590 mDNSlocal mStatus handle_regservice_request(request_state *request)
1737 request_state *req = question->QuestionContext;
1768 mDNSlocal mStatus add_domain_to_browser(request_state *info, const domainname *d)
1805 mDNSlocal void browse_termination_callback(request_state *info)
1828 request_state *request;
1994 request_state *req;
2025 request_state *req;
2120 mDNSlocal mStatus handle_sethost_request(request_state *request)
2143 mDNSlocal mStatus handle_browse_request(request_state *request)
2227 request_state *req = question->QuestionContext;
2276 mDNSlocal void resolve_termination_callback(request_state *request)
2284 mDNSlocal mStatus handle_resolve_request(request_state *request)
2484 mDNSlocal mStatus SendAdditionalQuery(DNSQuestion *q, request_state *request, mStatus err)
2581 mDNSlocal mDNSBool RetryQuestionWithSearchDomains(mDNS *const m, DNSQuestion *question, request_state *req)
2632 request_state *req = question->QuestionContext;
2914 mDNSlocal void queryrecord_termination_callback(request_state *request)
2962 mDNSlocal mStatus handle_queryrecord_request(request_state *request)
3057 mDNSlocal reply_state *format_enumeration_reply(request_state *request,
3078 mDNSlocal void enum_termination_callback(request_state *request)
3088 request_state *request = question->QuestionContext;
3121 mDNSlocal mStatus handle_enum_request(request_state *request)
3172 mDNSlocal mStatus handle_reconfirm_request(request_state *request)
3190 mDNSlocal mStatus handle_setdomain_request(request_state *request)
3211 mDNSlocal void handle_getproperty_request(request_state *request)
3238 mDNSlocal void port_mapping_termination_callback(request_state *request)
3249 request_state *request = (request_state *)n->clientContext;
3254 if (!request) { LogMsg("port_mapping_create_request_callback called with unknown request_state object"); return; }
3290 mDNSlocal mStatus handle_port_mapping_request(request_state *request)
3346 mDNSlocal void addrinfo_termination_callback(request_state *request)
3405 mDNSlocal mStatus handle_addrinfo_request(request_state *request)
3532 mDNSlocal request_state *NewRequest(void)
3534 request_state **p = &all_requests;
3536 *p = mallocL("request_state", sizeof(request_state));
3538 mDNSPlatformMemZero(*p, sizeof(request_state));
3544 mDNSlocal void read_msg(request_state *req)
3585 req->msgbuf = mallocL("request_state msgbuf", req->hdr.datalen + MSG_PAD_BYTES);
3741 // The lightweight operations are the ones that don't need a dedicated request_state structure allocated for them
3747 request_state *req = info;
3801 request_state *newreq = NewRequest();
3821 // These are all operations that have their own first-class request_state object
3836 // These are all operations that work with an existing request_state object
3847 if (req->msgbuf) freeL("request_state msgbuf", req->msgbuf);
3913 request_state *request = NewRequest();
4121 mDNSlocal void LogClientInfo(mDNS *const m, const request_state *req)
4135 const request_state *r;
4413 const request_state *req, *r;
4566 const request_state *req, *p;
4569 if (req->next == (request_state *)~0 || (req->sd < 0 && req->sd != -2))
4582 else if (p && (p->next == (request_state *)~0 || (p->sd < 0 && p->sd != -2)))
4633 mDNSlocal int send_msg(request_state *const req)
4667 request_state **req = &all_requests;
4671 request_state *const r = *req;
4731 freeL("request_state/udsserver_idle", r);
4744 char sizecheck_request_state [(sizeof(request_state) <= 1784) ? 1 : -1];