Sponsored Content
Top Forums Programming TCP/IP, how to verify delivery? Post 302415915 by DreamWarrior on Friday 23rd of April 2010 05:05:16 PM
Old 04-23-2010
TCP/IP, how to verify delivery?

When I successfully write data to a TCP/IP socket, as I understand it, I am only guaranteed the data gets to the TCP/IP stack's buffer. However, a successful write doesn't guarantee that the data actually gets to the recipient. Since data can linger in the TCP/IP stack's buffer "indefinately," it is quite possible that the TCP/IP socket be closed before the buffered data is ever delivered.

Of course, since the recipient's side is also buffered, I realize the sender's TCP/IP stack can successfully flush its buffer, presumably meaning it entered the recipient's buffer, but the recipient never actually has to read it. The recipient's failure to read the data will, long term, cause their buffer to fill. As their buffer fills the packets will be acked in such a way to cause the sender's TCP/IP window reduce until, ultimately, the recipient's buffer fills entirely and the sending stack is blocked. At which point, since the sending stack can't flush, the sender's buffer will fill up, which will then cause subsequent writes, to a blocking socket, to block or, to a non-blocking socket, to return -1 setting errno to EAGAIN.

So...I suppose that's a long way of saying that buffering in the two TCP stacks make it hard to figure out, just by a successful call to write, whether or not the data written actually got to the recipient. Further, without an acknowledgment from the recipient, knowing the data was actually read is impossible. This leads me to my question.

Assuming I can't have the recipient acknowledge the response (protocol limitation), the best I could presume to do is verify the data got to the recipient's TCP/IP buffer. Since the two TCP/IP stacks will ack the packets under the hood, checking the sender's TCP buffer capacity should be sufficient to tell me how much data has been undelivered. If this is true, is there any good way to accomplish it? I ask because, given I can't modify the protocol to contain an acknowledgement, knowing the data got to the recipient's buffer is superior to "well, I stuck it the TCP/IP buffer (write succeeded), it must have got there."

The O/S is AIX 5.3 if it matters. Also, feel free to correct any misunderstandings I may have about the process.

Thanks!
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mail delivery confirmation

If I am sending mail with this command: mail .......@whatever.com < filename, is it possible to get delivery confirmation? Thanks (3 Replies)
Discussion started by: CSGUY
3 Replies

2. UNIX for Advanced & Expert Users

Delivery Failure notice when aliase has added

Hi Team, Mails are coming proper on my server. But when i added a sendmail(/etc/mail/aliases) alias to redirect mails to a script, Its started giving delivery failure for the same id. Can you tell me what can be the possible reason for this?and how can we sort it out. Its very urgent for me... (3 Replies)
Discussion started by: mindtee_abhi
3 Replies

3. AIX

Issues on email delivery

Hello, there is a problem when using sendmail to certain destinations, basically the recipient will reject the incoming message because the user@local.domain.com is used as the sender (Return-Path), they would verify local.domain.com is not a valid DNS record which is true because it is a local... (11 Replies)
Discussion started by: neil_is_ere
11 Replies

4. UNIX for Dummies Questions & Answers

sendmail weird Local Delivery Problem

Hi Guys, Just joined the forum though I have been lurking here for many years now. Wondering if anyone can help me out with a problem that I'm currently having. :wall: I have a few servers that are relaying all email off of the box to an exchange server. There is a SmartHost configured in... (7 Replies)
Discussion started by: PACETREE
7 Replies

5. Solaris

Too much TCP retransmitted and TCP duplicate on server Oracle Solaris 10

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)
Discussion started by: insatiable1610
2 Replies

6. Shell Programming and Scripting

Smtp dual delivery script

Hello Peoples, I have a problem wrapping my head around a script that I modified, essentially it uses the postfix smtp line in master.cf to send out a message to two or more email servers, It is a nice way to test different email servers and platforms. Problem with the original script is that it... (0 Replies)
Discussion started by: SeSe
0 Replies

7. IP Networking

DNS config preventing mail delivery

Hi Please can you help on this: the Net Admins decided to use DNS to resolve names, so this is preventing mail being delivered when using commands like date | mailx -s "test" abc.xyz@asdf.xx.yy. What we were asked was to edit /etc/resolv.confand add 3 entries, in all servers (10 Replies)
Discussion started by: fretagi
10 Replies

8. UNIX and Linux Applications

Qmail mail delivery problem

Dear Concern, As per below article, we have configured qmail in our system. THE LINUX STUFF: qmail Installation Steps on Linux But when we try to send any mail in own domain, got below error message. Please advise. Apr 17 17:01:20 BLAUDITSCPTEST sendmail: alias database /etc/aliases... (0 Replies)
Discussion started by: makauser
0 Replies
formmailtest(1) 					      General Commands Manual						   formmailtest(1)

NAME
formmailtest - attempt to use formmail to relay to a DSBL-complaint host SYNOPSIS
formmailtest <url> [<spoof recipient>] DESCRIPTION
formmailtest attempts to connect to the specified host and uses several different to attempt to relay through the FormMail script located at <url>. It can do more tests if the normal recipient for that FormMail script is provided as <spoof recipient>, but it can quite often relay without. Tests are done with both GET and POST to attempt to bypass any firewall/httpd.conf/.htaccess pseudo-security. In the tests described below, DOMAIN is the section of <spoof recipient> after the @ sign, USER is the section before, and DASHDOMAIN is DOMAIN after all periods have been replaced by dashes. Tests: recipient=listme@dsbl.org recipient=dsbl.org!listme realname=&email= Cc: listme@dsbl.org&recipient=() realname=) Cc: listme@dsbl.org (&recipient=() recipient=listme%dsbl.org@DOMAIN recipient=dsbl.org!listme@DOMAIN recipient=listme@dsbl.org(DOMAIN recipient=<listme@dsbl.org>DOMAIN realname=&email=0c: listme@dsbl.org&recipient=DOMAIN realname=)0c: listme@dsbl.org (&email=&recipient=DOMAIN recipient=listme@dsbl.org(USER@DASHDOMAIN recipient=<listme@dsbl.org>USER@DASHDOMAIN AUTHOR
Ian Gulliver <ian@penguinhosting.net> SEE ALSO
dsbl.conf(5), spamtrap(1) 2002-04-03 formmailtest(1)
All times are GMT -4. The time now is 03:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy