/[radius]/radius/radiusd/radiusd.c
ViewVC logotype

Diff of /radius/radiusd/radiusd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.133 by gray, Tue Jun 17 16:21:11 2003 UTC revision 1.134 by gray, Thu Jun 19 12:39:42 2003 UTC
# Line 20  Line 20 
20  # include <config.h>  # include <config.h>
21  #endif  #endif
22  #include <sys/types.h>  #include <sys/types.h>
23    #include <sys/stat.h>
24  #include <netinet/in.h>  #include <netinet/in.h>
25  #include <netdb.h>  #include <netdb.h>
26  #include <fcntl.h>  #include <fcntl.h>
# Line 34  Line 35 
35  #include <radargp.h>  #include <radargp.h>
36  #include <radutmp.h>  #include <radutmp.h>
37  #include <rewrite.h>  #include <rewrite.h>
38    #include <argcv.h>
39  #include <snmp/asn1.h>  #include <snmp/asn1.h>
40  #include <snmp/snmp.h>  #include <snmp/snmp.h>
41    #ifdef USE_SQL
42    # include <radsql.h>
43    #endif
44    
45  const char *argp_program_version = "radiusd (" PACKAGE ") " VERSION;  const char *argp_program_version = "radiusd (" PACKAGE ") " VERSION;
46  static char doc[] = N_("GNU radius daemon");  static char doc[] = N_("GNU radius daemon");
# Line 146  static RETSIGTYPE sig_handler(int sig); Line 151  static RETSIGTYPE sig_handler(int sig);
151  void radiusd_main_loop();  void radiusd_main_loop();
152  static size_t radius_count_channels();  static size_t radius_count_channels();
153  void radiusd_run_preconfig_hooks(void *data);  void radiusd_run_preconfig_hooks(void *data);
154            static int test_shell();        
155  struct cfg_stmt config_syntax[];  struct cfg_stmt config_syntax[];
156    
157    
# Line 312  max_ttl(time_t *t) Line 317  max_ttl(time_t *t)
317  static void  static void
318  terminate_subprocesses()  terminate_subprocesses()
319  {  {
         int i;  
320          int kill_sent = 0;          int kill_sent = 0;
321          time_t t;          time_t t;
322                    
# Line 384  radiusd_setup() Line 388  radiusd_setup()
388  void  void
389  common_init()  common_init()
390  {  {
         int i;  
           
391          radlog(L_INFO, _("Starting"));          radlog(L_INFO, _("Starting"));
392    
393          radiusd_pid = getpid();          radiusd_pid = getpid();
# Line 415  common_init() Line 417  common_init()
417  void  void
418  radiusd_daemon()  radiusd_daemon()
419  {  {
         FILE *fp;  
420          char *p;          char *p;
421          int i;          int i;
422          pid_t pid;          pid_t pid;
# Line 520  void Line 521  void
521  radiusd_start()  radiusd_start()
522  {  {
523  #ifdef USE_SERVER_GUILE  #ifdef USE_SERVER_GUILE
524          char *argv[] = { "radiusd", NULL };          scheme_main();
         scm_boot_guile (1, argv, scheme_boot, NULL);  
525  #else  #else
526          radiusd_main();          radiusd_main();
527  #endif  #endif
# Line 582  snmp_request_to_command() Line 582  snmp_request_to_command()
582    
583                  case serv_shutdown:                  case serv_shutdown:
584                          return CMD_SHUTDOWN;                          return CMD_SHUTDOWN;
585    
586                    case serv_other:
587                            /* nothing */;
588                  }                  }
589          }          }
590  #endif    #endif  
# Line 944  radiusd_signal_init(RETSIGTYPE (*hp)(int Line 947  radiusd_signal_init(RETSIGTYPE (*hp)(int
947  static char buf[128];  static char buf[128];
948  int doprompt;  int doprompt;
949    
950  char *  static char *
951  moreinput(char *buf, size_t bufsize)  moreinput(char *buf, size_t bufsize)
952  {  {
953          if (doprompt)          if (doprompt)
# Line 952  moreinput(char *buf, size_t bufsize) Line 955  moreinput(char *buf, size_t bufsize)
955          return fgets(buf, bufsize, stdin);          return fgets(buf, bufsize, stdin);
956  }  }
957    
958  int  static int
959  test_shell()  test_shell()
960  {  {
961          char *tok;          char *tok;
# Line 1038  test_shell() Line 1041  test_shell()
1041                                          printf("%d (%u)", datum.ival,                                          printf("%d (%u)", datum.ival,
1042                                                       (unsigned) datum.ival);                                                       (unsigned) datum.ival);
1043                                          break;                                          break;
1044                                            
1045                                  case String:                                  case String:
1046                                          printf("%s", datum.sval);                                          printf("%s", datum.sval);
1047                                          break;                                          break;
1048                                            
1049                                    case Undefined:
1050                                            printf("Undefined");
1051                                            break;
1052    
1053                                    default:
1054                                            abort();
1055                                  }                                  }
1056                                  printf("\n");                                  printf("\n");
1057                          }                          }
# Line 1130  udp_input_handler(int fd, void *data) Line 1141  udp_input_handler(int fd, void *data)
1141                                     rpp_forward_request : request_respond))                                     rpp_forward_request : request_respond))
1142                          request_free(req);                          request_free(req);
1143          }          }
1144            return 0;
1145  }  }
1146    
1147  int  int

Legend:
Removed from v.1.133  
changed lines
  Added in v.1.134

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26