1 --- br2684ctl-20040226.orig/br2684ctl.c
2 +++ br2684ctl-20040226/br2684ctl.c
7 +#include <sys/types.h>
16 -#define LOG_NAME "RFC1483/2684 bridge"
17 -#define LOG_OPTION LOG_PERROR
18 -#define LOG_FACILITY LOG_LOCAL0
19 +#define LOG_NAME "br2684ctl"
20 +#define LOG_OPTION LOG_PERROR|LOG_PID
21 +#define LOG_FACILITY LOG_LOCAL2
24 int lastsock, lastitf;
29 - syslog (LOG_PID,"Daemon terminated\n");
30 + syslog (LOG_NOTICE,"Daemon terminated\n");
34 +void int_signal(int dummy)
36 + syslog (LOG_INFO,"Killed by a signal\n");
40 int create_pidfile(int num)
44 err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
47 - syslog(LOG_INFO, "Interface \"%s\" created sucessfully\n",ni.ifname);
48 + syslog(LOG_NOTICE, "Interface \"%s\" created sucessfully\n",ni.ifname);
50 syslog(LOG_INFO, "Interface \"%s\" could not be created, reason: %s\n",
53 addr.sap_addr.vpi = 0;
54 addr.sap_addr.vci = vci;
56 - syslog(LOG_INFO,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
57 + syslog(LOG_NOTICE,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
60 encap?"VC mux":"LLC");
64 create_pidfile(itfnum);
65 + signal(SIGINT, int_signal);
66 + signal(SIGTERM, int_signal);
68 syslog (LOG_INFO, "RFC 1483/2684 bridge daemon started\n");
71 - while (1) sleep(30); /* to keep the sockets... */
72 + while (1) pause(); /* to keep the sockets... */
76 --- br2684ctl-20040226.orig/Makefile
77 +++ br2684ctl-20040226/Makefile
85 +br2684ctl: br2684ctl.c
86 + $(CC) $(OPTS) $(CFLAGS) $(LIBS) $< -o $@