I am attempting to construct a TCP header for a simple echo server program using header fields: type, reserve1, reserve2, data length, sequence number, and data. Type will be a char variable whereas chracter 8 will represent an echo request message and 0 will represent an echo reply message. The reserved fields will be of value zero for now. Data will of course be arbitrary text.
I am wanting the server to be able to take a client request and interpret the type field of the header to see if it is indeed an echo request(8). If so, the server will then construct a reply header, change the Type field to 0, and copy the data length, sequence number, and data fields from the client header. I want the client to then receive the reply header and also interpret the type field to determine if it is an echo reply message(0). If it is, the client will echo the data, sequence number, and data length.
I am at a point now where I am stuck and was hoping to get some assistance. I am thinking the client is setup properly except for the last print statement, but I am not exactly sure what to do on the server end. Any help would be greatly appreciated. Here is what I have for the client so far:
For the server: (The server is currently just setup for basic echo communication)
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
I have problem with oracle solaris 10 running on oracle sparc T4-2 server.
Os information: 5.10 Generic_150400-03 sun4v sparc sun4v
Output from tcpstat.d script
TCP bytes: out outRetrans in inDup inUnorder
6833763 7300 98884 0... (2 Replies)
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
To get tcp header alone in log
----------------------------------------------------------------------------------------# vi /etc/sysconfig/iptables
---added the following 2 lines..
-A INPUT -j LOG --log-ip-options
-A INPUT -j LOG --log-tcp-options
]# vi /etc/syslog.conf
---added the... (1 Reply)
I'm trying to create a header row that contains the filename of a file for all columns.
e.g.
file1.txt
first middle last
1 2 3
4 5 6
desired output file should be:
file1 file1 file1
first middle last
1 2 3
4 5 6
my code is:
for file in *.txt; do echo... (3 Replies)
Hi
I need to write perl script for TCP communication over server and client using
IO::Select and the method select ( READ, WRITE, EXCEPTION ).
I have not much idea on networking.. Please Help...
Regards
Harikrishna (1 Reply)
say i have these many file in a directory named exam.
1)/exam/newfolder/link.txt.
2)/exam/newfolder1/
and i create a tar say exam.tar
well the problem is,
when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories.
on the... (2 Replies)
I am using socket programming and want to parse TCp header.
What are the required header files and the reqiured functions
Plz help me out...
Vipin (2 Replies)
Two processes at the same machine communicaton with each other use TCP. The communicaton flow between them is very heavy.
My question is How the impaction of "processes at the same machine communicaton " .If I mv one process to another machine and send the same data, the impact is less than... (1 Reply)