su.class.cs244a



Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Welcome the CS244a Newsgroup!
Date: Tue, 08 Jan 2002 17:06:49 -0800
Organization: Stanford University
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: dnab4046e1.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1010538455 22131 171.64.70.225 (9 Jan 2002 01:07:35 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.73 [en]C-{C-UDP; EBM-SONY1}  (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2365


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.

- NM
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine36.Stanford.EDU!anhoe
From: An-hoe Shih 
Newsgroups: su.class.cs244a
Subject: regarding echodemo in programming assignment #1
Date: Tue, 8 Jan 2002 17:11:15 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine36.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2366

Hi Professor and TAs,

   On the first page of the programming assignment #1 sheet, it asks us to
debug echodemo.c. However, I am not clear on how and what to turn in for
this part of the assignment. Can you clarify?

Thank you,

An-Hoe

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jing Jiang" 
Newsgroups: su.class.cs244a
Subject: alternative final?
Date: Wed, 9 Jan 2002 03:06:21 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: jjiang.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Xref: nntp.stanford.edu su.class.cs244a:2367

Will there be an alternative final exam for this class? Thanks!

Jing


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: regarding echodemo in programming assignment #1
Date: Wed, 9 Jan 2002 11:43:57 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2368

Hi,

You need to write a brief report on the types of bugs you found in the
program and how to fix the bugs. Your deliverables are only the brief
report as part of your write-up (README) on the actual homework problem.

Best,

Xin

On Tue, 8 Jan 2002, An-hoe Shih wrote:

> Hi Professor and TAs,
> 
>    On the first page of the programming assignment #1 sheet, it asks us to
> debug echodemo.c. However, I am not clear on how and what to turn in for
> this part of the assignment. Can you clarify?
> 
> Thank you,
> 
> An-Hoe
> 
> 


-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: alternative final?
Date: Wed, 09 Jan 2002 14:25:06 -0800
Lines: 1
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 1010615865 2892 171.66.211.98 (9 Jan 2002 22:37:45 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2369

There are no plans for an alternative final.
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine40.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Using purify
Date: Wed, 9 Jan 2002 20:33:27 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine40.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2370


Hi all,

I am having some trouble using purify. Could you please help.

> I have copied the Makefile and the echodemo.c file into a directory and
> once I compile the code and run the following command ..i get an error:
>
>  purify -cache-dir=/tmp gcc -o  echodemo.purify e
> chodemo.o
> In order for Rational PurifyPlus to work properly, you must source
> the appropriate shell resource file in /usr/pubsw/etc/rational. See
> the release announcement at
>     http://ls.stanford.edu/services/pubsw/package/licensed/rational.html
> for more details.
>
> Could you please tell me if there is a problem with the license or if I
am
> not using the tool correctly.
>
> Would appreciate your help.
>
> Thanks,
> Piryanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Using purify
Date: Wed, 9 Jan 2002 20:39:29 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Priyanka Gupta 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2371

Piryanka,

  You need to source the csh script in /usr/pubsw/etc/rational

  >source /usr/pubsw/etc/rational/purifyplus_setup.csh

  should do the trick if you are using csh/tcsh. I've added the
line to my .cshrc so I don't have to bother sourcing it by hand each time
I log on.

                HTH,
                ~m


>
> Hi all,
>
> I am having some trouble using purify. Could you please help.
>
> > I have copied the Makefile and the echodemo.c file into a directory and
> > once I compile the code and run the following command ..i get an error:
> >
> >  purify -cache-dir=/tmp gcc -o  echodemo.purify e
> > chodemo.o
> > In order for Rational PurifyPlus to work properly, you must source
> > the appropriate shell resource file in /usr/pubsw/etc/rational. See
> > the release announcement at
> >     http://ls.stanford.edu/services/pubsw/package/licensed/rational.html
> > for more details.
> >
> > Could you please tell me if there is a problem with the license or if I
> am
> > not using the tool correctly.
> >
> > Would appreciate your help.
> >
> > Thanks,
> > Piryanka
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!spevack.Stanford.EDU!spevack
From: Max Spevack 
Newsgroups: su.class.cs244a
Subject: Trouble signing up for section
Date: Thu, 10 Jan 2002 05:07:56 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: spevack.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2372

Hi,

I tried to sign up for the class, but I received an error message:

You don't have permission to access /cgi-bin/cs244a/assign_TA_main.pl on
this server.

Has anyone else had difficulty, or is my build of Mozilla just really bad?
:-)

--Max

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Romain Thibaux 
Newsgroups: su.class.cs244a
Subject: Re: Trouble signing up for section
Date: Thu, 10 Jan 2002 07:28:50 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: thibaux.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1010676798 9978 128.12.191.77 (10 Jan 2002 15:33:18 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2373

Same for me

    Romain

Max Spevack wrote:

> Hi,
>
> I tried to sign up for the class, but I received an error message:
>
> You don't have permission to access /cgi-bin/cs244a/assign_TA_main.pl on
> this server.
>
> Has anyone else had difficulty, or is my build of Mozilla just really bad?
> :-)
>
> --Max

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine27.Stanford.EDU!anhoe
From: An-hoe Shih 
Newsgroups: su.class.cs244a
Subject: turn in the problem set via SCPD courier service
Date: Thu, 10 Jan 2002 16:33:42 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine27.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2374

Dear Professor and TAs,

   Fop the SCPD students, it is easier for us to turn in the problem sets
via SCPD courier service. I am wondering whether it is OK for us just
to turn in the problem sets to the courier service on the same day the
problem set is due?

   Judging from the courier schedule, it seems that the courier finishes
picking up the assignments from each company by 2:30pm. But, I don't
know if the problem sets can actually get to Mina Madrigal Torres's desk
by 5pm on the same day. However, the route form that is attached to the
problem set should indicate that we indeed turn in on the day and probably
before 2:30pm.


Thank you,


An-Hoe

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: Trouble signing up for section
Date: Thu, 10 Jan 2002 16:38:26 -0800
Organization: Stanford University
Lines: 3
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: dnab404691.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1010709553 14231 171.64.70.145 (11 Jan 2002 00:39:13 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.73 [en]C-{C-UDP; EBM-SONY1}  (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2375

Try again, and see if you find the same problem.
I think the machine that hosts the cgi script was 
inaccessible for a little while this morning.
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Darren Lewis" 
Newsgroups: su.class.cs244a
Subject: PS1, question 2
Date: Thu, 10 Jan 2002 21:34:16 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: darren.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2376

For 2b and c, what size packet and bandwidth should we use for the
calculations? Thanks.


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Would there be any exceptions for qual-takers?
Date: Thu, 10 Jan 2002 23:59:49 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2377

Dear professor and TAs,

I wonder whether there would be some leniency about the deadlines for
assignments,
for qual-takers...

Thank you..



.

Path: shelby.stanford.edu!nntp.stanford.edu!appenz
From:  (Guido Appenzeller)
Newsgroups: su.class.cs244a
Subject: Re: turn in the problem set via SCPD courier service
Date: 11 Jan 2002 15:56:23 GMT
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
X-Newsreader: TIN [version 1.2 PL2]
Xref: nntp.stanford.edu su.class.cs244a:2378

An-Hoe,

yes, if you are a SITN student and you hand your problem set to the courier
before the deadline that qualifies as being on time.

  Guido


An-hoe Shih  wrote:
: Dear Professor and TAs,

:    Fop the SCPD students, it is easier for us to turn in the problem sets
: via SCPD courier service. I am wondering whether it is OK for us just
: to turn in the problem sets to the courier service on the same day the
: problem set is due?

:    Judging from the courier schedule, it seems that the courier finishes
: picking up the assignments from each company by 2:30pm. But, I don't
: know if the problem sets can actually get to Mina Madrigal Torres's desk
: by 5pm on the same day. However, the route form that is attached to the
: problem set should indicate that we indeed turn in on the day and probably
: before 2:30pm.


: Thank you,


: An-Hoe


--

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine4.Stanford.EDU!sandeept
From: Sandeep Vilas Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Trouble signing up for section
Date: Fri, 11 Jan 2002 09:44:24 -0800
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Max Spevack 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2379

I used Mozilla 0.9.5 on Linux a few days ago (Tuesday I think) and had no
problem.  Sounds like a server problem anyway.

Good luck!

-Sandeep
P.S. Don't forget to sign up on eeclass.stanford.edu as well.

On Thu, 10 Jan 2002, Max Spevack wrote:

> Hi,
>
> I tried to sign up for the class, but I received an error message:
>
> You don't have permission to access /cgi-bin/cs244a/assign_TA_main.pl on
> this server.
>
> Has anyone else had difficulty, or is my build of Mozilla just really bad?
> :-)
>
> --Max
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Stevens Code
Date: Fri, 11 Jan 2002 10:48:49 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2380

Is the code available in the Stevens book (such as the written and readn
functions) available for our use?  Thanks.

--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Permission Denied
Date: Fri, 11 Jan 2002 11:20:24 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2381

In the specification of assignment 1 it says that there is a sample ftpd to
test with located at
/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd.  However
I get a Permission Denied error when trying to enter the WWW directory from
the leland machines.  Anyone else having a problem or am I doing something
wrong?  Thanks

--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine17.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1, question 2
Date: 11 Jan 2002 20:32:53 GMT
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine17.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2382

"Darren Lewis"  writes:

>For 2b and c, what size packet and bandwidth should we use for the
>calculations? Thanks.


You don't need these parameters for this question; i.e. just compute the time
for a single bit to make its way to the destination and back.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Pete Belknap" 
Newsgroups: su.class.cs244a
Subject: PS1, Question 7
Date: Fri, 11 Jan 2002 13:20:40 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2383

How does the cumulative Service Process, S(t), work for question 7?

Specifically, how can S(t) be greater than A(t) ?  To me, this would seem to
say that we have serviced more bits than have arrived...  I guess my
question is what exactly is the service process and what exactly it means to
'service' a bit...  Anybody know?

thanks,
Pete




.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine31.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1, Question 7
Date: 11 Jan 2002 21:48:02 GMT
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2384

"Pete Belknap"  writes:

>How does the cumulative Service Process, S(t), work for question 7?

>Specifically, how can S(t) be greater than A(t) ?  To me, this would seem to
>say that we have serviced more bits than have arrived...  I guess my
>question is what exactly is the service process and what exactly it means to
>'service' a bit...  Anybody know?

>thanks,
>Pete


Part (b) of the question should clarify the meaning of the service process.
(S(t) reflects the service rate of the queue, i.e. it's the total number
of bits that could have been sent out by time t if they'd been available).

To give an example, you could imagine a router capable of filling a 100 b/s
output link, for which only a 10 b/s data stream is arriving:  S(t) = 100t,
A(t) = 10t.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: Stevens Code
Date: Fri, 11 Jan 2002 14:04:49 -0800
Organization: Stanford University
Lines: 6
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 1010786620 23818 171.66.211.98 (11 Jan 2002 22:03:40 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2386

Russ,
You'll find a detailed description of 
acceptable re-use in Handout #1, under
the section on the Honor Code.

- NM
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine36.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Would there be any exceptions for qual-takers?
Date: 11 Jan 2002 22:15:02 GMT
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine36.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2387

"BAEHOPIL"  writes:

>Dear professor and TAs,

>I wonder whether there would be some leniency about the deadlines for
>assignments,
>for qual-takers...

>Thank you..

The deadlines for hw#1 and ps#1 were picked with EE Quals in mind.
PS#1 won't take you long. HW#1 is not due until the week after Quals.
So no extensions...

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine14.Stanford.EDU!anhoe
From: An-hoe Shih 
Newsgroups: su.class.cs244a
Subject: Are the slides from Review Session (today) posted online?
Date: Fri, 11 Jan 2002 15:43:26 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2388

Dear Professor and TAs,

   Are the slides from Review Session today available online? I cannot
find them anywhere. If not, can you post them?

Thanks,


An-Hoe

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine23.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: Permission Denied
Date: Fri, 11 Jan 2002 16:54:34 -0800
Lines: 29
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine23.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2389

that's the same error i got too.
~Ashmi

On Fri, 11 Jan 2002, Russell Greene wrote:

> In the specification of assignment 1 it says that there is a sample ftpd to
> test with located at
> /usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd.  However
> I get a Permission Denied error when trying to enter the WWW directory from
> the leland machines.  Anyone else having a problem or am I doing something
> wrong?  Thanks
>
> --Russ
>
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine23.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Discussing Problem Set
Date: Fri, 11 Jan 2002 17:01:48 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine23.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2390

hi Professor McKeown and TAs,
are we allowed to discuss problem set questions with fellow students? of
course we would cite who we discuss with.
thanks,
ashmi


###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine33.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Permission Denied
Date: 12 Jan 2002 02:28:05 GMT
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine33.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2391

"Russell Greene"  writes:

>In the specification of assignment 1 it says that there is a sample ftpd to
>test with located at
>/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd.  However
>I get a Permission Denied error when trying to enter the WWW directory from
>the leland machines.  Anyone else having a problem or am I doing something
>wrong?  Thanks

>--Russ


There's now a copy of the executable (ftpd) in /usr/class/cs244a/bin,
which you can use for testing at the moment.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine33.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Discussing Problem Set
Date: 12 Jan 2002 02:31:55 GMT
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine33.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2392

Ashmi  writes:

>hi Professor McKeown and TAs,
>are we allowed to discuss problem set questions with fellow students? of
>course we would cite who we discuss with.
>thanks,
>ashmi


Please refer to the discussion of the honour code in handout 1.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Darren Lewis" 
Newsgroups: su.class.cs244a
Subject: Re: PS1, Question 7
Date: Fri, 11 Jan 2002 21:29:24 -0800
Lines: 36
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: darren.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2393

How about d(t), the delay of a single bit through the queue? Does d(1) refer
to the delay of the first bit through the queue, or the average delay of
bits through the queue at time 1, or something else entirely? Thanks.

-Darren

"Matthew Jonathan Holliman"  wrote in message

> "Pete Belknap"  writes:
>
> >How does the cumulative Service Process, S(t), work for question 7?
>
> >Specifically, how can S(t) be greater than A(t) ?  To me, this would seem
to
> >say that we have serviced more bits than have arrived...  I guess my
> >question is what exactly is the service process and what exactly it means
to
> >'service' a bit...  Anybody know?
>
> >thanks,
> >Pete
>
>
> Part (b) of the question should clarify the meaning of the service
process.
> (S(t) reflects the service rate of the queue, i.e. it's the total number
> of bits that could have been sent out by time t if they'd been available).
>
> To give an example, you could imagine a router capable of filling a 100
b/s
> output link, for which only a 10 b/s data stream is arriving:  S(t) =
100t,
> A(t) = 10t.
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: PS 1, Question 5b
Date: Fri, 11 Jan 2002 23:14:05 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2394

I'd appreciate a clarification:

How far along is the transmission of the first-in-line packet when our
packet arrives? Just beginning? Just done?

Also, what should we take the "arrival" of our packet, referred to above, to
mean? When the first bit hits the router? When the last bit has come in?

Thanks,
Steve


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Re: PS 1, Question 5b
Date: Sat, 12 Jan 2002 11:14:03 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Steven Siuhong Ngai 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2395


Steven,

This is what my interpretation is:

1) The first in-line packet is just beginning to be transmitted.

2) A packet would arrive once the last bit comes thru.

If Profs or TAs disagree with this interpretation, then please reply back.

Thnaks,
Priyanka

On Fri, 11 Jan 2002, Steven Siuhong Ngai wrote:

> I'd appreciate a clarification:
>
> How far along is the transmission of the first-in-line packet when our
> packet arrives? Just beginning? Just done?
>
> Also, what should we take the "arrival" of our packet, referred to above, to
> mean? When the first bit hits the router? When the last bit has come in?
>
> Thanks,
> Steve
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Fluid Model Example (Lecture 2)
Date: Sat, 12 Jan 2002 11:39:42 -0800
Lines: 42
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2396


Hello Professor and TAs,

I am not clear on the Fluid Model Example(last slide for lecture 2).

It mentions the following:
A(t) = 1000 b/s
Every seconds a train of 100 bits arrive.
D(t) = 500 b/s

Here are the questions I have:
1) What really is the difference between departure rate and service rate.
Is Service Rate the rate at which a router could operate and departure
rate the rate at which it is currently operating depending on the number
of bits/packets in the queue? In which case is it true that S(t) >= D(t)

2) Does Arrival Rate refers to the maximum data rate? Or the actual data
rate. Looking at all the questions it seems that although the arrival rate
could be 1000b/s, bits might actually be arriving only at 100b/s

3) Arrival rate and Service rate are completely independent of each other?

4) In this particular example, I do not see why there would be a queue
occupancy. The packets are coming at  100b/s whereas the service rate
could be as much as 500b/s, then why would there ever be anything in the
queue. Would the departing process would start only once the
entire 100 bit packet for example has arrived?

5) Also, I do not understand the solution properly.
The solution to the problem according to me should have been:

During each cycle the queue fills at a rate of 1000b/s for 01.s, then
drains at rate of 500b/s for 0.2 s. Not sure how I would get queue
occupancy after these calculations though?

I would really appreciate if you could try and clear these for me.

Thanks,
Priyanka



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1, Question 7
Date: 12 Jan 2002 20:26:21 GMT
Lines: 10
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine16.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2397

"Darren Lewis"  writes:

>How about d(t), the delay of a single bit through the queue? Does d(1) refer
>to the delay of the first bit through the queue, or the average delay of
>bits through the queue at time 1, or something else entirely? Thanks.

>-Darren


d(1) is the time spent in the queue by a bit that arrived at time t=1.
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Fluid Model Example (Lecture 2)
Date: 12 Jan 2002 21:15:06 GMT
Lines: 69
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine16.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2398

Priyanka Gupta  writes:


>I am not clear on the Fluid Model Example(last slide for lecture 2).

>It mentions the following:
>A(t) = 1000 b/s
>Every seconds a train of 100 bits arrive.
>D(t) = 500 b/s

The slide states that the *maximum* departure rate (i.e. service rate)
is 500 b/s; as the figure shows, D(t) is not equal to 500t.

Also, keep in mind that A(t) and D(t) represent the *cumulative* number of
bits that have arrived and departed, respectively; so A(t) = 1000 would
state that 1000 bits were in the buffer at time t=0, and that no more
ever arrived again.

For this fluid model example, A(t) = 100*floor(t) + 1000*(t - floor(t))
for t between [0,0.1], [1,1.1], [2,2.1], etc. (bits are arriving at rate
1000 b/s during those times); and for other t, A(t) remains constant
(100*ceil(t), as no more bits are arriving).  (I hope I got this right;
anyway, the picture is easier to look at to see how A(t) behaves).


>Here are the questions I have:
>1) What really is the difference between departure rate and service rate.
>Is Service Rate the rate at which a router could operate and departure
>rate the rate at which it is currently operating depending on the number
>of bits/packets in the queue? In which case is it true that S(t) >= D(t)

Yes.

>2) Does Arrival Rate refers to the maximum data rate? Or the actual data
>rate. Looking at all the questions it seems that although the arrival rate
>could be 1000b/s, bits might actually be arriving only at 100b/s

The arrival rate during the first tenth of each second is 1000 b/s in this
example; the average arrival rate is 100 b/s.

>3) Arrival rate and Service rate are completely independent of each other?

Yes.

>4) In this particular example, I do not see why there would be a queue
>occupancy. The packets are coming at  100b/s whereas the service rate
>could be as much as 500b/s, then why would there ever be anything in the
>queue. Would the departing process would start only once the
>entire 100 bit packet for example has arrived?

On the average, bits are arriving at 100 b/s.  However, the instantaneous
rate is bigger than this (viz. 1000 b/s), hence the queue occupancy.

For this model, you needn't think in terms of packets (unless the problem
asks you to do so).  So in this case, the departure process begins
immediately, as the graph of D(t) on the slide indicates.

>5) Also, I do not understand the solution properly.
>The solution to the problem according to me should have been:

>During each cycle the queue fills at a rate of 1000b/s for 01.s, then
>drains at rate of 500b/s for 0.2 s. Not sure how I would get queue
>occupancy after these calculations though?

Since the example assumes just a flow of bits, the queue begins draining at
time t=0 rather than t=0.1 s.

Hope this helps.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: PS1, Problem 6
Date: Sat, 12 Jan 2002 14:02:41 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2399

1. Does the output link have to have at least I seconds between consecutive
packets on a link as well?

2. Since there is only one output link, we can start sending bits before the
entire packet arrives, correct?  (like the fluid model in class)

Thanks for your time,
Bret



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine4.Stanford.EDU!sandeept
From: Sandeep Vilas Tamhankar 
Newsgroups: su.class.cs244a
Subject: Fluid Model Slide
Date: Sat, 12 Jan 2002 14:34:30 -0800
Lines: 71
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2400

I stared at this slide for several minutes trying to figure out how the
example leads to the solution.  Finally, I decided to ignore the question
and just draw the Q(t) described in the solution.  Here's what I came up
with:

"During each cycle, the queue fills at rate 500b/s for 0.1s..." means that
you're receiving 50 bit packets in the "train", not 100 bits.  Secondly,
it means that the incoming rate is 500b/s, not 1000 as the example states.

"then drains at rate 500b/s for 0.1s", which makes sense since you
wouldn't start dumping a packet (of 50 bits) until you'd received those 50
bits, and your departure rate is 500b/s, as the example states.

So, if you draw Q(t), you get something like this:

   /\
  /  \
 /    \
/      \______________________
0  .1  .2                    1.0

The peak occurs at t=0.1 and has value 50 bits.  The average value of
Q(t) is the area under the curve from t=0 to t=1.  Since we've just got a
triangle, that's 0.5 * 0.2 * 50 = 5 bits, the final answer in the
solution.

For about a minute, I looked at the example graph, which shows data
arriving and departing simultaneously, and my interpretation of it was
that some earlier packet is departing while this packet is arriving.  But
if that were the case, it would mean that in the cycle, the router's
receiving more packets than are departing, which means that over time, its
buffers will grow to unbounded size (i.e. overflow).  Here's what I think
A(t) and D(t) should look like:

A(t):
                       -------- (etc.)
                      /
                     /
                    /
   -----------------   A(t)=50
  /
 /
/
0  0.1            1.0 1.1


D(t):
                          ------- (etc.)
                         /
                        /
                       /
      -----------------  D(t)=50
     /
    /
   /
---
0 0.1 0.2             1.1 1.2

In other words, D(t) is just a 0.1 shifted A(t).  And this makes sense
since the departure rate is the arrival rate.  And the Q(t) drawing I
started with is equal to A(t)-D(t).  If the departure rate was different
from the arrival rate, it would still have a similar offset, but the
slope would be different...and would make Q(t) not be an isosceles
triangle, but it would still be a triangle.

So, uh, any comments, critiques, general booing at my ineptitude, shouts
of "You are my networking hero; I'm naming my first child after you!" ?
Basically, am I totally off here?

-Sandeep

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: PS1, Problem 7(b)
Date: Sat, 12 Jan 2002 14:56:06 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2401

Can we sketch the fluid models as answers for the discreet processes that
are stable rather than write down X(t), d(t), D(t) as equations, or at least
just include those equations for the first second?  They are not
complicated, just annoying to write down as equations because the time
intervals are discreet.

Thanks,
Bret



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine4.Stanford.EDU!sandeept
From: Sandeep Vilas Tamhankar 
Newsgroups: su.class.cs244a
Subject: Fluid Model Slide Part II
Date: Sat, 12 Jan 2002 16:21:42 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2402

After reading question 7 a few times, I now realize the critical
mistaken assumption I made about that slide: I assumed it referred to a
store-and-forward router.  If you look at it as "continuous arrival and
service" processes, then the solution does make sense (although IMO it
does skip a few statements that would make it clearer).

Basically, you look at t=0 to t=0.1 as having a net arrival rate of
500b/s (1000 arriving - 500 departing), then t=0.1 to t=0.2 has a net
departure rate of 500b/s (500 departing - 0 arriving).  You end up with
the same Q(t) I graphed earlier.

Well, at least this exploration taught me more about the
store-and-forward case -- of course I could've learned that in due time
with question 7...I think...haven't actually done question 7 yet.

Sorry if I confused/bored you.  I'm going to go crawl in my cave now.

-Mr. Foot-in-mouth

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine41.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1, Problem 6
Date: 13 Jan 2002 02:38:22 GMT
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine41.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2403

"Bret Taylor"  writes:

>1. Does the output link have to have at least I seconds between consecutive
>packets on a link as well?

No, you can assume continuous transmission over the output link.

>2. Since there is only one output link, we can start sending bits before the
>entire packet arrives, correct?  (like the fluid model in class)

No, the router is store-and-forward.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine4.Stanford.EDU!sandeept
From: Sandeep Vilas Tamhankar 
Newsgroups: su.class.cs244a
Subject: PS1, Question 9b
Date: Sat, 12 Jan 2002 18:53:07 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2404

1. Is this a store-and-forward switch, or continuous?
2. If store-and-forward, what's the packet size and inter-packet delay?

Thanks.

-Sandeep

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine39.Stanford.EDU!aminf13
From: Amin Firoozshahian 
Newsgroups: su.class.cs244a
Subject: A problem with echodemo Makefile
Date: Sat, 12 Jan 2002 19:36:11 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine39.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2405



  Hi everybody,

  I have a problem using purfiy with echodemo, when I issue "make
purify.all" command, I get the following message from purfiy :

"In order for Rational PurifyPlus to work properly, you must source
the appropriate shell resource file in /usr/pubsw/etc/rational. See
the release announcement at
    http://ls.stanford.edu/services/pubsw/package/licensed/rational.html
for more details."

What shall I do? I coulndn't find any useful info about this appropriate
shell in the given link.

  Yousr,
  Amin

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: HW Q. #6
Date: Sat, 12 Jan 2002 19:51:11 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2406

Hi,

  The problem states that "Only one of the input links is active".
Does that mean only one of the links is active at any given time
or does it mean we can completely ignore the other two links
treating them as meaningles, red-herrings thrown in at the whim of
the problem creator?  Any insight would be greatly appreciated.
Thanks

                        ~~Martin

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: A problem with echodemo Makefile
Date: Sat, 12 Jan 2002 20:46:39 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2407

This is excerpted from an earlier post

>You need to source the csh script in /usr/pubsw/etc/rational
>
> >source /usr/pubsw/etc/rational/purifyplus_setup.csh
>
>  should do the trick if you are using csh/tcsh. I've added the
> line to my .cshrc so I don't have to bother sourcing it by hand each time
> I log on.

--Russ

"Amin Firoozshahian"  wrote in message

>
>
>   Hi everybody,
>
>   I have a problem using purfiy with echodemo, when I issue "make
> purify.all" command, I get the following message from purfiy :
>
> "In order for Rational PurifyPlus to work properly, you must source
> the appropriate shell resource file in /usr/pubsw/etc/rational. See
> the release announcement at
>     http://ls.stanford.edu/services/pubsw/package/licensed/rational.html
> for more details."
>
> What shall I do? I coulndn't find any useful info about this appropriate
> shell in the given link.
>
>   Yousr,
>   Amin
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: Are the slides from Review Session (today) posted online?
Date: Sat, 12 Jan 2002 23:32:13 -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 1010907060 7412 171.66.211.98 (13 Jan 2002 07:31:00 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2408


Until they are posted (they'll be on the "timetable" web page),
you can always look at them on the video:
   
http://scpd.stanford.edu/scpd/students/Video/embed.asp?Stream=http://cobb.stanford.edu/winter02/cs244a/020111ps/020111-cs244aps-100.wmv&ChatURL=http://chat.stanford.edu/jchat/cs244a.asp&HomePage=http://www.stanford.edu/class/cs244a/&CourseName=CS244A&videoXML=http://stanford-online.stanford.edu/winter2002/cs244avideo.xml

- Nick
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: Fluid Model Slide
Date: Sat, 12 Jan 2002 23:41:29 -0800
Organization: Stanford University
Lines: 33
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 1010907617 7473 171.66.211.98 (13 Jan 2002 07:40:17 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2409

Sandeep,

You're on the right tracks, but I think you might be confused
about the meaning of A(t), D(t) on slide 33 of Handout #3.

A good way to review this (and any material) is from the
online video. You'll find this portion at:
 
http://scpd.stanford.edu/scpd/students/Video/embed.asp?Stream=http://cobb.stanford.edu/winter02/cs244a/020110/020110-cs244a-100.wmv&ChatURL=http://chat.stanford.edu/jchat/cs244a.asp&HomePage=http://www.stanford.edu/class/cs244a/&CourseName=CS244A&videoXML=http://stanford-online.stanford.edu/winter2002/cs244avideo.xml
Then go to "Fluid Model".


The problem takes some thinking about to find the solution,
but the question (and solution) are correct. 

You were right to draw Q(t). It makes the answer much
easier if you start there. From the question, you
correctly deduced Q(t). 
During the first 0.1s, bits are arriving at 1000b/s
and departing at 500b/s. So the net effect is that they
accumulate in the queue at 1000-500=500b/s. By the
end of 0.1s the queue has 50 bits in it. Because
no more bits arrive in the period [0.1,0.2], the
queue empties at 500b/s. So the average queue
occupancy over the period [0,0.2] is the same
as the average occupancy over the period [0,0.1]
which is 0.5 x (0.1 x 500) = 25 bits. The rest
follows from the normal equation for an expected
value.

Hope this helps.

- Nick
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: PS1, Problem 7(b)
Date: Sat, 12 Jan 2002 23:44:48 -0800
Organization: Stanford University
Lines: 10
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 1010907815 7532 171.66.211.98 (13 Jan 2002 07:43:35 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2410

You need to write down all the equations.
It's good practice and will make you a better person ;-)

More importantly, it will prepare you for some nice
concepts later in the class when we'll be talking about
how to provide delay guarantees from end to end in a
packet switched network. The idea builds on these fluid
models.

- Nick
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Yichen Xie 
Newsgroups: su.class.cs244a
Subject: testhw.pl & submit_test.pl
Date: Sun, 13 Jan 2002 00:41:14 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: dn800cb149.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011014
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2411

Has anyone had any success with the test scripts yet? I can't find 
testhw.pl mentioned in the specification, and submit_test.pl fails on 
some permission errors...

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: More trouble with purify
Date: Sun, 13 Jan 2002 00:56:32 -0800
Lines: 42
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2412

Hi,

I cannot make purify work for the echodemo. This is what I did:
After making the echodemo, I tried to run purify manually by writting

purify gcc -o echodemo.purify echodemo.o -lsocket -lnsl

This what I get:

Purify 2002.05.00 Solaris 2 (32-bit) Copyright (C) 1992-2001 Rational
Software Corp.  All rights reserved.
Instrumenting: echodemo.o  Linking
gcc: file path prefix
`/usr/pubsw/apps/rational-2002.05.00/releases/purify.sol.2002.05.00/nld32/'
never used

I already sourced the environment script for running purify.

Please, can you help me know my problem? and what is the correct
syntax to run purify. I tried for a long time and till now I cannot figure
it :(

I also tried to run pruify by typing:
 purify gcc -g -O0 -ansi -Wall -DSOLARIS  -o echodemo.purify  echodemo.o
-lsocket -lnsl

But I got the same previous error.

Another thing, in the provided Makefile, there is the following line:
${BINS.PURIFY}: ${OBJS}
	${PURIFY} ${CC} ${CCFLAGS} -o 

Shouldn't this run Purify automatically?

By the way, I am connected to Solaris using xwin. I tried to run purify
from elaine and saga machine. In both cases, I am having the same above
problem.

Thanks,

Moh'd

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga19.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: PS1,problem 9c
Date: Sun, 13 Jan 2002 01:34:30 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2413

hi

In part (ii), it is not clear if the idle periods "I" for the two
processes can overlap. If so, then how do we decide on the overlapping
period? It seems like that the solution needs to depend on this
overlapping period.

thanks
abhishek

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!homa
From: Alex Khomenko 
Newsgroups: su.class.cs244a
Subject: Re: More trouble with purify
Date: Sun, 13 Jan 2002 02:22:28 -0800
Lines: 59
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Moh'd Saleem Saleem Alrawashdeh 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2414


Purify only instruments your executable, but you then you need to run it.
You've done everything correctly and you can disregard the "file path
prefix" warning. You just need one more step - running "echodemo.purify"
which purify builds for you.

Hope this helps,
Alex

On Sun, 13 Jan 2002, Moh'd Saleem Saleem Alrawashdeh wrote:

> Hi,
>
> I cannot make purify work for the echodemo. This is what I did:
> After making the echodemo, I tried to run purify manually by writting
>
> purify gcc -o echodemo.purify echodemo.o -lsocket -lnsl
>
> This what I get:
>
> Purify 2002.05.00 Solaris 2 (32-bit) Copyright (C) 1992-2001 Rational
> Software Corp.  All rights reserved.
> Instrumenting: echodemo.o  Linking
> gcc: file path prefix
> `/usr/pubsw/apps/rational-2002.05.00/releases/purify.sol.2002.05.00/nld32/'
> never used
>
> I already sourced the environment script for running purify.
>
> Please, can you help me know my problem? and what is the correct
> syntax to run purify. I tried for a long time and till now I cannot figure
> it :(
>
> I also tried to run pruify by typing:
>  purify gcc -g -O0 -ansi -Wall -DSOLARIS  -o echodemo.purify  echodemo.o
> -lsocket -lnsl
>
> But I got the same previous error.
>
> Another thing, in the provided Makefile, there is the following line:
> ${BINS.PURIFY}: ${OBJS}
> 	${PURIFY} ${CC} ${CCFLAGS} -o 
>
> Shouldn't this run Purify automatically?
>
> By the way, I am connected to Solaris using xwin. I tried to run purify
> from elaine and saga machine. In both cases, I am having the same above
> problem.
>
> Thanks,
>
> Moh'd
>
>

-- 
Knowledge is a deadly friend when no one sets the rules.
The fate of all mankind I see is in the hands of fools. (KC "Epitaph")

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: More trouble with purify
Date: Sun, 13 Jan 2002 10:03:29 -0800
Lines: 79
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine5.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2415

Also, you don't have to type the compile line.  The 'all.purify' 
Makefile target does it for you.  So just type:

     make all.purify

and it'll build echodemo.purify.

-Sandeep
P.S. Make sure you have the Makefile, that was located in the same 
directory where you got echodemo.c.

Alex Khomenko wrote:

> Purify only instruments your executable, but you then you need to run it.
> You've done everything correctly and you can disregard the "file path
> prefix" warning. You just need one more step - running "echodemo.purify"
> which purify builds for you.
> 
> Hope this helps,
> Alex
> 
> On Sun, 13 Jan 2002, Moh'd Saleem Saleem Alrawashdeh wrote:
> 
> 
>>Hi,
>>
>>I cannot make purify work for the echodemo. This is what I did:
>>After making the echodemo, I tried to run purify manually by writting
>>
>>purify gcc -o echodemo.purify echodemo.o -lsocket -lnsl
>>
>>This what I get:
>>
>>Purify 2002.05.00 Solaris 2 (32-bit) Copyright (C) 1992-2001 Rational
>>Software Corp.  All rights reserved.
>>Instrumenting: echodemo.o  Linking
>>gcc: file path prefix
>>`/usr/pubsw/apps/rational-2002.05.00/releases/purify.sol.2002.05.00/nld32/'
>>never used
>>
>>I already sourced the environment script for running purify.
>>
>>Please, can you help me know my problem? and what is the correct
>>syntax to run purify. I tried for a long time and till now I cannot figure
>>it :(
>>
>>I also tried to run pruify by typing:
>> purify gcc -g -O0 -ansi -Wall -DSOLARIS  -o echodemo.purify  echodemo.o
>>-lsocket -lnsl
>>
>>But I got the same previous error.
>>
>>Another thing, in the provided Makefile, there is the following line:
>>${BINS.PURIFY}: ${OBJS}
>>	${PURIFY} ${CC} ${CCFLAGS} -o 
>>
>>Shouldn't this run Purify automatically?
>>
>>By the way, I am connected to Solaris using xwin. I tried to run purify
>>from elaine and saga machine. In both cases, I am having the same above
>>problem.
>>
>>Thanks,
>>
>>Moh'd
>>
>>
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga17.Stanford.EDU!aminf13
From: Amin Firoozshahian 
Newsgroups: su.class.cs244a
Subject: getservbyname
Date: Sun, 13 Jan 2002 13:02:26 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2416



   Hi everybody,

  I have a question abot getservbyname, as far as I've understood, this
function returns a port number associated with the requried service and
specified protocol. I think that this port number is used in the local
host not in the server.

       First, am I right?

       Second, if I am, then why should we use this same port number to
connect the server? (in echodemo, I mean)

       Third, in the assignment we should use the specified port number
(by the user) or default FTP port (21) to connect the FTP  server,
shouldn't we?

   Yours,
   Amin

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!homa
From: Alex Khomenko 
Newsgroups: su.class.cs244a
Subject: PS1 Problem 7b
Date: Sun, 13 Jan 2002 16:30:17 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2417


When we are modeling the queue of a store-and-forward router, should we
still compute X(t) (queue occupancy) the same way as in the fluid model?

E.g. if the queue contains a 100-bit packet and it is being transmitted
out on a 100 bps link, does X(t) decrease linearly from 100 to 0?

Thanks,
Alex

-- 
Knowledge is a deadly friend when no one sets the rules.
The fate of all mankind I see is in the hands of fools. (KC "Epitaph")

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Accessing the ftpd
Date: Sun, 13 Jan 2002 16:44:55 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2418

Hi,

I am trying to get my hands on the ftp dameon to test with. However, for
both given directories in the handout:

/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd
/usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/

I have no permission.

Can you help me?

Thanks,

Moh'd



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Accessing the ftpd
Date: Sun, 13 Jan 2002 17:49:07 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2419

Matt placed a copy of the binary in /usr/class/cs244a/bin earlier.

-Sandeep

Moh'd Saleem Saleem Alrawashdeh wrote:

> Hi,
> 
> I am trying to get my hands on the ftp dameon to test with. However, for
> both given directories in the handout:
> 
> /usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/wu-ftpd-2.0/bin/ftpd
> /usr/class/cs244a/WWW/homeworks/hw1/ftpd_src/
> 
> I have no permission.
> 
> Can you help me?
> 
> Thanks,
> 
> Moh'd
> 
> 
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: PASV mode
Date: Sun, 13 Jan 2002 18:13:40 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2420

  Hello,

    Can we use PASV mode for LIST and RETR?

                Thanks.
                ~~Martin

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine22.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1,problem 9c
Date: 14 Jan 2002 02:20:12 GMT
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine22.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2421

>In part (ii), it is not clear if the idle periods "I" for the two
>processes can overlap. If so, then how do we decide on the overlapping
>period? It seems like that the solution needs to depend on this
>overlapping period.


They can, depending on the length of the burst.  You should consider
both cases (overlapping and not) in your solution.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine22.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS1 Problem 7b
Date: 14 Jan 2002 02:23:26 GMT
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine22.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2422


>When we are modeling the queue of a store-and-forward router, should we
>still compute X(t) (queue occupancy) the same way as in the fluid model?

>E.g. if the queue contains a 100-bit packet and it is being transmitted
>out on a 100 bps link, does X(t) decrease linearly from 100 to 0?

Yes.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Response size
Date: Sun, 13 Jan 2002 19:42:54 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2423

The project doc says that no NVT ASCII string will be longer than 1024 
bytes.  Does this mean that no response from the ftp server (on the 
control connection) will be longer than 1024 bytes?

Thanks.

-Sandeep
-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: HW Q. #6
Date: 14 Jan 2002 05:45:32 GMT
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga21.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2424

Yes, you can treat this as effectively a single input, single output 
problem.

Arun

Martin Casado  wrote:

: Hi,

:   The problem states that "Only one of the input links is active".
: Does that mean only one of the links is active at any given time
: or does it mean we can completely ignore the other two links
: treating them as meaningles, red-herrings thrown in at the whim of
: the problem creator?  Any insight would be greatly appreciated.
: Thanks

:                         ~~Martin

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: testhw.pl & submit_test.pl
Date: 14 Jan 2002 05:50:55 GMT
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga21.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2425

We've looked into the submit script and think we've fixed the permissions 
problem. Let us know if you continue to have difficulty.

Yichen Xie  wrote:

: Has anyone had any success with the test scripts yet? I can't find 
: testhw.pl mentioned in the specification, and submit_test.pl fails on 
: some permission errors...

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: getservbyname
Date: 14 Jan 2002 06:01:29 GMT
Lines: 29
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga21.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2426


Yes, this is correct. Getservbyname returns the port associated with the 
FTP service. It is assumed that this the default port on which this 
service can be expected to be provided. 

For ftpcopy, if a port is supplied you should use it; oteherwise, you 
shoud prefer to use the default port determined by getservbyname.

Arun

:    Hi everybody,

:   I have a question abot getservbyname, as far as I've understood, this
: function returns a port number associated with the requried service and
: specified protocol. I think that this port number is used in the local
: host not in the server.

:        First, am I right?

:        Second, if I am, then why should we use this same port number to
: connect the server? (in echodemo, I mean)

:        Third, in the assignment we should use the specified port number
: (by the user) or default FTP port (21) to connect the FTP  server,
: shouldn't we?

:    Yours,
:    Amin

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: PASV mode
Date: 14 Jan 2002 06:33:21 GMT
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga21.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2427

It is not necessary to use PASV to complete this assignment. However any 
reasonable technique that implements the required functionality, and is 
explained in your documentation, is acceptable.

Arun

Martin Casado  wrote:
:   Hello,

:     Can we use PASV mode for LIST and RETR?

:                 Thanks.
:                 ~~Martin

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Response size
Date: 14 Jan 2002 07:00:21 GMT
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga20.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2428

Yes, this is acceptable for NVT strings read over the control connection.  
You do not need to worry about servers which return longer responses (some
servers have unusually long greetings, for example). The strings sent over
the data connection should not be limited, since a LIST string can be of
arbitrary length.

Arun

 Sandeep Tamhankar 
 wrote:

: The project doc says that no NVT ASCII string will be longer than 1024 
: bytes.  Does this mean that no response from the ftp server (on the 
: control connection) will be longer than 1024 bytes?

: Thanks.

: -Sandeep
: -- 
: ---------------------------------------------
: Sandeep V. Tamhankar			
: M.S. Student
: Computer Science
: Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: bonus question
Date: Sun, 13 Jan 2002 23:07:33 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2429

Dear all,

There hasn't been 10 persons who get correct answer. Please get your
answer in ASAP if you want to win the prize.

Good luck,

Xin

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: store-and-forward queues
Date: 14 Jan 2002 07:55:07 GMT
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga19.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2430

When the first packet arrives at a store-and-forward router with an empty
queue, is it stored in the queue before it is forwarded, or is it stored
and handled somewhere else?

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: store-and-forward queues
Date: 14 Jan 2002 10:06:42 GMT
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga3.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2431

The packet is stored completely in the queue before it can be sent on the
outbound link. Thus immediately before the service process begins to
transmit the buffered packet, the queue will have one packet worth of bits 
in it.

Arun

Derrick Wen-Shiuan Tong  wrote:

: When the first packet arrives at a store-and-forward router with an empty
: queue, is it stored in the queue before it is forwarded, or is it stored
: and handled somewhere else?

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Donghyun Kim" 
Newsgroups: su.class.cs244a
Subject: Q9
Date: Mon, 14 Jan 2002 02:12:03 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: kidhyun.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2432

could you clarify what is circuit switch and what is packet switch?



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Mudassir I Sheikha" 
Newsgroups: su.class.cs244a
Subject: email address for problem sets?
Date: Mon, 14 Jan 2002 03:01:02 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: pakistan.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Xref: nntp.stanford.edu su.class.cs244a:2433

is there an email address where we can mail our problem sets if we can't
make it to gates on time?

mudassir




.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Q9
Date: 14 Jan 2002 18:42:21 GMT
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga3.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2434

There is a relatively thorough discussion in the lecture notes for
Thursday (slides 18-22). One way to think about the two is that circuit
switch has some state associated with a connection between two endpoints,
allowing it to make some guarantees about the minimum available data rate.
With packet switch, there is no such state, and the packets are routed
independently of one another. (At the end of the quarter we'll discuss
some ways you can try to make such guarantees using packet switch, though
for the time being, you do not need to worry about this).

 Donghyun Kim  wrote:
: could you clarify what is circuit switch and what is packet switch?



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: Q9: Simultaneous arrival of packets
Date: 14 Jan 2002 21:43:30 GMT
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga19.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2435

For the router in question 9, if two packets are arriving on both inputs
simultaneously (one on each input), would they be received concurrently or
sequentially?

In other words, would the arrive duration be 

 (bits in packet / arrival rate)         concurrently received

or 

 (2 * bits in packet / arrival rate)     sequentially received


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Are the slides from Review Session (today) posted online?
Date: Mon, 14 Jan 2002 14:05:39 -0800
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2436

They are online now. Sorry for the delay.

  Guido

> Dear Professor and TAs,
> 
>    Are the slides from Review Session today available online? I cannot
> find them anywhere. If not, can you post them?
> 
> Thanks,
> 
> 
> An-Hoe

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: PS1, Question 9b
Date: Mon, 14 Jan 2002 14:18:38 -0800
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2437

Sandeep ,

> 1. Is this a store-and-forward switch, or continuous?
> 2. If store-and-forward, what's the packet size and inter-packet delay?

Does this make a difference for you? To guarantee that there will be no 
overrun the switch has to not drop packets with worst case packet size and 
inter-packet delay. You can assume that if it is store and forward it has 
enough buffer space to store at least one packets.

  Guido
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Lakshdan Sundar Maddali 
Newsgroups: su.class.cs244a
Subject: Question to SITN Students : IS there is a Web Based Access to NewsGroup
Date: Mon, 14 Jan 2002 14:58:29 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic0.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2438

Hi Fellow SITN students,

  I am Lakshman Maddali a NDO Student taking  CS244A course.

  i am unable to view the postings on the newsgroup from outside
stanford [error message is
  news server  not found] . i believe this is due to the fact that the
news servers are
  internal to stanford only. I am able to access the newsgroup by the
  setting the SSH Port  forwards for X terminals, and opening the
newsgroup
  from  epic.stanford.edu. But doing so is very clumsy. Wanted to know
if there is
  any better way [ may be a http based interface ]

Thanks

Lakshman Maddali
.

Path: shelby.stanford.edu!nntp.stanford.edu!spevack.Stanford.EDU!spevack
From: Max Spevack 
Newsgroups: su.class.cs244a
Subject: PS1: 9c question
Date: Mon, 14 Jan 2002 15:23:18 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: spevack.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2439

Hello,

Is it proper to assume, when planning for the worst case, that the gap
between bursts, I, is zero?  It seems like we would want our router to be
able to function when it is receiving a continuous stream of bits without
pause.

Is it reasonable to proceed like this?

Thanks,
Max

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Enrollment on the EE website
Date: Mon, 14 Jan 2002 16:13:44 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2440

From lecture number 2 I came to know that I have to enroll on EE website.
Can I get a link to the same?

I tried
https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=ee384
and got an error that my student number is not in the class list.

Do I need to enroll somewhere else?

Thanks,
Dhawal Kumar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Enrollment on the EE website
Date: Mon, 14 Jan 2002 17:41:45 -0800
Lines: 59
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma10.stanford.edu
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------923E4488853F279527FC453A"
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2441


--------------923E4488853F279527FC453A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Hello everyone,
Please make sure you enroll to the cs244a class, not the ee384.
the correct url is
https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=cs244a

if you receive a message saying 'you're already subscribed' then everything
is fine.

Regards,
Antonios.

Dhawal Kumar wrote:

> From lecture number 2 I came to know that I have to enroll on EE website.
> Can I get a link to the same?
>
> I tried
> https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=ee384
> and got an error that my student number is not in the class list.
>
> Do I need to enroll somewhere else?
>
> Thanks,
> Dhawal Kumar

--------------923E4488853F279527FC453A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
 
<br>Hello everyone,
<br>Please make sure you enroll to the cs244a class, not the ee384.
<br>the correct url is <a href="https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=ee384">https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=cs244a</a><a href="https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=ee384"></a>
<p>if you receive a message saying 'you're already subscribed' then everything
is fine.
<p>Regards,
<br>Antonios.
<p>Dhawal Kumar wrote:
<blockquote TYPE=CITE>From lecture number 2 I came to know that I have
to enroll on EE website.
<br>Can I get a link to the same?
<p>I tried
<br><a href="https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=ee384">https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=ee384</a>
<br>and got an error that my student number is not in the class list.
<p>Do I need to enroll somewhere else?
<p>Thanks,
<br>Dhawal Kumar</blockquote>
</html>

--------------923E4488853F279527FC453A--

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Closing sockets and a random experience
Date: Mon, 14 Jan 2002 18:26:41 -0800
Lines: 29
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2442

I noticed in the example echo client code that on error it closes the 
socket and then exits with code 1.  Is there any reason to do this? 
Since the process is dying, wouldn't the socket automatically get 
cleaned up (by the OS)?  I look at this as analogous to free'ing 
allocated variables before exiting.

Also, on a semi-related subject, has anyone run their ftpcopy program on 
Linux?  I started the project on my home computer, and when I called 
getservbyname to get ftp's default port number (21), I ended up 
receiving 5376.  This seemed rather odd, considering that /etc/services 
did clearly state that ftp over tcp was running on port 21.  When I ran 
the code on an elaine machine, I got the expected value.

Here's a theory: the port returned in the struct is in network-byte 
ordering, which PCs aren't, but Solaris boxes are.  PC's and Solaris 
boxes have different endian-ness, right?

Anyway, I promptly switched to using an elaine machine, but I thought it 
was kinda interesting.

-Sandeep

-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: Closing sockets and a random experience
Date: Mon, 14 Jan 2002 18:48:03 -0800
Lines: 51
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2443

I am pretty sure this is because of byte ordering.  It works on my Linux
box.  The only catch is the Solaris link flags ("-lsocket -lnsl").  My
makefile contanins these lines to make it easier

LDFLAGS = -lsocket -lnsl

$(EXECUTABLE): $(LINKERFILES)
        $(PRELINK) $(CC) $(CFLAGS) -o $(EXECUTABLE) $(LINKERFILES)
$(LDFLAGS)

To make on Linux, I just type

    % make LDFLAGS=

The default make works on Solaris so their grading script will work.

Bret

"Sandeep Tamhankar"  wrote in message

> I noticed in the example echo client code that on error it closes the
> socket and then exits with code 1.  Is there any reason to do this?
> Since the process is dying, wouldn't the socket automatically get
> cleaned up (by the OS)?  I look at this as analogous to free'ing
> allocated variables before exiting.
>
> Also, on a semi-related subject, has anyone run their ftpcopy program on
> Linux?  I started the project on my home computer, and when I called
> getservbyname to get ftp's default port number (21), I ended up
> receiving 5376.  This seemed rather odd, considering that /etc/services
> did clearly state that ftp over tcp was running on port 21.  When I ran
> the code on an elaine machine, I got the expected value.
>
> Here's a theory: the port returned in the struct is in network-byte
> ordering, which PCs aren't, but Solaris boxes are.  PC's and Solaris
> boxes have different endian-ness, right?
>
> Anyway, I promptly switched to using an elaine machine, but I thought it
> was kinda interesting.
>
> -Sandeep
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Closing sockets and a random experience
Date: 15 Jan 2002 03:40:42 GMT
Lines: 46
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine22.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2444

Yes, this is an issue caused by the byte ordering on your system. The
value returned by the call is stored as 0x0015, which on a little endian
machine is interpreted as 0x1500 (5376). Since all x86 PCs are little
endian, this is a problem. On the Sun workstations, the byte ordering is
big endian, which is incidentally the same as network byte ordering. Thus 
the proper port 21 is read.

To avoid this sort problem, you merely need to use the functions ntohs()  
and ntohl() when grabbing data out of a structure containing fields
formatted in network byte order. This will transparently handle endianess
issues by either doing nothing or swapping the bytes around. This will
ensure cross machine portability, which is certainly something we are
looking for.

Arun

Sandeep Tamhankar  wrote:
: I noticed in the example echo client code that on error it closes the 
: socket and then exits with code 1.  Is there any reason to do this? 
: Since the process is dying, wouldn't the socket automatically get 
: cleaned up (by the OS)?  I look at this as analogous to free'ing 
: allocated variables before exiting.

: Also, on a semi-related subject, has anyone run their ftpcopy program on 
: Linux?  I started the project on my home computer, and when I called 
: getservbyname to get ftp's default port number (21), I ended up 
: receiving 5376.  This seemed rather odd, considering that /etc/services 
: did clearly state that ftp over tcp was running on port 21.  When I ran 
: the code on an elaine machine, I got the expected value.

: Here's a theory: the port returned in the struct is in network-byte 
: ordering, which PCs aren't, but Solaris boxes are.  PC's and Solaris 
: boxes have different endian-ness, right?

: Anyway, I promptly switched to using an elaine machine, but I thought it 
: was kinda interesting.

: -Sandeep

: -- 
: ---------------------------------------------
: Sandeep V. Tamhankar			
: M.S. Student
: Computer Science
: Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Antonios Hondroulis 
Newsgroups: su.class.cs244a
Subject: Re: Closing sockets and a random experience
Date: Mon, 14 Jan 2002 21:06:21 -0800
Lines: 56
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga15.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2445

Sandeep Tamhankar wrote:
> 
> I noticed in the example echo client code that on error it closes the
> socket and then exits with code 1.  Is there any reason to do this?
> Since the process is dying, wouldn't the socket automatically get
> cleaned up (by the OS)?  I look at this as analogous to free'ing
> allocated variables before exiting.
> 
> Also, on a semi-related subject, has anyone run their ftpcopy program on
> Linux?  I started the project on my home computer, and when I called
> getservbyname to get ftp's default port number (21), I ended up
> receiving 5376.  This seemed rather odd, considering that /etc/services
> did clearly state that ftp over tcp was running on port 21.  When I ran
> the code on an elaine machine, I got the expected value.
> 
> Here's a theory: the port returned in the struct is in network-byte
> ordering, which PCs aren't, but Solaris boxes are.  PC's and Solaris
> boxes have different endian-ness, right?
> 
> Anyway, I promptly switched to using an elaine machine, but I thought it
> was kinda interesting.
> 
> -Sandeep
> 
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 

Hello Sandeep,

with regard to your first question (explicit close
vs. exit): Even though these are kernel implementation
details, it can be the case that an exit from a program
causes buffered (for transmission) data to be discarded.
Close() on the other hand, depending on the options
of the socket (set when it was opened) may or may not have
to wait until all pending data has been transmitted. For example, the
option SO_LINGER makes a close() block until
all pending data has been transmitted. Considering that
during an exit the system is trying to reclaim resourses
in a reasonable amount of time, I believe that a sensible
implementation would probably discard buffered data, rather
than try to deliver them reliably (in the case of TCP).
In conclusion, use close() to ensure correct semantics!

As for the port number, Please note that this is in
network byte order, which can be different from the
machine's byte order. You can use the ntohs(), ntohl()
functions to make sure you read the right numbers at
any machine running your code.

Regards,
Antonios.
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Antonios Hondroulis 
Newsgroups: su.class.cs244a
Subject: Re: PS1: 9c question
Date: Mon, 14 Jan 2002 21:11:28 -0800
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga15.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2446

Max Spevack wrote:
> 
> Hello,
> 
> Is it proper to assume, when planning for the worst case, that the gap
> between bursts, I, is zero?  It seems like we would want our router to be
> able to function when it is receiving a continuous stream of bits without
> pause.
> 
> Is it reasonable to proceed like this?
> 
> Thanks,
> Max

Your answer should apply for the general case where I is
any non-negative number, not just 0. Think of it as
a function of I. Of course this function of I may or maynot
have its maximum value at I=0, but this isn't what the
assignment is about.

Regards,
Antonios.
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Antonios Hondroulis 
Newsgroups: su.class.cs244a
Subject: Re: Q9: Simultaneous arrival of packets
Date: Mon, 14 Jan 2002 21:18:20 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga15.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2447

Derrick Wen-Shiuan Tong wrote:
> 
> For the router in question 9, if two packets are arriving on both inputs
> simultaneously (one on each input), would they be received concurrently or
> sequentially?
> 
> In other words, would the arrive duration be
> 
>  (bits in packet / arrival rate)         concurrently received
> 
> or
> 
>  (2 * bits in packet / arrival rate)     sequentially received

Hi Derrick,
Please keep in mind that in circuit switching there's a
circuit set up before data transmission can proceed. Also,
packet switches have buffers to store packets arriving
on the input ports before they can be forwarded on the
output ports.

Regards,
Antonios.
.

Path: shelby.stanford.edu!nntp.stanford.edu!epic24.Stanford.EDU!znash
From: Zack Al-Ubaidi Nash 
Newsgroups: su.class.cs244a
Subject: getsockname
Date: Mon, 14 Jan 2002 21:35:11 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic24.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2448

Hello,
	I am having a hard time determining the local ip address after
connecting a socket to the ftp server.  I need to obtain the local ip
address so that I can bind the data socket to that ip address and then retrieve the port
number by using getsockname.  I am having a hard time retrieving the local
ip address to pass to bind.  My understanding running getsockname after a
socket is connected not binded will return the local ip and port num, but
all I recieve is a 0 or null.

thanks,
Zack

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Yichen Xie 
Newsgroups: su.class.cs244a
Subject: question about "ext" and filename matching
Date: Mon, 14 Jan 2002 21:43:39 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: dn800cb149.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011014
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2449

Does "extension" mean ftpcopy should match suffix ".ext" or just "ext"? 
In other words, should a.tgz match as a gz file? Thanks.

Yichen

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Failure to establish data connection
Date: Mon, 14 Jan 2002 22:49:47 -0800
Lines: 42
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2450

Hi,

I followed the steps mentioned in the handout to establish a data
connection. I have the following questions:

1. Should we use port 0 for the client? Or should we get a random port
that is larger than the 1024? Is there a way to know what are the nonused
ports so that we can use one of them?

2. For listen command, should the second parameter be 1 (since we will
have one outside connection with the server)?

3. About the 8 steps to establish a data connection, which are
mentioned in the handout. Why we need step 4 in the establishing of the
connection? Since the port of the socket is already defined in the bind()
step. And when we read it back using the getsockname(), we will always
get the same port number that we set in the bind step? So I am not finding
a use for it.

4. I did all the steps till 7 ( which is sending a ftp CMD over control
connection). For the PORT command, the server reply was successful.
However, when I sent the command "LIST \r\n" to start reading the
directory, what I got is Transient negative reply, with the following
message from the server:

Can't build data connection: Connection refused

I got this message, although the server returned a Positive Completion
Code for the PORT command that should precede it. I tried with Port 0 as
mentioned in the handout, and with port 1400 as a random port. For both
cases, I got the same wrong behavior.

I spent some time, but with no hope. I believe that I am doing everything
as mentioned in the handout, but I don't know why the server is not
accepting my data connection. I am conecting to ftp.stanford.edu, and
before this steps, I ran USER, PASS, TYPE commands successfully.

I will appreciate any help.
Thanks,

Moh'd

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!byang
From: Beverly Yang 
Newsgroups: su.class.cs244a
Subject: Re: testhw.pl & submit_test.pl
Date: Mon, 14 Jan 2002 23:04:37 -0800
Lines: 37
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2451


Actually, I am still having problems.  The file

/afs/ir/class/cs244a/bin/testhw.pl

doesn't exist.  The submit script in the same directory runs, but it gives
me the following output:

saga1:~/cs244a/hw1/test> /afs/ir/class/cs244a/bin/submit
Format: submit TA Assignment

TA is one of: croyer

Assignment is one of: hw1 hw2
hw1             - Selective Repeat
hw2             - Router Table


My TA is not listed, and the assignment names are incorrect.  It looks
like test_code.cfg contains the correct information, but is not being read
in correctly.  Please let us know when these problems have been fixed.

Thanks!

On 14 Jan 2002, Arun Upadhyaya Kishan wrote:

> We've looked into the submit script and think we've fixed the permissions
> problem. Let us know if you continue to have difficulty.
>
> Yichen Xie  wrote:
>
> : Has anyone had any success with the test scripts yet? I can't find
> : testhw.pl mentioned in the specification, and submit_test.pl fails on
> : some permission errors...
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: bonus question
Date: Mon, 14 Jan 2002 23:24:32 -0800
Organization: Stanford University
Lines: 6
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 1011079552 27898 171.66.211.98 (15 Jan 2002 07:25:52 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2452


Just to let everyone know that we now have the 10th
correct answer. The winner will be announced in due course.

Thanks,
- NM
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Alberto Robles 
Newsgroups: su.class.cs244a
Subject: downloading demo & ftp files?
Date: Mon, 14 Jan 2002 23:44:31 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2453

Hey Folks,

Is there a way to copy the demo & ftp files to our home directories
through AFS?

I can see the files and access them independently via http @
stanford.edu/class/cs244a/homeworks, but permissions to the
WWW prevent me from copying the entire the hw1 directory over via
/usr/class/cs244a/WWW/...

Cheers,
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 00:19:52 -0800
Lines: 43
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2454

I struggled with that for a few hours today, too.  I tried using 
inet_ntoa on a part of the hostent structure, but I couldn't get the 
damn thing to compile (and I tried casting all sorts of things all sorts 
of ways, too).

And just when I thought all hope was lost and that I should ask one of 
my friends (it took all my will power to not throw my computer off of my 
balcony at that point), I found an example on p. 243-244 of the Stevens 
book.

It really hurts when you run into something so simple (in the sense of, 
"Damn it, I just want my IP address, is that so much to ask for???), yet 
so seemingly insurmountable.

Good luck!

-Sandeep

Zack Al-Ubaidi Nash wrote:

> Hello,
> 	I am having a hard time determining the local ip address after
> connecting a socket to the ftp server.  I need to obtain the local ip
> address so that I can bind the data socket to that ip address and then retrieve the port
> number by using getsockname.  I am having a hard time retrieving the local
> ip address to pass to bind.  My understanding running getsockname after a
> socket is connected not binded will return the local ip and port num, but
> all I recieve is a 0 or null.
> 
> thanks,
> Zack
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: downloading demo & ftp files?
Date: Tue, 15 Jan 2002 00:25:23 -0800
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2455

Yeah, it's kind of annoying.  I was using a web browser on my home 
machine and wanted to download the files on elaine, so I ended up going 
through the web to find the exact URLs and using wget on elaine* to get 
the files.

If you're using a browser on a machine that has access to your home 
directory, then just click on the files in the browser and save them; 
it's the easiest way (particularly since we're only talking about 2-3 
files).

-Sandeep

Luis Alberto Robles wrote:

> Hey Folks,
> 
> Is there a way to copy the demo & ftp files to our home directories
> through AFS?
> 
> I can see the files and access them independently via http @
> stanford.edu/class/cs244a/homeworks, but permissions to the
> WWW prevent me from copying the entire the hw1 directory over via
> /usr/class/cs244a/WWW/...
> 
> Cheers,
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: Re: downloading demo & ftp files?
Date: Tue, 15 Jan 2002 00:47:03 -0800
Lines: 50
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2456

Thanks Sandeep - 

I used the click and save method for the 3 demo files, but also
wanted to snag the wu_ftp and parse files... 

"wget -r /cs244a/homeworks/hw1" did the trick 
( though it also downloaded every link and image from the cs244a site...
)

Nifty tool though.

Sandeep Tamhankar wrote:
> 
> Yeah, it's kind of annoying.  I was using a web browser on my home
> machine and wanted to download the files on elaine, so I ended up going
> through the web to find the exact URLs and using wget on elaine* to get
> the files.
> 
> If you're using a browser on a machine that has access to your home
> directory, then just click on the files in the browser and save them;
> it's the easiest way (particularly since we're only talking about 2-3
> files).
> 
> -Sandeep
> 
> Luis Alberto Robles wrote:
> 
> > Hey Folks,
> >
> > Is there a way to copy the demo & ftp files to our home directories
> > through AFS?
> >
> > I can see the files and access them independently via http @
> > stanford.edu/class/cs244a/homeworks, but permissions to the
> > WWW prevent me from copying the entire the hw1 directory over via
> > /usr/class/cs244a/WWW/...
> >
> > Cheers,
> >
> 
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 

-- 
       Luis Robles

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 08:31:30 -0800
Lines: 73
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2457

hi,
in the explanation of bind() (top of pg 92, stevens), it is mentioned that
a tcp client should normally not bind an ip address to the socket and
allow the kernel to do it when the socket connects.

does this apply to us while establishing the data connection, or is this
actually talking about what the server will do at its end? (it is the
server that has the outgoing link on the data connection).

any ideas?
thanks!
~Ashmi


On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:

> I struggled with that for a few hours today, too.  I tried using
> inet_ntoa on a part of the hostent structure, but I couldn't get the
> damn thing to compile (and I tried casting all sorts of things all sorts
> of ways, too).
>
> And just when I thought all hope was lost and that I should ask one of
> my friends (it took all my will power to not throw my computer off of my
> balcony at that point), I found an example on p. 243-244 of the Stevens
> book.
>
> It really hurts when you run into something so simple (in the sense of,
> "Damn it, I just want my IP address, is that so much to ask for???), yet
> so seemingly insurmountable.
>
> Good luck!
>
> -Sandeep
>
> Zack Al-Ubaidi Nash wrote:
>
> > Hello,
> > 	I am having a hard time determining the local ip address after
> > connecting a socket to the ftp server.  I need to obtain the local ip
> > address so that I can bind the data socket to that ip address and then retrieve the port
> > number by using getsockname.  I am having a hard time retrieving the local
> > ip address to pass to bind.  My understanding running getsockname after a
> > socket is connected not binded will return the local ip and port num, but
> > all I recieve is a 0 or null.
> >
> > thanks,
> > Zack
> >
> >
>
>
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 08:41:03 -0800
Lines: 48
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Sandeep Tamhankar 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2458


> I struggled with that for a few hours today, too.  I tried using
> inet_ntoa on a part of the hostent structure, but I couldn't get the
> damn thing to compile (and I tried casting all sorts of things all sorts
> of ways, too).
>
> And just when I thought all hope was lost and that I should ask one of
> my friends (it took all my will power to not throw my computer off of my
> balcony at that point), I found an example on p. 243-244 of the Stevens
> book.

I don't think the example on page 244 is really adequate.  The current
host may have multiple interfaces and there is no way to deduce which
interface the socket was bound to.  I think a better solution may be
to bind the socket to INADDR_ANY and request an ephemeral port, then
use getsockname().  Here is an excerpt from Steven's sock_bind_wild(..)


       socklen_t       len;

       struct sockaddr_in      sin;

       bzero(&sin, sizeof(sin));
       sin.sin_family = AF_INET;
       sin.sin_addr.s_addr = htonl(INADDR_ANY);
       sin.sin_port = htons(0);        /* bind ephemeral port */

       if (bind(sockfd, (SA *) &sin, sizeof(sin)) < 0)
               return(-1);
       len = sizeof(sin);
       if (getsockname(sockfd, (SA *) &sin, &len) < 0)
               return(-1);
       return(sin.sin_port);

I think you can get the octet/dot notation of the IP address using inet_ntoa(..),
but I haven't tried it.

                    HTH,
                    ~~m

> It really hurts when you run into something so simple (in the sense of,
> "Damn it, I just want my IP address, is that so much to ask for???), yet
> so seemingly insurmountable.
>
> Good luck!
>
> -Sandeep

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 09:47:33 -0800
Lines: 78
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2459

I tried this and got the same result as what I'd gotten yesterday during 
my unsuccessful attempts: an address of 0.0.0.0.  It seems that binding 
and getting the socket name doesn't update sin.sin_addr from the initial 
value that we set (INADDR_ANY, which == 0).

I agree that p. 244 is inadequate since you don't know which interface 
to use; there must be a way.  At the moment, however, I don't know what 
that way is.

If anyone knows the right way to do this, please don't be shy.  In the 
meantime, I'm going to ask a few friends (one of them is developing a 
C/C++ server right now, so the knowledge should be relatively fresh in 
his mind).

-Sandeep

Martin Casado wrote:

>>I struggled with that for a few hours today, too.  I tried using
>>inet_ntoa on a part of the hostent structure, but I couldn't get the
>>damn thing to compile (and I tried casting all sorts of things all sorts
>>of ways, too).
>>
>>And just when I thought all hope was lost and that I should ask one of
>>my friends (it took all my will power to not throw my computer off of my
>>balcony at that point), I found an example on p. 243-244 of the Stevens
>>book.
>>
> 
> I don't think the example on page 244 is really adequate.  The current
> host may have multiple interfaces and there is no way to deduce which
> interface the socket was bound to.  I think a better solution may be
> to bind the socket to INADDR_ANY and request an ephemeral port, then
> use getsockname().  Here is an excerpt from Steven's sock_bind_wild(..)
> 
> 
>        socklen_t       len;
> 
>        struct sockaddr_in      sin;
> 
>        bzero(&sin, sizeof(sin));
>        sin.sin_family = AF_INET;
>        sin.sin_addr.s_addr = htonl(INADDR_ANY);
>        sin.sin_port = htons(0);        /* bind ephemeral port */
> 
>        if (bind(sockfd, (SA *) &sin, sizeof(sin)) < 0)
>                return(-1);
>        len = sizeof(sin);
>        if (getsockname(sockfd, (SA *) &sin, &len) < 0)
>                return(-1);
>        return(sin.sin_port);
> 
> I think you can get the octet/dot notation of the IP address using inet_ntoa(..),
> but I haven't tried it.
> 
>                     HTH,
>                     ~~m
> 
> 
>>It really hurts when you run into something so simple (in the sense of,
>>"Damn it, I just want my IP address, is that so much to ask for???), yet
>>so seemingly insurmountable.
>>
>>Good luck!
>>
>>-Sandeep
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 12:13:17 -0800
Lines: 38
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2460

See page 250 in Stevens.  There is a method that returns the local host's IP
addresses using the uname() method and subsequent networking method calls:

char **my_addrs(int *addrtype)
{
    struct hostent *hptr;
    struct utsname myname;

    if (uname(&myname) < 0)
        return NULL;

    if ((hptr = gethostbyname(myname.nodename)) == NULL)
        return NULL;

    *addrtype = hptr->h_addrtype;
    return hptr->h_addr_list;
}

Hope this works,
Bret

"Zack Al-Ubaidi Nash"  wrote in message

> Hello,
> I am having a hard time determining the local ip address after
> connecting a socket to the ftp server.  I need to obtain the local ip
> address so that I can bind the data socket to that ip address and then
retrieve the port
> number by using getsockname.  I am having a hard time retrieving the local
> ip address to pass to bind.  My understanding running getsockname after a
> socket is connected not binded will return the local ip and port num, but
> all I recieve is a 0 or null.
>
> thanks,
> Zack
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 12:29:48 -0800
Lines: 50
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2461

To get the local ip address, I used the getenv command to get the host
name and resolved that host name using the gethostbyname. It gives me back
a 32 bit address. I think that it should be fine.

Moh'd


 On Tue, 15 Jan 2002, Bret Taylor wrote:

> See page 250 in Stevens.  There is a method that returns the local host's IP
> addresses using the uname() method and subsequent networking method calls:
>
> char **my_addrs(int *addrtype)
> {
>     struct hostent *hptr;
>     struct utsname myname;
>
>     if (uname(&myname) < 0)
>         return NULL;
>
>     if ((hptr = gethostbyname(myname.nodename)) == NULL)
>         return NULL;
>
>     *addrtype = hptr->h_addrtype;
>     return hptr->h_addr_list;
> }
>
> Hope this works,
> Bret
>
> "Zack Al-Ubaidi Nash"  wrote in message
> 
> > Hello,
> > I am having a hard time determining the local ip address after
> > connecting a socket to the ftp server.  I need to obtain the local ip
> > address so that I can bind the data socket to that ip address and then
> retrieve the port
> > number by using getsockname.  I am having a hard time retrieving the local
> > ip address to pass to bind.  My understanding running getsockname after a
> > socket is connected not binded will return the local ip and port num, but
> > all I recieve is a 0 or null.
> >
> > thanks,
> > Zack
> >
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 12:33:46 -0800
Lines: 77
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2462


Here is how ftp in inetutils does it

First it connects to the remote ftpd (for the command connection not the data)

  connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0)

Then it calls getsockname with an uninitialized sockaddr_in

    struct  sockaddr_in myctladdr;
    getsockname(s, (struct sockaddr *)&myctladdr, &len) < 0)

When it gets ready to open a data port, it uses myctladdr for the
ip and requests an ephemeral port from the os which it grabs from
another call to getsockname(..).

 data_addr = myctladdr;
    if (sendport)
        data_addr.sin_port = 0; /* let system pick one */
*** SNIP ****
    data = socket(AF_INET, SOCK_STREAM, 0);
*** SNIP ****
    if (bind(data, (struct sockaddr *)&data_addr, sizeof (data_addr)) < 0) {
*** SNIP ****
    if (getsockname(data, (struct sockaddr *)&data_addr, &len) < 0) {

Perhaps this is a valid approach to using getsockname(..).

Then again, you may wish to avoid this issue by using PASV mode communication
on LIST and RETR, which is imho quite a bit easier.


                ~~m




> See page 250 in Stevens.  There is a method that returns the local host's IP
> addresses using the uname() method and subsequent networking method calls:
>
> char **my_addrs(int *addrtype)
> {
>     struct hostent *hptr;
>     struct utsname myname;
>
>     if (uname(&myname) < 0)
>         return NULL;
>
>     if ((hptr = gethostbyname(myname.nodename)) == NULL)
>         return NULL;
>
>     *addrtype = hptr->h_addrtype;
>     return hptr->h_addr_list;
> }
>
> Hope this works,
> Bret
>
> "Zack Al-Ubaidi Nash"  wrote in message
> 
> > Hello,
> > I am having a hard time determining the local ip address after
> > connecting a socket to the ftp server.  I need to obtain the local ip
> > address so that I can bind the data socket to that ip address and then
> retrieve the port
> > number by using getsockname.  I am having a hard time retrieving the local
> > ip address to pass to bind.  My understanding running getsockname after a
> > socket is connected not binded will return the local ip and port num, but
> > all I recieve is a 0 or null.
> >
> > thanks,
> > Zack
> >
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: getsockname
Date: Tue, 15 Jan 2002 12:54:09 -0800
Lines: 100
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2463

One of my friends just e-mailed me back with basically the same idea as 
what inetutils does.

But I played with passive mode and I agree, it's much easier.  Thanks a 
ton, Martin.

-Sandeep

Martin Casado wrote:

> Here is how ftp in inetutils does it
> 
> First it connects to the remote ftpd (for the command connection not the data)
> 
>   connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0)
> 
> Then it calls getsockname with an uninitialized sockaddr_in
> 
>     struct  sockaddr_in myctladdr;
>     getsockname(s, (struct sockaddr *)&myctladdr, &len) < 0)
> 
> When it gets ready to open a data port, it uses myctladdr for the
> ip and requests an ephemeral port from the os which it grabs from
> another call to getsockname(..).
> 
>  data_addr = myctladdr;
>     if (sendport)
>         data_addr.sin_port = 0; /* let system pick one */
> *** SNIP ****
>     data = socket(AF_INET, SOCK_STREAM, 0);
> *** SNIP ****
>     if (bind(data, (struct sockaddr *)&data_addr, sizeof (data_addr)) < 0) {
> *** SNIP ****
>     if (getsockname(data, (struct sockaddr *)&data_addr, &len) < 0) {
> 
> Perhaps this is a valid approach to using getsockname(..).
> 
> Then again, you may wish to avoid this issue by using PASV mode communication
> on LIST and RETR, which is imho quite a bit easier.
> 
> 
>                 ~~m
> 
> 
> 
> 
> 
>>See page 250 in Stevens.  There is a method that returns the local host's IP
>>addresses using the uname() method and subsequent networking method calls:
>>
>>char **my_addrs(int *addrtype)
>>{
>>    struct hostent *hptr;
>>    struct utsname myname;
>>
>>    if (uname(&myname) < 0)
>>        return NULL;
>>
>>    if ((hptr = gethostbyname(myname.nodename)) == NULL)
>>        return NULL;
>>
>>    *addrtype = hptr->h_addrtype;
>>    return hptr->h_addr_list;
>>}
>>
>>Hope this works,
>>Bret
>>
>>"Zack Al-Ubaidi Nash"  wrote in message

>>
>>>Hello,
>>>I am having a hard time determining the local ip address after
>>>connecting a socket to the ftp server.  I need to obtain the local ip
>>>address so that I can bind the data socket to that ip address and then
>>>
>>retrieve the port
>>
>>>number by using getsockname.  I am having a hard time retrieving the local
>>>ip address to pass to bind.  My understanding running getsockname after a
>>>socket is connected not binded will return the local ip and port num, but
>>>all I recieve is a 0 or null.
>>>
>>>thanks,
>>>Zack
>>>
>>>
>>
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Symbolic Links
Date: Tue, 15 Jan 2002 13:45:06 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2464

How are we supposed to handle symbolic links to directories?  For example if
the local dir is /AAA/BBB/ and the remote dir is /CCC/ and a symbolic link
(localed in the /CCC/ directory) takes us to /ZZZ/ should we create the ZZZ
directory as a subdirectory of /AAA/BBB/ or create a /ZZZ/ directory
seperate from /AAA/BBB/?.  As I write this it seems to me that the second
option is the one that needs to be followed because if /ZZZ/ is in a
different place on the local machine, the symbolic link won't work after
being copied.  Any thoughts?   Thanks.

--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: question about "ext" and filename matching
Date: Tue, 15 Jan 2002 14:25:47 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2465

It should match ".ext", not only "ext". So "a.tgz" is not a "gz" file. Xin



On Mon, 14 Jan 2002, Yichen Xie wrote:

> Does "extension" mean ftpcopy should match suffix ".ext" or just "ext"? 
> In other words, should a.tgz match as a gz file? Thanks.
> 
> Yichen
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Symlinks
Date: Tue, 15 Jan 2002 14:26:07 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2466

Are we supposed to do anything with symlinks on the ftp site?  Or do we 
just deal with directories and files?

-Sandeep
-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Symlinks
Date: Tue, 15 Jan 2002 14:42:45 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2467

You need to handle symbolic links. Please refer to FAQ Q9 for details. Xin


On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:

> Are we supposed to do anything with symlinks on the ftp site?  Or do we 
> just deal with directories and files?
> 
> -Sandeep
> -- 
> ---------------------------------------------
> Sandeep V. Tamhankar			
> M.S. Student
> Computer Science
> Email: 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Failure to establish data connection
Date: Tue, 15 Jan 2002 15:47:44 -0800
Lines: 50
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2468

Hi,

> I followed the steps mentioned in the handout to establish a data
> connection. I have the following questions:
> 
> 1. Should we use port 0 for the client? Or should we get a random port
> that is larger than the 1024? Is there a way to know what are the nonused
> ports so that we can use one of them?

You should specify the port number as 0 when bind() is called.

> 2. For listen command, should the second parameter be 1 (since we will
> have one outside connection with the server)?

You could.

> 3. About the 8 steps to establish a data connection, which are
> mentioned in the handout. Why we need step 4 in the establishing of the
> connection? Since the port of the socket is already defined in the bind()
> step. And when we read it back using the getsockname(), we will always
> get the same port number that we set in the bind step? So I am not finding
> a use for it.

At step 2, we specify the port number as 0. When bind() is called, the
kernel chooses an ephemeral port. Then we use getsockname() to determine
the assigned port nubmer. The port number we get from getsockname() will
not be 0.
 
> 4. I did all the steps till 7 ( which is sending a ftp CMD over control
> connection). For the PORT command, the server reply was successful.
> However, when I sent the command "LIST \r\n" to start reading the
> directory, what I got is Transient negative reply, with the following
> message from the server:
> 
> Can't build data connection: Connection refused

Please make sure that you are using the right port number.

Best,

Xin

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links
Date: Tue, 15 Jan 2002 16:03:40 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2469

Symbolic links should be handled similarly as regular files. You need to
transfer files until the target directory level. One problem with symbolic
links is that you won't be able to come back up by simply do "CWD". Please
refer to FAQ Q9 for details. Best, Xin


On Tue, 15 Jan 2002, Russell Greene wrote:

> How are we supposed to handle symbolic links to directories?  For example if
> the local dir is /AAA/BBB/ and the remote dir is /CCC/ and a symbolic link
> (localed in the /CCC/ directory) takes us to /ZZZ/ should we create the ZZZ
> directory as a subdirectory of /AAA/BBB/ or create a /ZZZ/ directory
> seperate from /AAA/BBB/?.  As I write this it seems to me that the second
> option is the one that needs to be followed because if /ZZZ/ is in a
> different place on the local machine, the symbolic link won't work after
> being copied.  Any thoughts?   Thanks.
> 
> --Russ
> 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Adrian Graham" 
Newsgroups: su.class.cs244a
Subject: Re: Enrollment on the EE website
Date: Tue, 15 Jan 2002 18:04:30 -0800
Lines: 29
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: zoostation.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2470

I've tried to register using the link below yesterday and today. However, I
just get a "This service is currently not available" error. Should I just
try later? Or do I need to do something else?

Thanks,

Adrian
"SUL\AIR Laneroom Cluster"  wrote in message


Hello everyone,
Please make sure you enroll to the cs244a class, not the ee384.
the correct url is
https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=cs244a
if you receive a message saying 'you're already subscribed' then everything
is fine.
Regards,
Antonios.
Dhawal Kumar wrote:
From lecture number 2 I came to know that I have to enroll on EE website.
Can I get a link to the same?
I tried
https://audi.stanford.edu/cgi-bin/students.cgi?action=register&cc=ee384
and got an error that my student number is not in the class list.
Do I need to enroll somewhere else?
Thanks,
Dhawal Kumar


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Pete Belknap" 
Newsgroups: su.class.cs244a
Subject: Transferring files you don't have permissions for
Date: Tue, 15 Jan 2002 19:23:16 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2471

The handout says that if we try to transfer a file which we don't have
permissions for, we should just give up and continue from there.  I ran the
ftpd server and got a 550 error for this case.

Is 550 the only error code for permissions violations?  Can we assume that a
550 always means this (i.e. 550 would be the only error code that we don't
terminate on) ?

thanks,
Pete


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: strstr and purify
Date: Tue, 15 Jan 2002 19:53:33 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2472

I am using the code in the handout to parse a LIST response, and I keep
getting an UMR error on the strstr functions.  Does anyone have an idea
what the problem might be?

Thanks,
Clayton
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links
Date: Tue, 15 Jan 2002 21:10:36 -0800
Lines: 50
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2473

Well, we download 'regular files', and recurse into subdirectories.  And 
you seem to be saying to do both here.  So just to confirm:

* If a symlink is pointing to a regular file, download the file, and 
name it with the name of the symlink.
* If a symlink points to a directory (and assuming we still have some 
depth to cover), go into it searching for files.  If a matching file is 
found, create a directory with the name of the symlink that we'd 
followed and create the file in that directory.

Please confirm or clarify.  Thanks!

-Sandeep

Xin Wang wrote:

> Symbolic links should be handled similarly as regular files. You need to
> transfer files until the target directory level. One problem with symbolic
> links is that you won't be able to come back up by simply do "CWD". Please
> refer to FAQ Q9 for details. Best, Xin
> 
> 
> On Tue, 15 Jan 2002, Russell Greene wrote:
> 
> 
>>How are we supposed to handle symbolic links to directories?  For example if
>>the local dir is /AAA/BBB/ and the remote dir is /CCC/ and a symbolic link
>>(localed in the /CCC/ directory) takes us to /ZZZ/ should we create the ZZZ
>>directory as a subdirectory of /AAA/BBB/ or create a /ZZZ/ directory
>>seperate from /AAA/BBB/?.  As I write this it seems to me that the second
>>option is the one that needs to be followed because if /ZZZ/ is in a
>>different place on the local machine, the symbolic link won't work after
>>being copied.  Any thoughts?   Thanks.
>>
>>--Russ
>>
>>
>>
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Deleting the local tree
Date: Tue, 15 Jan 2002 22:26:55 -0800
Lines: 22
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2474

Are we supposed to delete (recursively) everything in local_dir/* ?  I 
read that we're supposed to overwrite any file that may exist, but I 
have a vague recollection that we are supposed to clean out the local 
directory before downloading files.  Or I'm just confused.

On the one hand, this seems like a good idea for the scenario where you 
want to download file 'a', and a directory by that name exists locally. 
  I'm guessing that doing an 'open' for write will result in an error 
since doing so would involve invalidating a whole directory tree (and 
thus we'd have to delete the whole tree starting at local directory 'a' 
anyway before starting the download).

Thoughts?

-Sandeep
-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links
Date: Wed, 16 Jan 2002 00:07:57 -0800
Lines: 65
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2475

Correct.


On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:

> Well, we download 'regular files', and recurse into subdirectories.  And 
> you seem to be saying to do both here.  So just to confirm:
> 
> * If a symlink is pointing to a regular file, download the file, and 
> name it with the name of the symlink.
> * If a symlink points to a directory (and assuming we still have some 
> depth to cover), go into it searching for files.  If a matching file is 
> found, create a directory with the name of the symlink that we'd 
> followed and create the file in that directory.
> 
> Please confirm or clarify.  Thanks!
> 
> -Sandeep
> 
> Xin Wang wrote:
> 
> > Symbolic links should be handled similarly as regular files. You need to
> > transfer files until the target directory level. One problem with symbolic
> > links is that you won't be able to come back up by simply do "CWD". Please
> > refer to FAQ Q9 for details. Best, Xin
> > 
> > 
> > On Tue, 15 Jan 2002, Russell Greene wrote:
> > 
> > 
> >>How are we supposed to handle symbolic links to directories?  For example if
> >>the local dir is /AAA/BBB/ and the remote dir is /CCC/ and a symbolic link
> >>(localed in the /CCC/ directory) takes us to /ZZZ/ should we create the ZZZ
> >>directory as a subdirectory of /AAA/BBB/ or create a /ZZZ/ directory
> >>seperate from /AAA/BBB/?.  As I write this it seems to me that the second
> >>option is the one that needs to be followed because if /ZZZ/ is in a
> >>different place on the local machine, the symbolic link won't work after
> >>being copied.  Any thoughts?   Thanks.
> >>
> >>--Russ
> >>
> >>
> >>
> >>
> > 
> 
> 
> 
> -- 
> ---------------------------------------------
> Sandeep V. Tamhankar			
> M.S. Student
> Computer Science
> Email: 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Deleting the local tree
Date: Wed, 16 Jan 2002 00:22:15 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2476

You should not delete everything in local_dir/*. Just image any FTP
clients you have used, they copy the files you want to your local
directory. They may overwrite your local file if the file names happen to
be the same, but they will not destroy everthing in your local directory.
Xin


On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:

> Are we supposed to delete (recursively) everything in local_dir/* ?  I 
> read that we're supposed to overwrite any file that may exist, but I 
> have a vague recollection that we are supposed to clean out the local 
> directory before downloading files.  Or I'm just confused.
> 
> On the one hand, this seems like a good idea for the scenario where you 
> want to download file 'a', and a directory by that name exists locally. 
>   I'm guessing that doing an 'open' for write will result in an error 
> since doing so would involve invalidating a whole directory tree (and 
> thus we'd have to delete the whole tree starting at local directory 'a' 
> anyway before starting the download).
> 
> Thoughts?
> 
> -Sandeep
> -- 
> ---------------------------------------------
> Sandeep V. Tamhankar			
> M.S. Student
> Computer Science
> Email: 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Pete Belknap" 
Newsgroups: su.class.cs244a
Subject: Re: strstr and purify
Date: Wed, 16 Jan 2002 00:27:32 -0800
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2477

Make sure you don't free the memory allocated by the string you pass to
ftpparse(). I was doing that and getting a bunch of memory errors, including
FMR's and UMR's.

Pete

"Clayton Pierce Jones"  wrote in message

> I am using the code in the handout to parse a LIST response, and I keep
> getting an UMR error on the strstr functions.  Does anyone have an idea
> what the problem might be?
>
> Thanks,
> Clayton


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: File Permission And Parent Directory
Date: Wed, 16 Jan 2002 14:12:31 -0800
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2478

Hi,

Imagine that we have a directory with only one file in it. The file has
the same extension that we want to copy. We created the directory on the
client machine, and we tried to copy the file in it. However, we
discovered then that we don't have permission to do so. Should we remove
the created direcotry (As if it is doesn't contain any required file)?

I am facing the above situation since the provided ftpparser doesn't
parse the permission bits. So, the easiest way to check the permission
would be to wait and see if there would be any error in sending the file
through the network. At that time, we may have already created the parent
directory for the file, and then we have to face the above mentioned
problem if we couldn't copy the file.

Thanks,

Moh'd





.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: File Permission And Parent Directory
Date: Wed, 16 Jan 2002 14:19:24 -0800
Lines: 34
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2479

You can solve this by changing the order of things. First issue the RETR
command, see if the return is positive completion, then create the directory
you need if you haven't already, then start the transfer. That is what I did
anyway.

Bret

"Moh'd Saleem Saleem Alrawashdeh"  wrote in message

> Hi,
>
> Imagine that we have a directory with only one file in it. The file has
> the same extension that we want to copy. We created the directory on the
> client machine, and we tried to copy the file in it. However, we
> discovered then that we don't have permission to do so. Should we remove
> the created direcotry (As if it is doesn't contain any required file)?
>
> I am facing the above situation since the provided ftpparser doesn't
> parse the permission bits. So, the easiest way to check the permission
> would be to wait and see if there would be any error in sending the file
> through the network. At that time, we may have already created the parent
> directory for the file, and then we have to face the above mentioned
> problem if we couldn't copy the file.
>
> Thanks,
>
> Moh'd
>
>
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Script output file sizes
Date: Wed, 16 Jan 2002 20:54:42 -0800
Lines: 110
Distribution: su
Message-ID: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2480

First of all, thanks for providing the test scripts, it is great to have
such a simple and thorough way to test our code.  However, I have a couple
questions regarding  "Test F.2".



My test script output includes this:



test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm

exit line said: "OK: 1900222 bytes copied"

---

diff between expected tree and your tree:

1,8d0

< ./kermit/c/all.tar.Z 2606058765 72935

< ./kermit/c/amiga.tar.Z 1017293024 135815

< ./kermit/c/dg.tar.Z 2560791635 406317

< ./kermit/c/mac.tar.Z 2459747744 496551

< ./kermit/c/os2.tar.Z 2771080586 163808

< ./kermit/c/os9.tar.Z 370278796 49438

< ./kermit/c/unix.tar.Z 308104872 349221

< ./kermit/c/vms.tar.Z 53741681 64755



I used ncftp to go to the site to see what was going on, and a "ls -l" in
the kermit/c directory shows this:



ncftp /pub/comm/kermit/c > ls -l

lrwxrwxrwx   1 0        0           37   Apr 14  1995
00README-Legal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs

-r--r--r--   1 0        0          935   Jan 17  1989   README

-r--r--r--   1 0        0        72935   Jan 16  1989   all.tar.Z

-r--r--r--   1 0        0       135815   Jan 16  1989   amiga.tar.Z

-r--r--r--   1 0        0       406317   Jan 16  1989   dg.tar.Z

-r--r--r--   1 0        0       496551   Jan 16  1989   mac.tar.Z

-r--r--r--   1 0        0       163808   Jan 16  1989   os2.tar.Z

-r--r--r--   1 0        0        49438   Jan 16  1989   os9.tar.Z

-r--r--r--   1 0        0       349221   Jan 16  1989   unix.tar.Z

-r--r--r--   1 0        0        64755   Jan 16  1989   vms.tar.Z



It looks like the files sizes are the ones I got, not the large ones from
the script.  Am I mistaken here? The same thing happened on the MS FTP site
(snippets below).



test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie exit line
said: "OK: 5113 bytes copied"

---

diff between expected tree and your tree:

3,4d2

< ./ie-public/fixes/usa/ie401/importexportfavorites-fix/readme.txt
2939125283 643 <
../ie-public/fixes/usa/ie50/importexportfavorites-fix/readme.txt 2939125283
643



ncftp ...ortexportfavorites-fix > ls -l

dr-xr-xr-x   1 owner    group            0 Feb 25  2000 alpha

-r-xr-xr-x   1 owner    group          643 Sep 24  1999 readme.txt

dr-xr-xr-x   1 owner    group            0 Feb 25  2000 x86





Thanks for your time,

Bret





.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Script file sizes (normal line endings this time)
Date: Wed, 16 Jan 2002 20:56:01 -0800
Lines: 65
Distribution: su
Message-ID: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2481

I noticed my first post had some weird carriage returns, so I am reposting
to make it easier to read.  Sorry for the trouble.

First of all, thanks for providing the test scripts, it is great to have
such a simple and thorough way to test our code.  However, I have a couple
questions regarding  "Test F.2".

My test script output includes this:

test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: "OK: 1900222 bytes copied"
---
diff between expected tree and your tree:
1,8d0
< ./kermit/c/all.tar.Z 2606058765 72935
< ./kermit/c/amiga.tar.Z 1017293024 135815
< ./kermit/c/dg.tar.Z 2560791635 406317
< ./kermit/c/mac.tar.Z 2459747744 496551
< ./kermit/c/os2.tar.Z 2771080586 163808
< ./kermit/c/os9.tar.Z 370278796 49438
< ./kermit/c/unix.tar.Z 308104872 349221
< ./kermit/c/vms.tar.Z 53741681 64755

I used ncftp to go to the site to see what was going on, and a "ls -l" in
the kermit/c directory shows this:

ncftp /pub/comm/kermit/c > ls -l
lrwxrwxrwx   1 0        0           37   Apr 14  1995
00README-Legal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs
-r--r--r--   1 0        0          935   Jan 17  1989   README
-r--r--r--   1 0        0        72935   Jan 16  1989   all.tar.Z
-r--r--r--   1 0        0       135815   Jan 16  1989   amiga.tar.Z
-r--r--r--   1 0        0       406317   Jan 16  1989   dg.tar.Z
-r--r--r--   1 0        0       496551   Jan 16  1989   mac.tar.Z
-r--r--r--   1 0        0       163808   Jan 16  1989   os2.tar.Z
-r--r--r--   1 0        0        49438   Jan 16  1989   os9.tar.Z
-r--r--r--   1 0        0       349221   Jan 16  1989   unix.tar.Z
-r--r--r--   1 0        0        64755   Jan 16  1989   vms.tar.Z

It looks like the files sizes are the ones I got, not the large ones from
the script.  Am I mistaken here? The same thing happened on the MS FTP site
(snippets below).

test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie exit line
said: "OK: 5113 bytes copied"
---
diff between expected tree and your tree:
3,4d2
< ./ie-public/fixes/usa/ie401/importexportfavorites-fix/readme.txt
2939125283 643 <
../ie-public/fixes/usa/ie50/importexportfavorites-fix/readme.txt 2939125283
643

ncftp ...ortexportfavorites-fix > ls -l
dr-xr-xr-x   1 owner    group            0 Feb 25  2000 alpha
-r-xr-xr-x   1 owner    group          643 Sep 24  1999 readme.txt
dr-xr-xr-x   1 owner    group            0 Feb 25  2000 x86


Thanks for your time,
Bret




.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: Script file sizes (normal line endings this time)
Date: Wed, 16 Jan 2002 21:45:10 -0800
Lines: 74
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2482

Nevermind, it woked this time, it must have been my numbers that were wrong.

Bret

"Bret Taylor"  wrote in message

> I noticed my first post had some weird carriage returns, so I am reposting
> to make it easier to read.  Sorry for the trouble.
>
> First of all, thanks for providing the test scripts, it is great to have
> such a simple and thorough way to test our code.  However, I have a couple
> questions regarding  "Test F.2".
>
> My test script output includes this:
>
> test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> exit line said: "OK: 1900222 bytes copied"
> ---
> diff between expected tree and your tree:
> 1,8d0
> < ./kermit/c/all.tar.Z 2606058765 72935
> < ./kermit/c/amiga.tar.Z 1017293024 135815
> < ./kermit/c/dg.tar.Z 2560791635 406317
> < ./kermit/c/mac.tar.Z 2459747744 496551
> < ./kermit/c/os2.tar.Z 2771080586 163808
> < ./kermit/c/os9.tar.Z 370278796 49438
> < ./kermit/c/unix.tar.Z 308104872 349221
> < ./kermit/c/vms.tar.Z 53741681 64755
>
> I used ncftp to go to the site to see what was going on, and a "ls -l" in
> the kermit/c directory shows this:
>
> ncftp /pub/comm/kermit/c > ls -l
> lrwxrwxrwx   1 0        0           37   Apr 14  1995
> 00README-Legal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs
> -r--r--r--   1 0        0          935   Jan 17  1989   README
> -r--r--r--   1 0        0        72935   Jan 16  1989   all.tar.Z
> -r--r--r--   1 0        0       135815   Jan 16  1989   amiga.tar.Z
> -r--r--r--   1 0        0       406317   Jan 16  1989   dg.tar.Z
> -r--r--r--   1 0        0       496551   Jan 16  1989   mac.tar.Z
> -r--r--r--   1 0        0       163808   Jan 16  1989   os2.tar.Z
> -r--r--r--   1 0        0        49438   Jan 16  1989   os9.tar.Z
> -r--r--r--   1 0        0       349221   Jan 16  1989   unix.tar.Z
> -r--r--r--   1 0        0        64755   Jan 16  1989   vms.tar.Z
>
> It looks like the files sizes are the ones I got, not the large ones from
> the script.  Am I mistaken here? The same thing happened on the MS FTP
site
> (snippets below).
>
> test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie exit line
> said: "OK: 5113 bytes copied"
> ---
> diff between expected tree and your tree:
> 3,4d2
> < ./ie-public/fixes/usa/ie401/importexportfavorites-fix/readme.txt
> 2939125283 643 <
> ./ie-public/fixes/usa/ie50/importexportfavorites-fix/readme.txt 2939125283
> 643
>
> ncftp ...ortexportfavorites-fix > ls -l
> dr-xr-xr-x   1 owner    group            0 Feb 25  2000 alpha
> -r-xr-xr-x   1 owner    group          643 Sep 24  1999 readme.txt
> dr-xr-xr-x   1 owner    group            0 Feb 25  2000 x86
>
>
> Thanks for your time,
> Bret
>
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: "Potential Leak"
Date: Thu, 17 Jan 2002 00:26:29 -0800
Lines: 37
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2483

I just ran my code through purify (in text-mode so that I can submit a 
purify.output file to the test script), and I get some conflicting info 
near the bottom of the output:


Purify: Searching for all memory leaks...

Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)

Purify Heap Analysis (combining suppressed and unsuppressed blocks)
                          Blocks        Bytes
               Leaked          0            0
   Potentially Leaked          1         8200
               In-Use        135         5433
   ----------------------------------------
      Total Allocated        136        13633

<snip>

   * 0 bytes leaked.
   * 0 bytes potentially leaked.


So twice it tells me I have 0 bytes of potential mem leak, and once it 
says I have 1 block / 8200 bytes of potential mem leak.  And there is no 
other warning/error anywhere else in the report indicating where this 
"potential" memleak could be.  Can I ignore this, or does this have some 
meaning?

-Sandeep
-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Garrett Smith 
Newsgroups: su.class.cs244a
Subject: snprintf
Date: Thu, 17 Jan 2002 10:32:41 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: ubik.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20020105
X-Accept-Language: en-us, fr
Xref: nntp.stanford.edu su.class.cs244a:2484

Is it ok to use snprintf()?  It is in the ANSI C99 spec, but doesn't get 
a prototype from the headers if -ansi is passed to gcc.

Garrett

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga8.Stanford.EDU!aminf13
From: Amin Firoozshahian 
Newsgroups: su.class.cs244a
Subject: FTP server replies
Date: Thu, 17 Jan 2002 19:27:46 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2485


  Hi everybody,

  I have a question, when we send a command on the control connection to
the FTP server (for example, when we want to login), there is not known
that how many lines the server is going to send us back. As I noticed, not
allthe servers hold the regulations with multiple line replies according
to the FTP specification. (I mean using '-'). Also, for example, when you
send the USER command to ftp.cs.stanford edu, it replies you with two separate
lines, one starting with code 220 and the other with code 331 (after
sending USER command). So, how are we supposed to read all the lines from socket before
sending next command?

  Yours,
  Amin

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Creating directories...
Date: Thu, 17 Jan 2002 19:32:16 -0800
Lines: 24
Distribution: su
Message-ID: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2486

Hi everyone,

to create directories in C you can use the mkdir() call. The
man page is accessible with:

  man -s 2 mkdir

along the same lines the man pages for the standard C library
can be accessed with:

  man -s 3c printf

A simple 'man printf' won't work as there also is a shell 
command by the name of printf.

  Guido

PS: I post this because man -k/apropos is currently broken on 
    the cluster machines.

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Darren Lewis" 
Newsgroups: su.class.cs244a
Subject: ftp.microsoft.com
Date: Thu, 17 Jan 2002 19:50:46 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: darren.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2487

Does anyone else have problems with ftp.microsoft.com? My sockets appear to
time out, sometimes getting farther along than other times?


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Yichen Xie 
Newsgroups: su.class.cs244a
Subject: Re: FTP server replies
Date: Thu, 17 Jan 2002 19:55:27 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dn800cb149.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011014
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2488

The 220 line you get is most likely:

	220 ftp.cs.stanford.edu NcFTPd Server (free educational license) ready.

This is sent upon connection, before you send in the "USER" command.

Amin Firoozshahian wrote:

>   Hi everybody,
> 
>   I have a question, when we send a command on the control connection to
> the FTP server (for example, when we want to login), there is not known
> that how many lines the server is going to send us back. As I noticed, not
> allthe servers hold the regulations with multiple line replies according
> to the FTP specification. (I mean using '-'). Also, for example, when you
> send the USER command to ftp.cs.stanford edu, it replies you with two separate
> lines, one starting with code 220 and the other with code 331 (after
> sending USER command). So, how are we supposed to read all the lines from socket before
> sending next command?
> 
>   Yours,
>   Amin
> 
> 


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: More Qs about symbolic links
Date: Thu, 17 Jan 2002 21:30:30 -0800
Lines: 34
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2489

Hi,

  I can think of some cases that would be extremely difficult to
parse given a symbolic link.  For example, ftpparse may return
a filename:

Star-Trek -> star-trek (this is taken from ftp.faqs.org)

If we know that is a symbolic link, thats pretty straightforward. Now
what about the following perfectly legal name?

goo -> ber -> sam -> wise

The possibilities are:

goo               is a symbolic link to file "ber -> sam -> wise"
goo -> ber        is a symbolic link to file "sam -> wise"
goo -> ber -> sam is a symbolic link to file "wise"

I cannot think of a method to differentiate between symbolic association and
the filename.  Here's an actual reply I contrived.

jim -> bob -> McGee -> ../../../vimbuddy.vim

which is a file "jim -> bob -> McGee" as a symbolic link to ../../../vimbuddy.vim


Are there any assumptions we can make about the format of symbolic links? Or do we
have to be prepared to use a trial-by-error scheme in case we run across
one of these special cases.  Any help would be greatly appreciated. Thanks.


                ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Symbol To Symbol
Date: Thu, 17 Jan 2002 21:47:54 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2490

Hi,
Should we handle the cases of symbol pointing to another symbol, which can
then points to a file or directory. In other words, should we handle more
than one level of indirection?

Thanks,

Moh'd


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: "Potential Leak"
Date: 18 Jan 2002 07:29:42 GMT
Lines: 47
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2491


This is fine. The potential leak noted below may be caused by a 
redirection of output to a file. All we will be requiring for this 
assignment is that the line "Memory leaked: w bytes (x%); potentially 
leaked: y bytes (z%)" has all four of w, x, y, z equal to 0. Of course, 
there should also be no UMRs, etc.

Arun

Sandeep Tamhankar  wrote:
: I just ran my code through purify (in text-mode so that I can submit a 
: purify.output file to the test script), and I get some conflicting info 
: near the bottom of the output:


: Purify: Searching for all memory leaks...

: Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)

: Purify Heap Analysis (combining suppressed and unsuppressed blocks)
:                           Blocks        Bytes
:                Leaked          0            0
:    Potentially Leaked          1         8200
:                In-Use        135         5433
:    ----------------------------------------
:       Total Allocated        136        13633

: <snip>

:    * 0 bytes leaked.
:    * 0 bytes potentially leaked.


: So twice it tells me I have 0 bytes of potential mem leak, and once it 
: says I have 1 block / 8200 bytes of potential mem leak.  And there is no 
: other warning/error anywhere else in the report indicating where this 
: "potential" memleak could be.  Can I ignore this, or does this have some 
: meaning?

: -Sandeep
: -- 
: ---------------------------------------------
: Sandeep V. Tamhankar			
: M.S. Student
: Computer Science
: Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: snprintf
Date: 18 Jan 2002 07:38:06 GMT
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2492

We'd prefer it, if for consistency sake, that the program compiles without
warning with the -ansi flag.

In this case, the function is linked in so it is present in the library. 
To avoid the warning add the declaration:

extern int snprintf(char *s,  size_t  n,  const  char  *format,  /* args*/ 
....);

and everything should compile and link without event.

Arun

Garrett Smith  wrote:
: Is it ok to use snprintf()?  It is in the ANSI C99 spec, but doesn't get 
: a prototype from the headers if -ansi is passed to gcc.

: Garrett

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: FTP server replies
Date: 18 Jan 2002 07:46:43 GMT
Lines: 41
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine31.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2493

The best way to know how to deal with the various responses to commands is
to check the RFC, which describes the possible FTP responses, including
any intermediate replies, to a given command.

When reading the data, you need to be careful to detect the end of a
response, and not issue another read, as the read will block until data is
available. One way to do this is to read byte-byte and look for the end of
response character sequence as you do the reads. There are higher
performance ways to do this (i.e., reading blocks at a time), but one has
to be careful as portions of the following response may be read in along
with the end of reply sequence.

Arun

 Yichen Xie  wrote:
: The 220 line you get is most likely:

: 	220 ftp.cs.stanford.edu NcFTPd Server (free educational license) ready.

: This is sent upon connection, before you send in the "USER" command.

: Amin Firoozshahian wrote:

:>   Hi everybody,
:> 
:>   I have a question, when we send a command on the control connection to
:> the FTP server (for example, when we want to login), there is not known
:> that how many lines the server is going to send us back. As I noticed, not
:> allthe servers hold the regulations with multiple line replies according
:> to the FTP specification. (I mean using '-'). Also, for example, when you
:> send the USER command to ftp.cs.stanford edu, it replies you with two separate
:> lines, one starting with code 220 and the other with code 331 (after
:> sending USER command). So, how are we supposed to read all the lines from socket before
:> sending next command?
:> 
:>   Yours,
:>   Amin
:> 
:> 


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: More Qs about symbolic links
Date: 18 Jan 2002 07:51:01 GMT
Lines: 45
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2494

We understand that, since the list response is non standardized, there 
will be numerous special cases such as this. In general, whatever name 
returned to you by ftpparse can be assumed to be the link name (even if it 
contains a ->). We will try not to test against such ambiguous cases as 
you have mentioned; the servers you are required to work with are listed 
in the assignment.

Arun


Martin Casado  wrote:
: Hi,

:   I can think of some cases that would be extremely difficult to
: parse given a symbolic link.  For example, ftpparse may return
: a filename:

: Star-Trek -> star-trek (this is taken from ftp.faqs.org)

: If we know that is a symbolic link, thats pretty straightforward. Now
: what about the following perfectly legal name?

: goo -> ber -> sam -> wise

: The possibilities are:

: goo               is a symbolic link to file "ber -> sam -> wise"
: goo -> ber        is a symbolic link to file "sam -> wise"
: goo -> ber -> sam is a symbolic link to file "wise"

: I cannot think of a method to differentiate between symbolic association and
: the filename.  Here's an actual reply I contrived.

: jim -> bob -> McGee -> ../../../vimbuddy.vim

: which is a file "jim -> bob -> McGee" as a symbolic link to ../../../vimbuddy.vim


: Are there any assumptions we can make about the format of symbolic links? Or do we
: have to be prepared to use a trial-by-error scheme in case we run across
: one of these special cases.  Any help would be greatly appreciated. Thanks.


:                 ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Xiaoyan Cheng 
Newsgroups: su.class.cs244a
Subject: server close data connection
Date: Fri, 18 Jan 2002 00:04:52 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2495

"The server will automatically close the connection from its end once
all of the data has been sent."

Does this imply that every time when we send a LIST or RETR command over
the control connection, we need to re-establish a data
Connection(starting from step 1, client creates another socket) ...
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Symbol To Symbol
Date: 18 Jan 2002 08:14:17 GMT
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2496

You do not need to worry about doing anything special to handle this case. 
We will avoid testing your code using ambiguous or otherwise exotic cases.

Arun

Moh'd Saleem Saleem Alrawashdeh  wrote:

: Hi,
: Should we handle the cases of symbol pointing to another symbol, which can
: then points to a file or directory. In other words, should we handle more
: than one level of indirection?

: Thanks,

: Moh'd


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: server close data connection
Date: 18 Jan 2002 08:15:28 GMT
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine31.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2497

Yes, a new data connection needs to opened for each file/LIST response
(this includes issuing a PORT command etc.)

Arun

Xiaoyan Cheng  wrote:

: "The server will automatically close the connection from its end once
: all of the data has been sent."

: Does this imply that every time when we send a LIST or RETR command over
: the control connection, we need to re-establish a data
: Connection(starting from step 1, client creates another socket) ...
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: Re: FTP server replies
Date: Fri, 18 Jan 2002 00:17:21 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2498

Along the same lines...

After writing a command to the server,

Should we poll the socket for replies as in the echodemo example?

or just read from it once, and only keep reading again if the reply code
indicates that we should wait for another reply before sending next
command?


Amin Firoozshahian wrote:
> 
>   Hi everybody,
> 
>   I have a question, when we send a command on the control connection to
> the FTP server (for example, when we want to login), there is not known
> that how many lines the server is going to send us back. As I noticed, not
> allthe servers hold the regulations with multiple line replies according
> to the FTP specification. (I mean using '-'). Also, for example, when you
> send the USER command to ftp.cs.stanford edu, it replies you with two separate
> lines, one starting with code 220 and the other with code 331 (after
> sending USER command). So, how are we supposed to read all the lines from socket before
> sending next command?
> 
>   Yours,
>   Amin

-- 
       Luis Robles

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: FTP server replies
Date: 18 Jan 2002 09:01:16 GMT
Lines: 38
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine31.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2499

Use the strategy I mentioned in the previous posting to monitor the 
response from the server over the control connection. If you have any 
other questions, feel free to ask.

Arun

Luis Robles  wrote:
: Along the same lines...

: After writing a command to the server,

: Should we poll the socket for replies as in the echodemo example?

: or just read from it once, and only keep reading again if the reply code
: indicates that we should wait for another reply before sending next
: command?


: Amin Firoozshahian wrote:
:> 
:>   Hi everybody,
:> 
:>   I have a question, when we send a command on the control connection to
:> the FTP server (for example, when we want to login), there is not known
:> that how many lines the server is going to send us back. As I noticed, not
:> allthe servers hold the regulations with multiple line replies according
:> to the FTP specification. (I mean using '-'). Also, for example, when you
:> send the USER command to ftp.cs.stanford edu, it replies you with two separate
:> lines, one starting with code 220 and the other with code 331 (after
:> sending USER command). So, how are we supposed to read all the lines from socket before
:> sending next command?
:> 
:>   Yours,
:>   Amin

: -- 
:        Luis Robles
: 
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: UMR in gethostbyname
Date: 18 Jan 2002 10:29:31 GMT
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth7.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2500

When I pass "ftp.fedworld.gov" into gethostbyname(...),
purify reports a UMR in the library code.

Believe it or not, it only happens with that host. I've checked
and made sure that the string is null terminated.

Does anyone else have this problem, and can we ignore UMR's
reported in the standard library code?


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: Passing a number in as the hostname
Date: 18 Jan 2002 10:32:37 GMT
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth7.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2501

If any number is passed in as the hostname, for example:

ftpcopy exe 0 1323535

inet_addr( ... ) successfully "parses" the string "1323535" as 
the ip address, and when connect is called with the resulting
address, the program just blocks.

Should we or can we fix this behavior?


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Eric Watkins 
Newsgroups: su.class.cs244a
Subject: Re: server close data connection
Date: Fri, 18 Jan 2002 02:40:16 -0800
Lines: 10
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: e-man.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2502

> Yes, a new data connection needs to opened for each file/LIST response
> (this includes issuing a PORT command etc.)

But can we (should we) skip steps 1 and 3?  Those seem like things that
should only be done once.  After you have that first socket set up to
receive the incoming connections, then you need to repeat all the other
steps, including accept(), which will get you the new data socket.  Is
this right?

-Eric
.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: ftp.microsoft.com--should we consider this
Date: Fri, 18 Jan 2002 12:55:01 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2503

when i run my client program for ftp.microsoft.com i get a response code
of "421" for the USER command itself. note that the rfc says:
A reply is defined to contain the 3-digit code, followed by Space
<SP>, followed by one line of text (where some maximum line length
      has been specified), and terminated by the Telnet end-of-line
      code.
(multiline reply will have hyphen after the code on the first line).

but the code returned by microsoft has some other character (apart from
'-' and ' ') after the 3 digits.

anyone else notice this? should we worry about such cases too?

thanks,
ashmi


On Thu, 17 Jan 2002, Darren Lewis wrote:

> Does anyone else have problems with ftp.microsoft.com? My sockets appear to
> time out, sometimes getting farther along than other times?
>
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Yichen Xie" 
Newsgroups: su.class.cs244a
Subject: Re: Passing a number in as the hostname
Date: Fri, 18 Jan 2002 13:17:40 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dnab4046be.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2504

I found it easier to use only gethostbyname(), since it can handle both
dotted decimal addresses and normal names. 1323535 should translate to
0.20.50.15, which apparently isn't up on the network. That might explain why
it blocks (and eventually time out), just as what you would expect when you
try to access some website that is down.

"Derrick Wen-Shiuan Tong"  wrote in message

> If any number is passed in as the hostname, for example:
>
> ftpcopy exe 0 1323535
>
> inet_addr( ... ) successfully "parses" the string "1323535" as
> the ip address, and when connect is called with the resulting
> address, the program just blocks.
>
> Should we or can we fix this behavior?
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: recursively descending into subdir
Date: Fri, 18 Jan 2002 13:42:01 -0800
Lines: 32
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2505

hi all,
my program hangs as soon as i try to recusively descend into, and list,
the contents of the first subdirectory in the default remote dir.
as far as i can see, i havent done anything silly in the recursion because
the following things work:

-cwd into that dir (say D1) returns 250 ---works
-data connection is set up
-LIST returns 226 (is it necessary this returns 250?)
-on reading the contents returned by LIST though, i get nothing, but this
is not what is causing the program to hang...
-after this since i CWD'd into this directory D1, i try to cwd out of it
by "CWD .."
and <kaboom>.

any ideas?
thanks,
ashmi


###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine9.Stanford.EDU!rxuan
From: Ruozhong Xuan 
Newsgroups: su.class.cs244a
Subject: submit_test.pl result question
Date: Fri, 18 Jan 2002 14:07:45 -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
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2506

Hi,
    I used the submit_test.pl to request a test, and in a section,I got
the below:
===============

    * Test F.2: Does not transfer all of the matching files in the first
level down to the
      last specified level [out of 1]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: "OK:1900222 bytes copied"
---
diff between expected tree and your tree:
1,8d0
< ./kermit/c/all.tar.Z
< ./kermit/c/amiga.tar.Z
< ./kermit/c/dg.tar.Z
< ./kermit/c/mac.tar.Z
< ./kermit/c/os2.tar.Z
< ./kermit/c/os9.tar.Z
< ./kermit/c/unix.tar.Z
< ./kermit/c/vms.tar.Z
10d1
< ./xcomm.tar.Z



But when I manually tried out:
ftpcopy Z 2 204.123.2.2 test /pub/comm
I found all those files have been transfered to "test" directory under the
correct subdirectory. So I am a little confused by the test result. Any
comment?

Thanks.
Ruozhong Xuan


.

Path: shelby.stanford.edu!nntp.stanford.edu!myth2.Stanford.EDU!rgustin
From: Reid Gustin 
Newsgroups: su.class.cs244a
Subject: Re: recursively descending into subdir
Date: Fri, 18 Jan 2002 14:32:42 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2507

On Fri, 18 Jan 2002, Ashmi wrote:
> -cwd into that dir (say D1) returns 250 ---works
> -data connection is set up
> -LIST returns 226 (is it necessary this returns 250?)
> -on reading the contents returned by LIST though, i get nothing, but this
> is not what is causing the program to hang...
> -after this since i CWD'd into this directory D1, i try to cwd out of it
> by "CWD .."
> and <kaboom>.

I don't know if this is actually the problem you're seeing, but if D1 is
actually a symbolic link to someplace completely different, you could run
into trouble with the 'CWD ..'.  Take the example where D1 points to a
directory, the parent of which you don't have permissions for.  You try
'CWD ..' and it would say you couldn't do that.  It's also a little bit
dangerous, as 'CWD ..' could take you *anywhere* in the system, not
necesarily back to the tree where you were transferring files, in the
case of symbolic links.

As for what LIST can return, it's legal (from the RFC) for it to return
any of: 125, 150, 226, 250, 421, 425, 426, 451, 450, 500, 501, 502, 530.
There's a spot in the RFC under the heading 'Command-Reply Sequences' that
talks about the possible responses to a given command.

Reid

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine37.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Reply Buffer over Control and Data connection...
Date: Fri, 18 Jan 2002 14:32:50 -0800
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine37.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2508

Hi,

I have two questions regarding receiving the response in replyBuffers over
the control connection and the data connection.

1) Over the control connection, it seems that the max buffer is 1024
bytes. When I use a buffer theis size. I do get the reply back. However,
the status: 1xx, 2xx, 3xx, 4xx, 5xx, is not necessarily the first
information in the buffer. Is that expected?
If yes, then how would I know what the server's reply is?

2) For data connection the server's reply could be very big. But would the
server still reply in packets of 1024 bytes?
I mean that the buffer that we pass to read(s, ...) should be 1024 bytes
and then we need to just keep reading such buffers and then concatenate
the data packets?
Is that true? Please explain.

Would really appreciate your help.

Thanks,
PriyankaA

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth2.Stanford.EDU!rgustin
From: Reid Gustin 
Newsgroups: su.class.cs244a
Subject: Re: ftp.microsoft.com--should we consider this
Date: Fri, 18 Jan 2002 14:36:03 -0800
Lines: 24
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: myth2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2509

On Fri, 18 Jan 2002, Ashmi wrote:
> when i run my client program for ftp.microsoft.com i get a response code
> of "421" for the USER command itself. note that the rfc says:
> A reply is defined to contain the 3-digit code, followed by Space
> <SP>, followed by one line of text (where some maximum line length
>       has been specified), and terminated by the Telnet end-of-line
>       code.
> (multiline reply will have hyphen after the code on the first line).
>
> but the code returned by microsoft has some other character (apart from
> '-' and ' ') after the 3 digits.
>
> anyone else notice this? should we worry about such cases too?

I think that in the case of ftp.microsoft.com, if you're seeing this in
the same spot that I was, this means you can't log on (I got it when the
server was full).  I ended up changing my response parser a little bit to
allow for this, but in a way that didn't break the rest of it.  My problem
with their response was that it wasn't properly terminated (or didn't
appear to be), which caused all kinds of parsing problems until I allowed
for it.

Reid

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth2.Stanford.EDU!rgustin
From: Reid Gustin 
Newsgroups: su.class.cs244a
Subject: Re: Reply Buffer over Control and Data connection...
Date: Fri, 18 Jan 2002 14:40:12 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2510

On Fri, 18 Jan 2002, Priyanka Gupta wrote:
> 1) Over the control connection, it seems that the max buffer is 1024
> bytes. When I use a buffer theis size. I do get the reply back. However,
> the status: 1xx, 2xx, 3xx, 4xx, 5xx, is not necessarily the first
> information in the buffer. Is that expected?
> If yes, then how would I know what the server's reply is?

The status code is defined in the RFC to be the first thing that comes
back over the socket, so my guess is that you're seeing the tail end of a
previous response, and then the new one.  Just a guess, though.

> 2) For data connection the server's reply could be very big. But would the
> server still reply in packets of 1024 bytes?
> I mean that the buffer that we pass to read(s, ...) should be 1024 bytes
> and then we need to just keep reading such buffers and then concatenate
> the data packets?
> Is that true? Please explain.

The data connections are different, in that they can send arbitrary
amounts of data at a time (like files).  You'll notice in the assignment,
it says, "In this assignment you can assume that no NVT string will be
longer than 1024 bytes."  Which means only NVT strings, like the control
connection, and not the data connection.  The server can send you whatever
it wants over the data connection, in arbitrary sized chunks, with no
requirement for newlines at all.

Reid

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: Reply Buffer over Control and Data connection...
Date: Fri, 18 Jan 2002 18:02:39 -0800
Lines: 59
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2511

> it says, "In this assignment you can assume that no NVT string will be
> longer than 1024 bytes."  Which means only NVT strings, like the control
> connection, and not the data connection.

so can we assume that all of the following will be no more than 1024
bytes:
1. every single line reply over ctrl connection
2. every line in the response from LIST (over data connection, but the
response of LIST is in NVT ASCII)


thanks,
~ashmi


On Fri, 18 Jan 2002, Reid Gustin wrote:

> On Fri, 18 Jan 2002, Priyanka Gupta wrote:
> > 1) Over the control connection, it seems that the max buffer is 1024
> > bytes. When I use a buffer theis size. I do get the reply back. However,
> > the status: 1xx, 2xx, 3xx, 4xx, 5xx, is not necessarily the first
> > information in the buffer. Is that expected?
> > If yes, then how would I know what the server's reply is?
>
> The status code is defined in the RFC to be the first thing that comes
> back over the socket, so my guess is that you're seeing the tail end of a
> previous response, and then the new one.  Just a guess, though.
>
> > 2) For data connection the server's reply could be very big. But would the
> > server still reply in packets of 1024 bytes?
> > I mean that the buffer that we pass to read(s, ...) should be 1024 bytes
> > and then we need to just keep reading such buffers and then concatenate
> > the data packets?
> > Is that true? Please explain.
>
> The data connections are different, in that they can send arbitrary
> amounts of data at a time (like files).  You'll notice in the assignment,
> it says, "In this assignment you can assume that no NVT string will be
> longer than 1024 bytes."  Which means only NVT strings, like the control
> connection, and not the data connection.  The server can send you whatever
> it wants over the data connection, in arbitrary sized chunks, with no
> requirement for newlines at all.
>
> Reid
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!epic27.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Re: Reply Buffer over Control and Data connection...
Date: Fri, 18 Jan 2002 19:21:04 -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
To: Reid Gustin 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2512

On Fri, 18 Jan 2002, Reid Gustin wrote:

> On Fri, 18 Jan 2002, Priyanka Gupta wrote:
> > 1) Over the control connection, it seems that the max buffer is 1024
> > bytes. When I use a buffer theis size. I do get the reply back. However,
> > the status: 1xx, 2xx, 3xx, 4xx, 5xx, is not necessarily the first
> > information in the buffer. Is that expected?
> > If yes, then how would I know what the server's reply is?
>
> The status code is defined in the RFC to be the first thing that comes
> back over the socket, so my guess is that you're seeing the tail end of a
> previous response, and then the new one.  Just a guess, though.

Just wanted to know if someone else is seeing this too. If its just me
then I might have some problem. In such a case I don't know what the
status code is.

 >
> > 2) For data connection the server's reply could be very big. But would the
> > server still reply in packets of 1024 bytes?
> > I mean that the buffer that we pass to read(s, ...) should be 1024 bytes
> > and then we need to just keep reading such buffers and then concatenate
> > the data packets?
> > Is that true? Please explain.
>
> The data connections are different, in that they can send arbitrary
> amounts of data at a time (like files).  You'll notice in the assignment,
> it says, "In this assignment you can assume that no NVT string will be
> longer than 1024 bytes."  Which means only NVT strings, like the control
> connection, and not the data connection.  The server can send you whatever
> it wants over the data connection, in arbitrary sized chunks, with no
> requirement for newlines at all.

I guess my question is that in that case how do we specify the size of the
reply buffer than we are expecting back?

>
> Reid
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic27.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Reply 4xx
Date: Fri, 18 Jan 2002 19:50:20 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic27.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2513


Hi,

I wanted to know that if we get a transient negative completion reply,
which means we could retry later. Should we retry again or can we just
treat 4xx and 5xx the same way?

Thanks,
Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: recursively descending into subdir
Date: Fri, 18 Jan 2002 19:53:20 -0800
Lines: 46
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2514

thanks reid, for pointing out the cwd .. thing. that wasnt my problem but
i do need to take care of that too.
ashmi

On Fri, 18 Jan 2002, Reid Gustin wrote:

> On Fri, 18 Jan 2002, Ashmi wrote:
> > -cwd into that dir (say D1) returns 250 ---works
> > -data connection is set up
> > -LIST returns 226 (is it necessary this returns 250?)
> > -on reading the contents returned by LIST though, i get nothing, but this
> > is not what is causing the program to hang...
> > -after this since i CWD'd into this directory D1, i try to cwd out of it
> > by "CWD .."
> > and <kaboom>.
>
> I don't know if this is actually the problem you're seeing, but if D1 is
> actually a symbolic link to someplace completely different, you could run
> into trouble with the 'CWD ..'.  Take the example where D1 points to a
> directory, the parent of which you don't have permissions for.  You try
> 'CWD ..' and it would say you couldn't do that.  It's also a little bit
> dangerous, as 'CWD ..' could take you *anywhere* in the system, not
> necesarily back to the tree where you were transferring files, in the
> case of symbolic links.
>
> As for what LIST can return, it's legal (from the RFC) for it to return
> any of: 125, 150, 226, 250, 421, 425, 426, 451, 450, 500, 501, 502, 530.
> There's a spot in the RFC under the heading 'Command-Reply Sequences' that
> talks about the possible responses to a given command.
>
> Reid
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: failure @ getsockname
Date: Fri, 18 Jan 2002 20:12:14 -0800
Lines: 29
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2515

I'm following the steps indicated in the assignment handout,
for establishing the data connection,

1.)creating a socket

zeroing out a struct sockaddr_in struct
getting the host name via getenv("HOST") - (returns saga3.stanford.edu)
getting the host address via gethostbyname
copying the host_addr field into the struct sockaddr_in


At this point the struct sockaddr_in looks good, so I call
2.)bind w/ struct sockaddr_in's sin_port still = 0 from zeroing it out
earlier
3.)calling listen
4.)and then calling getsockname to determine the port number

But getsockname fails on me w/ the following args:
 
getsockname( dataId, (struct sockaddr *)clientAddr, sizeof(*clientAddr)
)

Should the 3rd arg be the size of the struct sockaddr_in as in the calls
to bind, or is it sizeof(len) where len is socklen_t as on pg 109?

Is there another reason why getsockname would fail,
or is there something faulty before my call to getsockname?

Cheers,
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Victor Wong 
Newsgroups: su.class.cs244a
Subject: ANSI C library functions
Date: 19 Jan 2002 04:25:33 GMT
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: fable7.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2516

Hi,

I'm having problems determining whether certain functions that I'm using are in the ANSI C spec. Is there a place that contains a list of the ANSI C library functions? For example, I was under the impression that bzero wasn't in the ANSI C spec - memset should be used instead. However, the given example uses bzero so I'm confused as to what functions are allowed and which ones are not.

Thanks,
Victor.
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: Re: Reply Buffer over Control and Data connection...
Date: Fri, 18 Jan 2002 21:07:42 -0800
Lines: 54
Distribution: su
Message-ID: 
References: 
	  
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2517

P -

You dont know the "size" of the line you are expecting back,
so you need to loop and read 1 char at a time until you
hit the end of line char...

Take a look @ the FTP Server Replies post earlier

Priyanka Gupta wrote:
> 
> On Fri, 18 Jan 2002, Reid Gustin wrote:
> 
> > On Fri, 18 Jan 2002, Priyanka Gupta wrote:
> > > 1) Over the control connection, it seems that the max buffer is 1024
> > > bytes. When I use a buffer theis size. I do get the reply back. However,
> > > the status: 1xx, 2xx, 3xx, 4xx, 5xx, is not necessarily the first
> > > information in the buffer. Is that expected?
> > > If yes, then how would I know what the server's reply is?
> >
> > The status code is defined in the RFC to be the first thing that comes
> > back over the socket, so my guess is that you're seeing the tail end of a
> > previous response, and then the new one.  Just a guess, though.
> 
> Just wanted to know if someone else is seeing this too. If its just me
> then I might have some problem. In such a case I don't know what the
> status code is.
> 
>  >
> > > 2) For data connection the server's reply could be very big. But would the
> > > server still reply in packets of 1024 bytes?
> > > I mean that the buffer that we pass to read(s, ...) should be 1024 bytes
> > > and then we need to just keep reading such buffers and then concatenate
> > > the data packets?
> > > Is that true? Please explain.
> >
> > The data connections are different, in that they can send arbitrary
> > amounts of data at a time (like files).  You'll notice in the assignment,
> > it says, "In this assignment you can assume that no NVT string will be
> > longer than 1024 bytes."  Which means only NVT strings, like the control
> > connection, and not the data connection.  The server can send you whatever
> > it wants over the data connection, in arbitrary sized chunks, with no
> > requirement for newlines at all.
> 
> I guess my question is that in that case how do we specify the size of the
> reply buffer than we are expecting back?
> 
> >
> > Reid
> >
> >

-- 
       Luis Robles

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: failure @ getsockname
Date: Sat, 19 Jan 2002 00:02:13 -0800
Lines: 58
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2518

I'm assuming you're getting a compile-error/warning because I believe 
your third arg is wrong; it's supposed to be a 'socklen_t *namelen'. 
Below, you're not passing a pointer to the length, but the length itself.

You need to do something like:

len = sizeof(*clientAddr);
getsockname( dataId, (struct sockaddr *)clientAddr, &len)

getsockname will update the len variable with the real length of the 
object; you never use len, but that's what it does.

Hope that solves your problem.

-Sandeep

Luis Robles wrote:

> I'm following the steps indicated in the assignment handout,
> for establishing the data connection,
> 
> 1.)creating a socket
> 
> zeroing out a struct sockaddr_in struct
> getting the host name via getenv("HOST") - (returns saga3.stanford.edu)
> getting the host address via gethostbyname
> copying the host_addr field into the struct sockaddr_in
> 
> 
> At this point the struct sockaddr_in looks good, so I call
> 2.)bind w/ struct sockaddr_in's sin_port still = 0 from zeroing it out
> earlier
> 3.)calling listen
> 4.)and then calling getsockname to determine the port number
> 
> But getsockname fails on me w/ the following args:
>  
> getsockname( dataId, (struct sockaddr *)clientAddr, sizeof(*clientAddr)
> )
> 
> Should the 3rd arg be the size of the struct sockaddr_in as in the calls
> to bind, or is it sizeof(len) where len is socklen_t as on pg 109?
> 
> Is there another reason why getsockname would fail,
> or is there something faulty before my call to getsockname?
> 
> Cheers,
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: ANSI C library functions
Date: Sat, 19 Jan 2002 00:05:32 -0800
Lines: 40
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2519

Based on the following reply from Arun to Garrett's question about 
snprintf, I'd say that as long as the thing compiles, you're fine:

<begin quote here>

We'd prefer it, if for consistency sake, that the program compiles without
warning with the -ansi flag.

In this case, the function is linked in so it is present in the library.
To avoid the warning add the declaration:

extern int snprintf(char *s,  size_t  n,  const  char  *format,  /* args*/
....);

and everything should compile and link without event.
<end quote here>

Or at least that's my interpretation of Arun's mail.

-Sandeep

Victor Wong wrote:

> Hi,
> 
> I'm having problems determining whether certain functions that I'm using are in the ANSI C spec. Is there a place that contains a list of the ANSI C library functions? For example, I was under the impression that bzero wasn't in the ANSI C spec - memset should be used instead. However, the given example uses bzero so I'm confused as to what functions are allowed and which ones are not.
> 
> Thanks,
> Victor.
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: server close data connection
Date: Sat, 19 Jan 2002 00:23:31 -0800
Lines: 66
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2520

No, this isn't right (though logical).  Each time, you DO need to create 
a new server socket and listen to it.  In my by-hand experiments, trying 
to recycle the server socket ends up making your next LIST command 
block.  And this isn't a problem in your server socket or anything; it's 
a problem in the ftp server.  Here's the experiment I just did:

1. I started up an interactive Tcl shell (Tcl is this super-cool 
scripting language that I've done a lot of work in in the past six 
years) and created a server socket listening on port 9999.
2. I telnet'ed to port 21 of ftp.stanford.edu and issued the following 
commands:
     USER anonymous
     PASS 
     PORT 171,64,15,69,39,15


The ftp server successfully connected to my server socket in that Tcl 
shell, and I'd coded it such that any data it received from a connection 
would just print to stdout...which it did.

Then I issued another set of PORT and LIST commands (the same as above). 
  The PORT command came back with a 200 response, but the LIST command 
didn't come back with anything...it just hung.  I had to kill that session.

Without touching the Tcl shell that was still (allegedly) listening on 
port 9999, I telnet'ed to port 9999 and typed some random text.  The Tcl 
shell's server socket accepted the connection and printed that text.

So, putting this into the context of our ftpcopy program, you can't 
recycle the server socket because bad things happen at the ftp server end.

And from a security standpoint, this is exactly what you'd want: if you 
left your server socket open throughout the life-time of ftpcopy, ANYONE 
could connect to that port and send you data...and you'd take it and 
save it somewhere (once you did the accept, listen, etc.)

Hmm, as usual, my reply ended up being somewhat longer than I originally 
meant it to be...need to learn to be concise. :(

-Sandeep


Eric Watkins wrote:

>>Yes, a new data connection needs to opened for each file/LIST response
>>(this includes issuing a PORT command etc.)
>>
> 
> But can we (should we) skip steps 1 and 3?  Those seem like things that
> should only be done once.  After you have that first socket set up to
> receive the incoming connections, then you need to repeat all the other
> steps, including accept(), which will get you the new data socket.  Is
> this right?
> 
> -Eric
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Ron Luman II" 
Newsgroups: su.class.cs244a
Subject: Re: Stevens Code
Date: Sat, 19 Jan 2002 01:32:19 -0800
Lines: 21
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: xenon.stanford.edu
X-Trace: news.Stanford.EDU 1011432788 9037 171.64.66.201 (19 Jan 2002 09:33:08 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: nntp.stanford.edu su.class.cs244a:2521

Hmmm,

I must admit, as detailed as the handout is, I cannot find any text which
_unambiguously_ answers the question.   Would it be possible for you to
excerpt the applicable passage?

Thanks, and sorry for the trouble,

--Ron


"Nick McKeown"  wrote in message

> Russ,
> You'll find a detailed description of
> acceptable re-use in Handout #1, under
> the section on the Honor Code.
>
> - NM


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: some questions about maximum sizes
Date: Sat, 19 Jan 2002 08:01:52 -0800
Lines: 30
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2522

hi,
the grading guidelines mention that we should not assume "maximum size for
list of files". fair enough.
but can we assume the following:

1. size of each single-line reply and that of _each_ line of list response
to be < 1024 (because they are NVT ASCII strings)

2. size of each command string sent (on control socket) < 1024 bytes
((because they are NVT ASCII strings)

3. filenames/path have maximum length

anyone know?
thanks,
ashmi


###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!epic2.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Problems with Accept()
Date: Sat, 19 Jan 2002 08:08:12 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2523


Hi,

After setting up my data connection and sending LIST command to the server
I tried to accept the server's connection. But it did not work. This is
what I am trying to do:

servAddrLen = sizeof(servAddr);
new_socket = accept(control_socket, (struct sockaddr *) &servAddr, &serAddrLen);

where servAddr  is the same as was used to establish the control
connection and control_socket is the socket over the control connection. I
tried using the adat_socket instead also, but in vain.

I would appreciate your help.

Thanks,
Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Symlinks again-symlink to current dir?!?
Date: Sat, 19 Jan 2002 09:35:16 -0800
Lines: 47
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2524

hi,
what if we get the following listing:
-Dir1
 |
 -- a.gz
 |
 -- pub -> .

that is there is a directory pub which is actually a symlink to the
current dir. i guess this could occur at any level, and similarly '..'
could be pointed to by a symlink.

this actually occurs for the listing of ftp.gnu.org.
do we take  of this? if yes, would our resulting destination dir structure
be: (for getting files with ext .gz and level 2)

-Dest
 |
 --a.gz
 |
 --pub
   |
   --a.gz
   |
   --pub
     |
     --a.gz

any ideas?
thanks,
ashmi




###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine33.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: UMR in gethostbyname
Date: 19 Jan 2002 17:38:13 GMT
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine33.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2525

Derrick Wen-Shiuan Tong  writes:

>When I pass "ftp.fedworld.gov" into gethostbyname(...),
>purify reports a UMR in the library code.

>Believe it or not, it only happens with that host. I've checked
>and made sure that the string is null terminated.

>Does anyone else have this problem, and can we ignore UMR's
>reported in the standard library code?


As long as you've verified that you're passing in valid arguments, yes,
you can ignore UMR warnings in external code.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Problems with Accept()
Date: Sat, 19 Jan 2002 09:48:06 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2526

You don't want to do send control_socket to the accept command; you want 
to send a whole new socket that you created a few lines above.  Take a 
look at the eight steps enumerated in the assignment regarding the 
handling of LIST and RETR.

Good luck.

-Sandeep


Priyanka Gupta wrote:

> Hi,
> 
> After setting up my data connection and sending LIST command to the server
> I tried to accept the server's connection. But it did not work. This is
> what I am trying to do:
> 
> servAddrLen = sizeof(servAddr);
> new_socket = accept(control_socket, (struct sockaddr *) &servAddr, &serAddrLen);
> 
> where servAddr  is the same as was used to establish the control
> connection and control_socket is the socket over the control connection. I
> tried using the adat_socket instead also, but in vain.
> 
> I would appreciate your help.
> 
> Thanks,
> Priyanka
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic21.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Re: Problems with Accept()
Date: Sat, 19 Jan 2002 10:04:54 -0800
Lines: 48
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Sandeep Tamhankar 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2527


I did do all the steps, but at the last command (accept()) it fails.

On Sat, 19 Jan 2002, Sandeep Tamhankar wrote:

> You don't want to do send control_socket to the accept command; you want
> to send a whole new socket that you created a few lines above.  Take a
> look at the eight steps enumerated in the assignment regarding the
> handling of LIST and RETR.
>
> Good luck.
>
> -Sandeep
>
>
> Priyanka Gupta wrote:
>
> > Hi,
> >
> > After setting up my data connection and sending LIST command to the server
> > I tried to accept the server's connection. But it did not work. This is
> > what I am trying to do:
> >
> > servAddrLen = sizeof(servAddr);
> > new_socket = accept(control_socket, (struct sockaddr *) &servAddr, &serAddrLen);
> >
> > where servAddr  is the same as was used to establish the control
> > connection and control_socket is the socket over the control connection. I
> > tried using the adat_socket instead also, but in vain.
> >
> > I would appreciate your help.
> >
> > Thanks,
> > Priyanka
> >
> >
>
>
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine33.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Reply Buffer over Control and Data connection...
Date: 19 Jan 2002 18:14:02 GMT
Lines: 10
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine33.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2528

Ashmi  writes:

>so can we assume that all of the following will be no more than 1024
>bytes:
>1. every single line reply over ctrl connection
>2. every line in the response from LIST (over data connection, but the
>response of LIST is in NVT ASCII)

Yes, both assumptions are reasonable.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine33.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Reply Buffer over Control and Data connection...
Date: 19 Jan 2002 18:29:06 GMT
Lines: 32
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine33.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2529

>> > 2) For data connection the server's reply could be very big. But would the
>> > server still reply in packets of 1024 bytes?
>> > I mean that the buffer that we pass to read(s, ...) should be 1024 bytes
>> > and then we need to just keep reading such buffers and then concatenate
>> > the data packets?
>> > Is that true? Please explain.

The connection uses TCP, i.e. it's stream-oriented rather than
datagram-oriented, so the server just writes data without any particular
notion of packets.  (This will be explained in much greater detail in a
couple of lectures, and particularly in the next assignment).


>> The data connections are different, in that they can send arbitrary
>> amounts of data at a time (like files).  You'll notice in the assignment,
>> it says, "In this assignment you can assume that no NVT string will be
>> longer than 1024 bytes."  Which means only NVT strings, like the control
>> connection, and not the data connection.  The server can send you whatever
>> it wants over the data connection, in arbitrary sized chunks, with no
>> requirement for newlines at all.

>I guess my question is that in that case how do we specify the size of the
>reply buffer than we are expecting back?

The server will close its end of the connection once it has finished sending
whatever you've requested on the data connection, so you can loop on
recv() until it returns zero (EOF), grabbing some amount of data from the
connection each time.  The buffer size you decide to use is up to you.
(Obviously, for efficiency's sake, how you handle NVT strings in a LIST
response may not necessarily be how you'll handle the transfer of a large
file).

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine33.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Reply 4xx
Date: 19 Jan 2002 18:33:30 GMT
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine33.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2530



>I wanted to know that if we get a transient negative completion reply,
>which means we could retry later. Should we retry again or can we just
>treat 4xx and 5xx the same way?

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

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine33.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: ANSI C library functions
Date: 19 Jan 2002 18:53:50 GMT
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine33.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2531


>I'm having problems determining whether certain functions that I'm using
>are in the ANSI C spec. Is there a place that contains a list of the
>ANSI C library functions? For example, I was under the impression that
>bzero wasn't in the ANSI C spec - memset should be used instead. However,
>the given example uses bzero so I'm confused as to what functions are
>allowed and which ones are not.

The intent of requiring ANSI C is primarily that people use proper function
prototyping (no K&R-style function declarations), no C++, etc.

In fact, a lot of the library functions you're required to use in this program
are not ANSI C library functions--e.g. the socket calls themselves.  There's
no way around this.

Having said that, for the example you mention, given the issue of portability,
I'd suggest using memset rather than bzero since the option is available.
(Keep in mind that portability is one of the design criteria to consider in
the grading guidelines, so you should try to avoid system-specific
implementation where possible--or if some details are system specific,
they might be abstracted out or otherwise documented in your code).

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic19.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Re: ANSI C library functions
Date: Sat, 19 Jan 2002 11:14:31 -0800
Lines: 30
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: epic19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Matthew Jonathan Holliman 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2532


Just FYI, the FAQ mentions that you could use bzero or bcopy although
technically they are not ANSI C compliant.

On 19 Jan 2002, Matthew Jonathan Holliman wrote:

>
> >I'm having problems determining whether certain functions that I'm using
> >are in the ANSI C spec. Is there a place that contains a list of the
> >ANSI C library functions? For example, I was under the impression that
> >bzero wasn't in the ANSI C spec - memset should be used instead. However,
> >the given example uses bzero so I'm confused as to what functions are
> >allowed and which ones are not.
>
> The intent of requiring ANSI C is primarily that people use proper function
> prototyping (no K&R-style function declarations), no C++, etc.
>
> In fact, a lot of the library functions you're required to use in this program
> are not ANSI C library functions--e.g. the socket calls themselves.  There's
> no way around this.
>
> Having said that, for the example you mention, given the issue of portability,
> I'd suggest using memset rather than bzero since the option is available.
> (Keep in mind that portability is one of the design criteria to consider in
> the grading guidelines, so you should try to avoid system-specific
> implementation where possible--or if some details are system specific,
> they might be abstracted out or otherwise documented in your code).
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: Server replies and end-of-transmission
Date: Sat, 19 Jan 2002 12:00:40 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2533

I've read the two posts on server replies already, but I'm still not sure
about how we're supposed to detect the end of a transmission over the data
connection. Since it's not ASCII it's not terminated by an /r/n; if we keep
on reading when there is no data left the socket blocks (someone please
explain, too, why the assignment states that the read will return 0).

Also, what is the protocol for the LIST command? Does the server write the
completion acknowledgement (226?) after it's done writing on its side, or
does it wait until I have retrieved the information from the socket? I'm
waiting for a confirmation but it never comes.

Thanks a bunch, guys.



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Server replies and end-of-transmission
Date: Sat, 19 Jan 2002 12:14:57 -0800
Lines: 51
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2534

Steven Siuhong Ngai wrote:

> I've read the two posts on server replies already, but I'm still not sure
> about how we're supposed to detect the end of a transmission over the data
> connection. Since it's not ASCII it's not terminated by an /r/n; if we keep
> on reading when there is no data left the socket blocks (someone please
> explain, too, why the assignment states that the read will return 0).


read() returns 0 on eof; so you keep reading until read returns 0.  Then 
you're done.  Because you want to read until eof, you don't have to 
worry about blocking.  Said differently, you have to worry about 
blocking on the control connection because no one's closing the 
connection.  You send something, you read something.  If you read more 
than you're supposed to, you'll block forever and your world will come 
crashing around you.


> Also, what is the protocol for the LIST command? Does the server write the
> completion acknowledgement (226?) after it's done writing on its side, or
> does it wait until I have retrieved the information from the socket? I'm
> waiting for a confirmation but it never comes.
> 
> Thanks a bunch, guys.


Not sure about this one; I'd guess that it sends the acknowledgment 
after it's done writing all the data to the socket since regardless of 
what you do, it knows it's done it's part.  But the safer assumption is 
that the acknowledgment comes after you're done reading, since this 
covers the scenario where the server couldn't write everything because 
some lower-level thing (kernel? IP protocol?) filled up its buffers 
waiting for you to read some of the data.  So, I'd recommend (and this 
is what I did) reading the acknowledgment after reading all the data off 
the data socket.

Hope that helps.


-Sandeep




-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine6.Stanford.EDU!htimam
From:  (Hasan Taufiq Imam)
Newsgroups: su.class.cs244a
Subject: multiline replies
Date: 19 Jan 2002 22:58:57 GMT
Organization: Stanford University, CA 94305, USA
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine6.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2535

I am not sure what is the significance of multiline replies processing.
Control replies are all going to be 1024 bytes. For each command one call to
read should be enough. For our programs sake we just need to process the first
line and the rest of the lines are not important. Can we receive multi-line 
replies with two read()? A single reply from the server should always be read 
with a single read right?
  


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Tim Chao 
Newsgroups: su.class.cs244a
Subject: Re: Server replies and end-of-transmission
Date: Sat, 19 Jan 2002 15:24:32 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: slimtc.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2536



Steven Siuhong Ngai wrote:

> Also, what is the protocol for the LIST command? Does the server write the
> completion acknowledgement (226?) after it's done writing on its side, or
> does it wait until I have retrieved the information from the socket? I'm
> waiting for a confirmation but it never comes.

I think I'm having the same problem here -- I've accepted the data connection
and over the control connection I get the completion acknowledgement (226). So
there should be stuff to read from the data socket. But, when I try to retrieve
the LIST response in ASCII, I get an error on read() - a return value of -1.

Any suggestions?

Thanks guys,
Tim

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine23.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: Server replies and end-of-transmission
Date: Sat, 19 Jan 2002 15:28:26 -0800
Lines: 77
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine23.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2537

 So, I'd recommend (and this
> is what I did) reading the acknowledgment after reading all the data off
> the data socket.

that's what i am doing too, but ensure that you wait for 125/150 before
you starting to read the data. else you might get out of sync with the
server.

~ashmi

On Sat, 19 Jan 2002, Sandeep Tamhankar wrote:

> Steven Siuhong Ngai wrote:
>
> > I've read the two posts on server replies already, but I'm still not sure
> > about how we're supposed to detect the end of a transmission over the data
> > connection. Since it's not ASCII it's not terminated by an /r/n; if we keep
> > on reading when there is no data left the socket blocks (someone please
> > explain, too, why the assignment states that the read will return 0).
>
>
> read() returns 0 on eof; so you keep reading until read returns 0.  Then
> you're done.  Because you want to read until eof, you don't have to
> worry about blocking.  Said differently, you have to worry about
> blocking on the control connection because no one's closing the
> connection.  You send something, you read something.  If you read more
> than you're supposed to, you'll block forever and your world will come
> crashing around you.
>
>
> > Also, what is the protocol for the LIST command? Does the server write the
> > completion acknowledgement (226?) after it's done writing on its side, or
> > does it wait until I have retrieved the information from the socket? I'm
> > waiting for a confirmation but it never comes.
> >
> > Thanks a bunch, guys.
>
>
> Not sure about this one; I'd guess that it sends the acknowledgment
> after it's done writing all the data to the socket since regardless of
> what you do, it knows it's done it's part.  But the safer assumption is
> that the acknowledgment comes after you're done reading, since this
> covers the scenario where the server couldn't write everything because
> some lower-level thing (kernel? IP protocol?) filled up its buffers
> waiting for you to read some of the data.  So, I'd recommend (and this
> is what I did) reading the acknowledgment after reading all the data off
> the data socket.
>
> Hope that helps.
>
>
> -Sandeep
>
>
>
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!epic21.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Bytes Read over data connection
Date: Sat, 19 Jan 2002 15:31:37 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2538


Hi All,

After setting up a data connection, when I do a LIST, I get the following
response over the control connection:

150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.

However when I try to read the data over the data connection:

while(1)
{
	if(( bytes_read = read(data_socket, replyBuffer, REPLY_SIZE )) > 0)
	{
		fprintf(stderr, "%s \n\n", replyBuffer);
		break;
	}
}

I get -1 bytes_read, which means its failing. Any idea why this might be?

Thnaks,
Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine23.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: multiline replies
Date: Sat, 19 Jan 2002 15:32:55 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine23.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2539



> Control replies are all going to be 1024 bytes.
i dont think this is correct - each NVT ASCII string is 1024, means each
line of the multiline could be at most 1024.you need to ensure you stop
reading when the multiline gets over or the socket will block.

>A single reply from the server should always be read
> with a single read right?
not necessarily, you might need to read char by char on the control
connection.

~ashmi


On 19 Jan 2002, Hasan
Taufiq Imam wrote:

> I am not sure what is the significance of multiline replies processing.
> Control replies are all going to be 1024 bytes. For each command one call to
> read should be enough. For our programs sake we just need to process the first
> line and the rest of the lines are not important. Can we receive multi-line
> replies with two read()? A single reply from the server should always be read
> with a single read right?
>
>
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: multiline replies
Date: Sat, 19 Jan 2002 15:33:06 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2540

Well you need to make sure you read the rest of the lines in the 
response, or else next time you send a command, you'll end up reading 
the tail end of the prior response.

-Sandeep

Hasan Taufiq Imam wrote:

> I am not sure what is the significance of multiline replies processing.
> Control replies are all going to be 1024 bytes. For each command one call to
> read should be enough. For our programs sake we just need to process the first
> line and the rest of the lines are not important. Can we receive multi-line 
> replies with two read()? A single reply from the server should always be read 
> with a single read right?
>   
> 
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Bytes Read over data connection
Date: Sat, 19 Jan 2002 15:36:22 -0800
Lines: 43
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2541

Probably an interrupt in the system; this would cause a -1 bytes_read, 
and then you have to check if errno == EINTR to decide whether it's a 
real error or not.  (If you do get EINTR, then just 'continue'.)

-Sandeep

Priyanka Gupta wrote:

> Hi All,
> 
> After setting up a data connection, when I do a LIST, I get the following
> response over the control connection:
> 
> 150 Opening ASCII mode data connection for /bin/ls.
> 226 Transfer complete.
> 
> However when I try to read the data over the data connection:
> 
> while(1)
> {
> 	if(( bytes_read = read(data_socket, replyBuffer, REPLY_SIZE )) > 0)
> 	{
> 		fprintf(stderr, "%s \n\n", replyBuffer);
> 		break;
> 	}
> }
> 
> I get -1 bytes_read, which means its failing. Any idea why this might be?
> 
> Thnaks,
> Priyanka
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: Re: Script file sizes (normal line endings this time)
Date: Sat, 19 Jan 2002 15:45:27 -0800
Lines: 84
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine12.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2542

I actually have this exact same error (and my numbers match yours) on
server 204.123.2.2.  I went and looked at the server using ftp, and my
numbers seem to match the numbers on their currently.  Is it possible
that this directory is being changed periodically?  Or did you find
something in your program that affected your answer?

Thanks,
Clayton


Bret Taylor wrote:
> 
> Nevermind, it woked this time, it must have been my numbers that were wrong.
> 
> Bret
> 
> "Bret Taylor"  wrote in message
> 
> > I noticed my first post had some weird carriage returns, so I am reposting
> > to make it easier to read.  Sorry for the trouble.
> >
> > First of all, thanks for providing the test scripts, it is great to have
> > such a simple and thorough way to test our code.  However, I have a couple
> > questions regarding  "Test F.2".
> >
> > My test script output includes this:
> >
> > test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> > exit line said: "OK: 1900222 bytes copied"
> > ---
> > diff between expected tree and your tree:
> > 1,8d0
> > < ./kermit/c/all.tar.Z 2606058765 72935
> > < ./kermit/c/amiga.tar.Z 1017293024 135815
> > < ./kermit/c/dg.tar.Z 2560791635 406317
> > < ./kermit/c/mac.tar.Z 2459747744 496551
> > < ./kermit/c/os2.tar.Z 2771080586 163808
> > < ./kermit/c/os9.tar.Z 370278796 49438
> > < ./kermit/c/unix.tar.Z 308104872 349221
> > < ./kermit/c/vms.tar.Z 53741681 64755
> >
> > I used ncftp to go to the site to see what was going on, and a "ls -l" in
> > the kermit/c directory shows this:
> >
> > ncftp /pub/comm/kermit/c > ls -l
> > lrwxrwxrwx   1 0        0           37   Apr 14  1995
> > 00README-Legal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs
> > -r--r--r--   1 0        0          935   Jan 17  1989   README
> > -r--r--r--   1 0        0        72935   Jan 16  1989   all.tar.Z
> > -r--r--r--   1 0        0       135815   Jan 16  1989   amiga.tar.Z
> > -r--r--r--   1 0        0       406317   Jan 16  1989   dg.tar.Z
> > -r--r--r--   1 0        0       496551   Jan 16  1989   mac.tar.Z
> > -r--r--r--   1 0        0       163808   Jan 16  1989   os2.tar.Z
> > -r--r--r--   1 0        0        49438   Jan 16  1989   os9.tar.Z
> > -r--r--r--   1 0        0       349221   Jan 16  1989   unix.tar.Z
> > -r--r--r--   1 0        0        64755   Jan 16  1989   vms.tar.Z
> >
> > It looks like the files sizes are the ones I got, not the large ones from
> > the script.  Am I mistaken here? The same thing happened on the MS FTP
> site
> > (snippets below).
> >
> > test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie exit line
> > said: "OK: 5113 bytes copied"
> > ---
> > diff between expected tree and your tree:
> > 3,4d2
> > < ./ie-public/fixes/usa/ie401/importexportfavorites-fix/readme.txt
> > 2939125283 643 <
> > ./ie-public/fixes/usa/ie50/importexportfavorites-fix/readme.txt 2939125283
> > 643
> >
> > ncftp ...ortexportfavorites-fix > ls -l
> > dr-xr-xr-x   1 owner    group            0 Feb 25  2000 alpha
> > -r-xr-xr-x   1 owner    group          643 Sep 24  1999 readme.txt
> > dr-xr-xr-x   1 owner    group            0 Feb 25  2000 x86
> >
> >
> > Thanks for your time,
> > Bret
> >
> >
> >
> >
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Tim Chao 
Newsgroups: su.class.cs244a
Subject: Re: Bytes Read over data connection
Date: Sun, 20 Jan 2002 00:30:02 +0000 (UTC)
Lines: 20
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: slimtc.stanford.edu
X-Trace: news.Stanford.EDU 1011486602 14319 128.12.65.49 (20 Jan 2002 00:30:02 GMT)
X-Complaints-To: 
User-Agent: Xnews/4.11.09
Xref: nntp.stanford.edu su.class.cs244a:2543

Sandeep Tamhankar  wrote in
 

> Probably an interrupt in the system; this would cause a -1 bytes_read, 
> and then you have to check if errno == EINTR to decide whether it's a 
> real error or not.  (If you do get EINTR, then just 'continue'.)
> 
> -Sandeep

Thanks for the lead... Anyhow, I did a check using perror and errno and 
got the error "Transport endpoint not connected". Does this mean that the 
server hasn't connected to me after all? I was able to accept() the 
connection and the server sent me the 226 message saying that the LIST 
transfer was complete.

Any ideas?

Thanks,
Tim

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Bytes Read over data connection
Date: 20 Jan 2002 00:40:23 GMT
Lines: 26
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine40.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2544

Tim Chao  writes:

>Sandeep Tamhankar  wrote in
 

>> Probably an interrupt in the system; this would cause a -1 bytes_read, 
>> and then you have to check if errno == EINTR to decide whether it's a 
>> real error or not.  (If you do get EINTR, then just 'continue'.)
>> 
>> -Sandeep

>Thanks for the lead... Anyhow, I did a check using perror and errno and 
>got the error "Transport endpoint not connected". Does this mean that the 
>server hasn't connected to me after all? I was able to accept() the 
>connection and the server sent me the 226 message saying that the LIST 
>transfer was complete.

>Any ideas?

>Thanks,
>Tim


Be sure that you issue the read() on the socket that accept() returned, not
the socket on which you were listening for the FTP server connection.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Tim Chao 
Newsgroups: su.class.cs244a
Subject: Re: Bytes Read over data connection
Date: Sat, 19 Jan 2002 16:45:04 -0800
Lines: 9
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: slimtc.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2545

>
> Be sure that you issue the read() on the socket that accept() returned, not
> the socket on which you were listening for the FTP server connection.

That was the first thing I checked. I know that it's erroring out on my data
socket and not the control. Also, in that case it would cause the program to
hang and not error right?


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Tim Chao 
Newsgroups: su.class.cs244a
Subject: Re: Bytes Read over data connection
Date: Sat, 19 Jan 2002 16:47:30 -0800
Lines: 6
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: slimtc.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2546

>
> Be sure that you issue the read() on the socket that accept() returned, not
> the socket on which you were listening for the FTP server connection.

Nevermind, i misread you the first time. That worked. Thanks!

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!htimam
From:  (Hasan Taufiq Imam)
Newsgroups: su.class.cs244a
Subject: Re: multiline replies
Date: 20 Jan 2002 00:53:14 GMT
Organization: Stanford University, CA 94305, USA
Lines: 9
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine13.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2547

thanks much.
tell me if I am right:
1. Each line in control connection is terminated by telnet end of line
2. One line can be longer than 1024 bytes
3. Thus a control reply can be longer than 1024 bytes
4. If that is the case what is the difference between date reply and control 
reply. You have to dynamically accumulate control replies also because control
replies can be arbitarily long.
clarifications will be much appreciated. 
.

Path: shelby.stanford.edu!nntp.stanford.edu!epic13.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Test script
Date: Sat, 19 Jan 2002 17:13:47 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2548


Hi All,

I can't locate the test script. Could someone tell where its located?

Thanks a bunch,
Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Cool Networking Term of the Day
Date: Sat, 19 Jan 2002 19:12:03 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2549

Page 288, Peterson and Davie:

"split horizon with poison reverse"

Now get back to work, people; a few days to go and the pain and 
suffering will be over...(for this project at least...)

Good luck.

-Sandeep
-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic0.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Rearding the assignment 2
Date: Sat, 19 Jan 2002 20:17:23 -0800
Lines: 7
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic0.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2550

Hi,
I am not able to access the /afs/ir/class/cs244a/WWW/homeworks/hw2/gethw2
script.
Thanks
Regards
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Rearding the assignment 2
Date: Sat, 19 Jan 2002 20:23:03 -0800
Lines: 32
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2551

If you're really anxious to get started, go to 
http://www.stanford.edu/class/cs244a/homeworks/hw2/gethw2

This script is what you would run if you had permission; just do by hand 
(through your browser or wget) what this script says.

Or wait until the TAs move all this code to someplace reasonable like 
/afs/ir/class/cs244a/homeworks so that we aren't forced to use wget and 
such tools anytime we need anything.

-Sandeep

Shankar Agarwal wrote:

> Hi,
> I am not able to access the /afs/ir/class/cs244a/WWW/homeworks/hw2/gethw2
> script.
> Thanks
> Regards
> Shankar
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Adrian Graham" 
Newsgroups: su.class.cs244a
Subject: code re-use policy
Date: Sun, 20 Jan 2002 21:46:33 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: zoostation.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2552

I'd appreciate a clarification of the code re-use policy. I have read
handout 1, but I'm still unsure of a couple of cases.

(1) Support code written by someone else. For instance, a dynamic array
library. It is clear to me that an FTP library would not be appropriate for
assignment 1, but the policy with regard to support code is less clear.

(2) Support code written by me. For instance, a dynamic array library I
wrote in a previous class.

Thanks,

Adrian


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Slow Test Script
Date: Sat, 19 Jan 2002 22:42:43 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2553

Hi,

I want to make sure that I am not the only one who faces the slow testing.
I sent my test before 3 hours, and till now I didn't get anything. Is this
normal?

Thanks,

Moh'd


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Ron Luman II" 
Newsgroups: su.class.cs244a
Subject: Re: code re-use policy
Date: Sat, 19 Jan 2002 23:43:22 -0800
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
X-Trace: news.Stanford.EDU 1011512655 17484 171.64.66.201 (20 Jan 2002 07:44:15 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: nntp.stanford.edu su.class.cs244a:2554

I agree that this is still ambiguous.  I would also like a response as to
whether we may reuse code from:

- Stevens
- echodemo.c example

Thanks,

--Ron


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Slow Test Script
Date: Sun, 20 Jan 2002 00:02:31 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2555

You got a response??  I'm waiting on 4 hours now and still nothing.

--Russ


"Moh'd Saleem Saleem Alrawashdeh"  wrote in message

> Hi,
>
> I want to make sure that I am not the only one who faces the slow testing.
> I sent my test before 3 hours, and till now I didn't get anything. Is this
> normal?
>
> Thanks,
>
> Moh'd
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine27.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Assignment1: Questions regarding symbolic links
Date: Sun, 20 Jan 2002 02:26:14 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine27.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2556

I have few questions regarding symbolic links:
(1) Do we have to handle the case of cycles due to symbolic links. All
directories in a cycle may be "empty" and we may keep looping if we either
don't create the directories or maintain a possibly huge data structure
depicting how the directories are organized.

(2) If there's a symbolic link 1.gz -> 1.txt and we are supposed to copy
all the files with gz ext, do we copy 1.txt? And in case we are supposed
to copy all files with .txt ext do we need to look at what the link points
to and figure out if it has a .txt ext and copy 1.txt - and in this case
what should be the name of final file.

(3) If there's a symbolic link "l" to a dir "d" do we create a dir with
the name "l" or "d". If we try to create a dir with name "d" there might
already be a file/dir on the local filesystem with that name (this may
not be due to ftpcopy).

Thanks,
Dhawal Kumar

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic12.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Re: Slow Test Script
Date: Sun, 20 Jan 2002 06:35:04 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Russell Greene 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2557


I think there might be something wrong. I haven't received my reply so far
and I had submitted it last night.

On Sun, 20 Jan 2002, Russell Greene wrote:

> You got a response??  I'm waiting on 4 hours now and still nothing.
>
> --Russ
>
>
> "Moh'd Saleem Saleem Alrawashdeh"  wrote in message
> 
> > Hi,
> >
> > I want to make sure that I am not the only one who faces the slow testing.
> > I sent my test before 3 hours, and till now I didn't get anything. Is this
> > normal?
> >
> > Thanks,
> >
> > Moh'd
> >
> >
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Dead Test Script
Date: Sun, 20 Jan 2002 10:10:01 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2558

I have waited over night for the test script to come back with no luck.  Can
someone post the status of the problem and if the course staff knows about
it?  Appreciated.

--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!jinhui
From: Jinhui Pan 
Newsgroups: su.class.cs244a
Subject: test
Date: Sun, 20 Jan 2002 11:34:41 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2559


Hi, I user the command: /afs/ir/class/cs244a/bin/testhw.pl TA hw1 (TA is
replace with user name of my TA) but was told no command found.
What's wrong with it?

Any help is highly appreciated!

Thanks,
-jinhui

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script
Date: 20 Jan 2002 21:23:36 GMT
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2560

"Russell Greene"  writes:

>I have waited over night for the test script to come back with no luck.  Can
>someone post the status of the problem and if the course staff knows about
>it?  Appreciated.

The server should be up and running again, I hope--please let us know if
you encounter more problems.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: test
Date: 20 Jan 2002 21:24:27 GMT
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2561

Jinhui Pan  writes:


>Hi, I user the command: /afs/ir/class/cs244a/bin/testhw.pl TA hw1 (TA is
>replace with user name of my TA) but was told no command found.
>What's wrong with it?

The test script is named submit_test.pl.
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine8.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Regarding the .purify file.
Date: Sun, 20 Jan 2002 13:25:24 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2562

Hi,
When i am trying to submit the hw1 by using
script /usr/class/cs244a/bin/submit TA hw1. It
does not seem to pick up the .purify file. Has someone else seen the same
problem or i am the only one having this problem. Also how can we supress
the errors caused by the gethostbyname. The faq says that we should do
suppress UMR ...;res_search
suppress UMR ...;nss_search
But it doesnot say where we are suppose to add this command.
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine40.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Assignment1: Questions regarding symbolic links
Date: 20 Jan 2002 21:38:51 GMT
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine40.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2563

Dhawal Kumar  writes:

>I have few questions regarding symbolic links:
>(1) Do we have to handle the case of cycles due to symbolic links. All
>directories in a cycle may be "empty" and we may keep looping if we either
>don't create the directories or maintain a possibly huge data structure
>depicting how the directories are organized.

Nope.

>(2) If there's a symbolic link 1.gz -> 1.txt and we are supposed to copy
>all the files with gz ext, do we copy 1.txt? And in case we are supposed
>to copy all files with .txt ext do we need to look at what the link points
>to and figure out if it has a .txt ext and copy 1.txt - and in this case
>what should be the name of final file.

>(3) If there's a symbolic link "l" to a dir "d" do we create a dir with
>the name "l" or "d". If we try to create a dir with name "d" there might
>already be a file/dir on the local filesystem with that name (this may
>not be due to ftpcopy).

Please see the earlier posted responses to these questions; thanks.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine25.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: Re: Regarding the .purify file.
Date: Sun, 20 Jan 2002 14:30:25 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine25.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2564


Shankar,

I guess purify picks the commands to suppress from .purify file (by
default). So, you may add these two suppress commands to .purify file.


Professor and TAs

1. The submission scripts are not picking up the .purify file. Any
comments?

2. One more, I am using PASV to get the server data port. I am not getting
any UMRs from the network calls that I am making. Should I still put these
statements in the .purify file? I guess not.

Thanks
Anurag




On Sun, 20 Jan 2002, Shankar Agarwal wrote:

> Hi,
> When i am trying to submit the hw1 by using
> script /usr/class/cs244a/bin/submit TA hw1. It
> does not seem to pick up the .purify file. Has someone else seen the same
> problem or i am the only one having this problem. Also how can we supress
> the errors caused by the gethostbyname. The faq says that we should do
> suppress UMR ...;res_search
> suppress UMR ...;nss_search
> But it doesnot say where we are suppose to add this command.
> Shankar
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine25.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: Re: test
Date: Sun, 20 Jan 2002 14:34:24 -0800
Lines: 22
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine25.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2565



Command is:

/afs/ir/class/cs244a/bin/submit_test.pl hw1 TA.

Order of arguments was incorrect in the printout.



On 20 Jan 2002, Matthew Jonathan Holliman wrote:

> Jinhui Pan  writes:
>
>
> >Hi, I user the command: /afs/ir/class/cs244a/bin/testhw.pl TA hw1 (TA is
> >replace with user name of my TA) but was told no command found.
> >What's wrong with it?
>
> The test script is named submit_test.pl.
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic14.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: ReplyBuffer
Date: Sun, 20 Jan 2002 16:13:49 -0800
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2566


Hi,

Sometime when I do a read from the server, it seems that the
server appends some data from the last command to the buffer
also.

As a result lets say I do the following:
1) PORT command write
2) READ : 200 PORT command successful.
3) RETR write
4) RETR read :
200 PORT command successful.
550 atimetokill.pl: No such file or directory.

replyBuffer has some data left over from the last time although that was
already read.

Any ideas?

Thanks,
Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga2.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script
Date: Sun, 20 Jan 2002 16:18:32 -0800
Lines: 27
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2567

I sent my test yesterday at 8 pm. At 12 today morning I got the message
that my test started and that I will recieve the results shortely. Till
now (4:30 pm) no results come back.

It seems that the server is down again. What I suggest if the TAs can tell
us what the command they run, and what directory heirarchy that
is expected. After that, we can do the test by ourselves. It would be much
faster and easier.

Thanks,

Moh'd

 On 20 Jan 2002, Matthew Jonathan Holliman wrote:

> "Russell Greene"  writes:
>
> >I have waited over night for the test script to come back with no luck.  Can
> >someone post the status of the problem and if the course staff knows about
> >it?  Appreciated.
>
> The server should be up and running again, I hope--please let us know if
> you encounter more problems.
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script
Date: Sun, 20 Jan 2002 16:23:01 -0800
Lines: 39
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2568

Try re-submitting your program to the test script.  I had it work for me at
2:30pm (waited about 5 mins).

--Russ


"Moh'd Saleem Saleem Alrawashdeh"  wrote in message

> I sent my test yesterday at 8 pm. At 12 today morning I got the message
> that my test started and that I will recieve the results shortely. Till
> now (4:30 pm) no results come back.
>
> It seems that the server is down again. What I suggest if the TAs can tell
> us what the command they run, and what directory heirarchy that
> is expected. After that, we can do the test by ourselves. It would be much
> faster and easier.
>
> Thanks,
>
> Moh'd
>
>  On 20 Jan 2002, Matthew Jonathan Holliman wrote:
>
> > "Russell Greene"  writes:
> >
> > >I have waited over night for the test script to come back with no luck.
Can
> > >someone post the status of the problem and if the course staff knows
about
> > >it?  Appreciated.
> >
> > The server should be up and running again, I hope--please let us know if
> > you encounter more problems.
> >
> >
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: Re: Script file sizes (normal line endings this time)
Date: Sun, 20 Jan 2002 16:24:48 -0800
Lines: 92
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine12.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2569

Just in case someone else runs across this bug...

you might be using strlen when writing your data out to a file.

Good luck
Clayton

Clayton Pierce Jones wrote:
> 
> I actually have this exact same error (and my numbers match yours) on
> server 204.123.2.2.  I went and looked at the server using ftp, and my
> numbers seem to match the numbers on their currently.  Is it possible
> that this directory is being changed periodically?  Or did you find
> something in your program that affected your answer?
> 
> Thanks,
> Clayton
> 
> Bret Taylor wrote:
> >
> > Nevermind, it woked this time, it must have been my numbers that were wrong.
> >
> > Bret
> >
> > "Bret Taylor"  wrote in message
> > 
> > > I noticed my first post had some weird carriage returns, so I am reposting
> > > to make it easier to read.  Sorry for the trouble.
> > >
> > > First of all, thanks for providing the test scripts, it is great to have
> > > such a simple and thorough way to test our code.  However, I have a couple
> > > questions regarding  "Test F.2".
> > >
> > > My test script output includes this:
> > >
> > > test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> > > exit line said: "OK: 1900222 bytes copied"
> > > ---
> > > diff between expected tree and your tree:
> > > 1,8d0
> > > < ./kermit/c/all.tar.Z 2606058765 72935
> > > < ./kermit/c/amiga.tar.Z 1017293024 135815
> > > < ./kermit/c/dg.tar.Z 2560791635 406317
> > > < ./kermit/c/mac.tar.Z 2459747744 496551
> > > < ./kermit/c/os2.tar.Z 2771080586 163808
> > > < ./kermit/c/os9.tar.Z 370278796 49438
> > > < ./kermit/c/unix.tar.Z 308104872 349221
> > > < ./kermit/c/vms.tar.Z 53741681 64755
> > >
> > > I used ncftp to go to the site to see what was going on, and a "ls -l" in
> > > the kermit/c directory shows this:
> > >
> > > ncftp /pub/comm/kermit/c > ls -l
> > > lrwxrwxrwx   1 0        0           37   Apr 14  1995
> > > 00README-Legal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs
> > > -r--r--r--   1 0        0          935   Jan 17  1989   README
> > > -r--r--r--   1 0        0        72935   Jan 16  1989   all.tar.Z
> > > -r--r--r--   1 0        0       135815   Jan 16  1989   amiga.tar.Z
> > > -r--r--r--   1 0        0       406317   Jan 16  1989   dg.tar.Z
> > > -r--r--r--   1 0        0       496551   Jan 16  1989   mac.tar.Z
> > > -r--r--r--   1 0        0       163808   Jan 16  1989   os2.tar.Z
> > > -r--r--r--   1 0        0        49438   Jan 16  1989   os9.tar.Z
> > > -r--r--r--   1 0        0       349221   Jan 16  1989   unix.tar.Z
> > > -r--r--r--   1 0        0        64755   Jan 16  1989   vms.tar.Z
> > >
> > > It looks like the files sizes are the ones I got, not the large ones from
> > > the script.  Am I mistaken here? The same thing happened on the MS FTP
> > site
> > > (snippets below).
> > >
> > > test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie exit line
> > > said: "OK: 5113 bytes copied"
> > > ---
> > > diff between expected tree and your tree:
> > > 3,4d2
> > > < ./ie-public/fixes/usa/ie401/importexportfavorites-fix/readme.txt
> > > 2939125283 643 <
> > > ./ie-public/fixes/usa/ie50/importexportfavorites-fix/readme.txt 2939125283
> > > 643
> > >
> > > ncftp ...ortexportfavorites-fix > ls -l
> > > dr-xr-xr-x   1 owner    group            0 Feb 25  2000 alpha
> > > -r-xr-xr-x   1 owner    group          643 Sep 24  1999 readme.txt
> > > dr-xr-xr-x   1 owner    group            0 Feb 25  2000 x86
> > >
> > >
> > > Thanks for your time,
> > > Bret
> > >
> > >
> > >
> > >
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine26.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script
Date: 21 Jan 2002 00:29:19 GMT
Lines: 20
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine26.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2570

Moh'd Saleem Saleem Alrawashdeh  writes:

>I sent my test yesterday at 8 pm. At 12 today morning I got the message
>that my test started and that I will recieve the results shortely. Till
>now (4:30 pm) no results come back.

>It seems that the server is down again. What I suggest if the TAs can tell
>us what the command they run, and what directory heirarchy that
>is expected. After that, we can do the test by ourselves. It would be much
>faster and easier.

>Thanks,

As far as I can tell, the server is still up.

It's quite possible (actually, probable) that you received the message while
the server was being brought back up and down originally (at about noon),
in which case the test may never have been carried out correctly.  Can you
try resubmitting your code now?

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: ReplyBuffer
Date: Sun, 20 Jan 2002 16:35:56 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2571

Well, my guess is that you're recycling the buffer and using 
strcat/strncat instead of strcpy/strncpy.  Be sure to initialize your 
buffer to the empty string before doing anything with it.

-Sandeep

Priyanka Gupta wrote:

> Hi,
> 
> Sometime when I do a read from the server, it seems that the
> server appends some data from the last command to the buffer
> also.
> 
> As a result lets say I do the following:
> 1) PORT command write
> 2) READ : 200 PORT command successful.
> 3) RETR write
> 4) RETR read :
> 200 PORT command successful.
> 550 atimetokill.pl: No such file or directory.
> 
> replyBuffer has some data left over from the last time although that was
> already read.
> 
> Any ideas?
> 
> Thanks,
> Priyanka
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine11.Stanford.EDU!wkimball
From: Kimball Chun-Jen Wang 
Newsgroups: su.class.cs244a
Subject: Can't compile echodemo.c
Date: Sun, 20 Jan 2002 16:57:53 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2572

Hello:

	I can't compile echodemo.c or any socket related c program.
I think something is wrong with my .cshrc file.  Can some one tell
me what to include for .cshrc?

Kimball

Here is the error message.
elaine30:~/cs244a/pj1demo> make echodemo
cc   echodemo.o   -o echodemo
Undefined                       first referenced
 symbol                             in file
socket                              echodemo.o
gethostbyname                       echodemo.o
getservbyname                       echodemo.o
inet_addr                           echodemo.o
shutdown                            echodemo.o
connect                             echodemo.o
ld: fatal: Symbol referencing errors. No output written to echodemo
make: *** [echodemo] Error 1
elaine30:~/cs244a/pj1demo>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: Can't compile echodemo.c
Date: Sun, 20 Jan 2002 16:59:26 -0800
Lines: 36
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2573

When you link, you need to use the -lnsl and -lsocket flags.  You should use
the supplied Makefile to avoid worrying about this.  It produces the
following:

gcc -g -O0 -ansi -Wall -DSOLARIS  -c echodemo.c
gcc -g -O0 -ansi -Wall -DSOLARIS  -o echodemo  echodemo.o -lsocket -lnsl

Bret

"Kimball Chun-Jen Wang"  wrote in message

> Hello:
>
> I can't compile echodemo.c or any socket related c program.
> I think something is wrong with my .cshrc file.  Can some one tell
> me what to include for .cshrc?
>
> Kimball
>
> Here is the error message.
> elaine30:~/cs244a/pj1demo> make echodemo
> cc   echodemo.o   -o echodemo
> Undefined                       first referenced
>  symbol                             in file
> socket                              echodemo.o
> gethostbyname                       echodemo.o
> getservbyname                       echodemo.o
> inet_addr                           echodemo.o
> shutdown                            echodemo.o
> connect                             echodemo.o
> ld: fatal: Symbol referencing errors. No output written to echodemo
> make: *** [echodemo] Error 1
> elaine30:~/cs244a/pj1demo>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine11.Stanford.EDU!wkimball
From: Kimball Chun-Jen Wang 
Newsgroups: su.class.cs244a
Subject: Can't gcc echodemo.c
Date: Sun, 20 Jan 2002 17:11:23 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: elaine11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2574

elaine30:~/cs244a/pj1demo> gcc echodemo.c
Undefined                       first referenced
 symbol                             in file
socket                              /var/tmp/ccQmlPRj.o
gethostbyname                       /var/tmp/ccQmlPRj.o
getservbyname                       /var/tmp/ccQmlPRj.o
inet_addr                           /var/tmp/ccQmlPRj.o
shutdown                            /var/tmp/ccQmlPRj.o
connect                             /var/tmp/ccQmlPRj.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
elaine30:~/cs244a/pj1demo>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: LIST behavior?!
Date: Sun, 20 Jan 2002 17:23:11 -0800
Lines: 44
Distribution: su
Message-ID: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2575

It seems to me that of the servers specified in the assignment handout, only
ftp.cs.stanford.edu is
ending lines with \r\n. Look at the output from ftp.fedworld.gov:

[t=116][o=111][t=116][a=97][l=108][ =32][8=56][
=10][d=100][r=114][w=119][x=120][r=114][-=45][x=120][r=114][-=45][x=120][ =3
2][ =32][ =32][8=56][ =32][1=49][0=48][4=52][ =32][ =32][ =32][ =32][ =32][ 
=32][1=49][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32]
[1=49][0=48][2=50][4=52][ =32][J=74][u=117][n=110][ =32][1=49][6=54][ =32][ 
=32][2=50][0=48][0=48][0=48][ =32][.=46][
=10][d=100][r=114][w=119][x=120][r=114][-=45][x=120][r=114][-=45][x=120][ =3
2][ =32][ =32][8=56][ =32][1=49][0=48][4=52][ =32][ =32][ =32][ =32][ =32][ 
=32][1=49][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32][ =32]
[1=49][0=48][2=50][4=52][ =32][J=74][u=117][n=110][ =32][1=49][6=54][ =32][ 
=32][2=50][0=48][0=48][0=48][ =32][.=46][.=46][

only character 10. The parsing strstr of the given code returns NULL on all
these servers. In comparison, here's that of the cs server:

[d=100][r=114][w=119][x=120][r=114][-=45][x=120][r=114][-=45][x=120][ =32][ 
=32][5=53][4=52][ =32][f=102][t=116][p=112][u=117][s=115][e=101][r=114][ =32
][ =32][f=102][t=116][p=112][u=117][s=115][e=101][r=114][s=115][ =32][ =32][


[ =32][ =32][1=49][0=48][2=50][4=52][ =32][N=78][o=111][v=118][ =32][1=49][4
=52][ =32][ =32][2=50][0=48][0=48][0=48][ =32][r=114][o=111][b=98][o=111][t=
116][i=10=13][99][s=115][
=10][d=100][r=114][w=119][x=120][r=114][-=45][x=120][r=114][-=45][x=120][ =3
2][ =32][ =32][2=50][ =32][f=102][t=116][p=112][u=117][s=115][e=101][r=114][

][ =32][f=102][t=116][p=112][u=117][s=115][e=101][r=114][s=115][ =32][ =32][

=32][ =32][ =32][ =32][5=53][1=49][2=50][ =32][J=74][u=117][n=110][ =32][1=4
9][6=54][ =32][ =32][1=49][9=57][9=57][3=51][ =32][t=116][h=104][e=101][o=11
1][r=114]=13][1][
=10]

Note the weird thing going on with the 13 before the 10.
Does anyone have a clue as to what's going on? Anyone noticed this before?

Thanks,
Steve


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine30.Stanford.EDU!wkimball
From: Kimball Chun-Jen Wang 
Newsgroups: su.class.cs244a
Subject: Problem Solved Re: Can't gcc echodemo.c
Date: Sun, 20 Jan 2002 17:33:53 -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
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2576

On Sun, 20 Jan 2002, Kimball Chun-Jen Wang wrote:

> elaine30:~/cs244a/pj1demo> gcc echodemo.c
> Undefined                       first referenced
>  symbol                             in file
> socket                              /var/tmp/ccQmlPRj.o
> gethostbyname                       /var/tmp/ccQmlPRj.o
> getservbyname                       /var/tmp/ccQmlPRj.o
> inet_addr                           /var/tmp/ccQmlPRj.o
> shutdown                            /var/tmp/ccQmlPRj.o
> connect                             /var/tmp/ccQmlPRj.o
> ld: fatal: Symbol referencing errors. No output written to a.out
> collect2: ld returned 1 exit status
> elaine30:~/cs244a/pj1demo>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine37.Stanford.EDU!rxuan
From: Ruozhong Xuan 
Newsgroups: su.class.cs244a
Subject: zero size file?
Date: Sun, 20 Jan 2002 18:11:55 -0800
Lines: 9
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine37.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Xin Wang 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2577

Hi,
   In assignment 1, if a remote file has the correct extension such as
"gz" but has size 0, should we ftp "copy" it and creat  the null size file
in the local?

Thanks.
Ruozhong Xuan


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Problem Solved Re: Can't gcc echodemo.c
Date: Sun, 20 Jan 2002 19:27:13 -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
To: Kimball Chun-Jen Wang 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2578


You should use the makefile to compile echodemo.. the problem is that you are
not linking wiht -lnsl and -lsocket

            ~~m

> On Sun, 20 Jan 2002, Kimball Chun-Jen Wang wrote:
>
> > elaine30:~/cs244a/pj1demo> gcc echodemo.c
> > Undefined                       first referenced
> >  symbol                             in file
> > socket                              /var/tmp/ccQmlPRj.o
> > gethostbyname                       /var/tmp/ccQmlPRj.o
> > getservbyname                       /var/tmp/ccQmlPRj.o
> > inet_addr                           /var/tmp/ccQmlPRj.o
> > shutdown                            /var/tmp/ccQmlPRj.o
> > connect                             /var/tmp/ccQmlPRj.o
> > ld: fatal: Symbol referencing errors. No output written to a.out
> > collect2: ld returned 1 exit status
> > elaine30:~/cs244a/pj1demo>
> >
> >
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!manzanares.Stanford.EDU!molinero
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: Regarding the .purify file.
Date: Sun, 20 Jan 2002 19:33:22 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Shankar Agarwal 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2579

Hi,

There was a problem with the config file of the submit script, this is why 
it was not taking the .purify file. You will have to run the program 
/usr/class/cs244a/bin/submit TA hw1 again to have your .purify submitted.

I appologize for the inconvenience,

Pablo Molinero

On Sun, 20 Jan 2002, Shankar Agarwal wrote:

> Hi,
> When i am trying to submit the hw1 by using
> script /usr/class/cs244a/bin/submit TA hw1. It
> does not seem to pick up the .purify file. Has someone else seen the same
> problem or i am the only one having this problem. Also how can we supress
> the errors caused by the gethostbyname. The faq says that we should do
> suppress UMR ...;res_search
> suppress UMR ...;nss_search
> But it doesnot say where we are suppose to add this command.
> Shankar
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Regarding the .purify file.
Date: Sun, 20 Jan 2002 19:40:57 -0800
Lines: 50
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2580

The submit script's broken:

saga7:~/cs244a/proj1> /usr/class/cs244a/bin/submit akishan hw1
Error: Config line 33: Require: No assignment ID "hw2.1". (Must precede 
require: statement)

A problem statement has been e-mailed to the system
administrator 

-Sandeep

Pablo Molinero Fernandez wrote:

> Hi,
> 
> There was a problem with the config file of the submit script, this is why 
> it was not taking the .purify file. You will have to run the program 
> /usr/class/cs244a/bin/submit TA hw1 again to have your .purify submitted.
> 
> I appologize for the inconvenience,
> 
> Pablo Molinero
> 
> On Sun, 20 Jan 2002, Shankar Agarwal wrote:
> 
> 
>>Hi,
>>When i am trying to submit the hw1 by using
>>script /usr/class/cs244a/bin/submit TA hw1. It
>>does not seem to pick up the .purify file. Has someone else seen the same
>>problem or i am the only one having this problem. Also how can we supress
>>the errors caused by the gethostbyname. The faq says that we should do
>>suppress UMR ...;res_search
>>suppress UMR ...;nss_search
>>But it doesnot say where we are suppose to add this command.
>>Shankar
>>
>>
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Regarding the .purify file.
Date: Sun, 20 Jan 2002 19:58:58 -0800
Lines: 64
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Sandeep Tamhankar 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2581


> The submit script's broken:

Yeah for me too :-(

elaine15:~/projects/myftp> /usr/class/cs244a/bin/submit
Error: Config line 33: Require: No assignment ID "hw2.1". (Must precede require: statement)

A problem statement has been e-mailed to the system
administrator 
elaine15:~/projects/myftp>

                ~~m

> saga7:~/cs244a/proj1> /usr/class/cs244a/bin/submit akishan hw1
> Error: Config line 33: Require: No assignment ID "hw2.1". (Must precede
> require: statement)
>
> A problem statement has been e-mailed to the system
> administrator 
>
> -Sandeep
>
> Pablo Molinero Fernandez wrote:
>
> > Hi,
> >
> > There was a problem with the config file of the submit script, this is why
> > it was not taking the .purify file. You will have to run the program
> > /usr/class/cs244a/bin/submit TA hw1 again to have your .purify submitted.
> >
> > I appologize for the inconvenience,
> >
> > Pablo Molinero
> >
> > On Sun, 20 Jan 2002, Shankar Agarwal wrote:
> >
> >
> >>Hi,
> >>When i am trying to submit the hw1 by using
> >>script /usr/class/cs244a/bin/submit TA hw1. It
> >>does not seem to pick up the .purify file. Has someone else seen the same
> >>problem or i am the only one having this problem. Also how can we supress
> >>the errors caused by the gethostbyname. The faq says that we should do
> >>suppress UMR ...;res_search
> >>suppress UMR ...;nss_search
> >>But it doesnot say where we are suppose to add this command.
> >>Shankar
> >>
> >>
> >>
> >
>
>
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Dead Test Script (again)
Date: Sun, 20 Jan 2002 21:03:56 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2582

Is it me or is the test script not working again??

--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!epic13.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script (again)
Date: Sun, 20 Jan 2002 21:08:29 -0800
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Russell Greene 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2583


i just submitted and worked fine for me.

thanks, Arvind

On Sun, 20 Jan 2002, Russell Greene wrote:

> Is it me or is the test script not working again??
>
> --Russ
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script (again)
Date: Sun, 20 Jan 2002 21:10:49 -0800
Lines: 24
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2584

Wow.  I try to run the test script and it says that it cannot find any
..purify files in my directory (even though I have both the ftpcopy.purify
file and the purify.output file).  Am I missing anything?

--Russ

"Arvind Bhat"  wrote in message

>
> i just submitted and worked fine for me.
>
> thanks, Arvind
>
> On Sun, 20 Jan 2002, Russell Greene wrote:
>
> > Is it me or is the test script not working again??
> >
> > --Russ
> >
> >
> >
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: SSH timeouts
Date: Sun, 20 Jan 2002 21:19:29 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2585


Hello,

I am an SITN student and remotely connect to Stanford using SSH.
(OpenSSH_2.9p2, SSH protocols 1.5/2.0, OpenSSL 0x0090602f).

I am getting timed out very often (15-20 mins) no matter which
server (myth,epic,elaine) i am connected to. This does not happen
on all the days. But when it happens, it is quite annoying and
makes debugging extremely painful.

I talked to fellow sitn student. But his connection works ok for
same server. Wondering if someone has a solution/work around.

Thanks much,
Arvind

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script (again)
Date: Sun, 20 Jan 2002 21:23:40 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Russell Greene 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2586


i did a touch .purify to get the script going.

On Sun, 20 Jan 2002, Russell Greene wrote:

> Wow.  I try to run the test script and it says that it cannot find any
> .purify files in my directory (even though I have both the ftpcopy.purify
> file and the purify.output file).  Am I missing anything?
>
> --Russ
>
> "Arvind Bhat"  wrote in message
> 
> >
> > i just submitted and worked fine for me.
> >
> > thanks, Arvind
> >
> > On Sun, 20 Jan 2002, Russell Greene wrote:
> >
> > > Is it me or is the test script not working again??
> > >
> > > --Russ
> > >
> > >
> > >
> >
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Dead Test Script (again)
Date: Sun, 20 Jan 2002 21:52:12 -0800
Lines: 41
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2587

That did the trick.  Thanks!

--Russ


"Arvind Bhat"  wrote in message

>
> i did a touch .purify to get the script going.
>
> On Sun, 20 Jan 2002, Russell Greene wrote:
>
> > Wow.  I try to run the test script and it says that it cannot find any
> > .purify files in my directory (even though I have both the
ftpcopy.purify
> > file and the purify.output file).  Am I missing anything?
> >
> > --Russ
> >
> > "Arvind Bhat"  wrote in message
> > 
> > >
> > > i just submitted and worked fine for me.
> > >
> > > thanks, Arvind
> > >
> > > On Sun, 20 Jan 2002, Russell Greene wrote:
> > >
> > > > Is it me or is the test script not working again??
> > > >
> > > > --Russ
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga4.Stanford.EDU!jinhui
From: Jinhui Pan 
Newsgroups: su.class.cs244a
Subject: Can not submit test
Date: Sun, 20 Jan 2002 21:53:54 -0800
Lines: 30
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2588


I still can not submit test. This is the error message:

************************************************************************
SubmitBase: /afs/ir/class/cs244a/submissions
Debug Level = 0
This is your submission 1 (out of 5) for today (1-20-2002)
could not find any file matching .purify in
/afs/ir.stanford.edu/users/j/i/jinhui/cs244a/hw1!!
======================================================================
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.
======================================================================


Died at /afs/ir/class/cs244a/bin/submit_test.pl line 195.
***********************************************************************

But I do have ftpcopy.purify in my folder. What's wrong with it?


Thanks a lot!
-jinhui






.

Path: shelby.stanford.edu!nntp.stanford.edu!manzanares.Stanford.EDU!molinero
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: .purify is required now
Date: Sun, 20 Jan 2002 22:15:46 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2589

Hi,

From now on, the submit and submit_test.pl scripts need a .purify before 
they can proceed. The .purify was listed as part of the deliverables in 
the assignment handout, but the scripts were not taking it. Now they do.


Pablo Molinero

.

Path: shelby.stanford.edu!nntp.stanford.edu!manzanares.Stanford.EDU!molinero
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: submit script working now
Date: Sun, 20 Jan 2002 22:17:33 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2590

Hi,

Because of the change to require the .purify file, the submit script was 
broken for a few minutes (it complained that hw2.1 was not a valid 
assignment). This problem has been solved.

Pablo

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga2.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Re: submit_test.pl result question
Date: Sun, 20 Jan 2002 22:21:52 -0800
Lines: 50
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Ruozhong Xuan 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2591

Hi,

I am having the same problem. Any idea?

Thanks,

Moh'd
On Fri, 18 Jan 2002, Ruozhong Xuan wrote:

> Hi,
>     I used the submit_test.pl to request a test, and in a section,I got
> the below:
> ===============
>
>     * Test F.2: Does not transfer all of the matching files in the first
> level down to the
>       last specified level [out of 1]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> exit line said: "OK:1900222 bytes copied"
> ---
> diff between expected tree and your tree:
> 1,8d0
> < ./kermit/c/all.tar.Z
> < ./kermit/c/amiga.tar.Z
> < ./kermit/c/dg.tar.Z
> < ./kermit/c/mac.tar.Z
> < ./kermit/c/os2.tar.Z
> < ./kermit/c/os9.tar.Z
> < ./kermit/c/unix.tar.Z
> < ./kermit/c/vms.tar.Z
> 10d1
> < ./xcomm.tar.Z
>
>
>
> But when I manually tried out:
> ftpcopy Z 2 204.123.2.2 test /pub/comm
> I found all those files have been transfered to "test" directory under the
> correct subdirectory. So I am a little confused by the test result. Any
> comment?
>
> Thanks.
> Ruozhong Xuan
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!manzanares.Stanford.EDU!molinero
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: Rearding the assignment 2
Date: Sun, 20 Jan 2002 23:06:57 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2592


Hi,

The permissions of the directory for HW2 have been updated, so that you
can begin working on assigment #2 (if you want to start early).

Pablo

On Sat, 19 Jan 2002, Sandeep Tamhankar wrote:

> If you're really anxious to get started, go to 
> http://www.stanford.edu/class/cs244a/homeworks/hw2/gethw2
> 
> This script is what you would run if you had permission; just do by hand 
> (through your browser or wget) what this script says.
> 
> Or wait until the TAs move all this code to someplace reasonable like 
> /afs/ir/class/cs244a/homeworks so that we aren't forced to use wget and 
> such tools anytime we need anything.
> 
> -Sandeep
> 
> Shankar Agarwal wrote:
> 
> > Hi,
> > I am not able to access the /afs/ir/class/cs244a/WWW/homeworks/hw2/gethw2
> > script.
> > Thanks
> > Regards
> > Shankar
> > 
> > 
> 
> 
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: submit script down
Date: Sun, 20 Jan 2002 23:30:18 -0800
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine12.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2593

I think the submit script is down again... i get the following error:
Died at /usr/class/cs244a/bin/submit_test.pl line 195.

Thanks,
Clayton
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: Re: submit script down
Date: Sun, 20 Jan 2002 23:31:54 -0800
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine12.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2594

Sorry, as mentioned in a previous post, touch .purify did the trick

Clayton Pierce Jones wrote:
> 
> I think the submit script is down again... i get the following error:
> Died at /usr/class/cs244a/bin/submit_test.pl line 195.
> 
> Thanks,
> Clayton
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From:  (Dennis Lin)
Newsgroups: su.class.cs244a
Subject: Basic Question: PORT Command
Date: Mon, 21 Jan 2002 07:54:28 GMT
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: cpe-24-221-190-93.ca.sprintbbd.net
X-Newsreader: Forte Free Agent 1.21/32.243
Xref: nntp.stanford.edu su.class.cs244a:2595

Hi everybody,

I've been stuck on this problem for some time now, and I realize that
it is a basic question. 

For the PORT command, I know that we are supposed to send an IP
address and the port we are connecting to.  How do we get this
information to send out?  Seems like getsockname() doesn't really
work.  Thanks.


Dennis
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Basic Question: PORT Command
Date: 21 Jan 2002 08:17:19 GMT
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2596

You need to create a new socket with port specified to 0, and then bind to 
this port. Use getsockname() after the bind() to extract the assigned 
port. This is the port you will tell the server to connect to with the 
PORT command.

Arun

Dennis Lin  wrote:
: Hi everybody,

: I've been stuck on this problem for some time now, and I realize that
: it is a basic question. 

: For the PORT command, I know that we are supposed to send an IP
: address and the port we are connecting to.  How do we get this
: information to send out?  Seems like getsockname() doesn't really
: work.  Thanks.


: Dennis
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine14.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: quick questions
Date: Mon, 21 Jan 2002 00:19:28 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2597


I have 2 questions about the testscript files:

1. even though i submit purify.output all the time, this report says
purify.output is not submitted. Even the output of submit test script says
purify.output has been taken. please clarify.

2. ftpparse utility is unable to parse the list response from 204.123.2.2.
the list response has some zeros (0). May be it is because of that. Are
there any solutions to this?

anybody?
-anurag

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From:  (Dennis Lin)
Newsgroups: su.class.cs244a
Subject: Re: Basic Question: PORT Command
Date: Mon, 21 Jan 2002 08:24:17 GMT
Lines: 88
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: cpe-24-221-190-93.ca.sprintbbd.net
X-Newsreader: Forte Free Agent 1.21/32.243
Xref: nntp.stanford.edu su.class.cs244a:2598

I really appreciate your help.  

I've tried that, and it still didn't work.  Here is what I have in my
code, and the reply I got from the terminal:


******************** BEGIN CODE *********************************


/**********************************************************************************************************/

/*  - bind an address to port 0 (ephermal port)
/**********************************************************************************************************/

localAddr.sin_family = AF_INET;
localAddr.sin_addr.s_addr = INADDR_ANY;
localAddr.sin_port = 0;

return_message = bind ( socket_in, (struct sockaddr *) &localAddr, 
	sizeof(localAddr));
printf ("Binding socket - return message: %d\n", return_message );
printf ("Bound serverPortNumber: %d\n", serverPortNumber );
printf ("Bound port - %d\n", localAddr.sin_port );

/**********************************************************************************************************/

/*  - call listen()

/**********************************************************************************************************/

return_message = listen ( socket_in, 32 );
printf ("Listening socket - return message: %d\n", return_message );

/**********************************************************************************************************/

/*  - call getsockname() to get port number this listening socket 
/**********************************************************************************************************/

return_message = getsockname ( socket_in, (struct sockaddr *) 
	&retrieveAddr, &socket_length_info);
return_message = getsockname ( socket_in, (struct sockaddr *)
	 &localAddr, &socket_length_info);

printf ("Control connection port: %d, return_message = %d\n",
	 servAddr.sin_port, return_message );

printf ("DEBUG -retrieved local address: %d.%d.%d.%d on PORT %d\n",
		localAddr.sin_addr.S_un.S_un_b.s_b1,
		localAddr.sin_addr.S_un.S_un_b.s_b2,
		localAddr.sin_addr.S_un.S_un_b.s_b3,
		localAddr.sin_addr.S_un.S_un_b.s_b4,
		localAddr.sin_port );



******************** BEGIN REPLY  *********************************
Binding socket - return message: 0
Bound serverPortNumber: 21
Bound port - 0
Listening socket - return message: 0
Control connection port: 21, return_message = 0
DEBUG - printing retrieved local address: 0.0.0.0 on PORT 0

******************** BEGIN CODE *********************************
On 21 Jan 2002 08:17:19 GMT, Arun Upadhyaya Kishan
 wrote:

>You need to create a new socket with port specified to 0, and then bind to 
>this port. Use getsockname() after the bind() to extract the assigned 
>port. This is the port you will tell the server to connect to with the 
>PORT command.
>
>Arun
>
>Dennis Lin  wrote:
>: Hi everybody,
>
>: I've been stuck on this problem for some time now, and I realize that
>: it is a basic question. 
>
>: For the PORT command, I know that we are supposed to send an IP
>: address and the port we are connecting to.  How do we get this
>: information to send out?  Seems like getsockname() doesn't really
>: work.  Thanks.
>
>
>: Dennis

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: Basic Question: PORT Command
Date: Mon, 21 Jan 2002 00:16:44 -0800
Lines: 27
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2599

If you call getsockname on the control socket

size = sizeof(local_addr);
getsockname(control_socket, (struct sockaddr *) &local_addr, &size);

you should be able to access the 32 bit local IP address with

ntohl(local_addr.sin_addr.s_addr)

Bret

"Dennis Lin"  wrote in message

> Hi everybody,
>
> I've been stuck on this problem for some time now, and I realize that
> it is a basic question.
>
> For the PORT command, I know that we are supposed to send an IP
> address and the port we are connecting to.  How do we get this
> information to send out?  Seems like getsockname() doesn't really
> work.  Thanks.
>
>
> Dennis


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: Regarding Post of 1/16/02, 8:56: Script File Sizes
Date: Mon, 21 Jan 2002 00:31:43 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2600

Some random questions:

-Have any of you gotten the gotten the same bad results on that part of the
test that Bret mentioned? I've manually visited the sites where my tests
fail, and I can't figure out what's wrong. Any helpful stories of bugs
fixed?

-Did either of you perhaps have any problems with the exit line reports? My
test results read "exit line: ' ' " where I think they ought to have read
"OK: etc." Should they read "OK..."? Are points being deducted on that basis
(this is a question probably for a TA)?

-When the test lists diffs, do >'s mean that your tree had certain files and
that the correct one didn't (ie you shouldn't have had them)?

Thanks.
Steve



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Transferring files you don't have permissions for
Date: 21 Jan 2002 08:36:20 GMT
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2601

Yes, you can assume for a RETR comamnd 550 means permission denied. You 
should not create a 0-length file in this case, but should continue 
processing.

If you want to be ambitious, you can handle a temporary unavailable code 
and retry the file a couple times, though this is not required.

Arun

 Pete Belknap  wrote:
: The handout says that if we try to transfer a file which we don't have
: permissions for, we should just give up and continue from there.  I ran the
: ftpd server and got a 550 error for this case.

: Is 550 the only error code for permissions violations?  Can we assume that a
: 550 always means this (i.e. 550 would be the only error code that we don't
: terminate on) ?

: thanks,
: Pete


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Basic Question: PORT Command
Date: 21 Jan 2002 08:40:33 GMT
Lines: 94
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine18.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2602

Make sure that the third argument to getsockname() is a variable of type 
socklen_t intiialized to sizeof(struct sockaddr).

Arun

Dennis Lin  wrote:
: I really appreciate your help.  

: I've tried that, and it still didn't work.  Here is what I have in my
: code, and the reply I got from the terminal:


: ******************** BEGIN CODE *********************************


: /**********************************************************************************************************/

: /*  - bind an address to port 0 (ephermal port)
: /**********************************************************************************************************/

: localAddr.sin_family = AF_INET;
: localAddr.sin_addr.s_addr = INADDR_ANY;
: localAddr.sin_port = 0;

: return_message = bind ( socket_in, (struct sockaddr *) &localAddr, 
: 	sizeof(localAddr));
: printf ("Binding socket - return message: %d\n", return_message );
: printf ("Bound serverPortNumber: %d\n", serverPortNumber );
: printf ("Bound port - %d\n", localAddr.sin_port );

: /**********************************************************************************************************/

: /*  - call listen()

: /**********************************************************************************************************/

: return_message = listen ( socket_in, 32 );
: printf ("Listening socket - return message: %d\n", return_message );

: /**********************************************************************************************************/

: /*  - call getsockname() to get port number this listening socket 
: /**********************************************************************************************************/

: return_message = getsockname ( socket_in, (struct sockaddr *) 
: 	&retrieveAddr, &socket_length_info);
: return_message = getsockname ( socket_in, (struct sockaddr *)
: 	 &localAddr, &socket_length_info);

: printf ("Control connection port: %d, return_message = %d\n",
: 	 servAddr.sin_port, return_message );

: printf ("DEBUG -retrieved local address: %d.%d.%d.%d on PORT %d\n",
: 		localAddr.sin_addr.S_un.S_un_b.s_b1,
: 		localAddr.sin_addr.S_un.S_un_b.s_b2,
: 		localAddr.sin_addr.S_un.S_un_b.s_b3,
: 		localAddr.sin_addr.S_un.S_un_b.s_b4,
: 		localAddr.sin_port );



: ******************** BEGIN REPLY  *********************************
: Binding socket - return message: 0
: Bound serverPortNumber: 21
: Bound port - 0
: Listening socket - return message: 0
: Control connection port: 21, return_message = 0
: DEBUG - printing retrieved local address: 0.0.0.0 on PORT 0

: ******************** BEGIN CODE *********************************
: On 21 Jan 2002 08:17:19 GMT, Arun Upadhyaya Kishan
:  wrote:

:>You need to create a new socket with port specified to 0, and then bind to 
:>this port. Use getsockname() after the bind() to extract the assigned 
:>port. This is the port you will tell the server to connect to with the 
:>PORT command.
:>
:>Arun
:>
:>Dennis Lin  wrote:
:>: Hi everybody,
:>
:>: I've been stuck on this problem for some time now, and I realize that
:>: it is a basic question. 
:>
:>: For the PORT command, I know that we are supposed to send an IP
:>: address and the port we are connecting to.  How do we get this
:>: information to send out?  Seems like getsockname() doesn't really
:>: work.  Thanks.
:>
:>
:>: Dennis

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From:  (Dennis Lin)
Newsgroups: su.class.cs244a
Subject: Re: Basic Question: PORT Command
Date: Mon, 21 Jan 2002 08:42:28 GMT
Lines: 105
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: cpe-24-221-190-93.ca.sprintbbd.net
X-Newsreader: Forte Free Agent 1.21/32.243
Xref: nntp.stanford.edu su.class.cs244a:2603

Hi guys,

Wow.  Thanks for all the help you've all given me.  This solved it!!


Dennis

On 21 Jan 2002 08:40:33 GMT, Arun Upadhyaya Kishan
 wrote:

>Make sure that the third argument to getsockname() is a variable of type 
>socklen_t intiialized to sizeof(struct sockaddr).
>
>Arun
>
>Dennis Lin  wrote:
>: I really appreciate your help.  
>
>: I've tried that, and it still didn't work.  Here is what I have in my
>: code, and the reply I got from the terminal:
>
>
>: ******************** BEGIN CODE *********************************
>
>
>: /**********************************************************************************************************/
>
>: /*  - bind an address to port 0 (ephermal port)
>: /**********************************************************************************************************/
>
>: localAddr.sin_family = AF_INET;
>: localAddr.sin_addr.s_addr = INADDR_ANY;
>: localAddr.sin_port = 0;
>
>: return_message = bind ( socket_in, (struct sockaddr *) &localAddr, 
>: 	sizeof(localAddr));
>: printf ("Binding socket - return message: %d\n", return_message );
>: printf ("Bound serverPortNumber: %d\n", serverPortNumber );
>: printf ("Bound port - %d\n", localAddr.sin_port );
>
>: /**********************************************************************************************************/
>
>: /*  - call listen()
>
>: /**********************************************************************************************************/
>
>: return_message = listen ( socket_in, 32 );
>: printf ("Listening socket - return message: %d\n", return_message );
>
>: /**********************************************************************************************************/
>
>: /*  - call getsockname() to get port number this listening socket 
>: /**********************************************************************************************************/
>
>: return_message = getsockname ( socket_in, (struct sockaddr *) 
>: 	&retrieveAddr, &socket_length_info);
>: return_message = getsockname ( socket_in, (struct sockaddr *)
>: 	 &localAddr, &socket_length_info);
>
>: printf ("Control connection port: %d, return_message = %d\n",
>: 	 servAddr.sin_port, return_message );
>
>: printf ("DEBUG -retrieved local address: %d.%d.%d.%d on PORT %d\n",
>: 		localAddr.sin_addr.S_un.S_un_b.s_b1,
>: 		localAddr.sin_addr.S_un.S_un_b.s_b2,
>: 		localAddr.sin_addr.S_un.S_un_b.s_b3,
>: 		localAddr.sin_addr.S_un.S_un_b.s_b4,
>: 		localAddr.sin_port );
>
>
>
>: ******************** BEGIN REPLY  *********************************
>: Binding socket - return message: 0
>: Bound serverPortNumber: 21
>: Bound port - 0
>: Listening socket - return message: 0
>: Control connection port: 21, return_message = 0
>: DEBUG - printing retrieved local address: 0.0.0.0 on PORT 0
>
>: ******************** BEGIN CODE *********************************
>: On 21 Jan 2002 08:17:19 GMT, Arun Upadhyaya Kishan
>:  wrote:
>
>:>You need to create a new socket with port specified to 0, and then bind to 
>:>this port. Use getsockname() after the bind() to extract the assigned 
>:>port. This is the port you will tell the server to connect to with the 
>:>PORT command.
>:>
>:>Arun
>:>
>:>Dennis Lin  wrote:
>:>: Hi everybody,
>:>
>:>: I've been stuck on this problem for some time now, and I realize that
>:>: it is a basic question. 
>:>
>:>: For the PORT command, I know that we are supposed to send an IP
>:>: address and the port we are connecting to.  How do we get this
>:>: information to send out?  Seems like getsockname() doesn't really
>:>: work.  Thanks.
>:>
>:>
>:>: Dennis
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga2.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Problem with TestScript
Date: Mon, 21 Jan 2002 00:53:39 -0800
Lines: 40
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2604

Hi,

I have two questions about the Test script.

First: What is the expected behavior of the program when it faced a linked
file in the same directory of the file. This is tested by:

 * Test L.5: Special cases: Symbolic-link-to-file [out of 0.5]
[SUMMARY] NOT OK
[RESULT]  Symbolic link to file in same directory did not transfer
(wrong!)

Can you please tell me what the behavior should be? Should we copy also
the link file when it points to a file in the same directory. I did this
and the test still not working.


Second: I passed all the other tests. However, I always failed this test:

/***********************************************************/
* Test D: Connects to server but does not transfer any matching files in
the specified levels [out of 3.5]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie
exit line said: "ERROR: Transiant Negative reply from server "
/***********************************************************/

However, when I run the program manually for the given command:

ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie

It ALWAYS works! I sent the test three times and it gave the above error
message. I have no way to debug it since it is not occuring with me! Any
suggestion please.

Thanks,

Moh'd

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!araik
From: Araik Grigoryan 
Newsgroups: su.class.cs244a
Subject: Re: quick questions
Date: Mon, 21 Jan 2002 00:57:07 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2605



> 1. even though i submit purify.output all the time, this report says
> purify.output is not submitted. Even the output of submit test script says
> purify.output has been taken. please clarify.

Sorry, that's for the TAs to fix.

> 2. ftpparse utility is unable to parse the list response from 204.123.2.2.
> the list response has some zeros (0). May be it is because of that. Are
> there any solutions to this?

I do know the possible answer to this ... This FTP server sends data that
is terminated with "\n" and NOT with "\r\n". I sent an email to Nick
mentioning this but did not get a response yet. Meanwhile, you may want to
put in a hack to take care of this. The fix does not involve messing with
ftpparse, btw, just your own code.

araik

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!araik
From: Araik Grigoryan 
Newsgroups: su.class.cs244a
Subject: file separator
Date: Mon, 21 Jan 2002 01:00:11 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2606


Hi,

Does anyone know if there is some global string defined in a C library
that contains a character that separates file names, e.g. "/" or "\"?
Thanks.

araik

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga2.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Test Functionality
Date: Mon, 21 Jan 2002 01:12:58 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2607

Hi all,

Anyone can tell me what is the required functionality of this test:

 * Test I: User interface specification:  violates output format [out of
0.5]


Thanks,

Moh'd

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Submit Script
Date: Mon, 21 Jan 2002 10:27:38 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2608

Has anyone received the error when running the submit script?

Submission succeeded
Error: log: open: Permission denied


--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Problem with TestScript
Date: Mon, 21 Jan 2002 10:31:03 -0800
Lines: 57
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2609

I can tell you a little more about the ftp.microsoft.com issue.  Your
program is aborting because the server is full.  I can only speak from
experience but I am having the same problems.  However, I seem to almost
always be able to connect to microsoft from a saga machine but never from my
home machine (I get the server full error from my home machine when manually
trying to open a connection).  Since the tests are run from the leland
cluster though, that doesn't support my theory.  I guess I'm just letting
you know that you aren't the only one having problems with Microsoft ;)

--Russ



"Moh'd Saleem Saleem Alrawashdeh"  wrote in message

> Hi,
>
> I have two questions about the Test script.
>
> First: What is the expected behavior of the program when it faced a linked
> file in the same directory of the file. This is tested by:
>
>  * Test L.5: Special cases: Symbolic-link-to-file [out of 0.5]
> [SUMMARY] NOT OK
> [RESULT]  Symbolic link to file in same directory did not transfer
> (wrong!)
>
> Can you please tell me what the behavior should be? Should we copy also
> the link file when it points to a file in the same directory. I did this
> and the test still not working.
>
>
> Second: I passed all the other tests. However, I always failed this test:
>
> /***********************************************************/
> * Test D: Connects to server but does not transfer any matching files in
> the specified levels [out of 3.5]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie
> exit line said: "ERROR: Transiant Negative reply from server "
> /***********************************************************/
>
> However, when I run the program manually for the given command:
>
> ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie
>
> It ALWAYS works! I sent the test three times and it gave the above error
> message. I have no way to debug it since it is not occuring with me! Any
> suggestion please.
>
> Thanks,
>
> Moh'd
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!araik
From: Araik Grigoryan 
Newsgroups: su.class.cs244a
Subject: RE: non-NVT ASCII replies (fwd)
Date: Mon, 21 Jan 2002 10:58:05 -0800
Lines: 45
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2610


Here's what I got from Antonios.

---------- Forwarded message ----------
Date: Mon, 21 Jan 2002 09:22:50 -0800
From: Antonios Hondroulis 
To: Araik Grigoryan 
Subject: RE: non-NVT ASCII replies


Hi Araik,

No, only what the RFC says is what we expect you to handle.

Please try to post on the newsgroup your questions. This way
it's more beneficial for everyone.

Thanks,
Antonios.

-----Original Message-----
From: Araik Grigoryan 
Sent: Sunday, January 20, 2002 5:44 PM
To: 
Subject: non-NVT ASCII replies



Hi Nick,

Got a question ... I ran my program with the test script and there is one
test (ftpcopy Z 2 204.123.2.2 localdir /pub/comm) that gives me a problem
because the replies that it returns are not terminated with "\r\n" but
only with "\n". According to the assignment, we don't have to deal with
this but I wanted to confirm with you. Btw, it's not a bug in my code, I
confirmed it with another student (which still does not really prove
anything, but I am pretty certain that the replies are in non-NVT ASCII
format). So should we follow the assignment and ignore this case or put in
a hack to handle it?

Thanks,

araik


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: Submit Script
Date: Mon, 21 Jan 2002 11:02:59 -0800
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
X-Accept-Language: es, en-us, fr, de
Xref: nntp.stanford.edu su.class.cs244a:2611

Hi,

If you saw an error like this, the error is minor and it did not prevent 
you from submitting your code, in other words, we received your files 
correctly. This problem has been solved, so you will not see it again, 
if you submit now.

Pablo

Russell Greene wrote:

> Has anyone received the error when running the submit script?
> 
> Submission succeeded
> Error: log: open: Permission denied
> 
> 
> --Russ
> 
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine37.Stanford.EDU!rxuan
From: Ruozhong Xuan 
Newsgroups: su.class.cs244a
Subject: Re: submit_test.pl result question
Date: Mon, 21 Jan 2002 11:12:40 -0800
Lines: 61
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine37.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Moh'd Saleem Saleem Alrawashdeh 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2612

Hi Moh'd:
    I don't know why that happens. In my test result, I failed at most of
the items from D to F. But when I manually tried out, I got the expected
result, and my local file tree got created as expected.

--ruozhong xuan


 On Sun, 20 Jan 2002, Moh'd Saleem Saleem Alrawashdeh wrote:

> Hi,
>
> I am having the same problem. Any idea?
>
> Thanks,
>
> Moh'd
> On Fri, 18 Jan 2002, Ruozhong Xuan wrote:
>
> > Hi,
> >     I used the submit_test.pl to request a test, and in a section,I got
> > the below:
> > ===============
> >
> >     * Test F.2: Does not transfer all of the matching files in the first
> > level down to the
> >       last specified level [out of 1]
> >
> > [SUMMARY] NOT OK
> > [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> > exit line said: "OK:1900222 bytes copied"
> > ---
> > diff between expected tree and your tree:
> > 1,8d0
> > < ./kermit/c/all.tar.Z
> > < ./kermit/c/amiga.tar.Z
> > < ./kermit/c/dg.tar.Z
> > < ./kermit/c/mac.tar.Z
> > < ./kermit/c/os2.tar.Z
> > < ./kermit/c/os9.tar.Z
> > < ./kermit/c/unix.tar.Z
> > < ./kermit/c/vms.tar.Z
> > 10d1
> > < ./xcomm.tar.Z
> >
> >
> >
> > But when I manually tried out:
> > ftpcopy Z 2 204.123.2.2 test /pub/comm
> > I found all those files have been transfered to "test" directory under the
> > correct subdirectory. So I am a little confused by the test result. Any
> > comment?
> >
> > Thanks.
> > Ruozhong Xuan
> >
> >
> >
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: quick questions
Date: Mon, 21 Jan 2002 11:33:32 -0800
Lines: 35
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
X-Accept-Language: es, en-us, fr, de
Xref: nntp.stanford.edu su.class.cs244a:2613



Araik Grigoryan wrote:

> 
>>1. even though i submit purify.output all the time, this report says
>>purify.output is not submitted. Even the output of submit test script says
>>purify.output has been taken. please clarify.
>>
> 
> Sorry, that's for the TAs to fix.
> 


This problem has been fixed.

Pablo


> 
>>2. ftpparse utility is unable to parse the list response from 204.123.2.2.
>>the list response has some zeros (0). May be it is because of that. Are
>>there any solutions to this?
>>
> 
> I do know the possible answer to this ... This FTP server sends data that
> is terminated with "\n" and NOT with "\r\n". I sent an email to Nick
> mentioning this but did not get a response yet. Meanwhile, you may want to
> put in a hack to take care of this. The fix does not involve messing with
> ftpparse, btw, just your own code.
> 
> araik
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Sriram Viji" 
Newsgroups: su.class.cs244a
Subject: error creating data sockets
Date: Mon, 21 Jan 2002 11:48:29 -0800
Lines: 28
Distribution: su
Message-ID: 
NNTP-Posting-Host: glaurung.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Xref: nntp.stanford.edu su.class.cs244a:2614


hi,

i'm having problems opening data sockets. when i try to do a recursive list,
it works fine for a while and then runs into problems trying to open a new
socket, am i running into problems trying to open too many sockets?

data connection involves:
getting a socket using the socket() command,  <- this is where i get errors
later on
binding it using bind()
listening on that using listen()
getting the port number using getsockname()
sending PORT over the control connection
accepting the connection using accept()
sending LIST over the control connection
reading the data and when we're done with this the server closes the
connection

do we also have to close the connection from our end using shutdown() and
close()?
do we have to create a socket for each new list command?
the purify version gives me an error, it says 128 file descriptors in use

thanks,
sriram


.

Path: shelby.stanford.edu!nntp.stanford.edu!cardinal5.Stanford.EDU!fsun
From: Fang Sun 
Newsgroups: su.class.cs244a
Subject: Question about mkdir
Date: Mon, 21 Jan 2002 13:11:47 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: cardinal5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2615

I have implemented most of the things, but I have one question left.
According to the, "You should overwrite any files which already exist
without prompting". And when you want to construct a directory, but there
is one directory with the same name, I think we should over write the old
directory.
But if we use mkdir to construct the new directory, we can't overwrite the
old directory. It can only incur and error and exit.
How to handle this problem? Do we need to delete the old directory(and
all the files under it), and then use mkdir to construct the new
directory?
Thanks

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine21.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: non-NVT ASCII replies (fwd)
Date: 21 Jan 2002 21:13:52 GMT
Lines: 48
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine21.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2616


This server is correctly giving me NVT ASCII when I try.

Matthew


>---------- Forwarded message ----------
>Date: Mon, 21 Jan 2002 09:22:50 -0800
>From: Antonios Hondroulis 
>To: Araik Grigoryan 
>Subject: RE: non-NVT ASCII replies


>Hi Araik,

>No, only what the RFC says is what we expect you to handle.

>Please try to post on the newsgroup your questions. This way
>it's more beneficial for everyone.

>Thanks,
>Antonios.

>-----Original Message-----
>From: Araik Grigoryan 
>Sent: Sunday, January 20, 2002 5:44 PM
>To: 
>Subject: non-NVT ASCII replies



>Hi Nick,

>Got a question ... I ran my program with the test script and there is one
>test (ftpcopy Z 2 204.123.2.2 localdir /pub/comm) that gives me a problem
>because the replies that it returns are not terminated with "\r\n" but
>only with "\n". According to the assignment, we don't have to deal with
>this but I wanted to confirm with you. Btw, it's not a bug in my code, I
>confirmed it with another student (which still does not really prove
>anything, but I am pretty certain that the replies are in non-NVT ASCII
>format). So should we follow the assignment and ignore this case or put in
>a hack to handle it?

>Thanks,

>araik


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Antonios Hondroulis 
Newsgroups: su.class.cs244a
Subject: Re: error creating data sockets
Date: Mon, 21 Jan 2002 13:15:21 -0800
Organization: Stanford University
Lines: 40
Distribution: su
Message-ID: 
References: 
Reply-To: 
NNTP-Posting-Host: sul-hd-adam.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.77 (Macintosh; U; PPC)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2617



Sriram,

 You're running out of file-descriptors by not closing your sockets.
 Please take a look at the code in page 113 of Stevens.
 Also, please keep in mind that the file descriptor returned by
 accept is different from the one you used to LISTEN to.

 Regards,
 Antonios.

Sriram Viji wrote:

> hi,
>
> i'm having problems opening data sockets. when i try to do a recursive list,
> it works fine for a while and then runs into problems trying to open a new
> socket, am i running into problems trying to open too many sockets?
>
> data connection involves:
> getting a socket using the socket() command,  <- this is where i get errors
> later on
> binding it using bind()
> listening on that using listen()
> getting the port number using getsockname()
> sending PORT over the control connection
> accepting the connection using accept()
> sending LIST over the control connection
> reading the data and when we're done with this the server closes the
> connection
>
> do we also have to close the connection from our end using shutdown() and
> close()?
> do we have to create a socket for each new list command?
> the purify version gives me an error, it says 128 file descriptors in use
>
> thanks,
> sriram

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine21.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Question about mkdir
Date: 21 Jan 2002 21:16:54 GMT
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine21.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2618

Fang Sun  writes:

>I have implemented most of the things, but I have one question left.
>According to the, "You should overwrite any files which already exist
>without prompting". And when you want to construct a directory, but there
>is one directory with the same name, I think we should over write the old
>directory.
>But if we use mkdir to construct the new directory, we can't overwrite the
>old directory. It can only incur and error and exit.
>How to handle this problem? Do we need to delete the old directory(and
>all the files under it), and then use mkdir to construct the new
>directory?
>Thanks


You can check errno to determine the reason for mkdir() failing; if it's
because the directory exists, you shouldn't treat the case as an error.

.

Path: shelby.stanford.edu!nntp.stanford.edu!cardinal5.Stanford.EDU!fsun
From: Fang Sun 
Newsgroups: su.class.cs244a
Subject: Re: Question about mkdir
Date: Mon, 21 Jan 2002 14:42:57 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: cardinal5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2619

Thanks.
And after checking the errno, we should delete the directory if it exists,
right? And if the directory includes files and subdirectories, we should
delete them all recursively.
Is that right?


 On 21 Jan 2002, Matthew Jonathan Holliman
wrote:

> Fang Sun  writes:
>
> >I have implemented most of the things, but I have one question left.
> >According to the, "You should overwrite any files which already exist
> >without prompting". And when you want to construct a directory, but there
> >is one directory with the same name, I think we should over write the old
> >directory.
> >But if we use mkdir to construct the new directory, we can't overwrite the
> >old directory. It can only incur and error and exit.
> >How to handle this problem? Do we need to delete the old directory(and
> >all the files under it), and then use mkdir to construct the new
> >directory?
> >Thanks
>
>
> You can check errno to determine the reason for mkdir() failing; if it's
> because the directory exists, you shouldn't treat the case as an error.
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine31.Stanford.EDU!htimam
From:  (Hasan Taufiq Imam)
Newsgroups: su.class.cs244a
Subject: file extensions.
Date: 21 Jan 2002 23:11:39 GMT
Organization: Stanford University, CA 94305, USA
Lines: 5
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2620

xxx.tar.gz an acceptable file if user specification is just
..gz. Need clarification.
Thanks,
Hasan  

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Debashis Sahoo" 
Newsgroups: su.class.cs244a
Subject: broken pipe
Date: Mon, 21 Jan 2002 15:46:33 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: dsahoo.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2621

I am receiving following error from the automatic test script.
I am getting broken pipe while calling write to socket in this case.
Do we have to catch SIGPIPE signal in this case?
How do we handle this case ...any ideas?

    * Test I: User interface specification:  violates output format [out of
0.5]

[SUMMARY] NOT OK
[RESULT]
test used: ftpcopy gz 2 epic11.stanford.edu localdir
exit line said: ""

Thanks,
Sahoo


.

Path: shelby.stanford.edu!nntp.stanford.edu!epic18.Stanford.EDU!ggaurav
From: Gaurav Garg 
Newsgroups: su.class.cs244a
Subject: Default remoteBaseDir ??
Date: Mon, 21 Jan 2002 16:00:22 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic18.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2622


This one for the TA's:

   Can we assume the default remote server's base directory specified be
always '/' or can default directory be any other directory in general?
   The ftp servers mentioned in the problem statement all default to '/',
so is this a rule or mere coincidence??

-gaurav

*************************************************************************
Gaurav Garg                          * Contact Info: 20A Comstock Circle
1st Yr, Graduate Student             *       Escondido Village, Stanford
Department of Electrical Engineering *       CA-94305
Stanford University                  * Ph:650-498-1208
*************************************************************************

-Never ruin an apology with an excuse

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Pete Belknap" 
Newsgroups: su.class.cs244a
Subject: Symbolic Links and File Extensions
Date: Mon, 21 Jan 2002 16:23:24 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2623

What should we do when the symbolic link has a diff extension than the file
it points to?

So, for example, if we want to download .txt files and we have the link

link.lnk  ->  readme.txt

Should we download it?  Of course, the opposite question is, if we are
interested in files of extension .lnk, should we download the link?  It
seems to me that the answer to my first question should be no and the second
should be yes...

thanks,
Pete


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: ftpcopy Z 2 204.123.2.2 localdir /pub/comm ??
Date: Mon, 21 Jan 2002 16:45:37 -0800
Lines: 67
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2624

Hey Folks,

I'm failing the test: ftpcopy Z 2 204.123.2.2 localdir /pub/comm

In the test_submit script...

When I run my program (which runs fine on other sites) on this
site I get the following last few lines of OUTPUT:

-----> CWD c
 
<--- 250 CWD command successful.
 
-----> PORT 171,64,15,142,236,108
 
<--- 200 PORT command successful.
 
-----> LIST
 
<--- 150 Opening ASCII mode data connection for /bin/ls.
 
<--- 226 Transfer complete.
 
<--- total 1714
 
<--- lrwxrwxrwx   1 0        0             37 Apr 14  1995 00README-Le
gal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs
 
*** file Link: 00README-Legal-Rules-Regs -> ../../../../00README-Legal
-Rules-Regs
<--- -r--r--r--   1 0        0            935 Jan 17  1989 README
 
<--- -r--r--r--   1 0        0          72935 Jan 16  1989 all.tar.Z
 
-----> PORT 171,64,15,142,236,109
 
<--- 200 PORT command successful.
 
-----> TYPE I
 
<--- 200 Type set to I.
 
-----> RETR all.tar.Z
 
<--- 150 Opening BINARY mode data connection for all.tar.Z (72935 byte
s).
 
******* Here it just hangs indefinitely *****

In my readReply code, when I encounter a "1**" reply, I do another
read from the control socket, and I think its probably hanging
waiting for a reply from the server that never comes...

The assignment handout states that a "1**" indicates a positive
preliminary reply, but to "expect another reply before sending the next
command" -

Should I be reading the other (promised) reply line from the connection
socket
when I do a readReply, or before sending the next command?

What I currently have works for the other sites, but this
one is acting up...

Comments? Suggestions?

Cheers,
.

Path: shelby.stanford.edu!nntp.stanford.edu!saga0.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy Z 2 204.123.2.2 localdir /pub/comm ??
Date: Mon, 21 Jan 2002 17:02:27 -0800
Lines: 89
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga0.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2625

hi

I am passing the test. But the test script says it is not.

Any ideas?

thanks
abhishek

On Mon, 21 Jan 2002, Luis Robles wrote:

> Hey Folks,
>
> I'm failing the test: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
>
> In the test_submit script...
>
> When I run my program (which runs fine on other sites) on this
> site I get the following last few lines of OUTPUT:
>
> -----> CWD c
>
> <--- 250 CWD command successful.
>
> -----> PORT 171,64,15,142,236,108
>
> <--- 200 PORT command successful.
>
> -----> LIST
>
> <--- 150 Opening ASCII mode data connection for /bin/ls.
>
> <--- 226 Transfer complete.
>
> <--- total 1714
>
> <--- lrwxrwxrwx   1 0        0             37 Apr 14  1995 00README-Le
> gal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs
>
> *** file Link: 00README-Legal-Rules-Regs -> ../../../../00README-Legal
> -Rules-Regs
> <--- -r--r--r--   1 0        0            935 Jan 17  1989 README
>
> <--- -r--r--r--   1 0        0          72935 Jan 16  1989 all.tar.Z
>
> -----> PORT 171,64,15,142,236,109
>
> <--- 200 PORT command successful.
>
> -----> TYPE I
>
> <--- 200 Type set to I.
>
> -----> RETR all.tar.Z
>
> <--- 150 Opening BINARY mode data connection for all.tar.Z (72935 byte
> s).
>
> ******* Here it just hangs indefinitely *****
>
> In my readReply code, when I encounter a "1**" reply, I do another
> read from the control socket, and I think its probably hanging
> waiting for a reply from the server that never comes...
>
> The assignment handout states that a "1**" indicates a positive
> preliminary reply, but to "expect another reply before sending the next
> command" -
>
> Should I be reading the other (promised) reply line from the connection
> socket
> when I do a readReply, or before sending the next command?
>
> What I currently have works for the other sites, but this
> one is acting up...
>
> Comments? Suggestions?
>
> Cheers,
>

Abhishek Das
Graduate Research Assistant
Computer Systems Lab
Stanford University

Address:-
Escondido Village 33B
Stanford CA 94305

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Dir and files with same names...
Date: Mon, 21 Jan 2002 17:35:56 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2626


 I wonder what I should do with dirs and files with the same name..

1) There may be a file with the same name as the specified local
directory...
   Then shall I delete the file and then mkdir?
   Or shall I just report error and exit?
  ( I think the latter would make sense..)

2) It is stated that dir's and file's with the same name be overwritten..
   Then, does it mean that I have to delete the original file or dir
   when there's a file with the same name as the dir I'm going to make,
  or when there's a dir with the same name as the file I'm going to create..



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine31.Stanford.EDU!htimam
From:  (Hasan Taufiq Imam)
Newsgroups: su.class.cs244a
Subject: Other files in directory.
Date: 22 Jan 2002 01:42:36 GMT
Organization: Stanford University, CA 94305, USA
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2627

Please, clarify. 
In case of non-empty local directory do we delete files or directories
as required or do we delete everything. 
In other words, can the local directory contain any files or directories other
than the tree copied from the remote server. 

I still don't know if the user specifies extension gz, is tar.gz a valid 
extension or not.
Thanks.  
.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!araik
From: Araik Grigoryan 
Newsgroups: su.class.cs244a
Subject: Re: non-NVT ASCII replies (fwd)
Date: Mon, 21 Jan 2002 17:43:46 -0800
Lines: 59
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2628


On the data connection or the cotrol connection or both? The control
connection seems to be fine, it's the data connection that returns non-NVT
ASCII replies. Matt, I think you mentioned that you are using your own
ftpcopy program. Are you sure you are not specifically programming around
this problem?

On 21 Jan 2002, Matthew Jonathan Holliman wrote:

>
> This server is correctly giving me NVT ASCII when I try.
>
> Matthew
>
>
> >---------- Forwarded message ----------
> >Date: Mon, 21 Jan 2002 09:22:50 -0800
> >From: Antonios Hondroulis 
> >To: Araik Grigoryan 
> >Subject: RE: non-NVT ASCII replies
>
>
> >Hi Araik,
>
> >No, only what the RFC says is what we expect you to handle.
>
> >Please try to post on the newsgroup your questions. This way
> >it's more beneficial for everyone.
>
> >Thanks,
> >Antonios.
>
> >-----Original Message-----
> >From: Araik Grigoryan 
> >Sent: Sunday, January 20, 2002 5:44 PM
> >To: 
> >Subject: non-NVT ASCII replies
>
>
>
> >Hi Nick,
>
> >Got a question ... I ran my program with the test script and there is one
> >test (ftpcopy Z 2 204.123.2.2 localdir /pub/comm) that gives me a problem
> >because the replies that it returns are not terminated with "\r\n" but
> >only with "\n". According to the assignment, we don't have to deal with
> >this but I wanted to confirm with you. Btw, it's not a bug in my code, I
> >confirmed it with another student (which still does not really prove
> >anything, but I am pretty certain that the replies are in non-NVT ASCII
> >format). So should we follow the assignment and ignore this case or put in
> >a hack to handle it?
>
> >Thanks,
>
> >araik
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!araik
From: Araik Grigoryan 
Newsgroups: su.class.cs244a
Subject: Re: broken pipe
Date: Mon, 21 Jan 2002 17:47:45 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2629


Yep, had that problem ... Basically, epic11 does not accept FTP
connections but when it tells you that it doesn't, it's reply string is
not in standard reply format, i.e. "xyz Some text", it just gives you the
text without any numerical code and closes the connection. You just have
to program around that and you'll be fine.

On Mon, 21 Jan 2002, Debashis Sahoo wrote:

> I am receiving following error from the automatic test script.
> I am getting broken pipe while calling write to socket in this case.
> Do we have to catch SIGPIPE signal in this case?
> How do we handle this case ...any ideas?
>
>     * Test I: User interface specification:  violates output format [out of
> 0.5]
>
> [SUMMARY] NOT OK
> [RESULT]
> test used: ftpcopy gz 2 epic11.stanford.edu localdir
> exit line said: ""
>
> Thanks,
> Sahoo
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Jason Ahmad 
Newsgroups: su.class.cs244a
Subject: error cleanup
Date: Mon, 21 Jan 2002 18:46:33 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic13.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2630

What action, exactly, are we to take on general error cases (can't
allocate socket, can't make connection etc)? It is clear we are to write
a brief explaination to stderr and exit, but are we to free malloced
memory and make sure all sockets are closed and whatnot?

Thanks,
Jason
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy Z 2 204.123.2.2 localdir /pub/comm ??
Date: Mon, 21 Jan 2002 19:08:55 -0800
Lines: 79
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2631

You're not supposed to wait for the next reply right away.  You're 
supposed to read all the data off the data socket; then the ftp server 
will acknowledge that the transfer is complete by issuing the final 
response...so, read all the data, THEN read from the control socket for 
the final response.

-Sandeep

Luis Robles wrote:

> Hey Folks,
> 
> I'm failing the test: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> 
> In the test_submit script...
> 
> When I run my program (which runs fine on other sites) on this
> site I get the following last few lines of OUTPUT:
> 
> -----> CWD c
>  
> <--- 250 CWD command successful.
>  
> -----> PORT 171,64,15,142,236,108
>  
> <--- 200 PORT command successful.
>  
> -----> LIST
>  
> <--- 150 Opening ASCII mode data connection for /bin/ls.
>  
> <--- 226 Transfer complete.
>  
> <--- total 1714
>  
> <--- lrwxrwxrwx   1 0        0             37 Apr 14  1995 00README-Le
> gal-Rules-Regs -> ../../../../00README-Legal-Rules-Regs
>  
> *** file Link: 00README-Legal-Rules-Regs -> ../../../../00README-Legal
> -Rules-Regs
> <--- -r--r--r--   1 0        0            935 Jan 17  1989 README
>  
> <--- -r--r--r--   1 0        0          72935 Jan 16  1989 all.tar.Z
>  
> -----> PORT 171,64,15,142,236,109
>  
> <--- 200 PORT command successful.
>  
> -----> TYPE I
>  
> <--- 200 Type set to I.
>  
> -----> RETR all.tar.Z
>  
> <--- 150 Opening BINARY mode data connection for all.tar.Z (72935 byte
> s).
>  
> ******* Here it just hangs indefinitely *****
> 
> In my readReply code, when I encounter a "1**" reply, I do another
> read from the control socket, and I think its probably hanging
> waiting for a reply from the server that never comes...
> 
> The assignment handout states that a "1**" indicates a positive
> preliminary reply, but to "expect another reply before sending the next
> command" -
> 
> Should I be reading the other (promised) reply line from the connection
> socket
> when I do a readReply, or before sending the next command?
> 
> What I currently have works for the other sites, but this
> one is acting up...
> 
> Comments? Suggestions?
> 
> Cheers,
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga0.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: empty files
Date: Mon, 21 Jan 2002 19:18:01 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga0.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2632


hi

I am trying to transfer empty files using ftpd and i am being successful
in doing so i.e no file created.
However, the test script says that I transferred 7 bytes on two
occassions. Can anyone suggest how di I test this? as i said, using ftpd
says i am OK.

thanks
abhishek

Abhishek Das
Graduate Research Assistant
Computer Systems Lab
Stanford University

Address:-
Escondido Village 33B
Stanford CA 94305

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth2.Stanford.EDU!ambu
From: Ambika Balakrishnan 
Newsgroups: su.class.cs244a
Subject: location of testing dir
Date: Mon, 21 Jan 2002 20:14:24 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2633


Hello,

In the handout "Testing homework 1" there are 6 examples and I dont know
how to run examples 1 and 2, which refer to a permissionsDir and an
exampleDir. Where are these directories? Am I supposed to create them? Am
I supposed to run the supplied ftpd for these examples?

Thanks,
Ambika

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine9.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Re: Submit Script
Date: Mon, 21 Jan 2002 20:36:04 -0800
Lines: 7
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Pablo Molinero Fernandez 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2634

Hi,
The submission script is still giving some problem. I am having the
ftpcopy.purify in the directory but its saying that .purify not found.
Please look into the matter.
Thanks
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: LIST response in IMAGE type?
Date: Mon, 21 Jan 2002 20:33:25 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2635

 When I set the TYPE to I and sent the LIST command,
 the response doesn't seem to be in NVT-ASCII format.
 Although I may experiment with it and make things work,
 I'm afraid LIST response in IMAGE type may have no standard.

 But, I think switching between NVT-ASCII for LIST and IMAGE for RETR is too
cumbersome...
 I wish that I can use TYPE I exclusively...

 Could anybody help?



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine9.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Submit Fails
Date: Mon, 21 Jan 2002 20:43:29 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2636

Hi,
I am trying to submit hw1 and it has ftpcopy.purify in that directory but
it still says that no .purify is present.
Thanks
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!homa
From: Alex Khomenko 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Mon, 21 Jan 2002 21:02:46 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Shankar Agarwal 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2637


It seems to me that ftpcopy.purify and .purify are two different files.

Alex

On Mon, 21 Jan 2002, Shankar Agarwal wrote:

> Hi,
> I am trying to submit hw1 and it has ftpcopy.purify in that directory but
> it still says that no .purify is present.
> Thanks
> Shankar
>
>

-- 
Knowledge is a deadly friend when no one sets the rules.
The fate of all mankind I see is in the hands of fools. (KC "Epitaph")

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Test Result
Date: Mon, 21 Jan 2002 21:33:37 -0800
Lines: 31
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2638

Hi,

I am posting this again since I didn't get a reply for my first post. Can
anyone please tell me what this test means?

===============

    * Test L.5: Special cases: Symbolic-link-to-file [out of 0.5]

[SUMMARY] NOT OK
[RESULT]  Symbolic link to file in same directory did not transfer
(wrong!)
exit line said: ""
---
Your output to stdout was:

OK: 14 bytes copied

---


===============

I appreciate any clarification of what special case that this test is
testing?

Thanks,

Moh'd


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Timothy Tay Chao 
Newsgroups: su.class.cs244a
Subject: Re: non-NVT ASCII replies (fwd)
Date: Mon, 21 Jan 2002 21:51:28 -0800
Lines: 65
Distribution: su
Message-ID: 
References: 
	  
NNTP-Posting-Host: saga20.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2639

I've run into the same thing, but i'm apt to blame myself. Using ftpd,
I've found that I am sometimes getting list responses off the data
connection that end in "\r\n" and that sometimes end in "\n". This
inconsistency makes me think there's a bug in my code. Suggestions on
this would be quite helpful.

Araik Grigoryan wrote:
> 
> On the data connection or the cotrol connection or both? The control
> connection seems to be fine, it's the data connection that returns non-NVT
> ASCII replies. Matt, I think you mentioned that you are using your own
> ftpcopy program. Are you sure you are not specifically programming around
> this problem?
> 
> On 21 Jan 2002, Matthew Jonathan Holliman wrote:
> 
> >
> > This server is correctly giving me NVT ASCII when I try.
> >
> > Matthew
> >
> >
> > >---------- Forwarded message ----------
> > >Date: Mon, 21 Jan 2002 09:22:50 -0800
> > >From: Antonios Hondroulis 
> > >To: Araik Grigoryan 
> > >Subject: RE: non-NVT ASCII replies
> >
> >
> > >Hi Araik,
> >
> > >No, only what the RFC says is what we expect you to handle.
> >
> > >Please try to post on the newsgroup your questions. This way
> > >it's more beneficial for everyone.
> >
> > >Thanks,
> > >Antonios.
> >
> > >-----Original Message-----
> > >From: Araik Grigoryan 
> > >Sent: Sunday, January 20, 2002 5:44 PM
> > >To: 
> > >Subject: non-NVT ASCII replies
> >
> >
> >
> > >Hi Nick,
> >
> > >Got a question ... I ran my program with the test script and there is one
> > >test (ftpcopy Z 2 204.123.2.2 localdir /pub/comm) that gives me a problem
> > >because the replies that it returns are not terminated with "\r\n" but
> > >only with "\n". According to the assignment, we don't have to deal with
> > >this but I wanted to confirm with you. Btw, it's not a bug in my code, I
> > >confirmed it with another student (which still does not really prove
> > >anything, but I am pretty certain that the replies are in non-NVT ASCII
> > >format). So should we follow the assignment and ignore this case or put in
> > >a hack to handle it?
> >
> > >Thanks,
> >
> > >araik
> >
> >
> >
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Lin Lu 
Newsgroups: su.class.cs244a
Subject: how to handle 
Date: Mon, 21 Jan 2002 22:30:55 -0800
Lines: 30
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-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2640


I have several questions:

1.What are we supposed to do with 


2.This is from course web page.  Could anyone clarify why the results
should like that?

ftpcopy ext 1 


    12345 is the port at which the local ftp server is listening 
    The permissionsDir looks like this: 

    .
    ./a_zero.ext
    ./d_normal.ext
    ./c_dir.ext
    ./e_dir.ext
    ./e_dir.ext/f_dir.ext
    ./g_filelink.ext -> ./d_normal.ext
    ./h_dirlink.ext -> ./e_dir.ext

    After the transfer the results in localdir should look like this: 

    .
    ./a_zero.ext
    ./d_normal.ext
    ./g_filelink.ext
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Jian Deng 
Newsgroups: su.class.cs244a
Subject: Link to Dir
Date: 22 Jan 2002 06:58:53 GMT
Lines: 28
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2641

I have question on the following test case
special cases: Symbolic-link-to-directory [out of 0.5]

[SUMMARY] NOT OK
[RESULT]  Symbolic link to directory in same directory did transfer (wrong!)
exit line said: ""
---
Your output to stdout was:
OK: 14 bytes copied


Is this test case testing a transfer should not
happen to a symbolic link to the same dir that has already
been transfered?

I am wondering how can we prevent that with out parsing the
actual output of the list which varies with ftp servers.. 
and PWD will not give you the actual path.

Does this test case also imply we should handle cycles and not transfer
dirs already been transfered?

Your clarification is appreciated.



 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Zero byte files
Date: Tue, 22 Jan 2002 00:07:03 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2642


I think I was confused and tried NOT TO transfer zero-byte files...
But after submitting, the test result seems to be saying that I should
transfer zero-byte files...

I think the specification didn't say anything explicitly.. (or just my
fault.. )
Could anybody confirm this?
( Should I  transfer zero-byte files or not ? )



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: Re: Zero byte files
Date: Tue, 22 Jan 2002 01:01:19 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga3.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2643

I think we are supposed to transfer files that match on
the remote FTP server - even if they are size 0,

But, not create any 0 length files due to file-permission or
transfer problems...

BAEHOPIL wrote:
> 
> I think I was confused and tried NOT TO transfer zero-byte files...
> But after submitting, the test result seems to be saying that I should
> transfer zero-byte files...
> 
> I think the specification didn't say anything explicitly.. (or just my
> fault.. )
> Could anybody confirm this?
> ( Should I  transfer zero-byte files or not ? )

-- 
       Luis Robles

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth2.Stanford.EDU!ambu
From: Ambika Balakrishnan 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Tue, 22 Jan 2002 02:16:02 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: myth2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Alex Khomenko 
cc: Shankar Agarwal 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2644


> It seems to me that ftpcopy.purify and .purify are two different files.
Yes:

ftpcopy.purify is the purified version of your ftpcopy executable whereas
..purify is the file containing purify options such as the two "suppress
UMR" commands in the purify FAQ. This file is read by purify on startup.

Also remember to enable log files and disable windows either in your
Makefile or in your .purify so that the script can generate its own purify
output file instead of a graphical display.

--
Ambika


>
> Alex
>
> On Mon, 21 Jan 2002, Shankar Agarwal wrote:
>
> > Hi,
> > I am trying to submit hw1 and it has ftpcopy.purify in that directory but
> > it still says that no .purify is present.
> > Thanks
> > Shankar
> >
> >
>
> --
> Knowledge is a deadly friend when no one sets the rules.
> The fate of all mankind I see is in the hands of fools. (KC "Epitaph")
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: About level
Date: Tue, 22 Jan 2002 02:13:33 -0800
Lines: 31
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2645


It seems that I'm having some confusion about level number..

suppose this structure..

Root - F0
        - D1 - F1
        - D2 - D3 -F2
        - D4 -  D5 - D6-F3

My understanding was that F0, D1, D2,D4 are level 0 entities,
  F2,D3,D5 are level 1, F2,D6 are level 2...

So, if ftpcopy is called with level=1,  F0, D1,F1 will be copied..
 ( assuming extension is right and there are no other files )
With level=2, F0,D1,F1,D2,D3,F2 will be copied...

But, I got the following result, which seems to be saying that I copied more
than necessary...

diff between expected tree and your tree:
19,22d18
< ./examples/extex.ch
< ./examples/wc-dos.ch
< ./examples/wmer-os2.ch
< ./examples/wmerg-pc.ch

Am I having some misunderstanding here?



.

Path: shelby.stanford.edu!nntp.stanford.edu!myth4.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy Z 2 204.123.2.2 localdir /pub/comm ??
Date: 22 Jan 2002 15:31:32 GMT
Organization: Stanford University, CA 94305, USA
Lines: 7
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: myth4.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2646

I am reading the replys from the control socket before reading the data
and I am passing the test scripts. Have I just gotten lucky?
Also can I take it from your response we should be reading the entire LIST
reply before parsing it? 

-mark

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine14.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Tue, 22 Jan 2002 07:53:21 -0800
Lines: 47
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: elaine14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Ambika Balakrishnan 
cc: Alex Khomenko 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2647

Hi,
Is there any particular name that i should  give to this file and how do i
tell the compiler to pick up this file. I mean do i have to set some
environment variable where i can tell the name of the file containing the
supress statements.
Thanks
Regards
Shankar
On Tue, 22 Jan 2002, Ambika Balakrishnan wrote:

>
> > It seems to me that ftpcopy.purify and .purify are two different files.
> Yes:
>
> ftpcopy.purify is the purified version of your ftpcopy executable whereas
> .purify is the file containing purify options such as the two "suppress
> UMR" commands in the purify FAQ. This file is read by purify on startup.
>
> Also remember to enable log files and disable windows either in your
> Makefile or in your .purify so that the script can generate its own purify
> output file instead of a graphical display.
>
> --
> Ambika
>
>
> >
> > Alex
> >
> > On Mon, 21 Jan 2002, Shankar Agarwal wrote:
> >
> > > Hi,
> > > I am trying to submit hw1 and it has ftpcopy.purify in that directory but
> > > it still says that no .purify is present.
> > > Thanks
> > > Shankar
> > >
> > >
> >
> > --
> > Knowledge is a deadly friend when no one sets the rules.
> > The fate of all mankind I see is in the hands of fools. (KC "Epitaph")
> >
> >
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: non-NVT ASCII replies (fwd)
Date: Tue, 22 Jan 2002 09:06:58 -0800
Lines: 42
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2648


I found that the response to LIST command is different for TYPE I and TYPE
A..
( LIST response is not automatically set to NVT-ASCII mode )
When TYPE A, server returns NVT-ASCII, but when TYPE=I, it does not..
So, if we're changing between TYPE A and TYPE I for RETR, there may be some
inconsistency...
I think the inconsistency may be because of this, but I'm not sure...

-------------------------------------------
"Timothy Tay Chao"  wrote in message

> I've run into the same thing, but i'm apt to blame myself. Using ftpd,
> I've found that I am sometimes getting list responses off the data
> connection that end in "\r\n" and that sometimes end in "\n". This
> inconsistency makes me think there's a bug in my code. Suggestions on
> this would be quite helpful.
>
> Araik Grigoryan wrote:
> >
> > On the data connection or the cotrol connection or both? The control
> > connection seems to be fine, it's the data connection that returns
non-NVT
> > ASCII replies. Matt, I think you mentioned that you are using your own
> > ftpcopy program. Are you sure you are not specifically programming
around
> > this problem?
> >
> > On 21 Jan 2002, Matthew Jonathan Holliman wrote:
> >
> > >
> > > This server is correctly giving me NVT ASCII when I try.
> > >
> > > Matthew
> > >

> > > >araik
> > >
> > >
> > >


.

Path: shelby.stanford.edu!nntp.stanford.edu!epic3.Stanford.EDU!anhoe
From: An-hoe Shih 
Newsgroups: su.class.cs244a
Subject: argument of PORT command
Date: Tue, 22 Jan 2002 09:23:01 -0800
Lines: 27
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2649

Hi all,

   For the PORT command, how do we specify the argument? For example, if
the local host address is 171.64.15.36 and the port to use is 0xD84F, do
we just convert each byte to a character and place a ',' in the middle?

   I tried to do this:
171 = '\253'
64 = '@'
15 = '\017'
36 = '$'
0xDB = \330
0x4F = '0'

So I send to server the following command line:
PORT 

However, the server kept givinig me the error: 501 Syntax error in
parameters.

Can anybody tell me what did I do wrong?


Thanks,

An-Hoe

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!homa
From: Alex Khomenko 
Newsgroups: su.class.cs244a
Subject: Re: argument of PORT command
Date: Tue, 22 Jan 2002 10:06:12 -0800
Lines: 40
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: An-hoe Shih 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2650


You need to print each byte as a decimal integer, not character.

Alex

On Tue, 22 Jan 2002, An-hoe Shih wrote:

> Hi all,
>
>    For the PORT command, how do we specify the argument? For example, if
> the local host address is 171.64.15.36 and the port to use is 0xD84F, do
> we just convert each byte to a character and place a ',' in the middle?
>
>    I tried to do this:
> 171 = '\253'
> 64 = '@'
> 15 = '\017'
> 36 = '$'
> 0xDB = \330
> 0x4F = '0'
>
> So I send to server the following command line:
> PORT 
>
> However, the server kept givinig me the error: 501 Syntax error in
> parameters.
>
> Can anybody tell me what did I do wrong?
>
>
> Thanks,
>
> An-Hoe
>
>

-- 
Knowledge is a deadly friend when no one sets the rules.
The fate of all mankind I see is in the hands of fools. (KC "Epitaph")

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: LIST response in IMAGE type?
Date: Tue, 22 Jan 2002 10:26:58 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2651

Very simple; and this might be Araik's problem as well:

make sure you're using 'TYPE A' when getting directory listings -- as in 
ASCII transfer, not IMAGE.

-Sandeep

BAEHOPIL wrote:

>  When I set the TYPE to I and sent the LIST command,
>  the response doesn't seem to be in NVT-ASCII format.
>  Although I may experiment with it and make things work,
>  I'm afraid LIST response in IMAGE type may have no standard.
> 
>  But, I think switching between NVT-ASCII for LIST and IMAGE for RETR is too
> cumbersome...
>  I wish that I can use TYPE I exclusively...
> 
>  Could anybody help?
> 
> 
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Tue, 22 Jan 2002 10:35:06 -0800
Lines: 79
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2652

Ok, let's try this one more time:

1. cd to your project directory
2. cat > .purify
3. Type the following two lines (don't wait for a prompt or anything; 
just type)
suppress UMR ...;res_search
suppress UMR ...;nss_search

4. Hit Ctrl-d to close the file.

You now have a valid .purify file.  It won't show up with 'ls' because 
files that begin with "." are hidden.  To list hidden files do an 'ls -a'.

Good luck.

-Sandeep

Shankar Agarwal wrote:

> Hi,
> Is there any particular name that i should  give to this file and how do i
> tell the compiler to pick up this file. I mean do i have to set some
> environment variable where i can tell the name of the file containing the
> supress statements.
> Thanks
> Regards
> Shankar
> On Tue, 22 Jan 2002, Ambika Balakrishnan wrote:
> 
> 
>>>It seems to me that ftpcopy.purify and .purify are two different files.
>>>
>>Yes:
>>
>>ftpcopy.purify is the purified version of your ftpcopy executable whereas
>>.purify is the file containing purify options such as the two "suppress
>>UMR" commands in the purify FAQ. This file is read by purify on startup.
>>
>>Also remember to enable log files and disable windows either in your
>>Makefile or in your .purify so that the script can generate its own purify
>>output file instead of a graphical display.
>>
>>--
>>Ambika
>>
>>
>>
>>>Alex
>>>
>>>On Mon, 21 Jan 2002, Shankar Agarwal wrote:
>>>
>>>
>>>>Hi,
>>>>I am trying to submit hw1 and it has ftpcopy.purify in that directory but
>>>>it still says that no .purify is present.
>>>>Thanks
>>>>Shankar
>>>>
>>>>
>>>>
>>>--
>>>Knowledge is a deadly friend when no one sets the rules.
>>>The fate of all mankind I see is in the hands of fools. (KC "Epitaph")
>>>
>>>
>>>
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy Z 2 204.123.2.2 localdir /pub/comm ??
Date: Tue, 22 Jan 2002 10:44:52 -0800
Lines: 38
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2653

In my opinion you did get lucky...well, it's more than an opinion; some 
of my friends ran into this very blocking problem.

Here's my reasoning:  you tell the ftp server that you want a directory 
listing; it tells you, 'Sure, I'll get started on that."  But if you 
don't read from the data socket, and the directory listing is 
sufficiently large, he won't be able to write the whole listing to his 
end of the socket (because some buffer has filled up).  So he won't send 
the 226.  However, if you read from the data connection (i.e. read ALL 
the data), then the server will finish writing to its end of the socket 
and issue the 226.

It wouldn't hurt to parse the directory data a line at a time; but you 
can't act on it (i.e. download a file, change to a subdirectory) until 
you've finished reading all the data from the current listing.

-Sandeep

Mark Joseph Dolan wrote:

> I am reading the replys from the control socket before reading the data
> and I am passing the test scripts. Have I just gotten lucky?
> Also can I take it from your response we should be reading the entire LIST
> reply before parsing it? 
> 
> -mark
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine42.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Got the following error message.
Date: Tue, 22 Jan 2002 10:45:52 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2654

Hi,
I got the follwoing error message when submitting the hw1. Does this mean
that submisssion was successful or i need to submit again.
Submission succeeded.
Error: log: open: Permission denied

A problem statement has been e-mailed to the system
administrator 

Thanks
Regards
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine42.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Tue, 22 Jan 2002 10:47:56 -0800
Lines: 90
Distribution: su
Message-ID: 
References: 
 
 
 
 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Sandeep Tamhankar 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2655


Hi Sandeep,
Thanks a lot. I was misintrepreting .purify as some file with .purify in
the end. Thats why all this confusion. Anyways finally i was able to
submit the code.
Regards
Shankar
On Tue, 22 Jan 2002, Sandeep Tamhankar wrote:

> Ok, let's try this one more time:
>
> 1. cd to your project directory
> 2. cat > .purify
> 3. Type the following two lines (don't wait for a prompt or anything;
> just type)
> suppress UMR ...;res_search
> suppress UMR ...;nss_search
>
> 4. Hit Ctrl-d to close the file.
>
> You now have a valid .purify file.  It won't show up with 'ls' because
> files that begin with "." are hidden.  To list hidden files do an 'ls -a'.
>
> Good luck.
>
> -Sandeep
>
> Shankar Agarwal wrote:
>
> > Hi,
> > Is there any particular name that i should  give to this file and how do i
> > tell the compiler to pick up this file. I mean do i have to set some
> > environment variable where i can tell the name of the file containing the
> > supress statements.
> > Thanks
> > Regards
> > Shankar
> > On Tue, 22 Jan 2002, Ambika Balakrishnan wrote:
> >
> >
> >>>It seems to me that ftpcopy.purify and .purify are two different files.
> >>>
> >>Yes:
> >>
> >>ftpcopy.purify is the purified version of your ftpcopy executable whereas
> >>.purify is the file containing purify options such as the two "suppress
> >>UMR" commands in the purify FAQ. This file is read by purify on startup.
> >>
> >>Also remember to enable log files and disable windows either in your
> >>Makefile or in your .purify so that the script can generate its own purify
> >>output file instead of a graphical display.
> >>
> >>--
> >>Ambika
> >>
> >>
> >>
> >>>Alex
> >>>
> >>>On Mon, 21 Jan 2002, Shankar Agarwal wrote:
> >>>
> >>>
> >>>>Hi,
> >>>>I am trying to submit hw1 and it has ftpcopy.purify in that directory but
> >>>>it still says that no .purify is present.
> >>>>Thanks
> >>>>Shankar
> >>>>
> >>>>
> >>>>
> >>>--
> >>>Knowledge is a deadly friend when no one sets the rules.
> >>>The fate of all mankind I see is in the hands of fools. (KC "Epitaph")
> >>>
> >>>
> >>>
> >>
> >
>
>
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine25.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: non-NVT ASCII replies (fwd)
Date: 22 Jan 2002 18:59:43 GMT
Lines: 18
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine25.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2656

Araik Grigoryan  writes:


>On the data connection or the cotrol connection or both? The control
>connection seems to be fine, it's the data connection that returns non-NVT
>ASCII replies. Matt, I think you mentioned that you are using your own
>ftpcopy program. Are you sure you are not specifically programming around
>this problem?

The server sends NVT ASCII over both data and control connections; I wasn't
doing anything special to handle this particular host.

I could reproduce the behaviour you mentioned if I set the transfer mode
to binary before doing LIST.  As the RFC states, the transfer mode must
be set to ASCII before you issue LIST--so be sure to check that this is the
case.

Matthew
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: Got the following error message.
Date: Tue, 22 Jan 2002 11:14:07 -0800
Lines: 42
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2657

(This was taken from an earlier posting)

Hi,

If you saw an error like this, the error is minor and it did not prevent
you from submitting your code, in other words, we received your files
correctly. This problem has been solved, so you will not see it again,
if you submit now.

Pablo

Russell Greene wrote:

> Has anyone received the error when running the submit script?
>
> Submission succeeded
> Error: log: open: Permission denied
>
>
> --Russ
>
>
>


"Shankar Agarwal"  wrote in message

> Hi,
> I got the follwoing error message when submitting the hw1. Does this mean
> that submisssion was successful or i need to submit again.
> Submission succeeded.
> Error: log: open: Permission denied
>
> A problem statement has been e-mailed to the system
> administrator 
>
> Thanks
> Regards
> Shankar
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Tue, 22 Jan 2002 11:39:47 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: madrid.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2658

As mentioned in the assignment handout, you have to have two 
purify-related files, .purify and a purify.output, in your homework 
directory before you can submit your code.

Pablo


Shankar Agarwal wrote:

> Hi,
> I am trying to submit hw1 and it has ftpcopy.purify in that directory but
> it still says that no .purify is present.
> Thanks
> Shankar
> 
> 


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: Re: Regarding Post of 1/16/02, 8:56: Script File Sizes
Date: 22 Jan 2002 20:01:20 GMT
Lines: 43
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth10.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2659

I'm having similar problems. Tests D and F read:

exit line: ""

but my program always prints something out, either an "OK: ..." or "ERROR:
...." I've manually tried running my program one of the tested sites
(ftp.cs.stanford.edu) and everything works as expected, so I don't know
what to do.

I'm also having problems with tests I and L. I think the FTP server on
epic is messed up, because I get:

Your output to stdout was:
TIMEOUT! killed program: /afs/ir/class/cs244a/submissions/restricted/hw1/hondroul/oceans//compile.sun/ftpcopy ext 1  /afs/ir/class/cs244a/submissions/restricted/hw1/hondroul/oceans//compile.sun/download/perms .   21715


Anyone know what's going on?

- Derrick



Steven Siuhong Ngai  wrote:
: Some random questions:

: -Have any of you gotten the gotten the same bad results on that part of the
: test that Bret mentioned? I've manually visited the sites where my tests
: fail, and I can't figure out what's wrong. Any helpful stories of bugs
: fixed?

: -Did either of you perhaps have any problems with the exit line reports? My
: test results read "exit line: ' ' " where I think they ought to have read
: "OK: etc." Should they read "OK..."? Are points being deducted on that basis
: (this is a question probably for a TA)?

: -When the test lists diffs, do >'s mean that your tree had certain files and
: that the correct one didn't (ie you shouldn't have had them)?

: Thanks.
: Steve



.

Path: shelby.stanford.edu!nntp.stanford.edu!myth8.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: Got the following error message.
Date: Tue, 22 Jan 2002 12:20:56 -0800
Lines: 64
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: myth8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2660


Hi,
I jsut submitted and ran into this error message.
Hope i am ok and does not need to resubmit. Just
wanted to convey because earlier mail said this
problem was fixed ?

Thanks, Arvind

-------------------------
Submission succeeded.
Error: log: open: Permission denied

A problem statement has been e-mailed to the system
administrator 



On Tue, 22 Jan 2002, Russell Greene wrote:

> (This was taken from an earlier posting)
>
> Hi,
>
> If you saw an error like this, the error is minor and it did not prevent
> you from submitting your code, in other words, we received your files
> correctly. This problem has been solved, so you will not see it again,
> if you submit now.
>
> Pablo
>
> Russell Greene wrote:
>
> > Has anyone received the error when running the submit script?
> >
> > Submission succeeded
> > Error: log: open: Permission denied
> >
> >
> > --Russ
> >
> >
> >
>
>
> "Shankar Agarwal"  wrote in message
> 
> > Hi,
> > I got the follwoing error message when submitting the hw1. Does this mean
> > that submisssion was successful or i need to submit again.
> > Submission succeeded.
> > Error: log: open: Permission denied
> >
> > A problem statement has been e-mailed to the system
> > administrator 
> >
> > Thanks
> > Regards
> > Shankar
> >
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Debashis Sahoo" 
Newsgroups: su.class.cs244a
Subject: User Interface violation ...
Date: Tue, 22 Jan 2002 12:42:36 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: dsahoo.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: nntp.stanford.edu su.class.cs244a:2661

Hi,
    I received following error.
What should be the output? Any ideas.....?

    * Test I: User interface specification:  violates output format [out of
0.5]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy gz 2 epic11.stanford.edu localdir
exit line said: "ERROR : You can't FTP into this machine. FTP into
transfer.stanford.edu."
---
Program output:
ERROR : You can't FTP into this machine. FTP into transfer.stanford.edu.

---

Thanks,
Sahoo


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Joong Ho Won" 
Newsgroups: su.class.cs244a
Subject: proper RETR and LIST behavior
Date: Tue, 22 Jan 2002 13:09:31 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: cecily.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Xref: nntp.stanford.edu su.class.cs244a:2662

Hello,

I wonder if RETR command can take an absoulte/relative path to a file as an
argument. i.e.,

RETR /a/path/to/a/file

rather than having just a filename, i.e.,

RETR file

RFC doesn't seem to specify this case.

Some ftp(ex. ftp.stanford.edu ) seems not to allow the former case, but
others(ex. transfer.stanford.edu ) seems to.

I'd like to make it clear for LIST for the same case as well, though it
seems to be allowed seeing RFC.

Thanks.

Joong Ho Won



.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Test Result
Date: Tue, 22 Jan 2002 13:14:24 -0800
Lines: 48
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Moh'd Saleem Saleem Alrawashdeh 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2663

It is just testing symbolic links to files. Please see the earlier posted
responses to how to handle symbolic links. Best, Xin


On Mon, 21 Jan 2002, Moh'd Saleem Saleem Alrawashdeh wrote:


> Hi,
> 
> I am posting this again since I didn't get a reply for my first post. Can
> anyone please tell me what this test means?
> 
> ===============
> 
>     * Test L.5: Special cases: Symbolic-link-to-file [out of 0.5]
> 
> [SUMMARY] NOT OK
> [RESULT]  Symbolic link to file in same directory did not transfer
> (wrong!)
> exit line said: ""
> ---
> Your output to stdout was:
> 
> OK: 14 bytes copied
> 
> ---
> 
> 
> ===============
> 
> I appreciate any clarification of what special case that this test is
> testing?
> 
> Thanks,
> 
> Moh'd
> 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: how to handle 
Date: Tue, 22 Jan 2002 13:35:18 -0800
Lines: 47
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Lin Lu 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2664

Hi,

> 1.What are we supposed to do with 

As the handout says, if the name is of the form 
should be used as the port number of the ftp server; otherwise, the
default ftp service port should be used.

> 2.This is from course web page.  Could anyone clarify why the results
> should like that?
> 
> ftpcopy ext 1 
> 
> 
>     12345 is the port at which the local ftp server is listening 
>     The permissionsDir looks like this: 
> 
>     .
>     ./a_zero.ext
>     ./d_normal.ext
>     ./c_dir.ext
>     ./e_dir.ext
>     ./e_dir.ext/f_dir.ext
>     ./g_filelink.ext -> ./d_normal.ext
>     ./h_dirlink.ext -> ./e_dir.ext
> 
>     After the transfer the results in localdir should look like this: 
> 
>     .
>     ./a_zero.ext
>     ./d_normal.ext
>     ./g_filelink.ext

Could you please specify where you don't understand?

Best,

Xin

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Zero byte files
Date: Tue, 22 Jan 2002 14:28:05 -0800
Lines: 19
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2665

Exactly. You are supposed to handle zero bype files in this way. Xin


On Tue, 22 Jan 2002, Luis Robles wrote:

> I think we are supposed to transfer files that match on
> the remote FTP server - even if they are size 0,
> 
> But, not create any 0 length files due to file-permission or
> transfer problems...

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: About level
Date: Tue, 22 Jan 2002 14:30:08 -0800
Lines: 46
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: BAEHOPIL 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2666

Please refer to the examples of levels in review session 1. Xin


On Tue, 22 Jan 2002, BAEHOPIL wrote:

> 
> It seems that I'm having some confusion about level number..
> 
> suppose this structure..
> 
> Root - F0
>         - D1 - F1
>         - D2 - D3 -F2
>         - D4 -  D5 - D6-F3
> 
> My understanding was that F0, D1, D2,D4 are level 0 entities,
>   F2,D3,D5 are level 1, F2,D6 are level 2...
> 
> So, if ftpcopy is called with level=1,  F0, D1,F1 will be copied..
>  ( assuming extension is right and there are no other files )
> With level=2, F0,D1,F1,D2,D3,F2 will be copied...
> 
> But, I got the following result, which seems to be saying that I copied more
> than necessary...
> 
> diff between expected tree and your tree:
> 19,22d18
> < ./examples/extex.ch
> < ./examples/wc-dos.ch
> < ./examples/wmer-os2.ch
> < ./examples/wmerg-pc.ch
> 
> Am I having some misunderstanding here?
> 
> 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: ftpcopy.purify reports FIU
Date: Tue, 22 Jan 2002 14:31:24 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2667

When I run ftpcopy.purify I get a FIU due to gethostbyname

FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
File info: ?r--r--r--  1 root root ...
This file descriptor was allocated from:
    __open64      [libc.so.1]
    _open64       [libc.so.1]
    _nsc_trydoorcall [libc.so.1]
    ...
    ...
    gethostbyname_r [gethostbyname_r.c]

What should I do?

I have one more question:
Do we have to issue a quit on the control connection before closing or
it's OK without that.

Thanks,
Dhawal Kumar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Can not submit test
Date: Tue, 22 Jan 2002 15:10:32 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2668

Please do a "touch .purify"
before submitting.

Regards,
Antonios.

Jinhui Pan wrote:

> I still can not submit test. This is the error message:
>
> ************************************************************************
> SubmitBase: /afs/ir/class/cs244a/submissions
> Debug Level = 0
> This is your submission 1 (out of 5) for today (1-20-2002)
> could not find any file matching .purify in
> /afs/ir.stanford.edu/users/j/i/jinhui/cs244a/hw1!!
> ======================================================================
> 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.
> ======================================================================
>
> Died at /afs/ir/class/cs244a/bin/submit_test.pl line 195.
> ***********************************************************************
>
> But I do have ftpcopy.purify in my folder. What's wrong with it?
>
> Thanks a lot!
> -jinhui

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: file separator
Date: Tue, 22 Jan 2002 15:34:46 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2669

Araik,

I'm not aware of a preprocessor definition for the file name separators.

http://www.scs.carleton.ca/~courses/101/Notes2001/pathnames.html
Here's a link that names a couple of differences between
Win and UNIX filenames, in case you're interested.

Regards,
Antonios.

Araik Grigoryan wrote:

> Hi,
>
> Does anyone know if there is some global string defined in a C library
> that contains a character that separates file names, e.g. "/" or "\"?
> Thanks.
>
> araik

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Test Functionality
Date: Tue, 22 Jan 2002 15:46:53 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2670


Hi Moh'd,

Your output at stderr should follow exactly the format described
in the assignment, both in the successful and the unsuccessful cases (OK or
ERR
cases).

Regards,
Antonios.


Moh'd Saleem Saleem Alrawashdeh wrote:

> Hi all,
>
> Anyone can tell me what is the required functionality of this test:
>
>  * Test I: User interface specification:  violates output format [out of
> 0.5]
>
> Thanks,
>
> Moh'd

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: file extensions.
Date: Tue, 22 Jan 2002 15:52:58 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2671

if you specify as your extention "gz" then that includes
the xxx.tar.gz since it is a zipped file!

Regards,
Antonios.

Hasan Taufiq Imam wrote:

> xxx.tar.gz an acceptable file if user specification is just
> .gz. Need clarification.
> Thanks,
> Hasan

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: broken pipe
Date: Tue, 22 Jan 2002 16:00:18 -0800
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2672


Debashis,

even though the site responds in a non-standard way,
your code should detect that the connection has already
been closed and not reach the point where you try to
write to a closed-connection socket (when you do that
you receive a SIGPIPE signal). It is up to you to decide
a) whether you want to detect such non-ftp servers by
counting on the SIGPIPE signal being sent and handling it
or b) by reading what the server responded and figuring out
it's not a correct ftpserver (by the standard).
The error message you receive in the report
didn't handle that and didn't manage to print the appropriate ERR code.

Regards,
Antonios.

Debashis Sahoo wrote:

> I am receiving following error from the automatic test script.
> I am getting broken pipe while calling write to socket in this case.
> Do we have to catch SIGPIPE signal in this case?
> How do we handle this case ...any ideas?
>
>     * Test I: User interface specification:  violates output format [out of
> 0.5]
>
> [SUMMARY] NOT OK
> [RESULT]
> test used: ftpcopy gz 2 epic11.stanford.edu localdir
> exit line said: ""
>
> Thanks,
> Sahoo

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Default remoteBaseDir ??
Date: Tue, 22 Jan 2002 16:03:07 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2673

Gaurav,
you can try sending a "PWD" command to receive the current
working directory the moment you first connect to the server.
for more info on PWD please read the rfc.

Regards,
Antonios.

Gaurav Garg wrote:

> This one for the TA's:
>
>    Can we assume the default remote server's base directory specified be
> always '/' or can default directory be any other directory in general?
>    The ftp servers mentioned in the problem statement all default to '/',
> so is this a rule or mere coincidence??
>
> -gaurav
>
> *************************************************************************
> Gaurav Garg                          * Contact Info: 20A Comstock Circle
> 1st Yr, Graduate Student             *       Escondido Village, Stanford
> Department of Electrical Engineering *       CA-94305
> Stanford University                  * Ph:650-498-1208
> *************************************************************************
>
> -Never ruin an apology with an excuse

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Debashis Sahoo" 
Newsgroups: su.class.cs244a
Subject: Re: broken pipe
Date: Tue, 22 Jan 2002 16:26:30 -0800
Lines: 61
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: dsahoo.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2674

When I printed following error message it says NOT OK.
I received following error message from the automatic test script.
Should we print any error message in this case?

   * Test I: User interface specification:  violates output format [out of
0.5]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy gz 2 epic11.stanford.edu localdir
exit line said: "ERROR : You can't FTP into this machine. FTP into
transfer.stanford.edu."
---
Program output:
ERROR : You can't FTP into this machine. FTP into transfer.stanford.edu.

---

Thanks,
Debashis

"SUL\AIR Laneroom Cluster"  wrote in message

>
> Debashis,
>
> even though the site responds in a non-standard way,
> your code should detect that the connection has already
> been closed and not reach the point where you try to
> write to a closed-connection socket (when you do that
> you receive a SIGPIPE signal). It is up to you to decide
> a) whether you want to detect such non-ftp servers by
> counting on the SIGPIPE signal being sent and handling it
> or b) by reading what the server responded and figuring out
> it's not a correct ftpserver (by the standard).
> The error message you receive in the report
> didn't handle that and didn't manage to print the appropriate ERR code.
>
> Regards,
> Antonios.
>
> Debashis Sahoo wrote:
>
> > I am receiving following error from the automatic test script.
> > I am getting broken pipe while calling write to socket in this case.
> > Do we have to catch SIGPIPE signal in this case?
> > How do we handle this case ...any ideas?
> >
> >     * Test I: User interface specification:  violates output format [out
of
> > 0.5]
> >
> > [SUMMARY] NOT OK
> > [RESULT]
> > test used: ftpcopy gz 2 epic11.stanford.edu localdir
> > exit line said: ""
> >
> > Thanks,
> > Sahoo
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: IMPORTANT CLARIFICATION: failure on ftp.slac.stanford.edu tests
Date: 23 Jan 2002 00:28:46 GMT
Lines: 27
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga3.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2675

Hello all,

A lot of people have been sending in emails to the staff stating that the
submit test script is reporting failures on various ftp.slac.stanford.edu,
such as TIMEOUT or exit line incorrect, or tree incorrect, etc.

Note that the script determines these errors by examining the output of a
single program run. In particular, if this test does not terminate in
TIMEOUT time, it is highly likely that all the remaining tests will fail.  
Since this is a relatively deep recursion, the time limit is imposed to
penalize programs with poor performance. Alternatively, programs that hang
or recurse will force the program to be abnormally terminated as well.

If you see a TIMEOUT error for a given test, please look into what could 
be causing this. Two things to consider:

a) Do you read data from the socket when there is no data available (i.e., 
expecting a reply when there should be none)? This will hang your process

b) During directory recursion, do you ignore the "." and ".." entries? 
Some, not all, ftp servers return these as directory names as part of the 
LIST response. Among these is ftp.slac.stanford.edu.

Good luck,

Arun

.

Path: shelby.stanford.edu!nntp.stanford.edu!spevack.Stanford.EDU!spevack
From: Max Spevack 
Newsgroups: su.class.cs244a
Subject: Not getting response from QUIT
Date: Tue, 22 Jan 2002 16:29:24 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: spevack.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2676

Hi,

This may seem silly, but for some reason I can't get my program to print
out the response from the server after I issue the QUIT command.  Other
server responses are printed out fine, but QUIT never seems to come
through.

Any ideas?

Thanks,
Max


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links and File Extensions
Date: Tue, 22 Jan 2002 16:33:57 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2677

Pete,
a symbolic link to a file of interest (because of the file's extention) should
always be followed and treated as a local file, i.e. should be copied. The idea
of the ftpclient
is to make local copies of particular files of interest. Symbolic links aren't
particularly interesting files since copying them locally may create dangling
references.

So, the answer is yes to the first, no to the second!

Regards,
Antonios.


Pete Belknap wrote:

> What should we do when the symbolic link has a diff extension than the file
> it points to?
>
> So, for example, if we want to download .txt files and we have the link
>
> link.lnk  ->  readme.txt
>
> Should we download it?  Of course, the opposite question is, if we are
> interested in files of extension .lnk, should we download the link?  It
> seems to me that the answer to my first question should be no and the second
> should be yes...
>
> thanks,
> Pete

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: broken pipe
Date: Tue, 22 Jan 2002 16:37:25 -0800
Lines: 68
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2678

Please try to print "ERROR: " before your message. Please notice the exact
format required from the assignment.

Regards,
Antonios.

Debashis Sahoo wrote:

> When I printed following error message it says NOT OK.
> I received following error message from the automatic test script.
> Should we print any error message in this case?
>
>    * Test I: User interface specification:  violates output format [out of
> 0.5]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy gz 2 epic11.stanford.edu localdir
> exit line said: "ERROR : You can't FTP into this machine. FTP into
> transfer.stanford.edu."
> ---
> Program output:
> ERROR : You can't FTP into this machine. FTP into transfer.stanford.edu.
>
> ---
>
> Thanks,
> Debashis
>
> "SUL\AIR Laneroom Cluster"  wrote in message
> 
> >
> > Debashis,
> >
> > even though the site responds in a non-standard way,
> > your code should detect that the connection has already
> > been closed and not reach the point where you try to
> > write to a closed-connection socket (when you do that
> > you receive a SIGPIPE signal). It is up to you to decide
> > a) whether you want to detect such non-ftp servers by
> > counting on the SIGPIPE signal being sent and handling it
> > or b) by reading what the server responded and figuring out
> > it's not a correct ftpserver (by the standard).
> > The error message you receive in the report
> > didn't handle that and didn't manage to print the appropriate ERR code.
> >
> > Regards,
> > Antonios.
> >
> > Debashis Sahoo wrote:
> >
> > > I am receiving following error from the automatic test script.
> > > I am getting broken pipe while calling write to socket in this case.
> > > Do we have to catch SIGPIPE signal in this case?
> > > How do we handle this case ...any ideas?
> > >
> > >     * Test I: User interface specification:  violates output format [out
> of
> > > 0.5]
> > >
> > > [SUMMARY] NOT OK
> > > [RESULT]
> > > test used: ftpcopy gz 2 epic11.stanford.edu localdir
> > > exit line said: ""
> > >
> > > Thanks,
> > > Sahoo
> >

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Other files in directory.
Date: Tue, 22 Jan 2002 17:11:41 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2679


you should copy all permissible files in a remote directory,
OVERWRITING any old ones in the local directory. Your
code should make sure no extra files exist in the new, local tree you're
trying to create.


Regards,
Antonios.


Hasan Taufiq Imam wrote:

> Please, clarify.
> In case of non-empty local directory do we delete files or directories
> as required or do we delete everything.
> In other words, can the local directory contain any files or directories other
> than the tree copied from the remote server.
>
> I still don't know if the user specifies extension gz, is tar.gz a valid
> extension or not.
> Thanks.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Lakshman Sundar Maddali 
Newsgroups: su.class.cs244a
Subject: CheckSum Errors
Date: Tue, 22 Jan 2002 17:13:30 -0800
Lines: 34
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic0.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2680

Hi,

   when I run submit_test against my code i get checksum errors and all
files not transferred errors,( when the program is run against
204.123.2.2 server especially) . Also later in the report it says that
this process got killed due to TIMEOUT. 
could it be because of the program being killed, i am getting the
checksum errors.
 
I wanted to know what is the TIMEOUT value that the testing program is
configured to, so that i can try with that settings locally. 

Thanks
~
Lakshman Maddali
-----------------------------------------------------------------------------
 Test G: Transfers all of the matching files, but bad file checksum [out
of 1]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: ""
---
diff between expected tree and your tree:
4c4,8
< ./kermit/c/mac.tar.Z 3663175723 5840
---
> ./kermit/c/mac.tar.Z 2459747744 496551
> ./kermit/c/os2.tar.Z 2771080586 163808
> ./kermit/c/os9.tar.Z 370278796 49438
> ./kermit/c/unix.tar.Z 308104872 349221
> ./kermit/c/vms.tar.Z 53741681 64755

-----------------------------------------------------------------------------
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: error cleanup
Date: Tue, 22 Jan 2002 17:13:49 -0800
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2681

Yes, your code should handle exceptional cases as normal.
ie. deallocate memory and close sockets when done w/ them, etc.
Of course, please don't forget the required output message!
Regards,
Antonios.

Jason Ahmad wrote:

> What action, exactly, are we to take on general error cases (can't
> allocate socket, can't make connection etc)? It is clear we are to write
> a brief explaination to stderr and exit, but are we to free malloced
> memory and make sure all sockets are closed and whatnot?
>
> Thanks,
> Jason

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: location of testing dir
Date: Tue, 22 Jan 2002 17:17:14 -0800
Lines: 21
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2682

Hello Ambika,
those directories are your responsibility to find and use.
You can create them from scratch or use preexisting ones.
Please be careful not to overwrite any useful data with your
ftp client, as your code is required to overwrite existing files!

Regards,
Antonios.

Ambika Balakrishnan wrote:

> Hello,
>
> In the handout "Testing homework 1" there are 6 examples and I dont know
> how to run examples 1 and 2, which refer to a permissionsDir and an
> exampleDir. Where are these directories? Am I supposed to create them? Am
> I supposed to run the supplied ftpd for these examples?
>
> Thanks,
> Ambika

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Link to Dir
Date: Tue, 22 Jan 2002 17:27:14 -0800
Lines: 39
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2683


Hi Jian,

Yes, your code should be written in such a way that no
file is downloaded more than once. Cases with symlinks
to the current directory or to parent directories that you've
already processed are troublesome cases that you need
to take care of, in order to avoid downloading twice a file.

Regards,
Antonios.

Jian Deng wrote:

> I have question on the following test case
> special cases: Symbolic-link-to-directory [out of 0.5]
>
> [SUMMARY] NOT OK
> [RESULT]  Symbolic link to directory in same directory did transfer (wrong!)
> exit line said: ""
> ---
> Your output to stdout was:
> OK: 14 bytes copied
>
> Is this test case testing a transfer should not
> happen to a symbolic link to the same dir that has already
> been transfered?
>
> I am wondering how can we prevent that with out parsing the
> actual output of the list which varies with ftp servers..
> and PWD will not give you the actual path.
>
> Does this test case also imply we should handle cycles and not transfer
> dirs already been transfered?
>
> Your clarification is appreciated.
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: User Interface violation ...
Date: Tue, 22 Jan 2002 17:29:43 -0800
Lines: 27
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2684

Please check your posting from yesterday, 'cause
I've already suggested what could be wrong.
Regards,
Antonios.

Debashis Sahoo wrote:

> Hi,
>     I received following error.
> What should be the output? Any ideas.....?
>
>     * Test I: User interface specification:  violates output format [out of
> 0.5]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy gz 2 epic11.stanford.edu localdir
> exit line said: "ERROR : You can't FTP into this machine. FTP into
> transfer.stanford.edu."
> ---
> Program output:
> ERROR : You can't FTP into this machine. FTP into transfer.stanford.edu.
>
> ---
>
> Thanks,
> Sahoo

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: proper RETR and LIST behavior
Date: Tue, 22 Jan 2002 17:33:12 -0800
Lines: 41
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2685


Joong,
here's the part of the RFC that explains RETR:

       RETRIEVE (RETR)

            This command causes the server-DTP to transfer a copy of the
            file, specified in the pathname, to the server- or user-DTP
            at the other end of the data connection.  The status and
            contents of the file at the server site shall be unaffected.


Please keep in mind that a pathname and a filename are indeed different!
Regards,
Antonios.

Joong Ho Won wrote:

> Hello,
>
> I wonder if RETR command can take an absoulte/relative path to a file as an
> argument. i.e.,
>
> RETR /a/path/to/a/file
>
> rather than having just a filename, i.e.,
>
> RETR file
>
> RFC doesn't seem to specify this case.
>
> Some ftp(ex. ftp.stanford.edu ) seems not to allow the former case, but
> others(ex. transfer.stanford.edu ) seems to.
>
> I'd like to make it clear for LIST for the same case as well, though it
> seems to be allowed seeing RFC.
>
> Thanks.
>
> Joong Ho Won

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy.purify reports FIU
Date: Tue, 22 Jan 2002 17:40:41 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2686

Dhawal,

out of courtesy to the server, please do use QUIT as it is mentioned
in the RFC :-)

The FileInUse problem sounds like nothing to do with your code.
It could be a transient name-server error, but I'm not sure.
Please check the args to gethostbyname to make sure.

Regards,
Antonios.

Dhawal Kumar wrote:

> When I run ftpcopy.purify I get a FIU due to gethostbyname
>
> FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
> File info: ?r--r--r--  1 root root ...
> This file descriptor was allocated from:
>     __open64      [libc.so.1]
>     _open64       [libc.so.1]
>     _nsc_trydoorcall [libc.so.1]
>     ...
>     ...
>     gethostbyname_r [gethostbyname_r.c]
>
> What should I do?
>
> I have one more question:
> Do we have to issue a quit on the control connection before closing or
> it's OK without that.
>
> Thanks,
> Dhawal Kumar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Not getting response from QUIT
Date: Tue, 22 Jan 2002 17:43:01 -0800
Lines: 38
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2687


Hi Max,

here's what the RFC says about QUIT:

         LOGOUT (QUIT)

            This command terminates a USER and if file transfer is not
            in progress, the server closes the control connection.  If
            file transfer is in progress, the connection will remain
            open for result response and the server will then close it.
            If the user-process is transferring files for several USERs
            but does not wish to close and then reopen connections for
            each, then the REIN command should be used instead of QUIT.

            An unexpected close on the control connection will cause the
            server to take the effective action of an abort (ABOR) and a
            logout (QUIT).

Please check that your transfers are over before doing a quit.

Regards,
Antonios.

Max Spevack wrote:

> Hi,
>
> This may seem silly, but for some reason I can't get my program to print
> out the response from the server after I issue the QUIT command.  Other
> server responses are printed out fine, but QUIT never seems to come
> through.
>
> Any ideas?
>
> Thanks,
> Max

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links and File Extensions
Date: Tue, 22 Jan 2002 17:43:12 -0800
Lines: 60
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2688

Excerpt from a previous posting:

<snip>
Correct.


On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:

> Well, we download 'regular files', and recurse into subdirectories.  And
> you seem to be saying to do both here.  So just to confirm:
>
> * If a symlink is pointing to a regular file, download the file, and
> name it with the name of the symlink.

</snip>

This means if we are interested in txt files and we download link.lnk
(as you suggest) the name on the local dir should be link.lnk whose
extension is not txt. Is this acceptable? I thought that all files on
local dir should have the ext specified.

Dhawal Kumar



On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:

> Pete,
> a symbolic link to a file of interest (because of the file's extention) should
> always be followed and treated as a local file, i.e. should be copied. The idea
> of the ftpclient
> is to make local copies of particular files of interest. Symbolic links aren't
> particularly interesting files since copying them locally may create dangling
> references.
>
> So, the answer is yes to the first, no to the second!
>
> Regards,
> Antonios.
>
>
> Pete Belknap wrote:
>
> > What should we do when the symbolic link has a diff extension than the file
> > it points to?
> >
> > So, for example, if we want to download .txt files and we have the link
> >
> > link.lnk  ->  readme.txt
> >
> > Should we download it?  Of course, the opposite question is, if we are
> > interested in files of extension .lnk, should we download the link?  It
> > seems to me that the answer to my first question should be no and the second
> > should be yes...
> >
> > thanks,
> > Pete
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: empty files
Date: Tue, 22 Jan 2002 17:46:02 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma14.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2689


Abhishek,
please refer to theposting regarding empty files (Tue, 22nd)
for useful comments.

Regards,
Antonios.

Abhishek Das wrote:

> hi
>
> I am trying to transfer empty files using ftpd and i am being successful
> in doing so i.e no file created.
> However, the test script says that I transferred 7 bytes on two
> occassions. Can anyone suggest how di I test this? as i said, using ftpd
> says i am OK.
>
> thanks
> abhishek
>
> Abhishek Das
> Graduate Research Assistant
> Computer Systems Lab
> Stanford University
>
> Address:-
> Escondido Village 33B
> Stanford CA 94305

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine31.Stanford.EDU!htimam
From:  (Hasan Taufiq Imam)
Newsgroups: su.class.cs244a
Subject: Removing directory recursively.
Date: 23 Jan 2002 01:46:34 GMT
Organization: Stanford University, CA 94305, USA
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine31.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2690

If a directory with the same name as a remote directory exists in your 
local dir you are supposed to recursively remove it and then create the 
directory. After investigating quite a bit, I could not find any graceful 
way to remove directory recursively. Other than recursive call to rmdir,
remove,chdir. So I opted for system() call. 
Hopefully this is an acceptable solution.

Hasan
.

Path: shelby.stanford.edu!nntp.stanford.edu!fable12.Stanford.EDU!ggaurav
From: Gaurav Garg 
Newsgroups: su.class.cs244a
Subject: ftpd deamon
Date: Tue, 22 Jan 2002 18:02:21 -0800
Lines: 40
Distribution: su
Message-ID: 
NNTP-Posting-Host: fable12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2691


This is a question on ftpd provided for testing:

* The ftpd provides a port number on which to connect to for running ass1.

* Now is this port number in network byte order?

The issue is that if this number is not in network byte order then we can
have problem in following case.

Suppose there are two machines:

Machine A: little endian

Machine B: big endian (same as network byte order)

Now we run ftpd on machine A. It will throw out a port which is used on
machine B for running ass1, assumed to be in A's byte order, i.e. little
endian.

Now the machine B does not know what byte order does machine A comply to.
So there is no way for it to know to convert from what to network(a simple
htons() wont work).

So is it true that the provided byte order is infact network byte order!!
I could not test it myself as I dont have access to a little endian
machine, and in case it is not can we assume that our code wont be tested
against the cases like one specified above??


-gaurav
*************************************************************************
Gaurav Garg                          * Contact Info: 20A Comstock Circle
1st Yr, Graduate Student             *       Escondido Village, Stanford
Department of Electrical Engineering *       CA-94305
Stanford University                  * Ph:650-498-1208
*************************************************************************

-Never ruin an apology with an excuse

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Any graceful way of figuring out open descriptors
Date: Tue, 22 Jan 2002 18:36:35 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2692

My program closes all the descriptors if it terminates normally. But in
case of unexpected termination - say due to signal I am unable to close
the open descriptors. Is there a way of figuring out the open descriptors
in such a case?

Dhawal Kumar

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga11.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: TEST script problem
Date: Tue, 22 Jan 2002 19:44:07 -0800
Lines: 101
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2693

hi

This is the second time I got this problem out of all my prior
submissions. Please take a look. I had earlier mailed Antonios regarding
this.

I have checked that the tree made my me and as reported below should be
the expected tree (by connecting to the machine). Also the checksum part
is correct since I have compared the actual file sizes and the bytes I
copied to create the files in my machine. BTW, i am working from
saga22.stanford.edu.

thanks
abhishek

THE PROBLEM:-

===============

    * Test D: Connects to server but does not transfer any matching files
in the specified
      levels [out of 3.5]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: ""
---
Program output:

---

===============

    * Test F.1: Connects, but does not transfer all the matching files in
the top level [out of 1]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: ""
---
diff between expected tree and your tree:
0a1,2
> ./xcmalt.tar.Z
> ./xcomm.tar.Z

---


===============

    * Test F.2: Does not transfer all of the matching files in the first
level down to the
      last specified level [out of 1]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: ""
---
diff between expected tree and your tree:
0a1,10
> ./kermit/c/all.tar.Z
> ./kermit/c/amiga.tar.Z
> ./kermit/c/dg.tar.Z
> ./kermit/c/mac.tar.Z
> ./kermit/c/os2.tar.Z
> ./kermit/c/os9.tar.Z
> ./kermit/c/unix.tar.Z
> ./kermit/c/vms.tar.Z
> ./xcmalt.tar.Z
> ./xcomm.tar.Z

---


===============

    * Test G: Transfers all of the matching files, but bad file checksum
[out of 1]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: ""
---
diff between expected tree and your tree:
0a1,10
> ./kermit/c/all.tar.Z 2606058765 72935
> ./kermit/c/amiga.tar.Z 1017293024 135815
> ./kermit/c/dg.tar.Z 2560791635 406317
> ./kermit/c/mac.tar.Z 2459747744 496551
> ./kermit/c/os2.tar.Z 2771080586 163808
> ./kermit/c/os9.tar.Z 370278796 49438
> ./kermit/c/unix.tar.Z 308104872 349221
> ./kermit/c/vms.tar.Z 53741681 64755
> ./xcmalt.tar.Z 536156530 96993
> ./xcomm.tar.Z 2692844690 64389

---

===============


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Hasan Taufiq Imam 
Newsgroups: su.class.cs244a
Subject: ftp.microsoft.com
Date: Tue, 22 Jan 2002 19:51:27 -0800
Lines: 7
Distribution: su
Message-ID: 
Reply-To: 
NNTP-Posting-Host: elaine31.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2694

I have been submitting my code for testing and everything was passing.
Now suddenly transfer from ftp.microsoft.com is failing.
So is for symbolic link to file?
Both of them can be due to timeout of 15s. The script does not tell
us if symbolic link to file is being copied from ftp.mirosoft.com
also. Can somebody with access to the script,please let me know if 
this is the case!
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Problem Set #2 Question1
Date: Tue, 22 Jan 2002 19:57:01 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2695

 Hi,

   I was wondering if, in allocating subnets for University A, do we account
for future growth?  Such as, "we may add another router off of R2" or can
we assume the number of routers and interfaces will remain static? As
always, any comments, tips, thoughs, suggestions etc. are greatly appreciated.
:-)

                    ~~martin

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Timothy Tay Chao 
Newsgroups: su.class.cs244a
Subject: Re: CheckSum Errors
Date: Tue, 22 Jan 2002 20:11:06 -0800
Lines: 69
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth8.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2696

I'm having the same problem with the submit script for the 204.123.2.2
server, except I don't get a TIMEOUT error.

-----------------------------------------------------------------------------
* Test F.2: Does not transfer all of the matching files in the first
level down to the 
      last specified level [out of 1]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
exit line said: ""
---
diff between expected tree and your tree:
5,8d4
< ./kermit/c/os2.tar.Z
< ./kermit/c/os9.tar.Z
< ./kermit/c/unix.tar.Z
< ./kermit/c/vms.tar.Z

------------------------------------------------------------------------------

However, when i try my program myself, I do get the files that the
script says I'm missing. When I logged onto the server manually (not
using my program), I notced that it was extremely  slow. It took me >3
seconds to get responses to LIST and CWD commands. I'm tempted to blame
the script TIMEOUT, but since I'm not getting a TIMEOUT in my results
I'm a bit confused. Is it possible for the script to be timing out, but
not telling me?

Thanks,
Tim


Lakshman Sundar Maddali wrote:
> 
> Hi,
> 
>    when I run submit_test against my code i get checksum errors and all
> files not transferred errors,( when the program is run against
> 204.123.2.2 server especially) . Also later in the report it says that
> this process got killed due to TIMEOUT.
> could it be because of the program being killed, i am getting the
> checksum errors.
> 
> I wanted to know what is the TIMEOUT value that the testing program is
> configured to, so that i can try with that settings locally.
> 
> Thanks
> ~
> Lakshman Maddali
> -----------------------------------------------------------------------------
>  Test G: Transfers all of the matching files, but bad file checksum [out
> of 1]
> 
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> exit line said: ""
> ---
> diff between expected tree and your tree:
> 4c4,8
> < ./kermit/c/mac.tar.Z 3663175723 5840
> ---
> > ./kermit/c/mac.tar.Z 2459747744 496551
> > ./kermit/c/os2.tar.Z 2771080586 163808
> > ./kermit/c/os9.tar.Z 370278796 49438
> > ./kermit/c/unix.tar.Z 308104872 349221
> > ./kermit/c/vms.tar.Z 53741681 64755
> 
> -----------------------------------------------------------------------------
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Henry Fu" 
Newsgroups: su.class.cs244a
Subject: Re: TEST script problem
Date: Tue, 22 Jan 2002 20:47:25 -0800
Lines: 113
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: bernese.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2697

I'm having a similar problem. The test script says I am failing the test,
but when I run my program manually, I did get all of the tree with each file
having the correct file size. I'm not sure what happened!

-Henry



"Abhishek Das"  wrote in message

> hi
>
> This is the second time I got this problem out of all my prior
> submissions. Please take a look. I had earlier mailed Antonios regarding
> this.
>
> I have checked that the tree made my me and as reported below should be
> the expected tree (by connecting to the machine). Also the checksum part
> is correct since I have compared the actual file sizes and the bytes I
> copied to create the files in my machine. BTW, i am working from
> saga22.stanford.edu.
>
> thanks
> abhishek
>
> THE PROBLEM:-
>
> ===============
>
>     * Test D: Connects to server but does not transfer any matching files
> in the specified
>       levels [out of 3.5]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> exit line said: ""
> ---
> Program output:
>
> ---
>
> ===============
>
>     * Test F.1: Connects, but does not transfer all the matching files in
> the top level [out of 1]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> exit line said: ""
> ---
> diff between expected tree and your tree:
> 0a1,2
> > ./xcmalt.tar.Z
> > ./xcomm.tar.Z
>
> ---
>
>
> ===============
>
>     * Test F.2: Does not transfer all of the matching files in the first
> level down to the
>       last specified level [out of 1]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> exit line said: ""
> ---
> diff between expected tree and your tree:
> 0a1,10
> > ./kermit/c/all.tar.Z
> > ./kermit/c/amiga.tar.Z
> > ./kermit/c/dg.tar.Z
> > ./kermit/c/mac.tar.Z
> > ./kermit/c/os2.tar.Z
> > ./kermit/c/os9.tar.Z
> > ./kermit/c/unix.tar.Z
> > ./kermit/c/vms.tar.Z
> > ./xcmalt.tar.Z
> > ./xcomm.tar.Z
>
> ---
>
>
> ===============
>
>     * Test G: Transfers all of the matching files, but bad file checksum
> [out of 1]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> exit line said: ""
> ---
> diff between expected tree and your tree:
> 0a1,10
> > ./kermit/c/all.tar.Z 2606058765 72935
> > ./kermit/c/amiga.tar.Z 1017293024 135815
> > ./kermit/c/dg.tar.Z 2560791635 406317
> > ./kermit/c/mac.tar.Z 2459747744 496551
> > ./kermit/c/os2.tar.Z 2771080586 163808
> > ./kermit/c/os9.tar.Z 370278796 49438
> > ./kermit/c/unix.tar.Z 308104872 349221
> > ./kermit/c/vms.tar.Z 53741681 64755
> > ./xcmalt.tar.Z 536156530 96993
> > ./xcomm.tar.Z 2692844690 64389
>
> ---
>
> ===============
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga21.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: Re: TEST script problem
Date: Tue, 22 Jan 2002 21:14:07 -0800
Lines: 135
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2698


I didn't get any TIMEOUT.
I had this problem in one of my earlier submissions with the same server,
but after that all my
submissions passed this test, until ofcourse my last submission. I wonder
what is happening.

abhishek

On Tue, 22 Jan 2002, Henry Fu wrote:

> I'm having a similar problem. The test script says I am failing the test,
> but when I run my program manually, I did get all of the tree with each file
> having the correct file size. I'm not sure what happened!
>
> -Henry
>
>
>
> "Abhishek Das"  wrote in message
> 
> > hi
> >
> > This is the second time I got this problem out of all my prior
> > submissions. Please take a look. I had earlier mailed Antonios regarding
> > this.
> >
> > I have checked that the tree made my me and as reported below should be
> > the expected tree (by connecting to the machine). Also the checksum part
> > is correct since I have compared the actual file sizes and the bytes I
> > copied to create the files in my machine. BTW, i am working from
> > saga22.stanford.edu.
> >
> > thanks
> > abhishek
> >
> > THE PROBLEM:-
> >
> > ===============
> >
> >     * Test D: Connects to server but does not transfer any matching files
> > in the specified
> >       levels [out of 3.5]
> >
> > [SUMMARY] NOT OK
> > [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> > exit line said: ""
> > ---
> > Program output:
> >
> > ---
> >
> > ===============
> >
> >     * Test F.1: Connects, but does not transfer all the matching files in
> > the top level [out of 1]
> >
> > [SUMMARY] NOT OK
> > [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> > exit line said: ""
> > ---
> > diff between expected tree and your tree:
> > 0a1,2
> > > ./xcmalt.tar.Z
> > > ./xcomm.tar.Z
> >
> > ---
> >
> >
> > ===============
> >
> >     * Test F.2: Does not transfer all of the matching files in the first
> > level down to the
> >       last specified level [out of 1]
> >
> > [SUMMARY] NOT OK
> > [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> > exit line said: ""
> > ---
> > diff between expected tree and your tree:
> > 0a1,10
> > > ./kermit/c/all.tar.Z
> > > ./kermit/c/amiga.tar.Z
> > > ./kermit/c/dg.tar.Z
> > > ./kermit/c/mac.tar.Z
> > > ./kermit/c/os2.tar.Z
> > > ./kermit/c/os9.tar.Z
> > > ./kermit/c/unix.tar.Z
> > > ./kermit/c/vms.tar.Z
> > > ./xcmalt.tar.Z
> > > ./xcomm.tar.Z
> >
> > ---
> >
> >
> > ===============
> >
> >     * Test G: Transfers all of the matching files, but bad file checksum
> > [out of 1]
> >
> > [SUMMARY] NOT OK
> > [RESULT]  test used: ftpcopy Z 2 204.123.2.2 localdir /pub/comm
> > exit line said: ""
> > ---
> > diff between expected tree and your tree:
> > 0a1,10
> > > ./kermit/c/all.tar.Z 2606058765 72935
> > > ./kermit/c/amiga.tar.Z 1017293024 135815
> > > ./kermit/c/dg.tar.Z 2560791635 406317
> > > ./kermit/c/mac.tar.Z 2459747744 496551
> > > ./kermit/c/os2.tar.Z 2771080586 163808
> > > ./kermit/c/os9.tar.Z 370278796 49438
> > > ./kermit/c/unix.tar.Z 308104872 349221
> > > ./kermit/c/vms.tar.Z 53741681 64755
> > > ./xcmalt.tar.Z 536156530 96993
> > > ./xcomm.tar.Z 2692844690 64389
> >
> > ---
> >
> > ===============
> >
> >
>
>
>

Abhishek Das
Graduate Research Assistant
Computer Systems Lab
Stanford University

Address:-
Escondido Village 33B
Stanford CA 94305

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: how to find name of file a link is pointing to
Date: Tue, 22 Jan 2002 21:29:30 -0800
Lines: 58
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2699

if a link l1.lnk points to a file a.txt how do we detect the name of the
file? the response of LIST contains this, but ftpparse just returns the
name of the link.
how then can we figure out that since we are interested in .txt files, we
should also download a file pointed to by a .lnk link?

please clarify! i am really confused!
thanks,
ashmi


On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:

> Pete,
> a symbolic link to a file of interest (because of the file's extention) should
> always be followed and treated as a local file, i.e. should be copied. The idea
> of the ftpclient
> is to make local copies of particular files of interest. Symbolic links aren't
> particularly interesting files since copying them locally may create dangling
> references.
>
> So, the answer is yes to the first, no to the second!
>
> Regards,
> Antonios.
>
>
> Pete Belknap wrote:
>
> > What should we do when the symbolic link has a diff extension than the file
> > it points to?
> >
> > So, for example, if we want to download .txt files and we have the link
> >
> > link.lnk  ->  readme.txt
> >
> > Should we download it?  Of course, the opposite question is, if we are
> > interested in files of extension .lnk, should we download the link?  It
> > seems to me that the answer to my first question should be no and the second
> > should be yes...
> >
> > thanks,
> > Pete
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!homa
From: Alex Khomenko 
Newsgroups: su.class.cs244a
Subject: Re: Duplicate Files and Circularities
Date: Tue, 22 Jan 2002 21:31:45 -0800
Lines: 56
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2700


Detecting that two symbolic links in the server file system point to the
same file and transfering it only once, or detecting that server has a
loop in its directory structure (symlink to parent) are not required by
the assignment handout. I would consider this answer with a grain of
doubt.

Alex

On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:

>
> Hi Jian,
>
> Yes, your code should be written in such a way that no
> file is downloaded more than once. Cases with symlinks
> to the current directory or to parent directories that you've
> already processed are troublesome cases that you need
> to take care of, in order to avoid downloading twice a file.
>
> Regards,
> Antonios.
>
> Jian Deng wrote:
>
> > I have question on the following test case
> > special cases: Symbolic-link-to-directory [out of 0.5]
> >
> > [SUMMARY] NOT OK
> > [RESULT]  Symbolic link to directory in same directory did transfer (wrong!)
> > exit line said: ""
> > ---
> > Your output to stdout was:
> > OK: 14 bytes copied
> >
> > Is this test case testing a transfer should not
> > happen to a symbolic link to the same dir that has already
> > been transfered?
> >
> > I am wondering how can we prevent that with out parsing the
> > actual output of the list which varies with ftp servers..
> > and PWD will not give you the actual path.
> >
> > Does this test case also imply we should handle cycles and not transfer
> > dirs already been transfered?
> >
> > Your clarification is appreciated.
> >
> >
>
>

-- 
Knowledge is a deadly friend when no one sets the rules.
The fate of all mankind I see is in the hands of fools. (KC "Epitaph")

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!homa
From: Alex Khomenko 
Newsgroups: su.class.cs244a
Subject: Re: how to find name of file a link is pointing to
Date: Tue, 22 Jan 2002 21:34:44 -0800
Lines: 75
Distribution: su
Message-ID: 
References:  
 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2701


Here is my humble opinion: the name of the file to which the link is
pointing does not matter. For all practical purposes the name of the link
is the name of the file you RETRieve and write locally. The .lnk example
is confusing since on UNIX symlinks are not required to have a specific
extension.

Alex

On Tue, 22 Jan 2002, Ashmi wrote:

> if a link l1.lnk points to a file a.txt how do we detect the name of the
> file? the response of LIST contains this, but ftpparse just returns the
> name of the link.
> how then can we figure out that since we are interested in .txt files, we
> should also download a file pointed to by a .lnk link?
>
> please clarify! i am really confused!
> thanks,
> ashmi
>
>
> On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
>
> > Pete,
> > a symbolic link to a file of interest (because of the file's extention) should
> > always be followed and treated as a local file, i.e. should be copied. The idea
> > of the ftpclient
> > is to make local copies of particular files of interest. Symbolic links aren't
> > particularly interesting files since copying them locally may create dangling
> > references.
> >
> > So, the answer is yes to the first, no to the second!
> >
> > Regards,
> > Antonios.
> >
> >
> > Pete Belknap wrote:
> >
> > > What should we do when the symbolic link has a diff extension than the file
> > > it points to?
> > >
> > > So, for example, if we want to download .txt files and we have the link
> > >
> > > link.lnk  ->  readme.txt
> > >
> > > Should we download it?  Of course, the opposite question is, if we are
> > > interested in files of extension .lnk, should we download the link?  It
> > > seems to me that the answer to my first question should be no and the second
> > > should be yes...
> > >
> > > thanks,
> > > Pete
> >
> >
>
> ###############################################################################
>
> 				ASHMI CHOKSHI
> Graduate Student				    141L Escondido Village
> Dept. of Computer Science			    Stanford University
> Stanford University				    Stanford Ca 94305
> Stanford Ca 94305				    (650)498-1103
>
> ###############################################################################
>
>
>
>

-- 
Knowledge is a deadly friend when no one sets the rules.
The fate of all mankind I see is in the hands of fools. (KC "Epitaph")

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: how to find name of file a link is pointing to
Date: Tue, 22 Jan 2002 21:50:55 -0800
Lines: 112
Distribution: su
Message-ID: 
References:  
 
 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2702

my idea exactly.
but the earlier mail exchange between pete and antonios confuses me.
pete's questiion:
> So, for example, if we want to download .txt files and we have the
>link   link.lnk  ->  readme.txt
> Should we download it?  Of course, the opposite question is, if we
>are interested in files of extension .lnk, should we download the
>link?  It
> seems to me that the answer to my first question should be no and
>the second
> should be yes...

antonios replied:
>So, the answer is yes to the first, no to the second!

ideas anyone? i cant figure out how to find the name of the file the link
points to
thanks,
ashmi


On Tue, 22 Jan 2002, Alex Khomenko wrote:

>
> Here is my humble opinion: the name of the file to which the link is
> pointing does not matter. For all practical purposes the name of the link
> is the name of the file you RETRieve and write locally. The .lnk example
> is confusing since on UNIX symlinks are not required to have a specific
> extension.
>
> Alex
>
> On Tue, 22 Jan 2002, Ashmi wrote:
>
> > if a link l1.lnk points to a file a.txt how do we detect the name of the
> > file? the response of LIST contains this, but ftpparse just returns the
> > name of the link.
> > how then can we figure out that since we are interested in .txt files, we
> > should also download a file pointed to by a .lnk link?
> >
> > please clarify! i am really confused!
> > thanks,
> > ashmi
> >
> >
> > On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
> >
> > > Pete,
> > > a symbolic link to a file of interest (because of the file's extention) should
> > > always be followed and treated as a local file, i.e. should be copied. The idea
> > > of the ftpclient
> > > is to make local copies of particular files of interest. Symbolic links aren't
> > > particularly interesting files since copying them locally may create dangling
> > > references.
> > >
> > > So, the answer is yes to the first, no to the second!
> > >
> > > Regards,
> > > Antonios.
> > >
> > >
> > > Pete Belknap wrote:
> > >
> > > > What should we do when the symbolic link has a diff extension than the file
> > > > it points to?
> > > >
> > > > So, for example, if we want to download .txt files and we have the link
> > > >
> > > > link.lnk  ->  readme.txt
> > > >
> > > > Should we download it?  Of course, the opposite question is, if we are
> > > > interested in files of extension .lnk, should we download the link?  It
> > > > seems to me that the answer to my first question should be no and the second
> > > > should be yes...
> > > >
> > > > thanks,
> > > > Pete
> > >
> > >
> >
> > ###############################################################################
> >
> > 				ASHMI CHOKSHI
> > Graduate Student				    141L Escondido Village
> > Dept. of Computer Science			    Stanford University
> > Stanford University				    Stanford Ca 94305
> > Stanford Ca 94305				    (650)498-1103
> >
> > ###############################################################################
> >
> >
> >
> >
>
> --
> Knowledge is a deadly friend when no one sets the rules.
> The fate of all mankind I see is in the hands of fools. (KC "Epitaph")
>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Removing directory recursively.
Date: Tue, 22 Jan 2002 22:07:16 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Hasan Taufiq Imam 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2703

You can use system() call. Xin


On 23 Jan 2002, Hasan Taufiq Imam wrote:

> If a directory with the same name as a remote directory exists in your 
> local dir you are supposed to recursively remove it and then create the 
> directory. After investigating quite a bit, I could not find any graceful 
> way to remove directory recursively. Other than recursive call to rmdir,
> remove,chdir. So I opted for system() call. 
> Hopefully this is an acceptable solution.
> 
> Hasan
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: Problem Set #2 Question1
Date: Tue, 22 Jan 2002 22:13:04 -0800
Organization: Stanford University
Lines: 21
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 1011766301 17261 171.66.211.98 (23 Jan 2002 06:11:41 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2704

All good questions.

One thing you'll notice is that there are several correct
answers. Any correct answer is OK. Accounting for
future growth would be good, but is not required.

- Nick



Martin Casado wrote:
> 
>  Hi,
> 
>    I was wondering if, in allocating subnets for University A, do we account
> for future growth?  Such as, "we may add another router off of R2" or can
> we assume the number of routers and interfaces will remain static? As
> always, any comments, tips, thoughs, suggestions etc. are greatly appreciated.
> :-)
> 
>                     ~~martin
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Vasco Chatalbashev" 
Newsgroups: su.class.cs244a
Subject: Re: Removing directory recursively.
Date: Tue, 22 Jan 2002 22:21:28 -0800
Lines: 39
Distribution: su
Message-ID: 
References:  
Reply-To: "Vasco Chatalbashev" 
NNTP-Posting-Host: vassil.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.3018.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
Xref: nntp.stanford.edu su.class.cs244a:2705

The assignment handout's only reference to existing files/directories
is "You should overwrite any files which already exist without prompting."
There is no mention of recursively removing the existing directory.
I think that a more reasonable and less destructive behavior is to just
overwrite existing files,
leaving alone the ones that don't interfere with the transfer of the
remote tree (even though they may reside in the  local directory to which we
are copying).
Am I wrong?


"Xin Wang"  wrote in message

> You can use system() call. Xin
>
>
> On 23 Jan 2002, Hasan Taufiq Imam wrote:
>
> > If a directory with the same name as a remote directory exists in your
> > local dir you are supposed to recursively remove it and then create the
> > directory. After investigating quite a bit, I could not find any
graceful
> > way to remove directory recursively. Other than recursive call to rmdir,
> > remove,chdir. So I opted for system() call.
> > Hopefully this is an acceptable solution.
> >
> > Hasan
> >
>
> --
> ---------------------------------
> Xin Wang
>
> Department of Computer Science
> Stanford University
>
> 


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Timothy Tay Chao 
Newsgroups: su.class.cs244a
Subject: Re: Other files in directory.
Date: Tue, 22 Jan 2002 22:34:11 -0800
Lines: 13
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: myth8.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2706

> Your
> code should make sure no extra files exist in the new, local tree you're
> trying to create.

Does that mean we delete all files in the local directory - essentially
doing a rm -rf localdir/* every time we run ftpcopy? My interpretation
of "overwrite any files which already exists" was that, if we want to
download hello.gz, and we already have a copy of it in localdir, then we
overwrite our local copy (leaving the "extra" files alone). Is my
interpretation incorrect?

Thanks, 
Tim
.

Path: shelby.stanford.edu!nntp.stanford.edu!saga21.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: Re: how to find name of file a link is pointing to
Date: Tue, 22 Jan 2002 22:34:38 -0800
Lines: 135
Distribution: su
Message-ID: 
References:  
 
 
 
NNTP-Posting-Host: saga21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2707

hi
Well, what I suggest is when you get the listing (LIST), you get the
path to the actual file, eg. link.lnk -> garbage/text/link.txt
so, you can find out if the actual file is with txt extension. However,
this will land you in problem when the link.txt itself turns out to be a
link to say some link.gz
I am not sure how to handle that.

abhishek

On Tue, 22 Jan 2002, Ashmi wrote:

> my idea exactly.
> but the earlier mail exchange between pete and antonios confuses me.
> pete's questiion:
> > So, for example, if we want to download .txt files and we have the
> >link   link.lnk  ->  readme.txt
> > Should we download it?  Of course, the opposite question is, if we
> >are interested in files of extension .lnk, should we download the
> >link?  It
> > seems to me that the answer to my first question should be no and
> >the second
> > should be yes...
>
> antonios replied:
> >So, the answer is yes to the first, no to the second!
>
> ideas anyone? i cant figure out how to find the name of the file the link
> points to
> thanks,
> ashmi
>
>
> On Tue, 22 Jan 2002, Alex Khomenko wrote:
>
> >
> > Here is my humble opinion: the name of the file to which the link is
> > pointing does not matter. For all practical purposes the name of the link
> > is the name of the file you RETRieve and write locally. The .lnk example
> > is confusing since on UNIX symlinks are not required to have a specific
> > extension.
> >
> > Alex
> >
> > On Tue, 22 Jan 2002, Ashmi wrote:
> >
> > > if a link l1.lnk points to a file a.txt how do we detect the name of the
> > > file? the response of LIST contains this, but ftpparse just returns the
> > > name of the link.
> > > how then can we figure out that since we are interested in .txt files, we
> > > should also download a file pointed to by a .lnk link?
> > >
> > > please clarify! i am really confused!
> > > thanks,
> > > ashmi
> > >
> > >
> > > On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
> > >
> > > > Pete,
> > > > a symbolic link to a file of interest (because of the file's extention) should
> > > > always be followed and treated as a local file, i.e. should be copied. The idea
> > > > of the ftpclient
> > > > is to make local copies of particular files of interest. Symbolic links aren't
> > > > particularly interesting files since copying them locally may create dangling
> > > > references.
> > > >
> > > > So, the answer is yes to the first, no to the second!
> > > >
> > > > Regards,
> > > > Antonios.
> > > >
> > > >
> > > > Pete Belknap wrote:
> > > >
> > > > > What should we do when the symbolic link has a diff extension than the file
> > > > > it points to?
> > > > >
> > > > > So, for example, if we want to download .txt files and we have the link
> > > > >
> > > > > link.lnk  ->  readme.txt
> > > > >
> > > > > Should we download it?  Of course, the opposite question is, if we are
> > > > > interested in files of extension .lnk, should we download the link?  It
> > > > > seems to me that the answer to my first question should be no and the second
> > > > > should be yes...
> > > > >
> > > > > thanks,
> > > > > Pete
> > > >
> > > >
> > >
> > > ###############################################################################
> > >
> > > 				ASHMI CHOKSHI
> > > Graduate Student				    141L Escondido Village
> > > Dept. of Computer Science			    Stanford University
> > > Stanford University				    Stanford Ca 94305
> > > Stanford Ca 94305				    (650)498-1103
> > >
> > > ###############################################################################
> > >
> > >
> > >
> > >
> >
> > --
> > Knowledge is a deadly friend when no one sets the rules.
> > The fate of all mankind I see is in the hands of fools. (KC "Epitaph")
> >
> >
>
> ###############################################################################
>
> 				ASHMI CHOKSHI
> Graduate Student				    141L Escondido Village
> Dept. of Computer Science			    Stanford University
> Stanford University				    Stanford Ca 94305
> Stanford Ca 94305				    (650)498-1103
>
> ###############################################################################
>
>
>
>

Abhishek Das
Graduate Research Assistant
Computer Systems Lab
Stanford University

Address:-
Escondido Village 33B
Stanford CA 94305

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Removing directory recursively.
Date: Tue, 22 Jan 2002 22:44:16 -0800
Lines: 55
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Vasco Chatalbashev 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2708

Either way is fine. Actually we won't be testing the case that local
directory and remote directory have name conflict. Xin


On Tue, 22 Jan 2002, Vasco Chatalbashev wrote:

> The assignment handout's only reference to existing files/directories
> is "You should overwrite any files which already exist without prompting."
> There is no mention of recursively removing the existing directory.
> I think that a more reasonable and less destructive behavior is to just
> overwrite existing files,
> leaving alone the ones that don't interfere with the transfer of the
> remote tree (even though they may reside in the  local directory to which we
> are copying).
> Am I wrong?
> 
> 
> "Xin Wang"  wrote in message
> 
> > You can use system() call. Xin
> >
> >
> > On 23 Jan 2002, Hasan Taufiq Imam wrote:
> >
> > > If a directory with the same name as a remote directory exists in your
> > > local dir you are supposed to recursively remove it and then create the
> > > directory. After investigating quite a bit, I could not find any
> graceful
> > > way to remove directory recursively. Other than recursive call to rmdir,
> > > remove,chdir. So I opted for system() call.
> > > Hopefully this is an acceptable solution.
> > >
> > > Hasan
> > >
> >
> > --
> > ---------------------------------
> > Xin Wang
> >
> > Department of Computer Science
> > Stanford University
> >
> > 
> 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jing Jiang" 
Newsgroups: su.class.cs244a
Subject: Re: proper RETR and LIST behavior
Date: Tue, 22 Jan 2002 23:16:57 -0800
Lines: 53
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: jjiang.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Xref: nntp.stanford.edu su.class.cs244a:2709

So according to RFC, a pathname (possibly including the path and the file
name, to my understanding) is what follows RETR. Then what about
ftp.stanford.edu server which doesn't allow this, as Joong pointed out? Can
we treat it as non-standard and ignore it?

Jing

SUL\\AIR Laneroom Cluster  wrote in message

>
> Joong,
> here's the part of the RFC that explains RETR:
>
>        RETRIEVE (RETR)
>
>             This command causes the server-DTP to transfer a copy of the
>             file, specified in the pathname, to the server- or user-DTP
>             at the other end of the data connection.  The status and
>             contents of the file at the server site shall be unaffected.
>
>
> Please keep in mind that a pathname and a filename are indeed different!
> Regards,
> Antonios.
>
> Joong Ho Won wrote:
>
> > Hello,
> >
> > I wonder if RETR command can take an absoulte/relative path to a file as
an
> > argument. i.e.,
> >
> > RETR /a/path/to/a/file
> >
> > rather than having just a filename, i.e.,
> >
> > RETR file
> >
> > RFC doesn't seem to specify this case.
> >
> > Some ftp(ex. ftp.stanford.edu ) seems not to allow the former case, but
> > others(ex. transfer.stanford.edu ) seems to.
> >
> > I'd like to make it clear for LIST for the same case as well, though it
> > seems to be allowed seeing RFC.
> >
> > Thanks.
> >
> > Joong Ho Won
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: how to find name of file a link is pointing to
Date: Tue, 22 Jan 2002 23:14:58 -0800
Lines: 176
Distribution: su
Message-ID: 
References:      
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2710


Hi...

I'm also one of them who think that only the name of link matters, not the
name of the file/dir to which
the link points. And, isn't it the way  most of unix commands work?
And then, that way of operation is already taken care of by the OS of the
FTP server,
 so I don't see why we should bother...
link.lnk -> link.txt  being processed for 'txt' and not for 'lnk' ; sounds
really strange to me..


"Abhishek Das"  wrote in message

> hi
> Well, what I suggest is when you get the listing (LIST), you get the
> path to the actual file, eg. link.lnk -> garbage/text/link.txt
> so, you can find out if the actual file is with txt extension. However,
> this will land you in problem when the link.txt itself turns out to be a
> link to say some link.gz
> I am not sure how to handle that.
>
> abhishek
>
> On Tue, 22 Jan 2002, Ashmi wrote:
>
> > my idea exactly.
> > but the earlier mail exchange between pete and antonios confuses me.
> > pete's questiion:
> > > So, for example, if we want to download .txt files and we have the
> > >link   link.lnk  ->  readme.txt
> > > Should we download it?  Of course, the opposite question is, if we
> > >are interested in files of extension .lnk, should we download the
> > >link?  It
> > > seems to me that the answer to my first question should be no and
> > >the second
> > > should be yes...
> >
> > antonios replied:
> > >So, the answer is yes to the first, no to the second!
> >
> > ideas anyone? i cant figure out how to find the name of the file the
link
> > points to
> > thanks,
> > ashmi
> >
> >
> > On Tue, 22 Jan 2002, Alex Khomenko wrote:
> >
> > >
> > > Here is my humble opinion: the name of the file to which the link is
> > > pointing does not matter. For all practical purposes the name of the
link
> > > is the name of the file you RETRieve and write locally. The .lnk
example
> > > is confusing since on UNIX symlinks are not required to have a
specific
> > > extension.
> > >
> > > Alex
> > >
> > > On Tue, 22 Jan 2002, Ashmi wrote:
> > >
> > > > if a link l1.lnk points to a file a.txt how do we detect the name of
the
> > > > file? the response of LIST contains this, but ftpparse just returns
the
> > > > name of the link.
> > > > how then can we figure out that since we are interested in .txt
files, we
> > > > should also download a file pointed to by a .lnk link?
> > > >
> > > > please clarify! i am really confused!
> > > > thanks,
> > > > ashmi
> > > >
> > > >
> > > > On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
> > > >
> > > > > Pete,
> > > > > a symbolic link to a file of interest (because of the file's
extention) should
> > > > > always be followed and treated as a local file, i.e. should be
copied. The idea
> > > > > of the ftpclient
> > > > > is to make local copies of particular files of interest. Symbolic
links aren't
> > > > > particularly interesting files since copying them locally may
create dangling
> > > > > references.
> > > > >
> > > > > So, the answer is yes to the first, no to the second!
> > > > >
> > > > > Regards,
> > > > > Antonios.
> > > > >
> > > > >
> > > > > Pete Belknap wrote:
> > > > >
> > > > > > What should we do when the symbolic link has a diff extension
than the file
> > > > > > it points to?
> > > > > >
> > > > > > So, for example, if we want to download .txt files and we have
the link
> > > > > >
> > > > > > link.lnk  ->  readme.txt
> > > > > >
> > > > > > Should we download it?  Of course, the opposite question is, if
we are
> > > > > > interested in files of extension .lnk, should we download the
link?  It
> > > > > > seems to me that the answer to my first question should be no
and the second
> > > > > > should be yes...
> > > > > >
> > > > > > thanks,
> > > > > > Pete
> > > > >
> > > > >
> > > >
> > > >
############################################################################
###
> > > >
> > > > ASHMI CHOKSHI
> > > > Graduate Student     141L Escondido Village
> > > > Dept. of Computer Science     Stanford University
> > > > Stanford University     Stanford Ca 94305
> > > > Stanford Ca 94305     (650)498-1103
> > > >
> > > >
############################################################################
###
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > Knowledge is a deadly friend when no one sets the rules.
> > > The fate of all mankind I see is in the hands of fools. (KC "Epitaph")
> > >
> > >
> >
> >
############################################################################
###
> >
> > ASHMI CHOKSHI
> > Graduate Student     141L Escondido Village
> > Dept. of Computer Science     Stanford University
> > Stanford University     Stanford Ca 94305
> > Stanford Ca 94305     (650)498-1103
> >
> >
############################################################################
###
> >
> >
> >
> >
>
> Abhishek Das
> Graduate Research Assistant
> Computer Systems Lab
> Stanford University
>
> Address:-
> Escondido Village 33B
> Stanford CA 94305
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Henry Fu" 
Newsgroups: su.class.cs244a
Subject: Re: IMPORTANT CLARIFICATION: failure on ftp.slac.stanford.edu tests
Date: Tue, 22 Jan 2002 23:35:06 -0800
Lines: 43
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: bernese.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2711

I'm failling all my test using the submit_test script. I wonder what happen?
Is there anything I need to take notice?

For the ftp.slac.stanford.edu issue, when I try to run the test on my own,
I can finish the test and got the correct
tree structure and got the correct file size for each file. And I finish
the whole thing in less than 5 seconds, so TIMEOUT shouldn't be a
problem to me. So, I"m not sure what's going on.

Henry


"Arun Upadhyaya Kishan"  wrote in message

> Hello all,
>
> A lot of people have been sending in emails to the staff stating that the
> submit test script is reporting failures on various ftp.slac.stanford.edu,
> such as TIMEOUT or exit line incorrect, or tree incorrect, etc.
>
> Note that the script determines these errors by examining the output of a
> single program run. In particular, if this test does not terminate in
> TIMEOUT time, it is highly likely that all the remaining tests will fail.
> Since this is a relatively deep recursion, the time limit is imposed to
> penalize programs with poor performance. Alternatively, programs that hang
> or recurse will force the program to be abnormally terminated as well.
>
> If you see a TIMEOUT error for a given test, please look into what could
> be causing this. Two things to consider:
>
> a) Do you read data from the socket when there is no data available (i.e.,
> expecting a reply when there should be none)? This will hang your process
>
> b) During directory recursion, do you ignore the "." and ".." entries?
> Some, not all, ftp servers return these as directory names as part of the
> LIST response. Among these is ftp.slac.stanford.edu.
>
> Good luck,
>
> Arun
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!fable8.Stanford.EDU!ggaurav
From: Gaurav Garg 
Newsgroups: su.class.cs244a
Subject: TEST scripts seem to be not working!!
Date: Tue, 22 Jan 2002 23:39:03 -0800
Lines: 65
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: fable8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2712


I am also failing all the tests on test_script when I ran it half an hour
back. They were working fine with the test_script 4 hours back. I then
tried testing them myself and they seemed to work just fine. Are the
test_scripts broken.

-gaurav


On Tue, 22 Jan 2002, Henry Fu wrote:

> I'm failling all my test using the submit_test script. I wonder what happen?
> Is there anything I need to take notice?
>
> For the ftp.slac.stanford.edu issue, when I try to run the test on my own,
> I can finish the test and got the correct
> tree structure and got the correct file size for each file. And I finish
> the whole thing in less than 5 seconds, so TIMEOUT shouldn't be a
> problem to me. So, I"m not sure what's going on.
>
> Henry
>
>
> "Arun Upadhyaya Kishan"  wrote in message
> 
> > Hello all,
> >
> > A lot of people have been sending in emails to the staff stating that the
> > submit test script is reporting failures on various ftp.slac.stanford.edu,
> > such as TIMEOUT or exit line incorrect, or tree incorrect, etc.
> >
> > Note that the script determines these errors by examining the output of a
> > single program run. In particular, if this test does not terminate in
> > TIMEOUT time, it is highly likely that all the remaining tests will fail.
> > Since this is a relatively deep recursion, the time limit is imposed to
> > penalize programs with poor performance. Alternatively, programs that hang
> > or recurse will force the program to be abnormally terminated as well.
> >
> > If you see a TIMEOUT error for a given test, please look into what could
> > be causing this. Two things to consider:
> >
> > a) Do you read data from the socket when there is no data available (i.e.,
> > expecting a reply when there should be none)? This will hang your process
> >
> > b) During directory recursion, do you ignore the "." and ".." entries?
> > Some, not all, ftp servers return these as directory names as part of the
> > LIST response. Among these is ftp.slac.stanford.edu.
> >
> > Good luck,
> >
> > Arun
> >
>
>
>

*************************************************************************
Gaurav Garg                          * Contact Info: 20A Comstock Circle
1st Yr, Graduate Student             *       Escondido Village, Stanford
Department of Electrical Engineering *       CA-94305
Stanford University                  * Ph:650-498-1208
*************************************************************************

-Never ruin an apology with an excuse

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Eric Watkins 
Newsgroups: su.class.cs244a
Subject: Re: Regarding Post of 1/16/02, 8:56: Script File Sizes
Date: Tue, 22 Jan 2002 23:40:36 -0800
Lines: 25
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: e-man.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2713

> exit line: ""

That always happens to me too, and I don't know why...


> I'm also having problems with tests I and L. I think the FTP server on
> epic is messed up, because I get:
> 
> Your output to stdout was:
> TIMEOUT! killed program: /afs/ir/class/cs244a/submissions/restricted/hw1/hondroul/oceans//compile.sun/ftpcopy ext 1  /afs/ir/class/cs244a/submissions/restricted/hw1/hondroul/oceans//compile.sun/download/perms .   21715


I think I know why this is.  I grep'd through the output for CWD and
noticed that at the very beginning my program was doing "CWD ." and "CWD
..." an awful lot.  I think the program spent all its time cwd'ing around
in circles and not transfering any files.  If you have your program
ignores the directories "." and ".." it should fix that right up.

> : -When the test lists diffs, do >'s mean that your tree had certain files and
> : that the correct one didn't (ie you shouldn't have had them)?

< means what you had
> means what you should have had

-Eric...
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: Empty submit directory?
Date: 23 Jan 2002 08:31:47 GMT
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth7.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2714

I've submitted my program (twice), but I noticed that my folder directory
in submissions/hw1/ta/username/ is empty.

Is this normal?
.

Path: shelby.stanford.edu!nntp.stanford.edu!spevack.Stanford.EDU!spevack
From: Max Spevack 
Newsgroups: su.class.cs244a
Subject: End of Data transmission?
Date: Wed, 23 Jan 2002 01:17:31 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: spevack.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2715

Hi,

I'm been going in circles for hours on this, and I would really appreciate
some help.

How do I know when I'm done with a data transmission?  For example, what
indicates to me that LIST is done sending the contents of the directory?

I'm reading from the socket byte by byte, but if I check to see if read
returns a result less than 0, that doesn't work and I end up in an
infinite loop in which it prints out the dir contents and then prints the
very first directory entry over and over again.

Thanks for any input.

--Max

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Lin Lu 
Newsgroups: su.class.cs244a
Subject: fix the permission of ftpd
Date: Wed, 23 Jan 2002 01:21:18 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2716

Hi,

I can not run ftpd server since permission denied.  Could any TA fix
this.  I need using it to debug.

thanks,
Lin Lu
.

Path: shelby.stanford.edu!nntp.stanford.edu!fable5.Stanford.EDU!pabbeel
From: Pieter Abbeel 
Newsgroups: su.class.cs244a
Subject: Re: End of Data transmission?
Date: Wed, 23 Jan 2002 01:31:48 -0800
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: fable5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2717

check for ==0, not <0
--pieter

On Wed, 23 Jan 2002, Max Spevack wrote:

> Hi,
>
> I'm been going in circles for hours on this, and I would really appreciate
> some help.
>
> How do I know when I'm done with a data transmission?  For example, what
> indicates to me that LIST is done sending the contents of the directory?
>
> I'm reading from the socket byte by byte, but if I check to see if read
> returns a result less than 0, that doesn't work and I end up in an
> infinite loop in which it prints out the dir contents and then prints the
> very first directory entry over and over again.
>
> Thanks for any input.
>
> --Max
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga12.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Re: End of Data transmission?
Date: Wed, 23 Jan 2002 01:34:08 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2718

In case of LIST command there are two connections:
(1) Control Connection: A response of 226 indicates success. Read control
socket until you either get an error code 4xy or 5xy or 226 after you have
read the data
(2) Data Connection: The data transmission is over when server closes the
socket. You get a 0 sized packet (read returns 0) to indicate this.

Dhawal Kumar

On Wed, 23 Jan 2002, Max Spevack wrote:

> Hi,
>
> I'm been going in circles for hours on this, and I would really appreciate
> some help.
>
> How do I know when I'm done with a data transmission?  For example, what
> indicates to me that LIST is done sending the contents of the directory?
>
> I'm reading from the socket byte by byte, but if I check to see if read
> returns a result less than 0, that doesn't work and I end up in an
> infinite loop in which it prints out the dir contents and then prints the
> very first directory entry over and over again.
>
> Thanks for any input.
>
> --Max
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic2.Stanford.EDU!ambu
From: Ambika Balakrishnan 
Newsgroups: su.class.cs244a
Subject: STRU, MODE and QUIT ?
Date: Wed, 23 Jan 2002 02:40:11 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Arun Upadhyaya Kishan 
Xref: nntp.stanford.edu su.class.cs244a:2719

Hi!

The RFC seems to say that file STRUcture and stream transmission MODE are
the defaults for all ftp servers, even those that do not implement the
STRU and MODE commands. So is it all right if I do not send these commands
to the server?

Also, do we need to send the QUIT command to the server? What purpose does
this serve?

Thank you!
--
Ambika


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Mudassir I Sheikha" 
Newsgroups: su.class.cs244a
Subject: Re: Regarding Post of 1/16/02, 8:56: Script File Sizes
Date: Wed, 23 Jan 2002 03:56:55 -0800
Lines: 53
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: pakistan.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Xref: nntp.stanford.edu su.class.cs244a:2720

i see the same messages.

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy ch 1 ftp.cs.stanford.edu localdir /pub/cweb
exit line said: ""
---

also, are we supposed to treat 'localdir' as the current directory? my
current implementation creates a directory 'localdir' under the current
directory. test results, however, seem to suggest that localdir points to
the current directory.

mudassir

--
Mudassir I Sheikha
650-219-8800 (Cell)


"Eric Watkins"  wrote in message

> > exit line: ""
>
> That always happens to me too, and I don't know why...
>
>
> > I'm also having problems with tests I and L. I think the FTP server on
> > epic is messed up, because I get:
> >
> > Your output to stdout was:
> > TIMEOUT! killed program:
/afs/ir/class/cs244a/submissions/restricted/hw1/hondroul/oceans//compile.sun
/ftpcopy ext 1 
/afs/ir/class/cs244a/submissions/restricted/hw1/hondroul/oceans//compile.sun
/download/perms .   21715
>
>
> I think I know why this is.  I grep'd through the output for CWD and
> noticed that at the very beginning my program was doing "CWD ." and "CWD
> .." an awful lot.  I think the program spent all its time cwd'ing around
> in circles and not transfering any files.  If you have your program
> ignores the directories "." and ".." it should fix that right up.
>
> > : -When the test lists diffs, do >'s mean that your tree had certain
files and
> > : that the correct one didn't (ie you shouldn't have had them)?
>
> < means what you had
> > means what you should have had
>
> -Eric...


.

Path: shelby.stanford.edu!nntp.stanford.edu!epic24.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: left over from previous read
Date: Wed, 23 Jan 2002 07:01:47 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic24.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2721


Hi,

Even though I am making sure that each command that I write and then read,
I read till th every end, until I get the last line which has a space
after the response.

Somehow when I do the next read, the stuff from the previoud read is still
there, even though I clear up my reply buffer, it seems the server still
sens the stuff from the previous read. Is there any way to flush the
server contenets after every read.

Any help would be gretaly appreciated.

Thanks,
Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic24.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: Re: left over from previous read
Date: Wed, 23 Jan 2002 07:06:41 -0800
Lines: 29
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic24.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2722


Also, this might seem bizzare but if I step thru gdb to check where the
buffer might be giving a problem...it goes thru fine as if the server gets
more time to clear out stuff! Don't know if this makes any sense but thats
whats happening.

Any help?

 On Wed, 23 Jan 2002, Priyanka Gupta wrote:

>
> Hi,
>
> Even though I am making sure that each command that I write and then read,
> I read till th every end, until I get the last line which has a space
> after the response.
>
> Somehow when I do the next read, the stuff from the previoud read is still
> there, even though I clear up my reply buffer, it seems the server still
> sens the stuff from the previous read. Is there any way to flush the
> server contenets after every read.
>
> Any help would be gretaly appreciated.
>
> Thanks,
> Priyanka
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine5.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Homework 2.
Date: Wed, 23 Jan 2002 10:07:37 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2723

Hi,
I have few quesitons regarding the howework 2.
a) First of all in the question 6 it is said that traceroute to
www.berkeley.com and www.cisco.com takes separate separate path out of
campus but i don't see that happening. Is there any site in particular
that i should try rather then doing hit and trial.
b) while trying to get the host name for some of the routers in the
question 5 i got
elaine5:~> host C2-QANH-GSR-QSV-GSR.ATM.calren2.net
C2-QANH-GSR-QSV-GSR.ATM.calren2.net does not exist, try again .
 Is this ok or is there any other way to find out the ip address of
the routers.
Thanks
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: fix the permission of ftpd
Date: Wed, 23 Jan 2002 10:10:30 -0800
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
X-Accept-Language: es, en-us, fr, de
To: Lin Lu 
Xref: nntp.stanford.edu su.class.cs244a:2724

I have just changed the directory permissions,

pablo

Lin Lu wrote:

> Hi,
> 
> I can not run ftpd server since permission denied.  Could any TA fix
> this.  I need using it to debug.
> 
> thanks,
> Lin Lu
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: Duplicate Files and Circularities
Date: Wed, 23 Jan 2002 10:13:20 -0800
Lines: 63
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
X-Accept-Language: es, en-us, fr, de
To: Alex Khomenko 
Xref: nntp.stanford.edu su.class.cs244a:2725

Hi,

In the grading only very simple symbolic links will be tested, like the 
one in the testing web page. Do not worry about complicated recursive 
links or links to different directory levels.

Pablo

Alex Khomenko wrote:

> Detecting that two symbolic links in the server file system point to the
> same file and transfering it only once, or detecting that server has a
> loop in its directory structure (symlink to parent) are not required by
> the assignment handout. I would consider this answer with a grain of
> doubt.
> 
> Alex
> 
> On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
> 
> 
>>Hi Jian,
>>
>>Yes, your code should be written in such a way that no
>>file is downloaded more than once. Cases with symlinks
>>to the current directory or to parent directories that you've
>>already processed are troublesome cases that you need
>>to take care of, in order to avoid downloading twice a file.
>>
>>Regards,
>>Antonios.
>>
>>Jian Deng wrote:
>>
>>
>>>I have question on the following test case
>>>special cases: Symbolic-link-to-directory [out of 0.5]
>>>
>>>[SUMMARY] NOT OK
>>>[RESULT]  Symbolic link to directory in same directory did transfer (wrong!)
>>>exit line said: ""
>>>---
>>>Your output to stdout was:
>>>OK: 14 bytes copied
>>>
>>>Is this test case testing a transfer should not
>>>happen to a symbolic link to the same dir that has already
>>>been transfered?
>>>
>>>I am wondering how can we prevent that with out parsing the
>>>actual output of the list which varies with ftp servers..
>>>and PWD will not give you the actual path.
>>>
>>>Does this test case also imply we should handle cycles and not transfer
>>>dirs already been transfered?
>>>
>>>Your clarification is appreciated.
>>>
>>>
>>>
>>
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic24.Stanford.EDU!priyanka
From: Priyanka Gupta 
Newsgroups: su.class.cs244a
Subject: ftp.slac.stanford.edu
Date: Wed, 23 Jan 2002 10:28:57 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic24.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2726


If I connect to ftp.slac and go to /doc and do an ls, I do not see
anything. I only see stuff if I see a dir. Also my program when returns
LIST gives only

dr-xr-xr-x   2 ftp      ftp          2048 Jun 19  1995 .

However, the test case fails because it expects us to go inside forms.

Could someone tell me hos do I avoid this?

Thanks,
Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: Got the following error message.
Date: Wed, 23 Jan 2002 10:37:00 -0800
Lines: 78
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
X-Accept-Language: es, en-us, fr, de
Xref: nntp.stanford.edu su.class.cs244a:2727

Hi,

Contrary to what I wrote some days ago, the minor error in the submit 
script concerning not being able to open the log file has not been 
solved. As I mentioned before this is a minor error, and it does not 
prevent you from submitting your files.

Pablo

Arvind Bhat wrote:

> Hi,
> I jsut submitted and ran into this error message.
> Hope i am ok and does not need to resubmit. Just
> wanted to convey because earlier mail said this
> problem was fixed ?
> 
> Thanks, Arvind
> 
> -------------------------
> Submission succeeded.
> Error: log: open: Permission denied
> 
> A problem statement has been e-mailed to the system
> administrator 
> 
> 
> 
> On Tue, 22 Jan 2002, Russell Greene wrote:
> 
> 
>>(This was taken from an earlier posting)
>>
>>Hi,
>>
>>If you saw an error like this, the error is minor and it did not prevent
>>you from submitting your code, in other words, we received your files
>>correctly. This problem has been solved, so you will not see it again,
>>if you submit now.
>>
>>Pablo
>>
>>Russell Greene wrote:
>>
>>
>>>Has anyone received the error when running the submit script?
>>>
>>>Submission succeeded
>>>Error: log: open: Permission denied
>>>
>>>
>>>--Russ
>>>
>>>
>>>
>>>
>>
>>"Shankar Agarwal"  wrote in message

>>
>>>Hi,
>>>I got the follwoing error message when submitting the hw1. Does this mean
>>>that submisssion was successful or i need to submit again.
>>>Submission succeeded.
>>>Error: log: open: Permission denied
>>>
>>>A problem statement has been e-mailed to the system
>>>administrator 
>>>
>>>Thanks
>>>Regards
>>>Shankar
>>>
>>>
>>
>>
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links and File Extensions
Date: Wed, 23 Jan 2002 11:05:10 -0800
Lines: 79
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2728

Any reasonable way to handle symbolic links is acceptable. As Pablo said
earlier, only very simple symbolic links will be tested, like the one in
the testing web page. Best, Xin



On Tue, 22 Jan 2002, Dhawal Kumar wrote:

> Excerpt from a previous posting:
> 
> <snip>
> Correct.
> 
> 
> On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:
> 
> > Well, we download 'regular files', and recurse into subdirectories.  And
> > you seem to be saying to do both here.  So just to confirm:
> >
> > * If a symlink is pointing to a regular file, download the file, and
> > name it with the name of the symlink.
> 
> </snip>
> 
> This means if we are interested in txt files and we download link.lnk
> (as you suggest) the name on the local dir should be link.lnk whose
> extension is not txt. Is this acceptable? I thought that all files on
> local dir should have the ext specified.
> 
> Dhawal Kumar
> 
> 
> 
> On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
> 
> > Pete,
> > a symbolic link to a file of interest (because of the file's extention) should
> > always be followed and treated as a local file, i.e. should be copied. The idea
> > of the ftpclient
> > is to make local copies of particular files of interest. Symbolic links aren't
> > particularly interesting files since copying them locally may create dangling
> > references.
> >
> > So, the answer is yes to the first, no to the second!
> >
> > Regards,
> > Antonios.
> >
> >
> > Pete Belknap wrote:
> >
> > > What should we do when the symbolic link has a diff extension than the file
> > > it points to?
> > >
> > > So, for example, if we want to download .txt files and we have the link
> > >
> > > link.lnk  ->  readme.txt
> > >
> > > Should we download it?  Of course, the opposite question is, if we are
> > > interested in files of extension .lnk, should we download the link?  It
> > > seems to me that the answer to my first question should be no and the second
> > > should be yes...
> > >
> > > thanks,
> > > Pete
> >
> >
> 
> 


-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Other files in directory.
Date: Wed, 23 Jan 2002 11:31:19 -0800
Lines: 29
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2729

You overwrite any files which already exists in the local directory, and
leave other files in the local directory alone. Xin


On Tue, 22 Jan 2002, Timothy Tay Chao wrote:

> > Your
> > code should make sure no extra files exist in the new, local tree you're
> > trying to create.
> 
> Does that mean we delete all files in the local directory - essentially
> doing a rm -rf localdir/* every time we run ftpcopy? My interpretation
> of "overwrite any files which already exists" was that, if we want to
> download hello.gz, and we already have a copy of it in localdir, then we
> overwrite our local copy (leaving the "extra" files alone). Is my
> interpretation incorrect?
> 
> Thanks, 
> Tim
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Jonathan White Keljo 
Newsgroups: su.class.cs244a
Subject: Re: Empty submit directory?
Date: 23 Jan 2002 20:05:46 GMT
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth1.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2730

Yes. The script actually hides your files under 
cs244a/submissions/grading/<ta name>/hw1

Jonathan

Derrick Wen-Shiuan Tong  wrote:
: I've submitted my program (twice), but I noticed that my folder directory
: in submissions/hw1/ta/username/ is empty.

: Is this normal?
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Homework 2.
Date: Wed, 23 Jan 2002 12:05:21 -0800
Lines: 34
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2731

Hi Shankar,

> I have few quesitons regarding the howework 2.
> a) First of all in the question 6 it is said that traceroute to
> www.berkeley.com and www.cisco.com takes separate separate path out of
> campus but i don't see that happening. Is there any site in particular
> that i should try rather then doing hit and trial.

I just tested it and for me it clearly takes two different paths. On which 
host in Stanford did you run traceroute? Also what do you mean with site? 
The hosts are www.cisco.com and www.berkeley.edu themselves.

> b) while trying to get the host name for some of the routers in the
> question 5 i got
> elaine5:~> host C2-QANH-GSR-QSV-GSR.ATM.calren2.net
> C2-QANH-GSR-QSV-GSR.ATM.calren2.net does not exist, try again .
>  Is this ok or is there any other way to find out the ip address of
> the routers.

I guess you got this router from the Stanford to UCLA traceorute. 
Traceroute directly tells you the IP addresses of the routers in its 
ourput, e.g.

traceroute to www.ucla.edu (169.232.33.129): 1-30 hops, 38 byte packets
 1  leland-gateway.Stanford.EDU (172.24.12.1)  1.17 ms  3.18 ms  0.729 ms
 2  smrb-rtr.Stanford.EDU (171.64.1.197)  1.34 ms (ttl=63!)  1.24 ms 
(ttl=63!)  1.21 ms (ttl=63!)
 3  i2-gateway.Stanford.EDU (171.64.1.33)  0.514 ms  0.407 ms  0.447 ms
(...)

You don't have to run host seperately.

  Guido

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: STRU, MODE and QUIT ?
Date: Wed, 23 Jan 2002 12:11:46 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2732

Ambika,

> The RFC seems to say that file STRUcture and stream transmission MODE are
> the defaults for all ftp servers, even those that do not implement the
> STRU and MODE commands. So is it all right if I do not send these commands
> to the server?

The best solution is actually that you try to send these commands and parse 
the servers response. However as far as I know it is defautl for all 
servers and I think it is ok if you don't send them.

> Also, do we need to send the QUIT command to the server? What purpose does
> this serve?

QUIT is the preferred way of closing down the connection to the ftp server 
once you have downloaded all files.

  Guido
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: left over from previous read
Date: Wed, 23 Jan 2002 12:21:15 -0800
Lines: 29
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2733

Priyanka,

from what you write this is pretty hard to debug. Did you check:
- That read() really returns something (e.g. the return value which is the 
number of bytes read is > 0)
- You read into the right buffer (e.g. don't get pointers mixed up)
The server definitely won't send the same data again, this is almost 
definitely a problem of buffering on the client side. I also don't quite 
understand your strategy for terminating (the space after the response).

If all fails, send me the relevant part of your source code by email (don't 
post it :-) and I will have a look at it at 2pm today.

  Guido

> Even though I am making sure that each command that I write and then read,
> I read till th every end, until I get the last line which has a space
> after the response.
> 
> Somehow when I do the next read, the stuff from the previoud read is still
> there, even though I clear up my reply buffer, it seems the server still
> sens the stuff from the previous read. Is there any way to flush the
> server contenets after every read.
> 
> Any help would be gretaly appreciated.
> 
> Thanks,
> Priyanka

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine16.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links and File Extensions
Date: Wed, 23 Jan 2002 13:25:01 -0800
Lines: 89
Distribution: su
Message-ID: 
References:  
 
 
NNTP-Posting-Host: elaine16.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2734


So is it reasonable to download link.lnk -> readme.txt when we are
supposed to download txt files and name it link.lnk

Dhawal Kumar

On Wed, 23 Jan 2002, Xin Wang wrote:

> Any reasonable way to handle symbolic links is acceptable. As Pablo said
> earlier, only very simple symbolic links will be tested, like the one in
> the testing web page. Best, Xin
>
>
>
> On Tue, 22 Jan 2002, Dhawal Kumar wrote:
>
> > Excerpt from a previous posting:
> >
> > <snip>
> > Correct.
> >
> >
> > On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:
> >
> > > Well, we download 'regular files', and recurse into subdirectories.  And
> > > you seem to be saying to do both here.  So just to confirm:
> > >
> > > * If a symlink is pointing to a regular file, download the file, and
> > > name it with the name of the symlink.
> >
> > </snip>
> >
> > This means if we are interested in txt files and we download link.lnk
> > (as you suggest) the name on the local dir should be link.lnk whose
> > extension is not txt. Is this acceptable? I thought that all files on
> > local dir should have the ext specified.
> >
> > Dhawal Kumar
> >
> >
> >
> > On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
> >
> > > Pete,
> > > a symbolic link to a file of interest (because of the file's extention) should
> > > always be followed and treated as a local file, i.e. should be copied. The idea
> > > of the ftpclient
> > > is to make local copies of particular files of interest. Symbolic links aren't
> > > particularly interesting files since copying them locally may create dangling
> > > references.
> > >
> > > So, the answer is yes to the first, no to the second!
> > >
> > > Regards,
> > > Antonios.
> > >
> > >
> > > Pete Belknap wrote:
> > >
> > > > What should we do when the symbolic link has a diff extension than the file
> > > > it points to?
> > > >
> > > > So, for example, if we want to download .txt files and we have the link
> > > >
> > > > link.lnk  ->  readme.txt
> > > >
> > > > Should we download it?  Of course, the opposite question is, if we are
> > > > interested in files of extension .lnk, should we download the link?  It
> > > > seems to me that the answer to my first question should be no and the second
> > > > should be yes...
> > > >
> > > > thanks,
> > > > Pete
> > >
> > >
> >
> >
>
>
> --
> ---------------------------------
> Xin Wang
>
> Department of Computer Science
> Stanford University
>
> 
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Homework 2 Question 3
Date: Wed, 23 Jan 2002 13:28:05 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2735

Hi all,

     For Question #3, does Figure 2(c) add any value to the question?  I
didn't see it mentioned and just wanted to make sure that I wasn't missing
anything.  Thanks.

--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: ftp.slac.stanford.edu
Date: Wed, 23 Jan 2002 13:33:19 -0800
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2736

Priyanka,
 
> If I connect to ftp.slac and go to /doc and do an ls, I do not see
> anything. I only see stuff if I see a dir. Also my program when returns
> LIST gives only
> 
> dr-xr-xr-x   2 ftp      ftp          2048 Jun 19  1995 .

I just tried connecting and I definitely see a direcroty called forms (see 
the details below). What you see is just the first of three lines of the 
reply (there are two additional ones for ".." and "forms").

> However, the test case fails because it expects us to go inside forms.

Make sure that you really parse three lines and that your client knows how 
to deal with the "." and ".." entries that denote the current and parent 
directory.

Does that help?

  Guido

-----

tree1:~/cs244a> ncftp ftp.slac.stanford.edu
NcFTP 3.0.3 (April 15, 2001) by Mike Gleason 
Connecting to 134.79.18.30...
[... tons of text deleted...]
ncftp / > cd /doc
ncftp /doc > dir
dr-xr-xr-x   2 ftp      ftp         2048   Jun 19  1995   .
dr-xr-xr-x   4 ftp      ftp         2048   Dec 14 17:39   ..
dr-xr-xr-x   7 ftp      ftp         2048   Mar 13  1999   forms
ncftp /doc > ls
../      ../     forms/
ncftp /doc >
.

Path: shelby.stanford.edu!nntp.stanford.edu!fable12.Stanford.EDU!pabbeel
From: Pieter Abbeel 
Newsgroups: su.class.cs244a
Subject: when localdir doesnot exist
Date: Wed, 23 Jan 2002 13:55:40 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: fable12.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2737

hey,

the webpage says if the specified localdir doesnot exist, we should exit
with message saying localdir doesnot exist (and not down anything)

i was wondering whether the testscript follows this prescription?

(this could explain why it complains about me not downloading anything in
some cases ...)

thanks,
pieter

(obviously i'd love to test this on the server, but that is taking
forever it seems ... (why doesn't that #trials<5 is implemented as
advertised and as would have guaranteed us some more decent
turnaround ????)


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine42.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Wed, 23 Jan 2002 14:13:09 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2738


I submitted my assignment at 2:10 pm (Wednesday), I got the same error.

TAs, I hope this is still a false alarm.

-anurag



On Tue, 22 Jan 2002, Pablo Molinero wrote:

> As mentioned in the assignment handout, you have to have two
> purify-related files, .purify and a purify.output, in your homework
> directory before you can submit your code.
>
> Pablo
>
>
> Shankar Agarwal wrote:
>
> > Hi,
> > I am trying to submit hw1 and it has ftpcopy.purify in that directory but
> > it still says that no .purify is present.
> > Thanks
> > Shankar
> >
> >
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic9.Stanford.EDU!wjiang
From: Huan Wanda Jiang 
Newsgroups: su.class.cs244a
Subject: microsoft server timeout! ??
Date: Wed, 23 Jan 2002 14:22:15 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2739

Hi there,

I just sutmitted a test script. The microsoft server gave NOT OK, and the
output is timeout!... All other servers are ok and this server used to
work fine too.

Any hint?

Thanks!!

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: when localdir doesnot exist
Date: Wed, 23 Jan 2002 14:36:42 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2740

Pieter,

> the webpage says if the specified localdir doesnot exist, we should exit
> with message saying localdir doesnot exist (and not down anything)
> 
> i was wondering whether the testscript follows this prescription?

The current test scripts that you can access do not test this case. To 
receive full credit your program should test whether the local directory 
was created successfully (this is actually not much work, we are talking 
about a two-line if statement here.)

> (this could explain why it complains about me not downloading anything in
> some cases ...)

I would guess this is probably not the reason.

> (obviously i'd love to test this on the server, but that is taking
> forever it seems ... (why doesn't that #trials<5 is implemented as
> advertised and as would have guaranteed us some more decent
> turnaround ????)

What do you mean #trials<5 is not implemented? As far as I know it is (if 
not, tell us).

  Guido
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: microsoft server timeout! ??
Date: Wed, 23 Jan 2002 14:38:07 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2741

Huan,

I guess I wood need more information to even make an educated guess. What 
exactly is the testing script telling you is wrong?

  Guido

> Hi there,
> 
> I just sutmitted a test script. The microsoft server gave NOT OK, and the
> output is timeout!... All other servers are ok and this server used to
> work fine too.
> 
> Any hint?
> 
> Thanks!!

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine28.Stanford.EDU!pabbeel
From: Pieter Abbeel 
Newsgroups: su.class.cs244a
Subject: Re: microsoft server timeout! ??
Date: Wed, 23 Jan 2002 15:00:51 -0800
Lines: 27
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine28.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Guido Appenzeller 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2742

i just manually logged into microsoft (at least tried) and it said: max
number of connections reached (...) try again later

pieter


On Wed, 23 Jan 2002, Guido Appenzeller wrote:

> Huan,
>
> I guess I wood need more information to even make an educated guess. What
> exactly is the testing script telling you is wrong?
>
>   Guido
>
> > Hi there,
> >
> > I just sutmitted a test script. The microsoft server gave NOT OK, and the
> > output is timeout!... All other servers are ok and this server used to
> > work fine too.
> >
> > Any hint?
> >
> > Thanks!!
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic13.Stanford.EDU!wjiang
From: Huan Wanda Jiang 
Newsgroups: su.class.cs244a
Subject: Re: microsoft server timeout! ??
Date: Wed, 23 Jan 2002 15:04:40 -0800
Lines: 43
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Guido Appenzeller 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2743

Thanks Guido!

Attache is the error message.  I just submitted another test and it was
ok.
Thanks!
---------------------------------------------
    * Test D: Connects to server but does not transfer any matching files
in the specified levels [out of 3.5]

[SUMMARY] NOT OK
[RESULT]  test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie
exit line said: ""
---
Program output was:
TIMEOUT! killed program:
/afs/ir/class/cs244a/submissions/restricted/hw1/xwang00/wjiang//compile.sun/ftpc
opy txt 5 ftp.microsoft.com
/afs/ir/class/cs244a/submissions/restricted/hw1/xwang00/wjiang//compile.sun/down
load/ftp.microsoft.com /peropsys/ie   2199
--------------------------------------------------


On Wed, 23 Jan 2002, Guido Appenzeller wrote:

> Huan,
>
> I guess I wood need more information to even make an educated guess. What
> exactly is the testing script telling you is wrong?
>
>   Guido
>
> > Hi there,
> >
> > I just sutmitted a test script. The microsoft server gave NOT OK, and the
> > output is timeout!... All other servers are ok and this server used to
> > work fine too.
> >
> > Any hint?
> >
> > Thanks!!
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine25.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Error in actual submission
Date: Wed, 23 Jan 2002 15:48:32 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine25.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2744

I get the following while submitting.

....
a ./.purify 0K
a ./defines.h 1K
a ./fndefs.h 1K
a ./ftpparse.h 2K
a ./globals.h 1K

Submission succeeded.
Error: log: open: Permission denied

A problem statement has been e-mailed to the system
administrator 

How do I know if my assignment been submitted? Should I try another time?
I would appreciate a quick response - otherwise I would miss the deadline

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!hershd
From: Hersh Satyanarayan Dangayach 
Newsgroups: su.class.cs244a
Subject: Re: Error in actual submission
Date: Wed, 23 Jan 2002 16:53:43 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2745

I got the same response.

- Hersh



On Wed, 23 Jan 2002, Dhawal Kumar wrote:

> I get the following while submitting.
>
> ...
> a ./.purify 0K
> a ./defines.h 1K
> a ./fndefs.h 1K
> a ./ftpparse.h 2K
> a ./globals.h 1K
>
> Submission succeeded.
> Error: log: open: Permission denied
>
> A problem statement has been e-mailed to the system
> administrator 
>
> How do I know if my assignment been submitted? Should I try another time?
> I would appreciate a quick response - otherwise I would miss the deadline
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Error in actual submission
Date: Wed, 23 Jan 2002 16:56:59 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2746

Dhawal,

it looks like it is only a log file problem so you should be 
fine.

  Guido

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781

On Wed, 23 Jan 2002, Dhawal Kumar wrote:

> I get the following while submitting.
> 
> ...
> a ./.purify 0K
> a ./defines.h 1K
> a ./fndefs.h 1K
> a ./ftpparse.h 2K
> a ./globals.h 1K
> 
> Submission succeeded.
> Error: log: open: Permission denied
> 
> A problem statement has been e-mailed to the system
> administrator 
> 
> How do I know if my assignment been submitted? Should I try another time?
> I would appreciate a quick response - otherwise I would miss the deadline
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Submit Fails
Date: Wed, 23 Jan 2002 17:04:34 -0800
Lines: 59
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Anurag Gupta 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2747

Anurag,

your submission from 14:04 today is ok (see below).

  Guido

---

somewhere> tar -tzf */hw1/anuragg/*
../Makefile
../README
../ftpparse.c
../list.c
../file.c
../ftpcopy.c
../purify.output
../.purify
../ftpparse.h
../ftpcopy.h

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781

On Wed, 23 Jan 2002, Anurag Gupta wrote:

> 
> I submitted my assignment at 2:10 pm (Wednesday), I got the same error.
> 
> TAs, I hope this is still a false alarm.
> 
> -anurag
> 
> 
> 
> On Tue, 22 Jan 2002, Pablo Molinero wrote:
> 
> > As mentioned in the assignment handout, you have to have two
> > purify-related files, .purify and a purify.output, in your homework
> > directory before you can submit your code.
> >
> > Pablo
> >
> >
> > Shankar Agarwal wrote:
> >
> > > Hi,
> > > I am trying to submit hw1 and it has ftpcopy.purify in that directory but
> > > it still says that no .purify is present.
> > > Thanks
> > > Shankar
> > >
> > >
> >
> >
> >
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Symbolic Links and File Extensions
Date: Wed, 23 Jan 2002 17:06:32 -0800
Lines: 107
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2748

Dhawal,

well, I'd argue it is not very reasonable but for this assignment we'll
accept it as correct as file name handling is not the main focus of the
exercise.

Cheers,

  Guido

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781

On Wed, 23 Jan 2002, Dhawal Kumar wrote:

> 
> So is it reasonable to download link.lnk -> readme.txt when we are
> supposed to download txt files and name it link.lnk
> 
> Dhawal Kumar
> 
> On Wed, 23 Jan 2002, Xin Wang wrote:
> 
> > Any reasonable way to handle symbolic links is acceptable. As Pablo said
> > earlier, only very simple symbolic links will be tested, like the one in
> > the testing web page. Best, Xin
> >
> >
> >
> > On Tue, 22 Jan 2002, Dhawal Kumar wrote:
> >
> > > Excerpt from a previous posting:
> > >
> > > <snip>
> > > Correct.
> > >
> > >
> > > On Tue, 15 Jan 2002, Sandeep Tamhankar wrote:
> > >
> > > > Well, we download 'regular files', and recurse into subdirectories.  And
> > > > you seem to be saying to do both here.  So just to confirm:
> > > >
> > > > * If a symlink is pointing to a regular file, download the file, and
> > > > name it with the name of the symlink.
> > >
> > > </snip>
> > >
> > > This means if we are interested in txt files and we download link.lnk
> > > (as you suggest) the name on the local dir should be link.lnk whose
> > > extension is not txt. Is this acceptable? I thought that all files on
> > > local dir should have the ext specified.
> > >
> > > Dhawal Kumar
> > >
> > >
> > >
> > > On Tue, 22 Jan 2002, SUL\AIR Laneroom Cluster wrote:
> > >
> > > > Pete,
> > > > a symbolic link to a file of interest (because of the file's extention) should
> > > > always be followed and treated as a local file, i.e. should be copied. The idea
> > > > of the ftpclient
> > > > is to make local copies of particular files of interest. Symbolic links aren't
> > > > particularly interesting files since copying them locally may create dangling
> > > > references.
> > > >
> > > > So, the answer is yes to the first, no to the second!
> > > >
> > > > Regards,
> > > > Antonios.
> > > >
> > > >
> > > > Pete Belknap wrote:
> > > >
> > > > > What should we do when the symbolic link has a diff extension than the file
> > > > > it points to?
> > > > >
> > > > > So, for example, if we want to download .txt files and we have the link
> > > > >
> > > > > link.lnk  ->  readme.txt
> > > > >
> > > > > Should we download it?  Of course, the opposite question is, if we are
> > > > > interested in files of extension .lnk, should we download the link?  It
> > > > > seems to me that the answer to my first question should be no and the second
> > > > > should be yes...
> > > > >
> > > > > thanks,
> > > > > Pete
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > ---------------------------------
> > Xin Wang
> >
> > Department of Computer Science
> > Stanford University
> >
> > 
> >
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: PA2: STCP packet size vs. data size?
Date: Wed, 23 Jan 2002 17:10:04 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1011834605 26668 128.12.133.48 (24 Jan 2002 01:10:05 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: nntp.stanford.edu su.class.cs244a:2749

The handout on page 4 says the STCP packet size should be 536 bytes, but the
table on page 5 implies that this is the MSS (size of the data, not
including the header).

Are STCP packets 536 bytes of data + the header, or 536 bytes total?

Thanks,

Jonathan


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Problem Set 2, Problem 3
Date: Wed, 23 Jan 2002 19:23:35 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2750


Hello,

  I am wondering if problem 3 is missing a section, or if
figure 2(c) is extraneous. Thanks.

                ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Project #2
Date: Wed, 23 Jan 2002 20:02:01 -0800
Lines: 24
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2751

Hi,

  I think I am missing something in trying to understand project #2.
So if I am correct, we are writing a transport layer, over the given
network layer, so that client and server compile and run (assuming reliability
and in order delivery for the first part).
  I assume then that client/server will be using the tansport layer
which will use the network layer under the covers.  So we will have to provide
our own versions of connect, read, write, etc. which hides all the newfangled
work of syns/acks/fins/ etc.
    It seems that we then, have to write our own transport versions of
myconnect(..), myaccept() etc. so that the client will work without changing
the source, however, mysocket.c defines the symbol myconnect(..) with global
linkage so we are going to have a problem if we define a duplicate symbol.
    - Are we supposed to create new method names?
    - Are the new versions of myconnect(..) myaccept(..) etc. supposed to live in
      transport.c?
If some could please clear this up, I would forever be indebted. Thanks.

                            ~~m




.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Jonathan White Keljo 
Newsgroups: su.class.cs244a
Subject: Re: Project #2
Date: 24 Jan 2002 04:08:01 GMT
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine11.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2752

myconnect(), myaccept(), etc. are already written for us and are in 
mysocket.c. We're supposed to do all of the work to make transport.c 
actually work.

Jonathan

Martin Casado  wrote:
: Hi,

:   I think I am missing something in trying to understand project #2.
: So if I am correct, we are writing a transport layer, over the given
: network layer, so that client and server compile and run (assuming reliability
: and in order delivery for the first part).
:   I assume then that client/server will be using the tansport layer
: which will use the network layer under the covers.  So we will have to provide
: our own versions of connect, read, write, etc. which hides all the newfangled
: work of syns/acks/fins/ etc.
:     It seems that we then, have to write our own transport versions of
: myconnect(..), myaccept() etc. so that the client will work without changing
: the source, however, mysocket.c defines the symbol myconnect(..) with global
: linkage so we are going to have a problem if we define a duplicate symbol.
:     - Are we supposed to create new method names?
:     - Are the new versions of myconnect(..) myaccept(..) etc. supposed to live in
:       transport.c?
: If some could please clear this up, I would forever be indebted. Thanks.

:                             ~~m




.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Project #2
Date: Wed, 23 Jan 2002 20:44:27 -0800
Lines: 40
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2753


Ahh I see, mysock.c uses the transport layer which is where our code
is supposed to go. Got it :-) Thanks a bunch!

                ~~m


> myconnect(), myaccept(), etc. are already written for us and are in
> mysocket.c. We're supposed to do all of the work to make transport.c
> actually work.
>
> Jonathan
>
> Martin Casado  wrote:
> : Hi,
>
> :   I think I am missing something in trying to understand project #2.
> : So if I am correct, we are writing a transport layer, over the given
> : network layer, so that client and server compile and run (assuming reliability
> : and in order delivery for the first part).
> :   I assume then that client/server will be using the tansport layer
> : which will use the network layer under the covers.  So we will have to provide
> : our own versions of connect, read, write, etc. which hides all the newfangled
> : work of syns/acks/fins/ etc.
> :     It seems that we then, have to write our own transport versions of
> : myconnect(..), myaccept() etc. so that the client will work without changing
> : the source, however, mysocket.c defines the symbol myconnect(..) with global
> : linkage so we are going to have a problem if we define a duplicate symbol.
> :     - Are we supposed to create new method names?
> :     - Are the new versions of myconnect(..) myaccept(..) etc. supposed to live in
> :       transport.c?
> : If some could please clear this up, I would forever be indebted. Thanks.
>
> :                             ~~m
>
>
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: microsoft server timeout! ??
Date: Wed, 23 Jan 2002 23:46:42 -0800
Lines: 62
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1011858402 29645 128.12.133.48 (24 Jan 2002 07:46:42 GMT)
X-Complaints-To: 
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: nntp.stanford.edu su.class.cs244a:2754

This appears to be a result of the testing script deciding that your program
has been running for too long and killing your program. (At least that's my
guess since nowhere in my source code do you see the words "TIMEOUT! killed
program" and the ftp.microsoft.com test runs fine when I do it myself.) This
error popped up all of a sudden for me earlier this week...seems like the
TAs tweaked the timeout on the grading script a little too low.

Jonathan

"Huan Wanda Jiang"  wrote in message

> Thanks Guido!
>
> Attache is the error message.  I just submitted another test and it was
> ok.
> Thanks!
> ---------------------------------------------
>     * Test D: Connects to server but does not transfer any matching files
> in the specified levels [out of 3.5]
>
> [SUMMARY] NOT OK
> [RESULT]  test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie
> exit line said: ""
> ---
> Program output was:
> TIMEOUT! killed program:
>
/afs/ir/class/cs244a/submissions/restricted/hw1/xwang00/wjiang//compile.sun/
ftpc
> opy txt 5 ftp.microsoft.com
>
/afs/ir/class/cs244a/submissions/restricted/hw1/xwang00/wjiang//compile.sun/
down
> load/ftp.microsoft.com /peropsys/ie   2199
> --------------------------------------------------
>
>
> On Wed, 23 Jan 2002, Guido Appenzeller wrote:
>
> > Huan,
> >
> > I guess I wood need more information to even make an educated guess.
What
> > exactly is the testing script telling you is wrong?
> >
> >   Guido
> >
> > > Hi there,
> > >
> > > I just sutmitted a test script. The microsoft server gave NOT OK, and
the
> > > output is timeout!... All other servers are ok and this server used to
> > > work fine too.
> > >
> > > Any hint?
> > >
> > > Thanks!!
> >
> >
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Grading inormation - Problem Set #1
Date: Thu, 24 Jan 2002 11:36:12 -0800
Lines: 44
Distribution: su
Message-ID: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2755

Hi everyone,

below you find some more detailed information how the first home work
assignement is graded. It also contains information on what to do
if you have questions about the grading.

  Guido

------------------------------------------------------------------

** Grading System

For each problem or sometimes part of a problem you should find one
of four different marks next to the problem:

Check+ - Everything correct, no significant mistakes
Check  - Small mistakes but overall on the right path
Minus  - Major mistakes, overall direction still seems right
Zero   - Wrong approach or no answer given

These marks correspond to 100%, 66%, 33% and 0% of the points you
can get for the problem (e.g. a check in a problem worth 4.5 points
adds 3 points to your total). For some problems but not all of them
points where rounded up after adding the points of the subproblems.

** Who to contact with questions

If you have questions about the grading please contact the TA who
graded the particular problem directly. The best way to do this is
during office hours, however email works as well.

 Problem 1,6,8  Arun
 Problem 4,5    Antonios
 Problem 2,3    Xin
 Problem 7      Guido
 Problem 9      Matt

** Picking up your Home Work

If you did not pick up you homework in class you can find it in the
drawers on the 3d floor of Gates Building (turn left from the
elevators and look for white filing cabinets).


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: microsoft server timeout! ??
Date: Thu, 24 Jan 2002 11:40:21 -0800
Lines: 82
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2756

Jonathan,

the Microsoft web server was actually pretty swamped yesterday
afternoon with connections sometimes failing. For final grading
we will make sure this is not the case.

If your client is extremely inefficient and thus slow that 
would be a differet matter. But again, yesterday afternoon
is not a good test case.

  Guido

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781

On Wed, 23 Jan 2002, Jonathan Keljo wrote:

> This appears to be a result of the testing script deciding that your program
> has been running for too long and killing your program. (At least that's my
> guess since nowhere in my source code do you see the words "TIMEOUT! killed
> program" and the ftp.microsoft.com test runs fine when I do it myself.) This
> error popped up all of a sudden for me earlier this week...seems like the
> TAs tweaked the timeout on the grading script a little too low.
> 
> Jonathan
> 
> "Huan Wanda Jiang"  wrote in message
> 
> > Thanks Guido!
> >
> > Attache is the error message.  I just submitted another test and it was
> > ok.
> > Thanks!
> > ---------------------------------------------
> >     * Test D: Connects to server but does not transfer any matching files
> > in the specified levels [out of 3.5]
> >
> > [SUMMARY] NOT OK
> > [RESULT]  test used: ftpcopy txt 5 ftp.microsoft.com localdir /peropsys/ie
> > exit line said: ""
> > ---
> > Program output was:
> > TIMEOUT! killed program:
> >
> /afs/ir/class/cs244a/submissions/restricted/hw1/xwang00/wjiang//compile.sun/
> ftpc
> > opy txt 5 ftp.microsoft.com
> >
> /afs/ir/class/cs244a/submissions/restricted/hw1/xwang00/wjiang//compile.sun/
> down
> > load/ftp.microsoft.com /peropsys/ie   2199
> > --------------------------------------------------
> >
> >
> > On Wed, 23 Jan 2002, Guido Appenzeller wrote:
> >
> > > Huan,
> > >
> > > I guess I wood need more information to even make an educated guess.
> What
> > > exactly is the testing script telling you is wrong?
> > >
> > >   Guido
> > >
> > > > Hi there,
> > > >
> > > > I just sutmitted a test script. The microsoft server gave NOT OK, and
> the
> > > > output is timeout!... All other servers are ok and this server used to
> > > > work fine too.
> > > >
> > > > Any hint?
> > > >
> > > > Thanks!!
> > >
> > >
> >
> 
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Peter Belknap" 
Newsgroups: su.class.cs244a
Subject: hw2 question 5g)
Date: Thu, 24 Jan 2002 18:50:15 -0800
Lines: 35
Distribution: su
Message-ID: 
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2757

My traceroutes on question 5g) seem to be timing out when I tell it to start
from the router at UT.  It works fine when I do a traceroute from elaine5,
though.  Anybody know what's up?  The same thing was happening to me last
night.

Here is my output, with the special parts of traceroute that are part of the
answer left out:

elaine5:~> traceroute <options excluded> eecs.berkeley.edu
traceroute to eecs.berkeley.edu (169.229.60.28) from 128.83.37.21: 1-30
hops, 38 byte packets
 1  *  *  *
 2  *  *  *
 3  *  *  *
 4  *  *  *
 5  *  *  *
 6  *  *  *
 7  *  *  *
 8  *  *  *
 9  *  *  *
10  *  *  *
11  *  *  *
12  *  *  *
13  *  *  *
14  *  *  *
15  *  *  *
16  *  *  *
17  *  *  *
18  *  *  *
19  *  *  *

Thanks!
Pete


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Re: hw2 question 5g)
Date: Thu, 24 Jan 2002 21:48:34 -0800
Organization: Stanford University
Lines: 42
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 1011937660 9168 171.66.211.98 (25 Jan 2002 05:47:40 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2758

I just tried it (with the correct options)
and it worked fine for me.

- Nick



Peter Belknap wrote:
> 
> My traceroutes on question 5g) seem to be timing out when I tell it to start
> from the router at UT.  It works fine when I do a traceroute from elaine5,
> though.  Anybody know what's up?  The same thing was happening to me last
> night.
> 
> Here is my output, with the special parts of traceroute that are part of the
> answer left out:
> 
> elaine5:~> traceroute <options excluded> eecs.berkeley.edu
> traceroute to eecs.berkeley.edu (169.229.60.28) from 128.83.37.21: 1-30
> hops, 38 byte packets
>  1  *  *  *
>  2  *  *  *
>  3  *  *  *
>  4  *  *  *
>  5  *  *  *
>  6  *  *  *
>  7  *  *  *
>  8  *  *  *
>  9  *  *  *
> 10  *  *  *
> 11  *  *  *
> 12  *  *  *
> 13  *  *  *
> 14  *  *  *
> 15  *  *  *
> 16  *  *  *
> 17  *  *  *
> 18  *  *  *
> 19  *  *  *
> 
> Thanks!
> Pete
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Nick McKeown 
Newsgroups: su.class.cs244a
Subject: Problem Set 2: Missing Question 2(c)
Date: Thu, 24 Jan 2002 21:57:05 -0800
Organization: Stanford University
Lines: 25
Distribution: su
Message-ID: 
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 1011938172 9237 171.66.211.98 (25 Jan 2002 05:56:12 GMT)
X-Complaints-To: 
To: 
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2759


Someone pointed out that part (c) is missing
for Question #2. Part (c) asked what happens
when the link breaks (as shown in the figure).
Not sure where it went, but it seems to have
fallen off the problem set! 

My error, and so you don't have to do part (c). 
Just ignore the redundant Figure 2(c).

--------

While I have your attention, let me make a couple
of announcements that I forgot to make in class today:

1. Tomorrow (Friday) Arun will lead the discussion
   section. The topic will be Programming Assignment #2.
   I strongly encourage you to attend or watch on video.

2. You should read Sections 5.1, 5.2, 5.4 of Peterson 
   and Davie before class on Tuesday.

Have a good weekend,

- Nick
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: PA2: STCP packet size vs. data size?
Date: 25 Jan 2002 06:48:14 GMT
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine24.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2760

The payload is 536 bytes; the header is excluded from this byte count.

Arun

Jonathan Keljo  wrote:
: The handout on page 4 says the STCP packet size should be 536 bytes, but the
: table on page 5 implies that this is the MSS (size of the data, not
: including the header).

: Are STCP packets 536 bytes of data + the header, or 536 bytes total?

: Thanks,

: Jonathan


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Peter Belknap" 
Newsgroups: su.class.cs244a
Subject: Re: hw2 question 5g)
Date: Thu, 24 Jan 2002 23:03:29 -0800
Lines: 54
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2761

Nick is right.  My options were wrong.

Pete

"Nick McKeown"  wrote in message

> I just tried it (with the correct options)
> and it worked fine for me.
>
> - Nick
>
>
>
> Peter Belknap wrote:
> >
> > My traceroutes on question 5g) seem to be timing out when I tell it to
start
> > from the router at UT.  It works fine when I do a traceroute from
elaine5,
> > though.  Anybody know what's up?  The same thing was happening to me
last
> > night.
> >
> > Here is my output, with the special parts of traceroute that are part of
the
> > answer left out:
> >
> > elaine5:~> traceroute <options excluded> eecs.berkeley.edu
> > traceroute to eecs.berkeley.edu (169.229.60.28) from 128.83.37.21: 1-30
> > hops, 38 byte packets
> >  1  *  *  *
> >  2  *  *  *
> >  3  *  *  *
> >  4  *  *  *
> >  5  *  *  *
> >  6  *  *  *
> >  7  *  *  *
> >  8  *  *  *
> >  9  *  *  *
> > 10  *  *  *
> > 11  *  *  *
> > 12  *  *  *
> > 13  *  *  *
> > 14  *  *  *
> > 15  *  *  *
> > 16  *  *  *
> > 17  *  *  *
> > 18  *  *  *
> > 19  *  *  *
> >
> > Thanks!
> > Pete


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Romain Jean Thibaux 
Newsgroups: su.class.cs244a
Subject: register a callback
Date: Fri, 25 Jan 2002 18:12:16 -0800
Lines: 4
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic9.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2762

What does a "callback" mean ?
What does it mean to have it "registered" ?

	Romain
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: register a callback
Date: 26 Jan 2002 06:17:06 GMT
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga6.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2763

In the current model, this really does not mean much. This is just a flag 
(so you "register" it by setting it equal to 1) that you can use to decide 
if you want to invoke transport_sock_io or transport_appl_io.

Arun

 Romain Jean Thibaux  wrote:
: What does a "callback" mean ?
: What does it mean to have it "registered" ?

: 	Romain
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine2.Stanford.EDU!pabbeel
From: Pieter Abbeel 
Newsgroups: su.class.cs244a
Subject: mapping path between 2 hosts
Date: Sat, 26 Jan 2002 11:56:43 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2764

hi,

how does one map the path between 2 hosts like done in handout #4, slide
25?

thanks,
pieter
(i mean more detail than just play around with
ifconfig,traceroute,host,..)

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: EFAULT errno 14.
Date: Sat, 26 Jan 2002 13:48:43 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine7.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2765

Hi,
While sending packet to the server. After the 2 way handshake is completed
i get error when i do network_send for the first data packet. It says
errno 14 which is EFAULT. I am not sure why i am getting this problem. As
i was successful in sending the first packet on the udp socket and i have
not closed the socket in my child. So is there something i am missing. If
someone can suggest something then it will be of great help to me.Right
now its almost like black hole to me....
Thanks
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: mapping path between 2 hosts
Date: 26 Jan 2002 23:35:21 GMT
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine7.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2766

Pieter Abbeel  writes:

>hi,

>how does one map the path between 2 hosts like done in handout #4, slide
>25?

>thanks,
>pieter
>(i mean more detail than just play around with
>ifconfig,traceroute,host,..)


It might be helpful to rewatch the lecture (I think it was from a week
last Thursday) and work through an example from whichever system you're on.
The basic idea is to use traceroute to find the routers along the path,
and host to determine which interfaces on each router could have been used
for your path.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: EFAULT errno 14.
Date: 26 Jan 2002 23:41:29 GMT
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine7.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2767

Shankar Agarwal  writes:

>Hi,
>While sending packet to the server. After the 2 way handshake is completed
>i get error when i do network_send for the first data packet. It says
>errno 14 which is EFAULT. I am not sure why i am getting this problem. As
>i was successful in sending the first packet on the udp socket and i have
>not closed the socket in my child. So is there something i am missing. If
>someone can suggest something then it will be of great help to me.Right
>now its almost like black hole to me....

This could happen if you pass in a bad address (e.g. a null pointer)
or an invalid buffer length.  Without any more information, it's difficult
to say what's going wrong.  I'd suggest that you run in gdb to debug a
problem like this.

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!araik
From: Araik Grigoryan 
Newsgroups: su.class.cs244a
Subject: attaching to process in ddd
Date: Sat, 26 Jan 2002 15:42:17 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2768


Hi,

Does anyone know how to correctly attach to the child process in DDD? I've
tried it a few times and DDD hangs every time. Thanks.

araik

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine8.Stanford.EDU!htimam
From:  (Hasan Taufiq Imam)
Newsgroups: su.class.cs244a
Subject: Callback functions
Date: 26 Jan 2002 23:42:56 GMT
Organization: Stanford University, CA 94305, USA
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine8.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2769

Does callback feature have any use for us for the project? I am really 
confused. One place it says that appropriate function will get called 
depending on IO on peer socket or internal socket. On the other hand, 
we can check which sd is busy and call the functions. So are these two options
and we are supposed to choose one or the either. Or do we need to use both?
If we need to use both, why? Variables in CTX are set to one to register 
callback feature. Is that enough or we not do anything extra to activate 
callback? What else do we need to do? If we just need to use one procedure then
does one have any advantage over other. 
  
Hasan
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Callback functions
Date: 26 Jan 2002 23:59:31 GMT
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine7.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2770

 (Hasan Taufiq Imam) writes:

>Does callback feature have any use for us for the project? I am really 
>confused. One place it says that appropriate function will get called 
>depending on IO on peer socket or internal socket. On the other hand, 
>we can check which sd is busy and call the functions. So are these two options
>and we are supposed to choose one or the either. Or do we need to use both?
>If we need to use both, why? Variables in CTX are set to one to register 
>callback feature. Is that enough or we not do anything extra to activate 
>callback? What else do we need to do? If we just need to use one procedure then
>does one have any advantage over other. 
>  
>Hasan

These options are one and the same; i.e. you just have to check which socket
is busy, and call the appropriate callback function.

You needn't get hung up on the term "callback"; all this means here is that
you should have functions to process data from the peer and to process data
from the application, and that you should put the code to invoke the
appropriate one of these in control_loop().  If you look through transport.c,
you'll see that it's much simpler than it perhaps sounds at first.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Callback functions
Date: 27 Jan 2002 00:07:27 GMT
Lines: 28
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine7.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2771

 (Matthew Jonathan Holliman) writes:

 (Hasan Taufiq Imam) writes:

>>Does callback feature have any use for us for the project? I am really 
>>confused. One place it says that appropriate function will get called 
>>depending on IO on peer socket or internal socket. On the other hand, 
>>we can check which sd is busy and call the functions. So are these two options
>>and we are supposed to choose one or the either. Or do we need to use both?
>>If we need to use both, why? Variables in CTX are set to one to register 
>>callback feature. Is that enough or we not do anything extra to activate 
>>callback? What else do we need to do? If we just need to use one procedure then
>>does one have any advantage over other. 
>>  
>>Hasan

>These options are one and the same; i.e. you just have to check which socket
>is busy, and call the appropriate callback function.

>You needn't get hung up on the term "callback"; all this means here is that
>you should have functions to process data from the peer and to process data
>from the application, and that you should put the code to invoke the
>appropriate one of these in control_loop().  If you look through transport.c,
>you'll see that it's much simpler than it perhaps sounds at first.

BTW, just to follow on--there are a couple of FAQ entries about callbacks,
and about which parts of transport.c you can change or need to use.  It might
be worthwhile to look through it to clarify any questions.
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine5.Stanford.EDU!htimam
From:  (Hasan Taufiq Imam)
Newsgroups: su.class.cs244a
Subject: Peer address.
Date: 27 Jan 2002 03:53:09 GMT
Organization: Stanford University, CA 94305, USA
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine5.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2772

Who initializes peer address for network.c? Do I need to specify ports in 
tcp header or it does not matter? I could not find how fromaddr in global_net
_ctx got initialized? Would I be write if I said only variables in tcp_header
we need to worry about are th_seq, th_ack, th_flags. 
Hasan.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Romain Thibaux 
Newsgroups: su.class.cs244a
Subject: receiving and sending
Date: Sat, 26 Jan 2002 21:00:36 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic9.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2773

(what a broad title...)

The presence of callback functions only for incoming data seems to mean
that each time we receive data we do all we can to send it right away.
But we might block on write, which is bad because some data might still
be coming, isn't that right ? I assume I don't know if writes or reads
are fast or how long they block.

Also, if the writes are only done when we read something, ie inside the
callback function, then we'll have to handle packet retransmission
separately, which means the windows cannot be local to the callback
functions. I don't like global variables, but if you tell me that's the
way...

	Romain
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: receiving and sending
Date: Sat, 26 Jan 2002 22:48:36 -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
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2774

On Sat, 26 Jan 2002, Romain Thibaux wrote:

> (what a broad title...)
>
> The presence of callback functions only for incoming data seems to mean
> that each time we receive data we do all we can to send it right away.
> But we might block on write, which is bad because some data might still
> be coming, isn't that right ? I assume I don't know if writes or reads
> are fast or how long they block.

You could always poll the local data file descriptor for writing, and
if it is busy store the packet data in a temporary buffer.
If the temp buffer gets too full, stop acking the sender until
it frees up.

> Also, if the writes are only done when we read something, ie inside the
> callback function, then we'll have to handle packet retransmission
> separately, which means the windows cannot be local to the callback
> functions. I don't like global variables, but if you tell me that's the
> way...

I don't see why this necessarily means you will need globals, you could,
for example, stick the window in the context. Either way, globals aren't
horrendous in this framework since each socket gets a process for the transport
layer to work in.

                        ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Darren Lewis" 
Newsgroups: su.class.cs244a
Subject: Problem Set 2: Question 3a
Date: Sat, 26 Jan 2002 23:36:23 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: darren.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2775

For question 3a, are we only supposed to draw the contents of the routing
tables after they have initially stabilized, or do we have to show the
process of them stabilizing from their very first state?

-Darren


.

Path: shelby.stanford.edu!nntp.stanford.edu!epic5.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Re: EFAULT errno 14.
Date: Sat, 26 Jan 2002 23:43:53 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Matthew Jonathan Holliman 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2776

The socket is already in the connected state as its the active open from
the client side. The data len is also not zero. I am passing the name of
the file to be downloaded. As we are using sendmsg in the network.c i
don't know have the facility to check the send address. But the socket
descriptor is correct. Also the debugger does not take me below sendmsg
and as the return errno for the sendmsg is 14 i really don't understand
why it is so. Also i was able to exchange the SYN packet using that
socket.


On 26 Jan 2002, Matthew Jonathan Holliman wrote:

> Shankar Agarwal  writes:
>
> >Hi,
> >While sending packet to the server. After the 2 way handshake is completed
> >i get error when i do network_send for the first data packet. It says
> >errno 14 which is EFAULT. I am not sure why i am getting this problem. As
> >i was successful in sending the first packet on the udp socket and i have
> >not closed the socket in my child. So is there something i am missing. If
> >someone can suggest something then it will be of great help to me.Right
> >now its almost like black hole to me....
>
> This could happen if you pass in a bad address (e.g. a null pointer)
> or an invalid buffer length.  Without any more information, it's difficult
> to say what's going wrong.  I'd suggest that you run in gdb to debug a
> problem like this.
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: SYN then FIN
Date: Sat, 26 Jan 2002 23:55:58 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2777


Hi,

 What is the expected behavior if the active socket sends
a SYN and gets a FIN, a FIN-ACK or a data packet in reply.
Should this packet be dropped or should the entire connection
be dropped? (i.e. should the active side close down the socket)
Thanks :-)

            ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic22.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Getting the data on the data_sd[1] in the child.
Date: Sun, 27 Jan 2002 12:23:16 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic22.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2778

Hi,
My child process (i.e. tcp layer) is getting the same data back on
data_sd[1] which it is seding to the parent process i.e. the client. As a
result of this the program is in infinite loop.
Can someone please tell me what could be wrong with it.
Regards
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Peer address.
Date: 27 Jan 2002 22:46:20 GMT
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga11.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2779

Those fields get initialized upon the first call to network_recv. They are then available to transmission 
to the parent process over the syn_ds socket.

Arun

Hasan Taufiq Imam  wrote:
: Who initializes peer address for network.c? Do I need to specify ports in 
: tcp header or it does not matter? I could not find how fromaddr in global_net
: _ctx got initialized? Would I be write if I said only variables in tcp_header
: we need to worry about are th_seq, th_ack, th_flags. 
: Hasan.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Problem Set 2: Question 3a
Date: 27 Jan 2002 23:13:13 GMT
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga14.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2780

For this question, we only care about the final tables.

Good luck,

Arun

Darren Lewis  wrote:
: For question 3a, are we only supposed to draw the contents of the routing
: tables after they have initially stabilized, or do we have to show the
: process of them stabilizing from their very first state?

: -Darren


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine39.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: SYN then FIN
Date: 28 Jan 2002 00:53:33 GMT
Lines: 10
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine39.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2781


> What is the expected behavior if the active socket sends
>a SYN and gets a FIN, a FIN-ACK or a data packet in reply.
>Should this packet be dropped or should the entire connection
>be dropped? (i.e. should the active side close down the socket)
>Thanks :-)

A reasonable (and simple) approach would be to just ignore that segment,
and wait for the SYN-ACK to turn up.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine39.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Getting the data on the data_sd[1] in the child.
Date: 28 Jan 2002 01:03:47 GMT
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine39.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2782


>My child process (i.e. tcp layer) is getting the same data back on
>data_sd[1] which it is seding to the parent process i.e. the client. As a
>result of this the program is in infinite loop.
>Can someone please tell me what could be wrong with it.

Could you describe what you observed when you stepped through in gdb?

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: PS2, 3(b)
Date: Sun, 27 Jan 2002 21:13:30 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2783

So when the link is added, the tables are not reset?  If this is the case,
those routers connected to the new link update their tables and the new
costs are iteratively sent out as in the normal Bellman-Ford algo?

Thanks for your help,
Bret



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: callbacks
Date: Sun, 27 Jan 2002 21:34:45 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2784

Hey folks,

Where does the whole "callback" thing mentioned
on the FAQ and the previous posts fit in?

Does it simply refer to using select to wait for events,
and then using a switch statement to handle the
event appropriately?

Thanks,
.

Path: shelby.stanford.edu!nntp.stanford.edu!epic17.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Re: Getting the data on the data_sd[1] in the child.
Date: Sun, 27 Jan 2002 21:39:10 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: epic17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Matthew Jonathan Holliman 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2785

Hi Jonathan,
I was able to figure out both the problems. I was not using nework_send
properly. We should pass a NULL in the end which was leading to the
failure of my send call. Also i was not checking for the return len of 0
for the local_data_sock which was creating the problem of loopback. Which
was not exactly loopback. Thanks a lot.
Shankar
 On 28 Jan 2002, Matthew Jonathan
Holliman wrote:

>
> >My child process (i.e. tcp layer) is getting the same data back on
> >data_sd[1] which it is seding to the parent process i.e. the client. As a
> >result of this the program is in infinite loop.
> >Can someone please tell me what could be wrong with it.
>
> Could you describe what you observed when you stepped through in gdb?
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic17.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Regarding the compilation.
Date: Sun, 27 Jan 2002 22:06:13 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic17.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2786

Hi,
I am not sure whats wrong with the environment where the code submitted
for test is compile. But i am able to compile in my local directory but
when i submitted the code for test it gave me compilation error.
The errors that i got were for the retxQueue. I have define this structure
in transport.h which i submitted with the code. But still it is not able
to see it. Can you please have a look at it.
Thanks
Shankar

 transport.c:109: field
`retxQueue' has
incomplete type transport.c:110: field `recvQueue' has incomplete type
transport.c: In function `transport_appl_io':
transport.c:641: sizeof applied to an incomplete type
transport.c:647: dereferencing pointer to incomplete type
transport.c:648: dereferencing pointer to incomplete type
transport.c:649: dereferencing pointer to incomplete typeA

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Xiaoyan Cheng 
Newsgroups: su.class.cs244a
Subject: two-way handshake?
Date: Sun, 27 Jan 2002 22:21:14 -0800
Lines: 2
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga9.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2787

Is it okay if we just implement 2-way handshake(instead of 3-way
handshake)?
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: on testing
Date: Sun, 27 Jan 2002 22:48:46 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2788

Hi,

  I'm passing all of the tests except for the ones which use
the TA's receiver... and I'm really not sure why. Is it against
the rules/honor code to modify my transport.c to open a file
in a shared directory of mine, and write out a bunch of
debug code during testing? (like all packets sent by
the TA's receiver)
  I'm assuming that this is not allowed.... but it never
hurts to ask (I hope) :-)

                    ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine11.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: Re: Regarding the compilation.
Date: Mon, 28 Jan 2002 01:16:38 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2789

I guess the submit script doesnt take anything else than transport.c from
your directory. Look at the deliverables for HW2.A

-anurag



On Sun, 27 Jan 2002, Shankar Agarwal wrote:

> Hi,
> I am not sure whats wrong with the environment where the code submitted
> for test is compile. But i am able to compile in my local directory but
> when i submitted the code for test it gave me compilation error.
> The errors that i got were for the retxQueue. I have define this structure
> in transport.h which i submitted with the code. But still it is not able
> to see it. Can you please have a look at it.
> Thanks
> Shankar
>
>  transport.c:109: field
> `retxQueue' has
> incomplete type transport.c:110: field `recvQueue' has incomplete type
> transport.c: In function `transport_appl_io':
> transport.c:641: sizeof applied to an incomplete type
> transport.c:647: dereferencing pointer to incomplete type
> transport.c:648: dereferencing pointer to incomplete type
> transport.c:649: dereferencing pointer to incomplete typeA
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Re: on testing
Date: Mon, 28 Jan 2002 10:16:37 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2790

I too am passing all of the tests except for the parts which use the TA's
receiver (both parts of Test 1.B).  I have no idea why, as in my own tests
the transmitter appears to work fine.

-Russ

"Martin Casado"  wrote in message

> Hi,
>
>   I'm passing all of the tests except for the ones which use
> the TA's receiver... and I'm really not sure why. Is it against
> the rules/honor code to modify my transport.c to open a file
> in a shared directory of mine, and write out a bunch of
> debug code during testing? (like all packets sent by
> the TA's receiver)
>   I'm assuming that this is not allowed.... but it never
> hurts to ask (I hope) :-)
>
>                     ~~m
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: SIGINT handling?
Date: Mon, 28 Jan 2002 11:14:56 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2791


Child process seems to be calling sigint_handler() on SIGINT, which just
exits with exit(1).
But I wonder why we implement this way of behavior for SIGINT signal...
What kind of interrupts are we expecting here?
( This may be unimpotant for this assignment.. but I'm curioius.. )



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: PS2, 3(b)
Date: 28 Jan 2002 19:26:53 GMT
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine3.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2792

"Bret Taylor"  writes:

>So when the link is added, the tables are not reset?  If this is the case,
>those routers connected to the new link update their tables and the new
>costs are iteratively sent out as in the normal Bellman-Ford algo?

Yep, that's correct.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: callbacks
Date: 28 Jan 2002 19:32:28 GMT
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine3.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2793

Luis Robles  writes:

>Hey folks,

>Where does the whole "callback" thing mentioned
>on the FAQ and the previous posts fit in?

>Does it simply refer to using select to wait for events,
>and then using a switch statement to handle the
>event appropriately?

Yes, that's about it.  (Basically, if you ignore the whole callback name
and description, and just think through how you would most naturally
implement the solution--the chances are very good that it will be exactly
what the "callback" was intending!)

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: two-way handshake?
Date: 28 Jan 2002 19:48:14 GMT
Lines: 9
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine3.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2794

Xiaoyan Cheng  writes:

>Is it okay if we just implement 2-way handshake(instead of 3-way
>handshake)?

I'm not quite sure what you're referring to; the STCP specification in
the assignment explicitly requires two-way SYN handshake rather than
the three-way handshake that TCP uses.  Could you clarify?

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: SIGINT handling?
Date: 28 Jan 2002 19:51:47 GMT
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine3.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2795

"BAEHOPIL"  writes:


>Child process seems to be calling sigint_handler() on SIGINT, which just
>exits with exit(1).
>But I wonder why we implement this way of behavior for SIGINT signal...
>What kind of interrupts are we expecting here?
>( This may be unimpotant for this assignment.. but I'm curioius.. )

SIGINT in this case is Ctrl-C.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Regarding the compilation.
Date: 28 Jan 2002 20:22:55 GMT
Lines: 19
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine3.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2796

Anurag Gupta  writes:

>I guess the submit script doesnt take anything else than transport.c from
>your directory. Look at the deliverables for HW2.A

>-anurag

>> I am not sure whats wrong with the environment where the code submitted
>> for test is compile. But i am able to compile in my local directory but
>> when i submitted the code for test it gave me compilation error.
>> The errors that i got were for the retxQueue. I have define this structure
>> in transport.h which i submitted with the code. But still it is not able
>> to see it. Can you please have a look at it.

Keep in mind that transport.h is a symbolic link to the original
version (assuming you used the gethw2 script); you should not need
(and in fact are not permitted) to make modifications to this file.
You should only need to change transport.c for the first two parts
of the assignment.
.

Path: shelby.stanford.edu!nntp.stanford.edu!epic24.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Regarding the test scprit.
Date: Mon, 28 Jan 2002 12:44:40 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic24.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2797

Hi,
I am seeing a strange problem with the test scpirt. My tests are failing
for the cases when TA's program is supposed to act as a receiver. I don't
see this problem in my testing. Is it possible to get hold of the binary
which does this testing. As the result does not give much information
regarding what went wrong while testing my program. Is it also possible to
get the files which the TA's script is trying to transfer. So that we can
use them to test to figure out what went wrong.
Thanks
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: on testing
Date: Mon, 28 Jan 2002 12:48:22 -0800
Lines: 34
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012250903 14833 128.12.133.48 (28 Jan 2002 20:48:23 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: nntp.stanford.edu su.class.cs244a:2798

You guys must be violating the standard somehow. Read the handout very
carefully to make sure your behavior is correct. You might also try running
your client against another student's server and vice versa, if you could
manage to do so without ever looking at their code. ;-)

Jonathan

"Russell Greene"  wrote in message

> I too am passing all of the tests except for the parts which use the TA's
> receiver (both parts of Test 1.B).  I have no idea why, as in my own tests
> the transmitter appears to work fine.
>
> -Russ
>
> "Martin Casado"  wrote in message
> 
> > Hi,
> >
> >   I'm passing all of the tests except for the ones which use
> > the TA's receiver... and I'm really not sure why. Is it against
> > the rules/honor code to modify my transport.c to open a file
> > in a shared directory of mine, and write out a bunch of
> > debug code during testing? (like all packets sent by
> > the TA's receiver)
> >   I'm assuming that this is not allowed.... but it never
> > hurts to ask (I hope) :-)
> >
> >                     ~~m
> >
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Xiaoyan Cheng 
Newsgroups: su.class.cs244a
Subject: Re: two-way handshake?
Date: Mon, 28 Jan 2002 14:07:26 -0800
Lines: 12
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: fable2.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2799

Matthew Jonathan Holliman wrote:
> 
> Xiaoyan Cheng  writes:
> 
> >Is it okay if we just implement 2-way handshake(instead of 3-way
> >handshake)?
> 
> I'm not quite sure what you're referring to; the STCP specification in
> the assignment explicitly requires two-way SYN handshake rather than
> the three-way handshake that TCP uses.  Could you clarify?

That's all that I wanted to know, thanks.
.

Path: shelby.stanford.edu!nntp.stanford.edu!epic26.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Can you please clarify what this error means.
Date: Mon, 28 Jan 2002 18:38:21 -0800
Lines: 50
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic26.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2800

Hi,
I am getting the following errors when i submit the script for the part
1B. I am not able to figure out what exactly is it saying. Is it that the
receiver gets more data or is it receiving less data.
Moreover there are 3 figures for each TESTDATA. what each of them means.
Thanks
Regards
Shankar
===============

    * Test 1.B: Transmitter fails to work in reliable mode with our
Receiver
        [out of 10]

[SUMMARY] NOT OK
[RESULT]
===========================
===(T1.Ba) Byte count differences found (INCORRECT!)

---
Difference between expected result and your result:
1,3c1,3
<    2641   15865  110230 TESTDATA.0
<    1786    9963  299328 TESTDATA.1
<     125     536    5098 TESTDATA.2
---
>    2666   15720  110230 TESTDATA.0
>    1812   10049  299328 TESTDATA.1
>     131     501    5098 TESTDATA.2

---

===========================
===(T1.Bb) Checksum differences found (INCORRECT!)

---
Difference between expected result and your result:
1,3c1,3
< 3108646830 110230 TESTDATA.0
< 4231670217 299328 TESTDATA.1
< 2946179251 5098 TESTDATA.2
---
> 1705403052 110230 TESTDATA.0
> 4265638025 299328 TESTDATA.1
> 2181702833 5098 TESTDATA.2

---

===============

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!araik
From: Araik Grigoryan 
Newsgroups: su.class.cs244a
Subject: attaching to process in ddd - instructions
Date: Mon, 28 Jan 2002 20:18:32 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Abhishek Das 
Xref: nntp.stanford.edu su.class.cs244a:2801


Here you go ...

1. Put sleep(30) somewhere in the child process. Compile.
2. Open DDD and open the client executable via the File menu.
3. By clicking on function names, make your way down to the location where
you placed the sleep and insert a break point right after the sleep
statement.
4. Now run the client with all it's arguments on the command line
(outside DDD, of course).
5. Go back to DDD and choose Attach Process from the File menu. Choose the
process of the child and wait until sleep is done.
6. If you see that nothing is happening for a long time, just click Next
or Step once and you will see the pointer.
7. You can do the same for the server.

araik



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Regarding the test scprit.
Date: Mon, 28 Jan 2002 20:27:09 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma13.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2802


Shankar,
the testing platform should be familiar to you by
now:) I'm afraid, everyone in the class has to work with
the test scripts given. Last year people didn't even
have this flexibility!

Regards,
Antonios.

Shankar Agarwal wrote:

> Hi,
> I am seeing a strange problem with the test scpirt. My tests are failing
> for the cases when TA's program is supposed to act as a receiver. I don't
> see this problem in my testing. Is it possible to get hold of the binary
> which does this testing. As the result does not give much information
> regarding what went wrong while testing my program. Is it also possible to
> get the files which the TA's script is trying to transfer. So that we can
> use them to test to figure out what went wrong.
> Thanks
> Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: SUL\\AIR Laneroom Cluster 
Newsgroups: su.class.cs244a
Subject: Re: Can you please clarify what this error means.
Date: Mon, 28 Jan 2002 20:32:17 -0800
Lines: 68
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: sul-lr-ozma13.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.76 [en]C-CCK-MCD   (Windows NT 5.0; U)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2803

Shankar,

the numbers in the first test your code fails are
BYTE counts. the top ones are the expected
and the bottom ones are yours. As far as I can
tell, in some cases your code transmits fewer bytes
and in some more.

The other numbers are just checksum numbers
with no particular meaning to you, other than
that your data isn't correctly transmitted (it gets
corrupted somewhere, overwritten, contains garbage etc.)

Regards,
Antonios.

Shankar Agarwal wrote:

> Hi,
> I am getting the following errors when i submit the script for the part
> 1B. I am not able to figure out what exactly is it saying. Is it that the
> receiver gets more data or is it receiving less data.
> Moreover there are 3 figures for each TESTDATA. what each of them means.
> Thanks
> Regards
> Shankar
> ===============
>
>     * Test 1.B: Transmitter fails to work in reliable mode with our
> Receiver
>         [out of 10]
>
> [SUMMARY] NOT OK
> [RESULT]
> ===========================
> ===(T1.Ba) Byte count differences found (INCORRECT!)
>
> ---
> Difference between expected result and your result:
> 1,3c1,3
> <    2641   15865  110230 TESTDATA.0
> <    1786    9963  299328 TESTDATA.1
> <     125     536    5098 TESTDATA.2
> ---
> >    2666   15720  110230 TESTDATA.0
> >    1812   10049  299328 TESTDATA.1
> >     131     501    5098 TESTDATA.2
>
> ---
>
> ===========================
> ===(T1.Bb) Checksum differences found (INCORRECT!)
>
> ---
> Difference between expected result and your result:
> 1,3c1,3
> < 3108646830 110230 TESTDATA.0
> < 4231670217 299328 TESTDATA.1
> < 2946179251 5098 TESTDATA.2
> ---
> > 1705403052 110230 TESTDATA.0
> > 4265638025 299328 TESTDATA.1
> > 2181702833 5098 TESTDATA.2
>
> ---
>
> ===============

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: finserver compile error
Date: Mon, 28 Jan 2002 21:01:52 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2804

Is anyone else getting this compile error?

saga7:~/cs244a/hw2> make all
umask 022
gcc -g -ansi -DSOLARIS  -c client.c
gcc -g -ansi -DSOLARIS  -c transport.c
gcc -g -ansi -DSOLARIS  -c network.c
gcc -g -ansi -DSOLARIS  -c mysock.c
gcc -g -ansi -DSOLARIS  -o client client.o transport.o network.o
mysock.o -lsocket -lnsl -lm
gcc -g -ansi -DSOLARIS  -c server.c
gcc -o server server.o transport.o network.o mysock.o -lsocket -lnsl -lm 
make: *** No rule to make target `finserver.o', needed by `finserver'. 
Stop.
saga7:~/cs244a/hw2> 

I used the gethw2 script, and have not modified
the makefile,

Thanks....
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Sequence number clarifications
Date: Mon, 28 Jan 2002 21:17:03 -0800
Lines: 23
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2805

Hello,

  I would greatly appreciate it if someone could help me clear up
a few questions I have about sequence numbering...

Assume the active end starts the connection with seqx, and the passive
replies with seqy (acking with seqx+1)

1. The assignment sheet states that the active end records seqy so that it
   will expect the next byte of the passive end to start at seqy+1, can
   we also assume that the passive end expects the active end to start at
   seqx+1? (this isn't stated either way)

2. For acknowledgements, the project sheet says to set the "ack_seq" field to
   the sequence number of the next byte of data the receiver expects.  tcp_hdr
   has no ack_seq field, do we set th_ack or th_seq to this value, or both?

3. Do we have to place/handle a value in the th_seq field of data packets?

Thanks :-)

                    ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga11.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: Re: finserver compile error
Date: Mon, 28 Jan 2002 21:54:10 -0800
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2806

I got the same error.

On Mon, 28 Jan 2002, Luis Robles wrote:

> Is anyone else getting this compile error?
>
> saga7:~/cs244a/hw2> make all
> umask 022
> gcc -g -ansi -DSOLARIS  -c client.c
> gcc -g -ansi -DSOLARIS  -c transport.c
> gcc -g -ansi -DSOLARIS  -c network.c
> gcc -g -ansi -DSOLARIS  -c mysock.c
> gcc -g -ansi -DSOLARIS  -o client client.o transport.o network.o
> mysock.o -lsocket -lnsl -lm
> gcc -g -ansi -DSOLARIS  -c server.c
> gcc -o server server.o transport.o network.o mysock.o -lsocket -lnsl -lm
> make: *** No rule to make target `finserver.o', needed by `finserver'.
> Stop.
> saga7:~/cs244a/hw2>
>
> I used the gethw2 script, and have not modified
> the makefile,
>
> Thanks....
>

Abhishek Das
Graduate Research Assistant
Computer Systems Lab
Stanford University

Address:-
Escondido Village 33B
Stanford CA 94305

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga11.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: bind and gethostname
Date: Mon, 28 Jan 2002 22:02:12 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga11.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2807

hi

I remember from last assignment that bind() followed by getsockname(),
 before calling accept(), didn't give the correctlocal IP address. How
come in this assignment, we call mybind() followed by myaccept(), which
uses getsockname() before calling transport_init()? Don't we need to
have `sin' reflect the correct IP address by calling gethostname()?

thanks
Abhishek Das
Graduate Research Assistant
Computer Systems Lab
Stanford University

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: Re: finserver compile error
Date: Mon, 28 Jan 2002 22:07:06 -0800
Lines: 44
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2808

I've also tried redownloading the hw2 files
into another directory using the gethw2 script
and I still get the error...

What is finserver anyway? Should I just
comment it out of the makefile to see
if it compiles then?

Abhishek Das wrote:
> 
> I got the same error.
> 
> On Mon, 28 Jan 2002, Luis Robles wrote:
> 
> > Is anyone else getting this compile error?
> >
> > saga7:~/cs244a/hw2> make all
> > umask 022
> > gcc -g -ansi -DSOLARIS  -c client.c
> > gcc -g -ansi -DSOLARIS  -c transport.c
> > gcc -g -ansi -DSOLARIS  -c network.c
> > gcc -g -ansi -DSOLARIS  -c mysock.c
> > gcc -g -ansi -DSOLARIS  -o client client.o transport.o network.o
> > mysock.o -lsocket -lnsl -lm
> > gcc -g -ansi -DSOLARIS  -c server.c
> > gcc -o server server.o transport.o network.o mysock.o -lsocket -lnsl -lm
> > make: *** No rule to make target `finserver.o', needed by `finserver'.
> > Stop.
> > saga7:~/cs244a/hw2>
> >
> > I used the gethw2 script, and have not modified
> > the makefile,
> >
> > Thanks....
> >
> 
> Abhishek Das
> Graduate Research Assistant
> Computer Systems Lab
> Stanford University
> 
> Address:-
> Escondido Village 33B
> Stanford CA 94305
.

Path: shelby.stanford.edu!nntp.stanford.edu!epic24.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Regarding Wrap arong (UINT_MAX)
Date: Mon, 28 Jan 2002 22:10:39 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic24.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2809

Hi,
Can we assume that the files transfered will be less than 4 GB so that we
don't have to bother about the wrap aroung. Also i think the data_len and
seq_num should be send in network order. Is that right.
Thanks
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Test Script Issues
Date: Mon, 28 Jan 2002 22:38:58 -0800
Lines: 57
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2810

Hi All,

     I tested my client and server against Martin's respective server and
client and we were able to transfer multiple large files back and fourth
without any problems.  However both of us have been getting test results of
the type that appear below.  This leads me to believe that either both of us
have misunderstood the assignment (in very similar ways), or there is a
problem with the test script.  I ask the TAs to please double check this
part of the test script and verify its functionalty as we aren't the only
two students who are running into this problem.  Thanks!

--Russ

   * Test 1.B: Transmitter fails to work in reliable mode with our Receiver
        [out of 10]


[SUMMARY] NOT OK
[RESULT]
===========================
===(T1.Ba) Byte count differences found (INCORRECT!)


---
Difference between expected result and your result:
1,2c1,2
<    2641   15865  110230 TESTDATA.0
<     600    3170   92696 TESTDATA.1
---
>    2666   15720  110230 TESTDATA.0
>    1812   10049  299328 TESTDATA.1


---


===========================
===(T1.Bb) Checksum differences found (INCORRECT!)


---
Difference between expected result and your result:
1,2c1,2
< 3108646830 110230 TESTDATA.0
< 3014550704 92696 TESTDATA.1
---
> 1705403052 110230 TESTDATA.0
> 4265638025 299328 TESTDATA.1


---



===============


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine41.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: unable to network_send stcpHeader
Date: Mon, 28 Jan 2002 22:49:24 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine41.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2811


I am unable to send stcpHeader using network_send. I am able though to
send an arbitrary string.

I know this is trivial, thats why I am asking :-)

any ideas?
-anurag

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine24.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Processing ACKS etc.
Date: Mon, 28 Jan 2002 23:42:52 -0800
Lines: 6
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine24.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2812

Since we can assume in first part of assignment 2 that packets are not
lost, do we need to worry about what an ACK packet has to tell? And do we
need to worry about send and recv windows?

Dhawal Kumar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: When there are several child processes..
Date: Mon, 28 Jan 2002 23:52:15 -0800
Lines: 21
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2813


This seems to be very basic... so I'm sorry to ask, but I need some
clarification...

Suppose 4 clients connect to the same server.
Then the server has 4 child processes for each connection,
  but the connections are all on the same UDP receiving port..
Server-side child processes will have to determine whether a received packet
is
for them or not, by looking at the source address of the packet.

My question is,
 if a packet arrives to the UDP port and one of the children reads it first,
 is the packet still available for reading by the rest of the children?

And, is the assignment going to be tested under multi-client situation?

Any corrections or comments please...



.

Path: shelby.stanford.edu!nntp.stanford.edu!manzanares.Stanford.EDU!molinero
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: finserver compile error
Date: Tue, 29 Jan 2002 00:08:42 -0800
Lines: 56
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2814


An incorrect Makefile was included in the HW2 directory. You can get the 
correct Makefile either by copying the file 
/afs/ir/class/cs244a/WWW/homeworks/hw2/src/Makefile or by calling gethw2 
in a *NEW* directory, and then copy your files over.

Pablo

On Mon, 28 Jan 2002, Luis Robles wrote:

> I've also tried redownloading the hw2 files
> into another directory using the gethw2 script
> and I still get the error...
> 
> What is finserver anyway? Should I just
> comment it out of the makefile to see
> if it compiles then?
> 
> Abhishek Das wrote:
> > 
> > I got the same error.
> > 
> > On Mon, 28 Jan 2002, Luis Robles wrote:
> > 
> > > Is anyone else getting this compile error?
> > >
> > > saga7:~/cs244a/hw2> make all
> > > umask 022
> > > gcc -g -ansi -DSOLARIS  -c client.c
> > > gcc -g -ansi -DSOLARIS  -c transport.c
> > > gcc -g -ansi -DSOLARIS  -c network.c
> > > gcc -g -ansi -DSOLARIS  -c mysock.c
> > > gcc -g -ansi -DSOLARIS  -o client client.o transport.o network.o
> > > mysock.o -lsocket -lnsl -lm
> > > gcc -g -ansi -DSOLARIS  -c server.c
> > > gcc -o server server.o transport.o network.o mysock.o -lsocket -lnsl -lm
> > > make: *** No rule to make target `finserver.o', needed by `finserver'.
> > > Stop.
> > > saga7:~/cs244a/hw2>
> > >
> > > I used the gethw2 script, and have not modified
> > > the makefile,
> > >
> > > Thanks....
> > >
> > 
> > Abhishek Das
> > Graduate Research Assistant
> > Computer Systems Lab
> > Stanford University
> > 
> > Address:-
> > Escondido Village 33B
> > Stanford CA 94305
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!manzanares.Stanford.EDU!molinero
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: Can you please clarify what this error means.
Date: Tue, 29 Jan 2002 00:39:39 -0800
Lines: 88
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2815


Hi,

After revising the code for the grading script for part 1.B, there was a 
mislabeling of the test. In fact the test that was being performed was 1.C 
"Our Tx against student's Rx (reliable mode)". So up until now, test 1.B 
was labeled 1.C, and test 1.C was labeled 1.B in the report that you got.
I appologize for the confusion this typo may have caused.

In your case, Shankar, your receiver is writing the right amount of data
(file sizes are OK), but the contents are not, the checksum and the number
of \n [new lines] are different than in the original file.

Pablo


On Mon, 28 Jan 2002, SUL\AIR Laneroom Cluster wrote:

> Shankar,
> 
> the numbers in the first test your code fails are
> BYTE counts. the top ones are the expected
> and the bottom ones are yours. As far as I can
> tell, in some cases your code transmits fewer bytes
> and in some more.
> 
> The other numbers are just checksum numbers
> with no particular meaning to you, other than
> that your data isn't correctly transmitted (it gets
> corrupted somewhere, overwritten, contains garbage etc.)
> 
> Regards,
> Antonios.
> 
> Shankar Agarwal wrote:
> 
> > Hi,
> > I am getting the following errors when i submit the script for the part
> > 1B. I am not able to figure out what exactly is it saying. Is it that the
> > receiver gets more data or is it receiving less data.
> > Moreover there are 3 figures for each TESTDATA. what each of them means.
> > Thanks
> > Regards
> > Shankar
> > ===============
> >
> >     * Test 1.B: Transmitter fails to work in reliable mode with our
> > Receiver
> >         [out of 10]
> >
> > [SUMMARY] NOT OK
> > [RESULT]
> > ===========================
> > ===(T1.Ba) Byte count differences found (INCORRECT!)
> >
> > ---
> > Difference between expected result and your result:
> > 1,3c1,3
> > <    2641   15865  110230 TESTDATA.0
> > <    1786    9963  299328 TESTDATA.1
> > <     125     536    5098 TESTDATA.2
> > ---
> > >    2666   15720  110230 TESTDATA.0
> > >    1812   10049  299328 TESTDATA.1
> > >     131     501    5098 TESTDATA.2
> >
> > ---
> >
> > ===========================
> > ===(T1.Bb) Checksum differences found (INCORRECT!)
> >
> > ---
> > Difference between expected result and your result:
> > 1,3c1,3
> > < 3108646830 110230 TESTDATA.0
> > < 4231670217 299328 TESTDATA.1
> > < 2946179251 5098 TESTDATA.2
> > ---
> > > 1705403052 110230 TESTDATA.0
> > > 4265638025 299328 TESTDATA.1
> > > 2181702833 5098 TESTDATA.2
> >
> > ---
> >
> > ===============
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth9.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: Regarding Wrap arong (UINT_MAX)
Date: Tue, 29 Jan 2002 01:24:51 -0800
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth9.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Shankar Agarwal 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2816


Hi Shankar,

from the faq, we dont need to handle the wrap around for
sequence nos.

Thanks, Arvind

On Mon, 28 Jan 2002, Shankar Agarwal wrote:

> Hi,
> Can we assume that the files transfered will be less than 4 GB so that we
> don't have to bother about the wrap aroung. Also i think the data_len and
> seq_num should be send in network order. Is that right.
> Thanks
> Shankar
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: attaching to process in ddd - instructions
Date: Tue, 29 Jan 2002 02:36:31 -0800
Lines: 39
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012300562 22459 128.12.133.48 (29 Jan 2002 10:36:02 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: nntp.stanford.edu su.class.cs244a:2817

Even quicker:

1. put sleep(30)
2. run client
3. from another prompt, run
    ddd client <pid> &
4. set a breakpoint and hit continue (hitting next will not work this way)

Also, for the server you don't even have to put the sleep(30), as long as
you attach ddd before you start the client. Once you get
connection-initiation working, you can drop the sleep(30) for both sides,
because after they connect they will block as the client waits for input.

Jonathan

"Araik Grigoryan"  wrote in message

>
> Here you go ...
>
> 1. Put sleep(30) somewhere in the child process. Compile.
> 2. Open DDD and open the client executable via the File menu.
> 3. By clicking on function names, make your way down to the location where
> you placed the sleep and insert a break point right after the sleep
> statement.
> 4. Now run the client with all it's arguments on the command line
> (outside DDD, of course).
> 5. Go back to DDD and choose Attach Process from the File menu. Choose the
> process of the child and wait until sleep is done.
> 6. If you see that nothing is happening for a long time, just click Next
> or Step once and you will see the pointer.
> 7. You can do the same for the server.
>
> araik
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: Sequence number clarifications
Date: Tue, 29 Jan 2002 02:40:23 -0800
Lines: 45
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012300793 22461 128.12.133.48 (29 Jan 2002 10:39: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: nntp.stanford.edu su.class.cs244a:2818


"Martin Casado"  wrote in message

> Hello,
>
>   I would greatly appreciate it if someone could help me clear up
> a few questions I have about sequence numbering...
>
> Assume the active end starts the connection with seqx, and the passive
> replies with seqy (acking with seqx+1)
>
> 1. The assignment sheet states that the active end records seqy so that it
>    will expect the next byte of the passive end to start at seqy+1, can
>    we also assume that the passive end expects the active end to start at
>    seqx+1? (this isn't stated either way)

Yes, by acking with seqx+1, the passive end is telling the active end that
it expects seqx+1.

>
> 2. For acknowledgements, the project sheet says to set the "ack_seq" field
to
>    the sequence number of the next byte of data the receiver expects.
tcp_hdr
>    has no ack_seq field, do we set th_ack or th_seq to this value, or
both?

th_ack

>
> 3. Do we have to place/handle a value in the th_seq field of data packets?

Yes, absolutely! th_seq tells what the first sequence number in the packet
is, so it's absolutely essential for placing the data in the right place in
your window (this is a part B thing). If you meant ACK packets, no I don't
think you have to place or handle it (except for SYN ACK of course). The
TA's would know for sure.

>
> Thanks :-)
>
>                     ~~m
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: Test Script Issues
Date: Tue, 29 Jan 2002 02:51:21 -0800
Lines: 86
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012301450 22596 128.12.133.48 (29 Jan 2002 10:50:50 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: nntp.stanford.edu su.class.cs244a:2819


"Russell Greene"  wrote in message

> Hi All,
>
>      I tested my client and server against Martin's respective server and
> client and we were able to transfer multiple large files back and fourth
> without any problems.  However both of us have been getting test results
of
> the type that appear below.  This leads me to believe that either both of
us
> have misunderstood the assignment (in very similar ways), or there is a
> problem with the test script.  I ask the TAs to please double check this
> part of the test script and verify its functionalty as we aren't the only
> two students who are running into this problem.  Thanks!

Wow. The thing that I find really interesting is that the script actually
transfers THREE files. One you appear to have transferred correctly (the
really small one), one you have the right size but the wrong data, and the
other you have way fewer bytes than you should.

My program transfers fine with other students and with all parts of the test
script, and I know of others who have no problems, so I expect you've got
some more debugging to do. :-(

Are you sure that the local file named "rcvd" (the file that client puts
what it downloads in) has the same size and checksum as whatever file is
being sent from the other side? It seems that if you're somehow writing the
data from the TAs script, you'd probably be writing the wrong data from your
own server in some cases as well. Reexamine your sliding-window code, as
frequently problems like this come from incorrect handling of special cases
in your implementation. Also, maybe you're somehow dropping data on the way
to the parent process.

Jonathan

>
> --Russ
>
>    * Test 1.B: Transmitter fails to work in reliable mode with our
Receiver
>         [out of 10]
>
>
> [SUMMARY] NOT OK
> [RESULT]
> ===========================
> ===(T1.Ba) Byte count differences found (INCORRECT!)
>
>
> ---
> Difference between expected result and your result:
> 1,2c1,2
> <    2641   15865  110230 TESTDATA.0
> <     600    3170   92696 TESTDATA.1
> ---
> >    2666   15720  110230 TESTDATA.0
> >    1812   10049  299328 TESTDATA.1
>
>
> ---
>
>
> ===========================
> ===(T1.Bb) Checksum differences found (INCORRECT!)
>
>
> ---
> Difference between expected result and your result:
> 1,2c1,2
> < 3108646830 110230 TESTDATA.0
> < 3014550704 92696 TESTDATA.1
> ---
> > 1705403052 110230 TESTDATA.0
> > 4265638025 299328 TESTDATA.1
>
>
> ---
>
>
>
> ===============
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: Tue, 29 Jan 2002 02:56:10 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012301738 22608 128.12.133.48 (29 Jan 2002 10:55:38 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: nntp.stanford.edu su.class.cs244a:2820


"Dhawal Kumar"  wrote in message

> Since we can assume in first part of assignment 2 that packets are not
> lost, do we need to worry about what an ACK packet has to tell? And do we
> need to worry about send and recv windows?

The test script checks that you enforce the window sizes, so you definitely
do have to worry about that. I suspect it also checks that your ACK packets
are well-formed. I think the point of the assumption is that you don't have
to do anything about an ACK packet that you were expecting to receive but
never did. If you hack together some one-off thing that meets the
requirements of 2.A rather than designing something that's better suited to
the overall assignment, you're gonna really be hurting when you try to do
2.B.

Jonathan

>
> Dhawal Kumar
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: When there are several child processes..
Date: Tue, 29 Jan 2002 03:32:18 -0800
Lines: 57
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012303937 22881 128.12.133.48 (29 Jan 2002 11:32: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: nntp.stanford.edu su.class.cs244a:2821


"BAEHOPIL"  wrote in message

>
> This seems to be very basic... so I'm sorry to ask, but I need some
> clarification...
>
> Suppose 4 clients connect to the same server.
> Then the server has 4 child processes for each connection,
>   but the connections are all on the same UDP receiving port..
> Server-side child processes will have to determine whether a received
packet
> is
> for them or not, by looking at the source address of the packet.
>
> My question is,
>  if a packet arrives to the UDP port and one of the children reads it
first,
>  is the packet still available for reading by the rest of the children?

It's actually not all that basic. In this assignment we're writing a
simplified variant of TCP. TCP is usually run directly on top of IP, but in
order for us to actually do that, we'd pretty much have to be in the kernel,
and you know they're not going to let us into the kernel on a machine in
Sweet Hall. (Not that we'd really want to be there; debugging is a pain in
the ass...sucks when you segfault in the kernel....)

So, we have this network.c thing, which (cooperating with mysock.c a little
bit) uses UDP to simulate IP. Thus, it's best to forget the UDP socket
exists at all, and consider network.c to be a way of reading raw IP.

IP has no facility for ports; anything you send over IP is addressed to the
machine, period. It is then the job of higher-level protocols like UDP and
TCP to do the (de)multiplexing required to implement ports. STCP, being
simplified TCP, cannot do ports--it's effectively a single-ported TCP. So,
multi-client servers _can't_ be implemented using just STCP. (The server
would have to have its own multiplexer on top of STCP.) You can see that our
server code expects only one client at a time, and it's as a result of this.

>
> And, is the assignment going to be tested under multi-client situation?

There are definitely some tricky cases to be thought about here. For
instance, in normal TCP, the sending party's address and port are used to
demux multiple connections on one port. In STCP, the first computer to SYN
to a port gets it, and everyone else should be SOL. Whether that will be
tested, well, who knows?

Jonathan

>
> Any corrections or comments please...
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!epic10.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Disk FUll error which submitting test.
Date: Tue, 29 Jan 2002 08:01:00 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic10.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2822

Hi,
I got the following error while submitting the code for test.
Please look into it.
tar (child): Cannot open archive
/afs/ir/class/cs244a/submissions/hw2.A/akishan/shankara/files.tar.gz: No
space left on device
tar (child): Error is not recoverable: exiting now
======================================================================
Your code could not be sumitted because of some error.
If you think there is a mistake, please send an email to your TA
(akishan;  with the relevant information.
======================================================================
Thanks
Regards
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!epic10.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Just a trivial clarification.
Date: Tue, 29 Jan 2002 08:02:12 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic10.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2823

Hi,
I just want a clarification in case i am missing something. Is it ok to
assume that the ack packet that we get does not contain data i.e. there is
no piggybacking.
Thanks
Shankar

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: Just a trivial clarification.
Date: Tue, 29 Jan 2002 08:48:36 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2824

From the assignment:

"Although the packet structure is defined so that an acknowledgment can
accompany data in the same packet, STCP does not support this. All ACK
packets should have no payload (i.e. data_len field in the packet header set
to zero)."

Bret

"Shankar Agarwal"  wrote in message

> Hi,
> I just want a clarification in case i am missing something. Is it ok to
> assume that the ack packet that we get does not contain data i.e. there is
> no piggybacking.
> Thanks
> Shankar
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Just a trivial clarification.
Date: Tue, 29 Jan 2002 08:51:39 -0800
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2825


The second bullet in the assignment sheet explicitly says that STCP does
not support piggy backing and ACK packets should haev no payload.

                ~~m

> Hi,
> I just want a clarification in case i am missing something. Is it ok to
> assume that the ack packet that we get does not contain data i.e. there is
> no piggybacking.
> Thanks
> Shankar
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!manzanares.Stanford.EDU!molinero
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: Re: Disk FUll error which submitting test.
Date: Tue, 29 Jan 2002 10:31:21 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2826

Hi,

The disk space got exhausted last night because one student's code started
outputing debugging information while going into a infinite loop. We are
working on a way of eliminating this problem in the future. Until then, I
recomend that you do not submit code that produces too much debugging
information, otherwise you will hurt yourself (the test will fail) and
hurt your fellow students who cannot test their code.

Pablo

On Tue, 29 Jan 2002, Shankar Agarwal wrote:

> Hi,
> I got the following error while submitting the code for test.
> Please look into it.
> tar (child): Cannot open archive
> /afs/ir/class/cs244a/submissions/hw2.A/akishan/shankara/files.tar.gz: No
> space left on device
> tar (child): Error is not recoverable: exiting now
> ======================================================================
> Your code could not be sumitted because of some error.
> If you think there is a mistake, please send an email to your TA
> (akishan;  with the relevant information.
> ======================================================================
> Thanks
> Regards
> Shankar
> 
> 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: th_seq and th_ack associated with FIN, FIN_ACK
Date: Tue, 29 Jan 2002 11:23:31 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2827


 I wonder how I should set the th_seq and th_ack fields for FIN and
FIN_ACK..
 I couldn't find a detailed description about it, unlike SYN and SYN_ACK...

 I have been setting them to just zero,
 but I'm thinking that it may be causing my test failure with TA's rx and
tx..



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Can you please clarify what this error means.
Date: Tue, 29 Jan 2002 13:12:59 -0800
Lines: 115
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2828

Wait a sec.  So you're telling me that the expected result in my test 
below is "0 0 0 TESTDATA.0" and the actual result my program generated 
is 3 lines long?

Please clarify.  Thanks!

-Sandeep

  * Test 1.B: Transmitter fails to work in reliable mode with our Receiver
	[out of 10]

[SUMMARY] NOT OK
[RESULT]
===========================
===(T1.Ba) Byte count differences found (INCORRECT!)
Student's Tx against our Rx (reliable mode)

---

---
Difference between expected result and your result:
1c1,3
< 0       0       0 TESTDATA.0
---

 > 2666   15720  110230 TESTDATA.0
 > 1812   10049  299328 TESTDATA.1
 > 131     501    5098 TESTDATA.2



SUL\\AIR Laneroom Cluster wrote:

> Shankar,
> 
> the numbers in the first test your code fails are
> BYTE counts. the top ones are the expected
> and the bottom ones are yours. As far as I can
> tell, in some cases your code transmits fewer bytes
> and in some more.
> 
> The other numbers are just checksum numbers
> with no particular meaning to you, other than
> that your data isn't correctly transmitted (it gets
> corrupted somewhere, overwritten, contains garbage etc.)
> 
> Regards,
> Antonios.
> 
> Shankar Agarwal wrote:
> 
> 
>>Hi,
>>I am getting the following errors when i submit the script for the part
>>1B. I am not able to figure out what exactly is it saying. Is it that the
>>receiver gets more data or is it receiving less data.
>>Moreover there are 3 figures for each TESTDATA. what each of them means.
>>Thanks
>>Regards
>>Shankar
>>===============
>>
>>    * Test 1.B: Transmitter fails to work in reliable mode with our
>>Receiver
>>        [out of 10]
>>
>>[SUMMARY] NOT OK
>>[RESULT]
>>===========================
>>===(T1.Ba) Byte count differences found (INCORRECT!)
>>
>>---
>>Difference between expected result and your result:
>>1,3c1,3
>><    2641   15865  110230 TESTDATA.0
>><    1786    9963  299328 TESTDATA.1
>><     125     536    5098 TESTDATA.2
>>---
>>
>>>   2666   15720  110230 TESTDATA.0
>>>   1812   10049  299328 TESTDATA.1
>>>    131     501    5098 TESTDATA.2
>>>
>>---
>>
>>===========================
>>===(T1.Bb) Checksum differences found (INCORRECT!)
>>
>>---
>>Difference between expected result and your result:
>>1,3c1,3
>>< 3108646830 110230 TESTDATA.0
>>< 4231670217 299328 TESTDATA.1
>>< 2946179251 5098 TESTDATA.2
>>---
>>
>>>1705403052 110230 TESTDATA.0
>>>4265638025 299328 TESTDATA.1
>>>2181702833 5098 TESTDATA.2
>>>
>>---
>>
>>===============
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: Tue, 29 Jan 2002 13:56:07 -0800
Lines: 66
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2829

Why do you have to worry about window sizes for Part A?  More 
importantly, why does the test script test this case?

The way I see it, you don't need a sending or receiving window for Part 
A.  When the application wants to transmit data, it does a mywrite, then 
the child process reads upto 536 bytes of that data, packages it, and 
sends it.  If the transmitter is doing a mywrite with a ton of data, the 
control loop in the child process will keep triggering until all the 536 
byte data blocks (and the remainder) are complete.  So the child ends up 
sending a bunch of packets (via network_send) when the caller asked to 
do a large mywrite.

On the receiving end, the child is using network_recv to get data from 
the "outside world" socket.  It receives datagrams of maximum size 536 
bytes + sizeof(STCPHeader).  It extracts the data and sends it to the 
parent.

Everything should work fine, right? There's no chance of exceeding the 
3072 byte buffer size since you'll only get 536+hdrSize bytes at a time.

If I'm missing something, please correct me.  My program's got lots of 
problems right now, and if I'm conceptually wrong about the above, then 
knowing how this is supposed to work correctly will probably help me 
solve my problems.

-Sandeep



Jonathan Keljo wrote:

> "Dhawal Kumar"  wrote in message
> 
> 
>>Since we can assume in first part of assignment 2 that packets are not
>>lost, do we need to worry about what an ACK packet has to tell? And do we
>>need to worry about send and recv windows?
>>
> 
> The test script checks that you enforce the window sizes, so you definitely
> do have to worry about that. I suspect it also checks that your ACK packets
> are well-formed. I think the point of the assumption is that you don't have
> to do anything about an ACK packet that you were expecting to receive but
> never did. If you hack together some one-off thing that meets the
> requirements of 2.A rather than designing something that's better suited to
> the overall assignment, you're gonna really be hurting when you try to do
> 2.B.
> 
> Jonathan
> 
> 
>>Dhawal Kumar
>>
>>
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: Network Initiation and reliability
Date: 29 Jan 2002 21:59:56 GMT
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine11.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2830


The first bullet point under "Network Initiation" states that the
active end sends an SYN and then waits for a SYN_ACK.

If we send the SYN using network_send, which is unreliable,
how do we know that the SYN packet was not dropped? Or is it
the case that we don't use network_send for the SYN handshake?
.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Sending/receiving windows for part A
Date: Tue, 29 Jan 2002 14:18:27 -0800
Lines: 25
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2831

Hi all,
My question is, since we do not have to do retransmissions yet, where do I
fit in the use of sending/receiving windows? Except of course to ensure
that the arriving packets fall in the windows? I mean, do we need to
buffer the packets before sending them on the network / sending them to
parent application? Or do we just send  packets as we (STCP) get them,
since they will be in order?

I guess I am confused about the functionality required. Any help would be
great!
Thanks,
Ashmi

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Found it
Date: Tue, 29 Jan 2002 16:52:27 -0800
Lines: 67
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2832

I ran into this problem, too, but I had a few other problems, which 
ironically, made it easier to figure out (at least for my program; 
hopefully you guys have the same problem and thus the same solution will 
work):

Despite what the TAs say, we really can't assume a reliable delivery 
mechanism in this assignment; we are after all, sending UDP datagrams 
everywhere.

One of the problems I was seeing in my project is that the client would 
occasionally block forever (against my server).  At first I thought that 
my code was dropping a packet it had received (like if I got one type of 
packet when I really wanted another in some state).  But I verified that 
that wasn't the problem.  So I added debug code to verify that all my 
reads/writes/network_send's/network_recv's were indeed transferring the 
right number of bytes.  All of that seemed fine.

Yet from my debugging output I could see that some message was sent from 
one end and simply not received on the other (and it varied from run to 
run...often I'd get perfectly clean runs on the 50K file I was using for 
testing).  The only conclusion I could draw was that I was losing 
packets at the UDP level.

So I ended up adding a tiny delay (1ms) before every network_send.  That 
way the network would have enough time to deliver my packet to the 
receiving end.  It's a hack, but it's the best I can do right now since 
I don't have time to do Part B.  And it worked.

-Sandeep

Russell Greene wrote:

> I too am passing all of the tests except for the parts which use the TA's
> receiver (both parts of Test 1.B).  I have no idea why, as in my own tests
> the transmitter appears to work fine.
> 
> -Russ
> 
> "Martin Casado"  wrote in message
> 
> 
>>Hi,
>>
>>  I'm passing all of the tests except for the ones which use
>>the TA's receiver... and I'm really not sure why. Is it against
>>the rules/honor code to modify my transport.c to open a file
>>in a shared directory of mine, and write out a bunch of
>>debug code during testing? (like all packets sent by
>>the TA's receiver)
>>  I'm assuming that this is not allowed.... but it never
>>hurts to ask (I hope) :-)
>>
>>                    ~~m
>>
>>
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: th_seq and th_ack associated with FIN, FIN_ACK
Date: Tue, 29 Jan 2002 17:15:23 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: BAEHOPIL 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2833

We don't care the th_seq and the_ack fields for FIN and FIN_ACK. You can
just set them zeros. Xin

On Tue, 29 Jan 2002, BAEHOPIL wrote:

> 
>  I wonder how I should set the th_seq and th_ack fields for FIN and
> FIN_ACK..
>  I couldn't find a detailed description about it, unlike SYN and SYN_ACK...
> 
>  I have been setting them to just zero,
>  but I'm thinking that it may be causing my test failure with TA's rx and
> tx..
> 
> 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!xwang
From: Xin Wang 
Newsgroups: su.class.cs244a
Subject: Re: Sending/receiving windows for part A
Date: Tue, 29 Jan 2002 17:33:17 -0800
Lines: 42
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Ashmi 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2834

Milestone #1 only considers the reliable mode. In a reliable mode, no
packets are dropped, timeout or appear out of order. So you may not need
to buffer the packets. Best, Xin


On Tue, 29 Jan 2002, Ashmi wrote:

> Hi all,
> My question is, since we do not have to do retransmissions yet, where do I
> fit in the use of sending/receiving windows? Except of course to ensure
> that the arriving packets fall in the windows? I mean, do we need to
> buffer the packets before sending them on the network / sending them to
> parent application? Or do we just send  packets as we (STCP) get them,
> since they will be in order?
> 
> I guess I am confused about the functionality required. Any help would be
> great!
> Thanks,
> Ashmi
> 
> ###############################################################################
> 
> 				ASHMI CHOKSHI
> Graduate Student				    141L Escondido Village
> Dept. of Computer Science			    Stanford University
> Stanford University				    Stanford Ca 94305
> Stanford Ca 94305				    (650)498-1103
> 
> ###############################################################################
> 
> 
> 
> 

-- 
---------------------------------
Xin Wang

Department of Computer Science
Stanford University


.

Path: shelby.stanford.edu!nntp.stanford.edu!myth3.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: Tue, 29 Jan 2002 18:50:19 -0800
Lines: 83
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: myth3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Sandeep Tamhankar 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2835


Hi Sandeep,

What prevents your transmitter from sending multiple packets ?
If it waits for the ack from receiver after each packet, the
window effectively reduces to 536 bytes :-)

Does that give you any ideas ? Or may be i did not understand
the question...

Thanks, Arvind


On Tue, 29 Jan 2002, Sandeep Tamhankar wrote:

> Why do you have to worry about window sizes for Part A?  More
> importantly, why does the test script test this case?
>
> The way I see it, you don't need a sending or receiving window for Part
> A.  When the application wants to transmit data, it does a mywrite, then
> the child process reads upto 536 bytes of that data, packages it, and
> sends it.  If the transmitter is doing a mywrite with a ton of data, the
> control loop in the child process will keep triggering until all the 536
> byte data blocks (and the remainder) are complete.  So the child ends up
> sending a bunch of packets (via network_send) when the caller asked to
> do a large mywrite.
>
> On the receiving end, the child is using network_recv to get data from
> the "outside world" socket.  It receives datagrams of maximum size 536
> bytes + sizeof(STCPHeader).  It extracts the data and sends it to the
> parent.
>
> Everything should work fine, right? There's no chance of exceeding the
> 3072 byte buffer size since you'll only get 536+hdrSize bytes at a time.
>
> If I'm missing something, please correct me.  My program's got lots of
> problems right now, and if I'm conceptually wrong about the above, then
> knowing how this is supposed to work correctly will probably help me
> solve my problems.
>
> -Sandeep
>
>
>
> Jonathan Keljo wrote:
>
> > "Dhawal Kumar"  wrote in message
> > 
> >
> >>Since we can assume in first part of assignment 2 that packets are not
> >>lost, do we need to worry about what an ACK packet has to tell? And do we
> >>need to worry about send and recv windows?
> >>
> >
> > The test script checks that you enforce the window sizes, so you definitely
> > do have to worry about that. I suspect it also checks that your ACK packets
> > are well-formed. I think the point of the assumption is that you don't have
> > to do anything about an ACK packet that you were expecting to receive but
> > never did. If you hack together some one-off thing that meets the
> > requirements of 2.A rather than designing something that's better suited to
> > the overall assignment, you're gonna really be hurting when you try to do
> > 2.B.
> >
> > Jonathan
> >
> >
> >>Dhawal Kumar
> >>
> >>
> >
> >
>
>
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!aminf13
From: Amin Firoozshahian 
Newsgroups: su.class.cs244a
Subject: Problem attaching child process in gdb
Date: Tue, 29 Jan 2002 19:35:21 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2836



  Hi everybody,

  I have problem in attaching child process in gdb. I open another window
and run gdb then try to attach to the child process by typing : "attach
1549" (1549 is my child process id). Here is the answer I get from gdb:

Attaching to program
`/afs/ir.stanford.edu/users/a/m/aminf13/cs244a/assignment2/parta/client',
process 1549
procfs:3643 -- /proc/1549: No such file or directory.
do_attach: couldn't open /proc file for process 1549

  I don't know if I'm doing anything wrong. Any help will be greatly
appreciated.

  Yours,
  Amin

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine19.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Re: Sequence number clarifications
Date: Tue, 29 Jan 2002 19:42:03 -0800
Lines: 57
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2837

Does the answer in 2 mean that we don't need to set th_seq field for ACKs?
Or do we need to treat an ACK as a 1 byte packet as far as sequence number
space is concerned i.e. sender of ACK would advance his sequence number by
1 and receiver would slide his receive window by 1 (of course assuming
that the receiver was waiting for this seq number).

Dhawal Kumar

On Tue, 29 Jan 2002, Jonathan Keljo wrote:

>
> "Martin Casado"  wrote in message
> 
> > Hello,
> >
> >   I would greatly appreciate it if someone could help me clear up
> > a few questions I have about sequence numbering...
> >
> > Assume the active end starts the connection with seqx, and the passive
> > replies with seqy (acking with seqx+1)
> >
> > 1. The assignment sheet states that the active end records seqy so that it
> >    will expect the next byte of the passive end to start at seqy+1, can
> >    we also assume that the passive end expects the active end to start at
> >    seqx+1? (this isn't stated either way)
>
> Yes, by acking with seqx+1, the passive end is telling the active end that
> it expects seqx+1.
>
> >
> > 2. For acknowledgements, the project sheet says to set the "ack_seq" field
> to
> >    the sequence number of the next byte of data the receiver expects.
> tcp_hdr
> >    has no ack_seq field, do we set th_ack or th_seq to this value, or
> both?
>
> th_ack
>
> >
> > 3. Do we have to place/handle a value in the th_seq field of data packets?
>
> Yes, absolutely! th_seq tells what the first sequence number in the packet
> is, so it's absolutely essential for placing the data in the right place in
> your window (this is a part B thing). If you meant ACK packets, no I don't
> think you have to place or handle it (except for SYN ACK of course). The
> TA's would know for sure.
>
> >
> > Thanks :-)
> >
> >                     ~~m
> >
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga1.Stanford.EDU!aminf13
From: Amin Firoozshahian 
Newsgroups: su.class.cs244a
Subject: Another strange problem with gdb
Date: Tue, 29 Jan 2002 19:43:10 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2838



  I noticed another problem, with gdb, when I run the server program
(original version, no modification is done), it blocks and waits for
connection from client, but when I trace is step by step in gdb, it does
not block and exits with code 1! I am wondering what this means and why
this happens.

  Yours,
  Amin

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: Tue, 29 Jan 2002 20:41:51 -0800
Lines: 33
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2839

>
> The test script checks that you enforce the window sizes, so you definitely
> do have to worry about that. I suspect it also checks that your ACK packets
> are well-formed. I think the point of the assumption is that you don't have
> to do anything about an ACK packet that you were expecting to receive but
> never did. If you hack together some one-off thing that meets the
> requirements of 2.A rather than designing something that's better suited to
> the overall assignment, you're gonna really be hurting when you try to do
> 2.B.
>
> Jonathan
>

Quick question...

Packets outside of the window are easy to deal with.. aka throw them out.
But in the assignment sheet it says that "received data may cross either end of
the current receiver window; in this case, the data is split into two parts
and dealt with accordingly"

Does that mean.. if we get a packet that crosses the top boundry of the window,
we chop it in two, Ack the first hald and forget about the second half?  And
if we get a packet that is below the bottom window we chop it, forget about
the first slice and Ack the second?  Won't we then need retransmission to
handle data of split packets where packets above the window are thrown
away?

Thoughts?

Thanks :-)

                ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: Tue, 29 Jan 2002 22:47:51 -0800
Lines: 104
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2840

No, you're right on the money; after some deep thought I realized what I 
was doing wrong.  I still don't use sliding windows, but I've covered 
this is far as Part A goes and I pass all the tests now.

-Sandeep

Arvind Bhat wrote:

> Hi Sandeep,
> 
> What prevents your transmitter from sending multiple packets ?
> If it waits for the ack from receiver after each packet, the
> window effectively reduces to 536 bytes :-)
> 
> Does that give you any ideas ? Or may be i did not understand
> the question...
> 
> Thanks, Arvind
> 
> 
> On Tue, 29 Jan 2002, Sandeep Tamhankar wrote:
> 
> 
>>Why do you have to worry about window sizes for Part A?  More
>>importantly, why does the test script test this case?
>>
>>The way I see it, you don't need a sending or receiving window for Part
>>A.  When the application wants to transmit data, it does a mywrite, then
>>the child process reads upto 536 bytes of that data, packages it, and
>>sends it.  If the transmitter is doing a mywrite with a ton of data, the
>>control loop in the child process will keep triggering until all the 536
>>byte data blocks (and the remainder) are complete.  So the child ends up
>>sending a bunch of packets (via network_send) when the caller asked to
>>do a large mywrite.
>>
>>On the receiving end, the child is using network_recv to get data from
>>the "outside world" socket.  It receives datagrams of maximum size 536
>>bytes + sizeof(STCPHeader).  It extracts the data and sends it to the
>>parent.
>>
>>Everything should work fine, right? There's no chance of exceeding the
>>3072 byte buffer size since you'll only get 536+hdrSize bytes at a time.
>>
>>If I'm missing something, please correct me.  My program's got lots of
>>problems right now, and if I'm conceptually wrong about the above, then
>>knowing how this is supposed to work correctly will probably help me
>>solve my problems.
>>
>>-Sandeep
>>
>>
>>
>>Jonathan Keljo wrote:
>>
>>
>>>"Dhawal Kumar"  wrote in message

>>>
>>>
>>>>Since we can assume in first part of assignment 2 that packets are not
>>>>lost, do we need to worry about what an ACK packet has to tell? And do we
>>>>need to worry about send and recv windows?
>>>>
>>>>
>>>The test script checks that you enforce the window sizes, so you definitely
>>>do have to worry about that. I suspect it also checks that your ACK packets
>>>are well-formed. I think the point of the assumption is that you don't have
>>>to do anything about an ACK packet that you were expecting to receive but
>>>never did. If you hack together some one-off thing that meets the
>>>requirements of 2.A rather than designing something that's better suited to
>>>the overall assignment, you're gonna really be hurting when you try to do
>>>2.B.
>>>
>>>Jonathan
>>>
>>>
>>>
>>>>Dhawal Kumar
>>>>
>>>>
>>>>
>>>
>>
>>
>>--
>>---------------------------------------------
>>Sandeep V. Tamhankar
>>M.S. Student
>>Computer Science
>>Email: 
>>
>>
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: Tue, 29 Jan 2002 22:50:11 -0800
Lines: 53
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2841

I believe that for Part A, since we're assuming reliable underlying 
transport, the case you describe isn't possible.  The closest thing is 
that you'll get full repeats of packets you've already processed (and 
would thus be outside of your window).

-Sandeep

Martin Casado wrote:

>>The test script checks that you enforce the window sizes, so you definitely
>>do have to worry about that. I suspect it also checks that your ACK packets
>>are well-formed. I think the point of the assumption is that you don't have
>>to do anything about an ACK packet that you were expecting to receive but
>>never did. If you hack together some one-off thing that meets the
>>requirements of 2.A rather than designing something that's better suited to
>>the overall assignment, you're gonna really be hurting when you try to do
>>2.B.
>>
>>Jonathan
>>
>>
> 
> Quick question...
> 
> Packets outside of the window are easy to deal with.. aka throw them out.
> But in the assignment sheet it says that "received data may cross either end of
> the current receiver window; in this case, the data is split into two parts
> and dealt with accordingly"
> 
> Does that mean.. if we get a packet that crosses the top boundry of the window,
> we chop it in two, Ack the first hald and forget about the second half?  And
> if we get a packet that is below the bottom window we chop it, forget about
> the first slice and Ack the second?  Won't we then need retransmission to
> handle data of split packets where packets above the window are thrown
> away?
> 
> Thoughts?
> 
> Thanks :-)
> 
>                 ~~m
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Regarding the test scprit.
Date: Tue, 29 Jan 2002 23:05:23 -0800
Lines: 71
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2842

Well, presumably the reason that you provided the tests to students this 
year is that they could learn more from seeing their mistakes and trying 
to figure out the solutions than for the graders to find their mistakes 
and tell them the answer.

 From that perspective, I don't think it's unreasonable to want a little 
more information from the tests.  In the last project test failures 
indicated what was done to produce the failure so that the student could 
debug it on his/her own.  It would've been nice to have the same 
flexibility in this project.

That said, the least you can do is explain what the results of a given 
test mean; for example, which output is the expected output vs. the 
actual output of running our program.  Also, it would be great to know 
what those results mean.  For example see the following output that I 
just made up:

35  85 2195  TESTA.0

40  76 2500  TESTA.0

What do the numbers mean?  After sifting through a number of postings 
earlier today, I figured it out.  But it was not at all obvious.

My point is that these tests weren't made available to us as an act of 
kindness or mercy.  Thus we have no reason to be grateful for their 
existence.  They were provided to help us learn more about the cases we 
need to cover.  And this particular set of tests doesn't do that as well 
as the first project's tests, so people like Shankar (and myself earlier 
today) are stumbling to figure out how to deal with it.

Ok, I'm done with my rampage now.

-Sandeep

SUL\\AIR Laneroom Cluster wrote:

> Shankar,
> the testing platform should be familiar to you by
> now:) I'm afraid, everyone in the class has to work with
> the test scripts given. Last year people didn't even
> have this flexibility!
> 
> Regards,
> Antonios.
> 
> Shankar Agarwal wrote:
> 
> 
>>Hi,
>>I am seeing a strange problem with the test scpirt. My tests are failing
>>for the cases when TA's program is supposed to act as a receiver. I don't
>>see this problem in my testing. Is it possible to get hold of the binary
>>which does this testing. As the result does not give much information
>>regarding what went wrong while testing my program. Is it also possible to
>>get the files which the TA's script is trying to transfer. So that we can
>>use them to test to figure out what went wrong.
>>Thanks
>>Shankar
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!mgulati
From: Madhup Gulati 
Newsgroups: su.class.cs244a
Subject: passing peer address!
Date: Tue, 29 Jan 2002 23:37:22 -0800
Lines: 34
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2843


I have the peer address got from sockfd. But I am in
transport_sock_io()
function which is called from control loop. Here I don't have access to
syn_sd[1] . So how do I send this peer address to the parent.

 I can declare a new address variable in the context structure which gets
passed to all fuctions or add a new argument to all my fuctions so that
peer address is stored and passed. Both are not good techniques...

Ne suggestions??

Thanks,

Madhup


-------------------------------------------------------------------------------
Madhup Gulati
Graduate Student              Home:
Computer Science Dept.        141 K
William Gates Building        Escondido Road
Stanford University           Stanford
CA 94305                      CA 94305

          Ph: 650-497-4701

-------------------------------------------------------------------------------






.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: Re: passing peer address!
Date: Tue, 29 Jan 2002 23:58:54 -0800
Lines: 40
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2844

I guess it depends on where you finish setting up
your initial connection,

I take care of that in my control loop, so
I added a field to ctx, and that seems to work fine...

Cheers

Madhup Gulati wrote:
> 
> I have the peer address got from sockfd. But I am in
> transport_sock_io()
> function which is called from control loop. Here I don't have access to
> syn_sd[1] . So how do I send this peer address to the parent.
> 
>  I can declare a new address variable in the context structure which gets
> passed to all fuctions or add a new argument to all my fuctions so that
> peer address is stored and passed. Both are not good techniques...
> 
> Ne suggestions??
> 
> Thanks,
> 
> Madhup
> 
> -------------------------------------------------------------------------------
> Madhup Gulati
> Graduate Student              Home:
> Computer Science Dept.        141 K
> William Gates Building        Escondido Road
> Stanford University           Stanford
> CA 94305                      CA 94305
> 
>           Ph: 650-497-4701
> 
> -------------------------------------------------------------------------------

-- 
       Luis Robles

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: getpeername vs. network_peer_name
Date: Wed, 30 Jan 2002 00:04:31 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2845

Are we supposed to always use network_peer_name to
get the peer struct to pass up to the parent?

I was using getpeername for the active connection and that
worked, but I had to switch to network_peer_name on
the passive connection because getpeername was giving
me a the following error:

": Transport endpoint is not connected"

Is this due to the underlying usage of UDP sockets, or
something else?

Thanks
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Russell Greene" 
Newsgroups: su.class.cs244a
Subject: Submission Error
Date: Wed, 30 Jan 2002 00:17:24 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: russell2.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2846

Hi All,

     I cannot submit my project.  When I run the command in the assignment

/afs/ir/class/cs244a/bin/submit.pl hw2.X ta I get a permission denied.

Immediately below (in the handout) it has the line

/afs/ir/class/cs244a/bin/submit ta hw2.X

I run that and it tells me that the ta should go after the assignment.  I
make the fix and run the command and it then tells me that hw2.A is not a
valid assignment for this class.

What am I doing wrong?

--Russ


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Sequence number clarifications
Date: 30 Jan 2002 08:37:47 GMT
Lines: 14
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2847

Dhawal Kumar  writes:

>Does the answer in 2 mean that we don't need to set th_seq field for ACKs?
>Or do we need to treat an ACK as a 1 byte packet as far as sequence number
>space is concerned i.e. sender of ACK would advance his sequence number by
>1 and receiver would slide his receive window by 1 (of course assuming
>that the receiver was waiting for this seq number).

>Dhawal Kumar

If a packet contains only an ACK, the sequence number does not need to be
set (but it doesn't hurt, either).  Sending an ACK doesn't advance the
sender's sequence number.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: unable to network_send stcpHeader
Date: 30 Jan 2002 08:43:05 GMT
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2848

Anurag Gupta  writes:


>I am unable to send stcpHeader using network_send. I am able though to
>send an arbitrary string.

>I know this is trivial, thats why I am asking :-)

>any ideas?
>-anurag


Are you passing a valid pointer and length to the stcpheader?  Have you
passed a final NULL pointer to terminate the varargs?  Is it crashing,
or is errno being set?

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: 30 Jan 2002 08:49:33 GMT
Lines: 29
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2849

"Jonathan Keljo"  writes:


>"Dhawal Kumar"  wrote in message

>> Since we can assume in first part of assignment 2 that packets are not
>> lost, do we need to worry about what an ACK packet has to tell? And do we
>> need to worry about send and recv windows?

>The test script checks that you enforce the window sizes, so you definitely
>do have to worry about that. I suspect it also checks that your ACK packets
>are well-formed. I think the point of the assumption is that you don't have
>to do anything about an ACK packet that you were expecting to receive but
>never did. If you hack together some one-off thing that meets the
>requirements of 2.A rather than designing something that's better suited to
>the overall assignment, you're gonna really be hurting when you try to do
>2.B.


This is a very good point.  I'd *really* encourage people to think of this
as a large assignment, with the real goal being the implementation of a
completely functional TCP-like transport layer.  Treating it as three
separate assignments, and planning to just add on functionality for the
next milestone, will be very difficult.  It's much easier to start out
with a design that seems reasonable and will still be useful for the
next milestone--i.e. even though packet losses and retransmissions aren't
covered in the first milestone, you should still be thinking about these
as you decide how to implement even the basics of the protocol.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: 30 Jan 2002 08:58:40 GMT
Lines: 15
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2850

Sandeep Tamhankar  writes:

>I believe that for Part A, since we're assuming reliable underlying 
>transport, the case you describe isn't possible.  The closest thing is 
>that you'll get full repeats of packets you've already processed (and 
>would thus be outside of your window).


Well, since the underlying transport layer is still UDP, it's possible.
(If you haven't had a chance to implement support for this case yet, it would
probably make sense to throw some asserts or debugging output in to catch
the condition before it causes difficult-to-reproduce bugs to appear).

But as the assignment states, the first milestone will not test this
condition.
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: When there are several child processes..
Date: 30 Jan 2002 09:09:41 GMT
Lines: 11
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2851


> And, is the assignment going to be tested under multi-client situation?

Well, it would make sense to me from both a software engineering and didactic
viewpoint to approach the assignment as though you were implementing a
real TCP layer--i.e. maintain a context for a particular socket (e.g.
using the context_t given in transport.c) rather than have global variables
polluting the whole process, etc.

But, in terms of multiple clients, no--that's not really practical with
the current setup.
.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: Wed, 30 Jan 2002 01:19:22 -0800
Lines: 49
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2852

If our sender window is full and the application gives more data to
transmit, shoud we buffer it (if yes to what extent - I mean is there an
upper limit) or should we not read the data until the sender window clears
up - in this case select on data_sd will immediately return and we'll not
read again because there is no space in window and this would keep happening -
effectively a busy waiting.

This can happen even in first part of assigment 2 if sender gives more
that 3072 bytes to send.

A couple of more questions:
(1) What should CWND and ERTT be for first part of assignment 2
(2) How do we calculate CWND?

Dhawal Kumar

On 30 Jan 2002, Matthew Jonathan Holliman wrote:

> "Jonathan Keljo"  writes:
>
>
> >"Dhawal Kumar"  wrote in message
> 
> >> Since we can assume in first part of assignment 2 that packets are not
> >> lost, do we need to worry about what an ACK packet has to tell? And do we
> >> need to worry about send and recv windows?
>
> >The test script checks that you enforce the window sizes, so you definitely
> >do have to worry about that. I suspect it also checks that your ACK packets
> >are well-formed. I think the point of the assumption is that you don't have
> >to do anything about an ACK packet that you were expecting to receive but
> >never did. If you hack together some one-off thing that meets the
> >requirements of 2.A rather than designing something that's better suited to
> >the overall assignment, you're gonna really be hurting when you try to do
> >2.B.
>
>
> This is a very good point.  I'd *really* encourage people to think of this
> as a large assignment, with the real goal being the implementation of a
> completely functional TCP-like transport layer.  Treating it as three
> separate assignments, and planning to just add on functionality for the
> next milestone, will be very difficult.  It's much easier to start out
> with a design that seems reasonable and will still be useful for the
> next milestone--i.e. even though packet losses and retransmissions aren't
> covered in the first milestone, you should still be thinking about these
> as you decide how to implement even the basics of the protocol.
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Network Initiation and reliability
Date: 30 Jan 2002 09:25:26 GMT
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2853

Derrick Wen-Shiuan Tong  writes:


>The first bullet point under "Network Initiation" states that the
>active end sends an SYN and then waits for a SYN_ACK.

>If we send the SYN using network_send, which is unreliable,
>how do we know that the SYN packet was not dropped? Or is it
>the case that we don't use network_send for the SYN handshake?


For the next milestone, you'll have to handle retransmission of SYNs if
you don't receive a SYN-ACK in time.  (While you don't need to implement
this for the first milestone, keep it in mind as you design your code).

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: passing peer address!
Date: 30 Jan 2002 09:31:38 GMT
Lines: 15
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2854

Madhup Gulati  writes:


>I have the peer address got from sockfd. But I am in
>transport_sock_io()
>function which is called from control loop. Here I don't have access to
>syn_sd[1] . So how do I send this peer address to the parent.

> I can declare a new address variable in the context structure which gets
>passed to all fuctions or add a new argument to all my fuctions so that
>peer address is stored and passed. Both are not good techniques...


Well, including connection context (e.g. the syn_sd descriptor) in the
connection context structure seems a reasonable technique to me...
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Submission Error
Date: 30 Jan 2002 09:38:29 GMT
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2855

"Russell Greene"  writes:

>Hi All,

>     I cannot submit my project.  When I run the command in the assignment

>/afs/ir/class/cs244a/bin/submit.pl hw2.X ta I get a permission denied.

>Immediately below (in the handout) it has the line

>/afs/ir/class/cs244a/bin/submit ta hw2.X

>I run that and it tells me that the ta should go after the assignment.  I
>make the fix and run the command and it then tells me that hw2.A is not a
>valid assignment for this class.

>What am I doing wrong?

>--Russ


Probably nothing--someone had edited the submit configuration, and HW2 is
commented out at the moment.  Just hold off on submitting for the moment;
someone will post on here (hopefully soon) when it's fixed again.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Processing ACKS etc.
Date: 30 Jan 2002 09:49:16 GMT
Lines: 30
Distribution: su
Message-ID: 
References:     
NNTP-Posting-Host: elaine18.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2856

Dhawal Kumar  writes:

>If our sender window is full and the application gives more data to
>transmit, shoud we buffer it (if yes to what extent - I mean is there an
>upper limit) or should we not read the data until the sender window clears
>up - in this case select on data_sd will immediately return and we'll not
>read again because there is no space in window and this would keep happening -
>effectively a busy waiting.

>This can happen even in first part of assigment 2 if sender gives more
>that 3072 bytes to send.

That's your decision--whatever makes sense.

However, if you decide not to read data if the sender window is full, then
busy waiting is *not* appropriate.  (Note that select() or poll() will only
immediately return if you'd asked them to wait on the application data
socket).

>A couple of more questions:
>(1) What should CWND and ERTT be for first part of assignment 2

For the ERTT, see the timeout discussion in the assignment.

>(2) How do we calculate CWND?

You don't need to; see the comments in
print_congestion_window_and_estimatedRTT().
It's a historical artifact from a time when the assignment was even more
interesting :-)
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!mgulati
From: Madhup Gulati 
Newsgroups: su.class.cs244a
Subject: How many windows?
Date: Wed, 30 Jan 2002 04:29:12 -0800
Lines: 30
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2857

Hi..
Since the active and passive sides both can send data and acks.....will we
have a sender and receiver window on each of the sides.

If so then we can have a situation where the child is trying to write data
to the  parent but parent still has more data to send. So writing fails.
If parent keeps sending data, the child will never get to write.

Similar problem can occur for the sockfd between passive and active
entities when both try to write.

Thanks,
Madhup
-------------------------------------------------------------------------------
Madhup Gulati
Graduate Student              Home:
Computer Science Dept.        141 K
William Gates Building        Escondido Road
Stanford University           Stanford
CA 94305                      CA 94305

          Ph: 650-497-4701

-------------------------------------------------------------------------------






.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Jian Deng 
Newsgroups: su.class.cs244a
Subject: Test script down
Date: 30 Jan 2002 18:02:38 GMT
Lines: 3
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga2.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2858

Is the test script down?  I've submited tests but never got executed.
The las time I submit was 7 hours ago.

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: About windowing, mostly.
Date: Wed, 30 Jan 2002 10:37:51 -0800
Lines: 35
Distribution: su
Message-ID: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2859

Some questions for you kind folks out there. Responses to any part(s) would
be greatly appreciated.

1. What happens when the child receives a contiguous block of data (that is,
all holes filled in)?
Do we then write it into the local data socket?
And does this block count as part of our receiving window?
If these things are true, can we and do we try to track how many bytes have
been written into the socket but not read by the parent? It seems it would
be necessary to do that.

2. To make sure I understand ACKing and Go-back-N, please correct me if I am
wrong:

Suppose the receiver has never received a block starting with seq number
500. If it receives a bunch of blocks after that, but still not 500, it just
sends an ACK 500 every time. Now suppose the transmission of block 500
finally times out. Then since the sender never received the ACK for 500, it
will pretend it never sent anything past 500 and start over from there (eg.
500, 550, 600 all over again).

Furthermore, these resent packets must all be divided as they were before.
If we had sent 500-549, 550-599 earlier we must send 500-549, 550-599
again--we cannot repackage and send 500-599.

All correct?

3. Can an unlimited amount of data be written into a socket (a real one, not
mysocket) without the other side's reading it?

4. Where can documentation for select() be found?  What does it return if
both sockets have data that need to be processed? I imagine that there's
most always data that the application is waiting to have sent.


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine38.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: parent: reading the peer address
Date: Wed, 30 Jan 2002 10:52:53 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine38.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2860


I always get this error

"parent: reading the peer address on a syn handshake (read only 0 bytes)"

How do we check that we got the peeraddress on the socket?

any clues what I am not doing?

thanks
-anurag

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth5.Stanford.EDU!cpjones
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: Re: Test script down
Date: Wed, 30 Jan 2002 13:42:25 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2861

I am also having this problem.

Thanks
Clayton

On 30 Jan 2002, Jian Deng wrote:

> Is the test script down?  I've submited tests but never got executed.
> The las time I submit was 7 hours ago.
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine41.Stanford.EDU!brandon
From: Brandon Badger 
Newsgroups: su.class.cs244a
Subject: Getting Same Error -- parent: reading the peer address
Date: Wed, 30 Jan 2002 13:57:37 -0800
Lines: 31
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine41.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2862

I'm getting the same error when I run the client:
"parent: reading the peer address on syn handshake (read only 0
bytes)recv: Error 0"

Here's where I'm trying to initialize the connection:

if(is_passive == 0){
	/* I'm trying to send the SYN packet for network initialization */
	/* I create an STCP packet. In this case there is no data */

	hdr = malloc(sizeof(STCPHeader));
	hdr->tcp_hdr.th_seq = 1;
	hdr->data_len = 0;

	/* Then I try to send the packet to the passive server end */

	network_send(ctx->sockfd, hdr, sizeof(STCPHeader), NULL);
}


When I run the client, I get the "parent: reading" error mentioned above.
Am I not sending the SYN packet correctly?

Also, should I have an -- if(is_passive == 1) section of code that reads
on sockfd, waiting for the client to send the initial handshake message,
and then in this section of code send the SYN_ACK back to the client?

Thanks for any clarification.

-Brandon

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine32.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Re: Test script down
Date: Wed, 30 Jan 2002 14:22:46 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine32.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2863

Count Me also.....

On Wed, 30 Jan 2002, Clayton Pierce Jones wrote:

> I am also having this problem.
>
> Thanks
> Clayton
>
> On 30 Jan 2002, Jian Deng wrote:
>
> > Is the test script down?  I've submited tests but never got executed.
> > The las time I submit was 7 hours ago.
> >
> >
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine29.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: How many windows?
Date: 30 Jan 2002 23:14:48 GMT
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine29.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2864

Madhup Gulati  writes:

>Hi..
>Since the active and passive sides both can send data and acks.....will we
>have a sender and receiver window on each of the sides.

>If so then we can have a situation where the child is trying to write data
>to the  parent but parent still has more data to send. So writing fails.
>If parent keeps sending data, the child will never get to write.

Yes, once the connection is established, both sides are symmetric, so both
will maintain sender and receiver windows.

If you receive data from the peer, you can write it to the application
and assume that it will be read; i.e. you don't need to worry about deadlock
situations in the application layer as you describe.

>Similar problem can occur for the sockfd between passive and active
>entities when both try to write.

I'm not sure that I follow you.  Both sides are STCP-compliant, and so will
not try to write if the window is full, so you shouldn't encounter a problem.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine39.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: About windowing, mostly.
Date: 30 Jan 2002 23:55:44 GMT
Lines: 59
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine39.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2865


>1. What happens when the child receives a contiguous block of data (that is,
>all holes filled in)?
>Do we then write it into the local data socket?
>And does this block count as part of our receiving window?
>If these things are true, can we and do we try to track how many bytes have
>been written into the socket but not read by the parent? It seems it would
>be necessary to do that.

Yes, yes, and no, respectively.  Once you write to the parent's socket,
you can't (as far as I know) tell how much has actually been read.  So
for the purpose of this assignment, you can just assume that all has
been read by the application.


>2. To make sure I understand ACKing and Go-back-N, please correct me if I am
>wrong:

>Suppose the receiver has never received a block starting with seq number
>500. If it receives a bunch of blocks after that, but still not 500, it just
>sends an ACK 500 every time. Now suppose the transmission of block 500
>finally times out. Then since the sender never received the ACK for 500, it
>will pretend it never sent anything past 500 and start over from there (eg.
>500, 550, 600 all over again).

Yep, that's right.


>Furthermore, these resent packets must all be divided as they were before.
>If we had sent 500-549, 550-599 earlier we must send 500-549, 550-599
>again--we cannot repackage and send 500-599.

From my interpretation of the STCP "specification," a compliant receiver
should be able to handle both cases.  For the purposes of calculating
timeouts for segments, the first is more accurate.  (I can't see a
restriction in the assignment specification concerning how you package
retransmissions).


>3. Can an unlimited amount of data be written into a socket (a real one, not
>mysocket) without the other side's reading it?

No, but for practical purposes you can assume this for the current
assignment's communication with the parent.  (See setsockopt in transport.c).


>4. Where can documentation for select() be found?  What does it return if
>both sockets have data that need to be processed? I imagine that there's
>most always data that the application is waiting to have sent.

man -s 2 poll
man -s 3c select

I imagine Stevens discusses these calls.  If/when one or more sockets have
data for processing (either read, write, or error condition, depending
on the flags you've set), the call will return.  (If you don't want the
call to wake up on a particular condition for a particular socket, don't
tag that condition as interesting for that descriptor).

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine39.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Getting Same Error -- parent: reading the peer address
Date: 31 Jan 2002 00:00:12 GMT
Lines: 34
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine39.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: nntp.stanford.edu su.class.cs244a:2866

Brandon Badger  writes:

>I'm getting the same error when I run the client:
>"parent: reading the peer address on syn handshake (read only 0
>bytes)recv: Error 0"

>Here's where I'm trying to initialize the connection:

>if(is_passive == 0){
>	/* I'm trying to send the SYN packet for network initialization */
>	/* I create an STCP packet. In this case there is no data */

>	hdr = malloc(sizeof(STCPHeader));
>	hdr->tcp_hdr.th_seq = 1;
>	hdr->data_len = 0;

>	/* Then I try to send the packet to the passive server end */

>	network_send(ctx->sockfd, hdr, sizeof(STCPHeader), NULL);
>}


>When I run the client, I get the "parent: reading" error mentioned above.
>Am I not sending the SYN packet correctly?

Where do you set the SYN flag in the header?


>Also, should I have an -- if(is_passive == 1) section of code that reads
>on sockfd, waiting for the client to send the initial handshake message,
>and then in this section of code send the SYN_ACK back to the client?

Yes, that's correct.

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine34.Stanford.EDU!anuragg
From: Anurag Gupta 
Newsgroups: su.class.cs244a
Subject: select(....) not working
Date: Wed, 30 Jan 2002 16:05:18 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine34.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2867

hi,

For the first time, when my client sends a SYN packet to server,
select(...) works. It works even at the server end.

But after that, when client.c calls write(...) which
writes to local_data_sd, select seems to be blocked. So, I am never able
to get to call transport_application_io(..).

any clues?

thanks
-anurag

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Re: select(....) not working
Date: Wed, 30 Jan 2002 16:55:27 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Anurag Gupta 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2868

Hi,
When u return from select the filefds get reset to 0 except for the ones
on which there was some event. So i guess that could be ur problem. So try
to look at that part and restore the filefds before going to select.
Regards
Shankar

Wed, 30 Jan 2002, Anurag Gupta wrote:

> hi,
>
> For the first time, when my client sends a SYN packet to server,
> select(...) works. It works even at the server end.
>
> But after that, when client.c calls write(...) which
> writes to local_data_sd, select seems to be blocked. So, I am never able
> to get to call transport_application_io(..).
>
> any clues?
>
> thanks
> -anurag
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth3.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: Test script down
Date: Wed, 30 Jan 2002 18:10:28 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: myth3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2869


I submitted earlier today, and still haven't got results...

On Wed, 30 Jan 2002, Shankar Agarwal wrote:

> Count Me also.....
>
> On Wed, 30 Jan 2002, Clayton Pierce Jones wrote:
>
> > I am also having this problem.
> >
> > Thanks
> > Clayton
> >
> > On 30 Jan 2002, Jian Deng wrote:
> >
> > > Is the test script down?  I've submited tests but never got executed.
> > > The las time I submit was 7 hours ago.
> > >
> > >
> >
> >
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Derrick Wen-Shiuan Tong 
Newsgroups: su.class.cs244a
Subject: mywrite does not block--buffer overflow?
Date: 31 Jan 2002 03:15:26 GMT
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2870

From the implementation of mywrite in mysock.c, it seems that it
does not block while our socket is sending the data. Doesn't this
introduce the possibility that it can overflow our send buffer, 
however large it is?

For instance, if we have a sending buffer of 3072 (or any size)
that's almost full, but we're still waiting for the ACK from the
receiver, what happens if our mysock client requests to send
more bytes that are left in our buffer? Can we get the parent
process to block somehow while we are sending and verifying
the transmission? I assume that this is what a Berkeley SOCK_STREAM
socket does when you perform a write(...) on it.

Thanks,

Derrick

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Peter Belknap" 
Newsgroups: su.class.cs244a
Subject: void  print_congestion_window_and_estimatedRTT(int fid)   Question
Date: Wed, 30 Jan 2002 19:32:07 -0800
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2871

Do we need to implement void  print_congestion_window_and_estimatedRTT(int
fid) ?  I ask because from what I can tell no other parts of the program are
calling it (I did a grep).

If so, does it need to be done for part A?  I wouldn't think so... RTT
doesn't apply until part B.  What exactly is the congestion window?

thanks,
Pete


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Hasan Taufiq Imam 
Newsgroups: su.class.cs244a
Subject: Test script down.
Date: Wed, 30 Jan 2002 20:25:05 -0800
Lines: 5
Distribution: su
Message-ID: 
Reply-To: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2872

Is the test script down or there is just a long queue. I have submitted
mine couple of hours ago and I have not yet received my confirmation
yet. There are few other postings regarding the test script being down.
Thanks,
Hasan
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Peter Belknap" 
Newsgroups: su.class.cs244a
Subject: Re: Test script down.
Date: Wed, 30 Jan 2002 21:03:30 -0800
Lines: 13
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: programminpete.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2873

It's down, and Nick is working on it.

Pete

"Hasan Taufiq Imam"  wrote in message

> Is the test script down or there is just a long queue. I have submitted
> mine couple of hours ago and I have not yet received my confirmation
> yet. There are few other postings regarding the test script being down.
> Thanks,
> Hasan


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Ron Luman II" 
Newsgroups: su.class.cs244a
Subject: Control Loop and Multiple Child Processes
Date: Wed, 30 Jan 2002 21:52:45 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: xenon.stanford.edu
X-Trace: news.Stanford.EDU 1012456383 14976 171.64.66.201 (31 Jan 2002 05:53:03 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: nntp.stanford.edu su.class.cs244a:2874

Hi all,

I'm slightly confused as to how things should work when there are multiple
entries in the context array (and therefore multiple child processes.)   It
seems to me that a single child process could handle all of the transport
layer processing, yet we seem to fork a child process for each connection.
While this eases the communications, it seems to me that it complicates the
control loop...

Enough rambling; here's my question:

Should we be coding the control loop so that it only 'selects' the file
descriptors associated with this particular (child) process?    (I don't see
another way, but the skeleton code seems to imply otherwise.)

Thanks,

--Ron


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: Initial SYN Send
Date: Wed, 30 Jan 2002 22:27:18 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2875

Interesting behavior:

When my client sends out the SYN packet from ctx->sockfd on the very first
call (22 bytes, successful), select immediately begins to register the
presence of data to be read on ctx->sockfd. [This is true because I skip the
preceding code if I am passive, and select does the blocking/timeout in that
case.] This is weird because I have not implemented the SYN_ACK on the other
side. An attempt to investigate this mysterious data through network_recv
produces a -1.

Anyone encounter anything similar? I am correctly resetting the socket set
before it heads into the select statement.

Steve


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Test script down.
Date: Wed, 30 Jan 2002 22:30:23 -0800
Lines: 16
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2876

Yes we are and we will post here once it is up again.

  Guido

> It's down, and Nick is working on it.
> 
> Pete
> 
> "Hasan Taufiq Imam"  wrote in message
> 
>> Is the test script down or there is just a long queue. I have submitted
>> mine couple of hours ago and I have not yet received my confirmation
>> yet. There are few other postings regarding the test script being down.
>> Thanks,
>> Hasan

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga8.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Network Initiation
Date: Wed, 30 Jan 2002 22:40:15 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2877

Hi,

I just want to make sure that what I will say next is correct:

When the server receives a SYN packet, it will send back two packets,
first has both the SYN and ACK flags and server sequence number. The
second packet is just an Ack to the client for its SYN packet, with the
client_seq_num+1.

This is how I understand the handout. Am I correct?

Thanks,

Moh'd


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Debashis Sahoo" 
Newsgroups: su.class.cs244a
Subject: failed to compile ...
Date: Wed, 30 Jan 2002 22:42:33 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: dsahoo.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2878

Hi,
      I got following error message.
I don't know what it means.


    * Test 1.A: Fails to compile
  [out of 20]

[SUMMARY] NOT OK
[RESULT]  ERROR:  No testserver.sample in
/afs/ir/class/cs244a/submissions/restricted/hw2.A/holliman/sahoo//compile.su
n.

Thanks,
Sahoo


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Jian Deng 
Newsgroups: su.class.cs244a
Subject: Re: failed to compile ...
Date: 31 Jan 2002 06:47:03 GMT
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic5.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2879

I got the same error too.

Debashis Sahoo  wrote:
> Hi,
>       I got following error message.
> I don't know what it means.


>     * Test 1.A: Fails to compile
>   [out of 20]

> [SUMMARY] NOT OK
> [RESULT]  ERROR:  No testserver.sample in
> /afs/ir/class/cs244a/submissions/restricted/hw2.A/holliman/sahoo//compile.su
> n.

> Thanks,
> Sahoo


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Re: Network Initiation
Date: Wed, 30 Jan 2002 22:51:10 -0800
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2880

My impression of the specification is that th_flags would be SYN | ACK,
th_ack would be client_seq_num + 1, and th_seq would be server_seq_num (all
in one packet).  I have not run my code against theirs yet, so I may be
wrong.

Bret


"Moh'd Saleem Saleem Alrawashdeh"  wrote in message

> Hi,
>
> I just want to make sure that what I will say next is correct:
>
> When the server receives a SYN packet, it will send back two packets,
> first has both the SYN and ACK flags and server sequence number. The
> second packet is just an Ack to the client for its SYN packet, with the
> client_seq_num+1.
>
> This is how I understand the handout. Am I correct?
>
> Thanks,
>
> Moh'd
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: Network Initiation
Date: Wed, 30 Jan 2002 22:53:38 -0800
Lines: 37
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2882

Hi..
I think Bret is right...
I'm passing that part of the test, so I think I'm sure...

"Bret Taylor"  wrote in message

> My impression of the specification is that th_flags would be SYN | ACK,
> th_ack would be client_seq_num + 1, and th_seq would be server_seq_num
(all
> in one packet).  I have not run my code against theirs yet, so I may be
> wrong.
>
> Bret
>
>
> "Moh'd Saleem Saleem Alrawashdeh"  wrote in message
> 
> > Hi,
> >
> > I just want to make sure that what I will say next is correct:
> >
> > When the server receives a SYN packet, it will send back two packets,
> > first has both the SYN and ACK flags and server sequence number. The
> > second packet is just an Ack to the client for its SYN packet, with the
> > client_seq_num+1.
> >
> > This is how I understand the handout. Am I correct?
> >
> > Thanks,
> >
> > Moh'd
> >
> >
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: getpeername vs. network_peer_name
Date: Wed, 30 Jan 2002 22:54:23 -0800
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2883

Luis,

yes, you will have to always use network_peer. The problem is
not UDP sockets but how the library uses them.

  Guido

> Are we supposed to always use network_peer_name to
> get the peer struct to pass up to the parent?
> 
> I was using getpeername for the active connection and that
> worked, but I had to switch to network_peer_name on
> the passive connection because getpeername was giving
> me a the following error:
> 
> ": Transport endpoint is not connected"
> 
> Is this due to the underlying usage of UDP sockets, or
> something else?
> 
> Thanks

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: failed to compile ...
Date: Wed, 30 Jan 2002 22:58:05 -0800
Lines: 27
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2884

Everyone,

these compile errors are due to us restarting the testing server. Ignore 
the results, this won't count as one of your submission attempts.

  Guido

> I got the same error too.
> 
> Debashis Sahoo  wrote:
>> Hi,
>>       I got following error message.
>> I don't know what it means.
> 
> 
>>     * Test 1.A: Fails to compile
>>   [out of 20]
> 
>> [SUMMARY] NOT OK
>> [RESULT]  ERROR:  No testserver.sample in
>> 
/afs/ir/class/cs244a/submissions/restricted/hw2.A/holliman/sahoo//compile.su
>> n.
> 
>> Thanks,
>> Sahoo

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: script results
Date: Wed, 30 Jan 2002 23:08:04 -0800
Lines: 55
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2885

Hey folks,

Thankfully the script is running again...

I'm getting the following results even though my client
and server seem quite happy to exchange files, even
really large ones when I run them...

===========================
===(T1.Ba) Byte count differences found (INCORRECT!)
Student's Tx against our Rx (reliable mode)

---

---
Difference between expected result and your result:
1c1,3
<       0       0       0 TESTDATA.0
---
>    2666   15720  110230 TESTDATA.0
>    1812   10049  299328 TESTDATA.1
>     131     501    5098 TESTDATA.2

---

===========================

--

and

===========================
===(T1.Bb) Checksum differences found (INCORRECT!)
Student's Tx against our Rx (reliable mode)

---

---
Difference between expected result and your result:
1c1,3
< 4294967295 0 TESTDATA.0
---
> 1705403052 110230 TESTDATA.0
> 4265638025 299328 TESTDATA.1
> 2181702833 5098 TESTDATA.2

---

What is my Tx and their Rx? And what do these printouts mean
(are the numbers file sizes and the names filenames) ?

Also is it that they expected one file called TESTDATA.0 and
my code resulted in three files?

Thanks
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Server back up again, Tests today are not counted.
Date: Wed, 30 Jan 2002 23:22:17 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2886

Hi everyone,

as some of you have already noticed, the testing server is back up again. 
Sorry for any inconvenience it might have caused.

As some test this evening returned bogus or no results, we have decided 
that any tests submitted today (We) will not be counted in the testing 
limit.

Happy coding!

  Guido
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Disk full again
Date: Wed, 30 Jan 2002 23:55:44 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2887


Hi...

I cannot submit_test my code now, because of "no space left on device"..
I'm submitting to  akishan..



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: parent: reading the peer address
Date: Wed, 30 Jan 2002 23:52:34 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2888

Anurag,

this looks strange. The error message looks like transport.c after 
splitting off a new process for the client, the server part of transport.c 
is not able to read the socket infromation from this client process. It 
actually gets woken up on select but only gets zero bytes. Can you provide 
any more hints, code fragments etc. on what you are doing? What does your 
code do after the fork()?

  Guido


> I always get this error
> 
> "parent: reading the peer address on a syn handshake (read only 0 bytes)"
> 
> How do we check that we got the peeraddress on the socket?
> 
> any clues what I am not doing?
> 
> thanks
> -anurag

.

Path: shelby.stanford.edu!nntp.stanford.edu!talon2.Stanford.EDU!tortuga
From: 
Newsgroups: su.class.cs244a
Subject: Connection termination
Date: Thu, 31 Jan 2002 00:05:48 -0800
Lines: 8
Sender: 
Distribution: su
Message-ID: 
NNTP-Posting-Host: talon2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2889

If I send a FIN, should I just ignore all packets that are not a FIN or
FIN+ACK. In normal TCP I'd still be required to receive and acknowledge
data packets but that is because both sides need to agree on the
termination.

Thanks,
Josh

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: mywrite does not block--buffer overflow?
Date: Thu, 31 Jan 2002 00:14:59 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2890

Derrick,

I assume you are using the transport_appl_io callback. You don't have to 
read anything from the context in the socket. If you simply return you 
haven't accepted an additional data. The parent process will eventually 
block but you actually don't have to worry about that.

  Guido 

> From the implementation of mywrite in mysock.c, it seems that it
> does not block while our socket is sending the data. Doesn't this
> introduce the possibility that it can overflow our send buffer,
> however large it is?
> 
> For instance, if we have a sending buffer of 3072 (or any size)
> that's almost full, but we're still waiting for the ACK from the
> receiver, what happens if our mysock client requests to send
> more bytes that are left in our buffer? Can we get the parent
> process to block somehow while we are sending and verifying
> the transmission? I assume that this is what a Berkeley SOCK_STREAM
> socket does when you perform a write(...) on it.
> 
> Thanks,
> 
> Derrick

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: void  print_congestion_window_and_estimatedRTT(int fid)   Question
Date: Thu, 31 Jan 2002 00:18:28 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2891

Peter,

there is actually nothing to implement here. The function is complete as 
is. You should only update/use the global variables and that's it.

  Guido

> Do we need to implement void  print_congestion_window_and_estimatedRTT(int
> fid) ?  I ask because from what I can tell no other parts of the program
> are calling it (I did a grep).
> 
> If so, does it need to be done for part A?  I wouldn't think so... RTT
> doesn't apply until part B.  What exactly is the congestion window?
> 
> thanks,
> Pete

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: Random initial sequence number
Date: Thu, 31 Jan 2002 00:28:21 -0800
Lines: 9
Distribution: su
Message-ID: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2892

I noticed that network.c calls srand() with a constant value.  This means
that if we used rand() to produce our random initial sequence number, our
client and server will always produce the same random sequence number, among
other things.  Should we re-seed the RNG or just leave it the way it is?

Bret



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Disk full again
Date: Thu, 31 Jan 2002 00:19:52 -0800
Lines: 8
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2893

Ooops, working on it.

> 
> Hi...
> 
> I cannot submit_test my code now, because of "no space left on device"..
> I'm submitting to  akishan..

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Disk full again
Date: Thu, 31 Jan 2002 00:23:52 -0800
Lines: 11
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2894

It should be ok now, please try again and send me an email (not news) if 
you still have problems.

  Guido

> 
> Hi...
> 
> I cannot submit_test my code now, because of "no space left on device"..
> I'm submitting to  akishan..

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Re: Random initial sequence number
Date: Thu, 31 Jan 2002 00:32:17 -0800
Lines: 20
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2895

Bret Taylor wrote:

> I noticed that network.c calls srand() with a constant value.  This means
> that if we used rand() to produce our random initial sequence number, our
> client and server will always produce the same random sequence number,
> among
> other things. 

Correct.

> Should we re-seed the RNG or just leave it the way it is?

You should re-seed it. We don't expect anything cryptographically strong 
though, something like:

 srand(getpid());

in the right place will do the job.

  Guido
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine38.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Packet size > STCPHeader size + 536
Date: Thu, 31 Jan 2002 00:52:03 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine38.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2896


Should we drop such packets or read off 536 bytes. If we try to read first
536 bytes the data_len field in header will not match the value obtained using
network_recv.

Dhawal Kumar

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine5.Stanford.EDU!mgulati
From: Madhup Gulati 
Newsgroups: su.class.cs244a
Subject: Race condition!
Date: Thu, 31 Jan 2002 01:01:22 -0800
Lines: 47
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2897


Hi all,

I am stuck!!

As soon as the parent gets the peer address it puts data on the data
socket for child to read.

In my program,in case of the active side the child sends the peer address
to parent after recieving SYN_ACK but for the passive side I don't know when the
child should send the peer address?

When I send it at the start in transport_init in if(is_passive != 0) the
parent at once gives the data.....the child instead of reading SYN from
network goes to read the parent!!

So depending on which of the active of passive sides gets the address
first the data transfer starts from that end....

Where do I put the code for the child to send peer address to parent??

Thanks,

Madhup






-------------------------------------------------------------------------------
Madhup Gulati
Graduate Student              Home:
Computer Science Dept.        141 K
William Gates Building        Escondido Road
Stanford University           Stanford
CA 94305                      CA 94305

          Ph: 650-497-4701

-------------------------------------------------------------------------------






.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!jinhui
From: Jinhui Pan 
Newsgroups: su.class.cs244a
Subject: Compling error?
Date: Thu, 31 Jan 2002 01:24:57 -0800
Lines: 17
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2898


Thanks a lot for help!

I submited to test script several times today, but keep on getting
compling error.

I am quite confident they are complied well in leland cluster.
Is there anything wrong with test script?

This is what I get from test script, but I am sure I define these
in transport.h
*************************************************************************
transport.c:52: `MAX_PAYLOAD_SIZE' undeclared here (not in a function)
transport.c:125: `MAX_NUM_SOCKFDS' undeclared here (not in a function)
transport.c: In function `get_glob_ctx_local_data_pipe':
transport.c:170: `MAX_NUM_SOCKFDS' undeclared (first use in this function)

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine19.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: Compling error?
Date: Thu, 31 Jan 2002 01:47:20 -0800
Lines: 30
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine19.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Jinhui Pan 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2899



According to my understanding,
we are not supposed to modify transport.h

so you should have #defines in transport.c itself.

thanks, Arvind

On Thu, 31 Jan 2002, Jinhui Pan wrote:

>
> Thanks a lot for help!
>
> I submited to test script several times today, but keep on getting
> compling error.
>
> I am quite confident they are complied well in leland cluster.
> Is there anything wrong with test script?
>
> This is what I get from test script, but I am sure I define these
> in transport.h
> *************************************************************************
> transport.c:52: `MAX_PAYLOAD_SIZE' undeclared here (not in a function)
> transport.c:125: `MAX_NUM_SOCKFDS' undeclared here (not in a function)
> transport.c: In function `get_glob_ctx_local_data_pipe':
> transport.c:170: `MAX_NUM_SOCKFDS' undeclared (first use in this function)
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine3.Stanford.EDU!jinhui
From: Jinhui Pan 
Newsgroups: su.class.cs244a
Subject: Re: Compling error?
Date: Thu, 31 Jan 2002 01:56:41 -0800
Lines: 44
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine3.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2900


Thanks a lot!
I guess this is the reason. But the script does scratch our transport.h.
It is realy confusing that the script  gets transport.h  but does not
recogniz it...

Thanks!




On Thu, 31 Jan 2002, Arvind Bhat wrote:

>
>
> According to my understanding,
> we are not supposed to modify transport.h
>
> so you should have #defines in transport.c itself.
>
> thanks, Arvind
>
> On Thu, 31 Jan 2002, Jinhui Pan wrote:
>
> >
> > Thanks a lot for help!
> >
> > I submited to test script several times today, but keep on getting
> > compling error.
> >
> > I am quite confident they are complied well in leland cluster.
> > Is there anything wrong with test script?
> >
> > This is what I get from test script, but I am sure I define these
> > in transport.h
> > *************************************************************************
> > transport.c:52: `MAX_PAYLOAD_SIZE' undeclared here (not in a function)
> > transport.c:125: `MAX_NUM_SOCKFDS' undeclared here (not in a function)
> > transport.c: In function `get_glob_ctx_local_data_pipe':
> > transport.c:170: `MAX_NUM_SOCKFDS' undeclared (first use in this function)
> >
> >
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: Packet size > STCPHeader size + 536
Date: Thu, 31 Jan 2002 02:27:05 -0800
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012472825 17155 128.12.133.48 (31 Jan 2002 10:27:05 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: nntp.stanford.edu su.class.cs244a:2901

Any transmitter that sends such packets is not compliant with the protocol.
So drop 'em.

Jonathan

"Dhawal Kumar"  wrote in message

>
> Should we drop such packets or read off 536 bytes. If we try to read first
> 536 bytes the data_len field in header will not match the value obtained
using
> network_recv.
>
> Dhawal Kumar
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: script results
Date: Thu, 31 Jan 2002 02:31:47 -0800
Lines: 75
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012473107 17190 128.12.133.48 (31 Jan 2002 10:31:47 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: nntp.stanford.edu su.class.cs244a:2902


"Luis Robles"  wrote in message

> Hey folks,
>
> Thankfully the script is running again...
>
> I'm getting the following results even though my client
> and server seem quite happy to exchange files, even
> really large ones when I run them...
>
> ===========================
> ===(T1.Ba) Byte count differences found (INCORRECT!)
> Student's Tx against our Rx (reliable mode)
>
> ---
>
> ---
> Difference between expected result and your result:
> 1c1,3
> <       0       0       0 TESTDATA.0
> ---
> >    2666   15720  110230 TESTDATA.0
> >    1812   10049  299328 TESTDATA.1
> >     131     501    5098 TESTDATA.2
>
> ---
>
> ===========================
>
> --
>
> and
>
> ===========================
> ===(T1.Bb) Checksum differences found (INCORRECT!)
> Student's Tx against our Rx (reliable mode)
>
> ---
>
> ---
> Difference between expected result and your result:
> 1c1,3
> < 4294967295 0 TESTDATA.0
> ---
> > 1705403052 110230 TESTDATA.0
> > 4265638025 299328 TESTDATA.1
> > 2181702833 5098 TESTDATA.2
>
> ---
>
> What is my Tx and their Rx? And what do these printouts mean
> (are the numbers file sizes and the names filenames) ?

As far as I know, from running the script a bunch and using my wonderful
powers of deductive reasoning...

Your TX is server.c compiled against your transport layer. Their RX is
client.c compiled against their transport layer. The output here is the
output of the cksum program (see man cksum) which is the checksum followed
by the file size. (The output for the size mismatch is the output of the wc
program, which is lines, words, bytes.) The top is your program's output,
the bottom is expected.

>
> Also is it that they expected one file called TESTDATA.0 and
> my code resulted in three files?

Man, wouldn't that mess with your head!? It'd be a helluva bug if your
program created files out of thin air...

>
> Thanks


.

Path: shelby.stanford.edu!nntp.stanford.edu!cardinal5.Stanford.EDU!fsun
From: Fang Sun 
Newsgroups: su.class.cs244a
Subject: Question about connection termination
Date: Thu, 31 Jan 2002 02:40:16 -0800
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: cardinal5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2903

In the FAQ, the explaination about termination is:
"When you call myclose, it calls transport_close, which closes the
parent's end of application socket and waits for the child process to terminate.
When the child is doing a read on the localpipe, it should return a zero.
That is an indication to initiate the FIN exchange. "
But I am confused. Since we use "select" to know if network socket or the
localpipe has pending data, and then do the read. If the parent has
closed the localpipe, there must not have pending data in localpipe, then
select can't tell us to read the localpipe.
So what makes the child process to read on the localpipe and return a
zero, and then initiate the FIN? (the zero also indicates there is no
pending data in the localpipe)


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: Re: Question about connection termination
Date: Thu, 31 Jan 2002 03:30:34 -0800
Lines: 6
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2904

This is something I wanted to know as well.

-Steve



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Bret Taylor" 
Newsgroups: su.class.cs244a
Subject: ACK packet fields
Date: Thu, 31 Jan 2002 04:04:35 -0800
Lines: 15
Distribution: su
Message-ID: 
NNTP-Posting-Host: roble-01-352a.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2905

From the assignment:

"Data is acknowledged by setting the ACK bit in the flags field in the
packet header. If this bit is set, then the ack_seq field contains the
sequence number of the next byte of data the receiver expects..."

There is no "ack_seq" field in the packet: is this the th_seq or th_ack
field?  It does not matter when both clients use my transport layer, but it
will when they interact with other implemenations.

Thanks,
Bret



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Timothy Tay Chao 
Newsgroups: su.class.cs244a
Subject: purify UMRs
Date: Thu, 31 Jan 2002 05:26:31 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine26.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2906

When I run purify, I get Uninitialized Mem Reads on my STCP header
struct whenever i send use network_send(). My program runs fine, but
this troubles me. I don't see why I would be reading uninitialized
memory -- when I send my stcp-header with a call to network_send(),I
just pass in the address of the my stcpHdr struct, and use
sizeof(stcpHdr) as the length. I thought this might have something to do
with the fact that the struct is "packed"?

Does anyone have any suggestions?

Thanks,
Tim
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Michael Kahlil Madison 
Newsgroups: su.class.cs244a
Subject: Midterm discrepancy
Date: Thu, 31 Jan 2002 08:21:29 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga18.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2907

On Handout #1 it says our midterm is Feb 19th... however, on the website
calendar it says our midterm is Feb 14th.

Which is correct? and what about the final -- the web site says the 18th
is that correct?

-mike
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Steven Siuhong Ngai" 
Newsgroups: su.class.cs244a
Subject: windows
Date: Thu, 31 Jan 2002 08:31:22 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: ngai001.stanford.edu
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Xref: nntp.stanford.edu su.class.cs244a:2908

We count only data in our windows, right? That is, we don't include the
header byte count as part of the max number of bytes that can be
outstanding?

Thanks,
Steve


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine15.Stanford.EDU!casado
From: Martin Casado 
Newsgroups: su.class.cs244a
Subject: Submit script?
Date: Thu, 31 Jan 2002 08:34:48 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine15.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2909


Hi,

  I think the submit script might be broken.

elaine15:~/projects/hw2> /afs/ir/class/cs244a/bin/submit xwang00 hw2.A
Submit: "hw2.A" is not an assignment for this class.

Format: submit TA Assignment

TA is one of: hondroul appenz akishan xwang00 holliman

Assignment is one of: hw1
hw1             - FTP Directory Copy
elaine15:~/projects/hw2>


                                            ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth10.Stanford.EDU!cpjones
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: Re: ACK packet fields
Date: Thu, 31 Jan 2002 09:43:55 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth10.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2910

For an ack packet, you would send the ack number in the th_ack field.  For
a syn, syn-ack, or data packet you would send the sequence number in the
th_seq field.

Clayton

On Thu, 31 Jan 2002, Bret Taylor wrote:

> From the assignment:
>
> "Data is acknowledged by setting the ACK bit in the flags field in the
> packet header. If this bit is set, then the ack_seq field contains the
> sequence number of the next byte of data the receiver expects..."
>
> There is no "ack_seq" field in the packet: is this the th_seq or th_ack
> field?  It does not matter when both clients use my transport layer, but it
> will when they interact with other implemenations.
>
> Thanks,
> Bret
>
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine32.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: fid in print_congestion_window.
Date: Thu, 31 Jan 2002 09:55:30 -0800
Lines: 29
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine32.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Guido Appenzeller 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2911

Hi,
This function takes fid as parameter. But it can be called from both
network.c and mysock.c. Since we have both the fds stored in our
connection structure what should we use this fid as. Is this local_data_sd
or is it sockfd.
Thanks
Shankar
 On Thu, 31 Jan 2002, Guido
Appenzeller wrote:

> Peter,
>
> there is actually nothing to implement here. The function is complete as
> is. You should only update/use the global variables and that's it.
>
>   Guido
>
> > Do we need to implement void  print_congestion_window_and_estimatedRTT(int
> > fid) ?  I ask because from what I can tell no other parts of the program
> > are calling it (I did a grep).
> >
> > If so, does it need to be done for part A?  I wouldn't think so... RTT
> > doesn't apply until part B.  What exactly is the congestion window?
> >
> > thanks,
> > Pete
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: Race condition!
Date: Thu, 31 Jan 2002 10:07:13 -0800
Lines: 57
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2912


For passive side, child has to write to syn_sd only after receiving SYN

"Madhup Gulati"  wrote in message

>
> Hi all,
>
> I am stuck!!
>
> As soon as the parent gets the peer address it puts data on the data
> socket for child to read.
>
> In my program,in case of the active side the child sends the peer address
> to parent after recieving SYN_ACK but for the passive side I don't know
when the
> child should send the peer address?
>
> When I send it at the start in transport_init in if(is_passive != 0) the
> parent at once gives the data.....the child instead of reading SYN from
> network goes to read the parent!!
>
> So depending on which of the active of passive sides gets the address
> first the data transfer starts from that end....
>
> Where do I put the code for the child to send peer address to parent??
>
> Thanks,
>
> Madhup
>
>
>
>
>
>
> --------------------------------------------------------------------------
-----
> Madhup Gulati
> Graduate Student              Home:
> Computer Science Dept.        141 K
> William Gates Building        Escondido Road
> Stanford University           Stanford
> CA 94305                      CA 94305
>
>           Ph: 650-497-4701
>
> --------------------------------------------------------------------------
-----
>
>
>
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine42.Stanford.EDU!rxuan
From: Ruozhong Xuan 
Newsgroups: su.class.cs244a
Subject: Re: ACK packet fields
Date: Thu, 31 Jan 2002 10:12:53 -0800
Lines: 37
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine42.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Clayton Pierce Jones 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2913

Hi,
   Do we need to set the ACK flag bit on and set the ACK value when we are
sending a data packet (which contains data) ?

Thanks.
Ruozhong


On Thu, 31 Jan 2002, Clayton Pierce Jones wrote:

> For an ack packet, you would send the ack number in the th_ack field.  For
> a syn, syn-ack, or data packet you would send the sequence number in the
> th_seq field.
>
> Clayton
>
> On Thu, 31 Jan 2002, Bret Taylor wrote:
>
> > From the assignment:
> >
> > "Data is acknowledged by setting the ACK bit in the flags field in the
> > packet header. If this bit is set, then the ack_seq field contains the
> > sequence number of the next byte of data the receiver expects..."
> >
> > There is no "ack_seq" field in the packet: is this the th_seq or th_ack
> > field?  It does not matter when both clients use my transport layer, but it
> > will when they interact with other implemenations.
> >
> > Thanks,
> > Bret
> >
> >
> >
> >
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth10.Stanford.EDU!cpjones
From: Clayton Pierce Jones 
Newsgroups: su.class.cs244a
Subject: Re: ACK packet fields
Date: Thu, 31 Jan 2002 10:15:42 -0800
Lines: 47
Distribution: su
Message-ID: 
References: 
 
 
NNTP-Posting-Host: myth10.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2914

An ack packet is sent to acknowledge that some data was actually
received... so it would not really make sense for a data packet to have an
ack flag (because it is not acknowledging anything... it is sending
something).

Clayton

On Thu, 31 Jan 2002, Ruozhong Xuan wrote:

> Hi,
>    Do we need to set the ACK flag bit on and set the ACK value when we are
> sending a data packet (which contains data) ?
>
> Thanks.
> Ruozhong
>
>
> On Thu, 31 Jan 2002, Clayton Pierce Jones wrote:
>
> > For an ack packet, you would send the ack number in the th_ack field.  For
> > a syn, syn-ack, or data packet you would send the sequence number in the
> > th_seq field.
> >
> > Clayton
> >
> > On Thu, 31 Jan 2002, Bret Taylor wrote:
> >
> > > From the assignment:
> > >
> > > "Data is acknowledged by setting the ACK bit in the flags field in the
> > > packet header. If this bit is set, then the ack_seq field contains the
> > > sequence number of the next byte of data the receiver expects..."
> > >
> > > There is no "ack_seq" field in the packet: is this the th_seq or th_ack
> > > field?  It does not matter when both clients use my transport layer, but it
> > > will when they interact with other implemenations.
> > >
> > > Thanks,
> > > Bret
> > >
> > >
> > >
> > >
> >
> >
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: Race condition!
Date: Thu, 31 Jan 2002 10:11:36 -0800
Lines: 69
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2915


I was just expressing my opinion..
I was being so terse that I forgot to mention that..
Just hope that you're not stuck any more..

"BAEHOPIL"  wrote in message

>
> For passive side, child has to write to syn_sd only after receiving SYN
>
> "Madhup Gulati"  wrote in message
> 
> >
> > Hi all,
> >
> > I am stuck!!
> >
> > As soon as the parent gets the peer address it puts data on the data
> > socket for child to read.
> >
> > In my program,in case of the active side the child sends the peer
address
> > to parent after recieving SYN_ACK but for the passive side I don't know
> when the
> > child should send the peer address?
> >
> > When I send it at the start in transport_init in if(is_passive != 0) the
> > parent at once gives the data.....the child instead of reading SYN from
> > network goes to read the parent!!
> >
> > So depending on which of the active of passive sides gets the address
> > first the data transfer starts from that end....
> >
> > Where do I put the code for the child to send peer address to parent??
> >
> > Thanks,
> >
> > Madhup
> >
> >
> >
> >
> >
> >
>
> --------------------------------------------------------------------------
> -----
> > Madhup Gulati
> > Graduate Student              Home:
> > Computer Science Dept.        141 K
> > William Gates Building        Escondido Road
> > Stanford University           Stanford
> > CA 94305                      CA 94305
> >
> >           Ph: 650-497-4701
> >
>
> --------------------------------------------------------------------------
> -----
> >
> >
> >
> >
> >
> >
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga14.Stanford.EDU!aminf13
From: Amin Firoozshahian 
Newsgroups: su.class.cs244a
Subject: Problem with test script
Date: Thu, 31 Jan 2002 10:53:24 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga14.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2916



  Hi,

  I think the test script have some problems again, haven't it?

  Amin

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Sriram Viji" 
Newsgroups: su.class.cs244a
Subject: network termination
Date: Thu, 31 Jan 2002 10:57:08 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: glaurung.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Xref: nntp.stanford.edu su.class.cs244a:2917


when a application closes its socket:
the child process sends out a FIN packet and waits for a FIN_ACK from the
peer

Q:  does it consider any of the packets received between sending the FIN and
receiving the FIN_ACK?

thanks,
sriram


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: script results
Date: Thu, 31 Jan 2002 11:36:00 -0800
Lines: 83
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2918

Took me a while to figure this one out, too.  My clue however was that 
when I ran large files between my client and server on hosts that are 
sufficiently distant from one another (elaine7 and myth7 for example), 
repeated runs would make the allegedly reliable UDP drop packets.  I put 
some delays in my code to not cause so much congestion and that cleared 
things up.

Scary stuff when you really can't depend on a reliable underlying transport.

-Sandeep

Luis Robles wrote:

> Hey folks,
> 
> Thankfully the script is running again...
> 
> I'm getting the following results even though my client
> and server seem quite happy to exchange files, even
> really large ones when I run them...
> 
> ===========================
> ===(T1.Ba) Byte count differences found (INCORRECT!)
> Student's Tx against our Rx (reliable mode)
> 
> ---
> 
> ---
> Difference between expected result and your result:
> 1c1,3
> <       0       0       0 TESTDATA.0
> ---
> 
>>   2666   15720  110230 TESTDATA.0
>>   1812   10049  299328 TESTDATA.1
>>    131     501    5098 TESTDATA.2
>>
> 
> ---
> 
> ===========================
> 
> --
> 
> and
> 
> ===========================
> ===(T1.Bb) Checksum differences found (INCORRECT!)
> Student's Tx against our Rx (reliable mode)
> 
> ---
> 
> ---
> Difference between expected result and your result:
> 1c1,3
> < 4294967295 0 TESTDATA.0
> ---
> 
>>1705403052 110230 TESTDATA.0
>>4265638025 299328 TESTDATA.1
>>2181702833 5098 TESTDATA.2
>>
> 
> ---
> 
> What is my Tx and their Rx? And what do these printouts mean
> (are the numbers file sizes and the names filenames) ?
> 
> Also is it that they expected one file called TESTDATA.0 and
> my code resulted in three files?
> 
> Thanks
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Disk full again
Date: Thu, 31 Jan 2002 11:37:26 -0800
Lines: 29
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
To: Guido Appenzeller 
Xref: nntp.stanford.edu su.class.cs244a:2919

This is still a problem.  And the submit script is broken, too.  Still 
complains about hw2.A being an invalid project.

-Sandeep

Guido Appenzeller wrote:

> It should be ok now, please try again and send me an email (not news) if 
> you still have problems.
> 
>   Guido
> 
> 
>>Hi...
>>
>>I cannot submit_test my code now, because of "no space left on device"..
>>I'm submitting to  akishan..
>>
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Question about connection termination
Date: Thu, 31 Jan 2002 11:41:29 -0800
Lines: 32
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2920

When the parent closes the pipe, your child's select WILL trigger.  And 
you'll do the read, see the 0 bytes, etc...

-Sandeep

Fang Sun wrote:

> In the FAQ, the explaination about termination is:
> "When you call myclose, it calls transport_close, which closes the
> parent's end of application socket and waits for the child process to terminate.
> When the child is doing a read on the localpipe, it should return a zero.
> That is an indication to initiate the FIN exchange. "
> But I am confused. Since we use "select" to know if network socket or the
> localpipe has pending data, and then do the read. If the parent has
> closed the localpipe, there must not have pending data in localpipe, then
> select can't tell us to read the localpipe.
> So what makes the child process to read on the localpipe and return a
> zero, and then initiate the FIN? (the zero also indicates there is no
> pending data in the localpipe)
> 
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth3.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: Optimizations on transmission
Date: 31 Jan 2002 20:38:18 GMT
Organization: Stanford University, CA 94305, USA
Lines: 14
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth3.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2921

The program sheet says under Data Packets that STCP performs no
optimizations for grouping small amounts of data on the first
transmission. I've noticed that (without trying) my code does this. So

1)
should I add code to try to prevent this.
2)
as my code does not work with the script client/server at all, but work
fine together could this be why? (I am running out of ideas)


Thank you,

-mark
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine28.Stanford.EDU!brandon
From: Brandon Badger 
Newsgroups: su.class.cs244a
Subject: Error on network_send
Date: Thu, 31 Jan 2002 12:52:44 -0800
Lines: 29
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine28.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2922

I'm getting stuck on an error where network_send() returns -1 when the
server tries to send the contents of the requested file to the client.

1) The handshake works correctly.
2) transport_appl_io() is called in the client and the filename is passed
to the client's child.  This sends the filename on sockfd.
3) transport_sock_io() is called in the server and the filename is passed
to the server's parent.
4) transport_appl_io() is called in the server and the contents of the
file are passed to the server's child.  At this point I'm able to print
out the contents of the file.  - But, when I try to send the file contents
through sockfd, the network_send function returns -1;

any ideas?  What are some causes for network_send to return -1?

In my transport_appl_io() function, the network_send code works correctly
for the client side when it sends the filename to the server.

stcpPacket = malloc(packetSize);
memcpy(stcpPacket, hdrPtr, sizeof(STCPHeader));
memcpy(stcpPacket + sizeof(STCPHeader), msg + dataStart, len);
/* This printf of the file contents works */
/* printf("\nMSG:%s", stcpPacket + sizeof(STCPHeader)); */
nSent = network_send(ctx->sockfd, stcpPacket, packetSize, NULL);

Thanks for any help,
Brandon


.

Path: shelby.stanford.edu!nntp.stanford.edu!epic1.Stanford.EDU!abhat
From: Arvind Bhat 
Newsgroups: su.class.cs244a
Subject: Re: purify UMRs
Date: Thu, 31 Jan 2002 13:06:41 -0800
Lines: 29
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: epic1.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Timothy Tay Chao 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2923


Hi Tim,

Are you initializing (bzero/memset) the stcp header before
u send it out ? It is possible that you set some of the
fields in struct like the th_seq, but leave rest of it
uninitialized, causing them to have unknown values.

hth,

Thanks, Arvind


On Thu, 31 Jan 2002, Timothy Tay Chao wrote:

> When I run purify, I get Uninitialized Mem Reads on my STCP header
> struct whenever i send use network_send(). My program runs fine, but
> this troubles me. I don't see why I would be reading uninitialized
> memory -- when I send my stcp-header with a call to network_send(),I
> just pass in the address of the my stcpHdr struct, and use
> sizeof(stcpHdr) as the length. I thought this might have something to do
> with the fact that the struct is "packed"?
>
> Does anyone have any suggestions?
>
> Thanks,
> Tim
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Regarding target address when using network_send
Date: Thu, 31 Jan 2002 13:52:12 -0800
Lines: 40
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2925


I wonder about how network_send() figures out the destination address..

For active side, it doesn't have to worry because we have already registered
the destination address using connect().
But for passive side, it seems to get the destination address from
global_net_ctx->fromaddr.

  if (global_net_ctx->is_passive)
    {
      mh.msg_name = (char*) &(global_net_ctx->fromaddr);
      mh.msg_namelen = global_net_ctx->fromlen;
    }

But global_net_ctx->fromaddr is set in network_recv()..

  len = recvfrom(sockfd, recvBuf, recvLen, 0,
                &(global_net_ctx->fromaddr), &(global_net_ctx->fromlen));

It seems to me that fromaddr is set to the source address of the received
packet..

Then, it seems to me that network_send() is sending to an IP address from
which
we received the last packet, not to an IP address from which we initially
accepted
connection.
It won't be a problem if there is only one client at a time,
but if another should try to connect while one is connected,
I think everything will be messed up..

My code seems to be working without this consideration,
but I really do wonder about what it's intended to be like..

And, when I used connect() at the passive side,
network_send() no longer worked.. Is there any reason we should not
use connect() on a UDP socket we already used bind() on?



.

Path: shelby.stanford.edu!nntp.stanford.edu!myth4.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: compile error in test script
Date: 31 Jan 2002 21:58:30 GMT
Organization: Stanford University, CA 94305, USA
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: myth4.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2926



Hi, I am getting this error message

    * Test 1.A: Fails to compile
  [out of 20]
 
[SUMMARY] NOT OK
[RESULT]  ERROR:  No server.sample in /afs/ir/class/cs244a/submissions/restricted/hw2.A/holliman/mdolan//compile.sun.


any idea?

Thanks


-mark


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Testing script/Submit script...
Date: Thu, 31 Jan 2002 14:06:36 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: dynamogen.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.6.1
Xref: nntp.stanford.edu su.class.cs244a:2927

Everyone,

it looks like the testing script ran out of disk space a few minutes ago 
again and the submission script is having probles as well.

We are working on it and will post again once everything is fixed.

  Guido
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine5.Stanford.EDU!fsun
From: Fang Sun 
Newsgroups: su.class.cs244a
Subject: How should the server exit
Date: Thu, 31 Jan 2002 14:17:18 -0800
Lines: 19
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine5.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2928

The client initiate the connection termination and both the parent and
child can exit. But what about the server? In the sever.c code, after it
has finished with one client, it go back to
 for(;;) {
	sd = myaccept(bindsd, (struct sockaddr*)&sin, &len, unreliable);
         .............

Then there is no client having connection request, so my program displays:

####Accepting a new connection now at port# 61188#### (sockfd=3)
parent: reading the peer address on a syn handshake (read only 0
bytes)recv: Error 0
myaccept: Error 0

Is that the correct exit status of the server, or it should wait there for
ever, but how to make it wait there for ever?

Thanks

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: how to submit hw2.A
Date: Thu, 31 Jan 2002 14:36:08 -0800
Lines: 16
Distribution: su
Message-ID: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
X-Accept-Language: es, en-us, fr, de
Xref: nntp.stanford.edu su.class.cs244a:2929

Hi,

There seems to be some confusion about how to submit hw2.A. This time we 
are using a new script for doing the submission. From the directory 
where you have the code you have to call:

/afs/ir/class/cs244a/bin/submit.pl hw2.A TAname

where TAname is one of the akishan, appenz, holliman, hondroul or xwang00

Until 5 minutes ago there was a problem with the permissions of the 
directory. Now it has been solved, and you start submitting your code 
for grading.

Pablo

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Guido Appenzeller" 
Newsgroups: su.class.cs244a
Subject: Re: Control Loop and Multiple Child Processes
Date: Thu, 31 Jan 2002 15:27:11 -0800
Lines: 36
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dnab4046a5.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2930

Ron,

the short answer is that there is only one connection for this exercise.

Generally, it depends how you code things. I would think that the select in
the server part of transport.c only has one thread for all clients, it has
to select on fd's for all of them. If you use select in the clients that's
different, however the perforomance hit you take by doing a select on all of
them and then having some additional checks is probably minimal so doing a
select on everything would work as well.

  Guido

> I'm slightly confused as to how things should work when there are multiple
> entries in the context array (and therefore multiple child processes.)
It
> seems to me that a single child process could handle all of the transport
> layer processing, yet we seem to fork a child process for each connection.
> While this eases the communications, it seems to me that it complicates
the
> control loop...
>
> Enough rambling; here's my question:
>
> Should we be coding the control loop so that it only 'selects' the file
> descriptors associated with this particular (child) process?    (I don't
see
> another way, but the skeleton code seems to imply otherwise.)
>
> Thanks,
>
> --Ron
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Guido Appenzeller" 
Newsgroups: su.class.cs244a
Subject: Re: Initial SYN Send
Date: Thu, 31 Jan 2002 15:30:29 -0800
Lines: 26
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: dnab4046a5.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2931

I have no guess what this could be. I have office hours today @6pm, if you
want to we can have a look at it then.

"Steven Siuhong Ngai"  schrieb im Newsbeitrag

> Interesting behavior:
>
> When my client sends out the SYN packet from ctx->sockfd on the very first
> call (22 bytes, successful), select immediately begins to register the
> presence of data to be read on ctx->sockfd. [This is true because I skip
the
> preceding code if I am passive, and select does the blocking/timeout in
that
> case.] This is weird because I have not implemented the SYN_ACK on the
other
> side. An attempt to investigate this mysterious data through network_recv
> produces a -1.
>
> Anyone encounter anything similar? I am correctly resetting the socket set
> before it heads into the select statement.
>
> Steve
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine4.Stanford.EDU!wjiang
From: Huan Wanda Jiang 
Newsgroups: su.class.cs244a
Subject: when I ran student Tx - student Rx, ok.  test script said not ok ??
Date: Thu, 31 Jan 2002 16:34:23 -0800
Lines: 20
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2932

Hi,

when I run client and server, they seem to exchange files well. However, I
just submitted a test script and it said
===========================
===(T1.Jb) Checksum differences found (INCORRECT!)
Student's Tx against student's Rx (reliable mode)

---

---
Difference between expected result and your result:
1a2,3
> 4265638025 299328 TESTDATA.1
> 2181702833 5098 TESTDATA.2


any hint?  Thanks!


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Pablo Molinero Fernandez 
Newsgroups: su.class.cs244a
Subject: scripts are working
Date: Thu, 31 Jan 2002 16:39:19 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: manzanares.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
X-Accept-Language: es, en-us, fr, de
Xref: nntp.stanford.edu su.class.cs244a:2933

Hi,

I just wanted to let you know that the both the script for testing and 
submitting are working fine.

Pablo

.

Path: shelby.stanford.edu!nntp.stanford.edu!myth3.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: Re: when I ran student Tx - student Rx, ok.  test script said not ok ??
Date: 1 Feb 2002 00:44:03 GMT
Organization: Stanford University, CA 94305, USA
Lines: 5
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth3.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2934



Hi, I am having the same problem. I'm thinking it must be because we're
not following the STCP protocol correctly.

.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: The TA is in...
Date: Thu, 31 Jan 2002 17:08:02 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2935

Hi everyone,

as the assignment is due tomorrow, my office hours today will
start an hour earlier (they end as usual). I am now in Sweet 
Hall.

  Guido

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Midterm discrepancy
Date: 1 Feb 2002 01:17:48 GMT
Lines: 14
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2936

The dates posted on the time schedule on the course web site are the
correct dates. Thus, the midterm is in fact two weeks from today (Feb
14th). 

Arun

Michael Kahlil Madison  wrote: : On Handout
#1 it says our midterm is Feb 19th... however, on the website : calendar
it says our midterm is Feb 14th.

: Which is correct? and what about the final -- the web site says the 18th
: is that correct?

: -mike
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: windows
Date: 1 Feb 2002 01:19:10 GMT
Lines: 17
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2937

Yes, the bytes of the header do not count as data that needs to be
buffered, and thus do not need to consume sequence number space. There are
however some sequence numbers however that have no associated data, e.g.,
the SYN numbers.

Arun


Steven Siuhong Ngai  wrote:
: We count only data in our windows, right? That is, we don't include the
: header byte count as part of the max number of bytes that can be
: outstanding?

: Thanks,
: Steve


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Submit script?
Date: 1 Feb 2002 01:20:42 GMT
Lines: 24
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2938

Yes, we're working on this. It should be up and running now.

Arun

Martin Casado  wrote:

: Hi,

:   I think the submit script might be broken.

: elaine15:~/projects/hw2> /afs/ir/class/cs244a/bin/submit xwang00 hw2.A
: Submit: "hw2.A" is not an assignment for this class.

: Format: submit TA Assignment

: TA is one of: hondroul appenz akishan xwang00 holliman

: Assignment is one of: hw1
: hw1             - FTP Directory Copy
: elaine15:~/projects/hw2>


:                                             ~~m

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: network termination
Date: 1 Feb 2002 01:29:38 GMT
Lines: 19
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2939

Once the FIN is sent, you can wait either for a FIN or a FIN_ACK (a FIN if 
both sides send it simultaneously rsulting in a deadlock situation -- 
though this is unlikely).

Arun

Sriram Viji  wrote:

: when a application closes its socket:
: the child process sends out a FIN packet and waits for a FIN_ACK from the
: peer

: Q:  does it consider any of the packets received between sending the FIN and
: receiving the FIN_ACK?

: thanks,
: sriram


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: scripts are working
Date: Thu, 31 Jan 2002 17:35:58 -0800
Lines: 25
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2940


Hi...

I can't still do submit_test... Please check this...

>>>>/afs/ir/class/cs244a/bin/submit_test.pl hw2.A akishan

SubmitBase: /afs/ir/class/cs244a/submissions
Debug Level = 1
mkdir /afs/ir/class/cs244a/submissions/hw2.A/akishan/hpbae
mkdir /afs/ir/class/cs244a/submissions/hw2.A/akishan/hpbae: Permission
denied at /afs/ir/class/cs244a/bin/submit_test.pl line 135


"Pablo Molinero Fernandez"  wrote in message

> Hi,
>
> I just wanted to let you know that the both the script for testing and
> submitting are working fine.
>
> Pablo
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine13.Stanford.EDU!homa
From: Alex Khomenko 
Newsgroups: su.class.cs244a
Subject: Re: scripts are working
Date: Thu, 31 Jan 2002 17:43:16 -0800
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2941


I submitted my test more than an hour ago. I understand that there might
be other tests in the queue, but is it reasonable to expect that the wait
would be this long?

Thanks,
Alex

On Thu, 31 Jan 2002, Pablo Molinero Fernandez wrote:

> Hi,
>
> I just wanted to let you know that the both the script for testing and
> submitting are working fine.
>
> Pablo
>
>

-- 
Knowledge is a deadly friend when no one sets the rules.
The fate of all mankind I see is in the hands of fools. (KC "Epitaph")

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: How should the server exit
Date: 1 Feb 2002 01:45:29 GMT
Lines: 28
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2942

The server should return to a state in which it is ready to accept a new 
connection. The client should close and exit, but the server will 
essentially return to its initial state, such that another client may 
connect to it.

Arun

Fang Sun  wrote:

: The client initiate the connection termination and both the parent and
: child can exit. But what about the server? In the sever.c code, after it
: has finished with one client, it go back to
:  for(;;) {
: 	sd = myaccept(bindsd, (struct sockaddr*)&sin, &len, unreliable);
:          .............

: Then there is no client having connection request, so my program displays:

: ####Accepting a new connection now at port# 61188#### (sockfd=3)
: parent: reading the peer address on a syn handshake (read only 0
: bytes)recv: Error 0
: myaccept: Error 0

: Is that the correct exit status of the server, or it should wait there for
: ever, but how to make it wait there for ever?

: Thanks

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Error on network_send
Date: 1 Feb 2002 01:48:35 GMT
Lines: 35
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2943

Your code looks mostly correct....if the problem persists, please bring 
the code into office hour such that we may take a closer look at it.

Arun

Brandon Badger  wrote:
: I'm getting stuck on an error where network_send() returns -1 when the
: server tries to send the contents of the requested file to the client.

: 1) The handshake works correctly.
: 2) transport_appl_io() is called in the client and the filename is passed
: to the client's child.  This sends the filename on sockfd.
: 3) transport_sock_io() is called in the server and the filename is passed
: to the server's parent.
: 4) transport_appl_io() is called in the server and the contents of the
: file are passed to the server's child.  At this point I'm able to print
: out the contents of the file.  - But, when I try to send the file contents
: through sockfd, the network_send function returns -1;

: any ideas?  What are some causes for network_send to return -1?

: In my transport_appl_io() function, the network_send code works correctly
: for the client side when it sends the filename to the server.

: stcpPacket = malloc(packetSize);
: memcpy(stcpPacket, hdrPtr, sizeof(STCPHeader));
: memcpy(stcpPacket + sizeof(STCPHeader), msg + dataStart, len);
: /* This printf of the file contents works */
: /* printf("\nMSG:%s", stcpPacket + sizeof(STCPHeader)); */
: nSent = network_send(ctx->sockfd, stcpPacket, packetSize, NULL);

: Thanks for any help,
: Brandon


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Luis Robles 
Newsgroups: su.class.cs244a
Subject: Re: scripts are working
Date: Thu, 31 Jan 2002 17:49:34 -0800
Lines: 29
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: saga7.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2944

ditto

BAEHOPIL wrote:
> 
> Hi...
> 
> I can't still do submit_test... Please check this...
> 
> >>>>/afs/ir/class/cs244a/bin/submit_test.pl hw2.A akishan
> 
> SubmitBase: /afs/ir/class/cs244a/submissions
> Debug Level = 1
> mkdir /afs/ir/class/cs244a/submissions/hw2.A/akishan/hpbae
> mkdir /afs/ir/class/cs244a/submissions/hw2.A/akishan/hpbae: Permission
> denied at /afs/ir/class/cs244a/bin/submit_test.pl line 135
> 
> "Pablo Molinero Fernandez"  wrote in message
> 
> > Hi,
> >
> > I just wanted to let you know that the both the script for testing and
> > submitting are working fine.
> >
> > Pablo
> >

-- 
       Luis Robles

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: when I ran student Tx - student Rx, ok.  test script said not ok ??
Date: Thu, 31 Jan 2002 17:53:56 -0800
Lines: 42
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2945


I also had this mysterious error...
But when I tried to transfer a large file with my own TX and RX, it really
failed. ( blocked somewhere..)
And only after adding some (really) basic flow control, could I pass the
test..
It seemed to me that flooding packets without any control causes some part
to stop working..
(  I'm not sure where... I was just sure that I was following the spec
because other SYN/ACK/FIN related
tests were OK.. )
Maybe Sandeep had a similar experience with us.. although he took a
different solution..
( See his "Found it" posting.. )

Good luck...


"Huan Wanda Jiang"  wrote in message

> Hi,
>
> when I run client and server, they seem to exchange files well. However, I
> just submitted a test script and it said
> ===========================
> ===(T1.Jb) Checksum differences found (INCORRECT!)
> Student's Tx against student's Rx (reliable mode)
>
> ---
>
> ---
> Difference between expected result and your result:
> 1a2,3
> > 4265638025 299328 TESTDATA.1
> > 2181702833 5098 TESTDATA.2
>
>
> any hint?  Thanks!
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Vasco Chatalbashev" 
Newsgroups: su.class.cs244a
Subject: UDP
Date: Thu, 31 Jan 2002 18:03:21 -0800
Lines: 12
Distribution: su
Message-ID: 
Reply-To: "Vasco Chatalbashev" 
NNTP-Posting-Host: vassil.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2946

So, our network layer is essentially UDP.
We are assuming that the Stanford network is lightly loaded, so that
unless we purposely simulate dropping(or reordering )packets, packet
loss will not occur. Isn't it possible,however, that, say, while you are
running
tests on the submissions, a UDP datagram carrying a STCP packet does get
dropped (presumably it happens
sometimes,) thus making a correct implementation of STCP act unpredictably
for the first milestone? Am I missing something?



.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: Regarding target address when using network_send
Date: 1 Feb 2002 02:08:34 GMT
Lines: 48
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga4.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2947


Yes, as we have mentioned before, you will not need to worry about the 
multi-client situation for this assignment...the architecture does not 
lend itself to this. 

Arun

BAEHOPIL  wrote:

: I wonder about how network_send() figures out the destination address..

: For active side, it doesn't have to worry because we have already registered
: the destination address using connect().
: But for passive side, it seems to get the destination address from
: global_net_ctx->fromaddr.

:   if (global_net_ctx->is_passive)
:     {
:       mh.msg_name = (char*) &(global_net_ctx->fromaddr);
:       mh.msg_namelen = global_net_ctx->fromlen;
:     }

: But global_net_ctx->fromaddr is set in network_recv()..

:   len = recvfrom(sockfd, recvBuf, recvLen, 0,
:                 &(global_net_ctx->fromaddr), &(global_net_ctx->fromlen));

: It seems to me that fromaddr is set to the source address of the received
: packet..

: Then, it seems to me that network_send() is sending to an IP address from
: which
: we received the last packet, not to an IP address from which we initially
: accepted
: connection.
: It won't be a problem if there is only one client at a time,
: but if another should try to connect while one is connected,
: I think everything will be messed up..

: My code seems to be working without this consideration,
: but I really do wonder about what it's intended to be like..

: And, when I used connect() at the passive side,
: network_send() no longer worked.. Is there any reason we should not
: use connect() on a UDP socket we already used bind() on?



.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine7.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: Re: when I ran student Tx - student Rx, ok.  test script said not ok ??
Date: 1 Feb 2002 02:14:47 GMT
Organization: Stanford University, CA 94305, USA
Lines: 5
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine7.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2948


How big did you have to get before you saw problems?
I can successfully transfer 10M with no lock up.

-mark
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: when I ran student Tx - student Rx, ok.  test script said not ok ??
Date: Thu, 31 Jan 2002 18:42:43 -0800
Lines: 15
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2949


Not that large.. Just a few Mbytes..
( My code locked up no matter client and server are on the same machine or
not...)
If you're OK with 10M, maybe you have a different problem..

"Mark Joseph Dolan"  wrote in message

>
> How big did you have to get before you saw problems?
> I can successfully transfer 10M with no lock up.
>
> -mark


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Submit script?
Date: Thu, 31 Jan 2002 18:51:11 -0800
Lines: 41
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
To: Arun Upadhyaya Kishan 
Xref: nntp.stanford.edu su.class.cs244a:2950

No it's not; I'm getting an "Illegal instruction" error from it.

-Sandeep

Arun Upadhyaya Kishan wrote:

> Yes, we're working on this. It should be up and running now.
> 
> Arun
> 
> Martin Casado  wrote:
> 
> : Hi,
> 
> :   I think the submit script might be broken.
> 
> : elaine15:~/projects/hw2> /afs/ir/class/cs244a/bin/submit xwang00 hw2.A
> : Submit: "hw2.A" is not an assignment for this class.
> 
> : Format: submit TA Assignment
> 
> : TA is one of: hondroul appenz akishan xwang00 holliman
> 
> : Assignment is one of: hw1
> : hw1             - FTP Directory Copy
> : elaine15:~/projects/hw2>
> 
> 
> :                                             ~~m
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: Submit script?
Date: Thu, 31 Jan 2002 18:58:22 -0800
Lines: 61
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
To: Sandeep Tamhankar 
CC: Arun Upadhyaya Kishan 
Xref: nntp.stanford.edu su.class.cs244a:2951

I take it back; I was running submit, not submit.pl.  You should've 
changed submit to be a shell script that executes submit.pl to avoid 
confusion.

Still, there's a warning/error stating:

fs: You don't have the required access rights on 
'/afs/ir/class/cs244a/submissions/grading/hw2.A/akishan/sandeept

But it seems like it submitted anyway because when I made a second 
attempt, it asked if I wanted to have this set of files graded instead 
of my original submission.  So it's mostly working now.

-Sandeep

Sandeep Tamhankar wrote:

> No it's not; I'm getting an "Illegal instruction" error from it.
> 
> -Sandeep
> 
> Arun Upadhyaya Kishan wrote:
> 
>> Yes, we're working on this. It should be up and running now.
>>
>> Arun
>>
>> Martin Casado  wrote:
>>
>> : Hi,
>>
>> :   I think the submit script might be broken.
>>
>> : elaine15:~/projects/hw2> /afs/ir/class/cs244a/bin/submit xwang00 hw2.A
>> : Submit: "hw2.A" is not an assignment for this class.
>>
>> : Format: submit TA Assignment
>>
>> : TA is one of: hondroul appenz akishan xwang00 holliman
>>
>> : Assignment is one of: hw1
>> : hw1             - FTP Directory Copy
>> : elaine15:~/projects/hw2>
>>
>>
>> :                                             ~~m
>>
>>
> 
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: network termination
Date: Thu, 31 Jan 2002 18:59:26 -0800
Lines: 37
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2952

Since the spec says that only the "client" can close the connection, 
deadlock shouldn't be possible, right?

-Sandeep

Arun Upadhyaya Kishan wrote:

> Once the FIN is sent, you can wait either for a FIN or a FIN_ACK (a FIN if 
> both sides send it simultaneously rsulting in a deadlock situation -- 
> though this is unlikely).
> 
> Arun
> 
> Sriram Viji  wrote:
> 
> : when a application closes its socket:
> : the child process sends out a FIN packet and waits for a FIN_ACK from the
> : peer
> 
> : Q:  does it consider any of the packets received between sending the FIN and
> : receiving the FIN_ACK?
> 
> : thanks,
> : sriram
> 
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: when I ran student Tx - student Rx, ok.  test script said not ok ??
Date: Thu, 31 Jan 2002 19:04:35 -0800
Lines: 31
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2953

As ... BAEHOPIL (wish I knew his/her real name) said earlier, I ran into 
the blocking problem, too, and implemented some very rudimentary flow 
control (i.e. delays) to keep UDP datagrams from getting lost in the ether.

I was able to make things block when sending a 50k file REPEATEDLY 
between elaine7 and myth8.  I just kept my server running, and everytime 
my client finished, I'd up-arrow-and-enter to do it again.  Usually the 
third-time would make it block.

So if you're successfully transferring a large amount of data 
repeatedly, then you probably don't have the same problem that we did.

-Sandeep

Mark Joseph Dolan wrote:

> How big did you have to get before you saw problems?
> I can successfully transfer 10M with no lock up.
> 
> -mark
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sandeep Tamhankar 
Newsgroups: su.class.cs244a
Subject: Re: UDP
Date: Thu, 31 Jan 2002 19:06:14 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine4.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221
X-Accept-Language: en-us
Xref: nntp.stanford.edu su.class.cs244a:2954

No, you're pretty much right.  A few of us had problems with network 
congestion -- I ended up sending packets with delays between so that the 
congestion is low enough to keep things reliable.

-Sandeep

Vasco Chatalbashev wrote:

> So, our network layer is essentially UDP.
> We are assuming that the Stanford network is lightly loaded, so that
> unless we purposely simulate dropping(or reordering )packets, packet
> loss will not occur. Isn't it possible,however, that, say, while you are
> running
> tests on the submissions, a UDP datagram carrying a STCP packet does get
> dropped (presumably it happens
> sometimes,) thus making a correct implementation of STCP act unpredictably
> for the first milestone? Am I missing something?
> 
> 
> 
> 



-- 
---------------------------------------------
Sandeep V. Tamhankar			
M.S. Student
Computer Science
Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sutin Chen 
Newsgroups: su.class.cs244a
Subject: parent searching for peeraddress on an empty socket
Date: Thu, 31 Jan 2002 20:23:24 -0800
Lines: 12
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic2.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2955

Am having problems with select and the parent thread trying to read the
peeraddress....

Basically, my parent thread for some reason is selecting the syn_sd
socket even though I have not sent it anything yet.  Since I haven't
sent anything to it, the thread of course reads 0 bytes on a recv call
and then craps out since it didn't get a peeraddress.

Any ideas would be very much appreciated!

Thanks,
Sutin
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine17.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: help!! script errors!!
Date: 1 Feb 2002 04:31:21 GMT
Organization: Stanford University, CA 94305, USA
Lines: 29
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine17.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2956

Hi, if anybody has any suggestions they would be greatly appreciated!!

I've been having this problem for a day now and I can't seem to solve it.
I pass all the tests except T1.B and T1.C which fail completly.
And no matter what I do I can't seem cause my code to run incorrectly, I even
created files of the same sizes as the tests. But this

> ===(T1.Ba) Byte count differences found (INCORRECT!)
> Student's Tx against our Rx (reliable mode)
> 
> ---
> 
> ---
> Difference between expected result and your result:
> 0a1,3
> >    2666   15720  110230 TESTDATA.0
> >    1812   10049  299328 TESTDATA.1
> >     131     501    5098 TESTDATA.2
> 
> ---
> 
> ===========================

suggests to me that I'm not sending/recieving any of them. 
Any ideas?

Thank you

-mark
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine17.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: Re: parent searching for peeraddress on an empty socket
Date: 1 Feb 2002 04:39:08 GMT
Organization: Stanford University, CA 94305, USA
Lines: 4
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine17.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2957

I've had that problem. I found I had a memmory error and fixing that
solved my problem. Just an idea.

-mark
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: Submit script?
Date: Thu, 31 Jan 2002 20:50:41 -0800
Lines: 28
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: hopils.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2958

I'm having the same problem...
And I'm afraid that there was no actual submission but only the submission
flag is set, so the script is asking if we want to renew the submission...
Please.. check this..

Hopil

"Sandeep Tamhankar"  wrote in message

> I take it back; I was running submit, not submit.pl.  You should've
> changed submit to be a shell script that executes submit.pl to avoid
> confusion.
>
> Still, there's a warning/error stating:
>
> fs: You don't have the required access rights on
> '/afs/ir/class/cs244a/submissions/grading/hw2.A/akishan/sandeept
>
> But it seems like it submitted anyway because when I made a second
> attempt, it asked if I wanted to have this set of files graded instead
> of my original submission.  So it's mostly working now.
>
> -Sandeep
>
> Sandeep Tamhankar wrote:
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Desperately trying to pass the script? Read this.
Date: Thu, 31 Jan 2002 21:13:10 -0800
Lines: 95
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012540391 26624 128.12.133.48 (1 Feb 2002 05:13:11 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: nntp.stanford.edu su.class.cs244a:2959

Sandeep and others,
    I really do not believe that network congestion is causing everyone's
problems, and I think that your repeated suggestion to the contrary will end
up misleading and hurting a lot of people. Best I can tell, the test script
is run over a local UDP connection, from epic5 to epic5. (Or at worst, f rom
epic5 to epic6 or 7.) I find it extremely unlikely that the test script
would drop packets regularly over such a short hop--on a local machine they
don't even get as far as a network adapter! Not to mention, putting a delay
in sending packets doesn't help you if you're failing against their
transmitter.

    I also observe that my own code has never had a problem with the test
script for 2A. If there were dropped packets on such a regular basis for
everyone else, I don't think I'd have been so lucky as to escape. I suspect
there is some subtlety in the protocol that many people are somehow missing.
(I've seen a couple of situations where a subtle protocol glitch can lead to
test script failures that are not easily reproducible with your own code or
others'.)

    Now, one thing that I find interesting to think about is this. Suppose
that the transport layer used in the test script is a full STCP
implementation; that is, suppose it implements timeouts and retransmissions.
Suppose also that on a given test run, all packets that were sent were
received, in the order they were sent. Suppose, however, that sometimes
things ran a little slowly, and packets  took a little while to arrive. (A
slight increase in processor load  on the machine might cause the network
layer to not process the packets quite as fast, but it would still do so in
the right order.) So, this test run would be fine according to the
milestone: all packets were delivered, in order.

    An STCP implementation that supports timeouts might very well time out
and resend in this circumstance. (I've actually observed this with my
milestone 2 code with as little as 45K of data.) So, the receiver might get
a bunch of packets that they've already received. It seems from the
discussion on this group that many people are completely ignoring the
sliding window part of the protocol, with elaborate justifications. However,
if your code doesn't correctly ignore data that you've already received, you
could have too much data coming out, memory scribbles, or segfaults that are
causing problems with the script.
You'd probably never see this with another student's code, because they
never do timeouts.

    One thing you could try is making your code transmit every window twice
and see if that breaks your receiver, but it might just be quicker to put
the already-received test in and try the script again.

DISCLAIMER: all of that is pulled straight out of my overactive imagination.
The test script may be doing it this way, and it may not. (It's kind of
amusing to me that we're all sitting here trying to reverse-engineer and
second-guess a black-box script.) But the scenario I just described makes
some kind of sense to me. You could argue that the test script should be
using a barely-passing implementation of 2A, and I might agree with you.
However, the code change required to ignore already-received data should be
minor, and hey, you've tried everything else, right?

Comments?

Jonathan

"Sandeep Tamhankar"  wrote in message

> No, you're pretty much right.  A few of us had problems with network
> congestion -- I ended up sending packets with delays between so that the
> congestion is low enough to keep things reliable.
>
> -Sandeep
>
> Vasco Chatalbashev wrote:
>
> > So, our network layer is essentially UDP.
> > We are assuming that the Stanford network is lightly loaded, so that
> > unless we purposely simulate dropping(or reordering )packets, packet
> > loss will not occur. Isn't it possible,however, that, say, while you are
> > running
> > tests on the submissions, a UDP datagram carrying a STCP packet does get
> > dropped (presumably it happens
> > sometimes,) thus making a correct implementation of STCP act
unpredictably
> > for the first milestone? Am I missing something?
> >
> >
> >
> >
>
>
>
> --
> ---------------------------------------------
> Sandeep V. Tamhankar
> M.S. Student
> Computer Science
> Email: 
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Re: Desperately trying to pass the script? Read this.
Date: Thu, 31 Jan 2002 21:30:00 -0800
Lines: 358
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: hopils.stanford.edu
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0343_01C1AA9E.7056DCA0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2960

This is a multi-part message in MIME format.

------=_NextPart_000_0343_01C1AA9E.7056DCA0
Content-Type: text/plain;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable


I think I agree with Jonathan..
I made a similar assumption about test_script, and added some window =
control
which was absent at first.. Then I could pass the test..
Still, my code looks like kind of hack, but at least, it's NOT sending =
and receiving
everything given to it.

Of course, I should attach a big DISCLAIMER, too,
but as Jonathan said, putting some basic window checking isn't so =
complex
(at least there is no timeout or retransmission (I mean, for our TX), or =
reassembly )
that I think it's worth trying if you haven't done it yet..

Hopil

"Jonathan Keljo"  wrote in message =

> Sandeep and others,
>     I really do not believe that network congestion is causing =
everyone's
> problems, and I think that your repeated suggestion to the contrary =
will end
> up misleading and hurting a lot of people. Best I can tell, the test =
script
> is run over a local UDP connection, from epic5 to epic5. (Or at worst, =
f rom
> epic5 to epic6 or 7.) I find it extremely unlikely that the test =
script
> would drop packets regularly over such a short hop--on a local machine =
they
> don't even get as far as a network adapter! Not to mention, putting a =
delay
> in sending packets doesn't help you if you're failing against their
> transmitter.
>=20
>     I also observe that my own code has never had a problem with the =
test
> script for 2A. If there were dropped packets on such a regular basis =
for
> everyone else, I don't think I'd have been so lucky as to escape. I =
suspect
> there is some subtlety in the protocol that many people are somehow =
missing.
> (I've seen a couple of situations where a subtle protocol glitch can =
lead to
> test script failures that are not easily reproducible with your own =
code or
> others'.)
>=20
>     Now, one thing that I find interesting to think about is this. =
Suppose
> that the transport layer used in the test script is a full STCP
> implementation; that is, suppose it implements timeouts and =
retransmissions.
> Suppose also that on a given test run, all packets that were sent were
> received, in the order they were sent. Suppose, however, that =
sometimes
> things ran a little slowly, and packets  took a little while to =
arrive. (A
> slight increase in processor load  on the machine might cause the =
network
> layer to not process the packets quite as fast, but it would still do =
so in
> the right order.) So, this test run would be fine according to the
> milestone: all packets were delivered, in order.
>=20
>     An STCP implementation that supports timeouts might very well time =
out
> and resend in this circumstance. (I've actually observed this with my
> milestone 2 code with as little as 45K of data.) So, the receiver =
might get
> a bunch of packets that they've already received. It seems from the
> discussion on this group that many people are completely ignoring the
> sliding window part of the protocol, with elaborate justifications. =
However,
> if your code doesn't correctly ignore data that you've already =
received, you
> could have too much data coming out, memory scribbles, or segfaults =
that are
> causing problems with the script.
> You'd probably never see this with another student's code, because =
they
> never do timeouts.
>=20
>     One thing you could try is making your code transmit every window =
twice
> and see if that breaks your receiver, but it might just be quicker to =
put
> the already-received test in and try the script again.
>=20
> DISCLAIMER: all of that is pulled straight out of my overactive =
imagination.
> The test script may be doing it this way, and it may not. (It's kind =
of
> amusing to me that we're all sitting here trying to reverse-engineer =
and
> second-guess a black-box script.) But the scenario I just described =
makes
> some kind of sense to me. You could argue that the test script should =
be
> using a barely-passing implementation of 2A, and I might agree with =
you.
> However, the code change required to ignore already-received data =
should be
> minor, and hey, you've tried everything else, right?
>=20
> Comments?
>=20
> Jonathan
>=20
> "Sandeep Tamhankar"  wrote in message
> 
> > No, you're pretty much right.  A few of us had problems with network
> > congestion -- I ended up sending packets with delays between so that =
the
> > congestion is low enough to keep things reliable.
> >
> > -Sandeep
> >
> > Vasco Chatalbashev wrote:
> >
> > > So, our network layer is essentially UDP.
> > > We are assuming that the Stanford network is lightly loaded, so =
that
> > > unless we purposely simulate dropping(or reordering )packets, =
packet
> > > loss will not occur. Isn't it possible,however, that, say, while =
you are
> > > running
> > > tests on the submissions, a UDP datagram carrying a STCP packet =
does get
> > > dropped (presumably it happens
> > > sometimes,) thus making a correct implementation of STCP act
> unpredictably
> > > for the first milestone? Am I missing something?
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > ---------------------------------------------
> > Sandeep V. Tamhankar
> > M.S. Student
> > Computer Science
> > Email: 
> >
>=20
>=20

------=_NextPart_000_0343_01C1AA9E.7056DCA0
Content-Type: text/html;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dks_c_5601-1987" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I think I agree with =
Jonathan..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I made a similar assumption about =
test_script, and=20
added some window control</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>which was absent at first.. Then I =
could pass the=20
test..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Still, my code looks like kind of hack, =
but at=20
least, it's NOT sending and receiving</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>everything given to it.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Of course, I should attach a big =
DISCLAIMER,=20
too,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>but as Jonathan said, putting some =
basic window=20
checking isn't so complex</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(at least there is no timeout or =
retransmission (I=20
mean, for our TX), or reassembly )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>that I think it's worth trying if =
you haven't=20
done it yet..</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Hopil</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>"Jonathan Keljo" <</FONT><A=20
 face=3DArial=20
 face=3DArial size=3D2>> =
wrote in=20
message </FONT><A  =
face=3DArial=20
 =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Sandeep and =
others,<BR>>=20
    I really do not believe that network congestion is =
causing=20
everyone's<BR>> problems, and I think that your repeated suggestion =
to the=20
contrary will end<BR>> up misleading and hurting a lot of people. =
Best I can=20
tell, the test script<BR>> is run over a local UDP connection, from =
epic5 to=20
epic5. (Or at worst, f rom<BR>> epic5 to epic6 or 7.) I find it =
extremely=20
unlikely that the test script<BR>> would drop packets regularly over =
such a=20
short hop--on a local machine they<BR>> don't even get as far as a =
network=20
adapter! Not to mention, putting a delay<BR>> in sending packets =
doesn't help=20
you if you're failing against their<BR>> transmitter.<BR>> =
<BR>>=20
    I also observe that my own code has never had a =
problem with=20
the test<BR>> script for 2A. If there were dropped packets on such a =
regular=20
basis for<BR>> everyone else, I don't think I'd have been so lucky as =
to=20
escape. I suspect<BR>> there is some subtlety in the protocol that =
many=20
people are somehow missing.<BR>> (I've seen a couple of situations =
where a=20
subtle protocol glitch can lead to<BR>> test script failures that are =
not=20
easily reproducible with your own code or<BR>> others'.)<BR>> =
<BR>>=20
    Now, one thing that I find interesting to think about =
is=20
this. Suppose<BR>> that the transport layer used in the test script =
is a full=20
STCP<BR>> implementation; that is, suppose it implements timeouts and =

retransmissions.<BR>> Suppose also that on a given test run, all =
packets that=20
were sent were<BR>> received, in the order they were sent. Suppose, =
however,=20
that sometimes<BR>> things ran a little slowly, and packets  =
took a=20
little while to arrive. (A<BR>> slight increase in processor =
load  on=20
the machine might cause the network<BR>> layer to not process the =
packets=20
quite as fast, but it would still do so in<BR>> the right order.) So, =
this=20
test run would be fine according to the<BR>> milestone: all packets =
were=20
delivered, in order.<BR>> <BR>>     An STCP =
implementation=20
that supports timeouts might very well time out<BR>> and resend in =
this=20
circumstance. (I've actually observed this with my<BR>> milestone 2 =
code with=20
as little as 45K of data.) So, the receiver might get<BR>> a bunch of =
packets=20
that they've already received. It seems from the<BR>> discussion on =
this=20
group that many people are completely ignoring the<BR>> sliding =
window part=20
of the protocol, with elaborate justifications. However,<BR>> if your =
code=20
doesn't correctly ignore data that you've already received, you<BR>> =
could=20
have too much data coming out, memory scribbles, or segfaults that =
are<BR>>=20
causing problems with the script.<BR>> You'd probably never see this =
with=20
another student's code, because they<BR>> never do timeouts.<BR>> =
<BR>>=20
    One thing you could try is making your code transmit =
every=20
window twice<BR>> and see if that breaks your receiver, but it might =
just be=20
quicker to put<BR>> the already-received test in and try the script=20
again.<BR>> <BR>> DISCLAIMER: all of that is pulled straight out =
of my=20
overactive imagination.<BR>> The test script may be doing it this =
way, and it=20
may not. (It's kind of<BR>> amusing to me that we're all sitting here =
trying=20
to reverse-engineer and<BR>> second-guess a black-box script.) But =
the=20
scenario I just described makes<BR>> some kind of sense to me. You =
could=20
argue that the test script should be<BR>> using a barely-passing=20
implementation of 2A, and I might agree with you.<BR>> However, the =
code=20
change required to ignore already-received data should be<BR>> minor, =
and=20
hey, you've tried everything else, right?<BR>> <BR>> =
Comments?<BR>>=20
<BR>> Jonathan<BR>> <BR>> "Sandeep Tamhankar" <</FONT><A=20
 face=3DArial=20
 face=3DArial =
size=3D2>> wrote in=20
message<BR>> </FONT><A =

face=3DArial =

face=3DArial size=3D2>...<BR>> > No, you're pretty much =
right.  A few of=20
us had problems with network<BR>> > congestion -- I ended up =
sending=20
packets with delays between so that the<BR>> > congestion is low =
enough to=20
keep things reliable.<BR>> ><BR>> > -Sandeep<BR>> =
><BR>>=20
> Vasco Chatalbashev wrote:<BR>> ><BR>> > > So, our =
network=20
layer is essentially UDP.<BR>> > > We are assuming that the =
Stanford=20
network is lightly loaded, so that<BR>> > > unless we purposely =

simulate dropping(or reordering )packets, packet<BR>> > > loss =
will not=20
occur. Isn't it possible,however, that, say, while you are<BR>> > =
>=20
running<BR>> > > tests on the submissions, a UDP datagram =
carrying a=20
STCP packet does get<BR>> > > dropped (presumably it =
happens<BR>>=20
> > sometimes,) thus making a correct implementation of STCP =
act<BR>>=20
unpredictably<BR>> > > for the first milestone? Am I missing=20
something?<BR>> > ><BR>> > ><BR>> > ><BR>> =
>=20
><BR>> ><BR>> ><BR>> ><BR>> > --<BR>> > =

---------------------------------------------<BR>> > Sandeep V.=20
Tamhankar<BR>> > M.S. Student<BR>> > Computer =
Science<BR>> >=20
Email: </FONT><A  =
face=3DArial=20
 face=3DArial =
size=3D2>>=20
><BR>> <BR>> </FONT></BODY></HTML>

------=_NextPart_000_0343_01C1AA9E.7056DCA0--

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga6.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: comm_sd
Date: Thu, 31 Jan 2002 22:18:32 -0800
Lines: 8
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga6.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2961

I think a socket at the server side remains open always. Putting simply,
the server parent doesn't close comm_sd. So, when the server gets
<CTRL-C>, this socket descriptor still remains open!!

Any comments are welcome.

Abhishek Das

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: comm_sd
Date: Thu, 31 Jan 2002 22:30:11 -0800
Lines: 18
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012545011 27208 128.12.133.48 (1 Feb 2002 06:30:11 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: nntp.stanford.edu su.class.cs244a:2962

I'm not positive, but I'm fairly sure that when a process exits for whatever
reason, all of its file and socket descriptors are freed by the operating
system.

Jonathan

"Abhishek Das"  wrote in message

> I think a socket at the server side remains open always. Putting simply,
> the server parent doesn't close comm_sd. So, when the server gets
> <CTRL-C>, this socket descriptor still remains open!!
>
> Any comments are welcome.
>
> Abhishek Das
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!myth2.Stanford.EDU!rgustin
From: Reid Gustin 
Newsgroups: su.class.cs244a
Subject: Re: comm_sd
Date: Thu, 31 Jan 2002 23:00:50 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: myth2.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2963

On Thu, 31 Jan 2002, Jonathan Keljo wrote:
> I'm not positive, but I'm fairly sure that when a process exits for whatever
> reason, all of its file and socket descriptors are freed by the operating
> system.

This is true, at least for Solaris, BSD, and Linux (which ought to pretty
much cover this assignment, at least), as long as the process exits. The
only catch is that if the child process lingers, it won't get cleaned up
until you 'kill -9' it (which can be a verb, I'm pretty sure...).

Reid

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Sutin Chen 
Newsgroups: su.class.cs244a
Subject: Re: parent searching for peeraddress on an empty socket
Date: Thu, 31 Jan 2002 23:02:34 -0800
Lines: 9
Distribution: su
Message-ID: 
References:  
NNTP-Posting-Host: epic6.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2964

Wow.  How did I not ever realize before what a beautiful beautiful thing
purify is?  Thanks for the advice - it took care of my bug.

Mark Joseph Dolan wrote:
> 
> I've had that problem. I found I had a memmory error and fixing that
> solved my problem. Just an idea.
> 
> -mark
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: network termination
Date: 1 Feb 2002 07:34:55 GMT
Lines: 43
Distribution: su
Message-ID: 
References:   
NNTP-Posting-Host: elaine14.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2965

Yes, you will not need to worry about that particular case for this 
assignment. I was mentioning it as something to possibly consider.

Arun

Sandeep Tamhankar  wrote:
: Since the spec says that only the "client" can close the connection, 
: deadlock shouldn't be possible, right?

: -Sandeep

: Arun Upadhyaya Kishan wrote:

:> Once the FIN is sent, you can wait either for a FIN or a FIN_ACK (a FIN if 
:> both sides send it simultaneously rsulting in a deadlock situation -- 
:> though this is unlikely).
:> 
:> Arun
:> 
:> Sriram Viji  wrote:
:> 
:> : when a application closes its socket:
:> : the child process sends out a FIN packet and waits for a FIN_ACK from the
:> : peer
:> 
:> : Q:  does it consider any of the packets received between sending the FIN and
:> : receiving the FIN_ACK?
:> 
:> : thanks,
:> : sriram
:> 
:> 
:> 



: -- 
: ---------------------------------------------
: Sandeep V. Tamhankar			
: M.S. Student
: Computer Science
: Email: 

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Victor Wong 
Newsgroups: su.class.cs244a
Subject: multiple connections
Date: 1 Feb 2002 07:41:24 GMT
Lines: 11
Distribution: su
Message-ID: 
NNTP-Posting-Host: fable18.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2966

Hi,

So I think I'm confused by a pretty fundamental question. When multiple connections between the server and client are opened, a child process is spawned for each end of each connection. However, the block of comments before the control_loop function states that the control loop should use select to see if "any data on any of the sockets to our peer, ... etc." is available. So am I operating under the false impression that each child process is only supposed to take care of one end of one connection and tha
t the network layer would route the correct packet to the rightchild process? Or am I reading too into the comments?

I guess what I don't understand is how multiple connections the same port via UDP works. It seems like as UDP is connectionless, the packets from different connetions will be arriving multiplexed at the server post.

Help?!

Thanks,
Victor.
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Arun Upadhyaya Kishan 
Newsgroups: su.class.cs244a
Subject: Re: multiple connections
Date: 1 Feb 2002 07:52:53 GMT
Lines: 23
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine14.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2967

As we've mentioned, the existing network layer infrastructure does not 
lend itself to multiple client connectoins. In particular you will see the 
server manages only one client connection at a time. You do not need to 
worry about dealing with this -- consider the interactoin between one 
server and one client process only.

Arun

Victor Wong  wrote:
: Hi,

: So I think I'm confused by a pretty fundamental question. When multiple connections between the server and client are opened, a child process is spawned for each end of each connection. However, the block of comments before the control_loop function states that the control loop should use select to see if "any data on any of the sockets to our peer, ... etc." is available. So am I operating under the false impression that each child process is only supposed to take care of one end of one connection and t
ha
: t the network layer would route the correct packet to the rightchild process? Or am I reading too into the comments?

: I guess what I don't understand is how multiple connections the same
port via UDP works. It seems like as UDP is connectionless, the packets
from different connetions will be arriving multiplexed at the server post.

: Help?!

: Thanks,
: Victor.
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine21.Stanford.EDU!dhawal
From: Dhawal Kumar 
Newsgroups: su.class.cs244a
Subject: Re: Error on network_send
Date: Fri, 1 Feb 2002 00:15:53 -0800
Lines: 45
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: elaine21.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2968

Every now and then I also keep getting errors in network_send (-1) on
server side. The server would work for 10 times and fail the 11'th time I
try to connect and retrieve a file. Any ideas?

Dhawal Kumar

On 1 Feb 2002, Arun Upadhyaya Kishan wrote:

> Your code looks mostly correct....if the problem persists, please bring
> the code into office hour such that we may take a closer look at it.
>
> Arun
>
> Brandon Badger  wrote:
> : I'm getting stuck on an error where network_send() returns -1 when the
> : server tries to send the contents of the requested file to the client.
>
> : 1) The handshake works correctly.
> : 2) transport_appl_io() is called in the client and the filename is passed
> : to the client's child.  This sends the filename on sockfd.
> : 3) transport_sock_io() is called in the server and the filename is passed
> : to the server's parent.
> : 4) transport_appl_io() is called in the server and the contents of the
> : file are passed to the server's child.  At this point I'm able to print
> : out the contents of the file.  - But, when I try to send the file contents
> : through sockfd, the network_send function returns -1;
>
> : any ideas?  What are some causes for network_send to return -1?
>
> : In my transport_appl_io() function, the network_send code works correctly
> : for the client side when it sends the filename to the server.
>
> : stcpPacket = malloc(packetSize);
> : memcpy(stcpPacket, hdrPtr, sizeof(STCPHeader));
> : memcpy(stcpPacket + sizeof(STCPHeader), msg + dataStart, len);
> : /* This printf of the file contents works */
> : /* printf("\nMSG:%s", stcpPacket + sizeof(STCPHeader)); */
> : nSent = network_send(ctx->sockfd, stcpPacket, packetSize, NULL);
>
> : Thanks for any help,
> : Brandon
>
>
>

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "BAEHOPIL" 
Newsgroups: su.class.cs244a
Subject: Test script for hw2.B
Date: Fri, 1 Feb 2002 01:08:58 -0800
Lines: 56
Distribution: su
Message-ID: 
NNTP-Posting-Host: hopils.stanford.edu
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0416_01C1AABD.0712D4A0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Xref: nntp.stanford.edu su.class.cs244a:2969

This is a multi-part message in MIME format.

------=_NextPart_000_0416_01C1AABD.0712D4A0
Content-Type: text/plain;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable

 Hi..

Is test_script for hw2.B ready for use? I tried it with my code, whose =
RX code is revised for hw2.B
but TX code is still for hw2.A... But the script said my TX works well =
and my RX doesn't..
I know that my TX should NOT work yet..And it reports Go-Back-N is OK, =
but I never implemented it..
Is there just some typo, or should I just wait? If so, when will it be =
available?

Hopil


------=_NextPart_000_0416_01C1AABD.0712D4A0
Content-Type: text/html;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dks_c_5601-1987" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2> Hi..</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Is test_script for hw2.B ready for use? =
I tried it=20
with my code, whose RX code is revised for hw2.B</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>but </FONT><FONT face=3DArial =
size=3D2>TX code is still=20
for hw2.A... But the script said my TX works well and my RX=20
doesn't..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I know that my TX should NOT work=20
yet..</FONT><FONT face=3DArial size=3D2>And it reports Go-Back-N is OK, =
but I never=20
implemented it..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is there just some typo, or =
should I just=20
wait? If so, when will it be available?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Hopil</FONT></DIV>
<DIV> </DIV></BODY></HTML>

------=_NextPart_000_0416_01C1AABD.0712D4A0--

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga8.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Reading 0 bytes from application
Date: Fri, 1 Feb 2002 01:16:17 -0800
Lines: 18
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2970

Hi,

After the first few packets are sent between the client and the server,
whenever I wait on the select statement, it tells me that there is data
to read from the application. However, when I use the read function, the
number of read bytes is equal to 0 (As it is the case for network
termination). Knowing that the client will keep the connection open till
it read all the bytes of the file, I have no idea why the select tells me
to read from the client when there is nothing to read. My code thinks that
it is the termination case and sends a FIN package !

Hope that someone has an idea?

Thanks,

Moh'd


.

Path: shelby.stanford.edu!nntp.stanford.edu!myth4.Stanford.EDU!mdolan
From:  (Mark Joseph Dolan)
Newsgroups: su.class.cs244a
Subject: Re: Reading 0 bytes from application
Date: 1 Feb 2002 09:33:55 GMT
Organization: Stanford University, CA 94305, USA
Lines: 4
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: myth4.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2971

Just a suggestion, but I've noticed strange select behavior when there are
memory errors.

-mark
.

Path: shelby.stanford.edu!nntp.stanford.edu!saga6.Stanford.EDU!abishek
From: Abhishek Das 
Newsgroups: su.class.cs244a
Subject: Re: comm_sd
Date: Fri, 1 Feb 2002 01:39:34 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
  
NNTP-Posting-Host: saga6.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2972

Actually, purify points out the 2 extra file descriptors open,
local_data_sd and sockfd of parent for the server.
So, I was just wondering why it was happening and I agree with you people.

abhishek

On Thu, 31 Jan 2002, Reid Gustin wrote:

> On Thu, 31 Jan 2002, Jonathan Keljo wrote:
> > I'm not positive, but I'm fairly sure that when a process exits for whatever
> > reason, all of its file and socket descriptors are freed by the operating
> > system.
>
> This is true, at least for Solaris, BSD, and Linux (which ought to pretty
> much cover this assignment, at least), as long as the process exits. The
> only catch is that if the child process lingers, it won't get cleaned up
> until you 'kill -9' it (which can be a verb, I'm pretty sure...).
>
> Reid
>
>

Abhishek Das
Graduate Research Assistant
Computer Systems Lab
Stanford University

Address:-
Escondido Village 33B
Stanford CA 94305

.

Path: shelby.stanford.edu!nntp.stanford.edu!saga4.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Re: Reading 0 bytes from application
Date: Fri, 1 Feb 2002 01:50:38 -0800
Lines: 12
Distribution: su
Message-ID: 
References: 
 
NNTP-Posting-Host: saga4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2973

Thanks, I solved it

Moh'd
On 1 Feb 2002, Mark Joseph Dolan wrote:

> Just a suggestion, but I've noticed strange select behavior when there are
> memory errors.
>
> -mark
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: Test script for hw2.B
Date: Fri, 1 Feb 2002 02:30:40 -0800
Lines: 94
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: nordic.stanford.edu
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0013_01C1AAC8.70DC6E40"
X-Trace: news.Stanford.EDU 1012559441 29404 128.12.133.48 (1 Feb 2002 10:30: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: nntp.stanford.edu su.class.cs244a:2974

This is a multi-part message in MIME format.

------=_NextPart_000_0013_01C1AAC8.70DC6E40
Content-Type: text/plain;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable

Hm. Well, that's discouraging. And here I thought I was all hot shit =
when I passed all the tests... :-)

I'm fairly sure the maximum-retransmission-count test is not working, =
and is recently broken. It told me a couple days ago I failed and that I =
sent between 12 and 18 retransmissions, but you can look at the output =
and clearly count only 5. (But an hour before that it was totally =
happy.)

Jonathan
  "BAEHOPIL"  wrote in message =

   Hi..

  Is test_script for hw2.B ready for use? I tried it with my code, whose =
RX code is revised for hw2.B
  but TX code is still for hw2.A... But the script said my TX works well =
and my RX doesn't..
  I know that my TX should NOT work yet..And it reports Go-Back-N is OK, =
but I never implemented it..
  Is there just some typo, or should I just wait? If so, when will it be =
available?

  Hopil


------=_NextPart_000_0013_01C1AAC8.70DC6E40
Content-Type: text/html;
	charset="ks_c_5601-1987"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dks_c_5601-1987">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hm. Well, that's discouraging. And here =
I thought I=20
was all hot shit when I passed all the tests... :-)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm fairly sure the =
maximum-retransmission-count=20
test is not working, and is recently broken. It told me a couple =
days ago I=20
failed and that I sent between 12 and 18 retransmissions, but you can =
look at=20
the output and clearly count only 5. (But an hour before that it was =
totally=20
happy.)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Jonathan</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"BAEHOPIL" <<A=20
   =
wrote in=20
  message <A=20
  =

tanford.EDU</A>...</DIV>
  <DIV><FONT face=3DArial size=3D2> Hi..</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=3DArial size=3D2>Is test_script for hw2.B ready for =
use? I tried=20
  it with my code, whose RX code is revised for hw2.B</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>but </FONT><FONT face=3DArial =
size=3D2>TX code is=20
  still for hw2.A... But the script said my TX works well and my RX=20
  doesn't..</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>I know that my TX should NOT =
work=20
  yet..</FONT><FONT face=3DArial size=3D2>And it reports Go-Back-N is =
OK, but I=20
  never implemented it..</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Is there just some typo, or =
should I just=20
  wait? If so, when will it be available?</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=3DArial size=3D2>Hopil</FONT></DIV>
  <DIV> </DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0013_01C1AAC8.70DC6E40--

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Jonathan Keljo" 
Newsgroups: su.class.cs244a
Subject: Re: comm_sd
Date: Fri, 1 Feb 2002 02:33:42 -0800
Lines: 46
Distribution: su
Message-ID: 
References:    
NNTP-Posting-Host: nordic.stanford.edu
X-Trace: news.Stanford.EDU 1012559622 29412 128.12.133.48 (1 Feb 2002 10:33: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: nntp.stanford.edu su.class.cs244a:2975

Well, there's no way to nicely shut down the server. It's in this big
infinite loop that keeps accepting connections until Armageddon. So a ctrl-c
pretty much kills it off without any cleanup. If someone implemented a
ctrl-c handler that correctly ran myclose(), the sockets would be properly
closed.

Jonathan

"Abhishek Das"  wrote in message

> Actually, purify points out the 2 extra file descriptors open,
> local_data_sd and sockfd of parent for the server.
> So, I was just wondering why it was happening and I agree with you people.
>
> abhishek
>
> On Thu, 31 Jan 2002, Reid Gustin wrote:
>
> > On Thu, 31 Jan 2002, Jonathan Keljo wrote:
> > > I'm not positive, but I'm fairly sure that when a process exits for
whatever
> > > reason, all of its file and socket descriptors are freed by the
operating
> > > system.
> >
> > This is true, at least for Solaris, BSD, and Linux (which ought to
pretty
> > much cover this assignment, at least), as long as the process exits. The
> > only catch is that if the child process lingers, it won't get cleaned up
> > until you 'kill -9' it (which can be a verb, I'm pretty sure...).
> >
> > Reid
> >
> >
>
> Abhishek Das
> Graduate Research Assistant
> Computer Systems Lab
> Stanford University
>
> Address:-
> Escondido Village 33B
> Stanford CA 94305
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga4.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Problem with the read function
Date: Fri, 1 Feb 2002 02:40:01 -0800
Lines: 29
Distribution: su
Message-ID: 
NNTP-Posting-Host: saga4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2976

Hi,

I am testing my code by trasmitting a 1 megabyte of binary. However, when
the server starts to receive packets from the application ( by using the
read function when the select says that there should be data from the
application), I found that sometimes the number of readBytes is 0. We know
that this is an indication to close the socket and go to finish
state. The strange thing is that if the server igonores this 0 bytes
message and continue reading from the application, there will be many
coming packets to send. In other words, I am not able to terminate on the
0 return of the read, since in my above case, it happens that there are
are still many packets to send and the application doesn't close the
socket with the trasnport.

I don't know what to do with this, if I ignore the 0 bytes, I will be able
to send the whole of the 1MByte file correctly, however, the client then
must initiate the end of connection, and the server won't be able to
detect a finish state according to the 0 byte indication from read
function.

Any ideas if I am on the wrong track? or should the client always be the
party which closes the connection (Although the handout says that the
passive party maybe the active later and close the connection).

Thanks,

Moh'd


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Henry Fu" 
Newsgroups: su.class.cs244a
Subject: TAs: Is the result from Programming Assignment #1 emailed out?
Date: Fri, 1 Feb 2002 02:42:09 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: bernese.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2977

Hi TAs,

Just wondering if the result from PA1 is emailed out? I would like to take a
look at the PA1 comments from the prof/TA before submitting HW2.A, in case I
have anything I need to change.

Thanks!!!!
Henry


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Henry Fu" 
Newsgroups: su.class.cs244a
Subject: submit_test.pl is not working
Date: Fri, 1 Feb 2002 02:46:00 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: bernese.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2978

Looks like the submit_test.pl script is not working. It says "No space left
on device".

Please take a look.
Henry


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga8.Stanford.EDU!mrawashd
From: Moh'd Saleem Saleem Alrawashdeh 
Newsgroups: su.class.cs244a
Subject: Re: submit_test.pl is not working
Date: Fri, 1 Feb 2002 02:50:50 -0800
Lines: 16
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga8.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2979

I am facing same problem, I sent my test from one hour and till now no
reply

Moh'd
On Fri, 1 Feb 2002, Henry Fu wrote:

> Looks like the submit_test.pl script is not working. It says "No space left
> on device".
>
> Please take a look.
> Henry
>
>
>


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Victor Wong" 
Newsgroups: su.class.cs244a
Subject: select and read
Date: Fri, 1 Feb 2002 03:05:38 -0800
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: summerbridge.stanford.edu
X-Trace: news.Stanford.EDU 1012561543 29616 128.12.82.21 (1 Feb 2002 11:05:43 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: nntp.stanford.edu su.class.cs244a:2980

The answer to the second question on the FAQ states that we should not be
reading any more data from the local socket if we can't send it out. This
means that the socket will still be ready for reading after reading a
portion of the data to fill the send queue. Doesn't this mean that the call
to select would return immediately and the control loop would just end up
polling to see when the ACK arrives and the window opens up? Isn't it more
efficient to implement this with a semaphore/lock so that there's no busy
waiting? Or should we not care?

Thanks,
Victor.


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Leonard Sibille 
Newsgroups: su.class.cs244a
Subject: Re: submit_test.pl is not working
Date: Fri, 01 Feb 2002 03:26:10 -0800
Lines: 23
Distribution: su
Message-ID: 
References:  
Reply-To: 
NNTP-Posting-Host: saclay.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1012563064 29755 171.64.68.193 (1 Feb 2002 11:31:04 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.18 i686)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2981

Same error. I could not submit the test.


Leo



Moh'd Saleem Saleem Alrawashdeh wrote:
> 
> I am facing same problem, I sent my test from one hour and till now no
> reply
> 
> Moh'd
> On Fri, 1 Feb 2002, Henry Fu wrote:
> 
> > Looks like the submit_test.pl script is not working. It says "No space left
> > on device".
> >
> > Please take a look.
> > Henry
> >
> >
> >
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Yichen Xie" 
Newsgroups: su.class.cs244a
Subject: window size
Date: Fri, 1 Feb 2002 03:51:36 -0800
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: dn800cb605.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2982

Since th_win field in the tcp header is unused according to the
specification, is it safe to assume that the application reads whatever is
available to it as soon as the data has arrived (otherwise, writes to the
local_data_sd may block at the child's end, and sender will time out, and
all sorts of things could happen...)?


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: "Yichen Xie" 
Newsgroups: su.class.cs244a
Subject: test script
Date: Fri, 1 Feb 2002 03:52:50 -0800
Lines: 3
Distribution: su
Message-ID: 
NNTP-Posting-Host: dn800cb605.stanford.edu
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: nntp.stanford.edu su.class.cs244a:2983

BTW, test script doesn't seem to respond...


.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Victor Tung 
Newsgroups: su.class.cs244a
Subject: Submit Script - Illegal Instruction?
Date: 1 Feb 2002 11:59:39 GMT
Lines: 13
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine37.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2984

I noticed all the messages regarding the submit_test.pl script, but has 
anyone recently been able to actually submit their hw2.A? I ran
/usr/class/cs244a/bin/submit and it immediately gives me an 'Illegal 
Instruction' message.
Anyone know what is going on with that script?

Thanks in advance for any help.

-- 
Victor Tung			| 
------------------------------------------------------------------------------
Metaphysics is the science of proving what we don't understand.
                                -- Josh Billings (Henry Wheeler Shaw)
.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Leonard Sibille 
Newsgroups: su.class.cs244a
Subject: Re: submit_test.pl is not working
Date: Fri, 01 Feb 2002 04:32:48 -0800
Lines: 31
Distribution: su
Message-ID: 
References:   
Reply-To: 
NNTP-Posting-Host: saclay.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.Stanford.EDU 1012567064 677 171.64.68.193 (1 Feb 2002 12:37:44 GMT)
X-Complaints-To: 
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.18 i686)
X-Accept-Language: en
Xref: nntp.stanford.edu su.class.cs244a:2985

Now the test script seems to be working properly. 

The only change I made since last time is to include my README file.


Leo



Leonard Sibille wrote:
> 
> Same error. I could not submit the test.
> 
> Leo
> 
> Moh'd Saleem Saleem Alrawashdeh wrote:
> >
> > I am facing same problem, I sent my test from one hour and till now no
> > reply
> >
> > Moh'd
> > On Fri, 1 Feb 2002, Henry Fu wrote:
> >
> > > Looks like the submit_test.pl script is not working. It says "No space left
> > > on device".
> > >
> > > Please take a look.
> > > Henry
> > >
> > >
> > >
.

Path: shelby.stanford.edu!nntp.stanford.edu!Xenon.Stanford.EDU!appenz
From: Guido Appenzeller 
Newsgroups: su.class.cs244a
Subject: Test script - Try again...
Date: Fri, 1 Feb 2002 04:51:00 -0800
Lines: 10
Distribution: su
Message-ID: 
NNTP-Posting-Host: xenon.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2986

Hi everyone,

I cleaned up the disk and the test script should work again.

  Guido

---------------------------------------------------------------
Guido Appenzeller, Ph.D. Candiate, Computer Sc., Stanford Univ.
 - office: 650 7253545  cell: 650 7042781

.

Path: shelby.stanford.edu!nntp.stanford.edu!not-for-mail
From: Victor Tung 
Newsgroups: su.class.cs244a
Subject: Re: Submit Script - Illegal Instruction?
Date: 1 Feb 2002 13:07:59 GMT
Lines: 22
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: elaine37.stanford.edu
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Xref: nntp.stanford.edu su.class.cs244a:2987

Doh! I just read Pablo's earlier post and we should use 
/usr/class/cs244a/bin/submit.pl instead of submit.

That should teach me to read the previous posts more carefully. 

-Victor

Victor Tung  wrote:
> I noticed all the messages regarding the submit_test.pl script, but has 
> anyone recently been able to actually submit their hw2.A? I ran
> /usr/class/cs244a/bin/submit and it immediately gives me an 'Illegal 
> Instruction' message.
> Anyone know what is going on with that script?

> Thanks in advance for any help.


-- 
Victor Tung			| 
------------------------------------------------------------------------------
Metaphysics is the science of proving what we don't understand.
                                -- Josh Billings (Henry Wheeler Shaw)
.

Path: shelby.stanford.edu!nntp.stanford.edu!elaine30.Stanford.EDU!kichan
From:  (Shu Kit Francis Chan)
Newsgroups: su.class.cs244a
Subject: test script problem ?
Date: 1 Feb 2002 16:32:09 GMT
Organization: Stanford University, CA 94305, USA
Lines: 7
Distribution: su
Message-ID: 
NNTP-Posting-Host: elaine30.stanford.edu
Xref: nntp.stanford.edu su.class.cs244a:2988


I have submitted the test for more than a couple of hours. Still I have
not got any result back. Is it down ?

Is the following command right ?

/usr/class/cs244a/bin/submit_test.pl hw2.A <TA name>
.

Path: shelby.stanford.edu!nntp.stanford.edu!epic4.Stanford.EDU!shankara
From: Shankar Agarwal 
Newsgroups: su.class.cs244a
Subject: Regardin the FIN Error.
Date: Fri, 1 Feb 2002 08:33:59 -0800
Lines: 260
Distribution: su
Message-ID: 
NNTP-Posting-Host: epic4.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Xref: nntp.stanford.edu su.class.cs244a:2989

Hi,
Hi,
I am seeing this error for my test.It says that failure to send FIN_ACK
for FIN. But i am not seeing any FIN at the end of the send and recv
sequence. Can you please have a loot at this sequence and tell me how it
can be explained.
Thanks
Shankar

    * Test 1.I: Failure to send a FIN_ACK after a FIN
  [out of 5]

[SUMMARY] NOT OK
[RESULT]  Incorrect FIN_ACK behaviour after FIN

---
network_send: a SYN packet with seq=198
network_recv: a SYN-ACK packet with seq=198 and ack=199 and
timestamp=3230007382
network_recv: a DATA-ACK packet with ack=211
network_recv: a DATA packet with seq=199, len=536 and timestamp=3230007841
network_send: a DATA-ACK packet with ack=735
network_recv: a DATA packet with seq=735, len=536 and timestamp=3230007841
network_send: a DATA-ACK packet with ack=1271
network_recv: a DATA packet with seq=1271, len=536 and
timestamp=3230007842
network_send: a DATA-ACK packet with ack=1807
network_recv: a DATA packet with seq=1807, len=536 and
timestamp=3230007842
network_send: a DATA-ACK packet with ack=2343
network_recv: a DATA packet with seq=2343, len=536 and
timestamp=3230007843
network_send: a DATA-ACK packet with ack=2879
network_recv: a DATA packet with seq=2879, len=392 and
timestamp=3230007843
network_send: a DATA-ACK packet with ack=3271
network_recv: a DATA packet with seq=3271, len=536 and
timestamp=3230007844
network_send: a DATA-ACK packet with ack=3807
network_recv: a DATA packet with seq=3807, len=536 and
timestamp=3230007844
network_send: a DATA-ACK packet with ack=4343
network_recv: a DATA packet with seq=4343, len=536 and
timestamp=3230007845
network_send: a DATA-ACK packet with ack=4879
network_recv: a DATA packet with seq=4879, len=536 and
timestamp=3230007846
network_send: a DATA-ACK packet with ack=5415
network_recv: a DATA packet with seq=5415, len=536 and
timestamp=3230007846
network_send: a DATA-ACK packet with ack=5951
network_recv: a DATA packet with seq=5951, len=392 and
timestamp=3230007847
network_send: a DATA-ACK packet with ack=6343
network_recv: a DATA packet with seq=6343, len=536 and
timestamp=3230007847
network_send: a DATA-ACK packet with ack=6879
network_recv: a DATA packet with seq=6879, len=536 and
timestamp=3230007848
network_send: a DATA-ACK packet with ack=7415
network_recv: a DATA packet with seq=7415, len=536 and
timestamp=3230007849
network_send: a DATA-ACK packet with ack=7951
network_recv: a DATA packet with seq=7951, len=536 and
timestamp=3230007849
network_send: a DATA-ACK packet with ack=8487
network_recv: a DATA packet with seq=8487, len=536 and
timestamp=3230007850
network_send: a DATA-ACK packet with ack=9023
network_recv: a DATA packet with seq=9023, len=392 and
timestamp=3230007850
network_send: a DATA-ACK packet with ack=9415
network_recv: a DATA packet with seq=9415, len=536 and
timestamp=3230007851
network_send: a DATA-ACK packet with ack=9951
network_recv: a DATA packet with seq=9951, len=536 and
timestamp=3230007851
network_send: a DATA-ACK packet with ack=10487
network_recv: a DATA packet with seq=10487, len=536 and
timestamp=3230007852
network_send: a DATA-ACK packet with ack=11023
network_recv: a DATA packet with seq=11023, len=536 and
timestamp=3230007852
network_send: a DATA-ACK packet with ack=11559
network_recv: a DATA packet with seq=11559, len=536 and
timestamp=3230007853
network_send: a DATA-ACK packet with ack=12095
network_recv: a DATA packet with seq=12095, len=392 and
timestamp=3230007854
network_send: a DATA-ACK packet with ack=12487
network_recv: a DATA packet with seq=12487, len=536 and
timestamp=3230007854
network_send: a DATA-ACK packet with ack=13023
network_recv: a DATA packet with seq=13023, len=536 and
timestamp=3230007855
network_send: a DATA-ACK packet with ack=13559
network_recv: a DATA packet with seq=13559, len=536 and
timestamp=3230007855
network_send: a DATA-ACK packet with ack=14095
network_recv: a DATA packet with seq=14095, len=536 and
timestamp=3230007856
network_send: a DATA-ACK packet with ack=14631
network_recv: a DATA packet with seq=14631, len=536 and
timestamp=3230007856
network_send: a DATA-ACK packet with ack=15167
network_recv: a DATA packet with seq=15167, len=392 and
timestamp=3230007857
network_send: a DATA-ACK packet with ack=15559
network_recv: a DATA packet with seq=15559, len=536 and
timestamp=3230007857
network_send: a DATA-ACK packet with ack=16095
network_recv: a DATA packet with seq=16095, len=536 and
timestamp=3230007858
network_send: a DATA-ACK packet with ack=16631
network_recv: a DATA packet with seq=16631, len=536 and
timestamp=3230007859
network_send: a DATA-ACK packet with ack=17167
network_recv: a DATA packet with seq=17167, len=536 and
timestamp=3230007859
network_send: a DATA-ACK packet with ack=17703
network_recv: a DATA packet with seq=17703, len=536 and
timestamp=3230007860
network_send: a DATA-ACK packet with ack=18239
network_recv: a DATA packet with seq=18239, len=392 and
timestamp=3230007860
network_send: a DATA-ACK packet with ack=18631
network_recv: a DATA packet with seq=18631, len=536 and
timestamp=3230007861
network_send: a DATA-ACK packet with ack=19167
network_recv: a DATA packet with seq=19167, len=536 and
timestamp=3230007861
network_send: a DATA-ACK packet with ack=19703
network_recv: a DATA packet with seq=19703, len=536 and
timestamp=3230007862
network_send: a DATA-ACK packet with ack=20239
network_recv: a DATA packet with seq=20239, len=536 and
timestamp=3230007862
network_send: a DATA-ACK packet with ack=20775
network_recv: a DATA packet with seq=20775, len=536 and
timestamp=3230007863
network_send: a DATA-ACK packet with ack=21311
network_recv: a DATA packet with seq=21311, len=392 and
timestamp=3230007864
network_send: a DATA-ACK packet with ack=21703
network_recv: a DATA packet with seq=21703, len=536 and
timestamp=3230007864
network_send: a DATA-ACK packet with ack=22239
network_recv: a DATA packet with seq=22239, len=536 and
timestamp=3230007865
network_send: a DATA-ACK packet with ack=22775
network_recv: a DATA packet with seq=22775, len=536 and
timestamp=3230007865
network_send: a DATA-ACK packet with ack=23311
network_recv: a DATA packet with seq=23311, len=536 and
timestamp=3230007866
network_send: a DATA-ACK packet with ack=23847
network_recv: a DATA packet with seq=23847, len=536 and
timestamp=3230007867
network_send: a DATA-ACK packet with ack=24383
network_recv: a DATA packet with seq=24383, len=392 and
timestamp=3230007867
network_send: a DATA-ACK packet with ack=24775
network_recv: a DATA packet with seq=24775, len=536 and
timestamp=3230007868
network_send: a DATA-ACK packet with ack=25311
network_recv: a DATA packet with seq=25311, len=536 and
timestamp=3230007868
network_send: a DATA-ACK packet with ack=25847
network_recv: a DATA packet with seq=25847, len=536 and
timestamp=3230007869
network_send: a DATA-ACK packet with ack=26383
network_recv: a DATA packet with seq=26383, len=536 and
timestamp=3230007870
network_send: a DATA-ACK packet with ack=26919
network_recv: a DATA packet with seq=26919, len=536 and
timestamp=3230007870
network_send: a DATA-ACK packet with ack=27455
network_recv: a DATA packet with seq=27455, len=392 and
timestamp=3230007871
network_send: a DATA-ACK packet with ack=27847
network_recv: a DATA packet with seq=27847, len=536 and
timestamp=3230007871
network_recv: a DATA packet with seq=28383, len=536 and
timestamp=3230007872
network_send: a DATA-ACK packet with ack=28919
network_recv: a DATA packet with seq=28919, len=536 and
timestamp=3230007872
network_send: a DATA-ACK packet with ack=29455
network_recv: a DATA packet with seq=29455, len=536 and
timestamp=3230007873
network_send: a DATA-ACK packet with ack=29991
network_recv: a DATA packet with seq=29991, len=536 and
timestamp=3230007873
network_send: a DATA-ACK packet with ack=30527
network_recv: a DATA packet with seq=30527, len=392 and
timestamp=3230007874
network_send: a DATA-ACK packet with ack=30919
network_recv: a DATA packet with seq=30919, len=536 and
timestamp=3230007874
network_send: a DATA-ACK packet with ack=31455
network_recv: a DATA packet with seq=31455, len=536 and
timestamp=3230007875
network_send: a DATA-ACK packet with ack=31991
network_recv: a DATA packet with seq=31991, len=536 and
timestamp=3230007876
network_send: a DATA-ACK packet with ack=32527
network_recv: a DATA packet with seq=32527, len=536 and
timestamp=3230008276
network_send: a DATA-ACK packet with ack=33063
network_recv: a DATA packet with seq=33063, len=536 and
timestamp=3230008277
network_send: a DATA-ACK packet with ack=33599
network_recv: a DATA packet with seq=33599, len=392 and
timestamp=3230008278
network_send: a DATA-ACK packet with ack=33991
network_recv: a DATA packet with seq=33991, len=536 and
timestamp=3230008279
network_send: a DATA-ACK packet with ack=34527
network_recv: a DATA packet with seq=34527, len=536 and
timestamp=3230008279
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=31991, len=536 and
timestamp=3230008279
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=32527, len=536 and
timestamp=3230008280
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=33063, len=536 and
timestamp=3230008280
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=33599, len=392 and
timestamp=3230008280
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=33991, len=536 and
timestamp=3230008281
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=34527, len=536 and
timestamp=3230008281
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=31991, len=536 and
timestamp=3230008281
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=32527, len=536 and
timestamp=3230008282
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=33063, len=536 and
timestamp=3230008282
network_send: a DATA-ACK packet with ack=35063
network_recv: a DATA packet with seq=33599, len=392 and
timestamp=3230008282
network_send: a DATA-ACK packet with ack=35063


---
 (INCORRECT!)


===============


.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: TO TAs--Re: test script problem ?
Date: Fri, 1 Feb 2002 08:51:37 -0800
Lines: 31
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2990

I too submitted my test a couple hours ago but no reply yet.There was no
error during the test submission.

Can someone please look into this?
Thanks
ashmi


On 1 Feb 2002, Shu Kit Francis Chan wrote:

>
> I have submitted the test for more than a couple of hours. Still I have
> not got any result back. Is it down ?
>
> Is the following command right ?
>
> /usr/class/cs244a/bin/submit_test.pl hw2.A <TA name>
>

###############################################################################

				ASHMI CHOKSHI
Graduate Student				    141L Escondido Village
Dept. of Computer Science			    Stanford University
Stanford University				    Stanford Ca 94305
Stanford Ca 94305				    (650)498-1103

###############################################################################



.

Path: shelby.stanford.edu!nntp.stanford.edu!saga13.Stanford.EDU!ashmi
From: Ashmi 
Newsgroups: su.class.cs244a
Subject: Re: Regardin the FIN Error--need help
Date: Fri, 1 Feb 2002 09:30:06 -0800
Lines: 362
Distribution: su
Message-ID: 
References: 
NNTP-Posting-Host: saga13.stanford.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Shankar Agarwal 
In-Reply-To: 
Xref: nntp.stanford.edu su.class.cs244a:2991

hi,
I am getting a similar error, except that I don't see any network_send
output in my test result! But I know the network_send should be
happening, because, for example, the first line of my output says
'SYN_ACK' received and second line is 'DATA_ACK received' so that
means(according to my code structure) that  I should have sent a SYN and
sent a data packet before processing SYN_ACK and DATA_ACK respectively.

An abbreviated version of the output I get:

-----------TEST SCRIPT OUTPUT-------------------
  * Test 1.H: Failure to send all packets and make sure they are ACKed
before the FIN.
  [out of 5]

[SUMMARY] NOT OK
[RESULT]  FIN sent before Acking all data

---
network_recv: a SYN-ACK packet with seq=1 and ack=2 and
timestamp=3216151756
network_recv: a DATA-ACK packet with ack=14
network_recv: a DATA packet with seq=2, len=22 and timestamp=3216151795
network_recv: a DATA packet with seq=24, len=536 and timestamp=3216151796
network_recv: a DATA packet with seq=560, len=536 and timestamp=3216151796
network_recv: a DATA packet with seq=1096, len=536 and
timestamp=3216151796.
..
..
..
..
..
network_recv: a DATA packet with seq=109450, len=536 and
timestamp=3216152781
network_recv: a DATA packet with seq=109986, len=268 and
timestamp=3216152782
network_recv: a FIN-ACK packet packet with seq=0 and ack=4294967295 and
timestamp=3216152828


---
 (INCORRECT!)


===============

    * Test 1.I: Failure to send a FIN_ACK after a FIN
  [out of 5]

[SUMMARY] NOT OK
[RESULT]  Incorrect FIN_ACK behaviour after FIN

---
network_recv: a SYN-ACK packet with seq=1 and ack=2 and
timestamp=3216151756
network_recv: a DATA-ACK packet with ack=14
network_recv: a DATA packet with seq=2, len=22 and timestamp=3216151795
network_recv: a DATA packet with seq=24, len=536 and timestamp=3216151796
network_recv: a DATA packet with seq=560, len=536 and timestamp=3216151796
..
..
..
..
..
network_recv: a DATA packet with seq=109450, len=536 and
timestamp=3216152781
network_recv: a DATA packet with seq=109986, len=268 and
timestamp=3216152782
timestamp=3216152828


---
 (INCORRECT!)
------------***********output ends******************-------------------


Any ideas anyone? Especially the TAs? I have run out of ideas!
Thanks
Ashmi





-----***************SHANKAR'S MAIL
**************--------------------------
On Fri, 1 Feb 2002, Shankar Agarwal wrote:

> Hi,
> Hi,
> I am seeing this error for my test.It says that failure to send FIN_ACK
> for FIN. But i am not seeing any FIN at the end of the send and recv
> sequence. Can you please have a loot at this sequence and tell me how it
> can be explained.
> Thanks
> Shankar
>
>     * Test 1.I: Failure to send a FIN_ACK after a FIN
>   [out of 5]
>
> [SUMMARY] NOT OK
> [RESULT]  Incorrect FIN_ACK behaviour after FIN
>
> ---
> network_send: a SYN packet with seq=198
> network_recv: a SYN-ACK packet with seq=198 and ack=199 and
> timestamp=3230007382
> network_recv: a DATA-ACK packet with ack=211
> network_recv: a DATA packet with seq=199, len=536 and timestamp=3230007841
> network_send: a DATA-ACK packet with ack=735
> network_recv: a DATA packet with seq=735, len=536 and timestamp=3230007841
> network_send: a DATA-ACK packet with ack=1271
> network_recv: a DATA packet with seq=1271, len=536 and
> timestamp=3230007842
> network_send: a DATA-ACK packet with ack=1807
> network_recv: a DATA packet with seq=1807, len=536 and
> timestamp=3230007842
> network_send: a DATA-ACK packet with ack=2343
> network_recv: a DATA packet with seq=2343, len=536 and
> timestamp=3230007843
> network_send: a DATA-ACK packet with ack=2879
> network_recv: a DATA packet with seq=2879, len=392 and
> timestamp=3230007843
> network_send: a DATA-ACK packet with ack=3271
> network_recv: a DATA packet with seq=3271, len=536 and
> timestamp=3230007844
> network_send: a DATA-ACK packet with ack=3807
> network_recv: a DATA packet with seq=3807, len=536 and
> timestamp=3230007844
> network_send: a DATA-ACK packet with ack=4343
> network_recv: a DATA packet with seq=4343, len=536 and
> timestamp=3230007845
> network_send: a DATA-ACK packet with ack=4879
> network_recv: a DATA packet with seq=4879, len=536 and
> timestamp=3230007846
> network_send: a DATA-ACK packet with ack=5415
> network_recv: a DATA packet with seq=5415, len=536 and
> timestamp=3230007846
> network_send: a DATA-ACK packet with ack=5951
> network_recv: a DATA packet with seq=5951, len=392 and
> timestamp=3230007847
> network_send: a DATA-ACK packet with ack=6343
> network_recv: a DATA packet with seq=6343, len=536 and
> timestamp=3230007847
> network_send: a DATA-ACK packet with ack=6879
> network_recv: a DATA packet with seq=6879, len=536 and
> timestamp=3230007848
> network_send: a DATA-ACK packet with ack=7415
> network_recv: a DATA packet with seq=7415, len=536 and
> timestamp=3230007849
> network_send: a DATA-ACK packet with ack=7951
> network_recv: a DATA packet with seq=7951, len=536 and
> timestamp=3230007849
> network_send: a DATA-ACK packet with ack=8487
> network_recv: a DATA packet with seq=8487, len=536 and
> timestamp=3230007850
> network_send: a DATA-ACK packet with ack=9023
> network_recv: a DATA packet with seq=9023, len=392 and
> timestamp=3230007850
> network_send: a DATA-ACK packet with ack=9415
> network_recv: a DATA packet with seq=9415, len=536 and
> timestamp=3230007851
> network_send: a DATA-ACK packet with ack=9951
> network_recv: a DATA packet with seq=9951, len=536 and
> timestamp=3230007851
> network_send: a DATA-ACK packet with ack=10487
> network_recv: a DATA packet with seq=10487, len=536 and
> timestamp=3230007852
> network_send: a DATA-ACK packet with ack=11023
> network_recv: a DATA packet with seq=11023, len=536 and
> timestamp=3230007852
> network_send: a DATA-ACK packet with ack=11559
> network_recv: a DATA packet with seq=11559, len=536 and
> timestamp=3230007853
> network_send: a DATA-ACK packet with ack=12095
> network_recv: a DATA packet with seq=12095, len=392 and
> timestamp=3230007854
> network_send: a DATA-ACK packet with ack=12487
> network_recv: a DATA packet with seq=12487, len=536 and
> timestamp=3230007854
> network_send: a DATA-ACK packet with ack=13023
> network_recv: a DATA packet with seq=13023, len=536 and
> timestamp=3230007855
> network_send: a DATA-ACK packet with ack=13559
> network_recv: a DATA packet with seq=13559, len=536 and
> timestamp=3230007855
> network_send: a DATA-ACK packet with ack=14095
> network_recv: a DATA packet with seq=14095, len=536 and
> timestamp=3230007856
> network_send: a DATA-ACK packet with ack=14631
> network_recv: a DATA packet with seq=14631, len=536 and
> timestamp=3230007856
> network_send: a DATA-ACK packet with ack=15167
> network_recv: a DATA packet with seq=15167, len=392 and
> timestamp=3230007857
> network_send: a DATA-ACK packet with ack=15559
> network_recv: a DATA packet with seq=15559, len=536 and
> timestamp=3230007857
> network_send: a DATA-ACK packet with ack=16095
> network_recv: a DATA packet with seq=16095, len=536 and
> timestamp=3230007858
> network_send: a DATA-ACK packet with ack=16631
> network_recv: a DATA packet with seq=16631, len=536 and
> timestamp=3230007859
> network_send: a DATA-ACK packet with ack=17167
> network_recv: a DATA packet with seq=17167, len=536 and
> timestamp=3230007859
> network_send: a DATA-ACK packet with ack=17703
> network_recv: a DATA packet with seq=17703, len=536 and
> timestamp=3230007860
> network_send: a DATA-ACK packet with ack=18239
> network_recv: a DATA packet with seq=18239, len=392 and
> timestamp=3230007860
> network_send: a DATA-ACK packet with ack=18631
> network_recv: a DATA packet with seq=18631, len=536 and
> timestamp=3230007861
> network_send: a DATA-ACK packet with ack=19167
> network_recv: a DATA packet with seq=19167, len=536 and
> timestamp=3230007861
> network_send: a DATA-ACK packet with ack=19703
> network_recv: a DATA packet with seq=19703, len=536 and
> timestamp=3230007862
> network_send: a DATA-ACK packet with ack=20239
> network_recv: a DATA packet with seq=20239, len=536 and
> timestamp=3230007862
> network_send: a DATA-ACK packet with ack=20775
> network_recv: a DATA packet with seq=20775, len=536 and
> timestamp=3230007863
> network_send: a DATA-ACK packet with ack=21311
> network_recv: a DATA packet with seq=21311, len=392 and
> timestamp=3230007864
> network_send: a DATA-ACK packet with ack=21703
> network_recv: a DATA packet with seq=21703, len=536 and
> timestamp=3230007864
> network_send: a DATA-ACK packet with ack=22239
> network_recv: a DATA packet with seq=22239, len=536 and
> timestamp=3230007865
> network_send: a DATA-ACK packet with ack=22775
> network_recv: a DATA packet with seq=22775, len=536 and
> timestamp=3230007865
> network_send: a DATA-ACK packet with ack=23311
> network_recv: a DATA packet with seq=23311, len=536 and
> timestamp=3230007866
> network_send: a DATA-ACK packet with ack=23847
> network_recv: a DATA packet with seq=23847, len=536 and
> timestamp=3230007867
> network_send: a DATA-ACK packet with ack=24383
> network_recv: a DATA packet with seq=24383, len=392 and
> timestamp=3230007867
> network_send: a DATA-ACK packet with ack=24775
> network_recv: a DATA packet with seq=24775, len=536 and
> timestamp=3230007868
> network_send: a DATA-ACK packet with ack=25311
> network_recv: a DATA packet with seq=25311, len=536 and
> timestamp=3230007868
> network_send: a DATA-ACK packet with ack=25847
> network_recv: a DATA packet with seq=25847, len=536 and
> timestamp=3230007869
> network_send: a DATA-ACK packet with ack=26383
> network_recv: a DATA packet with seq=26383, len=536 and
> timestamp=3230007870
> network_send: a DATA-ACK packet with ack=26919
> network_recv: a DATA packet with seq=26919, len=536 and
> timestamp=3230007870
> network_send: a DATA-ACK packet with ack=27455
> network_recv: a DATA packet with seq=27455, len=392 and
> timestamp=3230007871
> network_send: a DATA-ACK packet with ack=27847
> network_recv: a DATA packet with seq=27847, len=536 and
> timestamp=3230007871
> network_recv: a DATA packet with seq=28383, len=536 and
> timestamp=3230007872
> network_send: a DATA-ACK packet with ack=28919
> network_recv: a DATA packet with seq=28919, len=536 and
> timestamp=3230007872
> network_send: a DATA-ACK packet with ack=29455
> network_recv: a DATA packet with seq=29455, len=536 and
> timestamp=3230007873
> network_send: a DATA-ACK packet with ack=29991
> network_recv: a DATA packet with seq=29991, len=536 and
> timestamp=3230007873
> network_send: a DATA-ACK packet with ack=30527
> network_recv: a DATA packet with seq=30527, len=392 and
> timestamp=3230007874
> network_send: a DATA-ACK packet with ack=30919
> network_recv: a DATA packet with seq=30919, len=536 and
> timestamp=3230007874
> network_send: a DATA-ACK packet with ack=31455
> network_recv: a DATA packet with seq=31455, len=536 and
> timestamp=3230007875
> network_send: a DATA-ACK packet with ack=31991
> network_recv: a DATA packet with seq=31991, len=536 and
> timestamp=3230007876
> network_send: a DATA-ACK packet with ack=32527
> network_recv: a DATA packet with seq=32527, len=536 and
> timestamp=3230008276
> network_send: a DATA-ACK packet with ack=33063
> network_recv: a DATA packet with seq=33063, len=536 and
> timestamp=3230008277
> network_send: a DATA-ACK packet with ack=33599
> network_recv: a DATA packet with seq=33599, len=392 and
> timestamp=3230008278
> network_send: a DATA-ACK packet with ack=33991
> network_recv: a DATA packet with seq=33991, len=536 and
> timestamp=3230008279
> network_send: a DATA-ACK packet with ack=34527
> network_recv: a DATA packet with seq=34527, len=536 and
> timestamp=3230008279
> network_send: a DATA-ACK packet with ack=35063
> network_recv: a DATA packet with seq=31991, len=536 and
> timestamp=3230008279
> network_send: a DATA-ACK packet with ack=35063
> network_recv: a DATA packet with seq=32527, len=536 and
> timestamp=3230008280
> network_send: a DATA-ACK packet with ack=35063
> network_recv: a DATA packet with seq=33063, len=536 and
> timestamp=3230008280
> network_send: a DATA-ACK packet with ack=35063
> network_recv: a DATA packet with seq=33599, len=392 and
> timestamp=3230008280
> network_send: a DATA-ACK packet with ack=35063
> network_recv: a DATA packet with seq=33991, len=536 and
> timestamp=3230008281
> network_send: a DATA-ACK packet w