]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSMacOSX/helper.h
mDNSResponder-258.21.tar.gz
[apple/mdnsresponder.git] / mDNSMacOSX / helper.h
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2007 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 * http://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 H_HELPER_H
19 #define H_HELPER_H
20
21 #define kmDNSHelperServiceName "com.apple.mDNSResponderHelper"
22
23 enum mDNSDynamicStoreSetConfigKey
24 {
25 kmDNSMulticastConfig = 1,
26 kmDNSDynamicConfig,
27 kmDNSPrivateConfig,
28 kmDNSBackToMyMacConfig,
29 kmDNSSleepProxyServersState
30 };
31
32 enum mDNSPreferencesSetNameKey
33 {
34 kmDNSComputerName = 1,
35 kmDNSLocalHostName
36 };
37
38 enum mDNSUpDown
39 {
40 kmDNSUp = 1,
41 kmDNSDown
42 };
43
44 enum mDNSAutoTunnelSetKeysReplaceDelete
45 {
46 kmDNSAutoTunnelSetKeysReplace = 1,
47 kmDNSAutoTunnelSetKeysDelete
48 };
49
50 #define ERROR(x, y) x,
51 enum mDNSHelperErrors
52 {
53 mDNSHelperErrorBase = 2300,
54 #include "helper-error.h"
55 mDNSHelperErrorEnd
56 };
57 #undef ERROR
58
59 #include "mDNSEmbeddedAPI.h"
60 #include "helpermsg-types.h"
61
62 extern const char *mDNSHelperError(int errornum);
63
64 extern void mDNSRequestBPF(void);
65 extern int mDNSPowerRequest(int key, int interval);
66 extern int mDNSSetLocalAddressCacheEntry(int ifindex, int family, const v6addr_t ip, const ethaddr_t eth);
67 extern void mDNSNotify(const char *title, const char *msg); // Both strings are UTF-8 text
68 extern void mDNSDynamicStoreSetConfig(int key, const char *subkey, CFPropertyListRef value);
69 extern void mDNSPreferencesSetName(int key, domainlabel *old, domainlabel *new);
70 extern int mDNSKeychainGetSecrets(CFArrayRef *secrets);
71 extern void mDNSAutoTunnelInterfaceUpDown(int updown, v6addr_t addr);
72 extern void mDNSConfigureServer(int updown, const domainname *const fqdn);
73 extern int mDNSAutoTunnelSetKeys(int replacedelete, v6addr_t local_inner,
74 v6addr_t local_outer, short local_port, v6addr_t remote_inner,
75 v6addr_t remote_outer, short remote_port, const domainname *const fqdn);
76 extern void mDNSSendWakeupPacket(unsigned ifid, char *eth_addr, char *ip_addr, int iteration);
77
78 #endif /* H_HELPER_H */