Weird Stream Server Output

After making a simple stream server, I tried to make a client for the server. At first I just used a telnet client(why reinvent the wheel?), but then I wanted a challenge, so I made my own client; however, the server gave me some bizarre output, followed by a segmentation fault, when connecting with this client. Any takers on what the hell happened ?

Here's the source for the server:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#define PORT 7890

// prints error and exits
int errexit(char *string) {
        perror(string);
        exit(EXIT_FAILURE);
}

// Dumps raw memory in hex byte and printable format
void dump(const unsigned char *data_buffer, const unsigned int length) {
        unsigned char byte;
        unsigned int i, j;
        for(i=0; i < length; i++) {
         byte = data_buffer[i];
         printf("%02x ", data_buffer[i]); // Display byte in hex.
         if(((i%16)==15) || (i==length-1)) {
          for(j=0; j < 15-(i%16); j++)
           printf("     ");
         printf("| ");
          for(j=(i-(i%16)); j <= i; j++) { // display printable bytes from line.
           byte = data_buffer[j];
           if((byte > 31) && (byte < 127)) // Outside printable char range
                printf("%c", byte);
           else
                printf(".");
           }
           printf("\n"); // End of the dump line (each line is 16 bytes)
          }
         }
}

int main(void) {
	int sockfd, new_sockfd; // Listen on sock_fd, new connection on new_fd
	struct sockaddr_in host_addr, client_addr; // My adress information
	socklen_t sin_size;
	int recv_length=1, yes=1;
	char buffer[1024];

	if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1)
	 errexit("socket");
	if(setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)))
	 errexit("setsockopt");

	host_addr.sin_family = AF_INET; // Host byte order
	host_addr.sin_port = htons(PORT); // Short, network byte order
	host_addr.sin_addr.s_addr = 0; // Automaticall fill with my IP

	if(bind(sockfd, (struct sockaddr *)&host_addr, sizeof(struct sockaddr)))
	 errexit("bind");

	if(listen(sockfd, 5)) /* 0 on success, -1 on err */
	 errexit("listening on socket");

	while(1) {
	 sin_size = sizeof(struct sockaddr_in);
	new_sockfd = accept(sockfd, (struct sockaddr *)&client_addr, &sin_size);
	 if(new_sockfd == -1)
	  errexit("accept");
	 printf("server: got connection from %s port %d\n",
		inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port));
	 send(new_sockfd, "Hello, world!\n", 13, 0);
	 while(recv_length) {
	  printf("RECV: %d bytes\n", recv_length);
	  dump(buffer, recv_length);
	  recv_length = recv(new_sockfd, &buffer, 1024, 0);
	 }
	 close(new_sockfd);
	}
	return 0;
}


Source for the client:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <string.h>
#include <netdb.h>

/* prints error and exits */
int errexit(char *string) {
        perror(string);
        exit(EXIT_FAILURE);
}

int main(int argc, char *argv[]) {
	if(argc != 2) {
	 fprintf(stderr, "USAGE: %s <port>\n", argv[0]);
	 exit(EXIT_FAILURE);
	}

	int sfd;
	int PORT = atoi(argv[1]);
	socklen_t size = sizeof(struct sockaddr_in);
	struct sockaddr_in server;

	if((sfd = socket(PF_INET, SOCK_STREAM, 0)) == -1)
	 errexit("socket");
	server.sin_family = AF_INET;
	server.sin_port = htons(PORT);
	if(!inet_aton("127.0.0.7", &server.sin_addr))
	 errexit("inet_aton");
	
	if(connect(sfd, (struct sockaddr *)&server, size) == -1)
	 errexit("connect");

	if(send(sfd, "Hello\n\r", 7, 0) == 7)
	 fprintf(stderr, "Writing was successful.\n", 0);
	else
	 fprintf(stderr, "Writing failed.\n", 0);

	shutdown(sfd, 0);
	_exit(EXIT_SUCCESS);
}


Now, here is the output from the server when I connect to it via the client.

server: got connection from 127.0.0.7 port 36680
RECV: 1 bytes
06 															| .
RECV: 7 bytes
48 65 6c 6c 6f 0a 0d 									| Hello..
RECV: -1 bytes
48 65 6c 6c 6f 0a 0d 00 02 00 00 00 7c 4d 15 00 | Hello.......|M..
7c 5d 15 00 7c 5d 15 00 f0 00 00 00 f0 00 00 00 | |]..|]..........
06 00 00 00 04 00 00 00 04 00 00 00 74 01 00 00 | ............t...
74 01 00 00 74 01 00 00 44 00 00 00 44 00 00 00 | t...t...D...D...
04 00 00 00 04 00 00 00 07 00 00 00 c8 31 15 00 | .............1..
c8 41 15 00 c8 41 15 00 08 00 00 00 40 00 00 00 | .A...A......@...
04 00 00 00 04 00 00 00 50 e5 74 64 dc b4 13 00 | ........P.td....
dc b4 13 00 dc b4 13 00 2c 33 00 00 2c 33 00 00 | ........,3..,3..
04 00 00 00 04 00 00 00 51 e5 74 64 00 00 00 00 | ........Q.td....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
06 00 00 00 04 00 00 00 52 e5 74 64 c8 31 15 00 | ........R.td.1..
c8 41 15 00 c8 41 15 00 38 1e 00 00 f4 4f 73 00 | .A...A..8....Os.
0c 86 99 bf 00 00 00 00 fc 83 99 bf 9c 5e 72 00 | .............^r.
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00 00 00 00 02 cf 27 01 00 00 00 00 d4 19 73 00 | ......'.......s.
dc 84 99 bf e6 67 72 00 0c 86 99 bf 00 00 00 00 | .....gr.........
e0 cd 11 00 10 69 69 0d 4c 84 99 bf f6 19 72 00 | .....ii.L.....r.
c9 27 12 00 dc 95 71 00 0e 00 00 00 b1 27 12 00 | .'....q......'..
88 8d 7e b7 02 00 99 bf 90 75 72 00 b1 27 12 00 | ..~......ur..'..
c0 8a 7e b7 f4 4f 73 00 7c 3d 11 00 01 00 00 00 | ..~..Os.|=......
d8 84 99 bf a6 1f 72 00 a0 16 30 00 26 84 80 8e | ......r...0.&...
04 08 42 24 f0 87 99 bf 38 88 7e b7 00 00 00 00 | ..B$....8.~.....
f4 4f 73 00 0c 86 99 bf 00 00 00 00 b0 3d 11 00 | .Os..........=..
3c 17 73 00 a0 84 99 bf 61 d8 72 00 07 00 00 00 | <.s.....a.r.....
e0 cd 11 00 1c 8b 7e b7 87 f0 96 7c 00 00 00 00 | ......~....|....
03 00 00 00 24 55 73 00 00 00 00 00 00 00 00 00 | ....$Us.........
01 00 00 00 03 09 00 00 88 8d 7e b7 58 88 7e b7 | ..........~.X.~.
c9 95 71 00 b0 ce 11 00 34 93 71 00 01 00 00 00 | ..q.....4.q.....
f4 4f 73 00 2c 86 99 bf b0 5a 73 00 90 85 99 bf | .Os.,....Zs.....
22 22 72 00 80 85 99 bf 34 93 71 00 74 85 99 bf | ""r.....4.q.t...
54 5a 73 00 00 00 00 00 88 8d 7e b7 01 00 00 00 | TZs.......~.....
00 00 00 00 01 00 00 00 24 55 73 00 94 94 71 00 | ........$Us...q.
f4 4f 73 00 10 00 00 00 07 00 00 00 2c 85 99 bf | .Os.........,...
85 d9 72 00 08 00 00 00 00 00 00 00 2c 86 99 bf | ..r.........,...
74 85 99 bf 80 85 99 bf 70 00 00 00 24 55 73 00 | t.......p...$Us.
00 00 00 00 06 00 00 00 d0 85 99 bf c9 95 71 00 | ..............q.
07 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 | ................
00 00 00 00 24 55 73 00 00 00 00 00 9c 4f 73 00 | ....$Us......Os.
20 50 73 00 00 00 00 00 f4 4f 73 00 1f 32 72 00 |  Ps......Os..2r.
00 40 73 00 00 10 00 00 01 00 00 00 f4 4f 73 00 | .@s..........Os.
00 00 00 00 3c 86 99 bf ef 35 72 00 b0 5a 73 00 | ....<....5r..Zs.
88 8d 7e b7 01 00 00 00 01 00 00 00 00 00 00 00 | ..~.............
fa 4f 72 00 f4 4f 73 00 00 00 00 00 00 00 00 00 | .Or..Os.........
14 86 99 bf f0 e3 72 00 01 24 73 00 dc 18 73 00 | ......r..$s...s.
24 55 73 00 00 00 00 00 94 94 71 00 14 86 99 bf | $Us.......q.....
12 96 71 00 34 86 99 bf d4 92 71 00 02 00 00 00 | ..q.4.....q.....
34 93 71 00 90 c6 11 00 10 69 69 0d 30 86 99 bf | 4.q......ii.0...
f6 19 72 00 c9 27 12 00 67 84 04 08 02 00 00 00 | ..r..'..g.......
c0 83 04 08 48 8b 7e b7 02 00 99 bf 90 75 72 00 | ....H.~......ur.
c0 83 04 08 e0 5b 73 00 f4 4f 73 00 a8 3b 11 00 | .....[s..Os..;..
01 00 00 00 bc 86 99 bf a6 1f 72 00 f4 4f 73 00 | ..........r..Os.
40 db 23 00 34 00 00 00 dd b2 f0 00 09 00 00 00 | @.#.4...........
8c 86 99 bf 3d c3 18 00 78 86 99 bf 60 d9 23 00 | ....=...x...`.#.
b0 3d 11 00 3c 17 73 00 84 86 99 bf c2 00 00 00 | .=..<.s.........
0e 00 00 00 90 c6 11 00 1c 8b 7e b7 2e 4e 3d f6 | ..........~..N=.
00 00 00 00 03 00 00 00 f8 58 73 00 00 00 00 00 | .........Xs.....
00 00 00 00 01 00 00 00 8e 08 00 00 48 8b 7e b7 | ............H.~.
58 88 7e b7 4f 84 04 08 b0 ce 11 00 b0 82 04 08 | X.~.O...........
01 00 00 00 f4 4f 73 00 a0 87 99 bf b0 5a 73 00 | .....Os......Zs.
74 87 99 bf 22 22 72 00 64 87 99 bf b0 82 04 08 | t...""r.d.......

To be continued..
continued..

58 87 99 bf 54 5a 73 00 00 00 00 00 48 8b 7e b7 | X...TZs.....H.~.
01 00 00 00 00 00 00 00 01 00 00 00 f8 58 73 00 | .............Xs.
f4 5f 26 00 19 4d 21 00 a5 f2 13 00 08 87 99 bf | ._&..M!.........
d5 69 12 00 f4 5f 26 00 f4 9f 04 08 18 87 99 bf | .i..._&.........
02 00 8f 48 7f 00 00 07 00 00 00 00 00 00 00 00 | ...H............
02 00 1e d2 00 00 00 00 f4 5f 26 00 60 8b 04 08 | ........._&.`...
00 d6 bf 92 a5 f4 13 00 30 70 72 00 6b 8b 04 08 | ........0pr.k...
f4 5f 26 00 60 8b 04 08 00 00 00 00 c8 87 99 bf | ._&.`...........
d6 6b 12 00 01 00 00 00 f4 87 99 bf fc 87 99 bf | .k..............
58 88 7e b7 b0 87 99 bf ff ff ff ff f4 4f 73 00 | X.~..........Os.
4f 84 04 08 01 00 00 00 b0 87 99 bf 26 66 72 00 | O...........&fr.
b0 5a 73 00 48 8b 7e b7 f4 5f 26 00 00 00 00 00 | .Zs.H.~.._&.....
00 00 00 00 c8 87 99 bf 83 d0 dd 83 fc 47 04 94 | .............G..
00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 | ................
f0 86 04 08 00 00 00 00 30 c2 72 00 fb 6a 12 00 | ........0.r..j..
f4 4f 73 00 01 00 00 00 f0 86 04 08 00 00 00 00 | .Os.............
11 87 04 08 2e 89 04 08 01 00 00 00 f4 87 99 bf | ................
60 8b 04 08 50 8b 04 08 30 70 72 00 ec 87 99 bf | `...P...0pr.....
f8 58 73 00 01 00 00 00 8b 96 99 bf 00 00 00 00 | .Xs.............
92 96 99 bf b3 96 99 bf c6 96 99 bf d1 96 99 bf | ................
e1 96 99 bf 32 97 99 bf 44 97 99 bf 6e 97 99 bf | ....2...D...n...
8e 97 99 bf 99 97 99 bf 3a 9c 99 bf 60 9c 99 bf | ........:...`...
92 9c 99 bf ea 9c 99 bf f9 9c 99 bf 25 9d 99 bf | ............%...
3b 9d 99 bf 88 9d 99 bf 9e 9d 99 bf b5 9d 99 bf | ;...............
c5 9d 99 bf dc 9d 99 bf 11 9e 99 bf 25 9e 99 bf | ............%...
36 9e 99 bf 48 9e 99 bf 50 9e 99 bf 61 9e 99 bf | 6...H...P...a...
8d 9e 99 bf 9b 9e 99 bf d8 9e 99 bf 3a 9f 99 bf | ............:...
5a 9f 99 bf 67 9f 99 bf 89 9f 99 bf c0 9f 99 bf | Z...g...........
d9 9f 99 bf ec 9f 99 bf 00 00 00 00 20 00 00 00 | ............ ...
20 44 a0 00 21 00 00 00 00 40 a0 00 10 00 00 00 |  D..!....@......
bf f3 8b 07 06 00 00 00 00 10 00 00 11 00 00 00 | ................
64 00 00 00 03 00 00 00 34 80 04 08 04 00 00 00 | d.......4.......
20 00 00 00 05 00 00 00 08 00 00 00 07 00 00 00 |  ...............
00 90 71 00 08 00 00 00 00 00 00 00 09 00 00 00 | ..q.............
f0 86 04 08 0b 00 00 00 e8 03 00 00 0c 00 00 00 | ................
e8 03 00 00 0d 00 00 00 e8 03 00 00 0e 00 00 00 | ................
e8 03 00 00 17 00 00 00 00 00 00 00 19 00 00 00 | ................
3b 89 99 bf 1f 00 00 00 f5 9f 99 bf 0f 00 00 00 | ;...............
4b 89 99 bf 00 00 00 00 00 00 00 00 00 00 00 d6 | K...............
bf 92 74 b8 69 58 fe 03 ad e1 7e 8b 25 c0 88 69 | ..t.iX....~.%..i
36 38 36 00 00 00 00 00 00 00 00 00 00 00 00 00 | 686.............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
*the same line above for about a 100 lines*
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2e | ................
2f 73 65 72 76 00 4f 52 42 49 54 5f 53 4f 43 4b | /serv.ORBIT_SOCK
45 54 44 49 52 3d 2f 74 6d 70 2f 6f 72 62 69 74 | ETDIR=/tmp/orbit
2d 71 75 61 6b 79 00 53 53 48 5f 41 47 45 4e 54 | -quaky.SSH_AGENT
5f 50 49 44 3d 31 31 32 37 00 54 45 52 4d 3d 78 | _PID=1127.TERM=x
74 65 72 6d 00 53 48 45 4c 4c 3d 2f 62 69 6e 2f | term.SHELL=/bin/
62 61 73 68 00 58 44 47 5f 53 45 53 53 49 4f 4e | bash.XDG_SESSION
5f 43 4f 4f 4b 49 45 3d 37 33 64 37 62 30 66 37 | _COOKIE=73d7b0f7
32 66 38 64 65 36 61 36 35 35 66 36 30 63 62 30 | 2f8de6a655f60cb0
34 63 33 31 32 62 65 34 2d 31 32 39 35 37 39 39 | 4c312be4-1295799
33 30 32 2e 32 34 31 38 34 39 2d 31 38 37 31 32 | 302.241849-18712
39 38 34 34 34 00 57 49 4e 44 4f 57 49 44 3d 31 | 98444.WINDOWID=1
36 37 37 37 32 31 39 00 47 4e 4f 4d 45 5f 4b 45 | 6777219.GNOME_KE
59 52 49 4e 47 5f 43 4f 4e 54 52 4f 4c 3d 2f 74 | YRING_CONTROL=/t
6d 70 2f 6b 65 79 72 69 6e 67 2d 77 58 57 77 4e | mp/keyring-wXWwN
63 00 47 54 4b 5f 4d 4f 44 55 4c 45 53 3d 63 61 | c.GTK_MODULES=ca
6e 62 65 72 72 61 2d 67 74 6b 2d 6d 6f 64 75 6c | nberra-gtk-modul
65 00 55 53 45 52 3d 71 75 61 6b 79 00 4c 53 5f | e.USER=quaky.LS_
43 4f 4c 4f 52 53 3d 72 73 3d 30 3a 64 69 3d 30 | COLORS=rs=0:di=0
31 3b 33 34 3a 6c 6e 3d 30 31 3b 33 36 3a 68 6c | 1;34:ln=01;36:hl
3d 34 34 3b 33 37 3a 70 69 3d 34 30 3b 33 33 3a | =44;37:pi=40;33:
73 6f 3d 30 31 3b 33 35 3a 64 6f 3d 30 31 3b 33 | so=01;35:do=01;3
35 3a 62 64 3d 34 30 3b 33 33 3b 30 31 3a 63 64 | 5:bd=40;33;01:cd
3d 34 30 3b 33 33 3b 30 31 3a 6f 72 3d 34 30 3b | =40;33;01:or=40;
33 31 3b 30 31 3a 73 75 3d 33 37 3b 34 31 3a 73 | 31;01:su=37;41:s
67 3d 33 30 3b 34 33 3a 63 61 3d 33 30 3b 34 31 | g=30;43:ca=30;41
3a 74 77 3d 33 30 3b 34 32 3a 6f 77 3d 33 34 3b | :tw=30;42:ow=34;
34 32 3a 73 74 3d 33 37 3b 34 34 3a 65 78 3d 30 | 42:st=37;44:ex=0
31 3b 33 32 3a 2a 2e 74 61 72 3d 30 31 3b 33 31 | 1;32:*.tar=01;31
3a 2a 2e 74 67 7a 3d 30 31 3b 33 31 3a 2a 2e 61 | :*.tgz=01;31:*.a
72 6a 3d 30 31 3b 33 31 3a 2a 2e 74 61 7a 3d 30 | rj=01;31:*.taz=0
31 3b 33 31 3a 2a 2e 6c 7a 68 3d 30 31 3b 33 31 | 1;31:*.lzh=01;31
3a 2a 2e 6c 7a 6d 61 3d 30 31 3b 33 31 3a 2a 2e | :*.lzma=01;31:*.
7a 69 70 3d 30 31 3b 33 31 3a 2a 2e 7a 3d 30 31 | zip=01;31:*.z=01
3b 33 31 3a 2a 2e 5a 3d 30 31 3b 33 31 3a 2a 2e | ;31:*.Z=01;31:*.
64 7a 3d 30 31 3b 33 31 3a 2a 2e 67 7a 3d 30 31 | dz=01;31:*.gz=01
3b 33 31 3a 2a 2e 62 7a 32 3d 30 31 3b 33 31 3a | ;31:*.bz2=01;31:
2a 2e 62 7a 3d 30 31 3b 33 31 3a 2a 2e 74 62 7a | *.bz=01;31:*.tbz
32 3d 30 31 3b 33 31 3a 2a 2e 74 7a 3d 30 31 3b | 2=01;31:*.tz=01;
33 31 3a 2a 2e 64 65 62 3d 30 31 3b 33 31 3a 2a | 31:*.deb=01;31:*
2e 72 70 6d 3d 30 31 3b 33 31 3a 2a 2e 6a 61 72 | .rpm=01;31:*.jar
3d 30 31 3b 33 31 3a 2a 2e 72 61 72 3d 30 31 3b | =01;31:*.rar=01;
33 31 3a 2a 2e 61 63 65 3d 30 31 3b 33 31 3a 2a | 31:*.ace=01;31:*
2e 7a 6f 6f 3d 30 31 3b 33 31 3a 2a 2e 63 70 69 | .zoo=01;31:*.cpi
6f 3d 30 31 3b 33 31 3a 2a 2e 37 7a 3d 30 31 3b | o=01;31:*.7z=01;
33 31 3a 2a 2e 72 7a 3d 30 31 3b 33 31 3a 2a 2e | 31:*.rz=01;31:*.
6a 70 67 3d 30 31 3b 33 35 3a 2a 2e 6a 70 65 67 | jpg=01;35:*.jpeg
3d 30 31 3b 33 35 3a 2a 2e 67 69 66 3d 30 31 3b | =01;35:*.gif=01;
33 35 3a 2a 2e 62 6d 70 3d 30 31 3b 33 35 3a 2a | 35:*.bmp=01;35:*
2e 70 62 6d 3d 30 31 3b 33 35 3a 2a 2e 70 67 6d | .pbm=01;35:*.pgm
3d 30 31 3b 33 35 3a 2a 2e 70 70 6d 3d 30 31 3b | =01;35:*.ppm=01;
33 35 3a 2a 2e 74 67 61 3d 30 31 3b 33 35 3a 2a | 35:*.tga=01;35:*
2e 78 62 6d 3d 30 31 3b 33 35 3a 2a 2e 78 70 6d | .xbm=01;35:*.xpm
3d 30 31 3b 33 35 3a 2a 2e 74 69 66 3d 30 31 3b | =01;35:*.tif=01;
33 35 3a 2a 2e 74 69 66 66 3d 30 31 3b 33 35 3a | 35:*.tiff=01;35:
2a 2e 70 6e 67 3d 30 31 3b 33 35 3a 2a 2e 73 76 | *.png=01;35:*.sv
67 3d 30 31 3b 33 35 3a 2a 2e 73 76 67 7a 3d 30 | g=01;35:*.svgz=0
31 3b 33 35 3a 2a 2e 6d 6e 67 3d 30 31 3b 33 35 | 1;35:*.mng=01;35
3a 2a 2e 70 63 78 3d 30 31 3b 33 35 3a 2a 2e 6d | :*.pcx=01;35:*.m
6f 76 3d 30 31 3b 33 35 3a 2a 2e 6d 70 67 3d 30 | ov=01;35:*.mpg=0
31 3b 33 35 3a 2a 2e 6d 70 65 67 3d 30 31 3b 33 | 1;35:*.mpeg=01;3
35 3a 2a 2e 6d 32 76 3d 30 31 3b 33 35 3a 2a 2e | 5:*.m2v=01;35:*.
6d 6b 76 3d 30 31 3b 33 35 3a 2a 2e 6f 67 6d 3d | mkv=01;35:*.ogm=
30 31 3b 33 35 3a 2a 2e 6d 70 34 3d 30 31 3b 33 | 01;35:*.mp4=01;3
35 3a 2a 2e 6d 34 76 3d 30 31 3b 33 35 3a 2a 2e | 5:*.m4v=01;35:*.
6d 70 34 76 3d 30 31 3b 33 35 3a 2a 2e 76 6f 62 | mp4v=01;35:*.vob
3d 30 31 3b 33 35 3a 2a 2e 71 74 3d 30 31 3b 33 | =01;35:*.qt=01;3
35 3a 2a 2e 6e 75 76 3d 30 31 3b 33 35 3a 2a 2e | 5:*.nuv=01;35:*.
77 6d 76 3d 30 31 3b 33 35 3a 2a 2e 61 73 66 3d | wmv=01;35:*.asf=
30 31 3b 33 35 3a 2a 2e 72 6d 3d 30 31 3b 33 35 | 01;35:*.rm=01;35
3a 2a 2e 72 6d 76 62 3d 30 31 3b 33 35 3a 2a 2e | :*.rmvb=01;35:*.
66 6c 63 3d 30 31 3b 33 35 3a 2a 2e 61 76 69 3d | flc=01;35:*.avi=
30 31 3b 33 35 3a 2a 2e 66 6c 69 3d 30 31 3b 33 | 01;35:*.fli=01;3
35 3a 2a 2e 66 6c 76 3d 30 31 3b 33 35 3a 2a 2e | 5:*.flv=01;35:*.
67 6c 3d 30 31 3b 33 35 3a 2a 2e 64 6c 3d 30 31 | gl=01;35:*.dl=01
3b 33 35 3a 2a 2e 78 63 66 3d 30 31 3b 33 35 3a | ;35:*.xcf=01;35:
2a 2e 78 77 64 3d 30 31 3b 33 35 3a 2a 2e 79 75 | *.xwd=01;35:*.yu
76 3d 30 31 3b 33 35 3a 2a 2e 61 78 76 3d 30 31 | v=01;35:*.axv=01
... and other environment variables


to be continued..
continued..
Output from client:

Writing was successful.


Now the tcpdump output from when I was using the two programs, for I thought it would be useful:

cmdline: sudo tcpdump -XfKnvv -i lo -s 1400

tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 1400 bytes

12:53:01.898600 IP (tos 0x0, ttl 64, id 5030, offset 0, flags [DF], proto TCP (6), length 60)
    127.0.0.7.57858 > 127.0.0.7.7890: Flags [S], seq 3743086003, win 32792, options [mss 16396,sackOK,TS val 1435157 ecr 0,nop,wscale 6], length 0
	0x0000:  4500 003c 13a6 4000 4006 2908 7f00 0007  E..<..@.@.).....
	0x0010:  7f00 0007 e202 1ed2 df1a f5b3 0000 0000  ................
	0x0020:  a002 8018 d3b3 0000 0204 400c 0402 080a  ..........@.....
	0x0030:  0015 e615 0000 0000 0103 0306            ............
12:53:01.898714 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
    127.0.0.7.7890 > 127.0.0.7.57858: Flags [S.], seq 3736452487, ack 3743086004, win 32768, options [mss 16396,sackOK,TS val 1435157 ecr 1435157,nop,wscale 6], length 0
	0x0000:  4500 003c 0000 4000 4006 3cae 7f00 0007  E..<..@.@.<.....
	0x0010:  7f00 0007 1ed2 e202 deb5 bd87 df1a f5b4  ................
	0x0020:  a012 8000 5152 0000 0204 400c 0402 080a  ....QR....@.....
	0x0030:  0015 e615 0015 e615 0103 0306            ............
12:53:01.899095 IP (tos 0x0, ttl 64, id 5031, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.7.57858 > 127.0.0.7.7890: Flags [.], seq 1, ack 1, win 513, options [nop,nop,TS val 1435158 ecr 1435157], length 0
	0x0000:  4500 0034 13a7 4000 4006 290f 7f00 0007  E..4..@.@.).....
	0x0010:  7f00 0007 e202 1ed2 df1a f5b4 deb5 bd88  ................
	0x0020:  8010 0201 3874 0000 0101 080a 0015 e616  ....8t..........
	0x0030:  0015 e615                                ....
12:53:01.901810 IP (tos 0x0, ttl 64, id 23454, offset 0, flags [DF], proto TCP (6), length 65)
    127.0.0.7.7890 > 127.0.0.7.57858: Flags [P.], seq 1:14, ack 1, win 512, options [nop,nop,TS val 1435158 ecr 1435158], length 13
	0x0000:  4500 0041 5b9e 4000 4006 e10a 7f00 0007  E..A[.@.@.......
	0x0010:  7f00 0007 1ed2 e202 deb5 bd88 df1a f5b4  ................
	0x0020:  8018 0200 fe41 0000 0101 080a 0015 e616  .....A..........
	0x0030:  0015 e616 4865 6c6c 6f2c 2077 6f72 6c64  ....Hello,.world
	0x0040:  21                                       !
12:53:01.907823 IP (tos 0x0, ttl 64, id 5032, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.7.57858 > 127.0.0.7.7890: Flags [.], seq 1, ack 14, win 513, options [nop,nop,TS val 1435160 ecr 1435158], length 0
	0x0000:  4500 0034 13a8 4000 4006 290e 7f00 0007  E..4..@.@.).....
	0x0010:  7f00 0007 e202 1ed2 df1a f5b4 deb5 bd95  ................
	0x0020:  8010 0201 3864 0000 0101 080a 0015 e618  ....8d..........
	0x0030:  0015 e616                                ....
12:53:01.909070 IP (tos 0x0, ttl 64, id 5033, offset 0, flags [DF], proto TCP (6), length 59)
    127.0.0.7.57858 > 127.0.0.7.7890: Flags [P.], seq 1:8, ack 14, win 513, options [nop,nop,TS val 1435160 ecr 1435158], length 7
	0x0000:  4500 003b 13a9 4000 4006 2906 7f00 0007  E..;..@.@.).....
	0x0010:  7f00 0007 e202 1ed2 df1a f5b4 deb5 bd95  ................
	0x0020:  8018 0201 fe3b 0000 0101 080a 0015 e618  .....;..........
	0x0030:  0015 e616 4865 6c6c 6f0a 0d              ....Hello..
12:53:01.909591 IP (tos 0x0, ttl 64, id 23455, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.7.7890 > 127.0.0.7.57858: Flags [.], seq 14, ack 8, win 512, options [nop,nop,TS val 1435160 ecr 1435160], length 0
	0x0000:  4500 0034 5b9f 4000 4006 e116 7f00 0007  E..4[.@.@.......
	0x0010:  7f00 0007 1ed2 e202 deb5 bd95 df1a f5bb  ................
	0x0020:  8010 0200 385c 0000 0101 080a 0015 e618  ....8\..........
	0x0030:  0015 e618                                ....
12:53:01.912857 IP (tos 0x0, ttl 64, id 5034, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.7.57858 > 127.0.0.7.7890: Flags [R.], seq 8, ack 14, win 513, options [nop,nop,TS val 1435161 ecr 1435160], length 0
	0x0000:  4500 0034 13aa 4000 4006 290c 7f00 0007  E..4..@.@.).....
	0x0010:  7f00 0007 e202 1ed2 df1a f5bb deb5 bd95  ................
	0x0020:  8014 0201 3856 0000 0101 080a 0015 e619  ....8V..........
	0x0030:  0015 e618                                ....


If you need a different tcpdump output (eg with different options), or if you want me to change anything and give you the output, just ask me (or you can do that S*%@ yourself ;] )

Anything will be appreciated.
Topic archived. No new replies allowed.