Lines Matching defs:req

326         const RHeader *req;
331 req = &packet->rheader;
334 assert(length == req->length);
336 switch (req->type) {
361 return send_addrinfo_reply(out_fd, req->id, ret, result, errno, h_errno);
381 return send_nameinfo_reply(out_fd, req->id, ret,
573 RHeader req = {
575 .length = sizeof(req)
580 (void) send(resolve->fds[REQUEST_SEND_FD], &req, req.length, MSG_NOSIGNAL);
941 AddrInfoRequest req = {};
960 req.node_len = node ? strlen(node)+1 : 0;
961 req.service_len = service ? strlen(service)+1 : 0;
963 req.header.id = q->id;
964 req.header.type = REQUEST_ADDRINFO;
965 req.header.length = sizeof(AddrInfoRequest) + req.node_len + req.service_len;
968 req.hints_valid = true;
969 req.ai_flags = hints->ai_flags;
970 req.ai_family = hints->ai_family;
971 req.ai_socktype = hints->ai_socktype;
972 req.ai_protocol = hints->ai_protocol;
975 iov[mh.msg_iovlen++] = (struct iovec) { .iov_base = &req, .iov_len = sizeof(AddrInfoRequest) };
977 iov[mh.msg_iovlen++] = (struct iovec) { .iov_base = (void*) node, .iov_len = req.node_len };
979 iov[mh.msg_iovlen++] = (struct iovec) { .iov_base = (void*) service, .iov_len = req.service_len };
1015 NameInfoRequest req = {};
1037 req.header.id = q->id;
1038 req.header.type = REQUEST_NAMEINFO;
1039 req.header.length = sizeof(NameInfoRequest) + salen;
1041 req.flags = flags;
1042 req.sockaddr_len = salen;
1043 req.gethost = !!(get & SD_RESOLVE_GET_HOST);
1044 req.getserv = !!(get & SD_RESOLVE_GET_SERVICE);
1046 iov[0] = (struct iovec) { .iov_base = &req, .iov_len = sizeof(NameInfoRequest) };