Lines Matching refs:resp

377             struct netbios_resp *resp;
381 resp = (struct netbios_resp *)q->payload;
384 resp->resp_hdr.trans_id = netbios_hdr->trans_id;
385 resp->resp_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE |
389 resp->resp_hdr.questions = 0;
390 resp->resp_hdr.answerRRs = PP_HTONS(1);
391 resp->resp_hdr.authorityRRs = 0;
392 resp->resp_hdr.additionalRRs = 0;
395 MEMCPY( resp->resp_name.encname, netbios_question_hdr->encname, sizeof(netbios_question_hdr->encname));
396 resp->resp_name.nametype = netbios_question_hdr->nametype;
397 resp->resp_name.type = netbios_question_hdr->type;
398 resp->resp_name.cls = netbios_question_hdr->cls;
399 resp->resp_name.ttl = PP_HTONL(NETBIOS_NAME_TTL);
400 resp->resp_name.datalen = PP_HTONS(sizeof(resp->resp_name.flags) + sizeof(resp->resp_name.addr));
401 resp->resp_name.flags = PP_HTONS(NETB_NFLAG_NODETYPE_BNODE);
402 ip4_addr_copy(resp->resp_name.addr, *netif_ip4_addr(netif_default));
418 struct netbios_answer *resp;
423 resp = (struct netbios_answer *) q->payload;
426 memset(resp, 0, sizeof(*resp));
429 resp->answer_hdr.trans_id = netbios_hdr->trans_id;
431 resp->answer_hdr.flags = PP_HTONS(NETB_HFLAG_RESPONSE | NETB_HFLAG_OPCODE_NAME_QUERY | NETB_HFLAG_AUTHORATIVE);
432 /* resp->answer_hdr.questions = PP_HTONS(0); done by memset() */
434 resp->answer_hdr.answerRRs = PP_HTONS(1);
435 /* resp->answer_hdr.authorityRRs = PP_HTONS(0); done by memset() */
436 /* resp->answer_hdr.additionalRRs = PP_HTONS(0); done by memset() */
438 resp->name_size = netbios_question_hdr->nametype;
440 MEMCPY(resp->query_name, netbios_question_hdr->encname, (NETBIOS_NAME_LEN * 2) + 1);
442 resp->packet_type = PP_HTONS(0x21);
444 resp->cls = PP_HTONS(1);
445 /* resp->ttl = PP_HTONL(0); done by memset() */
446 resp->data_length = PP_HTONS(sizeof(struct netbios_answer) - offsetof(struct netbios_answer, number_of_names));
447 resp->number_of_names = 1;
450 memset(resp->answer_name, 0x20, NETBIOS_NAME_LEN - 1);
452 MEMCPY(resp->answer_name, NETBIOS_LOCAL_NAME, strlen(NETBIOS_LOCAL_NAME));
455 resp->answer_name_flags = PP_HTONS(NETB_NFLAG_NAME_IS_ACTIVE);
458 SMEMCPY(resp->unit_id, ip_current_input_netif()->hwaddr, sizeof(resp->unit_id));