3 * Copyright (c) 2018-2019 Apple Computer, Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * Service Registration Protocol common definitions
23 typedef struct srp_proxy_listener_state srp_proxy_listener_state_t
;
25 void srp_proxy_listener_cancel(srp_proxy_listener_state_t
*NONNULL listener_state
);
26 srp_proxy_listener_state_t
*NULLABLE
srp_proxy_listen(const char *NONNULL update_zone
, uint16_t *NULLABLE avoid_ports
,
27 int num_avoid_ports
, ready_callback_t NULLABLE ready
);
28 bool srp_evaluate(comm_t
*NONNULL comm
, dns_message_t
*NONNULL message
, message_t
*NONNULL raw_message
);
29 bool srp_update_start(comm_t
*NONNULL connection
, dns_message_t
*NONNULL parsed_message
, message_t
*NONNULL raw_message
,
30 dns_host_description_t
*NONNULL new_host
, service_instance_t
*NONNULL instances
,
31 service_t
*NONNULL services
, dns_name_t
*NONNULL update_zone
,
32 uint32_t lease_time
, uint32_t key_lease_time
);
33 void srp_update_free_parts(service_instance_t
*NULLABLE service_instances
, service_instance_t
*NULLABLE added_instances
,
34 service_t
*NULLABLE services
, dns_host_description_t
*NULLABLE host_description
);
35 void srp_update_free(update_t
*NONNULL update
);
39 void dns_input(comm_t
*NONNULL comm
, message_t
*NONNULL message
, void *NULLABLE context
);
42 void adv_xpc_disconnect(void);
44 void srp_mdns_flush(void);
46 #endif // __SRP_PROXY_H
51 // c-file-style: "bsd"
54 // indent-tabs-mode: nil