package/br2684ctl: refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20452 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
bad6f831df
commit
1c2addad83
|
@ -1,7 +1,5 @@
|
||||||
Index: br2684ctl-20040226.orig/br2684ctl.c
|
--- a/br2684ctl.c
|
||||||
===================================================================
|
+++ b/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
|
|
||||||
@@ -3,6 +3,8 @@
|
@@ -3,6 +3,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -24,7 +22,7 @@ Index: br2684ctl-20040226.orig/br2684ctl.c
|
||||||
|
|
||||||
|
|
||||||
int lastsock, lastitf;
|
int lastsock, lastitf;
|
||||||
@@ -39,10 +41,16 @@
|
@@ -39,10 +41,16 @@ void fatal(const char *str, int i)
|
||||||
|
|
||||||
void exitFunc(void)
|
void exitFunc(void)
|
||||||
{
|
{
|
||||||
|
@ -42,7 +40,7 @@ Index: br2684ctl-20040226.orig/br2684ctl.c
|
||||||
int create_pidfile(int num)
|
int create_pidfile(int num)
|
||||||
{
|
{
|
||||||
FILE *pidfile = NULL;
|
FILE *pidfile = NULL;
|
||||||
@@ -80,7 +88,7 @@
|
@@ -80,7 +88,7 @@ int create_br(char *nstr)
|
||||||
err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
|
err=ioctl (lastsock, ATM_NEWBACKENDIF, &ni);
|
||||||
|
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
|
@ -51,7 +49,7 @@ Index: br2684ctl-20040226.orig/br2684ctl.c
|
||||||
else
|
else
|
||||||
syslog(LOG_INFO, "Interface \"%s\" could not be created, reason: %s\n",
|
syslog(LOG_INFO, "Interface \"%s\" could not be created, reason: %s\n",
|
||||||
ni.ifname,
|
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.vpi = 0;
|
||||||
addr.sap_addr.vci = vci;
|
addr.sap_addr.vci = vci;
|
||||||
#endif
|
#endif
|
||||||
|
@ -60,7 +58,7 @@ Index: br2684ctl-20040226.orig/br2684ctl.c
|
||||||
addr.sap_addr.vpi,
|
addr.sap_addr.vpi,
|
||||||
addr.sap_addr.vci,
|
addr.sap_addr.vci,
|
||||||
encap?"VC mux":"LLC");
|
encap?"VC mux":"LLC");
|
||||||
@@ -261,11 +269,13 @@
|
@@ -261,11 +269,13 @@ int main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
create_pidfile(itfnum);
|
create_pidfile(itfnum);
|
||||||
|
@ -75,10 +73,8 @@ Index: br2684ctl-20040226.orig/br2684ctl.c
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: br2684ctl-20040226.orig/Makefile
|
--- /dev/null
|
||||||
===================================================================
|
+++ b/Makefile
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
|
||||||
+++ br2684ctl-20040226.orig/Makefile 2007-06-04 13:22:22.215478016 +0200
|
|
||||||
@@ -0,0 +1,13 @@
|
@@ -0,0 +1,13 @@
|
||||||
+OPTS := -O2
|
+OPTS := -O2
|
||||||
+CFLAGS := -Wall -g
|
+CFLAGS := -Wall -g
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
--- a/br2684ctl.c
|
||||||
--- br2684ctl-20040226.orig/br2684ctl.c 2008-03-25 22:26:59.000000000 +0000
|
+++ b/br2684ctl.c
|
||||||
+++ br2684ctl.orig/br2684ctl.c 2008-03-31 10:11:06.000000000 +0100
|
|
||||||
@@ -10,6 +10,10 @@
|
@@ -10,6 +10,10 @@
|
||||||
#include <atm.h>
|
#include <atm.h>
|
||||||
#include <linux/atmdev.h>
|
#include <linux/atmdev.h>
|
||||||
|
@ -52,7 +51,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +71,7 @@
|
@@ -58,7 +71,7 @@ int create_pidfile(int num)
|
||||||
|
|
||||||
if (num < 0) return -1;
|
if (num < 0) return -1;
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
pidfile = fopen(name, "w");
|
pidfile = fopen(name, "w");
|
||||||
if (pidfile == NULL) return -1;
|
if (pidfile == NULL) return -1;
|
||||||
fprintf(pidfile, "%d", getpid());
|
fprintf(pidfile, "%d", getpid());
|
||||||
@@ -67,9 +80,9 @@
|
@@ -67,9 +80,9 @@ int create_pidfile(int num)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +72,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
|
|
||||||
if(lastsock<0) {
|
if(lastsock<0) {
|
||||||
lastsock = socket(PF_ATMPVC, SOCK_DGRAM, ATM_AAL5);
|
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));
|
syslog(LOG_ERR, "socket creation failed: %s",strerror(errno));
|
||||||
} else {
|
} else {
|
||||||
/* create the device with ioctl: */
|
/* create the device with ioctl: */
|
||||||
|
@ -118,7 +117,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct sockaddr_atmpvc addr;
|
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));
|
memset(&addr, 0, sizeof(addr));
|
||||||
err=text2atm(astr,(struct sockaddr *)(&addr), sizeof(addr), T2A_PVC);
|
err=text2atm(astr,(struct sockaddr *)(&addr), sizeof(addr), T2A_PVC);
|
||||||
if (err!=0)
|
if (err!=0)
|
||||||
|
@ -145,7 +144,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
|
|
||||||
if (qos.aal == 0) {
|
if (qos.aal == 0) {
|
||||||
qos.aal = ATM_AAL5;
|
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 ( (err=setsockopt(fd,SOL_SOCKET,SO_SNDBUF, &bufsize ,sizeof(bufsize))) )
|
||||||
|
@ -154,7 +153,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
|
|
||||||
if (setsockopt(fd, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos)) < 0)
|
if (setsockopt(fd, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos)) < 0)
|
||||||
syslog(LOG_ERR,"setsockopt SO_ATMQOS %d", errno);
|
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));
|
err = connect(fd, (struct sockaddr*)&addr, sizeof(struct sockaddr_atmpvc));
|
||||||
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
@ -163,7 +162,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
|
|
||||||
/* attach the vcc to device: */
|
/* attach the vcc to device: */
|
||||||
|
|
||||||
@@ -169,10 +183,30 @@
|
@@ -169,10 +183,30 @@ int assign_vcc(char *astr, int encap, in
|
||||||
return fd ;
|
return fd ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +194,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,47 +214,63 @@
|
@@ -180,47 +214,63 @@ void usage(char *s)
|
||||||
|
|
||||||
int main (int argc, char **argv)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
@ -276,7 +275,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
case '?':
|
case '?':
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
@@ -231,6 +281,8 @@
|
@@ -231,6 +281,8 @@ int main (int argc, char **argv)
|
||||||
|
|
||||||
if (argc != optind) usage(argv[0]);
|
if (argc != optind) usage(argv[0]);
|
||||||
|
|
||||||
|
@ -285,7 +284,7 @@ diff -Nu br2684ctl-20040226.orig/br2684ctl.c br2684ctl.orig/br2684ctl.c
|
||||||
if(lastsock>=0) close(lastsock);
|
if(lastsock>=0) close(lastsock);
|
||||||
|
|
||||||
if (background) {
|
if (background) {
|
||||||
@@ -268,11 +275,11 @@
|
@@ -268,11 +320,11 @@ int main (int argc, char **argv)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue