1 --- br2684ctl-20040226.orig/br2684ctl.8
2 +++ br2684ctl-20040226/br2684ctl.8
5 -.TH br2684ctl 1 "7 Jul 2003"
6 +.TH br2684ctl 8 "7 Jul 2003"
8 br2684ctl \- RFC1483/2684 Bridge Daemon
11 also assign a Ethernet MAC address to the interface nas0, if necessary.
13 % ifconfig nas0 192.168.2.1 netmask 255.255.255.0
15 +Messages are logged to the LOCAL2 syslog facility.
18 This man page is based on a tutorial by by Joonbum Byun <jbyun@megaxess.com>
20 --- br2684ctl-20040226.orig/br2684ctl.c
21 +++ br2684ctl-20040226/br2684ctl.c
25 #include <sys/ioctl.h>
26 +#include <sys/types.h>
35 -#define LOG_NAME "RFC1483/2684 bridge"
36 -#define LOG_OPTION LOG_PERROR
37 -#define LOG_FACILITY LOG_LOCAL0
38 +#define LOG_NAME "br2684ctl"
39 +#define LOG_OPTION LOG_PERROR|LOG_PID
40 +#define LOG_FACILITY LOG_LOCAL2
43 int lastsock, lastitf;
48 - syslog (LOG_PID,"Daemon terminated\n");
49 + syslog (LOG_NOTICE,"Daemon terminated\n");
53 +void int_signal(int dummy)
55 + syslog (LOG_INFO,"Killed by a signal\n");
59 int create_pidfile(int num)
63 err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
66 - syslog(LOG_INFO, "Interface \"%s\" created sucessfully\n",ni.ifname);
67 + syslog(LOG_NOTICE, "Interface \"%s\" created sucessfully\n",ni.ifname);
69 syslog(LOG_INFO, "Interface \"%s\" could not be created, reason: %s\n",
72 addr.sap_addr.vpi = 0;
73 addr.sap_addr.vci = vci;
75 - syslog(LOG_INFO,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
76 + syslog(LOG_NOTICE,"Communicating over ATM %d.%d.%d, encapsulation: %s\n", addr.sap_addr.itf,
79 encap?"VC mux":"LLC");
83 create_pidfile(itfnum);
84 + signal(SIGINT, int_signal);
85 + signal(SIGTERM, int_signal);
87 syslog (LOG_INFO, "RFC 1483/2684 bridge daemon started\n");
90 - while (1) sleep(30); /* to keep the sockets... */
91 + while (1) pause(); /* to keep the sockets... */
95 --- br2684ctl-20040226.orig/Makefile
96 +++ br2684ctl-20040226/Makefile
104 +br2684ctl: br2684ctl.c
105 + $(CC) $(OPTS) $(CFLAGS) $< $(LIBS) -o $@