|
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.
|
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.
|
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.
|
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) |
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) |
Defines |
| #define | ALP_CNC_ICON_NAME_MAX_SIZE 64 |
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 void *() | AlpCncProgressCallback (int request, void *data, void *u_data) |
| 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.