Connection Manager: What's in CONNMGR_CONNECTION_DETAILED_STATUS?

The CONNMGR_CONNECTION_DETAILED_STATUS struct tells the detailes information of all connections that connection manager can use to build connection path to satisfy a connection request at that point of time. It can be otabined by calling ConnMgrQueryDetailedStatus.

typedef struct _CONNMGR_CONNECTION_DETAILED_STATUS{

  struct _CONNMGR_CONNECTION_DETAILED_STATUS* pNext;

  DWORD dwVer;

  DWORD dwParams;

  DWORD dwType;

  DWORD dwSubtype;

  DWORD dwFlags;

  DWORD dwSecure;

  GUID guidDestNet;

  GUID guidSourceNet;

  TCHAR* szDescription;

  TCHAR* szAdapterName;

  DWORD dwConnectionStatus;

  SYSTEMTIME LastConnectTime;

  DWORD dwSignalQuality;

  CONNMGR_CONNECTION_IPADDR* pIPAddr;

} CONNMGR_CONNECTION_DETAILED_STATUS;

Two interesting fields of this struct are szAdapterName and szDescription. Here is the output from a HTC PPC with GPRS and WiFi active:

szAdapterName: szDescription

Cellular Line: T-Mobile USA

(NULL): SOCKS-{18AD9FBD-F716-ACB6-FD8A-1965DB95B814}

(NULL): HTTP-{18AD9FBD-F716-ACB6-FD8A-1965DB95B814}

(NULL): T-Mobile USA Proxy Internet

(NULL): null-corp-{18AD9FBD-F716-ACB6-FD8A-1965DB95B814}

(NULL): HTTP-{ADB0B001-10B5-3F39-27C6-9742E785FCD4}

TIACXWLN1: MCT

 

Observations:

1. The connected APN name (for example, ‘T-Mobile USA’) is in the szDescription field, with ‘Cellular Line’ as its adapter name. You can verify these two values by dumping CM_GPRSEntries using rapiconfig. The adapter name ‘Cellular Line’ is the DeviceName parameter in a GPRS entry provisioned to the device.

2. Wireless LAN adapter name varies on devices. Here the adapter name is ‘TIACXWLN1’. The connected SSID is MCT, as in the szDescription field.

3. All proxies, including null proxies are listed as connections. Their adapter name is ‘NULL’.

Update: the dwType field can be used to identify connection types:

dwType Value Description
CM_CONNTYPE_UNKNOWN Unknown connection.
CM_CONNTYPE_CELLULAR Cellular connection.
CM_CONNTYPE_NIC Network interface card (NIC) connection.
CM_CONNTYPE_BLUETOOTH Bluetooth connection.
CM_CONNTYPE_UNIMODEM Unimodem connection.
CM_CONNTYPE_VPN Virtual private network (VPN) connection.
CM_CONNTYPE_PROXY Proxy connection. For more proxy constants, see Connection Manager Proxy Flag Constants.
CM_CONNTYPE_PC PC connection.

Comments

  • Anonymous
    April 16, 2008
    Hello Pei, I've been studying msdn and the ConnectionManager functions so that I can force a particular application to use th GPRS path rather than any available wireless or Desktop Pass-thru connections that may be available. After reading your post, I see how to identify the Wifi (by SSID), but what does the DTPT look like?  Is it just another proxy?  Any special identifiers or markings? How would I identify the GPRS connection specifically?  I'm going to guess that the connection name and description may change based on where it's deployed, so is there a class that indicates it's coming from the cellcore rather than something else? Now, let's pretend that I've gotten past this...  Can I simply use the GUID that's associated with the status description as the destination network like this: ConnMgrQueryDetailedStatus(pStatus, &dwSize); ConnMgrMapURL(TEXT("myserver.server.com", &pServer->guidDestNet, &dwIndex); Thanks, DD

  • Anonymous
    September 02, 2009
    Hi, I keep getting dwSubType as CM_CONNSUBTYPE_CELLULAR_CSD for my Verizon phone. Why don't I get CM_CONNSUBTYPE_CELLULAR_1XEVDO as the dwSubType ? I am using ConnMgrQueryDetailedStatus() to get the detailed status. Thanks, Amol

  • Anonymous
    September 10, 2009
    @ Amol: Because (look at the comments after # define in connmgr_conntypes.h in SDK) #define CM_CONNSUBTYPE_CELLULAR_CSD     1 #define CM_CONNSUBTYPE_CELLULAR_GPRS    2 #define CM_CONNSUBTYPE_CELLULAR_1XRTT   3   // @constdefine Not distinct from CSD. #define CM_CONNSUBTYPE_CELLULAR_1XEVDO  4   // @constdefine Not distinct from CSD. #define CM_CONNSUBTYPE_CELLULAR_1XEVDV  5   // @constdefine Not distinct from CSD.

  • Anonymous
    December 03, 2009
    Hi Pei, thank you for all the valuable information you are providing in this blog. I have a question.  When I make a call to "ConnMgrEstablishConnection", a pop up dialog appears and shows "connecting GPRS.." message.  Is there a way to disable that pop-up dialog or replace it with a custom dialog/message? thanks, -ted