40 #ifndef _NETSRVMGRIARM_H_
41 #define _NETSRVMGRIARM_H_
43 #include <arpa/inet.h>
49 #define IARM_BUS_NM_SRV_MGR_NAME "NET_SRV_MGR"
50 #define INTERFACE_SIZE 10
51 #define INTERFACE_LIST 50
52 #define NETSRVMGR_INTERFACES_MAX 16
53 #define MAX_IP_ADDRESS_LEN 46
54 #define MAX_IP_FAMILY_SIZE 10
55 #define MAX_HOST_NAME_LEN 128
56 #define IARM_BUS_NETSRVMGR_API_getActiveInterface "getActiveInterface"
57 #define IARM_BUS_NETSRVMGR_API_getNetworkInterfaces "getNetworkInterfaces"
58 #define IARM_BUS_NETSRVMGR_API_getInterfaceList "getInterfaceList"
59 #define IARM_BUS_NETSRVMGR_API_getDefaultInterface "getDefaultInterface"
60 #define IARM_BUS_NETSRVMGR_API_setDefaultInterface "setDefaultInterface"
61 #define IARM_BUS_NETSRVMGR_API_isInterfaceEnabled "isInterfaceEnabled"
62 #define IARM_BUS_NETSRVMGR_API_setInterfaceEnabled "setInterfaceEnabled"
63 #define IARM_BUS_NETSRVMGR_API_getSTBip "getSTBip"
64 #define IARM_BUS_NETWORK_MANAGER_MOCA_getTelemetryLogStatus "getTelemetryLogStatus"
65 #define IARM_BUS_NETWORK_MANAGER_MOCA_getTelemetryLogDuration "getTelemetryLogDuration"
66 #define IARM_BUS_NETSRVMGR_API_setIPSettings "setIPSettings"
67 #define IARM_BUS_NETSRVMGR_API_getIPSettings "getIPSettings"
68 #define IARM_BUS_NETSRVMGR_API_getSTBip_family "getSTBip_family"
69 #define IARM_BUS_NETSRVMGR_API_isConnectedToInternet "isConnectedToInternet"
70 #define IARM_BUS_NETSRVMGR_API_setConnectivityTestEndpoints "setConnectivityTestEndpoints"
71 #define IARM_BUS_NETSRVMGR_API_isAvailable "isAvailable"
72 #define IARM_BUS_NETSRVMGR_API_getPublicIP "getPublicIP"
74 typedef enum _NetworkManager_MoCA_EventId_t {
75 IARM_BUS_NETWORK_MANAGER_MOCA_TELEMETRY_LOG=20,
76 IARM_BUS_NETWORK_MANAGER_MOCA_TELEMETRY_LOG_DURATION,
77 IARM_BUS_NETWORK_MANAGER_MOCA_TELEMETRY_MAX,
78 } IARM_Bus_NetworkManager_MoCA_EventId_t;
81 IARM_BUS_NETWORK_MANAGER_EVENT_SET_INTERFACE_ENABLED=50,
82 IARM_BUS_NETWORK_MANAGER_EVENT_SET_INTERFACE_CONTROL_PERSISTENCE,
83 IARM_BUS_NETWORK_MANAGER_EVENT_WIFI_INTERFACE_STATE,
84 IARM_BUS_NETWORK_MANAGER_EVENT_INTERFACE_ENABLED_STATUS,
85 IARM_BUS_NETWORK_MANAGER_EVENT_INTERFACE_CONNECTION_STATUS,
86 IARM_BUS_NETWORK_MANAGER_EVENT_INTERFACE_IPADDRESS,
87 IARM_BUS_NETWORK_MANAGER_EVENT_DEFAULT_INTERFACE,
88 IARM_BUS_NETWORK_MANAGER_MAX,
93 char activeIface[INTERFACE_SIZE];
94 char allNetworkInterfaces[INTERFACE_LIST];
95 char setInterface[INTERFACE_SIZE];
96 char activeIfaceIpaddr[MAX_IP_ADDRESS_LEN];
99 bool isInterfaceEnabled;
101 char ipfamily[MAX_IP_FAMILY_SIZE];
104 typedef enum _NetworkManager_GetIPSettings_ErrorCode_t
106 NETWORK_IPADDRESS_ACQUIRED,
107 NETWORK_IPADDRESS_NOTFOUND,
108 NETWORK_NO_ROUTE_INTERFACE,
109 NETWORK_NO_DEFAULT_ROUTE,
110 NETWORK_DNS_NOT_CONFIGURED,
111 NETWORK_INVALID_IPADDRESS,
112 } NetworkManager_GetIPSettings_ErrorCode_t;
118 char ipaddress[INET6_ADDRSTRLEN];
119 char netmask[INET6_ADDRSTRLEN];
120 char gateway[INET6_ADDRSTRLEN];
121 char dhcp_server[INET6_ADDRSTRLEN];
122 char primarydns[INET6_ADDRSTRLEN];
123 char secondarydns[INET6_ADDRSTRLEN];
125 NetworkManager_GetIPSettings_ErrorCode_t errCode;
141 char gateway[MAX_IP_ADDRESS_LEN];
154 char ip_address[MAX_IP_ADDRESS_LEN];
160 char oldInterface[16];
161 char newInterface[16];
167 char endpoints[5][260];
172 char server[MAX_HOST_NAME_LEN];
176 uint16_t bind_timeout;
177 uint16_t cache_timeout;
179 char public_ip[MAX_IP_ADDRESS_LEN];