clang-format: fix structure alignment

It appears the structure alignment chosen just doesn't work right.
Switch to 'left', it appears to be mostly correct.

Fix By: Brad House (@bradh352)
pull/580/head
Brad House 1 year ago
parent 1549415228
commit 86e417e247
  1. 2
      .clang-format
  2. 2
      src/lib/ares_init.c
  3. 2
      src/lib/ares_parse_uri_reply.c
  4. 21784
      src/lib/ares_platform.c
  5. 506
      src/tools/acountry.c
  6. 104
      src/tools/adig.c

@ -18,7 +18,7 @@ UseTab: Never
BasedOnStyle: LLVM BasedOnStyle: LLVM
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignArrayOfStructures: Right AlignArrayOfStructures: Left
AlignConsecutiveAssignments: AlignConsecutiveAssignments:
Enabled: true Enabled: true
AcrossEmptyLines: false AcrossEmptyLines: false

@ -1922,7 +1922,7 @@ static ares_bool_t ares_ipv6_server_blacklisted(const unsigned char ipaddr[16])
* but are known to be returned at least sometimes on Windows and Android. * but are known to be returned at least sometimes on Windows and Android.
*/ */
{{ 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, {{ 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 }, 0x00, 0x00, 0x00, 0x00 },
10} 10}
}; };

@ -160,7 +160,7 @@ int ares_parse_uri_reply(const unsigned char *abuf, int alen_int,
} }
memcpy(uri_curr->uri, vptr, len); memcpy(uri_curr->uri, vptr, len);
uri_curr->uri[len] = 0; uri_curr->uri[len] = 0;
uri_curr->ttl = (int)rr_ttl; uri_curr->ttl = (int)rr_ttl;
} }
/* Don't lose memory in the next iteration */ /* Don't lose memory in the next iteration */

File diff suppressed because it is too large Load Diff

@ -309,260 +309,260 @@ static const struct search_list *
* Ref: https://en.wikipedia.org/wiki/ISO_3166-1 * Ref: https://en.wikipedia.org/wiki/ISO_3166-1
*/ */
static const struct search_list country_list[] = { static const struct search_list country_list[] = {
{ 4, "af", "Afghanistan" }, {4, "af", "Afghanistan" },
{ 248, "ax", "Åland Island"}, { 248, "ax", "Åland Island" },
{ 8, "al", "Albania"}, { 8, "al", "Albania" },
{ 12, "dz", "Algeria"}, { 12, "dz", "Algeria" },
{ 16, "as", "American Samoa"}, { 16, "as", "American Samoa" },
{ 20, "ad", "Andorra"}, { 20, "ad", "Andorra" },
{ 24, "ao", "Angola"}, { 24, "ao", "Angola" },
{ 660, "ai", "Anguilla"}, { 660, "ai", "Anguilla" },
{ 10, "aq", "Antarctica"}, { 10, "aq", "Antarctica" },
{ 28, "ag", "Antigua & Barbuda"}, { 28, "ag", "Antigua & Barbuda" },
{ 32, "ar", "Argentina"}, { 32, "ar", "Argentina" },
{ 51, "am", "Armenia"}, { 51, "am", "Armenia" },
{ 533, "aw", "Aruba"}, { 533, "aw", "Aruba" },
{ 36, "au", "Australia"}, { 36, "au", "Australia" },
{ 40, "at", "Austria"}, { 40, "at", "Austria" },
{ 31, "az", "Azerbaijan"}, { 31, "az", "Azerbaijan" },
{ 44, "bs", "Bahamas"}, { 44, "bs", "Bahamas" },
{ 48, "bh", "Bahrain"}, { 48, "bh", "Bahrain" },
{ 50, "bd", "Bangladesh"}, { 50, "bd", "Bangladesh" },
{ 52, "bb", "Barbados"}, { 52, "bb", "Barbados" },
{ 112, "by", "Belarus"}, { 112, "by", "Belarus" },
{ 56, "be", "Belgium"}, { 56, "be", "Belgium" },
{ 84, "bz", "Belize"}, { 84, "bz", "Belize" },
{ 204, "bj", "Benin"}, { 204, "bj", "Benin" },
{ 60, "bm", "Bermuda"}, { 60, "bm", "Bermuda" },
{ 64, "bt", "Bhutan"}, { 64, "bt", "Bhutan" },
{ 68, "bo", "Bolivia"}, { 68, "bo", "Bolivia" },
{ 535, "bq", "Bonaire, Sint Eustatius and Saba"}, /* Formerly 'Bonaire' / { 535, "bq", "Bonaire, Sint Eustatius and Saba" }, /* Formerly 'Bonaire' /
'Netherlands Antilles' */ 'Netherlands Antilles' */
{ 70, "ba", "Bosnia & Herzegovina"}, { 70, "ba", "Bosnia & Herzegovina" },
{ 72, "bw", "Botswana"}, { 72, "bw", "Botswana" },
{ 74, "bv", "Bouvet Island"}, { 74, "bv", "Bouvet Island" },
{ 76, "br", "Brazil"}, { 76, "br", "Brazil" },
{ 86, "io", "British Indian Ocean Territory"}, { 86, "io", "British Indian Ocean Territory" },
{ 96, "bn", "Brunei Darussalam"}, { 96, "bn", "Brunei Darussalam" },
{ 100, "bg", "Bulgaria"}, { 100, "bg", "Bulgaria" },
{ 854, "bf", "Burkina Faso"}, { 854, "bf", "Burkina Faso" },
{ 108, "bi", "Burundi"}, { 108, "bi", "Burundi" },
{ 116, "kh", "Cambodia"}, { 116, "kh", "Cambodia" },
{ 120, "cm", "Cameroon"}, { 120, "cm", "Cameroon" },
{ 124, "ca", "Canada"}, { 124, "ca", "Canada" },
{ 132, "cv", "Cape Verde"}, { 132, "cv", "Cape Verde" },
{ 136, "ky", "Cayman Islands"}, { 136, "ky", "Cayman Islands" },
{ 140, "cf", "Central African Republic"}, { 140, "cf", "Central African Republic" },
{ 148, "td", "Chad"}, { 148, "td", "Chad" },
{ 152, "cl", "Chile"}, { 152, "cl", "Chile" },
{ 156, "cn", "China"}, { 156, "cn", "China" },
{ 162, "cx", "Christmas Island"}, { 162, "cx", "Christmas Island" },
{ 166, "cc", "Cocos Islands"}, { 166, "cc", "Cocos Islands" },
{ 170, "co", "Colombia"}, { 170, "co", "Colombia" },
{ 174, "km", "Comoros"}, { 174, "km", "Comoros" },
{ 178, "cg", "Congo"}, { 178, "cg", "Congo" },
{ 180, "cd", "Congo"}, { 180, "cd", "Congo" },
{ 184, "ck", "Cook Islands"}, { 184, "ck", "Cook Islands" },
{ 188, "cr", "Costa Rica"}, { 188, "cr", "Costa Rica" },
{ 384, "ci", "Cote d'Ivoire"}, { 384, "ci", "Cote d'Ivoire" },
{ 191, "hr", "Croatia"}, { 191, "hr", "Croatia" },
{ 192, "cu", "Cuba"}, { 192, "cu", "Cuba" },
{ 531, "cw", "Curaçao"}, { 531, "cw", "Curaçao" },
{ 196, "cy", "Cyprus"}, { 196, "cy", "Cyprus" },
{ 203, "cz", "Czech Republic"}, { 203, "cz", "Czech Republic" },
{ 208, "dk", "Denmark"}, { 208, "dk", "Denmark" },
{ 262, "dj", "Djibouti"}, { 262, "dj", "Djibouti" },
{ 212, "dm", "Dominica"}, { 212, "dm", "Dominica" },
{ 214, "do", "Dominican Republic"}, { 214, "do", "Dominican Republic" },
{ 218, "ec", "Ecuador"}, { 218, "ec", "Ecuador" },
{ 818, "eg", "Egypt"}, { 818, "eg", "Egypt" },
{ 222, "sv", "El Salvador"}, { 222, "sv", "El Salvador" },
{ 226, "gq", "Equatorial Guinea"}, { 226, "gq", "Equatorial Guinea" },
{ 232, "er", "Eritrea"}, { 232, "er", "Eritrea" },
{ 233, "ee", "Estonia"}, { 233, "ee", "Estonia" },
{ 748, "sz", "Eswatini"}, /* Formerly Swaziland */ { 748, "sz", "Eswatini" }, /* Formerly Swaziland */
{ 231, "et", "Ethiopia"}, { 231, "et", "Ethiopia" },
{65281, "eu", "European Union"}, /* 127.0.255.1 */ { 65281, "eu", "European Union" }, /* 127.0.255.1 */
{ 238, "fk", "Falkland Islands"}, { 238, "fk", "Falkland Islands" },
{ 234, "fo", "Faroe Islands"}, { 234, "fo", "Faroe Islands" },
{ 242, "fj", "Fiji"}, { 242, "fj", "Fiji" },
{ 246, "fi", "Finland"}, { 246, "fi", "Finland" },
{ 250, "fr", "France"}, { 250, "fr", "France" },
{ 249, "fx", "France, Metropolitan"}, { 249, "fx", "France, Metropolitan" },
{ 254, "gf", "French Guiana"}, { 254, "gf", "French Guiana" },
{ 258, "pf", "French Polynesia"}, { 258, "pf", "French Polynesia" },
{ 260, "tf", "French Southern Territories"}, { 260, "tf", "French Southern Territories" },
{ 266, "ga", "Gabon"}, { 266, "ga", "Gabon" },
{ 270, "gm", "Gambia"}, { 270, "gm", "Gambia" },
{ 268, "ge", "Georgia"}, { 268, "ge", "Georgia" },
{ 276, "de", "Germany"}, { 276, "de", "Germany" },
{ 288, "gh", "Ghana"}, { 288, "gh", "Ghana" },
{ 292, "gi", "Gibraltar"}, { 292, "gi", "Gibraltar" },
{ 300, "gr", "Greece"}, { 300, "gr", "Greece" },
{ 304, "gl", "Greenland"}, { 304, "gl", "Greenland" },
{ 308, "gd", "Grenada"}, { 308, "gd", "Grenada" },
{ 312, "gp", "Guadeloupe"}, { 312, "gp", "Guadeloupe" },
{ 316, "gu", "Guam"}, { 316, "gu", "Guam" },
{ 320, "gt", "Guatemala"}, { 320, "gt", "Guatemala" },
{ 831, "gg", "Guernsey"}, { 831, "gg", "Guernsey" },
{ 324, "gn", "Guinea"}, { 324, "gn", "Guinea" },
{ 624, "gw", "Guinea-Bissau"}, { 624, "gw", "Guinea-Bissau" },
{ 328, "gy", "Guyana"}, { 328, "gy", "Guyana" },
{ 332, "ht", "Haiti"}, { 332, "ht", "Haiti" },
{ 334, "hm", "Heard & Mc Donald Islands"}, { 334, "hm", "Heard & Mc Donald Islands" },
{ 336, "va", "Holy See"}, /* Vatican City */ { 336, "va", "Holy See" }, /* Vatican City */
{ 340, "hn", "Honduras"}, { 340, "hn", "Honduras" },
{ 344, "hk", "Hong kong"}, { 344, "hk", "Hong kong" },
{ 348, "hu", "Hungary"}, { 348, "hu", "Hungary" },
{ 352, "is", "Iceland"}, { 352, "is", "Iceland" },
{ 356, "in", "India"}, { 356, "in", "India" },
{ 360, "id", "Indonesia"}, { 360, "id", "Indonesia" },
{ 364, "ir", "Iran"}, { 364, "ir", "Iran" },
{ 368, "iq", "Iraq"}, { 368, "iq", "Iraq" },
{ 372, "ie", "Ireland"}, { 372, "ie", "Ireland" },
{ 833, "im", "Isle of Man"}, { 833, "im", "Isle of Man" },
{ 376, "il", "Israel"}, { 376, "il", "Israel" },
{ 380, "it", "Italy"}, { 380, "it", "Italy" },
{ 388, "jm", "Jamaica"}, { 388, "jm", "Jamaica" },
{ 392, "jp", "Japan"}, { 392, "jp", "Japan" },
{ 832, "je", "Jersey"}, { 832, "je", "Jersey" },
{ 400, "jo", "Jordan"}, { 400, "jo", "Jordan" },
{ 398, "kz", "Kazakhstan"}, { 398, "kz", "Kazakhstan" },
{ 404, "ke", "Kenya"}, { 404, "ke", "Kenya" },
{ 296, "ki", "Kiribati"}, { 296, "ki", "Kiribati" },
{ 408, "kp", "Korea (north)"}, { 408, "kp", "Korea (north)" },
{ 410, "kr", "Korea (south)"}, { 410, "kr", "Korea (south)" },
{ 0, "xk", "Kosovo"}, /* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ { 0, "xk", "Kosovo" }, /* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */
{ 414, "kw", "Kuwait"}, { 414, "kw", "Kuwait" },
{ 417, "kg", "Kyrgyzstan"}, { 417, "kg", "Kyrgyzstan" },
{ 418, "la", "Laos"}, { 418, "la", "Laos" },
{ 428, "lv", "Latvia"}, { 428, "lv", "Latvia" },
{ 422, "lb", "Lebanon"}, { 422, "lb", "Lebanon" },
{ 426, "ls", "Lesotho"}, { 426, "ls", "Lesotho" },
{ 430, "lr", "Liberia"}, { 430, "lr", "Liberia" },
{ 434, "ly", "Libya"}, { 434, "ly", "Libya" },
{ 438, "li", "Liechtenstein"}, { 438, "li", "Liechtenstein" },
{ 440, "lt", "Lithuania"}, { 440, "lt", "Lithuania" },
{ 442, "lu", "Luxembourg"}, { 442, "lu", "Luxembourg" },
{ 446, "mo", "Macao"}, { 446, "mo", "Macao" },
{ 450, "mg", "Madagascar"}, { 450, "mg", "Madagascar" },
{ 454, "mw", "Malawi"}, { 454, "mw", "Malawi" },
{ 458, "my", "Malaysia"}, { 458, "my", "Malaysia" },
{ 462, "mv", "Maldives"}, { 462, "mv", "Maldives" },
{ 466, "ml", "Mali"}, { 466, "ml", "Mali" },
{ 470, "mt", "Malta"}, { 470, "mt", "Malta" },
{ 584, "mh", "Marshall Islands"}, { 584, "mh", "Marshall Islands" },
{ 474, "mq", "Martinique"}, { 474, "mq", "Martinique" },
{ 478, "mr", "Mauritania"}, { 478, "mr", "Mauritania" },
{ 480, "mu", "Mauritius"}, { 480, "mu", "Mauritius" },
{ 175, "yt", "Mayotte"}, { 175, "yt", "Mayotte" },
{ 484, "mx", "Mexico"}, { 484, "mx", "Mexico" },
{ 583, "fm", "Micronesia"}, { 583, "fm", "Micronesia" },
{ 498, "md", "Moldova"}, { 498, "md", "Moldova" },
{ 492, "mc", "Monaco"}, { 492, "mc", "Monaco" },
{ 496, "mn", "Mongolia"}, { 496, "mn", "Mongolia" },
{ 499, "me", "Montenegro"}, { 499, "me", "Montenegro" },
{ 500, "ms", "Montserrat"}, { 500, "ms", "Montserrat" },
{ 504, "ma", "Morocco"}, { 504, "ma", "Morocco" },
{ 508, "mz", "Mozambique"}, { 508, "mz", "Mozambique" },
{ 104, "mm", "Myanmar"}, { 104, "mm", "Myanmar" },
{ 516, "na", "Namibia"}, { 516, "na", "Namibia" },
{ 520, "nr", "Nauru"}, { 520, "nr", "Nauru" },
{ 524, "np", "Nepal"}, { 524, "np", "Nepal" },
{ 528, "nl", "Netherlands"}, { 528, "nl", "Netherlands" },
{ 540, "nc", "New Caledonia"}, { 540, "nc", "New Caledonia" },
{ 554, "nz", "New Zealand"}, { 554, "nz", "New Zealand" },
{ 558, "ni", "Nicaragua"}, { 558, "ni", "Nicaragua" },
{ 562, "ne", "Niger"}, { 562, "ne", "Niger" },
{ 566, "ng", "Nigeria"}, { 566, "ng", "Nigeria" },
{ 570, "nu", "Niue"}, { 570, "nu", "Niue" },
{ 574, "nf", "Norfolk Island"}, { 574, "nf", "Norfolk Island" },
{ 807, "mk", "North Macedonia"}, /* 'Macedonia' until February 2019 */ { 807, "mk", "North Macedonia" }, /* 'Macedonia' until February 2019 */
{ 580, "mp", "Northern Mariana Islands"}, { 580, "mp", "Northern Mariana Islands" },
{ 578, "no", "Norway"}, { 578, "no", "Norway" },
{ 512, "om", "Oman"}, { 512, "om", "Oman" },
{ 586, "pk", "Pakistan"}, { 586, "pk", "Pakistan" },
{ 585, "pw", "Palau"}, { 585, "pw", "Palau" },
{ 275, "ps", "Palestinian Territory"}, { 275, "ps", "Palestinian Territory" },
{ 591, "pa", "Panama"}, { 591, "pa", "Panama" },
{ 598, "pg", "Papua New Guinea"}, { 598, "pg", "Papua New Guinea" },
{ 600, "py", "Paraguay"}, { 600, "py", "Paraguay" },
{ 604, "pe", "Peru"}, { 604, "pe", "Peru" },
{ 608, "ph", "Philippines"}, { 608, "ph", "Philippines" },
{ 612, "pn", "Pitcairn"}, { 612, "pn", "Pitcairn" },
{ 616, "pl", "Poland"}, { 616, "pl", "Poland" },
{ 620, "pt", "Portugal"}, { 620, "pt", "Portugal" },
{ 630, "pr", "Puerto Rico"}, { 630, "pr", "Puerto Rico" },
{ 634, "qa", "Qatar"}, { 634, "qa", "Qatar" },
{ 638, "re", "Reunion"}, { 638, "re", "Reunion" },
{ 642, "ro", "Romania"}, { 642, "ro", "Romania" },
{ 643, "ru", "Russian Federation"}, { 643, "ru", "Russian Federation" },
{ 646, "rw", "Rwanda"}, { 646, "rw", "Rwanda" },
{ 0, "bl", { 0, "bl",
"Saint Barthélemy" }, /* https://en.wikipedia.org/wiki/ISO_3166-2:BL */ "Saint Barthélemy" }, /* https://en.wikipedia.org/wiki/ISO_3166-2:BL */
{ 659, "kn", "Saint Kitts & Nevis"}, { 659, "kn", "Saint Kitts & Nevis" },
{ 662, "lc", "Saint Lucia"}, { 662, "lc", "Saint Lucia" },
{ 663, "mf", "Saint Martin"}, { 663, "mf", "Saint Martin" },
{ 670, "vc", "Saint Vincent"}, { 670, "vc", "Saint Vincent" },
{ 882, "ws", "Samoa"}, { 882, "ws", "Samoa" },
{ 674, "sm", "San Marino"}, { 674, "sm", "San Marino" },
{ 678, "st", "Sao Tome & Principe"}, { 678, "st", "Sao Tome & Principe" },
{ 682, "sa", "Saudi Arabia"}, { 682, "sa", "Saudi Arabia" },
{ 686, "sn", "Senegal"}, { 686, "sn", "Senegal" },
{ 688, "rs", "Serbia"}, { 688, "rs", "Serbia" },
{ 690, "sc", "Seychelles"}, { 690, "sc", "Seychelles" },
{ 694, "sl", "Sierra Leone"}, { 694, "sl", "Sierra Leone" },
{ 702, "sg", "Singapore"}, { 702, "sg", "Singapore" },
{ 534, "sx", "Sint Maarten"}, { 534, "sx", "Sint Maarten" },
{ 703, "sk", "Slovakia"}, { 703, "sk", "Slovakia" },
{ 705, "si", "Slovenia"}, { 705, "si", "Slovenia" },
{ 90, "sb", "Solomon Islands"}, { 90, "sb", "Solomon Islands" },
{ 706, "so", "Somalia"}, { 706, "so", "Somalia" },
{ 710, "za", "South Africa"}, { 710, "za", "South Africa" },
{ 239, "gs", "South Georgia & South Sandwich Is."}, { 239, "gs", "South Georgia & South Sandwich Is." },
{ 728, "ss", "South Sudan"}, { 728, "ss", "South Sudan" },
{ 724, "es", "Spain"}, { 724, "es", "Spain" },
{ 144, "lk", "Sri Lanka"}, { 144, "lk", "Sri Lanka" },
{ 654, "sh", "St. Helena"}, { 654, "sh", "St. Helena" },
{ 666, "pm", "St. Pierre & Miquelon"}, { 666, "pm", "St. Pierre & Miquelon" },
{ 736, "sd", "Sudan"}, { 736, "sd", "Sudan" },
{ 740, "sr", "Suriname"}, { 740, "sr", "Suriname" },
{ 744, "sj", "Svalbard & Jan Mayen Islands"}, { 744, "sj", "Svalbard & Jan Mayen Islands" },
{ 752, "se", "Sweden"}, { 752, "se", "Sweden" },
{ 756, "ch", "Switzerland"}, { 756, "ch", "Switzerland" },
{ 760, "sy", "Syrian Arab Republic"}, { 760, "sy", "Syrian Arab Republic" },
{ 158, "tw", "Taiwan"}, { 158, "tw", "Taiwan" },
{ 762, "tj", "Tajikistan"}, { 762, "tj", "Tajikistan" },
{ 834, "tz", "Tanzania"}, { 834, "tz", "Tanzania" },
{ 764, "th", "Thailand"}, { 764, "th", "Thailand" },
{ 626, "tl", "Timor-Leste"}, { 626, "tl", "Timor-Leste" },
{ 768, "tg", "Togo"}, { 768, "tg", "Togo" },
{ 772, "tk", "Tokelau"}, { 772, "tk", "Tokelau" },
{ 776, "to", "Tonga"}, { 776, "to", "Tonga" },
{ 780, "tt", "Trinidad & Tobago"}, { 780, "tt", "Trinidad & Tobago" },
{ 788, "tn", "Tunisia"}, { 788, "tn", "Tunisia" },
{ 792, "tr", "Turkey"}, { 792, "tr", "Turkey" },
{ 795, "tm", "Turkmenistan"}, { 795, "tm", "Turkmenistan" },
{ 796, "tc", "Turks & Caicos Islands"}, { 796, "tc", "Turks & Caicos Islands" },
{ 798, "tv", "Tuvalu"}, { 798, "tv", "Tuvalu" },
{ 800, "ug", "Uganda"}, { 800, "ug", "Uganda" },
{ 804, "ua", "Ukraine"}, { 804, "ua", "Ukraine" },
{ 784, "ae", "United Arab Emirates"}, { 784, "ae", "United Arab Emirates" },
{ 826, "gb", "United Kingdom"}, { 826, "gb", "United Kingdom" },
{ 840, "us", "United States"}, { 840, "us", "United States" },
{ 581, "um", "United States Minor Outlying Islands"}, { 581, "um", "United States Minor Outlying Islands"},
{ 858, "uy", "Uruguay"}, { 858, "uy", "Uruguay" },
{ 860, "uz", "Uzbekistan"}, { 860, "uz", "Uzbekistan" },
{ 548, "vu", "Vanuatu"}, { 548, "vu", "Vanuatu" },
{ 862, "ve", "Venezuela"}, { 862, "ve", "Venezuela" },
{ 704, "vn", "Vietnam"}, { 704, "vn", "Vietnam" },
{ 92, "vg", "Virgin Islands (British)"}, { 92, "vg", "Virgin Islands (British)" },
{ 850, "vi", "Virgin Islands (US)"}, { 850, "vi", "Virgin Islands (US)" },
{ 876, "wf", "Wallis & Futuna Islands"}, { 876, "wf", "Wallis & Futuna Islands" },
{ 732, "eh", "Western Sahara"}, { 732, "eh", "Western Sahara" },
{ 887, "ye", "Yemen"}, { 887, "ye", "Yemen" },
{ 894, "zm", "Zambia"}, { 894, "zm", "Zambia" },
{ 716, "zw", "Zimbabwe"} { 716, "zw", "Zimbabwe" }
}; };
/* /*

@ -74,66 +74,66 @@ struct nv {
}; };
static const struct nv flags[] = { static const struct nv flags[] = {
{ "usevc", ARES_FLAG_USEVC}, {"usevc", ARES_FLAG_USEVC },
{ "primary", ARES_FLAG_PRIMARY}, { "primary", ARES_FLAG_PRIMARY },
{ "igntc", ARES_FLAG_IGNTC}, { "igntc", ARES_FLAG_IGNTC },
{"norecurse", ARES_FLAG_NORECURSE}, { "norecurse", ARES_FLAG_NORECURSE},
{ "stayopen", ARES_FLAG_STAYOPEN}, { "stayopen", ARES_FLAG_STAYOPEN },
{"noaliases", ARES_FLAG_NOALIASES} { "noaliases", ARES_FLAG_NOALIASES}
}; };
static const int nflags = sizeof(flags) / sizeof(flags[0]); static const int nflags = sizeof(flags) / sizeof(flags[0]);
static const struct nv classes[] = { static const struct nv classes[] = {
{ "IN", C_IN}, {"IN", C_IN },
{"CHAOS", C_CHAOS}, { "CHAOS", C_CHAOS},
{ "HS", C_HS}, { "HS", C_HS },
{ "ANY", C_ANY} { "ANY", C_ANY }
}; };
static const int nclasses = sizeof(classes) / sizeof(classes[0]); static const int nclasses = sizeof(classes) / sizeof(classes[0]);
static const struct nv types[] = { static const struct nv types[] = {
{ "A", T_A}, {"A", T_A },
{ "NS", T_NS}, { "NS", T_NS },
{ "MD", T_MD}, { "MD", T_MD },
{ "MF", T_MF}, { "MF", T_MF },
{ "CNAME", T_CNAME}, { "CNAME", T_CNAME },
{ "SOA", T_SOA}, { "SOA", T_SOA },
{ "MB", T_MB}, { "MB", T_MB },
{ "MG", T_MG}, { "MG", T_MG },
{ "MR", T_MR}, { "MR", T_MR },
{ "NULL", T_NULL}, { "NULL", T_NULL },
{ "WKS", T_WKS}, { "WKS", T_WKS },
{ "PTR", T_PTR}, { "PTR", T_PTR },
{ "HINFO", T_HINFO}, { "HINFO", T_HINFO },
{ "MINFO", T_MINFO}, { "MINFO", T_MINFO },
{ "MX", T_MX}, { "MX", T_MX },
{ "TXT", T_TXT}, { "TXT", T_TXT },
{ "RP", T_RP}, { "RP", T_RP },
{ "AFSDB", T_AFSDB}, { "AFSDB", T_AFSDB },
{ "X25", T_X25}, { "X25", T_X25 },
{ "ISDN", T_ISDN}, { "ISDN", T_ISDN },
{ "RT", T_RT}, { "RT", T_RT },
{ "NSAP", T_NSAP}, { "NSAP", T_NSAP },
{"NSAP_PTR", T_NSAP_PTR}, { "NSAP_PTR", T_NSAP_PTR},
{ "SIG", T_SIG}, { "SIG", T_SIG },
{ "KEY", T_KEY}, { "KEY", T_KEY },
{ "PX", T_PX}, { "PX", T_PX },
{ "GPOS", T_GPOS}, { "GPOS", T_GPOS },
{ "AAAA", T_AAAA}, { "AAAA", T_AAAA },
{ "LOC", T_LOC}, { "LOC", T_LOC },
{ "SRV", T_SRV}, { "SRV", T_SRV },
{ "AXFR", T_AXFR}, { "AXFR", T_AXFR },
{ "MAILB", T_MAILB}, { "MAILB", T_MAILB },
{ "MAILA", T_MAILA}, { "MAILA", T_MAILA },
{ "NAPTR", T_NAPTR}, { "NAPTR", T_NAPTR },
{ "DS", T_DS}, { "DS", T_DS },
{ "SSHFP", T_SSHFP}, { "SSHFP", T_SSHFP },
{ "RRSIG", T_RRSIG}, { "RRSIG", T_RRSIG },
{ "NSEC", T_NSEC}, { "NSEC", T_NSEC },
{ "DNSKEY", T_DNSKEY}, { "DNSKEY", T_DNSKEY },
{ "CAA", T_CAA}, { "CAA", T_CAA },
{ "URI", T_URI}, { "URI", T_URI },
{ "ANY", T_ANY} { "ANY", T_ANY }
}; };
static const int ntypes = sizeof(types) / sizeof(types[0]); static const int ntypes = sizeof(types) / sizeof(types[0]);

Loading…
Cancel
Save