crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs

showservices.c (949B)


      1 /*************************************************************************
      2  * This file is part of Crosroads 1.23, a load balancer and fail over
      3  * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL.
      4  * Visit http://crossroads.e-tunity.com for information.
      5  *************************************************************************/
      6 #include "crossroads.h"
      7 
      8 int show_services (int ac, char **av) {
      9     int i, j;
     10 
     11     for (i = 0; i < nservice; i++) {
     12 	printf ("Service %s (on port %d) %d backends\n",
     13 		service[i].name, service[i].port, service[i].nbackend);
     14 	if (service[i].allowfile)
     15 	    printf (" Allow file: %s\n", service[i].allowfile);
     16 	if (service[i].denyfile)
     17 	    printf (" Deny file: %s\n", service[i].denyfile);
     18 	for (j = 0; j < service[i].nbackend; j++)
     19 	    printf ("  Backend %s (%s:%d)\n",
     20 		    service[i].backend[j].name,
     21 		    service[i].backend[j].server,
     22 		    service[i].backend[j].port);
     23     }
     24     return (1);
     25 }