Home | History | Annotate | Download | only in libevent

Lines Matching refs:item

247 	struct server_reply_item *next; /* next item in sequence. */
557 /* only item in the list */
623 /* only one item in the queue */
1514 struct server_reply_item **itemp, *item;
1539 item = malloc(sizeof(struct server_reply_item));
1540 if (!item)
1542 item->next = NULL;
1543 if (!(item->name = strdup(name))) {
1544 free(item);
1547 item->type = type;
1548 item->dns_question_class = class;
1549 item->ttl = ttl;
1550 item->is_name = is_name != 0;
1551 item->datalen = 0;
1552 item->data = NULL;
1554 if (item->is_name) {
1555 if (!(item->data = strdup(data))) {
1556 free(item->name);
1557 free(item);
1560 item->datalen = (u16)-1;
1562 if (!(item->data = malloc(datalen))) {
1563 free(item->name);
1564 free(item);
1567 item->datalen = datalen;
1568 memcpy(item->data, data, datalen);
1572 *itemp = item;
1668 struct server_reply_item *item;
1670 item = req->answer;
1672 item = req->authority;
1674 item = req->additional;
1675 while (item) {
1676 r = dnsname_to_labels(buf, buf_len, j, item->name, strlen(item->name), &table);
1681 APPEND16(item->type);
1682 APPEND16(item->dns_question_class);
1683 APPEND32(item->ttl);
1684 if (item->is_name) {
1688 r = dnsname_to_labels(buf, buf_len, j, item->data, strlen(item->data), &table);
1695 APPEND16(item->datalen);
1696 if (j+item->datalen > (off_t)buf_len)
1698 memcpy(buf+j, item->data, item->datalen);
1699 j += item->datalen;
1701 item = item->next;