-Index: br2684ctl-20040226.orig/br2684ctl.c
-===================================================================
---- br2684ctl-20040226.orig.orig/br2684ctl.c 2007-06-04 13:22:22.142489112 +0200
-+++ br2684ctl-20040226.orig/br2684ctl.c 2007-06-04 13:22:22.213478320 +0200
+--- a/br2684ctl.c
++++ b/br2684ctl.c
@@ -3,6 +3,8 @@
#include <unistd.h>
#include <errno.h>
int lastsock, lastitf;
-@@ -39,10 +41,16 @@
+@@ -39,10 +41,16 @@ void fatal(const char *str, int i)
void exitFunc(void)
{
int create_pidfile(int num)
{
FILE *pidfile = NULL;
-@@ -80,7 +88,7 @@
+@@ -80,7 +88,7 @@ int create_br(char *nstr)
err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
if (err == 0)
else
syslog(LOG_INFO, "Interface \"%s\" could not be created, reason: %s\n",
ni.ifname,
-@@ -112,7 +120,7 @@
+@@ -112,7 +120,7 @@ int assign_vcc(char *astr, int encap, in
addr.sap_addr.vpi = 0;
addr.sap_addr.vci = vci;
#endif
addr.sap_addr.vpi,
addr.sap_addr.vci,
encap?"VC mux":"LLC");
-@@ -261,11 +269,13 @@
+@@ -261,11 +269,13 @@ int main (int argc, char **argv)
}
create_pidfile(itfnum);
return 0;
}
-Index: br2684ctl-20040226.orig/Makefile
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ br2684ctl-20040226.orig/Makefile 2007-06-04 13:22:22.215478016 +0200
+--- /dev/null
++++ b/Makefile
@@ -0,0 +1,13 @@
+OPTS := -O2
+CFLAGS := -Wall -g
-diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
---- br2684ctl-20040226.orig/br2684ctl.c 2008-03-25 22:26:59.000000000 +0000
-+++ br2684ctl.orig/br2684ctl.c 2008-03-31 10:11:06.000000000 +0100
+--- a/br2684ctl.c
++++ b/br2684ctl.c
@@ -10,6 +10,10 @@
#include <atm.h>
#include <linux/atmdev.h>
exit(0);
}
-@@ -58,7 +71,7 @@
+@@ -58,7 +71,7 @@ int create_pidfile(int num)
if (num < 0) return -1;
pidfile = fopen(name, "w");
if (pidfile == NULL) return -1;
fprintf(pidfile, "%d", getpid());
-@@ -67,9 +80,9 @@
+@@ -67,9 +80,9 @@ int create_pidfile(int num)
return 0;
}
if(lastsock<0) {
lastsock = socket(PF_ATMPVC, SOCK_DGRAM, ATM_AAL5);
-@@ -78,31 +91,36 @@
+@@ -78,31 +91,36 @@ int create_br(char *nstr)
syslog(LOG_ERR, "socket creation failed: %s",strerror(errno));
} else {
/* create the device with ioctl: */
{
int err;
struct sockaddr_atmpvc addr;
-@@ -112,21 +130,17 @@
+@@ -112,21 +130,17 @@ int assign_vcc(char *astr, int encap, in
memset(&addr, 0, sizeof(addr));
err=text2atm(astr,(struct sockaddr *)(&addr), sizeof(addr), T2A_PVC);
if (err!=0)
if (qos.aal == 0) {
qos.aal = ATM_AAL5;
-@@ -137,7 +151,7 @@
+@@ -137,7 +151,7 @@ int assign_vcc(char *astr, int encap, in
}
if ( (err=setsockopt(fd,SOL_SOCKET,SO_SNDBUF, &bufsize ,sizeof(bufsize))) )
if (setsockopt(fd, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos)) < 0)
syslog(LOG_ERR,"setsockopt SO_ATMQOS %d", errno);
-@@ -145,7 +159,7 @@
+@@ -145,7 +159,7 @@ int assign_vcc(char *astr, int encap, in
err = connect(fd, (struct sockaddr*)&addr, sizeof(struct sockaddr_atmpvc));
if (err < 0)
/* attach the vcc to device: */
-@@ -169,10 +183,30 @@
+@@ -169,10 +183,30 @@ int assign_vcc(char *astr, int encap, in
return fd ;
}
exit(1);
}
-@@ -180,47 +214,63 @@
+@@ -180,47 +214,63 @@ void usage(char *s)
int main (int argc, char **argv)
{
case '?':
case 'h':
default:
-@@ -231,6 +281,8 @@
+@@ -231,6 +281,8 @@ int main (int argc, char **argv)
if (argc != optind) usage(argv[0]);
if(lastsock>=0) close(lastsock);
if (background) {
-@@ -268,11 +275,11 @@
+@@ -268,11 +320,11 @@ int main (int argc, char **argv)
}