Revision: 562
http://sourceforge.net/p/vde/svn/562
Author: rd235
Date: 2013-07-07 08:20:40 +0000 (Sun, 07 Jul 2013)
Log Message:
-----------
no more warnings during make.
Modified Paths:
--------------
branches/rd235/vde-2/src/common/canonicalize.c
branches/rd235/vde-2/src/kvde_switch/datasock.c
branches/rd235/vde-2/src/kvde_switch/kvde_switch.c
branches/rd235/vde-2/src/kvde_switch/sockutils.c
branches/rd235/vde-2/src/lib/python/vdeplug_python.c
branches/rd235/vde-2/src/slirpvde/tftp.c
branches/rd235/vde-2/src/vde_over_ns/dns.c
Added Paths:
-----------
branches/rd235/vde-2/src/kvde_switch/switch.h
Modified: branches/rd235/vde-2/src/common/canonicalize.c
===================================================================
--- branches/rd235/vde-2/src/common/canonicalize.c 2013-07-04 15:53:30 UTC
(rev 561)
+++ branches/rd235/vde-2/src/common/canonicalize.c 2013-07-07 08:20:40 UTC
(rev 562)
@@ -51,7 +51,6 @@
char *resolved_root = resolved + 1;
char *ret_path = NULL;
int num_links = 0;
- int validstat = 0;
struct stat *pst = NULL;
if (!name || !resolved)
@@ -128,7 +127,6 @@
else if (end - start == 2 && start[0] == '.' && start[1] == '.')
{
/* Back up to previous component, ignore if at root
already. */
- validstat = 0;
if (dest > resolved_root)
while ((--dest)[-1] != '/');
}
@@ -151,7 +149,6 @@
*dest = '\0';
/*check the dir along the path */
- validstat = 1;
if (lstat(resolved, pst) < 0)
goto abort;
else
@@ -169,7 +166,6 @@
}
/* symlink! */
- validstat = 0;
n = readlink (resolved, buf, PATH_MAX);
if (n < 0)
goto abort;
Modified: branches/rd235/vde-2/src/kvde_switch/datasock.c
===================================================================
--- branches/rd235/vde-2/src/kvde_switch/datasock.c 2013-07-04 15:53:30 UTC
(rev 561)
+++ branches/rd235/vde-2/src/kvde_switch/datasock.c 2013-07-07 08:20:40 UTC
(rev 562)
@@ -32,7 +32,7 @@
#include <vde.h>
#include <vdecommon.h>
-#include "../vde_switch/switch.h"
+#include "switch.h"
#include "sockutils.h"
#include "consmgmt.h"
Modified: branches/rd235/vde-2/src/kvde_switch/kvde_switch.c
===================================================================
--- branches/rd235/vde-2/src/kvde_switch/kvde_switch.c 2013-07-04 15:53:30 UTC
(rev 561)
+++ branches/rd235/vde-2/src/kvde_switch/kvde_switch.c 2013-07-07 08:20:40 UTC
(rev 562)
@@ -24,7 +24,7 @@
#include <vde.h>
#include <vdecommon.h>
-#include "../vde_switch/switch.h"
+#include "switch.h"
#include "consmgmt.h"
#include "datasock.h"
Modified: branches/rd235/vde-2/src/kvde_switch/sockutils.c
===================================================================
--- branches/rd235/vde-2/src/kvde_switch/sockutils.c 2013-07-04 15:53:30 UTC
(rev 561)
+++ branches/rd235/vde-2/src/kvde_switch/sockutils.c 2013-07-07 08:20:40 UTC
(rev 562)
@@ -16,14 +16,13 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include "switch.h"
+#include "consmgmt.h"
#include <config.h>
#include <vde.h>
#include <vdecommon.h>
-#include "../vde_switch/switch.h"
-#include "consmgmt.h"
-
/* check to see if given unix socket is still in use; if it isn't, remove the
* * socket from the file system */
int still_used(struct sockaddr_un *sun)
Added: branches/rd235/vde-2/src/kvde_switch/switch.h
===================================================================
--- branches/rd235/vde-2/src/kvde_switch/switch.h
(rev 0)
+++ branches/rd235/vde-2/src/kvde_switch/switch.h 2013-07-07 08:20:40 UTC
(rev 562)
@@ -0,0 +1,79 @@
+/* Copyright 2005 Renzo davoli VDE-2
+ * Some code from vde_switch Copyright 2002 Jeff Dike
+ * Licensed under the GPLv2
+ */
+
+#ifndef __SWITCH_H__
+#define __SWITCH_H__
+
+typedef unsigned char uchar;
+/* FAST SPANNING TREE PROTOCOL (experimental)*/
+#define FSTP
+/* POLL Main LOOP Optimization */
+#define OPTPOLL
+/* PQ2 Optimized Packet Queueing */
+#define VDE_PQ2
+/* VTRILL vtrill support */
+#define VDE_VTRILL
+
+
+#ifdef _MALLOC_DEBUG
+#define free(X) ({ printf("MDBG-FREE %p %s %d\n",(X),__FILE__,__LINE__); \
+ free(X); })
+#define malloc(X) ({ void *x; x=malloc(X); \
+ printf("MDBG-MALLOC %p %s %d\n",x,__FILE__,__LINE__); \
+ x; })
+#define strdup(X) ({ void *x; x=strdup(X); \
+ printf("MDBG-STRDUP %p %s %d\n",x,__FILE__,__LINE__); \
+ x; })
+#define realloc(Y,X) ({ void *x,*old; \
+ old=(Y);\
+ x=realloc(old,(X)); \
+ printf("MDBG-REALLOC %p->%p %s
%d\n",old,x,__FILE__,__LINE__); \
+ x; })
+#endif
+
+struct swmodule {
+ char *swmname; /* module name */
+ char swmtag; /* module tag - computer by the load sequence */
+ char swmnopts; /* number of options for getopt */
+ struct option *swmopts; /* options for getopt */
+ void (*usage)(void); /* usage function: command line opts explanation */
+ int (*parseopt)(int parm,char *optarg); /* parse getopt output */
+ void (*init)(void); /* init */
+ void (*handle_io)(unsigned char type,int fd,int revents,void
*private_data); /* handle input */
+ void (*cleanup)(unsigned char type,int fd,void *private_data);
/*cleanup for files or final if fd == -1 */
+ struct swmodule *next;
+};
+
+void add_swm(struct swmodule *new);
+void del_swm(struct swmodule *old);
+unsigned char add_type(struct swmodule *mgr,int prio);
+void del_type(unsigned char type);
+void add_fd(int fd,unsigned char type,void *private_data);
+void remove_fd(int fd);
+void *mainloop_get_private_data(int fd);
+void mainloop_set_private_data(int fd,void *private_data);
+void mainloop_set_type(int fd,unsigned char type);
+short mainloop_pollmask_get(int fd);
+void mainloop_pollmask_add(int fd, short events);
+void mainloop_pollmask_del(int fd, short events);
+void mainloop_pollmask_set(int fd, short events);
+
+#define STDRCFILE "/etc/vde2/vde_switch.rc"
+
+#define ETH_ALEN 6
+
+#define INIT_HASH_SIZE 128
+#define DEFAULT_PRIORITY 0x8000
+#define INIT_NUMPORTS 32
+#define DEFAULT_COST 20000000 /* 1Mbit line */
+
+extern char *prog;
+extern unsigned char switchmac[];
+extern unsigned int priority;
+
+#define NUMOFVLAN 4095
+#define NOVLAN 0xfff
+
+#endif
Modified: branches/rd235/vde-2/src/lib/python/vdeplug_python.c
===================================================================
--- branches/rd235/vde-2/src/lib/python/vdeplug_python.c 2013-07-04
15:53:30 UTC (rev 561)
+++ branches/rd235/vde-2/src/lib/python/vdeplug_python.c 2013-07-07
08:20:40 UTC (rev 562)
@@ -16,13 +16,11 @@
struct vde_open_args vde_args = {0,NULL,0777};
char *vde_sock = NULL, *vde_descr = NULL;
VDECONN *ret;
- int e;
if (!PyArg_ParseTuple(args, "ss|isi", &vde_sock, &vde_descr,
&vde_args.port, &vde_args.group, &vde_args.mode))
goto failure;
ret = vde_open_real(vde_sock, vde_descr, 1, &vde_args);
- e = errno;
if (!ret)
goto failure;
else
Modified: branches/rd235/vde-2/src/slirpvde/tftp.c
===================================================================
--- branches/rd235/vde-2/src/slirpvde/tftp.c 2013-07-04 15:53:30 UTC (rev
561)
+++ branches/rd235/vde-2/src/slirpvde/tftp.c 2013-07-07 08:20:40 UTC (rev
562)
@@ -161,7 +161,6 @@
struct sockaddr_in saddr, daddr;
struct mbuf *m;
struct tftp_t *tp;
- int nobytes;
m = m_get(spt->slirp);
@@ -185,8 +184,6 @@
daddr.sin_addr = spt->client_ip;
daddr.sin_port = spt->client_port;
- nobytes = 2;
-
m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) -
sizeof(struct ip) - sizeof(struct udphdr);
Modified: branches/rd235/vde-2/src/vde_over_ns/dns.c
===================================================================
--- branches/rd235/vde-2/src/vde_over_ns/dns.c 2013-07-04 15:53:30 UTC (rev
561)
+++ branches/rd235/vde-2/src/vde_over_ns/dns.c 2013-07-07 08:20:40 UTC (rev
562)
@@ -431,11 +431,10 @@
unsigned char *dns_constructpacket (struct dnspkt *pkt, int *l)
{
static unsigned char *buf, *ptr;
- int len, *offsets, qdcount, ancount, i;
+ int len, *offsets, qdcount, i;
struct rr *list;
qdcount = _get_listlen(pkt->query);
- ancount = _get_listlen(pkt->answer);
len = dns_getpktsize(pkt);
ptr = buf = malloc(len);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
vde-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vde-users