projects
/
swifty.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
943eb63
)
Make the tests compilable after the latest API changes.
author
Adrian Bondrescu
<adi.bondrescu@gmail.com>
Sun, 24 Jun 2012 08:38:18 +0000
(11:38 +0300)
committer
Adrian Bondrescu
<adi.bondrescu@gmail.com>
Sun, 24 Jun 2012 08:38:18 +0000
(11:38 +0300)
test/Makefile
patch
|
blob
|
history
test/client.c
patch
|
blob
|
history
test/client_lf.c
patch
|
blob
|
history
test/client_time.c
patch
|
blob
|
history
test/client_udp.c
patch
|
blob
|
history
test/server.c
patch
|
blob
|
history
test/server_lf.c
patch
|
blob
|
history
test/server_time.c
patch
|
blob
|
history
test/server_udp.c
patch
|
blob
|
history
diff --git
a/test/Makefile
b/test/Makefile
index
a7cb85b
..
fc9a7b4
100644
(file)
--- a/
test/Makefile
+++ b/
test/Makefile
@@
-34,3
+34,6
@@
server_lf.o: server_lf.c
client_time.o: client_time.c
server_time.o: server_time.c
client_time.o: client_time.c
server_time.o: server_time.c
+
+clean:
+ rm -f *.o *~ client server client_udp server_udp client_lf server_lf client_time server_time
diff --git
a/test/client.c
b/test/client.c
index
2f8e87a
..
6fdd337
100644
(file)
--- a/
test/client.c
+++ b/
test/client.c
@@
-1,4
+1,4
@@
-#include "../src/kernel/
swift
.h"
+#include "../src/kernel/
mptp
.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
@@
-26,14
+26,14
@@
int main(int argc, const char *argv[])
{
int sock;
{
int sock;
- sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
SWIFT
);
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
MPTP
);
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
- int size = sizeof(struct sockaddr_
swift) + sizeof(struct swift
_dest);
- struct sockaddr_
swift
*saddr = malloc(size);
+ int size = sizeof(struct sockaddr_
mptp) + sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*saddr = malloc(size);
memset(saddr, 0, size);
saddr->count = 1;
memset(saddr, 0, size);
saddr->count = 1;
@@
-50,8
+50,8
@@
int main(int argc, const char *argv[])
char buf2[] = "Buffer2";
struct iovec iov[2];
struct msghdr msg;
char buf2[] = "Buffer2";
struct iovec iov[2];
struct msghdr msg;
- int size2 = sizeof(struct sockaddr_
swift) + 2 * sizeof(struct swift
_dest);
- struct sockaddr_
swift
*to = malloc(size2);
+ int size2 = sizeof(struct sockaddr_
mptp) + 2 * sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*to = malloc(size2);
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
diff --git
a/test/client_lf.c
b/test/client_lf.c
index
3ce1b56
..
0a36eef
100644
(file)
--- a/
test/client_lf.c
+++ b/
test/client_lf.c
@@
-1,4
+1,4
@@
-#include "../src/kernel/
swift
.h"
+#include "../src/kernel/
mptp
.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
@@
-15,14
+15,14
@@
int main(int argc, const char *argv[])
{
int sock;
{
int sock;
- sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
SWIFT
);
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
MPTP
);
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
- int size = sizeof(struct sockaddr_
swift) + sizeof(struct swift
_dest);
- struct sockaddr_
swift
*saddr = malloc(size);
+ int size = sizeof(struct sockaddr_
mptp) + sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*saddr = malloc(size);
memset(saddr, 0, size);
saddr->count = 1;
memset(saddr, 0, size);
saddr->count = 1;
@@
-45,8
+45,8
@@
int main(int argc, const char *argv[])
char buf[8192];
struct iovec iov[2];
struct msghdr msg;
char buf[8192];
struct iovec iov[2];
struct msghdr msg;
- int size2 = sizeof(struct sockaddr_
swift) + 2 * sizeof(struct swift
_dest);
- struct sockaddr_
swift
*to = malloc(size2);
+ int size2 = sizeof(struct sockaddr_
mptp) + 2 * sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*to = malloc(size2);
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
diff --git
a/test/client_time.c
b/test/client_time.c
index
d29b7b3
..
f88df9f
100644
(file)
--- a/
test/client_time.c
+++ b/
test/client_time.c
@@
-1,4
+1,4
@@
-#include "../src/kernel/
swift
.h"
+#include "../src/kernel/
mptp
.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
@@
-26,14
+26,14
@@
int main(int argc, const char *argv[])
{
int sock;
{
int sock;
- sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
SWIFT
);
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
MPTP
);
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
- int size = sizeof(struct sockaddr_
swift) + sizeof(struct swift
_dest);
- struct sockaddr_
swift
*saddr = malloc(size);
+ int size = sizeof(struct sockaddr_
mptp) + sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*saddr = malloc(size);
memset(saddr, 0, size);
saddr->count = 1;
memset(saddr, 0, size);
saddr->count = 1;
@@
-52,8
+52,8
@@
int main(int argc, const char *argv[])
#define N 1
struct iovec iov[N];
struct msghdr msg;
#define N 1
struct iovec iov[N];
struct msghdr msg;
- int size2 = sizeof(struct sockaddr_
swift) + N * sizeof(struct swift
_dest);
- struct sockaddr_
swift
*to = malloc(size2);
+ int size2 = sizeof(struct sockaddr_
mptp) + N * sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*to = malloc(size2);
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
diff --git
a/test/client_udp.c
b/test/client_udp.c
index
85aab05
..
1ba01d7
100644
(file)
--- a/
test/client_udp.c
+++ b/
test/client_udp.c
@@
-1,5
+1,3
@@
-#include "../src/kernel/swift.h"
-
#include <sys/socket.h>
#include <sys/types.h>
#include <stdio.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <stdio.h>
diff --git
a/test/server.c
b/test/server.c
index
139e89b
..
aa55c69
100644
(file)
--- a/
test/server.c
+++ b/
test/server.c
@@
-1,4
+1,4
@@
-#include "../src/kernel/
swift
.h"
+#include "../src/kernel/
mptp
.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
@@
-20,14
+20,14
@@
int main(int argc, const char *argv[])
return -1;
}
return -1;
}
- sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
SWIFT
);
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
MPTP
);
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
- int size = sizeof(struct sockaddr_
swift) + sizeof(struct swift
_dest);
- struct sockaddr_
swift
*saddr = malloc(size);
+ int size = sizeof(struct sockaddr_
mptp) + sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*saddr = malloc(size);
memset(saddr, 0, size);
saddr->count = 1;
memset(saddr, 0, size);
saddr->count = 1;
@@
-43,8
+43,8
@@
int main(int argc, const char *argv[])
char buf[NUM_BUF][10240];
struct iovec iov[NUM_BUF];
struct msghdr msg;
char buf[NUM_BUF][10240];
struct iovec iov[NUM_BUF];
struct msghdr msg;
- size += (NUM_BUF - 1) * sizeof(struct
swift
_dest);
- struct sockaddr_
swift
*from = malloc(size);
+ size += (NUM_BUF - 1) * sizeof(struct
mptp
_dest);
+ struct sockaddr_
mptp
*from = malloc(size);
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
diff --git
a/test/server_lf.c
b/test/server_lf.c
index
538b352
..
0ccb4f5
100644
(file)
--- a/
test/server_lf.c
+++ b/
test/server_lf.c
@@
-1,4
+1,4
@@
-#include "../src/kernel/
swift
.h"
+#include "../src/kernel/
mptp
.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
@@
-19,14
+19,14
@@
int main(int argc, const char *argv[])
return -1;
}
return -1;
}
- sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
SWIFT
);
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
MPTP
);
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
- int size = sizeof(struct sockaddr_
swift) + sizeof(struct swift
_dest);
- struct sockaddr_
swift
*saddr = malloc(size);
+ int size = sizeof(struct sockaddr_
mptp) + sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*saddr = malloc(size);
memset(saddr, 0, size);
saddr->count = 1;
memset(saddr, 0, size);
saddr->count = 1;
@@
-49,7
+49,7
@@
int main(int argc, const char *argv[])
char buf[8192];
struct iovec iov[1];
struct msghdr msg;
char buf[8192];
struct iovec iov[1];
struct msghdr msg;
- struct sockaddr_
swift
*from = malloc(size);
+ struct sockaddr_
mptp
*from = malloc(size);
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
diff --git
a/test/server_time.c
b/test/server_time.c
index
83787d8
..
1829e9d
100644
(file)
--- a/
test/server_time.c
+++ b/
test/server_time.c
@@
-1,4
+1,4
@@
-#include "../src/kernel/
swift
.h"
+#include "../src/kernel/
mptp
.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/types.h>
@@
-20,14
+20,14
@@
int main(int argc, const char *argv[])
return -1;
}
return -1;
}
- sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
SWIFT
);
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_
MPTP
);
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
if (sock < 0) {
perror("Failed to create socket");
return -1;
}
- int size = sizeof(struct sockaddr_
swift) + sizeof(struct swift
_dest);
- struct sockaddr_
swift
*saddr = malloc(size);
+ int size = sizeof(struct sockaddr_
mptp) + sizeof(struct mptp
_dest);
+ struct sockaddr_
mptp
*saddr = malloc(size);
memset(saddr, 0, size);
saddr->count = 1;
memset(saddr, 0, size);
saddr->count = 1;
@@
-40,12
+40,12
@@
int main(int argc, const char *argv[])
return -1;
}
return -1;
}
-#define N 1
+#define N 1
6
char buf[N][4096];
struct iovec iov[N];
struct msghdr msg;
char buf[N][4096];
struct iovec iov[N];
struct msghdr msg;
- size += (N - 1) * sizeof(struct
swift
_dest);
- struct sockaddr_
swift
*from = malloc(size);
+ size += (N - 1) * sizeof(struct
mptp
_dest);
+ struct sockaddr_
mptp
*from = malloc(size);
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov));
diff --git
a/test/server_udp.c
b/test/server_udp.c
index
6cdfa90
..
1361ad3
100644
(file)
--- a/
test/server_udp.c
+++ b/
test/server_udp.c
@@
-1,5
+1,3
@@
-#include "../src/kernel/swift.h"
-
#include <sys/socket.h>
#include <sys/types.h>
#include <stdio.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <stdio.h>