Lines Matching defs:idx
762 struct descr *d, int idx, int min_free)
768 if (d[idx].timeout == 0) {
769 add_new_tcp (context, config, d, idx, min_free);
773 n = recvfrom(d[idx].s, buf, sizeof(buf), 0, NULL, NULL);
776 d[idx].addr_string, descr_type(d + idx),
777 ntohs(d[idx].port));
781 "bytes from %s to %s/%d", (unsigned long)d[idx].len,
782 d[idx].addr_string, descr_type(d + idx),
783 ntohs(d[idx].port));
784 clear_descr (d + idx);
787 if (grow_descr (context, config, &d[idx], n))
789 memcpy(d[idx].buf + d[idx].len, buf, n);
790 d[idx].len += n;
791 if(d[idx].len > 4 && d[idx].buf[0] == 0) {
792 ret = handle_vanilla_tcp (context, config, &d[idx]);
794 d[idx].len >= 4 &&
795 strncmp((char *)d[idx].buf, "GET ", 4) == 0 &&
796 strncmp((char *)d[idx].buf + d[idx].len - 4,
800 d[idx].buf[d[idx].len - 4] = '\0';
802 ret = handle_http_tcp (context, config, &d[idx]);
804 clear_descr (d + idx);
805 } else if (d[idx].len > 4) {
808 d[idx].addr_string, descr_type(d + idx),
809 ntohs(d[idx].port));
810 if (d[idx].buf[0] & 0x80) {
825 send_reply(context, config, TRUE, d + idx, &reply);
829 clear_descr(d + idx);
836 d[idx].buf, d[idx].len, TRUE, &d[idx]);
837 clear_descr(d + idx);