@@ -22,20 +22,19 @@ #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" OFString * -of_dns_resource_record_class_to_string( - of_dns_resource_record_class_t recordClass) +of_dns_class_to_string(of_dns_class_t DNSClass) { - switch (recordClass) { - case OF_DNS_RESOURCE_RECORD_CLASS_IN: + switch (DNSClass) { + case OF_DNS_CLASS_IN: return @"IN"; - case OF_DNS_RESOURCE_RECORD_CLASS_ANY: + case OF_DNS_CLASS_ANY: return @"any"; default: - return [OFString stringWithFormat: @"%u", recordClass]; + return [OFString stringWithFormat: @"%u", DNSClass]; } } OFString * of_dns_resource_record_type_to_string(of_dns_resource_record_type_t recordType) @@ -68,26 +67,25 @@ default: return [OFString stringWithFormat: @"%u", recordType]; } } -of_dns_resource_record_class_t of_dns_resource_record_class_parse( - OFString *string) +of_dns_class_t of_dns_class_parse(OFString *string) { void *pool = objc_autoreleasePoolPush(); - of_dns_resource_record_class_t recordClass; + of_dns_class_t DNSClass; string = string.uppercaseString; if ([string isEqual: @"IN"]) - recordClass = OF_DNS_RESOURCE_RECORD_CLASS_IN; + DNSClass = OF_DNS_CLASS_IN; else @throw [OFInvalidArgumentException exception]; objc_autoreleasePoolPop(pool); - return recordClass; + return DNSClass; } of_dns_resource_record_type_t of_dns_resource_record_type_parse( OFString *string) { @@ -125,23 +123,23 @@ return recordType; } @implementation OFDNSResourceRecord -@synthesize name = _name, recordClass = _recordClass, recordType = _recordType; +@synthesize name = _name, DNSClass = _DNSClass, recordType = _recordType; @synthesize TTL = _TTL; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { self = [super init]; @try { _name = [name copy]; - _recordClass = recordClass; + _DNSClass = DNSClass; _recordType = recordType; _TTL = TTL; } @catch (id e) { [self release]; @throw e; @@ -169,19 +167,18 @@ @"\tName = %@\n" @"\tClass = %@\n" @"\tType = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), + self.className, _name, of_dns_class_to_string(_DNSClass), of_dns_resource_record_type_to_string(_recordType), _TTL]; } @end @implementation OFADNSResourceRecord - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } @@ -189,11 +186,11 @@ - (instancetype)initWithName: (OFString *)name address: (const of_socket_address_t *)address TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: OF_DNS_RESOURCE_RECORD_CLASS_IN + DNSClass: OF_DNS_CLASS_IN recordType: OF_DNS_RESOURCE_RECORD_TYPE_A TTL: TTL]; _address = *address; @@ -215,11 +212,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -234,12 +231,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, of_socket_address_hash(&_address)); OF_HASH_FINALIZE(hash); @@ -260,11 +257,11 @@ } @end @implementation OFAAAADNSResourceRecord - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } @@ -272,11 +269,11 @@ - (instancetype)initWithName: (OFString *)name address: (const of_socket_address_t *)address TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: OF_DNS_RESOURCE_RECORD_CLASS_IN + DNSClass: OF_DNS_CLASS_IN recordType: OF_DNS_RESOURCE_RECORD_TYPE_AAAA TTL: TTL]; _address = *address; @@ -298,11 +295,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -317,12 +314,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, of_socket_address_hash(&_address)); OF_HASH_FINALIZE(hash); @@ -345,24 +342,24 @@ @implementation OFCNAMEDNSResourceRecord @synthesize alias = _alias; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass alias: (OFString *)alias TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_CNAME TTL: TTL]; @try { _alias = [alias copy]; @@ -391,11 +388,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -411,12 +408,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, _alias.hash); OF_HASH_FINALIZE(hash); @@ -431,34 +428,34 @@ @"\tName = %@\n" @"\tClass = %@\n" @"\tAlias = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), _alias, _TTL]; + self.className, _name, of_dns_class_to_string(_DNSClass), _alias, + _TTL]; } @end @implementation OFHINFODNSResourceRecord @synthesize CPU = _CPU, OS = _OS; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass CPU: (OFString *)CPU OS: (OFString *)OS TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_HINFO TTL: TTL]; @try { _CPU = [CPU copy]; @@ -489,11 +486,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -511,12 +508,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, _CPU.hash); OF_HASH_ADD_HASH(hash, _OS.hash); @@ -533,35 +530,34 @@ @"\tClass = %@\n" @"\tCPU = %@\n" @"\tOS = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), _CPU, _OS, + self.className, _name, of_dns_class_to_string(_DNSClass), _CPU, _OS, _TTL]; } @end @implementation OFMXDNSResourceRecord @synthesize preference = _preference, mailExchange = _mailExchange; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass preference: (uint16_t)preference mailExchange: (OFString *)mailExchange TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_MX TTL: TTL]; @try { _preference = preference; @@ -591,11 +587,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -614,12 +610,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD(hash, _preference >> 8); OF_HASH_ADD(hash, _preference); OF_HASH_ADD_HASH(hash, _mailExchange.hash); @@ -637,34 +633,33 @@ @"\tClass = %@\n" @"\tPreference = %" PRIu16 "\n" @"\tMail Exchange = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), _preference, - _mailExchange, _TTL]; + self.className, _name, of_dns_class_to_string(_DNSClass), + _preference, _mailExchange, _TTL]; } @end @implementation OFNSDNSResourceRecord @synthesize authoritativeHost = _authoritativeHost; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass authoritativeHost: (OFString *)authoritativeHost TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_NS TTL: TTL]; @try { _authoritativeHost = [authoritativeHost copy]; @@ -693,11 +688,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -713,12 +708,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, _authoritativeHost.hash); OF_HASH_FINALIZE(hash); @@ -733,34 +728,33 @@ @"\tName = %@\n" @"\tClass = %@\n" @"\tAuthoritative Host = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), + self.className, _name, of_dns_class_to_string(_DNSClass), _authoritativeHost, _TTL]; } @end @implementation OFPTRDNSResourceRecord @synthesize domainName = _domainName; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass domainName: (OFString *)domainName TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_PTR TTL: TTL]; @try { _domainName = [domainName copy]; @@ -789,11 +783,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -809,12 +803,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, _domainName.hash); OF_HASH_FINALIZE(hash); @@ -829,35 +823,34 @@ @"\tName = %@\n" @"\tClass = %@\n" @"\tDomain Name = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), _domainName, - _TTL]; + self.className, _name, of_dns_class_to_string(_DNSClass), + _domainName, _TTL]; } @end @implementation OFRPDNSResourceRecord @synthesize mailbox = _mailbox, TXTDomainName = _TXTDomainName; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass mailbox: (OFString *)mailbox TXTDomainName: (OFString *)TXTDomainName TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_RP TTL: TTL]; @try { _mailbox = [mailbox copy]; @@ -888,11 +881,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -912,12 +905,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, _mailbox.hash); OF_HASH_ADD_HASH(hash, _TXTDomainName.hash); @@ -934,12 +927,11 @@ @"\tClass = %@\n" @"\tMailbox = %@\n" @"\tTXT Domain Name = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), _mailbox, + self.className, _name, of_dns_class_to_string(_DNSClass), _mailbox, _TXTDomainName, _TTL]; } @end @implementation OFSOADNSResourceRecord @@ -948,19 +940,19 @@ @synthesize serialNumber = _serialNumber, refreshInterval = _refreshInterval; @synthesize retryInterval = _retryInterval; @synthesize expirationInterval = _expirationInterval, minTTL = _minTTL; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass primaryNameServer: (OFString *)primaryNameServer responsiblePerson: (OFString *)responsiblePerson serialNumber: (uint32_t)serialNumber refreshInterval: (uint32_t)refreshInterval retryInterval: (uint32_t)retryInterval @@ -967,11 +959,11 @@ expirationInterval: (uint32_t)expirationInterval minTTL: (uint32_t)minTTL TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_SOA TTL: TTL]; @try { _primaryNameServer = [primaryNameServer copy]; @@ -1007,11 +999,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -1046,12 +1038,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, _primaryNameServer.hash); OF_HASH_ADD_HASH(hash, _responsiblePerson.hash); OF_HASH_ADD(hash, _serialNumber >> 24); @@ -1093,12 +1085,11 @@ @"\tRetry Interval = %" PRIu32 "\n" @"\tExpiration Interval = %" PRIu32 "\n" @"\tMinimum TTL = %" PRIu32 "\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), + self.className, _name, of_dns_class_to_string(_DNSClass), _primaryNameServer, _responsiblePerson, _serialNumber, _refreshInterval, _retryInterval, _expirationInterval, _minTTL, _TTL]; } @end @@ -1106,11 +1097,11 @@ @implementation OFSRVDNSResourceRecord @synthesize priority = _priority, weight = _weight, target = _target; @synthesize port = _port; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } @@ -1121,11 +1112,11 @@ target: (OFString *)target port: (uint16_t)port TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: OF_DNS_RESOURCE_RECORD_CLASS_IN + DNSClass: OF_DNS_CLASS_IN recordType: OF_DNS_RESOURCE_RECORD_TYPE_SRV TTL: TTL]; @try { _priority = priority; @@ -1157,11 +1148,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -1186,12 +1177,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD(hash, _priority >> 8); OF_HASH_ADD(hash, _priority); OF_HASH_ADD(hash, _weight >> 8); @@ -1222,24 +1213,24 @@ @implementation OFTXTDNSResourceRecord @synthesize textData = _textData; - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL { OF_INVALID_INIT_METHOD } - (instancetype)initWithName: (OFString *)name - recordClass: (of_dns_resource_record_class_t)recordClass + DNSClass: (of_dns_class_t)DNSClass textData: (OFData *)textData TTL: (uint32_t)TTL { self = [super initWithName: name - recordClass: recordClass + DNSClass: DNSClass recordType: OF_DNS_RESOURCE_RECORD_TYPE_TXT TTL: TTL]; @try { _textData = [textData copy]; @@ -1268,11 +1259,11 @@ otherRecord = otherObject; if (otherRecord->_name != _name && ![otherRecord->_name isEqual: _name]) return false; - if (otherRecord->_recordClass != _recordClass) + if (otherRecord->_DNSClass != _DNSClass) return false; if (otherRecord->_recordType != _recordType) return false; @@ -1288,12 +1279,12 @@ uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD_HASH(hash, _name.hash); - OF_HASH_ADD(hash, _recordClass >> 8); - OF_HASH_ADD(hash, _recordClass); + OF_HASH_ADD(hash, _DNSClass >> 8); + OF_HASH_ADD(hash, _DNSClass); OF_HASH_ADD(hash, _recordType >> 8); OF_HASH_ADD(hash, _recordType); OF_HASH_ADD_HASH(hash, _textData.hash); OF_HASH_FINALIZE(hash); @@ -1308,10 +1299,9 @@ @"\tName = %@\n" @"\tClass = %@\n" @"\tText Data = %@\n" @"\tTTL = %" PRIu32 "\n" @">", - self.className, _name, - of_dns_resource_record_class_to_string(_recordClass), _textData, + self.className, _name, of_dns_class_to_string(_DNSClass), _textData, _TTL]; } @end