Lines Matching full:dm
122 struct dt_msg *dm, in dt_msg_init() argument
125 memset(dm, 0, sizeof(*dm)); in dt_msg_init()
126 dm->d.base.descriptor = &dnstap__dnstap__descriptor; in dt_msg_init()
127 dm->m.base.descriptor = &dnstap__message__descriptor; in dt_msg_init()
128 dm->d.type = DNSTAP__DNSTAP__TYPE__MESSAGE; in dt_msg_init()
129 dm->d.message = &dm->m; in dt_msg_init()
130 dm->m.type = mtype; in dt_msg_init()
132 dm->d.identity.data = (uint8_t *) env->identity; in dt_msg_init()
133 dm->d.identity.len = (size_t) env->len_identity; in dt_msg_init()
134 dm->d.has_identity = 1; in dt_msg_init()
137 dm->d.version.data = (uint8_t *) env->version; in dt_msg_init()
138 dm->d.version.len = (size_t) env->len_version; in dt_msg_init()
139 dm->d.has_version = 1; in dt_msg_init()
337 dt_msg_fill_net(struct dt_msg *dm, in dt_msg_fill_net() argument
352 dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET6; in dt_msg_fill_net()
353 dm->m.has_socket_family = 1; in dt_msg_fill_net()
367 dm->m.socket_family = DNSTAP__SOCKET_FAMILY__INET; in dt_msg_fill_net()
368 dm->m.has_socket_family = 1; in dt_msg_fill_net()
410 dm->m.socket_protocol = DNSTAP__SOCKET_PROTOCOL__UDP; in dt_msg_fill_net()
411 dm->m.has_socket_protocol = 1; in dt_msg_fill_net()
415 dm->m.socket_protocol = DNSTAP__SOCKET_PROTOCOL__TCP; in dt_msg_fill_net()
416 dm->m.has_socket_protocol = 1; in dt_msg_fill_net()
419 dm->m.socket_protocol = DNSTAP__SOCKET_PROTOCOL__DOT; in dt_msg_fill_net()
420 dm->m.has_socket_protocol = 1; in dt_msg_fill_net()
424 dm->m.socket_protocol = DNSTAP__SOCKET_PROTOCOL__DOH; in dt_msg_fill_net()
425 dm->m.has_socket_protocol = 1; in dt_msg_fill_net()
428 dm->m.socket_protocol = DNSTAP__SOCKET_PROTOCOL__TCP; in dt_msg_fill_net()
429 dm->m.has_socket_protocol = 1; in dt_msg_fill_net()
442 struct dt_msg dm; in dt_msg_send_client_query() local
453 dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_QUERY); in dt_msg_send_client_query()
457 &dm.m.query_time_sec, &dm.m.has_query_time_sec, in dt_msg_send_client_query()
458 &dm.m.query_time_nsec, &dm.m.has_query_time_nsec); in dt_msg_send_client_query()
461 dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message); in dt_msg_send_client_query()
464 dt_msg_fill_net(&dm, qsock, rsock, cptype, cpssl, in dt_msg_send_client_query()
465 &dm.m.query_address, &dm.m.has_query_address, in dt_msg_send_client_query()
466 &dm.m.query_port, &dm.m.has_query_port, in dt_msg_send_client_query()
467 &dm.m.response_address, &dm.m.has_response_address, in dt_msg_send_client_query()
468 &dm.m.response_port, &dm.m.has_response_port); in dt_msg_send_client_query()
471 if (dt_pack(&dm.d, &dm.buf, &dm.len_buf)) in dt_msg_send_client_query()
472 dt_send(env, dm.buf, dm.len_buf); in dt_msg_send_client_query()
483 struct dt_msg dm; in dt_msg_send_client_response() local
492 dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__CLIENT_RESPONSE); in dt_msg_send_client_response()
496 &dm.m.response_time_sec, &dm.m.has_response_time_sec, in dt_msg_send_client_response()
497 &dm.m.response_time_nsec, &dm.m.has_response_time_nsec); in dt_msg_send_client_response()
500 dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message); in dt_msg_send_client_response()
503 dt_msg_fill_net(&dm, qsock, rsock, cptype, cpssl, in dt_msg_send_client_response()
504 &dm.m.query_address, &dm.m.has_query_address, in dt_msg_send_client_response()
505 &dm.m.query_port, &dm.m.has_query_port, in dt_msg_send_client_response()
506 &dm.m.response_address, &dm.m.has_response_address, in dt_msg_send_client_response()
507 &dm.m.response_port, &dm.m.has_response_port); in dt_msg_send_client_response()
509 if (dt_pack(&dm.d, &dm.buf, &dm.len_buf)) in dt_msg_send_client_response()
510 dt_send(env, dm.buf, dm.len_buf); in dt_msg_send_client_response()
522 struct dt_msg dm; in dt_msg_send_outside_query() local
536 dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_QUERY); in dt_msg_send_outside_query()
540 dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_QUERY); in dt_msg_send_outside_query()
544 dm.m.query_zone.data = zone; in dt_msg_send_outside_query()
545 dm.m.query_zone.len = zone_len; in dt_msg_send_outside_query()
546 dm.m.has_query_zone = 1; in dt_msg_send_outside_query()
550 &dm.m.query_time_sec, &dm.m.has_query_time_sec, in dt_msg_send_outside_query()
551 &dm.m.query_time_nsec, &dm.m.has_query_time_nsec); in dt_msg_send_outside_query()
554 dt_fill_buffer(qmsg, &dm.m.query_message, &dm.m.has_query_message); in dt_msg_send_outside_query()
557 dt_msg_fill_net(&dm, rsock, qsock, cptype, cpssl, in dt_msg_send_outside_query()
558 &dm.m.response_address, &dm.m.has_response_address, in dt_msg_send_outside_query()
559 &dm.m.response_port, &dm.m.has_response_port, in dt_msg_send_outside_query()
560 &dm.m.query_address, &dm.m.has_query_address, in dt_msg_send_outside_query()
561 &dm.m.query_port, &dm.m.has_query_port); in dt_msg_send_outside_query()
563 if (dt_pack(&dm.d, &dm.buf, &dm.len_buf)) in dt_msg_send_outside_query()
564 dt_send(env, dm.buf, dm.len_buf); in dt_msg_send_outside_query()
579 struct dt_msg dm; in dt_msg_send_outside_response() local
593 dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__FORWARDER_RESPONSE); in dt_msg_send_outside_response()
597 dt_msg_init(env, &dm, DNSTAP__MESSAGE__TYPE__RESOLVER_RESPONSE); in dt_msg_send_outside_response()
601 dm.m.query_zone.data = zone; in dt_msg_send_outside_response()
602 dm.m.query_zone.len = zone_len; in dt_msg_send_outside_response()
603 dm.m.has_query_zone = 1; in dt_msg_send_outside_response()
607 &dm.m.query_time_sec, &dm.m.has_query_time_sec, in dt_msg_send_outside_response()
608 &dm.m.query_time_nsec, &dm.m.has_query_time_nsec); in dt_msg_send_outside_response()
612 &dm.m.response_time_sec, &dm.m.has_response_time_sec, in dt_msg_send_outside_response()
613 &dm.m.response_time_nsec, &dm.m.has_response_time_nsec); in dt_msg_send_outside_response()
616 dt_fill_buffer(rmsg, &dm.m.response_message, &dm.m.has_response_message); in dt_msg_send_outside_response()
619 dt_msg_fill_net(&dm, rsock, qsock, cptype, cpssl, in dt_msg_send_outside_response()
620 &dm.m.response_address, &dm.m.has_response_address, in dt_msg_send_outside_response()
621 &dm.m.response_port, &dm.m.has_response_port, in dt_msg_send_outside_response()
622 &dm.m.query_address, &dm.m.has_query_address, in dt_msg_send_outside_response()
623 &dm.m.query_port, &dm.m.has_query_port); in dt_msg_send_outside_response()
625 if (dt_pack(&dm.d, &dm.buf, &dm.len_buf)) in dt_msg_send_outside_response()
626 dt_send(env, dm.buf, dm.len_buf); in dt_msg_send_outside_response()