1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2007 Apple 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.
21 #define kmDNSHelperServiceName "com.apple.mDNSResponderHelper"
23 enum mDNSDynamicStoreSetConfigKey
25 kmDNSMulticastConfig
= 1,
28 kmDNSBackToMyMacConfig
,
29 kmDNSSleepProxyServersState
32 enum mDNSPreferencesSetNameKey
34 kmDNSComputerName
= 1,
44 enum mDNSAutoTunnelSetKeysReplaceDelete
46 kmDNSAutoTunnelSetKeysReplace
= 1,
47 kmDNSAutoTunnelSetKeysDelete
50 // helper parses the system keychain and returns the information to mDNSResponder.
51 // It returns four attributes. Attributes are defined after how they show up in
52 // keychain access utility (the actual attribute name to retrieve these are different).
53 enum mDNSKeyChainAttributes
55 kmDNSKcWhere
, // Where
56 kmDNSKcAccount
, // Account
61 #define ERROR(x, y) x,
64 mDNSHelperErrorBase
= 2300,
65 #include "helper-error.h"
70 #include "mDNSEmbeddedAPI.h"
71 #include "helpermsg-types.h"
73 extern const char *mDNSHelperError(int errornum
);
75 extern void mDNSRequestBPF(void);
76 extern int mDNSPowerRequest(int key
, int interval
);
77 extern int mDNSSetLocalAddressCacheEntry(int ifindex
, int family
, const v6addr_t ip
, const ethaddr_t eth
);
78 extern void mDNSNotify(const char *title
, const char *msg
); // Both strings are UTF-8 text
79 extern void mDNSDynamicStoreSetConfig(int key
, const char *subkey
, CFPropertyListRef value
);
80 extern void mDNSPreferencesSetName(int key
, domainlabel
*old
, domainlabel
*new);
81 extern int mDNSKeychainGetSecrets(CFArrayRef
*secrets
);
82 extern void mDNSAutoTunnelInterfaceUpDown(int updown
, v6addr_t addr
);
83 extern void mDNSConfigureServer(int updown
, const char *const prefix
, const domainname
*const fqdn
);
84 extern int mDNSAutoTunnelSetKeys(int replacedelete
, v6addr_t local_inner
,
85 v6addr_t local_outer
, short local_port
, v6addr_t remote_inner
,
86 v6addr_t remote_outer
, short remote_port
, const char *const prefix
, const domainname
*const fqdn
);
87 extern void mDNSSendWakeupPacket(unsigned ifid
, char *eth_addr
, char *ip_addr
, int iteration
);
88 extern void mDNSPacketFilterControl(uint32_t command
, char * ifname
, uint16_t servicePort
, uint16_t protocol
);
90 #endif /* H_HELPER_H */