#include <libintl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <alp/config.h>
#include <alp/types.h>
#include <alp/sysclass.h>
#include <alp/omadm_provisioning.h>
#include <alp/syspaths.h>
Go to the source code of this file.
Data Structures | |
| struct | _AlpCncChannel |
| struct | _AlpCncChannelProfile |
| struct | _AlpCncControl |
| struct | _AlpCncControlAvailability |
| struct | _AlpCncControlBindDestination |
| struct | _AlpCncControlCableDetection |
| struct | _AlpCncControlNetin |
| struct | _AlpCncControlReconfigure |
| union | _AlpCncEditParameters |
| struct | _AlpCncObjectInfo |
| struct | _AlpCncParameter |
| struct | _AlpNotifyEventCncAvailability |
| struct | _AlpNotifyEventCncConnection |
Plugins root and wizard entry plugins (technologies) interfaces | |
| #define | ALP_CNC_AUTO "Auto" |
| Auto interface. | |
| #define | ALP_CNC_AUTO_PROFILE "auto-all" |
| Default auto profile. | |
| #define | ALP_CNC_DEFAULT "Default" |
| Default interface. | |
| #define | ALP_CNC_MACRO_REPLACE "{REPLACE}" |
| The "replace" macro for template referencing sub-templates. | |
| #define | ALP_CNC_MACRO_SPECIAL_CHAR '{' |
| special macro character | |
| #define | ALP_CNC_MACRO_USING "{USING}" |
| The "using" macro for template referencing sub-templates. | |
| #define | ALP_CNC_PROXY "Proxy" |
| Proxy interface. | |
| #define | ALP_CNC_ROOT_PLUGINS "PluginsRoot" |
| plug-ins root | |
| #define | ALP_CNC_ROOT_TECHNOLOGIES "TechnologiesRoot" |
| Technologies root. | |
Availability constants | |
| #define | ALP_CNC_AVAILABILITY_NO 255 |
| profile is not available | |
| #define | ALP_CNC_AVAILABILITY_PERCENT_BASE 100 |
| 100 to 200: signal strength | |
| #define | ALP_CNC_AVAILABILITY_UNKNOWN 0 |
| profile availability is unknown | |
| #define | ALP_CNC_AVAILABILITY_YES 1 |
| profile is available | |
Kind of disconnection/cancel | |
| #define | ALP_CNC_CANCEL_CHANNEL ((uint8_t) 0x80) |
| Cancel the channel (no other connection attempt). | |
| #define | ALP_CNC_CANCELLED_SYSTEM ((uint8_t) 2) |
| Channel connection was cancelled by the system. | |
| #define | ALP_CNC_CANCELLED_USER ((uint8_t) 1) |
| Channel connection was cancelled by the user. | |
| #define | ALP_CNC_DISCONNECT_WITH_TIMEOUT ((uint8_t) 0x40) |
| Use a pre-defined disconnection timeout. | |
| #define | ALP_CNC_DISCONNECTED_SYSTEM ((uint8_t) 4) |
| Channel connection was disconnected by system. | |
| #define | ALP_CNC_DISCONNECTED_TIMEOUT ((uint8_t) 5) |
| Channel connection was disconnected by system on timeout. | |
| #define | ALP_CNC_DISCONNECTED_USER ((uint8_t) 3) |
| Channel connection was disconnected by user. | |
| #define | ALP_CNC_FLAG_MASK ((uint8_t) 0x3F) |
| Disconnection Flags mask. | |
| #define | ALP_CNC_NOT_CANCELLED ((uint8_t) 0) |
| Channel was not cancelled/disconnected. | |
Link parameter values | |
| See ALP_NET_CNC_CONFIGURATION | |
| #define | ALP_CNC_CHANNEL_LINK_BLUETOOTH 0x00000040 |
| Bluetooth profile. | |
| #define | ALP_CNC_CHANNEL_LINK_CS 0x00000002 |
| Data call circuit switch profile. | |
| #define | ALP_CNC_CHANNEL_LINK_ETHERNET 0x00000100 |
| Ethernet profile. | |
| #define | ALP_CNC_CHANNEL_LINK_IPV6OVERIPV4 0x00000200 |
| IPv6 over IPv4. | |
| #define | ALP_CNC_CHANNEL_LINK_PS 0x00000001 |
| Data call packet switch profile. | |
| #define | ALP_CNC_CHANNEL_LINK_PS_IP 0x00000008 |
| IP direct data call packet switch profile. | |
| #define | ALP_CNC_CHANNEL_LINK_USB 0x00000080 |
| USB Ethernet profile. | |
| #define | ALP_CNC_CHANNEL_LINK_WIFI 0x00000020 |
| WIFI profile. | |
| #define | ALP_CNC_CHANNEL_LINK_WIN_RAS 0x00000400 |
| PPP over serial. | |
Service parameter values | |
| See ALP_NET_CNC_CONFIGURATION | |
| #define | ALP_CNC_CHANNEL_SRV_BACKGROUND 0x20000000 |
| Internal use. | |
| #define | ALP_CNC_CHANNEL_SRV_DM 0x00000200 |
| DM profile. | |
| #define | ALP_CNC_CHANNEL_SRV_EMAIL 0x00000008 |
| EMAIL able profile. | |
| #define | ALP_CNC_CHANNEL_SRV_GENERIC 0x10000000 |
| generic Internet profile | |
| #define | ALP_CNC_CHANNEL_SRV_IM 0x00000020 |
| IM able profile. | |
| #define | ALP_CNC_CHANNEL_SRV_MMS 0x00000002 |
| MMS able profile. | |
| #define | ALP_CNC_CHANNEL_SRV_PTT 0x00000040 |
| PTT able profile. | |
| #define | ALP_CNC_CHANNEL_SRV_SHAREABLE 0x00000100 |
| Shareable profile. | |
| #define | ALP_CNC_CHANNEL_SRV_SIP 0x00000010 |
| SIP able profile. | |
| #define | ALP_CNC_CHANNEL_SRV_SYNC 0x00000080 |
| SYNC able profile. | |
| #define | ALP_CNC_CHANNEL_SRV_WAP 0x00000001 |
| WAP able profile. | |
| #define | ALP_CNC_CHANNEL_SRV_WEB 0x00000004 |
| WEB able profile. | |
Connect options | |
| #define | ALP_CNC_CONNECT_ABORTED 512 |
| (internal use) Aborted profile | |
| #define | ALP_CNC_CONNECT_ALLOWED 8192 |
| (internal use) Set when an allowed application open a channel (no need to ask user) | |
| #define | ALP_CNC_CONNECT_ASK_USER 4096 |
| (internal use) Sent when need to ask user in the connection process | |
| #define | ALP_CNC_CONNECT_BACKGROUND 65536 |
| Background connection. | |
| #define | ALP_CNC_CONNECT_CHOOSER_UI 2 |
| Ask user the profile to callback to. | |
| #define | ALP_CNC_CONNECT_DISABLE_FALLBACK 4 |
| Disable fallback mechanism. | |
| #define | ALP_CNC_CONNECT_DISABLE_RECONNECTION 8 |
| Disable auto-reconnnection mechanism. | |
| #define | ALP_CNC_CONNECT_END 128 |
| (internal use) Connection ends | |
| #define | ALP_CNC_CONNECT_PASSWORD_REQUIRED 16384 |
| (internal use) Set when a password prompt is required now for connecting the channel | |
| #define | ALP_CNC_CONNECT_PERSISTENT 256 |
| Persistent (network) channels are marked persistent after connection. | |
| #define | ALP_CNC_CONNECT_PLUGIN_UI 32768 |
| (internal use) Set when an UI input is required now for connecting the channel | |
| #define | ALP_CNC_CONNECT_PROGRESS_UI 1 |
| Display progress UI. | |
| #define | ALP_CNC_CONNECT_SERVER_ASYNCHRONOUS 32 |
| Connect asynchronously (server mode, from a plug-in). | |
| #define | ALP_CNC_CONNECT_SERVER_WRITE_FD 64 |
| (internal use) Write fd to client (server only) | |
| #define | ALP_CNC_CONNECT_SHARED 1024 |
| Shared profile (initiated by an external request). | |
| #define | ALP_CNC_CONNECT_SYNCHRONOUS 16 |
| Connect synchronously. | |
| #define | ALP_CNC_CONNECT_TUNNEL 2048 |
| Connect a tunneled connection. | |
Errors | |
| #define | ALP_CNC_CONNECT_CUSTOM_STATUS(status, plugin, suberr) (((status) & 0xFFFF0000) | plugin | suberr) |
| #define | ALP_CNC_CONNECT_GENERIC_STATUS(suberr) ALP_CNC_CONNECT_STATUS(0, suberr) |
| #define | ALP_CNC_CONNECT_STATUS(plugin, suberr) (ALP_STATUS_CNC_CONNECT_FAILED| plugin | suberr) |
| #define | ALP_STATUS_CNC_CANCELLED ((alp_status_t) (ALP_CLASS_CNC | 0x00230000)) |
| Connection cancelled. | |
| #define | ALP_STATUS_CNC_COMMUNICATION ((alp_status_t) (ALP_CLASS_CNC | 0x000D0000)) |
| Cannot communicate with the Connection Manager server. | |
| #define | ALP_STATUS_CNC_CONNECT_AUTHENTICATION 0x0400 |
| Authentication error. | |
| #define | ALP_STATUS_CNC_CONNECT_BUSY 0x0700 |
| Device or resource not available. | |
| #define | ALP_STATUS_CNC_CONNECT_CANCELLED 0x1000 |
| Connection cancelled. | |
| #define | ALP_STATUS_CNC_CONNECT_FAILED ((alp_status_t) (ALP_CLASS_CNC | 0x00800000)) |
| Connection failed (see connection sub-error codes). | |
| #define | ALP_STATUS_CNC_CONNECT_FATAL_ERROR 0x0100 |
| Only returned by the connect() call in case cncd has crashed: (Tips = soft reset). | |
| #define | ALP_STATUS_CNC_CONNECT_GENERIC_ERROR 0x0000 |
| Generic connection error. | |
| #define | ALP_STATUS_CNC_CONNECT_INVALID_PROFILE 0x0200 |
| Invalid profile (some parameters have bad values). | |
| #define | ALP_STATUS_CNC_CONNECT_MEMORY 0x0300 |
| Out of memory. | |
| #define | ALP_STATUS_CNC_CONNECT_MISSING_PARAMETER 0x0D00 |
| The profile does not define a mandatory parameter. | |
| #define | ALP_STATUS_CNC_CONNECT_NO_CONNECTION 0x0E00 |
| No profile for the connection. | |
| #define | ALP_STATUS_CNC_CONNECT_NO_MORE_CHANNEL 0x0800 |
| No more channel available. | |
| #define | ALP_STATUS_CNC_CONNECT_NO_UI_MODE 0x0F00 |
| Operation requires UI display but is not allowed to. | |
| #define | ALP_STATUS_CNC_CONNECT_NOT_SUPPORTED 0x0500 |
| Device or protocol not supported. | |
| #define | ALP_STATUS_CNC_CONNECT_SERVER_FAILED 0x0B00 |
| A server did not respond a request (e.g. DHCP or VPN server). | |
| #define | ALP_STATUS_CNC_CONNECT_SETUP_FAILED 0x0A00 |
| Configuration of a device / protocol fails. | |
| #define | ALP_STATUS_CNC_CONNECT_TIMEOUT 0x0C00 |
| The connection process timed out. | |
| #define | ALP_STATUS_CNC_CONNECT_UNAVAILABLE 0x0900 |
| Network unvailable. | |
| #define | ALP_STATUS_CNC_CONNECT_UNPLUGGED 0x0600 |
| Device unplugged. | |
| #define | ALP_STATUS_CNC_DATABASE ((alp_status_t) (ALP_CLASS_CNC | 0x000C0000)) |
| The Connection manager database cannot be written/read. | |
| #define | ALP_STATUS_CNC_INDEX_OUT_OF_RANGE ((alp_status_t) (ALP_CLASS_CNC | 0x000B0000)) |
| The item referenced by the index does not exist. | |
| #define | ALP_STATUS_CNC_INVALID_OBJECT ((alp_status_t) (ALP_CLASS_CNC | 0x000F0000)) |
| Operation not allowed in this object. | |
| #define | ALP_STATUS_CNC_INVALID_PARAM ((alp_status_t) (ALP_CLASS_CNC | 0x00010000)) |
| Invalid paremeter in a function call. | |
| #define | ALP_STATUS_CNC_INVALID_PLUGIN_MODULE ((alp_status_t) (ALP_CLASS_CNC | 0x00040000)) |
| The plug-in module cannot be loaded. | |
| #define | ALP_STATUS_CNC_IOCTL_FAILED ((alp_status_t) (ALP_CLASS_CNC | 0x001D0000)) |
| An IOCTL call failed. | |
| #define | ALP_STATUS_CNC_MANDATORY_PARAMETER_NOT_FOUND ((alp_status_t) (ALP_CLASS_CNC | 0x00110000)) |
| A required parameter is not given. | |
| #define | ALP_STATUS_CNC_MEMORY ((alp_status_t) (ALP_CLASS_CNC | 0x00050000)) |
| Out of memory. | |
| #define | ALP_STATUS_CNC_MODULE_ERROR ((alp_status_t) (ALP_CLASS_CNC | 0x000E0000)) |
| The module exists but fails to initialize. | |
| #define | ALP_STATUS_CNC_NO_PLUGIN_FORM ((alp_status_t) (ALP_CLASS_CNC | 0x00130000)) |
| The plug-in does not expose UI. | |
| #define | ALP_STATUS_CNC_NO_UI_MODE ((alp_status_t) (ALP_CLASS_CNC | 0x00240000)) |
| Operation requires UI display but is not allowed to. | |
| #define | ALP_STATUS_CNC_NON_AUTHORIZED ((alp_status_t) (ALP_CLASS_CNC | 0x00220000)) |
| Function call by the current process is not allowed. | |
| #define | ALP_STATUS_CNC_NOT_IMPLEMENTED ((alp_status_t) (ALP_CLASS_CNC | 0x00060000)) |
| For future release. | |
| #define | ALP_STATUS_CNC_OBJECT_ALREADY_EXISTS ((alp_status_t) (ALP_CLASS_CNC | 0x00100000)) |
| The name of the object already exist in the database. | |
| #define | ALP_STATUS_CNC_OBJECT_FULL ((alp_status_t) (ALP_CLASS_CNC | 0x000A0000)) |
| Too much items in an object. | |
| #define | ALP_STATUS_CNC_OBJECT_IN_USE ((alp_status_t) (ALP_CLASS_CNC | 0x00160000)) |
| The objet is already used by another application. | |
| #define | ALP_STATUS_CNC_OBJECT_NOT_FOUND ((alp_status_t) (ALP_CLASS_CNC | 0x00070000)) |
| The object referenced by ID or name does not exist. | |
| #define | ALP_STATUS_CNC_OBJECT_TABLE_FULL ((alp_status_t) (ALP_CLASS_CNC | 0x00030000)) |
| Too much objects locked in a session. | |
| #define | ALP_STATUS_CNC_OPEN_FAILED ((alp_status_t) (ALP_CLASS_CNC | 0x00020000)) |
| A mandatory file/device cannot be open. | |
| #define | ALP_STATUS_CNC_PARAMETER_BAD_VALUE ((alp_status_t) (ALP_CLASS_CNC | 0x001C0000)) |
| A profile parameter has a value out of the expected range. | |
| #define | ALP_STATUS_CNC_PARAMETER_SIZE_OVERFLOW ((alp_status_t) (ALP_CLASS_CNC | 0x001B0000)) |
| A string or binary profile parameter is too big. | |
| #define | ALP_STATUS_CNC_PARAMETER_TYPE_MISMATCHED ((alp_status_t) (ALP_CLASS_CNC | 0x001A0000)) |
| A profile parameter has not the required type. | |
| #define | ALP_STATUS_CNC_PROFILE_UNAVAILABLE ((alp_status_t) (ALP_CLASS_CNC | 0x00210000)) |
| Profile in unavailable (on connection). | |
| #define | ALP_STATUS_CNC_PROFILE_UNUSABLE ((alp_status_t) (ALP_CLASS_CNC | 0x00200000)) |
| Profile in unusable (on connection). | |
| #define | ALP_STATUS_CNC_READ_ONLY_OBJECT ((alp_status_t) (ALP_CLASS_CNC | 0x00190000)) |
| The object cannot be altered. | |
| #define | ALP_STATUS_CNC_RESOURCE_ERROR ((alp_status_t) (ALP_CLASS_CNC | 0x001F0000)) |
| Unable to retrieve a resource. | |
| #define | ALP_STATUS_CNC_SHELLCMD_FAILED ((alp_status_t) (ALP_CLASS_CNC | 0x001E0000)) |
| A shell command failed. | |
| #define | ALP_STATUS_CNC_UNDELETABLE_OBJECT ((alp_status_t) (ALP_CLASS_CNC | 0x00180000)) |
| The object cannot be deleted. | |
Fake file descriptor for network connections | |
| #define | ALP_CNC_CONNECTION_FAKE_FD 0x7FFFFFFF |
| Fake fd when connection does not return a real fd. | |
Predefined control requests | |
| #define | ALP_CNC_CONTROL_AVAILABILITY (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000006) |
| Control request to ask a profile availability. | |
| #define | ALP_CNC_CONTROL_BIND_DESTINATION (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000007) |
| Control to add a destination rule in the IP route table. | |
| #define | ALP_CNC_CONTROL_BUILTIN_CLASS ((uint32_t) 0x00000000) |
| Class for builtin controls. | |
| #define | ALP_CNC_CONTROL_CABLE_DETECTION (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x0000000F) |
| Control used to associate an action on a profile with events on a cable. | |
| #define | ALP_CNC_CONTROL_DECONFIGURE (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000013) |
| Deconfigure TCP/IP settings. | |
| #define | ALP_CNC_CONTROL_DISCONNECT (ALP_CNC_CONTROL_BUILTIN_CLASS | ALP_CNC_CONTROL_RECURSIVE|((uint32_t) 0x00000003)) |
| Control sent to a profile to disconnect it. | |
| #define | ALP_CNC_CONTROL_GET_DATA (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000009) |
| Control used by VPN plug-ins to discuss with the VPN framework. | |
| #define | ALP_CNC_CONTROL_ITEM_CHANGED (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000002) |
| Control sent to a plug-in when a new profile is attached to it. | |
| #define | ALP_CNC_CONTROL_LOWERS_ONLY ((uint32_t) 0x40000000) |
| Mask for control that only applies to lower plug-ins. | |
| #define | ALP_CNC_CONTROL_NET_ACCESS_CONNECTED (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x0000000E) |
| Control used when a profile containing NetAccess is connected. | |
| #define | ALP_CNC_CONTROL_NETIN_DOWN (ALP_CNC_CONTROL_BUILTIN_CLASS | (ALP_CNC_CONTROL_RECURSIVE)|(uint32_t) 0x0000000B) |
| Control used by Netin framework when a new interface comes down. | |
| #define | ALP_CNC_CONTROL_NETIN_UP (ALP_CNC_CONTROL_BUILTIN_CLASS | (ALP_CNC_CONTROL_RECURSIVE)|(uint32_t) 0x0000000A) |
| Control used by Netin framework when a new interface comes up. | |
| #define | ALP_CNC_CONTROL_NETOUT_ABORT (ALP_CNC_CONTROL_BUILTIN_CLASS | ALP_CNC_CONTROL_LOWERS_ONLY | ALP_CNC_CONTROL_RECURSIVE | ((uint32_t) 0x0000000C)) |
| Control used by connecting profiles to abort lower plug-ins. | |
| #define | ALP_CNC_CONTROL_NETOUT_DOWN (ALP_CNC_CONTROL_BUILTIN_CLASS | ALP_CNC_CONTROL_RECURSIVE | ((uint32_t) 0x0000000D)) |
| Control used when link becomes down because of an external event (i.e. pppd exits). | |
| #define | ALP_CNC_CONTROL_PRIORITY (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000001) |
| Control request to define profile priority (at creation time). | |
| #define | ALP_CNC_CONTROL_RECONFIGURE (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000012) |
| Reconfigure TCP/IP settings. | |
| #define | ALP_CNC_CONTROL_RECURSIVE ((uint32_t) 0x80000000) |
| Mask for recursive control. | |
| #define | ALP_CNC_CONTROL_RESUME (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000011) |
| Resume a profile. | |
| #define | ALP_CNC_CONTROL_SUSPEND (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000010) |
| Suspend a profile. | |
| #define | ALP_CNC_CONTROL_TEST (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000004) |
| Control sent to a profile to test it. | |
| #define | ALP_CNC_CONTROL_UNBIND_DESTINATION (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000008) |
| Control to delete a destination rule in the IP route table. | |
| #define | ALP_CNC_CONTROL_USER_CHANGE (ALP_CNC_CONTROL_BUILTIN_CLASS | (uint32_t) 0x00000005) |
| Control sent to a profile when the user made changes to it. | |
Constants used in search functions | |
| #define | ALP_CNC_FIND_ALL ((uint32_t) ALP_CNC_OBJECT_ALL) |
| find objects of any type | |
| #define | ALP_CNC_FIND_ALL_COUNT_MAX 128 |
| max object returned by cnc_object_find_all() | |
| #define | ALP_CNC_FIND_AVAILABLE ((uint32_t) 0x100) |
| find available profiles | |
| #define | ALP_CNC_FIND_CHECK_AVAILABILITY ((uint32_t) 0x800) |
| check availability of objects | |
| #define | ALP_CNC_FIND_CONNECTED ((uint32_t) 0x1000) |
| Find connected objects only. | |
| #define | ALP_CNC_FIND_DEFAULT (ALP_CNC_FIND_PROFILES) |
| find profiles objects by default | |
| #define | ALP_CNC_FIND_GET_TYPE(X) ((uint8_t) ((X) & 0x000000FF)) |
| get the type part of search flags | |
| #define | ALP_CNC_FIND_INTERFACES ((uint32_t) ALP_CNC_OBJECT_INTERFACE) |
| find interface objects | |
| #define | ALP_CNC_FIND_INVISIBLE ((uint32_t) 0x400) |
| find invisible objects | |
| #define | ALP_CNC_FIND_LINKS ((uint32_t) ALP_CNC_OBJECT_LINK) |
| find link objects | |
| #define | ALP_CNC_FIND_PLUGINS ((uint32_t) ALP_CNC_OBJECT_PLUGIN) |
| find plug-in object | |
| #define | ALP_CNC_FIND_PROFILES ((uint32_t) ALP_CNC_OBJECT_PROFILE) |
| find profile objects | |
| #define | ALP_CNC_FIND_PROVISIONED ((uint32_t) 0x2000) |
| Find temporary provisioned objects only. | |
| #define | ALP_CNC_FIND_TEMPLATES ((uint32_t) ALP_CNC_OBJECT_TEMPLATE) |
| find template objects | |
| #define | ALP_CNC_FIND_USABLE ((uint32_t) 0x200) |
| find usable profiles | |
Constants for alp_cnc_object_get_parameters | |
| Can also be in the -63..+62 range to directly specify an count of items in one or the other direction. | |
| #define | ALP_CNC_GET_PARAMETERS_ACTIVE ((int8_t) 128) |
| Search connected profile parameters (attributed IP, DNS, etc). | |
| #define | ALP_CNC_GET_PARAMETERS_CHILDREN ((int8_t) 62) |
| Search parameters in one item and all next ones. | |
| #define | ALP_CNC_GET_PARAMETERS_INHERITED ((int8_t) -64) |
| Search parameters in one item and all previous ones. | |
| #define | ALP_CNC_GET_PARAMETERS_ITEM_ONLY ((int8_t) 0) |
| Search parameters in just one item. | |
| #define | ALP_CNC_GET_PARAMETERS_WHOLE_PROFILE ((int8_t) 63) |
| Search parameters in the whole profile. | |
Flags to manipulate object information | |
| See alp_cnc_object_set_info | |
| #define | ALP_CNC_INFO_FLAG_AVAILABILITY ((uint32_t) 4) |
| set availability | |
| #define | ALP_CNC_INFO_FLAG_FNAME ((uint32_t) 1024) |
| set friendly name | |
| #define | ALP_CNC_INFO_FLAG_MANUAL_ID ((uint32_t) 256) |
| set manual id | |
| #define | ALP_CNC_INFO_FLAG_MASK ((uint32_t) 2047) |
| set friendly name | |
| #define | ALP_CNC_INFO_FLAG_OPTIONS ((uint32_t) 8) |
| set options | |
| #define | ALP_CNC_INFO_FLAG_OPTIONS_CLEAR ((uint32_t) 32) |
| clear some option flags | |
| #define | ALP_CNC_INFO_FLAG_OPTIONS_INVERT ((uint32_t) 64) |
| invert some option flags | |
| #define | ALP_CNC_INFO_FLAG_OPTIONS_SET ((uint32_t) 16) |
| set some option flags | |
| #define | ALP_CNC_INFO_FLAG_PRIORITY ((uint32_t) 2) |
| set priority | |
| #define | ALP_CNC_INFO_FLAG_TOGGLE_LINK ((uint32_t) 512) |
| change type to link | |
| #define | ALP_CNC_INFO_FLAG_TOGGLE_TEMPLATE ((uint32_t) 128) |
| change type to template | |
| #define | ALP_CNC_NAME_FLAG_INFO ((uint32_t) 1) |
| set name | |
Special index | |
| The following value can be used as an index in alp_cnc_object_insert_item to insert an item at the end of the profile | |
| #define | ALP_CNC_INSERT_AT_END_INDEX ((int16_t) 0x7FFF) |
| used as an index in alp_cnc_object_insert_item to insert an item at the end of the object | |
Generic User Interface | |
| #define | ALP_CNC_MODE_APP_SWITCH ((uint32_t) 0x8000) |
| launch panel doin an app switch | |
| #define | ALP_CNC_MODE_DELETE ((uint32_t) 8) |
| launch panel to delete a profile | |
| #define | ALP_CNC_MODE_EDIT ((uint32_t) 16) |
| launch panel to edit a profile | |
| #define | ALP_CNC_MODE_FULL (ALP_CNC_MODE_TECHNOLOGY | ALP_CNC_MODE_PROFILE | ALP_CNC_MODE_NEW | ALP_CNC_MODE_DELETE | ALP_CNC_MODE_EDIT) |
| full application mode | |
| #define | ALP_CNC_MODE_NEW ((uint32_t) 4) |
| launch panel in new profile mode | |
| #define | ALP_CNC_MODE_NO_DONE_BUTTON ((uint32_t) 0x4000) |
| don't display the "Done" button | |
| #define | ALP_CNC_MODE_PANEL (ALP_CNC_MODE_PROFILE | ALP_CNC_MODE_NEW | ALP_CNC_MODE_DELETE | ALP_CNC_MODE_EDIT) |
| panel mode | |
| #define | ALP_CNC_MODE_PROFILE ((uint32_t) 2) |
| launch panel in profile list mode | |
| #define | ALP_CNC_MODE_TECHNOLOGY ((uint32_t) 1) |
| deprecated | |
| #define | ALP_CNC_UI_CTL_OP_CANCEL 1 |
| When the edition of a profile is cancelled. | |
| #define | ALP_CNC_UI_CTL_OP_CHECK 3 |
| When the user changed the tab. | |
| #define | ALP_CNC_UI_CTL_OP_SAVE 2 |
| When the modification of a profile is confirmed. | |
| typedef _AlpCncEditParameters | AlpCncEditParameters |
Constants to use with alp_cnc_object_move_item | |
| #define | ALP_CNC_MOVE_AS_DEFAULT -128 |
| move an item top | |
| #define | ALP_CNC_MOVE_DOWN +1 |
| move an item down | |
| #define | ALP_CNC_MOVE_LAST 127 |
| move an item bottom | |
| #define | ALP_CNC_MOVE_UP -1 |
| move an item up | |
Object types | |
| #define | ALP_CNC_OBJECT_ALL ((uint8_t) 0xFF) |
| All object types. | |
| #define | ALP_CNC_OBJECT_INTERFACE ((uint8_t) 0x02) |
| Interface object. | |
| #define | ALP_CNC_OBJECT_LINK ((uint8_t) 0x10) |
| Link object. | |
| #define | ALP_CNC_OBJECT_PLUGIN ((uint8_t) 0x01) |
| Plugin object. | |
| #define | ALP_CNC_OBJECT_PROFILE ((uint8_t) 0x04) |
| Profile object. | |
| #define | ALP_CNC_OBJECT_TEMPLATE ((uint8_t) 0x08) |
| Template object. | |
Options flags for AlpCncObjectInfo | |
| #define | ALP_CNC_OPTION_IS_CONNECTED ((uint32_t) 0x1000) |
| the profile is connected | |
| #define | ALP_CNC_OPTION_IS_SUSPENDED ((uint32_t) 0x2000) |
| the profile is suspended | |
| #define | ALP_CNC_OPTION_MANUAL_MODE ((uint32_t) 0x0080) |
| the plug-in is in manual mode | |
| #define | ALP_CNC_OPTION_PERSISTENT ((uint32_t) 0x0040) |
| the plug-in defines persistent profiles | |
| #define | ALP_CNC_OPTION_READ_ONLY ((uint32_t) 0x0008) |
| the object is read only | |
| #define | ALP_CNC_OPTION_REPLACE_ON_USING ((uint32_t) 0x0010) |
| the template does a replace operation even for "{using}" sub-templates | |
| #define | ALP_CNC_OPTION_TESTABLE ((uint32_t) 0x0200) |
| the plug-in defines testable profiles | |
| #define | ALP_CNC_OPTION_UNDELETABLE ((uint32_t) 0x0020) |
| the object is not deletable | |
| #define | ALP_CNC_OPTION_UNSEARCHABLE ((uint32_t) 0x0004) |
| the object is not searcheable | |
| #define | ALP_CNC_OPTION_USABLE ((uint32_t) 0x0001) |
| the profile is usable (connectable) | |
| #define | ALP_CNC_OPTION_USER_CAN_CHANGE_MODE ((uint32_t) 0x0100) |
| the user can change the mode (automatic/manual) of this plug-in | |
| #define | ALP_CNC_OPTION_VISIBLE ((uint32_t) 0x0002) |
| the profile is visible in configuration panels | |
Parameter checking | |
| #define | ALP_CNC_PARAMETER_CHECK_MANDATORY 0x02 |
| Check presence/absence when getting parameters. | |
| #define | ALP_CNC_PARAMETER_CHECK_NOTHING 0 |
| Does not anything when getting parameters. | |
| #define | ALP_CNC_PARAMETER_CHECK_TYPE_AND_SIZE 0x01 |
| Check type and size when getting parameters. | |
| #define | ALP_CNC_PARAMETER_NO_SIZE 0 |
| Does not check size when used with ALP_CNC_PARAMETER_CHECK_TYPE_AND_SIZE. | |
Reserved/predefined parameter names. Reserved range must include 0 | |
| #define | ALP_CNC_PARAMETER_FIRST_RESERVED ((uint32_t) 0x00000000) |
| First reserved parameter name. | |
| #define | ALP_CNC_PARAMETER_LAST_RESERVED ((uint32_t) 0x0000001F) |
| Last reserved parameter name. | |
| #define | ALP_CNC_PARAMETER_TABLE_END ALP_CNC_PARAMETER_FIRST_RESERVED |
| Fake name meaning: "end of paremeter table". | |
| #define | ALP_CNC_PARAMETER_UNDEFINED (ALP_CNC_PARAMETER_FIRST_RESERVED + 1) |
| Fake name meaning: "paremeter undefined". | |
Parameter value types | |
| #define | ALP_CNC_PARAMETER_TYPE_BINARY ((uint8_t) 3) |
| Binary parameter. | |
| #define | ALP_CNC_PARAMETER_TYPE_INTEGER ((uint8_t) 1) |
| Integer parameter. | |
| #define | ALP_CNC_PARAMETER_TYPE_STRING ((uint8_t) 2) |
| String parameter. | |
| #define | ALP_CNC_PARAMETER_TYPE_UNDEFINED ((uint8_t) 0) |
| Undefined parameter. | |
Defined priorities | |
| #define | ALP_CNC_PRIORITY_EDGE ((uint8_t) 0) |
| default priority of edge objects | |
| #define | ALP_CNC_PRIORITY_UNKNOWN_PROFILE ((uint8_t) 1) |
| default priority of new profiles | |
Progress callback sub-functions | |
| #define | ALP_CNC_PROGRESS_CHOOSER 2 |
| ask user for next profile to connect | |
| #define | ALP_CNC_PROGRESS_FINI 3 |
| finalize progress | |
| #define | ALP_CNC_PROGRESS_INIT 0 |
| initialize progress | |
| #define | ALP_CNC_PROGRESS_UPDATE 1 |
| update progress | |
Connection state constants used in AlpCncChannel.state | |
| #define | ALP_CNC_STATE_CONNECTED ((uint8_t) 0x01) |
| Channel is connected. | |
| #define | ALP_CNC_STATE_CONNECTING ((uint8_t) 0x02) |
| Channel is connecting. | |
| #define | ALP_CNC_STATE_DISCONNECTED ((uint8_t) 0x04) |
| Channel is disconnected (was connected/connecting and became disconnnected). | |
| #define | ALP_CNC_STATE_DISCONNECTING ((uint8_t) 0x08) |
| Channel is disconnecting. | |
| #define | ALP_CNC_STATE_FINAL (ALP_CNC_STATE_CONNECTED | ALP_CNC_STATE_DISCONNECTED | ALP_CNC_STATE_SUSPENDED) |
| channel stable states | |
| #define | ALP_CNC_STATE_NOT_CONNECTED ((uint8_t) 0x20) |
| Channel is not connected (has never been connected). | |
| #define | ALP_CNC_STATE_SUSPENDED ((uint8_t) 0x10) |
| Channel is suspended. | |
| #define | ALP_CNC_STATE_UNKNOWN ((uint8_t) 0x00) |
| reserved | |
Notifications | |
| #define | ALP_NOTIFY_APP_ID_CNC_SERVER "cncd" |
| Notification app id of connection manager server. | |
| #define | ALP_NOTIFY_EVENT_CNC_AVAILABILITY "/alp/cnc/availability" |
| Notification eventually sent by a transport when it becomes available. | |
| #define | ALP_NOTIFY_EVENT_CNC_CONNECTION "/alp/cnc/connection" |
| Notification sent by cncd when a profile is connected or disconnected. | |
Generic object operations | |
| static char * | alp_cnc_builtin_gettext (char *name) |
| alp_status_t | alp_cnc_object_attach (uint32_t fromId, uint32_t toId) |
| alp_status_t | alp_cnc_object_delete (uint32_t nodeId) |
| alp_status_t | alp_cnc_object_delete_item (uint32_t lockedId, uint32_t itemIndex) |
| alp_status_t | alp_cnc_object_find_all (uint32_t objectId, uint32_t options, int16_t *countP, AlpCncObjectInfo **infoArrayP) |
| void | alp_cnc_object_find_close (uint32_t searchId) |
| uint32_t | alp_cnc_object_find_first (char *searchStr, uint32_t options, uint32_t *searchIdP, alp_status_t *errP) |
| uint32_t | alp_cnc_object_find_next (uint32_t searchId, alp_status_t *errP) |
| alp_status_t | alp_cnc_object_get_dependencies (uint32_t objectId, uint32_t **objectsPP, int16_t *countP) |
| uint32_t | alp_cnc_object_get_id (const char *nameStr) |
| alp_status_t | alp_cnc_object_get_info (uint32_t recordId, AlpCncObjectInfo *infoP) |
| uint32_t | alp_cnc_object_get_item_id (uint32_t lockedId, int16_t index) |
| alp_status_t | alp_cnc_object_get_item_index (uint32_t lockedId, int16_t *index, char *nameStr) |
| uint32_t | alp_cnc_object_get_length (uint32_t lockedId) |
| alp_status_t | alp_cnc_object_insert_item (uint32_t lockedId, int16_t *atIndex, uint32_t itemId, AlpCncParameter parameters[]) |
| alp_status_t | alp_cnc_object_lock (uint32_t Id) |
| alp_status_t | alp_cnc_object_move_item (uint32_t itemId, int16_t newIndexRelative) |
| alp_status_t | alp_cnc_object_regroup_submit (uint32_t lockedId) |
| alp_status_t | alp_cnc_object_set_info (uint32_t recordId, AlpCncObjectInfo *infoP, uint32_t flags) |
| alp_status_t | alp_cnc_object_submit (uint32_t lockedId) |
| alp_status_t | alp_cnc_object_unlock (uint32_t lockedId) |
| alp_status_t | alp_cnc_sub_object_assign (uint32_t lockedId, int16_t itemIndex, uint32_t newRefId) |
Application connectivity API | |
| alp_status_t | alp_cnc_channel_add_service (uint8_t chan_id, uint32_t service) |
| alp_status_t | alp_cnc_channel_close (uint8_t chan_id, uint8_t reason) |
| alp_status_t | alp_cnc_channel_connect (uint8_t chan_id) |
| alp_status_t | alp_cnc_channel_create (char *tags, uint32_t flags, uint8_t *chan_id) |
| alp_status_t | alp_cnc_channel_create_id (uint32_t profile_id, uint32_t flags, uint8_t *chan_id) |
| alp_status_t | alp_cnc_channel_destroy (uint8_t chan_id) |
| alp_status_t | alp_cnc_channel_disconnect (uint8_t chan_id, uint8_t reason) |
| AlpCncChannel * | alp_cnc_channel_get (uint8_t chan_id, alp_status_t *status) |
| alp_status_t | alp_cnc_channel_open (char *tags, uint32_t flags, uint8_t *chan_id) |
| alp_status_t | alp_cnc_channel_open_id (uint32_t profile_id, uint32_t flags, uint8_t *chan_id) |
| alp_status_t | alp_cnc_channel_select (uint8_t chan_id) |
| alp_status_t | alp_cnc_channel_set_default (char *tags, uint32_t default_id) |
| alp_status_t | alp_cnc_channel_set_profiles (uint8_t chan_id, uint8_t count, uint32_t *listP) |
| alp_status_t | alp_cnc_channel_set_proxies (uint8_t chan_id, uint8_t count, uint32_t *listP) |
| AlpCncChannel * | alp_cnc_channel_wait (alp_status_t *status) |
Priviligied connectivity API | |
| alp_status_t | alp_cnc_channel_get_owner (uint8_t channel_id, pid_t *pidP) |
| alp_status_t | alp_cnc_object_control (uint32_t objectId, uint32_t request, AlpCncControl *controlP) |
| alp_status_t | alp_cnc_profile_connect (uint32_t profileId, uint32_t flags, int *fd) |
| alp_status_t | alp_cnc_profile_disconnect (uint32_t profileId, uint8_t reason) |
| alp_status_t | alp_cnc_profile_get_clients (uint32_t profileId, uint8_t *pidCountP, pid_t **pidListP) |
Specific parameter operations | |
| alp_status_t | alp_cnc_channel_proxy_get_settings (uint8_t channel_id, int8_t index, AlpOMADM_PXLogicalType *PXLogical) |
| alp_status_t | alp_cnc_object_get_parameters (uint32_t lockedId, int16_t itemIndex, int8_t method, AlpCncParameter parameters[]) |
| alp_status_t | alp_cnc_object_set_parameters (uint32_t lockedId, int16_t itemIndex, AlpCncParameter parameters[]) |
| void | alp_cnc_parameters_free (AlpCncParameter parameters[]) |
| void | alp_cnc_parameters_init (AlpCncParameter parameters[], int32_t n) |
| alp_status_t | alp_cnc_profile_proxy_get_settings (uint32_t profile_id, AlpOMADM_PXLogicalType *PXLogical) |
Specific interface and edge operations | |
| alp_status_t | alp_cnc_edge_delete (uint32_t fromId, uint32_t toId) |
| alp_status_t | alp_cnc_edge_new (uint32_t fromId, uint32_t toId) |
| alp_status_t | alp_cnc_interface_new (const char *nameStr, uint32_t *Id) |
| alp_status_t | alp_cnc_object_ungroup (uint32_t profileId, bool regroupTags) |
New libc network API | |
| hostent * | alp_cnc_gethostbyname (const char *name) |
| int | alp_cnc_socket (int domain, int type, int protocol) |
| int | alp_cnc_unbound_socket (int domain, int type, int protocol) |
Connection mechanisms | |
| alp_status_t | alp_cnc_job_end (uint32_t jobId, int nbArgs, char **args) |
| alp_status_t | alp_cnc_job_end_fini (int fd, int nbArgs, char **args) |
| int | alp_cnc_job_end_init (uint32_t jobId) |
Specific profile operations | |
| alp_status_t | alp_cnc_object_copy (uint32_t *profileId, int16_t from, int16_t to) |
| uint32_t | alp_cnc_object_decode (const char *profileName, const char *pathStr) |
| char * | alp_cnc_object_encode (uint32_t profileId, int16_t index) |
| alp_status_t | alp_cnc_profile_new (const char *nameStr, uint32_t *Id) |
Secret objects operations | |
| alp_status_t | alp_cnc_secret_delete (uint32_t profile_id, uint32_t parameter) |
| alp_status_t | alp_cnc_secret_edit (const char *data, uint32_t profile_id, uint32_t parameter) |
| alp_status_t | alp_cnc_secret_new (const char *data, uint32_t profile_id, uint32_t parameter) |
Defines | |
| #define | ALP_CNC_ICON_NAME_MAX_SIZE 64 |
| #define | ALP_CNC_INVALID_RECORD_ID 0 |
| Invalid object Id. | |
| #define | ALP_CNC_MAX_NAME_LENGTH 63 |
| name max size | |
| #define | CNC_BUILTIN_DOMAINNAME "cnc_builtin" |
| Builtin profiles domain name (for gettext and friends). | |
Typedefs | |
| typedef _AlpCncChannel | AlpCncChannel |
| Channel definition. | |
| typedef _AlpCncChannelProfile | AlpCncChannelProfile |
| Channel profile information. | |
| typedef _AlpCncControl | AlpCncControl |
| definition | |
| typedef _AlpCncControlAvailability | AlpCncControlAvailability |
| the availability control type | |
| typedef _AlpCncControlBindDestination | AlpCncControlBindDestination |
| the bind destination control type | |
| typedef _AlpCncControlCableDetection | AlpCncControlCableDetection |
| the cable detection control type | |
| typedef _AlpCncControlNetin | AlpCncControlNetin |
| the type used in NETIN_xxxx controls | |
| typedef _AlpCncControlReconfigure | AlpCncControlReconfigure |
| the reconfigure control | |
| typedef _AlpCncObjectInfo | AlpCncObjectInfo |
| Structure to get/set object info. | |
| typedef _AlpCncParameter | AlpCncParameter |
| Structure to manipulate item parameters. | |
| typedef void *() | AlpCncProgressCallback (int request, void *data, void *u_data) |
| typedef _AlpCncSession | AlpCncSession |
| typedef _AlpNotifyEventCncAvailability | AlpNotifyEventCncAvailability |
| the type used in the availability notification | |
| typedef _AlpNotifyEventCncConnection | AlpNotifyEventCncConnection |
| the type used in the connection notification | |
Variables | |
| AlpCncProgressCallback * | gcnc_progress |
| Progress callback global. | |
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.