Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthetic DNS_QUERY_OPTIONS enum encapsulates constants with differing types #1933

Open
riverar opened this issue Jun 22, 2024 · 1 comment

Comments

@riverar
Copy link
Collaborator

riverar commented Jun 22, 2024

DNS_QUERY_OPTIONS is currently a uint typed enum we emit that collects various DNS_QUERY_xxx loose constants. Some of these constants are larger than a uint.

#define DNS_QUERY_STANDARD                  0x00000000
#define DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE 0x00000001
...
#define DNS_QUERY_RESERVED                  0xf0000000
...
#define DNS_QUERY_PARSE_ALL_RECORDS         0x0400000000000000

So to preserve code-gen ABI, I believe we need to return these constants to the wild.

Currently in enums.json

  {
    "name": "DNS_QUERY_OPTIONS",
    "type": "uint",
    "flags": true,
    "autoPopulate": {
      "header": "windns.h",
      "filter": "DNS_QUERY_"
    },
    "uses": [
      {
        "method": "DnsQuery_A",
        "parameter": "Options"
      },
      {
        "method": "DnsQuery_W",
        "parameter": "Options"
      },
      {
        "method": "DnsQuery_UTF8",
        "parameter": "Options"
      }
    ]
  },
@riverar
Copy link
Collaborator Author

riverar commented Jun 22, 2024

Believe ISC_REQ_FLAGS also falls into this category.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant