Problem with TCP connection Reset caused by EOF character

Status
Not open for further replies.

dperez79

Member level 1
Joined
Feb 10, 2004
Messages
35
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
299
Hi all,

I have a remote controlled station behind a router connected by a TCP socket to a SCADA server.

The connection is right, but some times the connection is closed.

I have sniffed the net and I have find a TCP message with the RESET bit =1 (TCP level), sent by the remote station or the router(i'm not sure), just before the SCADA server closes the connection.

What is the cause of this Reset message?

Thanks. Daniel P.
 

Re: TCP Reset connection

shutdown() Function..


Refer :::

**broken link removed**
Addison.Wesley.TCPIP.Illustrated Volume 1
 

Re: TCP Reset connection

Thanks,

I could find the reason of this Reset message sent by the controlled station.

It is caused by the sent of the OEF character inside the telecontrol protocol.

Now, How could I solve this problem?

TCP would have to ignore this EOF character.

Thanks.
 

TCP Reset connection

Are you using
1. Binary mode of connection
2. Can it be converted to Ascii.
3. Can you write the protocol. Then change the EOF char to other ..
 

Re: TCP Reset connection

When the EOF character is received then the read function returns cero.

I have programmed it this way:

bytesRead = read( clisock, buffer, BUF_SIZE);
if (bytesRead > 0){
/*Se han leído datos*/
}
else {
/* Tanto si es cero o menos uno, cerramos el
socket*/
}


If i change it to this:

bytesRead = read( clisock, buffer, BUF_SIZE);
if (bytesRead >= 0){
/*Se han leído datos*/
}
else {
/* Tanto si es cero o menos uno, cerramos el
socket*/
}


I could read the data when the EOF character is included in the protocol data.
I can't change the protocol.
 

Re: TCP Reset connection

How could I know all the parameters of the tcp/ip implementation of both both systems (client/server?.

the server is SOLARIS 8 SO, and the client is a remote controlled station.
 

Re: TCP Reset connection



Added after 16 minutes:

Paperback: 992 pages
Publisher: Prentice Hall PTR; 7 edition (October 22, 2001)
Language: English
ISBN: 0130676101
Price: $49.99

Comprehensive, authoritative introduction to the protocols that drive the Internet.
Covers internetworking, routing, transport protocols, multicast, and more.
Includes detailed coverage of the latest trends in networking and infrastructure.

Download
Code:

**broken link removed**
 

Re: TCP Reset connection

I have made a snoop of my socket connection, and I have checked the Identification number of the IP level.

While the ID number in the server is increased one by one, the ID number in the remote controlled station is increased in a random number, usually 300 or 400.

Could it be a lost of messages? And then the cause of the socket connection which it is happening.

How could I check the bit error rate of this connection in my UNIX server?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…