blob: adf94073e6521c7b038a7c16873cb27ff487b2ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/*
* Copyright (c) 2019 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef __WIFI_NETWORKMANAGER_PLUGIN_H__
#define __WIFI_NETWORKMANAGER_PLUGIN_H__
#include <log.h>
#include <wifi-scan.h>
#include <net_connection.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
NM_NETWORK_TYPE_UNKNOWN,
NM_NETWORK_TYPE_DISCONNECTED,
NM_NETWORK_TYPE_ETHERNET,
NM_NETWORK_TYPE_WIFI
} nm_network_type;
typedef struct {
char ip_addr[MAX_SIZE_BUFFER];
char hw_type[MAX_SIZE_BUFFER];
char flags[MAX_SIZE_BUFFER];
char hw_addr[MAX_SIZE_BUFFER];
char mask[MAX_SIZE_BUFFER];
char device[MAX_SIZE_BUFFER];
} nm_linux_arp_entry;
bool __nm_init();
bool __nm_get_interface_name(char **iface_name);
connection_type_e __nm_get_connection_type();
void __nm_get_connection_profile_handler(connection_profile_h *profile);
void __nm_destroy_profile_iterator();
bool __nm_get_gateway_address(char *gateway);
void __nm_get_linux_arp_table(char *ip_addr, char *mac_addr);
void __nm_get_ips_mac(char *ip_addr, char *mac_addr);
void __nm_update_network_type(bool isConnect);
bool __nm_get_mac_address(char **dest_mac_addr);
char* __nm_get_ip_address(void);
void __nm_get_connected_bssid(char **connect_bssid);
bool __nm_is_network_connected();
void __nm_deinit();
#ifdef __cplusplus
}
#endif
#endif /* __WIFI_NETWORKMANAGER_PLUGIN_H__*/
|