Merge "Add dbus method for getting wifi passphrase" into tizen
[platform/core/connectivity/net-config.git] / include / ip-conflict-detect.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __NETCONFIG_IP_CONFLICT_DETECT_H__
21 #define __NETCONFIG_IP_CONFLICT_DETECT_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include <stdbool.h>
28 #include "wifi.h"
29
30 struct sock_data {
31         guint timer_id;
32         int chk_conflict_data_id;
33         GIOChannel *chk_conflict_sock_io;
34         int chk_conflict_sd;
35         guint timeout;
36         guint arp_reply_timer;
37         int iteration;
38 };
39
40 struct sock_data * start_ip_conflict_mon(void);
41 void stop_ip_conflict_mon();
42 gboolean handle_ip_conflict_set_enable(Wifi *wifi, GDBusMethodInvocation *context,
43                 const gchar *ifname, bool detect);
44 gboolean handle_is_ip_conflict_detect_enabled(Wifi *wifi, GDBusMethodInvocation *context,
45                 const gchar *ifname);
46 gboolean handle_set_ip_conflict_period(Wifi *wifi, GDBusMethodInvocation *context,
47                 const gchar *ifname, guint initial_time);
48 gboolean handle_get_ip_conflict_state(Wifi *wifi, GDBusMethodInvocation *context,
49                 const gchar *ifname);
50 gboolean handle_get_ip_conflict_period(Wifi *wifi, GDBusMethodInvocation *context,
51                 const gchar *ifname);
52
53
54 #ifdef __cplusplus
55 }
56 #endif
57
58 #endif /* __NETCONFIG_IP_CONFLICT_DETECT_H__ */