Overview
Comment: | Add support for URI DNS resource records |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | uri-resource-record |
Files: | files | file ages | folders |
SHA3-256: |
16d99685ae6a8ace97a2151028383a2e |
User & Date: | js on 2024-01-14 22:47:44 |
Other Links: | branch diff | manifest | tags |
References
2024-01-14
| ||
22:49 | • Ticket [8c3fa1596f] OFDNSResolver Support for URI records status still Open with 4 other changes artifact: 3ff15158c9 user: js | |
Context
2024-01-15
| ||
02:24 | Fix parsing of URI resource records Closed-Leaf check-in: 2b7bc4c106 user: js tags: uri-resource-record | |
2024-01-14
| ||
22:47 | Add support for URI DNS resource records check-in: 16d99685ae user: js tags: uri-resource-record | |
11:47 | Move out subclasses of OFDNSResourceRecord check-in: 487d5cbd83 user: js tags: trunk | |
Changes
Modified src/Makefile from [7b5ccc8dac] to [ff67b028ce].
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + + | OFSOADNSResourceRecord.m \ OFSRVDNSResourceRecord.m \ OFSequencedPacketSocket.m \ OFSocket.m \ OFStreamSocket.m \ OFSystemInfo+NetworkInterfaces.m \ OFTCPSocket.m \ |
︙ |
Modified src/OFDNSResolver.m from [b89d5a3a8f] to [7df5d5c8bd].
︙ | |||
400 401 402 403 404 405 406 407 408 409 410 411 412 413 | 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | + + + + + + + + + + + + + + + + + + + + | return [[[OFSRVDNSResourceRecord alloc] initWithName: name priority: priority weight: weight target: target port: port TTL: TTL] autorelease]; } else if (recordType == OFDNSRecordTypeURI) { uint16_t priority, weight; OFString *target; if (dataLength < 4) @throw [OFInvalidServerResponseException exception]; priority = (buffer[i] << 8) | buffer[i + 1]; weight = (buffer[i + 2] << 8) | buffer[i + 3]; target = [OFString stringWithUTF8String: (char *)buffer + 4 length: dataLength - 4]; return [[[OFURIDNSResourceRecord alloc] initWithName: name DNSClass: DNSClass priority: priority weight: weight target: target TTL: TTL] autorelease]; } else return [[[OFDNSResourceRecord alloc] initWithName: name DNSClass: DNSClass recordType: recordType TTL: TTL] autorelease]; |
︙ |
Modified src/OFDNSResourceRecord.h from [f961d0d6c9] to [22c9db5136].
︙ | |||
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 73 | + + | OFDNSRecordTypeRP = 17, /** AAAA */ OFDNSRecordTypeAAAA = 28, /** SRV */ OFDNSRecordTypeSRV = 33, /** All types. Only for queries. */ OFDNSRecordTypeAll = 255, /** URI */ OFDNSRecordTypeURI = 256, } OFDNSRecordType; /** * @class OFDNSResourceRecord OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h * * @brief A class representing a DNS resource record. */ |
︙ | |||
164 165 166 167 168 169 170 | 166 167 168 169 170 171 172 173 | + | #import "OFMXDNSResourceRecord.h" #import "OFNSDNSResourceRecord.h" #import "OFPTRDNSResourceRecord.h" #import "OFRPDNSResourceRecord.h" #import "OFSOADNSResourceRecord.h" #import "OFSRVDNSResourceRecord.h" #import "OFTXTDNSResourceRecord.h" #import "OFURIDNSResourceRecord.h" |
Modified src/OFDNSResourceRecord.m from [e70c025f87] to [2231be948e].
︙ | |||
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 73 | + + | return @"RP"; case OFDNSRecordTypeAAAA: return @"AAAA"; case OFDNSRecordTypeSRV: return @"SRV"; case OFDNSRecordTypeAll: return @"all"; case OFDNSRecordTypeURI: return @"URI"; default: return [OFString stringWithFormat: @"%u", recordType]; } } OFDNSClass OFDNSClassParseName(OFString *string) |
︙ | |||
115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | + + | recordType = OFDNSRecordTypeRP; else if ([string isEqual: @"AAAA"]) recordType = OFDNSRecordTypeAAAA; else if ([string isEqual: @"SRV"]) recordType = OFDNSRecordTypeSRV; else if ([string isEqual: @"ALL"]) recordType = OFDNSRecordTypeAll; else if ([string isEqual: @"URI"]) recordType = OFDNSRecordTypeURI; else { recordType = (OFDNSRecordType)[string unsignedLongLongValueWithBase: 0]; } objc_autoreleasePoolPop(pool); |
︙ |
Modified src/OFSRVDNSResourceRecord.h from [872e9a519e] to [d5575ff367].
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + | - (instancetype)initWithName: (OFString *)name DNSClass: (OFDNSClass)DNSClass recordType: (OFDNSRecordType)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /** * @brief Initializes an already allocated OFSRVDNSResourceRecord with the |
︙ |
Added src/OFURIDNSResourceRecord.h version [5d24916d2f].
|
Added src/OFURIDNSResourceRecord.m version [8d859480dd].