+++ /dev/null
---- atm/pppbr-001212-br2684ctl.c~ Thu Jan 11 17:21:03 2001
-+++ atm/pppbr-001212-br2684ctl.c Thu Jan 11 17:30:38 2001
-@@ -4,6 +4,7 @@
- #include <errno.h>
- #include <sys/ioctl.h>
- #include <string.h>
-+#include <syslog.h>
- #include <atm.h>
- #include <linux/atmdev.h>
- #include <linux/atmbr2684.h>
-@@ -16,7 +16,7 @@
-
- void fatal(char *str, int i)
- {
-- perror(str);
-+ syslog(LOG_ERR, str);
- exit(-2);
- };
-
-@@ -39,11 +39,11 @@
- ni.mtu = 1500;
- sprintf(ni.ifname, "nas%d", num);
- err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
-- printf("create:%d\n",err);
-+ syslog(LOG_INFO,"create:%d\n",err);
- if (err>=0) ;;;
- lastitf=num; /* even if we didn't create, because existed, assign_vcc wil want to know it! */
- } else {
-- fprintf (stderr, "err: strange itf number %d", num );
-+ syslog(LOG_WARNING, "err: strange itf number %d", num );
- }
- }
- return 0;
-@@ -59,19 +59,19 @@
-
- memset(&addr, 0, sizeof(addr));
- err=text2atm(astr,(struct sockaddr *)(&addr), sizeof(addr), T2A_PVC);
-- printf("text2atm:%d\n",err);
-+ syslog(LOG_INFO,"text2atm:%d\n",err);
- #if 0
- addr.sap_family = AF_ATMPVC;
- addr.sap_addr.itf = itf;
- addr.sap_addr.vpi = 0;
- addr.sap_addr.vci = vci;
- #endif
-- fprintf(stderr,"Communicating over ATM %d.%d.%d\n", addr.sap_addr.itf,
-+ syslog(LOG_INFO,"Communicating over ATM %d.%d.%d\n", addr.sap_addr.itf,
- addr.sap_addr.vpi,
- addr.sap_addr.vci);
-
- if ((fd = socket(PF_ATMPVC, SOCK_DGRAM, ATM_AAL5)) < 0)
-- fprintf(stderr,"failed to create socket %d", errno);
-+ syslog(LOG_ERR,"failed to create socket %d", errno);
-
-
- memset(&qos, 0, sizeof(qos));
-@@ -82,10 +82,10 @@
- qos.rxtp = qos.txtp;
-
- err=setsockopt(fd,SOL_SOCKET,SO_SNDBUF, &bufsize ,sizeof(bufsize));
-- fprintf(stderr,"setsockopt SO_SNDBUF: (%d) %s\n",err, strerror(err));
-+ syslog(LOG_ERR,"setsockopt SO_SNDBUF: (%d) %s\n",err, strerror(err));
-
- if (setsockopt(fd, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos)) < 0)
-- fprintf(stderr,"setsockopt SO_ATMQOS %d", errno);
-+ syslog(LOG_ERR,"setsockopt SO_ATMQOS %d", errno);
-
- err = connect(fd, (struct sockaddr*)&addr, sizeof(struct sockaddr_atmpvc));
-
-@@ -105,7 +105,7 @@
- be.send_padding = 0;
- be.min_size = 0;
- err=ioctl (fd, ATM_SETBACKEND, &be);
-- fprintf(stderr, "assign:%d\n",err);
-+ syslog(LOG_INFO, "assign:%d\n",err);
-
- return fd ;
- }
-@@ -123,6 +123,7 @@
- lastsock=-1;
- lastitf=0;
-
-+ openlog("br2684ctl",LOG_PID,LOG_DAEMON);
- while ((c = getopt(argc, argv,"a:bc:e:s:")) !=EOF)
- switch (c) {
- case 'a':
-@@ -137,14 +138,14 @@
- case 'e':
- encap=(atoi(optarg));
- if(encap<0){
-- fprintf(stderr, "invalid encap: %s:\n",optarg);
-+ syslog(LOG_INFO, "invalid encap: %s:\n",optarg);
- encap=0;
- }
- break;
- case 's':
- sndbuf=(atoi(optarg));
- if(sndbuf<0){
-- fprintf(stderr, "invalid sndbuf: %s:\n",optarg);
-+ syslog(LOG_INFO, "invalid sndbuf: %s:\n",optarg);
- sndbuf=8192;
- }
- break;
-@@ -160,10 +161,10 @@
- /* this seems to be broken, do not use -b for now */
- pid=fork();
- if (pid < 0) {
-- fprintf(stderr,"fork returned negative: %d\n", pid);
-+ syslog(LOG_ERR,"fork returned negative: %d\n", pid);
- exit(2);
- } else if (pid) {
-- fprintf(stderr,"Background pid: %d\n",pid);
-+ syslog(LOG_INFO,"Background pid: %d\n",pid);
- exit(0);
- }
- }
+++ /dev/null
-diff -urN atm/lib/Makefile atm.shared/lib/Makefile
---- atm/lib/Makefile Fri Jan 21 06:27:10 2000
-+++ atm.shared/lib/Makefile Sat Jan 13 00:34:04 2001
-@@ -1,29 +1,61 @@
- ATM_OBJS=text2atm.o atm2text.o atmequal.o sdu2cell.o text2qos.o qos2text.o \
-- qosequal.o sap2text.o text2sap.o sapequal.o misc.o
--ifeq (/usr/lib/libresolv.a,$(wildcard /usr/lib/libresolv.a))
--ATM_OBJS += ans_l.o
--else
--ATM_OBJS += ans.o
--endif
-+ qosequal.o sap2text.o text2sap.o sapequal.o misc.o ans.o
-+ATM_OBJS_S=text2atm_s.o atm2text_s.o atmequal_s.o sdu2cell_s.o text2qos_s.o qos2text_s.o \
-+ qosequal_s.o sap2text_s.o text2sap_s.o sapequal_s.o misc_s.o ans_s.o
- ATMD_OBJS=common.o diag.o kptr.o text2ip.o timer.o unix.o
-+ATMD_OBJS_S=common_s.o diag_s.o kptr_s.o text2ip_s.o timer_s.o unix_s.o
- PGMS=#test
- GENLIBS=libatm.a libatmd.a
-+SH_VER=`cat $(TOPDIR)/VERSION`
-+SHLIBS=libatm.so.$(SH_VER) libatmd.so.$(SH_VER)
- SYSHDR=atm.h atmd.h atmsap.h
- OPTSYSHDR=stdint.h
-
--do_all: libatm.a libatmd.a
-+do_all: libatm.a libatmd.a libatm.so libatmd.so
-
- include ../Rules.make
-
-+install:
-+ @process() { if [ ! -z "$$3" ]; then mode=$$1; dir=$$2; \
-+ shift 2; echo "install -c -m $$mode $$* $$dir"; \
-+ install -c -m $$mode $$* $$dir || exit 1; fi; }; \
-+ optprocess() { [ -z "$$3" -o -r "/usr/include/$$3" ] || \
-+ process $$*; }; \
-+ $(PROCLIST)
-+ @for n in "" $(SUBDIRS); do [ -z "$$n" ] || \
-+ make -C $$n install || exit; done
-+ ln -sf libatm.so.$(SH_VER) $(INSTLIB)/libatm.so
-+ ln -sf libatmd.so.$(SH_VER) $(INSTLIB)/libatmd.so
-+
- ../lib/libatm.a: libatm.a
-
-+../lib/libatm.so: libatm.so
-+
-+../lib/libatm.so.$(SH_VER): libatm.so.$(SH_VER)
-+
- libatm.a: $(ATM_OBJS)
- ar rcs libatm.a $(ATM_OBJS)
-
-+libatm.so: libatm.so.$(SH_VER)
-+ ln -sf libatm.so.$(SH_VER) libatm.so
-+
-+libatm.so.$(SH_VER): $(ATM_OBJS_S)
-+ $(CC) -shared -Wl,-soname,libatm.so.$(SH_VER) -o libatm.so.$(SH_VER) $(ATM_OBJS_S) -lresolv
-+
- ../lib/libatmd.a: libatmd.a
-
-+../lib/libatm.so: libatmd.so
-+
-+../lib/libatm.so.$(SH_VER): libatmd.so.$(SH_VER)
-+
- libatmd.a: $(ATMD_OBJS)
- ar rcs libatmd.a $(ATMD_OBJS)
-
--ans_l.o: ans.o
-- ld -r -o ans_l.o ans.o -L/usr/lib -lresolv
-+libatmd.so: libatmd.so.$(SH_VER)
-+ ln -sf libatmd.so.$(SH_VER) libatmd.so
-+
-+libatmd.so.$(SH_VER): $(ATMD_OBJS_S)
-+ $(CC) -shared -Wl,-soname,libatmd.so.$(SH_VER) -o libatmd.so.$(SH_VER) $(ATMD_OBJS_S)
-+
-+%_s.o: %.c
-+ $(CC) -fPIC -DPIC $(CFLAGS) -c $< -o $@
-diff -urN atm/lib/timer.c atm.shared/lib/timer.c
---- atm/lib/timer.c Tue Oct 21 19:00:10 1997
-+++ atm.shared/lib/timer.c Sat Jan 13 00:27:26 2001
-@@ -12,6 +12,7 @@
-
-
- static TIMER *timers = NULL;
-+struct timeval now;
-
-
- static void dump_list(const char *label)
---- atm/Rules.make~ Sat Jan 13 00:38:31 2001
-+++ atm/Rules.make Sat Jan 13 00:48:18 2001
-@@ -81,6 +81,7 @@
- process 0755 $(INSTSYSBIN) $(SYSPGMS); \
- process 0755 $(INSTUSRBIN) $(USRPGMS); \
- process 0644 $(INSTLIB) $(GENLIBS); \
-+ process 0755 $(INSTLIB) $(SHLIBS); \
- process 0644 $(INSTHDR) $(SYSHDR); \
- optprocess 0644 $(INSTHDR) $(OPTSYSHDR); \
- process 0644 $(INSTMAN1) $(MAN1); \