Overview
Comment: | Create an OFDNSResourceRecord subclass per type |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
bd5e1e20145c784d8a20c31890ef25e6 |
User & Date: | js on 2018-07-30 22:24:09 |
Other Links: | manifest | tags |
Context
2018-07-31
| ||
00:41 | OFDNSResolver: Add support for parsing MX records check-in: 650fdd14e3 user: js tags: trunk | |
2018-07-30
| ||
22:24 | Create an OFDNSResourceRecord subclass per type check-in: bd5e1e2014 user: js tags: trunk | |
00:07 | OFDNSResolver: Add support for parsing AAAAs check-in: 589a3e0f13 user: js tags: trunk | |
Changes
Modified src/OFDNSResolver.m from [9fbb4cad64] to [16d3a398be].
︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | + | * TODO: * * - Timeouts * - Resolve with each search domain * - Iterate through name servers * - IPv6 for talking to the name servers * - Fallback to TCP * - More record types */ @interface OFDNSResolver_context: OFObject { OFString *_host; OFArray OF_GENERIC(OFString *) *_nameServers, *_searchDomains; size_t _nameServersIndex, _searchDomainsIndex; |
︙ | |||
182 183 184 185 186 187 188 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + | *idx = i; return [components componentsJoinedByString: @"."]; } static OFString * |
︙ | |||
240 241 242 243 244 245 246 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | - + - - - + + + + + + + - + + - + + - - + + + + + + + | } [data makeImmutable]; return data; } |
︙ | |||
745 746 747 748 749 750 751 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 | - + - + - - - - - - - - | for (uint_fast16_t j = 0; j < numAnswers; j++) { OFString *name = parseName(buffer, length, &i, ALLOWED_POINTER_LEVELS); of_dns_resource_record_class_t recordClass; of_dns_resource_record_type_t recordType; uint32_t TTL; uint16_t dataLength; |
︙ |
Modified src/OFDNSResourceRecord.h from [ad1d163440] to [78e8b495b5].
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | /*! All types. Only for queries. */ OF_DNS_RESOURCE_RECORD_TYPE_ALL = 255, } of_dns_resource_record_type_t; /*! * @class OFDNSResourceRecord OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h * |
︙ | |||
85 86 87 88 89 90 91 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | /*! * @brief The resource record type code. */ @property (readonly, nonatomic) of_dns_resource_record_type_t recordType; /*! * The class and type-dependent data of the resource. |
Modified src/OFDNSResourceRecord.m from [9ea581e271] to [745465fb73].
︙ | |||
156 157 158 159 160 161 162 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | + + + + + + + + + + + + + + + + + + + + + | @"\tData = %@\n" @"\tTTL = %" PRIu32 "\n" @">", _name, of_dns_resource_record_class_to_string(_recordClass), of_dns_resource_record_type_to_string(_recordType), _data, _TTL]; } @end @implementation OFADNSResourceRecord - (OFString *)data { return _data; } @end @implementation OFAAAADNSResourceRecord - (OFString *)data { return _data; } @end @implementation OFCNAMEDNSResourceRecord - (OFString *)data { return _data; } @end |