00001 /****************************************************************************** 00002 * Copyright (c) 1999-2008 ACCESS CO., LTD. All rights reserved. 00003 * Copyright (c) 2006-2007, ACCESS Systems Americas, Inc. All rights reserved. 00004 *****************************************************************************/ 00012 #ifndef ALP_CNC_NET_H_ 00013 #define ALP_CNC_NET_H_ 00014 00015 #include <time.h> 00016 00017 #include <alp/cnc.h> 00018 00024 00029 #define ALP_CNC_IPIF_PLUGIN_NAME "IPIF" 00030 #define ALP_CNC_ETHERNET_PLUGIN_NAME "Ethernet" 00031 #define ALP_CNC_PPP_PLUGIN_NAME "PPP" 00032 #define ALP_CNC_SERIAL_PLUGIN_NAME "Serial" 00033 #define ALP_CNC_BLUETOOTH_SERIAL_PLUGIN_NAME "BluetoothSPP" 00034 #define ALP_CNC_BLUETOOTH_PLUGIN_NAME "BluetoothOut" 00035 #define ALP_CNC_BLUETOOTH_IN_PLUGIN_NAME "BluetoothIn" 00036 #define ALP_CNC_PHONE_PLUGIN_NAME "Phone" 00037 #define ALP_CNC_DATA_CALL_PLUGIN_NAME "DataCall" 00038 #define ALP_CNC_OMAP_CSMI_PLUGIN_NAME "OmapCsmi" 00039 #define ALP_CNC_VP_TCP_PLUGIN_NAME "VP_TCP" 00040 #define ALP_CNC_VPN_PLUGIN_NAME "VPN" 00041 #define ALP_CNC_IPSEC_PLUGIN_NAME "IPSEC" 00042 #define ALP_CNC_L2TP_PLUGIN_NAME "L2TP" 00043 #define ALP_CNC_TUN_IP_PLUGIN_NAME "TunIP" 00044 #define ALP_CNC_NET_ACCESS_PLUGIN_NAME "NetAccess" 00045 #define ALP_CNC_IPIF_IN_PLUGIN_NAME "IPIFIN" 00046 #define ALP_CNC_NET_OUT_INTERFACE "NetOut" 00047 #define ALP_CNC_NET_IN_INTERFACE "NetIn" 00048 #define ALP_CNC_WIFI_PLUGIN_NAME "Wifi" 00049 #define ALP_CNC_NET_PEER_PLUGIN_NAME "NetPeer" 00050 #define ALP_CNC_WIFI_NETWORKS_NAME "NetWifi" 00051 #define ALP_CNC_NET_OUTGOING_SEARCH_STRING ALP_CNC_NET_OUT_INTERFACE"/*" ///< Netout search string 00052 #define ALP_CNC_NO_IPV6_OBJECT "NoIPv6" ///< IPv6 object 00053 00055 00060 #define ALP_CNC_PARAMETER_LINK 'link' ///< link parameter (see ALP_CNC_CHANNEL_LINK_XXX constants) 00061 #define ALP_CNC_PARAMETER_SERVICE 'srv0' ///< service parameter (see ALP_CNC_CHANNEL_SRV_XXX constants) 00062 #define ALP_CNC_PARAMETER_SERVICE_REQUESTED 'srvR' ///< service requested parameter (see ALP_CNC_CHANNEL_SRV_XXX constants) 00063 #define ALP_CNC_PARAMETER_PXLOGICAL_NAME 'PNam' ///< Logical proxy name 00064 #define ALP_CNC_PARAMETER_PXLOGICAL_START_PAGE 'PPag' ///< Logical proxy start page 00065 #define ALP_CNC_PARAMETER_PXLOGICAL_AUTH_TYPE 'PAut' ///< Logical proxy authentication type 00066 #define ALP_CNC_PARAMETER_PXLOGICAL_AUTH_ID 'PAId' ///< Logical authentication Id 00067 #define ALP_CNC_PARAMETER_PXLOGICAL_AUTH_PW 'PAPw' ///< Logical authentication password 00068 #define ALP_CNC_PARAMETER_PXPHYSICAL_ADDRESS 'PAdr' ///< Physical proxy address 00069 #define ALP_CNC_PARAMETER_PXPHYSICAL_ADDRESS_TYPE 'PAdt' ///< Physical proxy address type 00070 #define ALP_CNC_PARAMETER_PXPHYSICAL_PORT 'PPrt' ///< Physical proxy port number 00071 #define ALP_CNC_PARAMETER_PXLOGICAL_NO_PROXY_FOR 'PNoP' ///< No Proxy for field 00072 #define ALP_CNC_PARAMETER_DISCONNECTION_TIMEMOUT 'DisT' ///< Default Disconnection timeout in seconds 00073 #define ALP_CNC_PARAMETER_APPLICATION_DISCONNECTION_TIMEMOUT 'ADsT' ///< Application Disconnection timeout in seconds (used when an app disconnects with the ALP_CNC_DISCONNECT_WITH_TIMEOUT flag) 00074 #define ALP_CNC_PARAMETER_INTERFACE_NAME 'DDev' ///< IF name 00075 #define ALP_CNC_PARAMETER_LOCAL_IP 'LoIP' ///< local IP address 00076 #define ALP_CNC_PARAMETER_REMOTE_IP 'ReIP' ///< remote IP address for point-to-point links 00077 #define ALP_CNC_PARAMETER_GATEWAY 'GaWy' ///< Gateway 00078 #define ALP_CNC_PARAMETER_DHCP_CLIENT_ID 'DHcl' ///< Client ID for the DHCP server 00079 #define ALP_CNC_PARAMETER_DHCP_HOST_NAME 'DHhn' ///< Host name for the DHCP server 00080 #define ALP_CNC_PARAMETER_DNS_SERVERS 'DNSs' ///< DNS servers 00081 #define ALP_CNC_PARAMETER_DOMAINS 'Doms' ///< Bind search domain names 00082 #define ALP_CNC_PARAMETER_METRIC 'Mtic' ///< IF metric 00083 #define ALP_CNC_PARAMETER_MTU '_MTU' ///< IF MTU 00084 #define ALP_CNC_PARAMETER_CHECK_CABLE 'Cabl' ///< 1 to check, 0 to not check if the cable is present 00085 #define ALP_CNC_PARAMETER_IP_FAMILY 'IPvs' ///< IPv4 or IPv6 00086 #define ALP_CNC_PARAMETER_CONFIGURATION_MODE 'Mode' ///< DHCP, Static, Zero Conf... 00087 #define ALP_CNC_PARAMETER_ENABLE_DHCP 'DHCP' ///< IPIFIN parameter: Enable DHCP (default) or use ZeroConf (zcip) 00088 #define ALP_CNC_PARAMETER_DHCP_POOL_SIZE 'PSiz' ///< If DHCP=1, define the size of the address pool used by the DHCP server (default 16) 00089 #define ALP_CNC_PARAMETER_UNIQUE_SLAVE_IP 'USIP' ///< for NetIn profiles when PSiz=1, the unique possible IP for the slave device connected 00090 #define ALP_CNC_PARAMETER_BINDED_NETWORKS 'BNts' ///< Networks binded to the profile 00091 #define ALP_CNC_PARAMETER_LLMNR 'LMNR' ///< To activate or desactivate LLMNR for the profile 00092 #define ALP_CNC_PARAMETER_EXTRA_OPTIONS 'XOpt' ///< Extra options for the plugin 00093 #define ALP_CNC_PARAMETER_USER_NAME 'User' ///< Username for authentification 00094 #define ALP_CNC_PARAMETER_PASSWORD 'Pass' ///< Password for authentification 00095 #define ALP_CNC_PARAMETER_CONNECTION_TIMEOUT 'ConT' ///< Time allowed for connection 00096 #define ALP_CNC_PARAMETER_IDLE_TIMEOUT 'IdlT' ///< Time to wait before deconnecting when idle 00097 #define ALP_CNC_PARAMETER_CONNECTION_DELAY 'Dlay' ///< Time to wait before continuing connection process (in second) 00098 #define ALP_CNC_PARAMETER_CONNECTION_SHARING 'CoSh' ///< 0 to not share a connection within the NetIn profile, 1 for yes 00099 #define ALP_CNC_PARAMETER_CONNECTION_PEER 'CoPe' ///< 0 to not allowed NetOut profile over this NetIn profile, 1 for yes 00100 #define ALP_CNC_PARAMETER_NO_DEFAULT_PPPD_ARGS 'NDPA' ///< 0 for use the default arguments to start pppd, 1 for not 00101 #define ALP_CNC_PARAMETER_SCRIPT_FILE 'LogF' ///< File path of the login script 00102 #define ALP_CNC_PARAMETER_DEVICE_NAME 'DevN' ///<Device name 00103 #define ALP_CNC_PARAMETER_BAUD_RATE 'Baud' ///<Speed on serial device 00104 #define ALP_CNC_PARAMETER_DATA_BITS 'Bits' ///<Data bits on device 00105 #define ALP_CNC_PARAMETER_STOP_BITS 'Stop' ///<Stop bits on device 00106 #define ALP_CNC_PARAMETER_PARITY_BITS 'Prty' ///<Parity bits on device 00107 #define ALP_CNC_PARAMETER_FLOW_CONTROL 'FCtl' ///<Flow control on device 00108 #define ALP_CNC_PARAMETER_BLUETOOTH_ADDRESS 'Addr' ///< Bluetooth address of the remote device to connection 00109 #define ALP_CNC_PARAMETER_SERVICE_NAME 'Topo' ///< Topology of the bluetooth network i.e. PANU, GN or NAP 00110 #define ALP_CNC_PARAMETER_SECURITY '_Sec' ///< Security parameter for Bluetooth connection. (0 = none, 1 = authenticate, 2 = encrypt, 3 = secure) 00111 #define ALP_CNC_PARAMETER_HCI_DEVICE '_Hci' ///< Used when the device has more than one BT device. In that case this parameter is used to define the BT device to use for the connection 00112 #define ALP_CNC_PARAMETER_REMOTE_HOST 'ReHt' ///<Remote Host domain name or IP address(ie the VPN server) 00113 #define ALP_CNC_PARAMETER_BOUND_PROFILE 'CPro' ///<Profilename of the bound profile with the connection profile (ie VPN) 00114 #define ALP_CNC_PARAMETER_USED_PROFILE 'UPro' ///<ID of the used profile with the connection profile (ie VPN) 00115 #define ALP_CNC_PARAMETER_TUNNEL_PROFILE 'TPro' ///<ID of the profile that uses the connection profile to open a tunnel 00116 #define ALP_CNC_PARAMETER_X509_CERTIFICATE 'Cert' ///<ID of the X509 certificate to use for the connection (ie VPN) 00117 #define ALP_CNC_PARAMETER_PRESHARED_KEY 'PShK' ///<Pre-shared key to use for connection (ie VPN) 00118 #define ALP_CNC_PARAMETER_HEX_PRESHARED_KEY 'HexK' ///<Is the preshared key in a hexadecimal format ? 00119 #define ALP_CNC_PARAMETER_PORT 'Port' ///<A port (ie for TCP, UDP) 00120 #define ALP_CNC_PARAMETER_IP_PROTOCOL 'Prot' ///<A protocol (ie TCP, UDP, ICMP...) 00121 #define ALP_CNC_PARAMETER_ENCRYPTION_MODE 'EMod' ///<Encryption mode for the connection (specific use for VPN) 00122 #define ALP_CNC_PARAMETER_NO_VPN_AUTH 'NoVA' ///<Are the username and the password managed by a lower plug-in instead of the VPN plug-in ? 00123 #define ALP_CNC_PARAMETER_AGGRESSIVE_MODE 'Aggr' ///<Aggresive mode for IPSEC 00124 #define ALP_CNC_PARAMETER_CISCO_COMPATIBILITY_MODE 'CisM' ///< CISCO Compatibility Mode 00125 #define ALP_CNC_PARAMETER_PFS_MODE 'PFSe' ///<Perfect Forwarding Secrecy for IPSEC 00126 #define ALP_CNC_PARAMETER_GROUP_NAME 'GrpN' ///< CISCO Goup Name for pre-shared key 00127 #define ALP_CNC_PARAMETER_CONNECTION_MODE 'CMod' ///<Connection Mode for NetAcces 00128 #define ALP_CNC_PARAMETER_TTL '_TTL' ///< TTL for tunneling 00129 #define ALP_CNC_PARAMETER_LOCAL_IP_ADDRESSES 'LIPs' ///< List of IPv6 addresses to assign. 00130 #define ALP_CNC_PARAMETER_UI_VISIBLE 'UIVi' ///< Is the plug-in UI is visible when editing a profile with the plug-in ? 00131 #define ALP_CNC_PARAMETER_UI_LOCKED 'Lock' ///< Is the plug-in UI is unable to edit when editing a profile with the plug-in ? 00132 #define ALP_CNC_PARAMETER_PPP_AUTHENTICATION_UI 'PAUI' ///< Is the authentication UI part of the PPP plug-in must be displayed ? (default: 0=no) 00133 #define ALP_CNC_PARAMETER_PPP_DATA_COMP 'Datc' ///< PPP Plugin: Software compression (default: 1=on) 00134 #define ALP_CNC_PARAMETER_PPP_HEADER_COMP 'Hdrc' ///< PPP Plugin: IP Header compression (default: 1=on) 00135 #define ALP_CNC_PARAMETER_PHONE_DRIVER 'PDrv' ///< Phone Plugin: Phone Driver parameter. 00136 #define ALP_CNC_PARAMETER_CNC_PURPOSE 'CncP' ///< Phone Plugin: Connection purpose: Server or Transport. 00137 #define ALP_CNC_PARAMETER_CNC_TYPE 'CncT' ///< Phone Plugin: Connection type we want to open: AT command, CSD data call... 00138 #define ALP_CNC_PARAMETER_DATA_CALL_TYPE 'Type' ///< Data Call Plugin: Type of data call: CS or PS 00139 #define ALP_CNC_PARAMETER_DATA_CALL_CS_DIAL_NUMBER 'Dial' ///< Data Call Plugin: CS Dial number 00140 #define ALP_CNC_PARAMETER_DATA_CALL_CS_BEARER_SPEED 'BSpd' ///< Data Call Plugin: CS bearer speed 00141 #define ALP_CNC_PARAMETER_DATA_CALL_CS_BEARER_CNC_ELEM 'BCEl' ///< Data Call Plugin: CS bearer cnc element 00142 #define ALP_CNC_PARAMETER_DATA_CALL_CS_BEARER_SERVICE 'BSrv' ///< Data Call Plugin: CS bearer service 00143 #define ALP_CNC_PARAMETER_DATA_CALL_PS_APN 'Apna' ///< Data Call Plugin: PS access point name 00144 #define ALP_CNC_PARAMETER_DATA_CALL_PS_DATA_COMP 'Datc' ///< Data Call Plugin: PS data compression 00145 #define ALP_CNC_PARAMETER_DATA_CALL_PS_HEADER_COMP 'Hdrc' ///< Data Call Plugin: PS header compression 00146 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_PRECEDENCE 'Prec' ///< Data Call Plugin: PS QOS precedence 00147 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_DELAY 'Dela' ///< Data Call Plugin: PS QOS delay 00148 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_RELIABILITY 'Reli' ///< Data Call Plugin: PS QOS reliability 00149 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_PEAK 'Peak' ///< Data Call Plugin: PS QOS peak 00150 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_MEAN 'Mean' ///< Data Call Plugin: PS QOS mean 00151 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_TRAFFIC_CLASS 'Trcl' ///< Data Call Plugin: PS QOS traffic class 00152 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_MAX_BITRATE_UL 'Mbru' ///< Data Call Plugin: PS QOS max upload bitrate 00153 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_MAX_BITRATE_DL 'Mbrd' ///< Data Call Plugin: PS QOS max download bitrate 00154 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_GTED_BITRATE_UL 'Gbru' ///< Data Call Plugin: PS QOS guaranted upload bitrate 00155 #define ALP_CNC_PARAMETER_DATA_CALL_PS_QOS_GTED_BITRATE_DL 'Gbrd' ///< Data Call Plugin: PS QOS guaranted download bitrate 00156 #define ALP_CNC_PARAMETER_AUTHENTIFICATION_MODE 'Auth' ///< Authentication mode: PAP, CHAP,... 00157 #define ALP_CNC_PARAMETER_ASSOCIATED_PROFILE 'APro' ///< Associated NetPeer profile with a NetIn profile 00158 #define ALP_CNC_PARAMETER_LINKED_PROFILE 'LPro' ///< The openned channel on the NetPeer profile 00159 #define ALP_CNC_PARAMETER_AUTO_PROFILE 'auto' ///< Set to 0 to avoid auto connection/disconnection feature on the profile 00160 00161 #define ALP_CNC_PARAMETER_WIFI_ESSID 'Ssid' ///< WiFi: ESSID of the network 00162 #define ALP_CNC_PARAMETER_WIFI_ENCRYPTION 'WEnc' ///< WiFi: see ALP_WIFI_SECURITY_MODE_XXX 00163 #define ALP_CNC_PARAMETER_WIFI_LAST_CONNECTION 'Last' ///< WiFi: Last connection of the network 00164 #define ALP_CNC_PARAMETER_WIFI_ADDRESS 'Addr' ///< WiFi: MAC address of the remote access point 00165 #define ALP_CNC_PARAMETER_WIFI_NETWORK_ID 'NWID' ///< WiFi: ID of the connected favorite network 00166 #define ALP_CNC_PARAMETER_WIFI_RADIO_MODE 'Rdio' ///< WiFi: Radio mode: Infrastructure, Ad-Hoc, Hidden... 00167 00168 #define ALP_CNC_DEFAULT_DISCONNECTION_TIMEMOUT ((time_t) 600) ///< Default disconnection timeout value 00169 00171 00173 00177 00181 #define ALP_STATUS_CNC_PLUGIN_IPIF ((alp_status_t) (0x01)) ///< IPIF plugin error 00182 #define ALP_STATUS_CNC_PLUGIN_ETHERNET ((alp_status_t) (0x02)) ///< Ethernet plugin error 00183 #define ALP_STATUS_CNC_PLUGIN_PPP ((alp_status_t) (0x03)) ///< PPP plugin error 00184 #define ALP_STATUS_CNC_PLUGIN_SERIAL ((alp_status_t) (0x04)) ///< Serial plugin error 00185 #define ALP_STATUS_CNC_PLUGIN_VPN ((alp_status_t) (0x05)) ///< VPN plugin error 00186 #define ALP_STATUS_CNC_PLUGIN_IPSEC ((alp_status_t) (0x06)) ///< IPSEC plugin error 00187 #define ALP_STATUS_CNC_PLUGIN_L2TP ((alp_status_t) (0x07)) ///< L2TP plugin error 00188 #define ALP_STATUS_CNC_PLUGIN_NET_ACCESS ((alp_status_t) (0x08)) ///< NetAccess plugin error 00189 #define ALP_STATUS_CNC_PLUGIN_TUN_IP ((alp_status_t) (0x09)) ///< TunIP plugin error 00190 #define ALP_STATUS_CNC_PLUGIN_PHONE ((alp_status_t) (0x0A)) ///< Phone plugin error 00191 #define ALP_STATUS_CNC_PLUGIN_BLUETOOTH ((alp_status_t) (0x0B)) ///< Bluetooth plugin error 00192 #define ALP_STATUS_CNC_PLUGIN_WIFI ((alp_status_t) (0x0C)) ///< Wifi plugin error 00193 #define ALP_STATUS_CNC_PLUGIN_NET_PEER ((alp_status_t) (0x0D)) ///< NetPeer plugin error 00194 #define ALP_STATUS_CNC_PLUGIN_NET_IN ((alp_status_t) (0x0E)) ///< NetIn plugin error 00195 #define ALP_STATUS_CNC_PLUGIN_IPIF_IN ((alp_status_t) (0x0F)) ///< IPIFIN plugin error 00196 #define ALP_STATUS_CNC_PLUGIN_USB ((alp_status_t) (0x10)) ///< Ethernet plugin error for USB link 00197 00198 #define ALP_STATUS_CNC_ETHERNET_UNPLUGGED ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_ETHERNET, ALP_STATUS_CNC_CONNECT_UNPLUGGED) 00199 #define ALP_STATUS_CNC_ETHERNET_ALREADY_IN_USE ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_ETHERNET, ALP_STATUS_CNC_CONNECT_BUSY) 00200 #define ALP_STATUS_CNC_ETHERNET_GENERIC ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_ETHERNET, ALP_STATUS_CNC_CONNECT_GENERIC_ERROR) 00201 00202 #define ALP_STATUS_CNC_USB_UNPLUGGED ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_USB, ALP_STATUS_CNC_CONNECT_UNPLUGGED) 00203 #define ALP_STATUS_CNC_USB_ALREADY_IN_USE ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_USB, ALP_STATUS_CNC_CONNECT_BUSY) 00204 #define ALP_STATUS_CNC_USB_GENERIC ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_USB, ALP_STATUS_CNC_CONNECT_GENERIC_ERROR) 00205 00206 #define ALP_STATUS_CNC_PPP_INVALID_PROFILE ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_PPP, ALP_STATUS_CNC_CONNECT_INVALID_PROFILE) 00207 #define ALP_STATUS_CNC_PPP_BAD_PASSWORD ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_PPP, ALP_STATUS_CNC_CONNECT_AUTHENTICATION) 00208 #define ALP_STATUS_CNC_PPP_GENERIC ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_PPP, ALP_STATUS_CNC_CONNECT_GENERIC_ERROR) 00209 00210 #define ALP_STATUS_CNC_WIFI_GENERIC ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_PPP, ALP_STATUS_CNC_CONNECT_GENERIC_ERROR) 00211 #define ALP_STATUS_CNC_WIFI_CONNECTION_FAILED ALP_STATUS_CNC_WIFI_GENERIC 00212 #define ALP_STATUS_CNC_WIFI_CONNECT_ACCESS_POINT_FAILED ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_WIFI, ALP_STATUS_CNC_CONNECT_SERVER_FAILED) 00213 #define ALP_STATUS_CNC_WIFI_ATHENTICATION_FAILED ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_WIFI, ALP_STATUS_CNC_CONNECT_AUTHENTICATION) 00214 #define ALP_STATUS_CNC_WIFI_ACCESS_POINT_NOT_FOUND ALP_CNC_CONNECT_STATUS(ALP_STATUS_CNC_PLUGIN_WIFI, ALP_STATUS_CNC_CONNECT_TIMEOUT) 00215 00216 00218 00220 00221 #endif ///< ALP_CNC_NET_H_
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.