Lines Matching refs:i
160 size_t i; variable
163 for(i = 0; i < sizeof(req) / sizeof(req[0]); i++) {
164 DOHcode rc = doh_req_encode(req[i].name, req[i].type,
166 if(rc != req[i].rc) {
167 fprintf(stderr, "req %zu: Expected return code %d got %d\n", i,
168 req[i].rc, rc);
169 abort_if(rc != req[i].rc, "return code");
171 if(size != req[i].size) {
172 fprintf(stderr, "req %zu: Expected size %zu got %zu\n", i,
173 req[i].size, size);
175 abort_if(size != req[i].size, "size");
177 if(req[i].packet && memcmp(req[i].packet, buffer, size)) {
180 hexdump((unsigned char *)req[i].packet, size));
181 abort_if(req[i].packet && memcmp(req[i].packet, buffer, size),
186 for(i = 0; i < sizeof(resp) / sizeof(resp[0]); i++) {
193 rc = doh_resp_decode((const unsigned char *)resp[i].packet, resp[i].size,
194 resp[i].type, &d);
195 if(rc != resp[i].rc) {
196 fprintf(stderr, "resp %zu: Expected return code %d got %d\n", i,
197 resp[i].rc, rc);
198 abort_if(rc != resp[i].rc, "return code");
206 if(resp[i].type == DNS_TYPE_A) {
236 if(resp[i].out && strcmp((char *)buffer, resp[i].out)) {
237 fprintf(stderr, "resp %zu: Expected %s got %s\n", i,
238 resp[i].out, buffer);
239 abort_if(resp[i].out && strcmp((char *)buffer, resp[i].out), "content");
244 for(i = 0; i < sizeof(full49)-1; i++) {
248 rc = doh_resp_decode((const unsigned char *)full49, i, DNS_TYPE_A, &d);
251 fprintf(stderr, "%zu: %d\n", i, rc);
257 for(i = 1; i < sizeof(full49); i++) {
261 rc = doh_resp_decode((const unsigned char *)&full49[i], sizeof(full49)-i-1,
265 fprintf(stderr, "2 %zu: %d\n", i, rc);