Lines Matching refs:pkt
995 mdns_read_rr_info(struct mdns_packet *pkt, struct mdns_rr_info *info) in mdns_read_rr_info() argument
998 pkt->parse_offset = mdns_readname(pkt->pbuf, pkt->parse_offset, &info->domain); in mdns_read_rr_info()
999 if (pkt->parse_offset == MDNS_READNAME_ERROR) { in mdns_read_rr_info()
1003 copied = pbuf_copy_partial(pkt->pbuf, &field16, sizeof(field16), pkt->parse_offset); in mdns_read_rr_info()
1007 pkt->parse_offset += copied; in mdns_read_rr_info()
1010 copied = pbuf_copy_partial(pkt->pbuf, &field16, sizeof(field16), pkt->parse_offset); in mdns_read_rr_info()
1014 pkt->parse_offset += copied; in mdns_read_rr_info()
1029 mdns_read_question(struct mdns_packet *pkt, struct mdns_question *question) in mdns_read_question() argument
1032 if (pkt->pbuf->tot_len < pkt->parse_offset) { in mdns_read_question()
1036 if (pkt->questions_left) { in mdns_read_question()
1038 pkt->questions_left--; in mdns_read_question()
1041 res = mdns_read_rr_info(pkt, &question->info); in mdns_read_question()
1064 mdns_read_answer(struct mdns_packet *pkt, struct mdns_answer *answer) in mdns_read_answer() argument
1067 if (pkt->questions_left) { in mdns_read_answer()
1072 if (pkt->pbuf->tot_len < pkt->parse_offset) { in mdns_read_answer()
1076 if (pkt->answers_left) { in mdns_read_answer()
1080 pkt->answers_left--; in mdns_read_answer()
1083 res = mdns_read_rr_info(pkt, &answer->info); in mdns_read_answer()
1092 copied = pbuf_copy_partial(pkt->pbuf, &ttl, sizeof(ttl), pkt->parse_offset); in mdns_read_answer()
1096 pkt->parse_offset += copied; in mdns_read_answer()
1099 copied = pbuf_copy_partial(pkt->pbuf, &field16, sizeof(field16), pkt->parse_offset); in mdns_read_answer()
1103 pkt->parse_offset += copied; in mdns_read_answer()
1106 answer->rd_offset = pkt->parse_offset; in mdns_read_answer()
1107 pkt->parse_offset += answer->rd_length; in mdns_read_answer()
1498 mdns_handle_question(struct mdns_packet *pkt) in mdns_handle_question() argument
1505 struct mdns_host* mdns = NETIF_TO_HOST(pkt->netif); in mdns_handle_question()
1507 mdns_init_outpacket(&reply, pkt); in mdns_handle_question()
1509 while (pkt->questions_left) { in mdns_handle_question()
1512 res = mdns_read_question(pkt, &q); in mdns_handle_question()
1527 reply.host_replies |= check_host(pkt->netif, &q.info, &reply.host_reverse_v6_replies); in mdns_handle_question()
1549 while (pkt->answers_left) { in mdns_handle_question()
1554 res = mdns_read_answer(pkt, &ans); in mdns_handle_question()
1571 match = reply.host_replies & check_host(pkt->netif, &ans.info, &rev_v6); in mdns_handle_question()
1581 len = mdns_readname(pkt->pbuf, ans.rd_offset, &known_ans); in mdns_handle_question()
1603 pbuf_memcmp(pkt->pbuf, ans.rd_offset, netif_ip4_addr(pkt->netif), ans.rd_length) == 0) { in mdns_handle_question()
1612 … pbuf_memcmp(pkt->pbuf, ans.rd_offset, netif_ip6_addr(pkt->netif, 0), ans.rd_length) == 0) { in mdns_handle_question()
1635 len = mdns_readname(pkt->pbuf, ans.rd_offset, &known_ans); in mdns_handle_question()
1659 len = pbuf_copy_partial(pkt->pbuf, &field16, sizeof(field16), read_pos); in mdns_handle_question()
1665 len = pbuf_copy_partial(pkt->pbuf, &field16, sizeof(field16), read_pos); in mdns_handle_question()
1671 len = pbuf_copy_partial(pkt->pbuf, &field16, sizeof(field16), read_pos); in mdns_handle_question()
1677 len = mdns_readname(pkt->pbuf, read_pos, &known_ans); in mdns_handle_question()
1688 pbuf_memcmp(pkt->pbuf, ans.rd_offset, service->txtdata.name, ans.rd_length) == 0) { in mdns_handle_question()
1712 mdns_handle_response(struct mdns_packet *pkt) in mdns_handle_response() argument
1715 while (pkt->questions_left) { in mdns_handle_response()
1719 res = mdns_read_question(pkt, &q); in mdns_handle_response()
1726 while (pkt->answers_left) { in mdns_handle_response()
1730 res = mdns_read_answer(pkt, &ans); in mdns_handle_response()