1 Index: br2684ctl-20040226.orig/br2684ctl.c
2 ===================================================================
3 --- br2684ctl-20040226.orig.orig/br2684ctl.c 2007-06-04 13:22:22.142489112 +0200
4 +++ br2684ctl-20040226.orig/br2684ctl.c 2007-06-04 13:22:22.213478320 +0200
9 +#include <sys/types.h>
18 -#define LOG_NAME "RFC1483/2684 bridge"
19 -#define LOG_OPTION LOG_PERROR
20 -#define LOG_FACILITY LOG_LOCAL0
21 +#define LOG_NAME "br2684ctl"
22 +#define LOG_OPTION LOG_PERROR|LOG_PID
23 +#define LOG_FACILITY LOG_LOCAL2
26 int lastsock, lastitf;
31 - syslog (LOG_PID,"Daemon terminated\n");
32 + syslog (LOG_NOTICE,"Daemon terminated\n");
36 +void int_signal(int dummy)
38 + syslog (LOG_INFO,"Killed by a signal\n");
42 int create_pidfile(int num)
46 err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
49 - syslog(LOG_INFO, "Interface \"%s\" created sucessfully\n",ni.ifname);
50 + syslog(LOG_NOTICE, "Interface \"%s\" created sucessfully\n",ni.ifname);
52 syslog(LOG_INFO, "Interface \"%s\" could not be created, reason: %s\n",
55 addr.sap_addr.vpi = 0;
56 addr.sap_addr.vci = vci;
58 - syslog(LOG_INFO,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
59 + syslog(LOG_NOTICE,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
62 encap?"VC mux":"LLC");
66 create_pidfile(itfnum);
67 + signal(SIGINT, int_signal);
68 + signal(SIGTERM, int_signal);
70 syslog (LOG_INFO, "RFC 1483/2684 bridge daemon started\n");
73 - while (1) sleep(30); /* to keep the sockets... */
74 + while (1) pause(); /* to keep the sockets... */
78 Index: br2684ctl-20040226.orig/Makefile
79 ===================================================================
80 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
81 +++ br2684ctl-20040226.orig/Makefile 2007-06-04 13:22:22.215478016 +0200
89 +br2684ctl: br2684ctl.c
90 + $(CC) $(OPTS) $(CFLAGS) $(LIBS) $< -o $@