@@ -25,18 +25,18 @@ /*! @file */ @class OFData; /*! - * @brief The class of a DNS resource record. + * @brief The DNS class. */ typedef enum { /*! IN */ - OF_DNS_RESOURCE_RECORD_CLASS_IN = 1, + OF_DNS_CLASS_IN = 1, /*! Any class. Only for queries. */ - OF_DNS_RESOURCE_RECORD_CLASS_ANY = 255, -} of_dns_resource_record_class_t; + OF_DNS_CLASS_ANY = 255, +} of_dns_class_t; /*! * @brief The type of a DNS resource record. */ typedef enum { @@ -72,11 +72,11 @@ * @brief A class representing a DNS resource record. */ @interface OFDNSResourceRecord: OFObject { OFString *_name; - of_dns_resource_record_class_t _recordClass; + of_dns_class_t _DNSClass; of_dns_resource_record_type_t _recordType; uint32_t _TTL; OF_RESERVE_IVARS(4) } @@ -84,13 +84,13 @@ * @brief The domain name to which the resource record belongs. */ @property (readonly, nonatomic) OFString *name; /*! - * @brief The resource record class code. + * @brief The DNS class. */ -@property (readonly, nonatomic) of_dns_resource_record_class_t recordClass; +@property (readonly, nonatomic) of_dns_class_t DNSClass; /*! * @brief The resource record type code. */ @property (readonly, nonatomic) of_dns_resource_record_type_t recordType; @@ -104,17 +104,17 @@ /*! * @brief Initializes an already allocated OFDNSResourceRecord with the * specified name, class, type, data and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param recordType The type code for the resource record * @param TTL The time to live for the resource record * @return An initialized OFDNSResourceRecord */ - (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_DESIGNATED_INITIALIZER; @end /*! @@ -132,11 +132,11 @@ * @brief The IPv4 address of the resource record. */ @property (readonly, nonatomic) const of_socket_address_t *address; - (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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFADNSResourceRecord with the @@ -168,11 +168,11 @@ * @brief The IPv6 address of the resource record. */ @property (readonly, nonatomic) const of_socket_address_t *address; - (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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFAAAADNSResourceRecord with the @@ -204,26 +204,26 @@ * @brief The alias of the resource record. */ @property (readonly, nonatomic) OFString *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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFCNAMEDNSResourceRecord with the * specified name, class, alias and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param alias The alias for the resource record * @param TTL The time to live for the resource record * @return An initialized OFCNAMEDNSResourceRecord */ - (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 OF_DESIGNATED_INITIALIZER; @end /*! @@ -247,27 +247,27 @@ * @brief The OS of the host info of the resource record. */ @property (readonly, nonatomic) OFString *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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFHINFODNSResourceRecord with the * specified name, class, domain name and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param CPU The CPU of the host info for the resource record * @param OS The OS of the host info for the resource record * @param TTL The time to live for the resource record * @return An initialized OFHINFODNSResourceRecord */ - (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 OF_DESIGNATED_INITIALIZER; @end @@ -293,27 +293,27 @@ * @brief The mail exchange of the resource record. */ @property (readonly, nonatomic) OFString *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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFMXDNSResourceRecord with the * specified name, class, preference, mail exchange and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param preference The preference for the resource record * @param mailExchange The mail exchange for the resource record * @param TTL The time to live for the resource record * @return An initialized OFMXDNSResourceRecord */ - (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 OF_DESIGNATED_INITIALIZER; @end @@ -333,26 +333,26 @@ * @brief The authoritative host of the resource record. */ @property (readonly, nonatomic) OFString *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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFNSDNSResourceRecord with the * specified name, class, authoritative host and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param authoritativeHost The authoritative host for the resource record * @param TTL The time to live for the resource record * @return An initialized OFNSDNSResourceRecord */ - (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 OF_DESIGNATED_INITIALIZER; @end /*! @@ -371,26 +371,26 @@ * @brief The domain name of the resource record. */ @property (readonly, nonatomic) OFString *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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFPTRDNSResourceRecord with the * specified name, class, domain name and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param domainName The domain name for the resource record * @param TTL The time to live for the resource record * @return An initialized OFPTRDNSResourceRecord */ - (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 OF_DESIGNATED_INITIALIZER; @end /*! @@ -415,28 +415,28 @@ * person of the resource record. */ @property (readonly, nonatomic) OFString *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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFRPDNSResourceRecord with the * specified name, class, alias and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param mailbox The mailbox of the responsible person of the resource record * @param TXTDomainName A domain name that contains a TXT resource record for * the responsible person of the resource record * @param TTL The time to live for the resource record * @return An initialized OFRPDNSResourceRecord */ - (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 OF_DESIGNATED_INITIALIZER; @end @@ -488,20 +488,20 @@ * @brief The minimum TTL of the zone. */ @property (readonly, nonatomic) uint32_t 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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFSOADNSResourceRecord with the * specified name, class, text data and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param primaryNameServer The the primary name server for the zone * @param responsiblePerson The mailbox of the person responsible for the zone * @param serialNumber The serial number of the original copy of the zone * @param refreshInterval The refresh interval of the zone * @param retryInterval The retry interval of the zone @@ -509,11 +509,11 @@ * @param minTTL The minimum TTL of the zone * @param TTL The time to live for the resource record * @return An initialized OFSOADNSResourceRecord */ - (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 @@ -555,11 +555,11 @@ * @brief The port on the target of the resource record. */ @property (readonly, nonatomic) uint16_t 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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFSRVDNSResourceRecord with the @@ -597,41 +597,39 @@ * @brief The text of the resource record. */ @property (readonly, nonatomic) OFData *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_UNAVAILABLE; /*! * @brief Initializes an already allocated OFTXTDNSResourceRecord with the * specified name, class, text data and time to live. * * @param name The name for the resource record - * @param recordClass The class code for the resource record + * @param DNSClass The class code for the resource record * @param textData The data for the resource record * @param TTL The time to live for the resource record * @return An initialized OFTXTDNSResourceRecord */ - (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 OF_DESIGNATED_INITIALIZER; @end #ifdef __cplusplus extern "C" { #endif -extern OFString *_Nonnull of_dns_resource_record_class_to_string( - of_dns_resource_record_class_t recordClass); +extern OFString *_Nonnull of_dns_class_to_string(of_dns_class_t DNSClass); extern OFString *_Nonnull of_dns_resource_record_type_to_string( of_dns_resource_record_type_t recordType); -extern of_dns_resource_record_class_t of_dns_resource_record_class_parse( - OFString *_Nonnull string); +extern of_dns_class_t of_dns_class_parse(OFString *_Nonnull string); extern of_dns_resource_record_type_t of_dns_resource_record_type_parse( OFString *_Nonnull string); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END