Fix Wformat build error
[platform/core/connectivity/stc-manager.git] / include / transmission.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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 /*
18  * @file transmission.h
19  * @brief Kernel - user space transmition structures
20  *
21  */
22
23 #ifndef __TRAFFIC_CONTROL_TRAFFIC_STAT_TRANSMITION_H__
24 #define __TRAFFIC_CONTROL_TRAFFIC_STAT_TRANSMITION_H__
25 #ifdef _KERNEL_
26 #include <linux/socket.h>
27 #include <linux/types.h>
28 #else
29 #include <netinet/in.h>
30 #include <sys/types.h>
31 #endif
32
33 /* Used both in kernel module and in control daemon */
34
35 /*
36  * @brief Entity for outgoing and incoming packet counter information.
37  * Used for serialization.
38  */
39 struct traffic_event {
40         uint32_t sk_classid;
41         unsigned long bytes;
42         int ifindex;
43 };
44
45 enum traffic_restriction_type {
46         RST_UNDEFINDED,
47         RST_SET,
48         RST_UNSET,
49         RST_EXCLUDE,
50         RST_MAX_VALUE
51 };
52
53 /*
54  * @brief Traffic restriction structure for serialization
55  * type - traffic_restriction_type
56  */
57 struct traffic_restriction {
58         uint32_t sk_classid;
59         int type;
60         int ifindex;
61         int send_limit;
62         int rcv_limit;
63         int snd_warning_threshold;
64         int rcv_warning_threshold;
65 };
66
67 #define STC_ALL_IFINDEX 1
68
69 #endif                          /*TRAFFIC_CONTROL_TRAFFIC_STAT_TRANSMITION */