738 |
|
|
739 |
if(n->family == AF_INET) { |
if(n->family == AF_INET) { |
740 |
|
|
741 |
printf(" %-20s = if failed %s:%d%s [protocol %s%s] with " |
printf(" %-20s = if failed %s:%d%s [%s via %s] with " |
742 |
"timeout %d seconds %s then %s else if passed %s then %s\n", |
"timeout %d seconds %s then %s else if passed %s then %s\n", |
743 |
"Port", n->hostname, n->port, n->request?n->request:"", |
"Port", n->hostname, n->port, n->request?n->request:"", |
744 |
n->protocol->name, n->SSL.use_ssl?" via SSL":"", n->timeout, |
n->protocol->name, Util_portTypeDescription(n), |
745 |
|
n->timeout, |
746 |
ratio1, actionnames[a->failed->id], |
ratio1, actionnames[a->failed->id], |
747 |
ratio2, actionnames[a->passed->id]); |
ratio2, actionnames[a->passed->id]); |
748 |
|
|
1758 |
} |
} |
1759 |
|
|
1760 |
|
|
1761 |
|
/** |
1762 |
|
* Print port type description |
1763 |
|
* @param p A port structure |
1764 |
|
* @return the socket type description |
1765 |
|
*/ |
1766 |
|
char *Util_portTypeDescription(Port_T p) { |
1767 |
|
switch(p->type) { |
1768 |
|
case SOCK_STREAM: |
1769 |
|
return p->SSL.use_ssl?"TCPSSL":"TCP"; |
1770 |
|
case SOCK_DGRAM: |
1771 |
|
return "UDP"; |
1772 |
|
default: |
1773 |
|
return "UNKNOWN"; |
1774 |
|
} |
1775 |
|
} |
1776 |
|
|
1777 |
|
|
1778 |
/* ----------------------------------------------------------------- Private */ |
/* ----------------------------------------------------------------- Private */ |
1779 |
|
|
1780 |
|
|