2 #ifndef _IPMONITOR_CONTROL_PRIVATE_H
3 #define _IPMONITOR_CONTROL_PRIVATE_H
5 #define kIPMonitorControlServerName \
6 "com.apple.SystemConfiguration.IPMonitorControl"
8 typedef CF_ENUM(uint32_t, IPMonitorControlRequestType
) {
9 kIPMonitorControlRequestTypeNone
= 0,
10 kIPMonitorControlRequestTypeSetInterfaceRank
= 1,
11 kIPMonitorControlRequestTypeGetInterfaceRank
= 2,
12 kIPMonitorControlRequestTypeSetInterfaceAdvisory
= 3,
13 kIPMonitorControlRequestTypeInterfaceAdvisoryIsSet
= 4,
14 kIPMonitorControlRequestTypeAnyInterfaceAdvisoryIsSet
= 5,
18 * kIPMonitorControlRequestKey*
19 * - keys used to communicate a request to the server
21 #define kIPMonitorControlRequestKeyType "Type"
22 #define kIPMonitorControlRequestKeyProcessName "ProcessName"
23 #define kIPMonitorControlRequestKeyInterfaceName "InterfaceName"
24 #define kIPMonitorControlRequestKeyPrimaryRank "PrimaryRank"
25 #define kIPMonitorControlRequestKeyAdvisory "Advisory"
26 #define kIPMonitorControlRequestKeyReason "Reason"
29 * kIPMonitorControlResponseKey*
30 * - keys used to communicate the response from the server
32 #define kIPMonitorControlResponseKeyError "Error"
33 #define kIPMonitorControlResponseKeyPrimaryRank "PrimaryRank"
34 #define kIPMonitorControlResponseKeyAdvisoryIsSet "AdvisoryIsSet"
36 static inline CFStringRef
37 _IPMonitorControlCopyInterfaceAdvisoryNotificationKey(CFStringRef ifname
)
39 return SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL
,
40 kSCDynamicStoreDomainState
,
46 my_CFRelease(void * t
)
48 void * * obj
= (void * *)t
;
56 #endif /* _IPMONITOR_CONTROL_PRIVATE_H */