Home | History | Annotate | Line # | Download | only in objs
      1 /*
      2  * Copyright (c) 2022 Apple Inc. All rights reserved.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     https://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef DNS_OBJ_RR_SRV_H
     18 #define DNS_OBJ_RR_SRV_H
     19 
     20 //======================================================================================================================
     21 // MARK: - Headers
     22 
     23 #include "dns_obj_domain_name.h"
     24 #include "dns_obj.h"
     25 #include "dns_common.h"
     26 #include <stdint.h>
     27 #include <stdbool.h>
     28 
     29 #include "nullability.h"
     30 
     31 //======================================================================================================================
     32 // MARK: - Object Reference Definition
     33 
     34 DNS_OBJECT_SUBKIND_TYPEDEF_OPAQUE_POINTER(rr, srv);
     35 
     36 //======================================================================================================================
     37 // MARK: - Object Methods
     38 
     39 dns_obj_rr_srv_t NULLABLE
     40 dns_obj_rr_srv_create(const uint8_t * NONNULL name, const uint8_t * NONNULL rdata, uint16_t rdata_len, bool allocate,
     41 	dns_obj_error_t * NULLABLE out_error);
     42 
     43 uint16_t
     44 dns_obj_rr_srv_get_priority(dns_obj_rr_srv_t NONNULL srv);
     45 
     46 uint16_t
     47 dns_obj_rr_srv_get_weight(dns_obj_rr_srv_t NONNULL srv);
     48 
     49 uint16_t
     50 dns_obj_rr_srv_get_port(dns_obj_rr_srv_t NONNULL srv);
     51 
     52 dns_obj_domain_name_t NONNULL
     53 dns_obj_rr_srv_get_target(dns_obj_rr_srv_t NONNULL srv);
     54 
     55 #endif // DNS_OBJ_RR_SRV_H
     56