1 /* nat64-macos.h 2 * 3 * Copyright (c) 2021 Apple Inc. All rights reserved. 4 * 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 8 * 9 * https://www.apache.org/licenses/LICENSE-2.0 10 * 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. 16 */ 17 18 #ifndef __NAT64_MACOS_H__ 19 #define __NAT64_MACOS_H__ 20 21 #include <CoreUtils/CoreUtils.h> 22 #include <dispatch/dispatch.h> 23 24 CU_ASSUME_NONNULL_BEGIN 25 26 void 27 nat64_start_translation(dispatch_queue_t queue); 28 29 void 30 nat64_stop_translation(void); 31 32 void 33 nat64_set_ula_prefix(const struct in6_addr *prefix); 34 35 const struct in6_addr * 36 nat64_get_ipv6_prefix(void); 37 38 bool 39 nat64_is_active(void); 40 41 void 42 nat64_pass_all_pf_rule_delete(void); 43 44 void 45 nat64_pass_all_pf_rule_set(const char *interface); 46 47 CU_ASSUME_NONNULL_END 48 49 #endif // __NAT64_MACOS_H__ 50