Imported Upstream version 878.70.2
[platform/upstream/mdnsresponder.git] / mDNSMacOSX / Metrics.h
1 /*
2  * Copyright (c) 2016-2017 Apple Inc. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __Metrics_h
18 #define __Metrics_h
19
20 #include "mDNSEmbeddedAPI.h"
21 #include <TargetConditionals.h>
22
23 #ifdef  __cplusplus
24 extern "C" {
25 #endif
26
27 #if TARGET_OS_IOS
28 mStatus MetricsInit(void);
29 void    MetricsUpdateDNSQueryStats(const domainname *inQueryName, mDNSu16 inType, const ResourceRecord *inRR, mDNSu32 inSendCount, mDNSu32 inLatencyMs, mDNSBool inForCell);
30 void    MetricsUpdateDNSResolveStats(const domainname *inQueryName, const ResourceRecord *inRR, mDNSBool inForCell);
31 void    MetricsUpdateDNSQuerySize(mDNSu32 inSize);
32 void    MetricsUpdateDNSResponseSize(mDNSu32 inSize);
33 void    LogMetrics(void);
34 #endif
35
36 #ifdef  __cplusplus
37 }
38 #endif
39
40 #endif // __Metrics_h