%! /********************************************************************** ** ** SAP AG Walldorf ** (C) Copyright SAP AG 1999-2010 ** ***********************************************************************/ #include "publicincl/tools.inc" struct icm_conn_info_type { string role; string protocol; string status; int port_local; int port_peer; string addr_local; string addr_peer; int nihdl; int conn; int guid; string conn_time; int proc_timeout; int keep_alive_timeout; }; %> <% int i, nr, dir, max; int rc; string browser, appl; string sstr; struct icm_sort_type sort_tab[]; struct icm_conn_info_type icm_conn_tab[]; const string ssort = "../public/images/sort.gif"; const string sasc = "../public/images/sortasc.gif"; const string sdesc = "../public/images/sortdesc.gif"; sort_tab[0].header = "Conn ID"; sort_tab[0].tool = "Sort by unique connection identifier"; sort_tab[0].ffield = "conn"; sort_tab[1].header = "Protocol"; sort_tab[1].tool = "Sort by used protocol"; sort_tab[1].ffield = "protocol"; sort_tab[2].header = "Role"; sort_tab[2].tool = "Sort by incoming (server) or outgoing (client) connection"; sort_tab[2].ffield = "role"; sort_tab[3].header = "Request Type"; sort_tab[3].tool = "Sort by currently executed operation"; sort_tab[3].ffield = "status"; sort_tab[4].header = "Peer Addr:Port"; sort_tab[4].tool = "Sort by peer IP address"; sort_tab[4].ffield = "addr_peer"; sort_tab[5].header = "Local Addr:Port"; sort_tab[5].tool = "Sort by local IP address"; sort_tab[5].ffield = "addr_local"; sort_tab[6].header = "Proc Timeout"; sort_tab[6].tool = "Sort by maximum request processing timeout in the server"; sort_tab[6].ffield = "proc_timeout"; sort_tab[7].header = "KA Timeout"; sort_tab[7].tool = "Sort by maximum keep alive timeout of unused connection"; sort_tab[7].ffield = "keep_alive_timeout"; sort_tab[8].header = "Connection Time"; sort_tab[8].tool = "Sort by connection establishing time"; sort_tab[8].ffield = "conn_time"; sort_tab[9].header = "NI"; sort_tab[9].tool = "Sort by internal Network Interface Identifier for this connection"; sort_tab[9].ffield = "nihdl"; max = arraylen(sort_tab); for (i=0; i < max; i++){ sort_tab[i].url = ssort; sort_tab[i].dir = 0; } browser = __icm_get_browser_type(); appl = __icm_get_system_property ("app_name"); dir = __icm_get_form_field ("dir"); sstr = __icm_get_form_field ("sstr"); __icm_get_conn_info (icm_conn_tab); if (sstr != "") sort (icm_conn_tab, dir, sstr); max = arraylen(sort_tab); for (i=0; i < max; i++){ if (sstr == sort_tab[i].ffield){ if (dir == 1) { sort_tab[i].url = sdesc; sort_tab[i].dir = -1; } else if (dir == -1) { sort_tab[i].url = sasc; sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } %>