Communication buffer exit library information structure

The information structure indicates the communication protocol information for the current physical connection.

The db2commexitCommInfo_v1 structure that is passed to each communication buffer exit library function follows. This structure is included in the db2commexit.h file.
struct db2commexitIPV4Info
{
   sockaddr_in client_sockaddr;
   sockaddr_in server_sockaddr;
};

struct db2commexitIPV6Info
{
   sockaddr_in6 client_sockaddr;
   sockaddr_in6 server_sockaddr;
};

struct db2commexitIPCInfo
{
   void * pSharedMemSegmentHandle;
};

struct db2commexitNamedPipeInfo
{
   void * handle;
};


struct db2commexitCommInfo_v1
{
   db2int32 clientProtocol;   // SQL_PROTOCOL_ ...
   db2int32 connectionType; // unknown, local or gateway

   db2int32 hostnameLen;
   db2int32 instanceLen;
   db2int32 dbnameLen;
   db2int32 dbaliasLen;
   db2int32 inbound_appl_id_len;
   db2int32 outbound_appl_id_len;

   db2int32 clientPID;      // Client PID
   db2int32 reserved2;

   db2NodeType member;

   char hostname[SQL_HOSTNAME_SZ+1];
   char instance[DB2COMMEXIT_INSTANCE_SZ + 1];
   char dbname[DB2COMMEXIT_DBNAME_SZ + 1];
   char dbalias[DB2COMMEXIT_DBNAME_SZ + 1];
   char inbound_appl_id[SQLM_APPLID_SZ + 1];
   char outbound_appl_id[SQLM_APPLID_SZ + 1];

   char reservedChar1[128];

   union
   {
      db2commexitIPV4Info ipv4Info;
      db2commexitIPV6Info ipv6Info;
      db2commexitIPCInfo  ipcInfo;
      db2commexitNamedPipeInfo namedPipeInfo;
   }
};