[CDRIVER-4052] Move SRV / TXT resolution code to a separate file Created: 02/Jul/21  Updated: 15/Apr/22

Status: Backlog
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CDRIVER-4107

 Description   

Motivation
There are several functions related to SRV / TXT lookup in mongoc-client.c. They do not depend on mongoc_client_t. SRV / TXT lookup is called by calling _mongoc_client_get_rr in mongoc-topology.c.

In CDRIVER-4048, some symbols for SRV / TXT lookup were added to mongoc-topology-private.h to permit overriding the DNS resolver: _mongoc_rr_resolver_fn, mongoc_rr_data_t, and mongoc_rr_type_t.

mongoc-topology.c and mongoc-client.c are large files. Moving SRV / TXT code to a separate file should help readability.

Scope
Move MONGOC_RR_DEFAULT_BUFFER_SIZE and _mongoc_client_get_rr, and the related static methods to a new file. This could be named mongoc-dns.c, or mongoc-rr.c. If rr is the name chosen, ensure that it is clearly defined (to be "resource record" I believe).


Generated at Wed Feb 07 21:19:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.