Browse Source

convert test programs from socket_tcp[46] to socket_tcp[46]b

master
Felix von Leitner 16 years ago
parent
commit
b7864a6ce5
  1. 4
      test/client.c
  2. 2
      test/dllink.c
  3. 2
      test/httpd.c
  4. 4
      test/server.c
  5. 2
      test/vd.c

4
test/client.c

@ -66,11 +66,11 @@ usage:
goto usage;
}
if (byte_equal(ip,12,V4mappedprefix)) {
s=socket_tcp4();
s=socket_tcp4b();
if (s==-1) panic("client: error: socket() failed");
if (socket_connect4(s,ip+12,port)==-1) panic("client: error: connect() failed");
} else {
s=socket_tcp6();
s=socket_tcp6b();
if (s==-1) panic("client: error: socket() failed");
if (socket_connect6(s,ip,port,scope_id)==-1) panic("client: error: connect() failed");
}

2
test/dllink.c

@ -8,7 +8,7 @@
#include "ndelay.h"
int main(int argc,char* argv[]) {
int s=socket_tcp4();
int s=socket_tcp4b();
char line[1024];
char buf[4096];
int l;

2
test/httpd.c

@ -182,7 +182,7 @@ e404:
}
int main() {
int s=socket_tcp6();
int s=socket_tcp6b();
uint32 scope_id;
char ip[16];
uint16 port;

4
test/server.c

@ -69,14 +69,14 @@ usage:
goto usage;
}
if (byte_equal(ip,12,V4mappedprefix)) {
s=socket_tcp4();
s=socket_tcp4b();
if (s==-1) panic("server: error: socket() failed");
if (socket_bind4_reuse(s,ip+12,port)==-1) panic("server: error: bind() failed");
if (socket_listen(s,1)==-1) panic("server: error: listen() failed");
ndelay_off(s);
if ((t=socket_accept4(s,0,0))==-1) panic("server: error: accept() failed");
} else {
s=socket_tcp6();
s=socket_tcp6b();
if (s==-1) panic("server: error: socket() failed");
if (socket_bind6_reuse(s,ip,port,scope_id)==-1) panic("server: error: bind() failed");
if (socket_listen(s,1)==-1) panic("server: error: listen() failed");

2
test/vd.c

@ -6,7 +6,7 @@
#include "ndelay.h"
int main(int argc,char* argv[]) {
int s=socket_tcp4();
int s=socket_tcp4b();
char line[1024];
char buf[4096];
int l;

Loading…
Cancel
Save