su.class.cs244a



Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Welcome to CS244a
Date: Tue, 07 Jan 2003 11:51:57 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1041969116 3915 171.64.74.37 (7 Jan 2003 19:51:56 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3631

Welcome to the CS244a Newsgroup!

You are welcome to post questions related to CS244a
to this newsgroup. In fact, we prefer that you post
questions here instead of sending email.

Each day, a TA is on duty and will answer questions posted
to this group. You can find out who is on duty each day
by looking at the class web page.

The archieve of last years cs244a is online at:

    http://www.stanford.edu/class/cs244a/news2002.html

Please have a look, maybe your questions has been answered
there already.

    Your friendly CS244a TA Team

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Problem Set One Posted, Misc Announcements
Date: Wed, 8 Jan 2003 03:27:23 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: manzanares.stanford.edu
X-Trace: news.Stanford.EDU 1041996443 21176 171.64.74.40 (8 Jan 2003 03:27:23 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.4.18-17.7.x (i686))
Xref: shelby.stanford.edu su.class.cs244a:3632

(1) Problem set one has been posted on the web page under "schedule, handouts
    & homeworks"

(2) A number of students have tried to register for a TA.  Unfortunately, this
    is broken at the moment.  I'll send out an e-mail in due course when this
    is ready.  (Anyone who's tried to sign up already will have to do so
    again, sorry).

(3) Don't forget to sign up on EEClass at eeclass.stanford.edu

  Your friendly cs244a TA Team
.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: TA assignments
Date: Wed, 8 Jan 2003 08:25:44 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine2.stanford.edu
X-Trace: news.Stanford.EDU 1042014344 159 171.64.15.67 (8 Jan 2003 08:25:44 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3633

The TA assignment process appears to be working now; please go ahead and click
on the "Your TA" link on the main course page to make your assignment.  (This
includes anyone who tried submitting earlier today or this evening).

.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Problem Set One Posted, Misc Announcements
Date: Wed, 8 Jan 2003 17:30:32 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042047032 13232 171.64.15.112 (8 Jan 2003 17:30:32 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3634


>I went to the http://eeclass.stanford.edu website but
>could not find out how to register. Could you tell me
>how to do that?

Click on "CCNet Courses" to the left, select "Computer Science"
and then "CS244a" from the resulting course lists, and click on the
"Students" link on the left.  This takes you to the usual login page,
where you can also register if you're logging in for the first time.

.

Path: shelby.stanford.edu!not-for-mail
From: Duggan John Dieterly 
Newsgroups: su.class.cs244a
Subject: birthday probability
Date: Wed, 8 Jan 2003 22:42:40 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga9.stanford.edu
X-Trace: news.Stanford.EDU 1042065760 24956 171.64.15.139 (8 Jan 2003 22:42:40 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3635

i'm an hcp student who watches the class via internet.  i did not hear
the answer to the question about the probability that it is somebody's 
birthday.  could you please tell me what the answer is and how it is 
calculated?  thank you.

-dek
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: birthday probability
Date: Wed, 8 Jan 2003 22:55:19 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1042066519 25585 171.64.15.115 (8 Jan 2003 22:55:19 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3636

Duggan John Dieterly  writes:

>i'm an hcp student who watches the class via internet.  i did not hear
>the answer to the question about the probability that it is somebody's 
>birthday.  could you please tell me what the answer is and how it is 
>calculated?  thank you.

That's question one on the first homework!

.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: ps1 1
Date: Wed, 8 Jan 2003 17:31:30 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine25.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042075892 1761 171.64.15.100 (9 Jan 2003 01:31:32 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3637

In question 1c, do we assume each year there're N students?
In question 1d, do we assume class starts on the same date each year?
thanks.

Eric



.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: ps1 1
Date: Thu, 9 Jan 2003 01:56:03 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1042077363 2812 171.64.15.115 (9 Jan 2003 01:56:03 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3638


>In question 1c, do we assume each year there're N students?
>In question 1d, do we assume class starts on the same date each year?
>thanks.

Yes, and yes.  And you can ignore leap years too :-)

.

Path: shelby.stanford.edu!myth5.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: ftpcopy
Date: Wed, 8 Jan 2003 21:24:03 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042089846 9477 171.64.15.18 (9 Jan 2003 05:24:06 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3639

Should we worry about 64-bit IP addressess (IPv6)?

Rhea

.

Path: shelby.stanford.edu!not-for-mail
From: Duggan John Dieterly 
Newsgroups: su.class.cs244a
Subject: birthday probability
Date: Thu, 9 Jan 2003 20:10:54 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga9.stanford.edu
X-Trace: news.Stanford.EDU 1042143054 23054 171.64.15.139 (9 Jan 2003 20:10:54 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3640

In class, the people attending in person were given the answer to the 
probability that it is somebody's birthday.  The answer is inaudible 
on the video.  I would like to know the answer that was given in class
so that I may participate fully in the knowledge sharing.  Thank you.
.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy
Date: Thu, 9 Jan 2003 20:20:46 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine27.stanford.edu
X-Trace: news.Stanford.EDU 1042143646 23551 171.64.15.102 (9 Jan 2003 20:20:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3641

>Should we worry about 64-bit IP addressess (IPv6)?

Nope.

.

Path: shelby.stanford.edu!elaine20.Stanford.EDU!erikdw
From: Erik Damian Weathers 
Newsgroups: su.class.cs244a
Subject: Re: birthday probability
Date: Thu, 9 Jan 2003 15:10:42 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine20.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042153845 29414 171.64.15.85 (9 Jan 2003 23:10:45 GMT)
X-Complaints-To: 
To: Duggan John Dieterly 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3642

Yeah, that is one major problem with being an SCPD student.
I really would encourage professors to repeat or at least
summarize statements made by the students in class.
I've spent too much time over the last few quarters replaying
the video in attempt to understand some garbled statement by
a student.

- Erik

On Thu, 9 Jan 2003, Duggan John Dieterly wrote:

> In class, the people attending in person were given the answer to the
> probability that it is somebody's birthday.  The answer is inaudible
> on the video.  I would like to know the answer that was given in class
> so that I may participate fully in the knowledge sharing.  Thank you.
>

.

Path: shelby.stanford.edu!not-for-mail
From: Duggan John Dieterly 
Newsgroups: su.class.cs244a
Subject: Re: birthday probability
Date: Thu, 9 Jan 2003 23:56:27 +0000 (UTC)
Lines: 27
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga9.stanford.edu
X-Trace: news.Stanford.EDU 1042156587 833 171.64.15.139 (9 Jan 2003 23:56:27 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3643

This is a huge problem with being an scpd student.  I have been 
pulling my hair out on some occasions trying to see/hear what the  
heck is going on in class.  Then when you ask the TA or Prof, they
tend to treat you like a moron.  Arrggggggg!!!!  I spend a good deal
of time on this deciphering.  Sometimes it's like trying to glean meaning 
from ancient texts that are 2X2 inches scratched in the sand.  Okay, 
I feel beter after that venting.


Erik Damian Weathers  wrote:
> Yeah, that is one major problem with being an SCPD student.
> I really would encourage professors to repeat or at least
> summarize statements made by the students in class.
> I've spent too much time over the last few quarters replaying
> the video in attempt to understand some garbled statement by
> a student.

> - Erik

> On Thu, 9 Jan 2003, Duggan John Dieterly wrote:

>> In class, the people attending in person were given the answer to the
>> probability that it is somebody's birthday.  The answer is inaudible
>> on the video.  I would like to know the answer that was given in class
>> so that I may participate fully in the knowledge sharing.  Thank you.
>>

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Office hours start 30 minutes late today...
Date: Fri, 10 Jan 2003 01:15:05 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: caliban.stanford.edu
X-Trace: news.Stanford.EDU 1042161305 3855 171.64.74.37 (10 Jan 2003 01:15:05 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.4.18-17.7.x (i686))
Xref: shelby.stanford.edu su.class.cs244a:3644

Office hours in Sweet hall will start 30 minutes late today - apologies if you have been waiting!

  Guido

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: echodemo
Date: Fri, 10 Jan 2003 01:42:09 +0000 (UTC)
Organization: Stanford University
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga22.stanford.edu
X-Trace: news.Stanford.EDU 1042162929 4961 171.64.15.152 (10 Jan 2003 01:42:09 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3645


I have compiled and run the echodemo program and it works fine (after
debugging) when
I am on epic/saga etc. Is there any reason when I run it on my home machine
that it should not work (it compiles  w/o error)?  The message is sent correctly 
but when I try to read
from the socket I get an error (returns -1). Does the echo server only send stuff
to the stanford.edu domain? When I try to communicate with an ftp server
(say transfer.stanford.edu) I can read from the socket just fine.
.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: echodemo
Date: Fri, 10 Jan 2003 01:56:23 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
X-Trace: news.Stanford.EDU 1042163783 5419 171.64.15.69 (10 Jan 2003 01:56:23 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3646

 (David Seetapun) writes:

>I have compiled and run the echodemo program and it works fine (after
>debugging) when
>I am on epic/saga etc. Is there any reason when I run it on my home machine
>that it should not work (it compiles  w/o error)?  The message is sent correctly 
>but when I try to read
>from the socket I get an error (returns -1). Does the echo server only send stuff
>to the stanford.edu domain? When I try to communicate with an ftp server
>(say transfer.stanford.edu) I can read from the socket just fine.

What does errno (e.g. a call to perror) indicate?

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: echodemo
Date: Fri, 10 Jan 2003 02:04:23 +0000 (UTC)
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: colorado.stanford.edu
X-Trace: news.Stanford.EDU 1042164263 5581 171.64.74.34 (10 Jan 2003 02:04:23 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.4.18-17.7.x (i686))
Xref: shelby.stanford.edu su.class.cs244a:3647

David,

it should run fine everywhere. Where are you located?
It could be that your ISP filters TCP port 7.

Try:

  telnet klamath.stanford.edu 7

Does that work? Also we only guarantee that this software runs under Solaris if compiled with gcc.

  Guido



> I have compiled and run the echodemo program and it works fine (after
> debugging) when
> I am on epic/saga etc. Is there any reason when I run it on my home machine
> that it should not work (it compiles  w/o error)?  The message is sent correctly 
> but when I try to read
> from the socket I get an error (returns -1). Does the echo server only send stuff
> to the stanford.edu domain? When I try to communicate with an ftp server
> (say transfer.stanford.edu) I can read from the socket just fine.
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: echodemo
Date: Fri, 10 Jan 2003 02:06:36 +0000 (UTC)
Organization: Stanford University
Lines: 18
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga22.stanford.edu
X-Trace: news.Stanford.EDU 1042164396 5744 171.64.15.152 (10 Jan 2003 02:06:36 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3648


Connection reset by peer

In article 
  (Matthew Jonathan Holliman) writes:
>  (David Seetapun) writes:
> 
> >I have compiled and run the echodemo program and it works fine (after
> >debugging) when
> >I am on epic/saga etc. Is there any reason when I run it on my home machine
> >that it should not work (it compiles  w/o error)?  The message is sent correctly 
> >but when I try to read
> >from the socket I get an error (returns -1). Does the echo server only send stuff
> >to the stanford.edu domain? When I try to communicate with an ftp server
> >(say transfer.stanford.edu) I can read from the socket just fine.
> 
> What does errno (e.g. a call to perror) indicate?
> 
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: echodemo
Date: Fri, 10 Jan 2003 02:09:32 +0000 (UTC)
Organization: Stanford University
Lines: 35
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga22.stanford.edu
X-Trace: news.Stanford.EDU 1042164572 5849 171.64.15.152 (10 Jan 2003 02:09:32 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3649


Thanks for looking a this: I understand about the Solaris/gcc guarantees.

[adsl-63-193-5-243:~/ftpcopy] seetapun% telnet klamath.stanford.edu 7
Trying 171.64.74.58...
Connected to yuba.stanford.edu.
Escape character is '^]'.
Connection closed by foreign host.


In article 
 Guido Appenzeller  writes:
> David,
> 
> it should run fine everywhere. Where are you located?
> It could be that your ISP filters TCP port 7.
> 
> Try:
> 
>   telnet klamath.stanford.edu 7
> 
> Does that work? Also we only guarantee that this software runs under Solaris if compiled with gcc.
> 
>   Guido
> 
> 
> 
> > I have compiled and run the echodemo program and it works fine (after
> > debugging) when
> > I am on epic/saga etc. Is there any reason when I run it on my home machine
> > that it should not work (it compiles  w/o error)?  The message is sent correctly 
> > but when I try to read
> > from the socket I get an error (returns -1). Does the echo server only send stuff
> > to the stanford.edu domain? When I try to communicate with an ftp server
> > (say transfer.stanford.edu) I can read from the socket just fine.
.

Date: Thu, 09 Jan 2003 19:06:56 -0800
From: Matthew Jonathan Holliman 
Message-ID: 
To: 
Subject: CS244a: misc. announcements
Lines: 16
Newsgroups: su.class.cs244a
Organization: Stanford University Posting Gateway (mailtonews 1.3/0.42)
Path: shelby.stanford.edu!mail-to-news!elaine22.stanford.edu
Sender: 
X-Mail-Path: 
X-Original-Date: Thu, 9 Jan 2003 19:06:54 -0800 (PST)
X-Original-Message-ID: 
Xref: shelby.stanford.edu su.class.cs244a:3650


(1) Just a reminder to check last year's newsgroup postings for answers
    before posting/e-mailing questions.  You'll find a lot of useful
    information and clarifications in there.  You can access the archive
    by following the "FAQs" link from the main course homepage.

    Also, if you have a question that isn't answered by the existing archive,
    please just post it to the newsgroup unless there's a particular reason
    it must be answered privately!  Chances are that other people have a
    similar question.

(2) The slides for tomorrow's review session have been posted under
    the handouts page.

Thanks.
Matthew
.

Path: shelby.stanford.edu!elaine22.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1 question 2
Date: Fri, 10 Jan 2003 03:18:07 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine22.stanford.edu
X-Trace: news.Stanford.EDU 1042168687 7863 171.64.15.87 (10 Jan 2003 03:18:07 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3651

>in PS1, Question2, (a), what do you mean by how much data can fit in the
>pipe ? I'm assuming the 'pipe' refers to the first pipe the user's bits
>start going in ? if so, I would think all the data would eventually fit
>into the pipe. Please clarify.

It basically means, how much outstanding data can you have on the line
(i.e. "in flight")?

.

Path: shelby.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy
Date: Thu, 09 Jan 2003 21:43:24 -0800
Organization: Stanford University
Lines: 7
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: mckeown-pbdsl1.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042177517 12405 171.66.211.98 (10 Jan 2003 05:45:17 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (WinNT; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3652


IPv6 addresses are 128-bits anyway ;-)

> 
> >Should we worry about 64-bit IP addressess (IPv6)?
> 
> Nope.
.

Path: shelby.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: birthday probability
Date: Thu, 09 Jan 2003 21:45:46 -0800
Organization: Stanford University
Lines: 11
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: mckeown-pbdsl1.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042177660 12405 171.66.211.98 (10 Jan 2003 05:47:40 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (WinNT; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3653


I will endeavor to repeat questions/answers. But I won't
always remember. Feel free to email me to remind me.

You should raise this problem with folks at SCPD/SITN. 
The room is supposed to be set up, and the microphones
arranged, so that questions/answers from students are
audible on tape. Clearly, something's wrong. I expect
they'd like to know.

- Nick
.

Path: shelby.stanford.edu!not-for-mail
From: "Bina Vasavda" 
Newsgroups: su.class.cs244a
Subject: Purify
Date: Thu, 9 Jan 2003 22:17:55 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: ev-01-hos4d.stanford.edu
X-Trace: news.Stanford.EDU 1042179474 13272 128.12.154.59 (10 Jan 2003 06:17:54 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3654

Hi, when I try to run echodemo.purify, I wait for a long time, and finally
get the following error. Any suggestions?
Thanks,
Bina

[echodemo.purify waiting for rtslave on
/tmp/echodemo.purify_16570_pure_cx_1199899173_17632.............
Giving up]
Purify: Couldn't connect to rtslave.


.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: PS #1 questions
Date: Thu, 9 Jan 2003 23:38:33 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042184319 15581 171.64.15.78 (10 Jan 2003 07:38:39 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3655

Q6(a):
1. can we assume that all packets are of the same size, L?
2. can we assume all inter-packets gap having the same lengths, g?
or the above two assumptions are irrelevant to solving the problem?

Q9(b):
is there any buffer size constraint on this switch? or we are free to
specify a particular buffer size which works with our output link rate?

thanks!

Tan Gao
-------------------


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!ishastri
From: Ishaan S Shastri 
Newsgroups: su.class.cs244a
Subject: prob 5a/b
Date: Thu, 9 Jan 2003 23:58:53 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042185534 16254 171.64.15.106 (10 Jan 2003 07:58:54 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3656

Hi,

In question 5, since processing time within the router is negligible, what
does the number of packets in the buffer have to do with anything?

Doesn't this imply that the packets are effectively sent immediately on
their way after reaching a router, and as such, doesn't this imply that a)
and b) amount to the same question?

Thanks!
Ishaan

.

Path: shelby.stanford.edu!elaine21.Stanford.EDU!btsang
From: Brian Hing-Kit Tsang 
Newsgroups: su.class.cs244a
Subject: PS1, Q7
Date: Fri, 10 Jan 2003 01:50:58 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042192263 20431 171.64.15.86 (10 Jan 2003 09:51:03 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3657

For the store and forward model, do we assume that the buffer does not
free the memory associated with a packet until it sends out the last bit
of that packet?

.

Path: shelby.stanford.edu!not-for-mail
From: Steve Garrity 
Newsgroups: su.class.cs244a
Subject: PS1 Q9
Date: Fri, 10 Jan 2003 02:14:07 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: garrity2.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042193709 21466 128.12.74.77 (10 Jan 2003 10:15:09 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3658

For question 9c, don't we need an output link speed?  Without it, if you
defined it to be equal to that in 9b, then no packet would ever hit the
buffer...  Or am I missing something?  -Steve

.

Date: Fri, 10 Jan 2003 11:59:59 -0800
From: Matthew Jonathan Holliman 
Message-ID: 
To: 
Subject: CS244a: discussion section today
Lines: 11
Newsgroups: su.class.cs244a
Organization: Stanford University Posting Gateway (mailtonews 1.3/0.42)
Path: shelby.stanford.edu!mail-to-news!elaine40.stanford.edu
Sender: 
X-Mail-Path: 
X-Original-Date: Fri, 10 Jan 2003 11:59:56 -0800 (PST)
X-Original-Message-ID: 
Xref: shelby.stanford.edu su.class.cs244a:3659


hi--
just a reminder, there's a review session today in Gates B1 at
3.15pm.  we'll cover assignment #1 as well as an overview of
socket programming.

the session will also be televised for SITN students (channel E3),
and will be available online on the SCPD pages later.

Matthew
.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: echodemo
Date: Fri, 10 Jan 2003 21:44:39 +0000 (UTC)
Lines: 42
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: caliban.stanford.edu
X-Trace: news.Stanford.EDU 1042235079 13226 171.64.74.37 (10 Jan 2003 21:44:39 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.4.18-17.7.x (i686))
Xref: shelby.stanford.edu su.class.cs244a:3660

David,

I checked again, it turns out klamath does restrict echo requests. Requests from outside Stanford might not work.

  Guido

 Seetapun  wrote:

> Thanks for looking a this: I understand about the Solaris/gcc guarantees.

> [adsl-63-193-5-243:~/ftpcopy] seetapun% telnet klamath.stanford.edu 7
> Trying 171.64.74.58...
> Connected to yuba.stanford.edu.
> Escape character is '^]'.
> Connection closed by foreign host.


> In article 
>  Guido Appenzeller  writes:
>> David,
>> 
>> it should run fine everywhere. Where are you located?
>> It could be that your ISP filters TCP port 7.
>> 
>> Try:
>> 
>>   telnet klamath.stanford.edu 7
>> 
>> Does that work? Also we only guarantee that this software runs under Solaris if compiled with gcc.
>> 
>>   Guido
>> 
>> 
>> 
>> > I have compiled and run the echodemo program and it works fine (after
>> > debugging) when
>> > I am on epic/saga etc. Is there any reason when I run it on my home machine
>> > that it should not work (it compiles  w/o error)?  The message is sent correctly 
>> > but when I try to read
>> > from the socket I get an error (returns -1). Does the echo server only send stuff
>> > to the stanford.edu domain? When I try to communicate with an ftp server
>> > (say transfer.stanford.edu) I can read from the socket just fine.
.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS #1 questions
Date: Sat, 11 Jan 2003 01:17:17 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1042247837 22109 171.64.15.117 (11 Jan 2003 01:17:17 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3661

>Q6(a):
>1. can we assume that all packets are of the same size, L?
>2. can we assume all inter-packets gap having the same lengths, g?
>or the above two assumptions are irrelevant to solving the problem?

They're definitely relevant.  Keep in mind that you want to "be sure that the
buffer will never overflow."  So you'll want to consider the worst case to
make sure this doesn't happen.

>Q9(b):
>is there any buffer size constraint on this switch? or we are free to
>specify a particular buffer size which works with our output link rate?

Again, to guarantee that packet	overflows "will never take place," you'll
need to consider the worst case arrival process in answering this problem.

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: prob 5a/b
Date: Sat, 11 Jan 2003 01:18:14 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1042247894 22126 171.64.15.117 (11 Jan 2003 01:18:14 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3662


>In question 5, since processing time within the router is negligible, what
>does the number of packets in the buffer have to do with anything?

Processing time, i.e. the time to decide on which output link the packet should
be sent (as a real router must do), is negligible, but packet transmission
time itself is not.

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q7
Date: Sat, 11 Jan 2003 01:26:59 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1042248419 22417 171.64.15.117 (11 Jan 2003 01:26:59 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3663

Brian Hing-Kit Tsang  writes:

>For the store and forward model, do we assume that the buffer does not
>free the memory associated with a packet until it sends out the last bit
>of that packet?

Can you explain why this matters?  (I don't see any connection to Q7).

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1 Q9
Date: Sat, 11 Jan 2003 01:35:55 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1042248955 22673 171.64.15.117 (11 Jan 2003 01:35:55 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3664


>For question 9c, don't we need an output link speed?  Without it, if you
>defined it to be equal to that in 9b, then no packet would ever hit the
>buffer...  Or am I missing something?  -Steve

You'd still need some amount of buffering, because the router is a store-and-
forward device.  But for this question, since it asks for the maximum buffer
length and minimum service rate, you can basically disregard the output link;
e.g., assume the router's service process is the bottleneck and the output
link is faster than this (and is thus irrelevant since D(t) = S(t)).

Hope this makes sense.
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: PS1 Q9
Date: Fri, 10 Jan 2003 17:35:47 -0800
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042249007 22690 128.12.186.92 (11 Jan 2003 01:36:47 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3665

The question is asking you to provide the minimum service rate.  That is the
rate at which the bits must be drained out of the queue to ensure that the
queue is stable.  Setting the service rate to that of 9b will ensure a
stable queue but that is most likely not the minimum rate.

--Russ

"Steve Garrity"  wrote in message

> For question 9c, don't we need an output link speed?  Without it, if you
> defined it to be equal to that in 9b, then no packet would ever hit the
> buffer...  Or am I missing something?  -Steve
>


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Purify
Date: Sat, 11 Jan 2003 01:36:57 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1042249017 22742 171.64.15.117 (11 Jan 2003 01:36:57 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3666

"Bina Vasavda"  writes:

>Hi, when I try to run echodemo.purify, I wait for a long time, and finally
>get the following error. Any suggestions?
>Thanks,
>Bina

>[echodemo.purify waiting for rtslave on
>/tmp/echodemo.purify_16570_pure_cx_1199899173_17632.............
>Giving up]
>Purify: Couldn't connect to rtslave.


I've never seen that before.  Do you still get the error today?  On which
machine, or is it on all machines that you try?
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q7
Date: Fri, 10 Jan 2003 17:51:32 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042249952 23184 128.12.186.92 (11 Jan 2003 01:52:32 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3667

Just think of the buffer space being freed as soon as the bit has been
serviced.  However, remember that if the router is a store and forward
design, you must wait until you have a complete packet in the buffer before
you can start servicing it.

As to what Matt said, I agree with him that I do not see the connection of
this question with Q7.

--Russ

"Brian Hing-Kit Tsang"  wrote in message

> For the store and forward model, do we assume that the buffer does not
> free the memory associated with a packet until it sends out the last bit
> of that packet?
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Purify
Date: Fri, 10 Jan 2003 17:53:27 -0800
Lines: 25
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042250066 23214 128.12.186.92 (11 Jan 2003 01:54:26 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3668

Make sure that you are running purify on a Solaris machine (ie: do not run
on the Raptor or Firebird machines).

--Russ

"Matthew Jonathan Holliman"  wrote in message

> "Bina Vasavda"  writes:
>
> >Hi, when I try to run echodemo.purify, I wait for a long time, and
finally
> >get the following error. Any suggestions?
> >Thanks,
> >Bina
>
> >[echodemo.purify waiting for rtslave on
> >/tmp/echodemo.purify_16570_pure_cx_1199899173_17632.............
> >Giving up]
> >Purify: Couldn't connect to rtslave.
>
>
> I've never seen that before.  Do you still get the error today?  On which
> machine, or is it on all machines that you try?


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: read() blocks forever on data connection
Date: Sat, 11 Jan 2003 04:29:45 +0000 (UTC)
Organization: Stanford University
Lines: 55
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic13.stanford.edu
X-Trace: news.Stanford.EDU 1042259385 27291 171.64.15.46 (11 Jan 2003 04:29:45 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3669


I am having the following problem. I can set up the control connection and 
the FTP server behaves as expected. I then set up a new socket to listen for
data connections with an ephemeral port as described. A port command is sent
to the server and I receive a 200 response code indicating success. A LIST
command is then sent to the server which responds with 150 for Opening a data
connection. I then use accept on the listening socket and I get a connection from
the right IP address Port 20 which seems correct. I also get form the control
connection a 226 saying the transfer is complete (for the LIST presumably).
But when I try to read from the accepted socket the program blocks forever even
if I try to read just one byte.

Here is some print out from the program.

epic13:~/cs244a/pp1> ./ftpcopy ftp.stanford.edu
Waiting for reply....
220-----------------------------------------------------------------------------
220-    Abuse of this facility may be considered violation of Federal or
220-    California law or the policies of Stanford University.  If you have
220-    questions regarding this policy please send mail to
220-    
220-----------------------------------------------------------------------------
220-
220 ftp2.Stanford.EDU FTP server ready.
Sending username.
Bytes sent 16
Waiting for reply....
331 Guest login ok, send your complete e-mail address as password.
Sending password.
Bytes sent 11
Waiting for reply....
230-Please read the file README
230-  it was last modified on Fri Feb 15 12:22:25 2002 - 329 days ago
230 Guest login ok, access restrictions apply.
Host is epic13.Stanford.EDU
IP address 171.64.15.46
IP address 171, 64, 15, 46
TCP port number 64653
TCP port h 252, l 141
port_string = PORT 171,64,15,46,252,141
Bytes sent 27
Waiting for reply....
200 PORT command successful.
Bytes sent 8
Waiting for reply....
200 Type set to A.
Bytes sent 6
Waiting for reply....
150 Opening ASCII mode data connection for /bin/ls.
connection from 171.64.15.241, port 20
connected data socket = 0
listening data socket = 5
control socket = 4
226 Transfer complete.
(hangs here)^C
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: read() blocks forever on data connection
Date: Sat, 11 Jan 2003 01:03:16 -0800
Lines: 85
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042275857 5679 128.12.186.92 (11 Jan 2003 09:04:17 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3670

There could be a number of things going wrong which leads to the following
behavior.  Make sure you are aware that the accept command returns a new
socket and that you are calling read specifying this socket.

The reason for this second socket being created is so the open listening
socket is freed up again for another connection.  I have not tried this
myself but my guess is if you call read on the listening socket, it will
most likely hang waiting for data but since no data is being sent on that
socket your program will make no progress.

I hope this helps.

--Russ

"David Seetapun"  wrote in message

>
> I am having the following problem. I can set up the control connection and
> the FTP server behaves as expected. I then set up a new socket to listen
for
> data connections with an ephemeral port as described. A port command is
sent
> to the server and I receive a 200 response code indicating success. A LIST
> command is then sent to the server which responds with 150 for Opening a
data
> connection. I then use accept on the listening socket and I get a
connection from
> the right IP address Port 20 which seems correct. I also get form the
control
> connection a 226 saying the transfer is complete (for the LIST
presumably).
> But when I try to read from the accepted socket the program blocks forever
even
> if I try to read just one byte.
>
> Here is some print out from the program.
>
> epic13:~/cs244a/pp1> ./ftpcopy ftp.stanford.edu
> Waiting for reply....
>
220-------------------------------------------------------------------------
----
> 220-    Abuse of this facility may be considered violation of Federal or
> 220-    California law or the policies of Stanford University.  If you
have
> 220-    questions regarding this policy please send mail to
> 220-    
>
220-------------------------------------------------------------------------
----
> 220-
> 220 ftp2.Stanford.EDU FTP server ready.
> Sending username.
> Bytes sent 16
> Waiting for reply....
> 331 Guest login ok, send your complete e-mail address as password.
> Sending password.
> Bytes sent 11
> Waiting for reply....
> 230-Please read the file README
> 230-  it was last modified on Fri Feb 15 12:22:25 2002 - 329 days ago
> 230 Guest login ok, access restrictions apply.
> Host is epic13.Stanford.EDU
> IP address 171.64.15.46
> IP address 171, 64, 15, 46
> TCP port number 64653
> TCP port h 252, l 141
> port_string = PORT 171,64,15,46,252,141
> Bytes sent 27
> Waiting for reply....
> 200 PORT command successful.
> Bytes sent 8
> Waiting for reply....
> 200 Type set to A.
> Bytes sent 6
> Waiting for reply....
> 150 Opening ASCII mode data connection for /bin/ls.
> connection from 171.64.15.241, port 20
> connected data socket = 0
> listening data socket = 5
> control socket = 4
> 226 Transfer complete.
> (hangs here)^C


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: read() blocks forever on data connection
Date: Sat, 11 Jan 2003 15:14:40 +0000 (UTC)
Organization: Stanford University
Lines: 100
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: epic1.stanford.edu
X-Trace: news.Stanford.EDU 1042298080 19011 171.64.15.34 (11 Jan 2003 15:14:40 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3671


In article 
 "Russell Greene"  writes:
> There could be a number of things going wrong which leads to the following
> behavior.  Make sure you are aware that the accept command returns a new
> socket and that you are calling read specifying this socket.
Yes I have done this. In fact I called accept with pointers to data structures
that allow me to print that the connection comes from the expected IP address and
port 20.

> 
> The reason for this second socket being created is so the open listening
> socket is freed up again for another connection.  I have not tried this
> myself but my guess is if you call read on the listening socket, it will
> most likely hang waiting for data but since no data is being sent on that
> socket your program will make no progress.

If I call read on the listening socket after accepting a connection
 it returns -1 and a "socket not connected error" but at least returns.

Am I correct in saying that once I accept the connection, the data is buffered
until I go to read it? It just seems like I am "missing" the data somehow.


> 
> I hope this helps.
> 
> --Russ
> 
> "David Seetapun"  wrote in message
> 
> >
> > I am having the following problem. I can set up the control connection and
> > the FTP server behaves as expected. I then set up a new socket to listen
> for
> > data connections with an ephemeral port as described. A port command is
> sent
> > to the server and I receive a 200 response code indicating success. A LIST
> > command is then sent to the server which responds with 150 for Opening a
> data
> > connection. I then use accept on the listening socket and I get a
> connection from
> > the right IP address Port 20 which seems correct. I also get form the
> control
> > connection a 226 saying the transfer is complete (for the LIST
> presumably).
> > But when I try to read from the accepted socket the program blocks forever
> even
> > if I try to read just one byte.
> >
> > Here is some print out from the program.
> >
> > epic13:~/cs244a/pp1> ./ftpcopy ftp.stanford.edu
> > Waiting for reply....
> >
> 220-------------------------------------------------------------------------
> ----
> > 220-    Abuse of this facility may be considered violation of Federal or
> > 220-    California law or the policies of Stanford University.  If you
> have
> > 220-    questions regarding this policy please send mail to
> > 220-    
> >
> 220-------------------------------------------------------------------------
> ----
> > 220-
> > 220 ftp2.Stanford.EDU FTP server ready.
> > Sending username.
> > Bytes sent 16
> > Waiting for reply....
> > 331 Guest login ok, send your complete e-mail address as password.
> > Sending password.
> > Bytes sent 11
> > Waiting for reply....
> > 230-Please read the file README
> > 230-  it was last modified on Fri Feb 15 12:22:25 2002 - 329 days ago
> > 230 Guest login ok, access restrictions apply.
> > Host is epic13.Stanford.EDU
> > IP address 171.64.15.46
> > IP address 171, 64, 15, 46
> > TCP port number 64653
> > TCP port h 252, l 141
> > port_string = PORT 171,64,15,46,252,141
> > Bytes sent 27
> > Waiting for reply....
> > 200 PORT command successful.
> > Bytes sent 8
> > Waiting for reply....
> > 200 Type set to A.
> > Bytes sent 6
> > Waiting for reply....
> > 150 Opening ASCII mode data connection for /bin/ls.
> > connection from 171.64.15.241, port 20
> > connected data socket = 0
> > listening data socket = 5
> > control socket = 4
> > 226 Transfer complete.
> > (hangs here)^C
> 
> 
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: PORT and PASV
Date: Sat, 11 Jan 2003 16:27:12 +0000 (UTC)
Organization: Stanford University
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic1.stanford.edu
X-Trace: news.Stanford.EDU 1042302432 20385 171.64.15.34 (11 Jan 2003 16:27:12 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3672


Using PORT read() blocks forever even when I get transfer complete on control 
connection.

using PASV and opening a connection to the port the server gives me works fine.

Can I just use PASV for transferring data for the project?
.

Path: shelby.stanford.edu!epic25.Stanford.EDU!smadhura
From: Madhura Sudhakar Sharangpani 
Newsgroups: su.class.cs244a
Subject: LIST problem
Date: Sat, 11 Jan 2003 10:55:21 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic25.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042311325 23857 171.64.15.62 (11 Jan 2003 18:55:25 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3673

Hi
After creating a control connection to the server ftp.stanford.edu, I
tried using LIST command, but LIST is giving me only the listing of
directoried on the server, & no listing of files is obtained,
When I try using NLST command, it gives proper listing of everythins, but
command "LIST" gives me only directory listing
also when I gibe RETR command for a particular file, I get error,
permission denied,
What is the problem?
Also which directory should I go into in while connecting to
ftp.stanford.edu?, I currently tried going into my own directory
Please let me know
Madhura.

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: PORT and PASV
Date: Sat, 11 Jan 2003 11:01:26 -0800
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042311690 24071 171.64.15.80 (11 Jan 2003 19:01:30 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3674


>
> Using PORT read() blocks forever even when I get transfer complete on control
> connection.
>
> using PASV and opening a connection to the port the server gives me works fine.
>
> Can I just use PASV for transferring data for the project?


  Sure thing.

  /mc

.

Path: shelby.stanford.edu!not-for-mail
From: Duggan John Dieterly 
Newsgroups: su.class.cs244a
Subject: Material for Next Lecture?
Date: Sat, 11 Jan 2003 19:08:42 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic28.stanford.edu
X-Trace: news.Stanford.EDU 1042312122 23992 171.64.15.59 (11 Jan 2003 19:08:42 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3675

Hi,

Is the prof going to cover the remaining material in Handout #3 starting on 
slide #26 ("Some Definitions") during the 
next lecture on Jan 14?  It seems that this material is essential for 
completing Problem Set #1, but the schedule on the course web page 
doesn't appear to list this material.   Are we expected to be able to 
complete PS #1 at this point (sat jan 11), or will we be better equipped
to handle this after tuesday's lecture (jan 14)?  

If the prof is going to go over this material on jan 14, that doesn't leave
us much time to complete the assignment given that it is due the next day.

Thank you.

-deklan dieterly 
.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: LIST problem
Date: Sat, 11 Jan 2003 11:22:39 -0800
Lines: 57
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042312961 24523 171.64.15.80 (11 Jan 2003 19:22:41 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3676


> Hi
> After creating a control connection to the server ftp.stanford.edu, I
> tried using LIST command, but LIST is giving me only the listing of
> directoried on the server, & no listing of files is obtained,

Here is an output I get from LIST at ftp.stanford.edu:

class/engre62" is current directory.
250 CWD command successful.
200 Type set to A.
227 Entering Passive Mode (171,64,15,241,249,112)
150 Opening ASCII mode data connection for /bin/ls.
total 5765
drwxr-xr-x    4 root     root         2048 Nov 22 16:53 .backup
-rw-------    1 70448    root          881 Sep 24 09:49 .description
-rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_b.TIFF
-rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_g.TIFF
-rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_r.TIFF
drwxr-xr-x    2 root     root         2048 Nov 27 17:42 WWW
drwxr-xr-x    4 70448    root         2048 Sep 16 18:27 geophys112.2002
-rw-r--r--    1 5469     37         119032 Sep 27 09:40 hw1data.mat
-rw-r--r--    1 5469     37        2160216 Oct 11 12:08 hw3data.mat
-rw-r--r--    1 5469     37          47648 Oct 18 11:01 hw4data.mat
-rw-r--r--    1 5469     37        2592904 Oct 18 11:01 hw4magdata.mat
-rw-r--r--    1 5469     37         651624 Oct 18 11:01 hw4whistler.mat
-rw-r--r--    1 5469     37          19872 Oct 25 12:44 hw5data.mat
-rw-r--r--    1 5469     37            750 Nov  8 12:41 inklindata
-rw-r--r--    1 5469     37           1407 Oct 11 12:08 soil.dat

I'm using passive mode LIST and it does list files.  You can always
use telnet and PASV mode to verify that the commands are working correctly.


> When I try using NLST command, it gives proper listing of everythins, but
> command "LIST" gives me only directory listing
> also when I gibe RETR command for a particular file, I get error,
> permission denied,
> What is the problem?

Check the permissions on the file you are trying to get, if you cannot
get the file using vanilla ftp then you don't have permissions to the file.

> Also which directory should I go into in while connecting to
> ftp.stanford.edu?, I currently tried going into my own directory
> Please let me know

That really is up to you .. why don't you get the suffix mat with a recursive depth of
2?

 ./ftpcopy mat 2 ftp.stanford.edu

remember, this is only to test your implementation.

regards,
/mc

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: read() blocks forever on data connection
Date: Sat, 11 Jan 2003 11:47:24 -0800
Lines: 50
Distribution: su
Message-ID: 
References:  
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042314445 24970 171.64.15.80 (11 Jan 2003 19:47:25 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3677

>
> In article 
>  "Russell Greene"  writes:
> > There could be a number of things going wrong which leads to the following
> > behavior.  Make sure you are aware that the accept command returns a new
> > socket and that you are calling read specifying this socket.
> Yes I have done this. In fact I called accept with pointers to data structures
> that allow me to print that the connection comes from the expected IP address and
> port 20.
>
> >
> > The reason for this second socket being created is so the open listening
> > socket is freed up again for another connection.  I have not tried this
> > myself but my guess is if you call read on the listening socket, it will
> > most likely hang waiting for data but since no data is being sent on that
> > socket your program will make no progress.
>
> If I call read on the listening socket after accepting a connection
>  it returns -1 and a "socket not connected error" but at least returns.

 You never read on the listening socket for data. My suggestion is to use PASV
 mode, this way you don't have to bind/listen/accept and then service the
 connecting socket. In fact you can simply reuse the code you initially wrote
 to connect to the ftp server.

 Have you been succesful with getting the LIST command to work with the PORT
 command?  You may want to use netcat to verify that the server is indeed
 sending to your bound connection.

 http://www.atstake.com/research/tools/network_utilities/

 I'm not sure if Dr. McKeown has posted this link, but there is a wonderful
 socket tutorial at:

 http://www.ecst.csuchico.edu/~beej/guide/net/html/

 I will go over a small (50 line or so) program that demonstrates the problem
 if you still cannot figure it out.

>
> Am I correct in saying that once I accept the connection, the data is buffered
> until I go to read it? It just seems like I am "missing" the data somehow.

 You shouldn't have to worry about system level buffering, you can rest
 assured the data is not lost. The sender is blocked from sending if you are
 not receiving on the other end.

 /mc


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Material for Next Lecture?
Date: Sat, 11 Jan 2003 12:45:35 -0800
Lines: 32
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
X-Trace: news.Stanford.EDU 1042317995 26422 128.12.177.14 (11 Jan 2003 20:46:35 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3678

Hi,

      The remaining material is very useful in completing Problem Set #1.  I
believe, although I cannot guarantee, that it will be covered on Tuesday.
However, you should probably spend some time over the weekend looking over
that material.  That way you can finish Problem Set 1 early.

--Russ


"Duggan John Dieterly"  wrote in message

> Hi,
>
> Is the prof going to cover the remaining material in Handout #3 starting
on
> slide #26 ("Some Definitions") during the
> next lecture on Jan 14?  It seems that this material is essential for
> completing Problem Set #1, but the schedule on the course web page
> doesn't appear to list this material.   Are we expected to be able to
> complete PS #1 at this point (sat jan 11), or will we be better equipped
> to handle this after tuesday's lecture (jan 14)?
>
> If the prof is going to go over this material on jan 14, that doesn't
leave
> us much time to complete the assignment given that it is due the next day.
>
> Thank you.
>
> -deklan dieterly


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: read() blocks forever on data connection
Date: Sat, 11 Jan 2003 22:02:50 +0000 (UTC)
Organization: Stanford University
Lines: 64
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: epic28.stanford.edu
X-Trace: news.Stanford.EDU 1042322570 28280 171.64.15.59 (11 Jan 2003 22:02:50 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3679


In article 
 Martin Casado  writes:
> >
> > In article 
> >  "Russell Greene"  writes:
> > > There could be a number of things going wrong which leads to the following
> > > behavior.  Make sure you are aware that the accept command returns a new
> > > socket and that you are calling read specifying this socket.
> > Yes I have done this. In fact I called accept with pointers to data structures
> > that allow me to print that the connection comes from the expected IP address and
> > port 20.
> >
> > >
> > > The reason for this second socket being created is so the open listening
> > > socket is freed up again for another connection.  I have not tried this
> > > myself but my guess is if you call read on the listening socket, it will
> > > most likely hang waiting for data but since no data is being sent on that
> > > socket your program will make no progress.
> >
> > If I call read on the listening socket after accepting a connection
> >  it returns -1 and a "socket not connected error" but at least returns.
> 
>  You never read on the listening socket for data. My suggestion is to use PASV
>  mode, this way you don't have to bind/listen/accept and then service the
>  connecting socket. In fact you can simply reuse the code you initially wrote
>  to connect to the ftp server.

No that was not the problem as I was reading from socket k = accept(...). I was
just pointing out that if you read on the listening socket it would not block.
But if I read from the socket which was returned by accept then it blocked
forever. I am using PASV at the moment and it is fine. I am just curious why
PORT doesn't seem to work

> 
>  Have you been succesful with getting the LIST command to work with the PORT
>  command?  You may want to use netcat to verify that the server is indeed
>  sending to your bound connection.

No: the server claims it has completed the data transfer related to LIST but no
data ever shows up. I will try netcat. 

> 
>  http://www.atstake.com/research/tools/network_utilities/
> 
>  I'm not sure if Dr. McKeown has posted this link, but there is a wonderful
>  socket tutorial at:
> 
>  http://www.ecst.csuchico.edu/~beej/guide/net/html/
> 
>  I will go over a small (50 line or so) program that demonstrates the problem
>  if you still cannot figure it out.
> 
> >
> > Am I correct in saying that once I accept the connection, the data is buffered
> > until I go to read it? It just seems like I am "missing" the data somehow.
> 
>  You shouldn't have to worry about system level buffering, you can rest
>  assured the data is not lost. The sender is blocked from sending if you are
>  not receiving on the other end.
> 
>  /mc
> 
> 
.

Path: shelby.stanford.edu!elaine28.Stanford.EDU!ishastri
From: Ishaan S Shastri 
Newsgroups: su.class.cs244a
Subject: prob 7b
Date: Sat, 11 Jan 2003 14:58:38 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine28.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042325920 29626 171.64.15.103 (11 Jan 2003 22:58:40 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3680

Hi all,

For problem 7, part b, what are the units of A(t), S(t), D(t), etc? Are
they packets or bits?  It matters if we are only interested in reporting
discrete numbers of packets (e.g. 150 bits serviced == only 1 packet
serviced).

Thanks!
Ishaan

.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: prob 7b
Date: Sat, 11 Jan 2003 17:52:42 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
X-Trace: news.Stanford.EDU 1042336423 4139 128.12.177.15 (12 Jan 2003 01:53:43 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3682

The answers should be in bits.

--Russ


"Ishaan S Shastri"  wrote in message

> Hi all,
>
> For problem 7, part b, what are the units of A(t), S(t), D(t), etc? Are
> they packets or bits?  It matters if we are only interested in reporting
> discrete numbers of packets (e.g. 150 bits serviced == only 1 packet
> serviced).
>
> Thanks!
> Ishaan
>


.

Path: shelby.stanford.edu!saga22.Stanford.EDU!tlunny
From: Timothy Patrick Lunny 
Newsgroups: su.class.cs244a
Subject: Ansi 99
Date: Sat, 11 Jan 2003 18:53:51 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga22.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042340035 5817 171.64.15.152 (12 Jan 2003 02:53:55 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3683

This was somewhat addressed in the newsgroup from last year, but can we
compile our programs with -fstd=iso9899:199x instead of -ansi since C99
is the latest ANSI C and coming up on 4 years old?

Thanks-
Tim Lunny

.

Path: shelby.stanford.edu!saga21.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: LIST response
Date: Sat, 11 Jan 2003 20:14:16 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042344858 7586 171.64.15.151 (12 Jan 2003 04:14:18 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3684

Can we assume that the first line from the response will always be of the
form : total <number of lines in listing>



Thanks,
nishant



.

Path: shelby.stanford.edu!saga10.Stanford.EDU!priyank9
From: Priyank Kshitij Patel 
Newsgroups: su.class.cs244a
Subject: Transport endpoint not connected!!
Date: Sat, 11 Jan 2003 20:40:19 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga10.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042346422 8167 171.64.15.140 (12 Jan 2003 04:40:22 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3685

Hi,

I am facing this error after I issue the LIST command and then accept
the data connection from the server and start to read the first bytes from
there.

the read returns with -1 and the error is ENOTCONN i.e. "Transport
endpoint not connected"

I would like to mention at this point that my accept() on the data socket
which is the immediately preceding call on the same socket descriptor
works fine....

thanks

Priyank


.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Transport endpoint not connected!!
Date: Sat, 11 Jan 2003 21:01:48 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042347711 8629 171.64.15.80 (12 Jan 2003 05:01:51 GMT)
X-Complaints-To: 
To: Priyank Kshitij Patel 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3686

> Hi,
>
> I am facing this error after I issue the LIST command and then accept
> the data connection from the server and start to read the first bytes from
> there.
>
> the read returns with -1 and the error is ENOTCONN i.e. "Transport
> endpoint not connected"

 Are you sure you are reading from the correct file descriptor?  Remember,
 accept returns a new file descriptor for the connected socket, this is
 the one you are going to want to read from.  This has been mentioned
 previously.

>
> I would like to mention at this point that my accept() on the data socket
> which is the immediately preceding call on the same socket descriptor
> works fine....

 Doh! here is the problem, read from the descriptor returned from the call
 to accept.... aka

  new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);

  read from new_fd, not sockfd ;-)

  /mc

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: LIST response
Date: Sat, 11 Jan 2003 21:14:29 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042348471 8885 171.64.15.80 (12 Jan 2003 05:14:31 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3687


> Can we assume that the first line from the response will always be of the
> form : total <number of lines in listing>
>

 I don't think so, that isn't in the rfc (is it? I can't find it) ... plus you
 don't need to rely on the server telling you the number of lines to expect,
 simply read everything sent by the server and tokenize by line (with delimeter
 \n or to be more correct \r\n but I think this has problems with some badly
 written servers).

 /mc

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Ansi 99
Date: Sat, 11 Jan 2003 21:18:09 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042348691 8977 171.64.15.80 (12 Jan 2003 05:18:11 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3688


> This was somewhat addressed in the newsgroup from last year, but can we
> compile our programs with -fstd=iso9899:199x instead of -ansi since C99
> is the latest ANSI C and coming up on 4 years old?

 If that makes you happy I don't see any problem with it, you might want
 -Wall and -pedantic too (if they aren't already in the makefile, I don't
 have the current assignment source)

 /mc


>
> Thanks-
> Tim Lunny
>
>

.

Path: shelby.stanford.edu!saga3.Stanford.EDU!myc
From: Mingying Chen 
Newsgroups: su.class.cs244a
Subject: PS1, Q4 and Q6
Date: Sat, 11 Jan 2003 21:46:04 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042350368 9547 171.64.15.133 (12 Jan 2003 05:46:08 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3689

Hi,

I have the following questions about problem set #1:

1. In problem #4, if the last portion of the file can not fill up the last
packet to make it P bits long, do we assume there's some kind of padding
to make up the P bits, or the last packet can be smaller than regular
ones, or simply assume this situation won't happen?

2. For problem #6, part a, I can only see an answer if we assume the queue
reaches some stable state in worst case, i.e., the output link drains bits
fast enough comparing to packets arrival rate so that the length of queue
remains stable. But since R, C, L and g are given, it is possible that C
is too slow to remove the packets in time. In this case, the buffer will
be filled up eventually no matter how large it is. I'm confused. Would you
please clarify it for me?

Thanks.
Mingying

.

Path: shelby.stanford.edu!saga14.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: purify ==> Address Family not supported by protocol family
Date: Sat, 11 Jan 2003 22:03:05 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042351386 9948 171.64.15.144 (12 Jan 2003 06:03:06 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3690

My ftpcopy implements most of the tasks, but it doesn't run with purify.

Upon trying to "connect" to the socket for the FTP control connection, I
get error #124 -- "Address family not supported by protocol family".

The connect succeeds when I don't compile the pure version. Code:
((socketId =	socket(AF_INET, SOCK_STREAM, 0)) <0)
	// no err
if (connect(socketId,
	 (struct sockaddr*) pServer,
	sizeof(struct sockaddr_in))) <0
	//perror("Error connecting: Address family not supported by protocol family");

Thoughts?

.

Path: shelby.stanford.edu!saga13.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: test script
Date: Sun, 12 Jan 2003 01:31:34 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042363896 15167 171.64.15.143 (12 Jan 2003 09:31:36 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3691

Hi, my project hangs (the server times out) on parts L.1 through L.4 of
the test script when it executes ../ftpcopy ext 1  But I've tested it with
localhost and it works fine. Any ideas? Thanks

Rhea

.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!milaps
From: Milap Chandrakant Shah 
Newsgroups: su.class.cs244a
Subject: question about read command
Date: Sun, 12 Jan 2003 02:02:56 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042365787 16260 171.64.15.78 (12 Jan 2003 10:03:07 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3692

Hi,

For the assignment we can assume that no NVT string is longer than 1024
bytes.

I had a question though. Consider a case where the response of the server
is in multiple lines and each line is much smaller than 1024 bytes.
If I am not wrong each line is delimited by "\r\n"
Now if I do a read with a buffer size of 1024, will I get multiple lines
in the buffer (beacuse each line is much smaller than 1024 bytes) or the
buffer will contain only the first line delimited by "\r\n".
i.e. will the buffer be filled completely (1024 bytes) or will it stop
reading after first delimiter(first line).

Milap



.

Path: shelby.stanford.edu!not-for-mail
From: "Eric Ogren" 
Newsgroups: su.class.cs244a
Subject: Re: purify ==> Address Family not supported by protocol family
Date: Sun, 12 Jan 2003 03:11:00 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: eogren.stanford.edu
X-Trace: news.Stanford.EDU 1042369861 17601 128.12.95.90 (12 Jan 2003 11:11:01 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3693

Random guess, but did you either forget to fill in pServer->sin_family or
fill it in with the wrong value? Seems to me like that's the only place a
mismatch could occur (but i could be wrong)...

Eric

"Jonathan D Herbach"  wrote in message

> My ftpcopy implements most of the tasks, but it doesn't run with purify.
>
> Upon trying to "connect" to the socket for the FTP control connection, I
> get error #124 -- "Address family not supported by protocol family".
>
> The connect succeeds when I don't compile the pure version. Code:
> ((socketId = socket(AF_INET, SOCK_STREAM, 0)) <0)
> // no err
> if (connect(socketId,
> (struct sockaddr*) pServer,
> sizeof(struct sockaddr_in))) <0
> //perror("Error connecting: Address family not supported by protocol
family");
>
> Thoughts?
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Alexander Fontana" 
Newsgroups: su.class.cs244a
Subject: freeing memory on fatal errors
Date: Sun, 12 Jan 2003 05:28:52 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: afontana.stanford.edu
X-Trace: news.Stanford.EDU 1042378370 23115 128.12.101.143 (12 Jan 2003 13:32:50 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3694

Suppose our ftpcopy program encounters some error where a prompt exit is a
reasonable solution (ie disk is full).  Do we need to bother freeing memory
if the program is just going to exit anyway?

Thanks,
Alex


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Re: LIST problem
Date: Sun, 12 Jan 2003 06:15:54 -0800
Lines: 74
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1042380925 24034 128.12.195.69 (12 Jan 2003 14:15:25 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3695

I am also having this problem. I have passive mode in my code, but my LIST
command still only return directories. I set the transfer to ASCII, then
issue the PASV command, and connect to the server at the given port, then I
do the LIST command. However, I am only getting directories back, no files.
Please help, what else could be wrong?

-myl


"Martin Casado"  wrote in message

>
> > Hi
> > After creating a control connection to the server ftp.stanford.edu, I
> > tried using LIST command, but LIST is giving me only the listing of
> > directoried on the server, & no listing of files is obtained,
>
> Here is an output I get from LIST at ftp.stanford.edu:
>
> class/engre62" is current directory.
> 250 CWD command successful.
> 200 Type set to A.
> 227 Entering Passive Mode (171,64,15,241,249,112)
> 150 Opening ASCII mode data connection for /bin/ls.
> total 5765
> drwxr-xr-x    4 root     root         2048 Nov 22 16:53 .backup
> -rw-------    1 70448    root          881 Sep 24 09:49 .description
> -rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_b.TIFF
> -rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_g.TIFF
> -rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_r.TIFF
> drwxr-xr-x    2 root     root         2048 Nov 27 17:42 WWW
> drwxr-xr-x    4 70448    root         2048 Sep 16 18:27 geophys112.2002
> -rw-r--r--    1 5469     37         119032 Sep 27 09:40 hw1data.mat
> -rw-r--r--    1 5469     37        2160216 Oct 11 12:08 hw3data.mat
> -rw-r--r--    1 5469     37          47648 Oct 18 11:01 hw4data.mat
> -rw-r--r--    1 5469     37        2592904 Oct 18 11:01 hw4magdata.mat
> -rw-r--r--    1 5469     37         651624 Oct 18 11:01 hw4whistler.mat
> -rw-r--r--    1 5469     37          19872 Oct 25 12:44 hw5data.mat
> -rw-r--r--    1 5469     37            750 Nov  8 12:41 inklindata
> -rw-r--r--    1 5469     37           1407 Oct 11 12:08 soil.dat
>
> I'm using passive mode LIST and it does list files.  You can always
> use telnet and PASV mode to verify that the commands are working
correctly.
>
>
> > When I try using NLST command, it gives proper listing of everythins,
but
> > command "LIST" gives me only directory listing
> > also when I gibe RETR command for a particular file, I get error,
> > permission denied,
> > What is the problem?
>
> Check the permissions on the file you are trying to get, if you cannot
> get the file using vanilla ftp then you don't have permissions to the
file.
>
> > Also which directory should I go into in while connecting to
> > ftp.stanford.edu?, I currently tried going into my own directory
> > Please let me know
>
> That really is up to you .. why don't you get the suffix mat with a
recursive depth of
> 2?
>
>  ./ftpcopy mat 2 ftp.stanford.edu
>
> remember, this is only to test your implementation.
>
> regards,
> /mc
>


.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: purify ==> Address Family not supported by protocol family
Date: Sun, 12 Jan 2003 07:06:35 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042384001 24910 171.64.15.80 (12 Jan 2003 15:06:41 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3696

On Sat, 11 Jan 2003, Jonathan D Herbach wrote:

> My ftpcopy implements most of the tasks, but it doesn't run with purify.
>
> Upon trying to "connect" to the socket for the FTP control connection, I
> get error #124 -- "Address family not supported by protocol family".

 I haven't seen this occur before.  Could you, perhaps, strip your
 code down to a simple 20-30 line main routine and see if you have the
 same problem?  Is anyone else seeing this?

>
> The connect succeeds when I don't compile the pure version. Code:
> ((socketId =	socket(AF_INET, SOCK_STREAM, 0)) <0)
> 	// no err
> if (connect(socketId,
> 	 (struct sockaddr*) pServer,
> 	sizeof(struct sockaddr_in))) <0
> 	//perror("Error connecting: Address family not supported by protocol family");

 Is this really your perror() line? Or did you just type that to illustrate the
 error bieng reported by perror()?

 /mc

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: question about read command
Date: Sun, 12 Jan 2003 07:27:30 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042385252 25317 171.64.15.80 (12 Jan 2003 15:27:32 GMT)
X-Complaints-To: 
To: Milap Chandrakant Shah 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3697


> Hi,
>
> For the assignment we can assume that no NVT string is longer than 1024
> bytes.

 If it is not in the rfc I don't see why you would make this assumption.

>
> I had a question though. Consider a case where the response of the server
> is in multiple lines and each line is much smaller than 1024 bytes.
> If I am not wrong each line is delimited by "\r\n"
> Now if I do a read with a buffer size of 1024, will I get multiple lines
> in the buffer (beacuse each line is much smaller than 1024 bytes) or the
> buffer will contain only the first line delimited by "\r\n".
> i.e. will the buffer be filled completely (1024 bytes) or will it stop
> reading after first delimiter(first line).

  The read command doesn't know anything about the stream it is reading from
  so don't expect it to delimit on \n bounderies.  You will have to handle
  that yourself.  For example, it is not uncommon to get a response larger
  than 1024 from a LIST command.

  /mc

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: freeing memory on fatal errors
Date: Sun, 12 Jan 2003 07:31:28 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042385490 25628 171.64.15.80 (12 Jan 2003 15:31:30 GMT)
X-Complaints-To: 
To: Alexander Fontana 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3698


> Suppose our ftpcopy program encounters some error where a prompt exit is a
> reasonable solution (ie disk is full).  Do we need to bother freeing memory
> if the program is just going to exit anyway?

 I've never seen any reason to go through a complicated freeing process
 before exiting, be it from main() or before a call to exit() or abort().
 What you should be concerned with is that you do not have a memory leak
 that grows during execution.

 /mc

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: LIST problem
Date: Sun, 12 Jan 2003 07:38:03 -0800
Lines: 89
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042385884 25666 171.64.15.80 (12 Jan 2003 15:38:04 GMT)
X-Complaints-To: 
To: Man Yu Lui 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3699


> I am also having this problem. I have passive mode in my code, but my LIST
> command still only return directories. I set the transfer to ASCII, then
> issue the PASV command, and connect to the server at the given port, then I
> do the LIST command. However, I am only getting directories back, no files.
> Please help, what else could be wrong?
>
> -myl

 You've probably done all this but just in case...
 - have you verified there are actually files where you are listing?
 - are you printing the buffer you receive from the server or are
   you relying on ftpparse? If you are doing the latter, try printing the
   buffer directly after reading it from the socket.
 - have you tried doing this by hand with telnet? ;-) Open 2 terminals
   telnet by hand to port 21 and issue the raw commands.

 If you are still having problems, I'm going to be online most of
 today so we'll get this ironed out.

 /mc

> "Martin Casado"  wrote in message
> 
> >
> > > Hi
> > > After creating a control connection to the server ftp.stanford.edu, I
> > > tried using LIST command, but LIST is giving me only the listing of
> > > directoried on the server, & no listing of files is obtained,
> >
> > Here is an output I get from LIST at ftp.stanford.edu:
> >
> > class/engre62" is current directory.
> > 250 CWD command successful.
> > 200 Type set to A.
> > 227 Entering Passive Mode (171,64,15,241,249,112)
> > 150 Opening ASCII mode data connection for /bin/ls.
> > total 5765
> > drwxr-xr-x    4 root     root         2048 Nov 22 16:53 .backup
> > -rw-------    1 70448    root          881 Sep 24 09:49 .description
> > -rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_b.TIFF
> > -rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_g.TIFF
> > -rw-r--r--    1 5469     37          98594 Nov 22 16:53 RingNebula_r.TIFF
> > drwxr-xr-x    2 root     root         2048 Nov 27 17:42 WWW
> > drwxr-xr-x    4 70448    root         2048 Sep 16 18:27 geophys112.2002
> > -rw-r--r--    1 5469     37         119032 Sep 27 09:40 hw1data.mat
> > -rw-r--r--    1 5469     37        2160216 Oct 11 12:08 hw3data.mat
> > -rw-r--r--    1 5469     37          47648 Oct 18 11:01 hw4data.mat
> > -rw-r--r--    1 5469     37        2592904 Oct 18 11:01 hw4magdata.mat
> > -rw-r--r--    1 5469     37         651624 Oct 18 11:01 hw4whistler.mat
> > -rw-r--r--    1 5469     37          19872 Oct 25 12:44 hw5data.mat
> > -rw-r--r--    1 5469     37            750 Nov  8 12:41 inklindata
> > -rw-r--r--    1 5469     37           1407 Oct 11 12:08 soil.dat
> >
> > I'm using passive mode LIST and it does list files.  You can always
> > use telnet and PASV mode to verify that the commands are working
> correctly.
> >
> >
> > > When I try using NLST command, it gives proper listing of everythins,
> but
> > > command "LIST" gives me only directory listing
> > > also when I gibe RETR command for a particular file, I get error,
> > > permission denied,
> > > What is the problem?
> >
> > Check the permissions on the file you are trying to get, if you cannot
> > get the file using vanilla ftp then you don't have permissions to the
> file.
> >
> > > Also which directory should I go into in while connecting to
> > > ftp.stanford.edu?, I currently tried going into my own directory
> > > Please let me know
> >
> > That really is up to you .. why don't you get the suffix mat with a
> recursive depth of
> > 2?
> >
> >  ./ftpcopy mat 2 ftp.stanford.edu
> >
> > remember, this is only to test your implementation.
> >
> > regards,
> > /mc
> >
>
>
>

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Martin's "office hours" today
Date: Sun, 12 Jan 2003 07:45:26 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042386328 25809 171.64.15.80 (12 Jan 2003 15:45:28 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3700


 Hi All,

   I've got a lot of hacking to do today so I will be online until
   6:30pm your time.  If you need help with the project, I'll be on irc,
   server irc.freenode.net, channel cs244a.  If you need instructions
   on how to connect, email me directly.  Of course I will be moderating
   the newsgroup as well.

   Cheers,
   /mc

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: test script
Date: Sun, 12 Jan 2003 07:47:44 -0800
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042386465 25824 171.64.15.80 (12 Jan 2003 15:47:45 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3701


> Hi, my project hangs (the server times out) on parts L.1 through L.4 of
> the test script when it executes ../ftpcopy ext 1  But I've tested it with
> localhost and it works fine. Any ideas? Thanks

 That's no good.  I don't know anything about the test script this year, are
 you running on the same host as the test script?  Can you email me the test
 script results?

 /mc

.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: question about read command
Date: Sun, 12 Jan 2003 09:15:14 -0800
Lines: 18
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042391775 27688 128.12.186.92 (12 Jan 2003 17:16:15 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3702


"Martin Casado"  wrote in message

>
> > Hi,
> >
> > For the assignment we can assume that no NVT string is longer than 1024
> > bytes.
>
>  If it is not in the rfc I don't see why you would make this assumption.
>

The assignmnet specifies that they don't have to worry about strings longer
than 1024 bytes.

-Russ


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q4 and Q6
Date: Sun, 12 Jan 2003 09:22:01 -0800
Lines: 32
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042392182 27850 128.12.186.92 (12 Jan 2003 17:23:02 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3703


"Mingying Chen"  wrote in message

> Hi,
>
> I have the following questions about problem set #1:
>
> 1. In problem #4, if the last portion of the file can not fill up the last
> packet to make it P bits long, do we assume there's some kind of padding
> to make up the P bits, or the last packet can be smaller than regular
> ones, or simply assume this situation won't happen?


You can assume the last packet will be padded.


>
> 2. For problem #6, part a, I can only see an answer if we assume the queue
> reaches some stable state in worst case, i.e., the output link drains bits
> fast enough comparing to packets arrival rate so that the length of queue
> remains stable. But since R, C, L and g are given, it is possible that C
> is too slow to remove the packets in time. In this case, the buffer will
> be filled up eventually no matter how large it is. I'm confused. Would you
> please clarify it for me?
>

You want to define the worst case scenario where the queue size is still
stable.

--Russ


.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject:  Re: question about read command
Date: Sun, 12 Jan 2003 09:35:05 -0800
Lines: 52
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042392909 28077 171.64.15.80 (12 Jan 2003 17:35:09 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3704

> HI,
>
> That means that I cant use buffered read. I will have to read server
> replies byte by byte till I get "\r\n", there is no conditional read(i.e.
> read till specific pattern), we have to specify a buffer size in read.
>
> So I will have to read the replies byte by byte till you get "\r\n" is
> that right??

 Actually no, that is not correct.  I would suspect that most students will
 choose to read byte-by-byte, but I assure you there is a more elegant and
 efficient way to do this.  I'll give you a hint:

 recv(sockfd,buf,len,MSG_PEEK)

 ;-)
 /mc


>
> Thanks
> Milap
>
>
> On Sun, 12 Jan 2003, Martin Casado wrote:
>
> >
> > > Hi,
> > >
> > > For the assignment we can assume that no NVT string is longer than 1024
> > > bytes.
> >
> >  If it is not in the rfc I don't see why you would make this assumption.
> >
> > >
> > > I had a question though. Consider a case where the response of the server
> > > is in multiple lines and each line is much smaller than 1024 bytes.
> > > If I am not wrong each line is delimited by "\r\n"
> > > Now if I do a read with a buffer size of 1024, will I get multiple lines
> > > in the buffer (beacuse each line is much smaller than 1024 bytes) or the
> > > buffer will contain only the first line delimited by "\r\n".
> > > i.e. will the buffer be filled completely (1024 bytes) or will it stop
> > > reading after first delimiter(first line).
> >
> >   The read command doesn't know anything about the stream it is reading from
> >   so don't expect it to delimit on \n bounderies.  You will have to handle
> >   that yourself.  For example, it is not uncommon to get a response larger
> >   than 1024 from a LIST command.
> >
> >   /mc
>

.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Ansi 99
Date: Sun, 12 Jan 2003 18:24:08 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine24.stanford.edu
X-Trace: news.Stanford.EDU 1042395848 29169 171.64.15.99 (12 Jan 2003 18:24:08 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3705

Martin Casado  writes:
>> This was somewhat addressed in the newsgroup from last year, but can we
>> compile our programs with -fstd=iso9899:199x instead of -ansi since C99
>> is the latest ANSI C and coming up on 4 years old?

> If that makes you happy I don't see any problem with it, you might want
> -Wall and -pedantic too (if they aren't already in the makefile, I don't
> have the current assignment source)

> /mc


I have to disagree with Martin on this; please don't.  It makes grading
more difficult; moreover, you won't be able to for the second assignment
anyway, since we substitute other Makefiles during grading that do not include
this flag during compilation.  If you need to use something like snprintf, you
can include the prototype as was suggested in the newsgroup last year.

(Does VC++ support C99 yet?  v6.0 didn't.  So I'd argue that this standard
is still nowhere near as widespread as the older ISO standard is).

.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test script
Date: Sun, 12 Jan 2003 18:25:40 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine24.stanford.edu
X-Trace: news.Stanford.EDU 1042395940 29191 171.64.15.99 (12 Jan 2003 18:25:40 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3706


>Hi, my project hangs (the server times out) on parts L.1 through L.4 of
>the test script when it executes ../ftpcopy ext 1  But I've tested it with
>localhost and it works fine. Any ideas? Thanks


Can you post the script output for these cases?

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: inter-packet gap
Date: Sun, 12 Jan 2003 23:31:03 +0000 (UTC)
Organization: Stanford University
Lines: 3
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic12.stanford.edu
X-Trace: news.Stanford.EDU 1042414263 7559 171.64.15.45 (12 Jan 2003 23:31:03 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3707


Is the inter-packet gap measured from the time the last bit of a packet is sent
to the start of the transmission of the first bit of the next packet?
.

Path: shelby.stanford.edu!saga11.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: more test script
Date: Sun, 12 Jan 2003 15:40:47 -0800
Lines: 24
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042414848 7767 171.64.15.141 (12 Jan 2003 23:40:48 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3708

Here is the output from the test script:

Test L.1, using current source tree and build
make
make: Nothing to be done for `all'.

Working dir:
/afs/ir.stanford.edu/users/r/m/rmortam/cs244a/hw1/grading_src/build
Starting local ftpd: cd
/usr/class/cs244a/grading_script/hw1_special_cases;
/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd 2>
/afs/ir.stanford.edu/users/r/m/rmortam/cs244a/hw1/grading_src/build/.ftpd_port&
ftpd running on port 53898
Testing special case:  ../ftpcopy ext 1 

L2-L4 is the same except for the port is different because it restarts
ftpd. When the script finishes it reports an error for L1-L4 because the
server timed out. Then I test with a localhost (by running ftpd and ftpcopy on
the same machine) and it works fine.

Thanks again,

Rhea

.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: inter-packet gap
Date: Sun, 12 Jan 2003 16:28:08 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042417750 9026 128.12.186.92 (13 Jan 2003 00:29:10 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3709

Yes.  If you think of packets traveling down the wire, the inter-packet gap
is the space between consecutive packets where there is no data.

--Russ

"David Seetapun"  wrote in message

>
> Is the inter-packet gap measured from the time the last bit of a packet is
sent
> to the start of the transmission of the first bit of the next packet?


.

Path: shelby.stanford.edu!saga3.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: Re: purify ==> Address Family not supported by protocol family
Date: Sun, 12 Jan 2003 17:13:23 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042420404 10192 171.64.15.133 (13 Jan 2003 01:13:24 GMT)
X-Complaints-To: 
To: Martin Casado 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3710

> > My ftpcopy implements most of the tasks, but it doesn't run with purify.
> >
> > Upon trying to "connect" to the socket for the FTP control connection, I
> > get error #124 -- "Address family not supported by protocol family".
>
>  I haven't seen this occur before.  Could you, perhaps, strip your
>  code down to a simple 20-30 line main routine and see if you have the
>  same problem?  Is anyone else seeing this?
I discovered the problem last night: I wasn't always initializing the
datastructure correctly. Using purify happened to provide some (other)
garbage in that location that triggered it.


> > 	//perror("Error connecting: Address family not supported by protocol family");
>  Is this really your perror() line? Or did you just type that to illustrate the
>  error bieng reported by perror()?
An attempt at the latter. :)

.

Path: shelby.stanford.edu!saga21.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: -ansi warning
Date: Sun, 12 Jan 2003 17:23:54 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042421035 10471 171.64.15.151 (13 Jan 2003 01:23:55 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3711

I get the following warning during compilation:

client.c:236: warning: implicit declaration of function `fdopen'
client.c:236: warning: assignment makes pointer from integer without a
              cast

However if I remove the -ansi flag, I don't get any warning. Is "fdopen"
nor supported?

My program runs fine though.


thanks,
Nishant

.

Path: shelby.stanford.edu!not-for-mail
From: Aseem Sharma 
Newsgroups: su.class.cs244a
Subject: PS1 Q7 (a)
Date: Sun, 12 Jan 2003 17:24:01 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga5.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042421041 10474 171.64.15.135 (13 Jan 2003 01:24:01 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3712

Hi Guys,

I'm still confused about D(t) and S(t). Is my understanding correct that
depature rate depends only on the output link (considering there is data
to send) and S(t) is servicing input like doing something other than
sending it ? if my output link is 1b/sec and input is 1kb/s, then D(t) =
1b/sec. If so, then D(t) is something of a const like A(t). Something
that was not clear from the slides either. Does service time include
time to send out ?

Aseem
.

Path: shelby.stanford.edu!saga3.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: empty file test
Date: Sun, 12 Jan 2003 18:37:06 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042425429 12366 171.64.15.133 (13 Jan 2003 02:37:09 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3713

I tried my ftpcopy file on a zero byte file. It seemed to copy correctly.
But it fails the grading script, exiting with errno set to "Permission
denied". and fails upon calling "open" to open a file for writing.

Thoughts? Does anybody know what test L.1 is doing?



Test L.1 [out of 0.5]
Checks that ftpcopy transfers zero byte file correctly.

Results:  NOT OK

Incorrect program status code 256 (exit code 1).  Program output:
perror: Permission denied

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q4 and Q6
Date: Mon, 13 Jan 2003 03:21:14 +0000 (UTC)
Organization: Stanford University
Lines: 39
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: epic12.stanford.edu
X-Trace: news.Stanford.EDU 1042428074 13660 171.64.15.45 (13 Jan 2003 03:21:14 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3714


In article 
 "Russell Greene"  writes:
> 
> "Mingying Chen"  wrote in message
> 
> > Hi,
> >
> > I have the following questions about problem set #1:
> >
> > 1. In problem #4, if the last portion of the file can not fill up the last
> > packet to make it P bits long, do we assume there's some kind of padding
> > to make up the P bits, or the last packet can be smaller than regular
> > ones, or simply assume this situation won't happen?
> 
> 
> You can assume the last packet will be padded.
> 
> 
> >
> > 2. For problem #6, part a, I can only see an answer if we assume the queue
> > reaches some stable state in worst case, i.e., the output link drains bits
> > fast enough comparing to packets arrival rate so that the length of queue
> > remains stable. But since R, C, L and g are given, it is possible that C
> > is too slow to remove the packets in time. In this case, the buffer will
> > be filled up eventually no matter how large it is. I'm confused. Would you
> > please clarify it for me?
> >
> 
> You want to define the worst case scenario where the queue size is still
> stable.

Does this mean you want an condition on R, C, L, g where the queue size is stable
and the least value of that queue size?

> 
> --Russ
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Bina Vasavda" 
Newsgroups: su.class.cs244a
Subject: startup
Date: Sun, 12 Jan 2003 20:01:52 -0800
Lines: 27
Distribution: su
Message-ID: 
NNTP-Posting-Host: ev-01-hos4d.stanford.edu
X-Trace: news.Stanford.EDU 1042430513 14811 128.12.154.59 (13 Jan 2003 04:01:53 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3715

Hi,
When I try to use USER and PASS to login to the ftp server, the USER command
is successful, but the PASS command is unsucessful.  I am creating the email
correctly. Here is a printout of the server replies, plus the USER and PASS
commands.  Anyone have any ideas?  When I try the same USER and PASS
commands by manually telnetting to ftp.stanford.edu 21, they work, so I'm
not sure what's going on.
Thanks!
Bina

220-------------------------------------------------------------------------
----
220-    Abuse of this facility may be considered violation of Federal or
------
220-    California law or the policies of Stanford University.  If you have
220-    questions regarding this policy please send mail to
220-    
220-------------------------------------------------------------------------
----
220-
220 ftp1.Stanford.EDU FTP server ready.
USER anonymous
331 Guest login ok, send your complete e-mail address as password.
PASS 
530 Please login with USER and PASS.


.

Path: shelby.stanford.edu!not-for-mail
From: Kevin Christopher 
Newsgroups: su.class.cs244a
Subject: Re: startup
Date: Sun, 12 Jan 2003 20:10:31 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: radicalbox.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042431026 15183 128.12.72.54 (13 Jan 2003 04:10:26 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3716

Bina Vasavda wrote:
> Hi,
> When I try to use USER and PASS to login to the ftp server, the USER command
> is successful, but the PASS command is unsucessful.  I am creating the email
> correctly. Here is a printout of the server replies, plus the USER and PASS
> commands.  Anyone have any ideas?  When I try the same USER and PASS
> commands by manually telnetting to ftp.stanford.edu 21, they work, so I'm
> not sure what's going on.
> Thanks!
> Bina
> 
> 220 ftp1.Stanford.EDU FTP server ready.
> USER anonymous
> 331 Guest login ok, send your complete e-mail address as password.
> PASS 
> 530 Please login with USER and PASS.
> 

Are you sure you're sending the string with correct terminating 
characters?  (the CR/LF)  Having just fixed the same thing myself...

-Kevin

.

Path: shelby.stanford.edu!not-for-mail
From: Siddharth Joshi 
Newsgroups: su.class.cs244a
Subject: Re: PS1 Q7 (a)
Date: Sun, 12 Jan 2003 21:01:24 -0800
Organization: EE, Stanford University
Lines: 61
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042434085 16856 171.64.15.83 (13 Jan 2003 05:01:25 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3717

Yes it is confusing as the notes never mention S(t).

Well i think this a probable explaination. 

that the service process will process if it has packets available.
So as long as S(t) > A(t) the packets would be delivered .

As Q(t) = A(t) //meaning that there has to be an input packet to go on
output.


Well seems quite vague because consider the following senario of a
burst.

A(t) = 0  0<= t <10

A(t) = 100 t = 10 (you may speard interval over a period of some seconds
, I have put an impulse burst of 100 packets)

A(t) = 0 t>10

say s(t) = 10t;

Basically at t = 10 (or 10+) you see A(t) = 100 and S(t) = 100. So you
infer Q(t)  = 100

But service process should be a rate because it seems that the service
process became infinitely fast (thats why I used impulse burst) and
processed 100 packets in no time (or zero time)  which i don't think
makes sense. 

I am waiting for Tue lecture also and the TA reply and if the prof.
could discuss this issue in class.

My socket is blocked on either of these rreplies!!

May be this helps.

Bye
Siddharth Joshi








Aseem Sharma wrote:
> 
> Hi Guys,
> 
> I'm still confused about D(t) and S(t). Is my understanding correct that
> depature rate depends only on the output link (considering there is data
> to send) and S(t) is servicing input like doing something other than
> sending it ? if my output link is 1b/sec and input is 1kb/s, then D(t) =
> 1b/sec. If so, then D(t) is something of a const like A(t). Something
> that was not clear from the slides either. Does service time include
> time to send out ?
> 
> Aseem
.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: -ansi warning
Date: Sun, 12 Jan 2003 21:23:07 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042435389 17750 171.64.15.80 (13 Jan 2003 05:23:09 GMT)
X-Complaints-To: 
To: Nishant Verman 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3718


> I get the following warning during compilation:
>
> client.c:236: warning: implicit declaration of function `fdopen'
> client.c:236: warning: assignment makes pointer from integer without a
>               cast
>
> However if I remove the -ansi flag, I don't get any warning. Is "fdopen"
> nor supported?
>
> My program runs fine though.

  You are not including the header for fdopen() but it is in libc so
  it is found at link time.

  #include <stdio.h> should fix the problem.

  /mc

.

Path: shelby.stanford.edu!not-for-mail
From: "Alexander Fontana" 
Newsgroups: su.class.cs244a
Subject: test script can't submit
Date: Sun, 12 Jan 2003 22:19:47 -0800
Lines: 40
Distribution: su
Message-ID: 
NNTP-Posting-Host: afontana.stanford.edu
X-Trace: news.Stanford.EDU 1042439026 19365 128.12.101.143 (13 Jan 2003 06:23:46 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3719

Hi,

I just tried to run the test script for the first time and got an error that
it can't submit (pasted below).  What could be causing this?  I've already
been assigned a TA, but I can't think of anything else that the script might
not like.

Thanks,
Alex

elaine32:~/cs244a/hw1/ftpclient> /usr/class/cs244a/bin/test_code.pl hw1 *
Creating submission tarball...
Makefile
ftpcopy
ftpcopy.purify
ftpcopy.purify.pv
ftpparse.c
ftpparse.h
main.c

Starting...
Test B, new source tree required, extracting into grading_src/build...
Makefile
ftpcopy
ftpcopy.purify
ftpcopy.purify.pv
ftpparse.c
ftpparse.h
main.c

Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 5 test attempts applies (from Jan 1 onwards).
You've used 0 test attempt(s) so far today.
Usage: TestKey::check_key(s) at StudentTestManager.pm line 108, <STDIN> line
1.
couldn't submit code for testing
elaine32:~/cs244a/hw1/ftpclient>


.

Path: shelby.stanford.edu!not-for-mail
From: "Andrew Narver" 
Newsgroups: su.class.cs244a
Subject: question on store-and-forward routers
Date: Sun, 12 Jan 2003 23:42:58 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: didgeridoo.stanford.edu
X-Trace: news.Stanford.EDU 1042443779 23041 128.12.71.38 (13 Jan 2003 07:42:59 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3720

In a store-and-forward router, does the buffer store the entire packet until
all of it is sent or does the buffer get slowly cleared as individual bits
get sent?


.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: empty file test
Date: Mon, 13 Jan 2003 07:51:14 +0000 (UTC)
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1042444274 23295 171.64.15.101 (13 Jan 2003 07:51:14 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3721


>I tried my ftpcopy file on a zero byte file. It seemed to copy correctly.
>But it fails the grading script, exiting with errno set to "Permission
>denied". and fails upon calling "open" to open a file for writing.

>Thoughts? Does anybody know what test L.1 is doing?

>Test L.1 [out of 0.5]
>Checks that ftpcopy transfers zero byte file correctly.

>Results:  NOT OK

>Incorrect program status code 256 (exit code 1).  Program output:
>perror: Permission denied


L.1 just verifies that you download a zero-byte file correctly; this
test has worked for other students.  The program should be creating the
new file in a directory owned by you, so permissions shouldn't be a problem.
Could you try deleting the grading_src/ directory in your source directory
(it's created by the test script; all program output/temporary results
go in there), and see if that has any effect?

.

Path: shelby.stanford.edu!not-for-mail
From: Fritz Budiyanto 
Newsgroups: su.class.cs244a
Subject: purify question
Date: Mon, 13 Jan 2003 08:03:53 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga18.stanford.edu
X-Trace: news.Stanford.EDU 1042445033 23485 171.64.15.148 (13 Jan 2003 08:03:53 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3722

Hi,

about the purify grading, should we make sure all memory deallocated in
case of an error?

e.g.


int
main()
{
   char *c = strdup("foo");

   if (error == 1) return -1; /* should we responsible to deallocate c
                                 when error occur ? */
}

thanks
Fritz


.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: purify question
Date: Mon, 13 Jan 2003 08:09:54 +0000 (UTC)
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1042445394 24278 171.64.15.101 (13 Jan 2003 08:09:54 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3723

Fritz Budiyanto  writes:

>Hi,

>about the purify grading, should we make sure all memory deallocated in
>case of an error?

>e.g.


>int
>main()
>{
>   char *c = strdup("foo");

>   if (error == 1) return -1; /* should we responsible to deallocate c
>                                 when error occur ? */
>}

>thanks
>Fritz


Yep.
.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q4 and Q6
Date: Mon, 13 Jan 2003 08:13:17 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1042445597 24750 171.64.15.101 (13 Jan 2003 08:13:17 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3724


>Does this mean you want an condition on R, C, L, g where the queue size is stable
>and the least value of that queue size?

Yeah, pretty much that's what parts (a) and (b) are asking together.  (As
you work out the question, it'll probably make more sense than the initial
reading would suggest).  Assume g is such that we have stability (part b
asks you to find the smallest such g), and then find the resulting minumum B
required for stability to hold.
.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1 Q7 (a)
Date: Mon, 13 Jan 2003 08:17:53 +0000 (UTC)
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1042445873 24797 171.64.15.101 (13 Jan 2003 08:17:53 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3725

Aseem Sharma  writes:

>Hi Guys,

>I'm still confused about D(t) and S(t). Is my understanding correct that
>depature rate depends only on the output link (considering there is data
>to send) and S(t) is servicing input like doing something other than
>sending it ? if my output link is 1b/sec and input is 1kb/s, then D(t) =
>1b/sec. If so, then D(t) is something of a const like A(t). Something
>that was not clear from the slides either. Does service time include
>time to send out ?

>Aseem


In problem 7, A(t), D(t), and S(t) are definitely *not* rates, as the units
should make clear.

Have you checked last year's newsgroup postings about this problem in
particular, and the fluid models in general?  (You can just search for the
string "A(t)" in fact).  This was a source of common confusion at that time,
and there was quite a bit posted then about almost this very question.
Please let us know if any points from those answers require further
elaboration or clarification.

.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: question on store-and-forward routers
Date: Mon, 13 Jan 2003 08:25:50 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1042446350 24976 171.64.15.101 (13 Jan 2003 08:25:50 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3726

"Andrew Narver"  writes:

>In a store-and-forward router, does the buffer store the entire packet until
>all of it is sent or does the buffer get slowly cleared as individual bits
>get sent?


It would seem likely to be a simpler implementation to keep the entire packet
around until it's all been sent, and I don't think you'd gain anything by
trying to reclaim those bits more quickly, but I can't think of a particular
reason why that would be strictly required.
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: question on store-and-forward routers
Date: Mon, 13 Jan 2003 15:21:17 +0000 (UTC)
Organization: Stanford University
Lines: 20
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: epic10.stanford.edu
X-Trace: news.Stanford.EDU 1042471277 5422 171.64.15.43 (13 Jan 2003 15:21:17 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3727


In article 
  (Matthew Jonathan Holliman) writes:
> "Andrew Narver"  writes:
> 
> >In a store-and-forward router, does the buffer store the entire packet until
> >all of it is sent or does the buffer get slowly cleared as individual bits
> >get sent?
> 
> 
> It would seem likely to be a simpler implementation to keep the entire packet
> around until it's all been sent, and I don't think you'd gain anything by
> trying to reclaim those bits more quickly, but I can't think of a particular
> reason why that would be strictly required.

Which alternative seems to make a difference for the minimum buffer size as
there seems to be times when a new packet is arriving while an old one is
in the process of being forwarded. If the bits that are cleared as the
old one is forwarded are not reclaimed this would suggest a larger buffer
is required. Is this correct?
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Handout #3 slide 43
Date: Mon, 13 Jan 2003 16:41:13 +0000 (UTC)
Organization: Stanford University
Lines: 3
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic10.stanford.edu
X-Trace: news.Stanford.EDU 1042476073 7553 171.64.15.43 (13 Jan 2003 16:41:13 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3728


It seems to me the example in the slide is not a store and forward router since bits are
drained before the 100 bit train has been fully stored. Is this correct?
.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: testing script/Purify
Date: Mon, 13 Jan 2003 20:50:45 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1042491045 17385 171.64.15.111 (13 Jan 2003 20:50:45 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3729


A couple of people asked why the test script wasn't picking up their .purify
or purify.output files, and was thus failing them on one or two of the later
test cases.  So here's some clarification.

The script takes whatever files you indicate--source files, Makefiles, etc.--
and just copies them to a temporary directory (grading_src in your current
working directory), where it runs all the tests.  So if you omit something
like purify.output, it just ignores it.

.

Path: shelby.stanford.edu!saga16.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: IMAGE representation
Date: Mon, 13 Jan 2003 15:54:03 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042502045 24005 171.64.15.146 (13 Jan 2003 23:54:05 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3730

If I specify Represenation Type as image [ TYPE I] the servers replies
don't have the kTelnetEOF character anymore.

Do we need to use image type or is the default fine?

nishant





.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: byte order problem for hw1
Date: Mon, 13 Jan 2003 17:23:11 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1042507343 27526 128.12.195.69 (14 Jan 2003 01:22:23 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3731

In review session the functions htonl(), htons(), htohl() and htohs() are
discussed. I could have missed the point but where in hw1 may we need to use
these functions?

-myl


.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: byte order problem for hw1
Date: Tue, 14 Jan 2003 02:05:53 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1042509953 29029 171.64.15.111 (14 Jan 2003 02:05:53 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3732


>In review session the functions htonl(), htons(), htohl() and htohs() are
>discussed. I could have missed the point but where in hw1 may we need to use
>these functions?


The socket calls such as connect() expect parameters in the provided
address structures (e.g. port) to be passed in network byte order.
If you look at the code in Stevens, you'll notice this in many of his
examples.

.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: IMAGE representation
Date: Tue, 14 Jan 2003 02:08:15 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1042510095 29196 171.64.15.111 (14 Jan 2003 02:08:15 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3733


>If I specify Represenation Type as image [ TYPE I] the servers replies
>don't have the kTelnetEOF character anymore.

>Do we need to use image type or is the default fine?


Since the RFC specifies the default is ASCII mode, which is definitely
not fine for downloading files, no.  Be careful about switching between
ASCII and IMAGE modes at the right times.  I'd also recommend looking
through last year's newsgroup, as I recall this being a common source of
confusion for people then.

.

Path: shelby.stanford.edu!cardinal5.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: timeout
Date: Mon, 13 Jan 2003 18:20:28 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: cardinal5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042510830 29648 171.64.15.253 (14 Jan 2003 02:20:30 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3734

while running on ./ftpcopy mif 5 ftp.slac.stanford.edu in directory /doc,
my ftpcopy times out.

It worked a day or two ago, but I haven't changed the code. Should I
assume that this is a problem on my part (perhaps my code isn't efficient
enough?) or not worry about such a transient error?

 warning:  ftpcopy
failed with exit code 16777215 (waitpid status -1) program output:
***Timeout expired during grading
Program output:

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: timeout
Date: Tue, 14 Jan 2003 06:42:33 +0000 (UTC)
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
X-Trace: news.Stanford.EDU 1042526553 8591 171.64.15.80 (14 Jan 2003 06:42:33 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3735


>while running on ./ftpcopy mif 5 ftp.slac.stanford.edu in directory /doc,
>my ftpcopy times out.

>It worked a day or two ago, but I haven't changed the code. Should I
>assume that this is a problem on my part (perhaps my code isn't efficient
>enough?) or not worry about such a transient error?

> warning:  ftpcopy
>failed with exit code 16777215 (waitpid status -1) program output:
>***Timeout expired during grading
>Program output:


Some students' code still works pretty quickly on this server, so I'd suggest
double-checking this (although I'm not sure what would have changed).  The
timeout is set for three minutes, as I recall, which should be more than
enough time.

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test script can't submit
Date: Tue, 14 Jan 2003 07:01:15 +0000 (UTC)
Lines: 47
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
X-Trace: news.Stanford.EDU 1042527675 9137 171.64.15.80 (14 Jan 2003 07:01:15 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3737

>I just tried to run the test script for the first time and got an error that
>it can't submit (pasted below).  What could be causing this?  I've already
>been assigned a TA, but I can't think of anything else that the script might
>not like.

>Thanks,
>Alex

>elaine32:~/cs244a/hw1/ftpclient> /usr/class/cs244a/bin/test_code.pl hw1 *
>Creating submission tarball...
>Makefile
>ftpcopy
>ftpcopy.purify
>ftpcopy.purify.pv
>ftpparse.c
>ftpparse.h
>main.c

>Starting...
>Test B, new source tree required, extracting into grading_src/build...
>Makefile
>ftpcopy
>ftpcopy.purify
>ftpcopy.purify.pv
>ftpparse.c
>ftpparse.h
>main.c

>Can't find a matching key for this test run.
>Would you like to generate a new one?  (y/n):  y
>Daily quota of 5 test attempts applies (from Jan 1 onwards).
>You've used 0 test attempt(s) so far today.
>Usage: TestKey::check_key(s) at StudentTestManager.pm line 108, <STDIN> line
>1.
>couldn't submit code for testing
>elaine32:~/cs244a/hw1/ftpclient>

The problem seems to be caused by submitting a binary file(s) (e.g.
ftpcopy.purify, ftpcopy, etc).  I'm not sure exactly why the script
chokes on this--the reason may lie somewhere in the innards of
Perl--but perhaps zero bytes in there confuse the code at some point.
If you stick to just submitting source files, you should be okay
I think.

I'll add a check in the script wrapper to try and prevent this in case
people forget!

.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: ps1 q6
Date: Tue, 14 Jan 2003 00:39:23 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1042533511 12514 128.12.195.69 (14 Jan 2003 08:38:31 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3738

For problem 6, do we need to include the inter-packet gap g on the output
link? It seems to me that with R > C, if we have the same gap on the output,
there is no way for the buffer to not overflow eventually in the worst case
scenario where packets are arriving continuously separated only the gaps.

-myl


.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Handout #3 slide 43
Date: Tue, 14 Jan 2003 11:52:17 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042573934 2337 171.64.74.37 (14 Jan 2003 19:52:14 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3739

David,

yes, it uses the fluid model from slide 41 in which you don't worry 
about packets. It's actually still a pretty good model for 
store-and-forward routers as the buffer memory is typically in the 
1000's packets.

   Guido

David Seetapun wrote:
> It seems to me the example in the slide is not a store and forward router since bits are
> drained before the 100 bit train has been fully stored. Is this correct?

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: ps1 q6
Date: Tue, 14 Jan 2003 11:55:26 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042574122 2368 171.64.74.37 (14 Jan 2003 19:55:22 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
X-Priority: 3)
Xref: shelby.stanford.edu su.class.cs244a:3740

You can assume no gap on the output link. If the gap was the same the 
buffer would overflow.

   Guido

--

For problem 6, do we need to include the inter-packet gap g on the output
link? It seems to me that with R > C, if we have the same gap on the output,
there is no way for the buffer to not overflow eventually in the worst case
scenario where packets are arriving continuously separated only the gaps.

-myl


.

Path: shelby.stanford.edu!not-for-mail
From: "Noh, Jeonghun" 
Newsgroups: su.class.cs244a
Subject: PS1 Q8
Date: Tue, 14 Jan 2003 13:40:41 -0800
Organization: Stanford. EE
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: dnab4081e1.stanford.edu
X-Trace: news.Stanford.EDU 1042580518 6634 171.64.129.225 (14 Jan 2003 21:41:58 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3741

For 8(a), given the only constraint for the arrival process is that no more
than (sigma+lo*tau) bits in any interval of duration tau,

I think the maximum average rate should converge to some value, because
sigma and lo are constants and we can make tau as big as possible.

Did I get it right?

--
*********************************
Jeonghun Noh
Dept. of Electrical Engineering
Stanford University
Tel : 1-650-497-6665

*********************************


.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1 Q8
Date: Tue, 14 Jan 2003 21:52:25 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1042581145 7001 171.64.15.115 (14 Jan 2003 21:52:25 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3742


>For 8(a), given the only constraint for the arrival process is that no more
>than (sigma+lo*tau) bits in any interval of duration tau,

>I think the maximum average rate should converge to some value, because
>sigma and lo are constants and we can make tau as big as possible.

>Did I get it right?

Yes, we're looking for a long-term average.

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: question on store-and-forward routers
Date: Tue, 14 Jan 2003 22:05:48 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1042581948 7479 171.64.15.115 (14 Jan 2003 22:05:48 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3743

>> >In a store-and-forward router, does the buffer store the entire packet until
>> >all of it is sent or does the buffer get slowly cleared as individual bits
>> >get sent?
>> 
>> 
>> It would seem likely to be a simpler implementation to keep the entire packet
>> around until it's all been sent, and I don't think you'd gain anything by
>> trying to reclaim those bits more quickly, but I can't think of a particular
>> reason why that would be strictly required.

>Which alternative seems to make a difference for the minimum buffer size as
>there seems to be times when a new packet is arriving while an old one is
>in the process of being forwarded. If the bits that are cleared as the
>old one is forwarded are not reclaimed this would suggest a larger buffer
>is required. Is this correct?

Okay, I see what you're asking--yes, this is correct.  For simplicity, you
can just assume bit-by-bit clearing.  (But if you've already done it the
other way, as long as you clearly state your assumptions that's fine too).
Sorry for the confusion.

.

Path: shelby.stanford.edu!not-for-mail
From: "Noh, Jeonghun" 
Newsgroups: su.class.cs244a
Subject: For prob #7. Q(t)_bar & d(t)
Date: Tue, 14 Jan 2003 17:44:40 -0800
Organization: Stanford. EE
Lines: 24
Distribution: su
Message-ID: 
NNTP-Posting-Host: dnab4081e1.stanford.edu
X-Trace: news.Stanford.EDU 1042595157 15988 171.64.129.225 (15 Jan 2003 01:45:57 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3744

For prob #7)
1. The average queue occupancy
Is it correct to say that the average queue occupancy is Q(t)_bar(or
Exp[Q(t)]), not Exp[Q(t)|Q(t)>0]?

So for Prob 7, like the slide #43 in HO#3, X(t)_bar is the overall average
including the queue's idle time. Correct idea?

2. d(t) for each bit in the queue
This d(t) is only related to the bits in the queue, so we can assume that
d(t) has nothing to do with idle time. Is it right?

Thanks.

--
*********************************
Jeonghun Noh
Dept. of Electrical Engineering
Stanford University
Tel : 1-650-497-6665

*********************************


.

Path: shelby.stanford.edu!cardinal2.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: ps1 q6
Date: Tue, 14 Jan 2003 19:33:06 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: cardinal2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042601588 19554 171.64.15.250 (15 Jan 2003 03:33:08 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3745

the question says only one input link is active....does this mean that
only one input link is active at a particular time or effectively we have
only one input link for problem analysis?

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: For prob #7. Q(t)_bar & d(t)
Date: Tue, 14 Jan 2003 19:41:09 -0800
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042602061 19735 171.64.74.37 (15 Jan 2003 03:41:01 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3746

> 1. The average queue occupancy
> Is it correct to say that the average queue occupancy is Q(t)_bar(or
> Exp[Q(t)]), not Exp[Q(t)|Q(t)>0]?

Yes, correct.

> So for Prob 7, like the slide #43 in HO#3, X(t)_bar is the overall average
> including the queue's idle time. Correct idea?

Yes, average queue length includes times where the queue is empty.

> 2. d(t) for each bit in the queue
> This d(t) is only related to the bits in the queue, so we can assume that
> d(t) has nothing to do with idle time. Is it right?

Not sure what you mean with "has nothing to do with". d(t) is a function 
of t (not an average). If a packet at time t arrives and immediately 
departs d(t)=0. d(t) applies to packets arriving at time t. If there is
no packet at time t it is undefined.

   Guido

> 
> Thanks.
> 
> --
> *********************************
> Jeonghun Noh
> Dept. of Electrical Engineering
> Stanford University
> Tel : 1-650-497-6665
> 
> *********************************
> 
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: ps1 q6
Date: Tue, 14 Jan 2003 19:42:12 -0800
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042602124 19735 171.64.74.37 (15 Jan 2003 03:42:04 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3747

the latter, consider only one link for this problem.

Sandhya Kunnatur wrote:
> the question says only one input link is active....does this mean that
> only one input link is active at a particular time or effectively we have
> only one input link for problem analysis?
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: FAQ's and Clarifications...
Date: Tue, 14 Jan 2003 20:10:58 -0800
Lines: 32
Distribution: su
Message-ID: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042603850 21458 171.64.74.37 (15 Jan 2003 04:10:50 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3748

Everyone,

here are a few follow-ups to office hours, FAQ's and clarifications

1) Store and forward router - Some people asked if when a packet is
    sent, the buffer memory is freed bit-by-bit or only once the
    whole packet is sent. We prefer you to use bit-by-bit freeing.
    However if (and only if) you *CLEARLY* state your assumptions
    either assumption is correct.

2) Some people misunderstood the definition of the interval of
    length tay in problem 8. What the constraint means is that for
    any possible interval (t1,t2) where t2-t1=tau (tau>0) the
    condition must hold. e.g. for the intervals (1,3) or (1,7) or
    (5,8). The processes do not have to be periodic. For a set
    of processes the constraint must hold for any possible
    interval.

3) For problem 9 (c) some people pointed out that there are
    several possible combinations of minima. What we mean
    is that you should first find the minumum data rate and
    then the minimum buffer that is necessary for this data
    rate. Buffer size zero and really fast data rate is not
    a correct answer.

4) For programming assignment #1 you can (but don't have to)
    use passive mode. Your choice.

Cheers,

   Guido

.

Path: shelby.stanford.edu!not-for-mail
From: "Keith Simmons" 
Newsgroups: su.class.cs244a
Subject: 7b
Date: Wed, 15 Jan 2003 01:52:21 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: ksimmons.stanford.edu
X-Trace: news.Stanford.EDU 1042624342 1630 128.12.105.123 (15 Jan 2003 09:52:22 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3749

 In the example about queue occupancy given in lecture, Q(t) seems to only
be valid for integer values.  For question 7b, do we need to write equations
which are valid for fractional times, or can we write equations only
pertinent for integer values?  Thanks.


.

Path: shelby.stanford.edu!elaine29.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: ps1 prob 7b
Date: Wed, 15 Jan 2003 08:10:27 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine29.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042647028 10896 171.64.15.104 (15 Jan 2003 16:10:28 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3750

should the time 't' be in seconds or in milliseconds?
i.e. what granulariy of t should be supported by our equations?
thanks,
Sandhya

.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 7b
Date: Wed, 15 Jan 2003 20:22:01 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine27.stanford.edu
X-Trace: news.Stanford.EDU 1042662121 19575 171.64.15.102 (15 Jan 2003 20:22:01 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3751

"Keith Simmons"  writes:

> In the example about queue occupancy given in lecture, Q(t) seems to only
>be valid for integer values.  For question 7b, do we need to write equations
>which are valid for fractional times, or can we write equations only
>pertinent for integer values?  Thanks.

Your equations should hold for any time t.
.

Path: shelby.stanford.edu!not-for-mail
From: "Pavan" 
Newsgroups: su.class.cs244a
Subject: PS1. 9.c.ii
Date: Wed, 15 Jan 2003 12:58:24 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: whizkid.stanford.edu
X-Trace: news.Stanford.EDU 1042664126 20952 128.12.184.109 (15 Jan 2003 20:55:26 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:3752

"Two processes are out of phase with respect to each other"

Does this mean that the bursts on the two links do not overlap at all? In
that case, g >= BP/R. Also, because the middle of a burst should coincide
with the middle of an idle period, g = BP/R.
Is my understanding correct?



.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: ps1 prob 7b
Date: Wed, 15 Jan 2003 18:20:56 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042683649 2820 171.64.74.37 (16 Jan 2003 02:20:49 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3753

For future problem sets: Your equations should contain units and thus 
work with seconds, minutes or hours.

e.g. not

   f(t) = 10 * t

but instead

   f(t) = 10 MBit/s * t


Sandhya Kunnatur wrote:
> should the time 't' be in seconds or in milliseconds?
> i.e. what granulariy of t should be supported by our equations?
> thanks,
> Sandhya
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: PS1. 9.c.ii
Date: Wed, 15 Jan 2003 18:26:02 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042683955 2995 171.64.74.37 (16 Jan 2003 02:25:55 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3754

I guess it's past the deadline but anyway:

Yes you can assume the bursts are instantaneous and don't overlap. If 
you have a seperate case for overlapping bursts that will make the whole 
thing more complicated but it is correct as well.

   Guido

Pavan wrote:
> "Two processes are out of phase with respect to each other"
> 
> Does this mean that the bursts on the two links do not overlap at all? In
> that case, g >= BP/R. Also, because the middle of a burst should coincide
> with the middle of an idle period, g = BP/R.
> Is my understanding correct?
> 
> 
> 

.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: problem testing code
Date: Wed, 15 Jan 2003 21:17:24 -0800
Lines: 60
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042694247 8550 171.64.15.69 (16 Jan 2003 05:17:27 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3755

hi all!

I was trying to test my code following the instruction on webpage but had
no luck so far. the terminal output is pasted below. it seems like a
failed test also counts toward our quota (?).

anyone having similar issues?

also, referring to the warning message below, that line is

sprintf(buf, "TYPE %c\r\n", temp);

where "temp" is a "char *". does anyone know how to fix the warning?
according to ANSI C, "%c" is what we use to print a single char...

finally, the webpage mentioned ".purify" file, how do we generate it? I
have a ".pure" file in the working directory but it's always blank

thanks!
Tan

****************************************************************
elaine4:~/cs214/testftp/TEST> /usr/class/cs244a/bin/test_code.pl hw1
Makefile *.c *.h purify.output
Creating submission tarball...
Makefile
ftpcp.c
ftpparse.c
utils.c
ftpparse.h
utils.h
purify.output

Starting...
Test B, new source tree required, extracting into grading_src/build...
Makefile
ftpcp.c
ftpparse.c
utils.c
ftpparse.h
utils.h
purify.output

Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 5 test attempts applies (from Jan 1 onwards).
You've used 1 test attempt(s) so far today.
make
gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftpcp.c
gcc -g -O0 -ansi -Wall -DSOLARIS  -c utils.c
utils.c: In function `TYPEcmd':
utils.c:250: warning: int format, pointer arg (arg 3)
gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftpparse.c
gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcp  ftpcp.o utils.o ftpparse.o
-lsocket -lnsl -lgen

No executable ./ftpcopy found!
(wd=/afs/ir.stanford.edu/users/w/w/wwtgao/cs214/testftp/TEST/grading_src/build)
couldn't submit code for testing

.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: Re: problem testing code
Date: Wed, 15 Jan 2003 21:56:51 -0800
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042696613 9653 171.64.15.69 (16 Jan 2003 05:56:53 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3756

hi again,

never mind. I changed the file names from "ftpcp" to "ftpcopy" and it sort
of worked. the questions now are:

1. is there any way to save the testing results in a TEXT file for viewing
(since the scroll bar does not allow going back very far) ?
2. a lot of tests just showed "Results: NOT TESTED", any clue what's going
on here?
3. how do we interpret our scores (at least according to the test script)?

thanks!
Tan

.

Path: shelby.stanford.edu!elaine38.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: problem testing code
Date: Thu, 16 Jan 2003 08:24:08 +0000 (UTC)
Lines: 26
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine38.stanford.edu
X-Trace: news.Stanford.EDU 1042705448 14683 171.64.15.113 (16 Jan 2003 08:24:08 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3757


>1. is there any way to save the testing results in a TEXT file for viewing
>(since the scroll bar does not allow going back very far) ?

script output-file
test_code.pl hw1 ...
exit the shell to end the script session

>2. a lot of tests just showed "Results: NOT TESTED", any clue what's going
>on here?

If this happened for the Purify test cases, check that you've run the
purify environment setup script described in the FAQ.  Some other test
cases may also be dependent on prior ones being successful, so if an
earlier test failed, the later one cannot be tested.  Other than that,
I can't answer without seeing output from your particular test run.

>3. how do we interpret our scores (at least according to the test script)?

If you receive "NOT OK" or "SOMEWHAT OK" for a test, assume you lost the
number of points for that test case.

Also a reminder:  keep in mind that the script tests only against a small
set of servers; during actual grading, we may test against other sites.
So be sure to test your program manually as well.

.

Path: shelby.stanford.edu!not-for-mail
From: "Neil Daswani" 
Newsgroups: su.class.cs244a
Subject: Permissions Denied for a directory
Date: Thu, 16 Jan 2003 02:43:43 -0800
Organization: Stanford University
Lines: 21
Distribution: su
Message-ID: 
Reply-To: "Neil Daswani" 
NNTP-Posting-Host: dn800cbe06.stanford.edu
X-Trace: news.Stanford.EDU 1042713900 18336 128.12.190.6 (16 Jan 2003 10:45:00 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Xref: shelby.stanford.edu su.class.cs244a:3758

Dear TAs,

If our ftpcopy program is doing a recursive copy from a server, and it comes
across a *directory* for which the anonymous user does not have the
permissions to access, should we ignore the directory similar to the way in
which we handle files whose permissions we do not have, or should we halt
the program execution and report an error?

I'd imagine that it might be nice to simply ignore such directories,
especially since some of the FTP servers we were told to test against have
directories which user anonymous does not have permisssions to, but us know
what your official position on this is.

Thanks,

Neil Daswani
http://www.stanford.edu/~daswani/




.

Path: shelby.stanford.edu!not-for-mail
From: "Bina Vasavda" 
Newsgroups: su.class.cs244a
Subject: script days
Date: Thu, 16 Jan 2003 14:27:57 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: ev-01-hos4d.stanford.edu
X-Trace: news.Stanford.EDU 1042756077 10326 128.12.154.59 (16 Jan 2003 22:27:57 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3759

Hi, does the three days before the assignment is due count the due day
itself? (ie a total of 5 tests can be run starting from Sunday , or starting
from Monday?) Thanks!
Bina


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Permissions Denied for a directory
Date: Thu, 16 Jan 2003 22:57:43 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1042757863 11466 171.64.15.74 (16 Jan 2003 22:57:43 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3760


>If our ftpcopy program is doing a recursive copy from a server, and it comes
>across a *directory* for which the anonymous user does not have the
>permissions to access, should we ignore the directory similar to the way in
>which we handle files whose permissions we do not have, or should we halt
>the program execution and report an error?

Yep, you should just ignore such directories.

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: script days
Date: Thu, 16 Jan 2003 22:58:28 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1042757908 11476 171.64.15.74 (16 Jan 2003 22:58:28 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3761


>Hi, does the three days before the assignment is due count the due day
>itself? (ie a total of 5 tests can be run starting from Sunday , or starting
>from Monday?) Thanks!

Yes, so it starts from Monday.
.

Path: shelby.stanford.edu!not-for-mail
From: Fritz Budiyanto 
Newsgroups: su.class.cs244a
Subject: CDUP
Date: Fri, 17 Jan 2003 05:14:32 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
X-Trace: news.Stanford.EDU 1042780472 24491 171.64.15.133 (17 Jan 2003 05:14:32 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3762

Hi,

Can we assume CDUP always supported by the FTP server?

thanks,
Fritz
.

Path: shelby.stanford.edu!elaine6.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: CDUP
Date: Fri, 17 Jan 2003 06:30:13 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine6.stanford.edu
X-Trace: news.Stanford.EDU 1042785013 26666 171.64.15.71 (17 Jan 2003 06:30:13 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3763


>Can we assume CDUP always supported by the FTP server?

The RFC states this is "optional," so this is not a good assumption.
.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: "matching key" for testing?
Date: Fri, 17 Jan 2003 00:00:44 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042790444 29826 171.64.15.69 (17 Jan 2003 08:00:44 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3764

hi all!

during every single one of my testing, the following message appeared:

Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y

should we safely enter "y" and ignore it? or is there something else going
wrong in the background?

thanks!

Tan Gao
-------------------


.

Path: shelby.stanford.edu!not-for-mail
From: Kevin Christopher 
Newsgroups: su.class.cs244a
Subject: Second data connection fails
Date: Fri, 17 Jan 2003 00:18:26 -0800
Lines: 56
Distribution: su
Message-ID: 
NNTP-Posting-Host: radicalbox.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042791497 855 128.12.72.54 (17 Jan 2003 08:18:17 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3765

Hi,

I've got a problem where the second (yes, 2nd) data connection fails. 
Well, doesn't fail totally - what happens is, I'm getting a 425 error 
(unable to establish data connection) after a very long time (i.e. the 
FTP server is timing out).  But I should be getting a 150 ready to begin 
status message...

Here's the general sequence of what happens: (server is ftp.stanford.edu)

(set up connection (USER, PASS, PORT) - works fine)
LIST
150 Opening ASCII mode data connection
(I call accept(), successfully read in the listing & display it to screen)
226 Transfer complete
LIST
(long wait)
425 Unable to establish data connection
TYPE I
RETR README
(long wait)
425 Unable to establish data connection

What's also bugging me is I have a commercial FTP client (WS_FTP) that 
always gets the 150 response, transfers, then gets the 226 response.  My 
reading of the RFC also seems to imply that the 1XX response is required 
before transfer begins.  My program blocks waiting for that 1XX response 
on the control connection, which it never gets, and thus never gets to 
the second call to accept() - hence the timeout.  So why am I not 
receiving that 150 response on the second transfer?

Now, case 2: (server is ftp.cs.stanford.edu)
(setup is fine)
LIST
150 Opening ASCII ...
(transfers and displays)
226 Transfer complete
LIST
550 Cannot connect to my_IP:port - Address already in use
(note that there is no pause)

Two things I can't figure out here:
1) Why would the address be in use?  I've been very careful to close the 
socket returned by accept() (traced and verified through ddd), so the 
original socket should still be listening.  I've also looked at netstat 
while in the debugger - when the socket returned by accept() is still 
open, there's a port listed as CLOSE_WAIT, and once I've closed the 
socket it disappears.
2) Why am I not getting a 150 Opening ... status message before the 
server starts the transfer?

Also... is there a way to check which sockets are actively listening?

So, two problems, probably related... I think around the lack of this 
150 response

.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!ishastri
From: Ishaan S Shastri 
Newsgroups: su.class.cs244a
Subject: user specified FTP port
Date: Fri, 17 Jan 2003 01:42:54 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine26.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042796575 2830 171.64.15.101 (17 Jan 2003 09:42:55 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3766

When the user specifies a port from the command line, do we assume that
it's already in net order, or should we assume it's host ordered?

Thanks,
Ishaan

.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: freeing memory before exiting
Date: Fri, 17 Jan 2003 02:12:34 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1042798432 4207 128.12.196.91 (17 Jan 2003 10:13:52 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3767

I'm still a little bit confused whether we should free all the memory before
exiting.
Matthew Holliman said that we should do it but Martin Casado said that we
don't really need to do it.

Actually in echodemo.c there is no freeing memory at all but when I run
purify on echodemo, it doesn't detect any memory leak at all. Does purify
only count memory leak if there is any memory allocated without any pointer
pointing to it ? (ex. : after do the malloc, we set the pointer to NULL)

Any clarifications would be helpful.

Thanks,
Honggo



.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: question about purify
Date: Fri, 17 Jan 2003 02:20:08 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1042798886 4381 128.12.196.91 (17 Jan 2003 10:21:26 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3768

I have another question.
In echodemo.c, there is a statement :
replyBuffer[bytes_read] = 0;

Actually this statement can access out of bound array if bytes_read = 32.
However, this problem is NOT detected by purify.
Am I correct if I assume that purify only detects array bounds write and
array bounds read for dynamically allocated memory ?

Thanks,
Honggo



.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: freeing memory before exiting
Date: Fri, 17 Jan 2003 05:49:16 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042811358 9850 171.64.15.80 (17 Jan 2003 13:49:18 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3769


> I'm still a little bit confused whether we should free all the memory before
> exiting.
> Matthew Holliman said that we should do it but Martin Casado said that we
> don't really need to do it.

 In the advent of answer collision, please follow Mathew's (or any other TAs')
 advice. I'm sorry if I unnecessarily confused anybody :-/

>
> Actually in echodemo.c there is no freeing memory at all but when I run
> purify on echodemo, it doesn't detect any memory leak at all. Does purify
> only count memory leak if there is any memory allocated without any pointer
> pointing to it ? (ex. : after do the malloc, we set the pointer to NULL)
>
> Any clarifications would be helpful.
>
> Thanks, Honggo
>
>
>
>

.

Path: shelby.stanford.edu!epic22.Stanford.EDU!smadhura
From: Madhura Sudhakar Sharangpani 
Newsgroups: su.class.cs244a
Subject: Regarding Test Script Test K
Date: Fri, 17 Jan 2003 08:20:10 -0800
Lines: 30
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic22.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042820414 13497 171.64.15.57 (17 Jan 2003 16:20:14 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3770

I am having a problem while running test script, the test K gives error
for me,
following is output I get:
--------------------------
Test K [out of 1]
Checks that ftpcopy handles absolute/relative paths.

Results:  NOT OK

diff between output for absolute and relative paths:
("<" - result in abs path, ">" - result in rel path;
program output different).

9c9
<
/afs/ir.stanford.edu/users/s/m/smadhura/cs244a/testcode/grading_src/build/ftp.slac.stanford.edu_mif_5_1
---
> ftp.slac.stanford.edu_mif_5_0
34,35c34
<
< *******230-

---
> 230-

------------------------------------
my question is, what is this test, what is the meaning of it?
Please explain,
Madhura.

.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: freeing memory before exiting
Date: Fri, 17 Jan 2003 19:31:18 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1042831878 19774 171.64.15.66 (17 Jan 2003 19:31:18 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3771


>I'm still a little bit confused whether we should free all the memory before
>exiting.

This is a good practice to get into anyway--Sod's Law dictates that if you
omit this, your code will be reused in some scenario where it matters whether
or not you freed the memory!

>Actually in echodemo.c there is no freeing memory at all but when I run
>purify on echodemo, it doesn't detect any memory leak at all. Does purify
>only count memory leak if there is any memory allocated without any pointer
>pointing to it ? (ex. : after do the malloc, we set the pointer to NULL)

I'm not sure why Purify doesn't catch this.

.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: "matching key" for testing?
Date: Fri, 17 Jan 2003 19:35:16 +0000 (UTC)
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1042832116 19855 171.64.15.66 (17 Jan 2003 19:35:16 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3772


>during every single one of my testing, the following message appeared:

>Can't find a matching key for this test run.
>Would you like to generate a new one?  (y/n):  y

>should we safely enter "y" and ignore it? or is there something else going
>wrong in the background?

The grading script creates a key (called .test_key in the current directory)
corresponding to your most recent submission; it's a hash of the files you
submit.  If you resubmit a set of files whose hash matches the current key
".test_key," you're allowed to run the test again without using another of
your quota.  (This allows you to retest your code without penalty in the
case of a temporary error, such as a particular server being down).

If the set of files you submit does not match the key file in the current
directory, a new one is created (and a new attempt counts against your
daily quota).  That's what this message is asking.

.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: user specified FTP port
Date: Fri, 17 Jan 2003 19:37:00 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1042832220 19940 171.64.15.66 (17 Jan 2003 19:37:00 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3774


>When the user specifies a port from the command line, do we assume that
>it's already in net order, or should we assume it's host ordered?

It's in host byte order; network byte order is used only for portability
between different systems, so it's not something that users would ever
think about.

.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: question about purify
Date: Fri, 17 Jan 2003 19:38:28 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1042832308 19982 171.64.15.66 (17 Jan 2003 19:38:28 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3775


>I have another question.
>In echodemo.c, there is a statement :
>replyBuffer[bytes_read] = 0;

>Actually this statement can access out of bound array if bytes_read = 32.
>However, this problem is NOT detected by purify.
>Am I correct if I assume that purify only detects array bounds write and
>array bounds read for dynamically allocated memory ?

Did you test the program against input that was 32 bytes or longer?  Purify
should catch ABR/ABW against arrays allocated on the stack also.  But the
only way it can do this is if the error actually occurs during runtime.

.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Regarding Test Script Test K
Date: Fri, 17 Jan 2003 19:40:31 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1042832431 20090 171.64.15.66 (17 Jan 2003 19:40:31 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3776


>I am having a problem while running test script, the test K gives error
>for me,
>my question is, what is this test, what is the meaning of it?

It tests that your program handles absolute and relative paths correctly,
i.e. the output should be identical for both cases for the same initial
directory/number of levels.  (The only difference in the two test runs is
in the path handling).  Your program apparently didn't produce identical
output for absolute and relative paths.

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: ftp.slac
Date: Fri, 17 Jan 2003 20:19:32 +0000 (UTC)
Organization: Stanford University
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic5.stanford.edu
X-Trace: news.Stanford.EDU 1042834772 21386 171.64.15.38 (17 Jan 2003 20:19:32 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3777


Is this a server we need to support? I am having trouble getting
a 226 Transfer complete response from it and so my code blocks. All the
other servers in the handout work fine.

Is there any easy way to see the server is non compliant?
.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Second data connection fails
Date: Fri, 17 Jan 2003 20:28:58 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1042835338 21720 171.64.15.66 (17 Jan 2003 20:28:58 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3778

This is a bit difficult to debug over the newsgroup; unless someone else
has more insight into this in the mean time, perhaps you could bring it
by one of the TAs' office hours.

By your comments below, do you mean you keep the original listen()ing
socket around for future data connections?

>1) Why would the address be in use?  I've been very careful to close the 
>socket returned by accept() (traced and verified through ddd), so the 
>original socket should still be listening.  I've also looked at netstat 
>while in the debugger - when the socket returned by accept() is still 
>open, there's a port listed as CLOSE_WAIT, and once I've closed the 
>socket it disappears.
>2) Why am I not getting a 150 Opening ... status message before the 
>server starts the transfer?

.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: Re: question about purify
Date: Fri, 17 Jan 2003 12:46:59 -0800
Lines: 26
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1042836497 22356 128.12.196.91 (17 Jan 2003 20:48:17 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3779

Yes, I tested the program against input that was longer than 32 bytes.
Purify catch ABR/ABW on the echoString but doesn't catch it on the
replyBuffer.

Thanks,
Honggo

"Matthew Jonathan Holliman"  wrote in message

>
> >I have another question.
> >In echodemo.c, there is a statement :
> >replyBuffer[bytes_read] = 0;
>
> >Actually this statement can access out of bound array if bytes_read = 32.
> >However, this problem is NOT detected by purify.
> >Am I correct if I assume that purify only detects array bounds write and
> >array bounds read for dynamically allocated memory ?
>
> Did you test the program against input that was 32 bytes or longer?
Purify
> should catch ABR/ABW against arrays allocated on the stack also.  But the
> only way it can do this is if the error actually occurs during runtime.
>


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: more ftp.slac
Date: Fri, 17 Jan 2003 20:48:23 +0000 (UTC)
Organization: Stanford University
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic5.stanford.edu
X-Trace: news.Stanford.EDU 1042836503 22362 171.64.15.38 (17 Jan 2003 20:48:23 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3780


Actually it turns out my program runs fine: it just takes 6 minutes to
get the 226 on a LIST command. What could cause this?

This happens both on my home machine (pacbell.net) and epic. 
The purify report is 

   Finished  ftpcopy.purify       (   0 errors, 0 leaked bytes)
      Purify instrumented ftpcopy.purify (pid 12841 at Fri Jan 17 12:40:44 2003)
      Purify 2002a.06.00 Solaris 2 (32-bit) Copyright (C) 1992-2002 Rational Software Corp.  All rights reserved.  
      For contact information type: "purify -help"
      For TTY output, use the option "-windows=no"
      Options settings: -purify -cache-dir=/tmp/rational.seetapun \
          -cache-dir=/tmp/seetapun \
          -purify-home=/usr/pubsw/apps/rational-2002.06.00/releases/purify.sol.2002a.06.00 
      License successfully checked out.
      Command-line: ./ftpcopy.purify ftp.slac 
      Current file descriptors in use: 7
      Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)
      Program exited with status code 0.
.

Path: shelby.stanford.edu!not-for-mail
From: Fritz Budiyanto 
Newsgroups: su.class.cs244a
Subject: CWD with no permission, and file overwrite
Date: Fri, 17 Jan 2003 21:29:56 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine34.stanford.edu
X-Trace: news.Stanford.EDU 1042838996 23453 171.64.15.109 (17 Jan 2003 21:29:56 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3781

Hi, 

Should we ignore CWD failure on accessing a directory due to
permission? or exit with failure?
If we overwrite a file, shall we change the permission to S_IREAD and S_IWRITE?

fritz

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: less slac
Date: Fri, 17 Jan 2003 22:14:57 +0000 (UTC)
Organization: Stanford University
Lines: 2
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic5.stanford.edu
X-Trace: news.Stanford.EDU 1042841697 25169 171.64.15.38 (17 Jan 2003 22:14:57 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3782


Found the problem: wasn't using shutdown properly.
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: less slac
Date: Fri, 17 Jan 2003 15:49:08 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042847411 28630 128.12.186.92 (17 Jan 2003 23:50:11 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3783

Glad to hear that you figured out the problem -- perhaps if anyone else is
having problems with SLAC, they should look into that as well.

--Russell Greene


"David Seetapun"  wrote in message

>
> Found the problem: wasn't using shutdown properly.


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: CWD with no permission, and file overwrite
Date: Fri, 17 Jan 2003 15:51:04 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042847527 28679 128.12.186.92 (17 Jan 2003 23:52:07 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3784

If you cannot enter a directory due to permission problems then just keep on
running your program as if the directory was not there.

When you overwrite a file, that will happen because you open a new file with
the same name (which effectively overwrites the existing file).  Because you
specify permissions when you open a file, there is no need to change
permissions when overwriting a file.

Hope this helps.

--Russ

"Fritz Budiyanto"  wrote in message

> Hi,
>
> Should we ignore CWD failure on accessing a directory due to
> permission? or exit with failure?
> If we overwrite a file, shall we change the permission to S_IREAD and
S_IWRITE?
>
> fritz
>


.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: CWD with no permission, and file overwrite
Date: Fri, 17 Jan 2003 23:59:30 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1042847970 28864 171.64.15.101 (17 Jan 2003 23:59:30 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3785



>Should we ignore CWD failure on accessing a directory due to
>permission? or exit with failure?

Not to pick on you in particular, but this question was also answered on here
yesterday!  Everyone:  Please try and read the existing questions/answers
before you post on here--it'll save everyone time.  Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: Kevin Christopher 
Newsgroups: su.class.cs244a
Subject: Re: Second data connection fails
Date: Fri, 17 Jan 2003 16:35:18 -0800
Lines: 31
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: radicalbox.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042850110 45 128.12.72.54 (18 Jan 2003 00:35:10 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3786

I did manage to get around the problem (creating an entirely new data 
socket instead of re-using the old one); messy but functional.  I'll 
probably come to office hours though - irks me to not be able to truly 
set up a server.

Yes, I am keeping the original (listen) socket around - every accept 
call is on that socket.  The socket returned by accept() works fine for 
one transfer, then I close it.  I also can't seem to re-bind() the 
listen socket though (as FAQ #2 for this assignment suggests) - I get an 
invalid arguments error.

Matthew Jonathan Holliman wrote:
> This is a bit difficult to debug over the newsgroup; unless someone else
> has more insight into this in the mean time, perhaps you could bring it
> by one of the TAs' office hours.
> 
> By your comments below, do you mean you keep the original listen()ing
> socket around for future data connections?
> 
> 
>>1) Why would the address be in use?  I've been very careful to close the 
>>socket returned by accept() (traced and verified through ddd), so the 
>>original socket should still be listening.  I've also looked at netstat 
>>while in the debugger - when the socket returned by accept() is still 
>>open, there's a port listed as CLOSE_WAIT, and once I've closed the 
>>socket it disappears.
>>2) Why am I not getting a 150 Opening ... status message before the 
>>server starts the transfer?
> 
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Mark Rabkin 
Newsgroups: su.class.cs244a
Subject: HW1: Continue if can't create local dir?
Date: Sat, 18 Jan 2003 01:23:58 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine32.stanford.edu
X-Trace: news.Stanford.EDU 1042853038 1799 171.64.15.107 (18 Jan 2003 01:23:58 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3787

What do we do if we successfully entered a directory on the server,
but cannot then create the corresponding directory on the local machine
due to a permissions error? 

(There might be a pre-existing directory in the local tree with no execute
or write permissions, OR there might be a normal file with the same name
as a dir we'd try to create).

Do we die with an error, or ignore the whole server dir and keep processing?

- Mark


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: file extensions
Date: Sat, 18 Jan 2003 03:02:06 +0000 (UTC)
Organization: Stanford University
Lines: 2
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic5.stanford.edu
X-Trace: news.Stanford.EDU 1042858926 5635 171.64.15.38 (18 Jan 2003 03:02:06 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3788


should ".gz" be considered to have extension .gz?
.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: UMR when calling getcwd()
Date: Fri, 17 Jan 2003 19:16:04 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042859766 5965 171.64.15.78 (18 Jan 2003 03:16:06 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3789

I am getting this error although my code is as simple as

char *localCWD = NULL;
.....
localCWD = getcwd(NULL, MAX_STRING_SIZE); /* <<<=== Trouble maker. */
.....
.....
free(localCWD);

The above piece of code appear in my function to copy directory. It seems
it happens every time I go one level down into a subdirection. That is, if
I copy 5 levels deep, then I get 5 UMR errors in purify window, all
pointing to the same line. There is no other memory errors.

Anyone else has the same problem?

I tried to add "suppress UMR; getcwd" in my .purify file. It didn't work.
While I am on the subject, how do we make ftpcopy.output from purify
window?

Thanks a lot.

Jichun


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: using mkdir to make directories
Date: Sat, 18 Jan 2003 05:03:35 +0000 (UTC)
Organization: Stanford University
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic3.stanford.edu
X-Trace: news.Stanford.EDU 1042866215 9322 171.64.15.36 (18 Jan 2003 05:03:35 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3790


If I do this as the FAQ suggests and the directory exist I get something like

mkdir: /Users/seetapun/ftpcopy_test//bussys: File exists

The program is not supposed to print anything like this. How can I suppress
this output or is it acceptable for the program to have this?
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: microsoft.ftp.com
Date: Sat, 18 Jan 2003 05:41:22 +0000 (UTC)
Organization: Stanford University
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic3.stanford.edu
X-Trace: news.Stanford.EDU 1042868482 10240 171.64.15.36 (18 Jan 2003 05:41:22 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3791


After about depth 5 there are directories with names like

Dungeons&dragons (I guess windows allows this)

if one does mkdir Dungeons&dragons
one is happy there isn't a game Dungeons&rm -rf /

can we just assume that the filesystem of the server doesn't have stuff like
this?
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Continue if can't create local dir?
Date: Fri, 17 Jan 2003 23:43:32 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042875877 13073 128.12.186.92 (18 Jan 2003 07:44:37 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3792

It is safe to bail if you do not have permissions on your local machine.

--Russ


"Mark Rabkin"  wrote in message

> What do we do if we successfully entered a directory on the server,
> but cannot then create the corresponding directory on the local machine
> due to a permissions error?
>
> (There might be a pre-existing directory in the local tree with no execute
> or write permissions, OR there might be a normal file with the same name
> as a dir we'd try to create).
>
> Do we die with an error, or ignore the whole server dir and keep
processing?
>
> - Mark
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: file extensions
Date: Fri, 17 Jan 2003 23:44:52 -0800
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042875957 13104 128.12.186.92 (18 Jan 2003 07:45:57 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3793

"David Seetapun"  wrote in message

>
> should ".gz" be considered to have extension .gz?

Yes

--Russ


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: UMR when calling getcwd()
Date: Fri, 17 Jan 2003 23:51:59 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042876384 13292 128.12.186.92 (18 Jan 2003 07:53:04 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3794

> I am getting this error although my code is as simple as
>
> char *localCWD = NULL;
> ....
> localCWD = getcwd(NULL, MAX_STRING_SIZE); /* <<<=== Trouble maker. */
> ....
> ....
> free(localCWD);
>
> The above piece of code appear in my function to copy directory. It seems
> it happens every time I go one level down into a subdirection. That is, if
> I copy 5 levels deep, then I get 5 UMR errors in purify window, all
> pointing to the same line. There is no other memory errors.
>
> Anyone else has the same problem?

The code as you have it looks correct.  Perhaps the error lies in what you
have between those lines.

>
> I tried to add "suppress UMR; getcwd" in my .purify file. It didn't work.
> While I am on the subject, how do we make ftpcopy.output from purify
> window?
>

There is a purify faq available from the FAQ section of the website.


> Thanks a lot.
>
> Jichun
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: using mkdir to make directories
Date: Fri, 17 Jan 2003 23:56:29 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042876654 13446 128.12.186.92 (18 Jan 2003 07:57:34 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3795

Are you performing a system call to the shell and then running mkdir or
actually using the mkdir command directly?  I do not believe the mkdir
prints anything to the console on error, rather the command should return
a -1 on error (including when the directory trying to be created already
exists) and sets the errno value.

--Russ

"David Seetapun"  wrote in message

>
> If I do this as the FAQ suggests and the directory exist I get something
like
>
> mkdir: /Users/seetapun/ftpcopy_test//bussys: File exists
>
> The program is not supposed to print anything like this. How can I
suppress
> this output or is it acceptable for the program to have this?


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: microsoft.ftp.com
Date: Fri, 17 Jan 2003 23:58:34 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042876779 13491 128.12.186.92 (18 Jan 2003 07:59:39 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3796

Haha, that's excellent.  It is safe to assume that the directories you
create will not destroy your system :)

--Russ


"David Seetapun"  wrote in message

>
> After about depth 5 there are directories with names like
>
> Dungeons&dragons (I guess windows allows this)
>
> if one does mkdir Dungeons&dragons
> one is happy there isn't a game Dungeons&rm -rf /
>
> can we just assume that the filesystem of the server doesn't have stuff
like
> this?


.

Path: shelby.stanford.edu!saga7.Stanford.EDU!milaps
From: Milap Chandrakant Shah 
Newsgroups: su.class.cs244a
Subject: Directory doubts.
Date: Sat, 18 Jan 2003 01:02:31 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042880558 15206 171.64.15.137 (18 Jan 2003 09:02:38 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3797

Hello,

I had a couple of doubts.

Our command line is ftpcopy gz 2 ftp.stanford.edu dstdir srcdir

1)Can we assume that the dstdir directory is present in our system or do
we have to create it if not present?

2) can we assume both dstsir and srcdir are complete paths or can they be
relative paths?

Thanks
Milap

.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Directory doubts.
Date: Sat, 18 Jan 2003 01:32:45 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1042882432 15772 128.12.186.92 (18 Jan 2003 09:33:52 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3798


"Milap Chandrakant Shah"  wrote in message

> Hello,
>
> I had a couple of doubts.
>
> Our command line is ftpcopy gz 2 ftp.stanford.edu dstdir srcdir
>
> 1)Can we assume that the dstdir directory is present in our system or do
> we have to create it if not present?
>

As specified in the assignment: You may assume that the local directory
already exists; exit with an error if it does not.


> 2) can we assume both dstsir and srcdir are complete paths or can they be
> relative paths?
>

Although I cannot find where this is specified, it is my belief that you
should support both relative and complete paths.  Since file commands
support both relative and complete paths it should be relatively
straightforward to support this functionality.

> Thanks
> Milap
>


.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: Re: UMR when calling getcwd()
Date: Sat, 18 Jan 2003 01:56:28 -0800
Lines: 52
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine36.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042883790 16265 171.64.15.111 (18 Jan 2003 09:56:30 GMT)
X-Complaints-To: 
To: Russell Greene 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3799

The variable char* localCWD is only used after we've finished copying a
subdirectory recursively and step back to the parent directory. So between
the lines, it is only used a couple of times in chdir(localCWD).

I've got around this problem by not keeping track of the path to parent
directory at all, but use chdir("..") after copying the sub-dir
recursively to get back to parent dir, based on the fact that we go only
one level down at each recursive call.  We are lucky we don't have to
handle links so I can get away like this.  But I am still quite
uncomfortable not knowing why a call of getcwd()  gives me UMR.

Jichun

On Fri, 17 Jan 2003, Russell Greene wrote:

> > I am getting this error although my code is as simple as
> >
> > char *localCWD = NULL;
> > ....
> > localCWD = getcwd(NULL, MAX_STRING_SIZE); /* <<<=== Trouble maker. */
> > ....
> > ....
> > free(localCWD);
> >
> > The above piece of code appear in my function to copy directory. It seems
> > it happens every time I go one level down into a subdirection. That is, if
> > I copy 5 levels deep, then I get 5 UMR errors in purify window, all
> > pointing to the same line. There is no other memory errors.
> >
> > Anyone else has the same problem?
>
> The code as you have it looks correct.  Perhaps the error lies in what you
> have between those lines.
>
> >
> > I tried to add "suppress UMR; getcwd" in my .purify file. It didn't work.
> > While I am on the subject, how do we make ftpcopy.output from purify
> > window?
> >
>
> There is a purify faq available from the FAQ section of the website.
>
>
> > Thanks a lot.
> >
> > Jichun
> >
> >
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: file extensions
Date: Sat, 18 Jan 2003 10:39:22 -0800
Lines: 23
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: adsl-64-172-97-30.dsl.snfc21.pacbell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042915203 81 64.172.97.30 (18 Jan 2003 18:40:03 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3800

Hi,
according to Q20 in the FAQ handout "gz" matches "*.gz"
so I'd think that ".gz" should match extension "*..gz" (note: two dots)
and not "*.gz", in the same way "gz" does not match "*gz".
Not to be nit-picking here but I would hate to
fail some test because of this.

Could you clarify?
Thanks
Rafa


Russell Greene wrote:

> "David Seetapun"  wrote in message
> 
> >
> > should ".gz" be considered to have extension .gz?
>
> Yes
>
> --Russ

.

Path: shelby.stanford.edu!not-for-mail
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: 5 Questions/comments about hw1 assignment
Date: Sat, 18 Jan 2003 11:27:17 -0800
Lines: 60
Distribution: su
Message-ID: 
NNTP-Posting-Host: adsl-64-172-97-30.dsl.snfc21.pacbell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042918075 1714 64.172.97.30 (18 Jan 2003 19:27:55 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3801

Hi,
I have a few questions/comments about the assigment that I'd like one
of the TA's to comment on.

1) Sometimes when I try to run the testing script I get : Connection
timed out
----------------
elaine4:~/class/cs244a/tests> /usr/class/cs244a/bin/test_code.pl hw1
Makefile *.c *h purify.output .purify
/usr/class/cs244a/bin/test_code.pl: Connection timed out.
----------------
Some other times it works OK, but I was wondering what is happening
here.

2) I originally was using several connections to the ftp server in
parallel in order to
speed up the transfer of several files in parallel but it seems that
this is not allowed because you test
our programs in such a way that the ftp server only allows ONE
connection at a time.
This seems like a very artificial restriction. Why don't you run the
tests with  "ftpd -f"
instead?

3) To avoid the problem of closing/opening multiple connections the RFC
says that STREAM
transfer mode is inherently unreliable and a different mode should be
used. I have tried to
use BLOCK transfer mode but it seems the ftp server you use for testing
does
not have this implemented, I get:
550: Transfer mode not implemented.
It seems to me that the only solution left for us is to close and create
a different data connection
for every file. Am I missing anything here?

4) In FAQ Q22 and in the assignment handout it is said that we should
not
expect replies longer than 1024 bytes but the ftp server
ftp.slac.stanford.edu  that you use as part of the testing has a welcome

message much longer than 1024. Could you clarify? Shouln't you either
revise the assignment
and FAQ or change the server?.

5) In FAQ Q16 it is said that we are not required to support non RFC
compliant
servers. It seems to me that test L.6 is using a non-compliant ftp
server because
the reply that this server gives doesn't have any valid reply code.
--------------
elaine4:~/class/cs244a/hw1> ftp elaine13
Connected to elaine13.Stanford.EDU.
You can't FTP into this machine. FTP into transfer.stanford.edu.
----------------------


Thanks
Rafa

.

Path: shelby.stanford.edu!epic12.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: Which ftp commands must we retry after failing the first attempt?
Date: Sat, 18 Jan 2003 13:59:56 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042927199 5740 171.64.15.45 (18 Jan 2003 21:59:59 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3802

In the handout, it said upon receiving the 400 series reply codes the ftp
command should be retried later.

The RFC 959 said

421 Service not available ...
425 Can't open data connection .
426 Connection closed ...
....

among which, I am not sure if retry meant resending the ftp command or try
another ftp session completely fresh.

Any hint?

Thanks a lot.

Jichun

.

Path: shelby.stanford.edu!not-for-mail
From: "Nishant Verman" 
Newsgroups: su.class.cs244a
Subject: Re: Which ftp commands must we retry after failing the first attempt?
Date: Sat, 18 Jan 2003 14:23:37 -0800
Lines: 32
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nishant.stanford.edu
X-Trace: news.Stanford.EDU 1042928618 6667 128.12.185.34 (18 Jan 2003 22:23:38 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3803

From last years newsgroup:

>As the RFC says, the meaning of "transient" is rather vague.  You can
>handle 4xx and 5xx errors the same way in this assignment.

Nishant



"Jichun Zhu"  wrote in message

> In the handout, it said upon receiving the 400 series reply codes the ftp
> command should be retried later.
>
> The RFC 959 said
>
> 421 Service not available ...
> 425 Can't open data connection .
> 426 Connection closed ...
> ...
>
> among which, I am not sure if retry meant resending the ftp command or try
> another ftp session completely fresh.
>
> Any hint?
>
> Thanks a lot.
>
> Jichun
>


.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Which ftp commands must we retry after failing the first attempt?
Date: Sat, 18 Jan 2003 23:39:56 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 41
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1042933196 10132 171.64.15.77 (18 Jan 2003 23:39:56 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3804

I agree with Nishant.  You can treat 4xx and 5xx errors as
hard errors.

SteveJ

In article 
Nishant Verman  wrote:
>From last years newsgroup:
>
>>As the RFC says, the meaning of "transient" is rather vague.  You can
>>handle 4xx and 5xx errors the same way in this assignment.
>
>Nishant
>
>
>
>"Jichun Zhu"  wrote in message

>> In the handout, it said upon receiving the 400 series reply codes the ftp
>> command should be retried later.
>>
>> The RFC 959 said
>>
>> 421 Service not available ...
>> 425 Can't open data connection .
>> 426 Connection closed ...
>> ...
>>
>> among which, I am not sure if retry meant resending the ftp command or try
>> another ftp session completely fresh.
>>
>> Any hint?
>>
>> Thanks a lot.
>>
>> Jichun
>>
>
>


.

Path: shelby.stanford.edu!saga21.Stanford.EDU!ching
From:  (Michael Ching)
Newsgroups: su.class.cs244a
Subject: Problem with ftp.slac.stanford.edu
Date: Sat, 18 Jan 2003 23:42:19 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga21.stanford.edu
X-Trace: news.Stanford.EDU 1042933339 10216 171.64.15.151 (18 Jan 2003 23:42:19 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3805

Related to the problems posted by David Seetapun, I too ran into problems 
with ftp.slac.stanford.edu.  Whenever I issue the list command, the system 
seem to hang while waiting for the 226 transfer complete response.  This 
doesn't happen with any other ftp servers.  With David's help and some 
poking around, I discover the following solution.

For whatever reason, the slac server will only issue the 226 response 
after the data connection has been closed.  Since I issue the close() 
command at the end of my procedure, after pulling the connection socket 
for a response, it just hangs.  You must close the data connection right 
after receiving the list and before pulling the connection socket for the 
226 response.  For those of you using PASV, that means you need to issue 
the shutdown command to the data connection, before pulling the connection 
socket for the 226 response.  This way the slac server can shutdown the 
data connection right after transmitting the list.

I hope this will save some of you a couple of hours of hair pulling. :)

Mike

.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: file extensions
Date: Sun, 19 Jan 2003 00:42:18 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 32
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1042936938 11877 171.64.15.77 (19 Jan 2003 00:42:18 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3806

I agree, but will confer with the other TAs for the definitive
answer.

SteveJ

In article 
Rafael M Hernandez   wrote:
>Hi,
>according to Q20 in the FAQ handout "gz" matches "*.gz"
>so I'd think that ".gz" should match extension "*..gz" (note: two dots)
>and not "*.gz", in the same way "gz" does not match "*gz".
>Not to be nit-picking here but I would hate to
>fail some test because of this.
>
>Could you clarify?
>Thanks
>Rafa
>
>
>Russell Greene wrote:
>
>> "David Seetapun"  wrote in message
>> 
>> >
>> > should ".gz" be considered to have extension .gz?
>>
>> Yes
>>
>> --Russ
>


.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: 5 Questions/comments about hw1 assignment
Date: Sun, 19 Jan 2003 00:50:31 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 83
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1042937431 12077 171.64.15.77 (19 Jan 2003 00:50:31 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3807

Comments inline:

In article 
Rafael M Hernandez   wrote:
>Hi,
>I have a few questions/comments about the assigment that I'd like one
>of the TA's to comment on.
>

I've emailed our script expert about the following:

>1) Sometimes when I try to run the testing script I get : Connection
>timed out
>----------------
>elaine4:~/class/cs244a/tests> /usr/class/cs244a/bin/test_code.pl hw1
>Makefile *.c *h purify.output .purify
>/usr/class/cs244a/bin/test_code.pl: Connection timed out.
>----------------
>Some other times it works OK, but I was wondering what is happening
>here.

I don't think we will be able to support parallel transfers
in the grading script.

>
>2) I originally was using several connections to the ftp server in
>parallel in order to
>speed up the transfer of several files in parallel but it seems that
>this is not allowed because you test
>our programs in such a way that the ftp server only allows ONE
>connection at a time.
>This seems like a very artificial restriction. Why don't you run the
>tests with  "ftpd -f"
>instead?
>

In my understanding, using stream transfer mode is correct.

>3) To avoid the problem of closing/opening multiple connections the RFC
>says that STREAM
>transfer mode is inherently unreliable and a different mode should be
>used. I have tried to
>use BLOCK transfer mode but it seems the ftp server you use for testing
>does
>not have this implemented, I get:
>550: Transfer mode not implemented.
>It seems to me that the only solution left for us is to close and create
>a different data connection
>for every file. Am I missing anything here?
>

You are not responsible for working with non-compliant ftp servers.
We (the TAs) will post a definitive answer regarding the following two
issues.

SteveJ

>4) In FAQ Q22 and in the assignment handout it is said that we should
>not
>expect replies longer than 1024 bytes but the ftp server
>ftp.slac.stanford.edu  that you use as part of the testing has a welcome
>
>message much longer than 1024. Could you clarify? Shouln't you either
>revise the assignment
>and FAQ or change the server?.
>
>5) In FAQ Q16 it is said that we are not required to support non RFC
>compliant
>servers. It seems to me that test L.6 is using a non-compliant ftp
>server because
>the reply that this server gives doesn't have any valid reply code.
>--------------
>elaine4:~/class/cs244a/hw1> ftp elaine13
>Connected to elaine13.Stanford.EDU.
>You can't FTP into this machine. FTP into transfer.stanford.edu.
>----------------------
>
>
>Thanks
>Rafa
>


.

Path: shelby.stanford.edu!elaine11.Stanford.EDU!kushcu
From: Ozgun Ali Erdogan 
Newsgroups: su.class.cs244a
Subject: weird problem in changing dirs
Date: Sat, 18 Jan 2003 20:12:09 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042949547 17502 171.64.15.76 (19 Jan 2003 04:12:27 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3808


Hi,

My code runs fine with the local ftpd when going into multiple
directories, but when I try it on ftp.microsoft.com (or other test sites),
my program just hangs, or outputs an FTP 500 error. (when it's not
supposed to.)

The problem is, when I'm debugging, I don't run into any  kind of
problems, I just browse through the directories and everything works
fine.

This problem only occurs when I'm changing directories. Could anyone help
me with that?

Thanks,

Ozgun.

.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: weird problem in changing dirs
Date: Sun, 19 Jan 2003 04:39:45 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 50
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042951185 18086 171.64.15.112 (19 Jan 2003 04:39:45 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3809

Hi Ozgun,

Here is what RFC 959 has to say about error 500:

         500 Syntax error, command unrecognized.
             This may include errors such as command line too long.

Page 49 of the RFC indicates when error 500 might be expected to
occur.  As you can see, it can occur just about anywhere; more
debugging will be needed.

If I understand what you said, your program works OK when you
are debugging (single-stepping?) but not otherwise, when accessing
certain sites?  This suggests a timing problem, which the artificial
delays introduced by the debugging work around.

It's possible that ftpd is more forgiving about some aspect of the
communication protocol, or that the timing is simply different.
Take a careful look at your protocol code, particularly in areas
involving directory changes.

If you need more help, post again or come to TA office hours.  It
will take additional information for us to proceed.

SteveJ


In article 
Ozgun Ali Erdogan   wrote:
>
>Hi,
>
>My code runs fine with the local ftpd when going into multiple
>directories, but when I try it on ftp.microsoft.com (or other test sites),
>my program just hangs, or outputs an FTP 500 error. (when it's not
>supposed to.)
>
>The problem is, when I'm debugging, I don't run into any  kind of
>problems, I just browse through the directories and everything works
>fine.
>
>This problem only occurs when I'm changing directories. Could anyone help
>me with that?
>
>Thanks,
>
>Ozgun.
>


.

Path: shelby.stanford.edu!not-for-mail
From: Nordstrom Kirk Phelps 
Newsgroups: su.class.cs244a
Subject: Connection reset by peer?
Date: Sat, 18 Jan 2003 20:50:25 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine19.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1042951826 18347 171.64.15.84 (19 Jan 2003 04:50:26 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3810

In the process of trying to get a directory listing from the server, I
set PASV, connect to the port and ip specified, wait for the transfer to
complete (226) and then read from the socket.  This read command returns
a -1, and sets the sys error string to "Connection reset by peer".  Does
anyone know why this is happening?  Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Pavan" 
Newsgroups: su.class.cs244a
Subject: Why is my ftp slow?
Date: Sat, 18 Jan 2003 20:57:38 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: whizkid.stanford.edu
X-Trace: news.Stanford.EDU 1042952073 18404 128.12.184.109 (19 Jan 2003 04:54:33 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:3811

Hi,
  When I try to copy a 10 MB file from ftp.cs.stanford.edu my program takes
very long time (more than 10 mins) compared to the normal ftp client. Why
could this be happenning? Is it coz we r using 'stream mode' transmission
and not 'block mode'? Or could it be because of some inefficient code  in my
program? (like reading slowly out of the socket)
    Will this be a problem.. while testing.. will the test software consider
that the program is hanging?
Thanx,
Pavan


.

Path: shelby.stanford.edu!elaine22.Stanford.EDU!kushcu
From: Ozgun Ali Erdogan 
Newsgroups: su.class.cs244a
Subject: Re: weird problem in changing dirs
Date: Sat, 18 Jan 2003 21:25:41 -0800
Lines: 69
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine22.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042953957 19118 171.64.15.87 (19 Jan 2003 05:25:57 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3812


Hi,

I'm sorry, I meant to write 550 as the error. I was just very annoyed with
this error and was typing fast. I went over the code for lots of times and
still get the same error. (though at different places, and almost never in
debugging). unfortunately since I couldn't exactly detect where the
problem is, I can't post a fragment of code.

are there going to be TA office hours this Monday?

thanks a lot Steve,

Ozgun.

On Sun, 19 Jan 2003, Steve Jacobson wrote:

> Hi Ozgun,
>
> Here is what RFC 959 has to say about error 500:
>
>          500 Syntax error, command unrecognized.
>              This may include errors such as command line too long.
>
> Page 49 of the RFC indicates when error 500 might be expected to
> occur.  As you can see, it can occur just about anywhere; more
> debugging will be needed.
>
> If I understand what you said, your program works OK when you
> are debugging (single-stepping?) but not otherwise, when accessing
> certain sites?  This suggests a timing problem, which the artificial
> delays introduced by the debugging work around.
>
> It's possible that ftpd is more forgiving about some aspect of the
> communication protocol, or that the timing is simply different.
> Take a careful look at your protocol code, particularly in areas
> involving directory changes.
>
> If you need more help, post again or come to TA office hours.  It
> will take additional information for us to proceed.
>
> SteveJ
>
>
> In article 
> Ozgun Ali Erdogan   wrote:
> >
> >Hi,
> >
> >My code runs fine with the local ftpd when going into multiple
> >directories, but when I try it on ftp.microsoft.com (or other test sites),
> >my program just hangs, or outputs an FTP 500 error. (when it's not
> >supposed to.)
> >
> >The problem is, when I'm debugging, I don't run into any  kind of
> >problems, I just browse through the directories and everything works
> >fine.
> >
> >This problem only occurs when I'm changing directories. Could anyone help
> >me with that?
> >
> >Thanks,
> >
> >Ozgun.
> >
>
>
>

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: FIU error
Date: Sat, 18 Jan 2003 22:38:23 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1042958305 20757 171.64.15.70 (19 Jan 2003 06:38:25 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3813

I'm getting the following message in purify.output:

FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
   * File info: ?r--r--r--  1 root     root             0 May 11  2002
   * This file descriptor was allocated from:
	__open64       [libc.so.1]
	_open64        [libc.so.1]
	_nsc_trydoorcall [libc.so.1]
	_door_gethostbyname_r [gethostby_door.c]
	_get_hostserv_inetnetdir_byname [netdir_inet.c]
	gethostbyname_r [gethostbyname_r.c]

Its seems to be allocated by gethostbyname - any ideas how to deallocate
it?

Thanks,
Nishant




.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: weird problem in changing dirs
Date: Sun, 19 Jan 2003 06:41:36 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 85
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042958496 20829 171.64.15.112 (19 Jan 2003 06:41:36 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3814

In article 
Ozgun Ali Erdogan   wrote:
>

         550 Requested action not taken.
             File unavailable (e.g., file not found, no access).

An intermittent error of this sort is hard to debug without
working hands-on with the code.

I'm not certain about TA office hours on Monday.  One of the
TAs will post when we know for sure.

SteveJ

>Hi,
>
>I'm sorry, I meant to write 550 as the error. I was just very annoyed with
>this error and was typing fast. I went over the code for lots of times and
>still get the same error. (though at different places, and almost never in
>debugging). unfortunately since I couldn't exactly detect where the
>problem is, I can't post a fragment of code.
>
>are there going to be TA office hours this Monday?
>
>thanks a lot Steve,
>
>Ozgun.
>
>On Sun, 19 Jan 2003, Steve Jacobson wrote:
>
>> Hi Ozgun,
>>
>> Here is what RFC 959 has to say about error 500:
>>
>>          500 Syntax error, command unrecognized.
>>              This may include errors such as command line too long.
>>
>> Page 49 of the RFC indicates when error 500 might be expected to
>> occur.  As you can see, it can occur just about anywhere; more
>> debugging will be needed.
>>
>> If I understand what you said, your program works OK when you
>> are debugging (single-stepping?) but not otherwise, when accessing
>> certain sites?  This suggests a timing problem, which the artificial
>> delays introduced by the debugging work around.
>>
>> It's possible that ftpd is more forgiving about some aspect of the
>> communication protocol, or that the timing is simply different.
>> Take a careful look at your protocol code, particularly in areas
>> involving directory changes.
>>
>> If you need more help, post again or come to TA office hours.  It
>> will take additional information for us to proceed.
>>
>> SteveJ
>>
>>
>> In article 
>> Ozgun Ali Erdogan   wrote:
>> >
>> >Hi,
>> >
>> >My code runs fine with the local ftpd when going into multiple
>> >directories, but when I try it on ftp.microsoft.com (or other test sites),
>> >my program just hangs, or outputs an FTP 500 error. (when it's not
>> >supposed to.)
>> >
>> >The problem is, when I'm debugging, I don't run into any  kind of
>> >problems, I just browse through the directories and everything works
>> >fine.
>> >
>> >This problem only occurs when I'm changing directories. Could anyone help
>> >me with that?
>> >
>> >Thanks,
>> >
>> >Ozgun.
>> >
>>
>>
>>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Why is my ftp slow?
Date: Sun, 19 Jan 2003 06:50:39 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 27
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042959039 21049 171.64.15.112 (19 Jan 2003 06:50:39 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3815

Certainly this could be caused by inefficient code.  If you
are reading and handling file characters byte-by-byte, think
about how this might be speeded up.

Stream mode should be OK.

I think you will be OK regarding the test software, but I will
verify with our script wizard.

SteveJ

In article 
Pavan  wrote:
>Hi,
>  When I try to copy a 10 MB file from ftp.cs.stanford.edu my program takes
>very long time (more than 10 mins) compared to the normal ftp client. Why
>could this be happenning? Is it coz we r using 'stream mode' transmission
>and not 'block mode'? Or could it be because of some inefficient code  in my
>program? (like reading slowly out of the socket)
>    Will this be a problem.. while testing.. will the test software consider
>that the program is hanging?
>Thanx,
>Pavan
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Nishant Verman" 
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sat, 18 Jan 2003 22:50:58 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nishant.stanford.edu
X-Trace: news.Stanford.EDU 1042959060 21056 128.12.185.34 (19 Jan 2003 06:51:00 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3816

Apparently the autograder fails me on the last test for this - I get a
message saying:

Test O [out of 1]
Checks that you did indeed run purify!
Results:   NOT OK :(
purify.output did not match expected regexp.

Am I failing this because of the previously mentioned error?



"Nishant Verman"  wrote in message

> I'm getting the following message in purify.output:
>
> FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
>    * File info: ?r--r--r--  1 root     root             0 May 11  2002
>    * This file descriptor was allocated from:
> __open64       [libc.so.1]
> _open64        [libc.so.1]
> _nsc_trydoorcall [libc.so.1]
> _door_gethostbyname_r [gethostby_door.c]
> _get_hostserv_inetnetdir_byname [netdir_inet.c]
> gethostbyname_r [gethostbyname_r.c]
>
> Its seems to be allocated by gethostbyname - any ideas how to deallocate
> it?
>
> Thanks,
> Nishant
>
>
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sun, 19 Jan 2003 07:19:23 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 46
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042960763 21857 171.64.15.112 (19 Jan 2003 07:19:23 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3817


Are you specifying purify.output in your list of files?

SteveJ

In article 
Nishant Verman  wrote:
>Apparently the autograder fails me on the last test for this - I get a
>message saying:
>
>Test O [out of 1]
>Checks that you did indeed run purify!
>Results:   NOT OK :(
>purify.output did not match expected regexp.
>
>Am I failing this because of the previously mentioned error?
>
>
>
>"Nishant Verman"  wrote in message

>> I'm getting the following message in purify.output:
>>
>> FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
>>    * File info: ?r--r--r--  1 root     root             0 May 11  2002
>>    * This file descriptor was allocated from:
>> __open64       [libc.so.1]
>> _open64        [libc.so.1]
>> _nsc_trydoorcall [libc.so.1]
>> _door_gethostbyname_r [gethostby_door.c]
>> _get_hostserv_inetnetdir_byname [netdir_inet.c]
>> gethostbyname_r [gethostbyname_r.c]
>>
>> Its seems to be allocated by gethostbyname - any ideas how to deallocate
>> it?
>>
>> Thanks,
>> Nishant
>>
>>
>>
>>
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Connection reset by peer?
Date: Sun, 19 Jan 2003 07:21:22 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042960882 21935 171.64.15.112 (19 Jan 2003 07:21:22 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3818

I would need to see the sequence of socket commands.  You can
email the code to me if it's not appropriate to post.

SteveJ


In article 
Nordstrom Kirk Phelps   wrote:
>In the process of trying to get a directory listing from the server, I
>set PASV, connect to the port and ip specified, wait for the transfer to
>complete (226) and then read from the socket.  This read command returns
>a -1, and sets the sys error string to "Connection reset by peer".  Does
>anyone know why this is happening?  Thanks.


.

Path: shelby.stanford.edu!not-for-mail
From: "Keith Simmons" 
Newsgroups: su.class.cs244a
Subject: PORT argument
Date: Sat, 18 Jan 2003 23:24:17 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: ksimmons.stanford.edu
X-Trace: news.Stanford.EDU 1042961057 21974 128.12.105.123 (19 Jan 2003 07:24:17 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3819

RFC 959 specifies the PORT argument as a comma delimited set of six numbers
h1,h2,h3,h4,p1,p2.   The arguments h1 through h4 are decimal representations
of each byte in the four byte ip address and p1/p2 are decimal
representation of the two bytes in the port number.  Do we put these bytes
in network order?  Thanks for the help.

Keith


.

Path: shelby.stanford.edu!not-for-mail
From: "Nishant Verman" 
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sat, 18 Jan 2003 23:25:31 -0800
Lines: 59
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: nishant.stanford.edu
X-Trace: news.Stanford.EDU 1042961132 22004 128.12.185.34 (19 Jan 2003 07:25:32 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3820

yup...but I have the FIU error in the purify.output .

maybe I should just setup my .purify to skip these errors - would that be
ok?

nishant


"Steve Jacobson"  wrote in message

>
> Are you specifying purify.output in your list of files?
>
> SteveJ
>
> In article 
> Nishant Verman  wrote:
> >Apparently the autograder fails me on the last test for this - I get a
> >message saying:
> >
> >Test O [out of 1]
> >Checks that you did indeed run purify!
> >Results:   NOT OK :(
> >purify.output did not match expected regexp.
> >
> >Am I failing this because of the previously mentioned error?
> >
> >
> >
> >"Nishant Verman"  wrote in message
> 
> >> I'm getting the following message in purify.output:
> >>
> >> FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
> >>    * File info: ?r--r--r--  1 root     root             0 May 11  2002
> >>    * This file descriptor was allocated from:
> >> __open64       [libc.so.1]
> >> _open64        [libc.so.1]
> >> _nsc_trydoorcall [libc.so.1]
> >> _door_gethostbyname_r [gethostby_door.c]
> >> _get_hostserv_inetnetdir_byname [netdir_inet.c]
> >> gethostbyname_r [gethostbyname_r.c]
> >>
> >> Its seems to be allocated by gethostbyname - any ideas how to
deallocate
> >> it?
> >>
> >> Thanks,
> >> Nishant
> >>
> >>
> >>
> >>
> >
> >
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sun, 19 Jan 2003 07:38:37 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042961917 22321 171.64.15.112 (19 Jan 2003 07:38:37 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3821

The Purify FAQ seems to indicate that this particular
FIU error message is normal.

SteveJ

In article 
Nishant Verman   wrote:
>I'm getting the following message in purify.output:
>
>FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
>   * File info: ?r--r--r--  1 root     root             0 May 11  2002
>   * This file descriptor was allocated from:
>	__open64       [libc.so.1]
>	_open64        [libc.so.1]
>	_nsc_trydoorcall [libc.so.1]
>	_door_gethostbyname_r [gethostby_door.c]
>	_get_hostserv_inetnetdir_byname [netdir_inet.c]
>	gethostbyname_r [gethostbyname_r.c]
>
>Its seems to be allocated by gethostbyname - any ideas how to deallocate
>it?
>
>Thanks,
>Nishant
>
>
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: PORT argument
Date: Sun, 19 Jan 2003 07:41:30 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042962090 22408 171.64.15.112 (19 Jan 2003 07:41:30 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3822

In article 
Keith Simmons  wrote:
>RFC 959 specifies the PORT argument as a comma delimited set of six numbers
>h1,h2,h3,h4,p1,p2.   The arguments h1 through h4 are decimal representations
>of each byte in the four byte ip address and p1/p2 are decimal
>representation of the two bytes in the port number.  Do we put these bytes
>in network order?  Thanks for the help.

These bytes should be in network order.

SteveJ

>
>Keith
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sun, 19 Jan 2003 07:47:04 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 72
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042962424 22473 171.64.15.112 (19 Jan 2003 07:47:04 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3823

Suppressing purify errors is not the right answer, in my opinion.
You could try it as a debugging step, however.  Is this the only
purify error you are seeing?

I'll check with the other TAs to see if this FIU error is still
an expected error.  Are other students seeing this as well?

SteveJ

In article 
Nishant Verman  wrote:
>yup...but I have the FIU error in the purify.output .
>
>maybe I should just setup my .purify to skip these errors - would that be
>ok?
>
>nishant
>
>
>"Steve Jacobson"  wrote in message

>>
>> Are you specifying purify.output in your list of files?
>>
>> SteveJ
>>
>> In article 
>> Nishant Verman  wrote:
>> >Apparently the autograder fails me on the last test for this - I get a
>> >message saying:
>> >
>> >Test O [out of 1]
>> >Checks that you did indeed run purify!
>> >Results:   NOT OK :(
>> >purify.output did not match expected regexp.
>> >
>> >Am I failing this because of the previously mentioned error?
>> >
>> >
>> >
>> >"Nishant Verman"  wrote in message
>> 
>> >> I'm getting the following message in purify.output:
>> >>
>> >> FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
>> >>    * File info: ?r--r--r--  1 root     root             0 May 11  2002
>> >>    * This file descriptor was allocated from:
>> >> __open64       [libc.so.1]
>> >> _open64        [libc.so.1]
>> >> _nsc_trydoorcall [libc.so.1]
>> >> _door_gethostbyname_r [gethostby_door.c]
>> >> _get_hostserv_inetnetdir_byname [netdir_inet.c]
>> >> gethostbyname_r [gethostbyname_r.c]
>> >>
>> >> Its seems to be allocated by gethostbyname - any ideas how to
>deallocate
>> >> it?
>> >>
>> >> Thanks,
>> >> Nishant
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Nishant Verman" 
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sun, 19 Jan 2003 00:13:22 -0800
Lines: 43
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: nishant.stanford.edu
X-Trace: news.Stanford.EDU 1042964004 23914 128.12.185.34 (19 Jan 2003 08:13:24 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3824

Umm...it randomly worked this time [test O].

Could it be because my .purify previously was a blank file?

NishantV



"Steve Jacobson"  wrote in message

> The Purify FAQ seems to indicate that this particular
> FIU error message is normal.
>
> SteveJ
>
> In article

> Nishant Verman   wrote:
> >I'm getting the following message in purify.output:
> >
> >FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
> >   * File info: ?r--r--r--  1 root     root             0 May 11  2002
> >   * This file descriptor was allocated from:
> > __open64       [libc.so.1]
> > _open64        [libc.so.1]
> > _nsc_trydoorcall [libc.so.1]
> > _door_gethostbyname_r [gethostby_door.c]
> > _get_hostserv_inetnetdir_byname [netdir_inet.c]
> > gethostbyname_r [gethostbyname_r.c]
> >
> >Its seems to be allocated by gethostbyname - any ideas how to deallocate
> >it?
> >
> >Thanks,
> >Nishant
> >
> >
> >
> >
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sun, 19 Jan 2003 09:28:19 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 52
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1042968499 26059 171.64.15.112 (19 Jan 2003 09:28:19 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3825

Anything that would lead to an atypical or blank output file
is suspect.

SteveJ

In article 
Nishant Verman  wrote:
>Umm...it randomly worked this time [test O].
>
>Could it be because my .purify previously was a blank file?
>
>NishantV
>
>
>
>"Steve Jacobson"  wrote in message

>> The Purify FAQ seems to indicate that this particular
>> FIU error message is normal.
>>
>> SteveJ
>>
>> In article

>> Nishant Verman   wrote:
>> >I'm getting the following message in purify.output:
>> >
>> >FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
>> >   * File info: ?r--r--r--  1 root     root             0 May 11  2002
>> >   * This file descriptor was allocated from:
>> > __open64       [libc.so.1]
>> > _open64        [libc.so.1]
>> > _nsc_trydoorcall [libc.so.1]
>> > _door_gethostbyname_r [gethostby_door.c]
>> > _get_hostserv_inetnetdir_byname [netdir_inet.c]
>> > gethostbyname_r [gethostbyname_r.c]
>> >
>> >Its seems to be allocated by gethostbyname - any ideas how to deallocate
>> >it?
>> >
>> >Thanks,
>> >Nishant
>> >
>> >
>> >
>> >
>>
>>
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Office hours Monday...
Date: Sun, 19 Jan 2003 15:36:17 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: colorado.stanford.edu
X-Trace: news.Stanford.EDU 1042990577 5532 171.64.74.34 (19 Jan 2003 15:36:17 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.4.18-17.7.x (i686))
Xref: shelby.stanford.edu su.class.cs244a:3826

Everyone,

I will hold office hours on Monday at their usual time and location.

Happy coding for assignment #1!

  Guido
.

Path: shelby.stanford.edu!epic1.Stanford.EDU!smadhura
From: Madhura Sudhakar Sharangpani 
Newsgroups: su.class.cs244a
Subject: test script time out
Date: Sun, 19 Jan 2003 10:43:53 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043001837 9202 171.64.15.34 (19 Jan 2003 18:43:57 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3827

When I run the tests in test script individually, they run properly &
pretty fast, but when I run script, it times out & gives results of 2
tests NOT OK due to time out, rest all tests come ok,
what must be the problem?

madhura

.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 5 Questions/comments about hw1 assignment
Date: Sun, 19 Jan 2003 19:20:46 +0000 (UTC)
Lines: 55
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
X-Trace: news.Stanford.EDU 1043004046 10170 171.64.15.83 (19 Jan 2003 19:20:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3828



>1) Sometimes when I try to run the testing script I get : Connection
>timed out
>----------------
>elaine4:~/class/cs244a/tests> /usr/class/cs244a/bin/test_code.pl hw1
>Makefile *.c *h purify.output .purify
>/usr/class/cs244a/bin/test_code.pl: Connection timed out.
>----------------
>Some other times it works OK, but I was wondering what is happening
>here.

I'd need to see the full output to figure out what's going on.

>2) I originally was using several connections to the ftp server in
>parallel in order to
>speed up the transfer of several files in parallel but it seems that
>this is not allowed because you test
>our programs in such a way that the ftp server only allows ONE
>connection at a time.
>This seems like a very artificial restriction. Why don't you run the
>tests with  "ftpd -f"
>instead?

I can't easily fix this without changing also the scripts themselves,
so I'm going to leave this as is for the moment.  (The -f option means the
scripts have to manually kill the parent ftpd process after they're done.
This is a fairly minimal change to the code, but not one I want to introduce
now while students are using it for testing).

>4) In FAQ Q22 and in the assignment handout it is said that we should
>not
>expect replies longer than 1024 bytes but the ftp server
>ftp.slac.stanford.edu  that you use as part of the testing has a welcome
>message much longer than 1024. Could you clarify? Shouln't you either
>revise the assignment
>and FAQ or change the server?.

I've revised the FAQ.  (The assignment looks fine to me).  To clarify:
you may assume that an individual line of NVT ASCII is 1024 characters or
less, but a total response may exceed this, as it does for ftp.slac.

>5) In FAQ Q16 it is said that we are not required to support non RFC
>compliant
>servers. It seems to me that test L.6 is using a non-compliant ftp
>server because
>the reply that this server gives doesn't have any valid reply code.

I assume you mean L.5, i.e. the test against a non-anonymous server.
When the scripts were written, ftping into elaines was allowed, but
this is apparently no longer the case.  I've changed this to try and
ftp from transfer.stanford.edu instead.

Matthew

.

Path: shelby.stanford.edu!not-for-mail
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: 5 Questions/comments about hw1 assignment
Date: Sun, 19 Jan 2003 12:06:45 -0800
Lines: 73
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: adsl-64-172-97-243.dsl.snfc21.pacbell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043006843 11174 64.172.97.243 (19 Jan 2003 20:07:23 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3829



Matthew Jonathan Holliman wrote:

> >1) Sometimes when I try to run the testing script I get : Connection
> >timed out
> >----------------
> >elaine4:~/class/cs244a/tests> /usr/class/cs244a/bin/test_code.pl hw1
> >Makefile *.c *h purify.output .purify
> >/usr/class/cs244a/bin/test_code.pl: Connection timed out.
> >----------------
> >Some other times it works OK, but I was wondering what is happening
> >here.
>
> I'd need to see the full output to figure out what's going on.
>

I don't understand what do you mean by the full output.
The only thing I get is what I posted above: Connection timed out.
Nothing else. This was not a line inside any of the tests.
Anyway, I think it had to be some transient connectivity error that happened
with that
particular elaine and the afs server. I haven't had that problem with
other elaines.


>
> >2) I originally was using several connections to the ftp server in
> >parallel in order to
> >speed up the transfer of several files in parallel but it seems that
> >this is not allowed because you test
> >our programs in such a way that the ftp server only allows ONE
> >connection at a time.
> >This seems like a very artificial restriction. Why don't you run the
> >tests with  "ftpd -f"
> >instead?
>
> I can't easily fix this without changing also the scripts themselves,
> so I'm going to leave this as is for the moment.  (The -f option means the
> scripts have to manually kill the parent ftpd process after they're done.
> This is a fairly minimal change to the code, but not one I want to introduce
> now while students are using it for testing).
>

I understand and agree, but I'd like to suggest that you add a comment to the
assignment for future classes. I spent a great deal of time writing a
multithreaded
ftpcopy program that I had to scrap and convert to unithreaded. I thought that
program speed was going to be an important consideration.
I understand that part of the problem is that I developed the assignment without

using the systems at Stanford but you should take into account that for us
SITN students is not always easy or convenient to do all our development
in those systems.
I just want to make sure other students in the future do not waste their time
as I did. This, and the other issues/comments that I posted in my original post
made my assigment go well past the 15 hour mark.


>
>
> I assume you mean L.5, i.e. the test against a non-anonymous server.
> When the scripts were written, ftping into elaines was allowed, but
> this is apparently no longer the case.  I've changed this to try and
> ftp from transfer.stanford.edu instead.
>

Thanks although I already changed my code to report an error if it finds
that the reply is not a compliant reply.

Rafa


.

Path: shelby.stanford.edu!saga11.Stanford.EDU!jlreyes
From: Jorge 
Newsgroups: su.class.cs244a
Subject: FTP server reply 120
Date: Sun, 19 Jan 2003 12:19:50 -0800
Lines: 31
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043007593 11461 171.64.15.141 (19 Jan 2003 20:19:53 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3830


I have a quick question.  What should ftpcopy do if the FTP server replies
with a code of 120 "Service ready in nnn minutes."  Should we just wait
and wait until the server returns 220 or should we treat 120 as an error
message?

thanks,
Jorge


********************************************************************************

It is a fact that people are always well aware of what
is due them.  Unfortunately, they remain oblivious of
what they owe to others. - St. Francis de Sales

********************************************************************************


                                             Jorge L. Reyes
                                             Potter 207

                                             P. O. Box 17091
                                             Stanford, CA 94309

                                             650.497.6375

                                             
                                             http://www.stanford.edu/~jlreyes


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: file extensions
Date: Sun, 19 Jan 2003 20:22:47 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 41
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1043007767 11555 171.64.15.112 (19 Jan 2003 20:22:47 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3831

The TAs have decided that this file extension behavior
is correct.

SteveJ

In article 
Steve Jacobson  wrote:
>I agree, but will confer with the other TAs for the definitive
>answer.
>
>SteveJ
>
>In article 
>Rafael M Hernandez   wrote:
>>Hi,
>>according to Q20 in the FAQ handout "gz" matches "*.gz"
>>so I'd think that ".gz" should match extension "*..gz" (note: two dots)
>>and not "*.gz", in the same way "gz" does not match "*gz".
>>Not to be nit-picking here but I would hate to
>>fail some test because of this.
>>
>>Could you clarify?
>>Thanks
>>Rafa
>>
>>
>>Russell Greene wrote:
>>
>>> "David Seetapun"  wrote in message
>>> 
>>> >
>>> > should ".gz" be considered to have extension .gz?
>>>
>>> Yes
>>>
>>> --Russ
>>
>
>


.

Path: shelby.stanford.edu!elaine32.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test script time out
Date: Sun, 19 Jan 2003 20:58:06 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine32.stanford.edu
X-Trace: news.Stanford.EDU 1043009886 12318 171.64.15.107 (19 Jan 2003 20:58:06 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3832


>When I run the tests in test script individually, they run properly &
>pretty fast, but when I run script, it times out & gives results of 2
>tests NOT OK due to time out, rest all tests come ok,
>what must be the problem?

The script gives you three minutes for the normal tests (and probably
an unlimited amount of time on the Purify test cases), which should be
more than long enough.  Be sure that when you test manually that you're
testing the same arguments (path types, servers, etc.) as the script,
as often people find the script catching errors they'd overlooked during
manual testing.
.

Path: shelby.stanford.edu!elaine32.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: FIU error
Date: Sun, 19 Jan 2003 21:00:40 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine32.stanford.edu
X-Trace: news.Stanford.EDU 1043010040 12505 171.64.15.107 (19 Jan 2003 21:00:40 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3833


>Apparently the autograder fails me on the last test for this - I get a
>message saying:

>Test O [out of 1]
>Checks that you did indeed run purify!
>Results:   NOT OK :(
>purify.output did not match expected regexp.

>Am I failing this because of the previously mentioned error?

No--the script checks for this particular FIU as a special case, and ignores
it.  The particular error message you saw indicated that your purify.output
didn't follow the syntax expected by the script.  I'm not sure why this
would be so, but if you encounter this error again, please keep a copy of
your purify.output around and let me know.

.

Path: shelby.stanford.edu!not-for-mail
From: Kirk Phelps 
Newsgroups: su.class.cs244a
Subject: Re: Connection reset by peer?
Date: Sun, 19 Jan 2003 15:48:18 -0800
Lines: 24
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine26.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043020098 16650 171.64.15.101 (19 Jan 2003 23:48:18 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3835

I figured this problem out...just thought I'd post the answer in case
other people are having similar issues. 

In the process of decomping my code, I accidentally duplicated the code
where I call "connect" on the data socket.  Therefore, I was
"connecting" twice on the same socket.  Removing the extra call fixed
the problem.

-Kirk

Steve Jacobson wrote:
> 
> I would need to see the sequence of socket commands.  You can
> email the code to me if it's not appropriate to post.
> 
> SteveJ
> 
> In article 
> Nordstrom Kirk Phelps   wrote:
> >In the process of trying to get a directory listing from the server, I
> >set PASV, connect to the port and ip specified, wait for the transfer to
> >complete (226) and then read from the socket.  This read command returns
> >a -1, and sets the sys error string to "Connection reset by peer".  Does
> >anyone know why this is happening?  Thanks.
.

Path: shelby.stanford.edu!epic15.Stanford.EDU!smadhura
From: Madhura Sudhakar Sharangpani 
Newsgroups: su.class.cs244a
Subject: Test script time out again
Date: Sun, 19 Jan 2003 16:35:28 -0800
Lines: 26
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043022930 19108 171.64.15.48 (20 Jan 2003 00:35:30 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3836

Hi
I still cannot solve timeout problem
My program works fine till test L.1
But it times out for tests L.1 to L.4 when it is being tested with the
ftpd daemon, using 
for following test:
---------------------------------------------------------------
Test L.1, using current source tree and build
make
Working dir:
/afs/ir.stanford.edu/users/s/m/smadhura/cs244a/testcode/grading_src/build
Starting local ftpd: cd
/usr/class/cs244a/grading_script/hw1_special_cases;
/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd 2>
/afs/ir.stanford.edu/users/s/m/smadhura/cs244a/testcode/grading_src/build/.ftpd_port&
ftpd running on port 51177
Testing special case:  ../ftpcopy ext 1 
--------------------------------------------------------------
I tried running the same test manually, & it works just fine without any
problem, but when given to test script, it times out, & I am not
understanding why,
after test L.4,onwards for remaining tests ,ie L.7, L.5 & so on it again
works fine,
Please help
Madhura.

.

Path: shelby.stanford.edu!cardinal5.Stanford.EDU!priyank9
From: Priyank Kshitij Patel 
Newsgroups: su.class.cs244a
Subject: extensions & zero byte files
Date: Sun, 19 Jan 2003 16:49:20 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: cardinal5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043023761 19426 171.64.15.253 (20 Jan 2003 00:49:21 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3837

just 2 quick questions :

1. is the extension "gz" supposed to match "abgz"
   or only the "*.gz" files....

2. how does the client handle zero byte files which match the
extension and have necessary permissions for download.

Is the client supposed to create them in the destination directory or not?
Apparently during one of the TA sessions the message that was conveyed was
that we are not suppposed to create such files.  However the last year's
newsgroup suggests otherwise.

Please clarify!!
Priyank

.

Path: shelby.stanford.edu!elaine32.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: Test L.1
Date: Sun, 19 Jan 2003 16:59:19 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine32.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043024360 19682 171.64.15.107 (20 Jan 2003 00:59:20 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3838

For the zero byte file test, should the ftpcopy create the zero byte file
or not?

I pass the test irrespective of what I do!

Nishant



.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!pavan
From: Pavan Singitham 
Newsgroups: su.class.cs244a
Subject: Handling permission denied for transferring files
Date: Sun, 19 Jan 2003 17:41:32 -0800
Lines: 38
Distribution: su
Message-ID: 
References:  
 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043026895 20811 171.64.15.74 (20 Jan 2003 01:41:35 GMT)
X-Complaints-To: 
To: Kirk Phelps 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3839

Hi ,
	I got this problem.. if I find a few files for which we have no
permissions to transfer, my ftp skips them. But when I try to retrieve
the next file for which I have permissions, my program hangs.
	I am using a PASV and connecting before each RETR.
	I observed that the server port number always remains the same
over all the permission denied files and the last file I can access.(
where it is blocking).ie. the server is not closing it's end ! and I am
connecting to the same socket each time.
	What can we do about this? Kirk, I think you had a similar
problem!?
thanx,
Pavan.

On Sun, 19 Jan 2003, Kirk Phelps wrote:

> I figured this problem out...just thought I'd post the answer in case
> other people are having similar issues.
>
> In the process of decomping my code, I accidentally duplicated the code
> where I call "connect" on the data socket.  Therefore, I was
> "connecting" twice on the same socket.  Removing the extra call fixed
> the problem.
>
> -Kirk
>
> > Nordstrom Kirk Phelps   wrote:
> > >In the process of trying to get a directory listing from the server, I
> > >set PASV, connect to the port and ip specified, wait for the transfer to
> > >complete (226) and then read from the socket.  This read command returns
> > >a -1, and sets the sys error string to "Connection reset by peer".  Does
> > >anyone know why this is happening?  Thanks.
>

---
www.stanford.edu/~pavan
Help stamp out and abolish redundancy and repetition.

.

Path: shelby.stanford.edu!saga17.Stanford.EDU!myc
From: Mingying Chen 
Newsgroups: su.class.cs244a
Subject: reply code and freeing memory
Date: Mon, 20 Jan 2003 02:23:26 -0800
Lines: 47
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043058211 4933 171.64.15.147 (20 Jan 2003 10:23:31 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3840

Hi,

I have the following question concerning hw1.

1. RFC specified that CWD command can return 550 for "Requested action not
taken", without mentioning 553. But in my testing, I saw 553 returned as
reply to CWD command for Permission Denied, while 550 returned for
non-existing directory. I am wondering if the replying code in RFC
strictly followed or some servers can have their own flexibility to define
some reply code? More specifically, can I assume the following always hold
for the testing servers in this assignment?

- CWD:  550 <==> directory not exist
- CWD:  553 <==> permission denied
- RETR: 550 <==> permission denied

2. If user defined srcDir on server is there, but permission denied,
should the program exit as FAILURE or SUCCESS(permission problem
tolerated)?

3. It is said that we can treat 4xx and 5xx reply code as hard error.
Since we should handle 550 seperately, should we also handle 450, which
means the file for RETRing is currently busy and retry later? If we should
retry, I assume we can simply repeat step 7, which is sending RETR to
server, in the 8-step protocol in handout. This scenario is hard to test.
Please clarify if we need this case handled at least in our source code.

4. In previous posting it is said that we should try to free up any memory
even when errors occur and program exits as FAILURE. I am wondering how it
is determined that all memory are freed. Is that satisfying if purify
gives "Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)"?
I've tried intentionally to leak some memory with program exit(1) but
purify didn't pick it up. I suspect that purify just doesn't care about
memory leak if program exits abnormally, since the software crashes and
the address space associated with it will immediately be reclaimed by the
OS anyway. Would you please clarify if that is always the expected
behavior from purify? Frankly, I don't see why freeing up memory on error
exit is necessary because of the reason stated above. If I do have
to take care of it, I have to hack on my code everywhere to add tests to
see if some memory needs to be freed. It can make code look messy and run
time ineffecient. So I want to make sure that I have to do it before
start.

Thanks.
Mingying


.

Path: shelby.stanford.edu!epic18.Stanford.EDU!sansari
From: Saad Salman Ansari 
Newsgroups: su.class.cs244a
Subject: Re: Problem with ftp.slac.stanford.edu
Date: Mon, 20 Jan 2003 03:00:39 -0800
Lines: 39
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic18.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043060441 5827 171.64.15.53 (20 Jan 2003 11:00:41 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3841

ok so we poll the server for the 226 transfer complete response, AFTER we
have read the list from the data connection. After reading the list
however, I try to CWD to a particular directory on slac and it gives the
following response:

150 Opening ASCII mode data connection for file list

and then blocks. Any ideas on why it does not follow-up with a 250 CWD
successful response? I'm not using PASV mode, so I'm not using shutdown.
If anyone has faced the same problem, could you help me out?

thanks!

Saad

On Sat, 18 Jan 2003, Michael Ching wrote:

> Related to the problems posted by David Seetapun, I too ran into problems
> with ftp.slac.stanford.edu.  Whenever I issue the list command, the system
> seem to hang while waiting for the 226 transfer complete response.  This
> doesn't happen with any other ftp servers.  With David's help and some
> poking around, I discover the following solution.
>
> For whatever reason, the slac server will only issue the 226 response
> after the data connection has been closed.  Since I issue the close()
> command at the end of my procedure, after pulling the connection socket
> for a response, it just hangs.  You must close the data connection right
> after receiving the list and before pulling the connection socket for the
> 226 response.  For those of you using PASV, that means you need to issue
> the shutdown command to the data connection, before pulling the connection
> socket for the 226 response.  This way the slac server can shutdown the
> data connection right after transmitting the list.
>
> I hope this will save some of you a couple of hours of hair pulling. :)
>
> Mike
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Srinivas Panguluri" 
Newsgroups: su.class.cs244a
Subject: ftpparse difficulties with ftp.stanford.edu and ftpd
Date: Mon, 20 Jan 2003 08:15:33 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: donkey.stanford.edu
X-Trace: news.Stanford.EDU 1043079336 13611 128.12.106.31 (20 Jan 2003 16:15:36 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3842

It seems that the LIST data returned by ftp.stanford.edu and ftpd aren't
terminated by a "/r/n" after each line.  If that's the case, then ftpparse
will not work correctly (because the strstr calls, splitting on kTelnetEOF =
/r/n, will be NULL), and all the files will be skipped over.

Most ftp sites (ftp.microsoft.com, ftp.cs.stanford.edu, and others) seem to
do the /r/n line termination.  I only get the problem with ftpd and
ftp.stanford.edu.  My program works correctly if I set the ftpparse
kTelnetEOF #define to "\n" only.  Is this ok?  I can see cases (maybe some
stray /n's) where this fix would incorrectly parse as well, but it seems to
work for all given ftp sites.

I'm pretty sure I'm getting the LIST data connection reply correctly and I'm
storing it correctly as well; and as I said, it works for most ftp sites...

Any ideas?

Srinivas


.

Path: shelby.stanford.edu!not-for-mail
From: "Srinivas Panguluri" 
Newsgroups: su.class.cs244a
Subject: bind() issues
Date: Mon, 20 Jan 2003 09:33:06 -0800
Lines: 22
Distribution: su
Message-ID: 
NNTP-Posting-Host: donkey.stanford.edu
X-Trace: news.Stanford.EDU 1043083988 15266 128.12.106.31 (20 Jan 2003 17:33:08 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3843

The first time I use bind(), sent in with addr structure filled in with
host's IP, and port of 0, bind() works fine and gives me an ephemeral port.

The second time I use bind(), sent in with addr structure filled exatly the
same (port set to 0, IP correct), bind() keeps giving me back 0 as the
ephemeral port.  i.e. it's not giving me a free port, it's basically doing
nothing at all.

Also, I tried to force bind to give me the same port twice, to try to work
around it not giving me an ephemeral port.  That doesn't work, and bind just
fails (returns -1).

I worked around it as follows: I pick a random number for the port (40000 -
40099), and then bind is forced to give me that port.  H owever, once in a
while, these ports are busy, and my program exits.  Perhaps, are we forced
to do it the way ftp does, to cycle around from 40000 - 40099 until we find
a good port?

Any ideas on why bind can't be used twice like this?  I think I close my
connections...


.

Path: shelby.stanford.edu!not-for-mail
From: "Srinivas Panguluri" 
Newsgroups: su.class.cs244a
Subject: Re: ftpparse difficulties with ftp.stanford.edu and ftpd
Date: Mon, 20 Jan 2003 10:20:35 -0800
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: donkey.stanford.edu
X-Trace: news.Stanford.EDU 1043086838 16505 128.12.106.31 (20 Jan 2003 18:20:38 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3844

It seems that LIST must be sent over as ASCII format.  That fixed this
particilar issue, and both "troubling" ftp servers seem to give /r/n now.

I guess I had to be more careful with my choice of TYPE, switching between
ascii and image.


"Srinivas Panguluri"  wrote in message

> It seems that the LIST data returned by ftp.stanford.edu and ftpd aren't
> terminated by a "/r/n" after each line.  If that's the case, then ftpparse
> will not work correctly (because the strstr calls, splitting on kTelnetEOF
=
> /r/n, will be NULL), and all the files will be skipped over.
>
> Most ftp sites (ftp.microsoft.com, ftp.cs.stanford.edu, and others) seem
to
> do the /r/n line termination.  I only get the problem with ftpd and
> ftp.stanford.edu.  My program works correctly if I set the ftpparse
> kTelnetEOF #define to "\n" only.  Is this ok?  I can see cases (maybe some
> stray /n's) where this fix would incorrectly parse as well, but it seems
to
> work for all given ftp sites.
>
> I'm pretty sure I'm getting the LIST data connection reply correctly and
I'm
> storing it correctly as well; and as I said, it works for most ftp
sites...
>
> Any ideas?
>
> Srinivas
>
>


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Test script time out again
Date: Mon, 20 Jan 2003 18:29:25 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043087365 16615 171.64.15.117 (20 Jan 2003 18:29:25 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3845


>I still cannot solve timeout problem
>My program works fine till test L.1
>But it times out for tests L.1 to L.4 when it is being tested with the
>ftpd daemon, using 
>for following test:

If you haven't already done so, you might try testing against ftpd
running with the same (or similar) directory structure on the server as
used in the test script cases.  Incorrect handling of these special cases
has resulted in the program behaviour you describe for other students also.
Other than that, there's not much I can suggest except for more testing.

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: extensions & zero byte files
Date: Mon, 20 Jan 2003 18:36:16 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043087776 16825 171.64.15.117 (20 Jan 2003 18:36:16 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3846


>1. is the extension "gz" supposed to match "abgz"
>   or only the "*.gz" files....

Please see FAQ #20.

>2. how does the client handle zero byte files which match the
>extension and have necessary permissions for download.

Exactly the same way as any other file for which you have a matching extension
and download permissions.
.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Test L.1
Date: Mon, 20 Jan 2003 18:39:18 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043087958 16873 171.64.15.117 (20 Jan 2003 18:39:18 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3847


>For the zero byte file test, should the ftpcopy create the zero byte file
>or not?

You should create the file exactly as you would any other.

>I pass the test irrespective of what I do!

Did you create the file in an initial run, and then not create it in a
later run?  If so, unless you explicitly removed the grading_src directory,
the older file would still be lying around, in which case you'd continue to
pass the test (erroneously).

If you remove the grading_src directory (to start completely anew) and
run the test without creating the file, you should see an error--or at
least I do.

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: reply code and freeing memory
Date: Mon, 20 Jan 2003 18:53:49 +0000 (UTC)
Lines: 61
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043088829 17416 171.64.15.117 (20 Jan 2003 18:53:49 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3848


>1. RFC specified that CWD command can return 550 for "Requested action not
>taken", without mentioning 553. But in my testing, I saw 553 returned as
>reply to CWD command for Permission Denied, while 550 returned for
>non-existing directory. I am wondering if the replying code in RFC
>strictly followed or some servers can have their own flexibility to define
>some reply code? More specifically, can I assume the following always hold
>for the testing servers in this assignment?

>- CWD:  550 <==> directory not exist
>- CWD:  553 <==> permission denied
>- RETR: 550 <==> permission denied

With the possible exception of the initial CWD into the directory specified
by the user, you won't ordinarily be CWDing into a non-existent directory
during your descent (since you've obtained the name from a directory listing,
so it must exist--you can assume the target directory won't be deleted during
your program's execution).  So you won't generally encounter this error.
I'd advise against interpreting the reply codes too stringently--they're
intended to help software identify the problem, but it's not clear how
closely different ftpd implementations would agree on fine details.

>2. If user defined srcDir on server is there, but permission denied,
>should the program exit as FAILURE or SUCCESS(permission problem
>tolerated)?

You should treat this the same as a non-existent remote directory.

>3. It is said that we can treat 4xx and 5xx reply code as hard error.
>Since we should handle 550 seperately, should we also handle 450, which
>means the file for RETRing is currently busy and retry later? If we should
>retry, I assume we can simply repeat step 7, which is sending RETR to
>server, in the 8-step protocol in handout. This scenario is hard to test.
>Please clarify if we need this case handled at least in our source code.

Nope, you can treat any error of type 4xx as a fatal error.

>4. In previous posting it is said that we should try to free up any memory
>even when errors occur and program exits as FAILURE. I am wondering how it
>is determined that all memory are freed. Is that satisfying if purify
>gives "Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)"?
>I've tried intentionally to leak some memory with program exit(1) but
>purify didn't pick it up. I suspect that purify just doesn't care about
>memory leak if program exits abnormally, since the software crashes and
>the address space associated with it will immediately be reclaimed by the
>OS anyway. Would you please clarify if that is always the expected
>behavior from purify? Frankly, I don't see why freeing up memory on error
>exit is necessary because of the reason stated above. If I do have
>to take care of it, I have to hack on my code everywhere to add tests to
>see if some memory needs to be freed. It can make code look messy and run
>time ineffecient. So I want to make sure that I have to do it before
>start.

I'm not sure why Purify doesn't always pick this up.  However, as we
said previously, you should get in the habit of freeing memory.  If you
were implementing ftpcopy's functionality in a larger application, you
wouldn't have the luxury of just ignoring memory leaks and relying on the
O/S to clean up after you.  It shouldn't be much extra work to clean up
after an error--and if it is (or leads to inelegant code), you might want
to rethink your approach.

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: bind() issues
Date: Mon, 20 Jan 2003 18:58:41 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043089121 17515 171.64.15.117 (20 Jan 2003 18:58:41 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3849


>The second time I use bind(), sent in with addr structure filled exatly the
>same (port set to 0, IP correct), bind() keeps giving me back 0 as the
>ephemeral port.  i.e. it's not giving me a free port, it's basically doing
>nothing at all.

>I worked around it as follows: I pick a random number for the port (40000 -
>40099), and then bind is forced to give me that port.  H owever, once in a
>while, these ports are busy, and my program exits.  Perhaps, are we forced
>to do it the way ftp does, to cycle around from 40000 - 40099 until we find
>a good port?

I don't know what's wrong without looking at your code, but this is definitely
not the right way to handle this.  What does errno/perror indicate from the
second bind() call?  (Be sure to set errno = 0 before the call to clear
any previous system call failure's record).

.

Path: shelby.stanford.edu!not-for-mail
From: "sc" 
Newsgroups: su.class.cs244a
Subject: using pasv and test script
Date: Mon, 20 Jan 2003 11:22:42 -0800
Lines: 24
Distribution: su
Message-ID: 
NNTP-Posting-Host: avengingspirit.stanford.edu
X-Trace: news.Stanford.EDU 1043090564 18584 128.12.22.55 (20 Jan 2003 19:22:44 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3850

When using the test script, I fail the absolute and relative path test
because
it says there are differences between the outputs. It tells me the
differences are:
54,55c54,55
< 227 Entering Passive Mode (134,79,18,30,143,190).
< OK: connecting to 134.79.18.30:36798
---
> 227 Entering Passive Mode (134,79,18,30,165,49).
> OK: connecting to 134.79.18.30:42289

In a previous post it was mentioned that it was OK to use the passive mode
(PASV).
However, when using PASV, the server returns the IP and Port number to use.
Is the Port supposed to be
the same for different runs? It seems to make sense that there should be a
difference unless the script is
fixing the port number... or if I'm using PASV should I not be printing out
the port? I think I'd pass the test
since these are the only differences it finds...

                  -- Sanders


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: using pasv and test script
Date: Mon, 20 Jan 2003 19:32:16 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043091136 18940 171.64.15.117 (20 Jan 2003 19:32:16 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3851


>When using the test script, I fail the absolute and relative path test
>because
>it says there are differences between the outputs. It tells me the
>differences are:
>54,55c54,55
>< 227 Entering Passive Mode (134,79,18,30,143,190).
>< OK: connecting to 134.79.18.30:36798
>---
>> 227 Entering Passive Mode (134,79,18,30,165,49).
>> OK: connecting to 134.79.18.30:42289

Are you printing this information to stdout?

.

Path: shelby.stanford.edu!not-for-mail
From: "Srinivas Panguluri" 
Newsgroups: su.class.cs244a
Subject: Re: bind() issues
Date: Mon, 20 Jan 2003 12:24:28 -0800
Lines: 45
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: donkey.stanford.edu
X-Trace: news.Stanford.EDU 1043094269 20861 128.12.106.31 (20 Jan 2003 20:24:29 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3852

errno depends on if I close the socket before hand.

if I do close(dataSock), I get errno = 9, Bad File Number (EBADF)  ? Maybe I
have to create a new socket?

if I don't close(dataSock), I get errno = 22, Invalid Argument. (EINVAL) ?
Maybe you can't re-bind a socket?

if I close the socket, and create a new one with the socket() command, bind
works, but it doesn't give me an ephemeral port (it just returns 0 as the
ephemeral port), which sucks.

It's weird, guess I'm going to office hours.

Srinivas

"Matthew Jonathan Holliman"  wrote in message

>
> >The second time I use bind(), sent in with addr structure filled exatly
the
> >same (port set to 0, IP correct), bind() keeps giving me back 0 as the
> >ephemeral port.  i.e. it's not giving me a free port, it's basically
doing
> >nothing at all.
>
> >I worked around it as follows: I pick a random number for the port
(40000 -
> >40099), and then bind is forced to give me that port.  H owever, once in
a
> >while, these ports are busy, and my program exits.  Perhaps, are we
forced
> >to do it the way ftp does, to cycle around from 40000 - 40099 until we
find
> >a good port?
>
> I don't know what's wrong without looking at your code, but this is
definitely
> not the right way to handle this.  What does errno/perror indicate from
the
> second bind() call?  (Be sure to set errno = 0 before the call to clear
> any previous system call failure's record).
>


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: bind() issues
Date: Mon, 20 Jan 2003 20:32:44 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043094764 21086 171.64.15.117 (20 Jan 2003 20:32:44 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3853


>if I do close(dataSock), I get errno = 9, Bad File Number (EBADF)  ? Maybe I
>have to create a new socket?

Yep--once you close() it, it's finished with.  You create a brand-new socket
exactly as before, with socket() etc.

>if I don't close(dataSock), I get errno = 22, Invalid Argument. (EINVAL) ?
>Maybe you can't re-bind a socket?

Correct (as far as I know).  You can close the socket, and repeat the
whole procedure next time (socket, bind, etc.)

>if I close the socket, and create a new one with the socket() command, bind
>works, but it doesn't give me an ephemeral port (it just returns 0 as the
>ephemeral port), which sucks.

bind() itself won't tell you the port--it leaves the structure fields
unchanged.  If bind() doesn't return an error, getsockname() should
give you the local port number.

.

Path: shelby.stanford.edu!not-for-mail
From: "Howard Tsai" 
Newsgroups: su.class.cs244a
Subject: Re: Problem with ftp.slac.stanford.edu
Date: Mon, 20 Jan 2003 15:00:59 -0800
Lines: 59
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: ev-02-lr90f.stanford.edu
X-Trace: news.Stanford.EDU 1043103659 25832 128.12.158.11 (20 Jan 2003 23:00:59 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3854

I think had that problem too, and I'm not using PASV.  As the previous post
says, SLAC seems to hang if the data connection isn't closed.  I made sure I
closed the data connection sockets(both the listening and the connecteded
one) before polling for the 226 transfer complete response, and then
afterwards I issue the CWD command.

I'm not sure how people doing it, but I create a new listening socket for
each data transfer because I couldn't get a way to resuse one. But the trick
for me was to close the socket before polling on the control socket.

Howard

"Saad Salman Ansari"  wrote in message

> ok so we poll the server for the 226 transfer complete response, AFTER we
> have read the list from the data connection. After reading the list
> however, I try to CWD to a particular directory on slac and it gives the
> following response:
>
> 150 Opening ASCII mode data connection for file list
>
> and then blocks. Any ideas on why it does not follow-up with a 250 CWD
> successful response? I'm not using PASV mode, so I'm not using shutdown.
> If anyone has faced the same problem, could you help me out?
>
> thanks!
>
> Saad
>
> On Sat, 18 Jan 2003, Michael Ching wrote:
>
> > Related to the problems posted by David Seetapun, I too ran into
problems
> > with ftp.slac.stanford.edu.  Whenever I issue the list command, the
system
> > seem to hang while waiting for the 226 transfer complete response.  This
> > doesn't happen with any other ftp servers.  With David's help and some
> > poking around, I discover the following solution.
> >
> > For whatever reason, the slac server will only issue the 226 response
> > after the data connection has been closed.  Since I issue the close()
> > command at the end of my procedure, after pulling the connection socket
> > for a response, it just hangs.  You must close the data connection right
> > after receiving the list and before pulling the connection socket for
the
> > 226 response.  For those of you using PASV, that means you need to issue
> > the shutdown command to the data connection, before pulling the
connection
> > socket for the 226 response.  This way the slac server can shutdown the
> > data connection right after transmitting the list.
> >
> > I hope this will save some of you a couple of hours of hair pulling. :)
> >
> > Mike
> >
> >
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: non-existing local directory
Date: Mon, 20 Jan 2003 15:27:45 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043105352 26593 128.12.196.91 (20 Jan 2003 23:29:12 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3855

If the 4th argument passed by the user (directory at the local site to
transfer into) doesn't exist, do we have to create the directory or simply
treat this as a failure ?

Please clarify on this.

Thanks,
Honggo



.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: reply code and freeing memory
Date: Mon, 20 Jan 2003 15:34:34 -0800
Lines: 40
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043105675 26794 128.12.85.0 (20 Jan 2003 23:34:35 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3856

This still raises some questions, though.

For example, if we run across a directory in a list for which we don't have
permissions, when we CWD it, should we expect to get 550 or 553? Seeing as
the assignment stipulates that we should quietly ignore all permissions
errors, we have to special case it. Which one should we special case (550 or
553), or should we special case both?

"Matthew Jonathan Holliman"  wrote in message

>
> >1. RFC specified that CWD command can return 550 for "Requested action
not
> >taken", without mentioning 553. But in my testing, I saw 553 returned as
> >reply to CWD command for Permission Denied, while 550 returned for
> >non-existing directory. I am wondering if the replying code in RFC
> >strictly followed or some servers can have their own flexibility to
define
> >some reply code? More specifically, can I assume the following always
hold
> >for the testing servers in this assignment?
>
> >- CWD:  550 <==> directory not exist
> >- CWD:  553 <==> permission denied
> >- RETR: 550 <==> permission denied
>
> With the possible exception of the initial CWD into the directory
specified
> by the user, you won't ordinarily be CWDing into a non-existent directory
> during your descent (since you've obtained the name from a directory
listing,
> so it must exist--you can assume the target directory won't be deleted
during
> your program's execution).  So you won't generally encounter this error.
> I'd advise against interpreting the reply codes too stringently--they're
> intended to help software identify the problem, but it's not clear how
> closely different ftpd implementations would agree on fine details.
>


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: non-existing local directory
Date: Mon, 20 Jan 2003 23:50:37 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043106637 27305 171.64.15.117 (20 Jan 2003 23:50:37 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3857


>If the 4th argument passed by the user (directory at the local site to
>transfer into) doesn't exist, do we have to create the directory or simply
>treat this as a failure ?

This is answered in the assignment requirements.

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: reply code and freeing memory
Date: Tue, 21 Jan 2003 00:04:41 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043107481 27837 171.64.15.117 (21 Jan 2003 00:04:41 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3858

>For example, if we run across a directory in a list for which we don't have
>permissions, when we CWD it, should we expect to get 550 or 553? Seeing as
>the assignment stipulates that we should quietly ignore all permissions
>errors, we have to special case it. Which one should we special case (550 or
>553), or should we special case both?

You'd expect to receive 550 (this is certainly what the reference
solution against which submissions are tested assumes, and what the RFC
states as the expected behaviour), but if 553 is also being used by some
servers you may treat both as having comparable meaning.  Having said this,
I haven't seen 553 being used in this way though, only 550.

In general, the only file system problem we're explicitly testing will be
inaccessible directories; any other 55x that didn't correspond to such a
case would be unexpected (i.e., not the focus of a test case).
.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: reply code and freeing memory
Date: Tue, 21 Jan 2003 00:08:52 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043107732 28005 171.64.15.117 (21 Jan 2003 00:08:52 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3859


To add to/amend my last comments (and hopefully clarify things)--

(1) If you find a server that swaps the meaning of 550 and 553 (as the first
post in this thread suggested), please let me know the server so I can verify
the behaviour.

(2) For the grading, we will test against servers that behave per the RFC
result code specifications, i.e. 550 for permission denied.

.

Path: shelby.stanford.edu!not-for-mail
From: Kevin Christopher 
Newsgroups: su.class.cs244a
Subject: OK: XXX message
Date: Mon, 20 Jan 2003 16:15:22 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: radicalbox.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043108111 28368 128.12.72.54 (21 Jan 2003 00:15:11 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3860

The specs say the output on successful completion should be "OK: xxxxxx 
bytes copied" where xxxxx is the total of all bytes copied...

Does the total mean bytes in files transfered, or all bytes transfered? 
  (i.e. can we ignore LIST responses & control messages as part of the 
total?)

-Kevin

.

Path: shelby.stanford.edu!not-for-mail
From: Kevin Christopher 
Newsgroups: su.class.cs244a
Subject: testing very large strings?
Date: Mon, 20 Jan 2003 16:29:48 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: radicalbox.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043108977 28899 128.12.72.54 (21 Jan 2003 00:29:37 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3861

Do we need to put in logic to handle extremely large inputs (i.e. a path 
of 1000 characters, etc.)?  I've written code that copies into buffers 
where I've used #define to get a large-enough maximum size, but 
conceivably these could overflow and create messy errors.  (Obviously 
this doesn't apply to file transfers; I'm referring to file paths, 
extensions, etc.)

Will the tests be deliberately trying to break code by overflowing 
static buffers?  Or am I safe with sufficiently large buffer sizes (i.e. 
256 byte max for the extension)?

-Kevin

.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Handling permission denied for transferring files
Date: Tue, 21 Jan 2003 01:35:25 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 23
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1043112925 1025 171.64.15.101 (21 Jan 2003 01:35:25 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3862

Are you getting the port number from getsockname() ?

If you are still having trouble with this code, I suggest you bring
it to TA office hours.

SteveJ

In article 
Pavan Singitham   wrote:
>Hi ,
>	I got this problem.. if I find a few files for which we have no
>permissions to transfer, my ftp skips them. But when I try to retrieve
>the next file for which I have permissions, my program hangs.
>	I am using a PASV and connecting before each RETR.
>	I observed that the server port number always remains the same
>over all the permission denied files and the last file I can access.(
>where it is blocking).ie. the server is not closing it's end ! and I am
>connecting to the same socket each time.
>	What can we do about this? Kirk, I think you had a similar
>problem!?
>thanx,
>Pavan.
>
.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem with ftp.slac.stanford.edu
Date: Tue, 21 Jan 2003 01:38:08 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 49
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1043113088 1066 171.64.15.101 (21 Jan 2003 01:38:08 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3863

Information has been posted today that may help you.  If you are
still having trouble, TA office hours would be a good way to get
help.

SteveJ

In article 
Saad Salman Ansari   wrote:
>ok so we poll the server for the 226 transfer complete response, AFTER we
>have read the list from the data connection. After reading the list
>however, I try to CWD to a particular directory on slac and it gives the
>following response:
>
>150 Opening ASCII mode data connection for file list
>
>and then blocks. Any ideas on why it does not follow-up with a 250 CWD
>successful response? I'm not using PASV mode, so I'm not using shutdown.
>If anyone has faced the same problem, could you help me out?
>
>thanks!
>
>Saad
>
>On Sat, 18 Jan 2003, Michael Ching wrote:
>
>> Related to the problems posted by David Seetapun, I too ran into problems
>> with ftp.slac.stanford.edu.  Whenever I issue the list command, the system
>> seem to hang while waiting for the 226 transfer complete response.  This
>> doesn't happen with any other ftp servers.  With David's help and some
>> poking around, I discover the following solution.
>>
>> For whatever reason, the slac server will only issue the 226 response
>> after the data connection has been closed.  Since I issue the close()
>> command at the end of my procedure, after pulling the connection socket
>> for a response, it just hangs.  You must close the data connection right
>> after receiving the list and before pulling the connection socket for the
>> 226 response.  For those of you using PASV, that means you need to issue
>> the shutdown command to the data connection, before pulling the connection
>> socket for the 226 response.  This way the slac server can shutdown the
>> data connection right after transmitting the list.
>>
>> I hope this will save some of you a couple of hours of hair pulling. :)
>>
>> Mike
>>
>>
>


.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: non-existing local directory
Date: Tue, 21 Jan 2003 01:44:50 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1043113490 1300 171.64.15.101 (21 Jan 2003 01:44:50 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3864

Create the directory.  The user will appreciate it.

SteveJ

In article 
Honggo Wijaya  wrote:
>If the 4th argument passed by the user (directory at the local site to
>transfer into) doesn't exist, do we have to create the directory or simply
>treat this as a failure ?
>
>Please clarify on this.
>
>Thanks,
>Honggo
>
>
>


.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: OK: XXX message
Date: Tue, 21 Jan 2003 01:48:18 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1043113698 1364 171.64.15.101 (21 Jan 2003 01:48:18 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3865

This should be the sum of all data bytes transferred,
data bytes being the contents of files.

SteveJ

In article 
Kevin Christopher   wrote:
>The specs say the output on successful completion should be "OK: xxxxxx 
>bytes copied" where xxxxx is the total of all bytes copied...
>
>Does the total mean bytes in files transfered, or all bytes transfered? 
>  (i.e. can we ignore LIST responses & control messages as part of the 
>total?)
>
>-Kevin
>


.

Path: shelby.stanford.edu!elaine26.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: testing very large strings?
Date: Tue, 21 Jan 2003 01:51:29 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1043113889 1557 171.64.15.101 (21 Jan 2003 01:51:29 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3866

"Sufficiently large" buffers will be OK.  I suggest using descriptive
#defines for these sizes, and explanatory comments if necessary.

SteveJ

In article 
Kevin Christopher   wrote:
>Do we need to put in logic to handle extremely large inputs (i.e. a path 
>of 1000 characters, etc.)?  I've written code that copies into buffers 
>where I've used #define to get a large-enough maximum size, but 
>conceivably these could overflow and create messy errors.  (Obviously 
>this doesn't apply to file transfers; I'm referring to file paths, 
>extensions, etc.)
>
>Will the tests be deliberately trying to break code by overflowing 
>static buffers?  Or am I safe with sufficiently large buffer sizes (i.e. 
>256 byte max for the extension)?
>
>-Kevin
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: non-existing local directory
Date: Mon, 20 Jan 2003 18:09:00 -0800
Lines: 31
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043114941 2042 128.12.85.0 (21 Jan 2003 02:09:01 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3867

According to the assignment:
6. All files should be created with the permissions S_IREAD and S_IWRITE.
You may assume that the local directory already exists; exit with an error
if it does not.

Which is it?

"Steve Jacobson"  wrote in message

> Create the directory.  The user will appreciate it.
>
> SteveJ
>
> In article 
> Honggo Wijaya  wrote:
> >If the 4th argument passed by the user (directory at the local site to
> >transfer into) doesn't exist, do we have to create the directory or
simply
> >treat this as a failure ?
> >
> >Please clarify on this.
> >
> >Thanks,
> >Honggo
> >
> >
> >
>
>


.

Path: shelby.stanford.edu!saga21.Stanford.EDU!srini
From: Srinivas Panguluri 
Newsgroups: su.class.cs244a
Subject: Re: bind() issues
Date: Mon, 20 Jan 2003 18:20:13 -0800
Lines: 42
Distribution: su
Message-ID: 
References:  
  
NNTP-Posting-Host: saga21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043115616 2438 171.64.15.151 (21 Jan 2003 02:20:16 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3868



I figured out my problem - I was incorrectly using getsockname - using the
wrong value for the size of the address structure.  Darn silly mistake
cost me hours!

Thanks!
Srinivas




On Mon, 20 Jan 2003, Matthew Jonathan Holliman wrote:

>
> >if I do close(dataSock), I get errno = 9, Bad File Number (EBADF)  ? Maybe I
> >have to create a new socket?
>
> Yep--once you close() it, it's finished with.  You create a brand-new socket
> exactly as before, with socket() etc.
>
> >if I don't close(dataSock), I get errno = 22, Invalid Argument. (EINVAL) ?
> >Maybe you can't re-bind a socket?
>
> Correct (as far as I know).  You can close the socket, and repeat the
> whole procedure next time (socket, bind, etc.)
>
> >if I close the socket, and create a new one with the socket() command, bind
> >works, but it doesn't give me an ephemeral port (it just returns 0 as the
> >ephemeral port), which sucks.
>
> bind() itself won't tell you the port--it leaves the structure fields
> unchanged.  If bind() doesn't return an error, getsockname() should
> give you the local port number.
>
>

Srinivas Panguluri

(562) 716-5912
Have a nice day!

.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: FTP server reply 120
Date: Mon, 20 Jan 2003 19:43:25 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043120692 5071 128.12.196.91 (21 Jan 2003 03:44:52 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3869

Somebody has posted this question before.
However, since there is no answer yet, let me ask the question again.

What should ftpcopy do if the FTP server replies our connect command
with a code of 120 "Service ready in nnn minutes."
Should we :
- wait and wait until the server returns 220 ?
- or try to connect again ?
- or should we just treat it as an error message?

thanks,
Honggo



.

Path: shelby.stanford.edu!elaine0.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: purify issue: gethostbyname
Date: Mon, 20 Jan 2003 19:56:47 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine0.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043121408 5370 171.64.15.119 (21 Jan 2003 03:56:48 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3870

When the program exits, purify reports
file descriptor 6: "/etc/.name_service_door"
is in use.
The detailed descriptions of this msg shows gethostbyname's using it.
Is this correct, or do we need to do some cleanup things after calling
gethostbyname?

Eric


.

Path: shelby.stanford.edu!not-for-mail
From: Kirk Phelps 
Newsgroups: su.class.cs244a
Subject: Re: purify issue: gethostbyname
Date: Mon, 20 Jan 2003 20:09:26 -0800
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine27.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043122166 5665 171.64.15.102 (21 Jan 2003 04:09:26 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3871

The website mentions that you don't need to worry about this, but I'm
not a TA, so don't consider me to be representative of the grading
policy.
-Kirk

Eric Chenjian Xu wrote:
> 
> When the program exits, purify reports
> file descriptor 6: "/etc/.name_service_door"
> is in use.
> The detailed descriptions of this msg shows gethostbyname's using it.
> Is this correct, or do we need to do some cleanup things after calling
> gethostbyname?
> 
> Eric
.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: Re: timeout
Date: Mon, 20 Jan 2003 20:49:37 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine35.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043124578 6836 171.64.15.110 (21 Jan 2003 04:49:38 GMT)
X-Complaints-To: 
To: Jonathan D Herbach 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3872

I'm having the same problem. It seems my ftpcopy needs more than 3 mins.
I also found out my program was checking direcotries such as . and ..
(e.g. ../..).  Do we need to check these direcotories?

Eric

On Mon, 13 Jan 2003, Jonathan D Herbach wrote:

> while running on ./ftpcopy mif 5 ftp.slac.stanford.edu in directory /doc,
> my ftpcopy times out.
>
> It worked a day or two ago, but I haven't changed the code. Should I
> assume that this is a problem on my part (perhaps my code isn't efficient
> enough?) or not worry about such a transient error?
>
>  warning:  ftpcopy
> failed with exit code 16777215 (waitpid status -1) program output:
> ***Timeout expired during grading
> Program output:
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Aaron James Dailey 
Newsgroups: su.class.cs244a
Subject: purify question - 'access error'
Date: 20 Jan 2003 22:04:55 -0800
Organization: Stanford University, CA, USA
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine33.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1043129096 8391 171.64.15.108 (21 Jan 2003 06:04:56 GMT)
X-Complaints-To: 
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)
Xref: shelby.stanford.edu su.class.cs244a:3873

In my purify output, I get this line:
  * 2 access errors, 22 total occurrences.

I'm really clear what this means, or how to go about fixing them, as
there's no stack trace. The only 'three letter' errors I see are the FIU
errors (stdin, stdout, stderr, /etc/name_service_door), which I assume are
ok (right?)

I can post the whole output if that would be useful.

Thanks

Aaron

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: Re: timeout
Date: Mon, 20 Jan 2003 22:16:58 -0800
Lines: 34
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043129819 9453 171.64.15.117 (21 Jan 2003 06:16:59 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3874

By skipping . and .., my program did successfully finish copying in
seconds.  Just want to make sure we should skip these directories.  Please
confirm.
Thanks,
Eric

On Mon, 20 Jan 2003, Eric Chenjian Xu wrote:

> I'm having the same problem. It seems my ftpcopy needs more than 3 mins.
> I also found out my program was checking direcotries such as . and ..
> (e.g. ../..).  Do we need to check these direcotories?
>
> Eric
>
> On Mon, 13 Jan 2003, Jonathan D Herbach wrote:
>
> > while running on ./ftpcopy mif 5 ftp.slac.stanford.edu in directory /doc,
> > my ftpcopy times out.
> >
> > It worked a day or two ago, but I haven't changed the code. Should I
> > assume that this is a problem on my part (perhaps my code isn't efficient
> > enough?) or not worry about such a transient error?
> >
> >  warning:  ftpcopy
> > failed with exit code 16777215 (waitpid status -1) program output:
> > ***Timeout expired during grading
> > Program output:
> >
> >
>
>
>


.

Path: shelby.stanford.edu!epic27.Stanford.EDU!tjruwase
From: Olatunji Oluwabukunmi Ruwase 
Newsgroups: su.class.cs244a
Subject: Re: reply code and freeing memory
Date: Mon, 20 Jan 2003 23:03:44 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
  
 
NNTP-Posting-Host: epic27.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043132629 10851 171.64.15.60 (21 Jan 2003 07:03:49 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3875


> You'd expect to receive 550 (this is certainly what the reference
> solution against which submissions are tested assumes, and what the RFC
> states as the expected behaviour), but if 553 is also being used by some
> servers you may treat both as having comparable meaning.  Having said this,
> I haven't seen 553 being used in this way though, only 550.
>
> In general, the only file system problem we're explicitly testing will be
> inaccessible directories; any other 55x that didn't correspond to such a
> case would be unexpected (i.e., not the focus of a test case).
>
 Could you please clarify this, since Test L.7 checks for correct handling
of non existent remote directory . My understanding of the requirements is
that this should be handled differently from an inaccessible remote
directory. That is a non existent remote directory should result in error
while an inaccessible remote directory should be ignored.
 Assuming i do not have the requirements confused, therefore it would
matter which code 553 or 550 is returned .
 Please clarify on this
 By the way below is the output from ftp.cs which does swap 550 and 553
 with respect to the RFC
 Thanks
tunji

epic27:/tmp/tunji> ftp ftp.cs
Connected to labrea.Stanford.EDU.
220 ftp.cs.stanford.edu NcFTPd Server (free educational license) ready.
Name (ftp.cs:tjruwase): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
230-You are user #2 of 100 simultaneous users allowed.
230-
230 Logged in anonymously.
ftp> cd ../
553 Permission denied.
ftp> cd missing
550 No such directory.
ftp>



.

Path: shelby.stanford.edu!not-for-mail
From:  (Dale Neal)
Newsgroups: su.class.cs244a
Subject: CDUP?
Date: Tue, 21 Jan 2003 07:09:25 GMT
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: murasame.stanford.edu
X-Trace: news.Stanford.EDU 1043132965 11006 128.12.110.69 (21 Jan 2003 07:09:25 GMT)
X-Complaints-To: 
X-Newsreader: Forte Free Agent 1.21/32.243
Xref: shelby.stanford.edu su.class.cs244a:3876

Are we allowed to use CDUP? The FTP spec seems to suggest it to better
handle servers with different ways of specifying paths. Otherwise, can
we use PWD to keep track of the working directory? Or can we assume
that the '/' character is used on all servers to separate directories?

Thanks.

-Dale
.

Path: shelby.stanford.edu!talon1.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: Re: purify issue: gethostbyname
Date: Mon, 20 Jan 2003 23:21:49 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: talon1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043133711 11461 171.64.12.145 (21 Jan 2003 07:21:51 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3877

I had the same problem (check the previous posts) & the TA's said that we
don't have to worry about this error [the grading script skips it in the
purify.output file]


On Mon, 20 Jan 2003, Kirk Phelps wrote:

> The website mentions that you don't need to worry about this, but I'm
> not a TA, so don't consider me to be representative of the grading
> policy.
> -Kirk
>
> Eric Chenjian Xu wrote:
> >
> > When the program exits, purify reports
> > file descriptor 6: "/etc/.name_service_door"
> > is in use.
> > The detailed descriptions of this msg shows gethostbyname's using it.
> > Is this correct, or do we need to do some cleanup things after calling
> > gethostbyname?
> >
> > Eric
>



.

Path: shelby.stanford.edu!cardinal4.Stanford.EDU!tedu
From: Ted Unangst 
Newsgroups: su.class.cs244a
Subject: hostname format
Date: Tue, 21 Jan 2003 00:07:33 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: cardinal4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043136454 12865 171.64.15.252 (21 Jan 2003 08:07:34 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3878

What formats should we be expected to handle for the name of the server?
It seems the grading script for the zero sized file test is giving me an
unusual hostname of 

--
"If you take out the killings, Washington actually has a very very
low crime rate."
      - M. Barry, Mayor of Washington, DC

.

Path: shelby.stanford.edu!cardinal4.Stanford.EDU!tedu
From: Ted Unangst 
Newsgroups: su.class.cs244a
Subject: Re: hostname format
Date: Tue, 21 Jan 2003 00:09:19 -0800
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: cardinal4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043136559 13119 171.64.15.252 (21 Jan 2003 08:09:19 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3879

On Tue, 21 Jan 2003, Ted Unangst wrote:

> What formats should we be expected to handle for the name of the server?
> It seems the grading script for the zero sized file test is giving me an
> unusual hostname of 

forget that.  just read that it's covered by the assignment description.


--
"I read a funny story about how the Republicans freed the slaves.
The Republicans are the ones who created slavery by law in the
1600's.  Abraham Lincoln freed the slaves and he was not a
Republican."
      - M. Barry, Mayor of Washington, DC

.

Path: shelby.stanford.edu!epic26.Stanford.EDU!sansari
From: Saad Salman Ansari 
Newsgroups: su.class.cs244a
Subject: Re: timeout
Date: Tue, 21 Jan 2003 00:15:46 -0800
Lines: 50
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: epic26.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043136947 13640 171.64.15.50 (21 Jan 2003 08:15:47 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3880

I am having the same problem with the timeout. When I ran the same command
separately, i got the expected output:

../ftpcopy mif 5 ftp.slac.stanford.edu
/afs/ir.stanford.edu/users/s/a/sansari/courses/cs244a/assgn1/ftpcopy/testing/grading_src/build/ftp.slac.stanford.edu_mif_5_1
/doc
OK 926312 bytes copied

Is it possible to change the timeout value of the grading script? Perhaps,
due to increased load (in these last three days) it may need extra time.
Also I'm skipping over "." and ".."

On Mon, 20 Jan 2003, Eric Chenjian Xu wrote:

> By skipping . and .., my program did successfully finish copying in
> seconds.  Just want to make sure we should skip these directories.  Please
> confirm.
> Thanks,
> Eric
>
> On Mon, 20 Jan 2003, Eric Chenjian Xu wrote:
>
> > I'm having the same problem. It seems my ftpcopy needs more than 3 mins.
> > I also found out my program was checking direcotries such as . and ..
> > (e.g. ../..).  Do we need to check these direcotories?
> >
> > Eric
> >
> > On Mon, 13 Jan 2003, Jonathan D Herbach wrote:
> >
> > > while running on ./ftpcopy mif 5 ftp.slac.stanford.edu in directory /doc,
> > > my ftpcopy times out.
> > >
> > > It worked a day or two ago, but I haven't changed the code. Should I
> > > assume that this is a problem on my part (perhaps my code isn't efficient
> > > enough?) or not worry about such a transient error?
> > >
> > >  warning:  ftpcopy
> > > failed with exit code 16777215 (waitpid status -1) program output:
> > > ***Timeout expired during grading
> > > Program output:
> > >
> > >
> >
> >
> >
>
>
>

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: no .purify
Date: Tue, 21 Jan 2003 00:24:07 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043137448 13844 171.64.15.117 (21 Jan 2003 08:24:08 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3881

I don't have a .purify file, and my purify executable seems to run ok both
on my test cases and test case M in the script.  The web page says

"The error (UMR) happens inside of a network system call (bind, accept,
etc.)"

And, it seems like I have to submit a .purify file (at least for running
the test script).  Do I suppose to suppress the umr errors in the
functions that have bind, accept, etc?  If not, do I just submit an empty
..purify?

Eric



.

Path: shelby.stanford.edu!not-for-mail
From: "Nishant Verman" 
Newsgroups: su.class.cs244a
Subject: Re: CDUP?
Date: Tue, 21 Jan 2003 01:15:31 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nishant.stanford.edu
X-Trace: news.Stanford.EDU 1043140533 14868 128.12.185.34 (21 Jan 2003 09:15:33 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3882

From previous post:

>Can we assume CDUP always supported by the FTP server?

The RFC states this is "optional," so this is not a good assumption.


"Dale Neal"  wrote in message

> Are we allowed to use CDUP? The FTP spec seems to suggest it to better
> handle servers with different ways of specifying paths. Otherwise, can
> we use PWD to keep track of the working directory? Or can we assume
> that the '/' character is used on all servers to separate directories?
>
> Thanks.
>
> -Dale


.

Path: shelby.stanford.edu!not-for-mail
From:  (Dale Neal)
Newsgroups: su.class.cs244a
Subject: Re: CDUP?
Date: Tue, 21 Jan 2003 09:19:06 GMT
Lines: 22
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: murasame.stanford.edu
X-Trace: news.Stanford.EDU 1043140746 14910 128.12.110.69 (21 Jan 2003 09:19:06 GMT)
X-Complaints-To: 
X-Newsreader: Forte Free Agent 1.21/32.243
Xref: shelby.stanford.edu su.class.cs244a:3883


>>Can we assume CDUP always supported by the FTP server?
>
>The RFC states this is "optional," so this is not a good assumption.

I was afraid of that. Can I get an answer to the rest of my question?

>
>
>"Dale Neal"  wrote in message

>> Are we allowed to use CDUP? The FTP spec seems to suggest it to better
>> handle servers with different ways of specifying paths. Otherwise, can
>> we use PWD to keep track of the working directory? Or can we assume
>> that the '/' character is used on all servers to separate directories?
>>
>> Thanks.
>>
>> -Dale
>
>

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!keithito
From: Keith Isami Ito 
Newsgroups: su.class.cs244a
Subject: submitting
Date: Tue, 21 Jan 2003 02:06:16 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043143579 16919 171.64.15.106 (21 Jan 2003 10:06:19 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3884

Hi. I'm a moron and can't figure out how to use the submit script.
My TA is Steve Jacobson (who has the ID sjac3), so I'm supposed to type:

/usr/class/cs244a/bin/submit.pl hw1 sjac3

right? The script runs and tells me:

I have no information about TA sjac3

What am I doing wrong?

-- Keith



.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: submitting
Date: Tue, 21 Jan 2003 11:42:46 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine25.stanford.edu
X-Trace: news.Stanford.EDU 1043149366 18824 171.64.15.100 (21 Jan 2003 11:42:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3885

Keith Isami Ito  writes:

>Hi. I'm a moron and can't figure out how to use the submit script.
>My TA is Steve Jacobson (who has the ID sjac3), so I'm supposed to type:

No, I'm the moron; I forgot to add Steve into the submission configuration
when he joined us after the quarter's start.  If you try this again,
it should hopefully work now.

.

Path: shelby.stanford.edu!not-for-mail
From: wmagrath 
Newsgroups: su.class.cs244a
Subject: File Extension Case Sensitive??
Date: Tue, 21 Jan 2003 03:55:47 -0800
Lines: 11
Distribution: su
Message-ID: 
Reply-To:  
NNTP-Posting-Host: dn800cb906.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043150174 19025 128.12.185.6 (21 Jan 2003 11:56:14 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3886

At the risk of beating a dead horse, is the file extension parameter 
case sensitive?  In other words, if we're looking for ".txt" and we find 
a file of type ".TXT", do we transfer it?  (I assume no but just want to 
make sure).

And to really beat a dead horse, if we find a file whose full name is 
just ".txt" (no prefix), should we copy it?

Thanks for the help!


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: File Extension Case Sensitive??
Date: Tue, 21 Jan 2003 17:51:45 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1043171505 28092 171.64.15.112 (21 Jan 2003 17:51:45 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3887

Assume case sensitive (like Unix).

SteveJ

In article 
wmagrath   wrote:
>At the risk of beating a dead horse, is the file extension parameter 
>case sensitive?  In other words, if we're looking for ".txt" and we find 
>a file of type ".TXT", do we transfer it?  (I assume no but just want to 
>make sure).
>
>And to really beat a dead horse, if we find a file whose full name is 
>just ".txt" (no prefix), should we copy it?
>
>Thanks for the help!
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: non-existing local directory
Date: Tue, 21 Jan 2003 17:54:06 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 41
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1043171646 28155 171.64.15.112 (21 Jan 2003 17:54:06 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3888

In article 
Rene Patnode  wrote:
>According to the assignment:
>6. All files should be created with the permissions S_IREAD and S_IWRITE.

I stand corrected.  The assignment specifies acceptable
behavior if the local directory does not exist.

SteveJ

>You may assume that the local directory already exists; exit with an error
>if it does not.
>
>Which is it?
>
>"Steve Jacobson"  wrote in message

>> Create the directory.  The user will appreciate it.
>>
>> SteveJ
>>
>> In article 
>> Honggo Wijaya  wrote:
>> >If the 4th argument passed by the user (directory at the local site to
>> >transfer into) doesn't exist, do we have to create the directory or
>simply
>> >treat this as a failure ?
>> >
>> >Please clarify on this.
>> >
>> >Thanks,
>> >Honggo
>> >
>> >
>> >
>>
>>
>
>


.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: HW2 object code
Date: Tue, 21 Jan 2003 11:04:50 -0800
Lines: 15
Distribution: su
Message-ID: 
References:  
  
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043175896 794 171.64.15.82 (21 Jan 2003 19:04:56 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3889

Hi,
I was wondering if you could provide either the support libraries for
assignment 2 in binary code for Linux or the source code to
generate them. I'm an SITN student and it is more convenient for me
to work in my system than to always work in the leland cluster.
I understand that if I encounter any problem with them you will not
support them and that the final code will have to run on the
elaines so I will make sure that that is the case, but this will
make working on the assignment a lot easier for me, and maybe
other people in my situation.

Thanks,

Rafa

.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: CDUP?
Date: Tue, 21 Jan 2003 11:14:56 -0800
Lines: 28
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043176496 1099 128.12.85.0 (21 Jan 2003 19:14:56 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3890

In lieu of using "CDUP", "CWD .." has always seemed to work. TAs?

"Dale Neal"  wrote in message

>
> >>Can we assume CDUP always supported by the FTP server?
> >
> >The RFC states this is "optional," so this is not a good assumption.
>
> I was afraid of that. Can I get an answer to the rest of my question?
>
> >
> >
> >"Dale Neal"  wrote in message
> 
> >> Are we allowed to use CDUP? The FTP spec seems to suggest it to better
> >> handle servers with different ways of specifying paths. Otherwise, can
> >> we use PWD to keep track of the working directory? Or can we assume
> >> that the '/' character is used on all servers to separate directories?
> >>
> >> Thanks.
> >>
> >> -Dale
> >
> >
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: HW2 object code
Date: Tue, 21 Jan 2003 11:17:47 -0800
Lines: 21
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043176668 1152 128.12.85.0 (21 Jan 2003 19:17:48 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3891

You could try using VNC. Does it not work remotely?

"Rafael M Hernandez"  wrote in message

> Hi,
> I was wondering if you could provide either the support libraries for
> assignment 2 in binary code for Linux or the source code to
> generate them. I'm an SITN student and it is more convenient for me
> to work in my system than to always work in the leland cluster.
> I understand that if I encounter any problem with them you will not
> support them and that the final code will have to run on the
> elaines so I will make sure that that is the case, but this will
> make working on the assignment a lot easier for me, and maybe
> other people in my situation.
>
> Thanks,
>
> Rafa
>


.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: HW2 object code
Date: Tue, 21 Jan 2003 12:49:12 -0800
Lines: 27
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043182148 4430 171.64.74.37 (21 Jan 2003 20:49:08 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3892

Rafael,

remind me once the assignment is out and we can see if it runs on Linux. 
My guess is no, but who knows. If not, how fast is your network 
connection? You can run xterms remotely on the cluster machines
and ssh tunnel them on your local host. If your pipe is fast enough
(and latency is not too bad) it works great.

   Guido

Rafael M Hernandez wrote:
> Hi,
> I was wondering if you could provide either the support libraries for
> assignment 2 in binary code for Linux or the source code to
> generate them. I'm an SITN student and it is more convenient for me
> to work in my system than to always work in the leland cluster.
> I understand that if I encounter any problem with them you will not
> support them and that the final code will have to run on the
> elaines so I will make sure that that is the case, but this will
> make working on the assignment a lot easier for me, and maybe
> other people in my situation.
> 
> Thanks,
> 
> Rafa
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: purify question - 'access error'
Date: Tue, 21 Jan 2003 12:57:56 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043182671 4957 171.64.74.37 (21 Jan 2003 20:57:51 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3893

Please post. I am nor exactly the purify guru on the TA team but usually 
any access error result in three letter errors.

Aaron James Dailey wrote:
> In my purify output, I get this line:
>   * 2 access errors, 22 total occurrences.
> 
> I'm really clear what this means, or how to go about fixing them, as
> there's no stack trace. The only 'three letter' errors I see are the FIU
> errors (stdin, stdout, stderr, /etc/name_service_door), which I assume are
> ok (right?)
> 
> I can post the whole output if that would be useful.
> 
> Thanks
> 
> Aaron
> 

.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: HW2 object code
Date: Tue, 21 Jan 2003 13:04:59 -0800
Lines: 50
Distribution: su
Message-ID: 
References:  
  
 
 
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043183101 5252 171.64.15.82 (21 Jan 2003 21:05:01 GMT)
X-Complaints-To: 
To: Guido Appenzeller 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3894

Hi Guido,
as far as I can tell the assignment is out already. I thought that
professor McKeown said all assignments are out and that we can start
anytime.

Regarding my connection, I can ssh from work and it works well but
in general I'd rather not use company resources for this and I'd
prefer to work from home, in particular when I need to work during
the night.

The reason I suggested Linux is that by executing
the gethw2 script that you provide it also installed a Makefile.linux
besides the regular Makefile.

Thanks
Rafa



On Tue, 21 Jan 2003, Guido Appenzeller wrote:

> Rafael,
>
> remind me once the assignment is out and we can see if it runs on Linux.
> My guess is no, but who knows. If not, how fast is your network
> connection? You can run xterms remotely on the cluster machines
> and ssh tunnel them on your local host. If your pipe is fast enough
> (and latency is not too bad) it works great.
>
>    Guido
>
> Rafael M Hernandez wrote:
> > Hi,
> > I was wondering if you could provide either the support libraries for
> > assignment 2 in binary code for Linux or the source code to
> > generate them. I'm an SITN student and it is more convenient for me
> > to work in my system than to always work in the leland cluster.
> > I understand that if I encounter any problem with them you will not
> > support them and that the final code will have to run on the
> > elaines so I will make sure that that is the case, but this will
> > make working on the assignment a lot easier for me, and maybe
> > other people in my situation.
> >
> > Thanks,
> >
> > Rafa
> >
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: CDUP?
Date: Tue, 21 Jan 2003 13:08:26 -0800
Lines: 36
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043183301 5342 171.64.74.37 (21 Jan 2003 21:08:21 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3895

CWD is required per RFC. I've never seen a ftp server that did not 
understand "/", ".." and ".". I'd guess they exist (VMS? TSO?), but 
unless Matthew protests I guess you can assume "/" here.

   Guido

Rene Patnode wrote:
> In lieu of using "CDUP", "CWD .." has always seemed to work. TAs?
> 
> "Dale Neal"  wrote in message
> 
> 
>>>>Can we assume CDUP always supported by the FTP server?
>>>
>>>The RFC states this is "optional," so this is not a good assumption.
>>
>>I was afraid of that. Can I get an answer to the rest of my question?
>>
>>
>>>
>>>"Dale Neal"  wrote in message

>>>
>>>>Are we allowed to use CDUP? The FTP spec seems to suggest it to better
>>>>handle servers with different ways of specifying paths. Otherwise, can
>>>>we use PWD to keep track of the working directory? Or can we assume
>>>>that the '/' character is used on all servers to separate directories?
>>>>
>>>>Thanks.
>>>>
>>>>-Dale
>>>
>>>
> 
> 

.

Path: shelby.stanford.edu!saga20.Stanford.EDU!myc
From: Mingying Chen 
Newsgroups: su.class.cs244a
Subject: Re: reply code and freeing memory
Date: Tue, 21 Jan 2003 13:19:43 -0800
Lines: 58
Distribution: su
Message-ID: 
References: 
  
  
NNTP-Posting-Host: saga20.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043183986 5798 171.64.15.150 (21 Jan 2003 21:19:46 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3896


The following was the reply from TA in previous post:


>2. If user defined srcDir on server is there, but permission denied,
>should the program exit as FAILURE or SUCCESS(permission problem
>tolerated)?

You should treat this the same as a non-existent remote directory.




On Mon, 20 Jan 2003, Olatunji Oluwabukunmi Ruwase wrote:

>
> > You'd expect to receive 550 (this is certainly what the reference
> > solution against which submissions are tested assumes, and what the RFC
> > states as the expected behaviour), but if 553 is also being used by some
> > servers you may treat both as having comparable meaning.  Having said this,
> > I haven't seen 553 being used in this way though, only 550.
> >
> > In general, the only file system problem we're explicitly testing will be
> > inaccessible directories; any other 55x that didn't correspond to such a
> > case would be unexpected (i.e., not the focus of a test case).
> >
>  Could you please clarify this, since Test L.7 checks for correct handling
> of non existent remote directory . My understanding of the requirements is
> that this should be handled differently from an inaccessible remote
> directory. That is a non existent remote directory should result in error
> while an inaccessible remote directory should be ignored.
>  Assuming i do not have the requirements confused, therefore it would
> matter which code 553 or 550 is returned .
>  Please clarify on this
>  By the way below is the output from ftp.cs which does swap 550 and 553
>  with respect to the RFC
>  Thanks
> tunji
>
> epic27:/tmp/tunji> ftp ftp.cs
> Connected to labrea.Stanford.EDU.
> 220 ftp.cs.stanford.edu NcFTPd Server (free educational license) ready.
> Name (ftp.cs:tjruwase): anonymous
> 331 Guest login ok, send your complete e-mail address as password.
> Password:
> 230-You are user #2 of 100 simultaneous users allowed.
> 230-
> 230 Logged in anonymously.
> ftp> cd ../
> 553 Permission denied.
> ftp> cd missing
> 550 No such directory.
> ftp>
>
>
>
>

.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: FTP server reply 120
Date: Tue, 21 Jan 2003 21:37:26 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1043185046 6541 171.64.15.77 (21 Jan 2003 21:37:26 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3897

You can ignore the possibility of a 120 reply (or treat
it as an error).  This will not be a grading test case.

SteveJ

In article 
Honggo Wijaya  wrote:
>Somebody has posted this question before.
>However, since there is no answer yet, let me ask the question again.
>
>What should ftpcopy do if the FTP server replies our connect command
>with a code of 120 "Service ready in nnn minutes."
>Should we :
>- wait and wait until the server returns 220 ?
>- or try to connect again ?
>- or should we just treat it as an error message?
>
>thanks,
>Honggo
>
>
>


.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: purify question - 'access error'
Date: Tue, 21 Jan 2003 21:44:53 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1043185493 6772 171.64.15.77 (21 Jan 2003 21:44:53 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3898

I'm aware of a single FIU error which can be ignored.

It would be helpful to see the other error messages.

SteveJ

In article 
Aaron James Dailey   wrote:
>In my purify output, I get this line:
>  * 2 access errors, 22 total occurrences.
>
>I'm really clear what this means, or how to go about fixing them, as
>there's no stack trace. The only 'three letter' errors I see are the FIU
>errors (stdin, stdout, stderr, /etc/name_service_door), which I assume are
>ok (right?)
>
>I can post the whole output if that would be useful.
>
>Thanks
>
>Aaron
>


.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: timeout
Date: Tue, 21 Jan 2003 21:46:19 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 32
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1043185579 6888 171.64.15.77 (21 Jan 2003 21:46:19 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3899

You should ignore "." (representing this directory) and
".." (representing the next higher directory).

SteveJ

In article 
Eric Chenjian Xu   wrote:
>I'm having the same problem. It seems my ftpcopy needs more than 3 mins.
>I also found out my program was checking direcotries such as . and ..
>(e.g. ../..).  Do we need to check these direcotories?
>
>Eric
>
>On Mon, 13 Jan 2003, Jonathan D Herbach wrote:
>
>> while running on ./ftpcopy mif 5 ftp.slac.stanford.edu in directory /doc,
>> my ftpcopy times out.
>>
>> It worked a day or two ago, but I haven't changed the code. Should I
>> assume that this is a problem on my part (perhaps my code isn't efficient
>> enough?) or not worry about such a transient error?
>>
>>  warning:  ftpcopy
>> failed with exit code 16777215 (waitpid status -1) program output:
>> ***Timeout expired during grading
>> Program output:
>>
>>
>
>


.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: no .purify
Date: Tue, 21 Jan 2003 21:50:26 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1043185826 7023 171.64.15.77 (21 Jan 2003 21:50:26 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3900

Suppressing purify error messages is not a good idea.

A purify report should be generated even if there are no
purify errors.  Most likely, you have the output going to
the screen instead of to a file.  See the purify FAQ for
how to redirect the output.

SteveJ

In article 
Eric Chenjian Xu   wrote:
>I don't have a .purify file, and my purify executable seems to run ok both
>on my test cases and test case M in the script.  The web page says
>
>"The error (UMR) happens inside of a network system call (bind, accept,
>etc.)"
>
>And, it seems like I have to submit a .purify file (at least for running
>the test script).  Do I suppose to suppress the umr errors in the
>functions that have bind, accept, etc?  If not, do I just submit an empty
>.purify?
>
>Eric
>
>
>


.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: timeout
Date: Tue, 21 Jan 2003 21:50:35 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1043185835 7029 171.64.15.115 (21 Jan 2003 21:50:35 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3901


>Is it possible to change the timeout value of the grading script? Perhaps,
>due to increased load (in these last three days) it may need extra time.
>Also I'm skipping over "." and ".."

It's possible, but I think the current timeout interval of three minutes
should be more than enough time for your client to complete.  How long
does it take when you run from the shell?

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: HW2 object code
Date: Tue, 21 Jan 2003 22:08:53 +0000 (UTC)
Lines: 28
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1043186933 7626 171.64.15.115 (21 Jan 2003 22:08:53 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3902


>I was wondering if you could provide either the support libraries for
>assignment 2 in binary code for Linux or the source code to
>generate them. I'm an SITN student and it is more convenient for me
>to work in my system than to always work in the leland cluster.
>I understand that if I encounter any problem with them you will not
>support them and that the final code will have to run on the
>elaines so I will make sure that that is the case, but this will
>make working on the assignment a lot easier for me, and maybe
>other people in my situation.

I haven't tried this under Linux, but the sources you need for initial
development are all retrieved by the gethw2 script.  If you have problems,
please let us know--although Linux will be officially unsupported :-)

There are a couple of things of which to be aware:

(1) There are differences between the Solaris Makefile and the Makefile.linux.
    We use the former for the test script and grading; the latter can only
    be used if you do any initial development under Linux.  So be sure to use
    the correct Makefile for your final submission.  (This really only
    affects part (c) of the assignment).

(2) Needless to say, the testing scripts run only on the leland systems
    (elaines etc).  I think people will find these are more useful on the
    second assignment than they were on the first, since testing is
    more difficult than was the case for ftpcopy.

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: no .purify
Date: Tue, 21 Jan 2003 22:16:22 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1043187382 7925 171.64.15.115 (21 Jan 2003 22:16:22 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3903


>And, it seems like I have to submit a .purify file (at least for running
>the test script).  Do I suppose to suppress the umr errors in the
>functions that have bind, accept, etc?  If not, do I just submit an empty
>.purify?

If you don't see errors in the system calls, you don't need to suppress
them, and can just submit an empty .purify file instead.  You can generate
this just by doing 'touch .purify'.

.

Path: shelby.stanford.edu!elaine22.Stanford.EDU!gcs
From: Giri Sreenivas 
Newsgroups: su.class.cs244a
Subject: path separator
Date: Tue, 21 Jan 2003 14:43:58 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine22.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043189040 8803 171.64.15.87 (21 Jan 2003 22:44:00 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3904

Can we assume that '/' will always separate directories? I think I
remember some old ftpd's for win9x that had '\' as a path separator,
directly mapping the os fs to the ftp fs. Thanks,

Giri

.

Path: shelby.stanford.edu!not-for-mail
From: Aaron James Dailey 
Newsgroups: su.class.cs244a
Subject: Re: purify question - 'access error'
Date: 21 Jan 2003 19:19:41 -0800
Organization: Stanford University, CA, USA
Lines: 22
Sender: 
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1043205582 18293 171.64.15.79 (22 Jan 2003 03:19:42 GMT)
X-Complaints-To: 
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)
Xref: shelby.stanford.edu su.class.cs244a:3905

I looked at my output again, and it did tell me exactly where I was
accessing uninitialized memory.  What a great tool!

I have the following FIUs, which I'm thinking are ok.  Is this right?

FIU: file descriptor 0: <stdin>
FIU: file descriptor 1: <stdout>
FIU: file descriptor 2: <stderr>
FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
   * File info: ?r--r--r--  1 root     root             0 May 10  2002
   * This file descriptor was allocated from:
 __open64       [libc.so.1]
      _open64        [libc.so.1]
      _nsc_trydoorcall [libc.so.1]
    _door_gethostbyname_r [gethostby_door.c]
        _get_hostserv_inetnetdir_byname [netdir_inet.c]
 gethostbyname_r [gethostbyname_r.c]
FIU: file descriptor 26: <reserved for Purify internal use>
FIU: file descriptor 27: <reserved for Purify internal use>


Aaron Dailey
.

Path: shelby.stanford.edu!saga5.Stanford.EDU!aseems
From: Aseem Sharma 
Newsgroups: su.class.cs244a
Subject: Can't run test script
Date: Tue, 21 Jan 2003 21:07:02 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043212030 22039 171.64.15.135 (22 Jan 2003 05:07:10 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3906

Hi Guys,

For some reason, I cannot run the test script. I'm an SCPD student
and the error I get is

Test record directory /afs/ir/class/cs244a/grading_script/student/aseems
does not exist!
couldn't submit code for testing

clues ??

Aseem

.

Path: shelby.stanford.edu!epic23.Stanford.EDU!inspire
From: Toliver Jue 
Newsgroups: su.class.cs244a
Subject: Dealing with LIST
Date: Tue, 21 Jan 2003 23:56:04 -0800
Lines: 22
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic23.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043222166 865 171.64.15.58 (22 Jan 2003 07:56:06 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3907

I am connecting to ftp.cdrom.com, using the following arguments to
ftpcopy:

ftpcopy.purify txt 2 ftp.cdrom.com boo

When I get to the /pub directory, and LIST, I get such directories as:

drwxr-x---   2 ftpuser  ftpusers      8192 Jan 11 17:34 symantec
drwxr-x---   2 ftpuser  ftpusers       512 Nov  5 14:37 pinnaclesys

etc.....

When I try to run LIST on them, i get this over the control connection:
150 Opening ASCII mode data connection for /bin/ls.

AND this over the data connection:
../pub/symantec/: Permission denied

Was there a way to tell that permission was denied in the first place?
Has anyone else attempted this site?  Thanks for any help/info.


.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: Re: Dealing with LIST
Date: Wed, 22 Jan 2003 00:13:35 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043223216 2094 128.12.196.91 (22 Jan 2003 08:13:36 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3908

If there is permission denied when you want to access a certain directory,
you wil get a reply code of "550" or "553".
Thus, you can check this reply code to decide what to do.

Hope this helps.

Honggo


"Toliver Jue"  wrote in message

> I am connecting to ftp.cdrom.com, using the following arguments to
> ftpcopy:
>
> ftpcopy.purify txt 2 ftp.cdrom.com boo
>
> When I get to the /pub directory, and LIST, I get such directories as:
>
> drwxr-x---   2 ftpuser  ftpusers      8192 Jan 11 17:34 symantec
> drwxr-x---   2 ftpuser  ftpusers       512 Nov  5 14:37 pinnaclesys
>
> etc.....
>
> When I try to run LIST on them, i get this over the control connection:
> 150 Opening ASCII mode data connection for /bin/ls.
>
> AND this over the data connection:
> ./pub/symantec/: Permission denied
>
> Was there a way to tell that permission was denied in the first place?
> Has anyone else attempted this site?  Thanks for any help/info.
>
>


.

Path: shelby.stanford.edu!elaine14.Stanford.EDU!tedu
From: Ted Unangst 
Newsgroups: su.class.cs244a
Subject: Re: Dealing with LIST
Date: Wed, 22 Jan 2003 00:19:12 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043223552 2237 171.64.15.79 (22 Jan 2003 08:19:12 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3909

On Tue, 21 Jan 2003, Toliver Jue wrote:

> When I get to the /pub directory, and LIST, I get such directories as:
>
> drwxr-x---   2 ftpuser  ftpusers      8192 Jan 11 17:34 symantec
> drwxr-x---   2 ftpuser  ftpusers       512 Nov  5 14:37 pinnaclesys
>
> When I try to run LIST on them, i get this over the control connection:
> 150 Opening ASCII mode data connection for /bin/ls.
>
> AND this over the data connection:
> ./pub/symantec/: Permission denied
>
> Was there a way to tell that permission was denied in the first place?
> Has anyone else attempted this site?  Thanks for any help/info.

you could try parsing the permission info in the first listing.  look for
the string "---", but it's not foolproof.  If you try a CWD before LIST,
it will responsd with an error code, too.



--
"People blame me because these water mains break, but I ask you,
if the water mains didn't break, would it be my responsibility to
fix them then? WOULD IT!?!"
      - M. Barry, Mayor of Washington, DC

.

Path: shelby.stanford.edu!not-for-mail
From: "Garry Tan" 
Newsgroups: su.class.cs244a
Subject: test script ftpd not working?
Date: Wed, 22 Jan 2003 00:21:32 -0800
Lines: 26
Distribution: su
Message-ID: 
NNTP-Posting-Host: goggles.stanford.edu
X-Trace: news.Stanford.EDU 1043223693 2341 128.12.71.65 (22 Jan 2003 08:21:33 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3910

This is really strange... it was working earlier, but now running the test
script:

/afs/ir/class/cs244a/bin/test_code.pl hw1 *.c *.h Makefile purify.output
..purify

seems to die at


Working dir:
/afs/ir.stanford.edu/users/g/a/garry/cs244a/hw1/src/grading_src/build
Starting local ftpd: cd /usr/class/cs244a/grading_script/hw1_special_cases;
/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd 2>
/afs/ir.stanford.edu/users/g/a/garry/cs244a/hw1/src/grading_src/build/.ftpd_
port&
ftpd running on port 65457
Testing special case:  ../ftpcopy ext 1 

It just hangs at this point. Is anyone else encountering this issue? I try
to ftp to elaine20.stanford.edu (the computer i was logged into) at port
65457 using another ftp client, and the server doesn't seem to be
responding, it just hangs (connects but doesn't reply)...




.

Path: shelby.stanford.edu!epic23.Stanford.EDU!inspire
From: Toliver Jue 
Newsgroups: su.class.cs244a
Subject: Re: Dealing with LIST
Date: Wed, 22 Jan 2003 00:22:39 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic23.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043223761 2359 171.64.15.58 (22 Jan 2003 08:22:41 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3911

In my implementation, I never use the CWD, since I don't think it is
required.  Rather, I always put the full path name as the argument to
LIST.  Any other thoughts?


On Wed, 22 Jan 2003, Ted Unangst wrote:

> On Tue, 21 Jan 2003, Toliver Jue wrote:
>
> > When I get to the /pub directory, and LIST, I get such directories as:
> >
> > drwxr-x---   2 ftpuser  ftpusers      8192 Jan 11 17:34 symantec
> > drwxr-x---   2 ftpuser  ftpusers       512 Nov  5 14:37 pinnaclesys
> >
> > When I try to run LIST on them, i get this over the control connection:
> > 150 Opening ASCII mode data connection for /bin/ls.
> >
> > AND this over the data connection:
> > ./pub/symantec/: Permission denied
> >
> > Was there a way to tell that permission was denied in the first place?
> > Has anyone else attempted this site?  Thanks for any help/info.
>
> you could try parsing the permission info in the first listing.  look for
> the string "---", but it's not foolproof.  If you try a CWD before LIST,
> it will responsd with an error code, too.
>
>
>
> --
> "People blame me because these water mains break, but I ask you,
> if the water mains didn't break, would it be my responsibility to
> fix them then? WOULD IT!?!"
>       - M. Barry, Mayor of Washington, DC
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Will Robinson" 
Newsgroups: su.class.cs244a
Subject: submit script failing (no space left on device)
Date: Wed, 22 Jan 2003 00:26:17 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: javalasers.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.Stanford.EDU 1043223975 2443 128.12.91.22 (22 Jan 2003 08:26:15 GMT)
X-Complaints-To: 
User-Agent: Pan/0.13.3 (That cat's something I can't explain)
Xref: shelby.stanford.edu su.class.cs244a:3912

I'm trying to submit my hw1, but the script is failing.  Looks like the
submission directory may be over quota?  Here's the message I'm getting:

elaine14:~/cs244a/hw1> /usr/class/cs244a/bin/submit.pl hw1 rdg12
SubmitBase: /afs/ir/class/cs244a/submissions
Debug Level = 0
mkdir /afs/ir/class/cs244a/submissions/grading/hw1/rdg12/wsr23
mkdir /afs/ir/class/cs244a/submissions/grading/hw1/rdg12/wsr23: 
   No space left on device at /usr/class/cs244a/bin/submit.pl line 133
elaine14:~/cs244a/hw1>

Please let me know ASAP if anyone else has seen this sort of thing...

Will Robinson
.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: Re: Dealing with LIST
Date: Wed, 22 Jan 2003 00:55:28 -0800
Lines: 35
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043225729 18991 128.12.196.91 (22 Jan 2003 08:55:29 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3913

However, not all of the servers display the permission info when you do the
LIST. So, you can't really parse the permission for every server.

"Ted Unangst"  wrote in message

> On Tue, 21 Jan 2003, Toliver Jue wrote:
>
> > When I get to the /pub directory, and LIST, I get such directories as:
> >
> > drwxr-x---   2 ftpuser  ftpusers      8192 Jan 11 17:34 symantec
> > drwxr-x---   2 ftpuser  ftpusers       512 Nov  5 14:37 pinnaclesys
> >
> > When I try to run LIST on them, i get this over the control connection:
> > 150 Opening ASCII mode data connection for /bin/ls.
> >
> > AND this over the data connection:
> > ./pub/symantec/: Permission denied
> >
> > Was there a way to tell that permission was denied in the first place?
> > Has anyone else attempted this site?  Thanks for any help/info.
>
> you could try parsing the permission info in the first listing.  look for
> the string "---", but it's not foolproof.  If you try a CWD before LIST,
> it will responsd with an error code, too.
>
>
>
> --
> "People blame me because these water mains break, but I ask you,
> if the water mains didn't break, would it be my responsibility to
> fix them then? WOULD IT!?!"
>       - M. Barry, Mayor of Washington, DC
>


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: submit script failing (no space left on device)
Date: Wed, 22 Jan 2003 08:55:48 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043225748 18995 171.64.15.106 (22 Jan 2003 08:55:48 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3914


>I'm trying to submit my hw1, but the script is failing.  Looks like the
>submission directory may be over quota?  Here's the message I'm getting:

I've contacted the leland folks to see if they can fix things ASAP.

.

Path: shelby.stanford.edu!not-for-mail
From: Kirk Phelps 
Newsgroups: su.class.cs244a
Subject: ftp.fedworld.gov non-compliant??
Date: Wed, 22 Jan 2003 00:56:33 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine19.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043225793 19021 171.64.15.84 (22 Jan 2003 08:56:33 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3915

Hi-
Has anyone else noticed that ftp.fedworld.gov returns a 1036 byte
greeting, which I think is illegal under the spec, since "no NVT string
will be longer than 1024 bytes".  This is an easy #define fix, but I was
wondering if I am interpreting the problem assignment correctly...
Thanks.
-Kirk
.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: purify question - 'access error'
Date: Wed, 22 Jan 2003 08:56:49 +0000 (UTC)
Lines: 20
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043225809 19030 171.64.15.106 (22 Jan 2003 08:56:49 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3916


>I have the following FIUs, which I'm thinking are ok.  Is this right?

Yeah, those are fine (and all are ignored by the testing script).

>FIU: file descriptor 0: <stdin>
>FIU: file descriptor 1: <stdout>
>FIU: file descriptor 2: <stderr>
>FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
>   * File info: ?r--r--r--  1 root     root             0 May 10  2002
>   * This file descriptor was allocated from:
> __open64       [libc.so.1]
>      _open64        [libc.so.1]
>      _nsc_trydoorcall [libc.so.1]
>    _door_gethostbyname_r [gethostby_door.c]
>        _get_hostserv_inetnetdir_byname [netdir_inet.c]
> gethostbyname_r [gethostbyname_r.c]
>FIU: file descriptor 26: <reserved for Purify internal use>
>FIU: file descriptor 27: <reserved for Purify internal use>

.

Path: shelby.stanford.edu!not-for-mail
From: "Garry Tan" 
Newsgroups: su.class.cs244a
Subject: Re: test script ftpd not working?
Date: Wed, 22 Jan 2003 00:57:14 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: goggles.stanford.edu
X-Trace: news.Stanford.EDU 1043225834 19042 128.12.71.65 (22 Jan 2003 08:57:14 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3917

THIS REALLY SUCKS. The test script refuses to proceed past this point.

I am certain that it SHOULD work, simply because I can perform this step
manually without having anything hang or crash.

I can run:
cd /usr/class/cs244a/grading_script/hw1_special_cases
/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd

and then
ftpcopy ext 1 

and have it run without a hitch, perfectly as desired. Files are properly
downloaded and nothing hangs.

Anyone running into this problem? It sucks because if the test script fails,
I know it would make it a nightmare to grade. Does anyone have any ideas
about what I could do? I only have 1 test script submit left today (its due
today at 5pm)...


> /afs/ir.stanford.edu/users/g/a/garry/cs244a/hw1/src/grading_src/build
> Starting local ftpd: cd
/usr/class/cs244a/grading_script/hw1_special_cases;
> /usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd 2>
>
/afs/ir.stanford.edu/users/g/a/garry/cs244a/hw1/src/grading_src/build/.ftpd_
> port&
> ftpd running on port 65457
> Testing special case:  ../ftpcopy ext 1 
>
> It just hangs at this point. Is anyone else encountering this issue? I try
> to ftp to elaine20.stanford.edu (the computer i was logged into) at port
> 65457 using another ftp client, and the server doesn't seem to be
> responding, it just hangs (connects but doesn't reply)...
>
>
>
>


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Can't run test script
Date: Wed, 22 Jan 2003 08:58:37 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043225917 19081 171.64.15.106 (22 Jan 2003 08:58:37 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3918



>For some reason, I cannot run the test script. I'm an SCPD student
>and the error I get is

>Test record directory /afs/ir/class/cs244a/grading_script/student/aseems
>does not exist!
>couldn't submit code for testing

Your case should be fixed.  For anyone else encountering this problem,
the directories are created by syncing (manually) every so often with the
results of the TA assignments.  So if you haven't assigned yourself a TA,
or have only got around to this very recently, chances are that this
directory wouldn't have been created yet.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Dealing with LIST
Date: Wed, 22 Jan 2003 09:02:33 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043226153 19208 171.64.15.106 (22 Jan 2003 09:02:33 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3919


>In my implementation, I never use the CWD, since I don't think it is
>required.  Rather, I always put the full path name as the argument to
>LIST.  Any other thoughts?

CWD would be the normal (and probably authoritative) way to do what you
want.

I wonder if the rwx--- are meaningful if you're ftping to something running
AFS; I guess it's conceivable you could run into ACLs rather than than
Unix style permission bits, in which case CWD would probably be the more
portable way of finding out ahead of time whether you had permission to
retrieve the directory listing.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test script ftpd not working?
Date: Wed, 22 Jan 2003 09:05:25 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043226325 19266 171.64.15.106 (22 Jan 2003 09:05:26 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3920


Can you let me know where your code is so I can take a look at it?
(I'm not sure if I'll have a chance to get to it before the submission
deadline, but it would at least be helpful for the future).

I don't have a clue why it would fail in the script and not at the
command line; my (admittedly biased) experience has been that the scripts
are pretty reliable.

.

Path: shelby.stanford.edu!elaine10.Stanford.EDU!mingying
From: Mingying Chen 
Newsgroups: su.class.cs244a
Subject: 553 reply from ftp.cs.stanford.edu
Date: Wed, 22 Jan 2003 01:06:16 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine10.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043226378 19285 171.64.15.75 (22 Jan 2003 09:06:18 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3921

Hi,

I remember TA asks us to report any instance of 553 reply code, so I
post one here. It is from ftp.cs.stanford.edu, for file permission denied.
(I guess ftp.cs.stanford.edu just use 553 instead of 550)

One example is when try to RETR pub/sec/john-1.5.tar.gz, of which third
party doesn't have permission, 553 is returned.

For now I just add 553-checking anywhere I have to check for 550, but I am
not sure this will not introduce any conflicts in the grading tests.

Mingying


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: ftp.fedworld.gov non-compliant??
Date: Wed, 22 Jan 2003 09:07:46 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043226466 19311 171.64.15.106 (22 Jan 2003 09:07:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3922


>Has anyone else noticed that ftp.fedworld.gov returns a 1036 byte
>greeting, which I think is illegal under the spec, since "no NVT string
>will be longer than 1024 bytes".  This is an easy #define fix, but I was
>wondering if I am interpreting the problem assignment correctly...

The original wording was rather poor; an NVT string (i.e. a sequence of
bytes up to the \r\n terminator) can be assumed to be 1024 bytes or less,
but a full response may exceed this.  [N.B. this contradicts the assumption
stated in last year's newsgroup].

We won't be testing against this case (this year) since we only discovered
the error in wording quite recently.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 553 reply from ftp.cs.stanford.edu
Date: Wed, 22 Jan 2003 09:09:12 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043226552 19351 171.64.15.106 (22 Jan 2003 09:09:12 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3923



>I remember TA asks us to report any instance of 553 reply code, so I
>post one here. It is from ftp.cs.stanford.edu, for file permission denied.
>(I guess ftp.cs.stanford.edu just use 553 instead of 550)

>One example is when try to RETR pub/sec/john-1.5.tar.gz, of which third
>party doesn't have permission, 553 is returned.

>For now I just add 553-checking anywhere I have to check for 550, but I am
>not sure this will not introduce any conflicts in the grading tests.

There shouldn't be a problem with this approach.  However, during grading,
we'll be sure not to test against this particular server anyway.

.

Path: shelby.stanford.edu!not-for-mail
From: Kirk Phelps 
Newsgroups: su.class.cs244a
Subject: Re: submit script failing (no space left on device)
Date: Wed, 22 Jan 2003 02:06:17 -0800
Lines: 8
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine19.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043229977 21065 171.64.15.84 (22 Jan 2003 10:06:17 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3924

I have this problem as well...

Matthew Jonathan Holliman wrote:
> 
> >I'm trying to submit my hw1, but the script is failing.  Looks like the
> >submission directory may be over quota?  Here's the message I'm getting:
> 
> I've contacted the leland folks to see if they can fix things ASAP.
.

Path: shelby.stanford.edu!not-for-mail
From: Keaka Jackson 
Newsgroups: su.class.cs244a
Subject: Re: Can't run test script
Date: Wed, 22 Jan 2003 03:10:16 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043233817 22649 171.64.15.81 (22 Jan 2003 11:10:17 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3925

I can't run the test script either, it appears their volume is out of
space!  I get the following error: 
can't create test record in
/afs/ir/class/cs244a/grading_script/student/keaka! (No space left on
device)
couldn't submit code for testing

TA's help!!!

keaka

Aseem Sharma wrote:
> 
> Hi Guys,
> 
> For some reason, I cannot run the test script. I'm an SCPD student
> and the error I get is
> 
> Test record directory /afs/ir/class/cs244a/grading_script/student/aseems
> does not exist!
> couldn't submit code for testing
> 
> clues ??
> 
> Aseem
.

Path: shelby.stanford.edu!saga20.Stanford.EDU!mbillens
From: Matthew Billenstein 
Newsgroups: su.class.cs244a
Subject: Re: Can't run test script
Date: Wed, 22 Jan 2003 04:07:45 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga20.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043237267 24154 171.64.15.150 (22 Jan 2003 12:07:47 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3926


Delete some files from your home directory...

m


On Wed, 22 Jan 2003, Keaka Jackson wrote:

> I can't run the test script either, it appears their volume is out of
> space!  I get the following error:
> can't create test record in
> /afs/ir/class/cs244a/grading_script/student/keaka! (No space left on
> device)
> couldn't submit code for testing
>
> TA's help!!!
>
> keaka
>
> Aseem Sharma wrote:
> >
> > Hi Guys,
> >
> > For some reason, I cannot run the test script. I'm an SCPD student
> > and the error I get is
> >
> > Test record directory /afs/ir/class/cs244a/grading_script/student/aseems
> > does not exist!
> > couldn't submit code for testing
> >
> > clues ??
> >
> > Aseem
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Georg Petschnigg" 
Newsgroups: su.class.cs244a
Subject: Re: submit script failing (no space left on device)
Date: Wed, 22 Jan 2003 04:44:12 -0800
Lines: 22
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: georgp.stanford.edu
X-Trace: news.Stanford.EDU 1043239454 25951 128.12.181.68 (22 Jan 2003 12:44:14 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3927

I can't seem to submit my code either:

"can't create test record in
/afs/ir/class/cs244a/grading_script/student/georgp! (No space left on
device)
couldn't submit code for testing"

Bummer - I had planned to run my tests now....

Georg


"Matthew Jonathan Holliman"  wrote in message

>
> >I'm trying to submit my hw1, but the script is failing.  Looks like the
> >submission directory may be over quota?  Here's the message I'm getting:
>
> I've contacted the leland folks to see if they can fix things ASAP.
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Mike Ching" 
Newsgroups: su.class.cs244a
Subject: Test script failing
Date: Wed, 22 Jan 2003 05:34:56 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: starbase.stanford.edu
X-Trace: news.Stanford.EDU 1043242489 27143 128.12.141.50 (22 Jan 2003 13:34:49 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3928

Similar to the submission problem, it looks like we are out of disk space to
run the testcases.  I am getting the following error:

can't create test record in
/afs/ir/class/cs244a/grading_script/student/ching! (No space left on device)
couldn't submit code for testing

I just added some comments in preparation for submitting.  I would like
to run the test script one more time to make sure I didn't
screw up the code by accident when commenting!

Mike


.

Path: shelby.stanford.edu!not-for-mail
From: "Ramesh Balakrishnan" 
Newsgroups: su.class.cs244a
Subject: Still can't run test scripts
Date: Wed, 22 Jan 2003 06:10:36 -0800
Lines: 39
Distribution: su
Message-ID: 
NNTP-Posting-Host: boltblaster.stanford.edu
X-Trace: news.Stanford.EDU 1043244637 27993 128.12.71.90 (22 Jan 2003 14:10:37 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3929

I'm getting the same error that the previous few posts mentioned.

What's worse is that I haven't run the scripts even once so far (I know, I
know... should have started earlier). Still, I'd like to be able to run the
scripts and have enough time left over to fix whatever bugs come up.

-Ramesh

/*
fable18:~/cs244a/a2> /afs/ir/class/cs244a/bin/test_code.pl hw1 Makefile *.c
*.h
Creating submission tarball...
Makefile
ftopcopy.c
ftpcopy.c
ftpparse.c
ftpcopy.h
ftpparse.h

Starting...
Test B, new source tree required, extracting into grading_src/build...
Makefile
ftopcopy.c
ftpcopy.c
ftpparse.c
ftpcopy.h
ftpparse.h

Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 3 test attempts applies (from Jan 20 onwards).
You've used 0 test attempt(s) so far today.
can't create test record in
/afs/ir/class/cs244a/grading_script/student/rameshb! (No space left on
device)
couldn't submit code for testing
*/


.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!gcs
From: Giri Sreenivas 
Newsgroups: su.class.cs244a
Subject: problems running script
Date: Wed, 22 Jan 2003 06:35:50 -0800
Lines: 34
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043246152 28431 171.64.15.66 (22 Jan 2003 14:35:52 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3930

i too am having problems running the test script. i still have 5 runs
available to me, however, i receive the following error:

elaine26:~/private/cs244a> /afs/ir/class/cs244a/bin/test_code.pl hw1
Makefile *.c *.h
Creating submission tarball...
Makefile
darray.c
ftpcopy.c
ftpparse.c
scanner.c

Starting...
Test B, new source tree required, extracting into grading_src/build...
Makefile
darray.c
ftpcopy.c
ftpparse.c
scanner.c

Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 3 test attempts applies (from Jan 20 onwards).
You've used 0 test attempt(s) so far today.
can't create test record in
/afs/ir/class/cs244a/grading_script/student/gcs! (No space left on device)
couldn't submit code for testing

I'd like to have the script runs to verify my program and time to fix any
bugs that arise.

Giri


.

Path: shelby.stanford.edu!not-for-mail
From: "Chip Hunter" 
Newsgroups: su.class.cs244a
Subject: Re: problems running script
Date: Wed, 22 Jan 2003 07:29:53 -0800
Lines: 40
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dn800c6008.stanford.edu
X-Trace: news.Stanford.EDU 1043249587 29551 128.12.96.8 (22 Jan 2003 15:33:07 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3931

I have the same problem...

"Giri Sreenivas"  wrote in message

> i too am having problems running the test script. i still have 5 runs
> available to me, however, i receive the following error:
>
> elaine26:~/private/cs244a> /afs/ir/class/cs244a/bin/test_code.pl hw1
> Makefile *.c *.h
> Creating submission tarball...
> Makefile
> darray.c
> ftpcopy.c
> ftpparse.c
> scanner.c
>
> Starting...
> Test B, new source tree required, extracting into grading_src/build...
> Makefile
> darray.c
> ftpcopy.c
> ftpparse.c
> scanner.c
>
> Can't find a matching key for this test run.
> Would you like to generate a new one?  (y/n):  y
> Daily quota of 3 test attempts applies (from Jan 20 onwards).
> You've used 0 test attempt(s) so far today.
> can't create test record in
> /afs/ir/class/cs244a/grading_script/student/gcs! (No space left on device)
> couldn't submit code for testing
>
> I'd like to have the script runs to verify my program and time to fix any
> bugs that arise.
>
> Giri
>
>


.

Path: shelby.stanford.edu!epic9.Stanford.EDU!sansari
From: Saad Salman Ansari 
Newsgroups: su.class.cs244a
Subject: Unable to submit
Date: Wed, 22 Jan 2003 09:26:24 -0800
Lines: 24
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043256385 2787 171.64.15.42 (22 Jan 2003 17:26:25 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3932

Hi.
When I try to run the submit script it tells me its out of space. What am
I supposed to do? I'm getting the following reply:

SubmitBase: /afs/ir/class/cs244a/submissions
Debug Level = 0
mkdir /afs/ir/class/cs244a/submissions/grading/hw1/holliman/sansari
mkdir /afs/ir/class/cs244a/submissions/grading/hw1/holliman/sansari: No
space left on device at /usr/class/cs244a/bin/submit line 133


ps. in the deliverables section of the assignment handout, it states that
the submission program will require *.c source code. That doesn't mean
that it will skip the *.h files right(unlike the test script?) Also the
submission command given in the handout is :

/usr/class/cs244a/bin/submit TA hw1

but i think it should be:

/usr/class/cs244a/bin/submit hw1 TA

thanks!

.

Path: shelby.stanford.edu!not-for-mail
From: Keaka Jackson 
Newsgroups: su.class.cs244a
Subject: Re: Can't run test script
Date: Wed, 22 Jan 2003 09:39:58 -0800
Lines: 46
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: keaka.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043257199 3221 128.12.173.113 (22 Jan 2003 17:39:59 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3933

I have over 100 MB available in my home directory!!  Surely the test 
script doesn't require that much space (since we only have 50MB of quota 
for cs244a)?!!  And the script complains that there is no space in the 
class directory, not mine.  Although I should have started the project 
earlier, I haven't run the test script at all and would really like to 
before it's due!  Please help!

keaka

Matthew Billenstein wrote:
> Delete some files from your home directory...
> 
> m
> 
> 
> On Wed, 22 Jan 2003, Keaka Jackson wrote:
> 
> 
>>I can't run the test script either, it appears their volume is out of
>>space!  I get the following error:
>>can't create test record in
>>/afs/ir/class/cs244a/grading_script/student/keaka! (No space left on
>>device)
>>couldn't submit code for testing
>>
>>TA's help!!!
>>
>>keaka
>>
>>Aseem Sharma wrote:
>>
>>>Hi Guys,
>>>
>>>For some reason, I cannot run the test script. I'm an SCPD student
>>>and the error I get is
>>>
>>>Test record directory /afs/ir/class/cs244a/grading_script/student/aseems
>>>does not exist!
>>>couldn't submit code for testing
>>>
>>>clues ??
>>>
>>>Aseem
>>
> 

.

Path: shelby.stanford.edu!elaine16.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Re: Can't run test script
Date: Wed, 22 Jan 2003 10:16:37 -0800
Lines: 57
Distribution: su
Message-ID: 
References: 
  
 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043259400 4341 171.64.15.81 (22 Jan 2003 18:16:40 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3934

Ditto on the broken test script..would really like to be able to run this
stuff some more before the due time.

-Tim

On Wed, 22 Jan 2003, Keaka Jackson wrote:

> I have over 100 MB available in my home directory!!  Surely the test
> script doesn't require that much space (since we only have 50MB of quota
> for cs244a)?!!  And the script complains that there is no space in the
> class directory, not mine.  Although I should have started the project
> earlier, I haven't run the test script at all and would really like to
> before it's due!  Please help!
>
> keaka
>
> Matthew Billenstein wrote:
> > Delete some files from your home directory...
> >
> > m
> >
> >
> > On Wed, 22 Jan 2003, Keaka Jackson wrote:
> >
> >
> >>I can't run the test script either, it appears their volume is out of
> >>space!  I get the following error:
> >>can't create test record in
> >>/afs/ir/class/cs244a/grading_script/student/keaka! (No space left on
> >>device)
> >>couldn't submit code for testing
> >>
> >>TA's help!!!
> >>
> >>keaka
> >>
> >>Aseem Sharma wrote:
> >>
> >>>Hi Guys,
> >>>
> >>>For some reason, I cannot run the test script. I'm an SCPD student
> >>>and the error I get is
> >>>
> >>>Test record directory /afs/ir/class/cs244a/grading_script/student/aseems
> >>>does not exist!
> >>>couldn't submit code for testing
> >>>
> >>>clues ??
> >>>
> >>>Aseem
> >>
> >
>
>



.

Path: shelby.stanford.edu!epic4.Stanford.EDU!smadhura
From: Madhura Sudhakar Sharangpani 
Newsgroups: su.class.cs244a
Subject: Unable to submit assignment
Date: Wed, 22 Jan 2003 10:17:21 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043259442 4402 171.64.15.37 (22 Jan 2003 18:17:22 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3935

Hi
I am having same problem mentioned before.
I can not submit the assignment,
I get error

SubmitBase: /afs/ir/class/cs244a/submissions
Debug Level = 0
mkdir /afs/ir/class/cs244a/submissions/grading/hw1/rdg12/smadhura
mkdir /afs/ir/class/cs244a/submissions/grading/hw1/rdg12/smadhura: No
space left on device at /usr/class/cs244a/bin/submit.pl line 133

while submitting
My TA is Russell Greene

Madhura.


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: can't submit
Date: Wed, 22 Jan 2003 18:19:01 +0000 (UTC)
Organization: Stanford University
Lines: 2
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic28.stanford.edu
X-Trace: news.Stanford.EDU 1043259541 4455 171.64.15.59 (22 Jan 2003 18:19:01 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3936


device full
.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Scripts back up again...
Date: Wed, 22 Jan 2003 18:52:19 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1043261539 5841 171.64.15.77 (22 Jan 2003 18:52:19 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3937

Everyone,

the test and submit scripts were down this morning due to the fact that we ran out of quota. This is 
fixed now and everything should work as usual. Apologies for any inconvenience!

  Guido
.

Path: shelby.stanford.edu!saga3.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: assigmnent 2 questions
Date: Wed, 22 Jan 2003 11:04:20 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043262263 6378 171.64.15.133 (22 Jan 2003 19:04:23 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3938

1) the spec states that we should send data as soon as data is available
from the application. Does this mean we send data as soon data is
available regardless of whether we get ACKs from the previously sent data
(as long as we remain in the receiver's window)? Or, can we wait for an
ACK before sending the next segment although there may still be data
pending from the app.

2) regarding:
STCP treats application data as a stream. This means that no artificial
boundaries are imposed on the data by the transport layer. If a host calls
transport_write() twice with 256 bytes each time, and then the peer calls
transport_read() with a buffer of 512 bytes, it will receive all 512 bytes
of available data, not just the first 256 bytes. It is STCP's job to break
up the data into packets and reassemble the data on the other side.

Does this mean if an app on one host writes twice with 256 bytes each time
then the other app should read all 512 bytes of data with 512 byte buffer?

.

Path: shelby.stanford.edu!not-for-mail
From: Keaka Jackson 
Newsgroups: su.class.cs244a
Subject: Re: Scripts back up again...
Date: Wed, 22 Jan 2003 11:29:23 -0800
Lines: 47
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043263763 7150 171.64.15.83 (22 Jan 2003 19:29:23 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3939

Now I get the following error when trying to run the test script:
Usage: TestKey::check_key(s) at StudentTestManager.pm line 108, <STDIN>
line 1.
couldn't submit code for testing

An earlier newsgroup post suggested that submitting binaries causes this
problem, but I am only submitting text files.  Has anybody else seen
this?  Any suggestions?  Here's the rest of the script output:

/afs/ir/class/cs244a/bin/test_code.pl hw1 Makefile *.c *.h .purify
purify.output 
Creating submission tarball...
Makefile
ftpcopy.c
ftpparse.c
ftpparse.h
..purify
purify.output

Starting...
Test B, new source tree required, extracting into grading_src/build...
Makefile
ftpcopy.c
ftpparse.c
ftpparse.h
..purify
purify.output
Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 3 test attempts applies (from Jan 20 onwards).
You've used 0 test attempt(s) so far today.
Usage: TestKey::check_key(s) at StudentTestManager.pm line 108, <STDIN>
line 1.
couldn't submit code for testing


Thanks, 
Keaka

Guido Appenzeller wrote:
> 
> Everyone,
> 
> the test and submit scripts were down this morning due to the fact that we ran out of quota. This is
> fixed now and everything should work as usual. Apologies for any inconvenience!
> 
>   Guido
.

Path: shelby.stanford.edu!not-for-mail
From: Keaka Jackson 
Newsgroups: su.class.cs244a
Subject: Re: Scripts back up again...
Date: Wed, 22 Jan 2003 11:39:33 -0800
Lines: 54
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine18.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043264373 7326 171.64.15.83 (22 Jan 2003 19:39:33 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3940

Oops, nevermind, I'm a dope. The earlier newsgroup post on this topic
also suggests that zero length files are a prob, and since my .purify
was empty, the script wasn't happy.

-keaka

Keaka Jackson wrote:
> 
> Now I get the following error when trying to run the test script:
> Usage: TestKey::check_key(s) at StudentTestManager.pm line 108, <STDIN>
> line 1.
> couldn't submit code for testing
> 
> An earlier newsgroup post suggested that submitting binaries causes this
> problem, but I am only submitting text files.  Has anybody else seen
> this?  Any suggestions?  Here's the rest of the script output:
> 
> /afs/ir/class/cs244a/bin/test_code.pl hw1 Makefile *.c *.h .purify
> purify.output
> Creating submission tarball...
> Makefile
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> .purify
> purify.output
> 
> Starting...
> Test B, new source tree required, extracting into grading_src/build...
> Makefile
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> .purify
> purify.output
> Can't find a matching key for this test run.
> Would you like to generate a new one?  (y/n):  y
> Daily quota of 3 test attempts applies (from Jan 20 onwards).
> You've used 0 test attempt(s) so far today.
> Usage: TestKey::check_key(s) at StudentTestManager.pm line 108, <STDIN>
> line 1.
> couldn't submit code for testing
> 
> Thanks,
> Keaka
> 
> Guido Appenzeller wrote:
> >
> > Everyone,
> >
> > the test and submit scripts were down this morning due to the fact that we ran out of quota. This is
> > fixed now and everything should work as usual. Apologies for any inconvenience!
> >
> >   Guido
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!mingying
From: Mingying Chen 
Newsgroups: su.class.cs244a
Subject: could not run purify'ed exe
Date: Wed, 22 Jan 2003 11:56:05 -0800
Lines: 47
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine40.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043265370 7939 171.64.15.115 (22 Jan 2003 19:56:10 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3941

Hi,

I ran the test script this morning. In Test M, I got the following
problem:

--------------------------------------------------------------------
Test M, using current source tree and build
make ftpcopy.purify
purify -cache-dir=/tmp/mingying  gcc -g -O0 -ansi -Wall -DSOLARIS  -o
ftpcopy.purify  ftpparse.o ftperror.o ftpcopy.o -lsocket -lnsl
Purify 2002a.06.00 Solaris 2 (32-bit) Copyright (C) 1992-2002 Rational
Software Corp.  All rights reserved.
Instrumenting: crt1.o crti.o values-Xc.o crtbegin.o ftpparse.o ftperror.o
ftpcopy.o libsocket.so.1 libnsl.so.1
libgcc.a....................................................... libc.so.1
crtend.o crtn.o libdl.so.1 libmp.so.2 libc_psr.so.1  Linking

Running purify'ed executable:  ./ftpcopy.purify txt 1 ftp.microsoft.com
Could not run purify'ed exe: Purify 2002a.06.00 Solaris 2 (32-bit)
Copyright (C) 1992-2002 Rational Software Corp.  All rights reserved.
Instrumenting: nss_files.so.1 Done.

ERROR: Failed to read from socket.

Test N, using current source tree and build
make ftpcopy.purify
make: `ftpcopy.purify' is up to date.

Running purify'ed executable:  ./ftpcopy.purify txt 1 ftp.microsoft.com
Test O, using current source tree and build
make ftpcopy.purify
make: `ftpcopy.purify' is up to date.
----------------------------------------------------------------------

Seems the problem is "Could not run purify'ed exe" so I got an error on
socket read. (I haven't touched the socket read part of code after my last
test run, which passed the test.) While in this same run, for later two
tests, purify seemed run fine. Then I mannually tested the same command
../ftpcopy.purify txt 1 ftp.microsoft.com, everything is fine.

I have never seen such an error message before. Anybody experienced please
help. Since I only have two chances of testing left, I would appreciate
to get some clue before proceed.

Thanks.
Mingying

.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: could not run purify'ed exe
Date: Wed, 22 Jan 2003 20:48:58 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine7.stanford.edu
X-Trace: news.Stanford.EDU 1043268538 9665 171.64.15.72 (22 Jan 2003 20:48:58 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3942


>Seems the problem is "Could not run purify'ed exe" so I got an error on
>socket read. (I haven't touched the socket read part of code after my last
>test run, which passed the test.) While in this same run, for later two
>tests, purify seemed run fine. Then I mannually tested the same command
>./ftpcopy.purify txt 1 ftp.microsoft.com, everything is fine.

It may be an intermittent problem, e.g. a race condition you find only
on that particular server.  If you repeat the test multiple times (both
in the shell and using the scripts), does it fail at other times?

.

Path: shelby.stanford.edu!elaine16.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Testing Script: What constitutes an "inaccessible file"?
Date: Wed, 22 Jan 2003 13:02:39 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043269362 10131 171.64.15.81 (22 Jan 2003 21:02:42 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3943

Under what conditions is a file considered to be "inaccessible" (as used
in the grading script.

Thanks,
Tim



.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Wed, 22 Jan 2003 21:03:24 +0000 (UTC)
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine7.stanford.edu
X-Trace: news.Stanford.EDU 1043269404 10151 171.64.15.72 (22 Jan 2003 21:03:24 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3944


>1) the spec states that we should send data as soon as data is available
>from the application. Does this mean we send data as soon data is
>available regardless of whether we get ACKs from the previously sent data
>(as long as we remain in the receiver's window)? Or, can we wait for an
>ACK before sending the next segment although there may still be data
>pending from the app.

Yes, as long as you don't exceed your windows you should send data as
soon as possible.

>2) regarding:
>STCP treats application data as a stream. This means that no artificial
>boundaries are imposed on the data by the transport layer. If a host calls
>transport_write() twice with 256 bytes each time, and then the peer calls
>transport_read() with a buffer of 512 bytes, it will receive all 512 bytes
>of available data, not just the first 256 bytes. It is STCP's job to break
>up the data into packets and reassemble the data on the other side.

>Does this mean if an app on one host writes twice with 256 bytes each time
>then the other app should read all 512 bytes of data with 512 byte buffer?

Yes, exactly as TCP would.
.

Path: shelby.stanford.edu!not-for-mail
From: wmagrath 
Newsgroups: su.class.cs244a
Subject: Re: testing script/Purify
Date: Wed, 22 Jan 2003 13:19:22 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
Reply-To:  
NNTP-Posting-Host: dn800cb906.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043270396 10718 128.12.185.6 (22 Jan 2003 21:19:56 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3945

I am running the test script from my directory which definitely has a 
..purify and purify.output file, yet I still fail Test M because there is 
an error parsing grade.purify.output: "grade.purify.output: No such file 
or directory".  When I look into the grading_src/build directory created 
by the test, there is no grade.purify.output file, but there is a 
purify.output file.  There are also purify object files, so it is able 
to compile ftpcopy.purify, and it doesn't seem to have any problems 
while running the ftpcopy.purify version.

Do other people pass this test?  Do I have a problem?

Thanks,
Bill

Matthew Jonathan Holliman wrote:

>A couple of people asked why the test script wasn't picking up their .purify
>or purify.output files, and was thus failing them on one or two of the later
>test cases.  So here's some clarification.
>
>The script takes whatever files you indicate--source files, Makefiles, etc.--
>and just copies them to a temporary directory (grading_src in your current
>working directory), where it runs all the tests.  So if you omit something
>like purify.output, it just ignores it.
>
>  
>

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!mingying
From: Mingying Chen 
Newsgroups: su.class.cs244a
Subject: Re: could not run purify'ed exe
Date: Wed, 22 Jan 2003 14:05:45 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine40.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043273147 12078 171.64.15.115 (22 Jan 2003 22:05:47 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3946

Yeah, that may be the case. I ran the test script again and ran in shell
several times. Now everything works fine. Thanks.

Mingying


On Wed, 22 Jan 2003, Matthew Jonathan Holliman wrote:

>
> >Seems the problem is "Could not run purify'ed exe" so I got an error on
> >socket read. (I haven't touched the socket read part of code after my last
> >test run, which passed the test.) While in this same run, for later two
> >tests, purify seemed run fine. Then I mannually tested the same command
> >./ftpcopy.purify txt 1 ftp.microsoft.com, everything is fine.
>
> It may be an intermittent problem, e.g. a race condition you find only
> on that particular server.  If you repeat the test multiple times (both
> in the shell and using the scripts), does it fail at other times?
>
>

.

Path: shelby.stanford.edu!elaine16.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Testing Script: What constitutes an "inaccessible file"?
Date: Wed, 22 Jan 2003 22:59:09 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine16.stanford.edu
X-Trace: news.Stanford.EDU 1043276349 13836 171.64.15.81 (22 Jan 2003 22:59:09 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3947


>Under what conditions is a file considered to be "inaccessible" (as used
>in the grading script.

A file for which you have no permissions to download.

.

Path: shelby.stanford.edu!elaine16.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: testing script/Purify
Date: Wed, 22 Jan 2003 23:01:17 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine16.stanford.edu
X-Trace: news.Stanford.EDU 1043276477 13925 171.64.15.81 (22 Jan 2003 23:01:17 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3948


>I am running the test script from my directory which definitely has a 
>.purify and purify.output file, yet I still fail Test M because there is 
>an error parsing grade.purify.output: "grade.purify.output: No such file 
>or directory".  When I look into the grading_src/build directory created 
>by the test, there is no grade.purify.output file, but there is a 
>purify.output file.  There are also purify object files, so it is able 
>to compile ftpcopy.purify, and it doesn't seem to have any problems 
>while running the ftpcopy.purify version.

>Do other people pass this test?  Do I have a problem?

Yes.  grade.purify.output should be created by the script's running of
your ftpcopy.purify; are any error messages shown during the command
execution?  (Did you run the Purify environment setup scripts beforehand?)

.

Path: shelby.stanford.edu!elaine32.Stanford.EDU!tedu
From: Ted Unangst 
Newsgroups: su.class.cs244a
Subject: website instructions for sumbit
Date: Wed, 22 Jan 2003 15:11:42 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine32.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043277104 14250 171.64.15.107 (22 Jan 2003 23:11:44 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3949

http://www.stanford.edu/class/cs244a/project_guidelines.html says to run
/usr/class/cs244a/bin/submit TA assn# however that's backwards.
it's assn# then TA.

--
"What right does Congress have to go around making laws just
because they deem it necessary?"
      - M. Barry, Mayor of Washington, DC

.

Path: shelby.stanford.edu!not-for-mail
From: "Mike Ching" 
Newsgroups: su.class.cs244a
Subject: Problem submitting
Date: Wed, 22 Jan 2003 15:38:08 -0800
Lines: 28
Distribution: su
Message-ID: 
NNTP-Posting-Host: starbase.stanford.edu
X-Trace: news.Stanford.EDU 1043278684 15023 128.12.141.50 (22 Jan 2003 23:38:04 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3950

Can anyone give me a hand on how to submit the assignment?  What am I doing
wrong?  Thanks.

Mike


Script started on Wed Jan 22 15:33:33 2003
saga11:~/cs244a/pp1> /usr/class/cs244a/bin/submit.pl hw1 holliman

SubmitBase: /afs/ir/class/cs244a/submissions
Debug Level = 0
tar: z: unknown option
Usage: tar {txruc}[vfbFXhiBEelmopwnq[0-7]] [-k size] [tapefile] [blocksize]
[exclude-file] [-I include-file] files ...
======================================================================
Your code could not be sumitted because of some error.
If you think there is a mistake, please send an email to your TA
(holliman;  with the relevant information.
======================================================================


saga11:~/cs244a/pp1> exit

exit

script done on Wed Jan 22 15:33:47 2003


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Problem submitting
Date: Thu, 23 Jan 2003 00:17:08 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043281028 16265 171.64.15.106 (23 Jan 2003 00:17:08 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3951

>Can anyone give me a hand on how to submit the assignment?  What am I doing
>wrong?  Thanks.

It looks like you might have a different path order to most people.
Here's the output of which for me:

% which tar
/usr/pubsw/bin/tar

I've fixed the script to explicitly use this version of the program,
assuming this was the problem, so you can try again.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: website instructions for sumbit
Date: Thu, 23 Jan 2003 00:17:39 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043281059 16280 171.64.15.106 (23 Jan 2003 00:17:39 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3952


Thanks.

.

Path: shelby.stanford.edu!saga3.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Wed, 22 Jan 2003 16:26:15 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043281576 16494 171.64.15.133 (23 Jan 2003 00:26:16 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3953

>
> >2) regarding:
> >STCP treats application data as a stream. This means that no artificial
> >boundaries are imposed on the data by the transport layer. If a host calls
> >transport_write() twice with 256 bytes each time, and then the peer calls
> >transport_read() with a buffer of 512 bytes, it will receive all 512 bytes
> >of available data, not just the first 256 bytes. It is STCP's job to break
> >up the data into packets and reassemble the data on the other side.
>
> >Does this mean if an app on one host writes twice with 256 bytes each time
> >then the other app should read all 512 bytes of data with 512 byte buffer?
>
> Yes, exactly as TCP would.

In that case, should we devise a method for one peer to tell the other
that it has recieved all of the data that it wishes to send or do we wait
for the app to close the socket.

.

Path: shelby.stanford.edu!elaine43.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Thu, 23 Jan 2003 01:35:08 +0000 (UTC)
Lines: 34
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine43.stanford.edu
X-Trace: news.Stanford.EDU 1043285708 18900 171.64.15.118 (23 Jan 2003 01:35:08 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3954


>> >2) regarding:
>> >STCP treats application data as a stream. This means that no artificial
>> >boundaries are imposed on the data by the transport layer. If a host calls
>> >transport_write() twice with 256 bytes each time, and then the peer calls
>> >transport_read() with a buffer of 512 bytes, it will receive all 512 bytes
>> >of available data, not just the first 256 bytes. It is STCP's job to break
>> >up the data into packets and reassemble the data on the other side.
>>
>> >Does this mean if an app on one host writes twice with 256 bytes each time
>> >then the other app should read all 512 bytes of data with 512 byte buffer?
>>
>> Yes, exactly as TCP would.

>In that case, should we devise a method for one peer to tell the other
>that it has recieved all of the data that it wishes to send or do we wait
>for the app to close the socket.

Could you clarify your question?  I don't understand what you're asking.
(A peer STCP implementation indicates it's finished reading/writing its data
via ACKs and a final FIN--there's no need to devise another method beyond
this).

I might clarify my previous answer by pointing out that your wording of
"the other app should..." in your initial post should be
"the other app could...".

The example of the assignment description is Machine A writing 256 bytes to
machine B over an STCP connection.  Then it writes another 256 bytes.  If
Machine B is listening on the other end, and it reads N bytes (1 <= N <= 512),
it should receive N bytes; it shouldn't see two or more distinct packets,
and should have no knowledge of how your protocol packetized the data that
A sent.  This is one of the differences between a stream oriented service
like TCP (or STCP), and a datagram service like UDP.
.

Path: shelby.stanford.edu!saga3.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Wed, 22 Jan 2003 17:49:52 -0800
Lines: 5
Distribution: su
Message-ID: 
References:  
  
 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043286593 19439 171.64.15.133 (23 Jan 2003 01:49:53 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3955

I was confused about the assignment discription. Your explanation
clarified things up. Thanks a lot.

Rhea

.

Path: shelby.stanford.edu!saga3.Stanford.EDU!mingying
From: Mingying Chen 
Newsgroups: su.class.cs244a
Subject: missing submitted files
Date: Wed, 22 Jan 2003 18:22:52 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043288574 20676 171.64.15.133 (23 Jan 2003 02:22:54 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3956

Hi,

Is it possible that some of the submissions are already removed from the
class submission directory? I last submitted my hw1 at 14:31 to TA
holliman. I did check at that time to make sure my tared files are there.
But now I can no longer see my directory, while it seems everybody else's
are there. Does it happen to any other people? Would TA please look into
this issue? My login name is mingying.

Thanks.
Mingying

.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: missing submitted files
Date: Thu, 23 Jan 2003 07:48:25 +0000 (UTC)
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine27.stanford.edu
X-Trace: news.Stanford.EDU 1043308105 283 171.64.15.102 (23 Jan 2003 07:48:25 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3957



>Is it possible that some of the submissions are already removed from the
>class submission directory? I last submitted my hw1 at 14:31 to TA
>holliman. I did check at that time to make sure my tared files are there.
>But now I can no longer see my directory, while it seems everybody else's
>are there. Does it happen to any other people? Would TA please look into
>this issue? My login name is mingying.

I have absolutely no idea what happened--did anyone else have this problem?
(Your submission should be in
/usr/class/cs244a/submissions/grading/hw1/TAname/yourname/files.tar.gz)

Can you please (1) give me permissions to see your source directory
(fs sa . holliman rl in whatever directories are necessary to see it),
and (2) try resubmitting the same code now.

Sorry for the inconvenience.

.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Thu, 23 Jan 2003 00:10:06 -0800
Lines: 32
Distribution: su
Message-ID: 
References:  
  
 
NNTP-Posting-Host: elaine8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043309408 1344 171.64.15.73 (23 Jan 2003 08:10:08 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3958

On Thu, 23 Jan 2003, Matthew Jonathan Holliman wrote:

>
> The example of the assignment description is Machine A writing 256 bytes to
> machine B over an STCP connection.  Then it writes another 256 bytes.  If
> Machine B is listening on the other end, and it reads N bytes (1 <= N <= 512),
> it should receive N bytes; it shouldn't see two or more distinct packets,
> and should have no knowledge of how your protocol packetized the data that
> A sent.  This is one of the differences between a stream oriented service
> like TCP (or STCP), and a datagram service like UDP.
>

I was wondering if this is always the case or if it depends on the timing
the write and read operation take place.
If Machine in B is already listening on its end shouldn't we give it the
data as soon as it arrives? same thing if it issues the read after
the 1st packet is received but before the 2nd packet has arrived.
In other words, does calling transport_read() with a buffer of 512 mean
that we have to block until we can deliver 512 bytes worth of data?
That is not the semantics of read on a socket, is it? if we read on
a socket with a buffer of 512 we are saying that at most we can read
512 but if there's less data available we will recieve it anyway and
read will return the number of bytes read.
I would think that the example given in the assignment is only valid
for the case that both packets have been received by B's transport
layer before the application request the read.

Am I missing anything here?

Thanks
Rafa

.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: missing submitted files
Date: Thu, 23 Jan 2003 08:55:33 +0000 (UTC)
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine27.stanford.edu
X-Trace: news.Stanford.EDU 1043312133 2801 171.64.15.102 (23 Jan 2003 08:55:33 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3959



>Is it possible that some of the submissions are already removed from the
>class submission directory? I last submitted my hw1 at 14:31 to TA
>holliman. I did check at that time to make sure my tared files are there.
>But now I can no longer see my directory, while it seems everybody else's
>are there. Does it happen to any other people? Would TA please look into
>this issue? My login name is mingying.

Mystery solved--
I'd asked the leland folks to help sort out the out-of-space problems we
were running into yesterday.  They archived the class directory as part
of this process, and apparently some submissions were moved as a result,
unbeknownst to us.

Hopefully, there's nothing further for you to do; I'll move the necessary
files back over during grading.

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: Project 2: error building server.purify
Date: Thu, 23 Jan 2003 01:49:16 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043315358 4089 171.64.15.117 (23 Jan 2003 09:49:18 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3960

hi!

I did "make all.purify" on the sample code provided and tried to run
"server.purify" (by itself). the following message was returned. am I
missing something in the Makefile? I thought we did not (and should not)
mess with the Makefile that was provided at all ... :

elaine2:~/cs244a/mytcp> ./server.purify
ld.so.1: ./server.purify: fatal:
libsocket.so.1_pure_p3_c0_105022037_58_32_2171404S: open failed: No such
file or directory
Killed

thanks!

Tan

.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Thu, 23 Jan 2003 20:43:19 +0000 (UTC)
Lines: 29
Distribution: su
Message-ID: 
References:        
NNTP-Posting-Host: elaine24.stanford.edu
X-Trace: news.Stanford.EDU 1043354599 22355 171.64.15.99 (23 Jan 2003 20:43:19 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3961


>I was wondering if this is always the case or if it depends on the timing
>the write and read operation take place.

Yes, it could depend on the timing.

>If Machine in B is already listening on its end shouldn't we give it the
>data as soon as it arrives? same thing if it issues the read after
>the 1st packet is received but before the 2nd packet has arrived.
>In other words, does calling transport_read() with a buffer of 512 mean
>that we have to block until we can deliver 512 bytes worth of data?

Yes; the assignment wording is meant to suggest that you buffer and reassemble
data as it arrives and pass it up to the application unpacketized (i.e. just
writing to the local data socket through which you communicate to the app).
You'll see that localsocketpair() in transport.c actually uses a stream
socket to communicate between the parent and child process, so if the client
does myread() for 512 bytes, it may or may not wait until you've written
512 bytes to the socket--just like regular read() semantics on TCP sockets.
You don't need to worry about this; you're just responsible for correctly
reassembling the incoming byte stream and writing that to the local application
socket.

>I would think that the example given in the assignment is only valid
>for the case that both packets have been received by B's transport
>layer before the application request the read.

It probably depends on the O/S implementation; some might block until all
(or at least some amount of) data has arrived.
.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Project 2: error building server.purify
Date: Thu, 23 Jan 2003 20:57:01 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine24.stanford.edu
X-Trace: news.Stanford.EDU 1043355421 22760 171.64.15.99 (23 Jan 2003 20:57:01 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3962


>I did "make all.purify" on the sample code provided and tried to run
>"server.purify" (by itself). the following message was returned. am I
>missing something in the Makefile? I thought we did not (and should not)
>mess with the Makefile that was provided at all ... :

>elaine2:~/cs244a/mytcp> ./server.purify
>ld.so.1: ./server.purify: fatal:
>libsocket.so.1_pure_p3_c0_105022037_58_32_2171404S: open failed: No such
>file or directory
>Killed

server.purify works for me (on elaine24).  Have you run the Purify environment
set up scripts?  Does it work on other systems for you?

On the subject of the Makefile, I've fixed a couple of small bugs in it
just now, which don't affect Purify at all--so if anyone has already copied
the files, please copy the updated Makefile.  You may change the Makefile
for part (c)--and in fact, you'll need to if you use your ftpcopy for this
part of the assignment.

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Office hours start  late today
Date: Thu, 23 Jan 2003 17:40:21 -0800
Lines: 2
Distribution: su
Message-ID: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043372414 2262 171.64.74.37 (24 Jan 2003 01:40:14 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:3963

....but the TA is on his way!

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Change in office hour times...
Date: Fri, 24 Jan 2003 02:02:42 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: amy1.stanford.edu
X-Trace: news.Stanford.EDU 1043373762 3020 171.64.15.162 (24 Jan 2003 02:02:42 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:3964

Due to a scheduling conflict my office hours on Thursdays will move by an 
hour in the future. From now on they will be:

  Thursday, 6pm-7pm in Sweet Hall

  Guido
.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!inspire
From: Toliver Jue 
Newsgroups: su.class.cs244a
Subject: ANSI C Comments
Date: Thu, 23 Jan 2003 20:53:01 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine27.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043383982 9758 171.64.15.102 (24 Jan 2003 04:53:02 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3965

Are the "//" style of comments allowed in assignments, as long as the rest
of the program is in pure C?


.

Path: shelby.stanford.edu!elaine30.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: ANSI C Comments
Date: Fri, 24 Jan 2003 05:06:04 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine30.stanford.edu
X-Trace: news.Stanford.EDU 1043384764 10334 171.64.15.105 (24 Jan 2003 05:06:04 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3966


>Are the "//" style of comments allowed in assignments, as long as the rest
>of the program is in pure C?

Some ANSI C compilers won't compile this; even gcc doesn't with some flags
(maybe -ansi and -pedantic, I don't remember).  So please just stick with
C-style comments.

.

Path: shelby.stanford.edu!not-for-mail
From: "Pavan" 
Newsgroups: su.class.cs244a
Subject: network_recv blocking!
Date: Fri, 24 Jan 2003 01:11:48 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: whizkid.stanford.edu
X-Trace: news.Stanford.EDU 1043399316 17286 128.12.184.109 (24 Jan 2003 09:08:36 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:3967

Hi,

When trying to send SYN packets in transport_init, this is what I am doing:-
if it is_passive is 0,
    send a SYN packet using network_send
    wait for a SYNACK using network_recv
else if it is the passive process,
    wait for a SYN packet using network_recv
    send SYNACK

Both the processes are blocking at my call to network_recv , when i execute
the dummy server and client. What could be the mistake?

Thanx,
Pavan.


.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: network_recv blocking!
Date: Fri, 24 Jan 2003 09:33:56 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1043400836 17779 171.64.15.66 (24 Jan 2003 09:33:56 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3968


>When trying to send SYN packets in transport_init, this is what I am doing:-
>if it is_passive is 0,
>    send a SYN packet using network_send
>    wait for a SYNACK using network_recv
>else if it is the passive process,
>    wait for a SYN packet using network_recv
>    send SYNACK

>Both the processes are blocking at my call to network_recv , when i execute
>the dummy server and client. What could be the mistake?

Have you checked that your network_send() is sending the packet to
the right address (on the active side, as a result of the myconnect)?
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: PS2 Q1
Date: Fri, 24 Jan 2003 18:18:35 +0000 (UTC)
Organization: Stanford University
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine25.stanford.edu
X-Trace: news.Stanford.EDU 1043432315 1272 171.64.15.100 (24 Jan 2003 18:18:35 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3969


ifconfig will give me all the interfaces for the machine I am (elaine say) on but 
I am unable to run it on the routers. How do I find all the interfaces
for a router?
.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q1
Date: Fri, 24 Jan 2003 13:10:32 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043442635 7307 171.64.15.117 (24 Jan 2003 21:10:35 GMT)
X-Complaints-To: 
To: David Seetapun 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3970

I did it using host

Rafa


On Fri, 24 Jan 2003, David Seetapun wrote:

>
> ifconfig will give me all the interfaces for the machine I am (elaine say) on but
> I am unable to run it on the routers. How do I find all the interfaces
> for a router?
>

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: network_recv blocking!
Date: Fri, 24 Jan 2003 23:07:53 +0000 (UTC)
Organization: Stanford University
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic1.stanford.edu
X-Trace: news.Stanford.EDU 1043449673 12702 171.64.15.34 (24 Jan 2003 23:07:53 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3971


Aren't you supposed to send the SYN to the IPC they set up?

In article 
 you write:
> Hi,
> 
> When trying to send SYN packets in transport_init, this is what I am doing:-
> if it is_passive is 0,
>     send a SYN packet using network_send
>     wait for a SYNACK using network_recv
> else if it is the passive process,
>     wait for a SYN packet using network_recv
>     send SYNACK
> 
> Both the processes are blocking at my call to network_recv , when i execute
> the dummy server and client. What could be the mistake?
> 
> Thanx,
> Pavan.
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: network_recv blocking!
Date: Fri, 24 Jan 2003 15:18:02 -0800
Lines: 38
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1043450347 13098 128.12.186.92 (24 Jan 2003 23:19:07 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3972

Hi all,

Make sure to attend or watch today's review session -- as Matt wil go into
great detail into the infrastructure for assignment 2.

That should clear up many of these initial questions.  Also, don't forget
that last year's newsgroup has a ton useful info.

--Russ

"David Seetapun"  wrote in message

>
> Aren't you supposed to send the SYN to the IPC they set up?
>
> In article 
>  you write:
> > Hi,
> >
> > When trying to send SYN packets in transport_init, this is what I am
doing:-
> > if it is_passive is 0,
> >     send a SYN packet using network_send
> >     wait for a SYNACK using network_recv
> > else if it is the passive process,
> >     wait for a SYN packet using network_recv
> >     send SYNACK
> >
> > Both the processes are blocking at my call to network_recv , when i
execute
> > the dummy server and client. What could be the mistake?
> >
> > Thanx,
> > Pavan.
> >
> >


.

Path: shelby.stanford.edu!not-for-mail
From: Neil Kumar Daswani 
Newsgroups: su.class.cs244a
Subject: How to TCP Source Port?
Date: Sat, 25 Jan 2003 00:19:30 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043482770 29646 171.64.15.17 (25 Jan 2003 08:19:30 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:3973


When client.c calls myconnect() in mysock.c, the TCP destination port is
explicitly specified in the struct sockaddr * parameter.  This
information gets passed onto transport_init() and gets filled into
tcp_hdr.th_dport.

When setting up the connection with the server, how should
transport_init() choose the TCP source port to be filled into
tcp_hdr.th_sport?

Should we, for example, just make up some source port number?  Should
this source port number be selected so that it is distinct from any
other TCP port that is being used on the client?  

Is this irrelevant anyway since packets that we receive on the incoming
data socket can only be destined for the open port corresponding to that
child process?  That is, is the choice of the source port number
irrelevant since we are not required to do port de-multiplexing as we
would have to do if we were writing a "real" TCP implementation?

-- Neil
.

Date: Sat, 25 Jan 2003 10:32:36 -0800
From: Matthew Jonathan Holliman 
Message-ID: 
To: 
Subject: Re: CS244a: updated review session slides
Cc: 
Lines: 11
Newsgroups: su.class.cs244a
Organization: Stanford University Posting Gateway (mailtonews 1.3/0.42)
Path: shelby.stanford.edu!mail-to-news!elaine11.stanford.edu
Sender: 
X-Mail-Path: 
X-Original-Date: Sat, 25 Jan 2003 10:32:35 -0800 (PST)
Xref: shelby.stanford.edu su.class.cs244a:3974

> I am stuck not being able to debug my assignment because I am not able to
> follow the child process. any idea? I tried what ypu suggested in
> class..i.e sleep and all, but that didn't work either.

(1) Add sleep(10) (or something similar) in your child code after the fork()
(2) Run the server/client pair outside of gdb
(3) Do ps, and find the larger PID of the two server processes (or the two
client processes, if that's what you want to debug)
(4) Run 'gdb server PID' for the PID you found in step 3 (assuming you're
debugging the server side)
.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: How to TCP Source Port?
Date: Sat, 25 Jan 2003 19:58:32 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1043524712 15269 171.64.15.112 (25 Jan 2003 19:58:32 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3975

Take a look at getpeername() and getsockname().  Post again
if these calls don't address your need.

SteveJ


In article 
Neil Kumar Daswani   wrote:
>
>When client.c calls myconnect() in mysock.c, the TCP destination port is
>explicitly specified in the struct sockaddr * parameter.  This
>information gets passed onto transport_init() and gets filled into
>tcp_hdr.th_dport.
>
>When setting up the connection with the server, how should
>transport_init() choose the TCP source port to be filled into
>tcp_hdr.th_sport?
>
>Should we, for example, just make up some source port number?  Should
>this source port number be selected so that it is distinct from any
>other TCP port that is being used on the client?  
>
>Is this irrelevant anyway since packets that we receive on the incoming
>data socket can only be destined for the open port corresponding to that
>child process?  That is, is the choice of the source port number
>irrelevant since we are not required to do port de-multiplexing as we
>would have to do if we were writing a "real" TCP implementation?
>
>-- Neil


.

Path: shelby.stanford.edu!saga1.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Sat, 25 Jan 2003 12:37:45 -0800
Lines: 46
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043527067 16221 171.64.15.131 (25 Jan 2003 20:37:47 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3976

> >1) the spec states that we should send data as soon as data is
> >available from the application. Does this mean we send data as soon
> >data is available regardless of whether we get ACKs from the previously
> >sent data (as long as we remain in the receiver's window)? Or, can we
> >wait for an ACK before sending the next segment although there may
> >still be data pending from the app.
>
> Yes, as long as you don't exceed your windows you should send data as
> soon as possible.

I think I need some clarification on this issue. Especially wrt go-back-n.

Assume the receiver window is 3000 bytes as this example is in the
"beginning".

Let's say the sender sent 1000 bytes but hasn't heard an ACK for them.
Using go-back-n, it has retransmitted all 1000 bytes 3 times. Now the
application wishes to "write" 400 new bytes. Those should be sent out now
as 400 bytes, rather than attempting to "go back n" to send those 400 in
the context of the 1400 unacknowledged bytes?

Thus, should transmitting something the first time has a higher precedence
than retransmitting data?

And to extend this scenario, let's say that after sending out those 400
new bytes, we don't hear an ACK by the time the interrupt timeout for
bytes [0,999] comes around. (But NOT the timeout for bytes [1000,1399].)

Are we supposed to retransmit [0,999] or [0,1399] at this point?

The definition of "Go back N" suggests the latter since if it has decided
its "peer has not received the segment with sequence number 0, then it
will retransmit ALL data starting at 0, not just that segment". Is this
interpretation incorrect?

Effectively, I believe this " go back n" statement states that "when we
have received a timeout, retransmit all data starting at the beginning of
the window up through the end"?

Does somebody else have a better example to illustrate what should
happen?

thanks.

Jonathan

.

Path: shelby.stanford.edu!not-for-mail
From: "Neil Daswani" 
Newsgroups: su.class.cs244a
Subject: Re: How to TCP Source Port?
Date: Sat, 25 Jan 2003 12:47:33 -0800
Organization: Stanford University
Lines: 45
Distribution: su
Message-ID: 
References:  
Reply-To: "Neil Daswani" 
NNTP-Posting-Host: dn800cbf07.stanford.edu
X-Trace: news.Stanford.EDU 1043527128 16231 128.12.191.7 (25 Jan 2003 20:38:48 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Xref: shelby.stanford.edu su.class.cs244a:3977

I think getsockname() will give me the IP address that I need for the data
connection (comm_fd), but not the port number.  Won't getsockname() give me
back the UDP port number for the comm_fd data connection?  Should I set the
STCP source port to be the same as this UDP port number?

What do the test scripts expect this STCP source port number to be, or do
they not test for it?

-- Neil

"Steve Jacobson"  wrote in message

> Take a look at getpeername() and getsockname().  Post again
> if these calls don't address your need.
>
> SteveJ
>
>
> In article 
> Neil Kumar Daswani   wrote:
> >
> >When client.c calls myconnect() in mysock.c, the TCP destination port is
> >explicitly specified in the struct sockaddr * parameter.  This
> >information gets passed onto transport_init() and gets filled into
> >tcp_hdr.th_dport.
> >
> >When setting up the connection with the server, how should
> >transport_init() choose the TCP source port to be filled into
> >tcp_hdr.th_sport?
> >
> >Should we, for example, just make up some source port number?  Should
> >this source port number be selected so that it is distinct from any
> >other TCP port that is being used on the client?
> >
> >Is this irrelevant anyway since packets that we receive on the incoming
> >data socket can only be destined for the open port corresponding to that
> >child process?  That is, is the choice of the source port number
> >irrelevant since we are not required to do port de-multiplexing as we
> >would have to do if we were writing a "real" TCP implementation?
> >
> >-- Neil
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Noh, Jeonghun" 
Newsgroups: su.class.cs244a
Subject: th_seq of ACK packets & retransmission of ACKs.
Date: Sat, 25 Jan 2003 12:49:46 -0800
Organization: Stanford. EE
Lines: 40
Distribution: su
Message-ID: 
NNTP-Posting-Host: dnab4081de.stanford.edu
X-Trace: news.Stanford.EDU 1043527903 16612 171.64.129.222 (25 Jan 2003 20:51:43 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3978

1. In the PA#2 handout, the part of the ACK Packets says that if the ACK bit
in the flags field is set to 1, the ack_seq field contains the sequence
number of the next byte of data the receiver expects.

Does 'ack_seq' mean both th_ack and th_seq or only th_ack?

We are not allowed to piggyback data on the ack packets, ACK has no payload.
That is, the th_seq field of the ACK has no meaning at all. Is it correct?

2. Like the example in the PA#2 handout, if we assume the last
acknowledgment sent was 10 and a packet containing data with sequence number
15 of length 5 is received,

do we have to send ACK with the th_seq 10 or just suppress to produce ACKs
until we receive a packet with sequence number 10 of length 5 and send only
one ACK?

I got confused because we should send a duplicate ACK when we receive a
duped data packet, just like a normal TCP.

3. About the th_seq of ACKs
I seem to know th_ack of ACKs indicates the next byte of data the receiver
expects. What about th_seq of ACKs? Will it be the next byte of data the
receiver will send? Even though the receiver will send no data packets
except ack packets, do we have to be precise in dealing with th_seq of ACKs?

My understanding is there are 3 kinds of ACKs, SYN-ACKs, FIN-ACKs, and
ACKs(normal acks to data reception). I wonder how we should handle the last
case.

--
*********************************
Jeonghun Noh
Dept. of Electrical Engineering
Stanford University
Tel : 1-650-497-6665

*********************************


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Question about termination
Date: Sat, 25 Jan 2003 17:09:44 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043543366 22540 128.12.195.69 (26 Jan 2003 01:09:26 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3979

Hi,

After the application requested a connection close, the child gets a zero
from reading on the localpipe, and it then sends the FIN packet. Say there
are still 1000 bytes that the peer has not acknowledged yet, should we wait
around for the outstanding bytes to be acknowledged before sending the FIN?
(and if there is loss in those 1000 bytes, do we retransmit before sending
the FIN?)

-myl


.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Sun, 26 Jan 2003 01:44:28 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 77
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1043545468 23480 171.64.15.111 (26 Jan 2003 01:44:28 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3980

Comments below:

In article 
Jonathan D Herbach   wrote:
>> >1) the spec states that we should send data as soon as data is
>> >available from the application. Does this mean we send data as soon
>> >data is available regardless of whether we get ACKs from the previously
>> >sent data (as long as we remain in the receiver's window)? Or, can we
>> >wait for an ACK before sending the next segment although there may
>> >still be data pending from the app.
>>
>> Yes, as long as you don't exceed your windows you should send data as
>> soon as possible.
>
>I think I need some clarification on this issue. Especially wrt go-back-n.
>
>Assume the receiver window is 3000 bytes as this example is in the
>"beginning".
>
>Let's say the sender sent 1000 bytes but hasn't heard an ACK for them.
>Using go-back-n, it has retransmitted all 1000 bytes 3 times. Now the
>application wishes to "write" 400 new bytes. Those should be sent out now
>as 400 bytes, rather than attempting to "go back n" to send those 400 in
>the context of the 1400 unacknowledged bytes?

Yes.  Assuming the timeout timer has not popped for the 1000 bytes,
the 400 bytes would be sent out at this time.

>
>Thus, should transmitting something the first time has a higher precedence
>than retransmitting data?

Not really.  I think it's reasonable to consider the priority 
the same.  If, at some instant at time you have new data to
send and a retransmission to handle, either could be handled
first.

>
>And to extend this scenario, let's say that after sending out those 400
>new bytes, we don't hear an ACK by the time the interrupt timeout for
>bytes [0,999] comes around. (But NOT the timeout for bytes [1000,1399].)
>
>Are we supposed to retransmit [0,999] or [0,1399] at this point?

Assuming that the retransmit timer has popped for [0,999] but
the retransmit timer has not popped for [1000,1399], only
[0,999] should be resent.

>
>The definition of "Go back N" suggests the latter since if it has decided
>its "peer has not received the segment with sequence number 0, then it
>will retransmit ALL data starting at 0, not just that segment". Is this
>interpretation incorrect?
>
>Effectively, I believe this " go back n" statement states that "when we
>have received a timeout, retransmit all data starting at the beginning of
>the window up through the end"?

Consider the scenario where bytes [1000,1399] were received,
but bytes [600,999] were lost.  The receiver would have ACKed
all bytes 599 and before.  However, no mechanism exists for
acknowledging [1000,1399], since [600,999] have gone missing.
So, the receiver sits quietly and sends no ACKs.  The sender
is forced to go back and send all of [600,1399] again.

SteveJ

>
>Does somebody else have a better example to illustrate what should
>happen?
>
>thanks.
>
>Jonathan
>


.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Question about termination
Date: Sun, 26 Jan 2003 02:28:35 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1043548115 24702 171.64.15.111 (26 Jan 2003 02:28:35 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3981

The sender should send the 1000 bytes reliably before sending
the FIN.  This means all 1000 bytes should be acknowledged by
the receiver first.

SteveJ

In article 
Man Yu Lui  wrote:
>Hi,
>
>After the application requested a connection close, the child gets a zero
>from reading on the localpipe, and it then sends the FIN packet. Say there
>are still 1000 bytes that the peer has not acknowledged yet, should we wait
>around for the outstanding bytes to be acknowledged before sending the FIN?
>(and if there is loss in those 1000 bytes, do we retransmit before sending
>the FIN?)
>
>-myl
>
>


.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Part 2(a):  Window Handling
Date: Sun, 26 Jan 2003 02:50:32 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1043549432 25329 171.64.15.111 (26 Jan 2003 02:50:32 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3982

This is in response to a query during my Friday office hours.

For programming assignment 2 part (a), you do not need to worry
about handling packets that fall outside or partially outside the
receive window.

However, for part 2(b), you must be able to handle all of these
cases correctly.  Keep this is in mind while designing your code.

Good luck!

SteveJ

.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Problem with test script
Date: Sat, 25 Jan 2003 20:04:34 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043553855 27050 128.12.195.69 (26 Jan 2003 04:04:15 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3983

Hi,

When I try the test script on hw2a, I got this error:

Testing input file TESTDATA.0

Starting student server:
/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/server 
 -p
/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.server
_port 2>&1 >
/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.server
_output &
Server started
connected to 171.64.15.104 at port 56696
client: TESTDATA.0
Fatal error:  Can't find expected file
/usr/class/cs244a/grading_script/hw2/TESTDATA.0!
couldn't submit code for testing

Any idea what may be causing this?

-myl


.

Path: shelby.stanford.edu!not-for-mail
From: "Amit Garg" 
Newsgroups: su.class.cs244a
Subject: sending SYN blocks
Date: Sat, 25 Jan 2003 21:39:54 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: gatesb02-pc19.stanford.edu
X-Trace: news.Stanford.EDU 1043559600 29108 171.64.65.43 (26 Jan 2003 05:40:00 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3984

Hi Guys,

WHile sending SYN, I'm sending the correct socket(com_sock) and I've checked
the value of the ports (source and destination). the network_send comes back
without an error but my server doesn't get woken up from the select. Clues ?


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: same problem with test script
Date: Sun, 26 Jan 2003 06:50:17 +0000 (UTC)
Organization: Stanford University
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic25.stanford.edu
X-Trace: news.Stanford.EDU 1043563817 918 171.64.15.62 (26 Jan 2003 06:50:17 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3985


Testing input file TESTDATA.0

Starting student server: /afs/ir.stanford.edu/users/s/e/seetapun/cs244a/pp2/grad
ing_src/build/server  -p /afs/ir.stanford.edu/users/s/e/seetapun/cs244a/pp2/grad
ing_src/build/.server_port 2>&1 > /afs/ir.stanford.edu/users/s/e/seetapun/cs244a
/pp2/grading_src/build/.server_output &
Server started
connected to 171.64.15.62 at port 45690
client: TESTDATA.0
Fatal error:  Can't find expected file /usr/class/cs244a/grading_script/hw2/TEST
DATA.0!
couldn't submit code for testing
.

Path: shelby.stanford.edu!myth7.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: Re: sending SYN blocks
Date: Sat, 25 Jan 2003 23:22:58 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043565780 2007 171.64.15.21 (26 Jan 2003 07:23:00 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:3986

On Sat, 25 Jan 2003, Amit Garg wrote:

> Hi Guys,
>
> WHile sending SYN, I'm sending the correct socket(com_sock) and I've checked
> the value of the ports (source and destination). the network_send comes back
> without an error but my server doesn't get woken up from the select. Clues ?
>
>
>
I know you have to use FD_SET before you call select *each* time. Also
you have to make sure that use use FD_ZERO before you initialize the
struct every time. Lastly check that maxfs (the first arg to select)
is the right value (taking the MAX of all you fds). Hope that helps...

Rhea

.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: How to TCP Source Port?
Date: Sun, 26 Jan 2003 07:39:49 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 55
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1043566789 2354 171.64.15.111 (26 Jan 2003 07:39:49 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3987

I think the port number returned by getsockname() should be
the correct one to use for STCP.  Other TAs, any comments
on this?

SteveJ

In article 
Neil Daswani  wrote:
>I think getsockname() will give me the IP address that I need for the data
>connection (comm_fd), but not the port number.  Won't getsockname() give me
>back the UDP port number for the comm_fd data connection?  Should I set the
>STCP source port to be the same as this UDP port number?
>
>What do the test scripts expect this STCP source port number to be, or do
>they not test for it?
>
>-- Neil
>
>"Steve Jacobson"  wrote in message

>> Take a look at getpeername() and getsockname().  Post again
>> if these calls don't address your need.
>>
>> SteveJ
>>
>>
>> In article 
>> Neil Kumar Daswani   wrote:
>> >
>> >When client.c calls myconnect() in mysock.c, the TCP destination port is
>> >explicitly specified in the struct sockaddr * parameter.  This
>> >information gets passed onto transport_init() and gets filled into
>> >tcp_hdr.th_dport.
>> >
>> >When setting up the connection with the server, how should
>> >transport_init() choose the TCP source port to be filled into
>> >tcp_hdr.th_sport?
>> >
>> >Should we, for example, just make up some source port number?  Should
>> >this source port number be selected so that it is distinct from any
>> >other TCP port that is being used on the client?
>> >
>> >Is this irrelevant anyway since packets that we receive on the incoming
>> >data socket can only be destined for the open port corresponding to that
>> >child process?  That is, is the choice of the source port number
>> >irrelevant since we are not required to do port de-multiplexing as we
>> >would have to do if we were writing a "real" TCP implementation?
>> >
>> >-- Neil
>>
>>
>
>


.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem with test script
Date: Sun, 26 Jan 2003 07:43:20 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 33
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1043567000 2517 171.64.15.111 (26 Jan 2003 07:43:20 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3988

Our script wizard has been notified.

SteveJ

In article 
Man Yu Lui  wrote:
>Hi,
>
>When I try the test script on hw2a, I got this error:
>
>Testing input file TESTDATA.0
>
>Starting student server:
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/server 
> -p
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.server
>_port 2>&1 >
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.server
>_output &
>Server started
>connected to 171.64.15.104 at port 56696
>client: TESTDATA.0
>Fatal error:  Can't find expected file
>/usr/class/cs244a/grading_script/hw2/TESTDATA.0!
>couldn't submit code for testing
>
>Any idea what may be causing this?
>
>-myl
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Will Robinson" 
Newsgroups: su.class.cs244a
Subject: different kill-clients and kill-servers one-liners
Date: Sun, 26 Jan 2003 00:28:12 -0800
Lines: 26
Distribution: su
Message-ID: 
NNTP-Posting-Host: javalasers.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.Stanford.EDU 1043569691 4292 128.12.91.22 (26 Jan 2003 08:28:11 GMT)
X-Complaints-To: 
User-Agent: Pan/0.13.3 (That cat's something I can't explain)
Xref: shelby.stanford.edu su.class.cs244a:3989

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

The shell commands given in the assignment for killing orphaned client and
server processes weren't working for me.  (I was getting an "unknown user
xw message).  I think these do the same thing, and they work on the
elaines:

kill -9 `ps -u $USER | grep client | awk '{print$1}'`

and

kill -9 `ps -u $USER | grep server | awk '{print$1}'`

Good luck everyone,
Will
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+M5wI4uIcqiwjnrURAhh4AJ9HICkqBcTL6GXlLK03nDYAhMuV2gCgtcjM
O9ri9LRfvigK1sWCytg6eYo=
=PB/g
-----END PGP SIGNATURE-----

.

Path: shelby.stanford.edu!not-for-mail
From: "Neil Daswani" 
Newsgroups: su.class.cs244a
Subject: Problems with Test Scripts...
Date: Sun, 26 Jan 2003 00:56:23 -0800
Organization: Stanford University
Lines: 46
Distribution: su
Message-ID: 
Reply-To: "Neil Daswani" 
NNTP-Posting-Host: dn800cbf07.stanford.edu
X-Trace: news.Stanford.EDU 1043570858 4731 128.12.191.7 (26 Jan 2003 08:47:38 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Xref: shelby.stanford.edu su.class.cs244a:3990

Dear TAs,

I am having problems with the testing scripts.  When I run the following
command line: /usr/class/cs244a/bin/test_code.pl hw2a transport.c
it terminates in an error saying, "Fatal error:  Can't find expected file
/usr/class/cs244a/grading_script/hw2/TESTDATA.0!"

I have shown an excerpt of the output below.  It also generates a large
number of warnings due to problems with "our_dprintf"

-- Neil

Output:
<...large number of warnings excluded...>
transport.c:1191: warning: statement with no effect
transport.c:1192: warning: statement with no effect
transport.c: In function `sigint_handler':
transport.c:1338: warning: left-hand operand of comma expression has no
effect
transport.c: At top level:
transport.c:1151: warning: `exit_control_loop' defined but not used

Testing input file TESTDATA.0

Starting student server:
/afs/ir.stanford.edu/users/d/a/daswani/cs244a/hw2/grading_src/build/ser
ver  -p
/afs/ir.stanford.edu/users/d/a/daswani/cs244a/hw2/grading_src/build/.server_
port 2>&1 >
/afs/ir.stanford.edu/users/d/a/daswani/cs244a/hw2/grading_src/build/.server_
output &
Server started
connected to 171.64.15.17 at port 45968
client: TESTDATA.0
client: TESTDATA.0
client: TESTDATA.0
client: TESTDATA.0
client: TESTDATA.0
client: TESTDATA.0
Fatal error:  Can't find expected file
/usr/class/cs244a/grading_script/hw2/TESTDATA.0!
couldn't submit code for testing




.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: th_seq of ACK packets & retransmission of ACKs.
Date: Sun, 26 Jan 2003 01:43:33 -0800
Lines: 74
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
X-Trace: news.Stanford.EDU 1043574279 5814 128.12.177.15 (26 Jan 2003 09:44:39 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3991


"Noh, Jeonghun"  wrote in message

> 1. In the PA#2 handout, the part of the ACK Packets says that if the ACK
bit
> in the flags field is set to 1, the ack_seq field contains the sequence
> number of the next byte of data the receiver expects.
>
> Does 'ack_seq' mean both th_ack and th_seq or only th_ack?
>
> We are not allowed to piggyback data on the ack packets, ACK has no
payload.
> That is, the th_seq field of the ACK has no meaning at all. Is it correct?

Yes, you are correct.  Because ACK packets are their own entity in your
implementation of TCP, the th_seq is unnecessary.

>
> 2. Like the example in the PA#2 handout, if we assume the last
> acknowledgment sent was 10 and a packet containing data with sequence
number
> 15 of length 5 is received,
>
> do we have to send ACK with the th_seq 10 or just suppress to produce ACKs
> until we receive a packet with sequence number 10 of length 5 and send
only
> one ACK?
>
> I got confused because we should send a duplicate ACK when we receive a
> duped data packet, just like a normal TCP.
>

Every time you receive a packet, send out an ACK for the next byte of data
you need.  It is up to you to figure out what the next piece of contiguous
data is but you should always send an ack for this sequence number.


> 3. About the th_seq of ACKs
> I seem to know th_ack of ACKs indicates the next byte of data the receiver
> expects. What about th_seq of ACKs? Will it be the next byte of data the
> receiver will send? Even though the receiver will send no data packets
> except ack packets, do we have to be precise in dealing with th_seq of
ACKs?
>

Na, th_seq of ACKS have no meaning in our implementation.

> My understanding is there are 3 kinds of ACKs, SYN-ACKs, FIN-ACKs, and
> ACKs(normal acks to data reception). I wonder how we should handle the
last
> case.
>

The last case??  You mean just normal ACKs?  Make sure you read the book
(chapter 4) on how TCP works.  But essentially normal ACKs are used to slide
the send window forward because the sender knows that the receive has the
data.

Hope this helps.

--Russ

> --
> *********************************
> Jeonghun Noh
> Dept. of Electrical Engineering
> Stanford University
> Tel : 1-650-497-6665
> 
> *********************************
>
>


.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: PA#2: sliding window buffers
Date: Sun, 26 Jan 2003 02:51:52 -0800
Lines: 37
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043578315 7755 171.64.15.69 (26 Jan 2003 10:51:55 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:3992

hi all!

a few questions regarding the sliding window algorithm and its
implementation in our STCP:

1. is it correct to say that a sender should keep the pipe/socket as full
as possible? (e.g. initially, sender fills up the pipe (and receiver
window); as soon as receiver's ACK comes back and receiver's window opens
up, sender sends more data to fill up the window again, assuming sender
has enough data to do so)

2. if receiver receives a packet with data in-order, can it directly pass
the data to application process, or should it buffer the data first in
receiver's buffer and pass to application at a later time (or, should the
receiver's buffer contain any in-order and ACKed data)?

3. in Friday review session, "mbufs" was mentioned to be possibly used for
implementing the sliding window buffer, is there any decent documentations
about its uses available?

finally, need some clarifications on "Network Termination" section of the
assignment description --

a. first bullet point: when our dummy client's application process calls
the child process to close, doesn't it mean that all data has already been
received by the application (i.e. NO outstanding data in pipe/socket, or
child's receiver buffer)? what "data" does requesting active end need to
flush in this case?

b. third bullet point: "passive end does not flush outstanding data"  (is
this referring to the data sent in pipe but has not been ACKed?), but just
"... terminates its end of the connection immediately" (so the sender will
NOT wait for its outstanding data (assuming there is) to be ACKed?)

thanks!
Tan

.

Path: shelby.stanford.edu!not-for-mail
From: "Noh, Jeonghun" 
Newsgroups: su.class.cs244a
Subject: fork code & buffer location
Date: Sun, 26 Jan 2003 02:56:36 -0800
Organization: Stanford. EE
Lines: 40
Distribution: su
Message-ID: 
NNTP-Posting-Host: ohnohoya.stanford.edu
X-Trace: news.Stanford.EDU 1043578715 7844 128.12.151.44 (26 Jan 2003 10:58:35 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:3993

1. After we call localsocketpair() in transport.c, we get two sockets having
the same process at both ends. For example, if we write(sd[0], buffer_write,
1), we can read(sd[0], buffer_read, 1). Is it correct?

Then, we fork a child process and discard two connections from four
connections(counting data_sd[2] and syn_sd[2]). At now, how can we guarantee
that the child process and the parent will communicate each other? For me,
it is likely to send data to both itself and the other process.

The last question. Before we fork(), we had 4 sockets in total, after we
fork(), we have 8 sockets in total. After discarding 4 sockets in order to
simulate pipes, do we end up having 4 sockets?


2. Buffers and the congestion window
Once the connection between each child process at the both ends has been
established, each application will write or read on the sockets which
connect application with the child processes(STCP) and the sockets will read
or write on the sockets(using transport_sock_io). Is it correct?

Would you correct my understanding about the location of the buffers and the
window? Here it is. Let's assume a server has data to send. It will write on
the local socket which connects app with STCP. So one buffer will be inside
this socket. STCP(a child process) has its own congestion windows and will
write it to the socket connecting it with the underlying network layer. So
there is another buffer in it. Is it right?

It is really confusing. Can you clarify the concept?


--
*********************************
Jeonghun Noh
Dept. of Electrical Engineering
Stanford University
Tel : 1-650-497-6665

*********************************


.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Problem with test script
Date: Sun, 26 Jan 2003 17:29:31 +0000 (UTC)
Lines: 27
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine19.stanford.edu
X-Trace: news.Stanford.EDU 1043602171 16924 171.64.15.84 (26 Jan 2003 17:29:31 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3994


>When I try the test script on hw2a, I got this error:

>Testing input file TESTDATA.0

>Starting student server:
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/server 
> -p
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.server
>_port 2>&1 >
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.server
>_output &
>Server started
>connected to 171.64.15.104 at port 56696
>client: TESTDATA.0
>Fatal error:  Can't find expected file
>/usr/class/cs244a/grading_script/hw2/TESTDATA.0!
>couldn't submit code for testing

>Any idea what may be causing this?

I'm not sure--it works for me (and the file exists there), so it might be
a permission problem.  Things look okay based on the AFS permissions, but
I've chmoded the files to 644 in case something weird was going on there
(although I can't imagine that should have been an issue).  Can you cat
the file in your shell?  If so, can you try the test again?  Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Re: Problem with test script
Date: Sun, 26 Jan 2003 11:16:31 -0800
Lines: 38
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043608572 19458 128.12.195.69 (26 Jan 2003 19:16:12 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3995

Yes, it works now. Thanks.

"Matthew Jonathan Holliman"  wrote in message

>
> >When I try the test script on hw2a, I got this error:
>
> >Testing input file TESTDATA.0
>
> >Starting student server:
>
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/server
> > -p
>
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.serve
r
> >_port 2>&1 >
>
>/afs/ir.stanford.edu/users/m/a/manyului/cs244a/hw2/grading_src/build/.serve
r
> >_output &
> >Server started
> >connected to 171.64.15.104 at port 56696
> >client: TESTDATA.0
> >Fatal error:  Can't find expected file
> >/usr/class/cs244a/grading_script/hw2/TESTDATA.0!
> >couldn't submit code for testing
>
> >Any idea what may be causing this?
>
> I'm not sure--it works for me (and the file exists there), so it might be
> a permission problem.  Things look okay based on the AFS permissions, but
> I've chmoded the files to 644 in case something weird was going on there
> (although I can't imagine that should have been an issue).  Can you cat
> the file in your shell?  If so, can you try the test again?  Thanks.
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Test case 1.D and 1.F
Date: Sun, 26 Jan 2003 11:32:28 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043609529 19863 128.12.195.69 (26 Jan 2003 19:32:09 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:3996

I ran the test script and failed test case 1.F, but I was not clear what the
problem is, since I passed a seemingly similar test caes 1.D:

1.D
Checks that Tx doesn't overflow receiver window.

1.F
Checks transport layer enforces correct receiver window.
Transport layer receiver buffered more than 3072 bytes of outstanding data

Since I do not have a buffer for the receiver (payload of every received
packet is dumped into the localpipe to the app directly), does it mean I
should never let more than 3072 bytes of data sit in the localpipe to the
app?

Thanks.

-myl


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: debugging and honor code
Date: Sun, 26 Jan 2003 20:01:21 +0000 (UTC)
Organization: Stanford University
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic22.stanford.edu
X-Trace: news.Stanford.EDU 1043611281 20431 171.64.15.57 (26 Jan 2003 20:01:21 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:3997


My code doesn't pass test 1.G. Is it ok (honor code-wise) to have the 
transport layer dump all the traffic to a file during the test run 
so I can see what the problem is? (This was asked in last years
new group but I could not see a yes/or answer).
.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Test case 1.D and 1.F
Date: Sun, 26 Jan 2003 20:01:52 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine19.stanford.edu
X-Trace: news.Stanford.EDU 1043611312 20487 171.64.15.84 (26 Jan 2003 20:01:52 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3998


>Since I do not have a buffer for the receiver (payload of every received
>packet is dumped into the localpipe to the app directly), does it mean I
>should never let more than 3072 bytes of data sit in the localpipe to the
>app?

No, you're fine; that test case was too stringent in the case where data
arrives more quickly than the application reads it.  (I hadn't seen this
happen before).  I've relaxed the checks now.
.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: sending SYN blocks
Date: Sun, 26 Jan 2003 20:08:06 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine19.stanford.edu
X-Trace: news.Stanford.EDU 1043611686 20612 171.64.15.84 (26 Jan 2003 20:08:06 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:3999


>I know you have to use FD_SET before you call select *each* time. Also
>you have to make sure that use use FD_ZERO before you initialize the
>struct every time. Lastly check that maxfs (the first arg to select)
>is the right value (taking the MAX of all you fds). Hope that helps...

Just to clarify, I believe you mean MAX+1. :-)

.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: How to TCP Source Port?
Date: Sun, 26 Jan 2003 20:17:15 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine19.stanford.edu
X-Trace: news.Stanford.EDU 1043612235 20855 171.64.15.84 (26 Jan 2003 20:17:15 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4000


>Should we, for example, just make up some source port number?  Should
>this source port number be selected so that it is distinct from any
>other TCP port that is being used on the client?  

Neither is actually used anywhere--as you point out, since the process
model implicitly takes care of port demultiplexing for you, both are
irrelevant and can be completely ignored.

.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: assigmnent 2 questions
Date: Sun, 26 Jan 2003 20:25:58 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 23
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1043612758 21048 171.64.15.112 (26 Jan 2003 20:25:58 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4001

Please note this correction to my earlier post:

In the scenario below, if the timeout timer pops for bytes
[0,999] then all bytes from 0 onward should be resent.

This is the behavior the grading scripts expect at present.
Also, this behavior should be easier to implement.

SteveJ

>>
>>And to extend this scenario, let's say that after sending out those 400
>>new bytes, we don't hear an ACK by the time the interrupt timeout for
>>bytes [0,999] comes around. (But NOT the timeout for bytes [1000,1399].)
>>
>>Are we supposed to retransmit [0,999] or [0,1399] at this point?
>
>Assuming that the retransmit timer has popped for [0,999] but
>the retransmit timer has not popped for [1000,1399], only
>[0,999] should be resent.
>
>>
>>The definition of "Go back N" suggests the latter ...
.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: PA#2: sliding window buffers
Date: Sun, 26 Jan 2003 12:41:36 -0800
Lines: 58
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043613698 21339 171.64.15.74 (26 Jan 2003 20:41:38 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4002


> hi all!
>
> a few questions regarding the sliding window algorithm and its
> implementation in our STCP:
>
> 1. is it correct to say that a sender should keep the pipe/socket as full
> as possible? (e.g. initially, sender fills up the pipe (and receiver
> window); as soon as receiver's ACK comes back and receiver's window opens
> up, sender sends more data to fill up the window again, assuming sender
> has enough data to do so)

 Yes

>
> 2. if receiver receives a packet with data in-order, can it directly pass
> the data to application process, or should it buffer the data first in
> receiver's buffer and pass to application at a later time (or, should the
> receiver's buffer contain any in-order and ACKed data)?
>

 As long as you preserve the semantics of in order data arrival, keep track of
 the last byte read from the transport layer (to handle lost acks) you should
 be OK.  I think is a bad idea to plan on sending the data directly to the
 application without consulting a recieve buffer because, even if the data read
 is in-order you could have missed a previous chunk ... so you are better of
 consulting your buffer (though you do not need to do an explicit data copy)

> 3. in Friday review session, "mbufs" was mentioned to be possibly used for
> implementing the sliding window buffer, is there any decent documentations
> about its uses available?

 I don't know  :-/

>
> finally, need some clarifications on "Network Termination" section of the
> assignment description --
>
> a. first bullet point: when our dummy client's application process calls
> the child process to close, doesn't it mean that all data has already been
> received by the application (i.e. NO outstanding data in pipe/socket, or
> child's receiver buffer)? what "data" does requesting active end need to
> flush in this case?

 There still may be data in your send buffer (unacked, or waiting for the
 window to open)  which must be send to the client.  You want to try and make
 sure that all sent data has been acked before you shut down.

>
> b. third bullet point: "passive end does not flush outstanding data"  (is
> this referring to the data sent in pipe but has not been ACKed?), but just
> "... terminates its end of the connection immediately" (so the sender will
> NOT wait for its outstanding data (assuming there is) to be ACKed?)

 correct.

 /mc

.

Path: shelby.stanford.edu!saga12.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: Re: PA#2: sliding window buffers
Date: Sun, 26 Jan 2003 13:05:03 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043615104 21895 171.64.15.142 (26 Jan 2003 21:05:04 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4003

> > 2. if receiver receives a packet with data in-order, can it directly pass
> > the data to application process, or should it buffer the data first in
> > receiver's buffer and pass to application at a later time (or, should the
> > receiver's buffer contain any in-order and ACKed data)?
> >
>
>  As long as you preserve the semantics of in order data arrival, keep track of
>  the last byte read from the transport layer (to handle lost acks) you should
>  be OK.  I think is a bad idea to plan on sending the data directly to the
>  application without consulting a recieve buffer because, even if the data read
>  is in-order you could have missed a previous chunk ... so you are better of
>  consulting your buffer (though you do not need to do an explicit data copy)

How do we send data to the application? The assignment says we should
buffer data sent to the app -- e.g., if the app asks for 512 bytes, and we
receive only 256 now, we should buffer it in the transport until the other
256 are ready (or block forever, I guess).

It looks like we can just write data to the data_sd[i] socket, but how do
we know how much to write at each time?

Jonathan

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: fork code & buffer location
Date: Sun, 26 Jan 2003 13:08:12 -0800
Lines: 57
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043615293 21934 171.64.15.74 (26 Jan 2003 21:08:13 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4004


> 1. After we call localsocketpair() in transport.c, we get two sockets having
> the same process at both ends. For example, if we write(sd[0], buffer_write,
> 1), we can read(sd[0], buffer_read, 1). Is it correct?

 Yup, though you'll probably want to read more than a single byte.

>
> Then, we fork a child process and discard two connections from four
> connections(counting data_sd[2] and syn_sd[2]). At now, how can we guarantee
> that the child process and the parent will communicate each other? For me,
> it is likely to send data to both itself and the other process.
>
> The last question. Before we fork(), we had 4 sockets in total, after we
> fork(), we have 8 sockets in total. After discarding 4 sockets in order to
> simulate pipes, do we end up having 4 sockets?
>

 I think I am confused as to your question.  Forking merely copies the parents
 file descriptor table. Initially there are 4 fd's (2 for each socket pair).
 After the fork there are 8 ... The parent closes 2 and the child closes 2 so
 there are a total of 4 open file descriptor, 2 in the parent and two in the
 child.

 ... errr was that not what you were asking?

>
> 2. Buffers and the congestion window
> Once the connection between each child process at the both ends has been
> established, each application will write or read on the sockets which
> connect application with the child processes(STCP) and the sockets will read
> or write on the sockets(using transport_sock_io). Is it correct?

 Yes... the application communicates with the transport layer via the sockets
 connecting the parent/child processes and the transport layer communicates
 with the remote connection throough network_recv/network_send (defined in
 network.c)

>
> Would you correct my understanding about the location of the buffers and the
> window? Here it is. Let's assume a server has data to send. It will write on
> the local socket which connects app with STCP. So one buffer will be inside
> this socket. STCP(a child process) has its own congestion windows and will
> write it to the socket connecting it with the underlying network layer. So
> there is another buffer in it. Is it right?


 server writes data to fd of child process which is the transport subsystem.
 Transport subsystem reads from fd, handles the data however it wants and
 forwards it on to the remote connection.  So when the server writes to the fd,
 the OS (not your program) will buffer the data until the child process (STCP)
 reads the data.  Then your buffering comes into play, bieng sure to buffer the
 data in case some gets lost during transmission.  Then you will send the data
 to the remote connection ..

 /mc

.

Path: shelby.stanford.edu!epic11.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: network_send
Date: Sun, 26 Jan 2003 14:20:03 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043619604 23743 171.64.15.44 (26 Jan 2003 22:20:04 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4005

What should we do if network_send fails? What could cause it to fail? I
ask, because I'm getting assert fails during the test script run. However,
this doesn't occur every time I send something?

thanks,

Rhea

.

Path: shelby.stanford.edu!epic11.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: peeraddr
Date: Sun, 26 Jan 2003 14:27:02 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043620023 23942 171.64.15.44 (26 Jan 2003 22:27:03 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4006

Also, should we be sending/accepting the peeraddr encapsulated in a
packet or stand-alone?

Rhea

.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: fork code & buffer location
Date: Sun, 26 Jan 2003 22:44:08 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine19.stanford.edu
X-Trace: news.Stanford.EDU 1043621048 25277 171.64.15.84 (26 Jan 2003 22:44:08 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4007

In addition to Martin's answer, you might also want to look over the
slides from Friday's discussion section (they're posted on the webpage),
or you can review the video on the SITN website (also linked on the main
course homepage) if you haven't done so already.
.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Re: Test case 1.D and 1.F
Date: Sun, 26 Jan 2003 15:05:32 -0800
Lines: 19
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043622311 25752 128.12.195.69 (26 Jan 2003 23:05:11 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4008

My code still fails test case 1.F. I have added check in a locally copied
mysocket.c to see that there are times when more than 3072 bytes sit in the
localpipe. 1.F is the only test case my code failed in.

Please let me know how this could be resolved. Thanks.

"Matthew Jonathan Holliman"  wrote in message

>
> >Since I do not have a buffer for the receiver (payload of every received
> >packet is dumped into the localpipe to the app directly), does it mean I
> >should never let more than 3072 bytes of data sit in the localpipe to the
> >app?
>
> No, you're fine; that test case was too stringent in the case where data
> arrives more quickly than the application reads it.  (I hadn't seen this
> happen before).  I've relaxed the checks now.


.

Path: shelby.stanford.edu!epic11.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: Re: network_send
Date: Sun, 26 Jan 2003 16:10:57 -0800
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043626258 27461 171.64.15.44 (27 Jan 2003 00:10:58 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4009

On Sun, 26 Jan 2003, Rhea Sherman Mortam wrote:

> What should we do if network_send fails? What could cause it to fail? I
> ask, because I'm getting assert fails during the test script run. However,
> this doesn't occur every time I send something?
>
> thanks,
>
> Rhea
>
>

never mind, network_send fails if the socket is closed, sorry bout that.

Rhea

.

Path: shelby.stanford.edu!epic11.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: Re: network_send
Date: Sun, 26 Jan 2003 16:21:25 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043626888 27755 171.64.15.44 (27 Jan 2003 00:21:28 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4010

On Sun, 26 Jan 2003, Rhea Sherman Mortam wrote:

> On Sun, 26 Jan 2003, Rhea Sherman Mortam wrote:
>
> > What should we do if network_send fails? What could cause it to fail? I
> > ask, because I'm getting assert fails during the test script run. However,
> > this doesn't occur every time I send something?
> >
> > thanks,
> >
> > Rhea
> >
> >
>
> never mind, network_send fails if the socket is closed, sorry bout that.
>
> Rhea
>
>

but it also fails when write return an error with: Invalid Argument (from
perror)? What does that mean? What could cause network_send to fails
besides these to cases?

thanks

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: peeraddr
Date: Sun, 26 Jan 2003 16:47:45 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043628467 28314 171.64.15.74 (27 Jan 2003 00:47:47 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4011


> Also, should we be sending/accepting the peeraddr encapsulated in a
> packet or stand-alone?
>
> Rhea

  Unless handeling of the peeraddr has changed since last year you should not
  be sending it over the socket, but grabbing it via network_peer_name()
  (network.c) and sending it from the child to the parent througnh syn_sd in
  which case the best way to pass it is as raw data.

  /mc

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: network_send
Date: Sun, 26 Jan 2003 16:53:38 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043628819 28484 171.64.15.74 (27 Jan 2003 00:53:39 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4012

>
> but it also fails when write return an error with: Invalid Argument (from
> perror)? What does that mean? What could cause network_send to fails
> besides these to cases?

 send_msg could fail for a number of reasons.  network_send uses sendmsg()
 (man 2 sendmsg) so if any of the fields of the msghdr are bad, send_msg will
 fail. This could include the file descriptor, the address, the message buffer
 etc.

 /mc

.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Test case 1.D and 1.F
Date: Mon, 27 Jan 2003 01:08:19 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine19.stanford.edu
X-Trace: news.Stanford.EDU 1043629699 28831 171.64.15.84 (27 Jan 2003 01:08:19 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4013

>My code still fails test case 1.F. I have added check in a locally copied
>mysocket.c to see that there are times when more than 3072 bytes sit in the
>localpipe. 1.F is the only test case my code failed in.

Please send me the code and I'll take a look at it.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: seq no.s and SYN/SYN ACK packets
Date: Sun, 26 Jan 2003 17:10:40 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043629842 28941 171.64.15.106 (27 Jan 2003 01:10:42 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4014

hi,
if syn sends a seq no. of x
then in the SYNACK packet what should be the ack number : x or x+1?

i.e does the syn consume a sequence number like in TCP?

thanks,
Sandhya

.

Path: shelby.stanford.edu!epic11.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: Re: peeraddr
Date: Sun, 26 Jan 2003 17:12:04 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043629925 29020 171.64.15.44 (27 Jan 2003 01:12:05 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4015

On Sun, 26 Jan 2003, Martin Casado wrote:

>
> > Also, should we be sending/accepting the peeraddr encapsulated in a
> > packet or stand-alone?
> >
> > Rhea
>
>   Unless handeling of the peeraddr has changed since last year you should not
>   be sending it over the socket, but grabbing it via network_peer_name()
>   (network.c) and sending it from the child to the parent througnh syn_sd in
>   which case the best way to pass it is as raw data.
>
>   /mc
>
>

but doesn't the client have to compute the network_peer_name() and sent it
to the server. Then the server passes peeraddr to its parent? How does the
server know the client's peeraddr if you don't do it this way?

myaccept:
/* should be called by the passive end to accept a connection.
   simply sets up the transport layer appropriately,
   returns a NEW socket descriptor which should be used
   to make any more reads/writes, i.e. sockfd should not be used
   after this call. On return, addr contains the address of the peer
   */

The 'peer' means the active end, or client, right?

Rhea

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: seq no.s and SYN/SYN ACK packets
Date: Sun, 26 Jan 2003 17:56:53 -0800
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043632614 101 171.64.15.74 (27 Jan 2003 01:56:54 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4016


> hi,
> if syn sends a seq no. of x
> then in the SYNACK packet what should be the ack number : x or x+1?
>
> i.e does the syn consume a sequence number like in TCP?

  You reply with your own sequence number and ack with theirs + 1

  /mc

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: peeraddr
Date: Sun, 26 Jan 2003 18:04:37 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043633080 402 171.64.15.74 (27 Jan 2003 02:04:40 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4017


> On Sun, 26 Jan 2003, Martin Casado wrote:
>
> >
> > > Also, should we be sending/accepting the peeraddr encapsulated in a
> > > packet or stand-alone?
> > >
> > > Rhea
> >
> >   Unless handeling of the peeraddr has changed since last year you should not
> >   be sending it over the socket, but grabbing it via network_peer_name()
> >   (network.c) and sending it from the child to the parent througnh syn_sd in
> >   which case the best way to pass it is as raw data.
> >
> >   /mc
> >
> >
>
> but doesn't the client have to compute the network_peer_name() and sent it
> to the server. Then the server passes peeraddr to its parent? How does the
> server know the client's peeraddr if you don't do it this way?

  Since STCP simply sits on top of UDP this is already done by the IP stack and
  is saved in in member fromaddr of struct net_context_t (network.c).  If you
  look at network_recv() you'll see that fromaddr gets filled on the call to
  recvfrom(2) ... so regardless of what you receive (the initial SYN packet for
  example), fromaddr is set ... and can be accessed via network_peer_name().

  /mc


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: Re: seq no.s and SYN/SYN ACK packets
Date: Sun, 26 Jan 2003 18:15:55 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine31.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043633757 718 171.64.15.106 (27 Jan 2003 02:15:57 GMT)
X-Complaints-To: 
To: Martin Casado 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4018

ok,
but suppose Side A sends the synack with seq no. y
and side A wants to send data
should the data start from seq. no y+1 or y?

thanks,
Sandhya

On Sun, 26 Jan 2003, Martin Casado wrote:

>
> > hi,
> > if syn sends a seq no. of x
> > then in the SYNACK packet what should be the ack number : x or x+1?
> >
> > i.e does the syn consume a sequence number like in TCP?
>
>   You reply with your own sequence number and ack with theirs + 1
>
>   /mc
>
>

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: seq no.s and SYN/SYN ACK packets
Date: Sun, 26 Jan 2003 18:41:46 -0800
Lines: 22
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043635308 1586 171.64.15.74 (27 Jan 2003 02:41:48 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4019


> ok,
> but suppose Side A sends the synack with seq no. y
> and side A wants to send data
> should the data start from seq. no y+1 or y?
>
> thanks,
> Sandhya

  The passive and active sides of the connection handle the sequence numbering
  the same .. aka you do not do anything special in the case of the synack that
  you wouldn't do with a syn.

  If your question is, "what is the sequence number of the first data packet
  sent in a connection", I'm not sure if this is explicitly answered in the
  problem description.  It may not matter if you preserve the correct
  semantics... fwiw, my solution used initial sequence + 1.

  cheers
  /mc


.

Path: shelby.stanford.edu!not-for-mail
From: Alexander Phillip Fontana 
Newsgroups: su.class.cs244a
Subject: handling network errors
Date: Sun, 26 Jan 2003 22:40:10 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: raptor14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043649610 8354 171.64.12.175 (27 Jan 2003 06:40:10 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; Linux 2.4.9-31 i686)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:4020

It seems that an earlier question about network failures went unanswered
in the message's thread.  Namely, how should we handle legitimate
network-layer failures? I think the ideal is that we should be able to
force the mysock layer functions to return -1 and set the proper errno
value, but I don't see how to communicate this across processes?

Thanks,
Alex
.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: TEST case 1.B
Date: Sun, 26 Jan 2003 22:41:23 -0800
Lines: 60
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043649684 8372 171.64.15.69 (27 Jan 2003 06:41:24 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4021

hi all!

my program only failes test 1.B now with the following msg:
Results:  NOT OK

No 'rcvd' created!  Client output:

from the log files (see below), it seems that the sequence and ACK numbers
in my packet's TCP header are messed up.

however, I did use "ntoh()" after receiving a packet, and "hton()" before
sending a packet out. any clue what else may be causing the mis-matching
numbers in the log?

thanks!
Tan

*********************************************
SERVER LOG ---

CWND: 3072; ERTT: 250
log: network_recv: a SYN packet with seq=51
log: network_send: a SYN-ACK packet with seq=167 and ack=52 and timestamp=4266260178
CWND: 3072; ERTT: 250
log: network_recv: a DATA packet with seq=52, len=12 and timestamp=4266260180
log: network_send: a DATA-ACK packet with ack=64
log: network_send: a DATA packet with seq=169, len=536
log: network_send: a DATA packet with seq=705, len=536
log: network_send: a DATA packet with seq=1241, len=536
log: network_send: a DATA packet with seq=1777, len=536
log: network_send: a DATA packet with seq=2313, len=536
log: network_send: a DATA packet with seq=2849, len=392
CWND: 0; ERTT: 250
log: network_recv: a DATA-ACK packet with ack=705
....

CLIENT LOG ---
log: network_send: a SYN packet with seq=105
log: network_recv: a SYN-ACK packet with seq=138 and ack=106 and timestamp=4266256470
log: network_send: a DATA packet with seq=106, len=12
log: network_recv: a DATA-ACK packet with ack=118
log: network_recv: a DATA packet with seq=140, len=22 and timestamp=4266256474
log: network_send: a DATA-ACK packet with ack=162
log: network_recv: a DATA packet with seq=162, len=536 and timestamp=4266256474
log: network_send: a DATA-ACK packet with ack=698
log: network_recv: a DATA packet with seq=698, len=536 and timestamp=4266256474
log: network_send: a DATA-ACK packet with ack=1234
log: network_recv: a DATA packet with seq=1234, len=536 and timestamp=4266256474
log: network_send: a DATA-ACK packet with ack=1770
log: network_recv: a DATA packet with seq=1770, len=536 and timestamp=4266256475
log: network_send: a DATA-ACK packet with ack=2306
log: network_recv: a DATA packet with seq=2306, len=536 and timestamp=4266256475
log: network_send: a DATA-ACK packet with ack=2842
log: network_recv: a DATA packet with seq=2842, len=370 and timestamp=4266256475
log: network_send: a DATA-ACK packet with ack=3212
log: network_recv: a DATA packet with seq=3212, len=536 and timestamp=4266256478
log: network_send: a DATA-ACK packet with ack=3748
....


.

Path: shelby.stanford.edu!saga9.Stanford.EDU!priyank9
From: Priyank Kshitij Patel 
Newsgroups: su.class.cs244a
Subject: what does cksum in 1.C test?
Date: Mon, 27 Jan 2003 02:04:15 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043661857 14409 171.64.15.139 (27 Jan 2003 10:04:17 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4022

hi,

My code fails test 1.C saying that the checksum for
/usr/class/cs244a/grading_script/hw2/TESTDATA.0 is different from what is
expected.

However, I ran the program normally and the client downloaded all the
110230 bytes of the file TESTDATA.0 correctly to the file named rcvd.

Also a
"diff rcvd /usr/..../TESTDATA.0" indicates that both the files are exactly
similar.

Can you give an indication on where i could be going wrong?

Priyank

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: handling network errors
Date: Mon, 27 Jan 2003 04:48:28 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043671710 18660 171.64.15.74 (27 Jan 2003 12:48:30 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4023


 I don't see this explicitly covered in the homework description.  The
 socket api exposed to the application (in mysock) simply reads/writes
 to  the child process through the fd returned from transport_init, so
 if this is closed, reading/writing to it will produce an error.

 You should, on error, shut down the transport system appropriately and
 produce a meaningful error message.  I don't think it is necessary to set
 errno however.

 /mc


> It seems that an earlier question about network failures went unanswered
> in the message's thread.  Namely, how should we handle legitimate
> network-layer failures? I think the ideal is that we should be able to
> force the mysock layer functions to return -1 and set the proper errno
> value, but I don't see how to communicate this across processes?
>
> Thanks,
> Alex
>

.

Path: shelby.stanford.edu!not-for-mail
From: Fritz Budiyanto 
Newsgroups: su.class.cs244a
Subject: Fast Retransmit
Date: Mon, 27 Jan 2003 17:22:44 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine38.stanford.edu
X-Trace: news.Stanford.EDU 1043688164 25307 171.64.15.113 (27 Jan 2003 17:22:44 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:4024

Hi,

Shall we implement Van Jacobson fast retransmission ? ie. dont have to
wait for timeout in case of double ack ?

thanks,
Fritz
.

Path: shelby.stanford.edu!elaine34.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: what does cksum in 1.C test?
Date: Mon, 27 Jan 2003 18:49:58 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine34.stanford.edu
X-Trace: news.Stanford.EDU 1043693398 28260 171.64.15.109 (27 Jan 2003 18:49:58 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4025


>My code fails test 1.C saying that the checksum for
>/usr/class/cs244a/grading_script/hw2/TESTDATA.0 is different from what is
>expected.

>However, I ran the program normally and the client downloaded all the
>110230 bytes of the file TESTDATA.0 correctly to the file named rcvd.

>Also a
>"diff rcvd /usr/..../TESTDATA.0" indicates that both the files are exactly
>similar.

Test 1.C tests against the reference STCP server, so the fact that your client
works against your server doesn't mean you'll pass this test.  It checks
that the downloaded file size and the checksum (output of the cksum command)
are both correct for your client against the reference server.
.

Path: shelby.stanford.edu!not-for-mail
From: Tyson Condie 
Newsgroups: su.class.cs244a
Subject: Re: what does cksum in 1.C test?
Date: Mon, 27 Jan 2003 11:45:51 -0800
Lines: 30
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga17.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043696726 389 171.64.15.147 (27 Jan 2003 19:45:26 GMT)
X-Complaints-To: 
To: Matthew Jonathan Holliman 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4026

Matthew Jonathan Holliman wrote:
>>My code fails test 1.C saying that the checksum for
>>/usr/class/cs244a/grading_script/hw2/TESTDATA.0 is different from what is
>>expected.
> 
> 
>>However, I ran the program normally and the client downloaded all the
>>110230 bytes of the file TESTDATA.0 correctly to the file named rcvd.
> 
> 
>>Also a
>>"diff rcvd /usr/..../TESTDATA.0" indicates that both the files are exactly
>>similar.
> 
> 
> Test 1.C tests against the reference STCP server, so the fact that your client
> works against your server doesn't mean you'll pass this test.  It checks
> that the downloaded file size and the checksum (output of the cksum command)
> are both correct for your client against the reference server.

I am having the same issue.  However, when I run the test manually I get 
the correct cksum.  Using both
server.log <--> client
and
client.log <--> server

Could someone please confirm a successfull run for this test.

Thanks

.

Path: shelby.stanford.edu!saga7.Stanford.EDU!priyank9
From: Priyank Kshitij Patel 
Newsgroups: su.class.cs244a
Subject: Re: what does cksum in 1.C test?
Date: Mon, 27 Jan 2003 13:27:39 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043702861 3827 171.64.15.137 (27 Jan 2003 21:27:41 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4027

> >
> >>Also a
> >>"diff rcvd /usr/..../TESTDATA.0" indicates that both the files are exactly
> >>similar.
> >
> >
> > Test 1.C tests against the reference STCP server, so the fact that your client
> > works against your server doesn't mean you'll pass this test.  It checks
> > that the downloaded file size and the checksum (output of the cksum command)
> > are both correct for your client against the reference server.
>
> I am having the same issue.  However, when I run the test manually I get
> the correct cksum.  Using both
> server.log <--> client
> and
> client.log <--> server
>
> Could someone please confirm a successfull run for this test.
>
> Thanks
>
I too tested cksum o/p for the rcvd and the original TESTDATA.0 file and
they both came out to be the same.  However the grading script says

Checksum differs for file /usr/class/cs244a/grading_script/hw2/TESTDATA.0!
(Your cksum: 427134730, expected 1705403052).
Client output:
server: TESTDATA.0,110230,Ok

whereas the command cksum give me
saga7:~/244> cksum rcvd /usr/class/cs244a/grading_script/hw2/TESTDATA.0
1705403052 110230 rcvd
1705403052 110230 /usr/class/cs244a/grading_script/hw2/TESTDATA.0

nebody else with the same problem?
Priyank

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Fast Retransmit
Date: Mon, 27 Jan 2003 21:29:06 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043702946 3857 171.64.15.74 (27 Jan 2003 21:29:06 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4028

Implementing Van Jacobson fast retransmission is not a requirement.

I would be concerned about how it would interact with the grading
scripts.  Other TAs, any opinions?

SteveJ

In article 
Fritz Budiyanto   wrote:
>Hi,
>
>Shall we implement Van Jacobson fast retransmission ? ie. dont have to
>wait for timeout in case of double ack ?
>
>thanks,
>Fritz


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: TEST case 1.B
Date: Mon, 27 Jan 2003 21:34:04 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043703244 4054 171.64.15.74 (27 Jan 2003 21:34:04 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4029

In article 
Tan Gao (weiwei)  wrote:
>hi all!
>
>my program only failes test 1.B now with the following msg:
>Results:  NOT OK
>
>No 'rcvd' created!  Client output:
>
>from the log files (see below), it seems that the sequence and ACK numbers
>in my packet's TCP header are messed up.
>
>however, I did use "ntoh()" after receiving a packet, and "hton()" before
>sending a packet out. any clue what else may be causing the mis-matching
>numbers in the log?

Sounds like a bug in your code.

ntoh() and hton() will not affect the problem if you are developing
in the Sparc environment.  I believe both Sparc and network byte
order are big endian.

Bring your code by TA office hours if you haven't been able to
sort this problem out.

SteveJ

>
>thanks!
>Tan
>
>*********************************************
>SERVER LOG ---
>
>CWND: 3072; ERTT: 250
>log: network_recv: a SYN packet with seq=51
>log: network_send: a SYN-ACK packet with seq=167 and ack=52 and timestamp=4266260178
>CWND: 3072; ERTT: 250
>log: network_recv: a DATA packet with seq=52, len=12 and timestamp=4266260180
>log: network_send: a DATA-ACK packet with ack=64
[ . . . ]
.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Fast Retransmit
Date: Mon, 27 Jan 2003 22:22:46 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine2.stanford.edu
X-Trace: news.Stanford.EDU 1043706166 5503 171.64.15.67 (27 Jan 2003 22:22:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4030


>Implementing Van Jacobson fast retransmission is not a requirement.

More than that, you shouldn't do it; the timeouts are difficult enough
to try and grade as it is!

.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: what does cksum in 1.C test?
Date: Mon, 27 Jan 2003 22:35:23 +0000 (UTC)
Lines: 25
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine2.stanford.edu
X-Trace: news.Stanford.EDU 1043706923 5866 171.64.15.67 (27 Jan 2003 22:35:23 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4031


>I am having the same issue.  However, when I run the test manually I get 
>the correct cksum.  Using both
>server.log <--> client
>and
>client.log <--> server

>Could someone please confirm a successfull run for this test.

It works for me when I test my solution for the class from a couple of
years ago.  Other people have mentioned that they pass this test case
on the newsgroup also.

server.log and client.log are built using *your* transport.c, so the fact
that they work against your server/client doesn't mean much, except
that your implementation is compatible with itself.  (There's nothing
magic about these applications--they're the regular server/client using
your transport layer, modified also to record packet logs for grading
purposes, as one might guess from the names).

Test 1.C tests whether your implementation is compatible with the reference
solution, which implements STCP per the assignment specification.  (You can't
test this manually, because the reference functionality is embedded in the
grading executable).

.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: HW#2 memory management clarification
Date: Mon, 27 Jan 2003 22:59:10 +0000 (UTC)
Lines: 78
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine2.stanford.edu
X-Trace: news.Stanford.EDU 1043708350 6660 171.64.15.67 (27 Jan 2003 22:59:10 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4032

Hi--
I just wanted to clarify about the memory management options in the
assignment, mostly for part (b).  I suggested that if you're motivated
(and you should probably be a decent coder if you decide to try this),
I think you'll get more out of the assignment by trying to follow what
a "real" TCP stack would do, i.e. by avoiding memory copies where possible.
I emphasize again that this is *completely* optional; we will not take
off points if you copy buffers, and we won't give you extra points for
avoiding copies!  Avoiding extra copies will make the assignment harder
than simply copying memory, but I think it will give you more of a flavour
of what a real implementation goes through.  (Most go to great lengths to
avoid copying packets unnecessarily, and in many systems there's only a
single copy from the socket layer to the application... Linux even adds
support for avoiding this final copy too in recent versions, leading to
a zero-copy protocol stack).

So, if you haven't decided to ignore this...

There was a question on here about what I meant by "mbufs," as I mentioned
these only in passing; the book describes the basic idea, although it
doesn't label them as such (the name comes from the BSD socket stack,
I think).  Chapter 1, and possibly some bits of Chapter 3 or 4, discusses
network stack implementation.  The basic idea is to copy/split messages
by maintaining an extra level of indirection; you would have a small MsgHdr
structure (I think this is what the book calls it), pointing to the actual
data and length.  As data gets passed up the stack, the packet itself is
not copied, but instead headers can be prepended/stripped without touching
the packet data itself.  In your case, incoming packets come in out of
order, so you could maintain a separate data structure describing
arriving packets and their sequence numbers/lengths, so you could
reassemble them in the right order with only a single copy up to the app
(when you do your final write()).
 
I also received another question or two by e-mail, which I'm answering here
in case anyone else is interested in this.

>You mention in the review, in the pedantic section, its best for the
>program to minimize memory read/write.
>What is mimimum write?
>
>Is it:
>1 recv() -> 1 write to your buffer
>2 store that buffer to stream buffer (or socket receive buffer) -> another
>write
>3 write to application buffer (user space) -> another write, so its total
>3 write?
>
>we could minimize 1 & 2, into 1 write only. And I've looked at mbuf
>implementation on BSD, it has m_devget and m_devpull, which getting the
>whole frame from the device driver and store it into the mbuf (and off
>course allocating the right mbuf). I guess it has a mechanism to read the
>packet from device driver without having a contiguous memory. In our case
>we need a contiguous memory for recv(), and we dont know how big is the
>packet we will get from recv()?
>
>How many write is considered minimum?

If you think about how a real TCP/IP implementation works, the Ethernet
driver would probably arrange a DMA of the packet into memory somewhere;
no copy yet.  From there, it gets passed up the stack (to IP, and TCP)
without any copies, by using the MsgHdr type idea from the book; byte
stream reassembly probably happens by manipulating these same packet header
structures (e.g. maintaining a linked list of incoming packets).  At
the final step, to pass the data to the application, most systems copy
the data (i.e. one copy), although there's been some work on zero-copy
sockets (e.g. by page remapping) to accelerate Gigabit-Ethernet.

In our case, we don't have DMA (obviously), so the initial recv() acts
as a replacement for this, placing the packet somewhere in memory--we
can't place it in order, because of reordering/packet loss.  The
final write() to the app corresponds to the final copy of a normal TCP/IP
implementation, and is required.  So I think if you just recv() into a
set of buffers (of max STCP packet length each), and then write() to the
app from those same buffers, that's the best you can do in our framework,
and mimics what the TCP stack would go through.

Whatever you decide, have fun!

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: test 1.I
Date: Mon, 27 Jan 2003 23:01:30 +0000 (UTC)
Organization: Stanford University
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic26.stanford.edu
X-Trace: news.Stanford.EDU 1043708490 6768 171.64.15.50 (27 Jan 2003 23:01:30 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4033


This test is about FIN-ACKS for FIN. I have started to implement some of
the retransmission stuff. So depending on various things I may send more than
one FIN packet. But I will only get one FINACK back. I have a feeling this is
causing me to intermittently fail 1.I as there will be some unmatched FIN
packets in the stream if I have has to retransmit. Happily I have frozen a 
transport.c which has no retransmission stuff and this seems to pass all the
HW2a tests on every submitted run. 

So my question is can a solution for 2b fail the 2a script for the above reason?

If so remember to freeze a 2a solution.
.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test 1.I
Date: Mon, 27 Jan 2003 23:09:51 +0000 (UTC)
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine2.stanford.edu
X-Trace: news.Stanford.EDU 1043708991 6992 171.64.15.67 (27 Jan 2003 23:09:51 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4034


>This test is about FIN-ACKS for FIN. I have started to implement some of
>the retransmission stuff. So depending on various things I may send more than
>one FIN packet. But I will only get one FINACK back. I have a feeling this is
>causing me to intermittently fail 1.I as there will be some unmatched FIN
>packets in the stream if I have has to retransmit. Happily I have frozen a 
>transport.c which has no retransmission stuff and this seems to pass all the
>HW2a tests on every submitted run. 

>So my question is can a solution for 2b fail the 2a script for the above reason?

It shouldn't (and mine doesn't).  The test verifies that you receive a
later FIN-ACK than a given FIN, and that you don't send a FIN-ACK without
a preceding FIN.  It's not too picky.  I suspect a bug in your current
retransmission implementation.

>If so remember to freeze a 2a solution.

This is a good idea anyway, in case you discover a bug later on this week
and need to resubmit your part (a) solution...
.

Path: shelby.stanford.edu!not-for-mail
From: Tyson Condie 
Newsgroups: su.class.cs244a
Subject: Re: what does cksum in 1.C test?
Date: Mon, 27 Jan 2003 15:20:05 -0800
Lines: 35
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: saga6.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043709578 7342 171.64.15.136 (27 Jan 2003 23:19:38 GMT)
X-Complaints-To: 
To: Matthew Jonathan Holliman 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4035

Matthew Jonathan Holliman wrote:
>>I am having the same issue.  However, when I run the test manually I get 
>>the correct cksum.  Using both
>>server.log <--> client
>>and
>>client.log <--> server
> 
> 
>>Could someone please confirm a successfull run for this test.
> 
> 
> It works for me when I test my solution for the class from a couple of
> years ago.  Other people have mentioned that they pass this test case
> on the newsgroup also.
> 
> server.log and client.log are built using *your* transport.c, so the fact
> that they work against your server/client doesn't mean much, except
> that your implementation is compatible with itself.  (There's nothing
> magic about these applications--they're the regular server/client using
> your transport layer, modified also to record packet logs for grading
> purposes, as one might guess from the names).
> 
> Test 1.C tests whether your implementation is compatible with the reference
> solution, which implements STCP per the assignment specification.  (You can't
> test this manually, because the reference functionality is embedded in the
> grading executable).
> 

Last years test results contain a diff of the output file with the 
original file.  Are this years tests providing the same information? 
i.e. if my output does not contain a diff result, should I then assume 
that the files (rcvd and TESTDATA.0) match?

Thanks

.

Path: shelby.stanford.edu!elaine28.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: what does cksum in 1.C test?
Date: Tue, 28 Jan 2003 00:39:34 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: elaine28.stanford.edu
X-Trace: news.Stanford.EDU 1043714374 10555 171.64.15.103 (28 Jan 2003 00:39:34 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4036


>Last years test results contain a diff of the output file with the 
>original file.  Are this years tests providing the same information? 
>i.e. if my output does not contain a diff result, should I then assume 
>that the files (rcvd and TESTDATA.0) match?

No--this year just reports any size/cksum difference between the two files
(your downloaded version and the original) rather than using diff.  I don't
think a diff would be particularly helpful, since some discrepancy between
your implementation and the reference one would result in arbitrary errors
appearing in the diff result; but if I get a chance later on, I'll try and
add this in.

.

Path: shelby.stanford.edu!not-for-mail
From: "Nishant Verman" 
Newsgroups: su.class.cs244a
Subject: command line execution problems
Date: Mon, 27 Jan 2003 22:25:30 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: nishant.stanford.edu
X-Trace: news.Stanford.EDU 1043735130 21801 128.12.185.34 (28 Jan 2003 06:25:30 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4037

Hi,

My program runs fine if I specify the filename from the command line.
However it goes into an infiinte loop if I use the "-f" flag (the client's
child thread tries to read repeatedly from the application socket).

What could be causing this?

thanks,
nishant


.

Path: shelby.stanford.edu!saga0.Stanford.EDU!smadhura
From: Madhura Sudhakar Sharangpani 
Newsgroups: su.class.cs244a
Subject: Regarding packet lenght
Date: Mon, 27 Jan 2003 22:29:15 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga0.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043735356 21870 171.64.15.130 (28 Jan 2003 06:29:16 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4038

Hi
while processing incoming packet, should we only read as much data as is
specified in data length field of the header, or should we take all the
data remaining in the packet after header as data?
Madhura.

.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Regarding packet lenght
Date: Tue, 28 Jan 2003 07:29:15 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1043738955 23786 171.64.15.77 (28 Jan 2003 07:29:15 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4039

Use the data length field of the header.  That field
specifies the number of bytes of data in the packet;
the size of the header is not included.

SteveJ

In article 
Madhura Sudhakar Sharangpani   wrote:
>Hi
>while processing incoming packet, should we only read as much data as is
>specified in data length field of the header, or should we take all the
>data remaining in the packet after header as data?
>Madhura.
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: command line execution problems
Date: Tue, 28 Jan 2003 08:31:17 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1043742677 29238 171.64.15.112 (28 Jan 2003 08:31:17 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4040

I don't see any obvious reason, looking at the client.c code.

In client.c, different logic paths are taken in a few places
if the global "filename" is set.  You may want to take a look
at this code.

SteveJ

In article 
Nishant Verman  wrote:
>Hi,
>
>My program runs fine if I specify the filename from the command line.
>However it goes into an infiinte loop if I use the "-f" flag (the client's
>child thread tries to read repeatedly from the application socket).
>
>What could be causing this?
>
>thanks,
>nishant
>
>


.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: gdb on child process?
Date: Tue, 28 Jan 2003 02:04:45 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043748289 1533 171.64.15.66 (28 Jan 2003 10:04:49 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4041

Could any TA please give a little more detailed instruction on the "ugly
hack" to get gdb to use on child process? I tried to attach the child
process, and gdb asked me to restart the executable after killing the
running one.

Jichun

.

Path: shelby.stanford.edu!elaine22.Stanford.EDU!primdahl
From:  (Keith A Primdahl)
Newsgroups: su.class.cs244a
Subject: Local Testing
Date: Tue, 28 Jan 2003 16:26:46 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine22.stanford.edu
X-Trace: news.Stanford.EDU 1043771206 10366 171.64.15.87 (28 Jan 2003 16:26:46 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4042

Sometimes the simple things are not so obvious.  For local testing; i.e.,
once we have a complete transport.c which compiles, but no point yet in
running the provided test codes, we should be able to run our own trials
locally, right?

Open a window and run server [no parmameters] gives address:port.

Open a second window, run client [address:port].  Should get prompted for
a filename to get from server (then copy to "rcvd".

In my case, server dies with an error in myaccept, which must mean
something wrong in my passive init code.

Thanks

.

Path: shelby.stanford.edu!not-for-mail
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: handling network errors
Date: Tue, 28 Jan 2003 10:35:21 -0800
Lines: 41
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: slip-12-65-108-16.mis.prserv.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043778968 14106 12.65.108.16 (28 Jan 2003 18:36:08 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:4043

Hi,
I don't quite follow this. My understanding is that
for part A) we are guaranteed to have a reliable network so
we should not be concerned about network errors.
And for parts B and C , I don't think we should make any difference
between a network error and a packet that was dropped somewhere
along the way, the end result is that we have to retransmit out packet
no matter what. The fact that the driver realizes there's a network error
and tell us so is of no importance, I would think. We still have to wait
our timeout time to retransmit and if we exhaust all of our retransmits for
a packet we shoul bail then but not before that.
In my opinion we should not even check the results from network_send().

Am I missing something here?

Thanks
Rafa

Martin Casado wrote:

>  I don't see this explicitly covered in the homework description.  The
>  socket api exposed to the application (in mysock) simply reads/writes
>  to  the child process through the fd returned from transport_init, so
>  if this is closed, reading/writing to it will produce an error.
>
>  You should, on error, shut down the transport system appropriately and
>  produce a meaningful error message.  I don't think it is necessary to set
>  errno however.
>
>  /mc
>
> > It seems that an earlier question about network failures went unanswered
> > in the message's thread.  Namely, how should we handle legitimate
> > network-layer failures? I think the ideal is that we should be able to
> > force the mysock layer functions to return -1 and set the proper errno
> > value, but I don't see how to communicate this across processes?
> >
> > Thanks,
> > Alex
> >

.

Path: shelby.stanford.edu!not-for-mail
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: A few questions about assignment 2 A
Date: Tue, 28 Jan 2003 10:49:49 -0800
Lines: 38
Distribution: su
Message-ID: 
NNTP-Posting-Host: slip-12-65-108-16.mis.prserv.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043779846 14613 12.65.108.16 (28 Jan 2003 18:50:46 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:4044

Hi,

1.) I'm not sure what are the values that we should use for
th_sport,
th_dport,
th_off,
th_win: Is this always constant 3072? Do we need this value to implement
flow control?
th_sum,
th_urp

in a packet.

2.) Should we be concerned with the values of CWND and ERTT for part A?

3.) My implementation was intermittently failing on test 1.C. Sometimes
it would fail, sometimes
it would fail even without any code change. I logged all the transaction
from
my client and found out that in some cases I was receiving a few packets
duplicated
even though I had acknowledged those already. I thought we should not
care about this
case for part A. Has anybody found the same problem? It seems that there
is some timing
issues, if the reference server does not receive the ack within its
retransmit timeout it will retransmit
the packet. Am I correct?


Thanks,
Rafa






.

Path: shelby.stanford.edu!elaine6.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: second ack arrived first
Date: Tue, 28 Jan 2003 10:56:50 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine6.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043780212 14932 171.64.15.71 (28 Jan 2003 18:56:52 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4045

say, I sent 2 packets from my send window.  The ack of the second came
back first.  Do we discard this ack, or record it and wait for the first
ack until its n'th timeout?

Eric


.

Path: shelby.stanford.edu!elaine30.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: Re: second ack arrived first
Date: Tue, 28 Jan 2003 12:05:29 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine30.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043784331 17043 171.64.15.105 (28 Jan 2003 20:05:31 GMT)
X-Complaints-To: 
To: Eric Chenjian Xu 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4046

if u get an ack for 'n', it implies that that the other side has received
all bytes from initial sequence number to n.
so we have to interpret it as 'ack' ing both the packets

Sandhya

On Tue, 28 Jan 2003, Eric Chenjian Xu wrote:

> say, I sent 2 packets from my send window.  The ack of the second came
> back first.  Do we discard this ack, or record it and wait for the first
> ack until its n'th timeout?
>
> Eric
>
>
>

.

Path: shelby.stanford.edu!elaine22.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: gdb on child process?
Date: Tue, 28 Jan 2003 21:01:27 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine22.stanford.edu
X-Trace: news.Stanford.EDU 1043787687 19861 171.64.15.87 (28 Jan 2003 21:01:27 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4047


>Could any TA please give a little more detailed instruction on the "ugly
>hack" to get gdb to use on child process? I tried to attach the child
>process, and gdb asked me to restart the executable after killing the
>running one.

It still works for me exactly as posted--the only clarification I should
make is that the sleep(N) has to be long enough for you to be able to
attach to the child process before the sleep returns, if you want to be
able to set arbitrary breakpoints in the child.

There was some clarification to the slides posted on the newsgroup previously,
probably under the heading "updated review session slides posted" (it was
in response to an email), so you might check that post also if you haven't seen
it already.

.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Re: Test case 1.D and 1.F
Date: Tue, 28 Jan 2003 16:53:10 -0800
Lines: 14
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043801551 27760 128.12.195.69 (29 Jan 2003 00:52:31 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4048

I sent my code to you and am looking forward to your reply to help me figure
out the problem. Thanks.

"Matthew Jonathan Holliman"  wrote in message

> >My code still fails test case 1.F. I have added check in a locally copied
> >mysocket.c to see that there are times when more than 3072 bytes sit in
the
> >localpipe. 1.F is the only test case my code failed in.
>
> Please send me the code and I'll take a look at it.
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Recevier buffer
Date: Tue, 28 Jan 2003 16:54:53 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043801654 27797 128.12.195.69 (29 Jan 2003 00:54:14 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4049

For test 1.F, when the test script reports that "Transport layer receiver
buffered more than 3072 bytes of outstanding data", does it mean 3072 bytes
of processed or unprocessed data? In another word, do the 3072 bytes include
the header bytes or just 3072 bytes of combined payload of several packets?

I am unclear on the idea of "transport layer enforces correct receiver
window." Could someone please explain what the test case is testing against
and what sorts of problems may cause this case to fail?

Thanks.

-myl


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: Testcase error
Date: Tue, 28 Jan 2003 18:03:18 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043805801 461 171.64.15.74 (29 Jan 2003 02:03:21 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4050

I'm failing a couple of testcase with the following error:

 myaccept: Permission denied

What could this mean? There shouldn't be any write permission issues
here..right?


thanks,
nishant



.

Path: shelby.stanford.edu!not-for-mail
From: "Vijay Chemburkar" 
Newsgroups: su.class.cs244a
Subject: milestone A grading
Date: Tue, 28 Jan 2003 21:34:01 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: vj.stanford.edu
X-Trace: news.Stanford.EDU 1043818449 7982 128.12.79.199 (29 Jan 2003 05:34:09 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4051

Hi,

I was wondering how rigorous the style grading on this milestone will be. My
code has some data structures/functions that are overkill (and somewhat
non-functional) for part A (they're looking forward to part b). For example,
much of the functionality for dealing with out of order packets is in place
but it's incomplete. Is it cool if I just leave the extra framework in (with
the comments that tell me where to start for part b), or do you want clean
code (i.e., a standalone submission)?

thanks,
vj


.

Path: shelby.stanford.edu!not-for-mail
From: "Bina Vasavda" 
Newsgroups: su.class.cs244a
Subject: errors
Date: Tue, 28 Jan 2003 22:18:10 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: ev-01-hos4d.stanford.edu
X-Trace: news.Stanford.EDU 1043820817 9292 128.12.154.59 (29 Jan 2003 06:13:37 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4052

Hi, how do you want us to handle errors from malloc, etc? exit out?
Bina


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Office Hours Change
Date: Tue, 28 Jan 2003 23:29:12 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
X-Trace: news.Stanford.EDU 1043825420 12103 128.12.177.15 (29 Jan 2003 07:30:20 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4053

Hi All,



     I am permanently shifting my office hours back 30 minutes.  Therefore,
my new office hours are now:



Wednesdays: 1:30pm until 3:00pm in Sweet hall of course



Sorry if this causes problems.



--Russ


.

Path: shelby.stanford.edu!not-for-mail
From: "Nishant Verman" 
Newsgroups: su.class.cs244a
Subject: Re: Testcase error
Date: Wed, 29 Jan 2003 00:24:14 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nishant.stanford.edu
X-Trace: news.Stanford.EDU 1043828654 14487 128.12.185.34 (29 Jan 2003 08:24:14 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4054

buffer overflow...


"Nishant Verman"  wrote in message

> I'm failing a couple of testcase with the following error:
>
>  myaccept: Permission denied
>
> What could this mean? There shouldn't be any write permission issues
> here..right?
>
>
> thanks,
> nishant
>
>
>


.

Path: shelby.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: A few questions about assignment 2 A
Date: Wed, 29 Jan 2003 09:03:31 +0000 (UTC)
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine3.stanford.edu
X-Trace: news.Stanford.EDU 1043831011 15764 171.64.15.68 (29 Jan 2003 09:03:31 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4055


>1.) I'm not sure what are the values that we should use for
>th_sport,
>th_dport,
>th_off,
>th_win: Is this always constant 3072? Do we need this value to implement
>flow control?
>th_sum,
>th_urp

You can ignore all of these; they aren't used by STCP.

>2.) Should we be concerned with the values of CWND and ERTT for part A?

Nope.

>3.) My implementation was intermittently failing on test 1.C. Sometimes
>it would fail, sometimes
>it would fail even without any code change. I logged all the transaction
>from
>my client and found out that in some cases I was receiving a few packets
>duplicated
>even though I had acknowledged those already. I thought we should not
>care about this
>case for part A. Has anybody found the same problem? It seems that there
>is some timing
>issues, if the reference server does not receive the ack within its
>retransmit timeout it will retransmit
>the packet. Am I correct?

Good point--I overlooked this.  It shouldn't happen very often in reliable
mode, since the minimum ERTT is 20 ms but it's possible if a machine is very
heavily loaded.  (During grading, we would run several times if your code
fails, and give you the benefit of the doubt if it seems to generally work.
But I'll be sure to disable the retransmissions in the reference server for
part (a) when grading).
.

Path: shelby.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: milestone A grading
Date: Wed, 29 Jan 2003 09:05:17 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine3.stanford.edu
X-Trace: news.Stanford.EDU 1043831117 15805 171.64.15.68 (29 Jan 2003 09:05:17 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4056



>I was wondering how rigorous the style grading on this milestone will be. My
>code has some data structures/functions that are overkill (and somewhat
>non-functional) for part A (they're looking forward to part b). For example,
>much of the functionality for dealing with out of order packets is in place
>but it's incomplete. Is it cool if I just leave the extra framework in (with
>the comments that tell me where to start for part b), or do you want clean
>code (i.e., a standalone submission)?

We'll only grade functionality for parts A/B; the style/design will be based
on the final submission for part C, for the reasons you point out.
.

Path: shelby.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: handling network errors
Date: Wed, 29 Jan 2003 09:07:58 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine3.stanford.edu
X-Trace: news.Stanford.EDU 1043831278 15839 171.64.15.68 (29 Jan 2003 09:07:58 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4057


>I don't quite follow this. My understanding is that
>for part A) we are guaranteed to have a reliable network so
>we should not be concerned about network errors.
>And for parts B and C , I don't think we should make any difference
>between a network error and a packet that was dropped somewhere
>along the way, the end result is that we have to retransmit out packet
>no matter what. The fact that the driver realizes there's a network error
>and tell us so is of no importance, I would think. We still have to wait
>our timeout time to retransmit and if we exhaust all of our retransmits for
>a packet we shoul bail then but not before that.
>In my opinion we should not even check the results from network_send().

>Am I missing something here?

Well, if network_send() gives you an error you probably shouldn't just
ignore it completely, if only because it may have been caused by a bug in
your program (e.g. invalid pointer).  You needn't handle errors gracefully,
as we won't be testing this--for example, an assert() would be perfectly
reasonable.

.

Path: shelby.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: errors
Date: Wed, 29 Jan 2003 09:09:59 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine3.stanford.edu
X-Trace: news.Stanford.EDU 1043831399 15876 171.64.15.68 (29 Jan 2003 09:09:59 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4058


>Hi, how do you want us to handle errors from malloc, etc? exit out?

If malloc fails, the grading script will have died in the meantime :-)

We aren't testing weird error conditions.  (e.g., I won't go and pull the
network card from one of the elaines while testing!)  So you can handle
errors in some reasonable method--bailing out is fine.  You might also
spend a few minutes to think about how a real TCP stack would handle this
case.
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: errors
Date: Wed, 29 Jan 2003 01:11:15 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1043831543 15946 128.12.186.92 (29 Jan 2003 09:12:23 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4059

Martin answered this earlier in the newsgroup in regard to network errors.

To recap: essentially if a system call fails (especially malloc), there is
almost nothing you can do to keep your program running.

The best thing to do is report the error with a decent error message and
have your program gracefully exit.  This is much better than assuming all
system calls will succeed and then having unpredicable results when a system
call fails.

--Russ


"Bina Vasavda"  wrote in message

> Hi, how do you want us to handle errors from malloc, etc? exit out?
> Bina
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Pavan" 
Newsgroups: su.class.cs244a
Subject: 'select' problems
Date: Wed, 29 Jan 2003 01:25:48 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: whizkid.stanford.edu
X-Trace: news.Stanford.EDU 1043832137 16129 128.12.184.109 (29 Jan 2003 09:22:17 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:4060

Hi,
   In the control-loop, when select returns, only one of local_data_sd or
sockfd are getting active in my code.
    I am writing the ACKs back on to sockfd as soon as I read the data out
of receive buffer. but the server is not reading the Acks,it's reading only
out of local_data_sd.. and only when all the data on local_data_sd is over,
it is starting to read from sockfd.
Please help.
Thanks
Pavan


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: do transport_read and transport_write exist?
Date: Wed, 29 Jan 2003 01:32:21 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043832742 16362 128.12.85.0 (29 Jan 2003 09:32:22 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4061

I find it odd that I am the first to remark on this, but here goes:

Where are the transport_read and transport_write that are mentioned in the
STCP protocol overview?

It makes a special point to say that if we have 256 bytes of data sent
twice, and the receiver asks for 512, they should receive it as one lump
sum. 1. Doesn't the basic socket functionality already give this? That is,
if I read on a socket and a full 512 bytes aren't yet available, won't I
block? 2. Lacking some transport_x function, how would I know how many bytes
the application had requested? Jonathan Herbach asked the same question 2
days ago, but has not yet been answered.

--
____________________________________________
Rene Patnode
Stanford University

Computer Science
Phi Kappa Psi
Resident Assistant, Cardenal

"Mmm... unexplained bacon." - Homer Simpson


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: 'select' problems
Date: Wed, 29 Jan 2003 02:25:16 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1043835983 17987 128.12.186.92 (29 Jan 2003 10:26:23 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4062

Make sure that you are calling FD_ZERO and FD_SET macros before every select
call (thus make sure they are in your loop).  There is a big warning about
this common bug in the Stevens book.

--Russ


"Pavan"  wrote in message

> Hi,
>    In the control-loop, when select returns, only one of local_data_sd or
> sockfd are getting active in my code.
>     I am writing the ACKs back on to sockfd as soon as I read the data out
> of receive buffer. but the server is not reading the Acks,it's reading
only
> out of local_data_sd.. and only when all the data on local_data_sd is
over,
> it is starting to read from sockfd.
> Please help.
> Thanks
> Pavan
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: do transport_read and transport_write exist?
Date: Wed, 29 Jan 2003 02:29:53 -0800
Lines: 39
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1043836260 18221 128.12.186.92 (29 Jan 2003 10:31:00 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4063

Because our stcp transport layer is using sockets to communicate with the
higher level applications if the application on the receiving side asks for
more data than is available, the receiving app will block on the socket
until the receiving part of your transport layer provides the necessary
data.

--Russ


"Rene Patnode"  wrote in message

> I find it odd that I am the first to remark on this, but here goes:
>
> Where are the transport_read and transport_write that are mentioned in the
> STCP protocol overview?
>
> It makes a special point to say that if we have 256 bytes of data sent
> twice, and the receiver asks for 512, they should receive it as one lump
> sum. 1. Doesn't the basic socket functionality already give this? That is,
> if I read on a socket and a full 512 bytes aren't yet available, won't I
> block? 2. Lacking some transport_x function, how would I know how many
bytes
> the application had requested? Jonathan Herbach asked the same question 2
> days ago, but has not yet been answered.
>
> --
> ____________________________________________
> Rene Patnode
> Stanford University
>
> Computer Science
> Phi Kappa Psi
> Resident Assistant, Cardenal
>
> "Mmm... unexplained bacon." - Homer Simpson
>
>


.

Path: shelby.stanford.edu!epic13.Stanford.EDU!mmahathi
From: Mahathi Sai Prasanna Mahabhashyam 
Newsgroups: su.class.cs244a
Subject: Reg FINACKS
Date: Wed, 29 Jan 2003 09:53:00 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043862784 28903 171.64.15.46 (29 Jan 2003 17:53:04 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4064

Hi,
    When I test against the test script, I am passing all the tests,
except one that says, not all the ACKs are received before FIN. But when I
check my code separately, it is blocking until it gets all ACKs before
sending the FIN. Also, the logs indicate that a FIN is received before a
FINACK was sent.. wht could be the problem?

Please help,
Mahathi.

.

Path: shelby.stanford.edu!cardinal2.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: Re: 'select' problems
Date: Wed, 29 Jan 2003 13:21:46 -0800
Lines: 32
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: cardinal2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043875309 5973 171.64.15.250 (29 Jan 2003 21:21:49 GMT)
X-Complaints-To: 
To: Russell Greene 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4065

if we are going to set the same sockfds every time, why should we FD_ZERO
every time?

On Wed, 29 Jan 2003, Russell Greene wrote:

> Make sure that you are calling FD_ZERO and FD_SET macros before every select
> call (thus make sure they are in your loop).  There is a big warning about
> this common bug in the Stevens book.
>
> --Russ
>
>
> "Pavan"  wrote in message
> 
> > Hi,
> >    In the control-loop, when select returns, only one of local_data_sd or
> > sockfd are getting active in my code.
> >     I am writing the ACKs back on to sockfd as soon as I read the data out
> > of receive buffer. but the server is not reading the Acks,it's reading
> only
> > out of local_data_sd.. and only when all the data on local_data_sd is
> over,
> > it is starting to read from sockfd.
> > Please help.
> > Thanks
> > Pavan
> >
> >
>
>
>

.

Path: shelby.stanford.edu!saga20.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: how to link real time libraries -lrt?
Date: Wed, 29 Jan 2003 21:31:44 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga20.stanford.edu
X-Trace: news.Stanford.EDU 1043875904 6347 171.64.15.150 (29 Jan 2003 21:31:44 GMT)
X-Complaints-To: 
Keywords: -lrt
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4066

if we are not supposed to change the Makefile, how can I use some of the libraries which require compile time linking?

I want to use the -lrt option.

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: milestone A grading
Date: Wed, 29 Jan 2003 22:54:24 +0000 (UTC)
Organization: Stanford University
Lines: 17
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: epic22.stanford.edu
X-Trace: news.Stanford.EDU 1043880864 10656 171.64.15.57 (29 Jan 2003 22:54:24 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4067


So full credit will be given if HW2A and HW2B passes all the tests?

In article 
  (Matthew Jonathan Holliman) writes:
> 
> 
> >I was wondering how rigorous the style grading on this milestone will be. My
> >code has some data structures/functions that are overkill (and somewhat
> >non-functional) for part A (they're looking forward to part b). For example,
> >much of the functionality for dealing with out of order packets is in place
> >but it's incomplete. Is it cool if I just leave the extra framework in (with
> >the comments that tell me where to start for part b), or do you want clean
> >code (i.e., a standalone submission)?
> 
> We'll only grade functionality for parts A/B; the style/design will be based
> on the final submission for part C, for the reasons you point out.
.

Path: shelby.stanford.edu!not-for-mail
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: Re: Recevier buffer
Date: Wed, 29 Jan 2003 14:57:39 -0800
Organization: Stanford University
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga5.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043881060 10924 171.64.15.135 (29 Jan 2003 22:57:40 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:4068

did you find out from Matthew what this testcase is doing?
I'm also failing on this but can't figure out what they're actually
testing in this.


nishant


Man Yu Lui wrote:
> 
> For test 1.F, when the test script reports that "Transport layer receiver
> buffered more than 3072 bytes of outstanding data", does it mean 3072 bytes
> of processed or unprocessed data? In another word, do the 3072 bytes include
> the header bytes or just 3072 bytes of combined payload of several packets?
> 
> I am unclear on the idea of "transport layer enforces correct receiver
> window." Could someone please explain what the test case is testing against
> and what sorts of problems may cause this case to fail?
> 
> Thanks.
> 
> -myl
.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Help with sequence numbers
Date: Wed, 29 Jan 2003 15:04:56 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043881497 11405 171.64.15.82 (29 Jan 2003 23:04:57 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4069

Hi Everyone,

I'm getting myself all mixed up and turned around with sequence numbers. I
understand the number exchange during connect and teardown, but am
confused as to how the numbers are supposed to be handled during data
transmission.

Could somebody please post or point me to an example of the sequence
number passing used in our 2 way handshake followed by the exchange of a
few data packets with the server.

Thanks,
Tim



.

Path: shelby.stanford.edu!saga20.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: FIN - connection teardown
Date: Wed, 29 Jan 2003 23:27:50 +0000 (UTC)
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga20.stanford.edu
X-Trace: news.Stanford.EDU 1043882870 12339 171.64.15.150 (29 Jan 2003 23:27:50 GMT)
X-Complaints-To: 
Keywords: FIN
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4070


Can someone let me know if this is correct?

      transport_close()
         -
         -
      client realizes connection close
         -
         -
       client waits for all data                 remote client
          to be ACKED                             sends the pending ACKS
         -                                           -
         ------------------------------------->      -
               SENDS FIN                          Revs FIN
                                                     -          
        -                                            -
        -                                            -      
        <---------------------------------------  sends FIN_ACK
                Sends FIN_ACK                      client exits
        -
        -
        client exits

.

Path: shelby.stanford.edu!not-for-mail
From: Peter Lai 
Newsgroups: su.class.cs244a
Subject: Re: Help with sequence numbers
Date: Wed, 29 Jan 2003 15:39:11 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: peetah.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043883551 12680 128.12.187.58 (29 Jan 2003 23:39:11 GMT)
X-Complaints-To: 
X-Newsreader: Forte Agent 1.91/32.564
Xref: shelby.stanford.edu su.class.cs244a:4071

On Wed, 29 Jan 2003 15:04:56 -0800, Tim Reddy 
wrote:

>Hi Everyone,
>
>I'm getting myself all mixed up and turned around with sequence numbers. I
>understand the number exchange during connect and teardown, but am
>confused as to how the numbers are supposed to be handled during data
>transmission.
>
>Could somebody please post or point me to an example of the sequence
>number passing used in our 2 way handshake followed by the exchange of a
>few data packets with the server.

	I'm having a few problems, too... what I'd like to know is
when which sequence number is used -- since there are two sequence
numbers running around for each send/receive pair, when do you use
which? When you send a packet, is the sequence number the byte # that
the client is expecting, or the byte # that the sender is sending? (I
know the number should correspond to the same byte, but I'm wondering
which is used.) Also, when you ACK, do you ack back with the next byte
you're expecting to receive, or the next byte that you want the sender
to send?
.

Path: shelby.stanford.edu!cardinal3.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: Re: Help with sequence numbers
Date: Wed, 29 Jan 2003 15:51:11 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: cardinal3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043884272 13079 171.64.15.251 (29 Jan 2003 23:51:12 GMT)
X-Complaints-To: 
To: Peter Lai 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4072

 i'll try to give an example

- first of all...
sequence number indicates the byte number of the first byte u are sending
ack number indicates the byte u r expecting next

Side A listens passively and side B initiates the connection

B to A Syn with seq x
A to B SynAck with seq y ack x+1

if B sends data to A
B to A data pkt seq x+1 length z
A to B ack x+z+1

if A sends data
A to B data pkt seq y+1 length m
B to A ack y+1+m

--hope i'm not confusing u further ;)

Sandhya

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Local Testing
Date: Thu, 30 Jan 2003 00:09:57 +0000 (UTC)
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043885397 13678 171.64.15.106 (30 Jan 2003 00:09:57 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4073


>Sometimes the simple things are not so obvious.  For local testing; i.e.,
>once we have a complete transport.c which compiles, but no point yet in
>running the provided test codes, we should be able to run our own trials
>locally, right?

Yep.

>Open a window and run server [no parmameters] gives address:port.

>Open a second window, run client [address:port].  Should get prompted for
>a filename to get from server (then copy to "rcvd".

>In my case, server dies with an error in myaccept, which must mean
>something wrong in my passive init code.

If you print out the packet log (e.g. do a dprintf before you do a 
network_send, or after a network_recv), what's the output?  Can you
step into the code with gdb?  Does Purify report any errors?  (I'd
always use Purify for my first attempt at tracking down weird bugs--if
you're lucky enough for it to catch the problem, it can save a lot
of time).

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Recevier buffer
Date: Thu, 30 Jan 2003 00:13:49 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043885629 13835 171.64.15.106 (30 Jan 2003 00:13:49 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4074

Nishant Verman  writes:

>did you find out from Matthew what this testcase is doing?
>I'm also failing on this but can't figure out what they're actually
>testing in this.

The test case is fairly innocuous; it just looks for successive ACKs
that exceed the window length.  (I can't test an invalid receiver window
more comprehensively until part (b), due to the in-order packet delivery
constraint in part (a)).

I haven't had a chance to track down what's going on yet, but I'll post on
here if I find out what's causing this behaviour.  (If you could send me your
code also, it would be another data point to look at).

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 'select' problems
Date: Thu, 30 Jan 2003 00:15:58 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043885758 13965 171.64.15.106 (30 Jan 2003 00:15:58 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4075


>if we are going to set the same sockfds every time, why should we FD_ZERO
>every time?

Remember that select() writes to the array you pass in, which is why you use
the FS_ISSET() macro after the call returns to determine whether a given
descriptor was active or not.  So you need to reinitialize this array before
the next call to select().


>On Wed, 29 Jan 2003, Russell Greene wrote:

>> Make sure that you are calling FD_ZERO and FD_SET macros before every select
>> call (thus make sure they are in your loop).  There is a big warning about
>> this common bug in the Stevens book.
.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Recevier buffer
Date: Thu, 30 Jan 2003 00:24:57 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043886297 14614 171.64.15.106 (30 Jan 2003 00:24:57 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4076

I just looked at the script again, and it seems that when I commented out
the more stringent test, I forgot to remove a related check.  (It would
cause the test to fail if your transport layer reads/writes data much
faster than the application reads it with myread()).  So you might try
this again and see if you still have problems.  Let me know how it goes.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: milestone A grading
Date: Thu, 30 Jan 2003 00:25:33 +0000 (UTC)
Lines: 5
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043886333 14631 171.64.15.106 (30 Jan 2003 00:25:33 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4077


>So full credit will be given if HW2A and HW2B passes all the tests?

As long as they pass all the tests for us :-)

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: how to link real time libraries -lrt?
Date: Thu, 30 Jan 2003 00:27:44 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043886464 14717 171.64.15.106 (30 Jan 2003 00:27:44 GMT)
X-Complaints-To: 
Keywords: -lrt
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4078


>if we are not supposed to change the Makefile, how can I use some of the libraries which require compile time linking?

You can't.  The prohibition on changing the Makefile isn't due to whimsy on
our part; the Makefile is replaced with our own during grading, which doesn't
link your code with arbitrary libraries.

>I want to use the -lrt option.

Please use poll()/select() to handle the timeouts rather than the real-time
timers.
.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Reg FINACKS
Date: Thu, 30 Jan 2003 00:38:47 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043887127 15015 171.64.15.106 (30 Jan 2003 00:38:47 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4079


>    When I test against the test script, I am passing all the tests,
>except one that says, not all the ACKs are received before FIN. But when I
>check my code separately, it is blocking until it gets all ACKs before
>sending the FIN. Also, the logs indicate that a FIN is received before a
>FINACK was sent.. wht could be the problem?

Are these your logs of packets/ACKs sent/received?  Does Purify report any
errors?  (One or two people reported problems with FINs, and they came from
returning structures allocated on the stack, causing intermittent failures).

If you still have problems, I can try and take a look at your code--probably
not before tomorrow, though.
.

Path: shelby.stanford.edu!saga20.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: cksum error?
Date: Thu, 30 Jan 2003 00:39:21 +0000 (UTC)
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga20.stanford.edu
X-Trace: news.Stanford.EDU 1043887161 15031 171.64.15.150 (30 Jan 2003 00:39:21 GMT)
X-Complaints-To: 
Keywords: cksum
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4080

My implementation works fine for transfering  text files.
The cksum output is correct.

but fails for the binary files.
any pointers?
.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: FIN - connection teardown
Date: Thu, 30 Jan 2003 00:40:01 +0000 (UTC)
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043887201 15047 171.64.15.106 (30 Jan 2003 00:40:01 GMT)
X-Complaints-To: 
Keywords: FIN
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4081



>Can someone let me know if this is correct?

>      transport_close()
>         -
>         -
>      client realizes connection close
>         -
>         -
>       client waits for all data                 remote client
>          to be ACKED                             sends the pending ACKS
>         -                                           -
>         ------------------------------------->      -
>               SENDS FIN                          Revs FIN
>                                                     -          
>        -                                            -
>        -                                            -      
>        <---------------------------------------  sends FIN_ACK
>                Sends FIN_ACK                      client exits
>        -
>        -
>        client exits

Yes.

.

Path: shelby.stanford.edu!not-for-mail
From: Peter Lai 
Newsgroups: su.class.cs244a
Subject: Re: Help with sequence numbers
Date: Wed, 29 Jan 2003 16:41:26 -0800
Lines: 22
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: peetah.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043887286 15143 128.12.187.58 (30 Jan 2003 00:41:26 GMT)
X-Complaints-To: 
X-Newsreader: Forte Agent 1.91/32.564
Xref: shelby.stanford.edu su.class.cs244a:4082

>- first of all...
>sequence number indicates the byte number of the first byte u are sending
>ack number indicates the byte u r expecting next
>
>Side A listens passively and side B initiates the connection
>
>B to A Syn with seq x
>A to B SynAck with seq y ack x+1
>
>if B sends data to A
>B to A data pkt seq x+1 length z
>A to B ack x+z+1
>
>if A sends data
>A to B data pkt seq y+1 length m
>B to A ack y+1+m

	Ahhhhh, NOW I understand why it's called a synchronization
packet ;) That helped a lot, thanks! Now if only I weren't out of
testing tries because I thought something else was the bug... :p


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: cksum error?
Date: Thu, 30 Jan 2003 00:44:07 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043887447 15217 171.64.15.106 (30 Jan 2003 00:44:07 GMT)
X-Complaints-To: 
Keywords: cksum
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4083


>My implementation works fine for transfering  text files.
>The cksum output is correct.

>but fails for the binary files.
>any pointers?

I don't have a plausible theory.  I assume you aren't using strlen() or
something similar somewhere.  Are the binary files of larger size than the
text files you transfer?
.

Path: shelby.stanford.edu!saga20.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: Re: cksum error?
Date: Thu, 30 Jan 2003 00:47:04 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga20.stanford.edu
X-Trace: news.Stanford.EDU 1043887624 15367 171.64.15.150 (30 Jan 2003 00:47:04 GMT)
X-Complaints-To: 
Keywords: cksum
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4084

When I transfer a text file as big as the binary it works fine.

 (Matthew Jonathan Holliman) writes:


>>My implementation works fine for transfering  text files.
>>The cksum output is correct.

>>but fails for the binary files.
>>any pointers?

>I don't have a plausible theory.  I assume you aren't using strlen() or
>something similar somewhere.  Are the binary files of larger size than the
>text files you transfer?
.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: network_send: Destination address required?
Date: Wed, 29 Jan 2003 16:55:03 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043888104 15591 171.64.15.82 (30 Jan 2003 00:55:04 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4085

I think somebody else had a similar problem, but I can't seem to find it
now...

I'm having a problem where the client and server start up fine and
handshake. Then I request a file via the client, which correctly sends the
request off to the server, which then uses the local socket to pipe the
file requested into my transport layer. However, whenever I try to send
any packets out from the server back to the client, sendmsg within
network_send fails, and perror cites "Destination address required" as
the error.

Has anybody else come across this or have any idea what is going on here?

Thanks,
Tim



.

Path: shelby.stanford.edu!not-for-mail
From: "Srinivas Panguluri" 
Newsgroups: su.class.cs244a
Subject: Local vs. Network Sockets
Date: Wed, 29 Jan 2003 17:02:18 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: donkey.stanford.edu
X-Trace: news.Stanford.EDU 1043888539 15894 128.12.106.31 (30 Jan 2003 01:02:19 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4086

When we are sending/receiving data on the local socket
(ctx->local_socket_sd), what functions do we use?  Do we use the provided
network layer functions, network_send and network_recv?  Do these functions
overwrite the address variables in network.c everytime they are called?

The problem I'm getting happens after the client sends the filename to the
server, and the server gets the name, processes it, and tries to send the
data back across its sockfd.  I try sending data over the remote sock:
network_send(ctx->sockfd, data, len), but I keep getting an error (errno =
96, perror: destination address required).  Why would this destination
address be empty?  I thought that network.c handled setting all that up for
us?  Everything seems to work fine up to this point (the SYNS are working).

Any ideas?

Thanks,
Srinivas


.

Path: shelby.stanford.edu!not-for-mail
From: "Srinivas Panguluri" 
Newsgroups: su.class.cs244a
Subject: Re: network_send: Destination address required?
Date: Wed, 29 Jan 2003 17:04:34 -0800
Lines: 32
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: donkey.stanford.edu
X-Trace: news.Stanford.EDU 1043888675 15951 128.12.106.31 (30 Jan 2003 01:04:35 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4087

Tim,

Haha!

I have the same exact problem, and instead of reading your post, I posted my
own blindly seven minutes after you!

I hope someone knows how to fix this, or can help... :)
Srinivas

"Tim Reddy"  wrote in message

> I think somebody else had a similar problem, but I can't seem to find it
> now...
>
> I'm having a problem where the client and server start up fine and
> handshake. Then I request a file via the client, which correctly sends the
> request off to the server, which then uses the local socket to pipe the
> file requested into my transport layer. However, whenever I try to send
> any packets out from the server back to the client, sendmsg within
> network_send fails, and perror cites "Destination address required" as
> the error.
>
> Has anybody else come across this or have any idea what is going on here?
>
> Thanks,
> Tim
>
>
>


.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Local vs. Network Sockets
Date: Thu, 30 Jan 2003 01:08:24 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043888904 16111 171.64.15.106 (30 Jan 2003 01:08:24 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4088


>When we are sending/receiving data on the local socket
>(ctx->local_socket_sd), what functions do we use?  Do we use the provided
>network layer functions, network_send and network_recv?  Do these functions
>overwrite the address variables in network.c everytime they are called?

You definitely should *not* use these--you just use a regular read()/write()
on this socket.  (It's a normal TCP connection--you can look in
localsocketpair() to see how it's set up).  If you look at network.c,
it'll be clear why you wouldn't use the network_...() calls on the
application I/O socket.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: network_send: Destination address required?
Date: Thu, 30 Jan 2003 01:09:13 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043888953 16134 171.64.15.106 (30 Jan 2003 01:09:13 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4089



>I hope someone knows how to fix this, or can help... :)

Did Purify indicate any errors?  (My stock response to questions for which
I don't know the immediate answer).

.

Path: shelby.stanford.edu!saga3.Stanford.EDU!kushcu
From: Ozgun Ali Erdogan 
Newsgroups: su.class.cs244a
Subject: 1B and 1C response
Date: Wed, 29 Jan 2003 17:11:58 -0800
Lines: 35
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043889119 16236 171.64.15.133 (30 Jan 2003 01:11:59 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4090


Hi,

I compile and run my transport.c, and there seems to be no problem with
file transfer. I diffed big files with rcvd, and problem seemed to come
up. When I run the test script, tests 1B and 1C fail and others run fine.

What could be the problem?

Test 1.B [out of 10]
Checks student Tx (server) against reference Rx (client).

Results:  NOT OK

No 'rcvd' created!  Client output:
server:
Malformed response from server.

----------------------------------------------------------------------

Test 1.C [out of 10]
Checks reference transmitter against student receiver.

Results:  NOT OK

No 'rcvd' created!  Client output:
server:
Malformed response from server.

----------------------------------------------------------------------

Thanks,

Ozgun.

.

Path: shelby.stanford.edu!not-for-mail
From: "Metha Jeeradit" 
Newsgroups: su.class.cs244a
Subject: Re: test 1.I
Date: Wed, 29 Jan 2003 17:20:04 -0800
Lines: 22
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: ithaca.stanford.edu
X-Trace: news.Stanford.EDU 1043889620 16569 128.12.181.52 (30 Jan 2003 01:20:20 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4091

I'm currently only failing the test 1.I (No FIN-ACK for FIN).  But, when I
tested my code locally I could see a FIN-ACK being transmitted and received
using printf.  So, I'm not quite sure why I'm failing this test.  My
purify'ed code reported no memory leak.  I think that maybe it's due to how
I form the FIN-ACK packet?  I'm setting the th_seq and th_ack to 0 for both
FIN and FIN-ACK packets since this is what was said in last year's
newsgroup.  Is this correct?  Anyone have any idea why else I would be
failing this?  How is the test verifying that you receive a later FIN-ACK
than a given FIN if no sequence numbers are used in the FIN/FIN-ACK packet?

thanks,

Metha


> It shouldn't (and mine doesn't).  The test verifies that you receive a
> later FIN-ACK than a given FIN, and that you don't send a FIN-ACK without
> a preceding FIN.  It's not too picky.  I suspect a bug in your current
> retransmission implementation.



.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 01:21:20 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043889680 16607 171.64.15.106 (30 Jan 2003 01:21:20 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4092


Some other people have reported problems talking to the reference STCP
implementation; unfortunately, I suppose there might be many ways to cause
this to happen.  I know one person had made an assumption about packet length,
which of course held only in his sender/receiver and not in others.  You
might read through the specs again to make sure you haven't made a similar
assumption that's not guaranteed by STCP.

If anyone else on here has had problems with--and solutions to--this part,
please do consider sharing your experiences; I think it would be very valuable
to others.

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test 1.I
Date: Thu, 30 Jan 2003 01:33:19 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine31.stanford.edu
X-Trace: news.Stanford.EDU 1043890399 16995 171.64.15.106 (30 Jan 2003 01:33:19 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4094


>I'm currently only failing the test 1.I (No FIN-ACK for FIN).  But, when I
>tested my code locally I could see a FIN-ACK being transmitted and received
>using printf.  So, I'm not quite sure why I'm failing this test.  My
>purify'ed code reported no memory leak.  I think that maybe it's due to how
>I form the FIN-ACK packet?  I'm setting the th_seq and th_ack to 0 for both
>FIN and FIN-ACK packets since this is what was said in last year's
>newsgroup.  Is this correct?  Anyone have any idea why else I would be
>failing this?  How is the test verifying that you receive a later FIN-ACK
>than a given FIN if no sequence numbers are used in the FIN/FIN-ACK packet?

The th_seq and th_ack fields are ignored for FIN packets in STCP
(since the FIN isn't sent until all outstanding data's been ACKed).
The test itself just looks through a log packets sent/received in
chronological order, since you should never receive a FIN-ACK until
you've sent a FIN.

.

Path: shelby.stanford.edu!epic21.Stanford.EDU!sidj
From: Siddharth Joshi 
Newsgroups: su.class.cs244a
Subject: CheckSum Error
Date: Wed, 29 Jan 2003 18:40:13 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043894418 19202 171.64.15.56 (30 Jan 2003 02:40:18 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4095

Hi,

I am not getting the TEST 1.B right.

I have tested the TESTDATA.0 (text file) separately. It works fine.
Exactly the same size file.
"diff" (command) output is also perfect.

What is happenning??

Siddharth Joshi
EE, Stanford


.

Path: shelby.stanford.edu!not-for-mail
From: Siddharth Joshi 
Newsgroups: su.class.cs244a
Subject: Re: CheckSum Error
Date: Wed, 29 Jan 2003 18:43:17 -0800
Organization: EE, Stanford University
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic21.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043894597 19243 171.64.15.56 (30 Jan 2003 02:43:17 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:4096

Siddharth Joshi wrote:
> 
> Hi,
> 
> I am not getting the TEST 1.B right.
> 
> I have tested the TESTDATA.0 (text file) separately. It works fine.
> Exactly the same size file.
> "diff" (command) output is also perfect.
> 
> What is happenning??
> 
> Siddharth Joshi
> EE, Stanford


I have tried with binary files also . The binary files could be as
before.

Just that the permission are to be correctly set for the rcvd file.

Siddharth Joshi
EE, Stanford
.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Re: network_send: Destination address required?
Date: Wed, 29 Jan 2003 18:58:26 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043895509 19951 171.64.15.82 (30 Jan 2003 02:58:29 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4097

Well yes and no:

I have been getting a problem with purify complaining about reading 2
bytes past the stack when I try to access the "data_len" field from a
_STCP_Header struct (giving a UMR error), and I can't seem to coax the
compiler into only reading two bytes instead of 4. However, I can easily
work around this by just keeping a mirrored "unsigned int" and using that
instead, at which point purify gives a clean bill of health. So, unless
there is something sneaky/subtle with that u_short value that purify won't
catch, then I'd say no, purify shows nothing.

Any other ideas?

-Tim

On Thu, 30 Jan 2003, Matthew Jonathan Holliman wrote:

>
>
> >I hope someone knows how to fix this, or can help... :)
>
> Did Purify indicate any errors?  (My stock response to questions for which
> I don't know the immediate answer).
>
>



.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Re: network_send: Destination address required
Date: Wed, 29 Jan 2003 19:03:50 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043895832 20140 171.64.15.82 (30 Jan 2003 03:03:52 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4098

Ahhh...finally.

Turns out I was also using network_send/network_recv for the local
sockets, which was causing the problem. Not everything works fine.

Thanks Matt!
Tim

On Thu, 30 Jan 2003, Matthew Jonathan Holliman wrote:

>
>
> >I hope someone knows how to fix this, or can help... :)
>
> Did Purify indicate any errors?  (My stock response to questions for which
> I don't know the immediate answer).
>
>



.

Path: shelby.stanford.edu!not-for-mail
From: "Pavan" 
Newsgroups: su.class.cs244a
Subject: Re: cksum error?
Date: Wed, 29 Jan 2003 19:22:45 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: whizkid.stanford.edu
X-Trace: news.Stanford.EDU 1043896750 20842 128.12.184.109 (30 Jan 2003 03:19:10 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:4099

I am getting  the same problem too.. pls mail back if you could correct
that!

"Chandrakala Kappanna"  wrote in message

> My implementation works fine for transfering  text files.
> The cksum output is correct.
>
> but fails for the binary files.
> any pointers?


.

Path: shelby.stanford.edu!epic17.Stanford.EDU!mmahathi
From: Mahathi Sai Prasanna Mahabhashyam 
Newsgroups: su.class.cs244a
Subject: Re: Reg FINACKS
Date: Wed, 29 Jan 2003 19:30:33 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043897436 21367 171.64.15.52 (30 Jan 2003 03:30:36 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4100

Hi again,
   I figured out the problem...i was sending in more data in the ACKs than
necessary...
Thanks,

Mahathi.
On Thu, 30 Jan 2003, Matthew Jonathan Holliman wrote:

>
> >    When I test against the test script, I am passing all the tests,
> >except one that says, not all the ACKs are received before FIN. But when I
> >check my code separately, it is blocking until it gets all ACKs before
> >sending the FIN. Also, the logs indicate that a FIN is received before a
> >FINACK was sent.. wht could be the problem?
>
> Are these your logs of packets/ACKs sent/received?  Does Purify report any
> errors?  (One or two people reported problems with FINs, and they came from
> returning structures allocated on the stack, causing intermittent failures).
>
> If you still have problems, I can try and take a look at your code--probably
> not before tomorrow, though.
>

.

Path: shelby.stanford.edu!epic17.Stanford.EDU!mmahathi
From: Mahathi Sai Prasanna Mahabhashyam 
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Wed, 29 Jan 2003 19:39:19 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043897960 21668 171.64.15.52 (30 Jan 2003 03:39:20 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4101

Hi,
   I had a similar experience too...
   The error I made was this...
   A                            B
SYN seq x                     SYNACK seq y ack x+1

Start data with x+1           Start data with y //Error
                                                //Should start with y+1

ie., i was starting the sequence number from the PASSIVE end from "y"
instead of "y+1". This might work with your own implementation, but fails
with the reference.

Hope this helps :)
Mahathi.


On Thu, 30 Jan 2003, Matthew Jonathan Holliman wrote:

>
> Some other people have reported problems talking to the reference STCP
> implementation; unfortunately, I suppose there might be many ways to cause
> this to happen.  I know one person had made an assumption about packet length,
> which of course held only in his sender/receiver and not in others.  You
> might read through the specs again to make sure you haven't made a similar
> assumption that's not guaranteed by STCP.
>
> If anyone else on here has had problems with--and solutions to--this part,
> please do consider sharing your experiences; I think it would be very valuable
> to others.
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Noh, Jeonghun" 
Newsgroups: su.class.cs244a
Subject: FIN/FIN-ACK timing.
Date: Wed, 29 Jan 2003 20:20:27 -0800
Organization: Stanford. EE
Lines: 29
Distribution: su
Message-ID: 
NNTP-Posting-Host: ohnohoya.stanford.edu
X-Trace: news.Stanford.EDU 1043900559 23549 128.12.151.44 (30 Jan 2003 04:22:39 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4102

I've looked up all the FIN/FIN-ACK Q&A and still get confused.

Please give me a short answer, so that I can get out of this murky trap.


1. the application will call myclose(). then STCP will send all the data
sitting on the buffer to the peer.

2. And it will send FIN. So, at this moment, the active STCP won't need to
wait for all data sent being ACKed. (the spec says..)

3. The peer STCP will send FIN-ACK as soon as it receives FIN, even if it
still has something to send. (So FIN-ACK can go first before some data
arrives due to the network congestion..)

For me, the timing problem is bothering me. Should we wait for all the ACKs
before sending FIN, because the active connection-closing part doesn't want
to have any data lost at the receiving part.

--
*********************************
Jeonghun Noh
Dept. of Electrical Engineering
Stanford University
Tel : 1-650-497-6665

*********************************


.

Path: shelby.stanford.edu!elaine6.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: FIN/FIN-ACK timing.
Date: Thu, 30 Jan 2003 05:12:16 +0000 (UTC)
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine6.stanford.edu
X-Trace: news.Stanford.EDU 1043903536 25242 171.64.15.71 (30 Jan 2003 05:12:16 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4103


>1. the application will call myclose(). then STCP will send all the data
>sitting on the buffer to the peer.

Correct.

>2. And it will send FIN. So, at this moment, the active STCP won't need to
>wait for all data sent being ACKed. (the spec says..)

Not so--it will send the FIN only once all outstanding data has been
ACKed.  I see the assignment should be clarified on this point.

>3. The peer STCP will send FIN-ACK as soon as it receives FIN, even if it
>still has something to send. (So FIN-ACK can go first before some data
>arrives due to the network congestion..)

The peer STCP will indeed send FIN-ACK and bail out as soon as it receives
a FIN, regardless of outstanding data it has to send.  We have a simpler
teardown model than normal TCP.

>For me, the timing problem is bothering me. Should we wait for all the ACKs
>before sending FIN, because the active connection-closing part doesn't want
>to have any data lost at the receiving part.

Yeah.

.

Path: shelby.stanford.edu!not-for-mail
From: Cynthia Wei-Jia Lau 
Newsgroups: su.class.cs244a
Subject: part A requirements, again
Date: Wed, 29 Jan 2003 21:45:48 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine6.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043905549 26102 171.64.15.71 (30 Jan 2003 05:45:49 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:4104

Hi,

In a previous posting, Steve (TA) said that we didn't have to worry
about packets that were outside or partially outside the receiver window
for part A of the assignment.  I'm not totally clear on what this means;
for now, then, if a packet is partially outside the receiver window, can
we just discard it, even though we're not supposed to handle lost
packets in part A?  

In other words, can we assume that the case of a packet overflowing the
receiver window will never even come up in the testing for part A?

-Cynthia Lau
.

Path: shelby.stanford.edu!not-for-mail
From: "Pavan" 
Newsgroups: su.class.cs244a
Subject: Re: cksum error?
Date: Wed, 29 Jan 2003 22:29:19 -0800
Lines: 20
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: whizkid.stanford.edu
X-Trace: news.Stanford.EDU 1043907944 27204 128.12.184.109 (30 Jan 2003 06:25:44 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:4105

Matthew guessed it right.. I was using strncpy() while copying buffer read
from application to the send packet .. and so it was not working. Hope this
helps!

"Pavan"  wrote in message

> I am getting  the same problem too.. pls mail back if you could correct
> that!
>
> "Chandrakala Kappanna"  wrote in message
> 
> > My implementation works fine for transfering  text files.
> > The cksum output is correct.
> >
> > but fails for the binary files.
> > any pointers?
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Kwangmoo Koh" 
Newsgroups: su.class.cs244a
Subject: Q: Test 1.B and 1.I
Date: Wed, 29 Jan 2003 23:00:51 -0800
Lines: 43
Distribution: su
Message-ID: 
NNTP-Posting-Host: kmcomputer.stanford.edu
X-Trace: news.Stanford.EDU 1043910052 28235 128.12.194.84 (30 Jan 2003 07:00:52 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:4106

Hi,

I have two questions.

1) what does the "incorrect length in header" and ": Bad file number" mean?

2) Does "No FIN-ACK for FIN" mean that I don't send FIN-ACK after receiving
FIN?
    (I send FIN-ACK whenever I receive FIN)


------------------------------------------
Test 1.B [out of 10]
Checks student Tx (server) against reference Rx (client).

Results:  NOT OK

File size differs for /usr/class/cs244a/grading_script/hw2/TESTDATA.0!
(You downloaded 0 byte(s), expected 110230).
Client output:
server: TESTDATA.0,110230,Ok
sock_io: incorrect length in header, packet dropped!
: Bad file number
sock_io: incorrect length in header, packet dropped!
: Bad file number
sock_io: incorrect length in header, packet dropped!
: Bad file number
sock_io: incorrect length in header, packet dropped!
: Bad file number
sock_io: incorrect length in header, packet dropped!
: Bad file number

------------------------------------------

Test 1.I [out of 5]
Checks that FIN is correctly ACKed.

Results:  NOT OK

No FIN-ACK for FIN



.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Wed, 29 Jan 2003 23:05:53 -0800
Lines: 38
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: elaine40.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043910354 28324 171.64.15.115 (30 Jan 2003 07:05:54 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4107

hi class!

my PASSIVE end sends data with "y+1" but still fails test 1.B and 1.C

the problem (for 1.C at least) seems to be that since TESTDATA.0 is such a
large file that the probability of one of the many data packets getting
dropped/mis-sequenced becomes considerably high.

for Part A of this project, our code does not handle dropped or
mis-sequenced packet and thus does not pass the tests.

any thought on this? would it be possible for the TAs to make the
reference server/client available for testing so in event of packets
getting dropped/mis-sequenced, we can manually test without worrying about
the test script usage quota?

thanks!
Tan


On Wed, 29 Jan 2003, Mahathi Sai Prasanna Mahabhashyam wrote:

> Hi,
>    I had a similar experience too...
>    The error I made was this...
>    A                            B
> SYN seq x                     SYNACK seq y ack x+1
>
> Start data with x+1           Start data with y //Error
>                                                 //Should start with y+1
>
> ie., i was starting the sequence number from the PASSIVE end from "y"
> instead of "y+1". This might work with your own implementation, but fails
> with the reference.
>
> Hope this helps :)
> Mahathi.

.

Path: shelby.stanford.edu!not-for-mail
From: Peter Lai 
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Wed, 29 Jan 2003 23:22:06 -0800
Lines: 18
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: peetah.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043911326 28647 128.12.187.58 (30 Jan 2003 07:22:06 GMT)
X-Complaints-To: 
X-Newsreader: Forte Agent 1.91/32.564
Xref: shelby.stanford.edu su.class.cs244a:4108


>any thought on this? would it be possible for the TAs to make the
>reference server/client available for testing so in event of packets
>getting dropped/mis-sequenced, we can manually test without worrying about
>the test script usage quota?

	Just to second this question... I guess the reason you don't
want people to have unlimited usage of the scripts is so that they
don't use them as a crutch, but since we don't have access to the
reference server & client, it's very difficult to figure out what's
going on -- the first several times I ran the script, I got no output
because I had all of my debug statements going through dprintf, which
is disabled when you run the test script. I have a decent idea of what
it is I need to test, but narrowing down what the bug could be is
pretty difficult when all you know is "it has to meet specifications,"
and there's no indication of what specification it fails exactly.

Peter
.

Path: shelby.stanford.edu!not-for-mail
From: "Keith Simmons" 
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Wed, 29 Jan 2003 23:42:40 -0800
Lines: 35
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: ksimmons.stanford.edu
X-Trace: news.Stanford.EDU 1043912561 29574 128.12.105.123 (30 Jan 2003 07:42:41 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4109

Not to keep beating a dead horse, but like everyone else, I'm also having
problems with 1c (though my 1b always seems to work).  I imagine if other
people can pass this test consistently, assuming they haven't implemented
any part of B, then there must be something wrong with my code.
    However, strangely, my code intermittently passes the 1c test.  I ran it
once, and it didn't work.  So I spent a couple hours trying to figure out
what was wrong.  Then, after making only a few minor changes, it seemed to
work, somewhat mysteriously.  I went to work on another project for a couple
hours, and it has now quit working again.  Any idea why this might happen?
Is it because of dropped packets?  I thought the grading script ensured this
didn't happen.

"Peter Lai"  wrote in message

>
> >any thought on this? would it be possible for the TAs to make the
> >reference server/client available for testing so in event of packets
> >getting dropped/mis-sequenced, we can manually test without worrying
about
> >the test script usage quota?
>
> Just to second this question... I guess the reason you don't
> want people to have unlimited usage of the scripts is so that they
> don't use them as a crutch, but since we don't have access to the
> reference server & client, it's very difficult to figure out what's
> going on -- the first several times I ran the script, I got no output
> because I had all of my debug statements going through dprintf, which
> is disabled when you run the test script. I have a decent idea of what
> it is I need to test, but narrowing down what the bug could be is
> pretty difficult when all you know is "it has to meet specifications,"
> and there's no indication of what specification it fails exactly.
>
> Peter


.

Path: shelby.stanford.edu!not-for-mail
From: Peter Lai 
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 00:07:50 -0800
Lines: 22
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: peetah.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043914070 712 128.12.187.58 (30 Jan 2003 08:07:50 GMT)
X-Complaints-To: 
X-Newsreader: Forte Agent 1.91/32.564
Xref: shelby.stanford.edu su.class.cs244a:4110

On Thu, 30 Jan 2003 01:21:20 +0000 (UTC), 
(Matthew Jonathan Holliman) wrote:

>
>Some other people have reported problems talking to the reference STCP
>implementation; unfortunately, I suppose there might be many ways to cause
>this to happen.  I know one person had made an assumption about packet length,
>which of course held only in his sender/receiver and not in others.  You
>might read through the specs again to make sure you haven't made a similar
>assumption that's not guaranteed by STCP.
>
>If anyone else on here has had problems with--and solutions to--this part,
>please do consider sharing your experiences; I think it would be very valuable
>to others.
	
	Just like Mahathi, I botched the ACK numbers, which caused my
program to completely fail B & C. I fixed it up (thanks to someone
else's post) and now everything seems to be humming along :) The
malformed response from server response didn't clue me in, but I guess
it's hard to make the script have more specific responses.

Peter
.

Path: shelby.stanford.edu!not-for-mail
From: "Kwangmoo Koh" 
Newsgroups: su.class.cs244a
Subject: Re: Test 1.B and 1.I
Date: Thu, 30 Jan 2003 00:14:38 -0800
Lines: 55
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: kmcomputer.stanford.edu
X-Trace: news.Stanford.EDU 1043914479 1570 128.12.194.84 (30 Jan 2003 08:14:39 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300
Xref: shelby.stanford.edu su.class.cs244a:4111

Never mind,

I miswrote the max payload size, 536, as 538.

If you're having a trouble with a reference server,
check the window or payload size.


> Hi,
>
> I have two questions.
>
> 1) what does the "incorrect length in header" and ": Bad file number"
mean?
>
> 2) Does "No FIN-ACK for FIN" mean that I don't send FIN-ACK after
receiving
> FIN?
>     (I send FIN-ACK whenever I receive FIN)
>
>
> ------------------------------------------
> Test 1.B [out of 10]
> Checks student Tx (server) against reference Rx (client).
>
> Results:  NOT OK
>
> File size differs for /usr/class/cs244a/grading_script/hw2/TESTDATA.0!
> (You downloaded 0 byte(s), expected 110230).
> Client output:
> server: TESTDATA.0,110230,Ok
> sock_io: incorrect length in header, packet dropped!
> : Bad file number
> sock_io: incorrect length in header, packet dropped!
> : Bad file number
> sock_io: incorrect length in header, packet dropped!
> : Bad file number
> sock_io: incorrect length in header, packet dropped!
> : Bad file number
> sock_io: incorrect length in header, packet dropped!
> : Bad file number
>
> ------------------------------------------
>
> Test 1.I [out of 5]
> Checks that FIN is correctly ACKed.
>
> Results:  NOT OK
>
> No FIN-ACK for FIN
>
>
>


.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!aseems
From: Aseem Sharma 
Newsgroups: su.class.cs244a
Subject: 1.B
Date: Thu, 30 Jan 2003 01:10:29 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine18.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043917838 2730 171.64.15.83 (30 Jan 2003 09:10:38 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4112

Hi Guys,

For 1.B I'm getting the error

No 'rcvd' created!  Client output:
recv: No such file or directory
myconnect: mismatch in peer names  ("0.0.0.0:61879" != "0.0.0.0:0")
myconnect: Bad file number

I can't seem to figure out what possible role our transport layer on
server plays
so that the reference client would throw this error. I thought the above
error had to do with the client going getsockname(), getpeername().

Clues ?



.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: part A requirements, again
Date: Thu, 30 Jan 2003 09:44:11 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043919851 3272 171.64.15.74 (30 Jan 2003 09:44:11 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4113



>In a previous posting, Steve (TA) said that we didn't have to worry
>about packets that were outside or partially outside the receiver window
>for part A of the assignment.  I'm not totally clear on what this means;
>for now, then, if a packet is partially outside the receiver window, can
>we just discard it, even though we're not supposed to handle lost
>packets in part A?  

>In other words, can we assume that the case of a packet overflowing the
>receiver window will never even come up in the testing for part A?

If a packet arrives outside of your receiver window, it's because your
peer violated its sender window--this won't happen in part (A) (assuming
your code isn't buggy!)

.

Path: shelby.stanford.edu!not-for-mail
From: "Noh, Jeonghun" 
Newsgroups: su.class.cs244a
Subject: Test 1.I
Date: Thu, 30 Jan 2003 01:42:15 -0800
Organization: Stanford. EE
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: ohnohoya.stanford.edu
X-Trace: news.Stanford.EDU 1043919868 3277 128.12.151.44 (30 Jan 2003 09:44:28 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4114

I got the error from this test. I wonder I made sure to check whether the
active network terminator received the FIN-ACK before disconnecting the
channel.

Assuming, I definitely created FIN-ACK, sent to the other peer, then the
peer definitely got the FIN-ACK and quit from the loop, what might be the
cause of this error?



--
*********************************
Jeonghun Noh
Dept. of Electrical Engineering
Stanford University
Tel : 1-650-497-6665

*********************************


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Q: Test 1.B and 1.I
Date: Thu, 30 Jan 2003 09:48:11 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043920091 3324 171.64.15.74 (30 Jan 2003 09:48:11 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4115



>2) Does "No FIN-ACK for FIN" mean that I don't send FIN-ACK after receiving
>FIN?
>    (I send FIN-ACK whenever I receive FIN)

Yes.  Be careful that you don't accidentally allocate a packet on the stack
somewhere and then try to transmit it in another function, because I've seen
this cause the behaviour you describe before.  Other than that, I don't have
another theory at the moment.

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 09:56:37 +0000 (UTC)
Lines: 26
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043920597 3515 171.64.15.74 (30 Jan 2003 09:56:38 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4116


>the problem (for 1.C at least) seems to be that since TESTDATA.0 is such a
>large file that the probability of one of the many data packets getting
>dropped/mis-sequenced becomes considerably high.

Not so; I haven't fixed the grading script to disable retransmissions for
part (A) (I don't want to touch this while people are depending on it,
particularly as it's working reasonably for most students), but as far as
reliability goes, since packets are being sent only on the local machine
they should arrive in order and without loss.

>any thought on this? would it be possible for the TAs to make the
>reference server/client available for testing so in event of packets
>getting dropped/mis-sequenced, we can manually test without worrying about
>the test script usage quota?

If packet missequencing/loss were the problem, remember that you can run a
given test submission as many times as you like without this counting against
your quota.  But as I said, if this were the problem it should have been
the problem for the working submitted solutions also.

If you wish to keep multiple submissions around for testing, you can keep
transport.c with the associated .test_key somewhere, and run the test
script in that directory.  (This is a bit of a kludge, but it allows you
to rerun any previous test again without penalty).

.

Path: shelby.stanford.edu!not-for-mail
From: "Metha Jeeradit" 
Newsgroups: su.class.cs244a
Subject: Re: Test 1.I
Date: Thu, 30 Jan 2003 02:01:24 -0800
Lines: 34
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: ithaca.stanford.edu
X-Trace: news.Stanford.EDU 1043920902 4036 128.12.181.52 (30 Jan 2003 10:01:42 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4117

I still have this same problem and I'm pretty positive that I got a FIN-ACK
after sending FIN and that the FIN-ACK was sent after receiving the
FIN...I'm going to run out of test runs pretty soon.   I wonder if anyone
has passed this test recently?  If so, could you kindly give us a hint as to
how you handled this problem?

Thanks,

Metha

"Noh, Jeonghun"  wrote in message

> I got the error from this test. I wonder I made sure to check whether the
> active network terminator received the FIN-ACK before disconnecting the
> channel.
>
> Assuming, I definitely created FIN-ACK, sent to the other peer, then the
> peer definitely got the FIN-ACK and quit from the loop, what might be the
> cause of this error?
>
>
>
> --
> *********************************
> Jeonghun Noh
> Dept. of Electrical Engineering
> Stanford University
> Tel : 1-650-497-6665
> 
> *********************************
>
>


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 10:06:06 +0000 (UTC)
Lines: 27
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043921166 4358 171.64.15.74 (30 Jan 2003 10:06:06 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4118



>	Just to second this question... I guess the reason you don't
>want people to have unlimited usage of the scripts is so that they
>don't use them as a crutch, but since we don't have access to the
>reference server & client, it's very difficult to figure out what's
>going on -- the first several times I ran the script, I got no output
>because I had all of my debug statements going through dprintf, which
>is disabled when you run the test script. I have a decent idea of what
>it is I need to test, but narrowing down what the bug could be is
>pretty difficult when all you know is "it has to meet specifications,"
>and there's no indication of what specification it fails exactly.

Well, I feel like some 80-year old saying "when I went to school, I had
to walk five miles through the snow...", but anyway... when I took the class,
we weren't given any access to the grading black box :-)

All the test script does is run your client against the reference server
(that is, exactly the same as in your Makefile, but built with the
reference transport.c), and then your server against the reference
client.  It makes sure that the results downloaded are as expected, i.e.
the file is created correctly.  Exposing this only allows unlimited
test runs, it doesn't give you any more information, except perhaps
the chance to put in a bunch more logging output--which is hardly
representative of what you can always do in the real world when implementing
such a specification.

.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 10:08:00 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043921280 4388 171.64.15.74 (30 Jan 2003 10:08:00 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4119


>	Just like Mahathi, I botched the ACK numbers, which caused my
>program to completely fail B & C. I fixed it up (thanks to someone
>else's post) and now everything seems to be humming along :) The
>malformed response from server response didn't clue me in, but I guess
>it's hard to make the script have more specific responses.

The script just tries to download a file using the regular client/server
pair, built with your/reference transport layers; as an application, it
has no knowledge of how you're handling the delivery, other than as a
reliable byte stream.  I guess the script could dump some packet log out,
but that would seem to make debugging trivial and an unrealistic exercise.
.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 10:12:26 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1043921546 4509 171.64.15.74 (30 Jan 2003 10:12:26 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4120


>Is it because of dropped packets?  I thought the grading script ensured this
>didn't happen.

It's very difficult to guarantee that it can't happen (since we're using
UDP as the baseline transport, which itself is unreliable), but the chances
of it happening are exceedingly slim since we send packets only on the same
machine.  If the system is heavily loaded, it's possible you might hit an
unexpected retransmission, but again this is uncommon and should be just an
occasional condition.

.

Path: shelby.stanford.edu!elaine39.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: Re: Test 1.I
Date: Thu, 30 Jan 2003 02:43:20 -0800
Lines: 49
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine39.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043923402 5182 171.64.15.114 (30 Jan 2003 10:43:22 GMT)
X-Complaints-To: 
To: Metha Jeeradit 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4121

I'm getting the same result on 1.I.  I found out I did send FIN before
FIN_ACK, but FIN was sent multiple times.  This was due to
transfer_appl_io was called several times after parent closed its
communication with its child.  I'm not sure why select was triggered on
local data socket multiple times after the parent end's closed.  Are you
seeing the same thing?

Eric


On Thu, 30 Jan 2003, Metha Jeeradit wrote:

> I still have this same problem and I'm pretty positive that I got a FIN-ACK
> after sending FIN and that the FIN-ACK was sent after receiving the
> FIN...I'm going to run out of test runs pretty soon.   I wonder if anyone
> has passed this test recently?  If so, could you kindly give us a hint as to
> how you handled this problem?
>
> Thanks,
>
> Metha
>
> "Noh, Jeonghun"  wrote in message
> 
> > I got the error from this test. I wonder I made sure to check whether the
> > active network terminator received the FIN-ACK before disconnecting the
> > channel.
> >
> > Assuming, I definitely created FIN-ACK, sent to the other peer, then the
> > peer definitely got the FIN-ACK and quit from the loop, what might be the
> > cause of this error?
> >
> >
> >
> > --
> > *********************************
> > Jeonghun Noh
> > Dept. of Electrical Engineering
> > Stanford University
> > Tel : 1-650-497-6665
> > 
> > *********************************
> >
> >
>
>
>


.

Path: shelby.stanford.edu!saga7.Stanford.EDU!aradia
From: Alicia Sheck Ong 
Newsgroups: su.class.cs244a
Subject: Test G
Date: Thu, 30 Jan 2003 04:03:10 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043928207 6656 171.64.15.137 (30 Jan 2003 12:03:27 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4122

Has anyone else not passed this test?  I'm pretty sure that I'm sending a
SYN-ACK after I receive a SYN (at least that's what printf tells me), and
I'm pretty sure the numbering is okay.  So, if I SYN with 245, I SYN-ACK
with seqy and 246.  Not passing test G is making the script skip over
Tests H and I. =0(

Alicia

.

Path: shelby.stanford.edu!elaine39.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: how to run 1.c
Date: Thu, 30 Jan 2003 10:03:02 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine39.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043949783 16312 171.64.15.114 (30 Jan 2003 18:03:03 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4123

I'm failing 1.c.  It says
../client  -p .server_port -f TESTDATA.0 foo

but, when I run it by my own, my program complains -p is not a valid
tag.  Does any one know how to do it?

Eric

.

Path: shelby.stanford.edu!not-for-mail
From: "Howard Tsai" 
Newsgroups: su.class.cs244a
Subject: Re: Test 1.I
Date: Thu, 30 Jan 2003 10:43:22 -0800
Lines: 66
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: ev-02-lr90f.stanford.edu
X-Trace: news.Stanford.EDU 1043952203 17654 128.12.158.11 (30 Jan 2003 18:43:23 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4124

I don't think you should have the local data socket as part of the select
after the parent has closed it already, otherwise it will fire repeatedly.

Howard


"Eric Chenjian Xu"  wrote in message

> I'm getting the same result on 1.I.  I found out I did send FIN before
> FIN_ACK, but FIN was sent multiple times.  This was due to
> transfer_appl_io was called several times after parent closed its
> communication with its child.  I'm not sure why select was triggered on
> local data socket multiple times after the parent end's closed.  Are you
> seeing the same thing?
>
> Eric
>
>
> On Thu, 30 Jan 2003, Metha Jeeradit wrote:
>
> > I still have this same problem and I'm pretty positive that I got a
FIN-ACK
> > after sending FIN and that the FIN-ACK was sent after receiving the
> > FIN...I'm going to run out of test runs pretty soon.   I wonder if
anyone
> > has passed this test recently?  If so, could you kindly give us a hint
as to
> > how you handled this problem?
> >
> > Thanks,
> >
> > Metha
> >
> > "Noh, Jeonghun"  wrote in message
> > 
> > > I got the error from this test. I wonder I made sure to check whether
the
> > > active network terminator received the FIN-ACK before disconnecting
the
> > > channel.
> > >
> > > Assuming, I definitely created FIN-ACK, sent to the other peer, then
the
> > > peer definitely got the FIN-ACK and quit from the loop, what might be
the
> > > cause of this error?
> > >
> > >
> > >
> > > --
> > > *********************************
> > > Jeonghun Noh
> > > Dept. of Electrical Engineering
> > > Stanford University
> > > Tel : 1-650-497-6665
> > > 
> > > *********************************
> > >
> > >
> >
> >
> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: debugging and honor code
Date: Thu, 30 Jan 2003 11:16:23 -0800
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043954179 18760 171.64.74.37 (30 Jan 2003 19:16:19 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4125

Yes, as long as it is for debugging your code (and not purely for 
re-engineering our test script) it's perfectly fine.

   Guido

David Seetapun wrote:
> My code doesn't pass test 1.G. Is it ok (honor code-wise) to have the 
> transport layer dump all the traffic to a file during the test run 
> so I can see what the problem is? (This was asked in last years
> new group but I could not see a yes/or answer).

.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: syn/syn-ack problem...
Date: Thu, 30 Jan 2003 11:29:46 -0800
Lines: 36
Distribution: su
Message-ID: 
NNTP-Posting-Host: caliban.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043954982 18760 171.64.74.37 (30 Jan 2003 19:29:42 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4126

[Forwarded by Guido - your manual news gateway :-)]

Trying to debug the setup handshake:
*Server seems to setup okay.
*Open another window: client elaine19.Stanford.EDU:42351
*Prints first statement from myconnect fine.
*Goes into transport_init
*Parent seems to get past the select-block, clears the FD_ISSET assert,
but does not seem to get anything from the syn_sd[0]: "parent:reading 
peer addr on syn handshake (only 0 bytes)recv: Error 0"
*myconnect, of course, reports a "...missmatch...0.0.0.0:42351"

My child is supposed to send the SYN, then go to the control loop where 
it gets blocked on its own select.  A syn-ack comming in should unblock 
it; once the packet is recognized as a syn-ack, the child-code should 
retrieve the peeraddr and peeraddrlen, then write to syn_sd[1].  Trouble 
seems to hit early-on, as the child appears to send the syn pack (or at 
least return from that function call...which uses 
network_send(ctx->sockfd,...), and progress to the point of calling the
control_loop fuction...child does not seem to ever actually start 
executing anything in control loop???

I'm wondering most how the parent got past its select block?
Also wondering if I'm not understanding the provided code, as it's 
really not getting very far into my stuff, if at all?

I've walked through the parent step-by-step in GBB, and everyhting looks
fine, except--again--it appears to go straight through select without
waiting for anything to be been written to syn_sd[1].  I have not yet 
been able to get gdb to attach to the child.

Suggested approaches to further track this down would be appreciated.

Thanks...Keith


.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!inspire
From: Toliver Jue 
Newsgroups: su.class.cs244a
Subject: STCP tcphdr ports
Date: Thu, 30 Jan 2003 11:42:37 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043955759 19931 171.64.15.84 (30 Jan 2003 19:42:39 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4127

1.  Do we have to set the th_sport and th_dport?  Where do we get the
values? Using getpeername() and gethostname()?  Do we not have to worry about
them?

2.  When we call network_send, we have to send the packet as
header+payload, correct?


3.  From how I read the assignment spec, we only use 4 of the fields of
tcphdr, plus a data_len field?

Thanks for any info.

.

Path: shelby.stanford.edu!elaine22.Stanford.EDU!ericcxu
From: Eric Chenjian Xu 
Newsgroups: su.class.cs244a
Subject: 1.c
Date: Thu, 30 Jan 2003 12:26:31 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine22.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043958392 21825 171.64.15.87 (30 Jan 2003 20:26:32 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4128

I'm passing all the other cases, except for 1.c.  The client's asking for
TESTDATA.0 and foo.  My program timed out.  I'm guessing foo is the
trouble maker, since I passed all the other tests that use TESTDATA.0.
What is foo?  Is it a non-existing file?  I tested non-existsing files,
but my program seems to handle them well.

Eric



.

Path: shelby.stanford.edu!epic27.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: Re: cksum error?
Date: Thu, 30 Jan 2003 20:26:33 +0000 (UTC)
Lines: 25
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: epic27.stanford.edu
X-Trace: news.Stanford.EDU 1043958393 21829 171.64.15.60 (30 Jan 2003 20:26:33 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4129

Can you please let me know what exactly the problem was?
thanks!



>Matthew guessed it right.. I was using strncpy() while copying buffer read
>from application to the send packet .. and so it was not working. Hope this
>helps!

>"Pavan"  wrote in message

>> I am getting  the same problem too.. pls mail back if you could correct
>> that!
>>
>> "Chandrakala Kappanna"  wrote in message
>> 
>> > My implementation works fine for transfering  text files.
>> > The cksum output is correct.
>> >
>> > but fails for the binary files.
>> > any pointers?
>>
>>


.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: STCP tcphdr ports
Date: Thu, 30 Jan 2003 20:32:51 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine8.stanford.edu
X-Trace: news.Stanford.EDU 1043958771 22038 171.64.15.73 (30 Jan 2003 20:32:51 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4130


>1.  Do we have to set the th_sport and th_dport?  Where do we get the
>values? Using getpeername() and gethostname()?  Do we not have to worry about
>them?

Please see the preceding responses to this on the newsgroup.

>2.  When we call network_send, we have to send the packet as
>header+payload, correct?

Correct.

>3.  From how I read the assignment spec, we only use 4 of the fields of
>tcphdr, plus a data_len field?

Four fields including the data_len.
.

Path: shelby.stanford.edu!epic27.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: Re: cksum error?
Date: Thu, 30 Jan 2003 20:35:21 +0000 (UTC)
Lines: 31
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: epic27.stanford.edu
X-Trace: news.Stanford.EDU 1043958921 22094 171.64.15.60 (30 Jan 2003 20:35:21 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4131

OKAY!!!!
I fixed it.

Matthew was right.... once I used memcpy things were fine.

thanks for your help.
>Can you please let me know what exactly the problem was?
>thanks!



>>Matthew guessed it right.. I was using strncpy() while copying buffer read
>>from application to the send packet .. and so it was not working. Hope this
>>helps!

>>"Pavan"  wrote in message

>>> I am getting  the same problem too.. pls mail back if you could correct
>>> that!
>>>
>>> "Chandrakala Kappanna"  wrote in message
>>> 
>>> > My implementation works fine for transfering  text files.
>>> > The cksum output is correct.
>>> >
>>> > but fails for the binary files.
>>> > any pointers?
>>>
>>>


.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: how to run 1.c
Date: Thu, 30 Jan 2003 20:35:34 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine8.stanford.edu
X-Trace: news.Stanford.EDU 1043958934 22100 171.64.15.73 (30 Jan 2003 20:35:34 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4132


>./client  -p .server_port -f TESTDATA.0 foo

>but, when I run it by my own, my program complains -p is not a valid
>tag.  Does any one know how to do it?

You don't need to; all this does is use the port number written to .server_port
for the connection.  When running manually, you'd do the usual
client ... elaine25:12345

.

Path: shelby.stanford.edu!not-for-mail
From: Peter Lai 
Newsgroups: su.class.cs244a
Subject: Re: cksum error?
Date: Thu, 30 Jan 2003 12:37:14 -0800
Lines: 10
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: peetah.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043959035 22092 128.12.187.58 (30 Jan 2003 20:37:15 GMT)
X-Complaints-To: 
X-Newsreader: Forte Agent 1.91/32.564
Xref: shelby.stanford.edu su.class.cs244a:4133

On Thu, 30 Jan 2003 20:26:33 +0000 (UTC), 
(Chandrakala Kappanna) wrote:

>Can you please let me know what exactly the problem was?
>thanks!

	I think the problem was that you can't use strncpy, because
that copies a null-terminated (with the character \0) string. Since
binary files are interpreted differently, they could have this
character everywhere, so you're better off using memcpy.
.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1.c
Date: Thu, 30 Jan 2003 20:38:04 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine8.stanford.edu
X-Trace: news.Stanford.EDU 1043959084 22194 171.64.15.73 (30 Jan 2003 20:38:04 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4134


>I'm passing all the other cases, except for 1.c.  The client's asking for
>TESTDATA.0 and foo.  My program timed out.  I'm guessing foo is the
>trouble maker, since I passed all the other tests that use TESTDATA.0.
>What is foo?  Is it a non-existing file?  I tested non-existsing files,
>but my program seems to handle them well.

No--
"foo" is just an unfortunate hack to appease the client in the number of
command-line arguments; it isn't used at all.  You can ignore this.
.

Path: shelby.stanford.edu!not-for-mail
From: Peter Lai 
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 12:44:06 -0800
Lines: 23
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: peetah.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043959447 22360 128.12.187.58 (30 Jan 2003 20:44:07 GMT)
X-Complaints-To: 
X-Newsreader: Forte Agent 1.91/32.564
Xref: shelby.stanford.edu su.class.cs244a:4135


>Well, I feel like some 80-year old saying "when I went to school, I had
>to walk five miles through the snow...", but anyway... when I took the class,
>we weren't given any access to the grading black box :-)
>
>All the test script does is run your client against the reference server
>(that is, exactly the same as in your Makefile, but built with the
>reference transport.c), and then your server against the reference
>client.  It makes sure that the results downloaded are as expected, i.e.
>the file is created correctly.  Exposing this only allows unlimited
>test runs, it doesn't give you any more information, except perhaps
>the chance to put in a bunch more logging output--which is hardly
>representative of what you can always do in the real world when implementing
>such a specification.

	Yeah, I see your point. It was just frustrating to not get any
output; in my case, all I knew was that my server timed out somewhere.
Would it be possible to have scripts not disable the dprintf? I
started using dprintf because there was that blurb about being careful
of where to print to, and so I used up a testing case changing all the
dprintfs to an fprintf to stderr. I don't know if anyone else had the
same problem (I seem to be lucky :p), though, so it might not be worth
changing and now I know to put all my debug info into fprintf :)
.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: syn/syn-ack problem...
Date: Thu, 30 Jan 2003 20:44:07 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine8.stanford.edu
X-Trace: news.Stanford.EDU 1043959447 22361 171.64.15.73 (30 Jan 2003 20:44:07 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4136


>Trying to debug the setup handshake:
>*Server seems to setup okay.
>*Open another window: client elaine19.Stanford.EDU:42351
>*Prints first statement from myconnect fine.
>*Goes into transport_init
>*Parent seems to get past the select-block, clears the FD_ISSET assert,
>but does not seem to get anything from the syn_sd[0]: "parent:reading 
>peer addr on syn handshake (only 0 bytes)recv: Error 0"
>*myconnect, of course, reports a "...missmatch...0.0.0.0:42351"

I've seen this behaviour in a few cases, i.e. a select() unblocking
unexpectedly.  In all cases so far it was caused by a memory error
(e.g. a bad select() call elsewhere).  Does Purify show any problems?

.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 20:50:53 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References:       
NNTP-Posting-Host: elaine8.stanford.edu
X-Trace: news.Stanford.EDU 1043959853 22619 171.64.15.73 (30 Jan 2003 20:50:53 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4137


>	Yeah, I see your point. It was just frustrating to not get any
>output; in my case, all I knew was that my server timed out somewhere.
>Would it be possible to have scripts not disable the dprintf? I
>started using dprintf because there was that blurb about being careful
>of where to print to, and so I used up a testing case changing all the
>dprintfs to an fprintf to stderr. I don't know if anyone else had the
>same problem (I seem to be lucky :p), though, so it might not be worth
>changing and now I know to put all my debug info into fprintf :)

Well, not easily, because the network layer used in grading prints a lot of
output on its own, which is used by the script to check correctness.
So this is something I don't want to touch (and break) right now.  Thanks
for the input though; perhaps I'll try and make this easier for people for
next year.
.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Test G
Date: Thu, 30 Jan 2003 20:56:52 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine8.stanford.edu
X-Trace: news.Stanford.EDU 1043960212 23102 171.64.15.73 (30 Jan 2003 20:56:52 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4138


>Has anyone else not passed this test?  I'm pretty sure that I'm sending a
>SYN-ACK after I receive a SYN (at least that's what printf tells me), and
>I'm pretty sure the numbering is okay.  So, if I SYN with 245, I SYN-ACK
>with seqy and 246.  Not passing test G is making the script skip over
>Tests H and I. =0(

I assume you're getting the "No SYN-ACK for SYN...?"

If you're positive you're sending (or think you're sending) a SYN-ACK,
have you checked for memory errors in Purify (e.g. returning frames
allocated on the stack)?  Otherwise I'd have to look at the code/logs
to offer any more constructive suggestions.

.

Path: shelby.stanford.edu!elaine6.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: Re: Test G
Date: Thu, 30 Jan 2003 21:42:09 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine6.stanford.edu
X-Trace: news.Stanford.EDU 1043962929 24596 171.64.15.71 (30 Jan 2003 21:42:09 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4139

were you able to figure out the problem?
I am stuck here too.

thanx,
ceekay

Alicia Sheck Ong  writes:

>Has anyone else not passed this test?  I'm pretty sure that I'm sending a
>SYN-ACK after I receive a SYN (at least that's what printf tells me), and
>I'm pretty sure the numbering is okay.  So, if I SYN with 245, I SYN-ACK
>with seqy and 246.  Not passing test G is making the script skip over
>Tests H and I. =0(

>Alicia

.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: submit to which TA
Date: Thu, 30 Jan 2003 13:52:48 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043963571 24949 128.12.196.91 (30 Jan 2003 21:52:51 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4140

Maybe I miss some information, however I'm confused to which TA I should
submit my HW#2A assignment since I haven't received any e-mail notifiying me
about this.

Thanks,
Honggo



.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: submit to which TA
Date: Thu, 30 Jan 2003 21:55:47 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1043963747 25032 171.64.15.117 (30 Jan 2003 21:55:47 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4141


>Maybe I miss some information, however I'm confused to which TA I should
>submit my HW#2A assignment since I haven't received any e-mail notifiying me
>about this.

I just sent out an e-mail to remind people of their assigned TA.

.

Path: shelby.stanford.edu!epic3.Stanford.EDU!mmahathi
From: Mahathi Sai Prasanna Mahabhashyam 
Newsgroups: su.class.cs244a
Subject: Re: Test G & Re: Test 1.I
Date: Thu, 30 Jan 2003 13:58:22 -0800
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043963904 25148 171.64.15.36 (30 Jan 2003 21:58:24 GMT)
X-Complaints-To: 
To: Mahathi Sai Prasanna Mahabhashyam 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4142

Hi,
   I had a similar problem. When I sent the SYn and SYNACK messages, I
sent the entire packet i.e, header+ payload. That was giving the
problem. If you just send the header, it is working fine with the refrence
implementation. Are you doing the same thing. This solved even the case
when FIN was being ACKed. Basically, the logic is that when you are
sending control messages or ACKs, just send the Header alone.

Hope this solves the problem,
Cheers,
Mahathi.

 On Thu, 30 Jan 2003, Alicia Sheck Ong wrote:

> Has anyone else not passed this test?  I'm pretty sure that I'm sending a
> SYN-ACK after I receive a SYN (at least that's what printf tells me), and
> I'm pretty sure the numbering is okay.  So, if I SYN with 245, I SYN-ACK
> with seqy and 246.  Not passing test G is making the script skip over
> Tests H and I. =0(
>
> Alicia
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Noh, Jeonghun" 
Newsgroups: su.class.cs244a
Subject: Re: Test 1.I
Date: Thu, 30 Jan 2003 14:13:34 -0800
Organization: Stanford. EE
Lines: 33
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dnab4081eb.stanford.edu
X-Trace: news.Stanford.EDU 1043964949 26094 171.64.129.235 (30 Jan 2003 22:15:49 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4143

Ok. I found out I was accidentally sending FIN several times, forgetting to
set the connection_state properly. Now I got the OK sign from the script.
Good.

For those who get the same error and can make sure they send FIN and FIN-ACK
pair, just check they are sent once respectively, though we may send FIN
more than once due to the loss of the packet.


"Noh, Jeonghun"  wrote in message

> I got the error from this test. I wonder I made sure to check whether the
> active network terminator received the FIN-ACK before disconnecting the
> channel.
>
> Assuming, I definitely created FIN-ACK, sent to the other peer, then the
> peer definitely got the FIN-ACK and quit from the loop, what might be the
> cause of this error?
>
>
>
> --
> *********************************
> Jeonghun Noh
> Dept. of Electrical Engineering
> Stanford University
> Tel : 1-650-497-6665
> 
> *********************************
>
>


.

Path: shelby.stanford.edu!elaine6.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: Re: Test G & Re: Test 1.I
Date: Thu, 30 Jan 2003 22:16:45 +0000 (UTC)
Lines: 29
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine6.stanford.edu
X-Trace: news.Stanford.EDU 1043965005 26123 171.64.15.71 (30 Jan 2003 22:16:45 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4144


Yes. Just sending the header worked for me.
But my test still fails for FIN-FIN ACK :(
Mahathi Sai Prasanna Mahabhashyam  writes:

>Hi,
>   I had a similar problem. When I sent the SYn and SYNACK messages, I
>sent the entire packet i.e, header+ payload. That was giving the
>problem. If you just send the header, it is working fine with the refrence
>implementation. Are you doing the same thing. This solved even the case
>when FIN was being ACKed. Basically, the logic is that when you are
>sending control messages or ACKs, just send the Header alone.

>Hope this solves the problem,
>Cheers,
>Mahathi.

> On Thu, 30 Jan 2003, Alicia Sheck Ong wrote:

>> Has anyone else not passed this test?  I'm pretty sure that I'm sending a
>> SYN-ACK after I receive a SYN (at least that's what printf tells me), and
>> I'm pretty sure the numbering is okay.  So, if I SYN with 245, I SYN-ACK
>> with seqy and 246.  Not passing test G is making the script skip over
>> Tests H and I. =0(
>>
>> Alicia
>>
>>

.

Path: shelby.stanford.edu!elaine31.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: SYN sent twice?
Date: Thu, 30 Jan 2003 14:18:06 -0800
Lines: 53
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043965088 26209 171.64.15.106 (30 Jan 2003 22:18:08 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4145

Very weird thing.

On the server side, after it received a SYN and responded with a SYN_ACK,
it immediately received a SYN again, except that this time it is
disguised as a "data" packet

I put a printf before every call of network_send() on the client side, yet
couldn't catch anywhere I sent such a data packet. I suspect this "data"
packet is the previous SYN that somehow got resent. Of course I can
see the sequence number of this "data" packet is old and discard it. But I
am curious why should this have happened. The following are output to
screen on client and server side.

Client side
===========

elaine31:~/Courses/CS244a/PA2.A> ./client -f server.c
elaine24.stanford.edu:55956

####Initiating a new connection now to 171.64.15.99:55956#### (sockfd=4)
transport_init: child process, active mode.
SendSyn: sending SYN with th_seq = 80 ...
SendSyn: successfully sent SYN with th_seq = 80.


Server side
===========

elaine24:~/Courses/CS244a/PA2.A> ./server
Server's address is elaine24.Stanford.EDU:55956

####Accepting a new connection now at port# 55956#### (sockfd=3)
transport_init: child process, passive mode.
           waiting for SYN packet ...
control_loop: sockfd = 3, local_data_sd = 5, max_fd = 3.
control_loop: Activity on sockfd = 3.
HandleSynPacket: received SYN with th_seq = 80.
SendSyn: sending SYN_ACK with th_seq = 182, th_ack = 81 ...
SendSyn: sent SYN_ACK successfully with th_seq = 182, th_ack = 81.
Connection established! ******************
HandleSynPacket: sending peername to parent process...
HandleSynPacket: sent peername to parent process successfully.
HandleDataPacket: received DATA packet with th_seq = 80, data_len = 0.
SendDataAck: sending DATA_ACK with th_ack = 80 ...
SendDataAck: sent DATA_ACK successfully with th_ack = 80.
control_loop: sockfd = 3, local_data_sd = 5, max_fd = 5.

SYN handshake completed, data_sd=6
connected to 171.64.15.106 at port 64103




.

Path: shelby.stanford.edu!not-for-mail
From: "Vijay Chemburkar" 
Newsgroups: su.class.cs244a
Subject: Re: 1.c
Date: Thu, 30 Jan 2003 14:26:58 -0800
Lines: 25
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: vj.stanford.edu
X-Trace: news.Stanford.EDU 1043965620 26513 128.12.79.199 (30 Jan 2003 22:27:00 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4146

I'm running in to the exact same problem...the hand shake happens, then the
application never sends any data to the client. so the output of the client
is just:

SYN handshake completed, data_sd=6

then nothing until it times out. This doesn't happen when I run my client
against my server. I've been looking at this for a good two hours now...has
anyone else run into something similar?


"Matthew Jonathan Holliman"  wrote in message

>
> >I'm passing all the other cases, except for 1.c.  The client's asking for
> >TESTDATA.0 and foo.  My program timed out.  I'm guessing foo is the
> >trouble maker, since I passed all the other tests that use TESTDATA.0.
> >What is foo?  Is it a non-existing file?  I tested non-existsing files,
> >but my program seems to handle them well.
>
> No--
> "foo" is just an unfortunate hack to appease the client in the number of
> command-line arguments; it isn't used at all.  You can ignore this.


.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!primdahl
From:  (Keith A Primdahl)
Newsgroups: su.class.cs244a
Subject: Re: syn/syn-ack problem...
Date: Thu, 30 Jan 2003 22:37:26 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 7
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine15.stanford.edu
X-Trace: news.Stanford.EDU 1043966246 26807 171.64.15.80 (30 Jan 2003 22:37:26 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4147

Well, it's not clear that I'm doing everything right for purify.  On the
server-side purify seems normal (i.e., opens windows for the parent and
child, as I detenv per the FAQ), and reports essentially nothing at
all. In order to get a client.purify, I make client.purify separately from
make server.purify, but client.purify will not run (even without args, it
won't even give the command-line syntax)???

.

Path: shelby.stanford.edu!not-for-mail
From: Fritz Budiyanto 
Newsgroups: su.class.cs244a
Subject: Application Layer never read the data
Date: Thu, 30 Jan 2003 22:52:26 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine43.stanford.edu
X-Trace: news.Stanford.EDU 1043967146 27207 171.64.15.118 (30 Jan 2003 22:52:26 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:4148

Hi,

Can we assume application layer always read the data? 
Because if appl layer sleep forever, and never read the data, recv socket
buffer will be full, and transport cannot send any data to the appl layer,
and since there is no flow control, we might have problem.

Any thought on this?

thanks,
Fritz
.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Window question
Date: Thu, 30 Jan 2003 15:39:03 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043969956 28885 171.64.15.82 (30 Jan 2003 23:39:16 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4149

According to the STCP protocol we should never send data ouside the
sending window. Does this constraint also apply to packets that have no
data. For example, if my sending window is completely full, is it still
legal to send an ACK packet, or do I need to wait until the receiver
ACKS some more data first?

-Tim



.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: print_congestion_window_and_estimatedRTT
Date: Thu, 30 Jan 2003 15:43:32 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043970213 29025 128.12.85.0 (30 Jan 2003 23:43:33 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4150

I'm sure this has probably already been answered somewhere, but I just
wanted to confirm that we don't need to do anything with this function for
part a. None of the tests seem to depend on it.

--
____________________________________________
Rene Patnode
Stanford University

Computer Science
Phi Kappa Psi
Resident Assistant, Cardenal

"Mmm... unexplained bacon." - Homer Simpson


.

Path: shelby.stanford.edu!not-for-mail
From: "sc" 
Newsgroups: su.class.cs244a
Subject: Re: 1.B
Date: Thu, 30 Jan 2003 15:54:37 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: avengingspirit.stanford.edu
X-Trace: news.Stanford.EDU 1043970878 29379 128.12.22.55 (30 Jan 2003 23:54:38 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4151

yeah. I'm having the same problem.
I use network_peer_name after a connection has been established, and it
seems to work fine when I run my
client and server together.. but it errors in the test script.

did you find out what was wrong?



"Aseem Sharma"  wrote in message

> Hi Guys,
>
> For 1.B I'm getting the error
>
> No 'rcvd' created!  Client output:
> recv: No such file or directory
> myconnect: mismatch in peer names  ("0.0.0.0:61879" != "0.0.0.0:0")
> myconnect: Bad file number
>
> I can't seem to figure out what possible role our transport layer on
> server plays
> so that the reference client would throw this error. I thought the above
> error had to do with the client going getsockname(), getpeername().
>
> Clues ?
>
>
>


.

Path: shelby.stanford.edu!elaine29.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: testkey usage
Date: Thu, 30 Jan 2003 23:59:01 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine29.stanford.edu
X-Trace: news.Stanford.EDU 1043971141 29525 171.64.15.104 (30 Jan 2003 23:59:01 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4152

Can someone let me knwo how to re-run the test using the
testkey?

thanks!


.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Application Layer never read the data
Date: Fri, 31 Jan 2003 00:57:25 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043974645 1946 171.64.15.70 (31 Jan 2003 00:57:25 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4153


>Can we assume application layer always read the data? 
>Because if appl layer sleep forever, and never read the data, recv socket
>buffer will be full, and transport cannot send any data to the appl layer,
>and since there is no flow control, we might have problem.

Correct.  In a normal socket layer, you know when data is requested, but
because of the pipe we're using, you can't tell here.  Just assume that
when you write data to the pipe, it's read by the application.
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: What is cksum exactly?
Date: Thu, 30 Jan 2003 16:59:16 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine40.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043974759 1988 171.64.15.115 (31 Jan 2003 00:59:19 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4154

It is not the size of the file? Sum of all the packets? Not likely. Please
advice. Thanks.

Jichun

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Window question
Date: Fri, 31 Jan 2003 01:00:48 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043974848 2085 171.64.15.70 (31 Jan 2003 01:00:48 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4155


>According to the STCP protocol we should never send data ouside the
>sending window. Does this constraint also apply to packets that have no
>data. For example, if my sending window is completely full, is it still
>legal to send an ACK packet, or do I need to wait until the receiver
>ACKS some more data first?

Yes, you can still send ACK packets (and if you didn't, nasty deadlocks could
happen); an ACK packet doesn't change your sequence number or window size in
any way.
.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: print_congestion_window_and_estimatedRTT
Date: Fri, 31 Jan 2003 01:01:13 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043974873 2104 171.64.15.70 (31 Jan 2003 01:01:13 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4156


>I'm sure this has probably already been answered somewhere, but I just
>wanted to confirm that we don't need to do anything with this function for
>part a. None of the tests seem to depend on it.

Correct.
.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: What is cksum exactly?
Date: Fri, 31 Jan 2003 01:02:39 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043974959 2135 171.64.15.70 (31 Jan 2003 01:02:39 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4157


>It is not the size of the file? Sum of all the packets? Not likely. Please
>advice. Thanks.

It's a CRC of the file; we'll cover this towards the end of the class, but
it's a commonly used means of detecting errors in files.  In this case,
cksum gives a integer result for a file, which almost always changes if the
file's contents change.
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: What happens if sending packets of fixed size?
Date: Thu, 30 Jan 2003 17:02:51 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine40.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043974972 2148 171.64.15.115 (31 Jan 2003 01:02:52 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4158

I put a STCP_Header and a char[536] together to make a STCPPacket struct
and transmit it not matter how big the payload actually is. I know this
probably is not the best design. But could it be the cause of failing 1.C?

Please enlighten. Thanks.

Jichun


Test 1.C [out of 10]
Checks reference transmitter against student receiver.

Results:  NOT OK

Checksum differs for file /usr/class/cs244a/grading_script/hw2/TESTDATA.1!
(Your cksum: 999546338, expected 4265638025).
Client output:
server: TESTDATA.1,299328,Ok


.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: testkey usage
Date: Fri, 31 Jan 2003 01:06:21 +0000 (UTC)
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043975181 2211 171.64.15.70 (31 Jan 2003 01:06:21 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4159


>Can someone let me knwo how to re-run the test using the
>testkey?

When you submit files for testing, the script hashes them and stores
the result in a file called .test_key in the same directory.  If you
resubmit the test without having changed your code in the meantime,
it again hashes the input files; if the hash matches your stored
..test_key, the test proceeds without using one of your daily quota.
This avoids the problems we had last year with people "wasting" test
runs due to intermittent FTP server failures, perhaps random failures
in their STCP implementation, etc.

So, if you haven't changed the code, you can just run test_code.pl again.
If you want to save a tested implementation for later re-testing, you can
save the transport.c and corresponding .test_key somewhere (in the same
directory together), and later run test_code.pl in there again.  It
also shouldn't count against your quota.

.

Path: shelby.stanford.edu!not-for-mail
From: Kevin Christopher 
Newsgroups: su.class.cs244a
Subject: Re: 1B and 1C response
Date: Thu, 30 Jan 2003 17:07:30 -0800
Lines: 32
Distribution: su
Message-ID: 
References:       
NNTP-Posting-Host: radicalbox.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043975232 2277 128.12.72.54 (31 Jan 2003 01:07:12 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4160


Peter Lai wrote:
> 	Yeah, I see your point. It was just frustrating to not get any
> output; in my case, all I knew was that my server timed out somewhere.
> Would it be possible to have scripts not disable the dprintf? I
> started using dprintf because there was that blurb about being careful
> of where to print to, and so I used up a testing case changing all the
> dprintfs to an fprintf to stderr. I don't know if anyone else had the
> same problem (I seem to be lucky :p), though, so it might not be worth
> changing and now I know to put all my debug info into fprintf :)

I agree that debugging output would be really nice, but as at least a 
partial fix I've added these lines to the top of transport.c:

#ifndef DEBUG
#define DEBUG
#endif

They'll force the debugging information to get written to the output. 
As another note (for the TAs), not having that line produces a LOT of 
warnings on compile, mainly because the macro expands to something like
    ("%s", string);
which C doesn't particularly like.

But with those three preprocessor lines, I've successfully passed code 
through the testing script.  Of course, I'm taking it out before 
submitting....  Maybe this'll help your debugging, maybe not, as even 
that hack doesn't seem to work for 1.B, but it does produce output for 
1.C, and I've passed all except 1.C using that code to turn DEBUG on.

-Kevin

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: What happens if sending packets of fixed size?
Date: Fri, 31 Jan 2003 01:14:41 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043975681 2724 171.64.15.70 (31 Jan 2003 01:14:41 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4161


>I put a STCP_Header and a char[536] together to make a STCPPacket struct
>and transmit it not matter how big the payload actually is. I know this
>probably is not the best design. But could it be the cause of failing 1.C?

Your SYN/FIN packets shouldn't contain any payload, i.e. data length of
zero.  Other packets should just be of the length corresponding to the
data you're actually sending.  Several people have said the former causes
problems with the reference implementation (although looking at the code,
it's not obvious why), and the latter seems like better style, and is
easy enough to implement.

The other main thing to watch out for would probably be proper sequence
number/ACK implementation.
.

Path: shelby.stanford.edu!not-for-mail
From: "Bina Vasavda" 
Newsgroups: su.class.cs244a
Subject: malloc/realloc/free and memcpys
Date: Thu, 30 Jan 2003 18:02:08 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: ev-01-hos4d.stanford.edu
X-Trace: news.Stanford.EDU 1043978249 4378 128.12.154.59 (31 Jan 2003 01:57:29 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4162

Hi, for part b) as far as design points are concerned (will we get points
off using either approach?) is there any difference between using a single
buffer with many memcpys or dynamically creating buffers on a packet by
packet basis (resulting in many mallocs and frees)?  Or is either approach
ok?
Thanks,
Bina


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: setitimer
Date: Thu, 30 Jan 2003 18:22:02 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1043979709 5420 128.12.195.69 (31 Jan 2003 02:21:49 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4163

I tried to use setitimer() to create an alarm to perform retransmission. But
when I try to set the alarm, setitimer () failed, and I get this from
perror:

Resource temporarily unavailable

What is the problem, and is there another timer/alarm mechanism I should
use?

-myl



.

Path: shelby.stanford.edu!not-for-mail
From: Yashar Ganjali 
Newsgroups: su.class.cs244a
Subject: Guido's Office Hours
Date: Thu, 30 Jan 2003 19:03:52 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: obi.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1043982232 6636 171.64.74.52 (31 Jan 2003 03:03:52 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
X-Accept-Language: en-us, pe
Xref: shelby.stanford.edu su.class.cs244a:4164

Hi everybody,

It seems that Guido will be a little late for his office hours. His 
office hours will start at 7:20 (same place) today. Sorry for any 
inconvenience this may have caused.

--Yashar


.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: Failing/passing 1.C randomly
Date: Thu, 30 Jan 2003 20:41:06 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043988071 9415 171.64.15.73 (31 Jan 2003 04:41:11 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4165

Test 1.C is the only thing preventing me from submitting PA2a. Just now,
after some trivial work, it passed. Before I could breathe a sigh of
relief, I ran the test script another time, without even costing me a
credit, it failed again.

What could have caused the randomness? Dropped packets? Packets arriving
out of order? Packets resent? These issues are required in part (a).

Or could there be other reasons?

Jichun

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: Recevier buffer and retransmission
Date: Fri, 31 Jan 2003 04:44:29 +0000 (UTC)
Organization: Stanford University
Lines: 26
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: epic16.stanford.edu
X-Trace: news.Stanford.EDU 1043988269 9549 171.64.15.49 (31 Jan 2003 04:44:29 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4166


In article 
  (Matthew Jonathan Holliman) writes:
> Nishant Verman  writes:
> 
> >did you find out from Matthew what this testcase is doing?
> >I'm also failing on this but can't figure out what they're actually
> >testing in this.
> 
> The test case is fairly innocuous; it just looks for successive ACKs
> that exceed the window length.  (I can't test an invalid receiver window
> more comprehensively until part (b), due to the in-order packet delivery
> constraint in part (a)).
> 
> I haven't had a chance to track down what's going on yet, but I'll post on
> here if I find out what's causing this behaviour.  (If you could send me your
> code also, it would be another data point to look at).
> 

Again, my retransmit code is intermittently failing this one. Is the following possible.

I send some data and the receiver acks it. Before I get the ack I resend the data. 
So the receiver will ack the dup data. Now I send some more data which causes the receive
window to become a whole contiguous chunk. Now when I send the ACK for the large chunk I will
have sent two ACKS which are father apart than the receive window which is what I believe the test
looks for.
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: test 1.I and retrans again
Date: Fri, 31 Jan 2003 04:51:05 +0000 (UTC)
Organization: Stanford University
Lines: 30
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: epic16.stanford.edu
X-Trace: news.Stanford.EDU 1043988665 9941 171.64.15.49 (31 Jan 2003 04:51:05 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4167


In article 
  (Matthew Jonathan Holliman) writes:
> 
> >This test is about FIN-ACKS for FIN. I have started to implement some of
> >the retransmission stuff. So depending on various things I may send more than
> >one FIN packet. But I will only get one FINACK back. I have a feeling this is
> >causing me to intermittently fail 1.I as there will be some unmatched FIN
> >packets in the stream if I have has to retransmit. Happily I have frozen a 
> >transport.c which has no retransmission stuff and this seems to pass all the
> >HW2a tests on every submitted run. 
> 
> >So my question is can a solution for 2b fail the 2a script for the above reason?
> 
> It shouldn't (and mine doesn't).  The test verifies that you receive a
> later FIN-ACK than a given FIN, and that you don't send a FIN-ACK without
> a preceding FIN.  It's not too picky.  I suspect a bug in your current
> retransmission implementation.
>

It seems to me that if there is a retrans mechanism in place the following could occur
I send a FIN and the peer sends a FINACK. Suppose this takes RTT. Then if my retrans < RTT
then I could send another FIN and so get a FIN FINACK FIN sequence which would fail the test.


 
> >If so remember to freeze a 2a solution.
> 
> This is a good idea anyway, in case you discover a bug later on this week
> and need to resubmit your part (a) solution...
.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: Re: Failing/passing 1.C randomly
Date: Thu, 30 Jan 2003 21:07:44 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043989668 10535 128.12.196.91 (31 Jan 2003 05:07:48 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4168

Yes, I also have the same problem.
Sometimes I passed and sometimes I failed test 1.C.
For the other tests, I also succesfully passed every times.

"Jichun Zhu"  wrote in message

> Test 1.C is the only thing preventing me from submitting PA2a. Just now,
> after some trivial work, it passed. Before I could breathe a sigh of
> relief, I ran the test script another time, without even costing me a
> credit, it failed again.
>
> What could have caused the randomness? Dropped packets? Packets arriving
> out of order? Packets resent? These issues are required in part (a).
>
> Or could there be other reasons?
>
> Jichun
>


.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Gettign rcvd files from tests
Date: Thu, 30 Jan 2003 21:19:35 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043990377 10948 171.64.15.82 (31 Jan 2003 05:19:37 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4169

I know this came up earlier on the newsgroup, but was left a bit open:

Is there any way we can get the rcvd files from our test run so we can try
to use them to debug checksum problems?

Also, is it considered in violation of the honor code to exchange binary
implementations of clients/servers with other students in order to help to
debug/verify our implementations of the protocol?

Thanks,
Tim



.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test 1.I and retrans again
Date: Fri, 31 Jan 2003 05:19:52 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043990392 10955 171.64.15.70 (31 Jan 2003 05:19:52 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4170



>It seems to me that if there is a retrans mechanism in place the following could occur
>I send a FIN and the peer sends a FINACK. Suppose this takes RTT. Then if my retrans < RTT
>then I could send another FIN and so get a FIN FINACK FIN sequence which would fail the test.

Yes, but this test isn't run in part B.

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: malloc/realloc/free and memcpys
Date: Fri, 31 Jan 2003 05:20:52 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043990452 11026 171.64.15.70 (31 Jan 2003 05:20:52 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4171


>Hi, for part b) as far as design points are concerned (will we get points
>off using either approach?) is there any difference between using a single
>buffer with many memcpys or dynamically creating buffers on a packet by
>packet basis (resulting in many mallocs and frees)?  Or is either approach
>ok?

Either approach is acceptable, per the comments in the review section
and on the newsgroup previously.

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: setitimer
Date: Fri, 31 Jan 2003 05:21:46 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043990506 11037 171.64.15.70 (31 Jan 2003 05:21:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4172


>What is the problem, and is there another timer/alarm mechanism I should
>use?

You can use the timeout argument to poll()/select().

.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: Re: Failing/passing 1.C randomly
Date: Thu, 30 Jan 2003 21:21:54 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043990515 11041 171.64.15.82 (31 Jan 2003 05:21:55 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4173

Are you failing this test via a bad checksum or otherwise. I'm wondering
if I have the same problem, but don't want to waste percious test script
runs proving it works "most of the time"

Thanks,
Tim

On Thu, 30 Jan 2003, Jichun Zhu wrote:

> Test 1.C is the only thing preventing me from submitting PA2a. Just now,
> after some trivial work, it passed. Before I could breathe a sigh of
> relief, I ran the test script another time, without even costing me a
> credit, it failed again.
>
> What could have caused the randomness? Dropped packets? Packets arriving
> out of order? Packets resent? These issues are required in part (a).
>
> Or could there be other reasons?
>
> Jichun
>
>



.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Recevier buffer and retransmission
Date: Fri, 31 Jan 2003 05:25:38 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043990738 11113 171.64.15.70 (31 Jan 2003 05:25:38 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4174


>Again, my retransmit code is intermittently failing this one. Is the following possible.

>I send some data and the receiver acks it. Before I get the ack I resend the data. 
>So the receiver will ack the dup data. Now I send some more data which causes the receive
>window to become a whole contiguous chunk. Now when I send the ACK for the large chunk I will
>have sent two ACKS which are father apart than the receive window which is what I believe the test
>looks for.

No; your "more data" can only reach the end of the sender window, i.e. you
couldn't have sent an amount that when ACKed would be more than 3072 bytes
ahead of the last ACK sent by the receiver.

If you don't figure out what's going on, please send me the code.

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Gettign rcvd files from tests
Date: Fri, 31 Jan 2003 05:31:49 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043991109 11339 171.64.15.70 (31 Jan 2003 05:31:49 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4175


>Is there any way we can get the rcvd files from our test run so we can try
>to use them to debug checksum problems?

Not without changing the scripts, which I'm loathe to do.

>Also, is it considered in violation of the honor code to exchange binary
>implementations of clients/servers with other students in order to help to
>debug/verify our implementations of the protocol?

I think so.  This gives on-campus students quite an advantage over SITN
students.

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: syn/syn-ack problem...
Date: Fri, 31 Jan 2003 05:33:22 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043991202 11390 171.64.15.70 (31 Jan 2003 05:33:22 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4176


>Well, it's not clear that I'm doing everything right for purify.  On the
>server-side purify seems normal (i.e., opens windows for the parent and
>child, as I detenv per the FAQ), and reports essentially nothing at
>all. In order to get a client.purify, I make client.purify separately from
>make server.purify, but client.purify will not run (even without args, it
>won't even give the command-line syntax)???

One thought--
for some reason, client.purify doesn't run on all of the elaines (e.g.
I think it gives a strange error message on elaine5).  it seems to work
on elaine42, as I recall, and some others also.

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1.B
Date: Fri, 31 Jan 2003 05:37:16 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043991436 11458 171.64.15.70 (31 Jan 2003 05:37:16 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4177


>yeah. I'm having the same problem.
>I use network_peer_name after a connection has been established, and it
>seems to work fine when I run my
>client and server together.. but it errors in the test script.

>did you find out what was wrong?

I've seen this error happen for other reasons also, e.g. if the SYN
handshake isn't handled correctly with the reference client/server.
It's not necessarily (and probably isn't) an error in how you're
using network_peer_name().

.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: The reference server just died
Date: Thu, 30 Jan 2003 21:37:33 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043991454 11512 128.12.85.0 (31 Jan 2003 05:37:34 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4178

So says the test script.

--
____________________________________________
Rene Patnode
Stanford University

Computer Science
Phi Kappa Psi
Resident Assistant, Cardenal

"Mmm... unexplained bacon." - Homer Simpson


.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: Re: Failing/passing 1.C randomly
Date: Thu, 30 Jan 2003 21:37:42 -0800
Lines: 34
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043991465 11520 171.64.15.73 (31 Jan 2003 05:37:45 GMT)
X-Complaints-To: 
To: Tim Reddy 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4179

Yes, it was bad cksum on TESTDATA.0 and TESTDATA.1. I don't know what file
I succeeded on because the script didn't give it once you passed.

Jichun

On Thu, 30 Jan 2003, Tim Reddy wrote:

> Are you failing this test via a bad checksum or otherwise. I'm wondering
> if I have the same problem, but don't want to waste percious test script
> runs proving it works "most of the time"
>
> Thanks,
> Tim
>
> On Thu, 30 Jan 2003, Jichun Zhu wrote:
>
> > Test 1.C is the only thing preventing me from submitting PA2a. Just now,
> > after some trivial work, it passed. Before I could breathe a sigh of
> > relief, I ran the test script another time, without even costing me a
> > credit, it failed again.
> >
> > What could have caused the randomness? Dropped packets? Packets arriving
> > out of order? Packets resent? These issues are required in part (a).
> >
> > Or could there be other reasons?
> >
> > Jichun
> >
> >
>
>
>
>

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Failing/passing 1.C randomly
Date: Fri, 31 Jan 2003 05:40:51 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043991651 11651 171.64.15.70 (31 Jan 2003 05:40:51 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4180


>What could have caused the randomness? Dropped packets? Packets arriving
>out of order? Packets resent? These issues are required in part (a).

Packets almost certainly won't be dropped or arrive out of order; there is
the possibility of them being retransmitted at the moment (although as I
indicated, I'll be sure to fix this for grading).  Certainly if you
added a simple check to discard retransmitted packets (just a single
if statement in your code), you should have no problems.

If you'd like, I can try and take a look at your code; it probably wouldn't
be until tomorrow however.
.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: The reference server just died
Date: Thu, 30 Jan 2003 21:42:38 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1043991759 11708 128.12.85.0 (31 Jan 2003 05:42:39 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4181

It's back.
"Rene Patnode"  wrote in message

> So says the test script.
>
> --
> ____________________________________________
> Rene Patnode
> Stanford University
>
> Computer Science
> Phi Kappa Psi
> Resident Assistant, Cardenal
>
> "Mmm... unexplained bacon." - Homer Simpson
>
>


.

Path: shelby.stanford.edu!elaine39.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Problem set #2 Question 2
Date: Thu, 30 Jan 2003 21:43:58 -0800
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine39.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043991842 11736 171.64.15.114 (31 Jan 2003 05:44:02 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4182

Hi,
I'm a bit confused with question 2 in PS 2
what is the format of the forwarding table?
- the one used in lectures :
Prefix|Next-hop|Port  (slide 4/26)
so what do we use for next-hop?

- or the one used in the book (page 314):
SubnetNumber|SubnetMask|NextHop

Also, it seems to me that Company X has been
assigned a prefix that falls inside Company
Y range of addresses. Is this correct or
am I really off base here? Because if that
is so then company Y cannot use all the address
space assigned to it and then what is the purpose
of that?

Thanks
Rafa



.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: The reference server just died
Date: Fri, 31 Jan 2003 05:45:21 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043991921 11752 171.64.15.70 (31 Jan 2003 05:45:21 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4183


>So says the test script.

Embarrassing, but this happens very occasionally.  If you rerun the script,
you should be okay.  (Needless to say, if this happens during grading, we
will take this into account!)

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1.c
Date: Fri, 31 Jan 2003 05:46:46 +0000 (UTC)
Lines: 16
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043992006 11790 171.64.15.70 (31 Jan 2003 05:46:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4184

"Vijay Chemburkar"  writes:

>I'm running in to the exact same problem...the hand shake happens, then the
>application never sends any data to the client. so the output of the client
>is just:

>SYN handshake completed, data_sd=6

>then nothing until it times out. This doesn't happen when I run my client
>against my server. I've been looking at this for a good two hours now...has
>anyone else run into something similar?

When I've seen this happen before, it was due to mismatched sequence
numbers/ACKs.  Have you tried writing a packet log to disk to see what's
going on?

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: SYN sent twice?
Date: Fri, 31 Jan 2003 05:48:55 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine5.stanford.edu
X-Trace: news.Stanford.EDU 1043992135 11955 171.64.15.70 (31 Jan 2003 05:48:55 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4185


>On the server side, after it received a SYN and responded with a SYN_ACK,
>it immediately received a SYN again, except that this time it is
>disguised as a "data" packet

Did you resolve this problem?

.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: Recevier buffer and retransmission
Date: Fri, 31 Jan 2003 06:03:45 +0000 (UTC)
Organization: Stanford University
Lines: 23
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: epic16.stanford.edu
X-Trace: news.Stanford.EDU 1043993025 12797 171.64.15.49 (31 Jan 2003 06:03:45 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4186



My problem would be solved if the ack you send for duplicate data is *not* the biggest seqno in the
packet but should be the largest contig segment so far (which will be) last frame received.
Is this correct?

In article 
  (Matthew Jonathan Holliman) writes:
> 
> >Again, my retransmit code is intermittently failing this one. Is the following possible.
> 
> >I send some data and the receiver acks it. Before I get the ack I resend the data. 
> >So the receiver will ack the dup data. Now I send some more data which causes the receive
> >window to become a whole contiguous chunk. Now when I send the ACK for the large chunk I will
> >have sent two ACKS which are father apart than the receive window which is what I believe the test
> >looks for.
> 
> No; your "more data" can only reach the end of the sender window, i.e. you
> couldn't have sent an amount that when ACKed would be more than 3072 bytes
> ahead of the last ACK sent by the receiver.
> 
> If you don't figure out what's going on, please send me the code.
> 
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: test 1.I and retrans again
Date: Fri, 31 Jan 2003 06:05:03 +0000 (UTC)
Organization: Stanford University
Lines: 13
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: epic16.stanford.edu
X-Trace: news.Stanford.EDU 1043993103 12828 171.64.15.49 (31 Jan 2003 06:05:03 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4187


In article 
  (Matthew Jonathan Holliman) writes:
> 
> 
> >It seems to me that if there is a retrans mechanism in place the following could occur
> >I send a FIN and the peer sends a FINACK. Suppose this takes RTT. Then if my retrans < RTT
> >then I could send another FIN and so get a FIN FINACK FIN sequence which would fail the test.
> 
> Yes, but this test isn't run in part B.
> 

I thought the test fails for unmatched FIN packets.
.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!wwtgao
From: "Tan Gao (weiwei)" 
Newsgroups: su.class.cs244a
Subject: Test 1.B lesson learned
Date: Thu, 30 Jan 2003 22:10:57 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043993459 13048 171.64.15.69 (31 Jan 2003 06:10:59 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4188

hi all!

thought this might be useful to some of y'll out there --

the mistake that I made (which prevented me from passing Test 1.B, and
ONLY 1.B) is that I incremented the sequence number for ALL packets.

what we are supposed to do is ONLY INCREMENT SEQUENCE NUMBER FOR DATA
PACKETS (i.e. packets WITHOUT ACK flag set, including SYN and FIN packets)

once this is fixed, test 1.B passes gracefully

Tan Gao
-------------------


.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: Re: SYN sent twice?
Date: Thu, 30 Jan 2003 22:17:04 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043993825 13231 171.64.15.73 (31 Jan 2003 06:17:05 GMT)
X-Complaints-To: 
To: Matthew Jonathan Holliman 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4189

Yes I have fixed it. It seemed the SYN packet got handled twice. Once it
was handled as SYN, then it went on to be handled as a DATA packet.

Jichun


On Fri, 31 Jan 2003, Matthew Jonathan Holliman wrote:

>
> >On the server side, after it received a SYN and responded with a SYN_ACK,
> >it immediately received a SYN again, except that this time it is
> >disguised as a "data" packet
>
> Did you resolve this problem?
>
>

.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!treddy
From: Tim Reddy 
Newsgroups: su.class.cs244a
Subject: FIXED: Re: Failing/passing 1.C randomly
Date: Thu, 30 Jan 2003 22:20:31 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043994033 13426 171.64.15.82 (31 Jan 2003 06:20:33 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4190

For people having this problem, I just checked up on Matt's retransmission
idea and put in a quick test to throw out retransmissions, and my code now
passes 1C consistently (with no checksum problem).

Hope this helps,
-Tim

On Fri, 31 Jan 2003, Matthew Jonathan Holliman wrote:

>
> >What could have caused the randomness? Dropped packets? Packets arriving
> >out of order? Packets resent? These issues are required in part (a).
>
> Packets almost certainly won't be dropped or arrive out of order; there is
> the possibility of them being retransmitted at the moment (although as I
> indicated, I'll be sure to fix this for grading).  Certainly if you
> added a simple check to discard retransmitted packets (just a single
> if statement in your code), you should have no problems.
>
> If you'd like, I can try and take a look at your code; it probably wouldn't
> be until tomorrow however.
>



.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: test 1.I and retrans again
Date: Fri, 31 Jan 2003 06:30:14 +0000 (UTC)
Organization: Stanford University
Lines: 13
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: epic16.stanford.edu
X-Trace: news.Stanford.EDU 1043994614 14071 171.64.15.49 (31 Jan 2003 06:30:14 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4191


So does this mean an ok part B transport.c may fail part A?

In article 
  (Matthew Jonathan Holliman) writes:
> 
> 
> >It seems to me that if there is a retrans mechanism in place the following could occur
> >I send a FIN and the peer sends a FINACK. Suppose this takes RTT. Then if my retrans < RTT
> >then I could send another FIN and so get a FIN FINACK FIN sequence which would fail the test.
> 
> Yes, but this test isn't run in part B.
> 
.

Path: shelby.stanford.edu!elaine8.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: Re: FIXED: Re: Failing/passing 1.C randomly
Date: Thu, 30 Jan 2003 22:38:41 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: elaine8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043995123 14705 171.64.15.73 (31 Jan 2003 06:38:43 GMT)
X-Complaints-To: 
To: Tim Reddy 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4192

Thanks. It worked for me too.

Jichun

On Thu, 30 Jan 2003, Tim Reddy wrote:

> For people having this problem, I just checked up on Matt's retransmission
> idea and put in a quick test to throw out retransmissions, and my code now
> passes 1C consistently (with no checksum problem).
>
> Hope this helps,
> -Tim
>
> On Fri, 31 Jan 2003, Matthew Jonathan Holliman wrote:
>
> >
> > >What could have caused the randomness? Dropped packets? Packets arriving
> > >out of order? Packets resent? These issues are required in part (a).
> >
> > Packets almost certainly won't be dropped or arrive out of order; there is
> > the possibility of them being retransmitted at the moment (although as I
> > indicated, I'll be sure to fix this for grading).  Certainly if you
> > added a simple check to discard retransmitted packets (just a single
> > if statement in your code), you should have no problems.
> >
> > If you'd like, I can try and take a look at your code; it probably wouldn't
> > be until tomorrow however.
> >
>
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: Re: FIXED: Re: Failing/passing 1.C randomly
Date: Thu, 30 Jan 2003 22:44:03 -0800
Lines: 45
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043995447 15171 128.12.196.91 (31 Jan 2003 06:44:07 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4193

Yes, it also worked for me.

"Jichun Zhu"  wrote in message

> Thanks. It worked for me too.
>
> Jichun
>
> On Thu, 30 Jan 2003, Tim Reddy wrote:
>
> > For people having this problem, I just checked up on Matt's
retransmission
> > idea and put in a quick test to throw out retransmissions, and my code
now
> > passes 1C consistently (with no checksum problem).
> >
> > Hope this helps,
> > -Tim
> >
> > On Fri, 31 Jan 2003, Matthew Jonathan Holliman wrote:
> >
> > >
> > > >What could have caused the randomness? Dropped packets? Packets
arriving
> > > >out of order? Packets resent? These issues are required in part (a).
> > >
> > > Packets almost certainly won't be dropped or arrive out of order;
there is
> > > the possibility of them being retransmitted at the moment (although as
I
> > > indicated, I'll be sure to fix this for grading).  Certainly if you
> > > added a simple check to discard retransmitted packets (just a single
> > > if statement in your code), you should have no problems.
> > >
> > > If you'd like, I can try and take a look at your code; it probably
wouldn't
> > > be until tomorrow however.
> > >
> >
> >
> >
> >
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Honggo Wijaya" 
Newsgroups: su.class.cs244a
Subject: Re: Test 1.B lesson learned
Date: Thu, 30 Jan 2003 22:45:44 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: wijaya.stanford.edu
X-Trace: news.Stanford.EDU 1043995549 15260 128.12.196.91 (31 Jan 2003 06:45:49 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4194

I think for the SYN packet, you should still increment the sequence number.
I did that and I always passes test 1.B too.

"Tan Gao (weiwei)"  wrote in message

> hi all!
>
> thought this might be useful to some of y'll out there --
>
> the mistake that I made (which prevented me from passing Test 1.B, and
> ONLY 1.B) is that I incremented the sequence number for ALL packets.
>
> what we are supposed to do is ONLY INCREMENT SEQUENCE NUMBER FOR DATA
> PACKETS (i.e. packets WITHOUT ACK flag set, including SYN and FIN packets)
>
> once this is fixed, test 1.B passes gracefully
>
> Tan Gao
> -------------------
> 
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Vijay Chemburkar" 
Newsgroups: su.class.cs244a
Subject: Re: 1.c
Date: Thu, 30 Jan 2003 23:47:03 -0800
Lines: 39
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: vj.stanford.edu
X-Trace: news.Stanford.EDU 1043999229 18957 128.12.79.199 (31 Jan 2003 07:47:09 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4196

i wrote out a log, and it looks right to me.

client                                        server
send SYN ack:0 seq:1
                                                get SYN ack:0 seq:1
                                                send SYN|ACK ack:2 seq:1
get SYN|ACK ack:2 seq:1

both client and server will send next data packet with seq=2, and are
expecting next packet from peer to have seq=2. after the exchange, both
sides print out that the handshake is done (i.e., the parent app gets
awoken) and they both sit in the control loop but nothing happens (since the
client doesn't send any data to its socket thread).

can someone tell me if the exchange above is correct?

"Matthew Jonathan Holliman"  wrote in message

> "Vijay Chemburkar"  writes:
>
> >I'm running in to the exact same problem...the hand shake happens, then
the
> >application never sends any data to the client. so the output of the
client
> >is just:
>
> >SYN handshake completed, data_sd=6
>
> >then nothing until it times out. This doesn't happen when I run my client
> >against my server. I've been looking at this for a good two hours
now...has
> >anyone else run into something similar?
>
> When I've seen this happen before, it was due to mismatched sequence
> numbers/ACKs.  Have you tried writing a packet log to disk to see what's
> going on?
>


.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!sberg
From: Steven Bergsieker 
Newsgroups: su.class.cs244a
Subject: Good value for poll
Date: Thu, 30 Jan 2003 23:59:49 -0800
Lines: 2
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine18.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1043999990 19645 171.64.15.83 (31 Jan 2003 07:59:50 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4197

What is a good value to use for the poll timeout?

.

Path: shelby.stanford.edu!not-for-mail
From: "Metha Jeeradit" 
Newsgroups: su.class.cs244a
Subject: Re: Test 1.I
Date: Fri, 31 Jan 2003 00:33:35 -0800
Lines: 46
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: ithaca.stanford.edu
X-Trace: news.Stanford.EDU 1044002016 21535 128.12.181.52 (31 Jan 2003 08:33:36 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4198

Found my bug!  I was inadvertently using recv() function instead of
network_recv() though I was implementing FIN/FIN-ACK sequence properly...


"Metha Jeeradit"  wrote in message

> I still have this same problem and I'm pretty positive that I got a
FIN-ACK
> after sending FIN and that the FIN-ACK was sent after receiving the
> FIN...I'm going to run out of test runs pretty soon.   I wonder if anyone
> has passed this test recently?  If so, could you kindly give us a hint as
to
> how you handled this problem?
>
> Thanks,
>
> Metha
>
> "Noh, Jeonghun"  wrote in message
> 
> > I got the error from this test. I wonder I made sure to check whether
the
> > active network terminator received the FIN-ACK before disconnecting the
> > channel.
> >
> > Assuming, I definitely created FIN-ACK, sent to the other peer, then the
> > peer definitely got the FIN-ACK and quit from the loop, what might be
the
> > cause of this error?
> >
> >
> >
> > --
> > *********************************
> > Jeonghun Noh
> > Dept. of Electrical Engineering
> > Stanford University
> > Tel : 1-650-497-6665
> > 
> > *********************************
> >
> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Kevin Christopher 
Newsgroups: su.class.cs244a
Subject: Re: FIXED: Re: Failing/passing 1.C randomly
Date: Fri, 31 Jan 2003 00:34:49 -0800
Lines: 15
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: radicalbox.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1044002069 21550 128.12.72.54 (31 Jan 2003 08:34:29 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4199

And one more person thanks you for noticing this... one extra line of 
code and suddenly I pass 1.C.  Definitely a retransmission problem. 
(And here I thought I'd be up all night implementing a receive window...)

-Kevin

Tim Reddy wrote:
> For people having this problem, I just checked up on Matt's retransmission
> idea and put in a quick test to throw out retransmissions, and my code now
> passes 1C consistently (with no checksum problem).
> 
> Hope this helps,
> -Tim
> 

.

Path: shelby.stanford.edu!saga13.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: can't correctly deal with SYN-ACK in part Two
Date: Fri, 31 Jan 2003 01:57:48 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044007070 23533 171.64.15.143 (31 Jan 2003 09:57:50 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4200

I migrated my code from part one to part two and first tried to implement
correctly handling dropped packet issues and such for the sender.

When the active side calls the code that sends the SYN, it does it in a
loop that retries the appropriate number of times, with timeouts and such.

When I run my own code against some tests and itself it handles the
SYN/SYN-ACK stuff okay. (In fact, it seems to handle the rest of the
transmission too ... all but FIN/FIN-ACK ...but that's for another day.)

BUT, when I run the test script I see the following error in the majority
of the tests (generally running against a reference implementation, I
think.)

Here is some code excerpted from my work. Two assert statements:
  assert(packetReceived.tcp_hdr.th_flags == (TH_ACK | TH_SYN));
  assert(packetReceived.tcp_hdr.th_ack == ctx->initial_sequence_num+1);

Oddly enough, it is the latter that fails. So if my code correctly gets a
SYN-ACK, why wouldn't the sequence number be appropriate? I hope a fresh
look tomorrow will yield some results, but I'm certainly puzzled right
now.

Ideas?

.

Path: shelby.stanford.edu!not-for-mail
From: Dale Neal 
Newsgroups: su.class.cs244a
Subject: Re: can't correctly deal with SYN-ACK in part Two
Date: Fri, 31 Jan 2003 02:23:19 -0800
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: masamune.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1044008616 24637 128.12.110.70 (31 Jan 2003 10:23:36 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4201

I was under the impression that because we are not implementing a full 
3-way handshake the way TCP does that we don't have to deal with 
re-transmission for the SYN and SYN_ACK packets (basically, how would 
the passive end even know that it's SYN_ACK was recieved without a 
3-way?). Can a TA clarify?
-Dale

.

Path: shelby.stanford.edu!not-for-mail
From: "Srinivas Panguluri" 
Newsgroups: su.class.cs244a
Subject: Sending window
Date: Fri, 31 Jan 2003 03:28:22 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: donkey.stanford.edu
X-Trace: news.Stanford.EDU 1044012506 26831 128.12.106.31 (31 Jan 2003 11:28:26 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4202

When we are near filling up the sending window, do we wait for 536 bytes to
be available before sending any packets?

Let's say there's currently 3000 bytes floating around that we sent, and our
poll() reveals that our application circuit wants to send even more data.
Should we read 72 bytes of this data and send it off, or wait for at least
536 bytes to be available, and read in as much as necessary?

It seems to make more sense to fill up the 72 bytes free, but my program
keeps getting the following error:

the client keeps crashing because of a "Bad number of bytes read" error, or
something like it.  I'm pretty sure all my byte math is right, and I'm
sending exactly what I need to send to the client, but only 72 bytes of it
before a long pause, which might be causing trouble?

However, if I set it up so that I wait for at least 536 bytes free, I'm not
getting this error, and I'm passing all the test cases...


.

Path: shelby.stanford.edu!not-for-mail
From: wmagrath 
Newsgroups: su.class.cs244a
Subject: testing problems?
Date: Fri, 31 Jan 2003 04:54:43 -0800
Lines: 16
Distribution: su
Message-ID: 
Reply-To:  
NNTP-Posting-Host: dn800cb809.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1044017896 29901 128.12.184.9 (31 Jan 2003 12:58:16 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4203

Is anyone else having problems running the test script?  It worked for 
me earlier, but now doesn't work.  Here's my output:

myth8:~/cs244a> /afs/ir/class/cs244a/bin/test_code.pl hw2a transport.c
Creating submission tarball...
transport.c

Starting...
couldn't submit code for testing


I'm in the correct directory.

Thanks,
Bill

.

Path: shelby.stanford.edu!not-for-mail
From: Rajat Monga 
Newsgroups: su.class.cs244a
Subject: 1.H Not all data ACKed before sending FIN
Date: Fri, 31 Jan 2003 15:19:06 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1044026346 2457 171.64.15.101 (31 Jan 2003 15:19:06 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:4204


I am getting this error even though I am pretty sure I am doing this in
order. In all the logs I can see the ACKs being received before FIN is
sent. 
However, I am setting the seq and ack values to 0 for the FIN and FIN_ACK
packets. Do they need to have the regular values? If yes, exactly what?

Am I missing something else?

Thanks,
Rajat
.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!kunnatur
From: Sandhya Kunnatur 
Newsgroups: su.class.cs244a
Subject: Re: 1.H Not all data ACKed before sending FIN
Date: Fri, 31 Jan 2003 09:10:54 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044033056 6386 171.64.15.72 (31 Jan 2003 17:10:56 GMT)
X-Complaints-To: 
To: Rajat Monga 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4205

I'm setting the seq and ack to zero too...but i'm not facing any probs.

Sandhya

On Fri, 31 Jan 2003, Rajat Monga wrote:

>
> I am getting this error even though I am pretty sure I am doing this in
> order. In all the logs I can see the ACKs being received before FIN is
> sent.
> However, I am setting the seq and ack values to 0 for the FIN and FIN_ACK
> packets. Do they need to have the regular values? If yes, exactly what?
>
> Am I missing something else?
>
> Thanks,
> Rajat
>

.

Path: shelby.stanford.edu!saga19.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: Re: can't correctly deal with SYN-ACK in part Two
Date: Fri, 31 Jan 2003 09:56:42 -0800
Lines: 11
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044035802 8617 171.64.15.149 (31 Jan 2003 17:56:42 GMT)
X-Complaints-To: 
To: Dale Neal 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4206

> I was under the impression that because we are not implementing a full
> 3-way handshake the way TCP does that we don't have to deal with
> re-transmission for the SYN and SYN_ACK packets (basically, how would
> the passive end even know that it's SYN_ACK was recieved without a
> 3-way?). Can a TA clarify?
I'll listen to the TA too, but what I thought we're doing is have the
passive side send out a SYN-ACK. How does it know it's SYN-ACK was
received? I thought it doesn't, but if it ever receives another one of the
SYN packets (perhaps we received a retransmission first...) it should send
out the initial SYN-ACK again just in case ... and not complain.

.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!primdahl
From:  (Keith A Primdahl)
Newsgroups: su.class.cs244a
Subject: application done
Date: Fri, 31 Jan 2003 18:04:42 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 33
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044036282 8941 171.64.15.112 (31 Jan 2003 18:04:42 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4207


*Handshake completes successfully.
*The canonical [provided]server-client file 
transfer completes successfully, with the same 
size and contents resulting in file "rcvd".
*The client signals that it is done by calling 
transport_close.
*transport_close sets the ctx->local_data_sd to -1
*control-loop is set up to trap this -1, but ctx-
>local_data_sd has been reset to its previous 
value - 1 (there is no '-=' in the vicinity)?
So, is there a parallel universe for a second
ctx->local_data_sd?

Is there a way to detect when a socket has been 
closed (I moved the close(data_sock) of 
transport_close to after the waitpid call). 
Closing it before parent blocks resulted in my 
control_loop running wild as it's select would 
not block the child on a closed socket.  (set 
#define DEBUG 1) to see all this).

Also, The total num of bytes of data transfered
in nine packets is 14 bytes more than the transferred 
file size. Num sent equals num received; however, 
there may be a bug in the way I set lengths for 
network_send, network_recv, and to/from the 
STCPHeader.  We should expect the total number of
bytes transfered to equal the file size, correct?
(on assignment 1, commands were on a different 
connection...)

Keith
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: dprintf and compiler warnings
Date: Fri, 31 Jan 2003 18:19:39 +0000 (UTC)
Organization: Stanford University
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic20.stanford.edu
X-Trace: news.Stanford.EDU 1044037179 9577 171.64.15.55 (31 Jan 2003 18:19:39 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4208


if you compile without -DDEBUG (as the test script does) this produces a lot of compiler
warnings

transport.c:1043: warning: statement with no effect
transport.c:1044: warning: statement with no effect 

etc.

I am assuming we won't have points taken off for not compiling cleanly. Is this correct?
.

Path: shelby.stanford.edu!not-for-mail
From: "Tyson Condie" 
Newsgroups: su.class.cs244a
Subject: Go - Back N test
Date: Fri, 31 Jan 2003 11:28:33 -0800
Lines: 7
Distribution: su
Message-ID: 
Reply-To: "Tyson Condie" 
NNTP-Posting-Host: saga1.stanford.edu
X-Trace: news.Stanford.EDU 1044041310 12478 171.64.15.131 (31 Jan 2003 19:28:30 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4209

For some reason test 2.M does not believe I am implementing Go-Back N.  Is
it possible to get a detailed explanation on how the test script determines
whether or not I'm implementing this protocol?

Thanks


.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: FIX: Intermittent purify error
Date: Fri, 31 Jan 2003 20:11:38 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044043898 14264 171.64.15.115 (31 Jan 2003 20:11:38 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4210

A few people have run into problems running client.purify, as it
complains about a missing file (a cryptic filename... ld.socket
something).  It was just pointed out to me that this is due to the
/tmp directory being occasionally cleared on the elaines.  This
directory is used to cache some files used by Purify, created when
you do 'make all.purify'.

If you rebuild your server.purify/client.purify, the problem
should go away.

Also, many people have noticed UMRs in network_send(); these can
generally be safely ignored.
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Recevier buffer and retransmission
Date: Fri, 31 Jan 2003 20:19:35 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044044375 14518 171.64.15.115 (31 Jan 2003 20:19:35 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4211


>My problem would be solved if the ack you send for duplicate data is *not* the biggest seqno in the
>packet but should be the largest contig segment so far (which will be) last frame received.
>Is this correct?

You always ACK with the next sequence number expected from the other side,
i.e. the first byte not yet received.

.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: sequence num wrapping
Date: Fri, 31 Jan 2003 12:24:25 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine18.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044044667 14685 171.64.15.83 (31 Jan 2003 20:24:27 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4212


Hi...

do we have to take into account the fact that we might be transferring so
much data that seq no. might wrap around, or can we design without taking
that into account?

Thanks,
Priyanka

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test 1.I and retrans again
Date: Fri, 31 Jan 2003 20:36:54 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044045414 14989 171.64.15.115 (31 Jan 2003 20:36:55 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4213


>I thought the test fails for unmatched FIN packets.

I just changed it to look at only the first FIN, in case people had
implemented retransmissions.   So now a part B solution should also
always pass it (although again, we won't test this).

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Good value for poll
Date: Fri, 31 Jan 2003 20:37:42 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044045462 15007 171.64.15.115 (31 Jan 2003 20:37:42 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4214

>What is a good value to use for the poll timeout?

Whatever makes sense given your next scheduled timeout.
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Sending window
Date: Fri, 31 Jan 2003 20:42:44 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044045764 15214 171.64.15.115 (31 Jan 2003 20:42:44 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4215


>When we are near filling up the sending window, do we wait for 536 bytes to
>be available before sending any packets?

No, you should send data as soon as it's ready to be sent, up to the limit
given by your current sender window.

>However, if I set it up so that I wait for at least 536 bytes free, I'm not
>getting this error, and I'm passing all the test cases...

Perhaps this should be an additional test case next year.
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: application done
Date: Fri, 31 Jan 2003 20:46:17 +0000 (UTC)
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044045977 15283 171.64.15.115 (31 Jan 2003 20:46:17 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4216


>Is there a way to detect when a socket has been 
>closed (I moved the close(data_sock) of 
>transport_close to after the waitpid call). 

read() or recv() will return zero when the socket
has been closed.

>Also, The total num of bytes of data transfered
>in nine packets is 14 bytes more than the transferred 
>file size. Num sent equals num received; however, 
>there may be a bug in the way I set lengths for 
>network_send, network_recv, and to/from the 
>STCPHeader.  We should expect the total number of
>bytes transfered to equal the file size, correct?
>(on assignment 1, commands were on a different 
>connection...)

Is that data transferred by either side?  The client
sends a filename, and perhaps the server responds
with some message about that too--I don't remember.

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: can't correctly deal with SYN-ACK in part Two
Date: Fri, 31 Jan 2003 20:47:59 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044046079 15319 171.64.15.115 (31 Jan 2003 20:47:59 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4217


>I'll listen to the TA too, but what I thought we're doing is have the
>passive side send out a SYN-ACK. How does it know it's SYN-ACK was
>received? I thought it doesn't, but if it ever receives another one of the
>SYN packets (perhaps we received a retransmission first...) it should send
>out the initial SYN-ACK again just in case ... and not complain.

This is correct.  If the active side doesn't hear a SYN-ACK back for its SYN,
it should retransmit the SYN; whenever the passive side receives a SYN,
it just responds with the regular ACK and its initial sequence number as
normal.

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: testing problems?
Date: Fri, 31 Jan 2003 20:52:57 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044046377 15504 171.64.15.115 (31 Jan 2003 20:52:57 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4218


>Is anyone else having problems running the test script?  It worked for 
>me earlier, but now doesn't work.  Here's my output:

Does this fail consistently for you?

Someone else mentioned a similar problem yesterday; resubmitting the
test without changes worked fine for him.  I'm not sure what the
problem is yet.

.

Path: shelby.stanford.edu!epic4.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: Re: 1.H Not all data ACKed before sending FIN
Date: Fri, 31 Jan 2003 20:54:03 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic4.stanford.edu
X-Trace: news.Stanford.EDU 1044046443 15528 171.64.15.37 (31 Jan 2003 20:54:03 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4219

I am also having the same problem.
any clues?

>I am getting this error even though I am pretty sure I am doing this in
>order. In all the logs I can see the ACKs being received before FIN is
>sent. 
>However, I am setting the seq and ack values to 0 for the FIN and FIN_ACK
>packets. Do they need to have the regular values? If yes, exactly what?

>Am I missing something else?

>Thanks,
>Rajat
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1.c
Date: Fri, 31 Jan 2003 20:55:51 +0000 (UTC)
Lines: 13
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044046551 15562 171.64.15.115 (31 Jan 2003 20:55:51 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4220


>both client and server will send next data packet with seq=2, and are
>expecting next packet from peer to have seq=2. after the exchange, both
>sides print out that the handshake is done (i.e., the parent app gets
>awoken) and they both sit in the control loop but nothing happens (since the
>client doesn't send any data to its socket thread).

>can someone tell me if the exchange above is correct?

Looks right.

Did you check for server retransmissions, as this was tripping up
several people?
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: dprintf and compiler warnings
Date: Fri, 31 Jan 2003 20:56:46 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044046606 15572 171.64.15.115 (31 Jan 2003 20:56:46 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4221


>I am assuming we won't have points taken off for not compiling cleanly. Is this correct?

Yes.
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Go - Back N test
Date: Fri, 31 Jan 2003 21:02:03 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044046923 15771 171.64.15.115 (31 Jan 2003 21:02:03 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4222


>For some reason test 2.M does not believe I am implementing Go-Back N.  Is
>it possible to get a detailed explanation on how the test script determines
>whether or not I'm implementing this protocol?

It checks that if/when you retransmit a packet, you transmit all
following packets up to the end of your sender window.
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: sequence num wrapping
Date: Fri, 31 Jan 2003 21:02:52 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Trace: news.Stanford.EDU 1044046972 15784 171.64.15.115 (31 Jan 2003 21:02:52 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4223


>do we have to take into account the fact that we might be transferring so
>much data that seq no. might wrap around, or can we design without taking
>that into account?

Please read the FAQ.
.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: can't correctly deal with SYN-ACK in part Two
Date: Fri, 31 Jan 2003 13:38:02 -0800
Lines: 26
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044049083 16695 128.12.85.0 (31 Jan 2003 21:38:03 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4224

Why would it send a regular ACK?

I can imagine the following scenario:
Active sends SYN. Passive sends SYN_ACK, but it gets dropped. Active resends
SYN. Now, once it receives the SYN, passive needs to resend the SYN_ACK,
because the active end is still waiting for a SYN_ACK.

"Matthew Jonathan Holliman"  wrote in message

>
> >I'll listen to the TA too, but what I thought we're doing is have the
> >passive side send out a SYN-ACK. How does it know it's SYN-ACK was
> >received? I thought it doesn't, but if it ever receives another one of
the
> >SYN packets (perhaps we received a retransmission first...) it should
send
> >out the initial SYN-ACK again just in case ... and not complain.
>
> This is correct.  If the active side doesn't hear a SYN-ACK back for its
SYN,
> it should retransmit the SYN; whenever the passive side receives a SYN,
> it just responds with the regular ACK and its initial sequence number as
> normal.
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Vijay Chemburkar" 
Newsgroups: su.class.cs244a
Subject: Re: 1.c
Date: Fri, 31 Jan 2003 14:00:38 -0800
Lines: 20
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: vj.stanford.edu
X-Trace: news.Stanford.EDU 1044050442 17462 128.12.79.199 (31 Jan 2003 22:00:42 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4225

yeah, that's what it was in the end. thanks for all your help.

"Matthew Jonathan Holliman"  wrote in message

>
> >both client and server will send next data packet with seq=2, and are
> >expecting next packet from peer to have seq=2. after the exchange, both
> >sides print out that the handshake is done (i.e., the parent app gets
> >awoken) and they both sit in the control loop but nothing happens (since
the
> >client doesn't send any data to its socket thread).
>
> >can someone tell me if the exchange above is correct?
>
> Looks right.
>
> Did you check for server retransmissions, as this was tripping up
> several people?


.

Path: shelby.stanford.edu!not-for-mail
From: "Alexander Fontana" 
Newsgroups: su.class.cs244a
Subject: FIN shutdown sequence.
Date: Fri, 31 Jan 2003 13:59:50 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: afontana.stanford.edu
X-Trace: news.Stanford.EDU 1044050649 17544 128.12.101.143 (31 Jan 2003 22:04:09 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4226

I am somewhat confused about the proper behavior before sending a fin.

The handout says the active end 'flushes data remaining in the buffer'.

But the first milestone says not to worry about retransmissions.

Doesn't this mean that for part 1, we might end up sending some packets
twice?  Or should we just wait for the acks to come in?  Could not resending
data cause testcase 1.H to fail?

Thanks,
Alex



.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: can't correctly deal with SYN-ACK in part Two
Date: Fri, 31 Jan 2003 22:19:03 +0000 (UTC)
Lines: 30
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1044051543 18016 171.64.15.117 (31 Jan 2003 22:19:03 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4227

"Rene Patnode"  writes:

>Why would it send a regular ACK?

It wouldn't--I meant the regular SYN-ACK.  Sorry for the confusion.

>I can imagine the following scenario:
>Active sends SYN. Passive sends SYN_ACK, but it gets dropped. Active resends
>SYN. Now, once it receives the SYN, passive needs to resend the SYN_ACK,
>because the active end is still waiting for a SYN_ACK.

>"Matthew Jonathan Holliman"  wrote in message

>>
>> >I'll listen to the TA too, but what I thought we're doing is have the
>> >passive side send out a SYN-ACK. How does it know it's SYN-ACK was
>> >received? I thought it doesn't, but if it ever receives another one of
>the
>> >SYN packets (perhaps we received a retransmission first...) it should
>send
>> >out the initial SYN-ACK again just in case ... and not complain.
>>
>> This is correct.  If the active side doesn't hear a SYN-ACK back for its
>SYN,
>> it should retransmit the SYN; whenever the passive side receives a SYN,
>> it just responds with the regular ACK and its initial sequence number as
>> normal.
>>


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: FIN shutdown sequence.
Date: Fri, 31 Jan 2003 22:21:58 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1044051718 18118 171.64.15.117 (31 Jan 2003 22:21:58 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4228


>Doesn't this mean that for part 1, we might end up sending some packets
>twice?  Or should we just wait for the acks to come in?  Could not resending
>data cause testcase 1.H to fail?

You should wait for data to be ACKed before sending the FIN.  Since you
aren't implementing timeouts in part (A), you won't care when the ACKs
arrive, i.e. you won't be retransmitting anything.

.

Path: shelby.stanford.edu!not-for-mail
From: "Tyson Condie" 
Newsgroups: su.class.cs244a
Subject: Re: Go - Back N test
Date: Fri, 31 Jan 2003 14:25:13 -0800
Lines: 25
Distribution: su
Message-ID: 
References:  
Reply-To: "Tyson Condie" 
NNTP-Posting-Host: saga19.stanford.edu
X-Trace: news.Stanford.EDU 1044051980 18200 171.64.15.149 (31 Jan 2003 22:26:20 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4229

Here is what I think may be happening, based on the output I get from the
test run.  I send a burst of 3072 bytes (consisting of 5 packets size 536
and one of size 392).  The test program will drop the first packet, in which
case I retransmit the 3072 bytes. This retransmission will again send 5
packets of size 536 and one of size 392.   Now I suspect one of the
retransmitted packets is being dropped, reordered, whatever, which causes
the test program to think I only sent the bytes up to that first dropped
packet.  Can you please confirm whether this is or is not the case.

Thanks


"Matthew Jonathan Holliman"  wrote in message

>
> >For some reason test 2.M does not believe I am implementing Go-Back N.
Is
> >it possible to get a detailed explanation on how the test script
determines
> >whether or not I'm implementing this protocol?
>
> It checks that if/when you retransmit a packet, you transmit all
> following packets up to the end of your sender window.


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Calling print_congestion_window_and_estimatedRTT
Date: Fri, 31 Jan 2003 14:51:14 -0800
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1044053449 18930 128.12.195.69 (31 Jan 2003 22:50:49 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4230

1)
The assignment told us to look in mysock.c to see how
print_congestion_window_and_estimatedRTT but there is no call to it in
mysock.c that I could find. Could someone please explain how it is called?
Namely, what does fid means?

2)
My code fails test cases 2.K and 2.M (the finserver is run against
client.retrans). I ran finserver and client.retrans on my own, and found
that client.retrans just sits and prints the info about each received
packet. My debug messages included in the finserver output showed that my
code is retransmitting a full window of 3072 bytes in the same 7 packets for
5 times before quitting. From that point on client.retrans just sits there.

According to the specs I think that is what the retransmission protocol and
Go-back-N call for (5 retransmission of all 7 packets making up a full 3072
bytes window). I do not understand why my code fails the test cases. The
only thing I can notice is that ERTT is some junk value in client.retrans
output (I don't know how it is called).

-myl


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!erikdw
From: Erik Damian Weathers 
Newsgroups: su.class.cs244a
Subject: 1.E: Invalid SYN sequence number 16838
Date: Fri, 31 Jan 2003 15:15:18 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044054921 19713 171.64.15.74 (31 Jan 2003 23:15:21 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4231

Anyone have a clue why that would happen?
What are the criteria for a valid SYN sequence number?
I thought that you set it to some value X, and things
just proceeded from there.

thanks,

- Erik

.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: Invalid SYN sequence number 16838
Date: Fri, 31 Jan 2003 15:22:49 -0800
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044055370 19958 128.12.85.0 (31 Jan 2003 23:22:50 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4232

The assignment specifies that the sequence number has to be a random number
between 0 and 255.

"Erik Damian Weathers"  wrote in message

> Anyone have a clue why that would happen?
> What are the criteria for a valid SYN sequence number?
> I thought that you set it to some value X, and things
> just proceeded from there.
>
> thanks,
>
> - Erik
>


.

Path: shelby.stanford.edu!elaine3.Stanford.EDU!primdahl
From:  (Keith A Primdahl)
Newsgroups: su.class.cs244a
Subject: Re: application done
Date: Fri, 31 Jan 2003 23:37:55 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 55
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine3.stanford.edu
X-Trace: news.Stanford.EDU 1044056275 20651 171.64.15.68 (31 Jan 2003 23:37:55 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4233

In article 
Matthew Jonathan Holliman  wrote:
>
>>Is there a way to detect when a socket has been 
>>closed (I moved the close(data_sock) of 
>>transport_close to after the waitpid call). 
>
>read() or recv() will return zero when the socket
>has been closed.

If I understand correctly, read() or recv() will
return zero also when the pipe is empty, but the 
socket is not closed.  One of the neat things my code
did was to have the server parent somehow die, then
the child never blocks in the control_loop select, but 
there is nothing in the pipe...though the child keeps 
getting sent three.  I somehow got it the parent to
block at the waitpid...but it's not signaling "done", 
at least not as I'm expecting.  A race cndition on
the ctx->local_data_sd would leave me with the actual
sd value, or -1, but something inbetween seems to turn up...

Still, I'll take your comment as a clue that a zero
back from read() or recv() should be all I need.. 

>
>>Also, The total num of bytes of data transfered
>>in nine packets is 14 bytes more than the transferred 
>>file size. Num sent equals num received; however, 
>>there may be a bug in the way I set lengths for 
>>network_send, network_recv, and to/from the 
>>STCPHeader.  We should expect the total number of
>>bytes transfered to equal the file size, correct?
>>(on assignment 1, commands were on a different 
>>connection...)
>
>Is that data transferred by either side?  The client
>sends a filename, and perhaps the server responds
>with some message about that too--I don't remember.
>

file "temp" is 4776 bytes .  Server sends 8 packets of 536 each, and one 
packet
of 502 bytes (not counting header bytes in both cases--print statements
n server and client show theses same values for send and receive, 
respectively.  Total sums 4790. Since a \r\n is added to all (maybe all
-1) packets, I would have expected 4776+18, or 4794 bytes.  Still, it does
not look like I have a systematic bug (e.g., losing 1 byte/packet).  The
written "rcvd" file is 4776 bytes, as it should be.

Truth is, I'm really not sure if the client is attempting to exit
normally, or as a result of some problem following the successful
file transfer.


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!erikdw
From: Erik Damian Weathers 
Newsgroups: su.class.cs244a
Subject: Re: application done
Date: Fri, 31 Jan 2003 15:47:39 -0800
Lines: 69
Distribution: su
Message-ID: 
References:  
 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044056861 21073 171.64.15.74 (31 Jan 2003 23:47:41 GMT)
X-Complaints-To: 
To: Keith A Primdahl 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4234

1 comment inline...

On Fri, 31 Jan 2003, Keith A Primdahl wrote:

> In article 
> Matthew Jonathan Holliman  wrote:
> >
> >>Is there a way to detect when a socket has been
> >>closed (I moved the close(data_sock) of
> >>transport_close to after the waitpid call).
> >
> >read() or recv() will return zero when the socket
> >has been closed.
>
> If I understand correctly, read() or recv() will
> return zero also when the pipe is empty, but the
> socket is not closed.

I thought that read would block if you requested
X bytes but 0 bytes were available in the pipe,
not return 0.  Unless you use O_NDELAY or something.

- Erik

> One of the neat things my code
> did was to have the server parent somehow die, then
> the child never blocks in the control_loop select, but
> there is nothing in the pipe...though the child keeps
> getting sent three.  I somehow got it the parent to
> block at the waitpid...but it's not signaling "done",
> at least not as I'm expecting.  A race cndition on
> the ctx->local_data_sd would leave me with the actual
> sd value, or -1, but something inbetween seems to turn up...
>
> Still, I'll take your comment as a clue that a zero
> back from read() or recv() should be all I need..
>
> >
> >>Also, The total num of bytes of data transfered
> >>in nine packets is 14 bytes more than the transferred
> >>file size. Num sent equals num received; however,
> >>there may be a bug in the way I set lengths for
> >>network_send, network_recv, and to/from the
> >>STCPHeader.  We should expect the total number of
> >>bytes transfered to equal the file size, correct?
> >>(on assignment 1, commands were on a different
> >>connection...)
> >
> >Is that data transferred by either side?  The client
> >sends a filename, and perhaps the server responds
> >with some message about that too--I don't remember.
> >
>
> file "temp" is 4776 bytes .  Server sends 8 packets of 536 each, and one
> packet
> of 502 bytes (not counting header bytes in both cases--print statements
> n server and client show theses same values for send and receive,
> respectively.  Total sums 4790. Since a \r\n is added to all (maybe all
> -1) packets, I would have expected 4776+18, or 4794 bytes.  Still, it does
> not look like I have a systematic bug (e.g., losing 1 byte/packet).  The
> written "rcvd" file is 4776 bytes, as it should be.
>
> Truth is, I'm really not sure if the client is attempting to exit
> normally, or as a result of some problem following the successful
> file transfer.
>
>
>

.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Go - Back N test
Date: Fri, 31 Jan 2003 23:55:53 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine42.stanford.edu
X-Trace: news.Stanford.EDU 1044057353 21376 171.64.15.117 (31 Jan 2003 23:55:53 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4235


>Here is what I think may be happening, based on the output I get from the
>test run.  I send a burst of 3072 bytes (consisting of 5 packets size 536
>and one of size 392).  The test program will drop the first packet, in which
>case I retransmit the 3072 bytes. This retransmission will again send 5
>packets of size 536 and one of size 392.   Now I suspect one of the
>retransmitted packets is being dropped, reordered, whatever, which causes
>the test program to think I only sent the bytes up to that first dropped
>packet.  Can you please confirm whether this is or is not the case.

It shouldn't be.  The test examines the client side to see what data
packets are received; it's the server that's forced to retransmit data
in this test, and that operates in reliable mode.  If you look in network.c,
you'll see that all packet dropping/reordering is done only at the sender
side, so the client should receive all retransmitted packets.

Let me look into this some more.
.

Path: shelby.stanford.edu!not-for-mail
From: "Alexander Fontana" 
Newsgroups: su.class.cs244a
Subject: linux build
Date: Fri, 31 Jan 2003 16:37:57 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: afontana.stanford.edu
X-Trace: news.Stanford.EDU 1044060135 23208 128.12.101.143 (1 Feb 2003 00:42:15 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4236

I thought it would be fun to see how all this runs on an x86, but the build
fails on firebird.  :(

firebird5:~/cs244a/hw2> make
gcc -g -DLINUX  -c client.c
client.c: In function `main':
client.c:68: `optarg' undeclared (first use in this function)
client.c:68: (Each undeclared identifier is reported only once
client.c:68: for each function it appears in.)
client.c:84: `optind' undeclared (first use in this function)
make: *** [client.o] Error 1


.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: Packets with overlapping data?
Date: Fri, 31 Jan 2003 17:15:39 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044062141 24250 171.64.15.72 (1 Feb 2003 01:15:41 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4237

Do we have to worry about receiving out-of-order packets that are
partially overlapped on each other?

For example, we may have two packets in receiver's buffer.

Packet #1: th_seq = 100, data_len = 20;
Packet #2: th_seq = 150, data_len = 50;

then here comes a packet #3 with th_seq = 110 and data_len = 250, which
partially overlapped with packet #1 and completely contains packet #2.

If we must take care of packets with overlapping data, shall we honor the
data from earlier packets or the latest packets?

Thanks.

Jichun

.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!jichun
From: Jichun Zhu 
Newsgroups: su.class.cs244a
Subject: What needs to be done with ACK of duplicate data?
Date: Fri, 31 Jan 2003 17:29:33 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044062974 24684 171.64.15.72 (1 Feb 2003 01:29:34 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4238

What's the point of receiver ACKing duplicated data packets? What does the
sender do to the resulted duplicated ACK packets other than discarding
them?

Does the sender check if it receives ACK for every packets it has sent? I
don't think so. All the sender cares probably is that the full range of
data it sends get ACKed.

Please clarify. Thanks.

Jichun

.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Go - Back N test
Date: Sat, 1 Feb 2003 01:43:33 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1044063813 25092 171.64.15.111 (1 Feb 2003 01:43:33 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4239


I found the problem; the script was using the results from a previous
test case, which had been overwritten in the meantime by a test for which
the assumption of no packet loss on the sender side didn't hold.

I've fixed the bug.
.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sat, 1 Feb 2003 02:06:53 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Trace: news.Stanford.EDU 1044065213 25752 171.64.15.111 (1 Feb 2003 02:06:54 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4240


>I'm a bit confused with question 2 in PS 2
>what is the format of the forwarding table?
>- the one used in lectures :
>Prefix|Next-hop|Port  (slide 4/26)
>so what do we use for next-hop?

Yes, please use this format.  You can invent something reasonable for
the next hop.

>Also, it seems to me that Company X has been
>assigned a prefix that falls inside Company
>Y range of addresses. Is this correct or
>am I really off base here? Because if that
>is so then company Y cannot use all the address
>space assigned to it and then what is the purpose
>of that?

I don't want to say too much here, because it will give away the
answer, but you seem to have the right idea.  I guess you might be able
to imagine scenarios where this assignment makes sense.
.

Path: shelby.stanford.edu!saga8.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: linux build
Date: Fri, 31 Jan 2003 18:35:21 -0800
Lines: 50
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044066923 26542 171.64.15.138 (1 Feb 2003 02:35:23 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4241

Hi,
I've implemented the complete assignment using Linux and only used
the elaines for testing. The changes you need are pretty simple:

On client.c the unistd.h include is needed for getopt

$ diff client.c ../../hw2_orig/hw2/src/client.c
31,34d30
< #ifdef LINUX
< #include <unistd.h>  /* for getopt */
< #endif

and on network.h the sys_err[] needs to be guarded against
because it is defined in stdio.h

$ diff network.h ../../hw2_orig/hw2/src/network.h
33,34c33
< #ifndef LINUX
< #ifndef BSD
---
> #ifndef BSD
36d34
< #endif


With those changes and running "make -f Makefile.linux"
it compiled ok in my system (Mandrake 8.2).

Hope this helps.
Rafa



On Fri, 31 Jan 2003, Alexander Fontana wrote:

> I thought it would be fun to see how all this runs on an x86, but the build
> fails on firebird.  :(
>
> firebird5:~/cs244a/hw2> make
> gcc -g -DLINUX  -c client.c
> client.c: In function `main':
> client.c:68: `optarg' undeclared (first use in this function)
> client.c:68: (Each undeclared identifier is reported only once
> client.c:68: for each function it appears in.)
> client.c:84: `optind' undeclared (first use in this function)
> make: *** [client.o] Error 1
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Packets with overlapping data?
Date: Fri, 31 Jan 2003 18:48:21 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044067769 26890 128.12.186.92 (1 Feb 2003 02:49:29 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4242


"Jichun Zhu"  wrote in message

> Do we have to worry about receiving out-of-order packets that are
> partially overlapped on each other?

Yes.

>
> For example, we may have two packets in receiver's buffer.
>
> Packet #1: th_seq = 100, data_len = 20;
> Packet #2: th_seq = 150, data_len = 50;
>
> then here comes a packet #3 with th_seq = 110 and data_len = 250, which
> partially overlapped with packet #1 and completely contains packet #2.
>
> If we must take care of packets with overlapping data, shall we honor the
> data from earlier packets or the latest packets?
>

Assuming that you are aligning sequence numbers, the overlapping data from
the two packets will be identical.

> Thanks.
>
> Jichun
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: What needs to be done with ACK of duplicate data?
Date: Fri, 31 Jan 2003 18:52:30 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044068018 27095 128.12.186.92 (1 Feb 2003 02:53:38 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4243

> What's the point of receiver ACKing duplicated data packets?

The ACK contains the next sequence number that the receiver expects.  It is
sent for every packet that the receiver receives.

What does the
> sender do to the resulted duplicated ACK packets other than discarding
> them?
>

Nothing else.

> Does the sender check if it receives ACK for every packets it has sent? I
> don't think so. All the sender cares probably is that the full range of
> data it sends get ACKed.
>

Correct -- if the sender sends packet 1, 2, 3, 4 but the acks saying the
receiver is expecting 2, 3, 4 get lost in transmission, if the sender
receives an ack for 5, it knows that the receiver has everything up to
packet 5.

Now of course, don't get confused -- the acks are based on sequence numbers
but I just used packet numbers for simplicity.

> Please clarify. Thanks.
>
> Jichun
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Calling print_congestion_window_and_estimatedRTT
Date: Fri, 31 Jan 2003 19:17:20 -0800
Lines: 44
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044069509 27742 128.12.186.92 (1 Feb 2003 03:18:29 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4244


"Man Yu Lui"  wrote in message

> 1)
> The assignment told us to look in mysock.c to see how
> print_congestion_window_and_estimatedRTT but there is no call to it in
> mysock.c that I could find. Could someone please explain how it is called?
> Namely, what does fid means?
>

Perhaps another TA could verify this, but what I believe is that the
testing/grading script directly calls
print_congestion_windows_and_estimatedRTT function.  Unless you hear
otherwise, ignore the fid and just set the variables being passed to the
printf in that function to the corect values (which obviously are the values
you are using in your algorithm).

> 2)
> My code fails test cases 2.K and 2.M (the finserver is run against
> client.retrans). I ran finserver and client.retrans on my own, and found
> that client.retrans just sits and prints the info about each received
> packet. My debug messages included in the finserver output showed that my
> code is retransmitting a full window of 3072 bytes in the same 7 packets
for
> 5 times before quitting. From that point on client.retrans just sits
there.
>
> According to the specs I think that is what the retransmission protocol
and
> Go-back-N call for (5 retransmission of all 7 packets making up a full
3072
> bytes window). I do not understand why my code fails the test cases. The
> only thing I can notice is that ERTT is some junk value in client.retrans
> output (I don't know how it is called).
>

I don't have the details on those specific test cases.  Has anyone else come
across issues with these particular test cases?

> -myl
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Problem Set 2 #1
Date: Fri, 31 Jan 2003 20:46:09 -0800
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044074770 29802 128.12.85.0 (1 Feb 2003 04:46:10 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4245

It seems to me that the directions for 1b are a little redundant..
Draw a graph representing the topology of the first four routers in your
answer to part (a). Show the IP addresses of all the interfaces on the four
routers. For the first four router interfaces on the path to www.mit.edu,
try and determine their IP address and (where possible) their subnet mask.

Am I correct in what this asking: Draw a graph of the first four routers
labelled with the IP addresses and subnets of each of the interfaces.

This graph is nothing more than a sequence of nodes, correct?

--
____________________________________________
Rene Patnode
Stanford University

Computer Science
Phi Kappa Psi
Resident Assistant, Cardenal

"Mmm... unexplained bacon." - Homer Simpson


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: ifconfig/host
Date: Fri, 31 Jan 2003 21:14:50 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044076491 479 128.12.85.0 (1 Feb 2003 05:14:51 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4246

How can we use these commands to get the subnets of a given host? Using host
by itself on a router will give the IP addresses of all the interfaces, but
no information about the subnets. I tried reading the man pages for ifconfig
and host, but they weren't very helpful.

--
____________________________________________
Rene Patnode
Stanford University

Computer Science
Phi Kappa Psi
Resident Assistant, Cardenal

"Mmm... unexplained bacon." - Homer Simpson


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: ps2 q7
Date: Sat, 1 Feb 2003 07:46:50 +0000 (UTC)
Organization: Stanford University
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine25.stanford.edu
X-Trace: news.Stanford.EDU 1044085610 4604 171.64.15.100 (1 Feb 2003 07:46:50 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4247


I have looked throught the man pages for traceroute and there is no mention
of how to suppress the RTT for the intermediate routers. Am I allowed to
do something like traceroute ... | grep or something like that?
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: Re: ps2 q7
Date: Sat, 1 Feb 2003 07:59:36 +0000 (UTC)
Organization: Stanford University
Lines: 2
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine25.stanford.edu
X-Trace: news.Stanford.EDU 1044086376 4967 171.64.15.100 (1 Feb 2003 07:59:36 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4248


Sorry. Found in man page after all.
.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Test cases 2.K and 2.M
Date: Sat, 1 Feb 2003 04:05:24 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1044101095 10986 128.12.195.69 (1 Feb 2003 12:04:55 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4249

My code is failing for these two cases. I think the failure has to do with
my server trying to retransmit more than 5 times and closing the connection
thinking the network has failed (according to the specs). My server returns
a message "process_line: Broken pipe"

However, seems like this is causing the test script to skip report on the
two cases (Results: NOT TESTED).

Could someone please clarify what and how are these two cases tested and why
the expected behavior of my code (to close connection after 5 Go-Back-N
retransmissions) would fail the tests and make them skip?

Is anyone getting these two cases working?

Thanks.

-myl


.

Path: shelby.stanford.edu!not-for-mail
From: Tyson Condie 
Newsgroups: su.class.cs244a
Subject: Re: Test cases 2.K and 2.M
Date: Sat, 01 Feb 2003 08:26:28 -0800
Lines: 36
Distribution: su
Message-ID: 
References: 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1044116799 16611 127.0.0.1 (1 Feb 2003 16:26:39 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4250

Yesterday, I posted a message stating that I was having issues with test 
2.M.    This was the only test I was failing i.e. I was passing test 
2.K.  Well, apparently there was an issue/bug with test 2.M. After Matt 
corrected the bug in the test, I resubmitted the test and everything 
passed except tests 2.K and 2.M, which showed "NOT TESTED", just like 
your run. So in summary, I was passing 2.K and failing 2.M, then 
following the bug fix for test 2.M, I showed "NOT TESTED" for tests 2.K 
and 2.M.  I made 0 code changes between the two separate submissions.

Could we have someone look into this issue.

Thanks,
Tyson

Man Yu Lui wrote:
> My code is failing for these two cases. I think the failure has to do with
> my server trying to retransmit more than 5 times and closing the connection
> thinking the network has failed (according to the specs). My server returns
> a message "process_line: Broken pipe"
> 
> However, seems like this is causing the test script to skip report on the
> two cases (Results: NOT TESTED).
> 
> Could someone please clarify what and how are these two cases tested and why
> the expected behavior of my code (to close connection after 5 Go-Back-N
> retransmissions) would fail the tests and make them skip?
> 
> Is anyone getting these two cases working?
> 
> Thanks.
> 
> -myl
> 
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: ifconfig/host
Date: Sat, 1 Feb 2003 10:32:36 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044124425 19687 128.12.186.92 (1 Feb 2003 18:33:45 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4251

Look again in the man pages and make sure you understand how each command
can be used.  What those commands won't give you, see if you can derive
using all the information you know.

--Russ

"Rene Patnode"  wrote in message

> How can we use these commands to get the subnets of a given host? Using
host
> by itself on a router will give the IP addresses of all the interfaces,
but
> no information about the subnets. I tried reading the man pages for
ifconfig
> and host, but they weren't very helpful.
>
> --
> ____________________________________________
> Rene Patnode
> Stanford University
>
> Computer Science
> Phi Kappa Psi
> Resident Assistant, Cardenal
>
> "Mmm... unexplained bacon." - Homer Simpson
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Problem Set 2 #1
Date: Sat, 1 Feb 2003 10:40:59 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044124928 19864 128.12.186.92 (1 Feb 2003 18:42:08 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4252

Using the commands we provided, you will be able to ascertain the
interaction between the nodes in the graph.

--Russ

"Rene Patnode"  wrote in message

> It seems to me that the directions for 1b are a little redundant..
> Draw a graph representing the topology of the first four routers in your
> answer to part (a). Show the IP addresses of all the interfaces on the
four
> routers. For the first four router interfaces on the path to www.mit.edu,
> try and determine their IP address and (where possible) their subnet mask.
>
> Am I correct in what this asking: Draw a graph of the first four routers
> labelled with the IP addresses and subnets of each of the interfaces.
>
> This graph is nothing more than a sequence of nodes, correct?
>
> --
> ____________________________________________
> Rene Patnode
> Stanford University
>
> Computer Science
> Phi Kappa Psi
> Resident Assistant, Cardenal
>
> "Mmm... unexplained bacon." - Homer Simpson
>
>


.

Path: shelby.stanford.edu!elaine39.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Test cases 2.K and 2.M
Date: Sat, 1 Feb 2003 19:57:49 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine39.stanford.edu
X-Trace: news.Stanford.EDU 1044129469 21702 171.64.15.114 (1 Feb 2003 19:57:49 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4253

If you send me your code, I can take a look.  I looked at Tyson's code,
and explained via e-mail why it said "NOT TESTED" for him.  It works for the
transport.c's I've tested.

The program output used for the test case can be found in
grading_src/build/.network_log.retrans.server.TESTDATA.*

These logs are used to examine retransmission counts and determine whether
Go-back N was implemented correctly.

.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: ifconfig/host
Date: Sat, 1 Feb 2003 13:00:01 -0800
Lines: 39
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044133201 23491 128.12.85.0 (1 Feb 2003 21:00:01 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4254

ifconfig seems to be the utility that returns subnet masks. ifconfig takes
an interface name as its chief argument. However, host only returns IP
addresses. Where do we get the interface names from? I still don't see
anything about that in the man pages.

"Russell Greene"  wrote in message

> Look again in the man pages and make sure you understand how each command
> can be used.  What those commands won't give you, see if you can derive
> using all the information you know.
>
> --Russ
>
> "Rene Patnode"  wrote in message
> 
> > How can we use these commands to get the subnets of a given host? Using
> host
> > by itself on a router will give the IP addresses of all the interfaces,
> but
> > no information about the subnets. I tried reading the man pages for
> ifconfig
> > and host, but they weren't very helpful.
> >
> > --
> > ____________________________________________
> > Rene Patnode
> > Stanford University
> >
> > Computer Science
> > Phi Kappa Psi
> > Resident Assistant, Cardenal
> >
> > "Mmm... unexplained bacon." - Homer Simpson
> >
> >
>
>


.

Path: shelby.stanford.edu!saga7.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: Client hangs while server gives up on retransmitting.
Date: Sat, 1 Feb 2003 15:43:48 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044143028 27533 171.64.15.137 (1 Feb 2003 23:43:48 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4255

Let's say the client has transmitted all it wants/needs, and all
outstanding data has been ack'd.

The server is in the process of sending data. At some point, it
retransmits something too many times. Right now I have it calling an
"assert" for retransmitted too many times. Thus, it just stops.

At this point the client is a little confused, since it has called a
select statement with NO timeout since from it's perspective there isn't
anything to do. Is this wrong? Should it instead wait for 2* estRTT? For
if it did, then there still wouldn't be anything "ready" on the
application data socket, nor would the application data have been closed
at this point... so rather than poll needlessly, I hang.

How should the client know there isn't anything coming from the server and
that the server has terminated prematurely?

.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Client hangs while server gives up on retransmitting.
Date: Sun, 2 Feb 2003 00:46:19 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 38
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044146779 29385 171.64.15.112 (2 Feb 2003 00:46:19 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4256

In article 
Jonathan D Herbach   wrote:
>Let's say the client has transmitted all it wants/needs, and all
>outstanding data has been ack'd.
>
>The server is in the process of sending data. At some point, it
>retransmits something too many times. Right now I have it calling an
>"assert" for retransmitted too many times. Thus, it just stops.

Just dying seems a bit anti-social, since the server is making a
one-way trip to oblivion without telling the client.  How about
sending a FIN first, sort of like a good-bye letter?  :)

>
>At this point the client is a little confused, since it has called a
>select statement with NO timeout since from it's perspective there isn't
>anything to do. Is this wrong? Should it instead wait for 2* estRTT? For
>if it did, then there still wouldn't be anything "ready" on the
>application data socket, nor would the application data have been closed
>at this point... so rather than poll needlessly, I hang.

The client is waiting for expected data; it has no way to know
that the data will never come.  Waiting forever is not an
unreasonable action.

As a debugging step, you can try making your TX retry time longer,
or increasing the delay for the next retry by a larger-than-normal
amount.  This is one way to help you isolate "too many timeout"
problems.

SteveJ

>
>How should the client know there isn't anything coming from the server and
>that the server has terminated prematurely?
>


.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sat, 1 Feb 2003 19:45:47 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044157549 3889 171.64.15.77 (2 Feb 2003 03:45:49 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4257

On Sat, 1 Feb 2003, Matthew Jonathan Holliman wrote:

>
> >I'm a bit confused with question 2 in PS 2
> >what is the format of the forwarding table?
> >- the one used in lectures :
> >Prefix|Next-hop|Port  (slide 4/26)
> >so what do we use for next-hop?
>
> Yes, please use this format.  You can invent something reasonable for
> the next hop.

Then it seems I'm missing something here because I don't understand
the purpose of the question. You give us the prefixes and the ports
and want us to create a table with prefixes and ports. I don't get
it.
If I understand correctly, the router will always select the most
specific route first so a table like

Prefix         |    Next-Hop      | Port
-----------------------------------------
119.12.73/24   |  119.12.73.x     |   1
119.12.64/18   |       y          |   2
Default        |       z          |   3


where x is in [1,254]
y is any address in 119.12.64/18 that is not in 119.12.73/24
and z is any address not in 119.12.64/18

will suffice, but then I don't see the point of the exercise.
Can anyone enlighten me?

Thanks
Rafa


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sun, 2 Feb 2003 04:09:14 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 19
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044158954 4396 171.64.15.112 (2 Feb 2003 04:09:14 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4258


The point of the exercise is to demonstrate your understanding
of longest prefix/shortest prefix addressing as used in CIDR.

SteveJ

>
>>
>> >I'm a bit confused with question 2 in PS 2
[ . . . ]
but then I don't see the point of the exercise.
>Can anyone enlighten me?
>
>Thanks
>Rafa
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sat, 1 Feb 2003 20:20:41 -0800
Lines: 45
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044159642 4899 128.12.85.0 (2 Feb 2003 04:20:42 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4259

When it comes to picking reasonable values for next hop, are we assuming
that the ports lead directly to the networks in question or lead by a direct
link to a router in those networks?

"Rafael M Hernandez"  wrote in message

> On Sat, 1 Feb 2003, Matthew Jonathan Holliman wrote:
>
> >
> > >I'm a bit confused with question 2 in PS 2
> > >what is the format of the forwarding table?
> > >- the one used in lectures :
> > >Prefix|Next-hop|Port  (slide 4/26)
> > >so what do we use for next-hop?
> >
> > Yes, please use this format.  You can invent something reasonable for
> > the next hop.
>
> Then it seems I'm missing something here because I don't understand
> the purpose of the question. You give us the prefixes and the ports
> and want us to create a table with prefixes and ports. I don't get
> it.
> If I understand correctly, the router will always select the most
> specific route first so a table like
>
> Prefix         |    Next-Hop      | Port
> -----------------------------------------
> 119.12.73/24   |  119.12.73.x     |   1
> 119.12.64/18   |       y          |   2
> Default        |       z          |   3
>
>
> where x is in [1,254]
> y is any address in 119.12.64/18 that is not in 119.12.73/24
> and z is any address not in 119.12.64/18
>
> will suffice, but then I don't see the point of the exercise.
> Can anyone enlighten me?
>
> Thanks
> Rafa
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sun, 2 Feb 2003 07:22:44 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 11
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044170564 9487 171.64.15.112 (2 Feb 2003 07:22:44 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4260

I don't follow your question.  Please elaborate, and let
me know which question you are asking about.

SteveJ

In article 
Rene Patnode  wrote:
>When it comes to picking reasonable values for next hop, are we assuming
>that the ports lead directly to the networks in question or lead by a direct
>link to a router in those networks?
>
.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sun, 2 Feb 2003 04:02:48 -0800
Lines: 30
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044187369 16279 128.12.85.0 (2 Feb 2003 12:02:49 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4261

I'm asking about the question which is the topic of this thread...

When Rafael asked about what the entries should be for the next hops,
Matthew responded and said to pick something reasonable. However what is
reasonable depends on whether the ports in question (1,2, or 3) lead
directly to the networks in question (X or Y)-- that is, the router has an
interface on that network--or if the ports lead to peer to peer links with
other routers that do lie in those networks. In the former case, it seems as
though the port itself would be the next hop, but in the latter, we have to
invent an IP address in some other network.

Also, would it be possible to get a response to my previous question about
ifconfig?

"Steve Jacobson"  wrote in message

> I don't follow your question.  Please elaborate, and let
> me know which question you are asking about.
>
> SteveJ
>
> In article 
> Rene Patnode  wrote:
> >When it comes to picking reasonable values for next hop, are we assuming
> >that the ports lead directly to the networks in question or lead by a
direct
> >link to a router in those networks?
> >


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sun, 2 Feb 2003 20:43:02 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 51
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044218582 28400 171.64.15.112 (2 Feb 2003 20:43:02 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4262

I don't see what difference it could make, attaching directly
to the destination network or attaching to an additional router.

Under normal circumstances, a router does not change either IP address
(or port number) in the IP header.  Those values remain constant from
one end of an internet to the other.  You can assume normal circumstances
here.

The router in question is responsible for forwarding packets it
receives to the correct ports.  Whether the network of interest is
directly attached this router does not affect this router's behavior
(or the contents of its routing table) at all.

Which ifconfig question remains unanswered?

SteveJ

In article 
Rene Patnode  wrote:
>I'm asking about the question which is the topic of this thread...
>
>When Rafael asked about what the entries should be for the next hops,
>Matthew responded and said to pick something reasonable. However what is
>reasonable depends on whether the ports in question (1,2, or 3) lead
>directly to the networks in question (X or Y)-- that is, the router has an
>interface on that network--or if the ports lead to peer to peer links with
>other routers that do lie in those networks. In the former case, it seems as
>though the port itself would be the next hop, but in the latter, we have to
>invent an IP address in some other network.
>
>Also, would it be possible to get a response to my previous question about
>ifconfig?
>
>"Steve Jacobson"  wrote in message

>> I don't follow your question.  Please elaborate, and let
>> me know which question you are asking about.
>>
>> SteveJ
>>
>> In article 
>> Rene Patnode  wrote:
>> >When it comes to picking reasonable values for next hop, are we assuming
>> >that the ports lead directly to the networks in question or lead by a
>direct
>> >link to a router in those networks?
>> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Sun, 2 Feb 2003 13:00:08 -0800
Lines: 78
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044219612 28783 128.12.85.0 (2 Feb 2003 21:00:12 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4263

I guess you're not understanding my question then:

In the routing table as depicted in class, there is a next hop IP address,
which signifies the IP address of the next router on the path to the
destination. Therefore it is important whether the router is attached
directly to the network, because if it is then there is no next hop, but if
it isn't, we have have to construct an imaginary network for the link that
lies between the this router and the next hop. It is this next hop IP
address that I am asking about.

My previous question is:
ifconfig seems to be the utility that returns subnet masks. ifconfig takes
an interface name as its chief argument. However, host only returns IP
addresses. Where do we get the interface names from? I still don't see
anything about that in the man pages.


"Steve Jacobson"  wrote in message

> I don't see what difference it could make, attaching directly
> to the destination network or attaching to an additional router.
>
> Under normal circumstances, a router does not change either IP address
> (or port number) in the IP header.  Those values remain constant from
> one end of an internet to the other.  You can assume normal circumstances
> here.
>
> The router in question is responsible for forwarding packets it
> receives to the correct ports.  Whether the network of interest is
> directly attached this router does not affect this router's behavior
> (or the contents of its routing table) at all.
>
> Which ifconfig question remains unanswered?
>
> SteveJ
>
> In article 
> Rene Patnode  wrote:
> >I'm asking about the question which is the topic of this thread...
> >
> >When Rafael asked about what the entries should be for the next hops,
> >Matthew responded and said to pick something reasonable. However what is
> >reasonable depends on whether the ports in question (1,2, or 3) lead
> >directly to the networks in question (X or Y)-- that is, the router has
an
> >interface on that network--or if the ports lead to peer to peer links
with
> >other routers that do lie in those networks. In the former case, it seems
as
> >though the port itself would be the next hop, but in the latter, we have
to
> >invent an IP address in some other network.
> >
> >Also, would it be possible to get a response to my previous question
about
> >ifconfig?
> >
> >"Steve Jacobson"  wrote in message
> 
> >> I don't follow your question.  Please elaborate, and let
> >> me know which question you are asking about.
> >>
> >> SteveJ
> >>
> >> In article 
> >> Rene Patnode  wrote:
> >> >When it comes to picking reasonable values for next hop, are we
assuming
> >> >that the ports lead directly to the networks in question or lead by a
> >direct
> >> >link to a router in those networks?
> >> >
> >
> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Problem Set 2 #6
Date: Sun, 2 Feb 2003 15:46:19 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044229581 3856 128.12.85.0 (2 Feb 2003 23:46:21 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4264

For part b, do we tell traceroute to use ten packets per query AND calculate
the average rtt, or to use ten packets per query and then we calculate the
average rtt ourselves. I see a -S option in the man pages, but it doesn't
seem to do exactly what we want it to do.

For parts d through f, how should we estimate distance? Do we just take half
of the average rtt, and divide through by the speed of light? Or do we have
to take into a account other things as well?

--
____________________________________________
Rene Patnode
Stanford University

Computer Science
Phi Kappa Psi
Resident Assistant, Cardenal

"Mmm... unexplained bacon." - Homer Simpson


.

Path: shelby.stanford.edu!not-for-mail
From: Peter Lai 
Newsgroups: su.class.cs244a
Subject: Go-back-N numbers
Date: Sun, 02 Feb 2003 15:46:20 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: peetah.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1044229583 3789 128.12.187.58 (2 Feb 2003 23:46:23 GMT)
X-Complaints-To: 
X-Newsreader: Forte Agent 1.91/32.564
Xref: shelby.stanford.edu su.class.cs244a:4265


	I think I recall someone asking something similar, but I can't
seem to find the post, so sorry in advance if I'm asking something
really stupid. Anyways, do you have to coalesce packets when you
"Go-back-N?" That is, if I have five one-hundred-byte packets that
were transmitted and the first one timed out, do I re-transmit all
five one-hundred byte packets or do I have to coalesce them into one
packet? And if I do the latter, is the # of times retransmitted then
initialized to the # of times I retransmitted the first one?
.

Path: shelby.stanford.edu!not-for-mail
From: Susan Noreen Shepard 
Newsgroups: su.class.cs244a
Subject: Re: Problem Set 2 #6
Date: Mon, 3 Feb 2003 01:06:05 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine26.stanford.edu
X-Trace: news.Stanford.EDU 1044234365 6534 171.64.15.101 (3 Feb 2003 01:06:05 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:4266

I have another distance question about 6b:
When it says to estimate the distance across the Atlantic Ocean, are we
just supposed to calculate the distance from the East coast of the USA to
England or the distance from Stanford to Cambridge?  I'm assuming it's the
first intrepretation.

Susan
.

Path: shelby.stanford.edu!saga14.Stanford.EDU!priyank9
From: Priyank Kshitij Patel 
Newsgroups: su.class.cs244a
Subject: strange test results
Date: Sun, 2 Feb 2003 17:28:39 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044235721 7307 171.64.15.144 (3 Feb 2003 01:28:41 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4267

Hi,

I ran my program on the test script for hw2b and it strangely passes all
tests except

student transmitter against student receiver!!!!

My receiver passes the test against the ref. transmitter and viceversa.
This is strange, because before submitting my code for the test, the only
test wich i made was
my transmitter against my receiver, which is running fine.
The test script however does something which causes my program to hang.

I was wondering if you guys are using another versiioon of the unreliable
network.c while testing.. If yes, could you please let me know how is it
different from the network.c provided to us.

Priyank

.

Path: shelby.stanford.edu!saga14.Stanford.EDU!rmortam
From: Rhea Sherman Mortam 
Newsgroups: su.class.cs244a
Subject: Re: Packets with overlapping data?
Date: Sun, 2 Feb 2003 19:10:29 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044241835 10606 171.64.15.144 (3 Feb 2003 03:10:35 GMT)
X-Complaints-To: 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4268

> > For example, we may have two packets in receiver's buffer.
> >
> > Packet #1: th_seq = 100, data_len = 20;
> > Packet #2: th_seq = 150, data_len = 50;
> >
> > then here comes a packet #3 with th_seq = 110 and data_len = 250, which
> > partially overlapped with packet #1 and completely contains packet #2.
> >
> > If we must take care of packets with overlapping data, shall we honor the
> > data from earlier packets or the latest packets?
> >
>
> Assuming that you are aligning sequence numbers, the overlapping data from
> the two packets will be identical.

Hmm, I don't quite get it. Do we make new packets in the receiver's
buffer:

Packet #3: th_seq = 120, data_len = 30;
Packet #4: th_seq = 200, data_len = 160;

or do we ignore the packet?

thanks

.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Re: strange test results
Date: Sun, 2 Feb 2003 21:19:31 -0800
Lines: 29
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1044249533 14061 128.12.195.69 (3 Feb 2003 05:18:53 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4269

I am having the same problem. Testing my own transimtter against my own
receiver works fine, but when it is checked by case 2.J it always fails.

-myl


"Priyank Kshitij Patel"  wrote in message

> Hi,
>
> I ran my program on the test script for hw2b and it strangely passes all
> tests except
>
> student transmitter against student receiver!!!!
>
> My receiver passes the test against the ref. transmitter and viceversa.
> This is strange, because before submitting my code for the test, the only
> test wich i made was
> my transmitter against my receiver, which is running fine.
> The test script however does something which causes my program to hang.
>
> I was wondering if you guys are using another versiioon of the unreliable
> network.c while testing.. If yes, could you please let me know how is it
> different from the network.c provided to us.
>
> Priyank
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem set #2 Question 2
Date: Mon, 3 Feb 2003 05:34:11 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 77
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044250451 14509 171.64.15.112 (3 Feb 2003 05:34:11 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4270

I understand the confustion now.

The IP addresses in the IP packet header remain constant from
source to destination.  This is true whether the packet passes
through 0 routers, or through 100.

Assuming the packet is not fragmented, the only fields a router
will change in the IP header are the TTL and the checksum.  Even
if fragmentation occurs, the IP addresses are never changed.

(An exception:  NAT [network address translation] which is an
abnormal circumstance, and is _way_ beyond the scope of this
question.  We will mention NAT later in the course.)

You may be thinking of the link layer addresses, which do change
for every hop a packet takes.  However, those are in the data link
layer header, so they are not relevant to this question.

Correction to an error below:  I mentioned that the "port number
in the IP header" never changes.  There is no port number in the
IP header.  Nothing in the payload of an IP packet is changed by a
router.  So, if that payload happens to be a UDP datagram, nothing
in that datagram is changed by a router, including the port number
in the header.


In article 
Rene Patnode  wrote:
>I guess you're not understanding my question then:
>
>In the routing table as depicted in class, there is a next hop IP address,
>which signifies the IP address of the next router on the path to the
>destination. Therefore it is important whether the router is attached
>directly to the network, because if it is then there is no next hop, but if
>it isn't, we have have to construct an imaginary network for the link that
>lies between the this router and the next hop. It is this next hop IP
>address that I am asking about.
>
>My previous question is:
>ifconfig seems to be the utility that returns subnet masks. ifconfig takes
>an interface name as its chief argument. However, host only returns IP
>addresses. Where do we get the interface names from? I still don't see
>anything about that in the man pages.

host can do either a DNS or a reverse DNS lookup.  That is, given a name
it can return the IP address associated with that name.  Given an IP address,
it can return the hostname associated with that address.  Look at the man
page and do some experimentation with the options.

Keep in mind that host can only return information known to the DNS system.
I don't think the ports of a router have names that are different from the
name of the router itself.  If anyone knows differently, please correct me.
Also, if DNS does not know of a name associated with an IP address, the host
command can't give you a name.

SteveJ

>
>
>"Steve Jacobson"  wrote in message

>> I don't see what difference it could make, attaching directly
>> to the destination network or attaching to an additional router.
>>
>> Under normal circumstances, a router does not change either IP address
>> (or port number) in the IP header.  Those values remain constant from
>> one end of an internet to the other.  You can assume normal circumstances
>> here.
>>
>> The router in question is responsible for forwarding packets it
>> receives to the correct ports.  Whether the network of interest is
>> directly attached this router does not affect this router's behavior
>> (or the contents of its routing table) at all.
>>
>> Which ifconfig question remains unanswered?
>>
>> SteveJ
.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem Set 2 #6
Date: Mon, 3 Feb 2003 05:41:18 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044250878 14717 171.64.15.112 (3 Feb 2003 05:41:18 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4271

In article 
Rene Patnode  wrote:
>For part b, do we tell traceroute to use ten packets per query AND calculate
>the average rtt, or to use ten packets per query and then we calculate the
>average rtt ourselves. I see a -S option in the man pages, but it doesn't
>seem to do exactly what we want it to do.

I haven't tried the -S option; certainly you can calculate the
average RTT yourself from the values supplied by traceroute.

>
>For parts d through f, how should we estimate distance? Do we just take half
>of the average rtt, and divide through by the speed of light? Or do we have
>to take into a account other things as well?

Clearly you can't obtain a super-accurate estimate from traceroute,
but you should be able to derive an upper bound on distance from
the information it provides.

SteveJ

>
>--
>____________________________________________
>Rene Patnode
>Stanford University
>
>Computer Science
>Phi Kappa Psi
>Resident Assistant, Cardenal
>
>"Mmm... unexplained bacon." - Homer Simpson
>
>


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Go-back-N numbers
Date: Mon, 3 Feb 2003 05:55:04 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044251704 15387 171.64.15.112 (3 Feb 2003 05:55:04 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4272

My understanding is that coalescing packets is "nicer," but is
not a requirement.

If you do coalesce, then counting retransmissions becomes a bit
more complex.  I suggest that you "do something reasonable"
and document it.  Other TAs, any comments?

SteveJ

In article 
Peter Lai   wrote:
>
>	I think I recall someone asking something similar, but I can't
>seem to find the post, so sorry in advance if I'm asking something
>really stupid. Anyways, do you have to coalesce packets when you
>"Go-back-N?" That is, if I have five one-hundred-byte packets that
>were transmitted and the first one timed out, do I re-transmit all
>five one-hundred byte packets or do I have to coalesce them into one
>packet? And if I do the latter, is the # of times retransmitted then
>initialized to the # of times I retransmitted the first one?


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Problem Set 2 #6
Date: Mon, 3 Feb 2003 05:56:19 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 15
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044251779 15415 171.64.15.112 (3 Feb 2003 05:56:19 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4273

Yes, the first interpretation.

SteveJ

In article 
Susan Noreen Shepard   wrote:
>I have another distance question about 6b:
>When it says to estimate the distance across the Atlantic Ocean, are we
>just supposed to calculate the distance from the East coast of the USA to
>England or the distance from Stanford to Cambridge?  I'm assuming it's the
>first intrepretation.
>
>Susan


.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Packets with overlapping data?
Date: Mon, 3 Feb 2003 06:22:12 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 55
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine37.stanford.edu
X-Trace: news.Stanford.EDU 1044253332 16345 171.64.15.112 (3 Feb 2003 06:22:12 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4274

Comments below:

In article 
Rhea Sherman Mortam   wrote:
>> > For example, we may have two packets in receiver's buffer.
>> >
>> > Packet #1: th_seq = 100, data_len = 20;
>> > Packet #2: th_seq = 150, data_len = 50;
>> >
>> > then here comes a packet #3 with th_seq = 110 and data_len = 250, which
>> > partially overlapped with packet #1 and completely contains packet #2.
>> >
>> > If we must take care of packets with overlapping data, shall we honor the
>> > data from earlier packets or the latest packets?
>> >
>>
>> Assuming that you are aligning sequence numbers, the overlapping data from
>> the two packets will be identical.
>
>Hmm, I don't quite get it. Do we make new packets in the receiver's
>buffer:
>
>Packet #3: th_seq = 120, data_len = 30;
>Packet #4: th_seq = 200, data_len = 160;
>
>or do we ignore the packet?
>
>thanks
>

Let me elaborate on your original question:

>> > Packet #1: th_seq = 100, data_len = 20;
>> > Packet #2: th_seq = 150, data_len = 50;
>> >
>> > then here comes:

     packet #3 with th_seq = 110 and data_len = 250, which

When duplicate data arrives, you only need to retain one
copy.  Since the data is supposed to be the same for each
duplicated byte, which copy you save is really the designer's
(your) choice.  How you store the data before sending it up to
the application is also up to you.  You want to strive for a
clean solution that is easy to understand and debug.

Conceptually, you have one contiguous block of bytes from
100 to 360, inclusive.  How you manage the actual bytes depends
on your transport design.

You cannot ignore the third packet, because it contains bytes
[121, 149] and [201, 360], which you did not previously have.

SteveJ

.

Path: shelby.stanford.edu!saga19.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: Is my STCP impelmentation reliable enough?
Date: Sun, 2 Feb 2003 22:36:42 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044254203 16670 171.64.15.149 (3 Feb 2003 06:36:43 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4275

When I use my test my code with some "large" (>800k) files, I inevitably
break down when I've retransmitted the alloted amount. Since I can't
transfer large files, I would think that my implementation isn't "good
enough" -- especially for part c, since then I might be transferring large
files pretty consistently.

That said, when I ran the test suite, the summary screen says "OK" for all
the tests, even though when I look at the output scrolling above, it often
shows my assert(0 && "Retransmitted too many times"). Should I assume that
this behavior is okay?



.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Calculating the RTT and truncated packets
Date: Sun, 2 Feb 2003 22:36:11 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine25.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044254227 16678 171.64.15.100 (3 Feb 2003 06:37:07 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4276

Hi,
1.) If a sender sends packets with sequences 100, 200, 300, 400 and
receives ACK=400, (assuming the ACKs for 1st, and 2nd packet are lost) the
only packet it can use in order to
calculate the new RTT is packet with sequence 300, is that correct?

2.) It says in the assignment that we have to be careful with packets
that may fall partially into our window but I'm wondering in what
cases do this occur. I understand that a packet may cross our
window left side if it has been retransmitted/duplicated but I
don't understand the case of a packet ever crossing our right border.
The sender has to take care never to cross that border so why should the
receiver care about that case? It should not happen in the first place.

If there is such a case then I guess the behavior is to ack
up to our right side and discard the rest of the data but then what
does it mean to ACK half of a packet? how can the sender calculate
any RTT out of half a packet being acknowledged?
Do we have to take care of the case the receiver acknowledging only half
of the data we send in a packet?.

Thanks
Rafa


.

Path: shelby.stanford.edu!saga19.Stanford.EDU!jherbach
From: Jonathan D Herbach 
Newsgroups: su.class.cs244a
Subject: Re: Calculating the RTT and truncated packets
Date: Sun, 2 Feb 2003 22:51:12 -0800
Lines: 38
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044255073 17177 171.64.15.149 (3 Feb 2003 06:51:13 GMT)
X-Complaints-To: 
To: Rafael M Hernandez 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4277

> 1.) If a sender sends packets with sequences 100, 200, 300, 400 and
> receives ACK=400, (assuming the ACKs for 1st, and 2nd packet are lost) the
> only packet it can use in order to
> calculate the new RTT is packet with sequence 300, is that correct?

I'm curious as to the TAs, but here was what I thought:

Option one: use the ACK400 as a determination of the seq300 packet, and
that's a decent round trip.

Option two: Use the ACK400 to sample RTT for seg100, seg200, and seg300.
Why? Assuming no retransmissions on my part, I don't actually know if the
seg300 was the last to be received. Perhpas the others were ... and thus
the "congestion" in the network that caused out-of-order arrival would
be factored into my computation of a new estimatee for RTT. Of course, I'd
be careful *not* to allow a retransmission for seg100 or seg200 to be used
to update the estimate.

I chose option two. Is that bad?


> 2.) It says in the assignment that we have to be careful with packets
> that may fall partially into our window but I'm wondering in what
> cases do this occur. I understand that a packet may cross our
> window left side if it has been retransmitted/duplicated but I
> don't understand the case of a packet ever crossing our right border.
> The sender has to take care never to cross that border so why should the
> receiver care about that case? It should not happen in the first place.
Yep. But a sender might, and it's probably good to be caseful of that.

> If there is such a case then I guess the behavior is to ack
> up to our right side and discard the rest of the data but then what
> does it mean to ACK half of a packet? how can the sender calculate
> any RTT out of half a packet being acknowledged?
Don't think of ACKing packets ... think of ACKing data. As for the sender,
s/he shouldn't ever send beyond the receiver window (as above "it should
not happen in the first place") so don't worry about that in your code! :)

.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Re: Calculating the RTT and truncated packets
Date: Sun, 2 Feb 2003 23:12:02 -0800
Lines: 61
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine25.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044256324 18042 171.64.15.100 (3 Feb 2003 07:12:04 GMT)
X-Complaints-To: 
To: Jonathan D Herbach 
In-Reply-To: 
Xref: shelby.stanford.edu su.class.cs244a:4278

On Sun, 2 Feb 2003, Jonathan D Herbach wrote:

> > 1.) If a sender sends packets with sequences 100, 200, 300, 400 and
> > receives ACK=400, (assuming the ACKs for 1st, and 2nd packet are lost) the
> > only packet it can use in order to
> > calculate the new RTT is packet with sequence 300, is that correct?
>
> I'm curious as to the TAs, but here was what I thought:
>
> Option one: use the ACK400 as a determination of the seq300 packet, and
> that's a decent round trip.
>
> Option two: Use the ACK400 to sample RTT for seg100, seg200, and seg300.
> Why? Assuming no retransmissions on my part, I don't actually know if the
> seg300 was the last to be received. Perhpas the others were ... and thus
> the "congestion" in the network that caused out-of-order arrival would
> be factored into my computation of a new estimatee for RTT. Of course, I'd
> be careful *not* to allow a retransmission for seg100 or seg200 to be used
> to update the estimate.
>
> I chose option two. Is that bad?
>

Actually, there's a third option:
According to Steven's 'TCP/IP Illustrated, Volume 1. The protocols"
the RTT is measured between sending a byte with a particular sequence
number and receiving and ACK that covers that sequence number. Therefore
TCP will use as RTT the time between sending packet with seq # 100 and
receiving the ACK=400.
But I don't know if this is the behavior expected for our STCP or
if it is either options one or two.


>
> > 2.) It says in the assignment that we have to be careful with packets
> > that may fall partially into our window but I'm wondering in what
> > cases do this occur. I understand that a packet may cross our
> > window left side if it has been retransmitted/duplicated but I
> > don't understand the case of a packet ever crossing our right border.
> > The sender has to take care never to cross that border so why should the
> > receiver care about that case? It should not happen in the first place.
> Yep. But a sender might, and it's probably good to be caseful of that.
>
> > If there is such a case then I guess the behavior is to ack
> > up to our right side and discard the rest of the data but then what
> > does it mean to ACK half of a packet? how can the sender calculate
> > any RTT out of half a packet being acknowledged?
> Don't think of ACKing packets ... think of ACKing data. As for the sender,
> s/he shouldn't ever send beyond the receiver window (as above "it should
> not happen in the first place") so don't worry about that in your code! :)
>

I'm thinking about packets because for STCP we have always been
talking about packets in order to calculate RTTs.
And, also, because we still don't have an answer regarding coalescing
of packets and what should we do about retransmissions. If you coalesce
data that was retransmitted with data that was not and send it in a new
packet, what is the retransmission status for that packet?

Rafa

.

Path: shelby.stanford.edu!not-for-mail
From: "Akash Jain" 
Newsgroups: su.class.cs244a
Subject: problem 6, part g
Date: Sun, 02 Feb 2003 23:12:07 -0800
Organization: Stanford University
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: dnab40e3f2.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: news.Stanford.EDU 1044256330 18047 171.64.227.242 (3 Feb 2003 07:12:10 GMT)
X-Complaints-To: 
User-Agent: Pan/0.13.0 (The whole remains beautiful)
Xref: shelby.stanford.edu su.class.cs244a:4279

the router:
bas1-m.pao.yahoo.com doesn't seem to exist (host it)

i tried using:
base1-m.dcn.yahoo.com but that returns a !S - source routing error
somewhere in the level3 net path...
what should we do?
-aki-
.

Path: shelby.stanford.edu!not-for-mail
From: "Metha Jeeradit" 
Newsgroups: su.class.cs244a
Subject: Re: problem 6, part g
Date: Mon, 3 Feb 2003 00:04:37 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: ithaca.stanford.edu
X-Trace: news.Stanford.EDU 1044259488 19513 128.12.181.52 (3 Feb 2003 08:04:48 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4280

comment: but the ip address given seems to work though and if you host that
it does give bas1-m.pao.yahoo.com...

Metha

"Akash Jain"  wrote in message

> the router:
> bas1-m.pao.yahoo.com doesn't seem to exist (host it)
>
> i tried using:
> base1-m.dcn.yahoo.com but that returns a !S - source routing error
> somewhere in the level3 net path...
> what should we do?
> -aki-


.

Path: shelby.stanford.edu!not-for-mail
From: Dale Neal 
Newsgroups: su.class.cs244a
Subject: Re: problem 6, part g
Date: Mon, 03 Feb 2003 00:07:47 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: masamune.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1044259680 19567 128.12.110.70 (3 Feb 2003 08:08:00 GMT)
X-Complaints-To: 
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:4281

Hmm... it existed for me just two days ago. I could never get the 
traceroute to go all the way to www.eecs.berkeley.edu, though. It would 
get stopped one or two routers short. At 
evans-soda-br-5-4.EECS.Berkeley.EDU to be precise. Does anybody else 
have this problem?

Akash Jain wrote:
> the router:
> bas1-m.pao.yahoo.com doesn't seem to exist (host it)
> 
> i tried using:
> base1-m.dcn.yahoo.com but that returns a !S - source routing error
> somewhere in the level3 net path...
> what should we do?
> -aki-


.

Path: shelby.stanford.edu!not-for-mail
From: "Metha Jeeradit" 
Newsgroups: su.class.cs244a
Subject: A couple of questions on problem set 2
Date: Mon, 3 Feb 2003 00:19:18 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: ithaca.stanford.edu
X-Trace: news.Stanford.EDU 1044260369 20420 128.12.181.52 (3 Feb 2003 08:19:29 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4282

Regarding #1:

After reading the previous posts on ifconfig (and the man page on it), I'm
still confused as to how to use it properly.  It seems to me that ifconfig
can only give statistics on the interface for the local machine that you are
on, is this correct? If so, how are we supposed to determine the statistics
(I have the netmask in mind)  for the other 3 routers en route to
www.mit.edu?

Regarding #5:

What does "from every other router" mean?  Are we supposed to skip some
nodes when running the algorithm?  Or does it mean every nodes except the
node 7?

Thanks!

Metha


.

Path: shelby.stanford.edu!not-for-mail
From: "Metha Jeeradit" 
Newsgroups: su.class.cs244a
Subject: Re: problem 6, part g
Date: Mon, 3 Feb 2003 00:24:41 -0800
Lines: 27
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: ithaca.stanford.edu
X-Trace: news.Stanford.EDU 1044260692 20536 128.12.181.52 (3 Feb 2003 08:24:52 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4283

You mean traceroute from the yahoo's router to eecs.berkeley right? (because
it seems to work fine from elaine) If so, I have this same problem, but I
guess we can determine where it should go next after that, since the routing
entry for www.eecs.berkeley.edu at that node should be the same (in steady
state) no matter where you come from, right?

"Dale Neal"  wrote in message

> Hmm... it existed for me just two days ago. I could never get the
> traceroute to go all the way to www.eecs.berkeley.edu, though. It would
> get stopped one or two routers short. At
> evans-soda-br-5-4.EECS.Berkeley.EDU to be precise. Does anybody else
> have this problem?
>
> Akash Jain wrote:
> > the router:
> > bas1-m.pao.yahoo.com doesn't seem to exist (host it)
> >
> > i tried using:
> > base1-m.dcn.yahoo.com but that returns a !S - source routing error
> > somewhere in the level3 net path...
> > what should we do?
> > -aki-
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: A couple of questions on problem set 2
Date: Mon, 3 Feb 2003 00:34:42 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044261352 20754 128.12.186.92 (3 Feb 2003 08:35:52 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4284


>
> Regarding #5:
>
> What does "from every other router" mean?  Are we supposed to skip some
> nodes when running the algorithm?  Or does it mean every nodes except the
> node 7?


The bellman-ford algorithm is a distributed algorithm meaning node R1 will
know the distances to every other node in the network (including its
distance to R7).

In order to answer the question, we will have to look at the global state of
the bellman-ford algorithm because we want to know for all nodes, the
distance for each of them to route a packet to R7.


>
> Thanks!
>
> Metha
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Is my STCP impelmentation reliable enough?
Date: Mon, 3 Feb 2003 00:37:24 -0800
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044261514 20783 128.12.186.92 (3 Feb 2003 08:38:34 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4285

Are other people seeing this behavior?  I think the transport layer should
be able to handle more than 800k without giving out.  As you pointed out,
while you might pass the tests for part b, part c will involve transferring
large files.

--Russ

"Jonathan D Herbach"  wrote in message

> When I use my test my code with some "large" (>800k) files, I inevitably
> break down when I've retransmitted the alloted amount. Since I can't
> transfer large files, I would think that my implementation isn't "good
> enough" -- especially for part c, since then I might be transferring large
> files pretty consistently.
>
> That said, when I ran the test suite, the summary screen says "OK" for all
> the tests, even though when I look at the output scrolling above, it often
> shows my assert(0 && "Retransmitted too many times"). Should I assume that
> this behavior is okay?
>
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Go-back-N numbers
Date: Mon, 3 Feb 2003 01:04:21 -0800
Lines: 32
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044263132 21394 128.12.186.92 (3 Feb 2003 09:05:32 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4286

There is no coalescing requirement in the assignment.  I agree with Steve
that the solution with coalescing packets is nicer but you should make sure
you have retransmissions working AS IS before attempting anything fancy.

--Russ

"Steve Jacobson"  wrote in message

> My understanding is that coalescing packets is "nicer," but is
> not a requirement.
>
> If you do coalesce, then counting retransmissions becomes a bit
> more complex.  I suggest that you "do something reasonable"
> and document it.  Other TAs, any comments?
>
> SteveJ
>
> In article 
> Peter Lai   wrote:
> >
> > I think I recall someone asking something similar, but I can't
> >seem to find the post, so sorry in advance if I'm asking something
> >really stupid. Anyways, do you have to coalesce packets when you
> >"Go-back-N?" That is, if I have five one-hundred-byte packets that
> >were transmitted and the first one timed out, do I re-transmit all
> >five one-hundred byte packets or do I have to coalesce them into one
> >packet? And if I do the latter, is the # of times retransmitted then
> >initialized to the # of times I retransmitted the first one?
>
>


.

Path: shelby.stanford.edu!saga1.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Is my STCP impelmentation reliable enough?
Date: Mon, 3 Feb 2003 19:36:38 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga1.stanford.edu
X-Trace: news.Stanford.EDU 1044300998 8011 171.64.15.131 (3 Feb 2003 19:36:38 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4287

As Russ pointed out in a later post, you do want your implementation
to be solid for large file transfers.

The triggering of your assert during the tests does not sound good.
I'm surprised it doesn't lead to a failure to move data, which would
cause a script failure.

As an experiment, you can try increasing your retry intervals.  If
this doesn't change the problem, then you may have a subtle bug
in your code.

SteveJ
 
In article 
Jonathan D Herbach   wrote:
>When I use my test my code with some "large" (>800k) files, I inevitably
>break down when I've retransmitted the alloted amount. Since I can't
>transfer large files, I would think that my implementation isn't "good
>enough" -- especially for part c, since then I might be transferring large
>files pretty consistently.
>
>That said, when I ran the test suite, the summary screen says "OK" for all
>the tests, even though when I look at the output scrolling above, it often
>shows my assert(0 && "Retransmitted too many times"). Should I assume that
>this behavior is okay?
>
>
>


.

Path: shelby.stanford.edu!saga1.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Calculating the RTT and truncated packets
Date: Mon, 3 Feb 2003 19:43:01 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 48
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga1.stanford.edu
X-Trace: news.Stanford.EDU 1044301381 8318 171.64.15.131 (3 Feb 2003 19:43:01 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4288

In article 
Rafael M Hernandez   wrote:
>Hi,
>1.) If a sender sends packets with sequences 100, 200, 300, 400 and
>receives ACK=400, (assuming the ACKs for 1st, and 2nd packet are lost) the
>only packet it can use in order to
>calculate the new RTT is packet with sequence 300, is that correct?

That would give you the most accurate value.

>
>2.) It says in the assignment that we have to be careful with packets
>that may fall partially into our window but I'm wondering in what
>cases do this occur. I understand that a packet may cross our
>window left side if it has been retransmitted/duplicated but I
>don't understand the case of a packet ever crossing our right border.
>The sender has to take care never to cross that border so why should the
>receiver care about that case? It should not happen in the first place.

You should not assume that the transmitter will follow the rules
when you design your receiver.  

>
>If there is such a case then I guess the behavior is to ack
>up to our right side and discard the rest of the data 

Yes.

 but then what
>does it mean to ACK half of a packet? how can the sender calculate
>any RTT out of half a packet being acknowledged?

Do something reasonable and document it.

>Do we have to take care of the case the receiver acknowledging only half
>of the data we send in a packet?.

Yes.

SteveJ

>
>Thanks
>Rafa
>
>


.

Path: shelby.stanford.edu!saga1.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: Calculating the RTT and truncated packets
Date: Mon, 3 Feb 2003 19:47:59 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 53
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga1.stanford.edu
X-Trace: news.Stanford.EDU 1044301679 8469 171.64.15.131 (3 Feb 2003 19:47:59 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4289

Comments below:

In article 
Jonathan D Herbach   wrote:
>> 1.) If a sender sends packets with sequences 100, 200, 300, 400 and
>> receives ACK=400, (assuming the ACKs for 1st, and 2nd packet are lost) the
>> only packet it can use in order to
>> calculate the new RTT is packet with sequence 300, is that correct?
>
>I'm curious as to the TAs, but here was what I thought:
>
>Option one: use the ACK400 as a determination of the seq300 packet, and
>that's a decent round trip.
>
>Option two: Use the ACK400 to sample RTT for seg100, seg200, and seg300.
>Why? Assuming no retransmissions on my part, I don't actually know if the
>seg300 was the last to be received. Perhpas the others were ... and thus
>the "congestion" in the network that caused out-of-order arrival would
>be factored into my computation of a new estimatee for RTT. Of course, I'd
>be careful *not* to allow a retransmission for seg100 or seg200 to be used
>to update the estimate.

To clarify, retransmissions for 100 or 200 should not occur after the
ACK 400 is received.

I don't have strong opinions on how to determine RTT in unusual
cases.  Other TAs, any thoughts?

SteveJ

>
>I chose option two. Is that bad?
>
>
>> 2.) It says in the assignment that we have to be careful with packets
>> that may fall partially into our window but I'm wondering in what
>> cases do this occur. I understand that a packet may cross our
>> window left side if it has been retransmitted/duplicated but I
>> don't understand the case of a packet ever crossing our right border.
>> The sender has to take care never to cross that border so why should the
>> receiver care about that case? It should not happen in the first place.
>Yep. But a sender might, and it's probably good to be caseful of that.
>
>> If there is such a case then I guess the behavior is to ack
>> up to our right side and discard the rest of the data but then what
>> does it mean to ACK half of a packet? how can the sender calculate
>> any RTT out of half a packet being acknowledged?
>Don't think of ACKing packets ... think of ACKing data. As for the sender,
>s/he shouldn't ever send beyond the receiver window (as above "it should
>not happen in the first place") so don't worry about that in your code! :)
>


.

Path: shelby.stanford.edu!saga1.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: A couple of questions on problem set 2
Date: Mon, 3 Feb 2003 19:51:47 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 37
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga1.stanford.edu
X-Trace: news.Stanford.EDU 1044301907 8624 171.64.15.131 (3 Feb 2003 19:51:47 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4290

In article 
Metha Jeeradit  wrote:
>Regarding #1:
>
>After reading the previous posts on ifconfig (and the man page on it), I'm
>still confused as to how to use it properly.  It seems to me that ifconfig
>can only give statistics on the interface for the local machine that you are
>on, is this correct?

That is my understanding.

 If so, how are we supposed to determine the statistics
>(I have the netmask in mind)  for the other 3 routers en route to
>www.mit.edu?

Use host and traceroute to discover or infer the information as
best you can.

>
>Regarding #5:
>
>What does "from every other router" mean?  Are we supposed to skip some
>nodes when running the algorithm?  Or does it mean every nodes except the
>node 7?

From every router but router 7.

SteveJ

>
>Thanks!
>
>Metha
>
>


.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: strange test results
Date: Mon, 3 Feb 2003 21:28:06 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine25.stanford.edu
X-Trace: news.Stanford.EDU 1044307686 12408 171.64.15.100 (3 Feb 2003 21:28:06 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4291

The test script doesn't do anything particularly unusual; all it does is
run both client and server in unreliable mode, checking that you downloaded
the given file(s) correctly.  You can even run the same commands as the
script, since they're given in the script output.

The network.o used is built from the regular network.c, unchanged.
.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Is my STCP impelmentation reliable enough?
Date: Mon, 3 Feb 2003 21:56:07 +0000 (UTC)
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine25.stanford.edu
X-Trace: news.Stanford.EDU 1044309367 13464 171.64.15.100 (3 Feb 2003 21:56:07 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4292

Jonathan D Herbach  writes:

>When I use my test my code with some "large" (>800k) files, I inevitably
>break down when I've retransmitted the alloted amount. Since I can't
>transfer large files, I would think that my implementation isn't "good
>enough" -- especially for part c, since then I might be transferring large
>files pretty consistently.

>That said, when I ran the test suite, the summary screen says "OK" for all
>the tests, even though when I look at the output scrolling above, it often
>shows my assert(0 && "Retransmitted too many times"). Should I assume that
>this behavior is okay?


The current test cases transfer only up to a 300KB file.  The assert() you
mention is expected in some cases (e.g. the Go-back N and retransmission
tests); it's not expected in parts B/C/J (i.e. those that just check general
transport layer functionality), since those parts check for correctness of the
downloaded file (which presumably wouldn't be satisfied if you assert
prematurely during the download).

I think a fully correct solution (i.e. something that passes all test cases
checked by the script) should be able to transfer much larger files than this,
e.g. the reference transferred up to 800 KB with both client and server
running in unreliable mode when I tried just now.
.

Path: shelby.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Office hours 30 min late today...
Date: Tue, 4 Feb 2003 01:01:53 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine12.stanford.edu
X-Trace: news.Stanford.EDU 1044320513 21468 171.64.15.77 (4 Feb 2003 01:01:53 GMT)
X-Complaints-To: 
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:4293

....apologies for the inconvenience!

  Guido
.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: bug in part (C)
Date: Tue, 4 Feb 2003 01:18:09 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine25.stanford.edu
X-Trace: news.Stanford.EDU 1044321489 22364 171.64.15.100 (4 Feb 2003 01:18:09 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4294

If anyone's working on part (C) and using the provided libftpcopy.a rather
than their own ftpcopy solution from HW1, there seem to be a couple of
problems in the implementation of ftpcopy; some non-matching files are
downloaded.  This causes one or two of the later test cases to fail.  (This
doesn't impact the STCP aspect of the provided library, which is working
correctly).

I'll post on here if/when I fix the problem.
.

Path: shelby.stanford.edu!elaine29.Stanford.EDU!nishant
From: Nishant Verman 
Newsgroups: su.class.cs244a
Subject: CWND / ERTT
Date: Mon, 3 Feb 2003 18:11:03 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine29.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044324690 24387 171.64.15.104 (4 Feb 2003 02:11:30 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4295

How can we find the correct context_t for printing the RTT values?
Is the fid passed actually the pid of the thread?

None of the tests seem to care about this so I'm wondering if we actually
need to implement this?


Thanks,
Nishant


.

Path: shelby.stanford.edu!elaine23.Stanford.EDU!primdahl
From:  (Keith A Primdahl)
Newsgroups: su.class.cs244a
Subject: 1a testing
Date: Tue, 4 Feb 2003 02:20:51 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 90
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine23.stanford.edu
X-Trace: news.Stanford.EDU 1044325251 24733 171.64.15.98 (4 Feb 2003 02:20:51 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4296



I'm fearful that this has already been covered in newsgroup, but maybe 
someone will have pity on me and answer again.  My part a is finally 
working (okay, I'm a slow learner, but I can get it eventually).  At 
least it works in my own server and client windows, even for large 
files; moreover, it passes all but the two most-critical tests.

So, what is the story on test 1B and 1C?  Despite the error message 
about the file not being accessable (presumably the testdata file?), 
Should I conclude that my transport layer has not followed the spec 
carefully enough to be used against the reference transmitter/receiver; 
that is, keep digging???

Thanks...Keith



======================================================================
Summary prepared for primdahl
======================================================================

Test 1.B [out of 10]
Checks student Tx (server) against reference Rx (client).

Results:  NOT OK

File size differs for /usr/class/cs244a/grading_script/hw2/TESTDATA.0!
(You downloaded 0 byte(s), expected 110230).
Client output:
server: ESTDATA.0,110230,Ok

----------------------------------------------------------------------

Test 1.C [out of 10]
Checks reference transmitter against student receiver.

Results:  NOT OK

Unexpected exit status -1.  Program output:
***Timeout expired during grading
Program output:

####Initiating a new connection now to 171.64.15.98:43003#### 
(sockfd=4)
server: ESTDATA.0,-1,File does not exist or access denied

----------------------------------------------------------------------

Test 1.D [out of 2.5]
Checks that Tx doesn't overflow receiver window.

Results:  OK
----------------------------------------------------------------------

Test 1.E [out of 2.5]
Checks that initial sequence number is set properly.

Results:  OK
----------------------------------------------------------------------

Test 1.F [out of 2.5]
Checks transport layer enforces correct receiver window.

Results:  OK
----------------------------------------------------------------------

Test 1.G [out of 5]
Checks that SYN is correctly ACKed.

Results:  OK
----------------------------------------------------------------------

Test 1.H [out of 5]
Checks that all packets are sent and ACKed before FIN.

Results:  OK
----------------------------------------------------------------------

Test 1.I [out of 5]
Checks that FIN is correctly ACKed.

Results:  OK
----------------------------------------------------------------------

Test 1.J [out of 14]
Checks student transmitter against student receiver.

Results:  OK
----------------------------------------------------------------------
.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: ps2 7 "time between when P_{1} and P_{2} start arriving"
Date: Tue, 4 Feb 2003 02:27:33 +0000 (UTC)
Organization: Stanford University
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine35.stanford.edu
X-Trace: news.Stanford.EDU 1044325653 24933 171.64.15.110 (4 Feb 2003 02:27:33 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4297


Does the question want the time elasped from when the last bit of $P_{1}$ arrives and the first bit
of $P_{2}$ or the time between when the first bit of $P_{1}$ arrives and the first bit of $P_{2}$ arrives.

Assuming store and forward routers (should we be doing this?) the latter seems to always be $T$ if the
arrival rate is not so slow that the packets overlap. But the former seems to reflect the data rate $R_{1}$
of the router.
.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: smra-rtr-2
Date: Mon, 3 Feb 2003 18:50:15 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044327016 25708 128.12.85.0 (4 Feb 2003 02:50:16 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4298

The second router used in traffic from elaine25 is smra-rtr-2. However, if
you use host on this router, all you get is the single IP 171.64.1.36. How
can a router have only one address?

--
____________________________________________
Rene Patnode
Stanford University

Computer Science
Phi Kappa Psi
Resident Assistant, Cardenal

"Mmm... unexplained bacon." - Homer Simpson


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: ps2 q1
Date: Mon, 3 Feb 2003 20:39:27 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1044333526 1091 128.12.195.69 (4 Feb 2003 04:38:46 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4299

For q1, when I tried to traceroute to www.hp.com, I got the result "* * *"
from the 17th hop and onwards. What can do to discover the complete path?

Thanks.

-myl


.

Path: shelby.stanford.edu!elaine41.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: CWND / ERTT
Date: Tue, 4 Feb 2003 06:34:56 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine41.stanford.edu
X-Trace: news.Stanford.EDU 1044340496 4455 171.64.15.116 (4 Feb 2003 06:34:56 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4300

I don't think you need to worry about PIDs.  You can 
maintain the values as globals and print those.

The function itself needs to be present and functional
so that it can be called by grading software.

SteveJ

In article 
Nishant Verman   wrote:
>How can we find the correct context_t for printing the RTT values?
>Is the fid passed actually the pid of the thread?
>
>None of the tests seem to care about this so I'm wondering if we actually
>need to implement this?
>
>
>Thanks,
>Nishant
>
>


.

Path: shelby.stanford.edu!elaine41.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: smra-rtr-2
Date: Tue, 4 Feb 2003 06:39:16 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine41.stanford.edu
X-Trace: news.Stanford.EDU 1044340756 4535 171.64.15.116 (4 Feb 2003 06:39:16 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4301

The host command can only report what DNS knows.  It's fair
to assume that other ports exist on the router, but they have
not been reported to DNS.

SteveJ

In article 
Rene Patnode  wrote:
>The second router used in traffic from elaine25 is smra-rtr-2. However, if
>you use host on this router, all you get is the single IP 171.64.1.36. How
>can a router have only one address?
>
>--
>____________________________________________
>Rene Patnode
>Stanford University
>
>Computer Science
>Phi Kappa Psi
>Resident Assistant, Cardenal
>
>"Mmm... unexplained bacon." - Homer Simpson
>
>


.

Path: shelby.stanford.edu!elaine12.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: testing using test scripts...
Date: Mon, 3 Feb 2003 22:44:09 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044341050 4720 171.64.15.77 (4 Feb 2003 06:44:10 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4302


Hi...

Is there any way we can debug what might be going wrong using
the transmitter or reciever used in the automated test cases.

If I use my own server/client it seems to work fine. But some of the
automated tests don't.

thanks,
priyanka


.

Path: shelby.stanford.edu!elaine41.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: ps2 7 "time between when P_{1} and P_{2} start arriving"
Date: Tue, 4 Feb 2003 07:09:40 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine41.stanford.edu
X-Trace: news.Stanford.EDU 1044342580 5422 171.64.15.116 (4 Feb 2003 07:09:40 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4303

In article 
David Seetapun  wrote:
>
>Does the question want the time elasped from when the last bit of $P_{1}$ arrives and the first bit
>of $P_{2}$ or the time between when the first bit of $P_{1}$ arrives and the first bit of $P_{2}$ arrives.
>

The most relevant quantity appears to be the time between the
end of the first packet and the start of the second.  Clearly
state your assumptions and you should be OK.

>Assuming store and forward routers (should we be doing this?)

Store-and-forward is specified in the question.

SteveJ

 the latter seems to always be $T$ if the
>arrival rate is not so slow that the packets overlap. But the former seems to reflect the data rate $R_{1}$
>of the router.


.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!sjac3
From:  (Steve Jacobson)
Newsgroups: su.class.cs244a
Subject: Re: testing using test scripts...
Date: Tue, 4 Feb 2003 07:26:40 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine9.stanford.edu
X-Trace: news.Stanford.EDU 1044343600 410 171.64.15.74 (4 Feb 2003 07:26:40 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4304

Logging information to a file is one way.

SteveJ

In article 
Priyanka Gupta   wrote:
>
>Hi...
>
>Is there any way we can debug what might be going wrong using
>the transmitter or reciever used in the automated test cases.
>
>If I use my own server/client it seems to work fine. But some of the
>automated tests don't.
>
>thanks,
>priyanka
>
>


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!mkalman
From: Mark Kalman 
Newsgroups: su.class.cs244a
Subject: blocking on read
Date: Tue, 4 Feb 2003 00:15:39 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044346544 2458 171.64.15.117 (4 Feb 2003 08:15:44 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4305


Hi All and especially TAs,

Two questions:

1) Under what circumstances will a myread call (and the underlying read
call) return 0 ?

2) How can I tell if my local_data_sd is closed.

I am having trouble because myread doesn't always block when there is no
data available, it sometimes returns 0. I think that it must be because
the socket is somehow getting closed on the child side of the connection,
but it occurs when I haven't done anything to close the socket. Is there a
reason why a myread will return 0 when the socket is actually open?


Mark



.

Path: shelby.stanford.edu!not-for-mail
From: "Eric Ogren" 
Newsgroups: su.class.cs244a
Subject: Re: blocking on read
Date: Tue, 4 Feb 2003 00:32:26 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: eogren.stanford.edu
X-Trace: news.Stanford.EDU 1044347547 2859 128.12.95.90 (4 Feb 2003 08:32:27 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4306

This will happen if your transport layer segfaults - I'd take a look at it
in gdb or purify and make sure that's not happening.

Eric
(not a ta)

"Mark Kalman"  wrote in message

>
> Hi All and especially TAs,
>
> Two questions:
>
> 1) Under what circumstances will a myread call (and the underlying read
> call) return 0 ?
>
> 2) How can I tell if my local_data_sd is closed.
>
> I am having trouble because myread doesn't always block when there is no
> data available, it sometimes returns 0. I think that it must be because
> the socket is somehow getting closed on the child side of the connection,
> but it occurs when I haven't done anything to close the socket. Is there a
> reason why a myread will return 0 when the socket is actually open?
>
>
> Mark
>
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Rene Patnode" 
Newsgroups: su.class.cs244a
Subject: Re: smra-rtr-2
Date: Tue, 4 Feb 2003 00:51:45 -0800
Lines: 39
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: el-diablo.stanford.edu
X-Trace: news.Stanford.EDU 1044348707 3227 128.12.85.0 (4 Feb 2003 08:51:47 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4307

If I do a reverse lookup on 171.64.1.36, I see that smra-rtr is an alias for
smra-rtr-2. Does that mean that these are the same router?

Also, in this particular case, is smra-rtr-2 the host name of the interface
upon which the packets come in from their source or go out to the
destination? Which of the two interfaces does traceroute return?

"Steve Jacobson"  wrote in message

> The host command can only report what DNS knows.  It's fair
> to assume that other ports exist on the router, but they have
> not been reported to DNS.
>
> SteveJ
>
> In article 
> Rene Patnode  wrote:
> >The second router used in traffic from elaine25 is smra-rtr-2. However,
if
> >you use host on this router, all you get is the single IP 171.64.1.36.
How
> >can a router have only one address?
> >
> >--
> >____________________________________________
> >Rene Patnode
> >Stanford University
> >
> >Computer Science
> >Phi Kappa Psi
> >Resident Assistant, Cardenal
> >
> >"Mmm... unexplained bacon." - Homer Simpson
> >
> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: ps2 q1
Date: Tue, 4 Feb 2003 01:26:15 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044350845 3853 128.12.186.92 (4 Feb 2003 09:27:25 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4308

*** means that there was no response to the probe within the given timeout
interval.  See the traceroute man page to learn how to set the timeout
interval.

--Russ

"Man Yu Lui"  wrote in message

> For q1, when I tried to traceroute to www.hp.com, I got the result "* * *"
> from the 17th hop and onwards. What can do to discover the complete path?
>
> Thanks.
>
> -myl
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Alexander Fontana 
Newsgroups: su.class.cs244a
Subject: resending after unaligned acks
Date: Tue, 04 Feb 2003 01:59:41 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine30.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1044352782 4504 171.64.15.105 (4 Feb 2003 09:59:42 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:4309

Suppose the following happens....

1) We send a packet with bytes i to k
2) We receive an ack up to byte j, where i < j < k.
3) The data in bytes j to k times out and needs to be resent.

In the interest of not having to construct a new packet and new header,
may we just resend all of the data starting at byte i?

Or is that too lazy?

Thanks,
Alex
.

Path: shelby.stanford.edu!epic19.Stanford.EDU!sansari
From: Saad Salman Ansari 
Newsgroups: su.class.cs244a
Subject: test 2.J, how can i isolate it?
Date: Tue, 4 Feb 2003 02:00:07 -0800
Lines: 31
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stanford.EDU 1044352809 4568 171.64.15.54 (4 Feb 2003 10:00:09 GMT)
X-Complaints-To: 
Xref: shelby.stanford.edu su.class.cs244a:4310

Hi all!

I have tried to test both my client and server with files upto 16MB and it
transfers the files without incident on any number of runs (more than 50,
so far), but I still fail test 2.J. Here is the output of the test script.
I cannot seem to reproduce this error.

----------------------------------------------------------------------

Test 2.J [out of 14]
Checks student transmitter against student receiver.

Results:  NOT OK

Unexpected exit status -1.  Program output:
***Timeout expired during grading
Program output:

####Initiating a new connection now to 171.64.15.54:40790#### (sockfd=4)
server: TESTDATA.2,5098,Ok

----------------------------------------------------------------------

is TESTDATA.2 public? Any ideas as to how I can find out where my program
breaks?

thanks!

Saad


.

Path: shelby.stanford.edu!not-for-mail
From: "Man Yu Lui" 
Newsgroups: su.class.cs244a
Subject: Re: test 2.J, how can i isolate it?
Date: Tue, 4 Feb 2003 03:20:26 -0800
Lines: 40
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: cromem-02-xee12.stanford.edu
X-Trace: news.Stanford.EDU 1044357581 6763 128.12.195.69 (4 Feb 2003 11:19:41 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:4311

Refer to the posting about "strange test results" At least two other people,
myself included, experienced this problem. I wonder if there is anyone who
is passing this test case?


"Saad Salman Ansari"  wrote in message

> Hi all!
>
> I have tried to test both my client and server with files upto 16MB and it
> transfers the files without incident on any number of runs (more than 50,
> so far), but I still fail test 2.J. Here is the output of the test script.
> I cannot seem to reproduce this error.
>
> ----------------------------------------------------------------------
>
> Test 2.J [out of 14]
> Checks student transmitter against student receiver.
>
> Results:  NOT OK
>
> Unexpected exit status -1.  Program output:
> ***Timeout expired during grading
> Program output:
>
> ####Initiating a new connection now to 171.64.15.54:40790#### (sockfd=4)
> server: TESTDATA.2,5098,Ok
>
> ----------------------------------------------------------------------
>
> is TESTDATA.2 public? Any ideas as to how I can find out where my program
> breaks?
>
> thanks!
>
> Saad
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Will Robinson" 
Newsgroups: su.class.cs244a
Subject: Re: ps2 q1
Date: Tue, 04 Feb 2003 07:44:02 -0800
Lines: 22
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: javalasers.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.Stanford.EDU 1044373442 12678 128.12.91.22 (4 Feb 2003 15:44:02 GMT)
X-Complaints-To: 
User-Agent: Pan/0.13.3 (That cat's something I can't explain)
Xref: shelby.stanford.edu su.class.cs244a:4312

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 04 Feb 2003 01:26:15 -0800, "Russell Greene" 
wrote:

> *** means that there was no response to the probe within the given timeout
> interval.  See the traceroute man page to learn how to set the timeout
> interval.

I'm still getting "* * *" even with the timeout set to as high as 60
(seconds).  Should I just turn in the traceroute with the "* * *"?

Will
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+P9+x4uIcqiwjnrURAhrlAJ0Qut34UdjG2DZxv0GHIT2akr/xrwCgkTpC
b4EK0uI6wv5TWcFL9/PDe+U=
=xe7W
-----END PGP SIGNATURE-----

.

Path: shelby.stanford.edu!elaine29.Stanford.EDU!ceekay
From:  (Chandrakala Kappanna)
Newsgroups: su.class.cs244a
Subject: window size
Date: Tue, 4 Feb 2003 17:43:49 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine29.stanford.edu
X-Trace: news.Stanford.EDU 1044380629 15765 171.64.15.104 (4 Feb 2003 17:43:49 GMT)
X-Complaints-To: 
Keywords: window size
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4313


If I had sent packets 1, 2, 3 each of letz say 100 bytes.
My sending wind size will be 3072 -300 bytes.

Suppose letz say packet 1 times out and I have
to resend 1,2 and 3.

what will be my sender's window size?
3072-500  (assuming packet 1 got dropped)
or still 3072-300


.

Path: shelby.stanford.edu!seetapun
From:  (David Seetapun)
Newsgroups: su.class.cs244a
Subject: ps2 6 g h sending packets from other routers
Date: Tue, 4 Feb 2003 21:00:41 +0000 (UTC)
Organization: Stanford University
Lines: 3
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
X-Trace: news.Stanford.EDU 1044392441 23555 171.64.15.69 (4 Feb 2003 21:00:41 GMT)
X-Complaints-To: 
X-newsreader: xrn 9.02
Xref: shelby.stanford.edu su.class.cs244a:4314


This question asks how packets get from a router to which I cannot get access
to eecs.berkeley.  traceroute -s doesn't seem to help.  Any suggestions?
.

Path: shelby.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: ps2 6 g h sending packets from other routers
Date: Tue, 4 Feb 2003 14:10:34 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: neeta.stanford.edu
X-Trace: news.Stanford.EDU 1044396704 25909 128.12.186.92 (4 Feb 2003 22:11:44 GMT)
X-Complaints-To: 
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Xref: shelby.stanford.edu su.class.cs244a:4315

Look carefully at the traceroute man pages :)

--Russ

"David Seetapun"  wrote in message

>
> This question asks how packets get from a router to which I cannot get
access
> to eecs.berkeley.  traceroute -s doesn't seem to help.  Any suggestions?


.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: 1a testing
Date: Tue, 4 Feb 2003 22:53:33 +0000 (UTC)
Lines: 86
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1044399213 27276 171.64.15.66 (4 Feb 2003 22:53:33 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4316


>So, what is the story on test 1B and 1C?  Despite the error message 
>about the file not being accessable (presumably the testdata file?), 
>Should I conclude that my transport layer has not followed the spec 
>carefully enough to be used against the reference transmitter/receiver; 
>that is, keep digging???

Yes.  The client requests "TESTDATA.0," not "ESTDATA.0"


>Thanks...Keith



>======================================================================
>Summary prepared for primdahl
>======================================================================

>Test 1.B [out of 10]
>Checks student Tx (server) against reference Rx (client).

>Results:  NOT OK

>File size differs for /usr/class/cs244a/grading_script/hw2/TESTDATA.0!
>(You downloaded 0 byte(s), expected 110230).
>Client output:
>server: ESTDATA.0,110230,Ok

>----------------------------------------------------------------------

>Test 1.C [out of 10]
>Checks reference transmitter against student receiver.

>Results:  NOT OK

>Unexpected exit status -1.  Program output:
>***Timeout expired during grading
>Program output:

>####Initiating a new connection now to 171.64.15.98:43003#### 
>(sockfd=4)
>server: ESTDATA.0,-1,File does not exist or access denied

>----------------------------------------------------------------------

>Test 1.D [out of 2.5]
>Checks that Tx doesn't overflow receiver window.

>Results:  OK
>----------------------------------------------------------------------

>Test 1.E [out of 2.5]
>Checks that initial sequence number is set properly.

>Results:  OK
>----------------------------------------------------------------------

>Test 1.F [out of 2.5]
>Checks transport layer enforces correct receiver window.

>Results:  OK
>----------------------------------------------------------------------

>Test 1.G [out of 5]
>Checks that SYN is correctly ACKed.

>Results:  OK
>----------------------------------------------------------------------

>Test 1.H [out of 5]
>Checks that all packets are sent and ACKed before FIN.

>Results:  OK
>----------------------------------------------------------------------

>Test 1.I [out of 5]
>Checks that FIN is correctly ACKed.

>Results:  OK
>----------------------------------------------------------------------

>Test 1.J [out of 14]
>Checks student transmitter against student receiver.

>Results:  OK
>----------------------------------------------------------------------
.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test 2.J, how can i isolate it?
Date: Tue, 4 Feb 2003 22:59:06 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine1.stanford.edu
X-Trace: news.Stanford.EDU 1044399546 27465 171.64.15.66 (4 Feb 2003 22:59:06 GMT)
X-Complaints-To: 
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4317


>Refer to the posting about "strange test results" At least two other people,
>myself included, experienced this problem. I wonder if there is anyone who
>is passing this test case?

Some people have.  Please send me your code, and I'll try to see what's
going on.

.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!rhm
From: Rafael M Hernandez 
Newsgroups: su.class.cs244a
Subject: Test 2.D and other weird results
Date: Tue, 4 Feb 2003 16:17:01 -0800
Lines: 47
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine35.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: news.Stan