1762 |
|
|
1763 |
static void do_service_host(HttpRequest req, HttpResponse res, Service_T s) { |
static void do_service_host(HttpRequest req, HttpResponse res, Service_T s) { |
1764 |
|
|
1765 |
|
Icmp_T icmp; |
1766 |
Port_T port; |
Port_T port; |
1767 |
int available= TRUE; |
int available= TRUE; |
1768 |
|
|
1769 |
|
for(icmp= s->icmplist; icmp; icmp= icmp->next) { |
1770 |
|
if(!icmp->is_available) { |
1771 |
|
available= FALSE; |
1772 |
|
break; |
1773 |
|
} |
1774 |
|
} |
1775 |
|
|
1776 |
for(port= s->portlist; port; port= port->next) { |
for(port= s->portlist; port; port= port->next) { |
1777 |
if(!port->is_available) { |
if(!port->is_available) { |
1778 |
available= FALSE; |
available= FALSE; |
1825 |
} |
} |
1826 |
} |
} |
1827 |
} |
} |
1828 |
|
{ |
1829 |
|
Icmp_T n; |
1830 |
|
for(n= s->icmplist; n; n= n->next) |
1831 |
|
out_print(res, |
1832 |
|
"<tr><td>ICMP</td>" |
1833 |
|
"<td>if failed %s with timeout %d seconds then %s</td></tr>", |
1834 |
|
icmpnames[n->type], n->timeout, actionnames[n->action]); |
1835 |
|
} |
1836 |
|
|
1837 |
print_alerts(res, s); |
print_alerts(res, s); |
1838 |
|
|