su.class.cs244a



Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert.NOSPAM@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Typo in problem set question 1?
Date: Wed, 11 Jan 2006 01:17:13 -0800
Lines: 15
Distribution: su
Message-ID: <dq2ier$88t$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9412

The first question on Problem Set #1 is:

"If there are students taking CS244a, what is the probability that none 
of them has a birthday on the first day of class?"

The problem statement leaves out the number of students. (I think it's 
just a typo in the first clause, "If there are students taking CS244a".) 
   Is there supposed to be an actual number given, or should we just use 
a variable "n" to represent the number of students?

Thanks,
~Daniel

P.S. For reference, here's the URL:
http://www.stanford.edu/class/cs244a/homeworks/ps1/problem_set1_win06.pdf
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Typo in problem set question 1?
Date: Wed, 11 Jan 2006 01:53:47 -0800
Lines: 21
Distribution: su
Message-ID: <dq2kjn$a2i$1@news.Stanford.EDU>
References: <dq2ier$88t$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dq2ier$88t$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9413

Good catch.  It should read: "if there are N students..."

-Matt


Daniel Holbert wrote:
> The first question on Problem Set #1 is:
> 
> "If there are students taking CS244a, what is the probability that none 
> of them has a birthday on the first day of class?"
> 
> The problem statement leaves out the number of students. (I think it's 
> just a typo in the first clause, "If there are students taking CS244a".) 
>   Is there supposed to be an actual number given, or should we just use 
> a variable "n" to represent the number of students?
> 
> Thanks,
> ~Daniel
> 
> P.S. For reference, here's the URL:
> http://www.stanford.edu/class/cs244a/homeworks/ps1/problem_set1_win06.pdf
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Purify
Date: Wed, 11 Jan 2006 20:06:14 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: <dq3ofm$er3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9414


You can make the missing demangler error go away by adding:

   -demangle-program=/usr/pubsw/bin/c++filt

to your PFLAGS variable in the makefile.  I havent a clue what its problem
with linking against /usr/lib.  If you give it the -best-effort flag it will
tell you:

ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors

But I didnt see what -P meant to ld. (-dn means link statically).  I dont
set LD_LIBRARY_PATH so it just looks in /usr/lib by default, perhaps someone
who knows purify can say whether it needs a special path added...

stefan
.

Path: shelby.stanford.edu!myth29.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: HW 1 prob 5
Date: Wed, 11 Jan 2006 16:26:17 -0800
Lines: 6
Distribution: su
Message-ID: <Pine.LNX.4.44.0601111625270.29375-100000@myth29.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9415

In a  store-and-forward router, is the packet completely stored before
forwarding begins, even if the buffer is empty?

Thanks,
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW 1 prob 5
Date: Wed, 11 Jan 2006 16:54:06 -0800
Lines: 9
Distribution: su
Message-ID: <dq49bq$6gc$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601111625270.29375-100000@myth29.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.LNX.4.44.0601111625270.29375-100000@myth29.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9416

Yep.

Megan Anneke Wachs wrote:
> In a  store-and-forward router, is the packet completely stored before
> forwarding begins, even if the buffer is empty?
> 
> Thanks,
> Megan
> 
.

Path: shelby.stanford.edu!elaine34.Stanford.EDU!lamskm
From: lamskm@Stanford.EDU (Michael Lam)
Newsgroups: su.class.cs244a
Subject: echodemo failing on elaine34
Date: Thu, 12 Jan 2006 19:14:10 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: <dq69q2$gec$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Summary: had echodemo on another unix box, but failing on elaine34
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:9419

I had echodemo working on another unix box.
But when I copied it to elaine34, it fails
(on the call to socket).  Should we be using elaine34
for the assignment?  Are there other boxes we can use?

Also, I downloaded echodemo.c to my pc and I want to ftp it to
elaine34 but it seems elaine34 (and transfer.stanford.edu) doesn't
allow ftp.   Is there a better way of file transfer (from my pc)?

Thanks.

-Michael Lam


.

Path: shelby.stanford.edu!myth2.Stanford.EDU!arigreen
From: Ari David Greenberg <arigreen@myth2.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: echodemo failing on elaine34
Date: Thu, 12 Jan 2006 11:51:35 -0800
Lines: 32
Distribution: su
Message-ID: <Pine.LNX.4.44.0601121143010.29534-100000@myth2.Stanford.EDU>
References: <dq69q2$gec$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Michael Lam <lamskm@Stanford.EDU>
In-Reply-To: <dq69q2$gec$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9420

That's weird. I tried compiling and running echodemo on elaine34 and
experienced no problems. You can try connecting to any of the Sweet Hall
Solaris machines (epic, saga, elaine, etc.) Just make sure that it is
running Solaris, as some of the sweet hall machines run Linux. (To
determine what version of *nix the OS is running, use the uname command.)



On Thu, 12 Jan 2006, Michael Lam wrote:

> I had echodemo working on another unix box.
> But when I copied it to elaine34, it fails
> (on the call to socket).  Should we be using elaine34
> for the assignment?  Are there other boxes we can use?
>
> Also, I downloaded echodemo.c to my pc and I want to ftp it to
> elaine34 but it seems elaine34 (and transfer.stanford.edu) doesn't
> allow ftp.   Is there a better way of file transfer (from my pc)?

Sure. From a windows machine, try running pscp
(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
from the command prompt.

Ari
>
> Thanks.
>
> -Michael Lam
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: ftp --> sftp
Date: Thu, 12 Jan 2006 19:53:06 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: <dq6c31$jig$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9421


Try using sftp instead of ftp (it works for me with transfer.stanford.edu).
Stanford likes us to use the secure versions of things (like ssh instead
of rsh).

Stefan
.

Path: shelby.stanford.edu!myth2.Stanford.EDU!arigreen
From: Ari David Greenberg <arigreen@myth2.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: echodemo failing on elaine34
Date: Thu, 12 Jan 2006 11:53:49 -0800
Lines: 22
Distribution: su
Message-ID: <Pine.LNX.4.44.0601121153070.29534-100000@myth2.Stanford.EDU>
References: <dq69q2$gec$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Michael Lam <lamskm@Stanford.EDU>
In-Reply-To: <dq69q2$gec$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9422

Btw, did you try make clean and running make again on elaine34?

Ari

On Thu, 12 Jan 2006, Michael Lam wrote:

> I had echodemo working on another unix box.
> But when I copied it to elaine34, it fails
> (on the call to socket).  Should we be using elaine34
> for the assignment?  Are there other boxes we can use?
>
> Also, I downloaded echodemo.c to my pc and I want to ftp it to
> elaine34 but it seems elaine34 (and transfer.stanford.edu) doesn't
> allow ftp.   Is there a better way of file transfer (from my pc)?
>
> Thanks.
>
> -Michael Lam
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: problem set #1 2-c
Date: Thu, 12 Jan 2006 17:50:50 -0800
Lines: 4
Distribution: su
Message-ID: <dq711n$dro$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9423

Can I assume the speed of light in the optical fiber
is 3 X 10^8 m/s?

--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Running purify remotely
Date: Thu, 12 Jan 2006 16:58:31 -0800
Lines: 3
Distribution: su
Message-ID: <dq72q0$fsl$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9424

Are there issues in running purify remotely with window exporting?


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: problem set #1 2-c
Date: Thu, 12 Jan 2006 19:02:56 -0800
Lines: 9
Distribution: su
Message-ID: <dq7591$i2a$1@news.Stanford.EDU>
References: <dq711n$dro$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dq711n$dro$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9425

Sure, just state your assumption.

-Matt

Michi Mutsuzaki wrote:
> Can I assume the speed of light in the optical fiber
> is 3 X 10^8 m/s?
> 
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Running purify remotely
Date: Thu, 12 Jan 2006 19:14:48 -0800
Lines: 10
Distribution: su
Message-ID: <dq75v9$ik8$1@news.Stanford.EDU>
References: <dq72q0$fsl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dq72q0$fsl$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9426

Is there a specific issue you're worried about or seeing?  It shouldn't 
be a problem... personally I can't click on the Purify menus when using 
Cygwin/X, but I never really had to use the menus anyway.

-Matt

Krishna Monian wrote:
> Are there issues in running purify remotely with window exporting?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Running purify remotely
Date: Thu, 12 Jan 2006 19:34:43 -0800
Lines: 18
Distribution: su
Message-ID: <dq774o$jnj$1@news.Stanford.EDU>
References: <dq72q0$fsl$1@news.Stanford.EDU> <dq75v9$ik8$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9427

The purify windo pops up for me and then the whole thing just hangs. I cant 
really do anything. However running it without windows seems to work ok.

Thanks
Krishna

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dq75v9$ik8$1@news.Stanford.EDU...
> Is there a specific issue you're worried about or seeing?  It shouldn't be 
> a problem... personally I can't click on the Purify menus when using 
> Cygwin/X, but I never really had to use the menus anyway.
>
> -Matt
>
> Krishna Monian wrote:
>> Are there issues in running purify remotely with window exporting?
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: "Bill Dwyer" <wdwyer@stanford.edu>
Newsgroups: su.class.cs244a
Subject: SSH Public Private Keys...
Date: Thu, 12 Jan 2006 19:58:22 -0800
Lines: 9
Distribution: su
Message-ID: <dq78gu$kua$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9428

I've been trying to set up public/private key authentication so I don't have 
to login to the servers every time ssh in. It seems like i've tried 
EVERYTHING, but i just can't seem to get it working. Has anyone else had 
success with this? TA's, is there some trick to stanford's network im 
missing?

Bill 


.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test_code script issues
Date: Thu, 12 Jan 2006 20:37:08 -0800
Lines: 31
Distribution: su
Message-ID: <dq7apl$mr3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9429

Hi,

I had a couple of issues with the test script ....

First, three of the runs that should succeed are failing, seemingly because 
the test script is supplying a nonexistent local path . Shouldn't all the 
local directories be prefixed by ./grading_src/build/?

../ftpcopy   mif 5 ftp.slac.stanford.edu 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/grading_src/build/ftp.slac.stanford.edu_mif_5_1 
/doc
../ftpcopy   mif 5 ftp.slac.stanford.edu ftp.slac.stanford.edu_mif_5_0 /doc
../ftpcopy   ch 1 ftp.cs.stanford.edu 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/grading_src/build/ftp.cs.stanford.edu_ch_1_1 
/pub/cweb
../ftpcopy   gz 2 ftp.stanford.edu ftp.stanford.edu_gz_2_0 /pub/packages
../ftpcopy   txt 0 134.79.18.30 134.79.18.30_txt_0_0 .

Also, one of the regular expressions in Test O is failing. It seems like 
it's supposed to match the line:

" * Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
IBM Corp. 1992, 2005 All rights reserved.  "

but it doesn't match anymore.

Thanks for your help,

Jesse


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test_code script issues
Date: Fri, 13 Jan 2006 02:35:27 -0800
Lines: 42
Distribution: su
Message-ID: <dq7vpg$gp0$1@news.Stanford.EDU>
References: <dq7apl$mr3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dq7apl$mr3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9430

Jesse Young wrote:
> Hi,
> 
> I had a couple of issues with the test script ....
> 
> First, three of the runs that should succeed are failing, seemingly because 
> the test script is supplying a nonexistent local path . Shouldn't all the 
> local directories be prefixed by ./grading_src/build/?
> 
> ./ftpcopy   mif 5 ftp.slac.stanford.edu 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/grading_src/build/ftp.slac.stanford.edu_mif_5_1 
> /doc
> ./ftpcopy   mif 5 ftp.slac.stanford.edu ftp.slac.stanford.edu_mif_5_0 /doc
> ./ftpcopy   ch 1 ftp.cs.stanford.edu 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/grading_src/build/ftp.cs.stanford.edu_ch_1_1 
> /pub/cweb
> ./ftpcopy   gz 2 ftp.stanford.edu ftp.stanford.edu_gz_2_0 /pub/packages
> ./ftpcopy   txt 0 134.79.18.30 134.79.18.30_txt_0_0 .
> 

No, the test script seems to be fine.  My ftpcopy solution passes all 
the tests...

> Also, one of the regular expressions in Test O is failing. It seems like 
> it's supposed to match the line:
> 
> " * Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
> IBM Corp. 1992, 2005 All rights reserved.  "
> 
> but it doesn't match anymore.

Ah yes, you're right.  We'll update the script to fix this, for now 
ignore Test O saying you didn't run purify if you know you did.

-Matt

> 
> Thanks for your help,
> 
> Jesse
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: SSH Public Private Keys...
Date: Fri, 13 Jan 2006 12:11:56 -0800
Organization: Stanford University
Lines: 30
Distribution: su
Message-ID: <20060113121156.6f5eeba3@ballpoint>
References: <dq78gu$kua$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9431

----------  Forwarded Message  ----------

Subject: Re: HelpSU Request HD0000000260591
Date: Friday 30 September 2005 01:51 am
From: Jason Cowart <jcowart@stanford.edu>
To: lzen@cs.stanford.edu

Hi Lee,

Unfortunately public-private key authentication won't work either--
there's apparently not a way to integrate it with Kerberos/AFS.  As
of now password authentication is the only option.

Best,
jason



On Thu, 12 Jan 2006 19:58:22 -0800
"Bill Dwyer" <wdwyer@stanford.edu> wrote:

> I've been trying to set up public/private key authentication so I don't have 
> to login to the servers every time ssh in. It seems like i've tried 
> EVERYTHING, but i just can't seem to get it working. Has anyone else had 
> success with this? TA's, is there some trick to stanford's network im 
> missing?
> 
> Bill 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: FTP server connection problems
Date: Fri, 13 Jan 2006 23:15:04 -0800
Lines: 10
Distribution: su
Message-ID: <dqa897$185$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9432

I'm trying to test my program against random FTP servers.  I can
successfully connect to the ftpd program supplied, but when I try to connect
to the ftp server I'm running locally on my Windows desktop (BPFTP server),
it hangs on connect and never completes.  I'm running on port 900, but it
still doesn't seem to work.  Ethereal shows that I never receive the packet
server-side.  Anyone have any ideas?  I'm just curious why it isn't working.

Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FTP server connection problems
Date: Fri, 13 Jan 2006 23:25:40 -0800
Lines: 20
Distribution: su
Message-ID: <dqa8t5$1lt$1@news.Stanford.EDU>
References: <dqa897$185$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9433

Oh, and I should add that telnet <myip> 900 does return 220.

"Waynn Lue" <wlue@stanford.edu> wrote in message
news:dqa897$185$1@news.Stanford.EDU...
> I'm trying to test my program against random FTP servers.  I can
> successfully connect to the ftpd program supplied, but when I try to
connect
> to the ftp server I'm running locally on my Windows desktop (BPFTP
server),
> it hangs on connect and never completes.  I'm running on port 900, but it
> still doesn't seem to work.  Ethereal shows that I never receive the
packet
> server-side.  Anyone have any ideas?  I'm just curious why it isn't
working.
>
> Waynn
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FTP server connection problems
Date: Sat, 14 Jan 2006 04:19:58 -0800
Lines: 27
Distribution: su
Message-ID: <dqaq4s$li9$1@news.Stanford.EDU>
References: <dqa897$185$1@news.Stanford.EDU> <dqa8t5$1lt$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9434

Hm, the problem went away.  Please ignore...no idea what happened.

"Waynn Lue" <wlue@stanford.edu> wrote in message
news:dqa8t5$1lt$1@news.Stanford.EDU...
> Oh, and I should add that telnet <myip> 900 does return 220.
>
> "Waynn Lue" <wlue@stanford.edu> wrote in message
> news:dqa897$185$1@news.Stanford.EDU...
> > I'm trying to test my program against random FTP servers.  I can
> > successfully connect to the ftpd program supplied, but when I try to
> connect
> > to the ftp server I'm running locally on my Windows desktop (BPFTP
> server),
> > it hangs on connect and never completes.  I'm running on port 900, but
it
> > still doesn't seem to work.  Ethereal shows that I never receive the
> packet
> > server-side.  Anyone have any ideas?  I'm just curious why it isn't
> working.
> >
> > Waynn
> >
> >
>
>


.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: using snprintf
Date: Sat, 14 Jan 2006 11:40:48 -0800
Lines: 16
Distribution: su
Message-ID: <Pine.GSO.4.44.0601141138060.23768-100000@elaine24.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9435

Hello...

Is anyone else using snprintf?  gcc compiles with warnings when I use it.
It says:

warning: implicit declaration of function 'snprintf'

but seems to work fine.  The man page says I need to include stdio.h but
that doesn't seem to shut it up.

Any suggestions?

Thanks,

Roy

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: using snprintf
Date: Sat, 14 Jan 2006 12:49:41 -0800
Lines: 32
Distribution: su
Message-ID: <dqbo59$hba$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601141138060.23768-100000@elaine24.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601141138060.23768-100000@elaine24.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9436

snprintf is a C99 function.  We require your code to compile with the 
gcc -ansi flag (old C89).  That's probably what you're doing and why 
you're getting that warning: -ansi won't include the declaration of 
snprintf.

In general, you can't use C99 features, but functions like snprintf that 
were widely available before C99 are fine.  Basically, if your code 
compiles under -ansi, you should be ok.

In this case, to fix the warning, just add a prototype for snprintf:

extern int snprintf(char *s, size_t n, const char *fmt, ...);

-Matt

Roy Mehdi Zeighami wrote:
> Hello...
> 
> Is anyone else using snprintf?  gcc compiles with warnings when I use it.
> It says:
> 
> warning: implicit declaration of function 'snprintf'
> 
> but seems to work fine.  The man page says I need to include stdio.h but
> that doesn't seem to shut it up.
> 
> Any suggestions?
> 
> Thanks,
> 
> Roy
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Jeremy Robin" <jirobin@stanford.edu>
Newsgroups: su.class.cs244a
Subject: purify FIU errors
Date: Sat, 14 Jan 2006 13:45:36 -0800
Lines: 7
Distribution: su
Message-ID: <dqbre0$jv3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9437

Aside from the name_service_door error mentioned in the faq, there are also 
purify errors for the 3 std streams and 2 for fd's for "Purify internal 
use".  are these also FIU errors that we can ignore?

jeremy 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: purify errors
Date: Sat, 14 Jan 2006 22:04:52 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: <dqbsi4$kga$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9438

When handling an error, do you expect us to explicitely close down each fd
that we have open at the time or can we let the OS do it on exit (and thus
generate several FIU purify errors).
.

Path: shelby.stanford.edu!not-for-mail
From: Mark Slee <mcslee@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Running purify remotely
Date: Sat, 14 Jan 2006 14:45:36 -0800
Lines: 25
Distribution: su
Message-ID: <dqbuut$mdh$1@news.Stanford.EDU>
References: <dq72q0$fsl$1@news.Stanford.EDU> <dq75v9$ik8$1@news.Stanford.EDU> <dq774o$jnj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
In-Reply-To: <dq774o$jnj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9439

I have the same issue, also running on Cygwin/X. Locks up the entire ssh 
session.

Krishna Monian wrote:
> The purify windo pops up for me and then the whole thing just hangs. I cant 
> really do anything. However running it without windows seems to work ok.
> 
> Thanks
> Krishna
> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dq75v9$ik8$1@news.Stanford.EDU...
> 
>>Is there a specific issue you're worried about or seeing?  It shouldn't be 
>>a problem... personally I can't click on the Purify menus when using 
>>Cygwin/X, but I never really had to use the menus anyway.
>>
>>-Matt
>>
>>Krishna Monian wrote:
>>
>>>Are there issues in running purify remotely with window exporting?
>>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify FIU errors
Date: Sat, 14 Jan 2006 15:29:16 -0800
Lines: 12
Distribution: su
Message-ID: <dqc1gg$or0$1@news.Stanford.EDU>
References: <dqbre0$jv3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqbre0$jv3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9440

These are fine.

-Matt

Jeremy Robin wrote:
> Aside from the name_service_door error mentioned in the faq, there are also 
> purify errors for the 3 std streams and 2 for fd's for "Purify internal 
> use".  are these also FIU errors that we can ignore?
> 
> jeremy 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify errors
Date: Sat, 14 Jan 2006 15:40:46 -0800
Lines: 9
Distribution: su
Message-ID: <dqc262$pce$1@news.Stanford.EDU>
References: <dqbsi4$kga$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqbsi4$kga$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9441

On a fatal error, you can just abort without worrying about freeing 
memory or closing file descriptors.

-Matt

Stefan Thomas Mohler wrote:
> When handling an error, do you expect us to explicitely close down each fd
> that we have open at the time or can we let the OS do it on exit (and thus
> generate several FIU purify errors).
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify errors
Date: Sat, 14 Jan 2006 16:02:00 -0800
Lines: 18
Distribution: su
Message-ID: <dqc3ds$qqq$1@news.Stanford.EDU>
References: <dqbsi4$kga$1@news.Stanford.EDU> <dqc262$pce$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqc262$pce$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9442

Clarification: you do need to print the "ERROR:" message before 
aborting, as the assignment handout states.

-Matt

Matt Falkenhagen wrote:
> On a fatal error, you can just abort without worrying about freeing 
> memory or closing file descriptors.
> 
> -Matt
> 
> Stefan Thomas Mohler wrote:
> 
>> When handling an error, do you expect us to explicitely close down 
>> each fd
>> that we have open at the time or can we let the OS do it on exit (and 
>> thus
>> generate several FIU purify errors).
.

Path: shelby.stanford.edu!not-for-mail
From: Mark Slee <mcslee@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 2MSL Delay on Web Servers
Date: Sat, 14 Jan 2006 18:30:46 -0800
Lines: 11
Distribution: su
Message-ID: <dqcc53$54j$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9443

Just out of curiosity, how do large servers that accept many connections 
on the same port deal with the 2MSL timeout issue? Our FTP client has to 
choose a new port for each data connection because of the way TCP 
enforces this timeout.

A server like Apache, however, can run many simultaneous connections on 
the same port (i.e. 80). What's the distinction here? Are they using a 
different type of socket?

Thanks,
Mark
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: 2MSL delay
Date: Sun, 15 Jan 2006 02:54:59 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: <dqcdi3$5lq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9444

never done it, but it was mentioned in another class..

If you want, you can flag the adress not to wait.  If fd is the socket you
are listening on:

int n = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n))
.

Path: shelby.stanford.edu!elaine30.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Using PORT
Date: Sat, 14 Jan 2006 20:06:54 -0800
Lines: 25
Distribution: su
Message-ID: <Pine.GSO.4.44.0601142002090.24607-100000@elaine30.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9445

Hello...

I am trying to using the PORT command but my program never wakes up from
the accept call.  I have an ftp daemon that prints out the commands as it
gets them. For example, I see the line

PORT set to 15.99.202.18 - 52768 (206,51)

and I get the success response from the server.  However, my program never
wakes up from the accept.  I am sure this ip address and port number are
correct because I can write a little toy program to connect to this port
and the program returns from accept.

Also, I was watching the tcp traffic with tcpdump and don't see the syn
packet.

Is there something else I have to do after calling port to make the server
call me back?

I am probably missing something obvious.

Thanks,

Roy

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2MSL Delay on Web Servers
Date: Sat, 14 Jan 2006 20:23:56 -0800
Lines: 29
Distribution: su
Message-ID: <dqcip0$alv$1@news.Stanford.EDU>
References: <dqcc53$54j$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqcc53$54j$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9446

On each side of a TCP connection, the connection is identified by (local 
ip, local port, dest ip, dest port).  So on connection teardown, the 
closing side waits for 2MSL before allowing a new connection with the 
same two ip/port pairs.

So yes, after I've connected to a web server and the connection closed, 
I can't reuse my same local port if I want to immediately open a new 
connection... the server wouldn't allow that.  I need a different port, 
and, presumably, when I call bind() again the OS knows to give me a 
different one.  The OS probably just cycles through available ports, 
exactly because of this problem.

Hope that's clear.

-Matt


Mark Slee wrote:
> Just out of curiosity, how do large servers that accept many connections 
> on the same port deal with the 2MSL timeout issue? Our FTP client has to 
> choose a new port for each data connection because of the way TCP 
> enforces this timeout.
> 
> A server like Apache, however, can run many simultaneous connections on 
> the same port (i.e. 80). What's the distinction here? Are they using a 
> different type of socket?
> 
> Thanks,
> Mark
.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Using PORT
Date: Sat, 14 Jan 2006 20:25:49 -0800
Lines: 38
Distribution: su
Message-ID: <Pine.GSO.4.44.0601142024480.7253-100000@elaine24.Stanford.EDU>
References: <Pine.GSO.4.44.0601142002090.24607-100000@elaine30.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0601142002090.24607-100000@elaine30.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9447

Never mind...

I finally figured out you have to actually give a command that requires
that it call you back on the data connection ;)

Sorry for the spam.

Thanks, Roy

On Sat, 14 Jan 2006, Roy Mehdi Zeighami wrote:

> Hello...
>
> I am trying to using the PORT command but my program never wakes up from
> the accept call.  I have an ftp daemon that prints out the commands as it
> gets them. For example, I see the line
>
> PORT set to 15.99.202.18 - 52768 (206,51)
>
> and I get the success response from the server.  However, my program never
> wakes up from the accept.  I am sure this ip address and port number are
> correct because I can write a little toy program to connect to this port
> and the program returns from accept.
>
> Also, I was watching the tcp traffic with tcpdump and don't see the syn
> packet.
>
> Is there something else I have to do after calling port to make the server
> call me back?
>
> I am probably missing something obvious.
>
> Thanks,
>
> Roy
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2MSL delay
Date: Sat, 14 Jan 2006 20:31:08 -0800
Lines: 14
Distribution: su
Message-ID: <dqcj6g$b23$1@news.Stanford.EDU>
References: <dqcdi3$5lq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqcdi3$5lq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9448

SO_REUSEADDR is probably useful in some cases, but definately not for 
this project.  The waiting is there for good reason, we'll cover it when 
we talk about TCP in a few weeks.

-Matt

Stefan Thomas Mohler wrote:
> never done it, but it was mentioned in another class..
> 
> If you want, you can flag the adress not to wait.  If fd is the socket you
> are listening on:
> 
> int n = 1;
> setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n))
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2MSL delay
Date: Sat, 14 Jan 2006 20:37:10 -0800
Lines: 20
Distribution: su
Message-ID: <dqcjhq$b23$2@news.Stanford.EDU>
References: <dqcdi3$5lq$1@news.Stanford.EDU> <dqcj6g$b23$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqcj6g$b23$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9449

Oops, I didn't realize you were responding to the above post about web 
servers.  Yeah, maybe web servers use it.

Matt Falkenhagen wrote:
> SO_REUSEADDR is probably useful in some cases, but definately not for 
> this project.  The waiting is there for good reason, we'll cover it when 
> we talk about TCP in a few weeks.
> 
> -Matt
> 
> Stefan Thomas Mohler wrote:
> 
>> never done it, but it was mentioned in another class..
>>
>> If you want, you can flag the adress not to wait.  If fd is the socket 
>> you
>> are listening on:
>>
>> int n = 1;
>> setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n))
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: tcpdump?
Date: Sat, 14 Jan 2006 22:03:26 -0800
Lines: 7
Distribution: su
Message-ID: <dqcoer$f7e$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9450

I can't seem to find tcpdump on the elaines, anyone know where it is (or
something equivalent)?

Thanks,
Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: "Kevin Hart" <kevin.hart@hp.com>
Newsgroups: su.class.cs244a
Subject: Purify and memory leaks
Date: Sat, 14 Jan 2006 23:40:12 -0700
Lines: 5
Distribution: su
Message-ID: <dqcqoe$h8h$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9451

If you dynamically allocate memory and then don't free it before the program 
ends, isn't Purify supposed to report that as a memory leak?  For some 
reason Purify does not report any memory leaks when I run echodemo. 


.

Path: shelby.stanford.edu!saga12.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: tcpdump?
Date: Sun, 15 Jan 2006 00:58:26 -0800
Lines: 16
Distribution: su
Message-ID: <Pine.GSO.4.44.0601150058001.5632-100000@saga12.Stanford.EDU>
References: <dqcoer$f7e$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Waynn Lue <wlue@stanford.edu>
In-Reply-To: <dqcoer$f7e$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9452

same here..I can't find it on saga.

thanks,
Vijay.

On Sat, 14 Jan 2006, Waynn Lue wrote:

> I can't seem to find tcpdump on the elaines, anyone know where it is (or
> something equivalent)?
>
> Thanks,
> Waynn
>
>
>

.

Path: shelby.stanford.edu!saga12.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PORT command
Date: Sun, 15 Jan 2006 01:52:28 -0800
Lines: 11
Distribution: su
Message-ID: <Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9453

Hi,
    I am ending up with sending client's IP address as zeros in the
PORT command as after the bind with INADDR_ANY and getsockname() for the
client_addr, the client_addr.sin_addr.s_addr is still set to zero. The
client_addr.sin_port seems to be picking up the port number correctly
after the bind but the ip address is all zeros. Is this expected? Client
side accept hangs on the data port while waiting to hear from the server.

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command
Date: Sun, 15 Jan 2006 02:38:17 -0800
Lines: 23
Distribution: su
Message-ID: <dqd8mp$1fe$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9454

The reason accept() hangs is that the server hasn't connected to the 
client yet, most likely because it doesn't know the client's IP.

I struggled with the same problem for a couple of hours. The answer lies 
within the newsgroup posts from previous years. I would start here:

http://www.stanford.edu/class/cs244a/news/news2002.html#2448

-Naeim


Vijay K Kulkarni wrote:
> Hi,
>     I am ending up with sending client's IP address as zeros in the
> PORT command as after the bind with INADDR_ANY and getsockname() for the
> client_addr, the client_addr.sin_addr.s_addr is still set to zero. The
> client_addr.sin_port seems to be picking up the port number correctly
> after the bind but the ip address is all zeros. Is this expected? Client
> side accept hangs on the data port while waiting to hear from the server.
> 
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command
Date: Sun, 15 Jan 2006 10:43:22 -0800
Lines: 20
Distribution: su
Message-ID: <dqe54f$rak$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9455

I saw this too.  I'm no expert, but from what I read, I don't think 
getsockname is supposed to fill in the address.  I used 
gethostbyname(getenv("HOST")), which fills a hostent object, and then 
inet_ntop, as described in stevens, to get the address in "presentation" 
form for the PORT command.

Steve

Vijay K Kulkarni wrote:
> Hi,
>     I am ending up with sending client's IP address as zeros in the
> PORT command as after the bind with INADDR_ANY and getsockname() for the
> client_addr, the client_addr.sin_addr.s_addr is still set to zero. The
> client_addr.sin_port seems to be picking up the port number correctly
> after the bind but the ip address is all zeros. Is this expected? Client
> side accept hangs on the data port while waiting to hear from the server.
> 
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command
Date: Sun, 15 Jan 2006 12:48:04 -0800
Lines: 32
Distribution: su
Message-ID: <43CAB504.9030301@stanford.edu>
References: <Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU> <dqd8mp$1fe$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9456

Here are some options & sample code:

http://www.stanford.edu/class/cs244a/news/news2004.html#4952

Sesha

Naeim Semsarilar wrote:
> The reason accept() hangs is that the server hasn't connected to the 
> client yet, most likely because it doesn't know the client's IP.
> 
> I struggled with the same problem for a couple of hours. The answer lies 
> within the newsgroup posts from previous years. I would start here:
> 
> http://www.stanford.edu/class/cs244a/news/news2002.html#2448
> 
> -Naeim
> 
> 
> Vijay K Kulkarni wrote:
> 
>> Hi,
>>     I am ending up with sending client's IP address as zeros in the
>> PORT command as after the bind with INADDR_ANY and getsockname() for the
>> client_addr, the client_addr.sin_addr.s_addr is still set to zero. The
>> client_addr.sin_port seems to be picking up the port number correctly
>> after the bind but the ip address is all zeros. Is this expected? Client
>> side accept hangs on the data port while waiting to hear from the server.
>>
>> thanks,
>> Vijay.
>>

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Running purify remotely
Date: Sun, 15 Jan 2006 12:51:50 -0800
Lines: 38
Distribution: su
Message-ID: <dqecla$4p2$1@news.Stanford.EDU>
References: <dq72q0$fsl$1@news.Stanford.EDU> <dq75v9$ik8$1@news.Stanford.EDU> <dq774o$jnj$1@news.Stanford.EDU> <dqbuut$mdh$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqbuut$mdh$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9457

I haven't experienced any problems, running on Cygwin.X. I connected to 
elaine.stanford.edu using Putty, with the Enable X Forwarding option 
checked. If you are still having problems you can always set the 
-windows=no option (from the shell type:
setenv PURIFYOPTIONS "-windows=no -log-file=purify.output")
to have purify write its output to a log file.

Ari

Mark Slee wrote:
> I have the same issue, also running on Cygwin/X. Locks up the entire ssh 
> session.
> 
> Krishna Monian wrote:
> 
>> The purify windo pops up for me and then the whole thing just hangs. I 
>> cant really do anything. However running it without windows seems to 
>> work ok.
>>
>> Thanks
>> Krishna
>>
>> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
>> news:dq75v9$ik8$1@news.Stanford.EDU...
>>
>>> Is there a specific issue you're worried about or seeing?  It 
>>> shouldn't be a problem... personally I can't click on the Purify 
>>> menus when using Cygwin/X, but I never really had to use the menus 
>>> anyway.
>>>
>>> -Matt
>>>
>>> Krishna Monian wrote:
>>>
>>>> Are there issues in running purify remotely with window exporting?
>>>>
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftpd problem
Date: Sun, 15 Jan 2006 12:55:23 -0800
Lines: 9
Distribution: su
Message-ID: <43CAB6BB.4090709@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9458

When I try to connect to my instance of ftpd, I see this:

62461@elaine1: unknown host or invalid literal address

Using elaine1.stanford.edu or elaine doesnt seem to help.

Thanks,
Sesha

.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command
Date: Sun, 15 Jan 2006 13:08:32 -0800
Lines: 20
Distribution: su
Message-ID: <dqedkg$5ms$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9459

I just used getsockname on the server socket, and then looked at the
struct's .sin_addr.s_addr field.

Waynn

"Vijay K Kulkarni" <vijayk@stanford.edu> wrote in message
news:Pine.GSO.4.44.0601150145020.6286-100000@saga12.Stanford.EDU...
> Hi,
>     I am ending up with sending client's IP address as zeros in the
> PORT command as after the bind with INADDR_ANY and getsockname() for the
> client_addr, the client_addr.sin_addr.s_addr is still set to zero. The
> client_addr.sin_port seems to be picking up the port number correctly
> after the bind but the ip address is all zeros. Is this expected? Client
> side accept hangs on the data port while waiting to hear from the server.
>
> thanks,
> Vijay.
>


.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: ftpd problem
Date: Sun, 15 Jan 2006 21:08:46 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 19
Distribution: su
Message-ID: <dqedku$5nn$1@news.Stanford.EDU>
References: <43CAB6BB.4090709@stanford.edu>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9460

You likely have your port number defined as a 2-byte signed
integer. Try to use 2-byte unsigned instead. This solved it 
for me.

Oleg.

In article <43CAB6BB.4090709@stanford.edu>,
Sesha Narahari  <narahari@stanford.edu> wrote:
>When I try to connect to my instance of ftpd, I see this:
>
>62461@elaine1: unknown host or invalid literal address
>
>Using elaine1.stanford.edu or elaine doesnt seem to help.
>
>Thanks,
>Sesha
>


.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpd problem
Date: Sun, 15 Jan 2006 13:20:35 -0800
Lines: 29
Distribution: su
Message-ID: <43CABCA3.9000507@stanford.edu>
References: <43CAB6BB.4090709@stanford.edu> <dqedku$5nn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9461

I am just using the stock ftp client to connect to the ftpd. Not my 
ftpcopy code.

Thanks,
Sesha

Oleg Slezberg wrote:
> You likely have your port number defined as a 2-byte signed
> integer. Try to use 2-byte unsigned instead. This solved it 
> for me.
> 
> Oleg.
> 
> In article <43CAB6BB.4090709@stanford.edu>,
> Sesha Narahari  <narahari@stanford.edu> wrote:
> 
>>When I try to connect to my instance of ftpd, I see this:
>>
>>62461@elaine1: unknown host or invalid literal address
>>
>>Using elaine1.stanford.edu or elaine doesnt seem to help.
>>
>>Thanks,
>>Sesha
>>
> 
> 
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: PASV vs PORT
Date: Sun, 15 Jan 2006 23:26:49 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: <dqelnp$cv7$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9462


I thought this was covered in the review session but I am not sure.  Are we
allowed to use PASV instead of PORT?

.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: deliverable echodemo
Date: Mon, 16 Jan 2006 00:14:23 +0000 (UTC)
Lines: 5
Distribution: su
Message-ID: <dqeogv$eir$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.14.2smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9463

what is the actual deliverable regarding the echodemo?  Are we suppose to
turn in the fixed code besides the writeup? or should it be just a writeup
and no code involved?  The homework sheet is unclear on this.

-S.
.

Path: shelby.stanford.edu!not-for-mail
From: Mark Slee <mcslee@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftpparse() determining symlinks?
Date: Sun, 15 Jan 2006 16:40:00 -0800
Lines: 16
Distribution: su
Message-ID: <dqeq1e$ghq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9464

The FAQ states:

Q9. How do I handle symbolic links?

A. You don't. If ftpparse() indicates that a directory entry is a 
symbolic link, you can just ignore it during processing.

Maybe I'm missing something, but it doesn't seem like ftpparse() really 
tells us whether something is a symbolic link or not. What should be the 
rule on determining this?

It seems like if both flagtrycwd and flagtryretr are set then the item 
is most likely a symbolic link. Can we use this as a criteria?

Thanks,
Mark
.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: FTP: the "." and ".." directories
Date: Mon, 16 Jan 2006 03:08:38 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: <dqf2nm$o2u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9465

Hi,

How are we going treat the "." and ".." directories?  Should we just ignore them?

Thanks,
Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Allowing scripting wrappers
Date: Sun, 15 Jan 2006 20:15:27 -0800
Lines: 10
Distribution: su
Message-ID: <dqf6l0$ra0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9466

I was just wondering if you guys would consider allowing us to write 
wrappers for our programs in a scripting language. I find myself 
spending most of my time doing string parsing, which I don't really 
think is the point of this class. If I was allowed to write a Perl 
wrapper I would be able to concentrate much more on the networking 
programming.

Just my 2 cents.

Jens.
.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: local and remote paths
Date: Sun, 15 Jan 2006 21:03:47 -0800
Lines: 7
Distribution: su
Message-ID: <Pine.GSO.4.44.0601152102070.17348-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9467

Can we assume that the local and remote paths are absolute, or should we
handle relative paths as well?

Thanks,

Roy

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: tcpdump?
Date: Sun, 15 Jan 2006 22:19:10 -0800
Lines: 23
Distribution: su
Message-ID: <dqfdt6$4o7$1@news.Stanford.EDU>
References: <dqcoer$f7e$1@news.Stanford.EDU> <Pine.GSO.4.44.0601150058001.5632-100000@saga12.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601150058001.5632-100000@saga12.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9468

Does /usr/class/cs244a/bin/tcpdump not work on these machines?

Ari

Vijay K Kulkarni wrote:
> same here..I can't find it on saga.
> 
> thanks,
> Vijay.
> 
> On Sat, 14 Jan 2006, Waynn Lue wrote:
> 
> 
>>I can't seem to find tcpdump on the elaines, anyone know where it is (or
>>something equivalent)?
>>
>>Thanks,
>>Waynn
>>
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: local and remote paths
Date: Sun, 15 Jan 2006 22:20:52 -0800
Lines: 12
Distribution: su
Message-ID: <dqfe0b$4o7$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601152102070.17348-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601152102070.17348-100000@elaine1.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9469

You should handle absolute and relative paths.

Ari

Roy Mehdi Zeighami wrote:
> Can we assume that the local and remote paths are absolute, or should we
> handle relative paths as well?
> 
> Thanks,
> 
> Roy
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: deliverable echodemo
Date: Sun, 15 Jan 2006 22:22:19 -0800
Lines: 10
Distribution: su
Message-ID: <dqfe32$4o7$3@news.Stanford.EDU>
References: <dqeogv$eir$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqeogv$eir$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9470

Just the writeup is fine.

Ari

Samantha Kwan Chan wrote:
> what is the actual deliverable regarding the echodemo?  Are we suppose to
> turn in the fixed code besides the writeup? or should it be just a writeup
> and no code involved?  The homework sheet is unclear on this.
> 
> -S.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PASV vs PORT
Date: Sun, 15 Jan 2006 22:57:02 -0800
Lines: 8
Distribution: su
Message-ID: <dqfg48$6kq$1@news.Stanford.EDU>
References: <dqelnp$cv7$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqelnp$cv7$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9471

You can use PASV, but we recommend using PORT.

Ari

Stefan Thomas Mohler wrote:
> I thought this was covered in the review session but I am not sure.  Are we
> allowed to use PASV instead of PORT?
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Nick Puz <npuz@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: using snprintf
Date: Sun, 15 Jan 2006 22:57:32 -0800
Lines: 39
Distribution: su
Message-ID: <dqfg50$6l9$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601141138060.23768-100000@elaine24.Stanford.EDU> <dqbo59$hba$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqbo59$hba$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9472

Hi Matt,
So just to clarify, is it ok to use other C99 features (such as 
stdbool.h) that compile with -ansi ?
-nick

Matt Falkenhagen wrote:
> snprintf is a C99 function.  We require your code to compile with the 
> gcc -ansi flag (old C89).  That's probably what you're doing and why 
> you're getting that warning: -ansi won't include the declaration of 
> snprintf.
> 
> In general, you can't use C99 features, but functions like snprintf that 
> were widely available before C99 are fine.  Basically, if your code 
> compiles under -ansi, you should be ok.
> 
> In this case, to fix the warning, just add a prototype for snprintf:
> 
> extern int snprintf(char *s, size_t n, const char *fmt, ...);
> 
> -Matt
> 
> Roy Mehdi Zeighami wrote:
> 
>> Hello...
>>
>> Is anyone else using snprintf?  gcc compiles with warnings when I use it.
>> It says:
>>
>> warning: implicit declaration of function 'snprintf'
>>
>> but seems to work fine.  The man page says I need to include stdio.h but
>> that doesn't seem to shut it up.
>>
>> Any suggestions?
>>
>> Thanks,
>>
>> Roy
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FTP: the "." and ".." directories
Date: Sun, 15 Jan 2006 23:06:43 -0800
Lines: 9
Distribution: su
Message-ID: <dqfgmb$72q$1@news.Stanford.EDU>
References: <dqf2nm$o2u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqf2nm$o2u$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9473

Yep.

Hector Chan wrote:
> Hi,
> 
> How are we going treat the "." and ".." directories?  Should we just ignore them?
> 
> Thanks,
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: tcpdump?
Date: Sun, 15 Jan 2006 23:52:49 -0800
Lines: 33
Distribution: su
Message-ID: <dqfjci$b0o$1@news.Stanford.EDU>
References: <dqcoer$f7e$1@news.Stanford.EDU> <Pine.GSO.4.44.0601150058001.5632-100000@saga12.Stanford.EDU> <dqfdt6$4o7$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9474

elaine26:~/cs244a/hw1> /usr/class/cs244a/bin/tcpdump
tcpdump: /dev/eri: Permission denied

You have to be root to run tcpdump, right?  Is there any way to get it to
work?

"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message
news:dqfdt6$4o7$1@news.Stanford.EDU...
> Does /usr/class/cs244a/bin/tcpdump not work on these machines?
>
> Ari
>
> Vijay K Kulkarni wrote:
> > same here..I can't find it on saga.
> >
> > thanks,
> > Vijay.
> >
> > On Sat, 14 Jan 2006, Waynn Lue wrote:
> >
> >
> >>I can't seem to find tcpdump on the elaines, anyone know where it is (or
> >>something equivalent)?
> >>
> >>Thanks,
> >>Waynn
> >>
> >>
> >>
> >
> >


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpparse() determining symlinks?
Date: Mon, 16 Jan 2006 00:11:23 -0800
Lines: 22
Distribution: su
Message-ID: <dqfkfi$cdq$1@news.Stanford.EDU>
References: <dqeq1e$ghq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqeq1e$ghq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9475

Yes, it's fair to assume that a file is a symlink if and only if both 
flagtycmd and flagtryretr are set.

Ari

Mark Slee wrote:
> The FAQ states:
> 
> Q9. How do I handle symbolic links?
> 
> A. You don't. If ftpparse() indicates that a directory entry is a 
> symbolic link, you can just ignore it during processing.
> 
> Maybe I'm missing something, but it doesn't seem like ftpparse() really 
> tells us whether something is a symbolic link or not. What should be the 
> rule on determining this?
> 
> It seems like if both flagtrycwd and flagtryretr are set then the item 
> is most likely a symbolic link. Can we use this as a criteria?
> 
> Thanks,
> Mark
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify and memory leaks
Date: Mon, 16 Jan 2006 00:13:25 -0800
Lines: 28
Distribution: su
Message-ID: <dqfkjd$cdq$2@news.Stanford.EDU>
References: <dqcqoe$h8h$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqcqoe$h8h$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9476

 From a previous year's newsgroup:

My experience has been that purify will catch memory leaks for memory 
that is no longer accessible by any pointer in the program.  If you 
malloc memory, retain the pointer to it, and just fail to free the 
memory, purify doesn't consider it a leak.  This jives with the text 
from the purify man page (a great source of more info on purify):

      The memory leak message reports blocks on the heap which are
      no  longer  accessible  through any pointer, which have been
      leaked since the program started or since the last  call  to
      purify_new_leaks().   Other  functions  can  be  invoked  to
      profile non-leaked blocks, or to list all  leaks  or  blocks
      instead of just those generated since the last call.

Purify would consider something like this to be a leak:

         my_ptr = (char*) malloc(10);
         my_ptr = (char*) malloc(5);

since the malloc of 10 bytes no longer has any pointer to it.

Kevin Hart wrote:
> If you dynamically allocate memory and then don't free it before the program 
> ends, isn't Purify supposed to report that as a memory leak?  For some 
> reason Purify does not report any memory leaks when I run echodemo. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: /usr/include/limits.h
Date: Mon, 16 Jan 2006 03:18:21 -0800
Lines: 8
Distribution: su
Message-ID: <dqfvds$mha$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9477

I'm trying to use the #defines in limits.h, and I've #included <limits.h>,
but none of the numbers there seem defined.  I can just write my own in my
file, but does anyone know what I'm doing wrong?  What do I need to do
besides #include to get it to work?

Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 08:58:36 -0800
Lines: 9
Distribution: su
Message-ID: <dqgjbt$d3k$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9478

Hello,

I'm having a problem with the PORT command. The server 
ftp.cs.stanford.edu doesn't respond to the command. I've
tried different servers (ftp.microsoft.com, ftp.stanford.edu,
etc...), and it works fine. Any idea why this is happening?

Thank you,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 09:29:57 -0800
Lines: 29
Distribution: su
Message-ID: <dqgl6s$esb$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqgjbt$d3k$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9479

I'm getting this same behavior.  Clearly the server is not connecting to 
the data socket we open for it, which makes me think that we are sending 
incorrect IP and/or port info.  At first I thought it had to do with 
byte ordering, since it works on some servers but not others.  Now I am 
thinking it has to do with how we determine our own IP address.  In a 
previous post, someone said that getsockname populates the port info in 
the sockaddr_in struct, but not the IP address info.  That was what 
happened with me.  So I used gethostbyname on getenv("HOST") to get the 
IP.  I am starting to think that this may not *always* be the correct IP 
to send to the server.  So, to Wayne Lue: I wonder why getsockname gives 
some of us IP info and others only port info.  To everyone: any ideas?

Thanks,
Steve

PS -- Servers that my program works on: ftp.stanford.edu, 
ftp.microsoft.com.  Servers where it doesn't: ftp.cs.stanford.edu, 
ftp.fedworld.gov.

Michi Mutsuzaki wrote:
> Hello,
> 
> I'm having a problem with the PORT command. The server 
> ftp.cs.stanford.edu doesn't respond to the command. I've
> tried different servers (ftp.microsoft.com, ftp.stanford.edu,
> etc...), and it works fine. Any idea why this is happening?
> 
> Thank you,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: using snprintf
Date: Mon, 16 Jan 2006 09:45:33 -0800
Lines: 64
Distribution: su
Message-ID: <dqgm44$fcp$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601141138060.23768-100000@elaine24.Stanford.EDU> <dqbo59$hba$1@news.Stanford.EDU> <dqfg50$6l9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqfg50$6l9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9480

No, please don't include header files that were introduced in C99 and 
not available before.

The reasons for disallowing C99 are:

1. To ensure compatibility with the grading scripts and later 
assignments, which have only been tested with C89.
2. To help TA's grade.  I don't know about Ari, but I'm not greatly 
familiar with all the new C99 features...

I find it surprising that stdbool.h works under -ansi, because it relies 
on the new C99 type _Bool, but I guess it does.

Anyway, it should be easy to define your own bool type:

typedef enum { FALSE, TRUE } bool;

or something like that.  Were there any other C99 libraries you were 
planning on using?

-Matt

Nick Puz wrote:
> Hi Matt,
> So just to clarify, is it ok to use other C99 features (such as 
> stdbool.h) that compile with -ansi ?
> -nick
> 
> Matt Falkenhagen wrote:
> 
>> snprintf is a C99 function.  We require your code to compile with the 
>> gcc -ansi flag (old C89).  That's probably what you're doing and why 
>> you're getting that warning: -ansi won't include the declaration of 
>> snprintf.
>>
>> In general, you can't use C99 features, but functions like snprintf 
>> that were widely available before C99 are fine.  Basically, if your 
>> code compiles under -ansi, you should be ok.
>>
>> In this case, to fix the warning, just add a prototype for snprintf:
>>
>> extern int snprintf(char *s, size_t n, const char *fmt, ...);
>>
>> -Matt
>>
>> Roy Mehdi Zeighami wrote:
>>
>>> Hello...
>>>
>>> Is anyone else using snprintf?  gcc compiles with warnings when I use 
>>> it.
>>> It says:
>>>
>>> warning: implicit declaration of function 'snprintf'
>>>
>>> but seems to work fine.  The man page says I need to include stdio.h but
>>> that doesn't seem to shut it up.
>>>
>>> Any suggestions?
>>>
>>> Thanks,
>>>
>>> Roy
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Purify and the test script
Date: Mon, 16 Jan 2006 11:22:41 -0800
Lines: 9
Distribution: su
Message-ID: <dqgrq7$ks4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9481

My program is failing the last test in the script, the one that checks 
if we "actually used purify."  I have no memory leaks and no open file 
descriptors (except the .name_service_door, which we were instructed to 
ignore).  From what I can tell, I am error free.  Is there something I 
need to put in my .purify file (besides to two suggestions on the purify 
FAQ) to suppress whatever data is causing the failure?

Thanks,
Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify and the test script
Date: Mon, 16 Jan 2006 11:25:21 -0800
Lines: 92
Distribution: su
Message-ID: <dqgrv8$ks4$2@news.Stanford.EDU>
References: <dqgrq7$ks4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqgrq7$ks4$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9482

Actually, I don't really know if I'm error free since I've never used 
Purify before.  Here is my output:

saga2:~/class/cs244a/ftp> ./ftpcopy.purify mif 5 ftp.slac.stanford.edu 
test /doc
****  Purify instrumented ftpcopy.purify (pid 15431 at Mon Jan 16 
11:18:55 2006)
   * Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) 
Copyright IBM Corp. 1992, 2005 All rights reserved.
   * For contact information type: "purify -help"
   * For Purify Viewer output, set the DISPLAY environment variable.
   * Options settings: -purify -cache-dir=/tmp/rational.goldmasd \
     -cache-dir=/tmp/goldmasd -best-effort -linker=/usr/pubsw/bin/ld \
     -demangle-program=/usr/pubsw/bin/c++filt \
 
-purify-home=/usr/pubsw/apps/rational-2003.06.13/releases/purify.sol.2003a.06.13.FixPack.0172 
\
     -gcc3_path=/usr/pubsw/package/Languages/gcc-3.4.4/sun4x_58/bin/gcc \
     -cache-dir=/tmp/rational.goldmasd
   * License successfully checked out.
   * Command-line: ./ftpcopy.purify mif 5 ftp.slac.stanford.edu test /doc
OK: 966077 bytes copied

****  Purify instrumented ftpcopy.purify (pid 15431)  ****
Current file descriptors in use: 6
FIU: file descriptor 0: <stdin>
FIU: file descriptor 1: <stdout>
FIU: file descriptor 2: <stderr>
FIU: file descriptor 4: "/etc/.name_service_door", O_RDONLY
    * File info: ?r--r--r--  1 root     root             0 Jul  5  2001
    * This file descriptor was allocated from:
         __open64       [libc.so.1]
         _open64        [libc.so.1]
         _nsc_trydoorcall [libc.so.1]
         _door_gethostbyname_r [gethostby_door.c]
         _get_hostserv_inetnetdir_byname [netdir_inet.c]
         gethostbyname_r [gethostbyname_r.c]
FIU: file descriptor 26: <reserved for Purify internal use>
FIU: file descriptor 27: <reserved for Purify internal use>

****  Purify instrumented ftpcopy.purify (pid 15431)  ****
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          0            0
               In-Use         50         3195
   ----------------------------------------
      Total Allocated         50         3195

****  Purify instrumented ftpcopy.purify (pid 15431)  ****
   * Program exited with status code 0.
   * 0 access errors, 0 total occurrences.
   * 0 bytes leaked.
   * 0 bytes potentially leaked.
   * Basic memory usage (including Purify overhead):
     333868 code
     126032 data/bss
     32768 heap (peak use)
     2168 stack
   * Shared library memory usage (including Purify overhead):
     992 libpure_solaris2_init.so.1 (shared code)
     280 libpure_solaris2_init.so.1 (private data)
     57648 libsocket.so.1_pure_p3_c0_101102117_58_32 (shared code)
     4984 libsocket.so.1_pure_p3_c0_101102117_58_32 (private data)
     984416 libnsl.so.1_pure_p3_c0_101102117_58_32 (shared code)
     64224 libnsl.so.1_pure_p3_c0_101102117_58_32 (private data)
     1107224 libc.so.1_pure_p3_c0_101102117_58_32 (shared code)
     31348 libc.so.1_pure_p3_c0_101102117_58_32 (private data)
     2512 libdl.so.1_pure_p3_c0_101102117_58_32 (shared code)
     76 libdl.so.1_pure_p3_c0_101102117_58_32 (private data)
     15416 libinternal_stubs.so.1 (shared code)
     1044 libinternal_stubs.so.1 (private data)
     16520 libmp.so.2_pure_p3_c0_101102117_58_32 (shared code)
     892 libmp.so.2_pure_p3_c0_101102117_58_32 (private data)
     3476 libc_psr.so.1_pure_p3_c0_101102117_58_32 (shared code)
     76 libc_psr.so.1_pure_p3_c0_101102117_58_32 (private data)


Steve Goldman wrote:
> My program is failing the last test in the script, the one that checks 
> if we "actually used purify."  I have no memory leaks and no open file 
> descriptors (except the .name_service_door, which we were instructed to 
> ignore).  From what I can tell, I am error free.  Is there something I 
> need to put in my .purify file (besides to two suggestions on the purify 
> FAQ) to suppress whatever data is causing the failure?
> 
> Thanks,
> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify and the test script
Date: Mon, 16 Jan 2006 12:13:27 -0800
Lines: 103
Distribution: su
Message-ID: <dqgupe$npe$1@news.Stanford.EDU>
References: <dqgrq7$ks4$1@news.Stanford.EDU> <dqgrv8$ks4$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqgrv8$ks4$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9483

Please see my post under "test_code script issues" on 1/13/2006 2:35 AM.

In addition, all Test O checks is whether you actually ran purify and 
included the output in your submission.  It doesn't matter whether you 
are error-free or not.  We run your code again with purify in Test M and 
N and check for errors there.  So if those passed, you are fine.

-Matt

Steve Goldman wrote:
> Actually, I don't really know if I'm error free since I've never used 
> Purify before.  Here is my output:
> 
> saga2:~/class/cs244a/ftp> ./ftpcopy.purify mif 5 ftp.slac.stanford.edu 
> test /doc
> ****  Purify instrumented ftpcopy.purify (pid 15431 at Mon Jan 16 
> 11:18:55 2006)
>   * Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) 
> Copyright IBM Corp. 1992, 2005 All rights reserved.
>   * For contact information type: "purify -help"
>   * For Purify Viewer output, set the DISPLAY environment variable.
>   * Options settings: -purify -cache-dir=/tmp/rational.goldmasd \
>     -cache-dir=/tmp/goldmasd -best-effort -linker=/usr/pubsw/bin/ld \
>     -demangle-program=/usr/pubsw/bin/c++filt \
> 
> -purify-home=/usr/pubsw/apps/rational-2003.06.13/releases/purify.sol.2003a.06.13.FixPack.0172 
> \
>     -gcc3_path=/usr/pubsw/package/Languages/gcc-3.4.4/sun4x_58/bin/gcc \
>     -cache-dir=/tmp/rational.goldmasd
>   * License successfully checked out.
>   * Command-line: ./ftpcopy.purify mif 5 ftp.slac.stanford.edu test /doc
> OK: 966077 bytes copied
> 
> ****  Purify instrumented ftpcopy.purify (pid 15431)  ****
> Current file descriptors in use: 6
> FIU: file descriptor 0: <stdin>
> FIU: file descriptor 1: <stdout>
> FIU: file descriptor 2: <stderr>
> FIU: file descriptor 4: "/etc/.name_service_door", O_RDONLY
>    * File info: ?r--r--r--  1 root     root             0 Jul  5  2001
>    * This file descriptor was allocated from:
>         __open64       [libc.so.1]
>         _open64        [libc.so.1]
>         _nsc_trydoorcall [libc.so.1]
>         _door_gethostbyname_r [gethostby_door.c]
>         _get_hostserv_inetnetdir_byname [netdir_inet.c]
>         gethostbyname_r [gethostbyname_r.c]
> FIU: file descriptor 26: <reserved for Purify internal use>
> FIU: file descriptor 27: <reserved for Purify internal use>
> 
> ****  Purify instrumented ftpcopy.purify (pid 15431)  ****
> 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          0            0
>               In-Use         50         3195
>   ----------------------------------------
>      Total Allocated         50         3195
> 
> ****  Purify instrumented ftpcopy.purify (pid 15431)  ****
>   * Program exited with status code 0.
>   * 0 access errors, 0 total occurrences.
>   * 0 bytes leaked.
>   * 0 bytes potentially leaked.
>   * Basic memory usage (including Purify overhead):
>     333868 code
>     126032 data/bss
>     32768 heap (peak use)
>     2168 stack
>   * Shared library memory usage (including Purify overhead):
>     992 libpure_solaris2_init.so.1 (shared code)
>     280 libpure_solaris2_init.so.1 (private data)
>     57648 libsocket.so.1_pure_p3_c0_101102117_58_32 (shared code)
>     4984 libsocket.so.1_pure_p3_c0_101102117_58_32 (private data)
>     984416 libnsl.so.1_pure_p3_c0_101102117_58_32 (shared code)
>     64224 libnsl.so.1_pure_p3_c0_101102117_58_32 (private data)
>     1107224 libc.so.1_pure_p3_c0_101102117_58_32 (shared code)
>     31348 libc.so.1_pure_p3_c0_101102117_58_32 (private data)
>     2512 libdl.so.1_pure_p3_c0_101102117_58_32 (shared code)
>     76 libdl.so.1_pure_p3_c0_101102117_58_32 (private data)
>     15416 libinternal_stubs.so.1 (shared code)
>     1044 libinternal_stubs.so.1 (private data)
>     16520 libmp.so.2_pure_p3_c0_101102117_58_32 (shared code)
>     892 libmp.so.2_pure_p3_c0_101102117_58_32 (private data)
>     3476 libc_psr.so.1_pure_p3_c0_101102117_58_32 (shared code)
>     76 libc_psr.so.1_pure_p3_c0_101102117_58_32 (private data)
> 
> 
> Steve Goldman wrote:
> 
>> My program is failing the last test in the script, the one that checks 
>> if we "actually used purify."  I have no memory leaks and no open file 
>> descriptors (except the .name_service_door, which we were instructed 
>> to ignore).  From what I can tell, I am error free.  Is there 
>> something I need to put in my .purify file (besides to two suggestions 
>> on the purify FAQ) to suppress whatever data is causing the failure?
>>
>> Thanks,
>> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify and the test script
Date: Mon, 16 Jan 2006 12:18:42 -0800
Lines: 26
Distribution: su
Message-ID: <dqgv32$o64$1@news.Stanford.EDU>
References: <dqgrq7$ks4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqgrq7$ks4$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9484

The grading script output says:

purify.output did not match expected regexp:

   \* Purify 200\S+ Solaris 2 \(32-bit\) Copyright \(C\) 1992-200\d 
Rational Software Corp\.\s+All rights reserved\.

The corresponding line in my purify.output is:

   * Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) 
Copyright IBM Corp. 1992, 2005 All rights reserved.

If this is the only part of the file that doesn't match, then maybe it's 
a problem with the script?  Maybe the Purify people changed the 
copyright line in their output?

Steve Goldman wrote:
> My program is failing the last test in the script, the one that checks 
> if we "actually used purify."  I have no memory leaks and no open file 
> descriptors (except the .name_service_door, which we were instructed to 
> ignore).  From what I can tell, I am error free.  Is there something I 
> need to put in my .purify file (besides to two suggestions on the purify 
> FAQ) to suppress whatever data is causing the failure?
> 
> Thanks,
> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 21:12:41 +0000 (UTC)
Lines: 52
Distribution: su
Message-ID: <dqh289$okn$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqgl6s$esb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.12.6smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9485

hey steve / michi -- 

i had this same problem with ftp.cs.stanford.edu, but it worked with
other servers. 

you might want to find out if you are hanging in the 
read() for the response to the PORT command or in the
accept() for the data socket. 

in the case of a the server never replying, check out question 2.11: 
http://www.unixguide.net/network/socketfaq/2.16.shtml

in my experience, the server will complain (give a 500 response) if you 
give it an IP that doesn't match where your control connection is from. 

(which does seem to disagree with the RFC, but it still seems
reasonable to not want to send data directly to a random host.)

thanks,
ryan. 


Steve Goldman <steve.goldman@stanford.edu> wrote:
> I'm getting this same behavior.  Clearly the server is not connecting to 
> the data socket we open for it, which makes me think that we are sending 
> incorrect IP and/or port info.  At first I thought it had to do with 
> byte ordering, since it works on some servers but not others.  Now I am 
> thinking it has to do with how we determine our own IP address.  In a 
> previous post, someone said that getsockname populates the port info in 
> the sockaddr_in struct, but not the IP address info.  That was what 
> happened with me.  So I used gethostbyname on getenv("HOST") to get the 
> IP.  I am starting to think that this may not *always* be the correct IP 
> to send to the server.  So, to Wayne Lue: I wonder why getsockname gives 
> some of us IP info and others only port info.  To everyone: any ideas?

> Thanks,
> Steve

> PS -- Servers that my program works on: ftp.stanford.edu, 
> ftp.microsoft.com.  Servers where it doesn't: ftp.cs.stanford.edu, 
> ftp.fedworld.gov.

> Michi Mutsuzaki wrote:
>> Hello,
>> 
>> I'm having a problem with the PORT command. The server 
>> ftp.cs.stanford.edu doesn't respond to the command. I've
>> tried different servers (ftp.microsoft.com, ftp.stanford.edu,
>> etc...), and it works fine. Any idea why this is happening?
>> 
>> Thank you,
>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 13:43:34 -0800
Lines: 23
Distribution: su
Message-ID: <dqh41d$shc$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqgl6s$esb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqgl6s$esb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9486

I think you can get the local IP address by calling getsockname on the 
*control* socket, not the *data* socket -- i.e., yeah, you have to call 
getsockname on the data socket to find out the port the OS assigned it, 
but this won't tell you the local IP.  But if you call getsockname on 
the control socket, it will.

Drew

Steve Goldman wrote:
> I'm getting this same behavior.  Clearly the server is not connecting to 
> the data socket we open for it, which makes me think that we are sending 
> incorrect IP and/or port info.  At first I thought it had to do with 
> byte ordering, since it works on some servers but not others.  Now I am 
> thinking it has to do with how we determine our own IP address.  In a 
> previous post, someone said that getsockname populates the port info in 
> the sockaddr_in struct, but not the IP address info.  That was what 
> happened with me.  So I used gethostbyname on getenv("HOST") to get the 
> IP.  I am starting to think that this may not *always* be the correct IP 
> to send to the server.  So, to Wayne Lue: I wonder why getsockname gives 
> some of us IP info and others only port info.  To everyone: any ideas?
> 
> Thanks,
> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 13:46:43 -0800
Lines: 64
Distribution: su
Message-ID: <dqh484$srp$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqgl6s$esb$1@news.Stanford.EDU> <dqh289$okn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
X-Accept-Language: en-us, en
In-Reply-To: <dqh289$okn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9487

Ryan,

I set the TCP_NODELAY option, and now it works! Thanks a lot for the info.

--Michi

Ryan Matthew Smith wrote:
> hey steve / michi -- 
> 
> i had this same problem with ftp.cs.stanford.edu, but it worked with
> other servers. 
> 
> you might want to find out if you are hanging in the 
> read() for the response to the PORT command or in the
> accept() for the data socket. 
> 
> in the case of a the server never replying, check out question 2.11: 
> http://www.unixguide.net/network/socketfaq/2.16.shtml
> 
> in my experience, the server will complain (give a 500 response) if you 
> give it an IP that doesn't match where your control connection is from. 
> 
> (which does seem to disagree with the RFC, but it still seems
> reasonable to not want to send data directly to a random host.)
> 
> thanks,
> ryan. 
> 
> 
> Steve Goldman <steve.goldman@stanford.edu> wrote:
> 
>>I'm getting this same behavior.  Clearly the server is not connecting to 
>>the data socket we open for it, which makes me think that we are sending 
>>incorrect IP and/or port info.  At first I thought it had to do with 
>>byte ordering, since it works on some servers but not others.  Now I am 
>>thinking it has to do with how we determine our own IP address.  In a 
>>previous post, someone said that getsockname populates the port info in 
>>the sockaddr_in struct, but not the IP address info.  That was what 
>>happened with me.  So I used gethostbyname on getenv("HOST") to get the 
>>IP.  I am starting to think that this may not *always* be the correct IP 
>>to send to the server.  So, to Wayne Lue: I wonder why getsockname gives 
>>some of us IP info and others only port info.  To everyone: any ideas?
> 
> 
>>Thanks,
>>Steve
> 
> 
>>PS -- Servers that my program works on: ftp.stanford.edu, 
>>ftp.microsoft.com.  Servers where it doesn't: ftp.cs.stanford.edu, 
>>ftp.fedworld.gov.
> 
> 
>>Michi Mutsuzaki wrote:
>>
>>>Hello,
>>>
>>>I'm having a problem with the PORT command. The server 
>>>ftp.cs.stanford.edu doesn't respond to the command. I've
>>>tried different servers (ftp.microsoft.com, ftp.stanford.edu,
>>>etc...), and it works fine. Any idea why this is happening?
>>>
>>>Thank you,
>>>--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: problem set submission
Date: Mon, 16 Jan 2006 14:18:05 -0800
Lines: 5
Distribution: su
Message-ID: <43CC1B9D.2080209@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9488

Should these be hand-written?

Thanks,
Sesha

.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 22:20:44 +0000 (UTC)
Lines: 73
Distribution: su
Message-ID: <dqh67s$tp$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqgl6s$esb$1@news.Stanford.EDU> <dqh289$okn$1@news.Stanford.EDU> <dqh484$srp$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.12.6smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9489

also, for what it's worth, i think you can get around setting that 
option by carefully formatting the data that you send to the server -- 
ie. avoiding multiple socket writes which will only get one response. 

thanks, 
ryan. 


Michi Mutsuzaki <michi2@stanford.edu> wrote:
> Ryan,

> I set the TCP_NODELAY option, and now it works! Thanks a lot for the info.

> --Michi

> Ryan Matthew Smith wrote:
>> hey steve / michi -- 
>> 
>> i had this same problem with ftp.cs.stanford.edu, but it worked with
>> other servers. 
>> 
>> you might want to find out if you are hanging in the 
>> read() for the response to the PORT command or in the
>> accept() for the data socket. 
>> 
>> in the case of a the server never replying, check out question 2.11: 
>> http://www.unixguide.net/network/socketfaq/2.16.shtml
>> 
>> in my experience, the server will complain (give a 500 response) if you 
>> give it an IP that doesn't match where your control connection is from. 
>> 
>> (which does seem to disagree with the RFC, but it still seems
>> reasonable to not want to send data directly to a random host.)
>> 
>> thanks,
>> ryan. 
>> 
>> 
>> Steve Goldman <steve.goldman@stanford.edu> wrote:
>> 
>>>I'm getting this same behavior.  Clearly the server is not connecting to 
>>>the data socket we open for it, which makes me think that we are sending 
>>>incorrect IP and/or port info.  At first I thought it had to do with 
>>>byte ordering, since it works on some servers but not others.  Now I am 
>>>thinking it has to do with how we determine our own IP address.  In a 
>>>previous post, someone said that getsockname populates the port info in 
>>>the sockaddr_in struct, but not the IP address info.  That was what 
>>>happened with me.  So I used gethostbyname on getenv("HOST") to get the 
>>>IP.  I am starting to think that this may not *always* be the correct IP 
>>>to send to the server.  So, to Wayne Lue: I wonder why getsockname gives 
>>>some of us IP info and others only port info.  To everyone: any ideas?
>> 
>> 
>>>Thanks,
>>>Steve
>> 
>> 
>>>PS -- Servers that my program works on: ftp.stanford.edu, 
>>>ftp.microsoft.com.  Servers where it doesn't: ftp.cs.stanford.edu, 
>>>ftp.fedworld.gov.
>> 
>> 
>>>Michi Mutsuzaki wrote:
>>>
>>>>Hello,
>>>>
>>>>I'm having a problem with the PORT command. The server 
>>>>ftp.cs.stanford.edu doesn't respond to the command. I've
>>>>tried different servers (ftp.microsoft.com, ftp.stanford.edu,
>>>>etc...), and it works fine. Any idea why this is happening?
>>>>
>>>>Thank you,
>>>>--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 14:38:14 -0800
Lines: 65
Distribution: su
Message-ID: <dqh78n$25v$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqgl6s$esb$1@news.Stanford.EDU> <dqh289$okn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqh289$okn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9490

Ryan,

You are a wonderful human being.

Thanks,
Steve

Ryan Matthew Smith wrote:
> hey steve / michi -- 
> 
> i had this same problem with ftp.cs.stanford.edu, but it worked with
> other servers. 
> 
> you might want to find out if you are hanging in the 
> read() for the response to the PORT command or in the
> accept() for the data socket. 
> 
> in the case of a the server never replying, check out question 2.11: 
> http://www.unixguide.net/network/socketfaq/2.16.shtml
> 
> in my experience, the server will complain (give a 500 response) if you 
> give it an IP that doesn't match where your control connection is from. 
> 
> (which does seem to disagree with the RFC, but it still seems
> reasonable to not want to send data directly to a random host.)
> 
> thanks,
> ryan. 
> 
> 
> Steve Goldman <steve.goldman@stanford.edu> wrote:
> 
>>I'm getting this same behavior.  Clearly the server is not connecting to 
>>the data socket we open for it, which makes me think that we are sending 
>>incorrect IP and/or port info.  At first I thought it had to do with 
>>byte ordering, since it works on some servers but not others.  Now I am 
>>thinking it has to do with how we determine our own IP address.  In a 
>>previous post, someone said that getsockname populates the port info in 
>>the sockaddr_in struct, but not the IP address info.  That was what 
>>happened with me.  So I used gethostbyname on getenv("HOST") to get the 
>>IP.  I am starting to think that this may not *always* be the correct IP 
>>to send to the server.  So, to Wayne Lue: I wonder why getsockname gives 
>>some of us IP info and others only port info.  To everyone: any ideas?
> 
> 
>>Thanks,
>>Steve
> 
> 
>>PS -- Servers that my program works on: ftp.stanford.edu, 
>>ftp.microsoft.com.  Servers where it doesn't: ftp.cs.stanford.edu, 
>>ftp.fedworld.gov.
> 
> 
>>Michi Mutsuzaki wrote:
>>
>>>Hello,
>>>
>>>I'm having a problem with the PORT command. The server 
>>>ftp.cs.stanford.edu doesn't respond to the command. I've
>>>tried different servers (ftp.microsoft.com, ftp.stanford.edu,
>>>etc...), and it works fine. Any idea why this is happening?
>>>
>>>Thank you,
>>>--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 15:15:52 -0800
Lines: 62
Distribution: su
Message-ID: <dqh9f8$48a$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqgl6s$esb$1@news.Stanford.EDU> <dqh289$okn$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9491

The RFC allows for giving other IPs in the PORT command, but servers usually
have the option to disable it.  I usually leave it enabled so you can FXP,
but disabling prevents bounce attacks.

Waynn

"Ryan Matthew Smith" <rysmi@Stanford.EDU> wrote in message
news:dqh289$okn$1@news.Stanford.EDU...
> hey steve / michi -- 
>
> i had this same problem with ftp.cs.stanford.edu, but it worked with
> other servers.
>
> you might want to find out if you are hanging in the
> read() for the response to the PORT command or in the
> accept() for the data socket.
>
> in the case of a the server never replying, check out question 2.11:
> http://www.unixguide.net/network/socketfaq/2.16.shtml
>
> in my experience, the server will complain (give a 500 response) if you
> give it an IP that doesn't match where your control connection is from.
>
> (which does seem to disagree with the RFC, but it still seems
> reasonable to not want to send data directly to a random host.)
>
> thanks,
> ryan.
>
>
> Steve Goldman <steve.goldman@stanford.edu> wrote:
> > I'm getting this same behavior.  Clearly the server is not connecting to
> > the data socket we open for it, which makes me think that we are sending
> > incorrect IP and/or port info.  At first I thought it had to do with
> > byte ordering, since it works on some servers but not others.  Now I am
> > thinking it has to do with how we determine our own IP address.  In a
> > previous post, someone said that getsockname populates the port info in
> > the sockaddr_in struct, but not the IP address info.  That was what
> > happened with me.  So I used gethostbyname on getenv("HOST") to get the
> > IP.  I am starting to think that this may not *always* be the correct IP
> > to send to the server.  So, to Wayne Lue: I wonder why getsockname gives
> > some of us IP info and others only port info.  To everyone: any ideas?
>
> > Thanks,
> > Steve
>
> > PS -- Servers that my program works on: ftp.stanford.edu,
> > ftp.microsoft.com.  Servers where it doesn't: ftp.cs.stanford.edu,
> > ftp.fedworld.gov.
>
> > Michi Mutsuzaki wrote:
> >> Hello,
> >>
> >> I'm having a problem with the PORT command. The server
> >> ftp.cs.stanford.edu doesn't respond to the command. I've
> >> tried different servers (ftp.microsoft.com, ftp.stanford.edu,
> >> etc...), and it works fine. Any idea why this is happening?
> >>
> >> Thank you,
> >> --Michi


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 15:16:31 -0800
Lines: 32
Distribution: su
Message-ID: <dqh9gd$4a6$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqgl6s$esb$1@news.Stanford.EDU> <dqh41d$shc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9492

Yeah, this is what I'm doing.  I'm calling getsockname on the control
socket.

Waynn

"Drew Willcoxon" <drew.willcoxon@cs.stanford.edu> wrote in message
news:dqh41d$shc$1@news.Stanford.EDU...
> I think you can get the local IP address by calling getsockname on the
> *control* socket, not the *data* socket -- i.e., yeah, you have to call
> getsockname on the data socket to find out the port the OS assigned it,
> but this won't tell you the local IP.  But if you call getsockname on
> the control socket, it will.
>
> Drew
>
> Steve Goldman wrote:
> > I'm getting this same behavior.  Clearly the server is not connecting to
> > the data socket we open for it, which makes me think that we are sending
> > incorrect IP and/or port info.  At first I thought it had to do with
> > byte ordering, since it works on some servers but not others.  Now I am
> > thinking it has to do with how we determine our own IP address.  In a
> > previous post, someone said that getsockname populates the port info in
> > the sockaddr_in struct, but not the IP address info.  That was what
> > happened with me.  So I used gethostbyname on getenv("HOST") to get the
> > IP.  I am starting to think that this may not *always* be the correct IP
> > to send to the server.  So, to Wayne Lue: I wonder why getsockname gives
> > some of us IP info and others only port info.  To everyone: any ideas?
> >
> > Thanks,
> > Steve


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 15:25:37 -0800
Lines: 35
Distribution: su
Message-ID: <dqha1h$555$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9493

So now LIST command takes really long time (>5 min) to complete on 
ftp.cs. I also noticed the output of the command is a little bit 
different from that of UNIX ftp program. Here are the outputs:

UNIX ftp program:
drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> pub/alpha
drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
cs/theory/pub/ullman/emlp
drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
cs/theory/pub/ullman/fcsc
....

My ftpcopy program:
drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> pub/alpha
drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
cs/theory/pub/ullman/emlp
drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
cs/theory/pub/ullman/fcsc
....

In my program, the owner of symlinks are "(?)" instead of "miles". Does 
it have anything to do with my program being extremely slow?

Thanks,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 15:36:41 -0800
Lines: 43
Distribution: su
Message-ID: <dqhama$5o0$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqha1h$555$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9494

Try Ryan's second suggestion, the one about writing data in atomic 
chunks so that you expect a reply after every call to write.  I tried 
the NO_DELAY business and got mixed results, but this other way works 
very well.  Hopefully that will help with your delay problems.

Steve

Michi Mutsuzaki wrote:
> So now LIST command takes really long time (>5 min) to complete on 
> ftp.cs. I also noticed the output of the command is a little bit 
> different from that of UNIX ftp program. Here are the outputs:
> 
> UNIX ftp program:
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
> lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> pub/alpha
> drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
> drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
> lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
> cs/theory/pub/ullman/emlp
> drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
> cs/theory/pub/ullman/fcsc
> ...
> 
> My ftpcopy program:
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
> lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> pub/alpha
> drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
> drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
> lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
> cs/theory/pub/ullman/emlp
> drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
> cs/theory/pub/ullman/fcsc
> ...
> 
> In my program, the owner of symlinks are "(?)" instead of "miles". Does 
> it have anything to do with my program being extremely slow?
> 
> Thanks,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: FTP: ftp protocol error handling
Date: Mon, 16 Jan 2006 23:41:34 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: <dqhave$5ld$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9495

What are we going to do if the user specified a remote directory from the command line that does not exist?  Also, what about when the ftp server does not allow anonymous login?  Do we have to parse all the FTP reply codes, or just selectively or not at all, to check for errors?  Would there any file permission issues such as a file or directory can be listed but not accessible?  I am sorry I am just a little paranoid...

Thanks,
Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 16:18:35 -0800
Lines: 43
Distribution: su
Message-ID: <dqhd47$8gt$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqha1h$555$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9496

I'm getting the same results.  I send one LIST command over, and I read 
one 150 reply.  ftp.cs sends the ls contents over the data connection 
right away, but on the control connection it just sits on the 150 until 
about 5 minutes later, when it sends a 226.  I'm at a loss.

Drew

Michi Mutsuzaki wrote:
> So now LIST command takes really long time (>5 min) to complete on 
> ftp.cs. I also noticed the output of the command is a little bit 
> different from that of UNIX ftp program. Here are the outputs:
> 
> UNIX ftp program:
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
> lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> pub/alpha
> drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
> drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
> lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
> cs/theory/pub/ullman/emlp
> drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
> cs/theory/pub/ullman/fcsc
> ...
> 
> My ftpcopy program:
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
> lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> pub/alpha
> drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
> drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
> lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
> cs/theory/pub/ullman/emlp
> drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
> cs/theory/pub/ullman/fcsc
> ...
> 
> In my program, the owner of symlinks are "(?)" instead of "miles". Does 
> it have anything to do with my program being extremely slow?
> 
> Thanks,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 16:27:37 -0800
Lines: 55
Distribution: su
Message-ID: <dqhdlq$8vb$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU> <dqhama$5o0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
X-Accept-Language: en-us, en
In-Reply-To: <dqhama$5o0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9497

Hi Steve,

I'm sending data in one write call (i.e. write(s, "LIST /\r\n", len)), 
but the LIST command is still very slow.

ftp.cs is the only server that's giving me the slow response. I wonder 
why...

--Michi

Steve Goldman wrote:
> Try Ryan's second suggestion, the one about writing data in atomic 
> chunks so that you expect a reply after every call to write.  I tried 
> the NO_DELAY business and got mixed results, but this other way works 
> very well.  Hopefully that will help with your delay problems.
> 
> Steve
> 
> Michi Mutsuzaki wrote:
> 
>> So now LIST command takes really long time (>5 min) to complete on 
>> ftp.cs. I also noticed the output of the command is a little bit 
>> different from that of UNIX ftp program. Here are the outputs:
>>
>> UNIX ftp program:
>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>> lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> pub/alpha
>> drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
>> drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
>> lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
>> cs/theory/pub/ullman/emlp
>> drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>> cs/theory/pub/ullman/fcsc
>> ...
>>
>> My ftpcopy program:
>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>> lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> pub/alpha
>> drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
>> drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
>> lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
>> cs/theory/pub/ullman/emlp
>> drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>> cs/theory/pub/ullman/fcsc
>> ...
>>
>> In my program, the owner of symlinks are "(?)" instead of "miles". 
>> Does it have anything to do with my program being extremely slow?
>>
>> Thanks,
>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 16:40:59 -0800
Lines: 64
Distribution: su
Message-ID: <dqhees$9hc$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU> <dqhama$5o0$1@news.Stanford.EDU> <dqhdlq$8vb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqhdlq$8vb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9498

Are you writing in one call for every command and not just LIST?  The 
idea I got from Ryan was that every call to write should anticipate a reply.

Steve

Michi Mutsuzaki wrote:
> Hi Steve,
> 
> I'm sending data in one write call (i.e. write(s, "LIST /\r\n", len)), 
> but the LIST command is still very slow.
> 
> ftp.cs is the only server that's giving me the slow response. I wonder 
> why...
> 
> --Michi
> 
> Steve Goldman wrote:
> 
>> Try Ryan's second suggestion, the one about writing data in atomic 
>> chunks so that you expect a reply after every call to write.  I tried 
>> the NO_DELAY business and got mixed results, but this other way works 
>> very well.  Hopefully that will help with your delay problems.
>>
>> Steve
>>
>> Michi Mutsuzaki wrote:
>>
>>> So now LIST command takes really long time (>5 min) to complete on 
>>> ftp.cs. I also noticed the output of the command is a little bit 
>>> different from that of UNIX ftp program. Here are the outputs:
>>>
>>> UNIX ftp program:
>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>> lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> 
>>> pub/alpha
>>> drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
>>> drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
>>> lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
>>> cs/theory/pub/ullman/emlp
>>> drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>> cs/theory/pub/ullman/fcsc
>>> ...
>>>
>>> My ftpcopy program:
>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>> lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> 
>>> pub/alpha
>>> drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
>>> drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
>>> lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
>>> cs/theory/pub/ullman/emlp
>>> drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>> cs/theory/pub/ullman/fcsc
>>> ...
>>>
>>> In my program, the owner of symlinks are "(?)" instead of "miles". 
>>> Does it have anything to do with my program being extremely slow?
>>>
>>> Thanks,
>>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 16:50:49 -0800
Lines: 73
Distribution: su
Message-ID: <dqhf19$ajf$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU> <dqhama$5o0$1@news.Stanford.EDU> <dqhdlq$8vb$1@news.Stanford.EDU> <dqhees$9hc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
X-Accept-Language: en-us, en
In-Reply-To: <dqhees$9hc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9499

Steve,

Yes, I'm writing in one write call for all the commands.

--Michi

Steve Goldman wrote:
> Are you writing in one call for every command and not just LIST?  The 
> idea I got from Ryan was that every call to write should anticipate a 
> reply.
> 
> Steve
> 
> Michi Mutsuzaki wrote:
> 
>> Hi Steve,
>>
>> I'm sending data in one write call (i.e. write(s, "LIST /\r\n", len)), 
>> but the LIST command is still very slow.
>>
>> ftp.cs is the only server that's giving me the slow response. I wonder 
>> why...
>>
>> --Michi
>>
>> Steve Goldman wrote:
>>
>>> Try Ryan's second suggestion, the one about writing data in atomic 
>>> chunks so that you expect a reply after every call to write.  I tried 
>>> the NO_DELAY business and got mixed results, but this other way works 
>>> very well.  Hopefully that will help with your delay problems.
>>>
>>> Steve
>>>
>>> Michi Mutsuzaki wrote:
>>>
>>>> So now LIST command takes really long time (>5 min) to complete on 
>>>> ftp.cs. I also noticed the output of the command is a little bit 
>>>> different from that of UNIX ftp program. Here are the outputs:
>>>>
>>>> UNIX ftp program:
>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>>> lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> 
>>>> pub/alpha
>>>> drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
>>>> drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
>>>> lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
>>>> cs/theory/pub/ullman/emlp
>>>> drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
>>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>>> cs/theory/pub/ullman/fcsc
>>>> ...
>>>>
>>>> My ftpcopy program:
>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>>> lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> 
>>>> pub/alpha
>>>> drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
>>>> drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
>>>> lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
>>>> cs/theory/pub/ullman/emlp
>>>> drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
>>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>>> cs/theory/pub/ullman/fcsc
>>>> ...
>>>>
>>>> In my program, the owner of symlinks are "(?)" instead of "miles". 
>>>> Does it have anything to do with my program being extremely slow?
>>>>
>>>> Thanks,
>>>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 16:54:13 -0800
Lines: 87
Distribution: su
Message-ID: <dqhf7m$ao3$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU> <dqhama$5o0$1@news.Stanford.EDU> <dqhdlq$8vb$1@news.Stanford.EDU> <dqhees$9hc$1@news.Stanford.EDU> <dqhf19$ajf$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqhf19$ajf$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9500

There's one thing that I ran into the other day that is tricky depending 
on the server...

Make sure that you shut down and close the data socket immediately after 
getting all the LIST information and before you read from the control 
socket for the reply.  Initially I had them reversed and some sites 
froze up (and might have come back in 5 minutes but I never waited that 
long).

Steve

Michi Mutsuzaki wrote:
> Steve,
> 
> Yes, I'm writing in one write call for all the commands.
> 
> --Michi
> 
> Steve Goldman wrote:
> 
>> Are you writing in one call for every command and not just LIST?  The 
>> idea I got from Ryan was that every call to write should anticipate a 
>> reply.
>>
>> Steve
>>
>> Michi Mutsuzaki wrote:
>>
>>> Hi Steve,
>>>
>>> I'm sending data in one write call (i.e. write(s, "LIST /\r\n", 
>>> len)), but the LIST command is still very slow.
>>>
>>> ftp.cs is the only server that's giving me the slow response. I 
>>> wonder why...
>>>
>>> --Michi
>>>
>>> Steve Goldman wrote:
>>>
>>>> Try Ryan's second suggestion, the one about writing data in atomic 
>>>> chunks so that you expect a reply after every call to write.  I 
>>>> tried the NO_DELAY business and got mixed results, but this other 
>>>> way works very well.  Hopefully that will help with your delay 
>>>> problems.
>>>>
>>>> Steve
>>>>
>>>> Michi Mutsuzaki wrote:
>>>>
>>>>> So now LIST command takes really long time (>5 min) to complete on 
>>>>> ftp.cs. I also noticed the output of the command is a little bit 
>>>>> different from that of UNIX ftp program. Here are the outputs:
>>>>>
>>>>> UNIX ftp program:
>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>>>> lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> 
>>>>> pub/alpha
>>>>> drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
>>>>> drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
>>>>> lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
>>>>> cs/theory/pub/ullman/emlp
>>>>> drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
>>>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>>>> cs/theory/pub/ullman/fcsc
>>>>> ...
>>>>>
>>>>> My ftpcopy program:
>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>>>> lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> 
>>>>> pub/alpha
>>>>> drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
>>>>> drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
>>>>> lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
>>>>> cs/theory/pub/ullman/emlp
>>>>> drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
>>>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>>>> cs/theory/pub/ullman/fcsc
>>>>> ...
>>>>>
>>>>> In my program, the owner of symlinks are "(?)" instead of "miles". 
>>>>> Does it have anything to do with my program being extremely slow?
>>>>>
>>>>> Thanks,
>>>>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 17:01:15 -0800
Lines: 95
Distribution: su
Message-ID: <dqhfks$b63$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU> <dqhama$5o0$1@news.Stanford.EDU> <dqhdlq$8vb$1@news.Stanford.EDU> <dqhees$9hc$1@news.Stanford.EDU> <dqhf19$ajf$1@news.Stanford.EDU> <dqhf7m$ao3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
X-Accept-Language: en-us, en
In-Reply-To: <dqhf7m$ao3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9501

Yes! That was the problem. I wasn't closing the data connection before 
I check the control connection for reply.

Steve, thank you so much.
--Michi

Steve Goldman wrote:
> There's one thing that I ran into the other day that is tricky depending 
> on the server...
> 
> Make sure that you shut down and close the data socket immediately after 
> getting all the LIST information and before you read from the control 
> socket for the reply.  Initially I had them reversed and some sites 
> froze up (and might have come back in 5 minutes but I never waited that 
> long).
> 
> Steve
> 
> Michi Mutsuzaki wrote:
> 
>> Steve,
>>
>> Yes, I'm writing in one write call for all the commands.
>>
>> --Michi
>>
>> Steve Goldman wrote:
>>
>>> Are you writing in one call for every command and not just LIST?  The 
>>> idea I got from Ryan was that every call to write should anticipate a 
>>> reply.
>>>
>>> Steve
>>>
>>> Michi Mutsuzaki wrote:
>>>
>>>> Hi Steve,
>>>>
>>>> I'm sending data in one write call (i.e. write(s, "LIST /\r\n", 
>>>> len)), but the LIST command is still very slow.
>>>>
>>>> ftp.cs is the only server that's giving me the slow response. I 
>>>> wonder why...
>>>>
>>>> --Michi
>>>>
>>>> Steve Goldman wrote:
>>>>
>>>>> Try Ryan's second suggestion, the one about writing data in atomic 
>>>>> chunks so that you expect a reply after every call to write.  I 
>>>>> tried the NO_DELAY business and got mixed results, but this other 
>>>>> way works very well.  Hopefully that will help with your delay 
>>>>> problems.
>>>>>
>>>>> Steve
>>>>>
>>>>> Michi Mutsuzaki wrote:
>>>>>
>>>>>> So now LIST command takes really long time (>5 min) to complete on 
>>>>>> ftp.cs. I also noticed the output of the command is a little bit 
>>>>>> different from that of UNIX ftp program. Here are the outputs:
>>>>>>
>>>>>> UNIX ftp program:
>>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>>>>> lrwxr-xr-x   1 miles    root            9 Aug 20  2004 alpha -> 
>>>>>> pub/alpha
>>>>>> drwxr-xr-x   2 miles    users        2048 Oct 13 21:51 bin
>>>>>> drwxr-xr-x   2 miles    users        2048 Aug 22  2004 cs
>>>>>> lrwxr-xr-x   1 miles    root           25 Aug 20  2004 emlp -> 
>>>>>> cs/theory/pub/ullman/emlp
>>>>>> drwxr-xr-x   2 miles    users        2048 Jun  7  2005 etc
>>>>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>>>>> cs/theory/pub/ullman/fcsc
>>>>>> ...
>>>>>>
>>>>>> My ftpcopy program:
>>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 .
>>>>>> drwxrwxrwx   7 ftp      root         2048 Oct  7 13:55 ..
>>>>>> lrwxr-xr-x   1 (?)      root            9 Aug 20  2004 alpha -> 
>>>>>> pub/alpha
>>>>>> drwxr-xr-x   2 (?)      users        2048 Oct 13 21:51 bin
>>>>>> drwxr-xr-x   2 (?)      users        2048 Aug 22  2004 cs
>>>>>> lrwxr-xr-x   1 (?)      root           25 Aug 20  2004 emlp -> 
>>>>>> cs/theory/pub/ullman/emlp
>>>>>> drwxr-xr-x   2 (?)      users        2048 Jun  7  2005 etc
>>>>>> lrwxr-xr-x   1 ftp      users          25 Aug 20  2004 fcsc -> 
>>>>>> cs/theory/pub/ullman/fcsc
>>>>>> ...
>>>>>>
>>>>>> In my program, the owner of symlinks are "(?)" instead of "miles". 
>>>>>> Does it have anything to do with my program being extremely slow?
>>>>>>
>>>>>> Thanks,
>>>>>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: LIST command on ftp.cs.stanford.edu
Date: Mon, 16 Jan 2006 17:14:56 -0800
Lines: 15
Distribution: su
Message-ID: <dqhgdm$bp5$1@news.Stanford.EDU>
References: <dqha1h$555$1@news.Stanford.EDU> <dqhama$5o0$1@news.Stanford.EDU> <dqhdlq$8vb$1@news.Stanford.EDU> <dqhees$9hc$1@news.Stanford.EDU> <dqhf19$ajf$1@news.Stanford.EDU> <dqhf7m$ao3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqhf7m$ao3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9502

Thanks, Steve, this fixed my problem too. :)

Drew

Steve Goldman wrote:
> There's one thing that I ran into the other day that is tricky depending 
> on the server...
> 
> Make sure that you shut down and close the data socket immediately after 
> getting all the LIST information and before you read from the control 
> socket for the reply.  Initially I had them reversed and some sites 
> froze up (and might have come back in 5 minutes but I never waited that 
> long).
> 
> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: problem set 1, question 3
Date: Tue, 17 Jan 2006 01:52:30 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: <dqhiku$d9q$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.12.6smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9503

problem set 1, question 3 says: 
"a packet is buffered, on average, 10ms by the router" 

does this mean that the time from when the first bit of the packet
reaches the buffer to the time that the last bit of the packet 
leaves the buffer is, on average, 10ms? 

thanks, 
ryan. 
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Stray output
Date: Mon, 16 Jan 2006 18:21:38 -0800
Lines: 51
Distribution: su
Message-ID: <dqhkbj$ff8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9504

Hi,

When I'm displaying debug information I receive the following unexpected 
output.

99
#
# maintained by action@leland.stanford.edu
#
# Do not edit this file directly, as it will be overwritten by bundle.
#
# See rfc1700 for the official list of assigned services
#
#
# Network services, Internet style
#
tcpmux          1/tcp
echo            7/udp
echo            7/tcp
discard         9/udp           sink null
discard         9/tcp           sink null
systat          11/tcp          users
systat          11/udp          users
daytime         13/udp
daytime         13/tcp
netstat         15/tcp
qotd            17/tcp          quote
qotd            17/udp          quote
msp             18/tcp                          # message send protocol
msp             18/udp                          # message send protocol
chargen         19/tcp          ttytst source
chargen         19/udp          ttytst source
ftp-data        20/tcp
ftp             21/tcp
ssh             22/tcp                          # Secure Shell Login
ssh             22/udp
telnet          23/tcp
smtp            25/tcp          mail
time            37/tcp          timserver
time            37/udp          timserver
rlp             39/udp          resource        # resource location
nameserver      42/tcp          name            # IEN 116
nameserver      42/udp          name            # IEN 116
whois           43/tcp          nicname         # usually to sri-nic
re-mail-ck      50/tcp          mailcheck       # rfc1339
re-mail-ck      50/udp          mailcheck       #

Anybody have any ideas on where this is coming from and how to make it 
go away?

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stray output
Date: Mon, 16 Jan 2006 18:34:04 -0800
Lines: 55
Distribution: su
Message-ID: <dqhl33$g21$1@news.Stanford.EDU>
References: <dqhkbj$ff8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqhkbj$ff8$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9505

I don't know what you mean by debug information, but your output looks 
like part of /etc/services, which getservbyname reads.

Jens Pillgram-Larsen wrote:
> Hi,
> 
> When I'm displaying debug information I receive the following unexpected 
> output.
> 
> 99
> #
> # maintained by action@leland.stanford.edu
> #
> # Do not edit this file directly, as it will be overwritten by bundle.
> #
> # See rfc1700 for the official list of assigned services
> #
> #
> # Network services, Internet style
> #
> tcpmux          1/tcp
> echo            7/udp
> echo            7/tcp
> discard         9/udp           sink null
> discard         9/tcp           sink null
> systat          11/tcp          users
> systat          11/udp          users
> daytime         13/udp
> daytime         13/tcp
> netstat         15/tcp
> qotd            17/tcp          quote
> qotd            17/udp          quote
> msp             18/tcp                          # message send protocol
> msp             18/udp                          # message send protocol
> chargen         19/tcp          ttytst source
> chargen         19/udp          ttytst source
> ftp-data        20/tcp
> ftp             21/tcp
> ssh             22/tcp                          # Secure Shell Login
> ssh             22/udp
> telnet          23/tcp
> smtp            25/tcp          mail
> time            37/tcp          timserver
> time            37/udp          timserver
> rlp             39/udp          resource        # resource location
> nameserver      42/tcp          name            # IEN 116
> nameserver      42/udp          name            # IEN 116
> whois           43/tcp          nicname         # usually to sri-nic
> re-mail-ck      50/tcp          mailcheck       # rfc1339
> re-mail-ck      50/udp          mailcheck       #
> 
> Anybody have any ideas on where this is coming from and how to make it 
> go away?
> 
> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Nick Puz <npuz@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: using snprintf
Date: Mon, 16 Jan 2006 18:41:59 -0800
Lines: 74
Distribution: su
Message-ID: <dqhlhk$ga9$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601141138060.23768-100000@elaine24.Stanford.EDU> <dqbo59$hba$1@news.Stanford.EDU> <dqfg50$6l9$1@news.Stanford.EDU> <dqgm44$fcp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqgm44$fcp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9506

I do not need to use them, I actually am not using stdbool but just put 
it as an example (and added a bool local variable for kicks to see if it 
would compile).

Thank you for the clarification,
-Nick

Matt Falkenhagen wrote:
> No, please don't include header files that were introduced in C99 and 
> not available before.
> 
> The reasons for disallowing C99 are:
> 
> 1. To ensure compatibility with the grading scripts and later 
> assignments, which have only been tested with C89.
> 2. To help TA's grade.  I don't know about Ari, but I'm not greatly 
> familiar with all the new C99 features...
> 
> I find it surprising that stdbool.h works under -ansi, because it relies 
> on the new C99 type _Bool, but I guess it does.
> 
> Anyway, it should be easy to define your own bool type:
> 
> typedef enum { FALSE, TRUE } bool;
> 
> or something like that.  Were there any other C99 libraries you were 
> planning on using?
> 
> -Matt
> 
> Nick Puz wrote:
> 
>> Hi Matt,
>> So just to clarify, is it ok to use other C99 features (such as 
>> stdbool.h) that compile with -ansi ?
>> -nick
>>
>> Matt Falkenhagen wrote:
>>
>>> snprintf is a C99 function.  We require your code to compile with the 
>>> gcc -ansi flag (old C89).  That's probably what you're doing and why 
>>> you're getting that warning: -ansi won't include the declaration of 
>>> snprintf.
>>>
>>> In general, you can't use C99 features, but functions like snprintf 
>>> that were widely available before C99 are fine.  Basically, if your 
>>> code compiles under -ansi, you should be ok.
>>>
>>> In this case, to fix the warning, just add a prototype for snprintf:
>>>
>>> extern int snprintf(char *s, size_t n, const char *fmt, ...);
>>>
>>> -Matt
>>>
>>> Roy Mehdi Zeighami wrote:
>>>
>>>> Hello...
>>>>
>>>> Is anyone else using snprintf?  gcc compiles with warnings when I 
>>>> use it.
>>>> It says:
>>>>
>>>> warning: implicit declaration of function 'snprintf'
>>>>
>>>> but seems to work fine.  The man page says I need to include stdio.h 
>>>> but
>>>> that doesn't seem to shut it up.
>>>>
>>>> Any suggestions?
>>>>
>>>> Thanks,
>>>>
>>>> Roy
>>>>
.

Path: shelby.stanford.edu!saga7.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: files with no extensions
Date: Mon, 16 Jan 2006 19:07:18 -0800
Lines: 7
Distribution: su
Message-ID: <Pine.GSO.4.44.0601161904180.15048-100000@saga7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9507

Hi,
I am sure this must have been mentioned earlier, how does one pass the
'no extension' as a parameter to ftpcopy i.e say I want to retrieve  files
like  'README', 'notes' etc.
thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stray output
Date: Mon, 16 Jan 2006 19:14:18 -0800
Lines: 62
Distribution: su
Message-ID: <dqhnea$i5s$1@news.Stanford.EDU>
References: <dqhkbj$ff8$1@news.Stanford.EDU> <dqhl33$g21$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqhl33$g21$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9508

By debug info I just mean some printf's with debug information. I think 
I can track it down if it's in getservbyname. Probably not clearing a 
buffer or forgot a \0.

Jens.

Matt Falkenhagen wrote:
> I don't know what you mean by debug information, but your output looks 
> like part of /etc/services, which getservbyname reads.
> 
> Jens Pillgram-Larsen wrote:
>> Hi,
>>
>> When I'm displaying debug information I receive the following 
>> unexpected output.
>>
>> 99
>> #
>> # maintained by action@leland.stanford.edu
>> #
>> # Do not edit this file directly, as it will be overwritten by bundle.
>> #
>> # See rfc1700 for the official list of assigned services
>> #
>> #
>> # Network services, Internet style
>> #
>> tcpmux          1/tcp
>> echo            7/udp
>> echo            7/tcp
>> discard         9/udp           sink null
>> discard         9/tcp           sink null
>> systat          11/tcp          users
>> systat          11/udp          users
>> daytime         13/udp
>> daytime         13/tcp
>> netstat         15/tcp
>> qotd            17/tcp          quote
>> qotd            17/udp          quote
>> msp             18/tcp                          # message send protocol
>> msp             18/udp                          # message send protocol
>> chargen         19/tcp          ttytst source
>> chargen         19/udp          ttytst source
>> ftp-data        20/tcp
>> ftp             21/tcp
>> ssh             22/tcp                          # Secure Shell Login
>> ssh             22/udp
>> telnet          23/tcp
>> smtp            25/tcp          mail
>> time            37/tcp          timserver
>> time            37/udp          timserver
>> rlp             39/udp          resource        # resource location
>> nameserver      42/tcp          name            # IEN 116
>> nameserver      42/udp          name            # IEN 116
>> whois           43/tcp          nicname         # usually to sri-nic
>> re-mail-ck      50/tcp          mailcheck       # rfc1339
>> re-mail-ck      50/udp          mailcheck       #
>>
>> Anybody have any ideas on where this is coming from and how to make it 
>> go away?
>>
>> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify and the test script
Date: Mon, 16 Jan 2006 21:03:57 -0800
Lines: 34
Distribution: su
Message-ID: <dqhts3$nqu$1@news.Stanford.EDU>
References: <dqgrq7$ks4$1@news.Stanford.EDU> <dqgv32$o64$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqgv32$o64$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9509

Hmm..good point. I guess we better update the regex in the test script.

Ari



Steve Goldman wrote:
> The grading script output says:
> 
> purify.output did not match expected regexp:
> 
>   \* Purify 200\S+ Solaris 2 \(32-bit\) Copyright \(C\) 1992-200\d 
> Rational Software Corp\.\s+All rights reserved\.
> 
> The corresponding line in my purify.output is:
> 
>   * Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) 
> Copyright IBM Corp. 1992, 2005 All rights reserved.
> 
> If this is the only part of the file that doesn't match, then maybe it's 
> a problem with the script?  Maybe the Purify people changed the 
> copyright line in their output?
> 
> Steve Goldman wrote:
> 
>> My program is failing the last test in the script, the one that checks 
>> if we "actually used purify."  I have no memory leaks and no open file 
>> descriptors (except the .name_service_door, which we were instructed 
>> to ignore).  From what I can tell, I am error free.  Is there 
>> something I need to put in my .purify file (besides to two suggestions 
>> on the purify FAQ) to suppress whatever data is causing the failure?
>>
>> Thanks,
>> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: problem set submission
Date: Mon, 16 Jan 2006 21:04:26 -0800
Lines: 10
Distribution: su
Message-ID: <dqhtt0$nqu$2@news.Stanford.EDU>
References: <43CC1B9D.2080209@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <43CC1B9D.2080209@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:9510

Hand-written or electronic, whatever works for you.

Ari

Sesha Narahari wrote:
> Should these be hand-written?
> 
> Thanks,
> Sesha
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FTP: ftp protocol error handling
Date: Mon, 16 Jan 2006 23:30:29 -0800
Lines: 15
Distribution: su
Message-ID: <dqi6ep$3b7$1@news.Stanford.EDU>
References: <dqhave$5ld$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqhave$5ld$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9511

If the user specified remote directory does not exist, exit with ERROR 
and an appropriate message.
Similarly, if the ftp server rejects your attempted login, exit with 
ERROR and an appropriate message. Looking at the first digit of the FTP 
reply code should give you enough information to know what to do.

If a file is not accessible, skip it and move to the next file.

Ari

Hector Chan wrote:
> What are we going to do if the user specified a remote directory from the command line that does not exist?  Also, what about when the ftp server does not allow anonymous login?  Do we have to parse all the FTP reply codes, or just selectively or not at all, to check for errors?  Would there any file permission issues such as a file or directory can be listed but not accessible?  I am sorry I am just a little paranoid...
> 
> Thanks,
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: problem set 1, question 3
Date: Mon, 16 Jan 2006 23:39:40 -0800
Lines: 14
Distribution: su
Message-ID: <dqi704$3up$1@news.Stanford.EDU>
References: <dqhiku$d9q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqhiku$d9q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9512

You can think of it as the time from when the first bit of the packet 
reaches the buffer to the time that the first bit of the packet leaves 
the buffer is, on average, 10ms.

Ryan Matthew Smith wrote:
> problem set 1, question 3 says: 
> "a packet is buffered, on average, 10ms by the router" 
> 
> does this mean that the time from when the first bit of the packet
> reaches the buffer to the time that the last bit of the packet 
> leaves the buffer is, on average, 10ms? 
> 
> thanks, 
> ryan. 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Allowing scripting wrappers
Date: Mon, 16 Jan 2006 23:42:51 -0800
Lines: 20
Distribution: su
Message-ID: <dqi760$43t$1@news.Stanford.EDU>
References: <dqf6l0$ra0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqf6l0$ra0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9513

Unfortunately, the grading scripts won't work correctly unless the 
entire program is written in ANSI C. We're working on improving the 
grading scripts to be more flexible, but that won't be ready until a 
future version of the class. I realize that the string parsing for this 
assignment can be annoying, but if you can just bear with it for this 
assignment, the next assignments have much less of it to deal with.

Ari

Jens Pillgram-Larsen wrote:
> I was just wondering if you guys would consider allowing us to write 
> wrappers for our programs in a scripting language. I find myself 
> spending most of my time doing string parsing, which I don't really 
> think is the point of this class. If I was allowed to write a Perl 
> wrapper I would be able to concentrate much more on the networking 
> programming.
> 
> Just my 2 cents.
> 
> Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: files with no extensions
Date: Mon, 16 Jan 2006 23:44:19 -0800
Lines: 13
Distribution: su
Message-ID: <dqi78n$43t$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601161904180.15048-100000@saga7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601161904180.15048-100000@saga7.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9514

These files can be picked up if you pass the * extension. There is no 
way to specify just a null extension.

Ari

Vijay K Kulkarni wrote:
> Hi,
> I am sure this must have been mentioned earlier, how does one pass the
> 'no extension' as a parameter to ftpcopy i.e say I want to retrieve  files
> like  'README', 'notes' etc.
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Hanging on Test L
Date: Tue, 17 Jan 2006 00:06:25 -0800
Lines: 15
Distribution: su
Message-ID: <dqi8hd$7jl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9515

My ftpcopy times out on Tests L.1 through L.4.  So while it was hanging, 
I tried connecting (from a different machine/process) to the server and 
port that the test set up, and I found that the server never sends a 220 
(or at least my ftpcopy hangs while trying to read any reply at all from 
the server).  So then I tried connecting to the server using the ftp 
Unix program, and it appears to be the same thing -- at the prompt I get 
"Connected to saga7.stanford.edu." and then it just sits there.

I have no problem if I set up a server with ftpd myself and then connect 
to it.  It's just with the test script, and it's definitely hanging 
trying to read.  Anyone else have similar results, or any kind person 
have any insight?

Thanks,
Drew
.

Path: shelby.stanford.edu!not-for-mail
From: "Kevin Hart" <kevin.hart@hp.com>
Newsgroups: su.class.cs244a
Subject: ftp.microsoft.com
Date: Tue, 17 Jan 2006 01:10:19 -0700
Lines: 7
Distribution: su
Message-ID: <dqi8pg$83e$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9516

My calls to read() seem to hang when trying to connect to the 
ftp.microsoft.com sever, but they work fine when dealing with all of the 
other ftp servers.  When I try connecting to the microsoft server using a 
commercial ftp client from a non-Stanford IP address, it seems to work fine. 
Has anyone else seen this? 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: files with no extensions
Date: Tue, 17 Jan 2006 01:03:25 -0800
Lines: 25
Distribution: su
Message-ID: <dqibt3$b9u$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601161904180.15048-100000@saga7.Stanford.EDU> <dqi78n$43t$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqi78n$43t$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9517

Do we have to support wildcard expressions passed in as the file 
extension argument to the program? For exmaple:

../ftpcopy *k 1 ftp . .

Should this to download files with extensions that end with k? There is 
no mention of having to support wildcards in the assignment. Or have I 
missed something?


Ari Greenberg wrote:
> These files can be picked up if you pass the * extension. There is no 
> way to specify just a null extension.
> 
> Ari
> 
> Vijay K Kulkarni wrote:
>> Hi,
>> I am sure this must have been mentioned earlier, how does one pass the
>> 'no extension' as a parameter to ftpcopy i.e say I want to retrieve  
>> files
>> like  'README', 'notes' etc.
>> thanks,
>> Vijay.
>>
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: files with no extensions
Date: Tue, 17 Jan 2006 01:04:38 -0800
Lines: 23
Distribution: su
Message-ID: <dqibv3$bb9$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601161904180.15048-100000@saga7.Stanford.EDU> <dqi78n$43t$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9518

Oh, do we have to handle wildcards for extensions?

Thanks,
Waynn

"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message
news:dqi78n$43t$2@news.Stanford.EDU...
> These files can be picked up if you pass the * extension. There is no
> way to specify just a null extension.
>
> Ari
>
> Vijay K Kulkarni wrote:
> > Hi,
> > I am sure this must have been mentioned earlier, how does one pass the
> > 'no extension' as a parameter to ftpcopy i.e say I want to retrieve
files
> > like  'README', 'notes' etc.
> > thanks,
> > Vijay.
> >


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: files with no extensions
Date: Tue, 17 Jan 2006 02:55:49 -0800
Lines: 22
Distribution: su
Message-ID: <dqiifj$gd2$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601161904180.15048-100000@saga7.Stanford.EDU> <dqi78n$43t$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9519

Are we expected to parse wildcards?

Waynn

"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message
news:dqi78n$43t$2@news.Stanford.EDU...
> These files can be picked up if you pass the * extension. There is no
> way to specify just a null extension.
>
> Ari
>
> Vijay K Kulkarni wrote:
> > Hi,
> > I am sure this must have been mentioned earlier, how does one pass the
> > 'no extension' as a parameter to ftpcopy i.e say I want to retrieve
files
> > like  'README', 'notes' etc.
> > thanks,
> > Vijay.
> >


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.microsoft.com
Date: Tue, 17 Jan 2006 03:39:12 -0800
Organization: Stanford University
Lines: 14
Distribution: su
Message-ID: <20060117033912.773cda3a@ballpoint>
References: <dqi8pg$83e$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9520

I had trouble connecting to Microsoft when using the normal command line
FTP client (make sure it is in non-passive mode), so I figured it wasn't
my program's fault.

On Tue, 17 Jan 2006 01:10:19 -0700
"Kevin Hart" <kevin.hart@hp.com> wrote:

> My calls to read() seem to hang when trying to connect to the 
> ftp.microsoft.com sever, but they work fine when dealing with all of the 
> other ftp servers.  When I try connecting to the microsoft server using a 
> commercial ftp client from a non-Stanford IP address, it seems to work fine. 
> Has anyone else seen this? 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: fdopen
Date: Tue, 17 Jan 2006 03:41:39 -0800
Organization: Stanford University
Lines: 4
Distribution: su
Message-ID: <20060117034139.27eeec82@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9521

Are we allowed to use fdopen on the control connection and LIST output? 
Are there any known pitfalls with this approach?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.microsoft.com
Date: Tue, 17 Jan 2006 08:33:26 -0800
Lines: 18
Distribution: su
Message-ID: <dqj68v$6ov$1@news.Stanford.EDU>
References: <dqi8pg$83e$1@news.Stanford.EDU> <20060117033912.773cda3a@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060117033912.773cda3a@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9522

They may have been down before, but appear to be up now.

David Reiss wrote:
> I had trouble connecting to Microsoft when using the normal command line
> FTP client (make sure it is in non-passive mode), so I figured it wasn't
> my program's fault.
> 
> On Tue, 17 Jan 2006 01:10:19 -0700
> "Kevin Hart" <kevin.hart@hp.com> wrote:
> 
> 
>>My calls to read() seem to hang when trying to connect to the 
>>ftp.microsoft.com sever, but they work fine when dealing with all of the 
>>other ftp servers.  When I try connecting to the microsoft server using a 
>>commercial ftp client from a non-Stanford IP address, it seems to work fine. 
>>Has anyone else seen this? 
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Hanging on Test L
Date: Tue, 17 Jan 2006 08:35:02 -0800
Lines: 19
Distribution: su
Message-ID: <dqj6bu$6ov$2@news.Stanford.EDU>
References: <dqi8hd$7jl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqi8hd$7jl$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9523

Are you still seeing this?  It works for me.  Perhaps try on a different 
machine?

Drew Willcoxon wrote:
> My ftpcopy times out on Tests L.1 through L.4.  So while it was hanging, 
> I tried connecting (from a different machine/process) to the server and 
> port that the test set up, and I found that the server never sends a 220 
> (or at least my ftpcopy hangs while trying to read any reply at all from 
> the server).  So then I tried connecting to the server using the ftp 
> Unix program, and it appears to be the same thing -- at the prompt I get 
> "Connected to saga7.stanford.edu." and then it just sits there.
> 
> I have no problem if I set up a server with ftpd myself and then connect 
> to it.  It's just with the test script, and it's definitely hanging 
> trying to read.  Anyone else have similar results, or any kind person 
> have any insight?
> 
> Thanks,
> Drew
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: fdopen
Date: Tue, 17 Jan 2006 08:46:28 -0800
Lines: 14
Distribution: su
Message-ID: <dqj71c$7lb$1@news.Stanford.EDU>
References: <20060117034139.27eeec82@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060117034139.27eeec82@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9524

You're certainly allowed to, but I can't say I've tried it.  This thread:

http://groups.google.com/group/comp.unix.programmer/browse_frm/thread/89b20770265d387f/

makes it sound like it's ok, as long as you don't mix syscalls with 
stdio functions.

-Matt

David Reiss wrote:
> Are we allowed to use fdopen on the control connection and LIST output? 
> Are there any known pitfalls with this approach?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Frans Effendi" <franse@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test G and H
Date: Tue, 17 Jan 2006 09:04:38 -0800
Lines: 11
Distribution: su
Message-ID: <dqj83t$8k9$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9525

I notice that these tests G and H are not included in the testing script.
(at least it is what I saw in the test summary result)
Are these tests have been dropped from the grading criteria or is there
something wrong with my program that prevents these tests from running?
Just want to make sure.

Thanks,

Frans 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: files with no extensions
Date: Tue, 17 Jan 2006 09:07:15 -0800
Lines: 36
Distribution: su
Message-ID: <dqj889$8jp$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601161904180.15048-100000@saga7.Stanford.EDU> <dqi78n$43t$2@news.Stanford.EDU> <dqiifj$gd2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqiifj$gd2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9526

Sorry, I don't know what I was thinking. I thought I had seen the 
wildcard requirement in the assignment but after rereading it clearly 
there is no mention of any wildcard extension. Don't worry about it, and 
don't worry about files with no extensions either.

Sorry about the confusion.
Ari

Waynn Lue wrote:
> Are we expected to parse wildcards?
> 
> Waynn
> 
> "Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message
> news:dqi78n$43t$2@news.Stanford.EDU...
> 
>>These files can be picked up if you pass the * extension. There is no
>>way to specify just a null extension.
>>
>>Ari
>>
>>Vijay K Kulkarni wrote:
>>
>>>Hi,
>>>I am sure this must have been mentioned earlier, how does one pass the
>>>'no extension' as a parameter to ftpcopy i.e say I want to retrieve
> 
> files
> 
>>>like  'README', 'notes' etc.
>>>thanks,
>>>Vijay.
>>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Tue, 17 Jan 2006 09:08:51 -0800
Lines: 27
Distribution: su
Message-ID: <dqj8bb$8qp$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqgjbt$d3k$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9527

It sounds like there's two issues raised in this thread.

First, how to get your local IP.  As the FAQ Q21 says, "There are a few 
ways to do this."  Both methods mentioned in this thread: using 
gethostbyname on $HOST and using getsockname on the established control 
socket, should work fine.  To debug, you can print out the IP you get 
and compare against the output of "ifconfig -a".

Second, even if you have correct IP, PORT isn't responding.  Using 
TCP_NODELAY seems like a hack to me, but if it works for you, it works. 
  The other suggestion, using one write() per request, is a good idea 
anyway for efficiency because you're sending only a small request over. 
  Just make sure you check the return value of write; you can't assume 
it actually sends everything requested.

-Matt

Michi Mutsuzaki wrote:
> Hello,
> 
> I'm having a problem with the PORT command. The server 
> ftp.cs.stanford.edu doesn't respond to the command. I've
> tried different servers (ftp.microsoft.com, ftp.stanford.edu,
> etc...), and it works fine. Any idea why this is happening?
> 
> Thank you,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Problem Set#1. Question 7 missing?
Date: Tue, 17 Jan 2006 11:36:53 -0800
Lines: 6
Distribution: su
Message-ID: <43CD4755.7070708@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9528

The numbering seems to jump from 6 to 8. I have 3 pages. Am I missing 
anything?

Thanks,
Sesha

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem Set#1. Question 7 missing?
Date: Tue, 17 Jan 2006 12:41:39 -0800
Lines: 9
Distribution: su
Message-ID: <dqjkqc$mu2$1@news.Stanford.EDU>
References: <43CD4755.7070708@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <43CD4755.7070708@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:9529

Question 7 doesn't exist.

Sesha Narahari wrote:
> The numbering seems to jump from 6 to 8. I have 3 pages. Am I missing 
> anything?
> 
> Thanks,
> Sesha
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Hanging on Test L
Date: Tue, 17 Jan 2006 15:59:19 -0800
Lines: 15
Distribution: su
Message-ID: <dqk0c2$6h4$1@news.Stanford.EDU>
References: <dqi8hd$7jl$1@news.Stanford.EDU> <dqj6bu$6ov$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqj6bu$6ov$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9530

My problem was different from what I thought.  I wasn't checking the 
server's reply from RETR before trying to read on the data connection, 
so when the server sent a 500-something because I didn't have 
permission, I tried to read, instead of skipping the file.  I was thrown 
a little off guard because while I would expect this behavior for test 
L.3 ("Checks that ftpcopy does not create inaccessible file."), I didn't 
realize this was also causing L.1 ("Checks that ftpcopy transfers zero 
byte file correctly.") to timeout.

Thanks,
Drew

Matt Falkenhagen wrote:
> Are you still seeing this?  It works for me.  Perhaps try on a different 
> machine?
.

Path: shelby.stanford.edu!saga17.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test script format?
Date: Tue, 17 Jan 2006 18:49:00 -0800
Lines: 15
Distribution: su
Message-ID: <Pine.GSO.4.44.0601171846240.3941-100000@saga17.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9531

I'm having trouble submitting my code to the test script...

I'm using the command line:

/usr/class/cs244a/bin/test_code.pl hw1 Makefile ftpcopy.c ftpparse.c
purify.output ftpcopy.purify

but I get the error

"File missing in submission: No file matching "purify.output" even though
I generated that file with purify. What am I missing here?

Thanks!
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re-using Listening Socket
Date: Tue, 17 Jan 2006 19:15:28 -0800
Organization: Stanford University
Lines: 8
Distribution: su
Message-ID: <20060117191528.68f30d4b@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9532

Should I re-bind the listening socket to a new port for every download
request?  I've just been using one listening socket the whole time, and
it has been working fine, but I'm afraid that if an FTP server used the
same outgoing port for each connection, packets from the two connections
could get crossed.  If I do rebind it, do I need to close the socket
first and create a new one, or can I just call bind and listen again?

--David
.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Tue, 17 Jan 2006 20:24:40 -0800
Lines: 48
Distribution: su
Message-ID: <Pine.GSO.4.44.0601172020270.29002-100000@elaine24.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqj8bb$8qp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqj8bb$8qp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9533

Hello...

I am seeing the same issue on ftp.cs.stanford.edu, when I issue the PORT
command I never get a response on the control socket and my program
blocks.  I tried command line ftp and it seems to work just fine.

Is anyone else still seeing this?

I tried the setsockopt call but
I couldn't get it to compile.  It doesn't seems that TCP_NODELAY is
defined in sys/socket.h

Have any of the other folks figured out how to work around this?  Thanks
for all the help.

Roy

On Tue, 17 Jan 2006, Matt Falkenhagen wrote:

> It sounds like there's two issues raised in this thread.
>
> First, how to get your local IP.  As the FAQ Q21 says, "There are a few
> ways to do this."  Both methods mentioned in this thread: using
> gethostbyname on $HOST and using getsockname on the established control
> socket, should work fine.  To debug, you can print out the IP you get
> and compare against the output of "ifconfig -a".
>
> Second, even if you have correct IP, PORT isn't responding.  Using
> TCP_NODELAY seems like a hack to me, but if it works for you, it works.
>   The other suggestion, using one write() per request, is a good idea
> anyway for efficiency because you're sending only a small request over.
>   Just make sure you check the return value of write; you can't assume
> it actually sends everything requested.
>
> -Matt
>
> Michi Mutsuzaki wrote:
> > Hello,
> >
> > I'm having a problem with the PORT command. The server
> > ftp.cs.stanford.edu doesn't respond to the command. I've
> > tried different servers (ftp.microsoft.com, ftp.stanford.edu,
> > etc...), and it works fine. Any idea why this is happening?
> >
> > Thank you,
> > --Michi
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Tue, 17 Jan 2006 20:46:53 -0800
Lines: 58
Distribution: su
Message-ID: <dqkh86$qp5$1@news.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqj8bb$8qp$1@news.Stanford.EDU> <Pine.GSO.4.44.0601172020270.29002-100000@elaine24.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601172020270.29002-100000@elaine24.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9534

Check that you end your request with \r\n.

Otherwise, it sounds like people have better success when sending the 
request all in one write(), are you doing that?

-Matt

Roy Mehdi Zeighami wrote:
> Hello...
> 
> I am seeing the same issue on ftp.cs.stanford.edu, when I issue the PORT
> command I never get a response on the control socket and my program
> blocks.  I tried command line ftp and it seems to work just fine.
> 
> Is anyone else still seeing this?
> 
> I tried the setsockopt call but
> I couldn't get it to compile.  It doesn't seems that TCP_NODELAY is
> defined in sys/socket.h
> 
> Have any of the other folks figured out how to work around this?  Thanks
> for all the help.
> 
> Roy
> 
> On Tue, 17 Jan 2006, Matt Falkenhagen wrote:
> 
> 
>>It sounds like there's two issues raised in this thread.
>>
>>First, how to get your local IP.  As the FAQ Q21 says, "There are a few
>>ways to do this."  Both methods mentioned in this thread: using
>>gethostbyname on $HOST and using getsockname on the established control
>>socket, should work fine.  To debug, you can print out the IP you get
>>and compare against the output of "ifconfig -a".
>>
>>Second, even if you have correct IP, PORT isn't responding.  Using
>>TCP_NODELAY seems like a hack to me, but if it works for you, it works.
>>  The other suggestion, using one write() per request, is a good idea
>>anyway for efficiency because you're sending only a small request over.
>>  Just make sure you check the return value of write; you can't assume
>>it actually sends everything requested.
>>
>>-Matt
>>
>>Michi Mutsuzaki wrote:
>>
>>>Hello,
>>>
>>>I'm having a problem with the PORT command. The server
>>>ftp.cs.stanford.edu doesn't respond to the command. I've
>>>tried different servers (ftp.microsoft.com, ftp.stanford.edu,
>>>etc...), and it works fine. Any idea why this is happening?
>>>
>>>Thank you,
>>>--Michi
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test G and H
Date: Tue, 17 Jan 2006 20:54:08 -0800
Lines: 20
Distribution: su
Message-ID: <dqkhlq$rjv$1@news.Stanford.EDU>
References: <dqj83t$8k9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqj83t$8k9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9535

Tests G and H aren't in the testing script we give you.  The script will 
tell you if there's something wrong with your program, it won't just 
silently skip tests.

It is possible they're still in the grading criteria, see FAQ Q17.

-Matt

Frans Effendi wrote:
> I notice that these tests G and H are not included in the testing script.
> (at least it is what I saw in the test summary result)
> Are these tests have been dropped from the grading criteria or is there
> something wrong with my program that prevents these tests from running?
> Just want to make sure.
> 
> Thanks,
> 
> Frans 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script format?
Date: Tue, 17 Jan 2006 21:02:08 -0800
Lines: 26
Distribution: su
Message-ID: <dqki4q$s20$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601171846240.3941-100000@saga17.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601171846240.3941-100000@saga17.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9536

Strange... are you sure "purify.output" actually exists in your 
directory?  I don't know what to say... it should work.

Also, you shouldn't submit "ftpcopy.purify", and you should include your 
headers and a ".purify" file.  I usually submit with args:

Makefile *.c *.h purify.output .purify

-Matt

Megan Anneke Wachs wrote:
> I'm having trouble submitting my code to the test script...
> 
> I'm using the command line:
> 
> /usr/class/cs244a/bin/test_code.pl hw1 Makefile ftpcopy.c ftpparse.c
> purify.output ftpcopy.purify
> 
> but I get the error
> 
> "File missing in submission: No file matching "purify.output" even though
> I generated that file with purify. What am I missing here?
> 
> Thanks!
> Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Re-using Listening Socket
Date: Tue, 17 Jan 2006 21:25:32 -0800
Lines: 24
Distribution: su
Message-ID: <dqkjgm$4j$1@news.Stanford.EDU>
References: <20060117191528.68f30d4b@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060117191528.68f30d4b@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9537

You should bind to a new port each time a data connection is opened. 
You aren't supposed to reuse the same port, as the RFC states:

       Reuse of the Data Connection:  When using the stream mode of data
       transfer the end of the file must be indicated by closing the
       connection.  This causes a problem if multiple files are to be
       transfered in the session, due to need for TCP to hold the
       connection record for a time out period to guarantee the reliable
       communication.  Thus the connection can not be reopened at once.

I believe the only clean way to do this is to close and create a new one.

-Matt


David Reiss wrote:
> Should I re-bind the listening socket to a new port for every download
> request?  I've just been using one listening socket the whole time, and
> it has been working fine, but I'm afraid that if an FTP server used the
> same outgoing port for each connection, packets from the two connections
> could get crossed.  If I do rebind it, do I need to close the socket
> first and create a new one, or can I just call bind and listen again?
> 
> --David
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Sample Exams
Date: Tue, 17 Jan 2006 22:03:22 -0800
Lines: 7
Distribution: su
Message-ID: <dqklnc$29k$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9538

Hi,

The links to the past years' midterms and finals on the webpage are 
dead.  Any idea if we can get a look at those?

Thanks,
Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: accept blocks on reading files with no read permission
Date: Tue, 17 Jan 2006 22:06:26 -0800
Lines: 13
Distribution: su
Message-ID: <dqklt2$2ds$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9540

Here is what I'm doing to retrieve files:

1. create a new data connection.
2. send retr command.
3. accept a connection from the server.
4. read data from the data connection.
5. check the control connection for reply.

It works fine as long as I have a read permission. When I don't, the 
accept blocks. How can I get around this?

Thanks,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Directory Exists?
Date: Tue, 17 Jan 2006 22:13:51 -0800
Organization: Stanford University
Lines: 3
Distribution: su
Message-ID: <20060117221351.3ca56b27@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9541

I understand the correct behavior when a local file already exists, but
what about when a local directory already exists.  How about a local
file with the same name as a directory that we are supposed to create?
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: accept blocks on reading files with no read permission
Date: Tue, 17 Jan 2006 22:20:56 -0800
Lines: 23
Distribution: su
Message-ID: <dqkmne$3f9$1@news.Stanford.EDU>
References: <dqklt2$2ds$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqklt2$2ds$3@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9542

I ran into this, too, and I fixed it when I realized that after sending 
RETR, I should immediately read one reply from the control connection 
before trying to read data.  The server sends back a 500-series reply if 
you don't have permission.  (It sends a 100-series if you should begin 
transfer.)  After you finish reading the data, it'll send a 200-series.

Hope that helps,
Drew

Michi Mutsuzaki wrote:
> Here is what I'm doing to retrieve files:
> 
> 1. create a new data connection.
> 2. send retr command.
> 3. accept a connection from the server.
> 4. read data from the data connection.
> 5. check the control connection for reply.
> 
> It works fine as long as I have a read permission. When I don't, the 
> accept blocks. How can I get around this?
> 
> Thanks,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: accept blocks on reading files with no read permission
Date: Tue, 17 Jan 2006 22:21:15 -0800
Lines: 16
Distribution: su
Message-ID: <dqkmp5$3mm$1@news.Stanford.EDU>
References: <dqklt2$2ds$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqklt2$2ds$3@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9543

Check the reply code before accept().

Michi Mutsuzaki wrote:
> Here is what I'm doing to retrieve files:
> 
> 1. create a new data connection.
> 2. send retr command.
> 3. accept a connection from the server.
> 4. read data from the data connection.
> 5. check the control connection for reply.
> 
> It works fine as long as I have a read permission. When I don't, the 
> accept blocks. How can I get around this?
> 
> Thanks,
> --Michi
.

Path: shelby.stanford.edu!saga17.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script format?
Date: Tue, 17 Jan 2006 22:24:59 -0800
Lines: 37
Distribution: su
Message-ID: <Pine.GSO.4.44.0601172223070.7453-100000@saga17.Stanford.EDU>
References: <Pine.GSO.4.44.0601171846240.3941-100000@saga17.Stanford.EDU>
 <dqki4q$s20$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqki4q$s20$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9544

The problem was solved when I used ./test_script instead of just
test_script.

Thanks,
Megan


On Tue, 17 Jan 2006, Matt Falkenhagen wrote:

> Strange... are you sure "purify.output" actually exists in your
> directory?  I don't know what to say... it should work.
>
> Also, you shouldn't submit "ftpcopy.purify", and you should include your
> headers and a ".purify" file.  I usually submit with args:
>
> Makefile *.c *.h purify.output .purify
>
> -Matt
>
> Megan Anneke Wachs wrote:
> > I'm having trouble submitting my code to the test script...
> >
> > I'm using the command line:
> >
> > /usr/class/cs244a/bin/test_code.pl hw1 Makefile ftpcopy.c ftpparse.c
> > purify.output ftpcopy.purify
> >
> > but I get the error
> >
> > "File missing in submission: No file matching "purify.output" even though
> > I generated that file with purify. What am I missing here?
> >
> > Thanks!
> > Megan
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: accept blocks on reading files with no read permission
Date: Tue, 17 Jan 2006 22:33:24 -0800
Lines: 24
Distribution: su
Message-ID: <dqknfk$409$1@news.Stanford.EDU>
References: <dqklt2$2ds$3@news.Stanford.EDU> <dqkmp5$3mm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dqkmp5$3mm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9545

Hi Matt,

If I do that, the read blocks for files that I do have a read 
permission. Am I missing something?

--Michi

Matt Falkenhagen wrote:
> Check the reply code before accept().
> 
> Michi Mutsuzaki wrote:
>> Here is what I'm doing to retrieve files:
>>
>> 1. create a new data connection.
>> 2. send retr command.
>> 3. accept a connection from the server.
>> 4. read data from the data connection.
>> 5. check the control connection for reply.
>>
>> It works fine as long as I have a read permission. When I don't, the 
>> accept blocks. How can I get around this?
>>
>> Thanks,
>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Directory Exists?
Date: Tue, 17 Jan 2006 22:45:55 -0800
Lines: 16
Distribution: su
Message-ID: <dqko7d$557$1@news.Stanford.EDU>
References: <20060117221351.3ca56b27@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060117221351.3ca56b27@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9546

If a local dir already exists, just go ahead and use it, you assume it 
exists at the first depth anyway.

If a file exists and you want to make a directory of that name, I think 
the best thing would be to try to remove the file with unlink and then 
create the dir, since you're smashing files anyway.  However, we won't 
be testing this case, so just make a design decision and document it.

-Matt



David Reiss wrote:
> I understand the correct behavior when a local file already exists, but
> what about when a local directory already exists.  How about a local
> file with the same name as a directory that we are supposed to create?
.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftp.stanford.edu
Date: Tue, 17 Jan 2006 22:55:12 -0800
Lines: 2
Distribution: su
Message-ID: <dqkooh$5ii$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9547

ftp.stanford.edu seems to be down, causing some of the test cases to 
fail. I wonder if it is just me or if everyone is seeing this also.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: accept blocks on reading files with no read permission
Date: Tue, 17 Jan 2006 22:55:59 -0800
Lines: 34
Distribution: su
Message-ID: <dqkoq9$5ja$1@news.Stanford.EDU>
References: <dqklt2$2ds$3@news.Stanford.EDU> <dqkmp5$3mm$1@news.Stanford.EDU> <dqknfk$409$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqknfk$409$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9548

The read shouldn't block.  Check out the RFC, in particular the 
command-reply sequences in Section 5.4 and state diagrams in Section 6. 
  Basically, you should get a 1xx from RETR if server wants to send the 
file over, and a 2xx after the transfer completed.

-Matt

Michi Mutsuzaki wrote:
> Hi Matt,
> 
> If I do that, the read blocks for files that I do have a read 
> permission. Am I missing something?
> 
> --Michi
> 
> Matt Falkenhagen wrote:
> 
>> Check the reply code before accept().
>>
>> Michi Mutsuzaki wrote:
>>
>>> Here is what I'm doing to retrieve files:
>>>
>>> 1. create a new data connection.
>>> 2. send retr command.
>>> 3. accept a connection from the server.
>>> 4. read data from the data connection.
>>> 5. check the control connection for reply.
>>>
>>> It works fine as long as I have a read permission. When I don't, the 
>>> accept blocks. How can I get around this?
>>>
>>> Thanks,
>>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu
Date: Tue, 17 Jan 2006 22:57:17 -0800
Lines: 5
Distribution: su
Message-ID: <dqkosm$5ja$2@news.Stanford.EDU>
References: <dqkooh$5ii$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqkooh$5ii$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9549

Yeah, it's been down all day, it's not just you.

Hau Jia Chew wrote:
> ftp.stanford.edu seems to be down, causing some of the test cases to 
> fail. I wonder if it is just me or if everyone is seeing this also.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: problem set submission
Date: Tue, 17 Jan 2006 23:11:41 -0800
Lines: 17
Distribution: su
Message-ID: <dqkpnn$6cu$1@news.Stanford.EDU>
References: <43CC1B9D.2080209@stanford.edu> <dqhtt0$nqu$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqhtt0$nqu$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9550

Correction: By electronic, I meant "typed". We still need you to hand in 
  a hard copy.

Ari

Ari Greenberg wrote:
> Hand-written or electronic, whatever works for you.
> 
> Ari
> 
> Sesha Narahari wrote:
> 
>> Should these be hand-written?
>>
>> Thanks,
>> Sesha
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: accept blocks on reading files with no read permission
Date: Tue, 17 Jan 2006 23:12:51 -0800
Lines: 41
Distribution: su
Message-ID: <dqkppk$6es$1@news.Stanford.EDU>
References: <dqklt2$2ds$3@news.Stanford.EDU> <dqkmp5$3mm$1@news.Stanford.EDU> <dqknfk$409$1@news.Stanford.EDU> <dqkoq9$5ja$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dqkoq9$5ja$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9551

Hi Matt,

I got it working now. Thanks for your help.

--Michi

Matt Falkenhagen wrote:
> The read shouldn't block.  Check out the RFC, in particular the 
> command-reply sequences in Section 5.4 and state diagrams in Section 6. 
>  Basically, you should get a 1xx from RETR if server wants to send the 
> file over, and a 2xx after the transfer completed.
> 
> -Matt
> 
> Michi Mutsuzaki wrote:
>> Hi Matt,
>>
>> If I do that, the read blocks for files that I do have a read 
>> permission. Am I missing something?
>>
>> --Michi
>>
>> Matt Falkenhagen wrote:
>>
>>> Check the reply code before accept().
>>>
>>> Michi Mutsuzaki wrote:
>>>
>>>> Here is what I'm doing to retrieve files:
>>>>
>>>> 1. create a new data connection.
>>>> 2. send retr command.
>>>> 3. accept a connection from the server.
>>>> 4. read data from the data connection.
>>>> 5. check the control connection for reply.
>>>>
>>>> It works fine as long as I have a read permission. When I don't, the 
>>>> accept blocks. How can I get around this?
>>>>
>>>> Thanks,
>>>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu
Date: Wed, 18 Jan 2006 00:58:57 -0800
Organization: Stanford University
Lines: 12
Distribution: su
Message-ID: <20060118005857.494e9f4a@ballpoint>
References: <dqkooh$5ii$1@news.Stanford.EDU>
	<dqkosm$5ja$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9552

If it is not back up by the morning, is there some way that the test
script can be updated so that we can get a clear idea of how correct
our programs are?

On Tue, 17 Jan 2006 22:57:17 -0800
Matt Falkenhagen <mjf@stanford.edu> wrote:

> Yeah, it's been down all day, it's not just you.
> 
> Hau Jia Chew wrote:
> > ftp.stanford.edu seems to be down, causing some of the test cases to 
> > fail. I wonder if it is just me or if everyone is seeing this also.
.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PORT command on ftp.cs.stanford.edu
Date: Wed, 18 Jan 2006 08:47:46 -0800
Lines: 74
Distribution: su
Message-ID: <Pine.GSO.4.44.0601180846230.21285-100000@elaine24.Stanford.EDU>
References: <dqgjbt$d3k$1@news.Stanford.EDU> <dqj8bb$8qp$1@news.Stanford.EDU>
 <Pine.GSO.4.44.0601172020270.29002-100000@elaine24.Stanford.EDU>
 <dqkh86$qp5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqkh86$qp5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9553

That was it, sorry.  Forget that I wrote the command and the \r\n.

I do wonder why this matters, though.  How could the server be written so
that it depends on us doing a single write?  We can't really guarantee
that a buffer is sent in a single write anyway, right?

Just trying to take something away from this.

Thanks,

Roy

On Tue, 17 Jan 2006, Matt Falkenhagen wrote:

> Check that you end your request with \r\n.
>
> Otherwise, it sounds like people have better success when sending the
> request all in one write(), are you doing that?
>
> -Matt
>
> Roy Mehdi Zeighami wrote:
> > Hello...
> >
> > I am seeing the same issue on ftp.cs.stanford.edu, when I issue the PORT
> > command I never get a response on the control socket and my program
> > blocks.  I tried command line ftp and it seems to work just fine.
> >
> > Is anyone else still seeing this?
> >
> > I tried the setsockopt call but
> > I couldn't get it to compile.  It doesn't seems that TCP_NODELAY is
> > defined in sys/socket.h
> >
> > Have any of the other folks figured out how to work around this?  Thanks
> > for all the help.
> >
> > Roy
> >
> > On Tue, 17 Jan 2006, Matt Falkenhagen wrote:
> >
> >
> >>It sounds like there's two issues raised in this thread.
> >>
> >>First, how to get your local IP.  As the FAQ Q21 says, "There are a few
> >>ways to do this."  Both methods mentioned in this thread: using
> >>gethostbyname on $HOST and using getsockname on the established control
> >>socket, should work fine.  To debug, you can print out the IP you get
> >>and compare against the output of "ifconfig -a".
> >>
> >>Second, even if you have correct IP, PORT isn't responding.  Using
> >>TCP_NODELAY seems like a hack to me, but if it works for you, it works.
> >>  The other suggestion, using one write() per request, is a good idea
> >>anyway for efficiency because you're sending only a small request over.
> >>  Just make sure you check the return value of write; you can't assume
> >>it actually sends everything requested.
> >>
> >>-Matt
> >>
> >>Michi Mutsuzaki wrote:
> >>
> >>>Hello,
> >>>
> >>>I'm having a problem with the PORT command. The server
> >>>ftp.cs.stanford.edu doesn't respond to the command. I've
> >>>tried different servers (ftp.microsoft.com, ftp.stanford.edu,
> >>>etc...), and it works fine. Any idea why this is happening?
> >>>
> >>>Thank you,
> >>>--Michi
> >>
> >
>

.

Path: shelby.stanford.edu!saga16.Stanford.EDU!lamskm
From: lamskm@Stanford.EDU (Michael Lam)
Newsgroups: su.class.cs244a
Subject: problems submission for scpd students
Date: Wed, 18 Jan 2006 16:54:29 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: <dqlrs5$dec$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Summary: problems submission for scpd students
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:9554

Pardon my question for the non scpd students.
From the scpd students orientation, we were told that when submitting
assignments, send one to the scpd dept, and one to the normal class
channel (which would be Judy).  However, since the instruction for
going to Judy is to leave it under the door, can we submit via email?

Matt is my assigned TA.  Does it mean he will grade my problem set?
Is it possible that I email my problem set solution to the TA?

I am just trying to find a way of submitting without coming to campus.

Thanks.

-Michael
.

Path: shelby.stanford.edu!elaine3.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS#1 Q6
Date: Wed, 18 Jan 2006 08:55:58 -0800
Lines: 8
Distribution: su
Message-ID: <Pine.GSO.4.44.0601180854020.6165-100000@elaine3.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9555

Hello,

How do we calculate the d(t) for discrete arrival and service processes?
Is d(t) in terms of the first bit or the last bit of the packet?  Thanks
very much in advance.

-Wai Kei

.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine1.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: using cs140 list code
Date: Wed, 18 Jan 2006 09:49:14 -0800
Lines: 5
Distribution: su
Message-ID: <Pine.GSO.4.44.0601180946510.13232-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9556

I'd like to reuse the linked list code from the cs140 pintos project.
Would this be alright, or do I need to write my own?

-- Peter

.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert@NOSPAM.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Freeing memory when exiting with an error condition
Date: Wed, 18 Jan 2006 10:26:43 -0800
Lines: 9
Distribution: su
Message-ID: <dqm19g$il8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9557

Do we need to free in-use memory when we exit?

In particular, suppose I'm about to exit with an error condition.  Do I 
need to go through and free all of my malloc'd memory before exiting, or 
am I ok to just exit?  (since the memory is automatically freed when the 
program exits, anyway)

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Freeing memory when exiting with an error condition
Date: Wed, 18 Jan 2006 10:32:20 -0800
Lines: 15
Distribution: su
Message-ID: <dqm1ju$ion$1@news.Stanford.EDU>
References: <dqm19g$il8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqm19g$il8$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9558

See thread "purify errors" started on 1/14/2006 2:04 PM.

You DO have to free memory, close file descriptors, close sockets, etc 
when exiting with status OK though.

Daniel Holbert wrote:
> Do we need to free in-use memory when we exit?
> 
> In particular, suppose I'm about to exit with an error condition.  Do I 
> need to go through and free all of my malloc'd memory before exiting, or 
> am I ok to just exit?  (since the memory is automatically freed when the 
> program exits, anyway)
> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS#1 Q6
Date: Wed, 18 Jan 2006 12:30:22 -0800
Lines: 15
Distribution: su
Message-ID: <dqm8gn$r9a$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601180854020.6165-100000@elaine3.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:9559

I think the interpretation of d(t) is as follows: if a bit arrives at time
t, the time it has to wait before being sent out of the router is d(t).

"Wai Kei So" <wkso@stanford.edu> wrote in message
news:Pine.GSO.4.44.0601180854020.6165-100000@elaine3.Stanford.EDU...
> Hello,
>
> How do we calculate the d(t) for discrete arrival and service processes?
> Is d(t) in terms of the first bit or the last bit of the packet?  Thanks
> very much in advance.
>
> -Wai Kei
>


.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpd problem
Date: Wed, 18 Jan 2006 12:37:39 -0800
Lines: 26
Distribution: su
Message-ID: <43CEA713.60809@stanford.edu>
References: <43CAB6BB.4090709@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9560

I am trying to test with the supplied ftpd. I am unable to connect using 
a stock FTP client:

ftp 39952@elaine1

fails.

This is not using my ftpcopy code.

Any pointers?

Thanks,
Sesha


Sesha Narahari wrote:
> When I try to connect to my instance of ftpd, I see this:
> 
> 62461@elaine1: unknown host or invalid literal address
> 
> Using elaine1.stanford.edu or elaine doesnt seem to help.
> 
> Thanks,
> Sesha
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpd problem
Date: Wed, 18 Jan 2006 12:40:00 -0800
Lines: 32
Distribution: su
Message-ID: <dqm93b$rn7$1@news.Stanford.EDU>
References: <43CAB6BB.4090709@stanford.edu> <43CEA713.60809@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <43CEA713.60809@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:9561

Try

$ ftp elaine1 39952

Sesha Narahari wrote:
> I am trying to test with the supplied ftpd. I am unable to connect using 
> a stock FTP client:
> 
> ftp 39952@elaine1
> 
> fails.
> 
> This is not using my ftpcopy code.
> 
> Any pointers?
> 
> Thanks,
> Sesha
> 
> 
> Sesha Narahari wrote:
> 
>> When I try to connect to my instance of ftpd, I see this:
>>
>> 62461@elaine1: unknown host or invalid literal address
>>
>> Using elaine1.stanford.edu or elaine doesnt seem to help.
>>
>> Thanks,
>> Sesha
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Time-average queue occupancy X bar
Date: Wed, 18 Jan 2006 16:02:05 -0800
Lines: 5
Distribution: su
Message-ID: <dqmktv$fb5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9562

I can't find the notation Xbar or the term time-average queue occupancy 
in the slides about queuing in routers. What does this correspond to in 
our notes.

Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: using cs140 list code
Date: Wed, 18 Jan 2006 17:23:41 -0800
Lines: 15
Distribution: su
Message-ID: <dqmpnc$l0l$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601180946510.13232-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601180946510.13232-100000@elaine1.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9563

Hey Peter,

Did you write the linked list code for your cs140 project? If so, by all 
means use it. If not, I'm reluctant to say that you can use it since 
that would give you an unfair advantage over students who didn't take 
that class/don't have access to that code.

Ari

Peter In Lee wrote:
> I'd like to reuse the linked list code from the cs140 pintos project.
> Would this be alright, or do I need to write my own?
> 
> -- Peter
> 
.

Path: shelby.stanford.edu!myth9.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Problem set 1, #8
Date: Wed, 18 Jan 2006 17:41:34 -0800
Lines: 10
Distribution: su
Message-ID: <Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9564

The formulation of the problem doesn't quite make sense to me...

if for any process t2-t1, sigma bits can arrive, this seems that the
arrival rate
could be infinite as tau gets really small (<<1). Is tau constrained to be
an increment of 1 second?

Thanks,
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS#1 Q6
Date: Wed, 18 Jan 2006 18:07:19 -0800
Lines: 20
Distribution: su
Message-ID: <dqms96$o26$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601180854020.6165-100000@elaine3.Stanford.EDU> <dqm8gn$r9a$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqm8gn$r9a$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9565

Yes, this is the correct interpretation.

Robbie Yan wrote:
> I think the interpretation of d(t) is as follows: if a bit arrives at time
> t, the time it has to wait before being sent out of the router is d(t).
> 
> "Wai Kei So" <wkso@stanford.edu> wrote in message
> news:Pine.GSO.4.44.0601180854020.6165-100000@elaine3.Stanford.EDU...
> 
>>Hello,
>>
>>How do we calculate the d(t) for discrete arrival and service processes?
>>Is d(t) in terms of the first bit or the last bit of the packet?  Thanks
>>very much in advance.
>>
>>-Wai Kei
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Time-average queue occupancy X bar
Date: Wed, 18 Jan 2006 18:08:20 -0800
Lines: 11
Distribution: su
Message-ID: <dqmsb3$o26$2@news.Stanford.EDU>
References: <dqmktv$fb5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqmktv$fb5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9566

Xbar is the average queue occupancy over an arbitrarily long interval of 
time.

Ari

Jens Pillgram-Larsen wrote:
> I can't find the notation Xbar or the term time-average queue occupancy 
> in the slides about queuing in routers. What does this correspond to in 
> our notes.
> 
> Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Max length of server response to LIST
Date: Wed, 18 Jan 2006 18:53:09 -0800
Lines: 4
Distribution: su
Message-ID: <dqmuud$r8c$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:9567

Can we assume that the server's response to LIST command never exceeds a
particular length, say, 1024 bytes?


.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: Max length of server response to LIST
Date: Thu, 19 Jan 2006 03:02:37 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 12
Distribution: su
Message-ID: <dqmvgd$ron$1@news.Stanford.EDU>
References: <dqmuud$r8c$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9568

I think FAQ #22 says we can't...

Oleg.

In article <dqmuud$r8c$1@news.Stanford.EDU>,
Robbie Yan <xyan@stanford.edu> wrote:
>Can we assume that the server's response to LIST command never exceeds a
>particular length, say, 1024 bytes?
>
>


.

Path: shelby.stanford.edu!saga12.Stanford.EDU!lamskm
From: lamskm@Stanford.EDU (Michael Lam)
Newsgroups: su.class.cs244a
Subject: Problem set 1, #6
Date: Thu, 19 Jan 2006 07:03:22 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: <dqndjq$dq6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Summary: Problem set 1, #6
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:9569

The original definition of A(t) is the number of arrivals in interval [0,t].
So A(t) = t means there are t arrivals in interval[0,t].

Can we assume the units of arrivals as bits, and units of time as seconds?

Then A(t) = t means 1 bit / sec ?
.

Path: shelby.stanford.edu!saga4.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: average Q occupancy, slide 11, handout 3
Date: Wed, 18 Jan 2006 23:30:35 -0800
Lines: 7
Distribution: su
Message-ID: <Pine.GSO.4.44.0601182327270.23098-100000@saga4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9570


can somebody please help me understand how we arrived at average Q
occupancy when the q is non empty to be 0.5*(0.1*500)?

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: average Q occupancy, slide 11, handout 3
Date: Wed, 18 Jan 2006 23:51:03 -0800
Lines: 17
Distribution: su
Message-ID: <dqngdl$i4u$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601182327270.23098-100000@saga4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <Pine.GSO.4.44.0601182327270.23098-100000@saga4.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9571

Qbar(t) is the average A(t) - D(t). For time 0 to 0.2s, Qbar(t) is the 
area of the triangle formed between A(t) and D(t) divided time, i.e. an 
integral divided by time.

Area of triangle = 0.5 * 0.1 * 100
Qbar(t) = Area of triangle / time where time = 0.2s
=> Qbar(t) = 0.5 * 0.1 * 100 / 0.2 = 0.5 * (0.1 * 500)

-Naeim

Vijay K Kulkarni wrote:
> can somebody please help me understand how we arrived at average Q
> occupancy when the q is non empty to be 0.5*(0.1*500)?
> 
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Is bit shifting Endian-Proof?
Date: Wed, 18 Jan 2006 23:56:34 -0800
Lines: 16
Distribution: su
Message-ID: <BFF48632.2BEF%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Is bit shifting Endian-Proof?
Thread-Index: AcYczd2yHGfnAIjBEdqPqwARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:9572

Hi.

If I use bit shifting to get the h1,h2,h3,h4 8-bit fields of an IP address,
is that Endian-proof?

So, for example, I want to get the h2 8 bits of ipaddr. Then will the
following work safely on both little-Endian and big-Endian machines?

A = ipaddr <<8;
A= A>>24;


Thanks in advance.

Sunny.

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem set 1, #8
Date: Thu, 19 Jan 2006 00:20:03 -0800
Lines: 17
Distribution: su
Message-ID: <dqni46$lc2$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9573

It's true, the instantaneous arrival rate could be infinitely large. 
However, the question asks about the average arrival rate (as the 
interval tau gets large).

Ari

Megan Anneke Wachs wrote:
> The formulation of the problem doesn't quite make sense to me...
> 
> if for any process t2-t1, sigma bits can arrive, this seems that the
> arrival rate
> could be infinite as tau gets really small (<<1). Is tau constrained to be
> an increment of 1 second?
> 
> Thanks,
> Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Max length of server response to LIST
Date: Thu, 19 Jan 2006 00:20:37 -0800
Lines: 7
Distribution: su
Message-ID: <dqni56$lc2$2@news.Stanford.EDU>
References: <dqmuud$r8c$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqmuud$r8c$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9574

No, you can't.

Robbie Yan wrote:
> Can we assume that the server's response to LIST command never exceeds a
> particular length, say, 1024 bytes?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem set 1, #6
Date: Thu, 19 Jan 2006 00:21:51 -0800
Lines: 9
Distribution: su
Message-ID: <dqni7h$lc2$3@news.Stanford.EDU>
References: <dqndjq$dq6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqndjq$dq6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9575

Sure.

Michael Lam wrote:
> The original definition of A(t) is the number of arrivals in interval [0,t].
> So A(t) = t means there are t arrivals in interval[0,t].
> 
> Can we assume the units of arrivals as bits, and units of time as seconds?
> 
> Then A(t) = t means 1 bit / sec ?
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW 1 prob 5
Date: Thu, 19 Jan 2006 00:41:31 -0800
Lines: 15
Distribution: su
Message-ID: <dqnjc7$m9g$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601111625270.29375-100000@myth29.Stanford.EDU> <dq49bq$6gc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dq49bq$6gc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9576

In the problem statement, 64kb/s, is that kilobytes/s or kilobits/s ?

Thanks.
-Naeim

Matt Falkenhagen wrote:
> Yep.
> 
> Megan Anneke Wachs wrote:
>> In a  store-and-forward router, is the packet completely stored before
>> forwarding begins, even if the buffer is empty?
>>
>> Thanks,
>> Megan
>>
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test script errors on first try
Date: Thu, 19 Jan 2006 00:47:22 -0800
Lines: 23
Distribution: su
Message-ID: <dqnjml$mna$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9577

When I run the testscript for the first time after changing the code, it
seems to complete all the operations, and then I get these errors, and no
output about any of the tests:

/usr/pubsw/bin/cat: grading_src/build/.purify: No such file or directory
/usr/pubsw/bin/cat: grading_src/build/Makefile: No such file or directory
/usr/pubsw/bin/cat: grading_src/build/echodemo.c: No such file or directory
/usr/pubsw/bin/cat: grading_src/build/errors.c: No such file or directory
/usr/pubsw/bin/cat: grading_src/build/ftpcopy.c: No such file or directory
/usr/pubsw/bin/cat: grading_src/build/ftpparse.c: No such file or directory
/usr/pubsw/bin/cat: grading_src/build/ftpparse.h: No such file or directory
/usr/pubsw/bin/cat: grading_src/build/purify.output: No such file or
directory
Could not open submitted file!
couldn't submit code for testing

When I run it again right afterwards, it works perfectly fine and gives me
output on each of the tests.  Is it not correctly copying the files over, or
am I screwing something up?

Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Is bit shifting Endian-Proof?
Date: Thu, 19 Jan 2006 00:54:51 -0800
Lines: 28
Distribution: su
Message-ID: <dqnk5d$n6f$1@news.Stanford.EDU>
References: <BFF48632.2BEF%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <BFF48632.2BEF%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:9578

My first inclination was to say that the behavior would be different 
depending upon the endian-ness of your machine, but I've run some tests 
and it seems that the left-shift and right-shift operators when applied 
to an int always treat the integer as if the most significant bits are 
on the left side, regardless of the endian-ness of your machine. So yes, 
it seems that the code snippet you provided can be used to reliably 
extract h2 regardless of whether or not the machine is little-endian or 
big-endian. Has anyone else experienced anything different?

Ari

Sunny Balwani wrote:
> Hi.
> 
> If I use bit shifting to get the h1,h2,h3,h4 8-bit fields of an IP address,
> is that Endian-proof?
> 
> So, for example, I want to get the h2 8 bits of ipaddr. Then will the
> following work safely on both little-Endian and big-Endian machines?
> 
> A = ipaddr <<8;
> A= A>>24;
> 
> 
> Thanks in advance.
> 
> Sunny.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Port command
Date: Thu, 19 Jan 2006 01:23:17 -0800
Lines: 18
Distribution: su
Message-ID: <BFF49A85.2BF9%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Port command
Thread-Index: AcYc2frtOT+oZojNEdqPqwARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:9579

Hi.

I want to confirm the format for the 16 bit port in the PORT
h1,h2,h3,h4,p1,p2 command.

So, for example, the following address and port number

Address: 171.64.15.109
port: 58009

would yield something like this.
PORT 171,64,15,109,226,153

Right?

Thanks in advance.
Sunny.

.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Is bit shifting Endian-Proof?
Date: Thu, 19 Jan 2006 03:24:02 -0800
Organization: Stanford University
Lines: 35
Distribution: su
Message-ID: <20060119032402.11aa6112@ballpoint>
References: <BFF48632.2BEF%sunnybalwani@hotmail.com>
	<dqnk5d$n6f$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9580

The C standard defines the bit-shift operators in terms of multiplying
or dividing by powers of 2.  As long as you are operating on unsigned
numbers, it should be endian-neutral.

On Thu, 19 Jan 2006 00:54:51 -0800
Ari Greenberg <arigreen@cs.stanford.edu> wrote:

> My first inclination was to say that the behavior would be different 
> depending upon the endian-ness of your machine, but I've run some tests 
> and it seems that the left-shift and right-shift operators when applied 
> to an int always treat the integer as if the most significant bits are 
> on the left side, regardless of the endian-ness of your machine. So yes, 
> it seems that the code snippet you provided can be used to reliably 
> extract h2 regardless of whether or not the machine is little-endian or 
> big-endian. Has anyone else experienced anything different?
> 
> Ari
> 
> Sunny Balwani wrote:
> > Hi.
> > 
> > If I use bit shifting to get the h1,h2,h3,h4 8-bit fields of an IP address,
> > is that Endian-proof?
> > 
> > So, for example, I want to get the h2 8 bits of ipaddr. Then will the
> > following work safely on both little-Endian and big-Endian machines?
> > 
> > A = ipaddr <<8;
> > A= A>>24;
> > 
> > 
> > Thanks in advance.
> > 
> > Sunny.
> > 
.

Path: shelby.stanford.edu!saga7.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Port command
Date: Thu, 19 Jan 2006 07:58:22 -0800
Lines: 26
Distribution: su
Message-ID: <Pine.GSO.4.44.0601190757360.9650-100000@saga7.Stanford.EDU>
References: <BFF49A85.2BF9%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <BFF49A85.2BF9%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:9581

That worked for me,

-Megan

On Thu, 19 Jan 2006, Sunny Balwani wrote:

> Hi.
>
> I want to confirm the format for the 16 bit port in the PORT
> h1,h2,h3,h4,p1,p2 command.
>
> So, for example, the following address and port number
>
> Address: 171.64.15.109
> port: 58009
>
> would yield something like this.
> PORT 171,64,15,109,226,153
>
> Right?
>
> Thanks in advance.
> Sunny.
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Server cant open data connection to my port
Date: Thu, 19 Jan 2006 08:08:28 -0800
Lines: 22
Distribution: su
Message-ID: <BFF4F97C.2BFE%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Server cant open data connection to my port
Thread-Index: AcYdEpVp08KY6okFEdq3WAARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:9582

Hi.  After issuing the PORT command, the server cant connect to my data
port.  Here is the output from printf statement right before I issue LIST
command. All of my bind and listen calls are setup properly and return
properly. Would appreciate any pointers to what am I doing wrong.


Address of ftp server is : 10.0.1.5
port of ftp server is 21

Address on dataSocket is : 10.0.1.2
port on dataSocket is 53340

PORT 10,0,1,2,208,92
200 PORT command successful.

LIST
150 Opening ASCII mode data connection for /bin/ls.
425 Can't open data connection.

Thanks in advance.
Sunny.

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW 1 prob 5
Date: Thu, 19 Jan 2006 08:13:36 -0800
Lines: 22
Distribution: su
Message-ID: <dqodrs$i9t$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601111625270.29375-100000@myth29.Stanford.EDU> <dq49bq$6gc$1@news.Stanford.EDU> <dqnjc7$m9g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqnjc7$m9g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9583

kilobits/s

-Matt

Naeim Semsarilar wrote:
> In the problem statement, 64kb/s, is that kilobytes/s or kilobits/s ?
> 
> Thanks.
> -Naeim
> 
> Matt Falkenhagen wrote:
> 
>> Yep.
>>
>> Megan Anneke Wachs wrote:
>>
>>> In a  store-and-forward router, is the packet completely stored before
>>> forwarding begins, even if the buffer is empty?
>>>
>>> Thanks,
>>> Megan
>>>
.

Path: shelby.stanford.edu!saga22.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: average Q occupancy, slide 11, handout 3
Date: Thu, 19 Jan 2006 08:21:02 -0800
Lines: 25
Distribution: su
Message-ID: <Pine.GSO.4.44.0601190820390.18711-100000@saga22.Stanford.EDU>
References: <Pine.GSO.4.44.0601182327270.23098-100000@saga4.Stanford.EDU>
 <dqngdl$i4u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqngdl$i4u$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9584

thanks.

Vijay.

On Wed, 18 Jan 2006, Naeim Semsarilar wrote:

> Qbar(t) is the average A(t) - D(t). For time 0 to 0.2s, Qbar(t) is the
> area of the triangle formed between A(t) and D(t) divided time, i.e. an
> integral divided by time.
>
> Area of triangle = 0.5 * 0.1 * 100
> Qbar(t) = Area of triangle / time where time = 0.2s
> => Qbar(t) = 0.5 * 0.1 * 100 / 0.2 = 0.5 * (0.1 * 500)
>
> -Naeim
>
> Vijay K Kulkarni wrote:
> > can somebody please help me understand how we arrived at average Q
> > occupancy when the q is non empty to be 0.5*(0.1*500)?
> >
> > thanks,
> > Vijay.
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: problems submission for scpd students
Date: Thu, 19 Jan 2006 10:17:38 -0800
Lines: 17
Distribution: su
Message-ID: <dqol4e$q97$1@news.Stanford.EDU>
References: <dqlrs5$dec$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqlrs5$dec$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9585

No, for problem sets, you only need to submit to SCPD.

Michael Lam wrote:
> Pardon my question for the non scpd students.
> From the scpd students orientation, we were told that when submitting
> assignments, send one to the scpd dept, and one to the normal class
> channel (which would be Judy).  However, since the instruction for
> going to Judy is to leave it under the door, can we submit via email?
> 
> Matt is my assigned TA.  Does it mean he will grade my problem set?
> Is it possible that I email my problem set solution to the TA?
> 
> I am just trying to find a way of submitting without coming to campus.
> 
> Thanks.
> 
> -Michael
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 15:13:02 -0800
Organization: Stanford University
Lines: 6
Distribution: su
Message-ID: <20060119151302.7d6b1b51@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9586

As far as I can tell, ftp.stanford.edu has been unavailable for two full
days now.  In my case, that is five tests that I have been unable to
use.  Is it possible to get a modified test script that uses some other
test case in place of ftp.stanford.edu?  Thanks.

--David
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Server cant open data connection to my port
Date: Thu, 19 Jan 2006 15:53:02 -0800
Lines: 30
Distribution: su
Message-ID: <dqp8pb$kq9$1@news.Stanford.EDU>
References: <BFF4F97C.2BFE%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <BFF4F97C.2BFE%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:9587

I'm guessing you have some sort of firewall preventing an incoming 
connection from the server.  Have you tried running your code on the 
leland machines?

-Matt

It looks like you're running this on
Sunny Balwani wrote:
> Hi.  After issuing the PORT command, the server cant connect to my data
> port.  Here is the output from printf statement right before I issue LIST
> command. All of my bind and listen calls are setup properly and return
> properly. Would appreciate any pointers to what am I doing wrong.
> 
> 
> Address of ftp server is : 10.0.1.5
> port of ftp server is 21
> 
> Address on dataSocket is : 10.0.1.2
> port on dataSocket is 53340
> 
> PORT 10,0,1,2,208,92
> 200 PORT command successful.
> 
> LIST
> 150 Opening ASCII mode data connection for /bin/ls.
> 425 Can't open data connection.
> 
> Thanks in advance.
> Sunny.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 16:25:05 -0800
Lines: 23
Distribution: su
Message-ID: <dqpale$n1b$1@news.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060119151302.7d6b1b51@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9588

Sorry, yes it's been down for some time.  Unfortunately, modifying the 
test scripts has proven to be a non-trivial problem, and we will not be 
able to do it for this assignment.

We've alerted ITSS about the problem and hopefully they will have 
ftp.stanford.edu up soon.

In the meantime, you can still run tests, just ignore errors caused by 
ftp.stanford.edu.   The only tests that will fail because of 
ftp.stanford.edu alone are C, D, E, and F.2 and each will say "(passed 
only 4 out of 5 subtests)" with a note about ftp.stanford.edu failing. 
If you didn't pass 4/5 subtests, something else is wrong.

-Matt


David Reiss wrote:
> As far as I can tell, ftp.stanford.edu has been unavailable for two full
> days now.  In my case, that is five tests that I have been unable to
> use.  Is it possible to get a modified test script that uses some other
> test case in place of ftp.stanford.edu?  Thanks.
> 
> --David
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 16:48:51 -0800
Lines: 24
Distribution: su
Message-ID: <dqpc0v$oet$1@news.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint> <dqpale$n1b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqpale$n1b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9589

As a side note, what should a correct ftpcopy do when it tries to 
connect to ftp.stanford?  Mine times out (making the test take a long 
time), waiting for a server response.  Is that the proper behavior?  I 
notice that running ftp says "421 Service not available, remote server 
has closed connection," and sftp says "Connection refused."

Thanks,
Drew

Matt Falkenhagen wrote:
> Sorry, yes it's been down for some time.  Unfortunately, modifying the 
> test scripts has proven to be a non-trivial problem, and we will not be 
> able to do it for this assignment.
> 
> We've alerted ITSS about the problem and hopefully they will have 
> ftp.stanford.edu up soon.
> 
> In the meantime, you can still run tests, just ignore errors caused by 
> ftp.stanford.edu.   The only tests that will fail because of 
> ftp.stanford.edu alone are C, D, E, and F.2 and each will say "(passed 
> only 4 out of 5 subtests)" with a note about ftp.stanford.edu failing. 
> If you didn't pass 4/5 subtests, something else is wrong.
> 
> -Matt
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ps1 q3
Date: Thu, 19 Jan 2006 17:02:03 -0800
Lines: 7
Distribution: su
Message-ID: <dqpcqf$pal$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9590

This is more of an office-hour type question.

I fail to see how the average size of the queue (512 kbytes) is relevant 
to this question. Is there a way someone can explain it to me without 
giving away too much?

Thanks.
.

Path: shelby.stanford.edu!elaine3.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Problem Set 1 -  submission time
Date: Thu, 19 Jan 2006 17:03:39 -0800
Lines: 8
Distribution: su
Message-ID: <Pine.GSO.4.44.0601191700120.20732-100000@elaine3.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9591

	can the submission time of Friday's first problem set  be
pushed up a couple of hours to be at the time of the TA session.
	This could save some a trip to campus before noon, and then
another at 2:15 for the TA session,

- Miguel


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ps1 q3
Date: Thu, 19 Jan 2006 17:11:33 -0800
Organization: Stanford University
Lines: 12
Distribution: su
Message-ID: <20060119171133.155d3352@ballpoint>
References: <dqpcqf$pal$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9592

Really?  I thought that the packet size was irrelevant.

On Thu, 19 Jan 2006 17:02:03 -0800
Naeim Semsarilar <naeim@stanford.edu> wrote:

> This is more of an office-hour type question.
> 
> I fail to see how the average size of the queue (512 kbytes) is relevant 
> to this question. Is there a way someone can explain it to me without 
> giving away too much?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 17:17:11 -0800
Lines: 34
Distribution: su
Message-ID: <dqpdmi$qfc$1@news.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint> <dqpale$n1b$1@news.Stanford.EDU> <dqpc0v$oet$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqpc0v$oet$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9593

It looks like ftp.stanford.edu is accepting the connection and then 
immediately closing it.  So when you do a read() expecting a reply, it 
should return 0 immediately, indicating that the connection closed.  I'm 
not sure why you're having a timeout... where is it waiting?

In any case, we won't be testing this (ftp server that immediately 
closes), so don't worry about it unless you want to.

Drew Willcoxon wrote:
> As a side note, what should a correct ftpcopy do when it tries to 
> connect to ftp.stanford?  Mine times out (making the test take a long 
> time), waiting for a server response.  Is that the proper behavior?  I 
> notice that running ftp says "421 Service not available, remote server 
> has closed connection," and sftp says "Connection refused."
> 
> Thanks,
> Drew
> 
> Matt Falkenhagen wrote:
> 
>> Sorry, yes it's been down for some time.  Unfortunately, modifying the 
>> test scripts has proven to be a non-trivial problem, and we will not 
>> be able to do it for this assignment.
>>
>> We've alerted ITSS about the problem and hopefully they will have 
>> ftp.stanford.edu up soon.
>>
>> In the meantime, you can still run tests, just ignore errors caused by 
>> ftp.stanford.edu.   The only tests that will fail because of 
>> ftp.stanford.edu alone are C, D, E, and F.2 and each will say "(passed 
>> only 4 out of 5 subtests)" with a note about ftp.stanford.edu failing. 
>> If you didn't pass 4/5 subtests, something else is wrong.
>>
>> -Matt
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS1, Q3b
Date: Thu, 19 Jan 2006 17:19:38 -0800
Organization: Stanford University
Lines: 3
Distribution: su
Message-ID: <20060119171938.4d942243@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9594

Should we assume that the buffer is still averaging 512 kbytes, or
should we assume that the router still has the same output rate as part
a?  Or am I totally missing the idea?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ps1 q3
Date: Thu, 19 Jan 2006 17:26:14 -0800
Lines: 11
Distribution: su
Message-ID: <dqpe7f$r3h$1@news.Stanford.EDU>
References: <dqpcqf$pal$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqpcqf$pal$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9595

Why would it be irrelevant?  The average arrival rate and average buffer 
size would seem to be related in some way...

Naeim Semsarilar wrote:
> This is more of an office-hour type question.
> 
> I fail to see how the average size of the queue (512 kbytes) is relevant 
> to this question. Is there a way someone can explain it to me without 
> giving away too much?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q3b
Date: Thu, 19 Jan 2006 17:28:07 -0800
Lines: 6
Distribution: su
Message-ID: <dqpeb0$r3h$2@news.Stanford.EDU>
References: <20060119171938.4d942243@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060119171938.4d942243@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9596

Yep, you can assume it's still averaging 512 kbytes.

David Reiss wrote:
> Should we assume that the buffer is still averaging 512 kbytes, or
> should we assume that the router still has the same output rate as part
> a?  Or am I totally missing the idea?
.

Path: shelby.stanford.edu!not-for-mail
From: Alex Li <alexli@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Testing Script Error
Date: Thu, 19 Jan 2006 17:28:23 -0800
Lines: 7
Distribution: su
Message-ID: <dqpebp$r6o$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9597

Test record directory /afs/ir/class/cs244a/grading_script/student/alexli 
does not exist!

How do I get a directory created?

Thanks,
Alex
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS1, Q4
Date: Thu, 19 Jan 2006 17:31:30 -0800
Organization: Stanford University
Lines: 11
Distribution: su
Message-ID: <20060119173130.448ff442@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9598

Three questions about number 4:

1) Is it okay to assume that the data, header, and checksum can share
packet space (i.e.: the first packet might contain both the header and
some file data, and the last packet might contain both file data and the
checksum)?

2) If not, is it okay to assume that H <= P and C <= P?

3) Is G the gap between the end of one packet and the start of the next,
or the minimum gap between the start of one packet and the next?
.

Path: shelby.stanford.edu!elaine33.Stanford.EDU!sunnyb
From: Ramesh Balwani <sunnyb@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Server cant open data connection to my port
Date: Thu, 19 Jan 2006 17:35:06 -0800
Lines: 49
Distribution: su
Message-ID: <Pine.GSO.4.44.0601191732120.8407-100000@elaine33.Stanford.EDU>
References: <BFF4F97C.2BFE%sunnybalwani@hotmail.com> <dqp8pb$kq9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqp8pb$kq9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9599

I get the same message when executing the code on leland machines.

Address on controlSocket is : 171.64.15.85
port on controlSocket is 41272
Address on dataSocket is : 171.64.15.85
port on dataSocket is 41277
PORT 171,64,15,85,161,61
200 PORT command successful.

LIST
425 Can't build data connection: Connection refused.

would appreciate any help.
thanks.

On Thu, 19 Jan 2006, Matt Falkenhagen wrote:

> I'm guessing you have some sort of firewall preventing an incoming
> connection from the server.  Have you tried running your code on the
> leland machines?
>
> -Matt
>
> It looks like you're running this on
> Sunny Balwani wrote:
> > Hi.  After issuing the PORT command, the server cant connect to my data
> > port.  Here is the output from printf statement right before I issue LIST
> > command. All of my bind and listen calls are setup properly and return
> > properly. Would appreciate any pointers to what am I doing wrong.
> >
> >
> > Address of ftp server is : 10.0.1.5
> > port of ftp server is 21
> >
> > Address on dataSocket is : 10.0.1.2
> > port on dataSocket is 53340
> >
> > PORT 10,0,1,2,208,92
> > 200 PORT command successful.
> >
> > LIST
> > 150 Opening ASCII mode data connection for /bin/ls.
> > 425 Can't open data connection.
> >
> > Thanks in advance.
> > Sunny.
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: G Corrado<gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q3b
Date: Fri, 20 Jan 2006 01:40:35 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: <dqpf2j$rol$1@news.Stanford.EDU>
References: <20060119171938.4d942243@ballpoint>
Content-Type: text/plain
X-Complaints-To: news@news.stanford.edu
 
User-Agent: OSXnews 2.07
Xref: shelby.stanford.edu su.class.cs244a:9600


I also assumed that the average amount of data in the router was still
512 kbytes in order to know what to do for 3B...  but the more I think
about it I wonder if that's really what they intended.

David Reiss <dreiss@stanford.edu> wrote:
>Should we assume that the buffer is still averaging 512 kbytes, or
>should we assume that the router still has the same output rate as part
>a?  Or am I totally missing the idea?



-- 


.

Path: shelby.stanford.edu!not-for-mail
From: G Corrado<gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q3b
Date: Fri, 20 Jan 2006 01:41:32 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: <dqpf4c$rol$2@news.Stanford.EDU>
References: <20060119171938.4d942243@ballpoint> <dqpf2j$rol$1@news.Stanford.EDU>
Content-Type: text/plain
X-Complaints-To: news@news.stanford.edu
 
User-Agent: OSXnews 2.07
Xref: shelby.stanford.edu su.class.cs244a:9601


nevermind...

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ps1 q3
Date: Thu, 19 Jan 2006 17:54:33 -0800
Lines: 18
Distribution: su
Message-ID: <dqpfst$t2t$1@news.Stanford.EDU>
References: <dqpcqf$pal$1@news.Stanford.EDU> <dqpe7f$r3h$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqpe7f$r3h$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9602

Is the buffer FCFS?
Am I correct to say that when a packet comes in, it must wait, on 
average, 10 ms for the average 512kbytes of data in front of it in the 
queue to be sent out on the outlink?


Matt Falkenhagen wrote:
> Why would it be irrelevant?  The average arrival rate and average buffer 
> size would seem to be related in some way...
> 
> Naeim Semsarilar wrote:
>> This is more of an office-hour type question.
>>
>> I fail to see how the average size of the queue (512 kbytes) is 
>> relevant to this question. Is there a way someone can explain it to me 
>> without giving away too much?
>>
>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: G Corrado<gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q4
Date: Fri, 20 Jan 2006 01:58:42 +0000 (UTC)
Lines: 24
Distribution: su
Message-ID: <dqpg4i$t6m$1@news.Stanford.EDU>
References: <20060119173130.448ff442@ballpoint>
Content-Type: text/plain
X-Complaints-To: news@news.stanford.edu
 
User-Agent: OSXnews 2.07
Xref: shelby.stanford.edu su.class.cs244a:9603


(1) and (2):  i think it says EACH packet contains the header and the
checksum, which implies (H+C) < P.
(3) good question.  i assumed the later, but i'm interested in seeing
what the TAs have to say.

David Reiss <dreiss@stanford.edu> wrote:
>Three questions about number 4:
>
>1) Is it okay to assume that the data, header, and checksum can share
>packet space (i.e.: the first packet might contain both the header and
>some file data, and the last packet might contain both file data and the
>checksum)?
>
>2) If not, is it okay to assume that H <= P and C <= P?
>
>3) Is G the gap between the end of one packet and the start of the next,
>or the minimum gap between the start of one packet and the next?



-- 


.

Path: shelby.stanford.edu!not-for-mail
From: G Corrado<gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q4
Date: Fri, 20 Jan 2006 02:01:28 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: <dqpg9n$t6m$2@news.Stanford.EDU>
References: <20060119173130.448ff442@ballpoint> <dqpg4i$t6m$1@news.Stanford.EDU>
Content-Type: text/plain
X-Complaints-To: news@news.stanford.edu
 
User-Agent: OSXnews 2.07
Xref: shelby.stanford.edu su.class.cs244a:9604


>(1) and (2):  i think it says EACH packet contains the header and the
>checksum, which implies (H+C) < P.

on second thought, it looks more like each packet has H + C + P bits.


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing Script Error
Date: Thu, 19 Jan 2006 18:02:18 -0800
Lines: 11
Distribution: su
Message-ID: <dqpgat$1f$1@news.Stanford.EDU>
References: <dqpebp$r6o$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqpebp$r6o$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9605

Haha, you probably didn't sign up for a TA or just did recently.  It 
should work now.

Alex Li wrote:
> Test record directory /afs/ir/class/cs244a/grading_script/student/alexli 
> does not exist!
> 
> How do I get a directory created?
> 
> Thanks,
> Alex
.

Path: shelby.stanford.edu!not-for-mail
From: "Nick Cooper" <nacooper@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem set 1, #8
Date: Thu, 19 Jan 2006 18:08:24 -0800
Lines: 21
Distribution: su
Message-ID: <dqpgn3$pl$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9606

Are there any contraints on the constants? For example, can we have p = 0? 
Or are the constants constrained to values that would result in a stable 
queue?

Thanks,
Nick

"Megan Anneke Wachs" <wachs@stanford.edu> wrote in message 
news:Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU...
> The formulation of the problem doesn't quite make sense to me...
>
> if for any process t2-t1, sigma bits can arrive, this seems that the
> arrival rate
> could be infinite as tau gets really small (<<1). Is tau constrained to be
> an increment of 1 second?
>
> Thanks,
> Megan
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Silly error
Date: Thu, 19 Jan 2006 18:16:14 -0800
Lines: 15
Distribution: su
Message-ID: <dqph5e$16b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9607

I get the following compiler error when compiling the line:

FILE *fd = fopen( info.name, "wb" );

ftpretrieve.c: In function `copy_file':
ftpretrieve.c:121: error: `fd' undeclared (first use in this function)
ftpretrieve.c:121: error: (Each undeclared identifier is reported only once
ftpretrieve.c:121: error: for each function it appears in.)
make: *** [ftpretrieve.o] Error 1

I'm quite sure that <stdio.h> is included, because I'm using fprintf's 
and printf's among other things. Anyone have any ideas as to what could 
be causing this error?

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Problem Set #1, Q4
Date: Thu, 19 Jan 2006 18:24:01 -0800
Lines: 5
Distribution: su
Message-ID: <dqphk1$1b4$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9609

Do we need to consider a case when L is divisible by P? In that case, 
we don't have any leftover bits.

Thank you,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Silly error
Date: Thu, 19 Jan 2006 19:00:46 -0800
Lines: 20
Distribution: su
Message-ID: <dqpjou$5km$1@news.Stanford.EDU>
References: <dqph5e$16b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqph5e$16b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9610

nm, I knew it was silly.

Jens

Jens Pillgram-Larsen wrote:
> I get the following compiler error when compiling the line:
> 
> FILE *fd = fopen( info.name, "wb" );
> 
> ftpretrieve.c: In function `copy_file':
> ftpretrieve.c:121: error: `fd' undeclared (first use in this function)
> ftpretrieve.c:121: error: (Each undeclared identifier is reported only once
> ftpretrieve.c:121: error: for each function it appears in.)
> make: *** [ftpretrieve.o] Error 1
> 
> I'm quite sure that <stdio.h> is included, because I'm using fprintf's 
> and printf's among other things. Anyone have any ideas as to what could 
> be causing this error?
> 
> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS1 Q5b
Date: Thu, 19 Jan 2006 19:09:16 -0800
Organization: Stanford University
Lines: 4
Distribution: su
Message-ID: <20060119190916.487cbf70@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9611

For question 5b, should we assume that there are 5 packets ahead of it
when the first bit arrives, or when the last bit arrives?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS1, Q4
Date: Thu, 19 Jan 2006 20:04:29 -0800
Lines: 20
Distribution: su
Message-ID: <dqpnfe$9p7$1@news.Stanford.EDU>
References: <20060119173130.448ff442@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060119173130.448ff442@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9612

David Reiss wrote:
> Three questions about number 4:
> 
> 1) Is it okay to assume that the data, header, and checksum can share
> packet space (i.e.: the first packet might contain both the header and
> some file data, and the last packet might contain both file data and the
> checksum)?

EVERY packet you send has a header and checksum added to it before 
transmission.  I.e., each packet (but the last) has P bits of the file, 
H bits of header, and C bits of checksum.

> 
> 2) If not, is it okay to assume that H <= P and C <= P?
> 
> 3) Is G the gap between the end of one packet and the start of the next,
> or the minimum gap between the start of one packet and the next?


G is the between end of one and start of the next.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem Set #1, Q4
Date: Thu, 19 Jan 2006 20:07:16 -0800
Lines: 9
Distribution: su
Message-ID: <dqpnkl$9p7$2@news.Stanford.EDU>
References: <dqphk1$1b4$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqphk1$1b4$3@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9613

It is certainly possible, but I don't see why you'd need to consider the 
case separately... you can derive one expression that works for both cases.

Michi Mutsuzaki wrote:
> Do we need to consider a case when L is divisible by P? In that case, we 
> don't have any leftover bits.
> 
> Thank you,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS1 Q5b
Date: Thu, 19 Jan 2006 20:12:42 -0800
Lines: 8
Distribution: su
Message-ID: <dqpnuq$abp$1@news.Stanford.EDU>
References: <20060119190916.487cbf70@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060119190916.487cbf70@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9614

Go ahead and do when the last bit arrives, but if you've already done it 
the other way just state your assumption.

David Reiss wrote:
> For question 5b, should we assume that there are 5 packets ahead of it
> when the first bit arrives, or when the last bit arrives?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 20:12:52 -0800
Lines: 12
Distribution: su
Message-ID: <dqpnvb$aau$1@news.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint> <dqpale$n1b$1@news.Stanford.EDU> <dqpc0v$oet$1@news.Stanford.EDU> <dqpdmi$qfc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqpdmi$qfc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9615

Oops, I was only checking if read() < 0, not <= 0.  Duh.  Thanks!

Drew

Matt Falkenhagen wrote:
> It looks like ftp.stanford.edu is accepting the connection and then 
> immediately closing it.  So when you do a read() expecting a reply, it 
> should return 0 immediately, indicating that the connection closed.  I'm 
> not sure why you're having a timeout... where is it waiting?
> 
> In any case, we won't be testing this (ftp server that immediately 
> closes), so don't worry about it unless you want to.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ps1 q3
Date: Thu, 19 Jan 2006 20:16:08 -0800
Lines: 23
Distribution: su
Message-ID: <dqpo58$aj9$1@news.Stanford.EDU>
References: <dqpcqf$pal$1@news.Stanford.EDU> <dqpe7f$r3h$1@news.Stanford.EDU> <dqpfst$t2t$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqpfst$t2t$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9616

Yes, it's FIFO.  Your statement looks correct.

Naeim Semsarilar wrote:
> Is the buffer FCFS?
> Am I correct to say that when a packet comes in, it must wait, on 
> average, 10 ms for the average 512kbytes of data in front of it in the 
> queue to be sent out on the outlink?
> 
> 
> Matt Falkenhagen wrote:
> 
>> Why would it be irrelevant?  The average arrival rate and average 
>> buffer size would seem to be related in some way...
>>
>> Naeim Semsarilar wrote:
>>
>>> This is more of an office-hour type question.
>>>
>>> I fail to see how the average size of the queue (512 kbytes) is 
>>> relevant to this question. Is there a way someone can explain it to 
>>> me without giving away too much?
>>>
>>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Nick Puz <npuz@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: problems submission for scpd students
Date: Thu, 19 Jan 2006 20:24:13 -0800
Lines: 50
Distribution: su
Message-ID: <dqpola$b91$1@news.Stanford.EDU>
References: <dqlrs5$dec$1@news.Stanford.EDU> <dqol4e$q97$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqol4e$q97$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9617

I am a scpd student also. I called Frank Maldonado (Distribution 
Supervisor) earlier today and he said that we could either:
- fax the assignments to scpd.
- email the assignments in pdf format to scpd.

The pdf forms are at: http://scpd.stanford.edu/scpd/support/
He said to use either route form but i'm going to use the remote on: 
http://scpd.stanford.edu/scpd/downloads/remoteRouteForm.pdf

The fax number and email address (to email to or to ask for 
confirmation) is on the bottom of that form.

This page has the official info: 
http://scpd.stanford.edu/scpd/students/courseMater.htm

The most important thing to note is that we have to do it by noon for it 
to count as being recieved on that date:

> Submitting Homework: *
> Local and Remote students should fax homework to (650) 736-1266 or (650) 725-4138. If you are unable to fax because of color, graphs, etc., please mail to:
> SCPD
> 496 Lomita Mall
> Durand Bldg. 4th floor, room 410
> Stanford, CA. 94305
> or email homework to scpd-distribution@lists.stanford.edu
> 
> SCPD will date-stamp and log all incoming homework. Homework will be delivered to the departments between 1:00 pm and 2:00 pm daily. Faxed homework received after 12:00 noon will be delivered the next business day.


hope this help,
-nick
Matt Falkenhagen wrote:
> No, for problem sets, you only need to submit to SCPD.
> 
> Michael Lam wrote:
> 
>> Pardon my question for the non scpd students.
>> From the scpd students orientation, we were told that when submitting
>> assignments, send one to the scpd dept, and one to the normal class
>> channel (which would be Judy).  However, since the instruction for
>> going to Judy is to leave it under the door, can we submit via email?
>>
>> Matt is my assigned TA.  Does it mean he will grade my problem set?
>> Is it possible that I email my problem set solution to the TA?
>>
>> I am just trying to find a way of submitting without coming to campus.
>>
>> Thanks.
>>
>> -Michael
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem set 1, #8
Date: Thu, 19 Jan 2006 20:28:29 -0800
Lines: 28
Distribution: su
Message-ID: <dqpoth$bcs$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU> <dqpgn3$pl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqpgn3$pl$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9618

You can assume that p > 0.

Ari

Nick Cooper wrote:
> Are there any contraints on the constants? For example, can we have p = 0? 
> Or are the constants constrained to values that would result in a stable 
> queue?
> 
> Thanks,
> Nick
> 
> "Megan Anneke Wachs" <wachs@stanford.edu> wrote in message 
> news:Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU...
> 
>>The formulation of the problem doesn't quite make sense to me...
>>
>>if for any process t2-t1, sigma bits can arrive, this seems that the
>>arrival rate
>>could be infinite as tau gets really small (<<1). Is tau constrained to be
>>an increment of 1 second?
>>
>>Thanks,
>>Megan
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: John Pau <jpau@stanford.edu>
Newsgroups: su.class.cs244a
Subject: memory mapped files
Date: Thu, 19 Jan 2006 20:31:44 -0800
Lines: 6
Distribution: su
Message-ID: <dqpp3h$ba1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9619

Hi,

Is it okay to use memory mapped files in assignment 1?

Thanks,
John
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Server cant open data connection to my port
Date: Thu, 19 Jan 2006 20:37:56 -0800
Lines: 67
Distribution: su
Message-ID: <dqppe0$btg$1@news.Stanford.EDU>
References: <BFF4F97C.2BFE%sunnybalwani@hotmail.com> <dqp8pb$kq9$1@news.Stanford.EDU> <Pine.GSO.4.44.0601191732120.8407-100000@elaine33.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601191732120.8407-100000@elaine33.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9620

Hrm, it's a mystery then.

What have you done to try to debug this?  Have you tried with, say, 
ftp.cs.stanford.edu or have you just been testing with your own ftpd? 
It looked like before you were running ftpcopy and the ftp server on 
your own network; try using ethereal or tcpdump to examine network 
traffic if you can.

See if you can manually connect to the port you're listening on.  I.e., 
after setting up the listening socket and sending the PORT commamd, 
instead of sending LIST, just have ftpcopy sleep for several seconds, 
while you open a new terminal and try to telnet to that port.  If all is 
set up correctly, it should say "Connected to blah blah blah". 
Otherwise, you know something's wrong with your socket code...

Ramesh Balwani wrote:
> I get the same message when executing the code on leland machines.
> 
> Address on controlSocket is : 171.64.15.85
> port on controlSocket is 41272
> Address on dataSocket is : 171.64.15.85
> port on dataSocket is 41277
> PORT 171,64,15,85,161,61
> 200 PORT command successful.
> 
> LIST
> 425 Can't build data connection: Connection refused.
> 
> would appreciate any help.
> thanks.
> 
> On Thu, 19 Jan 2006, Matt Falkenhagen wrote:
> 
> 
>>I'm guessing you have some sort of firewall preventing an incoming
>>connection from the server.  Have you tried running your code on the
>>leland machines?
>>
>>-Matt
>>
>>It looks like you're running this on
>>Sunny Balwani wrote:
>>
>>>Hi.  After issuing the PORT command, the server cant connect to my data
>>>port.  Here is the output from printf statement right before I issue LIST
>>>command. All of my bind and listen calls are setup properly and return
>>>properly. Would appreciate any pointers to what am I doing wrong.
>>>
>>>
>>>Address of ftp server is : 10.0.1.5
>>>port of ftp server is 21
>>>
>>>Address on dataSocket is : 10.0.1.2
>>>port on dataSocket is 53340
>>>
>>>PORT 10,0,1,2,208,92
>>>200 PORT command successful.
>>>
>>>LIST
>>>150 Opening ASCII mode data connection for /bin/ls.
>>>425 Can't open data connection.
>>>
>>>Thanks in advance.
>>>Sunny.
>>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: memory mapped files
Date: Thu, 19 Jan 2006 20:39:08 -0800
Lines: 9
Distribution: su
Message-ID: <dqppg8$btj$1@news.Stanford.EDU>
References: <dqpp3h$ba1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqpp3h$ba1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9621

Sure.

John Pau wrote:
> Hi,
> 
> Is it okay to use memory mapped files in assignment 1?
> 
> Thanks,
> John
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem Set 1 -  submission time
Date: Thu, 19 Jan 2006 20:48:49 -0800
Lines: 25
Distribution: su
Message-ID: <dqpq2c$d1e$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601191700120.20732-100000@elaine3.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601191700120.20732-100000@elaine3.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9622

In case anyone missed Prof McKeown's email, this request has been granted:

Folks,

Someone asked if - since he will be coming to Gates for 2.15pm for the 
discussion section - he can turn in PS#1 at 2pm instead. This seems 
quite reasonable to me. So....
           The deadline for PS#1 is 2pm Friday, instead of 12noon.

Remember to deliver it to Judy Polenta's office in Gates 351 (just down 
the corridor from my office).

Thanks,
- Nick


Miguel Sanchez wrote:
> 	can the submission time of Friday's first problem set  be
> pushed up a couple of hours to be at the time of the TA session.
> 	This could save some a trip to campus before noon, and then
> another at 2:15 for the TA session,
> 
> - Miguel
> 
> 
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 20:50:14 -0800
Lines: 40
Distribution: su
Message-ID: <Pine.GSO.4.44.0601192049260.29100-100000@elaine40.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint> <dqpale$n1b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqpale$n1b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9623

What about test I?  My output was:

Test I [out of 0.5]
Checks that ftpcopy matches required UI specification.

Results:  SOMEWHAT OK (passed only 4 out of 5 subtests)

Program output (ftp.stanford.edu, expected "OK: 61734 bytes copied":
***Timeout expired during grading


-Wai Kei

On Thu, 19 Jan 2006, Matt Falkenhagen wrote:

> Sorry, yes it's been down for some time.  Unfortunately, modifying the
> test scripts has proven to be a non-trivial problem, and we will not be
> able to do it for this assignment.
>
> We've alerted ITSS about the problem and hopefully they will have
> ftp.stanford.edu up soon.
>
> In the meantime, you can still run tests, just ignore errors caused by
> ftp.stanford.edu.   The only tests that will fail because of
> ftp.stanford.edu alone are C, D, E, and F.2 and each will say "(passed
> only 4 out of 5 subtests)" with a note about ftp.stanford.edu failing.
> If you didn't pass 4/5 subtests, something else is wrong.
>
> -Matt
>
>
> David Reiss wrote:
> > As far as I can tell, ftp.stanford.edu has been unavailable for two full
> > days now.  In my case, that is five tests that I have been unable to
> > use.  Is it possible to get a modified test script that uses some other
> > test case in place of ftp.stanford.edu?  Thanks.
> >
> > --David
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 21:17:46 -0800
Lines: 46
Distribution: su
Message-ID: <dqprog$efp$1@news.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint> <dqpale$n1b$1@news.Stanford.EDU> <Pine.GSO.4.44.0601192049260.29100-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601192049260.29100-100000@elaine40.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9624

That looks fine.  Probably anything involving passing 4/5 subtests and 
ftp.stanford.edu is not your fault.

Wai Kei So wrote:
> What about test I?  My output was:
> 
> Test I [out of 0.5]
> Checks that ftpcopy matches required UI specification.
> 
> Results:  SOMEWHAT OK (passed only 4 out of 5 subtests)
> 
> Program output (ftp.stanford.edu, expected "OK: 61734 bytes copied":
> ***Timeout expired during grading
> 
> 
> -Wai Kei
> 
> On Thu, 19 Jan 2006, Matt Falkenhagen wrote:
> 
> 
>>Sorry, yes it's been down for some time.  Unfortunately, modifying the
>>test scripts has proven to be a non-trivial problem, and we will not be
>>able to do it for this assignment.
>>
>>We've alerted ITSS about the problem and hopefully they will have
>>ftp.stanford.edu up soon.
>>
>>In the meantime, you can still run tests, just ignore errors caused by
>>ftp.stanford.edu.   The only tests that will fail because of
>>ftp.stanford.edu alone are C, D, E, and F.2 and each will say "(passed
>>only 4 out of 5 subtests)" with a note about ftp.stanford.edu failing.
>>If you didn't pass 4/5 subtests, something else is wrong.
>>
>>-Matt
>>
>>
>>David Reiss wrote:
>>
>>>As far as I can tell, ftp.stanford.edu has been unavailable for two full
>>>days now.  In my case, that is five tests that I have been unable to
>>>use.  Is it possible to get a modified test script that uses some other
>>>test case in place of ftp.stanford.edu?  Thanks.
>>>
>>>--David
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Bind()
Date: Thu, 19 Jan 2006 22:54:20 -0800
Lines: 9
Distribution: su
Message-ID: <BFF5C91C.2C4D%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Bind()
Thread-Index: AcYdjlZ5lRkLjImBEdqKxAARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:9625

Hi.

When we call the Bind for a data connection socket (after socket() and
before listen()) , do we need to specify the server IP address in sin_addr
or do we just leave it zeros. (sin_port is 0).

Thanks in advance for help.
Sunny.

.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Thu, 19 Jan 2006 22:54:15 -0800
Lines: 30
Distribution: su
Message-ID: <dqq1en$ker$1@news.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint> <dqpale$n1b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <dqpale$n1b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9626

Matt Falkenhagen wrote:
> Sorry, yes it's been down for some time.  Unfortunately, modifying the 
> test scripts has proven to be a non-trivial problem, and we will not be 
> able to do it for this assignment.
> 
> We've alerted ITSS about the problem and hopefully they will have 
> ftp.stanford.edu up soon.
> 
> In the meantime, you can still run tests, just ignore errors caused by 
> ftp.stanford.edu.   The only tests that will fail because of 
> ftp.stanford.edu alone are C, D, E, and F.2 and each will say "(passed 
> only 4 out of 5 subtests)" with a note about ftp.stanford.edu failing. 
> If you didn't pass 4/5 subtests, something else is wrong.

Won't all 3 of the purify tests (the last 3 tests) give "NOT TESTED" as 
well? Since the test script is calling ftpcopy.purify against 
ftp.stanford.edu also.

> 
> -Matt
> 
> 
> David Reiss wrote:
> 
>> As far as I can tell, ftp.stanford.edu has been unavailable for two full
>> days now.  In my case, that is five tests that I have been unable to
>> use.  Is it possible to get a modified test script that uses some other
>> test case in place of ftp.stanford.edu?  Thanks.
>>
>> --David
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Bind()
Date: Fri, 20 Jan 2006 00:13:14 -0800
Lines: 71
Distribution: su
Message-ID: <dqq62v$rmo$1@news.Stanford.EDU>
References: <BFF5C91C.2C4D%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <BFF5C91C.2C4D%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:9627

You should specify the server IP address. This is the same IP address as 
the local address of the control connection, so you can use getsockname 
to get the ip address. There's a post from the 2004 newsgroup that has 
sample code to do this:

  /* -------------------------------------------------------- */

     struct  sockaddr_in ctrl_addr; /* connected to server */
     struct  sockaddr_in data_addr; /* used to get local IP */
     int     datas, ctrls;  /* couple' o file descriptors */
     int     one = 1; /* the number one ... don't ask */
     int     len = 0;

     /* -- connect to server ... ftp.microsoft.com in this case -- */
       ctrls = socket(AF_INET, SOCK_STREAM, 0);

       memset((char *)&ctrl_addr, 0, sizeof (ctrl_addr));
       ctrl_addr.sin_addr.s_addr = inet_addr("207.46.133.140");
       ctrl_addr.sin_family = AF_INET;
       ctrl_addr.sin_port = htons(21);

       if (connect(ctrls, (struct sockaddr *)&ctrl_addr, sizeof 
(ctrl_addr)) ==
               -1)
       { perror("connect"); return -1; }
     /* -- done connecting to ftp.microsoft.com                 -- */

     memset((char *)&data_addr, 0, sizeof(struct sockaddr_in));

     /* -- get local socket info on connected socket -- */
     len = sizeof(data_addr);
     if( getsockname(ctrls, (struct sockaddr *)&data_addr, &len) == -1)
     { perror("getsockname"); return -1; }

     /* -- now we create a new socket to bind and read the addr from -- */
      datas = socket(AF_INET, SOCK_STREAM, 0);

      if( setsockopt(datas, SOL_SOCKET, SO_REUSEADDR, (char *)&one, 
sizeof (one))
              == -1)
      { perror("setsockupt"); return -1; }

      data_addr.sin_port = 0;
      if ( bind(datas, (struct sockaddr *)&data_addr, sizeof 
(data_addr)) == -1)
      { perror("bind"); return -1; }
     /* -- done binding local socket -- */

     len = sizeof (data_addr);
     if ( getsockname(datas, (struct sockaddr *)&data_addr, &len) == -1 )
     { perror("getsockname"); return -1; }

     printf(" Address: %s\n", inet_ntoa(data_addr.sin_addr));
     /* -- TADA! -- */


The important thing to note is that the IP address for data_addr (the 
second argument to bind) is populated by the call to getsockname.

Ari

Sunny Balwani wrote:
> Hi.
> 
> When we call the Bind for a data connection socket (after socket() and
> before listen()) , do we need to specify the server IP address in sin_addr
> or do we just leave it zeros. (sin_port is 0).
> 
> Thanks in advance for help.
> Sunny.
> 
.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!ptarjan
From: Paul Nicholas George Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem set 1, #8
Date: Fri, 20 Jan 2006 00:28:02 -0800
Lines: 48
Distribution: su
Message-ID: <Pine.GSO.4.44.0601200025340.8163-100000@elaine13.Stanford.EDU>
References: <Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU>
 <dqpgn3$pl$1@news.Stanford.EDU> <dqpoth$bcs$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqpoth$bcs$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9628

I'm still lost on this.

If the constants are arbitrary, then you can pick 10000000000000000000000
for each of them and get any arrival rate you want, but if we must have a
stable router, then the answer is just input rate = output rate, which
seems way too easy.

Similarly for the other parts, with arbitrary constants the questions can
be any arbitrary answer, and with a stable router seems way too easy.

Any constraints would be nice.

Thanks

Paul

On Thu, 19 Jan 2006, Ari Greenberg wrote:

> You can assume that p > 0.
>
> Ari
>
> Nick Cooper wrote:
> > Are there any contraints on the constants? For example, can we have p = 0?
> > Or are the constants constrained to values that would result in a stable
> > queue?
> >
> > Thanks,
> > Nick
> >
> > "Megan Anneke Wachs" <wachs@stanford.edu> wrote in message
> > news:Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU...
> >
> >>The formulation of the problem doesn't quite make sense to me...
> >>
> >>if for any process t2-t1, sigma bits can arrive, this seems that the
> >>arrival rate
> >>could be infinite as tau gets really small (<<1). Is tau constrained to be
> >>an increment of 1 second?
> >>
> >>Thanks,
> >>Megan
> >>
> >
> >
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script errors on first try
Date: Fri, 20 Jan 2006 02:02:52 -0800
Lines: 33
Distribution: su
Message-ID: <dqqcg6$4sm$1@news.Stanford.EDU>
References: <dqnjml$mna$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9629

nm, i had a wrapper around it.  thx matt!

"Waynn Lue" <wlue@stanford.edu> wrote in message
news:dqnjml$mna$1@news.Stanford.EDU...
> When I run the testscript for the first time after changing the code, it
> seems to complete all the operations, and then I get these errors, and no
> output about any of the tests:
>
> /usr/pubsw/bin/cat: grading_src/build/.purify: No such file or directory
> /usr/pubsw/bin/cat: grading_src/build/Makefile: No such file or directory
> /usr/pubsw/bin/cat: grading_src/build/echodemo.c: No such file or
directory
> /usr/pubsw/bin/cat: grading_src/build/errors.c: No such file or directory
> /usr/pubsw/bin/cat: grading_src/build/ftpcopy.c: No such file or directory
> /usr/pubsw/bin/cat: grading_src/build/ftpparse.c: No such file or
directory
> /usr/pubsw/bin/cat: grading_src/build/ftpparse.h: No such file or
directory
> /usr/pubsw/bin/cat: grading_src/build/purify.output: No such file or
> directory
> Could not open submitted file!
> couldn't submit code for testing
>
> When I run it again right afterwards, it works perfectly fine and gives me
> output on each of the tests.  Is it not correctly copying the files over,
or
> am I screwing something up?
>
> Waynn
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: non-existant local directories
Date: Fri, 20 Jan 2006 02:33:47 -0800
Lines: 18
Distribution: su
Message-ID: <dqqebh$69v$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:9630

In the problem statement it says:

" You may assume that the local directory already exists; exit with an error 
if it does not. "

However, in the grading script, this case seems to come up often where the 
initial local directory doesn't exist.  Wouldn't it be better to attempt to 
create the user-specified local directory if it doesn't exist and error if 
the creation isn't possible?

If instead, we error if the local directory doesn't exist, then the script 
prints out the following warning:

warning:  ftpcopy failed with exit code 1 (waitpid status 256)

What would you have us do? 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: server replies with 500
Date: Fri, 20 Jan 2006 09:17:05 -0800
Lines: 27
Distribution: su
Message-ID: <dqr5ub$io$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9631

Hi
when I try to login and send commands to the server, it works fine with 
ftp.cs.stanford.edu but when I send them to ftp.microsoft.com I get the 
following repiles:

220 Microsoft FTP Service

sending USER anonymous

 500 '': command not understood

sending PASS forumm@elaine13.Stanford.EDU

500 '': command not understood

sending PORT 171,64,15,78,168,49

500 '': command not understood



can anybody tell me the reason for such behavior..

thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: server replies with 500
Date: Fri, 20 Jan 2006 09:23:26 -0800
Lines: 34
Distribution: su
Message-ID: <43D11C8E.8050800@stanford.edu>
References: <dqr5ub$io$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9632

I had some of these when my command was incopmlete or wasnt followed by 
a CRLF

Sesha

Forum Mangal Parmar wrote:
> Hi
> when I try to login and send commands to the server, it works fine with 
> ftp.cs.stanford.edu but when I send them to ftp.microsoft.com I get the 
> following repiles:
> 
> 220 Microsoft FTP Service
> 
> sending USER anonymous
> 
>  500 '': command not understood
> 
> sending PASS forumm@elaine13.Stanford.EDU
> 
> 500 '': command not understood
> 
> sending PORT 171,64,15,78,168,49
> 
> 500 '': command not understood
> 
> 
> 
> can anybody tell me the reason for such behavior..
> 
> thanks
> Forum 
> 
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert@NOSPAM.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Does NVT max len (1024 bytes) include '\0' char?
Date: Fri, 20 Jan 2006 10:52:56 -0800
Lines: 11
Distribution: su
Message-ID: <dqrbif$7bc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9633

 From the assignment:

" In this assignment you can assume that no NVT string will be longer 
than 1024 bytes. "

Does that maximum length include a spot for a null terminus?  I.e. would 
a "maximal" NVT String be 1023 bytes of text/whitespace, leaving one 
spot for the null char, or would it be 1024 bytes of non-null characters?

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Does NVT max len (1024 bytes) include '\0' char?
Date: Fri, 20 Jan 2006 11:23:41 -0800
Lines: 16
Distribution: su
Message-ID: <dqrdbv$9hd$1@news.Stanford.EDU>
References: <dqrbif$7bc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqrbif$7bc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9634

Well, strictly speaking an NVT line is (typically) not null-terminated, 
it just ends with \r\n.  So I'd say the null-terminator isn't included 
in the 1024.

Daniel Holbert wrote:
>  From the assignment:
> 
> " In this assignment you can assume that no NVT string will be longer 
> than 1024 bytes. "
> 
> Does that maximum length include a spot for a null terminus?  I.e. would 
> a "maximal" NVT String be 1023 bytes of text/whitespace, leaving one 
> spot for the null char, or would it be 1024 bytes of non-null characters?
> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Problem set 1, #8
Date: Fri, 20 Jan 2006 11:44:30 -0800
Lines: 57
Distribution: su
Message-ID: <dqrej1$ak5$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU> <dqpgn3$pl$1@news.Stanford.EDU> <dqpoth$bcs$1@news.Stanford.EDU> <Pine.GSO.4.44.0601200025340.8163-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601200025340.8163-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9635

Well, the answer should be given in terms of sigma and rou (p).

Ari



Paul Nicholas George Tarjan wrote:
> I'm still lost on this.
> 
> If the constants are arbitrary, then you can pick 10000000000000000000000
> for each of them and get any arrival rate you want, but if we must have a
> stable router, then the answer is just input rate = output rate, which
> seems way too easy.
> 
> Similarly for the other parts, with arbitrary constants the questions can
> be any arbitrary answer, and with a stable router seems way too easy.
> 
> Any constraints would be nice.
> 
> Thanks
> 
> Paul
> 
> On Thu, 19 Jan 2006, Ari Greenberg wrote:
> 
> 
>>You can assume that p > 0.
>>
>>Ari
>>
>>Nick Cooper wrote:
>>
>>>Are there any contraints on the constants? For example, can we have p = 0?
>>>Or are the constants constrained to values that would result in a stable
>>>queue?
>>>
>>>Thanks,
>>>Nick
>>>
>>>"Megan Anneke Wachs" <wachs@stanford.edu> wrote in message
>>>news:Pine.LNX.4.44.0601181739110.19526-100000@myth9.Stanford.EDU...
>>>
>>>
>>>>The formulation of the problem doesn't quite make sense to me...
>>>>
>>>>if for any process t2-t1, sigma bits can arrive, this seems that the
>>>>arrival rate
>>>>could be infinite as tau gets really small (<<1). Is tau constrained to be
>>>>an increment of 1 second?
>>>>
>>>>Thanks,
>>>>Megan
>>>>
>>>
>>>
>>>
> 
.

Path: shelby.stanford.edu!saga16.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: hanging on login
Date: Fri, 20 Jan 2006 12:04:09 -0800
Lines: 30
Distribution: su
Message-ID: <Pine.GSO.4.44.0601201159410.7031-100000@saga16.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9636

Has anyone else had this problem? I can connect fine to ftp.microsoft.com,
but for any other server (ftp.cs.stanford.edu, ftp.slac.stanford.edu,
ftp.cs.brown.edu) I either hang or am rejected when asked for password.
For example,

331 Anonymous login ok, send your complete email address as your password.

writing PASS wachs@saga16.Stanford.EDU

wrote.
reading...

this hangs on read(),

but for ftp.cs.brown.edu I get:

331 Guest login ok, send your complete e-mail address as password.

writing PASS wachs@saga16.Stanford.EDU
wrote.
reading...

530 Please login with USER and PASS.


Any ideas?
Thanks!

Megan

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: 550 Permission denied error
Date: Fri, 20 Jan 2006 13:47:39 -0800
Lines: 12
Distribution: su
Message-ID: <BFF69A7B.2C74%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: 550 Permission denied error
Thread-Index: AcYeCyH3YGzjDon+EdqeOQARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:9637

Hi.

When I try to ftp a file that I don't have permissions to, I get an 550
error such as the following from ftp.intel.com

550 README.intel: Permission denied.

However, after this error, it also closes my socket.  Is that expected
behavior or am I doing something wrong.

Thanks in advance.

.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: warning: implicit declearation of function strdup
Date: Fri, 20 Jan 2006 14:50:42 -0800
Lines: 5
Distribution: su
Message-ID: <43D16942.8050005@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9638

How can I suppress this? I have both <string.h> and <strings.h> included.

Thanks,
Sesha

.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert@NOSPAM.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Retrying after a 4xx reply
Date: Fri, 20 Jan 2006 15:25:04 -0800
Lines: 15
Distribution: su
Message-ID: <dqrrgp$p5q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9639

How should we deal with 4xx replies ("The command failed and should be 
retried later")?   I see two possible reactions to 4xx reply messages:

Option 1. immediately retry the preceding command, repeating it up to N 
times if you continue getting 4xx replies, and then quit w/ error 
condition if it never succeeds

Option 2. Immediately quit w/ error condition after the first time you 
get a 4xx reply

Am I safe to stick with option 2, or do you require that we retry the 
command?

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.stanford.edu Revisited
Date: Fri, 20 Jan 2006 17:30:49 -0800
Lines: 43
Distribution: su
Message-ID: <dqs2sc$42t$1@news.Stanford.EDU>
References: <20060119151302.7d6b1b51@ballpoint> <dqpale$n1b$1@news.Stanford.EDU> <dqq1en$ker$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqq1en$ker$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9640

Yes, you're right.

I've taken ftp.stanford.edu out of the other tests (everything but the 
last three tests: M, N, O) so that shouldn't give problems anymore.

As for the last three, they will say NOT TESTED.  This probably won't be 
fixed in time, but this is something you should be testing manually 
anyway.  Run your ftpcopy.purify and have it actually transfer files and 
see purify catches any errors.

Hau Jia Chew wrote:
> Matt Falkenhagen wrote:
> 
>> Sorry, yes it's been down for some time.  Unfortunately, modifying the 
>> test scripts has proven to be a non-trivial problem, and we will not 
>> be able to do it for this assignment.
>>
>> We've alerted ITSS about the problem and hopefully they will have 
>> ftp.stanford.edu up soon.
>>
>> In the meantime, you can still run tests, just ignore errors caused by 
>> ftp.stanford.edu.   The only tests that will fail because of 
>> ftp.stanford.edu alone are C, D, E, and F.2 and each will say "(passed 
>> only 4 out of 5 subtests)" with a note about ftp.stanford.edu failing. 
>> If you didn't pass 4/5 subtests, something else is wrong.
> 
> 
> Won't all 3 of the purify tests (the last 3 tests) give "NOT TESTED" as 
> well? Since the test script is calling ftpcopy.purify against 
> ftp.stanford.edu also.
> 
>>
>> -Matt
>>
>>
>> David Reiss wrote:
>>
>>> As far as I can tell, ftp.stanford.edu has been unavailable for two full
>>> days now.  In my case, that is five tests that I have been unable to
>>> use.  Is it possible to get a modified test script that uses some other
>>> test case in place of ftp.stanford.edu?  Thanks.
>>>
>>> --David
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftpparse reply
Date: Fri, 20 Jan 2006 18:17:03 -0800
Lines: 9
Distribution: su
Message-ID: <dqs5io$6pj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9641

For ['flagtrycwd', 'flagtryretr'] = [1, 1]: most likely a link (could be 
either a file or a directory)

how do we know if its a link/file/directory?

thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: "Ram" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: README format
Date: Fri, 20 Jan 2006 20:01:16 -0800
Lines: 8
Distribution: su
Message-ID: <dqsbmc$c73$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9642

Hi,

Is there any specific requirements for the contents of the writeup like what 
exactly we should discuss, or the max/min length etc? Thanks.

Ram 


.

Path: shelby.stanford.edu!myth7.Stanford.EDU!lerhaupt
From: Gary Scott Lerhaupt <lerhaupt@stanford.edu>
Newsgroups: su.class.cs244a
Subject: accepting data connection from 0.0.0.0
Date: Fri, 20 Jan 2006 20:11:11 -0800
Lines: 16
Distribution: su
Message-ID: <Pine.LNX.4.44.0601202007080.12836-100000@myth7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9643

I'm a bit baffled here.  I successfully bind(), listen(), send a PORT,
send a LIST and accept() but then when I try to read from the data
connection I get ENOTCONN (134).

What is strange to me is that accept() succeeds but examining the ip of
the connecting system it says its 0.0.0.0

PORT STRING 171,64,15,107,184,79
200 PORT command successful
150 Opening ASCII mode data connection for file list
server: got connection from 0.0.0.0

Thoughts?

Gary

.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: About local directory
Date: Fri, 20 Jan 2006 21:48:33 -0800
Lines: 7
Distribution: su
Message-ID: <dqshvf$hmq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9644

 From the assignment, it said "You may assume that the local directory 
already exists; exit with an error if it does not." Does that mean if we 
want to copy "/D1/D2/f.gz" from ftp server, we can assume we already 
have "/D1/D2" on our local server? in another word, we don't need to 
create directory at all?

thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test on little-endian machines
Date: Fri, 20 Jan 2006 22:44:50 -0800
Lines: 15
Distribution: su
Message-ID: <dqsl91$knp$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:9645

Will our code be tested on little-endian machines (e.g. Linux boxes like
Raptor)?

I tried compiling my code on Raptor and got the following error messages:

'S_IREAD' undeclared (first use in this function)
`S_IWRITE' undeclared (first use in this function)
`S_IEXEC' undeclared (first use in this function)

I recall that these errors were resolved once I #include'ed <sys/stats.h>
before compiling on Solaris machines. Do you know how I can resolve these
errors on Raptors? Or should I not care about running my code on Linux
altogether?


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Edge cases
Date: Fri, 20 Jan 2006 22:54:36 -0800
Lines: 5
Distribution: su
Message-ID: <dqslra$ld1$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:9646

Will the following cases be tested while grading?
- Unresponsive server forces socket connection to time out
- Server unable to process FTP requests (i.e. server is down)


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Response code
Date: Fri, 20 Jan 2006 23:04:17 -0800
Lines: 11
Distribution: su
Message-ID: <dqsmdf$lpd$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:9647

Is it fair to interpret the assignment's requirement regarding response
codes as follows?

- If response code is 1xx or 2xx or 3xx, then proceed with operations
- If response code is 4xx, simply quit the program
- If response code is 5xx but not 550, quit the program
- If response code is 550 (which means permission to access file is denied),
silently ignore this response and proceed with the immediately following
operations


.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test on little-endian machines
Date: Fri, 20 Jan 2006 23:09:53 -0800
Lines: 33
Distribution: su
Message-ID: <dqsmo2$lvt$1@news.Stanford.EDU>
References: <dqsl91$knp$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9648

You could manually define synonyms:

#ifndef S_IREAD
#define S_IREAD S_IRUSR
#endif

#ifndef S_IWRITE
#define S_IWRITE S_IWUSR
#endif

#ifndef S_IEXEC
#define S_IEXEC S_IXUSR
#endif

"Robbie Yan" <xyan@stanford.edu> wrote in message 
news:dqsl91$knp$1@news.Stanford.EDU...
> Will our code be tested on little-endian machines (e.g. Linux boxes like
> Raptor)?
>
> I tried compiling my code on Raptor and got the following error messages:
>
> 'S_IREAD' undeclared (first use in this function)
> `S_IWRITE' undeclared (first use in this function)
> `S_IEXEC' undeclared (first use in this function)
>
> I recall that these errors were resolved once I #include'ed <sys/stats.h>
> before compiling on Solaris machines. Do you know how I can resolve these
> errors on Raptors? Or should I not care about running my code on Linux
> altogether?
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: About local directory
Date: Fri, 20 Jan 2006 23:11:18 -0800
Lines: 14
Distribution: su
Message-ID: <dqsmqn$m3d$1@news.Stanford.EDU>
References: <dqshvf$hmq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9649

I think they are talking about the initial local directory, i.e. argv[4]. 
You still have to create subdirectories as necessary.

"alex qi" <alexqi@stanford.edu> wrote in message 
news:dqshvf$hmq$1@news.Stanford.EDU...
> From the assignment, it said "You may assume that the local directory 
> already exists; exit with an error if it does not." Does that mean if we 
> want to copy "/D1/D2/f.gz" from ftp server, we can assume we already have 
> "/D1/D2" on our local server? in another word, we don't need to create 
> directory at all?
>
> thanks. 


.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: accepting data connection from 0.0.0.0
Date: Fri, 20 Jan 2006 23:15:47 -0800
Lines: 29
Distribution: su
Message-ID: <dqsn34$md3$1@news.Stanford.EDU>
References: <Pine.LNX.4.44.0601202007080.12836-100000@myth7.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9650

Are you using the return value from accept() to when you are trying to read 
from the data connection? e.g.:

int dataConn = accept(dataSock, ...);
read(dataConn, ...);

if you try to read from dataSock instead of dataConn, I think you would get 
ENOTCONN.

"Gary Scott Lerhaupt" <lerhaupt@stanford.edu> wrote in message 
news:Pine.LNX.4.44.0601202007080.12836-100000@myth7.Stanford.EDU...
> I'm a bit baffled here.  I successfully bind(), listen(), send a PORT,
> send a LIST and accept() but then when I try to read from the data
> connection I get ENOTCONN (134).
>
> What is strange to me is that accept() succeeds but examining the ip of
> the connecting system it says its 0.0.0.0
>
> PORT STRING 171,64,15,107,184,79
> 200 PORT command successful
> 150 Opening ASCII mode data connection for file list
> server: got connection from 0.0.0.0
>
> Thoughts?
>
> Gary
> 


.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine13.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: 501 Illegal PORT command
Date: Fri, 20 Jan 2006 23:51:39 -0800
Lines: 51
Distribution: su
Message-ID: <Pine.GSO.4.44.0601202341220.16739-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9651

Hi Guys,

As my friend Gary so eloquently puts it, I'm having a case of the 501
blues.

I can connect fine to ftp.microsoft.com:

bash-2.04$ ./ftpcopy txt 1 ftp.microsoft.com
220 Microsoft FTP Service
--- USER anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
--- PASS ptrlee@stanford.edu
230-Welcome to ftp.microsoft.com.  Please also visit
http://www.microsoft.com/downloads.
230 Anonymous user logged in.
--- TYPE A N
200 Type set to A.
--- PORT 171,64,15,78,203,52008
200 PORT command successful.
--- LIST .
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
OK: 0 bytes copied

But when I try ftp.slac.stanford.edu, it rejects my PORT command:

230-Please read the file README.outgoing
230-   it was last modified on Mon Mar 10 12:52:44 2003 - 1048
230-Please read the file README.tip_inbox
230    it was last modified on Fri Jul  6 15:09:28 2001 - 1660
--- TYPE A N
200 Type set to A
--- PORT 171,64,15,78,203,52011
501 Illegal PORT command


I've tried to consider several possibilities, including setting the
TCP_NODELAY flag or seeing if somehow the string is malformed.  It
seems like I'm sending the correct number of bytes, and the command is
terminated with "\r\n", which were several possibilities mentioned on the
newsgroup.

One thing I've been thinking is that maybe there's an endian issue in how
I print the address and port to the string.

Well, if anybody has any insight / help / suggestions, I would really
appreciate it.

Thanks,
Peter

.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: contorl socket dies?
Date: Fri, 20 Jan 2006 23:59:55 -0800
Lines: 22
Distribution: su
Message-ID: <dqspp6$qks$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9652

Hi,

I have been testing my code on ftp.fedworld.gov and got no problem. However,
once I ran my code on ftp.cs.stanford.edu I have a problem with not getting
226 reply code in control socket once I finished reading the list.

my steps are:

1) submit LIST command
2) read reply (got replycode 150)
3) accept()
4) read data from data socket
5) read reply

at the last step, my code just blocks. It stops at command read() from the
control socket? does anyone has any idea? or did I perform any wrong step? I 
think my control socket probably died. is there any missing step I need to 
know about opening a data socket?

Thanks very much 


.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine13.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: 501 Illegal PORT command
Date: Sat, 21 Jan 2006 00:12:31 -0800
Lines: 65
Distribution: su
Message-ID: <Pine.GSO.4.44.0601210008410.17705-100000@elaine13.Stanford.EDU>
References: <Pine.GSO.4.44.0601202341220.16739-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0601202341220.16739-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9653


So I found my problem:  I was saving the port num as an unsigned short and
had a bug in the bit shifting to get the bytes back out.  In hindsight,
the 10^4 value for the last byte of the port num should have tipped me off
that something was wrong.

-- Peter

(I wonder why it worked for ftp.microsoft.com?)

On Fri, 20 Jan 2006, Peter In Lee wrote:

> Hi Guys,
>
> As my friend Gary so eloquently puts it, I'm having a case of the 501
> blues.
>
> I can connect fine to ftp.microsoft.com:
>
> bash-2.04$ ./ftpcopy txt 1 ftp.microsoft.com
> 220 Microsoft FTP Service
> --- USER anonymous
> 331 Anonymous access allowed, send identity (e-mail name) as password.
> --- PASS ptrlee@stanford.edu
> 230-Welcome to ftp.microsoft.com.  Please also visit
> http://www.microsoft.com/downloads.
> 230 Anonymous user logged in.
> --- TYPE A N
> 200 Type set to A.
> --- PORT 171,64,15,78,203,52008
> 200 PORT command successful.
> --- LIST .
> 150 Opening ASCII mode data connection for /bin/ls.
> 226 Transfer complete.
> OK: 0 bytes copied
>
> But when I try ftp.slac.stanford.edu, it rejects my PORT command:
>
> 230-Please read the file README.outgoing
> 230-   it was last modified on Mon Mar 10 12:52:44 2003 - 1048
> 230-Please read the file README.tip_inbox
> 230    it was last modified on Fri Jul  6 15:09:28 2001 - 1660
> --- TYPE A N
> 200 Type set to A
> --- PORT 171,64,15,78,203,52011
> 501 Illegal PORT command
>
>
> I've tried to consider several possibilities, including setting the
> TCP_NODELAY flag or seeing if somehow the string is malformed.  It
> seems like I'm sending the correct number of bytes, and the command is
> terminated with "\r\n", which were several possibilities mentioned on the
> newsgroup.
>
> One thing I've been thinking is that maybe there's an endian issue in how
> I print the address and port to the string.
>
> Well, if anybody has any insight / help / suggestions, I would really
> appreciate it.
>
> Thanks,
> Peter
>
>

.

Path: shelby.stanford.edu!elaine41.Stanford.EDU!qli1
From: Qing Li <qli1@stanford.edu>
Newsgroups: su.class.cs244a
Subject: purify link error and exe warning
Date: Sat, 21 Jan 2006 00:18:02 -0800
Lines: 16
Distribution: su
Message-ID: <Pine.GSO.4.44.0601210005370.24-100000@elaine41.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9654

Hi,
When I built by make ftpcopy.purify, I got the error:
"Instrumenting: Purify engine: Error: Tried to link with directory
(/usr/lib): skipping"
and when I run test script, Test M N O purify related test case could not
get passed. I got the
error message: "Could not run purify'e exe: Purify engine: Warning:
Cannot find a file which matches the DT_SONAME field ... Using
/usr/lib/nss_files.so.1 instead."

I really get confused with the message. Can sb help me to figure out
what's wrong with this?
Thanks,
Qing


.

Path: shelby.stanford.edu!myth7.Stanford.EDU!lerhaupt
From: Gary Scott Lerhaupt <lerhaupt@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: accepting data connection from 0.0.0.0
Date: Sat, 21 Jan 2006 02:01:10 -0800
Lines: 35
Distribution: su
Message-ID: <Pine.LNX.4.44.0601210200590.12836-100000@myth7.Stanford.EDU>
References: <Pine.LNX.4.44.0601202007080.12836-100000@myth7.Stanford.EDU>
 <dqsn34$md3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqsn34$md3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9655

thanks!

On Fri, 20 Jan 2006, Jesse Young wrote:

> Are you using the return value from accept() to when you are trying to read
> from the data connection? e.g.:
>
> int dataConn = accept(dataSock, ...);
> read(dataConn, ...);
>
> if you try to read from dataSock instead of dataConn, I think you would get
> ENOTCONN.
>
> "Gary Scott Lerhaupt" <lerhaupt@stanford.edu> wrote in message
> news:Pine.LNX.4.44.0601202007080.12836-100000@myth7.Stanford.EDU...
> > I'm a bit baffled here.  I successfully bind(), listen(), send a PORT,
> > send a LIST and accept() but then when I try to read from the data
> > connection I get ENOTCONN (134).
> >
> > What is strange to me is that accept() succeeds but examining the ip of
> > the connecting system it says its 0.0.0.0
> >
> > PORT STRING 171,64,15,107,184,79
> > 200 PORT command successful
> > 150 Opening ASCII mode data connection for file list
> > server: got connection from 0.0.0.0
> >
> > Thoughts?
> >
> > Gary
> >
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Ram" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: contorl socket dies?
Date: Sat, 21 Jan 2006 04:07:21 -0800
Lines: 33
Distribution: su
Message-ID: <dqt85t$c2h$1@news.Stanford.EDU>
References: <dqspp6$qks$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9656

Between steps 4 and 5, you should close your data connection. For some 
strange reason, ftp.cs.stanford.edu only sends a reply after you close your 
data connection.

Ram

"Sutthipong Thavisomboon" <sthavis@stanford.edu> wrote in message 
news:dqspp6$qks$1@news.Stanford.EDU...
> Hi,
>
> I have been testing my code on ftp.fedworld.gov and got no problem. 
> However,
> once I ran my code on ftp.cs.stanford.edu I have a problem with not 
> getting
> 226 reply code in control socket once I finished reading the list.
>
> my steps are:
>
> 1) submit LIST command
> 2) read reply (got replycode 150)
> 3) accept()
> 4) read data from data socket
> 5) read reply
>
> at the last step, my code just blocks. It stops at command read() from the
> control socket? does anyone has any idea? or did I perform any wrong step? 
> I think my control socket probably died. is there any missing step I need 
> to know about opening a data socket?
>
> Thanks very much
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Reading from the control socket byte by byte
Date: Sat, 21 Jan 2006 07:57:39 -0600
Lines: 25
Distribution: su
Message-ID: <dqtekk$il1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9657

This years faq has an entry that says:
Q4. I'm having trouble while read()ing from a socket. My program just hangs.

A. Read on a blocking socket will block when there is no data left to read. 
You should read the FTP RFC for a method to deal with this situation. The 
shutdown() method used in the example is not the right way to handle this 
problem, you can not shutdown a socket then reopen it. Possible solutions 
would be, (1) you can use non-blocking sockets (which we have not discussed) 
or (2) use blocking sockets but send one command at a time, and read the 
reply character by character while parsing it to know when the reply is 
complete. If you are using a blocking socket and you read the full reply 
then try to read again, your program will hang indefinitly since the server 
will not send you more characters until you send it a new command.

By the Powerpoint slides lists, under "Even more ways to lose points", 
reading byte by byte as overly inefficient and hacky.  Given that a 
relatively small amount of data is coming out of the control port, can we 
justify doing byte-wise reads?  Obviously, this make no sense for the data 
port.

Thanks,

Roy


.

Path: shelby.stanford.edu!saga16.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: contorl socket dies?
Date: Sat, 21 Jan 2006 06:52:05 -0800
Lines: 41
Distribution: su
Message-ID: <Pine.GSO.4.44.0601210651590.20440-100000@saga16.Stanford.EDU>
References: <dqspp6$qks$1@news.Stanford.EDU> <dqt85t$c2h$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqt85t$c2h$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9658

ram, you are my hero.

-Megan

On Sat, 21 Jan 2006, Ram wrote:

> Between steps 4 and 5, you should close your data connection. For some
> strange reason, ftp.cs.stanford.edu only sends a reply after you close your
> data connection.
>
> Ram
>
> "Sutthipong Thavisomboon" <sthavis@stanford.edu> wrote in message
> news:dqspp6$qks$1@news.Stanford.EDU...
> > Hi,
> >
> > I have been testing my code on ftp.fedworld.gov and got no problem.
> > However,
> > once I ran my code on ftp.cs.stanford.edu I have a problem with not
> > getting
> > 226 reply code in control socket once I finished reading the list.
> >
> > my steps are:
> >
> > 1) submit LIST command
> > 2) read reply (got replycode 150)
> > 3) accept()
> > 4) read data from data socket
> > 5) read reply
> >
> > at the last step, my code just blocks. It stops at command read() from the
> > control socket? does anyone has any idea? or did I perform any wrong step?
> > I think my control socket probably died. is there any missing step I need
> > to know about opening a data socket?
> >
> > Thanks very much
> >
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: non-existant local directories
Date: Sat, 21 Jan 2006 10:05:09 -0800
Lines: 25
Distribution: su
Message-ID: <dqtt4o$1ri$1@news.Stanford.EDU>
References: <dqqebh$69v$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqqebh$69v$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9659

I don't think this comes up in the grading script.  The warning was 
probably because of the ftp.stanford.edu mess.  Do you still see it?

In any case, the handout is pretty clear that you should exit with 
error, so if you do that you won't get penalized.

Brent Ellwein wrote:
> In the problem statement it says:
> 
> " You may assume that the local directory already exists; exit with an error 
> if it does not. "
> 
> However, in the grading script, this case seems to come up often where the 
> initial local directory doesn't exist.  Wouldn't it be better to attempt to 
> create the user-specified local directory if it doesn't exist and error if 
> the creation isn't possible?
> 
> If instead, we error if the local directory doesn't exist, then the script 
> prints out the following warning:
> 
> warning:  ftpcopy failed with exit code 1 (waitpid status 256)
> 
> What would you have us do? 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: File Permission
Date: Sat, 21 Jan 2006 09:57:18 -0800
Lines: 19
Distribution: su
Message-ID: <dqtt6r$20p$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9660

Hi,

In the assignment page, I see "If you encounter a file which you cannot 
access due to permissions, you should skip over it without creating it 
locally or producing any error message. Do not create a null-size file with 
the same name. " I'm not sure what it really means. What does it exactly 
mean?

1. Are we getting wrong file permission from the server? (meaning we can't 
retrieve it from the server due to permission)

OR

2. We can't overwrite the file locally due to permissions?

Thanks
Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hanging on login
Date: Sat, 21 Jan 2006 10:07:22 -0800
Lines: 33
Distribution: su
Message-ID: <dqtt8u$1ri$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601201159410.7031-100000@saga16.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601201159410.7031-100000@saga16.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9661

I'm guessing this is a \r\n problem?

Megan Anneke Wachs wrote:
> Has anyone else had this problem? I can connect fine to ftp.microsoft.com,
> but for any other server (ftp.cs.stanford.edu, ftp.slac.stanford.edu,
> ftp.cs.brown.edu) I either hang or am rejected when asked for password.
> For example,
> 
> 331 Anonymous login ok, send your complete email address as your password.
> 
> writing PASS wachs@saga16.Stanford.EDU
> 
> wrote.
> reading...
> 
> this hangs on read(),
> 
> but for ftp.cs.brown.edu I get:
> 
> 331 Guest login ok, send your complete e-mail address as password.
> 
> writing PASS wachs@saga16.Stanford.EDU
> wrote.
> reading...
> 
> 530 Please login with USER and PASS.
> 
> 
> Any ideas?
> Thanks!
> 
> Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 550 Permission denied error
Date: Sat, 21 Jan 2006 10:09:59 -0800
Lines: 27
Distribution: su
Message-ID: <dqttdr$1ri$3@news.Stanford.EDU>
References: <BFF69A7B.2C74%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <BFF69A7B.2C74%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:9662

I've never heard of an ftp server doing this.  When I try with the Unix 
ftp client it doesn't happen:

ftp> get README.intel
200 PORT command successful.
550 README.intel: Permission denied.
ftp>
ftp> get README.intel
200 PORT command successful.
550 README.intel: Permission denied.

Are you talking about the control or data socket?  What makes you think 
it is being closed?

Sunny Balwani wrote:
> Hi.
> 
> When I try to ftp a file that I don't have permissions to, I get an 550
> error such as the following from ftp.intel.com
> 
> 550 README.intel: Permission denied.
> 
> However, after this error, it also closes my socket.  Is that expected
> behavior or am I doing something wrong.
> 
> Thanks in advance.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: warning: implicit declearation of function strdup
Date: Sat, 21 Jan 2006 10:13:15 -0800
Lines: 13
Distribution: su
Message-ID: <dqttjv$1ri$4@news.Stanford.EDU>
References: <43D16942.8050005@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <43D16942.8050005@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:9663

strdup although in string.h is not an ANSI C function so it won't be 
included with -ansi (see thread "using snprintf" 1/14/2006 11:40 AM).

Again to fix make your own prototype for strdup:

extern char *strdup(const char *s1);

Sesha Narahari wrote:
> How can I suppress this? I have both <string.h> and <strings.h> included.
> 
> Thanks,
> Sesha
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Retrying after a 4xx reply
Date: Sat, 21 Jan 2006 10:19:01 -0800
Lines: 18
Distribution: su
Message-ID: <dqttup$1ri$5@news.Stanford.EDU>
References: <dqrrgp$p5q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqrrgp$p5q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9664

We don't expect you to retry, option 2 is fine.

Daniel Holbert wrote:
> How should we deal with 4xx replies ("The command failed and should be 
> retried later")?   I see two possible reactions to 4xx reply messages:
> 
> Option 1. immediately retry the preceding command, repeating it up to N 
> times if you continue getting 4xx replies, and then quit w/ error 
> condition if it never succeeds
> 
> Option 2. Immediately quit w/ error condition after the first time you 
> get a 4xx reply
> 
> Am I safe to stick with option 2, or do you require that we retry the 
> command?
> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpparse reply
Date: Sat, 21 Jan 2006 10:19:47 -0800
Lines: 14
Distribution: su
Message-ID: <dqtu06$1ri$6@news.Stanford.EDU>
References: <dqs5io$6pj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqs5io$6pj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9665

Please see thread "ftpparse() determining symlinks?" started 1/15/2006 
4:40 PM.


Forum Mangal Parmar wrote:
> For ['flagtrycwd', 'flagtryretr'] = [1, 1]: most likely a link (could be 
> either a file or a directory)
> 
> how do we know if its a link/file/directory?
> 
> thanks
> Forum 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: README format
Date: Sat, 21 Jan 2006 10:21:26 -0800
Lines: 13
Distribution: su
Message-ID: <dqtu39$1ri$7@news.Stanford.EDU>
References: <dqsbmc$c73$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqsbmc$c73$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9666

See "CS244a Programming Assignment Rules and Guidelines" 
(http://www.stanford.edu/class/cs244a/project_guidelines.html) for more 
information about this.  There are no specific requirements for length.

Ram wrote:
> Hi,
> 
> Is there any specific requirements for the contents of the writeup like what 
> exactly we should discuss, or the max/min length etc? Thanks.
> 
> Ram 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: About local directory
Date: Sat, 21 Jan 2006 10:22:23 -0800
Lines: 19
Distribution: su
Message-ID: <dqtu53$1ri$8@news.Stanford.EDU>
References: <dqshvf$hmq$1@news.Stanford.EDU> <dqsmqn$m3d$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqsmqn$m3d$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9667

Yes, that's correct.

Jesse Young wrote:
> I think they are talking about the initial local directory, i.e. argv[4]. 
> You still have to create subdirectories as necessary.
> 
> "alex qi" <alexqi@stanford.edu> wrote in message 
> news:dqshvf$hmq$1@news.Stanford.EDU...
> 
>>From the assignment, it said "You may assume that the local directory 
>>already exists; exit with an error if it does not." Does that mean if we 
>>want to copy "/D1/D2/f.gz" from ftp server, we can assume we already have 
>>"/D1/D2" on our local server? in another word, we don't need to create 
>>directory at all?
>>
>>thanks. 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test on little-endian machines
Date: Sat, 21 Jan 2006 10:28:14 -0800
Lines: 20
Distribution: su
Message-ID: <dqtug2$391$1@news.Stanford.EDU>
References: <dqsl91$knp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqsl91$knp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9668

We don't require your code to compile on Linux because of things like this.

However your code shouldn't assume an endianness.

Robbie Yan wrote:
> Will our code be tested on little-endian machines (e.g. Linux boxes like
> Raptor)?
> 
> I tried compiling my code on Raptor and got the following error messages:
> 
> 'S_IREAD' undeclared (first use in this function)
> `S_IWRITE' undeclared (first use in this function)
> `S_IEXEC' undeclared (first use in this function)
> 
> I recall that these errors were resolved once I #include'ed <sys/stats.h>
> before compiling on Solaris machines. Do you know how I can resolve these
> errors on Raptors? Or should I not care about running my code on Linux
> altogether?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Response code
Date: Sat, 21 Jan 2006 10:32:58 -0800
Lines: 16
Distribution: su
Message-ID: <dqtuou$3fr$1@news.Stanford.EDU>
References: <dqsmdf$lpd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqsmdf$lpd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9669

Not really.  How to deal with responses depends on the request sent. 
See the RFC sections 5.4.  SEQUENCING OF COMMANDS AND REPLIES and 6. 
STATE DIAGRAMS.

Robbie Yan wrote:
> Is it fair to interpret the assignment's requirement regarding response
> codes as follows?
> 
> - If response code is 1xx or 2xx or 3xx, then proceed with operations
> - If response code is 4xx, simply quit the program
> - If response code is 5xx but not 550, quit the program
> - If response code is 550 (which means permission to access file is denied),
> silently ignore this response and proceed with the immediately following
> operations
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify link error and exe warning
Date: Sat, 21 Jan 2006 10:37:54 -0800
Lines: 21
Distribution: su
Message-ID: <dqtv26$3jk$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601210005370.24-100000@elaine41.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601210005370.24-100000@elaine41.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9670

This is all expected, see posts under "Purify" on 1/12/2006 9:08 AM and 
under "ftp.stanford.edu Revisited" on 1/20/2006 5:30 PM for more 
information.  Also I get that DT_SONAME message too, doesn't seem to matter.

Qing Li wrote:
> Hi,
> When I built by make ftpcopy.purify, I got the error:
> "Instrumenting: Purify engine: Error: Tried to link with directory
> (/usr/lib): skipping"
> and when I run test script, Test M N O purify related test case could not
> get passed. I got the
> error message: "Could not run purify'e exe: Purify engine: Warning:
> Cannot find a file which matches the DT_SONAME field ... Using
> /usr/lib/nss_files.so.1 instead."
> 
> I really get confused with the message. Can sb help me to figure out
> what's wrong with this?
> Thanks,
> Qing
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: File Permission
Date: Sat, 21 Jan 2006 10:41:39 -0800
Lines: 22
Distribution: su
Message-ID: <dqtv96$3jk$2@news.Stanford.EDU>
References: <dqtt6r$20p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqtt6r$20p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9671

The first one.

Sutthipong Thavisomboon wrote:
> Hi,
> 
> In the assignment page, I see "If you encounter a file which you cannot 
> access due to permissions, you should skip over it without creating it 
> locally or producing any error message. Do not create a null-size file with 
> the same name. " I'm not sure what it really means. What does it exactly 
> mean?
> 
> 1. Are we getting wrong file permission from the server? (meaning we can't 
> retrieve it from the server due to permission)
> 
> OR
> 
> 2. We can't overwrite the file locally due to permissions?
> 
> Thanks
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Edge cases
Date: Sat, 21 Jan 2006 11:05:43 -0800
Lines: 13
Distribution: su
Message-ID: <dqu0mb$560$1@news.Stanford.EDU>
References: <dqslra$ld1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqslra$ld1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9672

You definately need to check the return values of all calls, so e.g., if 
connect() times out you will catch the error.

However in the case of a server just not responding to a request you 
send, we don't expect you to handle it.  AFAIK if you're using blocking 
sockets you will just hang in read() indefinately.

Robbie Yan wrote:
> Will the following cases be tested while grading?
> - Unresponsive server forces socket connection to time out
> - Server unable to process FTP requests (i.e. server is down)
> 
> 
.

Path: shelby.stanford.edu!saga16.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hanging on login
Date: Sat, 21 Jan 2006 11:44:35 -0800
Lines: 41
Distribution: su
Message-ID: <Pine.GSO.4.44.0601211144150.26844-100000@saga16.Stanford.EDU>
References: <Pine.GSO.4.44.0601201159410.7031-100000@saga16.Stanford.EDU>
 <dqtt8u$1ri$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dqtt8u$1ri$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9673

It was actually because I was null terminating the strings after \r\n.
Thanks,
Megan
On
Sat, 21 Jan 2006, Matt Falkenhagen wrote:

> I'm guessing this is a \r\n problem?
>
> Megan Anneke Wachs wrote:
> > Has anyone else had this problem? I can connect fine to ftp.microsoft.com,
> > but for any other server (ftp.cs.stanford.edu, ftp.slac.stanford.edu,
> > ftp.cs.brown.edu) I either hang or am rejected when asked for password.
> > For example,
> >
> > 331 Anonymous login ok, send your complete email address as your password.
> >
> > writing PASS wachs@saga16.Stanford.EDU
> >
> > wrote.
> > reading...
> >
> > this hangs on read(),
> >
> > but for ftp.cs.brown.edu I get:
> >
> > 331 Guest login ok, send your complete e-mail address as password.
> >
> > writing PASS wachs@saga16.Stanford.EDU
> > wrote.
> > reading...
> >
> > 530 Please login with USER and PASS.
> >
> >
> > Any ideas?
> > Thanks!
> >
> > Megan
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: warning: implicit declearation of function strdup
Date: Sat, 21 Jan 2006 11:54:26 -0800
Lines: 18
Distribution: su
Message-ID: <43D29172.9080305@stanford.edu>
References: <43D16942.8050005@stanford.edu> <dqttjv$1ri$4@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9674

Thanks, Matt. That did it .

Matt Falkenhagen wrote:
> strdup although in string.h is not an ANSI C function so it won't be 
> included with -ansi (see thread "using snprintf" 1/14/2006 11:40 AM).
> 
> Again to fix make your own prototype for strdup:
> 
> extern char *strdup(const char *s1);
> 
> Sesha Narahari wrote:
> 
>> How can I suppress this? I have both <string.h> and <strings.h> included.
>>
>> Thanks,
>> Sesha
>>

.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Using code from 2004 newsgroup
Date: Sat, 21 Jan 2006 15:53:41 -0800
Lines: 7
Distribution: su
Message-ID: <dquhi6$jat$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9675

TA's,

Are we allowed to use the code published in the 2004 newsgroup. There 
are several snippets of code there that could be useful. And if it is 
ok, should I indicate this in my README and commments?

Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reading from the control socket byte by byte
Date: Sat, 21 Jan 2006 16:26:09 -0800
Lines: 32
Distribution: su
Message-ID: <dqujf5$kul$1@news.Stanford.EDU>
References: <dqtekk$il1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqtekk$il1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9676

Yeah, since the FAQ suggests it, we won't penalize you for byte-by-byte 
reads on the control connection.

However there are more elegant ways to do it (copying into a buffer or 
recv with MSG_PEEK).

Roy Zeighami wrote:
> This years faq has an entry that says:
> Q4. I'm having trouble while read()ing from a socket. My program just hangs.
> 
> A. Read on a blocking socket will block when there is no data left to read. 
> You should read the FTP RFC for a method to deal with this situation. The 
> shutdown() method used in the example is not the right way to handle this 
> problem, you can not shutdown a socket then reopen it. Possible solutions 
> would be, (1) you can use non-blocking sockets (which we have not discussed) 
> or (2) use blocking sockets but send one command at a time, and read the 
> reply character by character while parsing it to know when the reply is 
> complete. If you are using a blocking socket and you read the full reply 
> then try to read again, your program will hang indefinitly since the server 
> will not send you more characters until you send it a new command.
> 
> By the Powerpoint slides lists, under "Even more ways to lose points", 
> reading byte by byte as overly inefficient and hacky.  Given that a 
> relatively small amount of data is coming out of the control port, can we 
> justify doing byte-wise reads?  Obviously, this make no sense for the data 
> port.
> 
> Thanks,
> 
> Roy
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reading from the control socket byte by byte
Date: Sat, 21 Jan 2006 16:29:16 -0800
Lines: 40
Distribution: su
Message-ID: <dqujkt$l4s$1@news.Stanford.EDU>
References: <dqtekk$il1$1@news.Stanford.EDU> <dqujf5$kul$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dqujf5$kul$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9677

Does this mean that you will punish is for byte-by-byte reads on the 
data connection?

Jens.

Matt Falkenhagen wrote:
> Yeah, since the FAQ suggests it, we won't penalize you for byte-by-byte 
> reads on the control connection.
> 
> However there are more elegant ways to do it (copying into a buffer or 
> recv with MSG_PEEK).
> 
> Roy Zeighami wrote:
>> This years faq has an entry that says:
>> Q4. I'm having trouble while read()ing from a socket. My program just 
>> hangs.
>>
>> A. Read on a blocking socket will block when there is no data left to 
>> read. You should read the FTP RFC for a method to deal with this 
>> situation. The shutdown() method used in the example is not the right 
>> way to handle this problem, you can not shutdown a socket then reopen 
>> it. Possible solutions would be, (1) you can use non-blocking sockets 
>> (which we have not discussed) or (2) use blocking sockets but send one 
>> command at a time, and read the reply character by character while 
>> parsing it to know when the reply is complete. If you are using a 
>> blocking socket and you read the full reply then try to read again, 
>> your program will hang indefinitly since the server will not send you 
>> more characters until you send it a new command.
>>
>> By the Powerpoint slides lists, under "Even more ways to lose points", 
>> reading byte by byte as overly inefficient and hacky.  Given that a 
>> relatively small amount of data is coming out of the control port, can 
>> we justify doing byte-wise reads?  Obviously, this make no sense for 
>> the data port.
>>
>> Thanks,
>>
>> Roy
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Using code from 2004 newsgroup
Date: Sat, 21 Jan 2006 16:29:19 -0800
Lines: 13
Distribution: su
Message-ID: <dqujl4$kul$2@news.Stanford.EDU>
References: <dquhi6$jat$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dquhi6$jat$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9678

Snippets from previous years newsgroups are fine (assuming no one posted 
a solution to the "core" of the project).  Indicate clearly in your 
comments and README.  In fact you should do this for any code not 
written by you, or even written by you for another class/project.

Jens Pillgram-Larsen wrote:
> TA's,
> 
> Are we allowed to use the code published in the 2004 newsgroup. There 
> are several snippets of code there that could be useful. And if it is 
> ok, should I indicate this in my README and commments?
> 
> Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: .purify
Date: Sat, 21 Jan 2006 16:31:54 -0800
Lines: 4
Distribution: su
Message-ID: <dqujpq$l4s$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9679

I don't need any suppressions for my program. What should I put in the 
..purify file if that is the case?

Jens
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: .purify
Date: Sat, 21 Jan 2006 16:36:21 -0800
Lines: 7
Distribution: su
Message-ID: <dquk29$lje$1@news.Stanford.EDU>
References: <dqujpq$l4s$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqujpq$l4s$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9680

Just "touch .purify" to make an empty .purify file.

Jens Pillgram-Larsen wrote:
> I don't need any suppressions for my program. What should I put in the 
> .purify file if that is the case?
> 
> Jens
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Acceptable Global?
Date: Sat, 21 Jan 2006 16:39:07 -0800
Organization: Stanford University
Lines: 5
Distribution: su
Message-ID: <20060121163907.12bd2cc5@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9681

I have a macro that automatically checks return values from system
calls.  Because I sometimes also want to keep the return value (as in
"socket = CHECK_RET(sock, (args))").  It uses a variable to temporarily
store the return value.  For simplicity, I have made it a global.  Is
that okay, or do I need to restructure how that macro works?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reading from the control socket byte by byte
Date: Sat, 21 Jan 2006 16:38:06 -0800
Lines: 45
Distribution: su
Message-ID: <dquk5i$lje$2@news.Stanford.EDU>
References: <dqtekk$il1$1@news.Stanford.EDU> <dqujf5$kul$1@news.Stanford.EDU> <dqujkt$l4s$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqujkt$l4s$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9682

Yes, we reserve the right to punish for byte-by-byte on the data connection.

Jens Pillgram-Larsen wrote:
> Does this mean that you will punish is for byte-by-byte reads on the 
> data connection?
> 
> Jens.
> 
> Matt Falkenhagen wrote:
> 
>> Yeah, since the FAQ suggests it, we won't penalize you for 
>> byte-by-byte reads on the control connection.
>>
>> However there are more elegant ways to do it (copying into a buffer or 
>> recv with MSG_PEEK).
>>
>> Roy Zeighami wrote:
>>
>>> This years faq has an entry that says:
>>> Q4. I'm having trouble while read()ing from a socket. My program just 
>>> hangs.
>>>
>>> A. Read on a blocking socket will block when there is no data left to 
>>> read. You should read the FTP RFC for a method to deal with this 
>>> situation. The shutdown() method used in the example is not the right 
>>> way to handle this problem, you can not shutdown a socket then reopen 
>>> it. Possible solutions would be, (1) you can use non-blocking sockets 
>>> (which we have not discussed) or (2) use blocking sockets but send 
>>> one command at a time, and read the reply character by character 
>>> while parsing it to know when the reply is complete. If you are using 
>>> a blocking socket and you read the full reply then try to read again, 
>>> your program will hang indefinitly since the server will not send you 
>>> more characters until you send it a new command.
>>>
>>> By the Powerpoint slides lists, under "Even more ways to lose 
>>> points", reading byte by byte as overly inefficient and hacky.  Given 
>>> that a relatively small amount of data is coming out of the control 
>>> port, can we justify doing byte-wise reads?  Obviously, this make no 
>>> sense for the data port.
>>>
>>> Thanks,
>>>
>>> Roy
>>>
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: .purify
Date: Sat, 21 Jan 2006 16:57:11 -0800
Lines: 13
Distribution: su
Message-ID: <dqul98$mmp$1@news.Stanford.EDU>
References: <dqujpq$l4s$2@news.Stanford.EDU> <dquk29$lje$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dquk29$lje$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9683

That's what I tried. The grading script returned an error saying that 
the .purify file was not a text file.

Jens

Matt Falkenhagen wrote:
> Just "touch .purify" to make an empty .purify file.
> 
> Jens Pillgram-Larsen wrote:
>> I don't need any suppressions for my program. What should I put in the 
>> .purify file if that is the case?
>>
>> Jens
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Question about wrapper around write()
Date: Sat, 21 Jan 2006 17:13:30 -0800
Lines: 13
Distribution: su
Message-ID: <dqum7n$nev$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:9684

Is it necessary to implement a wrapper around the socket write() function
that ensures that all bytes fed into the socket are actually written on to
the wire? Review session last week mentioned that we should consider
implementing one. But since in assignment 1, strings that we write to the
FTP server are short, can we simply assume that any request to the server
can be written to the socket with one write() call? And if the number of
bytes written (returned from write()) mismatches the number of bytes we pass
into write(), can we assume that the system call has somehow malfunctioned
and immediately fault?

Thank you very much!


.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Question on empty file
Date: Sat, 21 Jan 2006 18:06:54 -0800
Lines: 7
Distribution: su
Message-ID: <dqupbv$q3f$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9685

When we see an empty file, are we supposed to skip it? or copy it with the 
zero length?

Thanks,
Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: .purify
Date: Sat, 21 Jan 2006 18:39:27 -0800
Lines: 23
Distribution: su
Message-ID: <dqur94$rqc$1@news.Stanford.EDU>
References: <dqujpq$l4s$2@news.Stanford.EDU> <dquk29$lje$1@news.Stanford.EDU> <dqul98$mmp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqul98$mmp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9686

Really weird, it works for me.  On the other hand, that's the error 
message I get when .purify doesn't exist...

If it still doesn't work, just make a .purify and put in some 
supressions to make the script happy.  You can take the ones from the 
Purify FAQ Q4.

Jens Pillgram-Larsen wrote:
> That's what I tried. The grading script returned an error saying that 
> the .purify file was not a text file.
> 
> Jens
> 
> Matt Falkenhagen wrote:
> 
>> Just "touch .purify" to make an empty .purify file.
>>
>> Jens Pillgram-Larsen wrote:
>>
>>> I don't need any suppressions for my program. What should I put in 
>>> the .purify file if that is the case?
>>>
>>> Jens
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question about wrapper around write()
Date: Sat, 21 Jan 2006 18:43:58 -0800
Lines: 17
Distribution: su
Message-ID: <dqurhj$s0l$1@news.Stanford.EDU>
References: <dqum7n$nev$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqum7n$nev$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9687

No, you can't assume any of that.  Keep calling write until all the data 
you wanted to send was written or an error occurs.

Robbie Yan wrote:
> Is it necessary to implement a wrapper around the socket write() function
> that ensures that all bytes fed into the socket are actually written on to
> the wire? Review session last week mentioned that we should consider
> implementing one. But since in assignment 1, strings that we write to the
> FTP server are short, can we simply assume that any request to the server
> can be written to the socket with one write() call? And if the number of
> bytes written (returned from write()) mismatches the number of bytes we pass
> into write(), can we assume that the system call has somehow malfunctioned
> and immediately fault?
> 
> Thank you very much!
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question on empty file
Date: Sat, 21 Jan 2006 18:45:10 -0800
Lines: 10
Distribution: su
Message-ID: <dqurjq$s0l$2@news.Stanford.EDU>
References: <dqupbv$q3f$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqupbv$q3f$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9688

Copy it with zero len.

Sutthipong Thavisomboon wrote:
> When we see an empty file, are we supposed to skip it? or copy it with the 
> zero length?
> 
> Thanks,
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Acceptable Global?
Date: Sat, 21 Jan 2006 18:58:57 -0800
Lines: 10
Distribution: su
Message-ID: <dqusdm$ss8$1@news.Stanford.EDU>
References: <20060121163907.12bd2cc5@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060121163907.12bd2cc5@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9689

I can't say for sure without looking at the code, it sounds pretty 
borderline.  To be safe, restructure the macro, or at least provide 
justification in the comments for the global.

David Reiss wrote:
> I have a macro that automatically checks return values from system
> calls.  Because I sometimes also want to keep the return value (as in
> "socket = CHECK_RET(sock, (args))").  It uses a variable to temporarily
> store the return value.  For simplicity, I have made it a global.  Is
> that okay, or do I need to restructure how that macro works?
.

Path: shelby.stanford.edu!not-for-mail
From: "Andrew Sakai" <asakai@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test E Not TESTED
Date: Sat, 21 Jan 2006 19:11:46 -0800
Lines: 8
Distribution: su
Message-ID: <dqut5j$65$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9690

I've been running the test script and everything seems to be working fine. 
However, it reports that Test E was NOT TESTED without giving any further 
information.  Does anyone have any idea why this could be?

    Thanks,
    Andrew 


.

Path: shelby.stanford.edu!not-for-mail
From: Nick Puz <npuz@stanford.edu>
Newsgroups: su.class.cs244a
Subject: file w/ no name besides extension
Date: Sat, 21 Jan 2006 19:43:15 -0800
Lines: 5
Distribution: su
Message-ID: <dquv0h$1il$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9691

ex: for extension txt, should a file with just the name .txt be 
transferred?

thanks,
-nick
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Permission for LIST in a directory
Date: Sat, 21 Jan 2006 20:21:28 -0800
Lines: 9
Distribution: su
Message-ID: <dqv18a$3mo$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9693

Hi Matt/Ari

    I know we're supposed to skip over files if we don't have read 
permission, but what should we do if we encounter a directory for which we 
don't have read permission (i.e., LIST returns a 550 reply). Should we exit 
the program, or silently skip over it, or does it fall under the realm of 
"design decisions" that we need to make? 


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Permission for LIST in a directory
Date: Sat, 21 Jan 2006 21:06:17 -0800
Lines: 12
Distribution: su
Message-ID: <dqv3s7$5jr$1@news.Stanford.EDU>
References: <dqv18a$3mo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dqv18a$3mo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9694

I've been wondering about this too...

Ramanan wrote:
> Hi Matt/Ari
> 
>     I know we're supposed to skip over files if we don't have read 
> permission, but what should we do if we encounter a directory for which we 
> don't have read permission (i.e., LIST returns a 550 reply). Should we exit 
> the program, or silently skip over it, or does it fall under the realm of 
> "design decisions" that we need to make? 
> 
> 
.

Path: shelby.stanford.edu!myth16.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@myth16.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: 451: Transfer aborted.  Broken pipe
Date: Sat, 21 Jan 2006 21:24:12 -0800
Lines: 13
Distribution: su
Message-ID: <Pine.LNX.4.44.0601212122010.13408-100000@myth16.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9695

When I run the following command:

../ftpcopy ext 1 ftp.cs.stanford.edu output pub/mirrors/gnu

I get a:

451 Transfer aborted. Broken pipe

The weird thing is, when I step through in gdb slowly, the error
goes away.  (And if I just let it run in gdb, the error comes back)

-- Peter

.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Error Message
Date: Sat, 21 Jan 2006 21:43:56 -0800
Lines: 8
Distribution: su
Message-ID: <dqv62t$7ea$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9696

Hi Matt/Ari,

I have a question regarding the error output. Is it enough to put just the 
3-digit reply code for the error messages?

Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Question on empty file
Date: Sun, 22 Jan 2006 06:10:52 +0000 (UTC)
Lines: 41
Distribution: su
Message-ID: <dqv7lc$8e2$1@news.Stanford.EDU>
References: <dqupbv$q3f$1@news.Stanford.EDU> <dqurjq$s0l$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9697

Matt Falkenhagen <mjf@stanford.edu> wrote:
> Copy it with zero len.

Matt, when I try to RETR an empty file with the command line ftp I get a 550
as follows :

elaine43:~/work/cs244a/hw1> ftp ftp.cs.stanford.edu
Connected to cs.stanford.edu.
220 FTP Server ready.
Name (ftp.cs.stanford.edu:smohler): anonymous
331 Anonymous login ok, send your complete email address as your password.
Password:
230-
    Crud not printed to save space...
230 Anonymous login ok, restrictions apply.
ftp> cd /uploads
250 CWD command successful
ftp> cd aiken
250 CWD command successful
ftp> ls
200 PORT command successful
150 Opening ASCII mode data connection for file list
..
...
empty_file.ext
226 Transfer complete.
23 bytes received in 0.01 seconds (2.15 Kbytes/s)
ftp> get empty_file.ext
200 PORT command successful
550 empty_file.ext: Permission denied
ftp>

(I know the file is empty because I put it there)

When I try to get the file with PASV or PORT I still get the same 550
error I get here.  If I just skip the file like the assignment requires
for normal permission-denied files then it _passes_ the "copy empty file"
sub-test of the grading script which is different from what has been 
said in this thread. Help :/

Stefan
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: file w/ no name besides extension
Date: Sat, 21 Jan 2006 22:14:02 -0800
Lines: 8
Distribution: su
Message-ID: <dqv7rf$8to$1@news.Stanford.EDU>
References: <dquv0h$1il$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dquv0h$1il$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9698

Yep.

Nick Puz wrote:
> ex: for extension txt, should a file with just the name .txt be 
> transferred?
> 
> thanks,
> -nick
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Permission for LIST in a directory
Date: Sat, 21 Jan 2006 22:18:13 -0800
Lines: 14
Distribution: su
Message-ID: <dqv83a$9b8$1@news.Stanford.EDU>
References: <dqv18a$3mo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqv18a$3mo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9699

The assignment leaves this unspecified, so, yeah, make a decision 
decision.  (Interestingly, according to the RFC, 550 is not an allowable 
response to LIST, but it is to CWD.)

Ramanan wrote:
> Hi Matt/Ari
> 
>     I know we're supposed to skip over files if we don't have read 
> permission, but what should we do if we encounter a directory for which we 
> don't have read permission (i.e., LIST returns a 550 reply). Should we exit 
> the program, or silently skip over it, or does it fall under the realm of 
> "design decisions" that we need to make? 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question on empty file
Date: Sat, 21 Jan 2006 22:21:54 -0800
Lines: 50
Distribution: su
Message-ID: <dqv8a7$9gs$1@news.Stanford.EDU>
References: <dqupbv$q3f$1@news.Stanford.EDU> <dqurjq$s0l$2@news.Stanford.EDU> <dqv7lc$8e2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqv7lc$8e2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9700

I really doubt you get a 550 because the file is empty, it's probably 
because you don't have permissions.

The grading script expects you to have a copy of the zero-byte file when 
your ftpcopy finishes.

Stefan Thomas Mohler wrote:
> Matt Falkenhagen <mjf@stanford.edu> wrote:
> 
>>Copy it with zero len.
> 
> 
> Matt, when I try to RETR an empty file with the command line ftp I get a 550
> as follows :
> 
> elaine43:~/work/cs244a/hw1> ftp ftp.cs.stanford.edu
> Connected to cs.stanford.edu.
> 220 FTP Server ready.
> Name (ftp.cs.stanford.edu:smohler): anonymous
> 331 Anonymous login ok, send your complete email address as your password.
> Password:
> 230-
>     Crud not printed to save space...
> 230 Anonymous login ok, restrictions apply.
> ftp> cd /uploads
> 250 CWD command successful
> ftp> cd aiken
> 250 CWD command successful
> ftp> ls
> 200 PORT command successful
> 150 Opening ASCII mode data connection for file list
> .
> ..
> empty_file.ext
> 226 Transfer complete.
> 23 bytes received in 0.01 seconds (2.15 Kbytes/s)
> ftp> get empty_file.ext
> 200 PORT command successful
> 550 empty_file.ext: Permission denied
> ftp>
> 
> (I know the file is empty because I put it there)
> 
> When I try to get the file with PASV or PORT I still get the same 550
> error I get here.  If I just skip the file like the assignment requires
> for normal permission-denied files then it _passes_ the "copy empty file"
> sub-test of the grading script which is different from what has been 
> said in this thread. Help :/
> 
> Stefan
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Error Message
Date: Sat, 21 Jan 2006 22:24:54 -0800
Lines: 29
Distribution: su
Message-ID: <dqv8fr$9iv$1@news.Stanford.EDU>
References: <dqv62t$7ea$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqv62t$7ea$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9701

See the PA #1 handout, section "The Problem", #9:

9. Your program should print nothing but a one-line status report at 
termination. This report should be written to stderr, and should contain:

    1. The message: "OK: xxxxxxxxx bytes copied" on success (where 
xxxxxxxxx is the total of all bytes copied, without leading zeros or spaces)
    2. The message: "ERROR: " followed by some meaningful error message 
on any error. If you received an error response across the FTP control 
connection, using that message is acceptable. If you are terminating for 
any other reason, you should write a meaningful error message. (Hint: 
look at the perror system call, the errno variable, and the sys_errlist 
variable).

For example:
OK: 45614 bytes copied
ERROR: 530 Login incorrect.
ERROR: write: Disk full.


Sutthipong Thavisomboon wrote:
> Hi Matt/Ari,
> 
> I have a question regarding the error output. Is it enough to put just the 
> 3-digit reply code for the error messages?
> 
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test E Not TESTED
Date: Sat, 21 Jan 2006 22:42:07 -0800
Lines: 12
Distribution: su
Message-ID: <dqv9g3$a1n$1@news.Stanford.EDU>
References: <dqut5j$65$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqut5j$65$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9702

Are there other Tests reporting OK or are there errors?  It's possible a 
test won't run if previous tests are failing.

Andrew Sakai wrote:
> I've been running the test script and everything seems to be working fine. 
> However, it reports that Test E was NOT TESTED without giving any further 
> information.  Does anyone have any idea why this could be?
> 
>     Thanks,
>     Andrew 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert@NOSPAM.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: .purify
Date: Sat, 21 Jan 2006 23:41:03 -0800
Lines: 29
Distribution: su
Message-ID: <dqvcv6$d4o$1@news.Stanford.EDU>
References: <dqujpq$l4s$2@news.Stanford.EDU> <dquk29$lje$1@news.Stanford.EDU> <dqul98$mmp$1@news.Stanford.EDU> <dqur94$rqc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dqur94$rqc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9703

I had the same problem as Jens, but I fixed it by putting a single blank 
line in the .purify file.

~Daniel

Matt Falkenhagen wrote:
> Really weird, it works for me.  On the other hand, that's the error 
> message I get when .purify doesn't exist...
> 
> If it still doesn't work, just make a .purify and put in some 
> supressions to make the script happy.  You can take the ones from the 
> Purify FAQ Q4.
> 
> Jens Pillgram-Larsen wrote:
>> That's what I tried. The grading script returned an error saying that 
>> the .purify file was not a text file.
>>
>> Jens
>>
>> Matt Falkenhagen wrote:
>>
>>> Just "touch .purify" to make an empty .purify file.
>>>
>>> Jens Pillgram-Larsen wrote:
>>>
>>>> I don't need any suppressions for my program. What should I put in 
>>>> the .purify file if that is the case?
>>>>
>>>> Jens
.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: File Permission
Date: Sun, 22 Jan 2006 01:37:54 -0800
Lines: 8
Distribution: su
Message-ID: <dqvjpk$lgq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9704

Hi,
Is it ok to use fopen with w+ (allow read/write) instead of the example in 
FAQ (open(....))

Thanks,
Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftpcopy.purify error
Date: Sun, 22 Jan 2006 03:10:38 -0800
Lines: 10
Distribution: su
Message-ID: <dqvp7k$ptp$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9705

Suddenly running ftpcopy.purify is giving me this error, any ideas?

ld.so.1: ftpcopy.purify: fatal: libsocket.so.1_pure_p3_c0_101102117_58_32:
open failed: No such file or directory
Killed

Nazia



.

Path: shelby.stanford.edu!not-for-mail
From: "Andrew Sakai" <asakai@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test E Not TESTED
Date: Sun, 22 Jan 2006 04:59:19 -0800
Lines: 18
Distribution: su
Message-ID: <dqvvja$3q6$1@news.Stanford.EDU>
References: <dqut5j$65$1@news.Stanford.EDU> <dqv9g3$a1n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9706

All other tests (except the purify tests which are also not being tested) 
are passing.


"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dqv9g3$a1n$1@news.Stanford.EDU...
> Are there other Tests reporting OK or are there errors?  It's possible a 
> test won't run if previous tests are failing.
>
> Andrew Sakai wrote:
>> I've been running the test script and everything seems to be working 
>> fine. However, it reports that Test E was NOT TESTED without giving any 
>> further information.  Does anyone have any idea why this could be?
>>
>>     Thanks,
>>     Andrew 


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Can I use strfind
Date: Sun, 22 Jan 2006 13:23:09 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: <dr00vt$52b$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9707

Hi,

I would like to ask if I can use the strfind function that comes with the 
Solaris OS, which can be used for string matching.  I have also
implemented my own version, but, of course, the performance of my version
is far inferior compare to its Solaris counterpart.

Thank you,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: The test script
Date: Sun, 22 Jan 2006 06:51:33 -0800
Lines: 18
Distribution: su
Message-ID: <dr065i$961$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9708

Matt/Ari:
So how's the test script intercept the output? when i run it, the 
results said my outputs were different, but it looks the same to me 
except i add a prefix to it.

" ----------- script results
  > forms/ppars98
 > forms/ppars98/pparbu.mif
 > forms/ppars98/pparnbu.mif
"


--------- my results
"< doc/forms/ppars98
< doc/forms/ppars98/pparbu.mif
< doc/forms/ppars98/pparnbu.mif
"
thanks.
.

Path: shelby.stanford.edu!saga2.Stanford.EDU!lamskm
From: lamskm@Stanford.EDU (Michael Lam)
Newsgroups: su.class.cs244a
Subject: can we do any removal/renaming of files
Date: Sun, 22 Jan 2006 16:56:29 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: <dr0dft$enm$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Summary: can we do any removal/renaming of files
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:9709

For files that are of questioned permission,
if I retr it to determine that I have no access to it,
its containing directory would be created already.

Now this containing directory may become empty because of the failure
to retr its contained file.  Can I remove the empty directory?

For other matters such as directory level, or extension matching,
I can pre-determine, but not for permission.

-Michael
.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Directory at the local site
Date: Sun, 22 Jan 2006 09:27:19 -0800
Lines: 10
Distribution: su
Message-ID: <dr0f9q$g5l$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9710

Hi,

Apart from the assumption that the root directory exists, what about the 
permission? What are we supposed to do in case we don't have the right 
permission for the given directory?

Thanks,
Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <justin-p@sbcglobal.net>
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy.purify error
Date: Sun, 22 Jan 2006 10:29:57 -0800
Lines: 28
Distribution: su
Message-ID: <BFF90F25.2558%justin-p@sbcglobal.net>
References: <dqvp7k$ptp$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: ftpcopy.purify error
Thread-Index: AcYfgdh9Fv15Iot1Edqe+gARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:9711

I had the same problem last night.  Check out the last question in the
Purify FAQ:

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

I was working remotely, so each of my sessions is on a different elaine and
the instrumented libraries were going into different /tmp directories.  Once
I ran the executable on the same machine that built it, the problem went
away.

--Justin


On 1/22/06 3:10 AM, in article dqvp7k$ptp$2@news.Stanford.EDU, "Nazia Zaman"
<nazia@stanford.edu> wrote:

> Suddenly running ftpcopy.purify is giving me this error, any ideas?
> 
> ld.so.1: ftpcopy.purify: fatal: libsocket.so.1_pure_p3_c0_101102117_58_32:
> open failed: No such file or directory
> Killed
> 
> Nazia
> 
> 
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: EEXIST: undefined?
Date: Sun, 22 Jan 2006 11:57:08 -0800
Lines: 9
Distribution: su
Message-ID: <43D3E394.8030704@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9712

mkdir can return EEXIST if the argument directory exists. My code wont 
compile when I try to use this value for comparision. I have 
<sys/types.h> and <sys/stat.h> included.

What am I missing?

Thanks,
Sesha

.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: EEXIST: undefined?
Date: Sun, 22 Jan 2006 11:58:24 -0800
Lines: 14
Distribution: su
Message-ID: <43D3E3E0.1040301@stanford.edu>
References: <43D3E394.8030704@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9713

Looks like I need to test against the errno, but I still need this value 
to be defined somehow.

Sesha Narahari wrote:
> mkdir can return EEXIST if the argument directory exists. My code wont 
> compile when I try to use this value for comparision. I have 
> <sys/types.h> and <sys/stat.h> included.
> 
> What am I missing?
> 
> Thanks,
> Sesha
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: EEXIST: undefined?
Date: Sun, 22 Jan 2006 12:00:07 -0800
Lines: 22
Distribution: su
Message-ID: <43D3E447.4080905@stanford.edu>
References: <43D3E394.8030704@stanford.edu> <43D3E3E0.1040301@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9714

#include <errno.h> fixed it.

Thanks,
Sesha

Sesha Narahari wrote:
> Looks like I need to test against the errno, but I still need this value 
> to be defined somehow.
> 
> Sesha Narahari wrote:
> 
>> mkdir can return EEXIST if the argument directory exists. My code wont 
>> compile when I try to use this value for comparision. I have 
>> <sys/types.h> and <sys/stat.h> included.
>>
>> What am I missing?
>>
>> Thanks,
>> Sesha
>>
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can I use strfind
Date: Sun, 22 Jan 2006 12:21:14 -0800
Lines: 13
Distribution: su
Message-ID: <dr0pfv$oo0$1@news.Stanford.EDU>
References: <dr00vt$52b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr00vt$52b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9715

Sure, go ahead.

Hector Chan wrote:
> Hi,
> 
> I would like to ask if I can use the strfind function that comes with the 
> Solaris OS, which can be used for string matching.  I have also
> implemented my own version, but, of course, the performance of my version
> is far inferior compare to its Solaris counterpart.
> 
> Thank you,
> 
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: The test script
Date: Sun, 22 Jan 2006 12:32:57 -0800
Lines: 24
Distribution: su
Message-ID: <dr0q5v$pqp$1@news.Stanford.EDU>
References: <dr065i$961$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr065i$961$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9716

Look at the handout for an example, "ftpcopy dstdir srcdir" should end 
up with the remote "srcdir" except it's renamed "dstdir".  It looks like 
you're creating dstdir and copying srcdir into it.


alex qi wrote:
> Matt/Ari:
> So how's the test script intercept the output? when i run it, the 
> results said my outputs were different, but it looks the same to me 
> except i add a prefix to it.
> 
> " ----------- script results
>  > forms/ppars98
>  > forms/ppars98/pparbu.mif
>  > forms/ppars98/pparnbu.mif
> "
> 
> 
> --------- my results
> "< doc/forms/ppars98
> < doc/forms/ppars98/pparbu.mif
> < doc/forms/ppars98/pparnbu.mif
> "
> thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: can we do any removal/renaming of files
Date: Sun, 22 Jan 2006 12:37:34 -0800
Lines: 15
Distribution: su
Message-ID: <dr0qej$puv$1@news.Stanford.EDU>
References: <dr0dft$enm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr0dft$enm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9717

You should be able to pre-determine.  Don't create the dir until you are 
sure a file will be downloaded in it.

Michael Lam wrote:
> For files that are of questioned permission,
> if I retr it to determine that I have no access to it,
> its containing directory would be created already.
> 
> Now this containing directory may become empty because of the failure
> to retr its contained file.  Can I remove the empty directory?
> 
> For other matters such as directory level, or extension matching,
> I can pre-determine, but not for permission.
> 
> -Michael
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Directory at the local site
Date: Sun, 22 Jan 2006 12:43:08 -0800
Lines: 16
Distribution: su
Message-ID: <dr0qp2$q90$1@news.Stanford.EDU>
References: <dr0f9q$g5l$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr0f9q$g5l$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9718

This is left unspecified, do what's easiest for you.  I think the two 
reasonable actions are to exit with error immediately or first attempt 
to remove the dir and recreate (although since you don't have perms 
that's probably not possible).

Sutthipong Thavisomboon wrote:
> Hi,
> 
> Apart from the assumption that the root directory exists, what about the 
> permission? What are we supposed to do in case we don't have the right 
> permission for the given directory?
> 
> Thanks,
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Richards <mattrich@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Sample ftp sites not RFC-compliant?
Date: Sun, 22 Jan 2006 13:22:24 -0800
Lines: 11
Distribution: su
Message-ID: <dr0t2h$sn1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9719

It seems ftp.microsoft.com and ftp.cs.stanford.edu put a dash after the 
230 reply code, even though the response is a single line.

Does this mean we don't have to support these sites, since to properly 
handle multiple reads, we need to assume that if there is a dash after 
the first reply code, we must keep reading until we hit a line with a 
space following the reply code?

Also, ftp.fedworld.gov's greeting is longer 1024.

Matt R.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Richards <mattrich@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Sample ftp sites not RFC-compliant?
Date: Sun, 22 Jan 2006 13:49:44 -0800
Lines: 16
Distribution: su
Message-ID: <dr0ulp$ih$1@news.Stanford.EDU>
References: <dr0t2h$sn1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dr0t2h$sn1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9720

Nevermind, I spoke too soon.



Matt Richards wrote:
> It seems ftp.microsoft.com and ftp.cs.stanford.edu put a dash after the 
> 230 reply code, even though the response is a single line.
> 
> Does this mean we don't have to support these sites, since to properly 
> handle multiple reads, we need to assume that if there is a dash after 
> the first reply code, we must keep reading until we hit a line with a 
> space following the reply code?
> 
> Also, ftp.fedworld.gov's greeting is longer 1024.
> 
> Matt R.
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: submitting hw1
Date: Sun, 22 Jan 2006 14:54:17 -0800
Lines: 14
Distribution: su
Message-ID: <dr12en$3v2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9721

This is my first programming class at Stanford and am unfamiliar with 
the submit script.

Does the script submit *.c, *.h, Makefile, README, purify.output, and 
..purify in the current directory automatically?

So:
/usr/class/cs244a/bin/submit.pl hw1 mjf   <--- that does everything??

It's not clear to me that everything was submitted from the submit output.

Anyone?
Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: testing script hangs and time out
Date: Sun, 22 Jan 2006 15:15:42 -0800
Lines: 26
Distribution: su
Message-ID: <dr13mv$532$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9722

while testing it stops on :

Test M, using current source tree and build
make ftpcopy.purify
purify -cache-dir=/tmp/forumm -best-effort -linker=/usr/pubsw/bin/ld -demangle-program=/usr/pubsw/bin/c++filt 
gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy.purify  ftpcopy.o 
ftpparse.o -lsocket -lnsl
Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright IBM 
Corp. 1992, 2005 All rights reserved.
Instrumenting:
Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
ftpcopy.o ftpparse.o  Linking

Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
/pub/packages



and then exits because of time out

wht shd I do abt it?

thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: testing script hangs and time out
Date: Sun, 22 Jan 2006 15:19:06 -0800
Lines: 43
Distribution: su
Message-ID: <dr13td$5ae$1@news.Stanford.EDU>
References: <dr13mv$532$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9723

this is wht follows after some time:

Could not run purify'ed exe: ***Timeout expired during grading
Program output:

Purify engine: Warning: Cannot find a file which matches the DT_SONAME field 
(libnss_files.so.1) of the file (/usr/lib/nss_files.so.1).
Using /usr/lib/nss_files.so.1 instead.

couldn't submit code for testing




"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
news:dr13mv$532$1@news.Stanford.EDU...
> while testing it stops on :
>
> Test M, using current source tree and build
> make ftpcopy.purify
> purify -cache-dir=/tmp/forumm -best-effort -linker=/usr/pubsw/bin/ld -demangle-program=/usr/pubsw/bin/c++filt 
> gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy.purify  ftpcopy.o 
> ftpparse.o -lsocket -lnsl
> Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
> IBM Corp. 1992, 2005 All rights reserved.
> Instrumenting:
> Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
> ftpcopy.o ftpparse.o  Linking
>
> Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
> /pub/packages
>
>
>
> and then exits because of time out
>
> wht shd I do abt it?
>
> thanks
> Forum
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Eric B Friedman <eric06@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test script bailed... (not timeout)
Date: Sun, 22 Jan 2006 15:29:38 -0800
Lines: 165
Distribution: su
Message-ID: <dr14h3$5ns$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary="------------090403080009030201030708"
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9724

This is a multi-part message in MIME format.
--------------090403080009030201030708
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

As the subject indicates, the test script bailed on me. I've attached 
the full output.

The end of the output I've pasted below; from inspection, I don't think 
the error has to do with my code; my program does not print in the 
format seen below.

I tried resubmitting, but the error didn't recur. (Instead, it 
identified a bug in my code.) However, I did just burn one of my three 
test runs before the deadline. Any idea what happened here?

Thanks,

Eric

---

[elided for clarity]

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

readdir(./../../../../../../../../..): Connection timed out at
cs244a/FTPCopyTestCase.pm line 247
Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu
/ftp.slac.stanford.edu_mif_5_1 /doc
can't create local directory /ftp.slac.stanford.edu_mif_5_1 (No such file or
directory)
couldn't submit code for testing
elaine7:~/cs244a/hw1>

--------------090403080009030201030708
Content-Type: text/plain;
 name="testscript.out"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="testscript.out"

elaine7:~/cs244a/hw1> /afs/ir/class/cs244a/bin/test_code.pl hw1 Makefile *.c *.h 
purify.output .purify
Creating submission tarball...
..purify
Makefile
ftp.c
ftp.h
ftpcopy.c
ftpparse.c
ftpparse.h
purify.output
util.c
util.h
..purify
Makefile
ftp.c
ftp.h
ftpcopy.c
ftpparse.c
ftpparse.h
purify.output
util.c
util.h
Checking to make sure target all compiles before testing... OK
Checking to make sure target ftpcopy.purify compiles before testing... OK

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

Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 3 test attempts applies (from Jan 19 onwards).
You've used 1 test attempt(s) so far today.
make 
gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftpcopy.c
gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftpparse.c
gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftp.c
gcc -g -O0 -ansi -Wall -DSOLARIS  -c util.c
gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy  ftpcopy.o ftpparse.o ftp.o util.o 
-lsocket -lnsl 

Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu 
/afs/ir.stanford.edu/users/e/r/eric06/cs244a/hw1/grading_src/build/ftp.slac.stanford.edu_mif_5_1 
/doc
Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu 
ftp.slac.stanford.edu_mif_5_0 /doc
Downloading files:  ./ftpcopy   ch 1 ftp.cs.stanford.edu 
/afs/ir.stanford.edu/users/e/r/eric06/cs244a/hw1/grading_src/build/ftp.cs.stanford.edu_ch_1_1 
/pub/cweb
Downloading files:  ./ftpcopy   txt 0 134.79.18.30 134.79.18.30_txt_0_0 .
Checking host ftp.slac.stanford.edu
Checking host ftp.slac.stanford.edu
Checking host ftp.cs.stanford.edu
Checking host 134.79.18.30

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

Using cached results from previous run
Using cached results from previous run
Using cached results from previous run
Using cached results from previous run
Checking host ftp.slac.stanford.edu
Checking host ftp.slac.stanford.edu
Checking host ftp.cs.stanford.edu
Checking host 134.79.18.30

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

Using cached results from previous run
Using cached results from previous run
Using cached results from previous run
Using cached results from previous run
Checking host ftp.slac.stanford.edu
Checking host ftp.slac.stanford.edu
Checking host ftp.cs.stanford.edu
Checking host 134.79.18.30

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

Using cached results from previous run
Using cached results from previous run
Using cached results from previous run
Using cached results from previous run
Checking host ftp.slac.stanford.edu
Checking host ftp.slac.stanford.edu
Checking host ftp.cs.stanford.edu
Checking host 134.79.18.30

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

readdir(./../../../../../../../../..): Connection timed out at 
cs244a/FTPCopyTestCase.pm line 247
Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu 
/ftp.slac.stanford.edu_mif_5_1 /doc
can't create local directory /ftp.slac.stanford.edu_mif_5_1 (No such file or 
directory)
couldn't submit code for testing
elaine7:~/cs244a/hw1>

--------------090403080009030201030708--

.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: testing script hangs and time out
Date: Sun, 22 Jan 2006 15:41:08 -0800
Lines: 54
Distribution: su
Message-ID: <dr156k$681$1@news.Stanford.EDU>
References: <dr13mv$532$1@news.Stanford.EDU> <dr13td$5ae$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9725

I tried to run the test again but it tells me I hv used up quota of 
submitting for today. but I did not get to see the result so not much use 
really of the test

cah u fix this for me asap


"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
news:dr13td$5ae$1@news.Stanford.EDU...
> this is wht follows after some time:
>
> Could not run purify'ed exe: ***Timeout expired during grading
> Program output:
>
> Purify engine: Warning: Cannot find a file which matches the DT_SONAME 
> field (libnss_files.so.1) of the file (/usr/lib/nss_files.so.1).
> Using /usr/lib/nss_files.so.1 instead.
>
> couldn't submit code for testing
>
>
>
>
> "Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
> news:dr13mv$532$1@news.Stanford.EDU...
>> while testing it stops on :
>>
>> Test M, using current source tree and build
>> make ftpcopy.purify
>> purify -cache-dir=/tmp/forumm -best-effort -linker=/usr/pubsw/bin/ld -demangle-program=/usr/pubsw/bin/c++filt 
>> gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy.purify  ftpcopy.o 
>> ftpparse.o -lsocket -lnsl
>> Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
>> IBM Corp. 1992, 2005 All rights reserved.
>> Instrumenting:
>> Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>> ftpcopy.o ftpparse.o  Linking
>>
>> Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
>> /pub/packages
>>
>>
>>
>> and then exits because of time out
>>
>> wht shd I do abt it?
>>
>> thanks
>> Forum
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: submitting hw1
Date: Sun, 22 Jan 2006 15:47:42 -0800
Lines: 17
Distribution: su
Message-ID: <dr15j4$69h$1@news.Stanford.EDU>
References: <dr12en$3v2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr12en$3v2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9726

Yep.

Will Palmeri wrote:
> This is my first programming class at Stanford and am unfamiliar with 
> the submit script.
> 
> Does the script submit *.c, *.h, Makefile, README, purify.output, and 
> .purify in the current directory automatically?
> 
> So:
> /usr/class/cs244a/bin/submit.pl hw1 mjf   <--- that does everything??
> 
> It's not clear to me that everything was submitted from the submit output.
> 
> Anyone?
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: testing script hangs and time out
Date: Sun, 22 Jan 2006 15:50:47 -0800
Lines: 62
Distribution: su
Message-ID: <dr15ot$69h$2@news.Stanford.EDU>
References: <dr13mv$532$1@news.Stanford.EDU> <dr13td$5ae$1@news.Stanford.EDU> <dr156k$681$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr156k$681$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9727

Test M unfortunately tries to connect to ftp.stanford.edu, which is no 
longer in service.  You are probably hanging in some read() loop and 
your program isn't terminating.  You should abort if read() returns 0 
which indicates the connection closed.

Forum Mangal Parmar wrote:
> I tried to run the test again but it tells me I hv used up quota of 
> submitting for today. but I did not get to see the result so not much use 
> really of the test
> 
> cah u fix this for me asap
> 
> 
> "Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
> news:dr13td$5ae$1@news.Stanford.EDU...
> 
>>this is wht follows after some time:
>>
>>Could not run purify'ed exe: ***Timeout expired during grading
>>Program output:
>>
>>Purify engine: Warning: Cannot find a file which matches the DT_SONAME 
>>field (libnss_files.so.1) of the file (/usr/lib/nss_files.so.1).
>>Using /usr/lib/nss_files.so.1 instead.
>>
>>couldn't submit code for testing
>>
>>
>>
>>
>>"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
>>news:dr13mv$532$1@news.Stanford.EDU...
>>
>>>while testing it stops on :
>>>
>>>Test M, using current source tree and build
>>>make ftpcopy.purify
>>>purify -cache-dir=/tmp/forumm -best-effort -linker=/usr/pubsw/bin/ld -demangle-program=/usr/pubsw/bin/c++filt 
>>>gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy.purify  ftpcopy.o 
>>>ftpparse.o -lsocket -lnsl
>>>Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
>>>IBM Corp. 1992, 2005 All rights reserved.
>>>Instrumenting:
>>>Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>>>ftpcopy.o ftpparse.o  Linking
>>>
>>>Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
>>>/pub/packages
>>>
>>>
>>>
>>>and then exits because of time out
>>>
>>>wht shd I do abt it?
>>>
>>>thanks
>>>Forum
>>>
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: testing script hangs and time out
Date: Sun, 22 Jan 2006 15:53:51 -0800
Lines: 67
Distribution: su
Message-ID: <dr15um$6vg$1@news.Stanford.EDU>
References: <dr13mv$532$1@news.Stanford.EDU> <dr13td$5ae$1@news.Stanford.EDU> <dr156k$681$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr156k$681$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9728

By the way as long as you don't change the code, you can keep submitting 
as much as you want without taking up quota.  The quota counts unique 
submissions (it saves a hash of your code and compares your submissions 
against the saved hash).

I'll make an exception in this case and free up one of your quotas.  I'd 
recommend testing your ftpcopy yourself against ftp.stanford.edu and 
then, if it aborts cleanly, running the testing script.


Forum Mangal Parmar wrote:
> I tried to run the test again but it tells me I hv used up quota of 
> submitting for today. but I did not get to see the result so not much use 
> really of the test
> 
> cah u fix this for me asap
> 
> 
> "Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
> news:dr13td$5ae$1@news.Stanford.EDU...
> 
>>this is wht follows after some time:
>>
>>Could not run purify'ed exe: ***Timeout expired during grading
>>Program output:
>>
>>Purify engine: Warning: Cannot find a file which matches the DT_SONAME 
>>field (libnss_files.so.1) of the file (/usr/lib/nss_files.so.1).
>>Using /usr/lib/nss_files.so.1 instead.
>>
>>couldn't submit code for testing
>>
>>
>>
>>
>>"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
>>news:dr13mv$532$1@news.Stanford.EDU...
>>
>>>while testing it stops on :
>>>
>>>Test M, using current source tree and build
>>>make ftpcopy.purify
>>>purify -cache-dir=/tmp/forumm -best-effort -linker=/usr/pubsw/bin/ld -demangle-program=/usr/pubsw/bin/c++filt 
>>>gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy.purify  ftpcopy.o 
>>>ftpparse.o -lsocket -lnsl
>>>Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
>>>IBM Corp. 1992, 2005 All rights reserved.
>>>Instrumenting:
>>>Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>>>ftpcopy.o ftpparse.o  Linking
>>>
>>>Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
>>>/pub/packages
>>>
>>>
>>>
>>>and then exits because of time out
>>>
>>>wht shd I do abt it?
>>>
>>>thanks
>>>Forum
>>>
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test script bailed... (not timeout)
Date: Sun, 22 Jan 2006 16:02:31 -0800
Lines: 163
Distribution: su
Message-ID: <dr16et$7bj$1@news.Stanford.EDU>
References: <dr14h3$5ns$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr14h3$5ns$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9729

No idea, it of course looks like it coudn't mkdir 
ftp.slac.stanford.edu_mif_5_1, but I don't know why.

Note that you can always resubmit immediately if some odd thing happened 
in the test script to see if it recurs.  The test script only takes away 
quota if you've changed your code (it will ask if you want to generate a 
new key, which means use up a quota).

Eric B Friedman wrote:
> Hi,
> 
> As the subject indicates, the test script bailed on me. I've attached 
> the full output.
> 
> The end of the output I've pasted below; from inspection, I don't think 
> the error has to do with my code; my program does not print in the 
> format seen below.
> 
> I tried resubmitting, but the error didn't recur. (Instead, it 
> identified a bug in my code.) However, I did just burn one of my three 
> test runs before the deadline. Any idea what happened here?
> 
> Thanks,
> 
> Eric
> 
> ---
> 
> [elided for clarity]
> 
> Test F.1, using current source tree and build
> make
> make: Nothing to be done for `all'.
> 
> readdir(./../../../../../../../../..): Connection timed out at
> cs244a/FTPCopyTestCase.pm line 247
> Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu
> /ftp.slac.stanford.edu_mif_5_1 /doc
> can't create local directory /ftp.slac.stanford.edu_mif_5_1 (No such 
> file or
> directory)
> couldn't submit code for testing
> elaine7:~/cs244a/hw1>
> 
> 
> ------------------------------------------------------------------------
> 
> elaine7:~/cs244a/hw1> /afs/ir/class/cs244a/bin/test_code.pl hw1 Makefile *.c *.h 
> purify.output .purify
> Creating submission tarball...
> .purify
> Makefile
> ftp.c
> ftp.h
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> purify.output
> util.c
> util.h
> .purify
> Makefile
> ftp.c
> ftp.h
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> purify.output
> util.c
> util.h
> Checking to make sure target all compiles before testing... OK
> Checking to make sure target ftpcopy.purify compiles before testing... OK
> 
> Starting...
> Test B, new source tree required, extracting into grading_src/build...
> .purify
> Makefile
> ftp.c
> ftp.h
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> purify.output
> util.c
> util.h
> 
> Can't find a matching key for this test run.
> Would you like to generate a new one?  (y/n):  y
> Daily quota of 3 test attempts applies (from Jan 19 onwards).
> You've used 1 test attempt(s) so far today.
> make 
> gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftpcopy.c
> gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftpparse.c
> gcc -g -O0 -ansi -Wall -DSOLARIS  -c ftp.c
> gcc -g -O0 -ansi -Wall -DSOLARIS  -c util.c
> gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy  ftpcopy.o ftpparse.o ftp.o util.o 
> -lsocket -lnsl 
> 
> Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu 
> /afs/ir.stanford.edu/users/e/r/eric06/cs244a/hw1/grading_src/build/ftp.slac.stanford.edu_mif_5_1 
> /doc
> Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu 
> ftp.slac.stanford.edu_mif_5_0 /doc
> Downloading files:  ./ftpcopy   ch 1 ftp.cs.stanford.edu 
> /afs/ir.stanford.edu/users/e/r/eric06/cs244a/hw1/grading_src/build/ftp.cs.stanford.edu_ch_1_1 
> /pub/cweb
> Downloading files:  ./ftpcopy   txt 0 134.79.18.30 134.79.18.30_txt_0_0 .
> Checking host ftp.slac.stanford.edu
> Checking host ftp.slac.stanford.edu
> Checking host ftp.cs.stanford.edu
> Checking host 134.79.18.30
> 
> Test C, using current source tree and build
> make 
> make: Nothing to be done for `all'.
> 
> Using cached results from previous run
> Using cached results from previous run
> Using cached results from previous run
> Using cached results from previous run
> Checking host ftp.slac.stanford.edu
> Checking host ftp.slac.stanford.edu
> Checking host ftp.cs.stanford.edu
> Checking host 134.79.18.30
> 
> Test D, using current source tree and build
> make 
> make: Nothing to be done for `all'.
> 
> Using cached results from previous run
> Using cached results from previous run
> Using cached results from previous run
> Using cached results from previous run
> Checking host ftp.slac.stanford.edu
> Checking host ftp.slac.stanford.edu
> Checking host ftp.cs.stanford.edu
> Checking host 134.79.18.30
> 
> Test E, using current source tree and build
> make 
> make: Nothing to be done for `all'.
> 
> Using cached results from previous run
> Using cached results from previous run
> Using cached results from previous run
> Using cached results from previous run
> Checking host ftp.slac.stanford.edu
> Checking host ftp.slac.stanford.edu
> Checking host ftp.cs.stanford.edu
> Checking host 134.79.18.30
> 
> Test F.1, using current source tree and build
> make 
> make: Nothing to be done for `all'.
> 
> readdir(./../../../../../../../../..): Connection timed out at 
> cs244a/FTPCopyTestCase.pm line 247
> Downloading files:  ./ftpcopy   mif 5 ftp.slac.stanford.edu 
> /ftp.slac.stanford.edu_mif_5_1 /doc
> can't create local directory /ftp.slac.stanford.edu_mif_5_1 (No such file or 
> directory)
> couldn't submit code for testing
> elaine7:~/cs244a/hw1>
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: testing script hangs and time out
Date: Sun, 22 Jan 2006 16:13:32 -0800
Lines: 72
Distribution: su
Message-ID: <dr173f$7o7$1@news.Stanford.EDU>
References: <dr13mv$532$1@news.Stanford.EDU> <dr13td$5ae$1@news.Stanford.EDU> <dr156k$681$1@news.Stanford.EDU> <dr15um$6vg$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9730

thanks a lot.. but tht happend coz I tried to run the file tht worked 
yesterday just to see if there was a problem with the script

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dr15um$6vg$1@news.Stanford.EDU...
> By the way as long as you don't change the code, you can keep submitting 
> as much as you want without taking up quota.  The quota counts unique 
> submissions (it saves a hash of your code and compares your submissions 
> against the saved hash).
>
> I'll make an exception in this case and free up one of your quotas.  I'd 
> recommend testing your ftpcopy yourself against ftp.stanford.edu and then, 
> if it aborts cleanly, running the testing script.
>
>
> Forum Mangal Parmar wrote:
>> I tried to run the test again but it tells me I hv used up quota of 
>> submitting for today. but I did not get to see the result so not much use 
>> really of the test
>>
>> cah u fix this for me asap
>>
>>
>> "Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
>> news:dr13td$5ae$1@news.Stanford.EDU...
>>
>>>this is wht follows after some time:
>>>
>>>Could not run purify'ed exe: ***Timeout expired during grading
>>>Program output:
>>>
>>>Purify engine: Warning: Cannot find a file which matches the DT_SONAME 
>>>field (libnss_files.so.1) of the file (/usr/lib/nss_files.so.1).
>>>Using /usr/lib/nss_files.so.1 instead.
>>>
>>>couldn't submit code for testing
>>>
>>>
>>>
>>>
>>>"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
>>>news:dr13mv$532$1@news.Stanford.EDU...
>>>
>>>>while testing it stops on :
>>>>
>>>>Test M, using current source tree and build
>>>>make ftpcopy.purify
>>>>purify -cache-dir=/tmp/forumm -best-effort -linker=/usr/pubsw/bin/ld -demangle-program=/usr/pubsw/bin/c++filt 
>>>>gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy.purify  ftpcopy.o 
>>>>ftpparse.o -lsocket -lnsl
>>>>Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
>>>>IBM Corp. 1992, 2005 All rights reserved.
>>>>Instrumenting:
>>>>Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>>>>ftpcopy.o ftpparse.o  Linking
>>>>
>>>>Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
>>>>/pub/packages
>>>>
>>>>
>>>>
>>>>and then exits because of time out
>>>>
>>>>wht shd I do abt it?
>>>>
>>>>thanks
>>>>Forum
>>>>
>>>
>>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: testing script hangs and time out
Date: Sun, 22 Jan 2006 16:20:45 -0800
Lines: 81
Distribution: su
Message-ID: <dr17gt$8b7$1@news.Stanford.EDU>
References: <dr13mv$532$1@news.Stanford.EDU> <dr13td$5ae$1@news.Stanford.EDU> <dr156k$681$1@news.Stanford.EDU> <dr15ot$69h$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9731

it still doesnt work..

Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
/pub/packages
Could not run purify'ed exe:
Purify engine: Warning: Cannot find a file which matches the DT_SONAME field 
(libnss_files.so.1) of the file (/usr/lib/nss_files.so.1).
Using /usr/lib/nss_files.so.1 instead.
ERROR: Connection closed by server

couldn't submit code for testing

the program exits if its not able to connect to the server.. am I doing the 
right thing?  and how will I be able to ckh the test script  result now?

thanks

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dr15ot$69h$2@news.Stanford.EDU...
> Test M unfortunately tries to connect to ftp.stanford.edu, which is no 
> longer in service.  You are probably hanging in some read() loop and your 
> program isn't terminating.  You should abort if read() returns 0 which 
> indicates the connection closed.
>
> Forum Mangal Parmar wrote:
>> I tried to run the test again but it tells me I hv used up quota of 
>> submitting for today. but I did not get to see the result so not much use 
>> really of the test
>>
>> cah u fix this for me asap
>>
>>
>> "Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
>> news:dr13td$5ae$1@news.Stanford.EDU...
>>
>>>this is wht follows after some time:
>>>
>>>Could not run purify'ed exe: ***Timeout expired during grading
>>>Program output:
>>>
>>>Purify engine: Warning: Cannot find a file which matches the DT_SONAME 
>>>field (libnss_files.so.1) of the file (/usr/lib/nss_files.so.1).
>>>Using /usr/lib/nss_files.so.1 instead.
>>>
>>>couldn't submit code for testing
>>>
>>>
>>>
>>>
>>>"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
>>>news:dr13mv$532$1@news.Stanford.EDU...
>>>
>>>>while testing it stops on :
>>>>
>>>>Test M, using current source tree and build
>>>>make ftpcopy.purify
>>>>purify -cache-dir=/tmp/forumm -best-effort -linker=/usr/pubsw/bin/ld -demangle-program=/usr/pubsw/bin/c++filt 
>>>>gcc -g -O0 -ansi -Wall -DSOLARIS  -o ftpcopy.purify  ftpcopy.o 
>>>>ftpparse.o -lsocket -lnsl
>>>>Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright 
>>>>IBM Corp. 1992, 2005 All rights reserved.
>>>>Instrumenting:
>>>>Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>>>>ftpcopy.o ftpparse.o  Linking
>>>>
>>>>Running purify'ed executable:  ./ftpcopy.purify gz 2 ftp.stanford.edu . 
>>>>/pub/packages
>>>>
>>>>
>>>>
>>>>and then exits because of time out
>>>>
>>>>wht shd I do abt it?
>>>>
>>>>thanks
>>>>Forum
>>>>
>>>
>>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: submit error
Date: Sun, 22 Jan 2006 16:31:36 -0800
Lines: 26
Distribution: su
Message-ID: <dr1857$8q3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9732

I did the following:

elaine34:~/submit> /usr/class/cs244a/bin/submit.pl hw1 mjf
SubmitBase: /afs/ir/class/cs244a/submissions
Debug Level = 0
could not find any file matching .purify in 
/afs/ir.stanford.edu/users/f/o/forumm/submit!!
======================================================================
Your code could not be sumitted because of some error.
If you think there is a mistake, please send an email to your TA
(mjf; <mjf@stanford.edu >) with the relevant information.
======================================================================


Died at /usr/class/cs244a/bin/submit.pl line 194.
elaine34:~/submit> ls
Makefile  ftpcopy.c  ftpcopy.purify  ftpparse.c  ftpparse.h  purify.output 
readme.txt



pls can u tell me wht to do abt this
thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: submit error
Date: Sun, 22 Jan 2006 16:36:35 -0800
Lines: 31
Distribution: su
Message-ID: <dr18ej$8tu$1@news.Stanford.EDU>
References: <dr1857$8q3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dr1857$8q3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9733

Do you have .purify in the directory?

--Michi

Forum Mangal Parmar wrote:
> I did the following:
> 
> elaine34:~/submit> /usr/class/cs244a/bin/submit.pl hw1 mjf
> SubmitBase: /afs/ir/class/cs244a/submissions
> Debug Level = 0
> could not find any file matching .purify in 
> /afs/ir.stanford.edu/users/f/o/forumm/submit!!
> ======================================================================
> Your code could not be sumitted because of some error.
> If you think there is a mistake, please send an email to your TA
> (mjf; <mjf@stanford.edu >) with the relevant information.
> ======================================================================
> 
> 
> Died at /usr/class/cs244a/bin/submit.pl line 194.
> elaine34:~/submit> ls
> Makefile  ftpcopy.c  ftpcopy.purify  ftpparse.c  ftpparse.h  purify.output 
> readme.txt
> 
> 
> 
> pls can u tell me wht to do abt this
> thanks
> Forum 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: submit error
Date: Sun, 22 Jan 2006 16:36:39 -0800
Lines: 31
Distribution: su
Message-ID: <dr18es$8hh$1@news.Stanford.EDU>
References: <dr1857$8q3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr1857$8q3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9734

You need a file named ".purify".  See PA #1 handout under section 
"Deliverables" and the Purify FAQ.  If you don't need to suppress any 
purify errors, see thread ".purify" 1/21/2006 4:31 PM.

Forum Mangal Parmar wrote:
> I did the following:
> 
> elaine34:~/submit> /usr/class/cs244a/bin/submit.pl hw1 mjf
> SubmitBase: /afs/ir/class/cs244a/submissions
> Debug Level = 0
> could not find any file matching .purify in 
> /afs/ir.stanford.edu/users/f/o/forumm/submit!!
> ======================================================================
> Your code could not be sumitted because of some error.
> If you think there is a mistake, please send an email to your TA
> (mjf; <mjf@stanford.edu >) with the relevant information.
> ======================================================================
> 
> 
> Died at /usr/class/cs244a/bin/submit.pl line 194.
> elaine34:~/submit> ls
> Makefile  ftpcopy.c  ftpcopy.purify  ftpparse.c  ftpparse.h  purify.output 
> readme.txt
> 
> 
> 
> pls can u tell me wht to do abt this
> thanks
> Forum 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: submit error
Date: Sun, 22 Jan 2006 16:37:18 -0800
Lines: 36
Distribution: su
Message-ID: <dr18fv$8vq$1@news.Stanford.EDU>
References: <dr1857$8q3$1@news.Stanford.EDU> <dr18ej$8tu$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9735

yes.. Iv shown the ls too.. its there but still not working!!


"Michi Mutsuzaki" <michi2@stanford.edu> wrote in message 
news:dr18ej$8tu$1@news.Stanford.EDU...
> Do you have .purify in the directory?
>
> --Michi
>
> Forum Mangal Parmar wrote:
>> I did the following:
>>
>> elaine34:~/submit> /usr/class/cs244a/bin/submit.pl hw1 mjf
>> SubmitBase: /afs/ir/class/cs244a/submissions
>> Debug Level = 0
>> could not find any file matching .purify in 
>> /afs/ir.stanford.edu/users/f/o/forumm/submit!!
>> ======================================================================
>> Your code could not be sumitted because of some error.
>> If you think there is a mistake, please send an email to your TA
>> (mjf; <mjf@stanford.edu >) with the relevant information.
>> ======================================================================
>>
>>
>> Died at /usr/class/cs244a/bin/submit.pl line 194.
>> elaine34:~/submit> ls
>> Makefile  ftpcopy.c  ftpcopy.purify  ftpparse.c  ftpparse.h 
>> purify.output readme.txt
>>
>>
>>
>> pls can u tell me wht to do abt this
>> thanks
>> Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: submit error
Date: Sun, 22 Jan 2006 16:48:58 -0800
Lines: 37
Distribution: su
Message-ID: <dr195r$9k6$1@news.Stanford.EDU>
References: <dr1857$8q3$1@news.Stanford.EDU> <dr18es$8hh$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9736

thanks tht works but the test script still dint work.. my program exits on 
reading 0 and so does the test script!!


"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dr18es$8hh$1@news.Stanford.EDU...
> You need a file named ".purify".  See PA #1 handout under section 
> "Deliverables" and the Purify FAQ.  If you don't need to suppress any 
> purify errors, see thread ".purify" 1/21/2006 4:31 PM.
>
> Forum Mangal Parmar wrote:
>> I did the following:
>>
>> elaine34:~/submit> /usr/class/cs244a/bin/submit.pl hw1 mjf
>> SubmitBase: /afs/ir/class/cs244a/submissions
>> Debug Level = 0
>> could not find any file matching .purify in 
>> /afs/ir.stanford.edu/users/f/o/forumm/submit!!
>> ======================================================================
>> Your code could not be sumitted because of some error.
>> If you think there is a mistake, please send an email to your TA
>> (mjf; <mjf@stanford.edu >) with the relevant information.
>> ======================================================================
>>
>>
>> Died at /usr/class/cs244a/bin/submit.pl line 194.
>> elaine34:~/submit> ls
>> Makefile  ftpcopy.c  ftpcopy.purify  ftpparse.c  ftpparse.h 
>> purify.output readme.txt
>>
>>
>>
>> pls can u tell me wht to do abt this
>> thanks
>> Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: submit error
Date: Sun, 22 Jan 2006 18:51:15 -0800
Lines: 44
Distribution: su
Message-ID: <dr1gd0$g5i$1@news.Stanford.EDU>
References: <dr1857$8q3$1@news.Stanford.EDU> <dr18es$8hh$1@news.Stanford.EDU> <dr195r$9k6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9737

Your readme file needs to be named README instead of readme.txt.


"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
news:dr195r$9k6$1@news.Stanford.EDU...
> thanks tht works but the test script still dint work.. my program exits on 
> reading 0 and so does the test script!!
>
>
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dr18es$8hh$1@news.Stanford.EDU...
>> You need a file named ".purify".  See PA #1 handout under section 
>> "Deliverables" and the Purify FAQ.  If you don't need to suppress any 
>> purify errors, see thread ".purify" 1/21/2006 4:31 PM.
>>
>> Forum Mangal Parmar wrote:
>>> I did the following:
>>>
>>> elaine34:~/submit> /usr/class/cs244a/bin/submit.pl hw1 mjf
>>> SubmitBase: /afs/ir/class/cs244a/submissions
>>> Debug Level = 0
>>> could not find any file matching .purify in 
>>> /afs/ir.stanford.edu/users/f/o/forumm/submit!!
>>> ======================================================================
>>> Your code could not be sumitted because of some error.
>>> If you think there is a mistake, please send an email to your TA
>>> (mjf; <mjf@stanford.edu >) with the relevant information.
>>> ======================================================================
>>>
>>>
>>> Died at /usr/class/cs244a/bin/submit.pl line 194.
>>> elaine34:~/submit> ls
>>> Makefile  ftpcopy.c  ftpcopy.purify  ftpparse.c  ftpparse.h 
>>> purify.output readme.txt
>>>
>>>
>>>
>>> pls can u tell me wht to do abt this
>>> thanks
>>> Forum
>
> 


.

Path: shelby.stanford.edu!saga16.Stanford.EDU!lamskm
From: lamskm@Stanford.EDU (Michael Lam)
Newsgroups: su.class.cs244a
Subject: my ftpcopy timedout with ftp.slac.stanford.edu at level 5
Date: Mon, 23 Jan 2006 03:36:01 +0000 (UTC)
Lines: 30
Distribution: su
Message-ID: <dr1iv1$i34$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Summary: my ftpcopy timedout with ftp.slac.stanford.edu at level 5
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:9738

My ftpcopy always timedout with ftp.slac.stanford.edu at level 5.

If I lower the level to 4, it returns.

I thought I must be shuting down/closing the sockets right in order to
get to level 4.  And my ftpcopy has been working on sites like
gatekeeper.dec.com with not too many levels.

Here is the code that I have had working for less than 4 levels of
traversal:

  s2 = mkdataport(s,sin_addr);

  strcpy(cmd,"list\r\n");
  if( strlen(cmd) != write( s, cmd, strlen(cmd)) ) {
    fprintf(stderr, "ERROR: failed while writing to server\n");
    close( s );
    exit( FAILURE );
  }

  if( (s3=accept(s2, (struct sockaddr *) &servAddr, &namelen)) < 0 ) {
    fprintf(stderr, "ERROR: failed to getsockname to server\n");
    close( s2 );
    exit( FAILURE );
  }

Thanks in advance for any comment.  I submitted it anyway.

-Michael

.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <justin-p@sbcglobal.net>
Newsgroups: su.class.cs244a
Subject: Re: my ftpcopy timedout with ftp.slac.stanford.edu at level 5
Date: Sun, 22 Jan 2006 20:14:41 -0800
Lines: 42
Distribution: su
Message-ID: <BFF99831.2580%justin-p@sbcglobal.net>
References: <dr1iv1$i34$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: my ftpcopy timedout with ftp.slac.stanford.edu at level 5
Thread-Index: AcYf04gvxwPmNYvGEdq6YwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:9739

It's probably not the cause of your timeout, but your write call is
potentially an issue.  It's not guaranteed that your write will complete in
one call, which it is assuming right now.  Otherwise, I don't see any issues
with the snippet you've provided.

--Justin


On 1/22/06 7:36 PM, in article dr1iv1$i34$1@news.Stanford.EDU, "Michael Lam"
<lamskm@Stanford.EDU> wrote:

> My ftpcopy always timedout with ftp.slac.stanford.edu at level 5.
> 
> If I lower the level to 4, it returns.
> 
> I thought I must be shuting down/closing the sockets right in order to
> get to level 4.  And my ftpcopy has been working on sites like
> gatekeeper.dec.com with not too many levels.
> 
> Here is the code that I have had working for less than 4 levels of
> traversal:
> 
>   s2 = mkdataport(s,sin_addr);
> 
>   strcpy(cmd,"list\r\n");
>   if( strlen(cmd) != write( s, cmd, strlen(cmd)) ) {
>     fprintf(stderr, "ERROR: failed while writing to server\n");
>     close( s );
>     exit( FAILURE );
>   }
> 
>   if( (s3=accept(s2, (struct sockaddr *) &servAddr, &namelen)) < 0 ) {
>     fprintf(stderr, "ERROR: failed to getsockname to server\n");
>     close( s2 );
>     exit( FAILURE );
>   }
> 
> Thanks in advance for any comment.  I submitted it anyway.
> 
> -Michael
> 

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: my ftpcopy timedout with ftp.slac.stanford.edu at level 5
Date: Mon, 23 Jan 2006 00:26:19 -0800
Lines: 34
Distribution: su
Message-ID: <dr23vi$63u$1@news.Stanford.EDU>
References: <dr1iv1$i34$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr1iv1$i34$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9740

What have you done to debug this?  Can you figure out in which function 
the timeout occurs?

Michael Lam wrote:
> My ftpcopy always timedout with ftp.slac.stanford.edu at level 5.
> 
> If I lower the level to 4, it returns.
> 
> I thought I must be shuting down/closing the sockets right in order to
> get to level 4.  And my ftpcopy has been working on sites like
> gatekeeper.dec.com with not too many levels.
> 
> Here is the code that I have had working for less than 4 levels of
> traversal:
> 
>   s2 = mkdataport(s,sin_addr);
> 
>   strcpy(cmd,"list\r\n");
>   if( strlen(cmd) != write( s, cmd, strlen(cmd)) ) {
>     fprintf(stderr, "ERROR: failed while writing to server\n");
>     close( s );
>     exit( FAILURE );
>   }
> 
>   if( (s3=accept(s2, (struct sockaddr *) &servAddr, &namelen)) < 0 ) {
>     fprintf(stderr, "ERROR: failed to getsockname to server\n");
>     close( s2 );
>     exit( FAILURE );
>   }
> 
> Thanks in advance for any comment.  I submitted it anyway.
> 
> -Michael
> 
.

Path: shelby.stanford.edu!saga4.Stanford.EDU!lamskm
From: lamskm@Stanford.EDU (Michael Lam)
Newsgroups: su.class.cs244a
Subject: Re: my ftpcopy timedout with ftp.slac.stanford.edu at level 5
Date: Mon, 23 Jan 2006 16:39:26 +0000 (UTC)
Lines: 52
Distribution: su
Message-ID: <dr30ru$2rf$1@news.Stanford.EDU>
References: <dr1iv1$i34$1@news.Stanford.EDU> <dr23vi$63u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:9741

I used gdb and the hang was at the accept call below:

   if( (s3=accept(s2, (struct sockaddr *) &servAddr, &namelen)) < 0 ) {

The call was made in a recursive call with 6 stack frames because 
of level 5.  But I shutdown and closed the data sockets before the
recursive call.

Because the call worked for cases with fewer dir levels,
I have a feeling that if I can increase the socket layer resources,
I may be able to get around.  I tried to increase the 2nd parameter of
the listen (for s2) with a higher backlog value.  And I think that
got ftpcopy to traverse longer (but still hangs).

-Michael

Matt Falkenhagen <mjf@stanford.edu> writes:

>What have you done to debug this?  Can you figure out in which function 
>the timeout occurs?

>Michael Lam wrote:
>> My ftpcopy always timedout with ftp.slac.stanford.edu at level 5.
>> 
>> If I lower the level to 4, it returns.
>> 
>> I thought I must be shuting down/closing the sockets right in order to
>> get to level 4.  And my ftpcopy has been working on sites like
>> gatekeeper.dec.com with not too many levels.
>> 
>> Here is the code that I have had working for less than 4 levels of
>> traversal:
>> 
>>   s2 = mkdataport(s,sin_addr);
>> 
>>   strcpy(cmd,"list\r\n");
>>   if( strlen(cmd) != write( s, cmd, strlen(cmd)) ) {
>>     fprintf(stderr, "ERROR: failed while writing to server\n");
>>     close( s );
>>     exit( FAILURE );
>>   }
>> 
>>   if( (s3=accept(s2, (struct sockaddr *) &servAddr, &namelen)) < 0 ) {
>>     fprintf(stderr, "ERROR: failed to getsockname to server\n");
>>     close( s2 );
>>     exit( FAILURE );
>>   }
>> 
>> Thanks in advance for any comment.  I submitted it anyway.
>> 
>> -Michael
>> 
.

Path: shelby.stanford.edu!saga14.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw2, toplogy assignments
Date: Mon, 23 Jan 2006 23:11:07 -0800
Lines: 6
Distribution: su
Message-ID: <Pine.GSO.4.44.0601232309430.6539-100000@saga14.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9742

Hi,
   did I miss any mails on topology assigments for hw2?
thanks,
Vijay.


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw2, toplogy assignments
Date: Tue, 24 Jan 2006 00:17:26 -0800
Lines: 9
Distribution: su
Message-ID: <dr4nqv$722$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601232309430.6539-100000@saga14.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601232309430.6539-100000@saga14.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9743

Nope, these haven't gone out yet.  We'll send them asap.

Vijay K Kulkarni wrote:
> Hi,
>    did I miss any mails on topology assigments for hw2?
> thanks,
> Vijay.
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: grades?
Date: Tue, 24 Jan 2006 16:22:04 -0800
Lines: 4
Distribution: su
Message-ID: <dr6gbf$5tj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9744

Was it mentioned today in class that grades for A1 are posted? If they 
are, where are they posted?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: grades?
Date: Tue, 24 Jan 2006 16:36:13 -0800
Lines: 10
Distribution: su
Message-ID: <dr6h5t$6il$1@news.Stanford.EDU>
References: <dr6gbf$5tj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dr6gbf$5tj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9745

I don't think grades are posted. But when they are I believe they will 
be posted under eeclass. There's a tab labeled grades there.

Jens.

Naeim Semsarilar wrote:
> Was it mentioned today in class that grades for A1 are posted? If they 
> are, where are they posted?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: grades?
Date: Tue, 24 Jan 2006 16:37:11 -0800
Lines: 9
Distribution: su
Message-ID: <dr6h80$6l2$1@news.Stanford.EDU>
References: <dr6gbf$5tj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dr6gbf$5tj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9746

No, they haven't been graded yet.  The professor just said we did some 
quick tests and the submissions look good.  The grades will be posted on 
EEclass when ready.

Naeim Semsarilar wrote:
> Was it mentioned today in class that grades for A1 are posted? If they 
> are, where are they posted?
> 
> Thanks.
.

Path: shelby.stanford.edu!elaine43.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: sr_send_packet, partial write?
Date: Wed, 25 Jan 2006 11:18:10 -0800
Lines: 18
Distribution: su
Message-ID: <Pine.GSO.4.44.0601251115070.8440-100000@elaine43.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9747

I was browsing the source for the simple router and ran across a bit of
code in the function sr_send_packet like this:

if( write(sr->sockfd, sr_pkt, total_len) < total_len )
    {
        fprintf(stderr, "Error writing packet\n");
        free(sr_pkt);
        return -1;
    }

It looks like this code assumes that the whole buffer is written in a
single write.  Is that a bug,  it seems like those buffers could be large,
right?

Thanks,

Roy

.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: rfc 1812 missing?
Date: Wed, 25 Jan 2006 21:36:00 +0000 (UTC)
Lines: 18
Distribution: su
Message-ID: <dr8r00$qdu$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.12.6smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9748

the link at the top of assignment 2 to rfc 1812 does not work for
me. 

it points to
http://www.stanford.edu/class/cs244a/homeworks/hw2/rfc1812.txt
which doesn't seem to exist. 

also, trying to construct my own path to it based off the other
rfc paths doesn't seem to work either: 

http://www.stanford.edu/class/cs244a/rfc/rfc1812.txt

is this rfc missing from the tree, or am i just missing something 
on my own? 

thanks, 
ryan. 

.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: rfc 1812 missing?
Date: Wed, 25 Jan 2006 15:33:39 -0800
Lines: 27
Distribution: su
Message-ID: <dr91sf$5sr$1@news.Stanford.EDU>
References: <dr8r00$qdu$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9749

You can just google for the RFC, they're all over the web (I'm using the one
at faqs.org, I think).

Waynn

"Ryan Matthew Smith" <rysmi@Stanford.EDU> wrote in message
news:dr8r00$qdu$1@news.Stanford.EDU...
> the link at the top of assignment 2 to rfc 1812 does not work for
> me.
>
> it points to
> http://www.stanford.edu/class/cs244a/homeworks/hw2/rfc1812.txt
> which doesn't seem to exist.
>
> also, trying to construct my own path to it based off the other
> rfc paths doesn't seem to work either:
>
> http://www.stanford.edu/class/cs244a/rfc/rfc1812.txt
>
> is this rfc missing from the tree, or am i just missing something
> on my own?
>
> thanks,
> ryan.
>


.

Path: shelby.stanford.edu!saga22.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: purify for hw2
Date: Wed, 25 Jan 2006 16:51:18 -0800
Lines: 41
Distribution: su
Message-ID: <Pine.GSO.4.44.0601251647320.9335-100000@saga22.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9750

Hi,

 I get errors when trying to do 'make sr.purify' for hw2:
---------------------------------------------------------
Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright
IBM Corp. 1992, 2005 All rights reserved.
Instrumenting:
Purify engine: Error: Tried to link with directory (/usr/lib): skipping.

Purify engine: Error: Errors detected while instrumenting files.
Linking suppressed.
(To force continuation, use "purify -best-effort $(CC) ...".)
make: *** [sr.purify] Error 1


---------------------------------------------------

I tried adding the -best-effort flag, but it doesn't like whatever I'm
doing:

------------------------------------------------------------
Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright
IBM Corp. 1992, 2005 All rights reserved.
Instrumenting:
Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
 Linking
ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors

Purify engine: Error: The linker returned error code: 1

make: *** [sr.purify] Error 1

-------------------------------------------------------------

Anyone gotten it to work?

Thanks,
Megan


.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ARP Request/Reply
Date: Wed, 25 Jan 2006 16:52:57 -0800
Lines: 90
Distribution: su
Message-ID: <Pine.GSO.4.44.0601251648180.696-101000@elaine27.Stanford.EDU>
Mime-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1138236777=:696"
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9751

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-851401618-1138236777=:696
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello,

When we send ARP requests, do we send to all interfaces?  I tried to do
this, and it seems like I'm doing it correctly where my source mac addr
for the arp requests are mac addresses of my 3 different interfaces, (debug
output below), but ethereal says it's always from eth0.  And also
etherreal sees a response, but seems like sr_handlepacket is not called to
process it.  I'm confused...attaching my logfile as well.  Thanks in
advance.

Sending ARP Request to: eth0
Printing packet-----------------806
ff ff ff ff ff ff 70 00 00 50 00 01 08 06 00 01
08 00 06 04 00 01 70 00 00 50 00 01 c0 a8 83 31
00 00 00 00 00 00 c0 a8 83 31 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 02 c4 a8
-----------------
Sending ARP request to following interface
:Interface: eth1
  hardware address 70:00:00:50:00:02
  ip address 192.168.131.50
--------
Sending ARP Request to: eth1
Printing packet-----------------806
ff ff ff ff ff ff 70 00 00 50 00 02 08 06 00 01
08 00 06 04 00 01 70 00 00 50 00 02 c0 a8 83 32
00 00 00 00 00 00 c0 a8 83 32 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 02 c4 a8
-----------------
Sending ARP request to following interface
:Interface: eth2
  hardware address 70:00:00:50:00:06
  ip address 192.168.131.52
--------
Sending ARP Request to: eth2
Printing packet-----------------806
ff ff ff ff ff ff 70 00 00 50 00 06 08 06 00 01
08 00 06 04 00 01 70 00 00 50 00 06 c0 a8 83 34
00 00 00 00 00 00 c0 a8 83 34 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 02 c4 a8
-----------------

-Wai Kei

---559023410-851401618-1138236777=:696
Content-Type: APPLICATION/octet-stream; name=logfile
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.44.0601251652570.696@elaine27.Stanford.EDU>
Content-Description: 
Content-Disposition: attachment; filename=logfile

obLD1AACAAQAAAAAAAAAAAAABAAAAAABQ9gbNQAMLbkAAAA8AAAAPP//////
/wDggQQm2QgGAAEIAAYEAAEA4IEEJtmsGEoRAAAAAAAAwKiDMQAAAAAAAAAA
AAAAAAAAAAAAAEPYGzUADDGuAAAAOwAAADsA4IEEJtlwAABQAAEIBgABCAAG
BAACcAAAUAABwKiDMQDggQQm2awYShEtCnRjcCAgICAgICAgdHBpX0PYGzYA
DL28AAAAPgAAAD5wAABQAAEA4IEEJtkIAEUAADCyg0AAPQaMwqtAD2bAqIMz
6KMAFdfEhkYAAAAAcAJg9NzkAAABAQQCAgQFtEPYGzYADNokAAAAOwAAADv/
//////9wAABQAAEIBgABCAAGBAABcAAAUAABwKiDMQAAAAAAAMCogzEAAAAA
AAAAAAAAAAAAAAAAAEPYGzYADN3PAAAAOwAAADv///////9wAABQAAIIBgAB
CAAGBAABcAAAUAACwKiDMgAAAAAAAMCogzIAAAAAAAAAAAAAAAAAAAAAAEPY
GzYADN+cAAAAOwAAADv///////9wAABQAAYIBgABCAAGBAABcAAAUAAGwKiD
NAAAAAAAAMCogzQAAAAAAAAAAAAAAAAAAAAAAEPYGzoAAw44AAAAPgAAAD5w
AABQAAEA4IEEJtkIAEUAADCyhEAAPQaMwatAD2bAqIMz6KMAFdfEhkYAAAAA
cAJg9NzkAAABAQQCAgQFtEPYGzoAAxVBAAAAOwAAADv///////9wAABQAAEI
BgABCAAGBAABcAAAUAABwKiDMQAAAAAAAMCogzEAAAAAAAAAAAAAAAAAAAAC
xEPYGzoAAxekAAAAOwAAADv///////9wAABQAAIIBgABCAAGBAABcAAAUAAC
wKiDMgAAAAAAAMCogzIAAAAAAAAAAAAAAAAAAAACxEPYGzoAAxnwAAAAOwAA
ADv///////9wAABQAAYIBgABCAAGBAABcAAAUAAGwKiDNAAAAAAAAMCogzQA
AAAAAAAAAAAAAAAAAAACxEPYG0AADoBvAAAAPgAAAD5wAABQAAEA4IEEJtkI
AEUAADCyhUAAPQaMwKtAD2bAqIMz6KMAFdfEhkYAAAAAcAJg9NzkAAABAQQC
AgQFtEPYG0AADodQAAAAOwAAADv///////9wAABQAAEIBgABCAAGBAABcAAA
UAABwKiDMQAAAAAAAMCogzEAAAAAAAAAAAAAAAAAAAACxEPYG0AADomtAAAA
OwAAADv///////9wAABQAAIIBgABCAAGBAABcAAAUAACwKiDMgAAAAAAAMCo
gzIAAAAAAAAAAAAAAAAAAAACxEPYG0AADov7AAAAOwAAADv///////9wAABQ
AAYIBgABCAAGBAABcAAAUAAGwKiDNAAAAAAAAMCogzQAAAAAAAAAAAAAAAAA
AAACxEPYG0kAAloaAAAAPAAAADxwAABQAAEA4IEEJtkIAEUAACiyhkAAPQaM
x6tAD2bAqIMz6KMAFdfEhkcAAAAAUARg9AmlAAAAAAAAAABD2BtJAAJhUAAA
ADsAAAA7////////cAAAUAABCAYAAQgABgQAAXAAAFAAAcCogzEAAAAAAADA
qIMxAAAAAAAAAAAAAAAAAAAAAsRD2BtJAAJjwQAAADsAAAA7////////cAAA
UAACCAYAAQgABgQAAXAAAFAAAsCogzIAAAAAAADAqIMyAAAAAAAAAAAAAAAA
AAAAAsRD2BtJAAJl6QAAADsAAAA7////////cAAAUAAGCAYAAQgABgQAAXAA
AFAABsCogzQAAAAAAADAqIM0AAAAAAAAAAAAAAAAAAAAAsQ=
---559023410-851401618-1138236777=:696--
.

Path: shelby.stanford.edu!saga22.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify for hw2
Date: Wed, 25 Jan 2006 16:53:43 -0800
Lines: 51
Distribution: su
Message-ID: <Pine.GSO.4.44.0601251653130.9474-100000@saga22.Stanford.EDU>
References: <Pine.GSO.4.44.0601251647320.9335-100000@saga22.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0601251647320.9335-100000@saga22.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9752

Never mind, I just copied the flags from the last Makefile... but still
maybe the tar file could be updated...

-Megan

On Wed, 25 Jan 2006, Megan Anneke
Wachs wrote:

> Hi,
>
>  I get errors when trying to do 'make sr.purify' for hw2:
> ---------------------------------------------------------
> Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright
> IBM Corp. 1992, 2005 All rights reserved.
> Instrumenting:
> Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>
> Purify engine: Error: Errors detected while instrumenting files.
> Linking suppressed.
> (To force continuation, use "purify -best-effort $(CC) ...".)
> make: *** [sr.purify] Error 1
>
>
> ---------------------------------------------------
>
> I tried adding the -best-effort flag, but it doesn't like whatever I'm
> doing:
>
> ------------------------------------------------------------
> Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright
> IBM Corp. 1992, 2005 All rights reserved.
> Instrumenting:
> Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>  Linking
> ld: fatal: option -dn and -P are incompatible
> ld: fatal: Flags processing errors
>
> Purify engine: Error: The linker returned error code: 1
>
> make: *** [sr.purify] Error 1
>
> -------------------------------------------------------------
>
> Anyone gotten it to work?
>
> Thanks,
> Megan
>
>
>

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: rtable
Date: Wed, 25 Jan 2006 22:08:54 -0800
Lines: 20
Distribution: su
Message-ID: <Pine.GSO.4.44.0601252157100.22473-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9753

Hello,

Please disregard my previous post.  I drove home and everything worked.
I'm guessing it's cause I was using a different version of ethereal at
work or something to that effect...

Just wanted to make sure, do we statically put in entries for the rtable
file?  None of the distance vector stuff right?

Also, what's the point of queueing packets waiting for arp replies?  Why
not just wait for retransmit of the same packet from the source?  It seems
like the source will re-send the same packet anyway while the router waits
for and processes the ARP response.

As always, thanks very much in advance.

-Wai Kei

p.s. congrats.jpg cracked me up

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: rfc 1812 missing?
Date: Wed, 25 Jan 2006 23:12:36 -0800
Lines: 23
Distribution: su
Message-ID: <dr9sun$3di$1@news.Stanford.EDU>
References: <dr8r00$qdu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <dr8r00$qdu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9754

Thanks for the notice. I fixed the link.

Ari

Ryan Matthew Smith wrote:
> the link at the top of assignment 2 to rfc 1812 does not work for
> me. 
> 
> it points to
> http://www.stanford.edu/class/cs244a/homeworks/hw2/rfc1812.txt
> which doesn't seem to exist. 
> 
> also, trying to construct my own path to it based off the other
> rfc paths doesn't seem to work either: 
> 
> http://www.stanford.edu/class/cs244a/rfc/rfc1812.txt
> 
> is this rfc missing from the tree, or am i just missing something 
> on my own? 
> 
> thanks, 
> ryan. 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_send_packet, partial write?
Date: Thu, 26 Jan 2006 01:25:26 -0800
Lines: 23
Distribution: su
Message-ID: <dra4ii$duf$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601251115070.8440-100000@elaine43.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601251115070.8440-100000@elaine43.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9755

Haha, yeah it probably could be better written.  As far as I can tell, 
it's just a programmer being fast/lazy.  Although it does check if 
everything was written.

Roy Mehdi Zeighami wrote:
> I was browsing the source for the simple router and ran across a bit of
> code in the function sr_send_packet like this:
> 
> if( write(sr->sockfd, sr_pkt, total_len) < total_len )
>     {
>         fprintf(stderr, "Error writing packet\n");
>         free(sr_pkt);
>         return -1;
>     }
> 
> It looks like this code assumes that the whole buffer is written in a
> single write.  Is that a bug,  it seems like those buffers could be large,
> right?
> 
> Thanks,
> 
> Roy
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify for hw2
Date: Thu, 26 Jan 2006 01:39:08 -0800
Lines: 56
Distribution: su
Message-ID: <dra5c8$eh7$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601251647320.9335-100000@saga22.Stanford.EDU> <Pine.GSO.4.44.0601251653130.9474-100000@saga22.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601251653130.9474-100000@saga22.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9756

Good point, I've updated the Makefile.

Megan Anneke Wachs wrote:
> Never mind, I just copied the flags from the last Makefile... but still
> maybe the tar file could be updated...
> 
> -Megan
> 
> On Wed, 25 Jan 2006, Megan Anneke
> Wachs wrote:
> 
> 
>>Hi,
>>
>> I get errors when trying to do 'make sr.purify' for hw2:
>>---------------------------------------------------------
>>Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright
>>IBM Corp. 1992, 2005 All rights reserved.
>>Instrumenting:
>>Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>>
>>Purify engine: Error: Errors detected while instrumenting files.
>>Linking suppressed.
>>(To force continuation, use "purify -best-effort $(CC) ...".)
>>make: *** [sr.purify] Error 1
>>
>>
>>---------------------------------------------------
>>
>>I tried adding the -best-effort flag, but it doesn't like whatever I'm
>>doing:
>>
>>------------------------------------------------------------
>>Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright
>>IBM Corp. 1992, 2005 All rights reserved.
>>Instrumenting:
>>Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>> Linking
>>ld: fatal: option -dn and -P are incompatible
>>ld: fatal: Flags processing errors
>>
>>Purify engine: Error: The linker returned error code: 1
>>
>>make: *** [sr.purify] Error 1
>>
>>-------------------------------------------------------------
>>
>>Anyone gotten it to work?
>>
>>Thanks,
>>Megan
>>
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: rtable
Date: Thu, 26 Jan 2006 01:44:02 -0800
Lines: 30
Distribution: su
Message-ID: <dra5le$eps$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601252157100.22473-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601252157100.22473-100000@elaine40.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9757

Wai Kei So wrote:
> Hello,
> 
> Please disregard my previous post.  I drove home and everything worked.
> I'm guessing it's cause I was using a different version of ethereal at
> work or something to that effect...
> 
> Just wanted to make sure, do we statically put in entries for the rtable
> file?  None of the distance vector stuff right?

Yep just statically add the routes to rtable.
> 
> Also, what's the point of queueing packets waiting for arp replies?  Why
> not just wait for retransmit of the same packet from the source?  It seems
> like the source will re-send the same packet anyway while the router waits
> for and processes the ARP response.

The source might not retransmit the packet.  It will if it's using, say, 
TCP but you can't assume it will.  Your router is supposed to make a 
"best-effort" attempt to forward the packet.

> 
> As always, thanks very much in advance.
> 
> -Wai Kei
> 
> p.s. congrats.jpg cracked me up
> 

Me too.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Sample Exams
Date: Thu, 26 Jan 2006 12:40:12 -0800
Lines: 10
Distribution: su
Message-ID: <drbc3o$pj4$1@news.Stanford.EDU>
References: <dqklnc$29k$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dqklnc$29k$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9758

They are up now.  Enjoy ^_^

Steve Goldman wrote:
> Hi,
> 
> The links to the past years' midterms and finals on the webpage are 
> dead.  Any idea if we can get a look at those?
> 
> Thanks,
> Steve
.

Path: shelby.stanford.edu!elaine32.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ARP retries and timeouts
Date: Thu, 26 Jan 2006 14:44:00 -0800
Lines: 17
Distribution: su
Message-ID: <Pine.GSO.4.44.0601261430280.12310-100000@elaine32.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9759

Hi,

   say I receive a packet for which nexthop IP's dmac is not
known. I initiate ARP request for this. From previous post on related
subject it seems we are required to queue this pkt and transmit the
original packet when we get reply for the ARP.
   now, how many pkts will I have to enqueue on to the list of pkts
waiting for ARP reply? do I need to throttle or enqueue every single
recieved pkt for that missing ARP entry?
   Is there a ARP timeout value after which all these queued packets will
be dropped if a reply is not received by then? And then initiate one more
ARP request on receiving pkts that require the missing ARP entry?


thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP retries and timeouts
Date: Thu, 26 Jan 2006 16:20:41 -0800
Lines: 28
Distribution: su
Message-ID: <drbp16$an0$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601261430280.12310-100000@elaine32.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601261430280.12310-100000@elaine32.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9760

Vijay K Kulkarni wrote:
> Hi,
> 
>    say I receive a packet for which nexthop IP's dmac is not
> known. I initiate ARP request for this. From previous post on related
> subject it seems we are required to queue this pkt and transmit the
> original packet when we get reply for the ARP.
>    now, how many pkts will I have to enqueue on to the list of pkts
> waiting for ARP reply? do I need to throttle or enqueue every single
> recieved pkt for that missing ARP entry?
>    Is there a ARP timeout value after which all these queued packets will
> be dropped if a reply is not received by then? And then initiate one more
> ARP request on receiving pkts that require the missing ARP entry?

 From the handout:

"The router queues all packets waiting for outstanding ARP replies. If a 
host does not respond to 5 ARP requests, the queued packet is dropped 
and an ICMP host unreachable message is sent back to the source of the 
queued packet."

It's up to you to decide how far to space the ARP requests.

> 
> 
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP retries and timeouts
Date: Thu, 26 Jan 2006 17:18:57 -0800
Lines: 40
Distribution: su
Message-ID: <Pine.GSO.4.44.0601261714220.15429-100000@elaine27.Stanford.EDU>
References: <Pine.GSO.4.44.0601261430280.12310-100000@elaine32.Stanford.EDU>
 <drbp16$an0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Matt Falkenhagen <mjf@stanford.edu>
In-Reply-To: <drbp16$an0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9761

On Thu, 26 Jan 2006, Matt Falkenhagen wrote:

> Vijay K Kulkarni wrote:
> > Hi,
> >
> >    say I receive a packet for which nexthop IP's dmac is not
> > known. I initiate ARP request for this. From previous post on related
> > subject it seems we are required to queue this pkt and transmit the
> > original packet when we get reply for the ARP.
> >    now, how many pkts will I have to enqueue on to the list of pkts
> > waiting for ARP reply? do I need to throttle or enqueue every single
> > recieved pkt for that missing ARP entry?
> >    Is there a ARP timeout value after which all these queued packets will
> > be dropped if a reply is not received by then? And then initiate one more
> > ARP request on receiving pkts that require the missing ARP entry?
>
>  From the handout:
>
> "The router queues all packets waiting for outstanding ARP replies. If a
> host does not respond to 5 ARP requests, the queued packet is dropped
> and an ICMP host unreachable message is sent back to the source of the
> queued packet."

My question was more on say while we are waiting for the ARP reply/timeouts
what if 1000 pkts are received? we queue 1000 pkts? what if 100000 pkts
are recieved? any throttling needs to be done here? or taildrop after some
threshold value is reached?

thanks,
Vijay.
>
> It's up to you to decide how far to space the ARP requests.
>
> >
> >
> > thanks,
> > Vijay.
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP retries and timeouts
Date: Thu, 26 Jan 2006 17:55:50 -0800
Lines: 51
Distribution: su
Message-ID: <drbuov$gfg$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601261430280.12310-100000@elaine32.Stanford.EDU> <drbp16$an0$1@news.Stanford.EDU> <Pine.GSO.4.44.0601261714220.15429-100000@elaine27.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601261714220.15429-100000@elaine27.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9762

You are free to choose some threshold number of packets, so long as no 
packets are ever dropped under normal network conditions. Alternatively, 
you can queue packets without a threshold and simply abort the program 
if you ever run out of memory.

Ari

Vijay K Kulkarni wrote:
> On Thu, 26 Jan 2006, Matt Falkenhagen wrote:
> 
> 
>>Vijay K Kulkarni wrote:
>>
>>>Hi,
>>>
>>>   say I receive a packet for which nexthop IP's dmac is not
>>>known. I initiate ARP request for this. From previous post on related
>>>subject it seems we are required to queue this pkt and transmit the
>>>original packet when we get reply for the ARP.
>>>   now, how many pkts will I have to enqueue on to the list of pkts
>>>waiting for ARP reply? do I need to throttle or enqueue every single
>>>recieved pkt for that missing ARP entry?
>>>   Is there a ARP timeout value after which all these queued packets will
>>>be dropped if a reply is not received by then? And then initiate one more
>>>ARP request on receiving pkts that require the missing ARP entry?
>>
>> From the handout:
>>
>>"The router queues all packets waiting for outstanding ARP replies. If a
>>host does not respond to 5 ARP requests, the queued packet is dropped
>>and an ICMP host unreachable message is sent back to the source of the
>>queued packet."
> 
> 
> My question was more on say while we are waiting for the ARP reply/timeouts
> what if 1000 pkts are received? we queue 1000 pkts? what if 100000 pkts
> are recieved? any throttling needs to be done here? or taildrop after some
> threshold value is reached?
> 
> thanks,
> Vijay.
> 
>>It's up to you to decide how far to space the ARP requests.
>>
>>
>>>
>>>thanks,
>>>Vijay.
>>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: approx effort for PA#2
Date: Thu, 26 Jan 2006 19:54:12 -0800
Lines: 6
Distribution: su
Message-ID: <43D99964.3050909@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9763

Any guidance on how much time and how many lines of code this should 
take? This was very useful in the FTP Copy assignment.

Thanks,
Sesha

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: approx effort for PA#2
Date: Thu, 26 Jan 2006 22:56:06 -0800
Lines: 9
Distribution: su
Message-ID: <drcg67$3rp$1@news.Stanford.EDU>
References: <43D99964.3050909@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <43D99964.3050909@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:9764

It should be about the same as ftpcopy.

Sesha Narahari wrote:
> Any guidance on how much time and how many lines of code this should 
> take? This was very useful in the FTP Copy assignment.
> 
> Thanks,
> Sesha
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: hiccup
Date: Fri, 27 Jan 2006 22:43:33 -0800
Lines: 5
Distribution: su
Message-ID: <drf3qk$sci$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9766

fyi the server was rebooted.  This happens periodically to dislodge 
stuck clients (deficiency of the server). So don't worry too much if
your connection gets dropped once in awhile :)

..martin
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Timeout for host unreach
Date: Fri, 27 Jan 2006 23:20:57 -0800
Lines: 9
Distribution: su
Message-ID: <drf60o$169$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9767


There is some confusion (my fault) on what the timeout limit is
for host unreach.  Host unreach should be sent after 5 failed
ARP attempts.  Host unreaches should be sent back to the client
after 5-7 seconds of sending the first ARP.

The FAQ will be updated accordingly.

..martin
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: sending ARP requests / rtable
Date: Fri, 27 Jan 2006 23:58:52 -0800
Lines: 17
Distribution: su
Message-ID: <drf885$59g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9768

It's unclear to me how we should decide which interface to send an ARP 
request on. Let's say an IP packet destined for 192.168.130.12 arrives 
at the router and there are no entries for this address in the ARP 
cache. How should the router decide if the ARP request should be sent on 
eth0, eth1, or eth2?

I think it was mentioned in the problem session that we should look up 
the destination IP in rtable and make a decision, but what if rtable 
only has the default entry at that point? Do we send the ARP request on 
all 3 interfaces in that case?


My second question is about the rtable file. The stuff in rtable is 
loaded into the routing_table member of struct sr_instance. When we need 
to grow the table, do we actually need to dump an updated rtable file?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sending ARP requests / rtable
Date: Sat, 28 Jan 2006 00:31:51 -0800
Lines: 27
Distribution: su
Message-ID: <drfa5v$7ue$1@news.Stanford.EDU>
References: <drf885$59g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drf885$59g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9769

OK I was under the impression that we are supposed to dynamically grow 
the rtable file and that was the source of my confusion. I will assume 
that it is acceptable to edit the rtable file manually *before* running 
the router and add static routes in. Please tell me if this is the wrong 
assumption.

Thanks.


Naeim Semsarilar wrote:
> It's unclear to me how we should decide which interface to send an ARP 
> request on. Let's say an IP packet destined for 192.168.130.12 arrives 
> at the router and there are no entries for this address in the ARP 
> cache. How should the router decide if the ARP request should be sent on 
> eth0, eth1, or eth2?
> 
> I think it was mentioned in the problem session that we should look up 
> the destination IP in rtable and make a decision, but what if rtable 
> only has the default entry at that point? Do we send the ARP request on 
> all 3 interfaces in that case?
> 
> 
> My second question is about the rtable file. The stuff in rtable is 
> loaded into the routing_table member of struct sr_instance. When we need 
> to grow the table, do we actually need to dump an updated rtable file?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sending ARP requests / rtable
Date: Sat, 28 Jan 2006 00:43:38 -0800
Lines: 32
Distribution: su
Message-ID: <drfars$8aq$1@news.Stanford.EDU>
References: <drf885$59g$1@news.Stanford.EDU> <drfa5v$7ue$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drfa5v$7ue$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9770

Yep, manually edit the rtable file with the info from your topology e-mail.

Naeim Semsarilar wrote:
> OK I was under the impression that we are supposed to dynamically grow 
> the rtable file and that was the source of my confusion. I will assume 
> that it is acceptable to edit the rtable file manually *before* running 
> the router and add static routes in. Please tell me if this is the wrong 
> assumption.
> 
> Thanks.
> 
> 
> Naeim Semsarilar wrote:
> 
>> It's unclear to me how we should decide which interface to send an ARP 
>> request on. Let's say an IP packet destined for 192.168.130.12 arrives 
>> at the router and there are no entries for this address in the ARP 
>> cache. How should the router decide if the ARP request should be sent 
>> on eth0, eth1, or eth2?
>>
>> I think it was mentioned in the problem session that we should look up 
>> the destination IP in rtable and make a decision, but what if rtable 
>> only has the default entry at that point? Do we send the ARP request 
>> on all 3 interfaces in that case?
>>
>>
>> My second question is about the rtable file. The stuff in rtable is 
>> loaded into the routing_table member of struct sr_instance. When we 
>> need to grow the table, do we actually need to dump an updated rtable 
>> file?
>>
>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Another ARP request question
Date: Sat, 28 Jan 2006 01:57:29 -0800
Lines: 4
Distribution: su
Message-ID: <drff6h$bf6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9771

What is the router supposed to do with an ARP request for 192.168.130.11 
(which is the IP of eth1) received on eth0?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Another ARP request question
Date: Sat, 28 Jan 2006 02:39:14 -0800
Lines: 8
Distribution: su
Message-ID: <drfhkl$dk8$1@news.Stanford.EDU>
References: <drff6h$bf6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drff6h$bf6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9772

Drop the packet.  Only respond to an ARP request if was received on the 
interface it's asking about.

Naeim Semsarilar wrote:
> What is the router supposed to do with an ARP request for 192.168.130.11 
> (which is the IP of eth1) received on eth0?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Purify Question
Date: Sat, 28 Jan 2006 08:13:59 -0600
Lines: 11
Distribution: su
Message-ID: <drfu7d$qv1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9773

Since sr never exits, how do we get purify info?  I am running purify 
remotely, so the output goes to a purify.output file.  Right now, the only 
way I can make the program exit is with a ctrl-C.  When I do that the output 
file has nothing interesting (just says it got a signal).  Has anyone 
figured a way to work around this?

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Another ARP request question
Date: Sat, 28 Jan 2006 11:06:19 -0800
Lines: 15
Distribution: su
Message-ID: <drgfbk$aih$1@news.Stanford.EDU>
References: <drff6h$bf6$1@news.Stanford.EDU> <drfhkl$dk8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drfhkl$dk8$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9774

OK. Does that mean I'll never be able to ping 192.168.130.11 from the 
Internet and get a reply? And how is it that I can get a reply pinging 
any interface of actual routers, like Gates-rtr?

Thanks.

Matt Falkenhagen wrote:
> Drop the packet.  Only respond to an ARP request if was received on the 
> interface it's asking about.
> 
> Naeim Semsarilar wrote:
>> What is the router supposed to do with an ARP request for 
>> 192.168.130.11 (which is the IP of eth1) received on eth0?
>>
>> Thanks.
.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: tcpdump
Date: Sat, 28 Jan 2006 11:17:54 -0800
Lines: 10
Distribution: su
Message-ID: <Pine.GSO.4.44.0601281116210.857-100000@elaine27.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9775

Has anyone gotten tcpdump to work? I keep getting permission denied (on
saga and elaine):

saga13:~/CS/244a/hw2/stub> /usr/class/cs244a/bin/tcpdump log
tcpdump: /dev/eri: Permission denied


Thanks in advance,
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: tcpdump
Date: Sat, 28 Jan 2006 11:22:53 -0800
Lines: 12
Distribution: su
Message-ID: <drggac$big$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601281116210.857-100000@elaine27.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601281116210.857-100000@elaine27.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9776

-r log

> Has anyone gotten tcpdump to work? I keep getting permission denied (on
> saga and elaine):
> 
> saga13:~/CS/244a/hw2/stub> /usr/class/cs244a/bin/tcpdump log
> tcpdump: /dev/eri: Permission denied
> 
> 
> Thanks in advance,
> Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Another ARP request question
Date: Sat, 28 Jan 2006 11:25:01 -0800
Lines: 29
Distribution: su
Message-ID: <drggec$big$2@news.Stanford.EDU>
References: <drff6h$bf6$1@news.Stanford.EDU> <drfhkl$dk8$1@news.Stanford.EDU> <drgfbk$aih$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drgfbk$aih$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9777


> OK. Does that mean I'll never be able to ping 192.168.130.11 from the 
> Internet and get a reply? 

no

And how is it that I can get a reply pinging
> any interface of actual routers, like Gates-rtr?

the ARP will be for the correct next-hop (the directly connected
interface)


>


> Thanks.
> 
> Matt Falkenhagen wrote:
> 
>> Drop the packet.  Only respond to an ARP request if was received on 
>> the interface it's asking about.
>>
>> Naeim Semsarilar wrote:
>>
>>> What is the router supposed to do with an ARP request for 
>>> 192.168.130.11 (which is the IP of eth1) received on eth0?
>>>
>>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: byte ordering
Date: Sat, 28 Jan 2006 17:41:54 -0800
Lines: 3
Distribution: su
Message-ID: <drh6hb$2s$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9778

What is the byte ordering of field 'ip' in struct sr_if?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: icmp header struct
Date: Sat, 28 Jan 2006 22:04:02 -0800
Lines: 17
Distribution: su
Message-ID: <drhltd$bq6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9779

So I include <netinet/ip_icmp.h> because I want to  use the defined icmp 
header,but I get these errors when I include the file:


In file included from sr_protocol.c:17:
/usr/include/netinet/ip_icmp.h:65: error: parse error before "n_short"
/usr/include/netinet/ip_icmp.h:72: error: parse error before "n_short"
/usr/include/netinet/ip_icmp.h:79: error: parse error before "n_short"
/usr/include/netinet/ip_icmp.h:81: error: parse error before '}' token
/usr/include/netinet/ip_icmp.h:91: error: parse error before "n_time"
/usr/include/netinet/ip_icmp.h:93: error: parse error before "its_ttime"
/usr/include/netinet/ip_icmp.h:101: error: parse error before '}' token
/usr/include/netinet/ip_icmp.h:108: error: parse error before '}' token

Any suggestions? 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp header struct
Date: Sat, 28 Jan 2006 22:22:24 -0800
Lines: 23
Distribution: su
Message-ID: <drhmva$clk$1@news.Stanford.EDU>
References: <drhltd$bq6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drhltd$bq6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9780

I made my own ICMP header struct. It's pretty straight forward. I used 
the provided structs as a template. Just don't forget the 'packed' 
attribute.


Nazia Zaman wrote:
> So I include <netinet/ip_icmp.h> because I want to  use the defined icmp 
> header,but I get these errors when I include the file:
> 
> 
> In file included from sr_protocol.c:17:
> /usr/include/netinet/ip_icmp.h:65: error: parse error before "n_short"
> /usr/include/netinet/ip_icmp.h:72: error: parse error before "n_short"
> /usr/include/netinet/ip_icmp.h:79: error: parse error before "n_short"
> /usr/include/netinet/ip_icmp.h:81: error: parse error before '}' token
> /usr/include/netinet/ip_icmp.h:91: error: parse error before "n_time"
> /usr/include/netinet/ip_icmp.h:93: error: parse error before "its_ttime"
> /usr/include/netinet/ip_icmp.h:101: error: parse error before '}' token
> /usr/include/netinet/ip_icmp.h:108: error: parse error before '}' token
> 
> Any suggestions? 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Rtable file
Date: Sun, 29 Jan 2006 00:16:58 -0800
Lines: 9
Distribution: su
Message-ID: <drhtlp$l6n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9781

Hi,

I read in the newsgroup that we should modify the rtable static file 
according to the assigned topology. I see the IP address in the email, 
however, I'm not sure what to put for mask?

Sutthipong 


.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: grading script availale for hw2?
Date: Sun, 29 Jan 2006 01:09:33 -0800
Lines: 8
Distribution: su
Message-ID: <Pine.GSO.4.44.0601290107380.6844-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9782

Hi,

  is the grading script available for hw2 like it was for hw1? It did
really help that time in catching some silly errors.

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: stanford routing
Date: Sun, 29 Jan 2006 01:10:33 -0800
Lines: 17
Distribution: su
Message-ID: <dri0pv$nf0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9783

This was brought up in the discussion section, but I'd like to see it 
addressed.  I have an on-campus (Escondido Village) IP address that is 
in the 128.12 domain.  These IP's are treated as on-campus IP's for 
other Stanford services, however the EV router is NOT forwarding the 
192.168 packets to the rest of Stanford. This means that I cannot 
locally ping my sr router. I'm developing on my local machine, so this 
would be a big help for me.

Prof. McKeown skirted the issue of the 128.12 IP's in class...what's the 
  deal with them anyways?


Also, I found a great ARP FAQ online for anyone who is interested:
http://www.geocities.com/SiliconValley/Vista/8672/network/arp.html

Thanks for the help,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp header struct
Date: Sun, 29 Jan 2006 01:32:19 -0800
Lines: 23
Distribution: su
Message-ID: <dri238$ogj$1@news.Stanford.EDU>
References: <drhltd$bq6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drhltd$bq6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9784

Try

#include <netinet/in_systm.h>
#include <netinet/ip_icmp.h>

Nazia Zaman wrote:
> So I include <netinet/ip_icmp.h> because I want to  use the defined icmp 
> header,but I get these errors when I include the file:
> 
> 
> In file included from sr_protocol.c:17:
> /usr/include/netinet/ip_icmp.h:65: error: parse error before "n_short"
> /usr/include/netinet/ip_icmp.h:72: error: parse error before "n_short"
> /usr/include/netinet/ip_icmp.h:79: error: parse error before "n_short"
> /usr/include/netinet/ip_icmp.h:81: error: parse error before '}' token
> /usr/include/netinet/ip_icmp.h:91: error: parse error before "n_time"
> /usr/include/netinet/ip_icmp.h:93: error: parse error before "its_ttime"
> /usr/include/netinet/ip_icmp.h:101: error: parse error before '}' token
> /usr/include/netinet/ip_icmp.h:108: error: parse error before '}' token
> 
> Any suggestions? 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: grading script availale for hw2?
Date: Sun, 29 Jan 2006 01:36:52 -0800
Lines: 11
Distribution: su
Message-ID: <dri2bo$oj6$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0601290107380.6844-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0601290107380.6844-100000@elaine4.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9785

nope, sorry.

Vijay K Kulkarni wrote:
> Hi,
> 
>   is the grading script available for hw2 like it was for hw1? It did
> really help that time in catching some silly errors.
> 
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: byte ordering
Date: Sun, 29 Jan 2006 01:45:52 -0800
Lines: 6
Distribution: su
Message-ID: <dri2sm$p2m$1@news.Stanford.EDU>
References: <drh6hb$2s$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drh6hb$2s$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9786

network byte order

Naeim Semsarilar wrote:
> What is the byte ordering of field 'ip' in struct sr_if?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Rtable file
Date: Sun, 29 Jan 2006 02:17:22 -0800
Lines: 22
Distribution: su
Message-ID: <dri4nn$r00$1@news.Stanford.EDU>
References: <drhtlp$l6n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drhtlp$l6n$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9787

 From the way you phrased the question I'm not sure how to answer, but....

The rtable is just a list of rules for forwarding packets.  Your router 
reads in this list of rules.

Your toplogy email tells you how your router should forward packets to 
exactly two specific IP addresses (your app servers) and to the rest of 
the Internet.  Given that information, think about what rules you want 
in your rtable.

Ask again if it's not clear.

Sutthipong Thavisomboon wrote:
> Hi,
> 
> I read in the newsgroup that we should modify the rtable static file 
> according to the assigned topology. I see the IP address in the email, 
> however, I'm not sure what to put for mask?
> 
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Queueing a requirement?
Date: Sun, 29 Jan 2006 02:22:30 -0800
Lines: 11
Distribution: su
Message-ID: <dri51b$r7g$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9788

Hi,

Just wanted to know... is it REQUIRED to store packets waiting for ARP 
responses in a queue (or queue-like data structure)? Can we maintain a 
handle to those packets some other way, such as in the arguments passed to 
the thread that is handling ARP responses for the packets?

Thanks
Tahir. 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Queueing a requirement?
Date: Sun, 29 Jan 2006 02:53:34 -0800
Lines: 15
Distribution: su
Message-ID: <dri6rj$sfj$1@news.Stanford.EDU>
References: <dri51b$r7g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dri51b$r7g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9789

Nope, you can implement the queueing without a queue, but you need to 
perform all required functionality as described in the handout.

Tahir Azim wrote:
> Hi,
> 
> Just wanted to know... is it REQUIRED to store packets waiting for ARP 
> responses in a queue (or queue-like data structure)? Can we maintain a 
> handle to those packets some other way, such as in the arguments passed to 
> the thread that is handling ARP responses for the packets?
> 
> Thanks
> Tahir. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Padding ethernet frames
Date: Sun, 29 Jan 2006 03:55:07 -0800
Lines: 12
Distribution: su
Message-ID: <driaes$22b$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9790

Hi,

   When I send out ARP requests from my router and view the sent packet over 
ethereal, I see a 42-byte ethernet frame (14-bytes eth header + 28-byte arp 
message) without the extra padding. The FAQ says that we don't have to worry 
about adding the padding, so should I be worried that I'm sending out 
42-byte frames? Or is it just that the packets are written out to the 
log-file before the padding is added?

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: IP packet, for me?
Date: Sun, 29 Jan 2006 10:42:55 -0600
Lines: 31
Distribution: su
Message-ID: <driraj$i9h$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9791

Hello...

I am trying to figure out how, when an IP datagram comes in, if its 
destination IP address is one of the routers IP addresses.  If I look in 
sr_if.h there is only one "get" function : Given an interface name get its 
struct sr_if.  This doesn't seem like what we need.  Am I missing something? 
Is there a way to ask "Do I have this IP address on any of my router 
interfaces"?

Also, I realize that we are given the interface name when an ethernet packet 
comes in, but this doesn't seem good enough.

By way of example, here is what I am getting at:

Say that, from elaine, we want to ping interface eth1 on the router.  At 
some point, eth0 (which is connected to the firewall) will get an ICMP 
packet destined for eth1.  Given that there isn't an entry in the routing 
table for eth1, the router could:

1) Drop the packet.
2) Handle it internally and respond out of interface eth0
3) Send it back out to the gateway

From the previous post, it seems like we should do number 2 but it seems 
like we need more information from the sr_if module.  Is that correct?

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP packet, for me?
Date: Sun, 29 Jan 2006 11:09:56 -0600
Lines: 42
Distribution: su
Message-ID: <drist6$jfg$1@news.Stanford.EDU>
References: <driraj$i9h$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9792

I just wrote a function that walks the interface list.  I added to one of my 
files.

Thanks,

Roy


"Roy Zeighami" <zeighami@stanford.edu> wrote in message 
news:driraj$i9h$1@news.Stanford.EDU...
> Hello...
>
> I am trying to figure out how, when an IP datagram comes in, if its 
> destination IP address is one of the routers IP addresses.  If I look in 
> sr_if.h there is only one "get" function : Given an interface name get its 
> struct sr_if.  This doesn't seem like what we need.  Am I missing 
> something? Is there a way to ask "Do I have this IP address on any of my 
> router interfaces"?
>
> Also, I realize that we are given the interface name when an ethernet 
> packet comes in, but this doesn't seem good enough.
>
> By way of example, here is what I am getting at:
>
> Say that, from elaine, we want to ping interface eth1 on the router.  At 
> some point, eth0 (which is connected to the firewall) will get an ICMP 
> packet destined for eth1.  Given that there isn't an entry in the routing 
> table for eth1, the router could:
>
> 1) Drop the packet.
> 2) Handle it internally and respond out of interface eth0
> 3) Send it back out to the gateway
>
> From the previous post, it seems like we should do number 2 but it seems 
> like we need more information from the sr_if module.  Is that correct?
>
> Thanks,
>
> Roy
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Different routers coming in from going out
Date: Sun, 29 Jan 2006 13:32:42 -0800
Lines: 12
Distribution: su
Message-ID: <drjc9v$2tl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9793

I'm seeing different routers coming in to going out from the elaine cluster.

Going out I'm seeing hpr1-rtr.stanford.edu, just as the slides from 
handout #3 say. When doing an incoming traceroute I see the router
16  dc-stan--svl-dc1-ge.cenic.net (137.164.23.38) as the router between 
Stanford and the outside network.

When doing host on this IP I only see one interface, so it is not a 
router. What is it, and how can I figure out the incoming IP for 
hpr1-rtr.stanford.edu?

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Ip check sum
Date: Sun, 29 Jan 2006 13:38:03 -0800
Lines: 11
Distribution: su
Message-ID: <drjcl2$31n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9794

For sending an ICMP reply, I populate the ethernet header, and then the IP 
header, set the IP check sum to zero and then calculate the checksum for Ip 
using the algorithm given in Stevens, I pass it a pointer to the ip header 
and the ip_hdr->len field. However it calculates the wrong checksum, all the 
files are populated correctly when I check it in ethereal. After this I 
populate the ICMP fields, and calculate the ICMP checksum using the same 
method, and that gives the right check sum, what am I doing wrong?
Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: vns connection problem
Date: Sun, 29 Jan 2006 15:15:17 -0800
Lines: 20
Distribution: su
Message-ID: <43DD4C85.7090905@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9795

I was able to connect a couple of times. After that, I get this error:

> elaine35:~/cs244a/hw2/stub> ./sr -t 73 -s vns1.stanford.edu
> Loading routing table
> ---------------------------------------------
> Destination     Gateway         Mask    Iface
> 0.0.0.0         172.24.74.17    0.0.0.0 eth0
> ---------------------------------------------
> Client narahari connecting to Server vns1.stanford.edu:12345
> Requesting topology 73
> gethostbyname:sr_client.c::sr_connect_to_server(..): Error 0


I lost my SSH session; could that be a reason? Can you help clear up my 
topology?

Thanks,
Sesha


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Ip check sum
Date: Sun, 29 Jan 2006 15:39:32 -0800
Lines: 21
Distribution: su
Message-ID: <drjjou$90n$1@news.Stanford.EDU>
References: <drjcl2$31n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9796

Never mind, it is working now, but a weird thing that ethereal shows me is
that: there are 2 ping packets (when I ping my router on eth0), and the
router replies, so I get a ping reply, and then there is an ARP packet to
which the router replies fine, BUT there are no more ping packets, and there
are no more packets to and fro, even though the pinging should go on.

"Nazia Zaman" <nazia@stanford.edu> wrote in message 
news:drjcl2$31n$1@news.Stanford.EDU...
> For sending an ICMP reply, I populate the ethernet header, and then the IP 
> header, set the IP check sum to zero and then calculate the checksum for 
> Ip using the algorithm given in Stevens, I pass it a pointer to the ip 
> header and the ip_hdr->len field. However it calculates the wrong 
> checksum, all the files are populated correctly when I check it in 
> ethereal. After this I populate the ICMP fields, and calculate the ICMP 
> checksum using the same method, and that gives the right check sum, what 
> am I doing wrong?
> Thanks,
> Nazia
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Ip check sum
Date: Sun, 29 Jan 2006 15:46:15 -0800
Lines: 24
Distribution: su
Message-ID: <drjk49$9a8$1@news.Stanford.EDU>
References: <drjcl2$31n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9797

Hi Nazia,

   The IP checksum should be calculated only for the header, not the entire 
IP packet. I think using ip_hdr->ip_hl (which gives the header length) 
instead of ip_hdr->ip_len might solve your problem

Ram


"Nazia Zaman" <nazia@stanford.edu> wrote in message 
news:drjcl2$31n$1@news.Stanford.EDU...
> For sending an ICMP reply, I populate the ethernet header, and then the IP 
> header, set the IP check sum to zero and then calculate the checksum for 
> Ip using the algorithm given in Stevens, I pass it a pointer to the ip 
> header and the ip_hdr->len field. However it calculates the wrong 
> checksum, all the files are populated correctly when I check it in 
> ethereal. After this I populate the ICMP fields, and calculate the ICMP 
> checksum using the same method, and that gives the right check sum, what 
> am I doing wrong?
> Thanks,
> Nazia
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Sesha Narahari <narahari@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns connection problem
Date: Sun, 29 Jan 2006 19:13:17 -0800
Lines: 28
Distribution: su
Message-ID: <43DD844D.4020508@stanford.edu>
References: <43DD4C85.7090905@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9798

Never mind. I was using vns1 instead of vns-1.

Thanks,
Sesha

Sesha Narahari wrote:
> I was able to connect a couple of times. After that, I get this error:
> 
>> elaine35:~/cs244a/hw2/stub> ./sr -t 73 -s vns1.stanford.edu
>> Loading routing table
>> ---------------------------------------------
>> Destination     Gateway         Mask    Iface
>> 0.0.0.0         172.24.74.17    0.0.0.0 eth0
>> ---------------------------------------------
>> Client narahari connecting to Server vns1.stanford.edu:12345
>> Requesting topology 73
>> gethostbyname:sr_client.c::sr_connect_to_server(..): Error 0
> 
> 
> 
> I lost my SSH session; could that be a reason? Can you help clear up my 
> topology?
> 
> Thanks,
> Sesha
> 
> 

.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Arp cache
Date: Sun, 29 Jan 2006 19:28:38 -0800
Lines: 11
Distribution: su
Message-ID: <drk16i$jif$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9799

Just a few clarifications:
1) The arp cache should just contain IP to MAC mappings right? Or should we 
have things like subnet mask and interface too like Solaris does.

2) An entry should be added to the cache when
a ) an ARP request is received (a mapping from source ip to source MAC)
b )an ARP reply is received ( a mapping from source ip to source MAC)

Both a and b or just b, or am I missing the point completely. 


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: slides from review section
Date: Sun, 29 Jan 2006 21:15:36 -0800
Lines: 3
Distribution: su
Message-ID: <drk7do$ou1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9800

Where can I find slides from review sessions?

--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: slides from review section
Date: Sun, 29 Jan 2006 21:22:21 -0800
Lines: 6
Distribution: su
Message-ID: <drk7qj$pna$1@news.Stanford.EDU>
References: <drk7do$ou1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drk7do$ou1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9801

They are on the website, under Schedule, Handouts, & Homeworks.

Michi Mutsuzaki wrote:
> Where can I find slides from review sessions?
> 
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Arp cache
Date: Sun, 29 Jan 2006 23:37:23 -0800
Lines: 19
Distribution: su
Message-ID: <drkftf$39c$1@news.Stanford.EDU>
References: <drk16i$jif$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <drk16i$jif$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9802

The arp cache only needs to have IP to MAC mappings, since you can 
figure out the interface from the IP, but it doesn't hurt to store the 
interface there too. You definitely need to add an entry to the arp 
cache in case B, and you may optionally add an entry in case A as well.

Ari

Nazia Zaman wrote:
> Just a few clarifications:
> 1) The arp cache should just contain IP to MAC mappings right? Or should we 
> have things like subnet mask and interface too like Solaris does.
> 
> 2) An entry should be added to the cache when
> a ) an ARP request is received (a mapping from source ip to source MAC)
> b )an ARP reply is received ( a mapping from source ip to source MAC)
> 
> Both a and b or just b, or am I missing the point completely. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Padding ethernet frames
Date: Sun, 29 Jan 2006 23:44:51 -0800
Lines: 18
Distribution: su
Message-ID: <drkgbg$49g$1@news.Stanford.EDU>
References: <driaes$22b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <driaes$22b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9803

You don't have to worry about this. Your assumption that the packets are 
written to the log-file before padding occurs is correct.

Ari

Ramanan wrote:
> Hi,
> 
>    When I send out ARP requests from my router and view the sent packet over 
> ethereal, I see a 42-byte ethernet frame (14-bytes eth header + 28-byte arp 
> message) without the extra padding. The FAQ says that we don't have to worry 
> about adding the padding, so should I be worried that I'm sending out 
> 42-byte frames? Or is it just that the packets are written out to the 
> log-file before the padding is added?
> 
> Ram 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stanford routing
Date: Mon, 30 Jan 2006 00:36:34 -0800
Lines: 15
Distribution: su
Message-ID: <43DDD012.7070708@cs.stanford.edu>
References: <dri0pv$nf0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
To: Will Palmeri <wjp@stanford.edu>
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dri0pv$nf0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9804

Will Palmeri wrote:
> This was brought up in the discussion section, but I'd like to see it 
> addressed.  I have an on-campus (Escondido Village) IP address that is 
> in the 128.12 domain.  These IP's are treated as on-campus IP's for 
> other Stanford services, however the EV router is NOT forwarding the 
> 192.168 packets to the rest of Stanford. This means that I cannot 
> locally ping my sr router. I'm developing on my local machine, so this 
> would be a big help for me.
> 

We have little control over routes throughout campus.  You will need to
run your clients from one of the clusters.  That is ssh then ping, 
traceroute and wget to your hearts content.

..m
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ICMP protocol
Date: Mon, 30 Jan 2006 13:23:54 -0800
Lines: 11
Distribution: su
Message-ID: <drm04u$n8r$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9805

When our router receives an ICMP echo request, is it safe to assume we 
can just send the reply back out of the interface we received the 
request on to the previous hop?  Or should we consult the routing table 
for the correct hop, ARP'ing for the eth address if necessary?

Also, can we make the assumption that the routing table is sorted from 
most specific to least specific (e.g. if you use hierarchical masks in a 
more populated topology)?

Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ICMP port unreachable
Date: Mon, 30 Jan 2006 16:02:09 -0800
Lines: 16
Distribution: su
Message-ID: <drm9ea$3p5$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9806

Hi,
Whenever I receive a TCP/UDP port and its destination address is the same as 
that of the ip address of my router, I send out an ICMP port unreachable 
packet. In that packet, I set the code and type equal to 3 as specified in 
the protocol and don't set any other parameters apart from the checksum. And 
I send it back from the interface it was received on (eth0 in this case 
because I am testing this by ftping to eth0 of the router) . The packet gets 
sent to the firewall correctly, however the firewall should send the ICMP 
host unreachable packet to the ftp client right? But the tcp packets keep 
coming in, and my router keeps sending port unreachable, what is going wrong 
here? Shouldn't the ftp client disconnect by saying no route to host or 
something? Why isn't it doing that! :(

Thanks, 


.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp header struct
Date: Mon, 30 Jan 2006 17:21:18 -0800
Lines: 37
Distribution: su
Message-ID: <drme2c$8jq$1@news.Stanford.EDU>
References: <drhltd$bq6$1@news.Stanford.EDU> <dri238$ogj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9807

I tried to include both headers,
> #include <netinet/in_systm.h>
> #include <netinet/ip_icmp.h>

However, I got this error.

/usr/include/netinet/ip_icmp.h:96: error: field `idi_ip' has incomplete type

Anybody has any idea what I did wrong?

Sutthipong

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dri238$ogj$1@news.Stanford.EDU...
> Try
>
> #include <netinet/in_systm.h>
> #include <netinet/ip_icmp.h>
>
> Nazia Zaman wrote:
>> So I include <netinet/ip_icmp.h> because I want to  use the defined icmp 
>> header,but I get these errors when I include the file:
>>
>>
>> In file included from sr_protocol.c:17:
>> /usr/include/netinet/ip_icmp.h:65: error: parse error before "n_short"
>> /usr/include/netinet/ip_icmp.h:72: error: parse error before "n_short"
>> /usr/include/netinet/ip_icmp.h:79: error: parse error before "n_short"
>> /usr/include/netinet/ip_icmp.h:81: error: parse error before '}' token
>> /usr/include/netinet/ip_icmp.h:91: error: parse error before "n_time"
>> /usr/include/netinet/ip_icmp.h:93: error: parse error before "its_ttime"
>> /usr/include/netinet/ip_icmp.h:101: error: parse error before '}' token
>> /usr/include/netinet/ip_icmp.h:108: error: parse error before '}' token
>>
>> Any suggestions? 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ICMP Destination Unreachable payload
Date: Mon, 30 Jan 2006 21:13:26 -0600
Lines: 10
Distribution: su
Message-ID: <drmkku$lh2$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9808

The RFC for ICMP says that, for a destination unreachable ICMP message, we 
should return the original IP header and the first 64 bits of the payload. 
Is an IP packet always guaranteed to have at least 64 bits of data in the 
payload?

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Router dies on SIGALRM
Date: Mon, 30 Jan 2006 20:28:58 -0800
Lines: 16
Distribution: su
Message-ID: <drmp2d$he4$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9809

Hi TAs,

   I seem to have a strange problem with the router. When I'm attempting to 
route traffic, occassionally, my router prints out an 'Alarm clock' message 
and exits. Googling it I found that this is the default handler for the 
SIGALRM signal which is generated when a timer or alarm() is used. But I've 
not used timers or alarms in my code. The closest thing I have is usleep(), 
which I use to make the thread that sends a ARP request wait a while before 
checking if a reply was received. Is there any way I can find out why this 
is happening? Or is it something that's happening in the stub code? I found 
something about alarm() in the comments at the top of  sr_vns_comm.c, so I'm 
wondering if this has anything to do with that. Thanks in advance,

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: warning from gcc
Date: Mon, 30 Jan 2006 21:07:52 -0800
Lines: 51
Distribution: su
Message-ID: <drmrbc$q27$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9810


When I compile I get the following warning...



   elaine43:~/244/p2> make

   gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_router.c -o sr_router.o

   In file included from sr_if.h:20,

                 from sr_router.c:18:

   /usr/include/sys/int_types.h:9: warning: ignoring #pragma ident

   gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_main.c -o sr_main.o

   gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_if.c -o sr_if.o

   gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_rt.c -o sr_rt.o

   gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_vns_comm.c -o 
sr_vns_comm.o

   gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_dumper.c -o sr_dumper.o

   gcc -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ -o sr sr_router.o sr_main.o

   sr_if.o sr_rt.o  sr_vns_comm.o sr_dumper.o -lnsl -lsocket -lresolv -lm



Meanwhile, lines 19-21 of sr_if.h (the source of the warning) are...

#ifdef _SOLARIS_

#include </usr/include/sys/int_types.h>

#endif /* SOLARIS */



Any suggestions why I get this warning and how to eliminate it?



Thanks

-- Bruce


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP protocol
Date: Mon, 30 Jan 2006 21:32:19 -0800
Lines: 21
Distribution: su
Message-ID: <drmslt$1c4$1@news.Stanford.EDU>
References: <drm04u$n8r$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <drm04u$n8r$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9811


> When our router receives an ICMP echo request, is it safe to assume we 
> can just send the reply back out of the interface we received the 
> request on to the previous hop?  Or should we consult the routing table 
> for the correct hop, ARP'ing for the eth address if necessary?
> 
the latter

> Also, can we make the assumption that the routing table is sorted from 
> most specific to least specific (e.g. if you use hierarchical masks in a 
> more populated topology)?
> 

You can assume that the default route is the last entry.  Don't worry
about longest prefix match, either it will match a routing entry or the
default.

..m

> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP port unreachable
Date: Mon, 30 Jan 2006 21:33:37 -0800
Lines: 27
Distribution: su
Message-ID: <drmsob$1c4$2@news.Stanford.EDU>
References: <drm9ea$3p5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <drm9ea$3p5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9812


test with ping:

[casado@nity ~]$ ping 192.168.130.23
PING 192.168.130.23 (192.168.130.23) 56(84) bytes of data.
 From 172.24.74.11 icmp_seq=0 Destination Host Unreachable
 From 172.24.74.11 icmp_seq=1 Destination Host Unreachable
 From 172.24.74.11 icmp_seq=2 Destination Host Unreachable

..m

> Hi,
> Whenever I receive a TCP/UDP port and its destination address is the same as 
> that of the ip address of my router, I send out an ICMP port unreachable 
> packet. In that packet, I set the code and type equal to 3 as specified in 
> the protocol and don't set any other parameters apart from the checksum. And 
> I send it back from the interface it was received on (eth0 in this case 
> because I am testing this by ftping to eth0 of the router) . The packet gets 
> sent to the firewall correctly, however the firewall should send the ICMP 
> host unreachable packet to the ftp client right? But the tcp packets keep 
> coming in, and my router keeps sending port unreachable, what is going wrong 
> here? Shouldn't the ftp client disconnect by saying no route to host or 
> something? Why isn't it doing that! :(
> 
> Thanks, 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: warning from gcc
Date: Mon, 30 Jan 2006 21:35:36 -0800
Lines: 54
Distribution: su
Message-ID: <drmss2$1c4$3@news.Stanford.EDU>
References: <drmrbc$q27$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <drmrbc$q27$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9813


  Yeah .. that started popping up recently.  Feel free to ignore it


> When I compile I get the following warning...
> 
> 
> 
>    elaine43:~/244/p2> make
> 
>    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_router.c -o sr_router.o
> 
>    In file included from sr_if.h:20,
> 
>                  from sr_router.c:18:
> 
>    /usr/include/sys/int_types.h:9: warning: ignoring #pragma ident
> 
>    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_main.c -o sr_main.o
> 
>    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_if.c -o sr_if.o
> 
>    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_rt.c -o sr_rt.o
> 
>    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_vns_comm.c -o 
> sr_vns_comm.o
> 
>    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_dumper.c -o sr_dumper.o
> 
>    gcc -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ -o sr sr_router.o sr_main.o
> 
>    sr_if.o sr_rt.o  sr_vns_comm.o sr_dumper.o -lnsl -lsocket -lresolv -lm
> 
> 
> 
> Meanwhile, lines 19-21 of sr_if.h (the source of the warning) are...
> 
> #ifdef _SOLARIS_
> 
> #include </usr/include/sys/int_types.h>
> 
> #endif /* SOLARIS */
> 
> 
> 
> Any suggestions why I get this warning and how to eliminate it?
> 
> 
> 
> Thanks
> 
> -- Bruce
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router dies on SIGALRM
Date: Mon, 30 Jan 2006 21:36:05 -0800
Lines: 19
Distribution: su
Message-ID: <drmssu$1c4$4@news.Stanford.EDU>
References: <drmp2d$he4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <drmp2d$he4$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9814


No idea, is anyone else getting this?

> Hi TAs,
> 
>    I seem to have a strange problem with the router. When I'm attempting to 
> route traffic, occassionally, my router prints out an 'Alarm clock' message 
> and exits. Googling it I found that this is the default handler for the 
> SIGALRM signal which is generated when a timer or alarm() is used. But I've 
> not used timers or alarms in my code. The closest thing I have is usleep(), 
> which I use to make the thread that sends a ARP request wait a while before 
> checking if a reply was received. Is there any way I can find out why this 
> is happening? Or is it something that's happening in the stub code? I found 
> something about alarm() in the comments at the top of  sr_vns_comm.c, so I'm 
> wondering if this has anything to do with that. Thanks in advance,
> 
> Ram 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP Destination Unreachable payload
Date: Mon, 30 Jan 2006 21:44:23 -0800
Lines: 20
Distribution: su
Message-ID: <drmtcn$4eu$1@news.Stanford.EDU>
References: <drmkku$lh2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <drmkku$lh2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9815

Roy Zeighami wrote:
> The RFC for ICMP says that, for a destination unreachable ICMP message, we 
> should return the original IP header and the first 64 bits of the payload. 
> Is an IP packet always guaranteed to have at least 64 bits of data in the 
> payload?
>

I'm not sure, though it is hard to conceive of a smaller, non-malicious 
  packet.  The minimum ip fragment size is 8 bytes.  And UDP header (much
smaller than TCP) are 64 bits. Your packet shouldn't crash however if
it receives a malformed packet

..m


> Thanks,
> 
> Roy 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: warning from gcc
Date: Mon, 30 Jan 2006 22:33:53 -0800
Lines: 66
Distribution: su
Message-ID: <drn0cg$g0q$1@news.Stanford.EDU>
References: <drmrbc$q27$1@news.Stanford.EDU> <drmss2$1c4$3@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:9816

If you add -Wno-unknown-pragmas to your CFLAGS, the pragma warning should go
away.

Waynn

"Martin Casado" <casado@cs.stanford.edu> wrote in message
news:drmss2$1c4$3@news.Stanford.EDU...
>
>   Yeah .. that started popping up recently.  Feel free to ignore it
>
>
> > When I compile I get the following warning...
> >
> >
> >
> >    elaine43:~/244/p2> make
> >
> >    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_router.c -o
sr_router.o
> >
> >    In file included from sr_if.h:20,
> >
> >                  from sr_router.c:18:
> >
> >    /usr/include/sys/int_types.h:9: warning: ignoring #pragma ident
> >
> >    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_main.c -o sr_main.o
> >
> >    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_if.c -o sr_if.o
> >
> >    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_rt.c -o sr_rt.o
> >
> >    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_vns_comm.c -o
> > sr_vns_comm.o
> >
> >    gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_dumper.c -o
sr_dumper.o
> >
> >    gcc -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ -o sr sr_router.o sr_main.o
> >
> >    sr_if.o sr_rt.o  sr_vns_comm.o
sr_dumper.o -lnsl -lsocket -lresolv -lm
> >
> >
> >
> > Meanwhile, lines 19-21 of sr_if.h (the source of the warning) are...
> >
> > #ifdef _SOLARIS_
> >
> > #include </usr/include/sys/int_types.h>
> >
> > #endif /* SOLARIS */
> >
> >
> >
> > Any suggestions why I get this warning and how to eliminate it?
> >
> >
> >
> > Thanks
> >
> > -- Bruce
> >
> >


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ARP Request / Queue / Cache
Date: Mon, 30 Jan 2006 22:49:52 -0800
Lines: 36
Distribution: su
Message-ID: <drn1ai$jkm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9817

I'm still having trouble seeing a big picture of ARP request/queue/
cache. Please tell me if I'm getting it right:

###
The router needs to know the hardware address of next hop.

The router looks up the cache.

If the hardware address is in the cache and is not expired:

    Use it.

else:

    Enqueue the original packet.

    Send ARP request to all the interfaces except the one
    that received the original packet.

    If it doesn't receive reply within certain amount of
    time, resend request (up to 5 times).

    When you receive reply, find the corresponding packet
    in the queue and send it. Update cache.

At the same time, periodically check for expired packet
in the queue.
###

So I'm thinking that sending (possibly up to) 6 ARP requests should be 
done in one thread, and there should be another thread for checking 
the queue for expired packet (maybe use timestamp to keep track of 
timeouts). Or is there a better way to implement it?

Any comment would be appreciated,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp header struct
Date: Mon, 30 Jan 2006 23:31:43 -0800
Lines: 52
Distribution: su
Message-ID: <drn3p8$m$1@news.Stanford.EDU>
References: <drhltd$bq6$1@news.Stanford.EDU> <dri238$ogj$1@news.Stanford.EDU> <drme2c$8jq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drme2c$8jq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9818

Yeah you sort of have to play around till you get it to work.

idi_ip has type struct ip which is defined in sr_protocol.h, so try moving

#include <netinet/in_systm.h>
#include <netinet/ip_icmp.h>

below the #include "sr_protocol.h"

Sutthipong Thavisomboon wrote:
> I tried to include both headers,
> 
>>#include <netinet/in_systm.h>
>>#include <netinet/ip_icmp.h>
> 
> 
> However, I got this error.
> 
> /usr/include/netinet/ip_icmp.h:96: error: field `idi_ip' has incomplete type
> 
> Anybody has any idea what I did wrong?
> 
> Sutthipong
> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dri238$ogj$1@news.Stanford.EDU...
> 
>>Try
>>
>>#include <netinet/in_systm.h>
>>#include <netinet/ip_icmp.h>
>>
>>Nazia Zaman wrote:
>>
>>>So I include <netinet/ip_icmp.h> because I want to  use the defined icmp 
>>>header,but I get these errors when I include the file:
>>>
>>>
>>>In file included from sr_protocol.c:17:
>>>/usr/include/netinet/ip_icmp.h:65: error: parse error before "n_short"
>>>/usr/include/netinet/ip_icmp.h:72: error: parse error before "n_short"
>>>/usr/include/netinet/ip_icmp.h:79: error: parse error before "n_short"
>>>/usr/include/netinet/ip_icmp.h:81: error: parse error before '}' token
>>>/usr/include/netinet/ip_icmp.h:91: error: parse error before "n_time"
>>>/usr/include/netinet/ip_icmp.h:93: error: parse error before "its_ttime"
>>>/usr/include/netinet/ip_icmp.h:101: error: parse error before '}' token
>>>/usr/include/netinet/ip_icmp.h:108: error: parse error before '}' token
>>>
>>>Any suggestions? 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP Request / Queue / Cache
Date: Tue, 31 Jan 2006 00:09:10 -0800
Lines: 7
Distribution: su
Message-ID: <drn5v9$7rm$1@news.Stanford.EDU>
References: <drn1ai$jkm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drn1ai$jkm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9819

Michi Mutsuzaki wrote:
>    Send ARP request to all the interfaces except the one
>    that received the original packet.

No, it should send an ARP request out *only* on the interface that the 
next hop is connected to, determined from the routing table.

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP Request / Queue / Cache
Date: Tue, 31 Jan 2006 00:16:21 -0800
Lines: 53
Distribution: su
Message-ID: <drn6cq$ac0$1@news.Stanford.EDU>
References: <drn1ai$jkm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drn1ai$jkm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9820

To elaborate, when an IP packet comes in, the router must look at the 
destination IP, determine the next hop IP and the outgoing interface 
from the routing table based on the destination IP, and look up the 
hardware address of the next hop in the ARP cache.

The outgoing packet must have the correct hardware address set in its 
ethernet header. If a cache entry doesn't exist, the router must send 
out an ARP request on the interface that the next hop is connected to 
and queue the packet. When the reply comes back, it caches the reply, 
sets the destination hardware address in the ethernet header of the 
packet, and sends the packet out. Meanwhile it must send ARPs five times 
within the time limit and send back ICMP host unreachable if necessary.

That's my understanding.


Michi Mutsuzaki wrote:
> I'm still having trouble seeing a big picture of ARP request/queue/
> cache. Please tell me if I'm getting it right:
> 
> ###
> The router needs to know the hardware address of next hop.
> 
> The router looks up the cache.
> 
> If the hardware address is in the cache and is not expired:
> 
>    Use it.
> 
> else:
> 
>    Enqueue the original packet.
> 
>    Send ARP request to all the interfaces except the one
>    that received the original packet.
> 
>    If it doesn't receive reply within certain amount of
>    time, resend request (up to 5 times).
> 
>    When you receive reply, find the corresponding packet
>    in the queue and send it. Update cache.
> 
> At the same time, periodically check for expired packet
> in the queue.
> ###
> 
> So I'm thinking that sending (possibly up to) 6 ARP requests should be 
> done in one thread, and there should be another thread for checking the 
> queue for expired packet (maybe use timestamp to keep track of 
> timeouts). Or is there a better way to implement it?
> 
> Any comment would be appreciated,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: No reply at first
Date: Tue, 31 Jan 2006 01:31:42 -0800
Lines: 2
Distribution: su
Message-ID: <drnapt$q1m$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9821

Is it normal when I try to ping router from another machine, it shows 
"no reply" for couple of times before receiving the ARP reply from router?
.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router dies on SIGALRM
Date: Tue, 31 Jan 2006 01:59:27 -0800
Lines: 31
Distribution: su
Message-ID: <drnce7$2rn$1@news.Stanford.EDU>
References: <drmp2d$he4$1@news.Stanford.EDU> <drmssu$1c4$4@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9822

I'm getting the exact same problem, although it only appears when the router 
is in the middle of handling a lot of traffic. It seems to disappear when I 
use sleep() instead of usleep(). The only problem, then, is that sleep() 
cannot 'sleep' for less than 1 second. Is 1 second a reasonable time to wait 
for an ARP response? If it is, a couple of pings get lost every 15 seconds, 
as ping expects to get a response in less than a second.

Tahir.

"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:drmssu$1c4$4@news.Stanford.EDU...
>
> No idea, is anyone else getting this?
>
>> Hi TAs,
>>
>>    I seem to have a strange problem with the router. When I'm attempting 
>> to route traffic, occassionally, my router prints out an 'Alarm clock' 
>> message and exits. Googling it I found that this is the default handler 
>> for the SIGALRM signal which is generated when a timer or alarm() is 
>> used. But I've not used timers or alarms in my code. The closest thing I 
>> have is usleep(), which I use to make the thread that sends a ARP request 
>> wait a while before checking if a reply was received. Is there any way I 
>> can find out why this is happening? Or is it something that's happening 
>> in the stub code? I found something about alarm() in the comments at the 
>> top of  sr_vns_comm.c, so I'm wondering if this has anything to do with 
>> that. Thanks in advance,
>>
>> Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: No reply at first
Date: Tue, 31 Jan 2006 09:23:32 -0800
Lines: 5
Distribution: su
Message-ID: <dro6bb$heb$1@news.Stanford.EDU>
References: <drnapt$q1m$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <drnapt$q1m$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9823

alex qi wrote:
> Is it normal when I try to ping router from another machine, it shows 
> "no reply" for couple of times before receiving the ARP reply from router?

no, that's bad.  You shouldn't be dropping any packets on a normal ping
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router dies on SIGALRM
Date: Tue, 31 Jan 2006 09:34:41 -0800
Lines: 45
Distribution: su
Message-ID: <43DF9FB1.5040903@cs.stanford.edu>
References: <drmp2d$he4$1@news.Stanford.EDU> <drmssu$1c4$4@news.Stanford.EDU> <drnce7$2rn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
To: Tahir Azim <tazim@stanford.edu>
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <drnce7$2rn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9824

Hmm. can you try something for me?  Replace usleep with this egregious 
hack and let me know if it works:

int my_usleep(long  usec )
{
     struct timeval delay;

     delay.tv_sec = usec / 1000000L;
     delay.tv_usec = usec % 1000000L;

     /* -- 0 if OK, else -1 */
     return select( 0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &delay );
}


> I'm getting the exact same problem, although it only appears when the router 
> is in the middle of handling a lot of traffic. It seems to disappear when I 
> use sleep() instead of usleep(). The only problem, then, is that sleep() 
> cannot 'sleep' for less than 1 second. Is 1 second a reasonable time to wait 
> for an ARP response? If it is, a couple of pings get lost every 15 seconds, 
> as ping expects to get a response in less than a second.
> 
> Tahir.
> 
> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
> news:drmssu$1c4$4@news.Stanford.EDU...
>> No idea, is anyone else getting this?
>>
>>> Hi TAs,
>>>
>>>    I seem to have a strange problem with the router. When I'm attempting 
>>> to route traffic, occassionally, my router prints out an 'Alarm clock' 
>>> message and exits. Googling it I found that this is the default handler 
>>> for the SIGALRM signal which is generated when a timer or alarm() is 
>>> used. But I've not used timers or alarms in my code. The closest thing I 
>>> have is usleep(), which I use to make the thread that sends a ARP request 
>>> wait a while before checking if a reply was received. Is there any way I 
>>> can find out why this is happening? Or is it something that's happening 
>>> in the stub code? I found something about alarm() in the comments at the 
>>> top of  sr_vns_comm.c, so I'm wondering if this has anything to do with 
>>> that. Thanks in advance,
>>>
>>> Ram 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: TTL
Date: Tue, 31 Jan 2006 10:25:47 -0800
Lines: 5
Distribution: su
Message-ID: <droa3a$kv1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9825

The spec says that the router sends an ICMP timeout message if TTL of 
the arriving packet is one or zero. Why does the packet expire when 
TTL is one?

--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test for arp request
Date: Tue, 31 Jan 2006 11:59:33 -0800
Lines: 6
Distribution: su
Message-ID: <drofj7$qkv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9826

After router gets ping
How do we tell whether the router has sent a ARP reply package 
successfully back to the firewall? If router gets a IP package after 
sening a ARP reply package, does that mean ARP reply succeed?

thanks
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test for arp request
Date: Tue, 31 Jan 2006 12:18:17 -0800
Lines: 10
Distribution: su
Message-ID: <drogm8$s5n$1@news.Stanford.EDU>
References: <drofj7$qkv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drofj7$qkv$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9827

alex qi wrote:
> After router gets ping
> How do we tell whether the router has sent a ARP reply package 
> successfully back to the firewall? If router gets a IP package after 
> sening a ARP reply package, does that mean ARP reply succeed?
> 

I'd say thats a pretty good indication

> thanks3
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP port unreachable
Date: Tue, 31 Jan 2006 15:48:28 -0800
Lines: 37
Distribution: su
Message-ID: <drot0j$ctd$1@news.Stanford.EDU>
References: <drm9ea$3p5$1@news.Stanford.EDU> <drmsob$1c4$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9828

But we are supposed to implement ICMP echo reply with our router so my 
router replies when I ping it. How do I check if my ICMP port not reachable 
message works, because FTP to my router's eth0 says no route to host only 
when TCP times out. (Which takes pretty long).
Thanks,
Nazia

"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:drmsob$1c4$2@news.Stanford.EDU...
>
> test with ping:
>
> [casado@nity ~]$ ping 192.168.130.23
> PING 192.168.130.23 (192.168.130.23) 56(84) bytes of data.
> From 172.24.74.11 icmp_seq=0 Destination Host Unreachable
> From 172.24.74.11 icmp_seq=1 Destination Host Unreachable
> From 172.24.74.11 icmp_seq=2 Destination Host Unreachable
>
> .m
>
>> Hi,
>> Whenever I receive a TCP/UDP port and its destination address is the same 
>> as that of the ip address of my router, I send out an ICMP port 
>> unreachable packet. In that packet, I set the code and type equal to 3 as 
>> specified in the protocol and don't set any other parameters apart from 
>> the checksum. And I send it back from the interface it was received on 
>> (eth0 in this case because I am testing this by ftping to eth0 of the 
>> router) . The packet gets sent to the firewall correctly, however the 
>> firewall should send the ICMP host unreachable packet to the ftp client 
>> right? But the tcp packets keep coming in, and my router keeps sending 
>> port unreachable, what is going wrong here? Shouldn't the ftp client 
>> disconnect by saying no route to host or something? Why isn't it doing 
>> that! :(
>>
>> Thanks, 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP port unreachable
Date: Tue, 31 Jan 2006 15:52:29 -0800
Lines: 43
Distribution: su
Message-ID: <drot7r$d21$1@news.Stanford.EDU>
References: <drm9ea$3p5$1@news.Stanford.EDU> <drmsob$1c4$2@news.Stanford.EDU> <drot0j$ctd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drot0j$ctd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9829

this should require a really minor modification to your router for
testing purposes (which you'll obviously remove when testing ICMP echo)


> But we are supposed to implement ICMP echo reply with our router so my 
> router replies when I ping it. How do I check if my ICMP port not reachable 
> message works, because FTP to my router's eth0 says no route to host only 
> when TCP times out. (Which takes pretty long).
> Thanks,
> Nazia
> 
> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
> news:drmsob$1c4$2@news.Stanford.EDU...
> 
>>test with ping:
>>
>>[casado@nity ~]$ ping 192.168.130.23
>>PING 192.168.130.23 (192.168.130.23) 56(84) bytes of data.
>>From 172.24.74.11 icmp_seq=0 Destination Host Unreachable
>>From 172.24.74.11 icmp_seq=1 Destination Host Unreachable
>>From 172.24.74.11 icmp_seq=2 Destination Host Unreachable
>>
>>.m
>>
>>
>>>Hi,
>>>Whenever I receive a TCP/UDP port and its destination address is the same 
>>>as that of the ip address of my router, I send out an ICMP port 
>>>unreachable packet. In that packet, I set the code and type equal to 3 as 
>>>specified in the protocol and don't set any other parameters apart from 
>>>the checksum. And I send it back from the interface it was received on 
>>>(eth0 in this case because I am testing this by ftping to eth0 of the 
>>>router) . The packet gets sent to the firewall correctly, however the 
>>>firewall should send the ICMP host unreachable packet to the ftp client 
>>>right? But the tcp packets keep coming in, and my router keeps sending 
>>>port unreachable, what is going wrong here? Shouldn't the ftp client 
>>>disconnect by saying no route to host or something? Why isn't it doing 
>>>that! :(
>>>
>>>Thanks, 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TTL
Date: Tue, 31 Jan 2006 16:36:58 -0800
Lines: 13
Distribution: su
Message-ID: <drovrj$gdr$1@news.Stanford.EDU>
References: <droa3a$kv1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <droa3a$kv1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9830

It makes sense.  If a packet with TTL = 1 is forwarded to the next hop, 
it shouldn't get past that next hop.  So if you get a packet with TTL = 
1, don't forward it anymore.

So no one is really supposed to forward packets with TTL = 0, but if you 
get one, don't forward it anymore either.

Michi Mutsuzaki wrote:
> The spec says that the router sends an ICMP timeout message if TTL of 
> the arriving packet is one or zero. Why does the packet expire when TTL 
> is one?
> 
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: icmp error messages
Date: Tue, 31 Jan 2006 17:43:51 -0800
Lines: 8
Distribution: su
Message-ID: <drp3ob$m0k$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9831

ICMP error messages contain the header (code,type,and checksum) plus an 
un-used byte and then the original IP header and first 8 bytes of payload.

Is the checksum computed over just the header or the entire ICMP packet? 
  Some online resources are giving conflicting answers.

Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp error messages
Date: Tue, 31 Jan 2006 17:45:03 -0800
Lines: 11
Distribution: su
Message-ID: <drp3qi$m0k$2@news.Stanford.EDU>
References: <drp3ob$m0k$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <drp3ob$m0k$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9832

(i mean an unused/zero'd word)

Will Palmeri wrote:
> ICMP error messages contain the header (code,type,and checksum) plus an 
> un-used byte and then the original IP header and first 8 bytes of payload.
> 
> Is the checksum computed over just the header or the entire ICMP packet? 
>  Some online resources are giving conflicting answers.
> 
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router dies on SIGALRM
Date: Tue, 31 Jan 2006 19:33:32 -0800
Lines: 57
Distribution: su
Message-ID: <drpa6k$s57$1@news.Stanford.EDU>
References: <drmp2d$he4$1@news.Stanford.EDU> <drmssu$1c4$4@news.Stanford.EDU> <drnce7$2rn$1@news.Stanford.EDU> <43DF9FB1.5040903@cs.stanford.edu>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9833

Yes, it does get rid of the SIGALRM problem. But its not clear that the 
system really does sleep for the right amount of time or if it sleeps for a 
longer period of time. Maybe its just that my design is a little 
inefficient.

Thanks,
Tahir.


"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:43DF9FB1.5040903@cs.stanford.edu...
> Hmm. can you try something for me?  Replace usleep with this egregious 
> hack and let me know if it works:
>
> int my_usleep(long  usec )
> {
>     struct timeval delay;
>
>     delay.tv_sec = usec / 1000000L;
>     delay.tv_usec = usec % 1000000L;
>
>     /* -- 0 if OK, else -1 */
>     return select( 0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &delay );
> }
>
>
>> I'm getting the exact same problem, although it only appears when the 
>> router is in the middle of handling a lot of traffic. It seems to 
>> disappear when I use sleep() instead of usleep(). The only problem, then, 
>> is that sleep() cannot 'sleep' for less than 1 second. Is 1 second a 
>> reasonable time to wait for an ARP response? If it is, a couple of pings 
>> get lost every 15 seconds, as ping expects to get a response in less than 
>> a second.
>>
>> Tahir.
>>
>> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
>> news:drmssu$1c4$4@news.Stanford.EDU...
>>> No idea, is anyone else getting this?
>>>
>>>> Hi TAs,
>>>>
>>>>    I seem to have a strange problem with the router. When I'm 
>>>> attempting to route traffic, occassionally, my router prints out an 
>>>> 'Alarm clock' message and exits. Googling it I found that this is the 
>>>> default handler for the SIGALRM signal which is generated when a timer 
>>>> or alarm() is used. But I've not used timers or alarms in my code. The 
>>>> closest thing I have is usleep(), which I use to make the thread that 
>>>> sends a ARP request wait a while before checking if a reply was 
>>>> received. Is there any way I can find out why this is happening? Or is 
>>>> it something that's happening in the stub code? I found something about 
>>>> alarm() in the comments at the top of  sr_vns_comm.c, so I'm wondering 
>>>> if this has anything to do with that. Thanks in advance,
>>>>
>>>> Ram
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ARP Poisoning Defense
Date: Tue, 31 Jan 2006 20:05:47 -0800
Organization: Stanford University
Lines: 6
Distribution: su
Message-ID: <20060131200547.0d6bb682@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9834

It is my understanding that most host operating systems will accept an
ARP reply even if no ARP request has been sent out for that address. 
This requires less state to be kept, which make implementation simpler. 
Is it okay for us to use this same strategy, or must we only accept ARP
replies that correspond to requests that we have made (thereby defending
against the "ARP Poisoning" attack)?
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP Poisoning Defense
Date: Tue, 31 Jan 2006 20:48:24 -0800
Lines: 11
Distribution: su
Message-ID: <drpein$36k$1@news.Stanford.EDU>
References: <20060131200547.0d6bb682@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060131200547.0d6bb682@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9835

No need to keep track of pending ARP requests. Your router,
along with pretty much every other operating system will be
vulnerable to poisening via gratuitous arps, and thats ok with me ;-)


> It is my understanding that most host operating systems will accept an
> ARP reply even if no ARP request has been sent out for that address. 
> This requires less state to be kept, which make implementation simpler. 
> Is it okay for us to use this same strategy, or must we only accept ARP
> replies that correspond to requests that we have made (thereby defending
> against the "ARP Poisoning" attack)?
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Spoofed IPs?  Spoofed MACs?
Date: Tue, 31 Jan 2006 20:50:50 -0800
Organization: Stanford University
Lines: 12
Distribution: su
Message-ID: <20060131205050.14ef1742@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9836

How should we respond to IP packets whose source address does not appear
to match the interface that it arrives on?  For example, if we get a
packet that claims to be from an application server, but arrives on the
firewall interface.

When receiving an ARP request, should we assume (without checking) that
the source IP address and source MAC are correct?  And should we assume
that the computer waiting for a response is on the same interface that
ARP request was received from?

Finally, for non-ARP frames, should we bother checking the MAC address
to make sure it is legitimate, or just ignore it?
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Thread Synchronization and Thread Safety
Date: Tue, 31 Jan 2006 20:56:56 -0800
Organization: Stanford University
Lines: 9
Distribution: su
Message-ID: <20060131205656.05add102@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9837

If we implement timeouts with threads, is it okay to use mutexes to
synchronize all of our operations?  Can you provide any references for
pthreads programming on Solaris (especially Solaris-specific pitfalls)?

How thread-safe are sr_send_packet and the loop that calls
sr_handlepacket?  Can I simultaneously receive from one thread and send
from another?  How about sending simultaneously from two threads?

And how come there is no second underscore in sr_handlepacket?
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Spoofed IPs?  Spoofed MACs?
Date: Tue, 31 Jan 2006 21:04:14 -0800
Lines: 20
Distribution: su
Message-ID: <drpfgd$42h$1@news.Stanford.EDU>
References: <20060131205050.14ef1742@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060131205050.14ef1742@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9838


> How should we respond to IP packets whose source address does not appear
> to match the interface that it arrives on?  For example, if we get a
> packet that claims to be from an application server, but arrives on the
> firewall interface.

forward it as normal, you should never check source address


> When receiving an ARP request, should we assume (without checking) that
> the source IP address and source MAC are correct?  And should we assume
> that the computer waiting for a response is on the same interface that
> ARP request was received from?

yup and yup

> Finally, for non-ARP frames, should we bother checking the MAC address
> to make sure it is legitimate, or just ignore it?

you don't have to check
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Thread Synchronization and Thread Safety
Date: Tue, 31 Jan 2006 21:09:28 -0800
Lines: 19
Distribution: su
Message-ID: <drpfq7$4ep$1@news.Stanford.EDU>
References: <20060131205656.05add102@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060131205656.05add102@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9839


> If we implement timeouts with threads, is it okay to use mutexes to
> synchronize all of our operations?  Can you provide any references for
> pthreads programming on Solaris (especially Solaris-specific pitfalls)?

mutex are fine
pthreads -> man pthread_create(..) ?
I don't think there should be any pitfals

> How thread-safe are sr_send_packet and the loop that calls
> sr_handlepacket?  Can I simultaneously receive from one thread and send
> from another?  How about sending simultaneously from two threads?

both should be fine, most importantly, the sending function is thread safe


> And how come there is no second underscore in sr_handlepacket?

:-P
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router dies on SIGALRM
Date: Tue, 31 Jan 2006 22:34:54 -0800
Lines: 53
Distribution: su
Message-ID: <drpkqi$9od$1@news.Stanford.EDU>
References: <drmp2d$he4$1@news.Stanford.EDU> <drmssu$1c4$4@news.Stanford.EDU> <drnce7$2rn$1@news.Stanford.EDU> <43DF9FB1.5040903@cs.stanford.edu>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9840

The problem seems to have been solved by using your code. Thanks a lot :)

Ram


"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:43DF9FB1.5040903@cs.stanford.edu...
> Hmm. can you try something for me?  Replace usleep with this egregious 
> hack and let me know if it works:
>
> int my_usleep(long  usec )
> {
>     struct timeval delay;
>
>     delay.tv_sec = usec / 1000000L;
>     delay.tv_usec = usec % 1000000L;
>
>     /* -- 0 if OK, else -1 */
>     return select( 0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &delay );
> }
>
>
>> I'm getting the exact same problem, although it only appears when the 
>> router is in the middle of handling a lot of traffic. It seems to 
>> disappear when I use sleep() instead of usleep(). The only problem, then, 
>> is that sleep() cannot 'sleep' for less than 1 second. Is 1 second a 
>> reasonable time to wait for an ARP response? If it is, a couple of pings 
>> get lost every 15 seconds, as ping expects to get a response in less than 
>> a second.
>>
>> Tahir.
>>
>> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
>> news:drmssu$1c4$4@news.Stanford.EDU...
>>> No idea, is anyone else getting this?
>>>
>>>> Hi TAs,
>>>>
>>>>    I seem to have a strange problem with the router. When I'm 
>>>> attempting to route traffic, occassionally, my router prints out an 
>>>> 'Alarm clock' message and exits. Googling it I found that this is the 
>>>> default handler for the SIGALRM signal which is generated when a timer 
>>>> or alarm() is used. But I've not used timers or alarms in my code. The 
>>>> closest thing I have is usleep(), which I use to make the thread that 
>>>> sends a ARP request wait a while before checking if a reply was 
>>>> received. Is there any way I can find out why this is happening? Or is 
>>>> it something that's happening in the stub code? I found something about 
>>>> alarm() in the comments at the top of  sr_vns_comm.c, so I'm wondering 
>>>> if this has anything to do with that. Thanks in advance,
>>>>
>>>> Ram
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: File and Function Naming
Date: Tue, 31 Jan 2006 22:40:07 -0800
Organization: Stanford University
Lines: 3
Distribution: su
Message-ID: <20060131224007.1b2bd198@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9841

For the "style" part of the grade, do you want us to name all of our
files and functions starting with "sr_"?  Is there some other prefix you
would rather have us use?  I was considering "mr_" for "My Router".
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: File and Function Naming
Date: Tue, 31 Jan 2006 22:43:20 -0800
Lines: 10
Distribution: su
Message-ID: <drpla6$a0j$1@news.Stanford.EDU>
References: <20060131224007.1b2bd198@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060131224007.1b2bd198@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9842


> For the "style" part of the grade, do you want us to name all of our
> files and functions starting with "sr_"?  

nope

Is there some other prefix you
> would rather have us use?  I was considering "mr_" for "My Router".

sounds good
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: thread library?
Date: Wed, 01 Feb 2006 00:58:30 -0800
Lines: 7
Distribution: su
Message-ID: <drpt7a$lbp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9843

What threading library can we use and still comply to ANSI C?  I was 
under the impression that pthread (as some others have mentioned) is 
POSIX. Or is there a solaris-specific library we should use? (Which 
would be unfortunate for those of us developing on other flavors of *nix)

Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: thread library?
Date: Wed, 01 Feb 2006 02:07:26 -0800
Lines: 13
Distribution: su
Message-ID: <drq198$pak$1@news.Stanford.EDU>
References: <drpt7a$lbp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drpt7a$lbp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9844

Strictly speaking, there is no ANSI C threading library :-P

Yes, pthreads is POSIX (where the p comes from).  You should use 
pthreads for maximum portability.

Will Palmeri wrote:
> What threading library can we use and still comply to ANSI C?  I was 
> under the impression that pthread (as some others have mentioned) is 
> POSIX. Or is there a solaris-specific library we should use? (Which 
> would be unfortunate for those of us developing on other flavors of *nix)
> 
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: sr_router.h
Date: Wed, 1 Feb 2006 09:55:09 -0800
Lines: 6
Distribution: su
Message-ID: <drqslu$ll3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:9845

The assignment page says "We ask that you do not modify any of the provided 
files, except for sr_router.c."  I just want to be clear...  we cannot 
modify sr_router.h ?
cheers, Bruce 


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: queued packets
Date: Wed, 01 Feb 2006 14:02:01 -0800
Lines: 12
Distribution: su
Message-ID: <drrb4d$894$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9846

If we have multiple packets queued for the same destination (which would 
probably happen if the host goes down), should we send out 5 ARP 
requests for each packet before dropping?  Or should all the packets be 
dropped after 5 total ARP requests?  This would seem to make sense and 
create less "noise" on the network, but would violate the spirit of 
independence of packets.

Similarly, if we decide a host is unreachable, should we send 1 ICMP 
unreachable msg, or 1 for each queued packet?

Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_router.h
Date: Wed, 01 Feb 2006 14:13:45 -0800
Lines: 11
Distribution: su
Message-ID: <drrbqo$8sr$1@news.Stanford.EDU>
References: <drqslu$ll3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drqslu$ll3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9847

This is something you'll want to clear with us before doing.  It makes 
grading harder and if you are not careful can break grading and test.

Generally the rule is don't muck with files other than sr_router.c

> The assignment page says "We ask that you do not modify any of the provided 
> files, except for sr_router.c."  I just want to be clear...  we cannot 
> modify sr_router.h ?
> cheers, Bruce 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: queued packets
Date: Wed, 01 Feb 2006 14:16:04 -0800
Lines: 18
Distribution: su
Message-ID: <drrbv3$8sr$2@news.Stanford.EDU>
References: <drrb4d$894$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drrb4d$894$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9848


> If we have multiple packets queued for the same destination (which would 
> probably happen if the host goes down), should we send out 5 ARP 
> requests for each packet before dropping?  Or should all the packets be 
> dropped after 5 total ARP requests?  This would seem to make sense and 
> create less "noise" on the network, but would violate the spirit of 
> independence of packets.

your choice, either is OK from a functionality standpoint.  Be sure to
justify your decision in the README

> Similarly, if we decide a host is unreachable, should we send 1 ICMP 
> unreachable msg, or 1 for each queued packet?

Send one per packet

> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_router.h
Date: Wed, 1 Feb 2006 14:28:47 -0800
Lines: 15
Distribution: su
Message-ID: <drrcn1$a8n$1@news.Stanford.EDU>
References: <drqslu$ll3$1@news.Stanford.EDU> <drrbqo$8sr$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:9849

That's fine.   Just wanted to be clear.  Thanks, Bruce

"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:drrbqo$8sr$1@news.Stanford.EDU...
> This is something you'll want to clear with us before doing.  It makes 
> grading harder and if you are not careful can break grading and test.
>
> Generally the rule is don't muck with files other than sr_router.c
>
>> The assignment page says "We ask that you do not modify any of the 
>> provided files, except for sr_router.c."  I just want to be clear...  we 
>> cannot modify sr_router.h ?
>> cheers, Bruce 


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_router.h
Date: Wed, 1 Feb 2006 14:50:14 -0800
Organization: Stanford University
Lines: 26
Distribution: su
Message-ID: <20060201145014.69b33f8b@ballpoint>
References: <drqslu$ll3$1@news.Stanford.EDU>
	<drrbqo$8sr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9850

You might want to change the FAQ then:

  Which files in the stub code can I modify?

  The only files in the provided source that you may modify are
  sr_router.h and sr_router.c (this does not include bugfixes). You may,
  however, add your own files and update the Makefile to support them.

I am adding prototypes for all of my funcions to sr_router.h, and I was
going to put a pointer to my ARP cache in sr_instance.  Are those okay?


On Wed, 01 Feb 2006 14:13:45 -0800
Martin Casado <casado@cs.stanford.edu> wrote:

> This is something you'll want to clear with us before doing.  It makes 
> grading harder and if you are not careful can break grading and test.
> 
> Generally the rule is don't muck with files other than sr_router.c
> 
> > The assignment page says "We ask that you do not modify any of the provided 
> > files, except for sr_router.c."  I just want to be clear...  we cannot 
> > modify sr_router.h ?
> > cheers, Bruce 
> > 
> > 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_router.h
Date: Wed, 01 Feb 2006 16:24:13 -0800
Lines: 43
Distribution: su
Message-ID: <drrjfc$ica$1@news.Stanford.EDU>
References: <drqslu$ll3$1@news.Stanford.EDU>	<drrbqo$8sr$1@news.Stanford.EDU> <20060201145014.69b33f8b@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060201145014.69b33f8b@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9851

Perhaps I wasn't clear:

We want to actively discourage students from modifying the
provided source files.  It makes grading difficult.  Unless
there is a functional change you require (e.g. signal handlin
or bug fixes), don't change them.

Adding to sr_instance is OK, this is a defficiency in our design.
You are right, we should update the FAQ to say "only add changes to 
sr_router.[c,h]".

thanks :)
..martin


> You might want to change the FAQ then:
> 
>   Which files in the stub code can I modify?
> 
>   The only files in the provided source that you may modify are
>   sr_router.h and sr_router.c (this does not include bugfixes). You may,
>   however, add your own files and update the Makefile to support them.
> 
> I am adding prototypes for all of my funcions to sr_router.h, and I was
> going to put a pointer to my ARP cache in sr_instance.  Are those okay?
> 
> 
> On Wed, 01 Feb 2006 14:13:45 -0800
> Martin Casado <casado@cs.stanford.edu> wrote:
> 
> 
>>This is something you'll want to clear with us before doing.  It makes 
>>grading harder and if you are not careful can break grading and test.
>>
>>Generally the rule is don't muck with files other than sr_router.c
>>
>>
>>>The assignment page says "We ask that you do not modify any of the provided 
>>>files, except for sr_router.c."  I just want to be clear...  we cannot 
>>>modify sr_router.h ?
>>>cheers, Bruce 
>>>
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Modifying structures in sr_protocol.h
Date: Wed, 01 Feb 2006 18:09:06 -0800
Lines: 42
Distribution: su
Message-ID: <drrpk2$og4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9852

TA's,

I really want to add a field to each of your structures in 
sr_protocol.h. This field would be a data field, to easily retrieve the 
encapsulated data from each packet.

I.e. for the IP struct:

struct ip
   {
#if __BYTE_ORDER == __LITTLE_ENDIAN
     unsigned int ip_hl:4;		/* header length */
     unsigned int ip_v:4;		/* version */
#elif __BYTE_ORDER == __BIG_ENDIAN
     unsigned int ip_v:4;		/* version */
     unsigned int ip_hl:4;		/* header length */
#else
#error "Byte ordering not specified "
#endif
     uint8_t ip_tos;			/* type of service */
     uint16_t ip_len;			/* total length */
     uint16_t ip_id;			/* identification */
     uint16_t ip_off;			/* fragment offset field */
#define	IP_RF 0x8000			/* reserved fragment flag */
#define	IP_DF 0x4000			/* dont fragment flag */
#define	IP_MF 0x2000			/* more fragments flag */
#define	IP_OFFMASK 0x1fff		/* mask for fragmenting bits */
     uint8_t ip_ttl;			/* time to live */
     uint8_t ip_p;			/* protocol */
     uint16_t ip_sum;			/* checksum */
     struct in_addr ip_src, ip_dst;	/* source and dest address */
     uint8_t data;			/* Encapsulated data */
   } __attribute__ ((packed)) ;

Now to get at the data ( e.g. an icmp header ) all you would have to do is:

icmp_hdr = ( struct sr_icmphdr * )&(ip_hdr->data);

This is much easier than mucking around with pointer arithmetic. Is it 
ok to do this for the 3 structs in sr_protocol.h?

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Inconsistency with ip addresses in the stub code
Date: Wed, 01 Feb 2006 18:24:58 -0800
Lines: 8
Distribution: su
Message-ID: <drrqhr$pk5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9853

In sr_arphdr in sr_protocol.h the IP addresses are represented as 
uint32_t's. In the struct ip in the same file IP addresses are 
represented as struct in_addr, which is just a struct with a single 
Uint32. Which of these should we use when representing IP addresses in 
the code? Is it possible to get these consistent so that we know what 
format an IP address is in when we are writing the code?

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: ICMP port unreachable
Date: Thu, 2 Feb 2006 02:26:16 +0000 (UTC)
Lines: 43
Distribution: su
Message-ID: <drrqk8$p6o$1@news.Stanford.EDU>
References: <drm9ea$3p5$1@news.Stanford.EDU> <drmsob$1c4$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.12.6smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9854

hi -- 

if i try what you suggest on my os x laptop, ping just sits quietly. 

if i try what you suggest on one of the elaine machines, ping displays
the "Destination Host Unreachable" message you show here. 

i think this is just a difference in the way the ping program is
written, since (for example) ftp from laptop to to my router will return 
"connection refused" immediately. 

thanks, 
ryan. 


Martin Casado <casado@cs.stanford.edu> wrote:

> test with ping:

> [casado@nity ~]$ ping 192.168.130.23
> PING 192.168.130.23 (192.168.130.23) 56(84) bytes of data.
>  From 172.24.74.11 icmp_seq=0 Destination Host Unreachable
>  From 172.24.74.11 icmp_seq=1 Destination Host Unreachable
>  From 172.24.74.11 icmp_seq=2 Destination Host Unreachable

> .m

>> Hi,
>> Whenever I receive a TCP/UDP port and its destination address is the same as 
>> that of the ip address of my router, I send out an ICMP port unreachable 
>> packet. In that packet, I set the code and type equal to 3 as specified in 
>> the protocol and don't set any other parameters apart from the checksum. And 
>> I send it back from the interface it was received on (eth0 in this case 
>> because I am testing this by ftping to eth0 of the router) . The packet gets 
>> sent to the firewall correctly, however the firewall should send the ICMP 
>> host unreachable packet to the ftp client right? But the tcp packets keep 
>> coming in, and my router keeps sending port unreachable, what is going wrong 
>> here? Shouldn't the ftp client disconnect by saying no route to host or 
>> something? Why isn't it doing that! :(
>> 
>> Thanks, 
>> 
>> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_router.h
Date: Wed, 01 Feb 2006 19:02:37 -0800
Lines: 53
Distribution: su
Message-ID: <drrsof$rrm$1@news.Stanford.EDU>
References: <drqslu$ll3$1@news.Stanford.EDU>	<drrbqo$8sr$1@news.Stanford.EDU> <20060201145014.69b33f8b@ballpoint> <drrjfc$ica$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drrjfc$ica$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9855

I was going to add a struct for ICMP headers in sr_protocol.h and some 
helper functions in sr_rt.c/h and sr_if.c/h. Is this not acceptable?

I can throw these additions in a separate file that I create I guess, 
but I think style-wise they belong in sr_rt and sr_if.

Thanks.


Martin Casado wrote:
> Perhaps I wasn't clear:
> 
> We want to actively discourage students from modifying the
> provided source files.  It makes grading difficult.  Unless
> there is a functional change you require (e.g. signal handlin
> or bug fixes), don't change them.
> 
> Adding to sr_instance is OK, this is a defficiency in our design.
> You are right, we should update the FAQ to say "only add changes to 
> sr_router.[c,h]".
> 
> thanks :)
> .martin
> 
> 
>> You might want to change the FAQ then:
>>
>>   Which files in the stub code can I modify?
>>
>>   The only files in the provided source that you may modify are
>>   sr_router.h and sr_router.c (this does not include bugfixes). You may,
>>   however, add your own files and update the Makefile to support them.
>>
>> I am adding prototypes for all of my funcions to sr_router.h, and I was
>> going to put a pointer to my ARP cache in sr_instance.  Are those okay?
>>
>>
>> On Wed, 01 Feb 2006 14:13:45 -0800
>> Martin Casado <casado@cs.stanford.edu> wrote:
>>
>>
>>> This is something you'll want to clear with us before doing.  It 
>>> makes grading harder and if you are not careful can break grading and 
>>> test.
>>>
>>> Generally the rule is don't muck with files other than sr_router.c
>>>
>>>
>>>> The assignment page says "We ask that you do not modify any of the 
>>>> provided files, except for sr_router.c."  I just want to be 
>>>> clear...  we cannot modify sr_router.h ?
>>>> cheers, Bruce
>>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Byte ordering
Date: Wed, 01 Feb 2006 19:06:38 -0800
Lines: 8
Distribution: su
Message-ID: <drrt01$s1v$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9856

Hi,

Just to clarify, what is the byte-ordering of the fields in the packet 
buffer passed in sr_handlepacket, and what byte-ordering should the 
packet that we pass to sr_send_packet be? I'm thinking the answer to 
both is network order, but please clarify.

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_router.h
Date: Wed, 01 Feb 2006 20:15:18 -0800
Lines: 57
Distribution: su
Message-ID: <drs10l$2ld$1@news.Stanford.EDU>
References: <drqslu$ll3$1@news.Stanford.EDU>	<drrbqo$8sr$1@news.Stanford.EDU> <20060201145014.69b33f8b@ballpoint> <drrjfc$ica$1@news.Stanford.EDU> <drrsof$rrm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drrsof$rrm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9857

Put them in a different file plz


> I was going to add a struct for ICMP headers in sr_protocol.h and some 
> helper functions in sr_rt.c/h and sr_if.c/h. Is this not acceptable?
> 
> I can throw these additions in a separate file that I create I guess, 
> but I think style-wise they belong in sr_rt and sr_if.
> 
> Thanks.
> 
> 
> Martin Casado wrote:
> 
>> Perhaps I wasn't clear:
>>
>> We want to actively discourage students from modifying the
>> provided source files.  It makes grading difficult.  Unless
>> there is a functional change you require (e.g. signal handlin
>> or bug fixes), don't change them.
>>
>> Adding to sr_instance is OK, this is a defficiency in our design.
>> You are right, we should update the FAQ to say "only add changes to 
>> sr_router.[c,h]".
>>
>> thanks :)
>> .martin
>>
>>
>>> You might want to change the FAQ then:
>>>
>>>   Which files in the stub code can I modify?
>>>
>>>   The only files in the provided source that you may modify are
>>>   sr_router.h and sr_router.c (this does not include bugfixes). You may,
>>>   however, add your own files and update the Makefile to support them.
>>>
>>> I am adding prototypes for all of my funcions to sr_router.h, and I was
>>> going to put a pointer to my ARP cache in sr_instance.  Are those okay?
>>>
>>>
>>> On Wed, 01 Feb 2006 14:13:45 -0800
>>> Martin Casado <casado@cs.stanford.edu> wrote:
>>>
>>>
>>>> This is something you'll want to clear with us before doing.  It 
>>>> makes grading harder and if you are not careful can break grading 
>>>> and test.
>>>>
>>>> Generally the rule is don't muck with files other than sr_router.c
>>>>
>>>>
>>>>> The assignment page says "We ask that you do not modify any of the 
>>>>> provided files, except for sr_router.c."  I just want to be 
>>>>> clear...  we cannot modify sr_router.h ?
>>>>> cheers, Bruce
>>>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Modifying structures in sr_protocol.h
Date: Wed, 01 Feb 2006 20:15:45 -0800
Lines: 44
Distribution: su
Message-ID: <drs11f$2ld$2@news.Stanford.EDU>
References: <drrpk2$og4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drrpk2$og4$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9858

put it in a different file plz.

> TA's,
> 
> I really want to add a field to each of your structures in 
> sr_protocol.h. This field would be a data field, to easily retrieve the 
> encapsulated data from each packet.
> 
> I.e. for the IP struct:
> 
> struct ip
>   {
> #if __BYTE_ORDER == __LITTLE_ENDIAN
>     unsigned int ip_hl:4;        /* header length */
>     unsigned int ip_v:4;        /* version */
> #elif __BYTE_ORDER == __BIG_ENDIAN
>     unsigned int ip_v:4;        /* version */
>     unsigned int ip_hl:4;        /* header length */
> #else
> #error "Byte ordering not specified "
> #endif
>     uint8_t ip_tos;            /* type of service */
>     uint16_t ip_len;            /* total length */
>     uint16_t ip_id;            /* identification */
>     uint16_t ip_off;            /* fragment offset field */
> #define    IP_RF 0x8000            /* reserved fragment flag */
> #define    IP_DF 0x4000            /* dont fragment flag */
> #define    IP_MF 0x2000            /* more fragments flag */
> #define    IP_OFFMASK 0x1fff        /* mask for fragmenting bits */
>     uint8_t ip_ttl;            /* time to live */
>     uint8_t ip_p;            /* protocol */
>     uint16_t ip_sum;            /* checksum */
>     struct in_addr ip_src, ip_dst;    /* source and dest address */
>     uint8_t data;            /* Encapsulated data */
>   } __attribute__ ((packed)) ;
> 
> Now to get at the data ( e.g. an icmp header ) all you would have to do is:
> 
> icmp_hdr = ( struct sr_icmphdr * )&(ip_hdr->data);
> 
> This is much easier than mucking around with pointer arithmetic. Is it 
> ok to do this for the 3 structs in sr_protocol.h?
> 
> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Inconsistency with ip addresses in the stub code
Date: Wed, 01 Feb 2006 20:18:42 -0800
Lines: 18
Distribution: su
Message-ID: <drs171$2ld$3@news.Stanford.EDU>
References: <drrqhr$pk5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drrqhr$pk5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9859

Yeah, that is pretty annoying.  This file has been handed down over 3 
generations of sr (long before my time).

Can you make the changes?
else I'll get to it at some point.

thanks for pointing this out,
..martin


> In sr_arphdr in sr_protocol.h the IP addresses are represented as 
> uint32_t's. In the struct ip in the same file IP addresses are 
> represented as struct in_addr, which is just a struct with a single 
> Uint32. Which of these should we use when representing IP addresses in 
> the code? Is it possible to get these consistent so that we know what 
> format an IP address is in when we are writing the code?
> 
> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Byte ordering
Date: Wed, 01 Feb 2006 20:19:43 -0800
Lines: 12
Distribution: su
Message-ID: <drs18t$2ld$4@news.Stanford.EDU>
References: <drrt01$s1v$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drrt01$s1v$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9860



> Hi,
> 
> Just to clarify, what is the byte-ordering of the fields in the packet 
> buffer passed in sr_handlepacket, and what byte-ordering should the 
> packet that we pass to sr_send_packet be? I'm thinking the answer to 
> both is network order, but please clarify.

yup

> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Inconsistency with ip addresses in the stub code
Date: Wed, 01 Feb 2006 21:57:10 -0800
Lines: 24
Distribution: su
Message-ID: <drs6vn$8dt$1@news.Stanford.EDU>
References: <drrqhr$pk5$1@news.Stanford.EDU> <drs171$2ld$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drs171$2ld$3@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9861

I will make them all uint32_t's since I now have to have all my structs 
in a separate file since I want my uint8_t data fields in them. No biggie.

Jens.

Martin Casado wrote:
> Yeah, that is pretty annoying.  This file has been handed down over 3 
> generations of sr (long before my time).
> 
> Can you make the changes?
> else I'll get to it at some point.
> 
> thanks for pointing this out,
> .martin
> 
> 
>> In sr_arphdr in sr_protocol.h the IP addresses are represented as 
>> uint32_t's. In the struct ip in the same file IP addresses are 
>> represented as struct in_addr, which is just a struct with a single 
>> Uint32. Which of these should we use when representing IP addresses in 
>> the code? Is it possible to get these consistent so that we know what 
>> format an IP address is in when we are writing the code?
>>
>> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 2 thread models
Date: Wed, 1 Feb 2006 22:04:05 -0800
Lines: 27
Distribution: su
Message-ID: <drs7d3$8qd$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9862

Hi,
I have 2 thread models to handle the ARP replies.

1) The main thread adds the pending packet to a list, and the 2nd thread 
keeps checking each packet in the list against the ARP Cache for updates. 
All the main thread does in this case is add entries to the ARP cache when 
it receives an ARP reply.

2) As soon as the main thread receives an ARP reply it walks through the 
pending list and sends out all the packets it can. The secondary threads in 
this case just keep sending out ARP requests periodically for the packets 
and send out a host unreachable after 5 tries. There is a separate thread 
for every different IP in this case.

The 2nd model is more efficient in that the comparison between the new ARP 
reply is just a single walk over the pending list. The first method requires 
the 2nd thread to compare each packet with each entry in the ARP cache. 
However, when it is walking the pending list array, if a burst of packets 
arrive would these packets be considered dropped since the handle_packet 
function will be busy processing the pending list ?

Is one model preferred over the other?

Thanks
Krishna 


.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Modifying structures in sr_protocol.h
Date: Wed, 01 Feb 2006 22:09:41 -0800
Lines: 50
Distribution: su
Message-ID: <drs7n5$91j$1@news.Stanford.EDU>
References: <drrpk2$og4$1@news.Stanford.EDU> <drs11f$2ld$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drs11f$2ld$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9863

Is it ok to just copy the contents of sr_protocol.h and make these changes?

Jens

Martin Casado wrote:
> put it in a different file plz.
> 
>> TA's,
>>
>> I really want to add a field to each of your structures in 
>> sr_protocol.h. This field would be a data field, to easily retrieve 
>> the encapsulated data from each packet.
>>
>> I.e. for the IP struct:
>>
>> struct ip
>>   {
>> #if __BYTE_ORDER == __LITTLE_ENDIAN
>>     unsigned int ip_hl:4;        /* header length */
>>     unsigned int ip_v:4;        /* version */
>> #elif __BYTE_ORDER == __BIG_ENDIAN
>>     unsigned int ip_v:4;        /* version */
>>     unsigned int ip_hl:4;        /* header length */
>> #else
>> #error "Byte ordering not specified "
>> #endif
>>     uint8_t ip_tos;            /* type of service */
>>     uint16_t ip_len;            /* total length */
>>     uint16_t ip_id;            /* identification */
>>     uint16_t ip_off;            /* fragment offset field */
>> #define    IP_RF 0x8000            /* reserved fragment flag */
>> #define    IP_DF 0x4000            /* dont fragment flag */
>> #define    IP_MF 0x2000            /* more fragments flag */
>> #define    IP_OFFMASK 0x1fff        /* mask for fragmenting bits */
>>     uint8_t ip_ttl;            /* time to live */
>>     uint8_t ip_p;            /* protocol */
>>     uint16_t ip_sum;            /* checksum */
>>     struct in_addr ip_src, ip_dst;    /* source and dest address */
>>     uint8_t data;            /* Encapsulated data */
>>   } __attribute__ ((packed)) ;
>>
>> Now to get at the data ( e.g. an icmp header ) all you would have to 
>> do is:
>>
>> icmp_hdr = ( struct sr_icmphdr * )&(ip_hdr->data);
>>
>> This is much easier than mucking around with pointer arithmetic. Is it 
>> ok to do this for the 3 structs in sr_protocol.h?
>>
>> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: traceroute question
Date: Wed, 01 Feb 2006 23:47:04 -0800
Lines: 6
Distribution: su
Message-ID: <drsddv$es5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9864

What is the expected behavior when we perform a traceroute to an IP on 
the "other" side of our router. E.g. if you traceroute eth1 or eth2 from 
elaine, which has to "go through" eth0 first.

Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Modifying structures in sr_protocol.h
Date: Thu, 02 Feb 2006 00:04:19 -0800
Lines: 52
Distribution: su
Message-ID: <drsee1$i3l$1@news.Stanford.EDU>
References: <drrpk2$og4$1@news.Stanford.EDU> <drs11f$2ld$2@news.Stanford.EDU> <drs7n5$91j$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drs7n5$91j$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9865

that's fine
> Is it ok to just copy the contents of sr_protocol.h and make these changes?
> 
> Jens
> 
> Martin Casado wrote:
> 
>> put it in a different file plz.
>>
>>> TA's,
>>>
>>> I really want to add a field to each of your structures in 
>>> sr_protocol.h. This field would be a data field, to easily retrieve 
>>> the encapsulated data from each packet.
>>>
>>> I.e. for the IP struct:
>>>
>>> struct ip
>>>   {
>>> #if __BYTE_ORDER == __LITTLE_ENDIAN
>>>     unsigned int ip_hl:4;        /* header length */
>>>     unsigned int ip_v:4;        /* version */
>>> #elif __BYTE_ORDER == __BIG_ENDIAN
>>>     unsigned int ip_v:4;        /* version */
>>>     unsigned int ip_hl:4;        /* header length */
>>> #else
>>> #error "Byte ordering not specified "
>>> #endif
>>>     uint8_t ip_tos;            /* type of service */
>>>     uint16_t ip_len;            /* total length */
>>>     uint16_t ip_id;            /* identification */
>>>     uint16_t ip_off;            /* fragment offset field */
>>> #define    IP_RF 0x8000            /* reserved fragment flag */
>>> #define    IP_DF 0x4000            /* dont fragment flag */
>>> #define    IP_MF 0x2000            /* more fragments flag */
>>> #define    IP_OFFMASK 0x1fff        /* mask for fragmenting bits */
>>>     uint8_t ip_ttl;            /* time to live */
>>>     uint8_t ip_p;            /* protocol */
>>>     uint16_t ip_sum;            /* checksum */
>>>     struct in_addr ip_src, ip_dst;    /* source and dest address */
>>>     uint8_t data;            /* Encapsulated data */
>>>   } __attribute__ ((packed)) ;
>>>
>>> Now to get at the data ( e.g. an icmp header ) all you would have to 
>>> do is:
>>>
>>> icmp_hdr = ( struct sr_icmphdr * )&(ip_hdr->data);
>>>
>>> This is much easier than mucking around with pointer arithmetic. Is 
>>> it ok to do this for the 3 structs in sr_protocol.h?
>>>
>>> Thanks, Jens.
.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ProblemSet2, traceroute from external networks
Date: Thu, 2 Feb 2006 00:06:05 -0800
Lines: 18
Distribution: su
Message-ID: <Pine.GSO.4.44.0602020001090.8519-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9866

Hi,

traceroute to hpr1-rtr.Stanford.EDU ends at 171.67.255.198 but
host 171.67.255.198 has no entry from elaine.
elaine35:~> host  171.67.255.198
171.67.255.198 does not exist (Authoritative answer)

but 'host hpr1-rtr.Stanford.EDU' gives 171.67.255.249 as the IP address
close to the one displayed in traceroute. Any reasons for this behaviour?

And also I am unable to traceroute from 'external' networks into
sweet-rtr.Stanford.EDU  and bbr2-rtr.Stanford.EDU. Is there any other
stanford m/c I can login to that is on the "other" side of elaine w.r.t
the routers in question.

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: sr_send_packet
Date: Thu, 02 Feb 2006 00:15:56 -0800
Lines: 5
Distribution: su
Message-ID: <drsf3q$jhc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9867

What should I do when sr_send_packet returns -1? Can I just print out 
some error message and continue?

Thanks!
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2 thread models
Date: Thu, 2 Feb 2006 01:24:33 -0800
Lines: 44
Distribution: su
Message-ID: <drsj5b$n37$1@news.Stanford.EDU>
References: <drs7d3$8qd$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:9868

Made a mistake in the pros and cons of each. To clarify them:

a) The first method requires the 2nd thread to compare each packet with each 
entry in the ARP cache.

b) The 2nd model is more efficient in that the comparison between the new 
ARP reply is just a single walk over the pending list. However, when it is 
walking the pending list array, if a burst of packets arrive would these 
packets be considered dropped since the handle_packet function will be busy 
processing the pending list?

Thanks
Krishna

"Krishna Monian" <kmonian@stanford.edu> wrote in message 
news:drs7d3$8qd$1@news.Stanford.EDU...
> Hi,
> I have 2 thread models to handle the ARP replies.
>
> 1) The main thread adds the pending packet to a list, and the 2nd thread 
> keeps checking each packet in the list against the ARP Cache for updates. 
> All the main thread does in this case is add entries to the ARP cache when 
> it receives an ARP reply.
>
> 2) As soon as the main thread receives an ARP reply it walks through the 
> pending list and sends out all the packets it can. The secondary threads 
> in this case just keep sending out ARP requests periodically for the 
> packets and send out a host unreachable after 5 tries. There is a separate 
> thread for every different IP in this case.
>
> The 2nd model is more efficient in that the comparison between the new ARP 
> reply is just a single walk over the pending list. The first method 
> requires the 2nd thread to compare each packet with each entry in the ARP 
> cache. However, when it is walking the pending list array, if a burst of 
> packets arrive would these packets be considered dropped since the 
> handle_packet function will be busy processing the pending list ?
>
> Is one model preferred over the other?
>
> Thanks
> Krishna
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_send_packet
Date: Thu, 02 Feb 2006 11:18:03 -0800
Lines: 9
Distribution: su
Message-ID: <drtlt9$qpb$1@news.Stanford.EDU>
References: <drsf3q$jhc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drsf3q$jhc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9869


> What should I do when sr_send_packet returns -1? Can I just print out 
> some error message and continue?

good enough


> Thanks!
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2 thread models
Date: Thu, 02 Feb 2006 11:18:23 -0800
Lines: 50
Distribution: su
Message-ID: <drtltu$qpb$2@news.Stanford.EDU>
References: <drs7d3$8qd$1@news.Stanford.EDU> <drsj5b$n37$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drsj5b$n37$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9870

These design decisions are yours to make.  Just be sure you
justify them in your writeup


> Made a mistake in the pros and cons of each. To clarify them:
> 
> a) The first method requires the 2nd thread to compare each packet with each 
> entry in the ARP cache.
> 
> b) The 2nd model is more efficient in that the comparison between the new 
> ARP reply is just a single walk over the pending list. However, when it is 
> walking the pending list array, if a burst of packets arrive would these 
> packets be considered dropped since the handle_packet function will be busy 
> processing the pending list?
> 
> Thanks
> Krishna
> 
> "Krishna Monian" <kmonian@stanford.edu> wrote in message 
> news:drs7d3$8qd$1@news.Stanford.EDU...
> 
>>Hi,
>>I have 2 thread models to handle the ARP replies.
>>
>>1) The main thread adds the pending packet to a list, and the 2nd thread 
>>keeps checking each packet in the list against the ARP Cache for updates. 
>>All the main thread does in this case is add entries to the ARP cache when 
>>it receives an ARP reply.
>>
>>2) As soon as the main thread receives an ARP reply it walks through the 
>>pending list and sends out all the packets it can. The secondary threads 
>>in this case just keep sending out ARP requests periodically for the 
>>packets and send out a host unreachable after 5 tries. There is a separate 
>>thread for every different IP in this case.
>>
>>The 2nd model is more efficient in that the comparison between the new ARP 
>>reply is just a single walk over the pending list. The first method 
>>requires the 2nd thread to compare each packet with each entry in the ARP 
>>cache. However, when it is walking the pending list array, if a burst of 
>>packets arrive would these packets be considered dropped since the 
>>handle_packet function will be busy processing the pending list ?
>>
>>Is one model preferred over the other?
>>
>>Thanks
>>Krishna
>>
> 
> 
> 
.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!silvdc
From: Dan C Silver <silvdc@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Rtable file
Date: Thu, 2 Feb 2006 12:53:57 -0800
Lines: 42
Distribution: su
Message-ID: <Pine.GSO.4.44.0602021232370.10760-100000@elaine4.Stanford.EDU>
References: <drhtlp$l6n$1@news.Stanford.EDU> <dri4nn$r00$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dri4nn$r00$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9871


Just to clarify a bit more -- so we're basically treating each app server
as a router, and not as a host on the same subnet as our router's
interface?  In my particular topology it doesn't seem to be possible to
mask the two subnets properly, so I'm guessing this is the case.

And we don't have subnet masks for each interface, so we're basically
treating each interface as being it's own subnet with a single host?
Should we assume the subnet mask for each interface is 255.255.255.255?
If so, should we still AND the dest ip against our subnet mask to
determine if it's on the same subnet?

Thx,

- Dan

On Sun, 29 Jan 2006, Matt Falkenhagen wrote:

>  From the way you phrased the question I'm not sure how to answer, but....
>
> The rtable is just a list of rules for forwarding packets.  Your router
> reads in this list of rules.
>
> Your toplogy email tells you how your router should forward packets to
> exactly two specific IP addresses (your app servers) and to the rest of
> the Internet.  Given that information, think about what rules you want
> in your rtable.
>
> Ask again if it's not clear.
>
> Sutthipong Thavisomboon wrote:
> > Hi,
> >
> > I read in the newsgroup that we should modify the rtable static file
> > according to the assigned topology. I see the IP address in the email,
> > however, I'm not sure what to put for mask?
> >
> > Sutthipong
> >
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: nanosleep
Date: Thu, 2 Feb 2006 15:02:26 -0600
Lines: 13
Distribution: su
Message-ID: <drts15$3la$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9872

Hello...

Is anyone using nanosleep?  The man page says to include time.h, which I 
have, but the compiler keeps complaining:

arp_cache.c:205: warning: implicit declaration of function `nanosleep'

Is it ok to just ignore this warning?

Thanks,
Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: traceroute
Date: Thu, 2 Feb 2006 17:38:15 -0600
Lines: 82
Distribution: su
Message-ID: <dru55a$dpd$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9873

Hello...

I fired up traceroute and pointed it to one of the application servers 
behind my firewall, but I don't think I am getting the expected behaviour. 
Here is my output

elaine35:~/router> traceroute 192.168.131.113
traceroute to 192.168.131.113 (192.168.131.113): 1-30 hops, 38 byte packets
 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.522 ms  0.379 ms  0.452 ms
 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.650 ms  0.508 ms  0.493 ms
 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.495 ms (ttl=62!)  0.438 ms 
(ttl=62!)  0.451 ms (ttl=62!)
 4  192.168.131.113 (192.168.131.113)  19.5 ms (ttl=60!)  275 ms (ttl=60!) 
4.00 ms (ttl=60!)


The 192.168.131.113 is my app server.  However, I don't see any of the 
router interface anywhere in there.

I looked at the traffic with ethereal and I see a bunch of udp packets being 
sent to 192.168.131.113 but, again, none to my router interfaces.

If a traceroute directly to an interface on the router it seems to work ok.

traceroute to 192.168.131.109 (192.168.131.109): 1-30 hops, 38 byte packets
 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.695 ms  0.460 ms  0.423 ms
 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.572 ms  0.473 ms  0.464 ms
 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.470 ms (ttl=62!)  0.418 ms 
(ttl=62!)  0.431 ms (ttl=62!)
 4  192.168.131.109 (192.168.131.109)  5.45 ms (ttl=61!)  13.8 ms (ttl=61!) 
2.75 ms (ttl=61!)

Looking at the log file for the first traceroute, it appears that the router 
is doing everything that it should with the incoming traffic.

Could you please take a look?  Any advice?  Do I just not understand what 
traceroute should do?

Thanks,

Roy 


begin 666 a.out
MH;+#U `"``0`````````````! `````!0^*770`!:"\````\````/' ``%P`
M`0#@@00FV0@`10``)D<K0 `!$3/4JT /;L"H@W'R1X*D`!(``$/BEUT``6';
M"@0``````````$/BEUT``6M(````*@```"K_______]P``!<``8(!@`!" `&
M! `!< ``7 `&P*B#< ```````,"H@W%#XI==``%RMP```#P````\< ``7 `&
M``1U>^DB" 8``0@`!@0``@`$=7OI(L"H@W%P``!<``; J(-P````````````
M````````````0^*770`!=$P````T````- `$=7OI(G ``%P`!@@`10``)D<K
M0 ``$334JT /;L"H@W'R1X*D`!(``$/BEUT``6';"@1#XI==``%[?@```% `
M``!0< ``7 `&``1U>^DB" !%P !"&X<``$ !7ZS J(-QJT /;@,#0-X`````
M10``)D<K0 ``$334JT /;L"H@W'R1X*D`!(``$/BEUT``6';"@1#XI==``%]
M-0```"H````J________< ``7 `!" 8``0@`!@0``7 ``%P``<"H@VT`````
M``"L&$H10^*770`!A#0````\````/' ``%P``0#@@00FV0@&``$(``8$``(`
MX($$)MFL&$H1< ``7 `!P*B#;0```````````````````````$/BEUT``861
M````4 ```% `X($$)MEP``!<``$(`$7 `$(;AP``/P%@K,"H@W&K0 ]N`P- 
MW@````!%```F1RM ```1--2K0 ]NP*B#<?)'@J0`$@``0^*770`!8=L*!$/B
MEUT``8ZN````/ ```#QP``!<``$`X($$)MD(`$4``"9'+$ ``1$STZM #V[ 
MJ(-Q\D>"I0`2``!#XI==``&(=PL$``````````!#XI==``&04 ```#0````T
M``1U>^DB< ``7 `&" !%```F1RQ ```1--.K0 ]NP*B#<?)'@J4`$@``0^*7
M70`!B'<+!$/BEUT``9,\````4 ```%!P``!<``8`!'5[Z2((`$7 `$(;B ``
M0 %?J\"H@W&K0 ]N`P,900````!%```F1RQ ```1--.K0 ]NP*B#<?)'@J4`
M$@``0^*770`!B'<+!$/BEUT`!N^(````4 ```% `X($$)MEP``!<``$(`$7 
M`$(;B ``/P%@J\"H@W&K0 ]N`P,900````!%```F1RQ ```1--.K0 ]NP*B#
M<?)'@J4`$@``0^*770`!B'<+!$/BEUT`!OE3````/ ```#QP``!<``$`X($$
M)MD(`$4``"9'+4 ``1$STJM #V[ J(-Q\D>"I@`2``!#XI==``;R^ P$````
M``````!#XI==``;[:P```#0````T``1U>^DB< ``7 `&" !%```F1RU ```1
M--*K0 ]NP*B#<?)'@J8`$@``0^*770`&\O@,!$/BEUT`!P*A````4 ```%!P
M``!<``8`!'5[Z2((`$7 `$(;B0``0 %?JL"H@W&K0 ]N`P.MN0````!%```F
M1RU ```1--*K0 ]NP*B#<?)'@J8`$@``0^*770`&\O@,!$/BEUT`!P2"````
M4 ```% `X($$)MEP``!<``$(`$7 `$(;B0``/P%@JL"H@W&K0 ]N`P.MN0``
M``!%```F1RU ```1--*K0 ]NP*B#<?)'@J8`$@``0^*770`&\O@,!$/BEV(`
M`6Y]````/ ```#QP``!<``$`X($$)MD(!@`!" `&! `!`."!!";9K!A*$0``
M`````,"H@VT```````````````````````!#XI=B``%P-P```"H````J`."!
M!";9< ``7 `!" 8``0@`!@0``G ``%P``<"H@VT`X($$)MFL&$H10^*78@`!
M<PX````\````/' ``%P`!@`$=7OI(@@&``$(``8$``$`!'5[Z2+ J(,(````
M````P*B#< ```````````````````````$/BEV(``73A````*@```"H`!'5[
FZ2)P``!<``8(!@`!" `&! `"< ``7 `&P*B#< `$=7OI(L"H@P@`
`
end

.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: traceroute
Date: Thu, 2 Feb 2006 16:12:21 -0800
Lines: 93
Distribution: su
Message-ID: <Pine.GSO.4.44.0602021611460.815-100000@elaine35.Stanford.EDU>
References: <dru55a$dpd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dru55a$dpd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9874

Never mind...  I found my problem.  The timeout message had the wrong
source address.

Thanks,

Roy

On Thu, 2 Feb 2006, Roy Zeighami wrote:

> Hello...
>
> I fired up traceroute and pointed it to one of the application servers
> behind my firewall, but I don't think I am getting the expected behaviour.
> Here is my output
>
> elaine35:~/router> traceroute 192.168.131.113
> traceroute to 192.168.131.113 (192.168.131.113): 1-30 hops, 38 byte packets
>  1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.522 ms  0.379 ms  0.452 ms
>  2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.650 ms  0.508 ms  0.493 ms
>  3  vns-firewall.Stanford.EDU (172.24.74.11)  0.495 ms (ttl=62!)  0.438 ms
> (ttl=62!)  0.451 ms (ttl=62!)
>  4  192.168.131.113 (192.168.131.113)  19.5 ms (ttl=60!)  275 ms (ttl=60!)
> 4.00 ms (ttl=60!)
>
>
> The 192.168.131.113 is my app server.  However, I don't see any of the
> router interface anywhere in there.
>
> I looked at the traffic with ethereal and I see a bunch of udp packets being
> sent to 192.168.131.113 but, again, none to my router interfaces.
>
> If a traceroute directly to an interface on the router it seems to work ok.
>
> traceroute to 192.168.131.109 (192.168.131.109): 1-30 hops, 38 byte packets
>  1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.695 ms  0.460 ms  0.423 ms
>  2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.572 ms  0.473 ms  0.464 ms
>  3  vns-firewall.Stanford.EDU (172.24.74.11)  0.470 ms (ttl=62!)  0.418 ms
> (ttl=62!)  0.431 ms (ttl=62!)
>  4  192.168.131.109 (192.168.131.109)  5.45 ms (ttl=61!)  13.8 ms (ttl=61!)
> 2.75 ms (ttl=61!)
>
> Looking at the log file for the first traceroute, it appears that the router
> is doing everything that it should with the incoming traffic.
>
> Could you please take a look?  Any advice?  Do I just not understand what
> traceroute should do?
>
> Thanks,
>
> Roy
>
>
> begin 666 a.out
> MH;+#U `"``0`````````````! `````!0^*770`!:"\````\````/' ``%P`
> M`0#@@00FV0@`10``)D<K0 `!$3/4JT /;L"H@W'R1X*D`!(``$/BEUT``6';
> M"@0``````````$/BEUT``6M(````*@```"K_______]P``!<``8(!@`!" `&
> M! `!< ``7 `&P*B#< ```````,"H@W%#XI==``%RMP```#P````\< ``7 `&
> M``1U>^DB" 8``0@`!@0``@`$=7OI(L"H@W%P``!<``; J(-P````````````
> M````````````0^*770`!=$P````T````- `$=7OI(G ``%P`!@@`10``)D<K
> M0 ``$334JT /;L"H@W'R1X*D`!(``$/BEUT``6';"@1#XI==``%[?@```% `
> M``!0< ``7 `&``1U>^DB" !%P !"&X<``$ !7ZS J(-QJT /;@,#0-X`````
> M10``)D<K0 ``$334JT /;L"H@W'R1X*D`!(``$/BEUT``6';"@1#XI==``%]
> M-0```"H````J________< ``7 `!" 8``0@`!@0``7 ``%P``<"H@VT`````
> M``"L&$H10^*770`!A#0````\````/' ``%P``0#@@00FV0@&``$(``8$``(`
> MX($$)MFL&$H1< ``7 `!P*B#;0```````````````````````$/BEUT``861
> M````4 ```% `X($$)MEP``!<``$(`$7 `$(;AP``/P%@K,"H@W&K0 ]N`P-
> MW@````!%```F1RM ```1--2K0 ]NP*B#<?)'@J0`$@``0^*770`!8=L*!$/B
> MEUT``8ZN````/ ```#QP``!<``$`X($$)MD(`$4``"9'+$ ``1$STZM #V[
> MJ(-Q\D>"I0`2``!#XI==``&(=PL$``````````!#XI==``&04 ```#0````T
> M``1U>^DB< ``7 `&" !%```F1RQ ```1--.K0 ]NP*B#<?)'@J4`$@``0^*7
> M70`!B'<+!$/BEUT``9,\````4 ```%!P``!<``8`!'5[Z2((`$7 `$(;B ``
> M0 %?J\"H@W&K0 ]N`P,900````!%```F1RQ ```1--.K0 ]NP*B#<?)'@J4`
> M$@``0^*770`!B'<+!$/BEUT`!N^(````4 ```% `X($$)MEP``!<``$(`$7
> M`$(;B ``/P%@J\"H@W&K0 ]N`P,900````!%```F1RQ ```1--.K0 ]NP*B#
> M<?)'@J4`$@``0^*770`!B'<+!$/BEUT`!OE3````/ ```#QP``!<``$`X($$
> M)MD(`$4``"9'+4 ``1$STJM #V[ J(-Q\D>"I@`2``!#XI==``;R^ P$````
> M``````!#XI==``;[:P```#0````T``1U>^DB< ``7 `&" !%```F1RU ```1
> M--*K0 ]NP*B#<?)'@J8`$@``0^*770`&\O@,!$/BEUT`!P*A````4 ```%!P
> M``!<``8`!'5[Z2((`$7 `$(;B0``0 %?JL"H@W&K0 ]N`P.MN0````!%```F
> M1RU ```1--*K0 ]NP*B#<?)'@J8`$@``0^*770`&\O@,!$/BEUT`!P2"````
> M4 ```% `X($$)MEP``!<``$(`$7 `$(;B0``/P%@JL"H@W&K0 ]N`P.MN0``
> M``!%```F1RU ```1--*K0 ]NP*B#<?)'@J8`$@``0^*770`&\O@,!$/BEV(`
> M`6Y]````/ ```#QP``!<``$`X($$)MD(!@`!" `&! `!`."!!";9K!A*$0``
> M`````,"H@VT```````````````````````!#XI=B``%P-P```"H````J`."!
> M!";9< ``7 `!" 8``0@`!@0``G ``%P``<"H@VT`X($$)MFL&$H10^*78@`!
> M<PX````\````/' ``%P`!@`$=7OI(@@&``$(``8$``$`!'5[Z2+ J(,(````
> M````P*B#< ```````````````````````$/BEV(``73A````*@```"H`!'5[
> FZ2)P``!<``8(!@`!" `&! `"< ``7 `&P*B#< `$=7OI(L"H@P@`
> `
> end
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Surendra Kumar <surendra@stanford.edu>
Newsgroups: su.class.cs244a
Subject: md5sum for the .iso image ?
Date: Thu, 02 Feb 2006 16:21:16 -0800
Lines: 5
Distribution: su
Message-ID: <dru7m1$h9p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9875


Can you publish the checksum for the image.

Thanks,
Surendra.
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: md5sum for the .iso image ?
Date: Thu, 2 Feb 2006 16:59:17 -0800
Organization: Stanford University
Lines: 11
Distribution: su
Message-ID: <20060202165917.12c1d713@ballpoint>
References: <dru7m1$h9p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9876

One option is to fire up Clack on your topology and use that to download
it.

On Thu, 02 Feb 2006 16:21:16 -0800
Surendra Kumar <surendra@stanford.edu> wrote:

> 
> Can you publish the checksum for the image.
> 
> Thanks,
> Surendra.
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Sending "Host Unreachable" in a Burst?
Date: Thu, 2 Feb 2006 17:04:31 -0800
Organization: Stanford University
Lines: 7
Distribution: su
Message-ID: <20060202170431.255a6e90@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9877

When my router is not connected and I try to ping it, the vns firewall
gives the following behavior: after about three seconds, it sends three
"Host Unreachable" ICMPs (one for each ping), all at about the same
time.  Is it okay for my router to do the same thing?  Five seconds
after the *first* ARP, it will send a host unreachable for each packet
bound for that hop, even ones that only arrived 0.1 seconds ago?  Or is
it necessary to have a separate 5-second counter for each packet?
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ARP Cached in Linked List?
Date: Thu, 2 Feb 2006 17:06:26 -0800
Organization: Stanford University
Lines: 5
Distribution: su
Message-ID: <20060202170626.28488b40@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9878

Is it okay to have my ARP cache stored in a linked list that can grow to
arbitrary size?  The benefit is that there are no arbitrary limits on
ARP cache size, but the downside is that I do not delete timed-out
entries.  I just mark them as timed-out?  Is this okay?  Or do I have to
reclaim the memory from timed-out entries?
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Odd IP Headers
Date: Thu, 2 Feb 2006 17:11:21 -0800
Organization: Stanford University
Lines: 4
Distribution: su
Message-ID: <20060202171121.0fc36885@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9879

What should I do with IP packets that have odd flags set in the header,
like TOS bits?  Is it okay to forward them with the same values, or
should I zero them out?  What about ping responses?  Should I set the
same TOS bits?
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: UMRs for packed structures
Date: Thu, 02 Feb 2006 17:59:11 -0800
Lines: 7
Distribution: su
Message-ID: <drudda$nph$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9880

I get UMR when accessing ether_type field in sr_ethernet_hdr 
structure. I'm thinking it's because the structure is packed, and the 
size of structure is 14 bytes, instead of 16 bytes. How can I supress 
the UMR message?

Thank you,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Byte ordering
Date: Thu, 02 Feb 2006 20:16:25 -0800
Lines: 38
Distribution: su
Message-ID: <druleu$3er$1@news.Stanford.EDU>
References: <drrt01$s1v$1@news.Stanford.EDU> <drs18t$2ld$4@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drs18t$2ld$4@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9881

In sr_protocol.h, we have:

#if __BYTE_ORDER == __LITTLE_ENDIAN
     unsigned int ip_hl:4;		/* header length */
     unsigned int ip_v:4;		/* version */
#elif __BYTE_ORDER == __BIG_ENDIAN
     unsigned int ip_v:4;		/* version */
     unsigned int ip_hl:4;		/* header length */
#else
#error "Byte ordering not specified "
#endif

I'm not sure I understand what's going on here. The ver and hl fields 
occupy 4 bits each. So why is *byte* ordering important here? I thought 
byte ordering only applied to byte level types such as 16-bit and 32-bit 
integers.

And a related question: if I need to construct an IP packet from 
scratch, do I need to be concerned about how I assign to ip_v and ip_hl? 
Can I just say iphdr->ip_v = 0x45; or is this bad (dependent on the 
endianess of the machine)?

Thanks.


Martin Casado wrote:
> 
> 
>> Hi,
>>
>> Just to clarify, what is the byte-ordering of the fields in the packet 
>> buffer passed in sr_handlepacket, and what byte-ordering should the 
>> packet that we pass to sr_send_packet be? I'm thinking the answer to 
>> both is network order, but please clarify.
> 
> yup
> 
>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: icmp generation, ip fragmentation
Date: Thu, 02 Feb 2006 20:38:55 -0800
Lines: 11
Distribution: su
Message-ID: <drump5$4n2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9882

Hey that rhymes ;)

When I generate an ICMP error (host/port unreachable, ttl expired), what 
should I set the 'identification' and 'flags' fields in the enclosing IP 
header to?

Also, the data portion of na ICMP packet is supposed to have the first 
64 bits  of the packet that caused the error. The first 64 bits starting 
at the ethernet header, the IP header, or the data?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: ARP protocol size
Date: Fri, 3 Feb 2006 05:42:08 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: <druqfg$8ji$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9883

When I look at incoming ARP requests in ethereal that get
generated when I ping the router it shows the protocol size
field is set to 4 (bytes).  sr_protocol.h shows the protocol as a
short as does networksorcery.  Is anyone else seeing this?
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP protocol size
Date: Thu, 02 Feb 2006 22:00:52 -0800
Lines: 12
Distribution: su
Message-ID: <druriq$a4i$1@news.Stanford.EDU>
References: <druqfg$8ji$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <druqfg$8ji$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9884

Protocol size (or 'Protocol address length' in networksorcery) specifies 
how many bytes are allocated to 'Source protocol address' and 
'Destination protocol address'. If these are IP addresses (which is most 
if not all the time), then protocol size is 4 bytes. The protocol size 
field itself is a short, i.e. it can specify protocol sizes up to 2^8 bytes.


Stefan Thomas Mohler wrote:
> When I look at incoming ARP requests in ethereal that get
> generated when I ping the router it shows the protocol size
> field is set to 4 (bytes).  sr_protocol.h shows the protocol as a
> short as does networksorcery.  Is anyone else seeing this?
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: ARP protocol size
Date: Fri, 3 Feb 2006 06:12:43 +0000 (UTC)
Lines: 2
Distribution: su
Message-ID: <drus8r$8ji$2@news.Stanford.EDU>
References: <druqfg$8ji$1@news.Stanford.EDU> <druriq$a4i$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9885

Awesome, that makes alot more sense now.  Thanks for the help Naeim..

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP Destination Unreachable payload
Date: Thu, 02 Feb 2006 22:21:28 -0800
Lines: 25
Distribution: su
Message-ID: <druspd$b7p$1@news.Stanford.EDU>
References: <drmkku$lh2$1@news.Stanford.EDU> <drmtcn$4eu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drmtcn$4eu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9886

Is it OK to drop a packet that has less than 64 bits of data (excluding 
the headers) and not generate an ICMP error for it in case its TTL has 
reached zero or its destination is unreachable?


Martin Casado wrote:
> Roy Zeighami wrote:
>> The RFC for ICMP says that, for a destination unreachable ICMP 
>> message, we should return the original IP header and the first 64 bits 
>> of the payload. Is an IP packet always guaranteed to have at least 64 
>> bits of data in the payload?
>>
> 
> I'm not sure, though it is hard to conceive of a smaller, non-malicious 
>  packet.  The minimum ip fragment size is 8 bytes.  And UDP header (much
> smaller than TCP) are 64 bits. Your packet shouldn't crash however if
> it receives a malformed packet
> 
> .m
> 
> 
>> Thanks,
>>
>> Roy
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Checksum
Date: Thu, 02 Feb 2006 22:31:09 -0800
Lines: 13
Distribution: su
Message-ID: <C00838AD.2FEB%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Checksum
Thread-Index: AcYoi2soqbZ0KJR+EdqYqwARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:9887

I have a questions about checksum and ICMP echo

1. I ping my router from a machine and when I recieve a ICMP ECHO_REQUEST
packet, I notice that the check sim for ICMP Header changes everytime.
Shouldn't this stay constant because the ICMP header fields (type and code)
is not changing for every ping packet.  Why is it changing?  when I generate
checksum for my ICMP packets header, the checksum is the same if the two
ICMP header fields are the same.


Thanks in advance.
Sunny.

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Checksum
Date: Thu, 02 Feb 2006 22:33:32 -0800
Lines: 19
Distribution: su
Message-ID: <drutg1$c9d$1@news.Stanford.EDU>
References: <C00838AD.2FEB%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <C00838AD.2FEB%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:9888

There is an identifier and a sequence number associated with ICMP packets:

http://www.networksorcery.com/enp/protocol/icmp/msg8.htm


Sunny Balwani wrote:
> I have a questions about checksum and ICMP echo
> 
> 1. I ping my router from a machine and when I recieve a ICMP ECHO_REQUEST
> packet, I notice that the check sim for ICMP Header changes everytime.
> Shouldn't this stay constant because the ICMP header fields (type and code)
> is not changing for every ping packet.  Why is it changing?  when I generate
> checksum for my ICMP packets header, the checksum is the same if the two
> ICMP header fields are the same.
> 
> 
> Thanks in advance.
> Sunny.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Checksum
Date: Thu, 02 Feb 2006 22:35:33 -0800
Lines: 24
Distribution: su
Message-ID: <drutjq$c9d$2@news.Stanford.EDU>
References: <C00838AD.2FEB%sunnybalwani@hotmail.com> <drutg1$c9d$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drutg1$c9d$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9889

Correction: ICMP echo request and reply packets. Not all ICMP packets.

Naeim Semsarilar wrote:
> There is an identifier and a sequence number associated with ICMP packets:
> 
> http://www.networksorcery.com/enp/protocol/icmp/msg8.htm
> 
> 
> Sunny Balwani wrote:
>> I have a questions about checksum and ICMP echo
>>
>> 1. I ping my router from a machine and when I recieve a ICMP ECHO_REQUEST
>> packet, I notice that the check sim for ICMP Header changes everytime.
>> Shouldn't this stay constant because the ICMP header fields (type and 
>> code)
>> is not changing for every ping packet.  Why is it changing?  when I 
>> generate
>> checksum for my ICMP packets header, the checksum is the same if the two
>> ICMP header fields are the same.
>>
>>
>> Thanks in advance.
>> Sunny.
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: nanosleep
Date: Thu, 02 Feb 2006 22:38:50 -0800
Lines: 16
Distribution: su
Message-ID: <drutoa$crp$1@news.Stanford.EDU>
References: <drts15$3la$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drts15$3la$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9890

put in a prototype for it

Roy Zeighami wrote:
> Hello...
> 
> Is anyone using nanosleep?  The man page says to include time.h, which I 
> have, but the compiler keeps complaining:
> 
> arp_cache.c:205: warning: implicit declaration of function `nanosleep'
> 
> Is it ok to just ignore this warning?
> 
> Thanks,
> Roy 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP Cached in Linked List?
Date: Thu, 02 Feb 2006 22:42:12 -0800
Lines: 8
Distribution: su
Message-ID: <drutuk$crp$2@news.Stanford.EDU>
References: <20060202170626.28488b40@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060202170626.28488b40@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9891

if you justify in README, sure

David Reiss wrote:
> Is it okay to have my ARP cache stored in a linked list that can grow to
> arbitrary size?  The benefit is that there are no arbitrary limits on
> ARP cache size, but the downside is that I do not delete timed-out
> entries.  I just mark them as timed-out?  Is this okay?  Or do I have to
> reclaim the memory from timed-out entries?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Odd IP Headers
Date: Thu, 02 Feb 2006 22:42:54 -0800
Lines: 7
Distribution: su
Message-ID: <drutvu$crp$3@news.Stanford.EDU>
References: <20060202171121.0fc36885@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060202171121.0fc36885@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9892

You don't need to worry about these.

David Reiss wrote:
> What should I do with IP packets that have odd flags set in the header,
> like TOS bits?  Is it okay to forward them with the same values, or
> should I zero them out?  What about ping responses?  Should I set the
> same TOS bits?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: UMRs for packed structures
Date: Thu, 02 Feb 2006 22:49:20 -0800
Lines: 14
Distribution: su
Message-ID: <druuc1$da0$1@news.Stanford.EDU>
References: <drudda$nph$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drudda$nph$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9893

Are you sure you're not reading bad memory?  I doubt packed is the 
cause... purify should know.

In any case, don't worry about suppressing purify errors, we don't test 
your code using purify for this assignment.

Michi Mutsuzaki wrote:
> I get UMR when accessing ether_type field in sr_ethernet_hdr structure. 
> I'm thinking it's because the structure is packed, and the size of 
> structure is 14 bytes, instead of 16 bytes. How can I supress the UMR 
> message?
> 
> Thank you,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Router conflict
Date: Thu, 02 Feb 2006 22:53:14 -0800
Lines: 9
Distribution: su
Message-ID: <druukp$do6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9894

Hi Ari/Matt:
Suddenly I got this error:

Client alexqi connecting to Server vns-1.stanford.edu:12345
Requesting topology 75
VNS server closed session.
Reason: reservehost failed

could you tell me the reason?
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp generation, ip fragmentation
Date: Thu, 02 Feb 2006 22:57:28 -0800
Lines: 15
Distribution: su
Message-ID: <druust$e0n$1@news.Stanford.EDU>
References: <drump5$4n2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drump5$4n2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9895

Never mind my second question, but my first question still holds.


Naeim Semsarilar wrote:
> Hey that rhymes ;)
> 
> When I generate an ICMP error (host/port unreachable, ttl expired), what 
> should I set the 'identification' and 'flags' fields in the enclosing IP 
> header to?
> 
> Also, the data portion of na ICMP packet is supposed to have the first 
> 64 bits  of the packet that caused the error. The first 64 bits starting 
> at the ethernet header, the IP header, or the data?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ProblemSet2, traceroute from external networks
Date: Thu, 02 Feb 2006 23:06:59 -0800
Lines: 28
Distribution: su
Message-ID: <druvd3$ef3$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602020001090.8519-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602020001090.8519-100000@elaine35.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9896

Vijay K Kulkarni wrote:
> Hi,
> 
> traceroute to hpr1-rtr.Stanford.EDU ends at 171.67.255.198 but
> host 171.67.255.198 has no entry from elaine.
> elaine35:~> host  171.67.255.198
> 171.67.255.198 does not exist (Authoritative answer)
> 
> but 'host hpr1-rtr.Stanford.EDU' gives 171.67.255.249 as the IP address
> close to the one displayed in traceroute. Any reasons for this behaviour?
> 

I just tried this traceroute and ended up at a different address.

But the behavior you described is possible, if you consider how 
traceroute works and that IPs don't need to be in DNS.

> And also I am unable to traceroute from 'external' networks into
> sweet-rtr.Stanford.EDU  and bbr2-rtr.Stanford.EDU. Is there any other
> stanford m/c I can login to that is on the "other" side of elaine w.r.t
> the routers in question.
> 

Not sure, sorry.

> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: UMRs for packed structures
Date: Thu, 02 Feb 2006 23:34:46 -0800
Lines: 40
Distribution: su
Message-ID: <drv12g$fr6$1@news.Stanford.EDU>
References: <drudda$nph$1@news.Stanford.EDU> <druuc1$da0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <druuc1$da0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9897

Here is the line that gets UMR:

    if (eth_hdr.ether_type == ETHERTYPE_ARP) {

and here is the purify output

    UMR: Uninitialized memory read:
      * This is occurring while in:
            sr_handlepacket [sr_router.c:222]
            sr_read_from_server [sr_vns_comm.c:318]
            main           [sr_main.c:149]
            _start         [crt1.o]
      * Reading 4 bytes from 0xffbef5ac on the stack (2 bytes at
        0xffbef5ae uninit).
      * Address 0xffbef5ac is       12 bytes past start of local
        variable "eth_hdr" in function sr_handlepacket.

The variable "eth_hdr is of type struct sr_ethernet_hdr. The program 
reads 4 bytes even though ether_type is 2 byte long. Any idea why this 
is happening?

Thanks!
--Michi


Matt Falkenhagen wrote:
> Are you sure you're not reading bad memory?  I doubt packed is the 
> cause... purify should know.
> 
> In any case, don't worry about suppressing purify errors, we don't test 
> your code using purify for this assignment.
> 
> Michi Mutsuzaki wrote:
>> I get UMR when accessing ether_type field in sr_ethernet_hdr 
>> structure. I'm thinking it's because the structure is packed, and the 
>> size of structure is 14 bytes, instead of 16 bytes. How can I supress 
>> the UMR message?
>>
>> Thank you,
>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: DDD = no VNS
Date: Thu, 2 Feb 2006 23:41:53 -0800
Lines: 15
Distribution: su
Message-ID: <drv1md$gb1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:9898

if i do ./sn -t 117 -s vns-1.stanford.edu, every thing works fine.
it connects to vns-1.stanford.edu and requests topology 117

if instead i do ddd ./sn -t 117 -s vns-1.stanford.edu, it won't load my 
topology
it says it's connecting to 171.67.71.18 and requesting topology 0
(171.67.71.18 does appear to be the IP for vns-1, but why is it 
requesting topology 0?)

anyone else having this problem?





.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: Checksum
Date: Fri, 03 Feb 2006 00:11:13 -0800
Lines: 43
Distribution: su
Message-ID: <C0085021.2FFB%sunnybalwani@hotmail.com>
References: <C00838AD.2FEB%sunnybalwani@hotmail.com> <drutg1$c9d$1@news.Stanford.EDU> <drutjq$c9d$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Checksum
Thread-Index: AcYomWXRpG59uJSMEdqWAQARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:9899

Naeim.

Thanks for the email.  The network sourcery says checksum for ICMP header is
to be calculated starting with the ICMP Type field.  So that gives us 8
bytes total for the ICMP echo header (64 bits).  But when try to calculate
the checksum for an incoming ICMP header, my checksum returns different from
the checksum in the ICMP header.  Though the same checksum() works just fine
for IP header.  Any ideas why the checksum for ICMP echo packets doesn't
return the same result as in the ICMP header?

Thanks again.
Sunny.


On 2/2/06 10:35 PM, in article drutjq$c9d$2@news.Stanford.EDU, "Naeim
Semsarilar" <naeim@stanford.edu> wrote:

> Correction: ICMP echo request and reply packets. Not all ICMP packets.
> 
> Naeim Semsarilar wrote:
>> There is an identifier and a sequence number associated with ICMP packets:
>> 
>> http://www.networksorcery.com/enp/protocol/icmp/msg8.htm
>> 
>> 
>> Sunny Balwani wrote:
>>> I have a questions about checksum and ICMP echo
>>> 
>>> 1. I ping my router from a machine and when I recieve a ICMP ECHO_REQUEST
>>> packet, I notice that the check sim for ICMP Header changes everytime.
>>> Shouldn't this stay constant because the ICMP header fields (type and
>>> code)
>>> is not changing for every ping packet.  Why is it changing?  when I
>>> generate
>>> checksum for my ICMP packets header, the checksum is the same if the two
>>> ICMP header fields are the same.
>>> 
>>> 
>>> Thanks in advance.
>>> Sunny.
>>> 


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: DDD = no VNS
Date: Fri, 3 Feb 2006 00:14:11 -0800
Organization: Stanford University
Lines: 20
Distribution: su
Message-ID: <20060203001411.5475e32b@ballpoint>
References: <drv1md$gb1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9900

I was able to connect fine with DDD, but I am developing on my own machine.

On Thu, 2 Feb 2006 23:41:53 -0800
Greg Corrado <gcorrado@stanford.edu> wrote:

> if i do ./sn -t 117 -s vns-1.stanford.edu, every thing works fine.
> it connects to vns-1.stanford.edu and requests topology 117
> 
> if instead i do ddd ./sn -t 117 -s vns-1.stanford.edu, it won't load my 
> topology
> it says it's connecting to 171.67.71.18 and requesting topology 0
> (171.67.71.18 does appear to be the IP for vns-1, but why is it 
> requesting topology 0?)
> 
> anyone else having this problem?
> 
> 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Checksum
Date: Fri, 3 Feb 2006 00:34:32 -0800
Lines: 60
Distribution: su
Message-ID: <drv4iq$m4h$1@news.Stanford.EDU>
References: <C00838AD.2FEB%sunnybalwani@hotmail.com> <drutg1$c9d$1@news.Stanford.EDU> <drutjq$c9d$2@news.Stanford.EDU> <C0085021.2FFB%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9901

Hi Sunny,

For ICMP, I think the Checksum should be calculated over all the data, not 
just the header. That should give you the correct checksum

Ram

"Sunny Balwani" <sunnybalwani@hotmail.com> wrote in message 
news:C0085021.2FFB%sunnybalwani@hotmail.com...
> Naeim.
>
> Thanks for the email.  The network sourcery says checksum for ICMP header 
> is
> to be calculated starting with the ICMP Type field.  So that gives us 8
> bytes total for the ICMP echo header (64 bits).  But when try to calculate
> the checksum for an incoming ICMP header, my checksum returns different 
> from
> the checksum in the ICMP header.  Though the same checksum() works just 
> fine
> for IP header.  Any ideas why the checksum for ICMP echo packets doesn't
> return the same result as in the ICMP header?
>
> Thanks again.
> Sunny.
>
>
> On 2/2/06 10:35 PM, in article drutjq$c9d$2@news.Stanford.EDU, "Naeim
> Semsarilar" <naeim@stanford.edu> wrote:
>
>> Correction: ICMP echo request and reply packets. Not all ICMP packets.
>>
>> Naeim Semsarilar wrote:
>>> There is an identifier and a sequence number associated with ICMP 
>>> packets:
>>>
>>> http://www.networksorcery.com/enp/protocol/icmp/msg8.htm
>>>
>>>
>>> Sunny Balwani wrote:
>>>> I have a questions about checksum and ICMP echo
>>>>
>>>> 1. I ping my router from a machine and when I recieve a ICMP 
>>>> ECHO_REQUEST
>>>> packet, I notice that the check sim for ICMP Header changes everytime.
>>>> Shouldn't this stay constant because the ICMP header fields (type and
>>>> code)
>>>> is not changing for every ping packet.  Why is it changing?  when I
>>>> generate
>>>> checksum for my ICMP packets header, the checksum is the same if the 
>>>> two
>>>> ICMP header fields are the same.
>>>>
>>>>
>>>> Thanks in advance.
>>>> Sunny.
>>>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Checksum
Date: Fri, 03 Feb 2006 00:41:02 -0800
Lines: 51
Distribution: su
Message-ID: <drv4v4$mc9$1@news.Stanford.EDU>
References: <C00838AD.2FEB%sunnybalwani@hotmail.com> <drutg1$c9d$1@news.Stanford.EDU> <drutjq$c9d$2@news.Stanford.EDU> <C0085021.2FFB%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <C0085021.2FFB%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:9902

ICMP checksum is calculated over the whole ICMP message, not just the 
header. Read:

http://www.networksorcery.com/enp/protocol/icmp/msg0.htm#ICMP%20Header%20Checksum



Sunny Balwani wrote:
> Naeim.
> 
> Thanks for the email.  The network sourcery says checksum for ICMP header is
> to be calculated starting with the ICMP Type field.  So that gives us 8
> bytes total for the ICMP echo header (64 bits).  But when try to calculate
> the checksum for an incoming ICMP header, my checksum returns different from
> the checksum in the ICMP header.  Though the same checksum() works just fine
> for IP header.  Any ideas why the checksum for ICMP echo packets doesn't
> return the same result as in the ICMP header?
> 
> Thanks again.
> Sunny.
> 
> 
> On 2/2/06 10:35 PM, in article drutjq$c9d$2@news.Stanford.EDU, "Naeim
> Semsarilar" <naeim@stanford.edu> wrote:
> 
>> Correction: ICMP echo request and reply packets. Not all ICMP packets.
>>
>> Naeim Semsarilar wrote:
>>> There is an identifier and a sequence number associated with ICMP packets:
>>>
>>> http://www.networksorcery.com/enp/protocol/icmp/msg8.htm
>>>
>>>
>>> Sunny Balwani wrote:
>>>> I have a questions about checksum and ICMP echo
>>>>
>>>> 1. I ping my router from a machine and when I recieve a ICMP ECHO_REQUEST
>>>> packet, I notice that the check sim for ICMP Header changes everytime.
>>>> Shouldn't this stay constant because the ICMP header fields (type and
>>>> code)
>>>> is not changing for every ping packet.  Why is it changing?  when I
>>>> generate
>>>> checksum for my ICMP packets header, the checksum is the same if the two
>>>> ICMP header fields are the same.
>>>>
>>>>
>>>> Thanks in advance.
>>>> Sunny.
>>>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Lee Hendrickson <lthendri@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: DDD = no VNS
Date: Fri, 03 Feb 2006 01:08:10 -0800
Lines: 23
Distribution: su
Message-ID: <drv6hp$njc$1@news.Stanford.EDU>
References: <drv1md$gb1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drv1md$gb1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9903

Greg Corrado wrote:
> if i do ./sn -t 117 -s vns-1.stanford.edu, every thing works fine.
> it connects to vns-1.stanford.edu and requests topology 117
> 
> if instead i do ddd ./sn -t 117 -s vns-1.stanford.edu, it won't load my 
> topology
> it says it's connecting to 171.67.71.18 and requesting topology 0
> (171.67.71.18 does appear to be the IP for vns-1, but why is it 
> requesting topology 0?)

For ddd/gdb, you shouldn't be giving runtime arguments for the program 
you're trying to debug when you start ddd/gdb.  Instead, start ddd with:

%> ddd ./sn

And then once inside the debugging environment (i.e., at the (gdb) 
prompt), type:

(gdb) run -t 117 -s vns-1.stanford.edu

Hope that helps.

Lee.
.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: DDD = no VNS
Date: Fri, 3 Feb 2006 08:36:59 -0600
Lines: 28
Distribution: su
Message-ID: <drvpqf$c03$1@news.Stanford.EDU>
References: <drv1md$gb1$1@news.Stanford.EDU> <20060203001411.5475e32b@ballpoint>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9904

If its anything like gdb, you would say ddd sr and then specify the 
arguments after the program has launched with the run command.


"David Reiss" <dreiss@stanford.edu> wrote in message 
news:20060203001411.5475e32b@ballpoint...
>I was able to connect fine with DDD, but I am developing on my own machine.
>
> On Thu, 2 Feb 2006 23:41:53 -0800
> Greg Corrado <gcorrado@stanford.edu> wrote:
>
>> if i do ./sn -t 117 -s vns-1.stanford.edu, every thing works fine.
>> it connects to vns-1.stanford.edu and requests topology 117
>>
>> if instead i do ddd ./sn -t 117 -s vns-1.stanford.edu, it won't load my
>> topology
>> it says it's connecting to 171.67.71.18 and requesting topology 0
>> (171.67.71.18 does appear to be the IP for vns-1, but why is it
>> requesting topology 0?)
>>
>> anyone else having this problem?
>>
>>
>>
>>
>> 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Sending "Host Unreachable" in a Burst?
Date: Fri, 03 Feb 2006 10:48:07 -0800
Lines: 10
Distribution: su
Message-ID: <ds08h5$q27$1@news.Stanford.EDU>
References: <20060202170431.255a6e90@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060202170431.255a6e90@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9905


thats just fine.

> When my router is not connected and I try to ping it, the vns firewall
> gives the following behavior: after about three seconds, it sends three
> "Host Unreachable" ICMPs (one for each ping), all at about the same
> time.  Is it okay for my router to do the same thing?  Five seconds
> after the *first* ARP, it will send a host unreachable for each packet
> bound for that hop, even ones that only arrived 0.1 seconds ago?  Or is
> it necessary to have a separate 5-second counter for each packet?
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router conflict
Date: Fri, 03 Feb 2006 10:49:12 -0800
Lines: 16
Distribution: su
Message-ID: <ds08j7$q27$2@news.Stanford.EDU>
References: <druukp$do6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <druukp$do6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9906


You've got a router still connected from host
171.64.15.99 (elaine24)
try killing the process.



> Hi Ari/Matt:
> Suddenly I got this error:
> 
> Client alexqi connecting to Server vns-1.stanford.edu:12345
> Requesting topology 75
> VNS server closed session.
> Reason: reservehost failed
> 
> could you tell me the reason?
.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router conflict
Date: Fri, 03 Feb 2006 10:58:00 -0800
Lines: 21
Distribution: su
Message-ID: <43E3A7B8.2B871A3E@stanford.edu>
References: <druukp$do6$1@news.Stanford.EDU> <ds08j7$q27$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
Xref: shelby.stanford.edu su.class.cs244a:9907

I did try to kill it. I use command "jobs" to find the process, it's not
there. could you tell me the command?

Thanks.

Martin Casado wrote:

> You've got a router still connected from host
> 171.64.15.99 (elaine24)
> try killing the process.
>
> > Hi Ari/Matt:
> > Suddenly I got this error:
> >
> > Client alexqi connecting to Server vns-1.stanford.edu:12345
> > Requesting topology 75
> > VNS server closed session.
> > Reason: reservehost failed
> >
> > could you tell me the reason?

.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: thread library?
Date: Fri, 03 Feb 2006 12:13:53 -0800
Lines: 17
Distribution: su
Message-ID: <ds0di1$1jv$1@news.Stanford.EDU>
References: <drpt7a$lbp$1@news.Stanford.EDU> <drq198$pak$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <drq198$pak$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9908

Can't we just fork a new process?

Matt Falkenhagen wrote:
> Strictly speaking, there is no ANSI C threading library :-P
> 
> Yes, pthreads is POSIX (where the p comes from).  You should use 
> pthreads for maximum portability.
> 
> Will Palmeri wrote:
> 
>> What threading library can we use and still comply to ANSI C?  I was 
>> under the impression that pthread (as some others have mentioned) is 
>> POSIX. Or is there a solaris-specific library we should use? (Which 
>> would be unfortunate for those of us developing on other flavors of *nix)
>>
>> Thanks,
>> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Router conflict
Date: Fri, 03 Feb 2006 13:20:07 -0800
Lines: 27
Distribution: su
Message-ID: <ds0he6$5if$1@news.Stanford.EDU>
References: <druukp$do6$1@news.Stanford.EDU> <ds08j7$q27$2@news.Stanford.EDU> <43E3A7B8.2B871A3E@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <43E3A7B8.2B871A3E@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:9909

ps -a?


> I did try to kill it. I use command "jobs" to find the process, it's not
> there. could you tell me the command?
> 
> Thanks.
> 
> Martin Casado wrote:
> 
> 
>>You've got a router still connected from host
>>171.64.15.99 (elaine24)
>>try killing the process.
>>
>>
>>>Hi Ari/Matt:
>>>Suddenly I got this error:
>>>
>>>Client alexqi connecting to Server vns-1.stanford.edu:12345
>>>Requesting topology 75
>>>VNS server closed session.
>>>Reason: reservehost failed
>>>
>>>could you tell me the reason?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP Destination Unreachable payload
Date: Fri, 03 Feb 2006 13:27:23 -0800
Lines: 31
Distribution: su
Message-ID: <ds0hrp$5if$2@news.Stanford.EDU>
References: <drmkku$lh2$1@news.Stanford.EDU> <drmtcn$4eu$1@news.Stanford.EDU> <druspd$b7p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <druspd$b7p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9910


That's reasonable

> Is it OK to drop a packet that has less than 64 bits of data (excluding 
> the headers) and not generate an ICMP error for it in case its TTL has 
> reached zero or its destination is unreachable?
> 
> 
> Martin Casado wrote:
> 
>> Roy Zeighami wrote:
>>
>>> The RFC for ICMP says that, for a destination unreachable ICMP 
>>> message, we should return the original IP header and the first 64 
>>> bits of the payload. Is an IP packet always guaranteed to have at 
>>> least 64 bits of data in the payload?
>>>
>>
>> I'm not sure, though it is hard to conceive of a smaller, 
>> non-malicious  packet.  The minimum ip fragment size is 8 bytes.  And 
>> UDP header (much
>> smaller than TCP) are 64 bits. Your packet shouldn't crash however if
>> it receives a malformed packet
>>
>> .m
>>
>>
>>> Thanks,
>>>
>>> Roy
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: minor turbulance on vns-1
Date: Fri, 03 Feb 2006 13:52:10 -0800
Lines: 1
Distribution: su
Message-ID: <ds0ja8$778$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9911

had to kick a router
.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PING
Date: Fri, 3 Feb 2006 14:32:53 -0800
Lines: 22
Distribution: su
Message-ID: <ds0ln2$9gt$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9912

Hi,

I just want to make sure I understand the last year FAQ posting correctly.

Suppose my eth0 is 192.168.131.99 and my eth1 is 192.168.131.100

I type command:

elaine37:~> ping 192.168.131.100

then I have to send the ICMP ECHO REPLY back through eth0, so i use eth0's 
ip addr as a src ip addr and get the following result :

64 bytes from 192.168.131.99: seq=0 ttl=61 time=5.55 ms.

Is this a correct behavior? Or do I have to use eth1's ip addr as a src ip 
addr in ICMP ECHO REPLY packet?

Thanks,
Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: IP headers other than 20 bytes?
Date: Fri, 3 Feb 2006 15:06:07 -0800
Organization: Stanford University
Lines: 1
Distribution: su
Message-ID: <20060203150607.36a2110e@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9913

Do we have to support IP headers longer than 20 bytes?
.

Path: shelby.stanford.edu!not-for-mail
From: "Junhee Seok" <jseok@stanford.edu>
Newsgroups: su.class.cs244a
Subject: about .purify and purify.output
Date: Fri, 3 Feb 2006 15:47:30 -0800
Lines: 10
Distribution: su
Message-ID: <ds0q2i$ev4$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9914

As I know, ".purify" is generated automatically,
and "purify.output" is just dump of text output results during running.
First, am I right?
Secondly, I don't have ".purify" even though I run the sr.purify.
I cannot remember how I did at the fisrt assignment.
Help me.

Junhee 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify Question
Date: Fri, 03 Feb 2006 17:23:17 -0800
Lines: 14
Distribution: su
Message-ID: <ds0vkn$ldl$1@news.Stanford.EDU>
References: <drfu7d$qv1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drfu7d$qv1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9915

See thread "purify and signals" from the 2004 newsgroup.

Roy Zeighami wrote:
> Since sr never exits, how do we get purify info?  I am running purify 
> remotely, so the output goes to a purify.output file.  Right now, the only 
> way I can make the program exit is with a ctrl-C.  When I do that the output 
> file has nothing interesting (just says it got a signal).  Has anyone 
> figured a way to work around this?
> 
> Thanks,
> 
> Roy 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Rtable file
Date: Fri, 03 Feb 2006 17:25:57 -0800
Lines: 51
Distribution: su
Message-ID: <ds0vpn$ldo$1@news.Stanford.EDU>
References: <drhtlp$l6n$1@news.Stanford.EDU> <dri4nn$r00$1@news.Stanford.EDU> <Pine.GSO.4.44.0602021232370.10760-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602021232370.10760-100000@elaine4.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9916

Dan C Silver wrote:
> Just to clarify a bit more -- so we're basically treating each app server
> as a router, and not as a host on the same subnet as our router's
> interface?  In my particular topology it doesn't seem to be possible to
> mask the two subnets properly, so I'm guessing this is the case.

Yeah that's a good way to think about it.

> 
> And we don't have subnet masks for each interface, so we're basically
> treating each interface as being it's own subnet with a single host?
> Should we assume the subnet mask for each interface is 255.255.255.255?
> If so, should we still AND the dest ip against our subnet mask to
> determine if it's on the same subnet?

Definately do the AND, your router should work with any valid rtable 
file not ones for these simple topologies.

> 
> Thx,
> 
> - Dan
> 
> On Sun, 29 Jan 2006, Matt Falkenhagen wrote:
> 
> 
>> From the way you phrased the question I'm not sure how to answer, but....
>>
>>The rtable is just a list of rules for forwarding packets.  Your router
>>reads in this list of rules.
>>
>>Your toplogy email tells you how your router should forward packets to
>>exactly two specific IP addresses (your app servers) and to the rest of
>>the Internet.  Given that information, think about what rules you want
>>in your rtable.
>>
>>Ask again if it's not clear.
>>
>>Sutthipong Thavisomboon wrote:
>>
>>>Hi,
>>>
>>>I read in the newsgroup that we should modify the rtable static file
>>>according to the assigned topology. I see the IP address in the email,
>>>however, I'm not sure what to put for mask?
>>>
>>>Sutthipong
>>>
>>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: traceroute question
Date: Fri, 03 Feb 2006 17:42:35 -0800
Lines: 21
Distribution: su
Message-ID: <ds10os$ma6$1@news.Stanford.EDU>
References: <drsddv$es5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <drsddv$es5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9917

So the test script is a little flexible about this because different 
routers do different things.  Things to know are

- It's definately wrong to count eth0 and eth[1,2] as two separate hops.
- As the source address of your ICMP packet, you can choose either the 
interface it's going out on or the interface the incoming packet was 
destined to.
- BUT if the incoming packet was an ICMP echo you should conform to the RFC:

    The IP source address in an ICMP Echo Reply MUST be the same as the
    specific-destination address of the corresponding ICMP Echo Request
    message.


Will Palmeri wrote:
> What is the expected behavior when we perform a traceroute to an IP on 
> the "other" side of our router. E.g. if you traceroute eth1 or eth2 from 
> elaine, which has to "go through" eth0 first.
> 
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp generation, ip fragmentation
Date: Fri, 03 Feb 2006 17:50:45 -0800
Lines: 28
Distribution: su
Message-ID: <ds1187$mtf$1@news.Stanford.EDU>
References: <drump5$4n2$1@news.Stanford.EDU> <druust$e0n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <druust$e0n$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9918

 From networksourcery:

"The originating protocol module of an internet datagram sets the 
identification field to a value that must be unique for that 
source-destination pair and protocol for the time the datagram will be 
active in the internet system."

The flags should also be set according to the protocol.  Don't set "Do 
not fragment"; your packets may need to be fragmented as they go to 
their destination.

Naeim Semsarilar wrote:
> Never mind my second question, but my first question still holds.
> 
> 
> Naeim Semsarilar wrote:
> 
>> Hey that rhymes ;)
>>
>> When I generate an ICMP error (host/port unreachable, ttl expired), 
>> what should I set the 'identification' and 'flags' fields in the 
>> enclosing IP header to?
>>
>> Also, the data portion of na ICMP packet is supposed to have the first 
>> 64 bits  of the packet that caused the error. The first 64 bits 
>> starting at the ethernet header, the IP header, or the data?
>>
>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PING
Date: Fri, 03 Feb 2006 17:54:10 -0800
Lines: 31
Distribution: su
Message-ID: <ds11ek$n63$1@news.Stanford.EDU>
References: <ds0ln2$9gt$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds0ln2$9gt$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9919

No, from the RFC:

    The IP source address in an ICMP Echo Reply MUST be the same as the
    specific-destination address of the corresponding ICMP Echo Request
    message.

Which FAQ question were you looking at?

Sutthipong Thavisomboon wrote:
> Hi,
> 
> I just want to make sure I understand the last year FAQ posting correctly.
> 
> Suppose my eth0 is 192.168.131.99 and my eth1 is 192.168.131.100
> 
> I type command:
> 
> elaine37:~> ping 192.168.131.100
> 
> then I have to send the ICMP ECHO REPLY back through eth0, so i use eth0's 
> ip addr as a src ip addr and get the following result :
> 
> 64 bytes from 192.168.131.99: seq=0 ttl=61 time=5.55 ms.
> 
> Is this a correct behavior? Or do I have to use eth1's ip addr as a src ip 
> addr in ICMP ECHO REPLY packet?
> 
> Thanks,
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP headers other than 20 bytes?
Date: Fri, 03 Feb 2006 17:54:58 -0800
Lines: 11
Distribution: su
Message-ID: <ds11g3$n63$2@news.Stanford.EDU>
References: <20060203150607.36a2110e@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060203150607.36a2110e@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9920

 From the FAQ

Do I have to be able to handle IP Options?

No, other than that your client may not crash if it receives a packet 
with ip options, you don't have to do anything  with them. You don't 
have to parse them and it is acceptable to drop such packets or generate 
incorrect checksums for them.

David Reiss wrote:
> Do we have to support IP headers longer than 20 bytes?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: about .purify and purify.output
Date: Fri, 03 Feb 2006 17:55:37 -0800
Lines: 13
Distribution: su
Message-ID: <ds11ha$n63$3@news.Stanford.EDU>
References: <ds0q2i$ev4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds0q2i$ev4$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9921

Don't worry about these files, they don't need to be submitted.

Junhee Seok wrote:
> As I know, ".purify" is generated automatically,
> and "purify.output" is just dump of text output results during running.
> First, am I right?
> Secondly, I don't have ".purify" even though I run the sr.purify.
> I cannot remember how I did at the fisrt assignment.
> Help me.
> 
> Junhee 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: thread library?
Date: Fri, 03 Feb 2006 17:56:10 -0800
Lines: 22
Distribution: su
Message-ID: <ds11ic$n63$4@news.Stanford.EDU>
References: <drpt7a$lbp$1@news.Stanford.EDU> <drq198$pak$1@news.Stanford.EDU> <ds0di1$1jv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds0di1$1jv$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9922

If that works for you, sure.

Paul Tarjan wrote:
> Can't we just fork a new process?
> 
> Matt Falkenhagen wrote:
> 
>> Strictly speaking, there is no ANSI C threading library :-P
>>
>> Yes, pthreads is POSIX (where the p comes from).  You should use 
>> pthreads for maximum portability.
>>
>> Will Palmeri wrote:
>>
>>> What threading library can we use and still comply to ANSI C?  I was 
>>> under the impression that pthread (as some others have mentioned) is 
>>> POSIX. Or is there a solaris-specific library we should use? (Which 
>>> would be unfortunate for those of us developing on other flavors of 
>>> *nix)
>>>
>>> Thanks,
>>> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: traceroute question
Date: Fri, 03 Feb 2006 18:28:47 -0800
Lines: 25
Distribution: su
Message-ID: <ds13gs$p3u$1@news.Stanford.EDU>
References: <drsddv$es5$1@news.Stanford.EDU> <ds10os$ma6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <ds10os$ma6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9923

Thanks, that definitely cleared things up.

Matt Falkenhagen wrote:
> So the test script is a little flexible about this because different 
> routers do different things.  Things to know are
> 
> - It's definately wrong to count eth0 and eth[1,2] as two separate hops.
> - As the source address of your ICMP packet, you can choose either the 
> interface it's going out on or the interface the incoming packet was 
> destined to.
> - BUT if the incoming packet was an ICMP echo you should conform to the 
> RFC:
> 
>    The IP source address in an ICMP Echo Reply MUST be the same as the
>    specific-destination address of the corresponding ICMP Echo Request
>    message.
> 
> 
> Will Palmeri wrote:
>> What is the expected behavior when we perform a traceroute to an IP on 
>> the "other" side of our router. E.g. if you traceroute eth1 or eth2 
>> from elaine, which has to "go through" eth0 first.
>>
>> Thanks,
>> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_router.h
Date: Fri, 03 Feb 2006 21:59:00 -0800
Lines: 50
Distribution: su
Message-ID: <ds1fr1$68g$1@news.Stanford.EDU>
References: <drqslu$ll3$1@news.Stanford.EDU>	<drrbqo$8sr$1@news.Stanford.EDU> <20060201145014.69b33f8b@ballpoint> <drrjfc$ica$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <drrjfc$ica$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9924

Which would you prefer, global variables (for the arp table and packet 
queue) or us to modify sr_instance? I was dinged hard on the last assign 
for globals, so I'm just checking.

Paul

Martin Casado wrote:
> Perhaps I wasn't clear:
> 
> We want to actively discourage students from modifying the
> provided source files.  It makes grading difficult.  Unless
> there is a functional change you require (e.g. signal handlin
> or bug fixes), don't change them.
> 
> Adding to sr_instance is OK, this is a defficiency in our design.
> You are right, we should update the FAQ to say "only add changes to 
> sr_router.[c,h]".
> 
> thanks :)
> .martin
> 
> 
>> You might want to change the FAQ then:
>>
>>   Which files in the stub code can I modify?
>>
>>   The only files in the provided source that you may modify are
>>   sr_router.h and sr_router.c (this does not include bugfixes). You may,
>>   however, add your own files and update the Makefile to support them.
>>
>> I am adding prototypes for all of my funcions to sr_router.h, and I was
>> going to put a pointer to my ARP cache in sr_instance.  Are those okay?
>>
>>
>> On Wed, 01 Feb 2006 14:13:45 -0800
>> Martin Casado <casado@cs.stanford.edu> wrote:
>>
>>
>>> This is something you'll want to clear with us before doing.  It 
>>> makes grading harder and if you are not careful can break grading and 
>>> test.
>>>
>>> Generally the rule is don't muck with files other than sr_router.c
>>>
>>>
>>>> The assignment page says "We ask that you do not modify any of the 
>>>> provided files, except for sr_router.c."  I just want to be 
>>>> clear...  we cannot modify sr_router.h ?
>>>> cheers, Bruce
>>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: DDD = no VNS
Date: Fri, 3 Feb 2006 23:11:31 -0800
Lines: 8
Distribution: su
Message-ID: <ds1k9a$6og$1@news.Stanford.EDU>
References: <drv1md$gb1$1@news.Stanford.EDU> <drv6hp$njc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:9925

> For ddd/gdb, you shouldn't be giving runtime arguments for the program 
> you're trying to debug when you start ddd/gdb.  Instead, start ddd with:

thanks!




.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp generation, ip fragmentation
Date: Fri, 3 Feb 2006 23:38:24 -0800
Organization: Stanford University
Lines: 41
Distribution: su
Message-ID: <20060203233824.06e66cbc@ballpoint>
References: <drump5$4n2$1@news.Stanford.EDU>
	<druust$e0n$1@news.Stanford.EDU>
	<ds1187$mtf$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:9926

Should we consider the "source-destination pair" to be just the two IP
addresses (in either order), or one address as the source and another as
the destination.  It would seem that if the only use of the field is to
group fragments together, then the latter is the correct interpretation.
 In that case, is it okay to just use the same identification as the
packet that generated our response?  If the computer that generated the
IP packets followed the protocol and made their identifications unique,
then our identifications should be unique in the opposite direction,
right?

On Fri, 03 Feb 2006 17:50:45 -0800
Matt Falkenhagen <mjf@stanford.edu> wrote:

>  From networksourcery:
> 
> "The originating protocol module of an internet datagram sets the 
> identification field to a value that must be unique for that 
> source-destination pair and protocol for the time the datagram will be 
> active in the internet system."
> 
> The flags should also be set according to the protocol.  Don't set "Do 
> not fragment"; your packets may need to be fragmented as they go to 
> their destination.
> 
> Naeim Semsarilar wrote:
> > Never mind my second question, but my first question still holds.
> > 
> > 
> > Naeim Semsarilar wrote:
> > 
> >> Hey that rhymes ;)
> >>
> >> When I generate an ICMP error (host/port unreachable, ttl expired), 
> >> what should I set the 'identification' and 'flags' fields in the 
> >> enclosing IP header to?
> >>
> >> Also, the data portion of na ICMP packet is supposed to have the first 
> >> 64 bits  of the packet that caused the error. The first 64 bits 
> >> starting at the ethernet header, the IP header, or the data?
> >>
> >> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Rtable file
Date: Fri, 03 Feb 2006 23:43:44 -0800
Lines: 59
Distribution: su
Message-ID: <ds1lvo$ape$1@news.Stanford.EDU>
References: <drhtlp$l6n$1@news.Stanford.EDU> <dri4nn$r00$1@news.Stanford.EDU> <Pine.GSO.4.44.0602021232370.10760-100000@elaine4.Stanford.EDU> <ds0vpn$ldo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds0vpn$ldo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9927

Could you please explain this a bit more? What exactly is the 
significance of the subnet field in rtable?

Thanks.


Matt Falkenhagen wrote:
> Dan C Silver wrote:
>> Just to clarify a bit more -- so we're basically treating each app server
>> as a router, and not as a host on the same subnet as our router's
>> interface?  In my particular topology it doesn't seem to be possible to
>> mask the two subnets properly, so I'm guessing this is the case.
> 
> Yeah that's a good way to think about it.
> 
>>
>> And we don't have subnet masks for each interface, so we're basically
>> treating each interface as being it's own subnet with a single host?
>> Should we assume the subnet mask for each interface is 255.255.255.255?
>> If so, should we still AND the dest ip against our subnet mask to
>> determine if it's on the same subnet?
> 
> Definately do the AND, your router should work with any valid rtable 
> file not ones for these simple topologies.
> 
>>
>> Thx,
>>
>> - Dan
>>
>> On Sun, 29 Jan 2006, Matt Falkenhagen wrote:
>>
>>
>>> From the way you phrased the question I'm not sure how to answer, 
>>> but....
>>>
>>> The rtable is just a list of rules for forwarding packets.  Your router
>>> reads in this list of rules.
>>>
>>> Your toplogy email tells you how your router should forward packets to
>>> exactly two specific IP addresses (your app servers) and to the rest of
>>> the Internet.  Given that information, think about what rules you want
>>> in your rtable.
>>>
>>> Ask again if it's not clear.
>>>
>>> Sutthipong Thavisomboon wrote:
>>>
>>>> Hi,
>>>>
>>>> I read in the newsgroup that we should modify the rtable static file
>>>> according to the assigned topology. I see the IP address in the email,
>>>> however, I'm not sure what to put for mask?
>>>>
>>>> Sutthipong
>>>>
>>>>
>>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Warning
Date: Sat, 4 Feb 2006 01:51:33 -0800
Lines: 9
Distribution: su
Message-ID: <ds1tf7$kk1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9928

I am getting this warning even though I haven't changed these files:

In file included from sr_if.h:20,
                 from sr_router.c:18:
/usr/include/sys/int_types.h:9: warning: ignoring #pragma ident

Any ideas? 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Query on ICMP Host/PORT Unreach
Date: Sat, 4 Feb 2006 02:46:34 -0800
Organization: Stanford University
Lines: 10
Distribution: su
Message-ID: <ds20mc$nd1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9929

An ICMP host/port unreach message is supposed
to include the old packet's ip header and the first 8 bytes of data. Do we 
need to blindly copy out
old_iphdr->ip_hl *4 + 8 bytes of data or
are we supposed to change fields like total length and checksum of the old 
ip packet header?

thanks. 


.

Path: shelby.stanford.edu!elaine39.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: Warning
Date: Sat, 4 Feb 2006 15:13:45 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 19
Distribution: su
Message-ID: <ds2gb9$8r3$1@news.Stanford.EDU>
References: <ds1tf7$kk1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9930

There were couple of posts about it before. The TA said we can ignore it.
Also somebody suggested adding -Wno-unknown-pragmas to CFLAGS in the
Makefile -- worked for me.

Oleg.

In article <ds1tf7$kk1$1@news.Stanford.EDU>,
Nazia Zaman <nazia@stanford.edu> wrote:
>I am getting this warning even though I haven't changed these files:
>
>In file included from sr_if.h:20,
>                 from sr_router.c:18:
>/usr/include/sys/int_types.h:9: warning: ignoring #pragma ident
>
>Any ideas? 
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Query on ICMP Host/PORT Unreach
Date: Sat, 04 Feb 2006 09:57:55 -0800
Lines: 15
Distribution: su
Message-ID: <ds2puu$gh6$1@news.Stanford.EDU>
References: <ds20mc$nd1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds20mc$nd1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9931

You should be able to determine this yourself.  Remember that you
can log packets and the app servers will respond with the correct
host unreach


> An ICMP host/port unreach message is supposed
> to include the old packet's ip header and the first 8 bytes of data. Do we 
> need to blindly copy out
> old_iphdr->ip_hl *4 + 8 bytes of data or
> are we supposed to change fields like total length and checksum of the old 
> ip packet header?
> 
> thanks. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Clack with Ethereal component
Date: Sat, 04 Feb 2006 10:13:34 -0800
Lines: 15
Distribution: su
Message-ID: <ds2qsa$hee$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9932

The Clack team has added an component which does a very good
job of mimicking Ethereal.  It shows all header fields and their 
associated byte values.  The interface is much better than tcpdump
so its probably worth checking out if you are still working on the
assignment:

   http://www.clackrouter.net/demo/clack_demo_ethereal.html

If you have any problems with it, e-mail (your very own)
Paul at (ptarjan@gmail.com).  Note, you'll need java 1.5
to use it which I don't believe is installed on any of the
cluster browsers.

thanks,
Martin
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: IP packets decomposition:  ICMP vs. what other specific choices
Date: Sat, 4 Feb 2006 11:08:20 -0800
Lines: 16
Distribution: su
Message-ID: <ds2u35$kdm$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9933


I noticed in Clack that they have a "Level3Demux" which apparently 
delineates between incoming ICMP, UDP and TCP packets.  This is interesting 
to me because I am trying to determine if my router would treat forwarding 
decisions of IP packets differently between various kinds of IP packets. 
Clearly ICMP packets need special processing.  But I would have thought that 
all other packets (including both UDP and TCP) would be treated as one 
general case.  Yet, Clack seems to differentiate somehow between UDP and 
TCP.  Is there a reason for us to do so as well?  I don't see any 
requirement in the Assignment document?


Thanks,
 -- Bruce


.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Purify running out of threads
Date: Sat, 04 Feb 2006 12:12:15 -0800
Lines: 8
Distribution: su
Message-ID: <ds31r3$noq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9934

Has anyone else seen Purify terminating your program because it exceeds 
the allowable number of threads?  My program creates threads when 
needed, but from what I can tell the threads all die when they are done. 
  The program works fine when not in Purify.  Does anyone know if this 
is a limitation of Purify or a deficiency of my program?

Thanks,
Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Byte ordering
Date: Sat, 04 Feb 2006 12:24:59 -0800
Lines: 41
Distribution: su
Message-ID: <ds32j5$ogq$1@news.Stanford.EDU>
References: <drrt01$s1v$1@news.Stanford.EDU> <drs18t$2ld$4@news.Stanford.EDU> <druleu$3er$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <druleu$3er$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9935

bump

Naeim Semsarilar wrote:
> In sr_protocol.h, we have:
> 
> #if __BYTE_ORDER == __LITTLE_ENDIAN
>     unsigned int ip_hl:4;        /* header length */
>     unsigned int ip_v:4;        /* version */
> #elif __BYTE_ORDER == __BIG_ENDIAN
>     unsigned int ip_v:4;        /* version */
>     unsigned int ip_hl:4;        /* header length */
> #else
> #error "Byte ordering not specified "
> #endif
> 
> I'm not sure I understand what's going on here. The ver and hl fields 
> occupy 4 bits each. So why is *byte* ordering important here? I thought 
> byte ordering only applied to byte level types such as 16-bit and 32-bit 
> integers.
> 
> And a related question: if I need to construct an IP packet from 
> scratch, do I need to be concerned about how I assign to ip_v and ip_hl? 
> Can I just say iphdr->ip_v = 0x45; or is this bad (dependent on the 
> endianess of the machine)?
> 
> Thanks.
> 
> 
> Martin Casado wrote:
>>
>>
>>> Hi,
>>>
>>> Just to clarify, what is the byte-ordering of the fields in the 
>>> packet buffer passed in sr_handlepacket, and what byte-ordering 
>>> should the packet that we pass to sr_send_packet be? I'm thinking the 
>>> answer to both is network order, but please clarify.
>>
>> yup
>>
>>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Logging a traceroute
Date: Sat, 04 Feb 2006 14:20:14 -0800
Lines: 11
Distribution: su
Message-ID: <ds39b8$lr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9936

I looked at the packets that went through my router when I tried 
traceroute to an app server from an elaine machine. In the end, the app 
server sends an ICMP destination unreachable back to the elaine machine. 
This packet has the original IP header, the first 64 bits of the 
original packet (which happens to be the whole UDP header), plus 10 more 
bytes that show up as "Data (10 bytes)" in ethereal.

I thought an ICMP error was supposed to contain only the original IP 
header and the first 64 bits of data. So what are these extra 10 bytes?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: modifying sr_router.c
Date: Sat, 4 Feb 2006 14:32:26 -0800
Lines: 6
Distribution: su
Message-ID: <ds3a1v$13i$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9937

I want to add a function arp_init() in sr_init() in sr_route.c. Can I modify 
the file?
Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Clack with Ethereal component
Date: Sat, 04 Feb 2006 14:40:00 -0800
Lines: 33
Distribution: su
Message-ID: <ds3afv$1bp$1@news.Stanford.EDU>
References: <ds2qsa$hee$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <ds2qsa$hee$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9938

Martin, always trying to make more work for me eh? :)

Anyways, firefox doesn't have a java plugin on any of the cluster 
computers, but it has java 1.5 on the command line, so just take the jar:

http://www.clackrouter.net/demo/signed-clack-0.99.1.jar

and run it like this:

java -jar signed-clack-0.99.1.jar -u 
http://www.clackrouter.net/demo/clack_demo_ethereal.topo

I welcome any feature suggestions or bug reports. (ptarjan@gmail.com)

Thanks
Paul

Martin Casado wrote:
> The Clack team has added an component which does a very good
> job of mimicking Ethereal.  It shows all header fields and their 
> associated byte values.  The interface is much better than tcpdump
> so its probably worth checking out if you are still working on the
> assignment:
> 
>   http://www.clackrouter.net/demo/clack_demo_ethereal.html
> 
> If you have any problems with it, e-mail (your very own)
> Paul at (ptarjan@gmail.com).  Note, you'll need java 1.5
> to use it which I don't believe is installed on any of the
> cluster browsers.
> 
> thanks,
> Martin
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Traceroute
Date: Sat, 4 Feb 2006 14:56:00 -0800
Lines: 23
Distribution: su
Message-ID: <ds3be5$275$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9939

A trace route to my router 192.168.130.70 looks like this:
traceroute to 192.168.130.70 (192.168.130.70): 1-30 hops, 38 byte packets
 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.557 ms  0.383 ms  0.369 ms
 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.554 ms  0.582 ms  0.570 ms
 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.451 ms (ttl=62!)  0.420 ms 
(ttl=62!)  0.420 ms (ttl=62!)
 4  192.168.130.70 (192.168.130.70)  2.59 ms !A  2.44 ms !A  2.44 ms !A

A trace route to my application server 192.168.130.72 looks like this:
elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte packets
 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 ms 
(ttl=62!)  0.577 ms (ttl=62!)
 4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A

Are these okay? But if you notice the second trace route it does not show my 
router, it should show it right?
Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP packets decomposition:  ICMP vs. what other specific choices
Date: Sat, 04 Feb 2006 15:01:07 -0800
Lines: 24
Distribution: su
Message-ID: <ds3bnd$29l$1@news.Stanford.EDU>
References: <ds2u35$kdm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds2u35$kdm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9940

Heya Bruce,

Level 3 demultiplexing is only used for packets to Clack
(or least it only should be).  Clack has a TCP stack component
and other L3 processing components.  For sr, you should only
worry about distinguishing packets addressed to you.

..m

> I noticed in Clack that they have a "Level3Demux" which apparently 
> delineates between incoming ICMP, UDP and TCP packets.  This is interesting 
> to me because I am trying to determine if my router would treat forwarding 
> decisions of IP packets differently between various kinds of IP packets. 
> Clearly ICMP packets need special processing.  But I would have thought that 
> all other packets (including both UDP and TCP) would be treated as one 
> general case.  Yet, Clack seems to differentiate somehow between UDP and 
> TCP.  Is there a reason for us to do so as well?  I don't see any 
> requirement in the Assignment document?
> 
> 
> Thanks,
>  -- Bruce
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: modifying sr_router.c
Date: Sat, 04 Feb 2006 15:02:41 -0800
Lines: 9
Distribution: su
Message-ID: <ds3bqa$29l$2@news.Stanford.EDU>
References: <ds3a1v$13i$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds3a1v$13i$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9941


You can modify router.c

> I want to add a function arp_init() in sr_init() in sr_route.c. Can I modify 
> the file?
> Thanks,
> Nazia 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 04 Feb 2006 15:03:49 -0800
Lines: 27
Distribution: su
Message-ID: <ds3bse$29l$3@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds3be5$275$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9942

N
> 
> A trace route to my application server 192.168.130.72 looks like this:
> elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
> traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte packets
>  1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
>  2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
>  3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 ms 
> (ttl=62!)  0.577 ms (ttl=62!)
>  4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
> 
> Are these okay?

nope

  But if you notice the second trace route it does not show my
> router, it should show it right?

yup

> Thanks,

wecome

> Nazia 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 4 Feb 2006 15:13:51 -0800
Lines: 31
Distribution: su
Message-ID: <ds3cfm$2uc$1@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU> <ds3bse$29l$3@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9943

Any idea why it is doing this?

"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:ds3bse$29l$3@news.Stanford.EDU...
> N
>>
>> A trace route to my application server 192.168.130.72 looks like this:
>> elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
>> traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte packets
>>  1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
>>  2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
>>  3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 
>> ms (ttl=62!)  0.577 ms (ttl=62!)
>>  4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
>>
>> Are these okay?
>
> nope
>
>  But if you notice the second trace route it does not show my
>> router, it should show it right?
>
> yup
>
>> Thanks,
>
> wecome
>
>> Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 4 Feb 2006 15:15:39 -0800
Lines: 28
Distribution: su
Message-ID: <ds3cj3$35l$1@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9944

Is the first one at least ok?

"Nazia Zaman" <nazia@stanford.edu> wrote in message 
news:ds3be5$275$1@news.Stanford.EDU...
>A trace route to my router 192.168.130.70 looks like this:
> traceroute to 192.168.130.70 (192.168.130.70): 1-30 hops, 38 byte packets
> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.557 ms  0.383 ms  0.369 ms
> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.554 ms  0.582 ms  0.570 ms
> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.451 ms (ttl=62!)  0.420 ms 
> (ttl=62!)  0.420 ms (ttl=62!)
> 4  192.168.130.70 (192.168.130.70)  2.59 ms !A  2.44 ms !A  2.44 ms !A
>
> A trace route to my application server 192.168.130.72 looks like this:
> elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
> traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte packets
> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 ms 
> (ttl=62!)  0.577 ms (ttl=62!)
> 4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
>
> Are these okay? But if you notice the second trace route it does not show 
> my router, it should show it right?
> Thanks,
> Nazia
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 04 Feb 2006 15:19:41 -0800
Lines: 43
Distribution: su
Message-ID: <ds3cqc$3au$1@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU> <ds3bse$29l$3@news.Stanford.EDU> <ds3cfm$2uc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <ds3cfm$2uc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9945

Nazia,

I don't think you are dropping packets when the TTL gets too low.

Paul

Nazia Zaman wrote:
> Any idea why it is doing this?
> 
> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
> news:ds3bse$29l$3@news.Stanford.EDU...
> 
>>N
>>
>>>A trace route to my application server 192.168.130.72 looks like this:
>>>elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
>>>traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte packets
>>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
>>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
>>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 
>>>ms (ttl=62!)  0.577 ms (ttl=62!)
>>> 4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
>>>
>>>Are these okay?
>>
>>nope
>>
>> But if you notice the second trace route it does not show my
>>
>>>router, it should show it right?
>>
>>yup
>>
>>
>>>Thanks,
>>
>>wecome
>>
>>
>>>Nazia 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 04 Feb 2006 15:23:08 -0800
Lines: 30
Distribution: su
Message-ID: <ds3d0m$3ht$1@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU> <ds3cj3$35l$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds3cj3$35l$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9946

why don't you test it against Clack?

> Is the first one at least ok?
> 
> "Nazia Zaman" <nazia@stanford.edu> wrote in message 
> news:ds3be5$275$1@news.Stanford.EDU...
>> A trace route to my router 192.168.130.70 looks like this:
>> traceroute to 192.168.130.70 (192.168.130.70): 1-30 hops, 38 byte packets
>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.557 ms  0.383 ms  0.369 ms
>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.554 ms  0.582 ms  0.570 ms
>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.451 ms (ttl=62!)  0.420 ms 
>> (ttl=62!)  0.420 ms (ttl=62!)
>> 4  192.168.130.70 (192.168.130.70)  2.59 ms !A  2.44 ms !A  2.44 ms !A
>>
>> A trace route to my application server 192.168.130.72 looks like this:
>> elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
>> traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte packets
>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 ms 
>> (ttl=62!)  0.577 ms (ttl=62!)
>> 4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
>>
>> Are these okay? But if you notice the second trace route it does not show 
>> my router, it should show it right?
>> Thanks,
>> Nazia
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: IP identification field.
Date: Sat, 04 Feb 2006 15:25:17 -0800
Lines: 5
Distribution: su
Message-ID: <ds3d4u$3k5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9947

The IP identification field is used for fragmentation.  And since we're 
not required to do fraqmentation, can we just put all 0's in the IP 
packets that originates from our router?

--George
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP identification field.
Date: Sat, 04 Feb 2006 15:27:11 -0800
Lines: 8
Distribution: su
Message-ID: <ds3d88$3ht$2@news.Stanford.EDU>
References: <ds3d4u$3k5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds3d4u$3k5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9948

nope. What if it is fragmented on route?


> The IP identification field is used for fragmentation.  And since we're 
> not required to do fraqmentation, can we just put all 0's in the IP 
> packets that originates from our router?
> 
> --George
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: routing table mask
Date: Sat, 04 Feb 2006 16:03:06 -0800
Lines: 11
Distribution: su
Message-ID: <ds3fc5$58p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9949

I'm not exactly sure how the mask field in the routing table is supposed 
to work. Say I have the following (hypothetical) entry in my routing table:

ip  : 192.168.131.0
gw  : 192.168.131.1
mask: 255.255.255.0

Does this mean that packets destined to 192.168.131.0 to 192.168.131.255 
should be forwarded to 192.168.131.1?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 4 Feb 2006 16:13:07 -0800
Lines: 50
Distribution: su
Message-ID: <ds3fuq$5pk$1@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU> <ds3cj3$35l$1@news.Stanford.EDU> <ds3d0m$3ht$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9950

Clack doesn't reply to a trace route to my router!

 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.536 ms  0.426 ms  0.374 ms
 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.577 ms  0.533 ms  0.518 ms
 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.423 ms (ttl=62!)  0.422 ms 
(ttl=62!)  0.407 ms (ttl=62!)
 4  *  *  *
 5  *  *  *
 6  *  *  *
 7  *  *  *
 8  *  *  *
 9  *  *  *
10  *  *  *
11  *  *  *
12
Is that normal????
"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:ds3d0m$3ht$1@news.Stanford.EDU...
> why don't you test it against Clack?
>
>> Is the first one at least ok?
>>
>> "Nazia Zaman" <nazia@stanford.edu> wrote in message 
>> news:ds3be5$275$1@news.Stanford.EDU...
>>> A trace route to my router 192.168.130.70 looks like this:
>>> traceroute to 192.168.130.70 (192.168.130.70): 1-30 hops, 38 byte 
>>> packets
>>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.557 ms  0.383 ms  0.369 ms
>>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.554 ms  0.582 ms  0.570 ms
>>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.451 ms (ttl=62!)  0.420 
>>> ms (ttl=62!)  0.420 ms (ttl=62!)
>>> 4  192.168.130.70 (192.168.130.70)  2.59 ms !A  2.44 ms !A  2.44 ms !A
>>>
>>> A trace route to my application server 192.168.130.72 looks like this:
>>> elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
>>> traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte 
>>> packets
>>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
>>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
>>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 
>>> ms (ttl=62!)  0.577 ms (ttl=62!)
>>> 4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
>>>
>>> Are these okay? But if you notice the second trace route it does not 
>>> show my router, it should show it right?
>>> Thanks,
>>> Nazia
>>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_send_packet
Date: Sat, 04 Feb 2006 16:26:00 -0800
Lines: 13
Distribution: su
Message-ID: <ds3gn2$5fq$1@news.Stanford.EDU>
References: <drsf3q$jhc$1@news.Stanford.EDU> <drtlt9$qpb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <drtlt9$qpb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9951

It is OK to exit with an error if sr_send_packet returns -1?


Martin Casado wrote:
> 
>> What should I do when sr_send_packet returns -1? Can I just print out 
>> some error message and continue?
> 
> good enough
> 
> 
>> Thanks!
>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Global Structure
Date: Sat, 04 Feb 2006 16:36:06 -0800
Lines: 7
Distribution: su
Message-ID: <C00A8876.281B%jpettit@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Global Structure
Thread-Index: AcYp7CZnZL4RaJXfEdqqXQARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:9952

There was a question asked that I didn't see an answer to: are we allowed to
use a limited number of global structures?  I plan on launching a thread on
startup, but I don't know how I can share state without either a global
structure or modifying code that we're not supposed to touch.

--Justin

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 04 Feb 2006 16:38:43 -0800
Lines: 59
Distribution: su
Message-ID: <ds3het$727$1@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU> <ds3cj3$35l$1@news.Stanford.EDU> <ds3d0m$3ht$1@news.Stanford.EDU> <ds3fuq$5pk$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds3fuq$5pk$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9953

I'm getting the same behavior from Clack. It works if I traceroute an 
app server, but when I traceroute any of the router IPs, I get what was 
just described.

Is this normal behavior?

Thanks.


Nazia Zaman wrote:
> Clack doesn't reply to a trace route to my router!
> 
>  1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.536 ms  0.426 ms  0.374 ms
>  2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.577 ms  0.533 ms  0.518 ms
>  3  vns-firewall.Stanford.EDU (172.24.74.11)  0.423 ms (ttl=62!)  0.422 ms 
> (ttl=62!)  0.407 ms (ttl=62!)
>  4  *  *  *
>  5  *  *  *
>  6  *  *  *
>  7  *  *  *
>  8  *  *  *
>  9  *  *  *
> 10  *  *  *
> 11  *  *  *
> 12
> Is that normal????
> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
> news:ds3d0m$3ht$1@news.Stanford.EDU...
>> why don't you test it against Clack?
>>
>>> Is the first one at least ok?
>>>
>>> "Nazia Zaman" <nazia@stanford.edu> wrote in message 
>>> news:ds3be5$275$1@news.Stanford.EDU...
>>>> A trace route to my router 192.168.130.70 looks like this:
>>>> traceroute to 192.168.130.70 (192.168.130.70): 1-30 hops, 38 byte 
>>>> packets
>>>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.557 ms  0.383 ms  0.369 ms
>>>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.554 ms  0.582 ms  0.570 ms
>>>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.451 ms (ttl=62!)  0.420 
>>>> ms (ttl=62!)  0.420 ms (ttl=62!)
>>>> 4  192.168.130.70 (192.168.130.70)  2.59 ms !A  2.44 ms !A  2.44 ms !A
>>>>
>>>> A trace route to my application server 192.168.130.72 looks like this:
>>>> elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
>>>> traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte 
>>>> packets
>>>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
>>>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
>>>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  0.415 
>>>> ms (ttl=62!)  0.577 ms (ttl=62!)
>>>> 4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
>>>>
>>>> Are these okay? But if you notice the second trace route it does not 
>>>> show my router, it should show it right?
>>>> Thanks,
>>>> Nazia
>>>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Global Structure
Date: Sat, 04 Feb 2006 16:49:04 -0800
Lines: 10
Distribution: su
Message-ID: <ds3i1r$7ca$1@news.Stanford.EDU>
References: <C00A8876.281B%jpettit@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <C00A8876.281B%jpettit@cs.stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:9954

I'm interested in this as well...

Justin Pettit wrote:
> There was a question asked that I didn't see an answer to: are we allowed to
> use a limited number of global structures?  I plan on launching a thread on
> startup, but I don't know how I can share state without either a global
> structure or modifying code that we're not supposed to touch.
> 
> --Justin
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Global Structure
Date: Sat, 04 Feb 2006 16:54:35 -0800
Lines: 15
Distribution: su
Message-ID: <ds3ic4$7uk$1@news.Stanford.EDU>
References: <C00A8876.281B%jpettit@cs.stanford.edu> <ds3i1r$7ca$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds3i1r$7ca$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9955


You can add a global for your own state.

> I'm interested in this as well...
> 
> Justin Pettit wrote:
>> There was a question asked that I didn't see an answer to: are we 
>> allowed to
>> use a limited number of global structures?  I plan on launching a 
>> thread on
>> startup, but I don't know how I can share state without either a global
>> structure or modifying code that we're not supposed to touch.
>>
>> --Justin
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute
Date: Sat, 04 Feb 2006 16:55:18 -0800
Lines: 63
Distribution: su
Message-ID: <ds3idf$7uk$2@news.Stanford.EDU>
References: <ds3be5$275$1@news.Stanford.EDU> <ds3cj3$35l$1@news.Stanford.EDU> <ds3d0m$3ht$1@news.Stanford.EDU> <ds3fuq$5pk$1@news.Stanford.EDU> <ds3het$727$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds3het$727$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9956


I actually haven't tried tracerouting to the router from Clack.
I apologize if t isn't working. We'll have to fix that.

> I'm getting the same behavior from Clack. It works if I traceroute an 
> app server, but when I traceroute any of the router IPs, I get what was 
> just described.
> 
> Is this normal behavior?
> 
> Thanks.
> 
> 
> Nazia Zaman wrote:
>> Clack doesn't reply to a trace route to my router!
>>
>>  1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.536 ms  0.426 ms  0.374 ms
>>  2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.577 ms  0.533 ms  0.518 ms
>>  3  vns-firewall.Stanford.EDU (172.24.74.11)  0.423 ms (ttl=62!)  
>> 0.422 ms (ttl=62!)  0.407 ms (ttl=62!)
>>  4  *  *  *
>>  5  *  *  *
>>  6  *  *  *
>>  7  *  *  *
>>  8  *  *  *
>>  9  *  *  *
>> 10  *  *  *
>> 11  *  *  *
>> 12
>> Is that normal????
>> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
>> news:ds3d0m$3ht$1@news.Stanford.EDU...
>>> why don't you test it against Clack?
>>>
>>>> Is the first one at least ok?
>>>>
>>>> "Nazia Zaman" <nazia@stanford.edu> wrote in message 
>>>> news:ds3be5$275$1@news.Stanford.EDU...
>>>>> A trace route to my router 192.168.130.70 looks like this:
>>>>> traceroute to 192.168.130.70 (192.168.130.70): 1-30 hops, 38 byte 
>>>>> packets
>>>>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.557 ms  0.383 ms  0.369 ms
>>>>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.554 ms  0.582 ms  0.570 ms
>>>>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.451 ms (ttl=62!)  
>>>>> 0.420 ms (ttl=62!)  0.420 ms (ttl=62!)
>>>>> 4  192.168.130.70 (192.168.130.70)  2.59 ms !A  2.44 ms !A  2.44 ms !A
>>>>>
>>>>> A trace route to my application server 192.168.130.72 looks like this:
>>>>> elaine35:~/cs244a/HW2/stub5FINALCOPY> traceroute 192.168.130.72
>>>>> traceroute to 192.168.130.72 (192.168.130.72): 1-30 hops, 38 byte 
>>>>> packets
>>>>> 1  sweet-rtr.Stanford.EDU (171.64.15.97)  0.751 ms  0.405 ms  0.367 ms
>>>>> 2  Gates-rtr.Stanford.EDU (171.64.1.44)  0.486 ms  0.511 ms  0.557 ms
>>>>> 3  vns-firewall.Stanford.EDU (172.24.74.11)  0.500 ms (ttl=62!)  
>>>>> 0.415 ms (ttl=62!)  0.577 ms (ttl=62!)
>>>>> 4  192.168.130.72 (192.168.130.72)  3.95 ms !A  2.84 ms !A  1.44 ms !A
>>>>>
>>>>> Are these okay? But if you notice the second trace route it does 
>>>>> not show my router, it should show it right?
>>>>> Thanks,
>>>>> Nazia
>>>>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: routing table mask
Date: Sat, 04 Feb 2006 16:56:05 -0800
Lines: 16
Distribution: su
Message-ID: <ds3ieu$7uk$3@news.Stanford.EDU>
References: <ds3fc5$58p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds3fc5$58p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9957

Naeim Semsarilar wrote:
> I'm not exactly sure how the mask field in the routing table is supposed 
> to work. Say I have the following (hypothetical) entry in my routing table:
> 
> ip  : 192.168.131.0
> gw  : 192.168.131.1
> mask: 255.255.255.0
> 
> Does this mean that packets destined to 192.168.131.0 to 192.168.131.255 
> should be forwarded to 192.168.131.1?

yup, however since we are limited in the IP addresses we can allot, your 
masks should all be 255.255.255.255


> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: icmp generation, ip fragmentation
Date: Sat, 04 Feb 2006 17:22:14 -0800
Lines: 52
Distribution: su
Message-ID: <ds3juq$9c8$1@news.Stanford.EDU>
References: <drump5$4n2$1@news.Stanford.EDU>	<druust$e0n$1@news.Stanford.EDU>	<ds1187$mtf$1@news.Stanford.EDU> <20060203233824.06e66cbc@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060203233824.06e66cbc@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:9958

David Reiss wrote:
> Should we consider the "source-destination pair" to be just the two IP
> addresses (in either order), or one address as the source and another as
> the destination.  It would seem that if the only use of the field is to
> group fragments together, then the latter is the correct interpretation.

I believe you're right, but check the RFC to make sure.

>  In that case, is it okay to just use the same identification as the
> packet that generated our response?  If the computer that generated the
> IP packets followed the protocol and made their identifications unique,
> then our identifications should be unique in the opposite direction,
> right?

Ouch what a hack.  No you shouldn't assume the other host is behaving 
properly.  Make sure yourself.

> 
> On Fri, 03 Feb 2006 17:50:45 -0800
> Matt Falkenhagen <mjf@stanford.edu> wrote:
> 
> 
>> From networksourcery:
>>
>>"The originating protocol module of an internet datagram sets the 
>>identification field to a value that must be unique for that 
>>source-destination pair and protocol for the time the datagram will be 
>>active in the internet system."
>>
>>The flags should also be set according to the protocol.  Don't set "Do 
>>not fragment"; your packets may need to be fragmented as they go to 
>>their destination.
>>
>>Naeim Semsarilar wrote:
>>
>>>Never mind my second question, but my first question still holds.
>>>
>>>
>>>Naeim Semsarilar wrote:
>>>
>>>
>>>>Hey that rhymes ;)
>>>>
>>>>When I generate an ICMP error (host/port unreachable, ttl expired), 
>>>>what should I set the 'identification' and 'flags' fields in the 
>>>>enclosing IP header to?
>>>>
>>>>Also, the data portion of na ICMP packet is supposed to have the first 
>>>>64 bits  of the packet that caused the error. The first 64 bits 
>>>>starting at the ethernet header, the IP header, or the data?
>>>>
>>>>Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify running out of threads
Date: Sat, 04 Feb 2006 17:28:22 -0800
Lines: 12
Distribution: su
Message-ID: <ds3ka9$9i8$1@news.Stanford.EDU>
References: <ds31r3$noq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds31r3$noq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9959

If you're hitting some limit on number of threads you probably have a 
bad design.  You shouldn't need many threads for this...

Steve Goldman wrote:
> Has anyone else seen Purify terminating your program because it exceeds 
> the allowable number of threads?  My program creates threads when 
> needed, but from what I can tell the threads all die when they are done. 
>  The program works fine when not in Purify.  Does anyone know if this is 
> a limitation of Purify or a deficiency of my program?
> 
> Thanks,
> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Pinging eth1
Date: Sat, 4 Feb 2006 19:07:50 -0800
Lines: 11
Distribution: su
Message-ID: <ds3q6b$f5c$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9960

Hi,
Clack allows pinging eth1, but since in our rtable, we don't have an entry 
corresponding to the IP addresses of eht1 and eth2, it finds the default 
gateway for 0.0.0.0 and forwards the packet back to the firewall, and so 
ping says packet bounced back. Is that correct behaviour? Or do we need to 
modify the rtable in some way or what?

Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2 thread models
Date: Sat, 04 Feb 2006 19:23:56 -0800
Lines: 50
Distribution: su
Message-ID: <ds3ra8$g6b$1@news.Stanford.EDU>
References: <drs7d3$8qd$1@news.Stanford.EDU> <drsj5b$n37$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <drsj5b$n37$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9961

Krishna Monian wrote:
> Made a mistake in the pros and cons of each. To clarify them:
> 
> a) The first method requires the 2nd thread to compare each packet with each 
> entry in the ARP cache.
> 
> b) The 2nd model is more efficient in that the comparison between the new 
> ARP reply is just a single walk over the pending list. However, when it is 
> walking the pending list array, if a burst of packets arrive would these 
> packets be considered dropped since the handle_packet function will be busy 
> processing the pending list?

You shouldn't have to worry about packets being dropped because 
sr_handle_packet will be called for each packet that is received.
> 
> Thanks
> Krishna
> 
> "Krishna Monian" <kmonian@stanford.edu> wrote in message 
> news:drs7d3$8qd$1@news.Stanford.EDU...
> 
>>Hi,
>>I have 2 thread models to handle the ARP replies.
>>
>>1) The main thread adds the pending packet to a list, and the 2nd thread 
>>keeps checking each packet in the list against the ARP Cache for updates. 
>>All the main thread does in this case is add entries to the ARP cache when 
>>it receives an ARP reply.
>>
>>2) As soon as the main thread receives an ARP reply it walks through the 
>>pending list and sends out all the packets it can. The secondary threads 
>>in this case just keep sending out ARP requests periodically for the 
>>packets and send out a host unreachable after 5 tries. There is a separate 
>>thread for every different IP in this case.
>>
>>The 2nd model is more efficient in that the comparison between the new ARP 
>>reply is just a single walk over the pending list. The first method 
>>requires the 2nd thread to compare each packet with each entry in the ARP 
>>cache. However, when it is walking the pending list array, if a burst of 
>>packets arrive would these packets be considered dropped since the 
>>handle_packet function will be busy processing the pending list ?
>>
>>Is one model preferred over the other?
>>
>>Thanks
>>Krishna
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Pinging eth1
Date: Sat, 04 Feb 2006 20:00:23 -0800
Lines: 21
Distribution: su
Message-ID: <ds3t8i$hjd$1@news.Stanford.EDU>
References: <ds3q6b$f5c$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <ds3q6b$f5c$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9962

Let me see if I can help,

You should be checking if a packet is destined for one of your own IP 
addresses, and if it is, and it's an ICMP echo request, then reply as 
appropriate.  The rtable isn't really related as you don't forward 
packets to yourself.

-Will

Nazia Zaman wrote:
> Hi,
> Clack allows pinging eth1, but since in our rtable, we don't have an entry 
> corresponding to the IP addresses of eht1 and eth2, it finds the default 
> gateway for 0.0.0.0 and forwards the packet back to the firewall, and so 
> ping says packet bounced back. Is that correct behaviour? Or do we need to 
> modify the rtable in some way or what?
> 
> Thanks,
> Nazia 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify running out of threads
Date: Sat, 04 Feb 2006 21:28:33 -0800
Lines: 21
Distribution: su
Message-ID: <ds42e5$m0f$1@news.Stanford.EDU>
References: <ds31r3$noq$1@news.Stanford.EDU> <ds3ka9$9i8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds3ka9$9i8$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9963

The design is fine; but it may be an implementation detail that is 
causing a problem.  I am not a thread guy.  I call pthread_create and 
pass a function for the thread to execute.  To my understanding, once 
the thread executes the function, it dies.  Is that correct?  If so, 
then my threads should all be dying.  But that doesn't explain why 
Purify complains.

Matt Falkenhagen wrote:
> If you're hitting some limit on number of threads you probably have a 
> bad design.  You shouldn't need many threads for this...
> 
> Steve Goldman wrote:
> 
>> Has anyone else seen Purify terminating your program because it 
>> exceeds the allowable number of threads?  My program creates threads 
>> when needed, but from what I can tell the threads all die when they 
>> are done.  The program works fine when not in Purify.  Does anyone 
>> know if this is a limitation of Purify or a deficiency of my program?
>>
>> Thanks,
>> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: "Junhee Seok" <jseok@stanford.edu>
Newsgroups: su.class.cs244a
Subject: TTL Question?
Date: Sat, 4 Feb 2006 23:08:51 -0800
Lines: 9
Distribution: su
Message-ID: <ds48a8$qu3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:9964

When I get a packet with TTL=1, Do I need to reply ttl-expired ICMP packet?
Does it means the right handling of traceroute through the router?
How about the case that TTL=0? Do I also reply ttl-expired ICMP packet?
When I get a UDP packet with TTL=1, which ICMP do I reply? port unreachable 
or ttl-expired or both?

Thank you. 


.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Traceroute interface
Date: Sat, 04 Feb 2006 23:56:30 -0800
Lines: 5
Distribution: su
Message-ID: <ds4b3e$1q1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9965

So if we try to traceroute interface 1, should we return interface 1 in 
the traceroute result or interface 0? The reason I ask is the traceroute 
request has to go through interface 0 before doing anything else.

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: clock_gettime and struct timespec
Date: Sun, 05 Feb 2006 00:06:27 -0800
Lines: 6
Distribution: su
Message-ID: <ds4bln$2so$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9966

I want to use clock_gettime and struct timespec.  However 
#including<time.h> doesn't brings these definitions in like its supposed 
to.  I can declare struct timespec myself, but the ld won't be able to 
find clock_gettime.  So what am I missing.

--George
.

Path: shelby.stanford.edu!not-for-mail
From: Julie Tung <jct@stanford.edu>
Newsgroups: su.class.cs244a
Subject: pthread_create error
Date: Sun, 05 Feb 2006 04:55:56 -0800
Lines: 12
Distribution: su
Message-ID: <ds4soj$k7u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9967

Hi,

Has anyone else encountered a problem with just getting pthread_create 
to work?  Here's my code snippet for calling it, but I'm getting a 
return value of -1, which isn't even a defined return val for the create 
fxn.  Is there some setup that I'm doing wrong?

pthread_t sendThread;
int err = pthread_create(&sendThread, NULL, SendLoop, NULL);

Thanks,
Julie
.

Path: shelby.stanford.edu!not-for-mail
From: "Dan T. Murphy" <dtmurphy@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: pthread_create error
Date: Sun, 05 Feb 2006 11:11:04 -0500
Lines: 17
Distribution: su
Message-ID: <ds582n$id$1@news.Stanford.EDU>
References: <ds4soj$k7u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds4soj$k7u$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9968

I hit something similar earlier.  There might be a stub for 
pthread_create in the c runtime that just returns -1.  Try adding 
-lpthread to the LIBS in your makefile.

Julie Tung wrote:
> Hi,
> 
> Has anyone else encountered a problem with just getting pthread_create 
> to work?  Here's my code snippet for calling it, but I'm getting a 
> return value of -1, which isn't even a defined return val for the create 
> fxn.  Is there some setup that I'm doing wrong?
> 
> pthread_t sendThread;
> int err = pthread_create(&sendThread, NULL, SendLoop, NULL);
> 
> Thanks,
> Julie
.

Path: shelby.stanford.edu!elaine43.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Aggregating Prefixes
Date: Sun, 5 Feb 2006 10:57:48 -0800
Lines: 30
Distribution: su
Message-ID: <Pine.GSO.4.44.0602051045100.4902-100000@elaine43.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:9969

Hello...

I have a question about aggregrating prefixes/CIDR.

First, for those that are interested, there is a short write up on
wikipedia that I thought was helpful:

http://en.wikipedia.org/wiki/Classless_Inter-doman_Routing

Here is my question:

Say you have a router that is connected to the internet on one interface
and two networks on the other interfaces.  Now, say that the prefix for
one of the networks is a sub-prefix of the network on the other interface.
For arguments sake say that one is a /24 network while the other was a /22
(and their first 22 bits are the same).

It isn't clear to me that the /24 network could be aggregated into the /22
prefix.  For example, if there existed another network with a /23 prefix
that matched the first 23 bits of the /24 then packets destined for the
/24 network would mistakenly get routed to the /23 network instead of the
router with the /22 and the /24.

Did I make that confusing enough?  Am I correct is saying that you cannot
always safely aggregate the longer prefix into matching short one?

Thanks,

Roy

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: ARP source IP mixup
Date: Sun, 5 Feb 2006 19:03:18 +0000 (UTC)
Lines: 37
Distribution: su
Message-ID: <ds5i5m$81u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9970

When I ping through my router to one of the hosts on the other side
I notice that after 5 seconds I start getting ARP requests that
are from that host (has hosts MAC as source) but that have an IP
from another topology (192.168.130.177).  Does anyone else see ARP's
from machines that shouldnt be on their networks or is this just
likely my own bug I havent found yet?

There is a file: ~smohler/public_log.txt with the packet trace.

My Topology:

                                           Application Server
                                       +====================+
                                       |                    |
                                       |   192.168.130.32   |
                                       |                    |
                                       +====================+
                                               /
                                              /
                                             /
                   eth0:                    /
                  192.168.130.30           /    eth1: 192.168.130.31
                          +============(eth1)==+
                          |                    |
 internet =============(eth0)  Your Router     |
                          |                    |
                          +============(eth2)==+
                                           \    eth2: 192.168.130.33
                                            \
                                             \
                                              \
                                       +====================+
                                       |                    |
                                       |  192.168.130.34    |
                                       |                    |
                                       +====================+
                                          Application Server
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP source IP mixup
Date: Sun, 05 Feb 2006 11:47:07 -0800
Lines: 46
Distribution: su
Message-ID: <ds5kns$alk$1@news.Stanford.EDU>
References: <ds5i5m$81u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds5i5m$81u$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9971

Does it happen all the time? I had a similar thing happen once, but it 
was an isolated incident. From page 12 of Martin's presentation:

"You might even get random internet traffic, port scans, hackers,
misconfigured computers etc. This is the real world!"



Stefan Thomas Mohler wrote:
> When I ping through my router to one of the hosts on the other side
> I notice that after 5 seconds I start getting ARP requests that
> are from that host (has hosts MAC as source) but that have an IP
> from another topology (192.168.130.177).  Does anyone else see ARP's
> from machines that shouldnt be on their networks or is this just
> likely my own bug I havent found yet?
> 
> There is a file: ~smohler/public_log.txt with the packet trace.
> 
> My Topology:
> 
>                                            Application Server
>                                        +====================+
>                                        |                    |
>                                        |   192.168.130.32   |
>                                        |                    |
>                                        +====================+
>                                                /
>                                               /
>                                              /
>                    eth0:                    /
>                   192.168.130.30           /    eth1: 192.168.130.31
>                           +============(eth1)==+
>                           |                    |
>  internet =============(eth0)  Your Router     |
>                           |                    |
>                           +============(eth2)==+
>                                            \    eth2: 192.168.130.33
>                                             \
>                                              \
>                                               \
>                                        +====================+
>                                        |                    |
>                                        |  192.168.130.34    |
>                                        |                    |
>                                        +====================+
>                                           Application Server
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP source IP mixup
Date: Sun, 05 Feb 2006 12:14:14 -0800
Lines: 54
Distribution: su
Message-ID: <ds5mah$br3$1@news.Stanford.EDU>
References: <ds5i5m$81u$1@news.Stanford.EDU> <ds5kns$alk$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <ds5kns$alk$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9972

I definitely noticed I was getting "random" ARP requests a while ago. 
It's either stopped or I stopped noticing. I don't think it's a problem 
with your router.

-Will


Naeim Semsarilar wrote:
> Does it happen all the time? I had a similar thing happen once, but it 
> was an isolated incident. From page 12 of Martin's presentation:
> 
> "You might even get random internet traffic, port scans, hackers,
> misconfigured computers etc. This is the real world!"
> 
> 
> 
> Stefan Thomas Mohler wrote:
>> When I ping through my router to one of the hosts on the other side
>> I notice that after 5 seconds I start getting ARP requests that
>> are from that host (has hosts MAC as source) but that have an IP
>> from another topology (192.168.130.177).  Does anyone else see ARP's
>> from machines that shouldnt be on their networks or is this just
>> likely my own bug I havent found yet?
>>
>> There is a file: ~smohler/public_log.txt with the packet trace.
>>
>> My Topology:
>>
>>                                            Application Server
>>                                        +====================+
>>                                        |                    |
>>                                        |   192.168.130.32   |
>>                                        |                    |
>>                                        +====================+
>>                                                /
>>                                               /
>>                                              /
>>                    eth0:                    /
>>                   192.168.130.30           /    eth1: 192.168.130.31
>>                           +============(eth1)==+
>>                           |                    |
>>  internet =============(eth0)  Your Router     |
>>                           |                    |
>>                           +============(eth2)==+
>>                                            \    eth2: 192.168.130.33
>>                                             \
>>                                              \
>>                                               \
>>                                        +====================+
>>                                        |                    |
>>                                        |  192.168.130.34    |
>>                                        |                    |
>>                                        +====================+
>>                                           Application Server
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Testing with the application servers
Date: Sun, 05 Feb 2006 12:25:07 -0800
Lines: 11
Distribution: su
Message-ID: <ds5mv7$cov$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9973

Sorry if this is posted somewhere already...

How can we test with the application servers other than pings and 
traceroutes?  The assignment page says we should be able to do 
"traceroutes, pings and downloading some files from a web server and an 
ftp server."  How do we set up the web and ftp servers?  I tried 
pointing my browser at the proper IPs, but my router didn't show any 
packets coming through.

Thanks,
Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 5 Feb 2006 20:34:10 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: <ds5ng2$81u$2@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9974

When I tried to point a browser at my application servers each one
served up its own page with links.  It probably wont matter if
you arent off campus, but make sure have the browser running on the
same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 05 Feb 2006 12:53:19 -0800
Lines: 10
Distribution: su
Message-ID: <ds5ok3$dvq$1@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU> <ds5ng2$81u$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds5ng2$81u$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9975

Good point.  My home computer has a 128 address, so I can't do anything 
from here.  I guess I'll have to hoof it over to Sweet Hall.

Thanks.

Stefan Thomas Mohler wrote:
> When I tried to point a browser at my application servers each one
> served up its own page with links.  It probably wont matter if
> you arent off campus, but make sure have the browser running on the
> same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 05 Feb 2006 12:56:16 -0800
Lines: 14
Distribution: su
Message-ID: <ds5opk$e4f$1@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU> <ds5ng2$81u$2@news.Stanford.EDU> <ds5ok3$dvq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds5ok3$dvq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9976

I got it to work by running lynx from the telnet command line.  Pretty cool.

Steve Goldman wrote:
> Good point.  My home computer has a 128 address, so I can't do anything 
> from here.  I guess I'll have to hoof it over to Sweet Hall.
> 
> Thanks.
> 
> Stefan Thomas Mohler wrote:
> 
>> When I tried to point a browser at my application servers each one
>> served up its own page with links.  It probably wont matter if
>> you arent off campus, but make sure have the browser running on the
>> same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Forwarding packets back out the same interface.
Date: Sun, 05 Feb 2006 13:20:55 -0800
Lines: 8
Distribution: su
Message-ID: <ds5q7o$fd5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9977

Suppose eth0 receives a packet whose routing table tells it to
do default routing.  What should be done?

1. send it back to eth0 and let the TTL handles it.
2. Drop it silently
3. Send Host unreachable?

--George
.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: queue outgoing ICMP packets
Date: Sun, 5 Feb 2006 22:12:05 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: <ds5t7l$hht$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9978

can you please confirm correct behavior in this situation: 

in trying to forward a some packets,  a host never 
replies to our ARP request, so we have to send out
ICMP packets to the senders. 

as we are trying to route our ICMP packets, say we don't
have an ARP entry for the next, so .. we have to send an ARP
request and put the ICMP packet in our packet queue.

is this a correct interpretation? 

does this apply to all the packets we send out, eg. we must
route ICMP echo replies that we create, and queue them if
we don't have an ARP entry.

thanks, 
ryan. 



.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: dropping ICMP packets
Date: Sun, 5 Feb 2006 22:28:10 +0000 (UTC)
Lines: 21
Distribution: su
Message-ID: <ds5u5q$idj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9979

the RFC for ICMP says: 

To avoid the infinite regress of messages about messages
   etc., no ICMP messages are sent about ICMP messages.

however, if we have an ICMP echo request in
our queue (bound for one of our app servers), and then we
have to drop it (the app server doesn't respond to arps),
it seems like we should send ICMP errors for that echo request 
(eg. host unreachable)

for the assignment, should i send that error? 

is it reasonable to treat some ICMP packets differently than 
others when we are dropping them? 

for example, sending an ICMP error for a dropped echo request, 
but not for a dropped ICMP error? 

thanks, 
ryan. 
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: ftp to app servers with PORT
Date: Sun, 5 Feb 2006 22:42:41 +0000 (UTC)
Lines: 5
Distribution: su
Message-ID: <ds5v11$gs2$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:9980

When ftp'ing to both my app servers I hang whenever trying to download
data with PORT.  There is no problem with PASV downloads and the failure
is consistet with ftp from the command line or ftpcopy from assignement 1.
Can anyone else ftp to their app servers and succesfully do an "ls" or
something in PORT mode?
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Corrupt Stack
Date: Sun, 05 Feb 2006 14:46:52 -0800
Lines: 16
Distribution: su
Message-ID: <ds5v8m$jfg$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:9981

I'm getting segmentation fault when calling pthread_mutex_unlock().

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 4]
0xff0ab870 in pthread_mutex_unlock () from /usr/lib/libthread.so.1
(gdb) bt
#0  0xff0ab870 in pthread_mutex_unlock () from /usr/lib/libthread.so.1
#1  0x000133ac in sr_send_requests (args=0xffbef370) at sr_packet.c:307
#2  0xff0bb124 in _thread_start () from /usr/lib/libthread.so.1
#3  0xff0bb124 in _thread_start () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)

What does corrupt stack mean and how can I fix it?

Thanks,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp to app servers with PORT
Date: Sun, 05 Feb 2006 14:51:05 -0800
Lines: 23
Distribution: su
Message-ID: <ds5vgt$jm1$1@news.Stanford.EDU>
References: <ds5v11$gs2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds5v11$gs2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9982

Mine seems to work.

saga13:~> ftp 192.168.130.92
Connected to 192.168.130.92.
220 (vsFTPd 1.2.1)
Name (192.168.130.92:goldmasd): anonymous
331 Please specify the password.
Password:
230 Login successful.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
pub
226 Directory send OK.
5 bytes received in 0.0095 seconds (0.51 Kbytes/s)


Stefan Thomas Mohler wrote:
> When ftp'ing to both my app servers I hang whenever trying to download
> data with PORT.  There is no problem with PASV downloads and the failure
> is consistet with ftp from the command line or ftpcopy from assignement 1.
> Can anyone else ftp to their app servers and succesfully do an "ls" or
> something in PORT mode?
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Corrupt Stack
Date: Sun, 05 Feb 2006 15:45:01 -0800
Lines: 22
Distribution: su
Message-ID: <ds62ln$lut$1@news.Stanford.EDU>
References: <ds5v8m$jfg$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <ds5v8m$jfg$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9983

Never mind, I figured out. I was passing an address of local variable 
to threads.

--Michi

Michi Mutsuzaki wrote:
> I'm getting segmentation fault when calling pthread_mutex_unlock().
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to LWP 4]
> 0xff0ab870 in pthread_mutex_unlock () from /usr/lib/libthread.so.1
> (gdb) bt
> #0  0xff0ab870 in pthread_mutex_unlock () from /usr/lib/libthread.so.1
> #1  0x000133ac in sr_send_requests (args=0xffbef370) at sr_packet.c:307
> #2  0xff0bb124 in _thread_start () from /usr/lib/libthread.so.1
> #3  0xff0bb124 in _thread_start () from /usr/lib/libthread.so.1
> Previous frame identical to this frame (corrupt stack?)
> 
> What does corrupt stack mean and how can I fix it?
> 
> Thanks,
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Rtable file
Date: Sun, 05 Feb 2006 16:09:31 -0800
Lines: 69
Distribution: su
Message-ID: <ds642h$n94$1@news.Stanford.EDU>
References: <drhtlp$l6n$1@news.Stanford.EDU> <dri4nn$r00$1@news.Stanford.EDU> <Pine.GSO.4.44.0602021232370.10760-100000@elaine4.Stanford.EDU> <ds0vpn$ldo$1@news.Stanford.EDU> <ds1lvo$ape$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds1lvo$ape$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9984

The subnet mask of an rtable rule tells you which bits of a packet's 
destination IP to look at when determining whether this rule applies to 
the packet.

Naeim Semsarilar wrote:
> Could you please explain this a bit more? What exactly is the 
> significance of the subnet field in rtable?
> 
> Thanks.
> 
> 
> Matt Falkenhagen wrote:
> 
>> Dan C Silver wrote:
>>
>>> Just to clarify a bit more -- so we're basically treating each app 
>>> server
>>> as a router, and not as a host on the same subnet as our router's
>>> interface?  In my particular topology it doesn't seem to be possible to
>>> mask the two subnets properly, so I'm guessing this is the case.
>>
>>
>> Yeah that's a good way to think about it.
>>
>>>
>>> And we don't have subnet masks for each interface, so we're basically
>>> treating each interface as being it's own subnet with a single host?
>>> Should we assume the subnet mask for each interface is 255.255.255.255?
>>> If so, should we still AND the dest ip against our subnet mask to
>>> determine if it's on the same subnet?
>>
>>
>> Definately do the AND, your router should work with any valid rtable 
>> file not ones for these simple topologies.
>>
>>>
>>> Thx,
>>>
>>> - Dan
>>>
>>> On Sun, 29 Jan 2006, Matt Falkenhagen wrote:
>>>
>>>
>>>> From the way you phrased the question I'm not sure how to answer, 
>>>> but....
>>>>
>>>> The rtable is just a list of rules for forwarding packets.  Your router
>>>> reads in this list of rules.
>>>>
>>>> Your toplogy email tells you how your router should forward packets to
>>>> exactly two specific IP addresses (your app servers) and to the rest of
>>>> the Internet.  Given that information, think about what rules you want
>>>> in your rtable.
>>>>
>>>> Ask again if it's not clear.
>>>>
>>>> Sutthipong Thavisomboon wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I read in the newsgroup that we should modify the rtable static file
>>>>> according to the assigned topology. I see the IP address in the email,
>>>>> however, I'm not sure what to put for mask?
>>>>>
>>>>> Sutthipong
>>>>>
>>>>>
>>>>
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TTL Question?
Date: Sun, 05 Feb 2006 16:21:01 -0800
Lines: 26
Distribution: su
Message-ID: <ds64o2$okb$1@news.Stanford.EDU>
References: <ds48a8$qu3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds48a8$qu3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9985

Junhee Seok wrote:
> When I get a packet with TTL=1, Do I need to reply ttl-expired ICMP packet?

Yes, if the packet wasn't destined for you.

> Does it means the right handling of traceroute through the router?

I'm not sure what you're asking.  If you reply with ttl-expired ICMP, 
that's the right handling.

> How about the case that TTL=0? Do I also reply ttl-expired ICMP packet?

Yes.

> When I get a UDP packet with TTL=1, which ICMP do I reply? port unreachable 
> or ttl-expired or both?

Depends if the packet was destined for your router or not.

Please see RFC for more information, section 4.2.2.9 is a good starting 
point.

> 
> Thank you. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute interface
Date: Sun, 05 Feb 2006 16:22:14 -0800
Lines: 8
Distribution: su
Message-ID: <ds64qb$okb$2@news.Stanford.EDU>
References: <ds4b3e$1q1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds4b3e$1q1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9986

Please see thread "traceroute question" from 2/1/2006 11:47 PM.

alex qi wrote:
> So if we try to traceroute interface 1, should we return interface 1 in 
> the traceroute result or interface 0? The reason I ask is the traceroute 
> request has to go through interface 0 before doing anything else.
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: clock_gettime and struct timespec
Date: Sun, 05 Feb 2006 16:23:52 -0800
Lines: 9
Distribution: su
Message-ID: <ds64td$okb$3@news.Stanford.EDU>
References: <ds4bln$2so$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds4bln$2so$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9987

Adding the prototypes doesn't solve it?

George Su wrote:
> I want to use clock_gettime and struct timespec.  However 
> #including<time.h> doesn't brings these definitions in like its supposed 
> to.  I can declare struct timespec myself, but the ld won't be able to 
> find clock_gettime.  So what am I missing.
> 
> --George
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Forwarding packets back out the same interface.
Date: Sun, 05 Feb 2006 16:27:00 -0800
Lines: 11
Distribution: su
Message-ID: <ds6539$p4e$1@news.Stanford.EDU>
References: <ds5q7o$fd5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds5q7o$fd5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9988

1.

George Su wrote:
> Suppose eth0 receives a packet whose routing table tells it to
> do default routing.  What should be done?
> 
> 1. send it back to eth0 and let the TTL handles it.
> 2. Drop it silently
> 3. Send Host unreachable?
> 
> --George
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp to app servers with PORT
Date: Sun, 5 Feb 2006 16:32:12 -0800
Lines: 19
Distribution: su
Message-ID: <ds65ei$pif$1@news.Stanford.EDU>
References: <ds5v11$gs2$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:9989

Stefan,

I seem to be having the exact same problem. Strange thing is, when I open up 
a browser (firerfox, mozilla) and try to connect to the ftp servers from 
within the browser, i seem to be able to connect fine. I haven't figured out 
why... Let me know if you figure it out...

Ram


"Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
news:ds5v11$gs2$1@news.Stanford.EDU...
> When ftp'ing to both my app servers I hang whenever trying to download
> data with PORT.  There is no problem with PASV downloads and the failure
> is consistet with ftp from the command line or ftpcopy from assignement 1.
> Can anyone else ftp to their app servers and succesfully do an "ls" or
> something in PORT mode? 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: queue outgoing ICMP packets
Date: Sun, 05 Feb 2006 16:36:28 -0800
Lines: 28
Distribution: su
Message-ID: <ds65l1$plq$1@news.Stanford.EDU>
References: <ds5t7l$hht$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds5t7l$hht$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9990

Ryan Matthew Smith wrote:
> can you please confirm correct behavior in this situation: 
> 
> in trying to forward a some packets,  a host never 
> replies to our ARP request, so we have to send out
> ICMP packets to the senders. 
> 
> as we are trying to route our ICMP packets, say we don't
> have an ARP entry for the next, so .. we have to send an ARP
> request and put the ICMP packet in our packet queue.
> 
> is this a correct interpretation? 

yeah

> 
> does this apply to all the packets we send out, eg. we must
> route ICMP echo replies that we create, and queue them if
> we don't have an ARP entry.

yeah

> 
> thanks, 
> ryan. 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: dropping ICMP packets
Date: Sun, 05 Feb 2006 16:42:23 -0800
Lines: 26
Distribution: su
Message-ID: <ds6604$pve$1@news.Stanford.EDU>
References: <ds5u5q$idj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds5u5q$idj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9991

I think you are required to send that error.  The quote is a little 
misleading, the RFC for IP Routers (1812) tells you when to send ICMPs 
and when not to.

Ryan Matthew Smith wrote:
> the RFC for ICMP says: 
> 
> To avoid the infinite regress of messages about messages
>    etc., no ICMP messages are sent about ICMP messages.
> 
> however, if we have an ICMP echo request in
> our queue (bound for one of our app servers), and then we
> have to drop it (the app server doesn't respond to arps),
> it seems like we should send ICMP errors for that echo request 
> (eg. host unreachable)
> 
> for the assignment, should i send that error? 
> 
> is it reasonable to treat some ICMP packets differently than 
> others when we are dropping them? 
> 
> for example, sending an ICMP error for a dropped echo request, 
> but not for a dropped ICMP error? 
> 
> thanks, 
> ryan. 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 05 Feb 2006 16:56:17 -0800
Lines: 20
Distribution: su
Message-ID: <ds66q6$qmi$1@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU> <ds5ng2$81u$2@news.Stanford.EDU> <ds5ok3$dvq$1@news.Stanford.EDU> <ds5opk$e4f$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds5opk$e4f$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9992

BTW you can download an X server and then ssh to one of the Sweet Hall 
machines and run a real browser, it will probably be cooler.

Steve Goldman wrote:
> I got it to work by running lynx from the telnet command line.  Pretty 
> cool.
> 
> Steve Goldman wrote:
> 
>> Good point.  My home computer has a 128 address, so I can't do 
>> anything from here.  I guess I'll have to hoof it over to Sweet Hall.
>>
>> Thanks.
>>
>> Stefan Thomas Mohler wrote:
>>
>>> When I tried to point a browser at my application servers each one
>>> served up its own page with links.  It probably wont matter if
>>> you arent off campus, but make sure have the browser running on the
>>> same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: clock_gettime and struct timespec
Date: Mon, 6 Feb 2006 01:26:55 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: <ds68ku$s8c$1@news.Stanford.EDU>
References: <ds4bln$2so$1@news.Stanford.EDU> <ds64td$okb$3@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:9993

In your makefile in the solaris section, add:
   -lposix4

For me this made the linker happy
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 05 Feb 2006 19:12:37 -0800
Lines: 28
Distribution: su
Message-ID: <ds6er9$4es$1@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU> <ds5ng2$81u$2@news.Stanford.EDU> <ds5ok3$dvq$1@news.Stanford.EDU> <ds5opk$e4f$1@news.Stanford.EDU> <ds66q6$qmi$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds66q6$qmi$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9994

Thanks for the tip.  Everyone talks about setting up X windows like it 
is so easy, but I have found it really difficult.  In fact, I challenge 
anyone who thinks this is easy to come over to my house and show me.

Steve

Matt Falkenhagen wrote:
> BTW you can download an X server and then ssh to one of the Sweet Hall 
> machines and run a real browser, it will probably be cooler.
> 
> Steve Goldman wrote:
> 
>> I got it to work by running lynx from the telnet command line.  Pretty 
>> cool.
>>
>> Steve Goldman wrote:
>>
>>> Good point.  My home computer has a 128 address, so I can't do 
>>> anything from here.  I guess I'll have to hoof it over to Sweet Hall.
>>>
>>> Thanks.
>>>
>>> Stefan Thomas Mohler wrote:
>>>
>>>> When I tried to point a browser at my application servers each one
>>>> served up its own page with links.  It probably wont matter if
>>>> you arent off campus, but make sure have the browser running on the
>>>> same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Aggregating Prefixes
Date: Sun, 05 Feb 2006 19:18:22 -0800
Lines: 35
Distribution: su
Message-ID: <ds6f5f$4qv$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602051045100.4902-100000@elaine43.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <Pine.GSO.4.44.0602051045100.4902-100000@elaine43.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9995

It would be a mistake to aggregate in your example below.  Aggregation,
for practical purposes, suggests that you own all IPs within the 
advertised prefix.


> Hello...
> 
> I have a question about aggregrating prefixes/CIDR.
> 
> First, for those that are interested, there is a short write up on
> wikipedia that I thought was helpful:
> 
> http://en.wikipedia.org/wiki/Classless_Inter-doman_Routing
> 
> Here is my question:
> 
> Say you have a router that is connected to the internet on one interface
> and two networks on the other interfaces.  Now, say that the prefix for
> one of the networks is a sub-prefix of the network on the other interface.
> For arguments sake say that one is a /24 network while the other was a /22
> (and their first 22 bits are the same).
> 
> It isn't clear to me that the /24 network could be aggregated into the /22
> prefix.  For example, if there existed another network with a /23 prefix
> that matched the first 23 bits of the /24 then packets destined for the
> /24 network would mistakenly get routed to the /23 network instead of the
> router with the /22 and the /24.
> 
> Did I make that confusing enough?  Am I correct is saying that you cannot
> always safely aggregate the longer prefix into matching short one?
> 
> Thanks,
> 
> Roy
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 05 Feb 2006 19:20:24 -0800
Lines: 31
Distribution: su
Message-ID: <ds6f99$4qv$2@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU> <ds5ng2$81u$2@news.Stanford.EDU> <ds5ok3$dvq$1@news.Stanford.EDU> <ds5opk$e4f$1@news.Stanford.EDU> <ds66q6$qmi$1@news.Stanford.EDU> <ds6er9$4es$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds6er9$4es$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9996

what OS are you using?  cygwin's X-server has come a long ways if you
are a windows fella.

> Thanks for the tip.  Everyone talks about setting up X windows like it 
> is so easy, but I have found it really difficult.  In fact, I challenge 
> anyone who thinks this is easy to come over to my house and show me.
> 
> Steve
> 
> Matt Falkenhagen wrote:
>> BTW you can download an X server and then ssh to one of the Sweet Hall 
>> machines and run a real browser, it will probably be cooler.
>>
>> Steve Goldman wrote:
>>
>>> I got it to work by running lynx from the telnet command line.  
>>> Pretty cool.
>>>
>>> Steve Goldman wrote:
>>>
>>>> Good point.  My home computer has a 128 address, so I can't do 
>>>> anything from here.  I guess I'll have to hoof it over to Sweet Hall.
>>>>
>>>> Thanks.
>>>>
>>>> Stefan Thomas Mohler wrote:
>>>>
>>>>> When I tried to point a browser at my application servers each one
>>>>> served up its own page with links.  It probably wont matter if
>>>>> you arent off campus, but make sure have the browser running on the
>>>>> same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Traceroute missing a response from the application server
Date: Sun, 05 Feb 2006 19:22:57 -0800
Lines: 21
Distribution: su
Message-ID: <ds6fem$5c1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:9997

So traceroute sends three packets to each hop along the way to the 
destination.  Has anyone seen their application server only sending two 
of them back sometimes?  I'm not sure where this packet is being 
dropped.  Check out this output:

saga14:~> traceroute 192.168.130.92
traceroute to 192.168.130.92 (192.168.130.92): 1-30 hops, 38 byte packets
  1  sweet-rtr.Stanford.EDU (171.64.15.129)  0.706 ms  0.536 ms  1.45 ms
  2  Gates-rtr.Stanford.EDU (171.64.1.178)  0.652 ms  1.19 ms  0.655 ms
  3  vns-firewall.Stanford.EDU (172.24.74.11)  0.571 ms (ttl=62!)  0.556 
ms (ttl=62!)  0.978 ms (ttl=62!)
  4  192.168.130.90 (192.168.130.90)  84.7 ms (ttl=61!)  2.75 ms 
(ttl=61!)  4.32 ms (ttl=61!)
  5  192.168.130.92 (192.168.130.92)  43.1 ms (ttl=60!)  *  5.40 ms 
(ttl=60!)


TA's: do you consider this not handling traceroute correctly?

Thanks,
Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 05 Feb 2006 19:26:01 -0800
Lines: 41
Distribution: su
Message-ID: <ds6fkd$5c1$2@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU> <ds5ng2$81u$2@news.Stanford.EDU> <ds5ok3$dvq$1@news.Stanford.EDU> <ds5opk$e4f$1@news.Stanford.EDU> <ds66q6$qmi$1@news.Stanford.EDU> <ds6er9$4es$1@news.Stanford.EDU> <ds6f99$4qv$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds6f99$4qv$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9998

Yes, I'm using Windows.  I tried setting it up earlier this quarter.  I 
even found a website with semi-good documentation.  Problem is it just 
doesn't work.  Whenever I try to open Matlab or, in this case, firefox, 
I get cryptic errors in my X-terminal (if that's the proper lingo). 
Sometimes the Matlab splash screen comes up and just hangs.  Unix people 
need to make this sort of thing easier on the rest of us.

Martin Casado wrote:
> what OS are you using?  cygwin's X-server has come a long ways if you
> are a windows fella.
> 
>> Thanks for the tip.  Everyone talks about setting up X windows like it 
>> is so easy, but I have found it really difficult.  In fact, I 
>> challenge anyone who thinks this is easy to come over to my house and 
>> show me.
>>
>> Steve
>>
>> Matt Falkenhagen wrote:
>>
>>> BTW you can download an X server and then ssh to one of the Sweet 
>>> Hall machines and run a real browser, it will probably be cooler.
>>>
>>> Steve Goldman wrote:
>>>
>>>> I got it to work by running lynx from the telnet command line.  
>>>> Pretty cool.
>>>>
>>>> Steve Goldman wrote:
>>>>
>>>>> Good point.  My home computer has a 128 address, so I can't do 
>>>>> anything from here.  I guess I'll have to hoof it over to Sweet Hall.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Stefan Thomas Mohler wrote:
>>>>>
>>>>>> When I tried to point a browser at my application servers each one
>>>>>> served up its own page with links.  It probably wont matter if
>>>>>> you arent off campus, but make sure have the browser running on the
>>>>>> same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing with the application servers
Date: Sun, 05 Feb 2006 19:31:18 -0800
Lines: 52
Distribution: su
Message-ID: <ds6ftn$5g1$1@news.Stanford.EDU>
References: <ds5mv7$cov$1@news.Stanford.EDU> <ds5ng2$81u$2@news.Stanford.EDU> <ds5ok3$dvq$1@news.Stanford.EDU> <ds5opk$e4f$1@news.Stanford.EDU> <ds66q6$qmi$1@news.Stanford.EDU> <ds6er9$4es$1@news.Stanford.EDU> <ds6f99$4qv$2@news.Stanford.EDU> <ds6fkd$5c1$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds6fkd$5c1$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:9999

this works well for me.
- from cygwin
- start x (using the "startx" command)
- ssh -X into a stanford machine
- start popping up windows

taa daa.

ymmv


> Yes, I'm using Windows.  I tried setting it up earlier this quarter.  I 
> even found a website with semi-good documentation.  Problem is it just 
> doesn't work.  Whenever I try to open Matlab or, in this case, firefox, 
> I get cryptic errors in my X-terminal (if that's the proper lingo). 
> Sometimes the Matlab splash screen comes up and just hangs.  Unix people 
> need to make this sort of thing easier on the rest of us.
> 
> Martin Casado wrote:
>> what OS are you using?  cygwin's X-server has come a long ways if you
>> are a windows fella.
>>
>>> Thanks for the tip.  Everyone talks about setting up X windows like 
>>> it is so easy, but I have found it really difficult.  In fact, I 
>>> challenge anyone who thinks this is easy to come over to my house and 
>>> show me.
>>>
>>> Steve
>>>
>>> Matt Falkenhagen wrote:
>>>
>>>> BTW you can download an X server and then ssh to one of the Sweet 
>>>> Hall machines and run a real browser, it will probably be cooler.
>>>>
>>>> Steve Goldman wrote:
>>>>
>>>>> I got it to work by running lynx from the telnet command line.  
>>>>> Pretty cool.
>>>>>
>>>>> Steve Goldman wrote:
>>>>>
>>>>>> Good point.  My home computer has a 128 address, so I can't do 
>>>>>> anything from here.  I guess I'll have to hoof it over to Sweet Hall.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Stefan Thomas Mohler wrote:
>>>>>>
>>>>>>> When I tried to point a browser at my application servers each one
>>>>>>> served up its own page with links.  It probably wont matter if
>>>>>>> you arent off campus, but make sure have the browser running on the
>>>>>>> same machine you are able to ping from.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Trace route to eth1
Date: Sun, 5 Feb 2006 22:56:52 -0800
Lines: 7
Distribution: su
Message-ID: <ds6rvo$h21$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10004

So I tested this on Clack, if I run a trace-route to eth1, it doesn't give a 
proper route. Is this the right behaviour?

Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: can't connect to VNS
Date: Mon, 06 Feb 2006 00:06:57 -0800
Lines: 6
Distribution: su
Message-ID: <ds7034$n2v$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10005

I keep getting this when i try to run my router:

Requesting topology 21
ERROR: Failed to retrieve current time

Could someone please help?
.

Path: shelby.stanford.edu!not-for-mail
From: "Jeremy Robin" <jirobin@stanford.edu>
Newsgroups: su.class.cs244a
Subject: app server 2 crashing firefox
Date: Mon, 6 Feb 2006 00:57:14 -0800
Lines: 12
Distribution: su
Message-ID: <ds7319$q1p$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10008

has anyone else experienced this?

Everything's fine from app server 1 but on the second it crashes.  tcpdump 
tells me that there are 2 packets forwarded from the server with the error 
"truncated-ip 2 bytes missing".  I think this means the actual length 
doesn't agree with the header.   but every other test I've done has worked 
fine so I was wondering if anyone else has come across something similar.


Jeremy 


.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Egress queues
Date: Mon, 06 Feb 2006 01:02:50 -0800
Lines: 12
Distribution: su
Message-ID: <ds73br$qbn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10009

Hi,

Is it necessary (or would it be a good idea) to queue all the outgoing 
packets and have a separate thread send them using sr_send_packet 
instead of calling sr_send_packet directly every time we want to send a 
packet?

I guess the only reason we want to have a separate thread do it is that 
sr_send_packet might choke and that would somehow stall that rest of the 
  program?

Hau Jia.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ICMP, conflicting specs
Date: Mon, 06 Feb 2006 01:13:18 -0800
Lines: 24
Distribution: su
Message-ID: <ds73vi$rbv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10010

RFC 1812 and networksorcery.com say two different things about what an 
ICMP error should look like.

networksorcery.com says:

"The IP header plus the first 8 bytes of the original datagram's data is 
returned to the sender. This data is used by the host to match the 
message to the appropriate process. If a higher level protocol uses port 
numbers, they are assumed to be in the first 64 data bits of the 
original datagram's data."

RFC 1812 says:

"Historically, every ICMP error message has included the Internet
header and at least the first 8 data bytes of the datagram that
triggered the error.  This is no longer adequate, due to the use of
IP-in-IP tunneling and other technologies.  Therefore, the ICMP
datagram SHOULD contain as much of the original datagram as possible
without the length of the ICMP datagram exceeding 576 bytes."


For this assignment, is it sufficient to go with 8 bytes?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: can't connect to VNS
Date: Mon, 06 Feb 2006 01:25:26 -0800
Lines: 11
Distribution: su
Message-ID: <ds74m9$s1j$1@news.Stanford.EDU>
References: <ds7034$n2v$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds7034$n2v$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10011

I could connect again for a while, and now it's back to the same error. 
Is it me, or is the server shaky?


Naeim Semsarilar wrote:
> I keep getting this when i try to run my router:
> 
> Requesting topology 21
> ERROR: Failed to retrieve current time
> 
> Could someone please help?
.

Path: shelby.stanford.edu!not-for-mail
From: "Andrew Sakai" <asakai@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: app server 2 crashing firefox
Date: Mon, 6 Feb 2006 01:53:09 -0800
Lines: 23
Distribution: su
Message-ID: <ds76a7$b9$1@news.Stanford.EDU>
References: <ds7319$q1p$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10012

I'm running into the same problem.  It also happens when I run Clack for my 
topology, so something strange is definitely going on (assuming Clack 
functions correctly).  Maybe tomorrow I'll go in to Sweet and try to 
duplicate the problem without remote login.

    Cheers,
    Andrew

"Jeremy Robin" <jirobin@stanford.edu> wrote in message 
news:ds7319$q1p$1@news.Stanford.EDU...
> has anyone else experienced this?
>
> Everything's fine from app server 1 but on the second it crashes.  tcpdump 
> tells me that there are 2 packets forwarded from the server with the error 
> "truncated-ip 2 bytes missing".  I think this means the actual length 
> doesn't agree with the header.   but every other test I've done has worked 
> fine so I was wondering if anyone else has come across something similar.
>
>
> Jeremy
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Hector Chan" <chanhp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Ethereal Malformed Frame
Date: Mon, 6 Feb 2006 03:27:45 -0800
Lines: 29
Distribution: su
Message-ID: <ds7brn$4oc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10014

Hi,

I was testing ICMP TTL Time Exceeded messages with Mozilla.  While looking 
under Ethereal the ICMP Time Exceeded
messages seems to be working correctly, I saw some [Malformed Frame] 
originated from my router's outgoing
interface and destined to "vns-firewall.Standford.EDU".  Should I care about 
those Malformed Frames?  The
following is what appeared in Ethereal when I select the Malformed Frame 
entry:

Frame 7 (70 on wire, 70 captured)
     Arrival Time: Feb 6, 2006 02:57:20.999080000
     Time delta from previous packet: 0.001129000 seconds
     Time relative to first packet: 0.007278000 seconds
     Frame Number: 7
     Packet Length: 70 bytes
     Capture Length: 70 bytes
IEEE 802.3 Ethernet
     Destination: 00:e0:81:04:26:d9 (vns-firewall.Stanford.EDU)
     Source: 70:00:00:32:00:01 (70:00:00:32:00:01)
     Length: 0
     Trailer: 4500003800010000FF01BDB6C0A8829B
  [Malformed Frame: LLC]

Thanks,
Hector 


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Unable to download?
Date: Mon, 6 Feb 2006 04:00:48 -0800
Lines: 9
Distribution: su
Message-ID: <ds7dpf$68d$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10015

Just curious if anyone's having the same problems I am.  Everything seems to
get routed correctly, and with ftp I can ls and cd with no problems, but
whenever I try to get a file, it just hangs.  Same thing with the webserver,
the pictures never load while everything else works fine.

Thanks for any advice,
Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Unable to download?
Date: Mon, 6 Feb 2006 04:59:28 -0800
Lines: 19
Distribution: su
Message-ID: <ds7h7e$bl7$1@news.Stanford.EDU>
References: <ds7dpf$68d$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10016

Never mind...I'm an idiot and I was sending incorrect packets.

Waynn

"Waynn Lue" <wlue@stanford.edu> wrote in message
news:ds7dpf$68d$1@news.Stanford.EDU...
> Just curious if anyone's having the same problems I am.  Everything seems
to
> get routed correctly, and with ftp I can ls and cd with no problems, but
> whenever I try to get a file, it just hangs.  Same thing with the
webserver,
> the pictures never load while everything else works fine.
>
> Thanks for any advice,
> Waynn
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ethereal question
Date: Mon, 6 Feb 2006 09:02:01 -0800
Lines: 12
Distribution: su
Message-ID: <ds7ved$nkg$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10017

Ethereal is working wonderfully for me in general.  It's a godsend. But, 
here is a seemingly simple usage question...  how do I copy or export 
contents (such as a collection of packets or the contents of packets) from 
an ethereal window to place them in email, newsgroup, etc?  I am not a unix 
expert...  am I missing some basic copy/paste semantics?  (I am running on 
the Elaines remotely from home on Windows via XManager2.)

thx, Bruce




.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ethereal question
Date: Mon, 6 Feb 2006 09:36:58 -0800
Lines: 20
Distribution: su
Message-ID: <ds81ft$pf5$1@news.Stanford.EDU>
References: <ds7ved$nkg$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10018

Or,  ...rather, are people using tcpdump to generate a textual view for 
newsgroup postings?
-- Bruce

"Bruce Schechter" <bruceds@stanford.edu> wrote in message 
news:ds7ved$nkg$1@news.Stanford.EDU...
> Ethereal is working wonderfully for me in general.  It's a godsend. But, 
> here is a seemingly simple usage question...  how do I copy or export 
> contents (such as a collection of packets or the contents of packets) from 
> an ethereal window to place them in email, newsgroup, etc?  I am not a 
> unix expert...  am I missing some basic copy/paste semantics?  (I am 
> running on the Elaines remotely from home on Windows via XManager2.)
>
> thx, Bruce
>
>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ethereal question
Date: Mon, 06 Feb 2006 09:37:48 -0800
Lines: 22
Distribution: su
Message-ID: <ds81gp$pfc$1@news.Stanford.EDU>
References: <ds7ved$nkg$1@news.Stanford.EDU> <ds81ft$pf5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds81ft$pf5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10019

Yeah, just use tcpdump

> Or,  ...rather, are people using tcpdump to generate a textual view for 
> newsgroup postings?
> -- Bruce
> 
> "Bruce Schechter" <bruceds@stanford.edu> wrote in message 
> news:ds7ved$nkg$1@news.Stanford.EDU...
>> Ethereal is working wonderfully for me in general.  It's a godsend. But, 
>> here is a seemingly simple usage question...  how do I copy or export 
>> contents (such as a collection of packets or the contents of packets) from 
>> an ethereal window to place them in email, newsgroup, etc?  I am not a 
>> unix expert...  am I missing some basic copy/paste semantics?  (I am 
>> running on the Elaines remotely from home on Windows via XManager2.)
>>
>> thx, Bruce
>>
>>
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Egress queues
Date: Mon, 06 Feb 2006 09:39:07 -0800
Lines: 15
Distribution: su
Message-ID: <ds81j7$pfc$2@news.Stanford.EDU>
References: <ds73br$qbn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds73br$qbn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10020

Yeah, good question.  There is no need to throttle sending on 
sr_send_packet, you should be able to send at a high rate.

> Hi,
> 
> Is it necessary (or would it be a good idea) to queue all the outgoing 
> packets and have a separate thread send them using sr_send_packet 
> instead of calling sr_send_packet directly every time we want to send a 
> packet?
> 
> I guess the only reason we want to have a separate thread do it is that 
> sr_send_packet might choke and that would somehow stall that rest of the 
>  program?
> 
> Hau Jia.
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Trace route to eth1
Date: Mon, 06 Feb 2006 09:39:41 -0800
Lines: 11
Distribution: su
Message-ID: <ds81ka$pfc$3@news.Stanford.EDU>
References: <ds6rvo$h21$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds6rvo$h21$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10021

It seems so, this is what others are reporting.  We'll have to fix this.

Paul? :-))

> So I tested this on Clack, if I run a trace-route to eth1, it doesn't give a 
> proper route. Is this the right behaviour?
> 
> Thanks,
> Nazia 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP, conflicting specs
Date: Mon, 06 Feb 2006 09:40:53 -0800
Lines: 28
Distribution: su
Message-ID: <ds81mh$pfc$5@news.Stanford.EDU>
References: <ds73vi$rbv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds73vi$rbv$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10023


> RFC 1812 and networksorcery.com say two different things about what an 
> ICMP error should look like.
> 
> networksorcery.com says:
> 
> "The IP header plus the first 8 bytes of the original datagram's data is 
> returned to the sender. This data is used by the host to match the 
> message to the appropriate process. If a higher level protocol uses port 
> numbers, they are assumed to be in the first 64 data bits of the 
> original datagram's data."
> 
> RFC 1812 says:
> 
> "Historically, every ICMP error message has included the Internet
> header and at least the first 8 data bytes of the datagram that
> triggered the error.  This is no longer adequate, due to the use of
> IP-in-IP tunneling and other technologies.  Therefore, the ICMP
> datagram SHOULD contain as much of the original datagram as possible
> without the length of the ICMP datagram exceeding 576 bytes."
> 
> 
> For this assignment, is it sufficient to go with 8 bytes?

yup


> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Ethereal Malformed Frame
Date: Mon, 06 Feb 2006 09:41:28 -0800
Lines: 31
Distribution: su
Message-ID: <ds81nl$pfc$6@news.Stanford.EDU>
References: <ds7brn$4oc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds7brn$4oc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10024

Hmm, I've never seen this.  Is anyone else experiencing this?

> Hi,
> 
> I was testing ICMP TTL Time Exceeded messages with Mozilla.  While looking 
> under Ethereal the ICMP Time Exceeded
> messages seems to be working correctly, I saw some [Malformed Frame] 
> originated from my router's outgoing
> interface and destined to "vns-firewall.Standford.EDU".  Should I care about 
> those Malformed Frames?  The
> following is what appeared in Ethereal when I select the Malformed Frame 
> entry:
> 
> Frame 7 (70 on wire, 70 captured)
>      Arrival Time: Feb 6, 2006 02:57:20.999080000
>      Time delta from previous packet: 0.001129000 seconds
>      Time relative to first packet: 0.007278000 seconds
>      Frame Number: 7
>      Packet Length: 70 bytes
>      Capture Length: 70 bytes
> IEEE 802.3 Ethernet
>      Destination: 00:e0:81:04:26:d9 (vns-firewall.Stanford.EDU)
>      Source: 70:00:00:32:00:01 (70:00:00:32:00:01)
>      Length: 0
>      Trailer: 4500003800010000FF01BDB6C0A8829B
>   [Malformed Frame: LLC]
> 
> Thanks,
> Hector 
> 
> 
.

Path: shelby.stanford.edu!elaine43.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ethereal question
Date: Mon, 6 Feb 2006 10:08:36 -0800
Lines: 48
Distribution: su
Message-ID: <Pine.GSO.4.44.0602061002560.27200-100000@elaine43.Stanford.EDU>
References: <ds7ved$nkg$1@news.Stanford.EDU> <ds81ft$pf5$1@news.Stanford.EDU>
 <ds81gp$pfc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <ds81gp$pfc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10025

One other warning about ethereal.  It seems to warn incorrectly about what
it seems to think are retransmissions.  If your router is forwarding a
packet, it shows up twice in the log file and ethereal doesn't recognize
that you are forwarding the packet.  I guess it's because ethereal is
meant to run on end-hosts.

Also, I noticed that a whole block of packets coming from the APP server
to my router are marked as having back TCP checksums. I don't think it is
my app since those packets are logged before I can get at them.  Also,
since I am actually able to ftp large files, I don't believe ethereal when
it says that all the large packets sent from the app server are "bad".
Clearly the TCP stack on the receiving machine would reject those packets
and the transfer would fail.

Just wanted to help other people avoid the near heart attack that I
experienced :)


Thanks,

Roy

On Mon, 6 Feb 2006, Martin Casado wrote:

> Yeah, just use tcpdump
>
> > Or,  ...rather, are people using tcpdump to generate a textual view for
> > newsgroup postings?
> > -- Bruce
> >
> > "Bruce Schechter" <bruceds@stanford.edu> wrote in message
> > news:ds7ved$nkg$1@news.Stanford.EDU...
> >> Ethereal is working wonderfully for me in general.  It's a godsend. But,
> >> here is a seemingly simple usage question...  how do I copy or export
> >> contents (such as a collection of packets or the contents of packets) from
> >> an ethereal window to place them in email, newsgroup, etc?  I am not a
> >> unix expert...  am I missing some basic copy/paste semantics?  (I am
> >> running on the Elaines remotely from home on Windows via XManager2.)
> >>
> >> thx, Bruce
> >>
> >>
> >>
> >>
> >
> >
>

.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Assignment #2 expected console output
Date: Mon, 6 Feb 2006 10:48:23 -0800
Lines: 11
Distribution: su
Message-ID: <Pine.GSO.4.44.0602061045590.12935-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10026


what are the rules for console (stderr) output for assignment 2?
can we print anything? only errors? use a special format?
if we can't print anything, do we also remove the initial interface
description  text?

thanks,

- Miguel


.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: handling messages with back checksums
Date: Mon, 6 Feb 2006 11:07:33 -0800
Lines: 7
Distribution: su
Message-ID: <Pine.GSO.4.44.0602061106130.12935-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10027

the FAQ says to check the checksum of incoming IP and ICMP packets that
we're not forwarding. We just drop these with maybe an error message
right? no need to send anything back to the sender?

- Miguel


.

Path: shelby.stanford.edu!not-for-mail
From: "Jeremy Robin" <jirobin@stanford.edu>
Newsgroups: su.class.cs244a
Subject: passing packets to other ports
Date: Mon, 6 Feb 2006 11:34:22 -0800
Lines: 12
Distribution: su
Message-ID: <ds88bu$345$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10028

If we get a packet on eth0 destined for eth1 or eth2, do we forward it on to 
that port, effectively adding a hop to the route or should we just respond 
to that packet as it is received on eth0 as if eth0 actually had whatever 
the destination ip address is?

I'm just a little confused about how eth0 is supposed to handle stuff 
destined for the other ports on the router.

thanks,
jeremy 


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ethereal question
Date: Mon, 6 Feb 2006 13:25:37 -0800
Organization: Stanford University
Lines: 54
Distribution: su
Message-ID: <20060206132537.09eb2193@ballpoint>
References: <ds7ved$nkg$1@news.Stanford.EDU>
	<ds81ft$pf5$1@news.Stanford.EDU>
	<ds81gp$pfc$1@news.Stanford.EDU>
	<Pine.GSO.4.44.0602061002560.27200-100000@elaine43.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10033

That is probably happening because sr doesn't log the whole packet, only
the first PACKET_DUMP_SIZE bytes.

On Mon, 6 Feb 2006 10:08:36 -0800
Roy Mehdi Zeighami <zeighami@stanford.edu> wrote:

> One other warning about ethereal.  It seems to warn incorrectly about what
> it seems to think are retransmissions.  If your router is forwarding a
> packet, it shows up twice in the log file and ethereal doesn't recognize
> that you are forwarding the packet.  I guess it's because ethereal is
> meant to run on end-hosts.
> 
> Also, I noticed that a whole block of packets coming from the APP server
> to my router are marked as having back TCP checksums. I don't think it is
> my app since those packets are logged before I can get at them.  Also,
> since I am actually able to ftp large files, I don't believe ethereal when
> it says that all the large packets sent from the app server are "bad".
> Clearly the TCP stack on the receiving machine would reject those packets
> and the transfer would fail.
> 
> Just wanted to help other people avoid the near heart attack that I
> experienced :)
> 
> 
> Thanks,
> 
> Roy
> 
> On Mon, 6 Feb 2006, Martin Casado wrote:
> 
> > Yeah, just use tcpdump
> >
> > > Or,  ...rather, are people using tcpdump to generate a textual view for
> > > newsgroup postings?
> > > -- Bruce
> > >
> > > "Bruce Schechter" <bruceds@stanford.edu> wrote in message
> > > news:ds7ved$nkg$1@news.Stanford.EDU...
> > >> Ethereal is working wonderfully for me in general.  It's a godsend. But,
> > >> here is a seemingly simple usage question...  how do I copy or export
> > >> contents (such as a collection of packets or the contents of packets) from
> > >> an ethereal window to place them in email, newsgroup, etc?  I am not a
> > >> unix expert...  am I missing some basic copy/paste semantics?  (I am
> > >> running on the Elaines remotely from home on Windows via XManager2.)
> > >>
> > >> thx, Bruce
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> >
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: can't connect to VNS
Date: Mon, 06 Feb 2006 14:31:44 -0800
Lines: 14
Distribution: su
Message-ID: <ds8ioh$ed9$1@news.Stanford.EDU>
References: <ds7034$n2v$1@news.Stanford.EDU> <ds74m9$s1j$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds74m9$s1j$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10035

It's happening again. Is anyone else experiencing this?

Naeim Semsarilar wrote:
> I could connect again for a while, and now it's back to the same error. 
> Is it me, or is the server shaky?
> 
> 
> Naeim Semsarilar wrote:
>> I keep getting this when i try to run my router:
>>
>> Requesting topology 21
>> ERROR: Failed to retrieve current time
>>
>> Could someone please help?
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assignment #2 expected console output
Date: Mon, 06 Feb 2006 16:03:31 -0800
Lines: 16
Distribution: su
Message-ID: <ds8o4i$kpq$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602061045590.12935-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602061045590.12935-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10036


Please don't print anything on a per-packet basis.  Error reporting
and the inital interface list is fine.



> what are the rules for console (stderr) output for assignment 2?
> can we print anything? only errors? use a special format?
> if we can't print anything, do we also remove the initial interface
> description  text?
> 
> thanks,
> 
> - Miguel
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: handling messages with back checksums
Date: Mon, 06 Feb 2006 16:03:58 -0800
Lines: 9
Distribution: su
Message-ID: <ds8o5d$kpq$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602061106130.12935-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602061106130.12935-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10037

you don't need to send anything back

> the FAQ says to check the checksum of incoming IP and ICMP packets that
> we're not forwarding. We just drop these with maybe an error message
> right? no need to send anything back to the sender?
> 
> - Miguel
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: passing packets to other ports
Date: Mon, 06 Feb 2006 16:04:57 -0800
Lines: 15
Distribution: su
Message-ID: <ds8o77$kpq$3@news.Stanford.EDU>
References: <ds88bu$345$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ds88bu$345$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10038

You don't make forwarding decisions to packets adressed to one of your
interfaces (e.g. don't add a hop to traceroute)

> If we get a packet on eth0 destined for eth1 or eth2, do we forward it on to 
> that port, effectively adding a hop to the route or should we just respond 
> to that packet as it is received on eth0 as if eth0 actually had whatever 
> the destination ip address is?
> 
> I'm just a little confused about how eth0 is supposed to handle stuff 
> destined for the other ports on the router.
> 
> thanks,
> jeremy 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: ICMP host unreachable
Date: Mon, 06 Feb 2006 16:31:02 -0800
Lines: 10
Distribution: su
Message-ID: <C00D2A46.30C2%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: ICMP host unreachable
Thread-Index: AcYrfcYIBNnlypdxEdqSKgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10041

Hi.

I am unclear about what I am checksumming When I send a ICMP host
unreachable in response to UDP packets being sent to my routers interface.

Does the checksum also include the IP header and first 8 bytes of Original
Datagreams data? Or just the ICMP header.

Thanks for help.

.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ICMP host unreachable
Date: Mon, 06 Feb 2006 16:50:27 -0800
Lines: 16
Distribution: su
Message-ID: <ds8qsl$nve$1@news.Stanford.EDU>
References: <C00D2A46.30C2%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <C00D2A46.30C2%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10043

ICMP checksum is calculated over the ICMP header and everything that's 
in the data portion of the ICMP, which includes the original IP header 
and the first 8 bytes of the original IP packet's data.


Sunny Balwani wrote:
> Hi.
> 
> I am unclear about what I am checksumming When I send a ICMP host
> unreachable in response to UDP packets being sent to my routers interface.
> 
> Does the checksum also include the IP header and first 8 bytes of Original
> Datagreams data? Or just the ICMP header.
> 
> Thanks for help.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Sending ICMP Host when forwarding failed on an ICMP packet?
Date: Mon, 06 Feb 2006 16:53:00 -0800
Lines: 5
Distribution: su
Message-ID: <ds8r1d$o9p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10044

Suppose you want to forward a packet that just happens to be an ICMP 
packet, and the ARP request failed to come in on time.  Should you 
generate an ICMP Host Unreachable packet?

--George
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Sending ICMP Host when forwarding failed on an ICMP packet?
Date: Mon, 06 Feb 2006 17:03:30 -0800
Lines: 9
Distribution: su
Message-ID: <ds8rl4$oju$1@news.Stanford.EDU>
References: <ds8r1d$o9p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds8r1d$o9p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10045

Look for the post with subject "dropping ICMP packets" in this newsgroup.


George Su wrote:
> Suppose you want to forward a packet that just happens to be an ICMP 
> packet, and the ARP request failed to come in on time.  Should you 
> generate an ICMP Host Unreachable packet?
> 
> --George
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Forwarding question
Date: Mon, 6 Feb 2006 19:04:08 -0800
Lines: 25
Distribution: su
Message-ID: <ds92n9$3gv$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10049

In the handout from Martin's Discussion Section on Jan 27, on page 7 
regarding forwarding, it says:  "Lookup packet DA in forwarding table. 
....If unknown, drop packet and send ICMP message."



It seems to me there are actually two cases to consider when the DA is not 
in the routing table:

1.)  If the packet came in through the firewall, then we need to drop it and 
send ICMP host unreachable message.

2.) If  the packet came from one of the app servers (i.e., from any 
destination known within the routing table) then we should forward it out 
through the default gateway.



Correct?



Thanks, Bruce


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Forwarding question
Date: Mon, 06 Feb 2006 19:42:42 -0800
Lines: 28
Distribution: su
Message-ID: <ds94us$5nj$1@news.Stanford.EDU>
References: <ds92n9$3gv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds92n9$3gv$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10050

I don't think I quite grock this ... why would you do 2?


> In the handout from Martin's Discussion Section on Jan 27, on page 7 
> regarding forwarding, it says:  "Lookup packet DA in forwarding table. 
> ...If unknown, drop packet and send ICMP message."
> 
> 
> 
> It seems to me there are actually two cases to consider when the DA is not 
> in the routing table:
> 
> 1.)  If the packet came in through the firewall, then we need to drop it and 
> send ICMP host unreachable message.
> 
> 2.) If  the packet came from one of the app servers (i.e., from any 
> destination known within the routing table) then we should forward it out 
> through the default gateway.
> 
> 
> 
> Correct?
> 
> 
> 
> Thanks, Bruce
> 
> 
.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Modifying stub files
Date: Mon, 6 Feb 2006 19:47:52 -0800
Lines: 11
Distribution: su
Message-ID: <Pine.GSO.4.44.0602061945460.12677-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10051

There is a guideline in the FAQ saying that we can only change
sr_router.h/c in the provided stub code, and that everything else we write
should be in separate files.

Is this a strong recommendation or a requirement? For example, I have an
ICMP header struct that seems to be best suited for the sr_protocol.h
file. Should I instead have an sr_icmp_protocol.h file?

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Modifying stub files
Date: Mon, 06 Feb 2006 19:52:04 -0800
Lines: 14
Distribution: su
Message-ID: <ds95ge$6do$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602061945460.12677-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <Pine.GSO.4.44.0602061945460.12677-100000@elaine35.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10053


> Is this a strong recommendation or a requirement? For example, I have an
> ICMP header struct that seems to be best suited for the sr_protocol.h
> file. 


Should I instead have an sr_icmp_protocol.h file?

yes


> Thanks,
> Dinkar.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: TA for submission
Date: Mon, 6 Feb 2006 22:54:20 -0600
Lines: 7
Distribution: su
Message-ID: <ds995t$9ur$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10054

Which TA should we use for submission of PA2?

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TA for submission
Date: Mon, 06 Feb 2006 20:55:55 -0800
Lines: 9
Distribution: su
Message-ID: <ds9985$9vm$1@news.Stanford.EDU>
References: <ds995t$9ur$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds995t$9ur$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10055

Your TA

> Which TA should we use for submission of PA2?
> 
> Thanks,
> 
> Roy 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Mac address of router
Date: Mon, 6 Feb 2006 21:08:32 -0800
Lines: 9
Distribution: su
Message-ID: <ds9a4c$aps$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10056

Where should we store MAC addresses of all interfaces of the router itself?
I feel like adding them to the ARP cache and having them never time out.

In any implementation, we would need to hard code the MAC addresses into our
program. Is that correct?

Thanks!


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Mac address of router
Date: Mon, 6 Feb 2006 21:12:21 -0800
Lines: 17
Distribution: su
Message-ID: <ds9abg$b01$1@news.Stanford.EDU>
References: <ds9a4c$aps$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10057

Sorry, I figured it out. Duh.

"Robbie Yan" <xyan@stanford.edu> wrote in message
news:ds9a4c$aps$1@news.Stanford.EDU...
> Where should we store MAC addresses of all interfaces of the router
itself?
> I feel like adding them to the ARP cache and having them never time out.
>
> In any implementation, we would need to hard code the MAC addresses into
our
> program. Is that correct?
>
> Thanks!
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Ethereal Malformed Frame
Date: Mon, 6 Feb 2006 21:40:50 -0800
Organization: Stanford University
Lines: 41
Distribution: su
Message-ID: <ds9bt6$cif$1@news.Stanford.EDU>
References: <ds7brn$4oc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10058

I ran into this when i forgot to move the packet
pointer ahead by the size of the ethernet header and
ended up overwriting the ethernet header with ip/ARP headers.. got a very 
similar LLC /malformed packet
error for that.

The fix in my case was to insert the missing pointer move ahead statement.

Nikhil
"Hector Chan" <chanhp@stanford.edu> wrote in message 
news:ds7brn$4oc$1@news.Stanford.EDU...
> Hi,
>
> I was testing ICMP TTL Time Exceeded messages with Mozilla.  While looking 
> under Ethereal the ICMP Time Exceeded
> messages seems to be working correctly, I saw some [Malformed Frame] 
> originated from my router's outgoing
> interface and destined to "vns-firewall.Standford.EDU".  Should I care 
> about those Malformed Frames?  The
> following is what appeared in Ethereal when I select the Malformed Frame 
> entry:
>
> Frame 7 (70 on wire, 70 captured)
>     Arrival Time: Feb 6, 2006 02:57:20.999080000
>     Time delta from previous packet: 0.001129000 seconds
>     Time relative to first packet: 0.007278000 seconds
>     Frame Number: 7
>     Packet Length: 70 bytes
>     Capture Length: 70 bytes
> IEEE 802.3 Ethernet
>     Destination: 00:e0:81:04:26:d9 (vns-firewall.Stanford.EDU)
>     Source: 70:00:00:32:00:01 (70:00:00:32:00:01)
>     Length: 0
>     Trailer: 4500003800010000FF01BDB6C0A8829B
>  [Malformed Frame: LLC]
>
> Thanks,
> Hector
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Forwarding question
Date: Mon, 6 Feb 2006 21:48:37 -0800
Lines: 41
Distribution: su
Message-ID: <ds9cbo$d35$1@news.Stanford.EDU>
References: <ds92n9$3gv$1@news.Stanford.EDU> <ds94us$5nj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10059

Martin, among others,

Here is the scenario that leads to my #2 below (or at least I thought it 
would)....

If one of the two application servers sends an IP packet (perhaps in support 
of HTTP) to an Elaine system at 171.64.15.68, then the app server first 
sends the packet to my router.  My router receives the packet and dutifully 
calls sr_handlepacket().  In my case, that function looks up the packet's 
destination address (DA) in the routing table.  It does not find the DA in 
the table's set of destinations, so it forwards the packet to the default 
gateway (172.24.74.17, in my case) by default.  Correct?

Given that you asked the question...  I now fear that I don't properly grock 
the concept of default gateway??

Thanks, Bruce


>I don't think I quite grock this ... why would you do 2?
>
>
>> In the handout from Martin's Discussion Section on Jan 27, on page 7 
>> regarding forwarding, it says:  "Lookup packet DA in forwarding table. 
>> ...If unknown, drop packet and send ICMP message."
>>
>> It seems to me there are actually two cases to consider when the DA is 
>> not in the routing table:
>>
>> 1.)  If the packet came in through the firewall, then we need to drop it 
>> and send ICMP host unreachable message.
>>
>> 2.) If  the packet came from one of the app servers (i.e., from any 
>> destination known within the routing table) then we should forward it out 
>> through the default gateway.
>>
>> Correct?
>>
>> Thanks, Bruce


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Forwarding question
Date: Mon, 06 Feb 2006 23:22:26 -0800
Lines: 50
Distribution: su
Message-ID: <ds9hqr$hg9$1@news.Stanford.EDU>
References: <ds92n9$3gv$1@news.Stanford.EDU> <ds94us$5nj$1@news.Stanford.EDU> <ds9cbo$d35$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <ds9cbo$d35$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10060


> Martin, among others,
> 
> Here is the scenario that leads to my #2 below (or at least I thought it 
> would)....
> 
> If one of the two application servers sends an IP packet (perhaps in support 
> of HTTP) to an Elaine system at 171.64.15.68, then the app server first 
> sends the packet to my router.  My router receives the packet and dutifully 
> calls sr_handlepacket().  In my case, that function looks up the packet's 
> destination address (DA) in the routing table.  It does not find the DA in 
> the table's set of destinations, so it forwards the packet to the default 
> gateway (172.24.74.17, in my case) by default.  Correct?

This is exactly correct.  However, in this case, the DA matches the 
default route.  Ahh, I see where the confusion is.  The default route is
a route like any other.  Say, for example, it didn't exist.  Then 
packets would have to be dropped if there wasn't an explicit route for
them.

make sense?

> Given that you asked the question...  I now fear that I don't properly grock 
> the concept of default gateway??
> 
> Thanks, Bruce
> 
> 
>> I don't think I quite grock this ... why would you do 2?
>>
>>
>>> In the handout from Martin's Discussion Section on Jan 27, on page 7 
>>> regarding forwarding, it says:  "Lookup packet DA in forwarding table. 
>>> ...If unknown, drop packet and send ICMP message."
>>>
>>> It seems to me there are actually two cases to consider when the DA is 
>>> not in the routing table:
>>>
>>> 1.)  If the packet came in through the firewall, then we need to drop it 
>>> and send ICMP host unreachable message.
>>>
>>> 2.) If  the packet came from one of the app servers (i.e., from any 
>>> destination known within the routing table) then we should forward it out 
>>> through the default gateway.
>>>
>>> Correct?
>>>
>>> Thanks, Bruce
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: can't connect to VNS
Date: Tue, 07 Feb 2006 00:33:16 -0800
Lines: 17
Distribution: su
Message-ID: <ds9m0f$p2d$1@news.Stanford.EDU>
References: <ds7034$n2v$1@news.Stanford.EDU> <ds74m9$s1j$1@news.Stanford.EDU> <ds8ioh$ed9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <ds8ioh$ed9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10063

Please ignore parent posts.

Naeim Semsarilar wrote:
> It's happening again. Is anyone else experiencing this?
> 
> Naeim Semsarilar wrote:
>> I could connect again for a while, and now it's back to the same 
>> error. Is it me, or is the server shaky?
>>
>>
>> Naeim Semsarilar wrote:
>>> I keep getting this when i try to run my router:
>>>
>>> Requesting topology 21
>>> ERROR: Failed to retrieve current time
>>>
>>> Could someone please help?
.

Path: shelby.stanford.edu!not-for-mail
From: "Daniel Kim" <blueagle@stanford.edu>
Newsgroups: su.class.cs244a
Subject: purify error
Date: Tue, 7 Feb 2006 03:50:01 -0800
Lines: 25
Distribution: su
Message-ID: <dsa1ha$5ct$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10073

Purify complains this errors, but I think those are not my fault, right?

First,

      IPW: Invalid pointer write
      This is occurring while in thread 2:
            _lwp_sema_wait [libc.so.1]
            _door_return   [libc.so.1]
            _sc_door_func  [schedctl.c]
      Writing 4 bytes to 0xfe4a5c04 on the stack of thread 2.
      Address 0xfe4a5c04 is       28 bytes below frame pointer in function
_lwp_sema_wait.

This happens even when I don't use any thread.

Second,
    MLK : pthread_attr_init(&attr);
The function calls malloc but it doesn't seem to freeing after.
I used "pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)", and
then
detached the thread after it terminates.

Am I doing something wrong?


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Forwarding question
Date: Tue, 7 Feb 2006 08:04:32 -0800
Lines: 70
Distribution: su
Message-ID: <dsagej$keq$1@news.Stanford.EDU>
References: <ds92n9$3gv$1@news.Stanford.EDU> <ds94us$5nj$1@news.Stanford.EDU> <ds9cbo$d35$1@news.Stanford.EDU> <ds9hqr$hg9$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10074

Martin,

That was a big help.  I'm almost there, but still something doesnt add up 
for me...

Back in my original posting, I quoted from your presentation slide: "Lookup 
packet DA in forwarding table. ...If unknown, drop packet and send ICMP 
message."  But, all packets can match the default route (since its mask is 
0.0.0.0, and it will offer the shortest-prefix-match), correct?

So if a packet comes in from the firewall and its DA is not one of my two 
app servers, then its DA would match the default route, so it should be 
routed to the default gateway rather than being dropped. But that is not 
what your presentation slide said.  Somewhere I am missing an element of the 
overall routing algorithm.

Thanks, Bruce

"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:ds9hqr$hg9$1@news.Stanford.EDU...
>
>> Martin, among others,
>>
>> Here is the scenario that leads to my #2 below (or at least I thought it 
>> would)....
>>
>> If one of the two application servers sends an IP packet (perhaps in 
>> support of HTTP) to an Elaine system at 171.64.15.68, then the app server 
>> first sends the packet to my router.  My router receives the packet and 
>> dutifully calls sr_handlepacket().  In my case, that function looks up 
>> the packet's destination address (DA) in the routing table.  It does not 
>> find the DA in the table's set of destinations, so it forwards the packet 
>> to the default gateway (172.24.74.17, in my case) by default.  Correct?
>
> This is exactly correct.  However, in this case, the DA matches the 
> default route.  Ahh, I see where the confusion is.  The default route is
> a route like any other.  Say, for example, it didn't exist.  Then packets 
> would have to be dropped if there wasn't an explicit route for
> them.
>
> make sense?
>
>> Given that you asked the question...  I now fear that I don't properly 
>> grock the concept of default gateway??
>>
>> Thanks, Bruce
>>
>>
>>> I don't think I quite grock this ... why would you do 2?
>>>
>>>
>>>> In the handout from Martin's Discussion Section on Jan 27, on page 7 
>>>> regarding forwarding, it says:  "Lookup packet DA in forwarding table. 
>>>> ...If unknown, drop packet and send ICMP message."
>>>>
>>>> It seems to me there are actually two cases to consider when the DA is 
>>>> not in the routing table:
>>>>
>>>> 1.)  If the packet came in through the firewall, then we need to drop 
>>>> it and send ICMP host unreachable message.
>>>>
>>>> 2.) If  the packet came from one of the app servers (i.e., from any 
>>>> destination known within the routing table) then we should forward it 
>>>> out through the default gateway.
>>>>
>>>> Correct?
>>>>
>>>> Thanks, Bruce
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Program termination and freeing system resources
Date: Tue, 07 Feb 2006 09:44:14 -0800
Lines: 7
Distribution: su
Message-ID: <dsam9f$q0g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10075

So the program never ends.  And we can't modify the file that has the 
function with the while(1) loop.  Is it ok to not free system resources 
that we would normally free before program termination, i.e. dynamically 
allocated memory for the arp cache?

Thanks,
Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Program termination and freeing system resources
Date: Tue, 07 Feb 2006 10:45:32 -0800
Lines: 9
Distribution: su
Message-ID: <dsapsb$hr$1@news.Stanford.EDU>
References: <dsam9f$q0g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsam9f$q0g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10076

yup, A-OK

> So the program never ends.  And we can't modify the file that has the 
> function with the while(1) loop.  Is it ok to not free system resources 
> that we would normally free before program termination, i.e. dynamically 
> allocated memory for the arp cache?
> 
> Thanks,
> Steve
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: tcp packets on ethereal
Date: Tue, 7 Feb 2006 15:52:36 -0800
Lines: 10
Distribution: su
Message-ID: <dsbbs3$kh9$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10080

hi
any tcp(ack/syn/response) packet that is forwarded by my server between a 
remote host and my app servers, ehtereal shows it to be a retransmission.

is this correct behavior?

thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: tcp packets on ethereal
Date: Tue, 07 Feb 2006 16:08:46 -0800
Lines: 24
Distribution: su
Message-ID: <C00E768E.2905%jpettit@cs.stanford.edu>
References: <dsbbs3$kh9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: tcp packets on ethereal
Thread-Index: AcYsQ9QgEuZHMZg3Edq8kwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10081

That was discussed earlier.  The thought is that Ethereal doesn't understand
that it's being used in a router capacity.  Look at the hardware addresses
in the Ethernet header of the packets--if the destination in the first
packet and the source in the second packet are interfaces on your router,
then you're in good shape.

--Justin


On 2/7/06 3:52 PM, in article dsbbs3$kh9$1@news.Stanford.EDU, "Forum Mangal
Parmar" <forumm@stanford.edu> wrote:

> hi
> any tcp(ack/syn/response) packet that is forwarded by my server between a
> remote host and my app servers, ehtereal shows it to be a retransmission.
> 
> is this correct behavior?
> 
> thanks
> Forum 
> 
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: tcp packets on ethereal
Date: Tue, 7 Feb 2006 16:09:34 -0800
Lines: 25
Distribution: su
Message-ID: <dsbcs1$lqi$1@news.Stanford.EDU>
References: <dsbbs3$kh9$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10082

for every packe that is to be forwarded, Im doing the following:

1. changing the source & destination mac
2. decrementing the ttl and recalculating the checksum.
3. then sending it out to the next hop

but ethereal labels this packet as a retransmission

any ideas?
thanks
Forum

"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
news:dsbbs3$kh9$1@news.Stanford.EDU...
> hi
> any tcp(ack/syn/response) packet that is forwarded by my server between a 
> remote host and my app servers, ehtereal shows it to be a retransmission.
>
> is this correct behavior?
>
> thanks
> Forum
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: tcp packets on ethereal
Date: Tue, 7 Feb 2006 17:14:44 -0800
Lines: 31
Distribution: su
Message-ID: <dsbgm4$pun$1@news.Stanford.EDU>
References: <dsbbs3$kh9$1@news.Stanford.EDU> <C00E768E.2905%jpettit@cs.stanford.edu>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10084

hey thanks for that. really appreciate it
"Justin Pettit" <jpettit@cs.stanford.edu> wrote in message 
news:C00E768E.2905%jpettit@cs.stanford.edu...
> That was discussed earlier.  The thought is that Ethereal doesn't 
> understand
> that it's being used in a router capacity.  Look at the hardware addresses
> in the Ethernet header of the packets--if the destination in the first
> packet and the source in the second packet are interfaces on your router,
> then you're in good shape.
>
> --Justin
>
>
> On 2/7/06 3:52 PM, in article dsbbs3$kh9$1@news.Stanford.EDU, "Forum 
> Mangal
> Parmar" <forumm@stanford.edu> wrote:
>
>> hi
>> any tcp(ack/syn/response) packet that is forwarded by my server between a
>> remote host and my app servers, ehtereal shows it to be a retransmission.
>>
>> is this correct behavior?
>>
>> thanks
>> Forum
>>
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Purify UMR
Date: Wed, 8 Feb 2006 02:30:20 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: <dsbl3s$13s$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10085

Hi,

I am seeing a lot (I mean a lot) of uninitialized memory read (UMR) errors when I run my router with purify. They seem to be coming from the function sr_send_packet.  Are we responsible for getting rid of those UMRs?

Thanks,


Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Alan Sheinberg <alanbs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify UMR
Date: Tue, 07 Feb 2006 19:13:57 -0800
Lines: 24
Distribution: su
Message-ID: <dsbntb$453$1@news.Stanford.EDU>
References: <dsbl3s$13s$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041103)
X-Accept-Language: en-us, en
In-Reply-To: <dsbl3s$13s$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10086

Yeah, I was getting something like that.  I was essentially copying from 
the raw packet passed by sr_send_packet into a struct and then reading 
from that struct.  It was then claiming that the struct was not 
initialized.  The thing is that without actually doing anything beyond 
this (ie just returning afterward), I was getting those errors.  Not to 
mention, it's claim was so fundamentally critical that if it was in fact 
true, my program would not work at all, which wasn't the case.

The struct that I had created was on the stack.  I then changed it to be 
malloced and the purify errors went away.  Why this is the case, I don't 
know, but I am almost sure that there is no credibility to it.  Crazy 
purify.

Alan

Hector Chan wrote:
> Hi,
> 
> I am seeing a lot (I mean a lot) of uninitialized memory read (UMR) errors when I run my router with purify. They seem to be coming from the function sr_send_packet.  Are we responsible for getting rid of those UMRs?
> 
> Thanks,
> 
> 
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Alan Sheinberg <alanbs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify error
Date: Tue, 07 Feb 2006 19:26:02 -0800
Lines: 35
Distribution: su
Message-ID: <dsbojp$4mh$1@news.Stanford.EDU>
References: <dsa1ha$5ct$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041103)
X-Accept-Language: en-us, en
In-Reply-To: <dsa1ha$5ct$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10087

The first error, I got.  It happens every time you link with pthread 
using the linker option "-lpthread".  I am fairly certain that I tried 
this with just the stub program and added that option to the makefile 
and had that result.  If you take that library out, then you are free 
from the error, but you loose threading.  I don't know of any fix.  Did 
anybody use pthreads and NOT have this problem?

Alan

Daniel Kim wrote:
> Purify complains this errors, but I think those are not my fault, right?
> 
> First,
> 
>       IPW: Invalid pointer write
>       This is occurring while in thread 2:
>             _lwp_sema_wait [libc.so.1]
>             _door_return   [libc.so.1]
>             _sc_door_func  [schedctl.c]
>       Writing 4 bytes to 0xfe4a5c04 on the stack of thread 2.
>       Address 0xfe4a5c04 is       28 bytes below frame pointer in function
> _lwp_sema_wait.
> 
> This happens even when I don't use any thread.
> 
> Second,
>     MLK : pthread_attr_init(&attr);
> The function calls malloc but it doesn't seem to freeing after.
> I used "pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)", and
> then
> detached the thread after it terminates.
> 
> Am I doing something wrong?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Forum Mangal Parmar <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: todays office hrs
Date: Tue, 07 Feb 2006 19:30:52 -0800
Lines: 6
Distribution: su
Message-ID: <dsbolc$4l1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10088

hi matt
pls can u tell me where are u holding ur office hrs today.

thanks
Forum

.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: vns servers
Date: Tue, 07 Feb 2006 19:59:19 -0800
Lines: 4
Distribution: su
Message-ID: <dsbq9q$6ae$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10089

Hi all,

So we have between 15 and 20 students using vns-1 and none on vns-2.
If things are slow, you may want to try using vns-2 (./sr -s vns-2).
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Ethereal Malformed Frame
Date: Tue, 07 Feb 2006 19:59:15 -0800
Lines: 53
Distribution: su
Message-ID: <C00EAC93.2911%jpettit@cs.stanford.edu>
References: <ds7brn$4oc$1@news.Stanford.EDU> <ds9bt6$cif$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Ethereal Malformed Frame
Thread-Index: AcYsZAbaRbXAZJhXEdq8kwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10090

I had this same problem.  If you look at the actual contents of the trailer,
you'll see that it is the beginning of an IP packet (probably from the data
portion of your destination unreachable message).

--Justin


On 2/6/06 9:40 PM, in article ds9bt6$cif$1@news.Stanford.EDU, "Nikhil
Raghavan" <nikhilr@cs.stanford.edu> wrote:

> I ran into this when i forgot to move the packet
> pointer ahead by the size of the ethernet header and
> ended up overwriting the ethernet header with ip/ARP headers.. got a very
> similar LLC /malformed packet
> error for that.
> 
> The fix in my case was to insert the missing pointer move ahead statement.
> 
> Nikhil
> "Hector Chan" <chanhp@stanford.edu> wrote in message
> news:ds7brn$4oc$1@news.Stanford.EDU...
>> Hi,
>> 
>> I was testing ICMP TTL Time Exceeded messages with Mozilla.  While looking
>> under Ethereal the ICMP Time Exceeded
>> messages seems to be working correctly, I saw some [Malformed Frame]
>> originated from my router's outgoing
>> interface and destined to "vns-firewall.Standford.EDU".  Should I care
>> about those Malformed Frames?  The
>> following is what appeared in Ethereal when I select the Malformed Frame
>> entry:
>> 
>> Frame 7 (70 on wire, 70 captured)
>>     Arrival Time: Feb 6, 2006 02:57:20.999080000
>>     Time delta from previous packet: 0.001129000 seconds
>>     Time relative to first packet: 0.007278000 seconds
>>     Frame Number: 7
>>     Packet Length: 70 bytes
>>     Capture Length: 70 bytes
>> IEEE 802.3 Ethernet
>>     Destination: 00:e0:81:04:26:d9 (vns-firewall.Stanford.EDU)
>>     Source: 70:00:00:32:00:01 (70:00:00:32:00:01)
>>     Length: 0
>>     Trailer: 4500003800010000FF01BDB6C0A8829B
>>  [Malformed Frame: LLC]
>> 
>> Thanks,
>> Hector
>> 
> 
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ICMP ping packets bouncing
Date: Tue, 7 Feb 2006 20:08:18 -0800
Lines: 10
Distribution: su
Message-ID: <dsbqrm$6tb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10091

Hi,

Every 20 or so pings, I get a message like
packet seq=26 bounced at 192.168.130.70: Host unreachable.

Where .70 is my router's address, is this the firewalla dropping packets, or 
something I need to worry about?
Thanks. 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify error
Date: Tue, 07 Feb 2006 20:38:04 -0800
Lines: 32
Distribution: su
Message-ID: <dsbsi5$8ak$1@news.Stanford.EDU>
References: <dsa1ha$5ct$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsa1ha$5ct$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10092

It looks like you're fine.

Don't worry about Purify errors if you're pretty sure they're not your 
fault (i.e., they're in the stub code or external library).  We don't 
run your code against Purify for this assignment.

Daniel Kim wrote:
> Purify complains this errors, but I think those are not my fault, right?
> 
> First,
> 
>       IPW: Invalid pointer write
>       This is occurring while in thread 2:
>             _lwp_sema_wait [libc.so.1]
>             _door_return   [libc.so.1]
>             _sc_door_func  [schedctl.c]
>       Writing 4 bytes to 0xfe4a5c04 on the stack of thread 2.
>       Address 0xfe4a5c04 is       28 bytes below frame pointer in function
> _lwp_sema_wait.
> 
> This happens even when I don't use any thread.
> 
> Second,
>     MLK : pthread_attr_init(&attr);
> The function calls malloc but it doesn't seem to freeing after.
> I used "pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)", and
> then
> detached the thread after it terminates.
> 
> Am I doing something wrong?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Daniel Kim" <blueagle@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: purify error
Date: Tue, 7 Feb 2006 20:58:29 -0800
Lines: 32
Distribution: su
Message-ID: <dsbtpo$9g7$1@news.Stanford.EDU>
References: <dsa1ha$5ct$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10093

Oops, actually the seond  one is my mistake.
There is a function that kills the attr.

"Daniel Kim" <blueagle@stanford.edu> wrote in message
news:dsa1ha$5ct$1@news.Stanford.EDU...
> Purify complains this errors, but I think those are not my fault, right?
>
> First,
>
>       IPW: Invalid pointer write
>       This is occurring while in thread 2:
>             _lwp_sema_wait [libc.so.1]
>             _door_return   [libc.so.1]
>             _sc_door_func  [schedctl.c]
>       Writing 4 bytes to 0xfe4a5c04 on the stack of thread 2.
>       Address 0xfe4a5c04 is       28 bytes below frame pointer in function
> _lwp_sema_wait.
>
> This happens even when I don't use any thread.
>
> Second,
>     MLK : pthread_attr_init(&attr);
> The function calls malloc but it doesn't seem to freeing after.
> I used "pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)", and
> then
> detached the thread after it terminates.
>
> Am I doing something wrong?
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Unsupported ICMP Type
Date: Tue, 07 Feb 2006 21:12:46 -0800
Lines: 8
Distribution: su
Message-ID: <C00EBDCE.2915%jpettit@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Unsupported ICMP Type
Thread-Index: AcYsbkwEimmiZphhEdq8kwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10094

If we receive an ICMP message destined for the router, which we do not
support, should we just drop it silently?  If not, what type of message do
we send?  I tried sending an ICMP Timestamp Request to a system on my LAN,
and it just ignored the request.  Is that appropriate behavior for our
router?

--Justin

.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Unsupported ICMP Type
Date: Tue, 07 Feb 2006 21:32:03 -0800
Lines: 10
Distribution: su
Message-ID: <dsbvnm$bhl$1@news.Stanford.EDU>
References: <C00EBDCE.2915%jpettit@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <C00EBDCE.2915%jpettit@cs.stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10095

Dropping it silently is fine

> If we receive an ICMP message destined for the router, which we do not
> support, should we just drop it silently?  If not, what type of message do
> we send?  I tried sending an ICMP Timestamp Request to a system on my LAN,
> and it just ignored the request.  Is that appropriate behavior for our
> router?
> 
> --Justin
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Traceroute Behaviour: No.of Hops Query
Date: Tue, 7 Feb 2006 22:13:32 -0800
Organization: Stanford University
Lines: 23
Distribution: su
Message-ID: <dsc26d$dq1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10096

If you check for IPhdr->ip_ttl <=1
 then send TTL exceeded

you get 5 hops as the tracert count for eth1 and eth2, while only 4 hops for 
eth0.
This arguably doesnt make sense because hop count (ttl)should be the number 
of machines(possibly routers) that a packet has traversed before reaching 
destination.
So given that eth1/2/0 are all on the same machine, we should technically 
see the same hop counts for each of the 3 interfaces of the router.

However this behaviour can be corrected if you check for
iphdr->ip_ttl <1 (instead of <=1) and you get the same hop count for 
eth0,1,2. But now if you tracert to AppServer1/2, you still get the same hop 
count as that for the router.

I remember that there was a mention in the FAQ that said that we should be 
checking for ttl<=1 instead of ttl hitting 0. Were you (Martin/whoever wrote 
that clause in the FAQ) talking about exactly this??

Thanks.


.

Path: shelby.stanford.edu!saga1.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: killing processes
Date: Tue, 7 Feb 2006 22:22:24 -0800
Lines: 9
Distribution: su
Message-ID: <Pine.GSO.4.44.0602072221020.27154-100000@saga1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10097

My router was running when my computer hibernated, cutting me off from
Putty. Apparently it is still running on VNS, because I can't start it
again. I sshed into the machine I was on to try to kill the process, but
didn't see it running using top... Anyone know how to reset this?

Thanks in advance!

Megan

.

Path: shelby.stanford.edu!not-for-mail
From: "Andrew Sakai" <asakai@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Deliverables
Date: Tue, 7 Feb 2006 22:35:04 -0800
Lines: 8
Distribution: su
Message-ID: <dsc3eq$f5d$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10098

This may have been answered elsewhere, but what are the deliverables for 
this programming assignment?  Are a .purify file and a purify output 
necessary this time around?

    Cheers,
    Andrew 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Traceroute Behaviour: No.of Hops Query
Date: Tue, 07 Feb 2006 22:37:50 -0800
Lines: 31
Distribution: su
Message-ID: <dsc3io$f02$1@news.Stanford.EDU>
References: <dsc26d$dq1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsc26d$dq1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10099

Nikhil Raghavan wrote:
> If you check for IPhdr->ip_ttl <=1
>  then send TTL exceeded
> 
> you get 5 hops as the tracert count for eth1 and eth2, while only 4 hops for 
> eth0.

no, you shouldn't.  you shouldn't do any packet "forwarding" from eth0 
to eth[1,2], i.e., don't count that as a hop.

> This arguably doesnt make sense because hop count (ttl)should be the number 
> of machines(possibly routers) that a packet has traversed before reaching 
> destination.
> So given that eth1/2/0 are all on the same machine, we should technically 
> see the same hop counts for each of the 3 interfaces of the router.

yep

> 
> However this behaviour can be corrected if you check for
> iphdr->ip_ttl <1 (instead of <=1) and you get the same hop count for 
> eth0,1,2. But now if you tracert to AppServer1/2, you still get the same hop 
> count as that for the router.
> 
> I remember that there was a mention in the FAQ that said that we should be 
> checking for ttl<=1 instead of ttl hitting 0. Were you (Martin/whoever wrote 
> that clause in the FAQ) talking about exactly this??
> 
> Thanks.
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Deliverables
Date: Tue, 07 Feb 2006 22:41:52 -0800
Lines: 14
Distribution: su
Message-ID: <dsc3q9$f02$2@news.Stanford.EDU>
References: <dsc3eq$f5d$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsc3eq$f5d$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10100

nope, not needed.  only thing needed is source code and README as 
specified in General Project Guidelines 
[http://www.stanford.edu/class/cs244a/project_guidelines.html].  Include 
your rtable also.

Andrew Sakai wrote:
> This may have been answered elsewhere, but what are the deliverables for 
> this programming assignment?  Are a .purify file and a purify output 
> necessary this time around?
> 
>     Cheers,
>     Andrew 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: killing processes
Date: Tue, 07 Feb 2006 23:14:40 -0800
Lines: 10
Distribution: su
Message-ID: <43E99A60.6080308@cs.stanford.edu>
References: <Pine.GSO.4.44.0602072221020.27154-100000@saga1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
To: Megan Anneke Wachs <wachs@stanford.edu>
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <Pine.GSO.4.44.0602072221020.27154-100000@saga1.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10101

what topology/server?
> My router was running when my computer hibernated, cutting me off from
> Putty. Apparently it is still running on VNS, because I can't start it
> again. I sshed into the machine I was on to try to kill the process, but
> didn't see it running using top... Anyone know how to reset this?
> 
> Thanks in advance!
> 
> Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS 2
Date: Tue, 7 Feb 2006 23:24:00 -0800
Lines: 6
Distribution: su
Message-ID: <dsc6am$hs7$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10102

I am unable to get a complete traceroute to UCL, probably because some 
router is not responding in the middle. What now?
Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS 2
Date: Tue, 07 Feb 2006 23:38:30 -0800
Lines: 11
Distribution: su
Message-ID: <dsc74f$iif$1@news.Stanford.EDU>
References: <dsc6am$hs7$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsc6am$hs7$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10105

It's probably the end host itself silently dropping the UDP or ICMP 
packet for security reasons.  If it looks like your traceroute reached 
London you can assume the router that doesn't respond is UCL.

Nazia Zaman wrote:
> I am unable to get a complete traceroute to UCL, probably because some 
> router is not responding in the middle. What now?
> Thanks,
> Nazia 
> 
> 
.

Path: shelby.stanford.edu!saga1.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: killing processes
Date: Wed, 8 Feb 2006 00:10:03 -0800
Lines: 18
Distribution: su
Message-ID: <Pine.GSO.4.44.0602080009270.2388-100000@saga1.Stanford.EDU>
References: <Pine.GSO.4.44.0602072221020.27154-100000@saga1.Stanford.EDU>
 <43E99A60.6080308@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <43E99A60.6080308@cs.stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10106

it got reset somehow, thanks!

-Megan

On Tue, 7 Feb 2006, Martin Casado wrote:

> what topology/server?
> > My router was running when my computer hibernated, cutting me off from
> > Putty. Apparently it is still running on VNS, because I can't start it
> > again. I sshed into the machine I was on to try to kill the process, but
> > didn't see it running using top... Anyone know how to reset this?
> >
> > Thanks in advance!
> >
> > Megan
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: compute checksum
Date: Wed, 8 Feb 2006 00:43:27 -0800
Lines: 8
Distribution: su
Message-ID: <dscavc$p6g$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10107

Hi Ari/Matt,

I just want to make sure if it is ok to copy the checksum code from Stevens 
book and quote the source in the comment?

Thanks 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: compute checksum
Date: Wed, 08 Feb 2006 01:13:24 -0800
Lines: 11
Distribution: su
Message-ID: <dsccmd$reo$1@news.Stanford.EDU>
References: <dscavc$p6g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dscavc$p6g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10108

yep

Sutthipong Thavisomboon wrote:
> Hi Ari/Matt,
> 
> I just want to make sure if it is ok to copy the checksum code from Stevens 
> book and quote the source in the comment?
> 
> Thanks 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Check Ethernet Address on Receive?
Date: Wed, 08 Feb 2006 01:40:40 -0800
Lines: 8
Distribution: su
Message-ID: <C00EFC98.2932%jpettit@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Check Ethernet Address on Receive?
Thread-Index: AcYsk7jd90iHTpiGEdq8kwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10109

Should we check the Ethernet destination address when sr_handlepacket is
called?  In real life, the NIC makes sure to only pass traffic destined to
it or the broadcast address (unless it's in promiscuous mode, of course).
Is it safe to assume that we will only receive traffic meant for us to do
something with?

--Justin

.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: return value of sr_send_packet
Date: Wed, 8 Feb 2006 02:10:44 -0800
Lines: 10
Distribution: su
Message-ID: <Pine.GSO.4.44.0602080208250.14840-100000@elaine37.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10110

Are we required to check the return value of sr_send_packet?

The function returns a non-zero value in case of an error and already
prints out an error message. If we are to check the return value of the
function, what is acceptable behaviour? Should we print another message
out? Or should we terminate the router process (this seems extreme).

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ARP trick
Date: Wed, 8 Feb 2006 02:19:28 -0800
Lines: 9
Distribution: su
Message-ID: <Pine.GSO.4.44.0602080215530.15022-100000@elaine37.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10111

Is it ok to do an ARP request just a little before timing out the ARP
entry in the ARP cache. This way, mostly likely we get an ARP reply back
by the time the entry expires and effectively never have to wait on an
ARP timeout. This simply means that instead of timing out the ARP entry
and having a half empty cache, we keep your ARP cache fully utilized. Is
this against the good-citizen behaviour expected on the the network?

--Dinkar.

.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine1.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Src IP for Host Unreachable
Date: Wed, 8 Feb 2006 02:44:32 -0800
Lines: 28
Distribution: su
Message-ID: <Pine.GSO.4.44.0602080229400.2127-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10112

I don't believe this has been asked on this newsgroup, but please point me
in the right direction if it has.

----------

Should the src IP in the Host Unreachable ICMP msg be the interface we
attempted to leave the router from, or the interface the packet came in
on?

Suppose I am trying to reach an app-server and the path my packet follows
is the following:

firewall --> eth0 --> eth1 -xx-> appserver

Except the link to the appserver is broken (I hacked this case into my
code by checking the interface string and not sending ARP requests for the
appserver.  BTW, is there a better way to simulate this condition?)

After the 5 ARP packet timeout, should the resulting Host Unreachable
packet contain eth1 as the src IP of the msg, or should it be eth0?

Currently, my implementation reports eth1 due to the way I queue packets.
I haven't figured out a way to simulate this condition in Clack, so I
haven't been able to check against what that implementation would do.

Thanks in advance for your help,
Peter

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: return value of sr_send_packet
Date: Wed, 08 Feb 2006 03:34:54 -0800
Lines: 14
Distribution: su
Message-ID: <dsckvo$75m$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080208250.14840-100000@elaine37.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602080208250.14840-100000@elaine37.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10113

I guess there's nothing much you can do.  It's fine to just ignore its 
return value.

Dinkar Gupta wrote:
> Are we required to check the return value of sr_send_packet?
> 
> The function returns a non-zero value in case of an error and already
> prints out an error message. If we are to check the return value of the
> function, what is acceptable behaviour? Should we print another message
> out? Or should we terminate the router process (this seems extreme).
> 
> Thanks,
> Dinkar.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: return value of sr_send_packet
Date: Wed, 08 Feb 2006 03:42:35 -0800
Lines: 18
Distribution: su
Message-ID: <dsclfh$7d1$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080208250.14840-100000@elaine37.Stanford.EDU> <dsckvo$75m$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dsckvo$75m$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10114

Is it OK to terminate if sr_send_packet returns with an error?


Matt Falkenhagen wrote:
> I guess there's nothing much you can do.  It's fine to just ignore its 
> return value.
> 
> Dinkar Gupta wrote:
>> Are we required to check the return value of sr_send_packet?
>>
>> The function returns a non-zero value in case of an error and already
>> prints out an error message. If we are to check the return value of the
>> function, what is acceptable behaviour? Should we print another message
>> out? Or should we terminate the router process (this seems extreme).
>>
>> Thanks,
>> Dinkar.
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: return value of sr_send_packet
Date: Wed, 08 Feb 2006 03:59:06 -0800
Lines: 22
Distribution: su
Message-ID: <dscmd4$9dd$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080208250.14840-100000@elaine37.Stanford.EDU> <dsckvo$75m$1@news.Stanford.EDU> <dsclfh$7d1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsclfh$7d1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10115

This is OK too.
Naeim Semsarilar wrote:
> Is it OK to terminate if sr_send_packet returns with an error?
> 
> 
> Matt Falkenhagen wrote:
> 
>> I guess there's nothing much you can do.  It's fine to just ignore its 
>> return value.
>>
>> Dinkar Gupta wrote:
>>
>>> Are we required to check the return value of sr_send_packet?
>>>
>>> The function returns a non-zero value in case of an error and already
>>> prints out an error message. If we are to check the return value of the
>>> function, what is acceptable behaviour? Should we print another message
>>> out? Or should we terminate the router process (this seems extreme).
>>>
>>> Thanks,
>>> Dinkar.
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Stress testing and FTP
Date: Wed, 8 Feb 2006 04:26:11 -0800
Lines: 9
Distribution: su
Message-ID: <dsco4t$ctl$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10116

Will our router be subject to stress testing in grading? That is, will you
run multiple large file download via our router simultaneously?

On Elaine, I tried to FTP 192.168.131.146, which is the app server assigned
to me, but the session didn't start. Is FTP service available?

Thank you!


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Routing traffic from CNN.com
Date: Wed, 8 Feb 2006 13:00:33 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: <dscq1h$e14$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10117

Hi,

Is anyone seeing "The operation timed out when attempting to contact trinity.turner.com" popping up when testing the web server's proxy to cnn.com?  I tried to load the page using Mozilla.  I did a nslookup on trinity.turner.com and nslookup said its IP is 10.189.225.24 (non-authoritative answer though).  I tried to ping it, but ping returned "no reply".

Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: "Tom Wang" <ayanami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: IP header + data in ICMP not embedded right
Date: Wed, 8 Feb 2006 07:17:39 -0800
Lines: 82
Distribution: su
Message-ID: <dsd22h$l26$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10118

  I've been getting this really strange error where, even though I'm
memcpy()'ing in an IP header and 8 bytes of data into my new ICMP reply 
packet, it's only copying the first 10 bytes of the IP header and the rest 
of the packet is missing!  I've hardcoded the memcopy to be at 28 bytes 
(>10) and I'm sure that the memcpy is in the right spot.

  Any ideas what is going on?

  Here's the ethereal dump, note that the IP is stopping at Protocol: UDP 
(0x11) when there should be checksum and more information afterwards.

  The code I'm using is
imcppacket - ptr to imcp start address, +8 is where you insert the original 
ip header
o_ippacket = ptr to original ip header
  memcpy((char *)imcppacket + 8, o_ippacket, sizeof(struct ip) + ICMP_DATA);

No.     Time        Source                Destination           Protocol 
Info
      4 0.003160    192.168.130.182       171.64.15.80          ICMP 
Time-to-live exceeded (Time to live exceeded in transit)

Frame 4 (70 bytes on wire, 70 bytes captured)
    Arrival Time: Feb  8, 2006 07:07:40.353654000
    Time delta from previous packet: 0.000350000 seconds
    Time since reference or first frame: 0.003160000 seconds
    Frame Number: 4
    Packet Length: 70 bytes
    Capture Length: 70 bytes
    Protocols in frame: eth:ip:icmp:ip
Ethernet II, Src: 192.168.130.180 (70:00:00:37:00:01), Dst: 172.24.74.17 
(00:e0:81:04:26:d9)
    Destination: 172.24.74.17 (00:e0:81:04:26:d9)
    Source: 192.168.130.180 (70:00:00:37:00:01)
    Type: IP (0x0800)
    Trailer: EBC0AB400F50C0A882B696BA82A4
    Frame check sequence: 0x00120000 [incorrect, should be 0x6f4c72b7]
Internet Protocol, Src: 192.168.130.182 (192.168.130.182), Dst: 171.64.15.80 
(171.64.15.80)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
        0000 00.. = Differentiated Services Codepoint: Default (0x00)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 38
    Identification: 0x0000 (0)
    Flags: 0x04 (Don't Fragment)
        0... = Reserved bit: Not set
        .1.. = Don't fragment: Set
        ..0. = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: ICMP (0x01)
    Header checksum: 0x3ce8 [correct]
        Good: True
        Bad : False
    Source: 192.168.130.182 (192.168.130.182)
    Destination: 171.64.15.80 (171.64.15.80)
Internet Control Message Protocol
    Type: 11 (Time-to-live exceeded)
    Code: 0 (Time to live exceeded in transit)
    Checksum: 0xde9e [correct]
    Internet Protocol
        Version: 4
        Header length: 20 bytes
        Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
            0000 00.. = Differentiated Services Codepoint: Default (0x00)
            .... ..0. = ECN-Capable Transport (ECT): 0
            .... ...0 = ECN-CE: 0
        Total Length: 38
        Identification: 0x9017 (36887)
        Flags: 0x04 (Don't Fragment)
            0... = Reserved bit: Not set
            .1.. = Don't fragment: Set
            ..0. = More fragments: Not set
        Fragment offset: 0
        Time to live: 1
        Protocol: UDP (0x11)



.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Check Ethernet Address on Receive?
Date: Wed, 08 Feb 2006 09:23:20 -0800
Lines: 10
Distribution: su
Message-ID: <dsd9d7$run$1@news.Stanford.EDU>
References: <C00EFC98.2932%jpettit@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <C00EFC98.2932%jpettit@cs.stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10119

You don't have to check it.

> Should we check the Ethernet destination address when sr_handlepacket is
> called?  In real life, the NIC makes sure to only pass traffic destined to
> it or the broadcast address (unless it's in promiscuous mode, of course).
> Is it safe to assume that we will only receive traffic meant for us to do
> something with?
> 
> --Justin
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ARP trick
Date: Wed, 08 Feb 2006 09:24:20 -0800
Lines: 11
Distribution: su
Message-ID: <dsd9f2$run$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080215530.15022-100000@elaine37.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <Pine.GSO.4.44.0602080215530.15022-100000@elaine37.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10120

That's cute, go ahead.  Be sure to let us know in your README.

> Is it ok to do an ARP request just a little before timing out the ARP
> entry in the ARP cache. This way, mostly likely we get an ARP reply back
> by the time the entry expires and effectively never have to wait on an
> ARP timeout. This simply means that instead of timing out the ARP entry
> and having a half empty cache, we keep your ARP cache fully utilized. Is
> this against the good-citizen behaviour expected on the the network?
> 
> --Dinkar.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stress testing and FTP
Date: Wed, 08 Feb 2006 09:25:19 -0800
Lines: 15
Distribution: su
Message-ID: <dsd9gu$run$3@news.Stanford.EDU>
References: <dsco4t$ctl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dsco4t$ctl$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10121

yes ftp is available but it is reported to only work using pasv mode. 
Stress test with wget to the webservers if you are having problems with
ftp.

..m

> Will our router be subject to stress testing in grading? That is, will you
> run multiple large file download via our router simultaneously?
> 
> On Elaine, I tried to FTP 192.168.131.146, which is the app server assigned
> to me, but the session didn't start. Is FTP service available?
> 
> Thank you!
> 
> 
.

Path: shelby.stanford.edu!saga7.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: traceroute to router
Date: Wed, 8 Feb 2006 09:36:31 -0800
Lines: 11
Distribution: su
Message-ID: <Pine.GSO.4.44.0602080934470.14348-100000@saga7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10122

I'm a bit confused about the correct behavior for traceroutes to the
router other than eth0. If I do a traceroute to eth1 that comes in on
eth0, should I return a
"port unreachable"? What should the source IP be on the ICMP message, eth0
or eth1? Or should
I just drop this packet (playing with traceroute, the behaviour seems
inconsistent)

Thanks in advance,
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 8 Feb 2006 18:20:08 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: <dsdcoo$1o1$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10123

its worth noting that memcpy has undefined behavior if the regions are
overlapping (you can use memmove instead).  Probably not what it is though
you never know.

Tom Wang <ayanami@stanford.edu> wrote:
>   I've been getting this really strange error where, even though I'm
> memcpy()'ing
.

Path: shelby.stanford.edu!not-for-mail
From: Surendra Kumar <surendra@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify UMR
Date: Wed, 08 Feb 2006 10:27:58 -0800
Lines: 38
Distribution: su
Message-ID: <43EA382E.1050604@stanford.edu>
References: <dsbl3s$13s$1@news.Stanford.EDU> <dsbntb$453$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
To: Alan Sheinberg <alanbs@stanford.edu>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
In-Reply-To: <dsbntb$453$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10124


Regarding the stack, for instance, if you have declared a short(2-byte),
the compiler may allocates a full 4-byte for alignment. Hence, when you
use that var, purify cribs about 2-byte UMRs. My guess is, if you pad 
your structures to take out the holes, you might be able to
get rid of those UMRs.

Surendra.

Alan Sheinberg wrote:
> Yeah, I was getting something like that.  I was essentially copying from 
> the raw packet passed by sr_send_packet into a struct and then reading 
> from that struct.  It was then claiming that the struct was not 
> initialized.  The thing is that without actually doing anything beyond 
> this (ie just returning afterward), I was getting those errors.  Not to 
> mention, it's claim was so fundamentally critical that if it was in fact 
> true, my program would not work at all, which wasn't the case.
> 
> The struct that I had created was on the stack.  I then changed it to be 
> malloced and the purify errors went away.  Why this is the case, I don't 
> know, but I am almost sure that there is no credibility to it.  Crazy 
> purify.
> 
> Alan
> 
> Hector Chan wrote:
> 
>> Hi,
>>
>> I am seeing a lot (I mean a lot) of uninitialized memory read (UMR) 
>> errors when I run my router with purify. They seem to be coming from 
>> the function sr_send_packet.  Are we responsible for getting rid of 
>> those UMRs?
>>
>> Thanks,
>>
>>
>> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 08 Feb 2006 10:28:25 -0800
Lines: 18
Distribution: su
Message-ID: <dsdd8a$2ig$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU> <dsdcoo$1o1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsdcoo$1o1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10125

I thought memcpy does behave correctly for overlapping regions.

Either way, I agree with Stefan that the problem is probably someplace 
else and is only showing itself at this step.  Have you tried using 
Purify?  It will tell you during runtime if you read or write from a 
no-no place.

Steve

Stefan Thomas Mohler wrote:
> its worth noting that memcpy has undefined behavior if the regions are
> overlapping (you can use memmove instead).  Probably not what it is though
> you never know.
> 
> Tom Wang <ayanami@stanford.edu> wrote:
> 
>>  I've been getting this really strange error where, even though I'm
>>memcpy()'ing
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Purify UMR
Date: Wed, 08 Feb 2006 10:42:43 -0800
Lines: 47
Distribution: su
Message-ID: <dsde34$37t$1@news.Stanford.EDU>
References: <dsbl3s$13s$1@news.Stanford.EDU> <dsbntb$453$1@news.Stanford.EDU> <43EA382E.1050604@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <43EA382E.1050604@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10126

I have the issue Surendra is talking about when constructing a header 
(using a uint16_t). Since the TA's don't require a clean purify.output 
file I think we can safely ignore this. There's no point hacking your 
code to make purify give a clean output.

Jens

Surendra Kumar wrote:
> 
> Regarding the stack, for instance, if you have declared a short(2-byte),
> the compiler may allocates a full 4-byte for alignment. Hence, when you
> use that var, purify cribs about 2-byte UMRs. My guess is, if you pad 
> your structures to take out the holes, you might be able to
> get rid of those UMRs.
> 
> Surendra.
> 
> Alan Sheinberg wrote:
>> Yeah, I was getting something like that.  I was essentially copying 
>> from the raw packet passed by sr_send_packet into a struct and then 
>> reading from that struct.  It was then claiming that the struct was 
>> not initialized.  The thing is that without actually doing anything 
>> beyond this (ie just returning afterward), I was getting those 
>> errors.  Not to mention, it's claim was so fundamentally critical that 
>> if it was in fact true, my program would not work at all, which wasn't 
>> the case.
>>
>> The struct that I had created was on the stack.  I then changed it to 
>> be malloced and the purify errors went away.  Why this is the case, I 
>> don't know, but I am almost sure that there is no credibility to it.  
>> Crazy purify.
>>
>> Alan
>>
>> Hector Chan wrote:
>>
>>> Hi,
>>>
>>> I am seeing a lot (I mean a lot) of uninitialized memory read (UMR) 
>>> errors when I run my router with purify. They seem to be coming from 
>>> the function sr_send_packet.  Are we responsible for getting rid of 
>>> those UMRs?
>>>
>>> Thanks,
>>>
>>>
>>> Hector
.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Source IP in ICMP Dest unreachable
Date: Wed, 8 Feb 2006 11:02:50 -0800
Lines: 27
Distribution: su
Message-ID: <Pine.GSO.4.44.0602081058060.29661-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10127

I'm confused about the source IP in ICMP destination unreachable.

1. ICMP Port unreachable:

As per the FAQ:
Q. What source address should I use when responding with a port
   unreachable?
A. Use the destination address of the packet you are responding to

Does this mean that we should use the IP of the interface (say eth1) to
which a UDP/TCP packet was sent and not the IP of the receiving interface
(say eth0) as the source IP of the ICMP port unreachable message
generated?


2. ICMP Dest Unreachable:

What source IP should we use here? Should it be the IP of the interface
who sent out the ARP requests that were never answered? Or should it also
be the destination address i.e. the IP of the intended destination that we
were never able to reach?

Thanks,
Dinkar.



.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: traceroute to router
Date: Wed, 08 Feb 2006 11:27:17 -0800
Lines: 22
Distribution: su
Message-ID: <dsdgms$63a$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080934470.14348-100000@saga7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <Pine.GSO.4.44.0602080934470.14348-100000@saga7.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10128

Different routers behave differently. When you traceroute eth1's IP, a 
UDP packet destined for the IP of eth1 comes in through eth0. You then 
generate an ICMP port unreachable and send it back through eth0. The 
source IP of this ICMP error can be either eth1 or eth0.

Look for a thread with subject "traceroute question" in this newsgroup.

-Naeim


Megan Anneke Wachs wrote:
> I'm a bit confused about the correct behavior for traceroutes to the
> router other than eth0. If I do a traceroute to eth1 that comes in on
> eth0, should I return a
> "port unreachable"? What should the source IP be on the ICMP message, eth0
> or eth1? Or should
> I just drop this packet (playing with traceroute, the behaviour seems
> inconsistent)
> 
> Thanks in advance,
> Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 8 Feb 2006 20:36:18 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: <dsdko2$a7m$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU> <dsdcoo$1o1$1@news.Stanford.EDU> <dsdd8a$2ig$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10129

I believe implementors are free to make it work for overlapping regions
but not required to by the standard.  Quote from "man memcpy" on linux:

       The  memcpy()  function  copies  n bytes from memory area src to memory
       area dest.  The memory areas should not overlap.  Use memmove(3) if the
       memory areas do overlap.

But on the elaines I didnt see overlap mentioned when I checked.
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 8 Feb 2006 12:48:36 -0800
Lines: 19
Distribution: su
Message-ID: <dsdlf7$b60$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU> <dsdcoo$1o1$1@news.Stanford.EDU> <dsdd8a$2ig$1@news.Stanford.EDU> <dsdko2$a7m$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10130

I gotta say I admire the Unix aficionados among us.  ;-)

  -- Bruce


"Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
news:dsdko2$a7m$1@news.Stanford.EDU...
>I believe implementors are free to make it work for overlapping regions
> but not required to by the standard.  Quote from "man memcpy" on linux:
>
>       The  memcpy()  function  copies  n bytes from memory area src to 
> memory
>       area dest.  The memory areas should not overlap.  Use memmove(3) if 
> the
>       memory areas do overlap.
>
> But on the elaines I didnt see overlap mentioned when I checked. 


.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Source IP in ICMP Dest unreachable
Date: Wed, 08 Feb 2006 13:19:35 -0800
Lines: 34
Distribution: su
Message-ID: <dsdn99$cq4$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602081058060.29661-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602081058060.29661-100000@elaine4.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10131

Dinkar Gupta wrote:
> I'm confused about the source IP in ICMP destination unreachable.
> 
> 1. ICMP Port unreachable:
> 
> As per the FAQ:
> Q. What source address should I use when responding with a port
>    unreachable?
> A. Use the destination address of the packet you are responding to
> 
> Does this mean that we should use the IP of the interface (say eth1) to
> which a UDP/TCP packet was sent and not the IP of the receiving interface
> (say eth0) as the source IP of the ICMP port unreachable message
> generated?
> 
> 
> 2. ICMP Dest Unreachable:
> 
> What source IP should we use here? Should it be the IP of the interface
> who sent out the ARP requests that were never answered? Or should it also
> be the destination address i.e. the IP of the intended destination that we
> were never able to reach?
> 

A question along the same line. What is the expected behavior when I try 
to wget an IP that is host unreachable? I could see that my router did 
send ICMP host unreachable msgs when that happened, but wget just sat 
there and waited forever.

> Thanks,
> Dinkar.
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 08 Feb 2006 14:22:48 -0800
Lines: 26
Distribution: su
Message-ID: <dsdqvn$h7n$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU> <dsdcoo$1o1$1@news.Stanford.EDU> <dsdd8a$2ig$1@news.Stanford.EDU> <dsdko2$a7m$1@news.Stanford.EDU> <dsdlf7$b60$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsdlf7$b60$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10132

memmove(..) is the correct way to handle overlapping memory
regions.

..m

> I gotta say I admire the Unix aficionados among us.  ;-)
> 
>   -- Bruce
> 
> 
> "Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
> news:dsdko2$a7m$1@news.Stanford.EDU...
> 
>>I believe implementors are free to make it work for overlapping regions
>>but not required to by the standard.  Quote from "man memcpy" on linux:
>>
>>      The  memcpy()  function  copies  n bytes from memory area src to 
>>memory
>>      area dest.  The memory areas should not overlap.  Use memmove(3) if 
>>the
>>      memory areas do overlap.
>>
>>But on the elaines I didnt see overlap mentioned when I checked. 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Tom Wang" <ayanami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 8 Feb 2006 14:55:28 -0800
Lines: 36
Distribution: su
Message-ID: <dsdssv$jat$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU> <dsdcoo$1o1$1@news.Stanford.EDU> <dsdd8a$2ig$1@news.Stanford.EDU> <dsdko2$a7m$1@news.Stanford.EDU> <dsdlf7$b60$1@news.Stanford.EDU> <dsdqvn$h7n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10133

  Thanks for the replies, but changing to memmove() as well as
  using purify have had no effect.

  Did notice something weird.. if i memcpy(ippacket), it works.  If i 
memcpy(icmppacket), it doesn't.  Maybe it's expecting a certain format based 
on the protocol that I'm not providing correctly and that's why Ethereal is 
giving out weird results?

"Martin Casado" <casado@cs.stanford.edu> wrote in message 
news:dsdqvn$h7n$1@news.Stanford.EDU...
> memmove(..) is the correct way to handle overlapping memory
> regions.
>
> .m
>
>> I gotta say I admire the Unix aficionados among us.  ;-)
>>
>>   -- Bruce
>>
>>
>> "Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
>> news:dsdko2$a7m$1@news.Stanford.EDU...
>>
>>>I believe implementors are free to make it work for overlapping regions
>>>but not required to by the standard.  Quote from "man memcpy" on linux:
>>>
>>>      The  memcpy()  function  copies  n bytes from memory area src to 
>>> memory
>>>      area dest.  The memory areas should not overlap.  Use memmove(3) if 
>>> the
>>>      memory areas do overlap.
>>>
>>>But on the elaines I didnt see overlap mentioned when I checked.
>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 08 Feb 2006 15:00:04 -0800
Lines: 45
Distribution: su
Message-ID: <dsdt4e$jfe$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU> <dsdcoo$1o1$1@news.Stanford.EDU> <dsdd8a$2ig$1@news.Stanford.EDU> <dsdko2$a7m$1@news.Stanford.EDU> <dsdlf7$b60$1@news.Stanford.EDU> <dsdqvn$h7n$1@news.Stanford.EDU> <dsdssv$jat$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsdssv$jat$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10134

Looks like you're not setting IP total length correctly.

I'm guessing the "Trailer" field in the Ethernet frame is the memory 
you're missing.

Tom Wang wrote:
>   Thanks for the replies, but changing to memmove() as well as
>   using purify have had no effect.
> 
>   Did notice something weird.. if i memcpy(ippacket), it works.  If i 
> memcpy(icmppacket), it doesn't.  Maybe it's expecting a certain format based 
> on the protocol that I'm not providing correctly and that's why Ethereal is 
> giving out weird results?
> 
> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
> news:dsdqvn$h7n$1@news.Stanford.EDU...
> 
>>memmove(..) is the correct way to handle overlapping memory
>>regions.
>>
>>.m
>>
>>
>>>I gotta say I admire the Unix aficionados among us.  ;-)
>>>
>>>  -- Bruce
>>>
>>>
>>>"Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
>>>news:dsdko2$a7m$1@news.Stanford.EDU...
>>>
>>>
>>>>I believe implementors are free to make it work for overlapping regions
>>>>but not required to by the standard.  Quote from "man memcpy" on linux:
>>>>
>>>>     The  memcpy()  function  copies  n bytes from memory area src to 
>>>>memory
>>>>     area dest.  The memory areas should not overlap.  Use memmove(3) if 
>>>>the
>>>>     memory areas do overlap.
>>>>
>>>>But on the elaines I didnt see overlap mentioned when I checked.
>>>
>>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Re: Routing traffic from CNN.com
Date: Wed, 8 Feb 2006 15:05:34 -0800
Lines: 23
Distribution: su
Message-ID: <dsdtg2$jv0$1@news.Stanford.EDU>
References: <dscq1h$e14$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10135

For what it's worth, I see the exact same thing with the proxied cnn.com. 
Take that with a grain of salt--I'm also still debugging some mysterious 
"rapid shutdown" features....

--Thad


"Hector Chan" <chanhp@Stanford.EDU> wrote in message 
news:dscq1h$e14$1@news.Stanford.EDU...
> Hi,
>
> Is anyone seeing "The operation timed out when attempting to contact 
> trinity.turner.com" popping up when testing the web server's proxy to 
> cnn.com?  I tried to load the page using Mozilla.  I did a nslookup on 
> trinity.turner.com and nslookup said its IP is 10.189.225.24 
> (non-authoritative answer though).  I tried to ping it, but ping returned 
> "no reply".
>
> Thanks,
>
> Hector 


.

Path: shelby.stanford.edu!elaine24.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Routing traffic from CNN.com
Date: Wed, 8 Feb 2006 15:35:22 -0800
Lines: 30
Distribution: su
Message-ID: <Pine.GSO.4.44.0602081530230.26058-100000@elaine24.Stanford.EDU>
References: <dscq1h$e14$1@news.Stanford.EDU> <dsdtg2$jv0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dsdtg2$jv0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10136

I had the same issue consistently. I was able to download the .iso image
successfully, so it's probably some ad/pop-up.

On Wed, 8 Feb 2006, Thad Hughes wrote:

> For what it's worth, I see the exact same thing with the proxied cnn.com.
> Take that with a grain of salt--I'm also still debugging some mysterious
> "rapid shutdown" features....
>
> --Thad
>
>
> "Hector Chan" <chanhp@Stanford.EDU> wrote in message
> news:dscq1h$e14$1@news.Stanford.EDU...
> > Hi,
> >
> > Is anyone seeing "The operation timed out when attempting to contact
> > trinity.turner.com" popping up when testing the web server's proxy to
> > cnn.com?  I tried to load the page using Mozilla.  I did a nslookup on
> > trinity.turner.com and nslookup said its IP is 10.189.225.24
> > (non-authoritative answer though).  I tried to ping it, but ping returned
> > "no reply".
> >
> > Thanks,
> >
> > Hector
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Tom Wang" <ayanami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: IP header + data in ICMP not embedded right
Date: Wed, 8 Feb 2006 15:37:58 -0800
Lines: 53
Distribution: su
Message-ID: <dsdvcl$m26$1@news.Stanford.EDU>
References: <dsd22h$l26$1@news.Stanford.EDU> <dsdcoo$1o1$1@news.Stanford.EDU> <dsdd8a$2ig$1@news.Stanford.EDU> <dsdko2$a7m$1@news.Stanford.EDU> <dsdlf7$b60$1@news.Stanford.EDU> <dsdqvn$h7n$1@news.Stanford.EDU> <dsdssv$jat$1@news.Stanford.EDU> <dsdt4e$jfe$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10137

  That was it.  Thanks, that helped a LOT.

- Tom

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dsdt4e$jfe$1@news.Stanford.EDU...
> Looks like you're not setting IP total length correctly.
>
> I'm guessing the "Trailer" field in the Ethernet frame is the memory 
> you're missing.
>
> Tom Wang wrote:
>>   Thanks for the replies, but changing to memmove() as well as
>>   using purify have had no effect.
>>
>>   Did notice something weird.. if i memcpy(ippacket), it works.  If i 
>> memcpy(icmppacket), it doesn't.  Maybe it's expecting a certain format 
>> based on the protocol that I'm not providing correctly and that's why 
>> Ethereal is giving out weird results?
>>
>> "Martin Casado" <casado@cs.stanford.edu> wrote in message 
>> news:dsdqvn$h7n$1@news.Stanford.EDU...
>>
>>>memmove(..) is the correct way to handle overlapping memory
>>>regions.
>>>
>>>.m
>>>
>>>
>>>>I gotta say I admire the Unix aficionados among us.  ;-)
>>>>
>>>>  -- Bruce
>>>>
>>>>
>>>>"Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
>>>>news:dsdko2$a7m$1@news.Stanford.EDU...
>>>>
>>>>
>>>>>I believe implementors are free to make it work for overlapping regions
>>>>>but not required to by the standard.  Quote from "man memcpy" on linux:
>>>>>
>>>>>     The  memcpy()  function  copies  n bytes from memory area src to 
>>>>> memory
>>>>>     area dest.  The memory areas should not overlap.  Use memmove(3) 
>>>>> if the
>>>>>     memory areas do overlap.
>>>>>
>>>>>But on the elaines I didnt see overlap mentioned when I checked.
>>>>
>>>>
>> 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Src IP for Host Unreachable
Date: Wed, 08 Feb 2006 16:50:35 -0800
Lines: 32
Distribution: su
Message-ID: <dse3kq$qp0$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080229400.2127-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602080229400.2127-100000@elaine1.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10138

Use the interface that the packet is sent out of.



> I don't believe this has been asked on this newsgroup, but please point me
> in the right direction if it has.
> 
> ----------
> 
> Should the src IP in the Host Unreachable ICMP msg be the interface we
> attempted to leave the router from, or the interface the packet came in
> on?
> 
> Suppose I am trying to reach an app-server and the path my packet follows
> is the following:
> 
> firewall --> eth0 --> eth1 -xx-> appserver
> 
> Except the link to the appserver is broken (I hacked this case into my
> code by checking the interface string and not sending ARP requests for the
> appserver.  BTW, is there a better way to simulate this condition?)
> 
> After the 5 ARP packet timeout, should the resulting Host Unreachable
> packet contain eth1 as the src IP of the msg, or should it be eth0?
> 
> Currently, my implementation reports eth1 due to the way I queue packets.
> I haven't figured out a way to simulate this condition in Clack, so I
> haven't been able to check against what that implementation would do.
> 
> Thanks in advance for your help,
> Peter
> 
.

Path: shelby.stanford.edu!elaine33.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Src IP for Host Unreachable
Date: Wed, 8 Feb 2006 21:59:00 -0800
Lines: 43
Distribution: su
Message-ID: <Pine.GSO.4.44.0602082157510.29551-100000@elaine33.Stanford.EDU>
References: <Pine.GSO.4.44.0602080229400.2127-100000@elaine1.Stanford.EDU>
 <dse3kq$qp0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dse3kq$qp0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10139

Just curious, where does it say to use the interface ip addr of the
interface the packet is supposed to be sent out of?  I cannot find any RFC
on this...is this just an implementation choice?  Would it be wrong to use
the ip of the interface from which the packet came?

-Wai Kei

On Wed, 8 Feb 2006, Martin Casado wrote:

> Use the interface that the packet is sent out of.
>
>
>
> > I don't believe this has been asked on this newsgroup, but please point me
> > in the right direction if it has.
> >
> > ----------
> >
> > Should the src IP in the Host Unreachable ICMP msg be the interface we
> > attempted to leave the router from, or the interface the packet came in
> > on?
> >
> > Suppose I am trying to reach an app-server and the path my packet follows
> > is the following:
> >
> > firewall --> eth0 --> eth1 -xx-> appserver
> >
> > Except the link to the appserver is broken (I hacked this case into my
> > code by checking the interface string and not sending ARP requests for the
> > appserver.  BTW, is there a better way to simulate this condition?)
> >
> > After the 5 ARP packet timeout, should the resulting Host Unreachable
> > packet contain eth1 as the src IP of the msg, or should it be eth0?
> >
> > Currently, my implementation reports eth1 due to the way I queue packets.
> > I haven't figured out a way to simulate this condition in Clack, so I
> > haven't been able to check against what that implementation would do.
> >
> > Thanks in advance for your help,
> > Peter
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Src IP for Host Unreachable
Date: Wed, 08 Feb 2006 22:06:12 -0800
Lines: 46
Distribution: su
Message-ID: <dsem3f$g8r$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080229400.2127-100000@elaine1.Stanford.EDU> <dse3kq$qp0$1@news.Stanford.EDU> <Pine.GSO.4.44.0602082157510.29551-100000@elaine33.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <Pine.GSO.4.44.0602082157510.29551-100000@elaine33.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10140

As long as ping responds correctly, its fine with me.  I just checked 
what ios and Linux do.


> Just curious, where does it say to use the interface ip addr of the
> interface the packet is supposed to be sent out of?  I cannot find any RFC
> on this...is this just an implementation choice?  Would it be wrong to use
> the ip of the interface from which the packet came?
> 
> -Wai Kei
> 
> On Wed, 8 Feb 2006, Martin Casado wrote:
> 
>> Use the interface that the packet is sent out of.
>>
>>
>>
>>> I don't believe this has been asked on this newsgroup, but please point me
>>> in the right direction if it has.
>>>
>>> ----------
>>>
>>> Should the src IP in the Host Unreachable ICMP msg be the interface we
>>> attempted to leave the router from, or the interface the packet came in
>>> on?
>>>
>>> Suppose I am trying to reach an app-server and the path my packet follows
>>> is the following:
>>>
>>> firewall --> eth0 --> eth1 -xx-> appserver
>>>
>>> Except the link to the appserver is broken (I hacked this case into my
>>> code by checking the interface string and not sending ARP requests for the
>>> appserver.  BTW, is there a better way to simulate this condition?)
>>>
>>> After the 5 ARP packet timeout, should the resulting Host Unreachable
>>> packet contain eth1 as the src IP of the msg, or should it be eth0?
>>>
>>> Currently, my implementation reports eth1 due to the way I queue packets.
>>> I haven't figured out a way to simulate this condition in Clack, so I
>>> haven't been able to check against what that implementation would do.
>>>
>>> Thanks in advance for your help,
>>> Peter
>>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Src IP for Host Unreachable
Date: Wed, 08 Feb 2006 23:37:35 -0800
Lines: 55
Distribution: su
Message-ID: <dserer$l2t$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602080229400.2127-100000@elaine1.Stanford.EDU> <dse3kq$qp0$1@news.Stanford.EDU> <Pine.GSO.4.44.0602082157510.29551-100000@elaine33.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602082157510.29551-100000@elaine33.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10141

Since you're curious, RFC 1812 says:

4.3.2.4 ICMP Message Source Address

    Except where this document specifies otherwise, the IP source address
    in an ICMP message originated by the router MUST be one of the IP
    addresses associated with the physical interface over which the ICMP
    message is transmitted.

Wai Kei So wrote:
> Just curious, where does it say to use the interface ip addr of the
> interface the packet is supposed to be sent out of?  I cannot find any RFC
> on this...is this just an implementation choice?  Would it be wrong to use
> the ip of the interface from which the packet came?
> 
> -Wai Kei
> 
> On Wed, 8 Feb 2006, Martin Casado wrote:
> 
> 
>>Use the interface that the packet is sent out of.
>>
>>
>>
>>
>>>I don't believe this has been asked on this newsgroup, but please point me
>>>in the right direction if it has.
>>>
>>>----------
>>>
>>>Should the src IP in the Host Unreachable ICMP msg be the interface we
>>>attempted to leave the router from, or the interface the packet came in
>>>on?
>>>
>>>Suppose I am trying to reach an app-server and the path my packet follows
>>>is the following:
>>>
>>>firewall --> eth0 --> eth1 -xx-> appserver
>>>
>>>Except the link to the appserver is broken (I hacked this case into my
>>>code by checking the interface string and not sending ARP requests for the
>>>appserver.  BTW, is there a better way to simulate this condition?)
>>>
>>>After the 5 ARP packet timeout, should the resulting Host Unreachable
>>>packet contain eth1 as the src IP of the msg, or should it be eth0?
>>>
>>>Currently, my implementation reports eth1 due to the way I queue packets.
>>>I haven't figured out a way to simulate this condition in Clack, so I
>>>haven't been able to check against what that implementation would do.
>>>
>>>Thanks in advance for your help,
>>>Peter
>>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: ps2, question 7
Date: Thu, 9 Feb 2006 09:05:46 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: <dsf0la$s8j$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10142

question 7 on ps2 says: 
"determine which options you need so that ... the round-trip time is 
not calculated on any of the intermediate routers" 

i can't find any option that seems to relate to intermediate routers. 
is this a typo in the assignment, or do i need to keep looking? 

thanks, 
ryan. 

.

Path: shelby.stanford.edu!elaine25.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ps2, question 7
Date: Thu, 9 Feb 2006 01:25:59 -0800
Lines: 24
Distribution: su
Message-ID: <Pine.GSO.4.44.0602090123060.25522-100000@elaine25.Stanford.EDU>
References: <dsf0la$s8j$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Ryan Matthew Smith <rysmi@Stanford.EDU>
In-Reply-To: <dsf0la$s8j$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10143


Ryan,

there is a way to do it by playing around with what TTL value we begin
with.


thanks,
Vijay.

On Thu, 9 Feb 2006, Ryan Matthew Smith wrote:

> question 7 on ps2 says:
> "determine which options you need so that ... the round-trip time is
> not calculated on any of the intermediate routers"
>
> i can't find any option that seems to relate to intermediate routers.
> is this a typo in the assignment, or do i need to keep looking?
>
> thanks,
> ryan.
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS2 Q1b
Date: Thu, 9 Feb 2006 01:40:43 -0800
Lines: 12
Distribution: su
Message-ID: <dsf2mv$ue$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10144

Hi TAs,

The question asks us to draw the topology of the first 3 routers. What 
exactly does 'topology' refer to in the context of a router? Is the question 
basically asking us to draw the routers with the IP addresses of the 
interfaces that handle outgoing and incoming packets when we send a message 
out to Paris, similar to the one that Prof. McKeown showed in class? Thanks 
in advance

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS2 Q2
Date: Thu, 09 Feb 2006 01:59:21 -0800
Lines: 5
Distribution: su
Message-ID: <dsf3q1$1m9$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10145

In company X's prefix 119.12.72/25, since the length of the prefix is 
25, shouldn't a value for the 4th part of the quad be given? Or is it 
assumed to be 0 if not given, i.e. 119.12.72.0/25.

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q1b
Date: Thu, 09 Feb 2006 03:34:21 -0800
Lines: 15
Distribution: su
Message-ID: <dsf9ap$67i$1@news.Stanford.EDU>
References: <dsf2mv$ue$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsf2mv$ue$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10146

yep

Ramanan wrote:
> Hi TAs,
> 
> The question asks us to draw the topology of the first 3 routers. What 
> exactly does 'topology' refer to in the context of a router? Is the question 
> basically asking us to draw the routers with the IP addresses of the 
> interfaces that handle outgoing and incoming packets when we send a message 
> out to Paris, similar to the one that Prof. McKeown showed in class? Thanks 
> in advance
> 
> Ram 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q2
Date: Thu, 09 Feb 2006 03:34:48 -0800
Lines: 9
Distribution: su
Message-ID: <dsf9bj$67i$2@news.Stanford.EDU>
References: <dsf3q1$1m9$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsf3q1$1m9$3@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10147

i'm not sure if it's common notation, but you can assume it's 0 for this 
problem

Naeim Semsarilar wrote:
> In company X's prefix 119.12.72/25, since the length of the prefix is 
> 25, shouldn't a value for the 4th part of the quad be given? Or is it 
> assumed to be 0 if not given, i.e. 119.12.72.0/25.
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: clarify: silent dropping
Date: Thu, 9 Feb 2006 12:21:33 -0800
Lines: 19
Distribution: su
Message-ID: <dsg8fh$7jo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10148

i just want to be sure i've got this right.  from what i've read, the 
follow four statements are acceptable behavior for our router:

(1) we should silently drop any packet which is neither ARP nor IP.

(2) we should silently drop any ARP packet that's not either a request 
or a reply.

(3) we silently drop all ICMP packets which are addressed to us, but 
which are not echo requests.

(4) we send port unreachable responses for any IP packet addressed to 
our router, which is not an of type ICMP.

if any of these statments are false, let me know.

thanks,
greg

.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: clarify: silent dropping
Date: Thu, 9 Feb 2006 12:49:34 -0800
Lines: 28
Distribution: su
Message-ID: <dsg9sm$923$1@news.Stanford.EDU>
References: <dsg8fh$7jo$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10149

I did the same as you except for (4), I only send port unreachable for
TCP/UDP packets and silently drop other types (the TA said that was ok).

Waynn

"Greg Corrado" <gcorrado@stanford.edu> wrote in message
news:dsg8fh$7jo$1@news.Stanford.EDU...
> i just want to be sure i've got this right.  from what i've read, the
> follow four statements are acceptable behavior for our router:
>
> (1) we should silently drop any packet which is neither ARP nor IP.
>
> (2) we should silently drop any ARP packet that's not either a request
> or a reply.
>
> (3) we silently drop all ICMP packets which are addressed to us, but
> which are not echo requests.
>
> (4) we send port unreachable responses for any IP packet addressed to
> our router, which is not an of type ICMP.
>
> if any of these statments are false, let me know.
>
> thanks,
> greg
>


.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: clarify: silent dropping
Date: Thu, 09 Feb 2006 13:19:08 -0800
Lines: 39
Distribution: su
Message-ID: <C010F1CC.29C2%jpettit@cs.stanford.edu>
References: <dsg8fh$7jo$1@news.Stanford.EDU> <dsg9sm$923$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: clarify: silent dropping
Thread-Index: AcYtvnZktOT5zJmxEdqqjwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10150

I think your description is right, since there is a Protocol Unreachable
ICMP message (Type=3 and Code=2).

--Justin


On 2/9/06 12:49 PM, in article dsg9sm$923$1@news.Stanford.EDU, "Waynn Lue"
<wlue@stanford.edu> wrote:

> I did the same as you except for (4), I only send port unreachable for
> TCP/UDP packets and silently drop other types (the TA said that was ok).
> 
> Waynn
> 
> "Greg Corrado" <gcorrado@stanford.edu> wrote in message
> news:dsg8fh$7jo$1@news.Stanford.EDU...
>> i just want to be sure i've got this right.  from what i've read, the
>> follow four statements are acceptable behavior for our router:
>> 
>> (1) we should silently drop any packet which is neither ARP nor IP.
>> 
>> (2) we should silently drop any ARP packet that's not either a request
>> or a reply.
>> 
>> (3) we silently drop all ICMP packets which are addressed to us, but
>> which are not echo requests.
>> 
>> (4) we send port unreachable responses for any IP packet addressed to
>> our router, which is not an of type ICMP.
>> 
>> if any of these statments are false, let me know.
>> 
>> thanks,
>> greg
>> 
> 
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Assignment 3 deadlines?
Date: Thu, 9 Feb 2006 13:26:01 -0800
Lines: 11
Distribution: su
Message-ID: <dsgc1d$avv$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10151

 Hi ,
The assignment 3 page says these are the deadlines for asisgnment 3, but the 
main schedule page says assignment 3 is due on 8th March, which doesn't 
coincide with HW3.C, so what are the correct deadlines?

Thanks,
HW3.A Due Wednesday, Feb 23rd, 5pm
HW3.B Due Wednesday, Mar 2nd, 5pm
HW3.C Due Friday, Mar 4th, 5pm 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assignment 3 deadlines?
Date: Thu, 09 Feb 2006 13:48:48 -0800
Lines: 18
Distribution: su
Message-ID: <dsgdas$cfa$1@news.Stanford.EDU>
References: <dsgc1d$avv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsgc1d$avv$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10152

Sry, hadn't updated that page.  It's updated now.

HW3.A Due Monday, Feb 27 2006, 5pm
HW3.B Due Monday, Mar 6 2006, 5pm
HW3.C Due Wednesday, Mar 8, 2006, 5pm

Nazia Zaman wrote:
>  Hi ,
> The assignment 3 page says these are the deadlines for asisgnment 3, but the 
> main schedule page says assignment 3 is due on 8th March, which doesn't 
> coincide with HW3.C, so what are the correct deadlines?
> 
> Thanks,
> HW3.A Due Wednesday, Feb 23rd, 5pm
> HW3.B Due Wednesday, Mar 2nd, 5pm
> HW3.C Due Friday, Mar 4th, 5pm 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: clarify: silent dropping
Date: Thu, 9 Feb 2006 13:45:08 -0800
Lines: 44
Distribution: su
Message-ID: <dsgdc7$bu4$1@news.Stanford.EDU>
References: <dsg8fh$7jo$1@news.Stanford.EDU> <dsg9sm$923$1@news.Stanford.EDU> <C010F1CC.29C2%jpettit@cs.stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10153

so is the consensus that BOTH of these behaviors are okay?
(a) send port unreachable for all non ICMP/IP packets address to us
(b) send port unreachable only for TCP/IP and UDP/IP packets
	address to us, and silently drop the rest


On 2006-02-09 13:19:08 -0800, Justin Pettit <jpettit@cs.stanford.edu> said:

> I think your description is right, since there is a Protocol Unreachable
> ICMP message (Type=3 and Code=2).
> 
> --Justin
> 
> 
> On 2/9/06 12:49 PM, in article dsg9sm$923$1@news.Stanford.EDU, "Waynn Lue"
> <wlue@stanford.edu> wrote:
> 
>> I did the same as you except for (4), I only send port unreachable for
>> TCP/UDP packets and silently drop other types (the TA said that was ok).
>> 
>> Waynn
>> 
>> "Greg Corrado" <gcorrado@stanford.edu> wrote in message
>> news:dsg8fh$7jo$1@news.Stanford.EDU...
>>> i just want to be sure i've got this right.  from what i've read, the
>>> follow four statements are acceptable behavior for our router:
>>> 
>>> (1) we should silently drop any packet which is neither ARP nor IP.
>>> 
>>> (2) we should silently drop any ARP packet that's not either a request
>>> or a reply.
>>> 
>>> (3) we silently drop all ICMP packets which are addressed to us, but
>>> which are not echo requests.
>>> 
>>> (4) we send port unreachable responses for any IP packet addressed to
>>> our router, which is not an of type ICMP.
>>> 
>>> if any of these statments are false, let me know.
>>> 
>>> thanks,
>>> greg


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Midterm Readings
Date: Thu, 9 Feb 2006 19:34:59 -0800
Lines: 9
Distribution: su
Message-ID: <dsh1l7$455$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10154

Hi,

Can you guys give a list of readings that we need to do from the book(s) for 
he midterm?

Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q1b
Date: Thu, 09 Feb 2006 20:43:12 -0800
Lines: 25
Distribution: su
Message-ID: <dsh5km$7c1$1@news.Stanford.EDU>
References: <dsf2mv$ue$1@news.Stanford.EDU> <dsf9ap$67i$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dsf9ap$67i$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10155

I'm going crazy with this. Can someone give me a hint how to determine 
the subnet mask for the interface of a router?, like in one of Prof. 
McKeown's slides. It seems to me that ifconfig can only query the 
interfaces of the localhost, not a remote router.  What am I missing here?

Thanks,
Will



Matt Falkenhagen wrote:
> yep
> 
> Ramanan wrote:
>> Hi TAs,
>>
>> The question asks us to draw the topology of the first 3 routers. What 
>> exactly does 'topology' refer to in the context of a router? Is the 
>> question basically asking us to draw the routers with the IP addresses 
>> of the interfaces that handle outgoing and incoming packets when we 
>> send a message out to Paris, similar to the one that Prof. McKeown 
>> showed in class? Thanks in advance
>>
>> Ram
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: P2 Q6 how far across..
Date: Fri, 10 Feb 2006 04:45:42 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: <dsh5pm$7i5$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10156

What is the unit for the measurement of how far?  Is it milliseconds or
meters?  If it a distance unit (ie meters), how can we measure that given
we only got the time.

Also, it is impossible to get the number of hops to University of London
because the later hops did not go through.  So what do we do in this case?

thanks,
Sam
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS2 1.b
Date: Thu, 09 Feb 2006 20:51:40 -0800
Lines: 4
Distribution: su
Message-ID: <dsh64c$853$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10157

I can't ping some of the interfaces of the sweet hall router. I notice
they don't have "171.64" prefix. What are they?

--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS2 Q6(h)
Date: Thu, 09 Feb 2006 20:51:38 -0800
Lines: 2
Distribution: su
Message-ID: <dsh64u$85p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10158

I can't see how I can use the -n option to time how long it takes to do 
a reverse DNS lookup. Any hints?
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS2 Q7b (ii)
Date: Thu, 9 Feb 2006 21:27:04 -0800
Lines: 20
Distribution: su
Message-ID: <dsh879$9vp$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10159

Hello,

The question says that the second link is the slowest link in the path to 
the destination. If we assume that there are more than 2 links to reach the 
destination, then it doesn't seem to be possible that the packets can arrive 
back to back regardless of how small T is.
Say for example router X transmits P1 and P2 back-to-back to router Y along 
the second link. Router Y will receive P1 and start sending it out on to the 
next hop as soon as the whole packet has arrived. However, since the 
outgoing link on Y is faster than the incoming link, P1 will be sent out 
completely before router Y can finish receiving P2. Since Router Y must wait 
till it finishes receiving P2 before transmitting it out, there will 
definitely be a gap between the two packets regardless of how close we send 
the two packets. Thus it seems like there can't be an answer to this 
question. Does this explanation make sense? Or am I missing something? 
Thanks in advance,

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q1b
Date: Thu, 09 Feb 2006 21:32:03 -0800
Lines: 34
Distribution: su
Message-ID: <dsh8gk$a8p$1@news.Stanford.EDU>
References: <dsf2mv$ue$1@news.Stanford.EDU> <dsf9ap$67i$1@news.Stanford.EDU> <dsh5km$7c1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsh5km$7c1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10160

You're right you can't you ifconfig.

You have to do a little guesswork for this.  You know the ingress and 
egress interfaces between two routers must be on the same subnet.  From 
that you should be able to approximate a subnet mask.

Will Palmeri wrote:
> I'm going crazy with this. Can someone give me a hint how to determine 
> the subnet mask for the interface of a router?, like in one of Prof. 
> McKeown's slides. It seems to me that ifconfig can only query the 
> interfaces of the localhost, not a remote router.  What am I missing here?
> 
> Thanks,
> Will
> 
> 
> 
> Matt Falkenhagen wrote:
> 
>> yep
>>
>> Ramanan wrote:
>>
>>> Hi TAs,
>>>
>>> The question asks us to draw the topology of the first 3 routers. 
>>> What exactly does 'topology' refer to in the context of a router? Is 
>>> the question basically asking us to draw the routers with the IP 
>>> addresses of the interfaces that handle outgoing and incoming packets 
>>> when we send a message out to Paris, similar to the one that Prof. 
>>> McKeown showed in class? Thanks in advance
>>>
>>> Ram
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: P2 Q6 how far across..
Date: Thu, 09 Feb 2006 21:35:07 -0800
Lines: 17
Distribution: su
Message-ID: <dsh8mc$a8p$2@news.Stanford.EDU>
References: <dsh5pm$7i5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsh5pm$7i5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10161

Samantha Kwan Chan wrote:
> What is the unit for the measurement of how far?  Is it milliseconds or
> meters?  If it a distance unit (ie meters), how can we measure that given
> we only got the time.

use the traceroute timing results to approximate the distance (estimate 
how fast the packets are traveling)

> 
> Also, it is impossible to get the number of hops to University of London
> because the later hops did not go through.  So what do we do in this case?

please see thread "PS 2" above

> 
> thanks,
> Sam
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q6(h)
Date: Thu, 09 Feb 2006 21:38:46 -0800
Lines: 7
Distribution: su
Message-ID: <dsh8t7$agb$1@news.Stanford.EDU>
References: <dsh64u$85p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsh64u$85p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10162

traceroute with -n does not do reverse DNS lookup, without -n does.  see 
if you can come up with an approximation, or if you find you can't, 
explain why.

Naeim Semsarilar wrote:
> I can't see how I can use the -n option to time how long it takes to do 
> a reverse DNS lookup. Any hints?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q7b (ii)
Date: Thu, 09 Feb 2006 21:49:24 -0800
Lines: 24
Distribution: su
Message-ID: <dsh9h4$b65$1@news.Stanford.EDU>
References: <dsh879$9vp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsh879$9vp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10163

come up with the max value of T such that it is possible for the packets 
to arrive back to back.

Ramanan wrote:
> Hello,
> 
> The question says that the second link is the slowest link in the path to 
> the destination. If we assume that there are more than 2 links to reach the 
> destination, then it doesn't seem to be possible that the packets can arrive 
> back to back regardless of how small T is.
> Say for example router X transmits P1 and P2 back-to-back to router Y along 
> the second link. Router Y will receive P1 and start sending it out on to the 
> next hop as soon as the whole packet has arrived. However, since the 
> outgoing link on Y is faster than the incoming link, P1 will be sent out 
> completely before router Y can finish receiving P2. Since Router Y must wait 
> till it finishes receiving P2 before transmitting it out, there will 
> definitely be a gap between the two packets regardless of how close we send 
> the two packets. Thus it seems like there can't be an answer to this 
> question. Does this explanation make sense? Or am I missing something? 
> Thanks in advance,
> 
> Ram 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Ps Q6 i
Date: Fri, 10 Feb 2006 05:57:50 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: <dsha0u$bah$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10164

I am unsure how to approach this.  I try using the traceroute -s option with the ip
of medc-bbr2 but I am not getting any response.  Am I onto the right idea
or am I completely off the wall?  Some hints please.

thanks,
Sam
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Ps Q6 i
Date: Thu, 09 Feb 2006 22:56:19 -0800
Lines: 10
Distribution: su
Message-ID: <dshdek$ee7$1@news.Stanford.EDU>
References: <dsha0u$bah$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsha0u$bah$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10165

you are off, -s sets the source IP, so the responses are going to go to 
medc-bbr2.  look for another option.

Samantha Kwan Chan wrote:
> I am unsure how to approach this.  I try using the traceroute -s option with the ip
> of medc-bbr2 but I am not getting any response.  Am I onto the right idea
> or am I completely off the wall?  Some hints please.
> 
> thanks,
> Sam
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q7b (ii)
Date: Fri, 10 Feb 2006 00:27:04 -0800
Lines: 32
Distribution: su
Message-ID: <dshior$mce$1@news.Stanford.EDU>
References: <dsh879$9vp$1@news.Stanford.EDU> <dsh9h4$b65$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10166

Maybe I should rephrase my question. Should we assume that the routers 
between the source and destination are store and forward routers? Coz if 
they are, then the packets will never arrive back to back (I think).

Ram

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dsh9h4$b65$1@news.Stanford.EDU...
> come up with the max value of T such that it is possible for the packets 
> to arrive back to back.
>
> Ramanan wrote:
>> Hello,
>>
>> The question says that the second link is the slowest link in the path to 
>> the destination. If we assume that there are more than 2 links to reach 
>> the destination, then it doesn't seem to be possible that the packets can 
>> arrive back to back regardless of how small T is.
>> Say for example router X transmits P1 and P2 back-to-back to router Y 
>> along the second link. Router Y will receive P1 and start sending it out 
>> on to the next hop as soon as the whole packet has arrived. However, 
>> since the outgoing link on Y is faster than the incoming link, P1 will be 
>> sent out completely before router Y can finish receiving P2. Since Router 
>> Y must wait till it finishes receiving P2 before transmitting it out, 
>> there will definitely be a gap between the two packets regardless of how 
>> close we send the two packets. Thus it seems like there can't be an 
>> answer to this question. Does this explanation make sense? Or am I 
>> missing something? Thanks in advance,
>>
>> Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: hpr1-rtr.stanford.edu not responsive
Date: Fri, 10 Feb 2006 00:58:53 -0800
Lines: 11
Distribution: su
Message-ID: <dshklr$noj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10167

Hi I'm trying to do problem 6i, but I cannot even ping (let alone 
traceroute) hpr1-rtr.stanford.edu.  Is it not responding or am I doing 
something wrong?

However, if I trace to say www.ucsb.edu, hpr1-rtr.stanford.edu is in the 
list.  So, is it ok to do this for problem 6i?

Thanks,
Brent 


.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <nospam@nospam.com>
Newsgroups: su.class.cs244a
Subject: Re: hpr1-rtr.stanford.edu not responsive
Date: Fri, 10 Feb 2006 01:46:25 -0800
Lines: 56
Distribution: su
Message-ID: <dshndd$pp4$1@news.Stanford.EDU>
References: <dshklr$noj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dshklr$noj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10168

Weird.... It appears that hpr1-rtr has multiple interfaces, any of which 
might be chosen by ping, and it depends which one is chosen.

e.g. I pinged it 3 separate times, within about a ten-second interval, 
and each time it had a different IP, and one of the IPs was 
unresponsive.  See below:

[dholbert@elaine25:dholbert]$ ping hpr1-rtr.stanford.edu
PING i2-gateway.stanford.edu (192.68.191.83): 56 data bytes
64 bytes from i2-gateway.stanford.edu (192.68.191.83): seq=0 ttl=253 
time=1.26 m
s.
64 bytes from i2-gateway.stanford.edu (192.68.191.83): seq=1 ttl=253 
time=4.56 m
s.
64 bytes from i2-gateway.stanford.edu (192.68.191.83): seq=2 ttl=253 
time=1.13 m
s.
^C
---- i2-gateway.stanford.edu (192.68.191.83) PING Statistics ----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max = 1.13/2.32/4.56 (std = 1.59)
[dholbert@elaine25:dholbert]$ ping hpr1-rtr.stanford.edu
PING hpr1-rtr.Stanford.EDU (128.12.1.131): 56 data bytes
no reply from hpr1-rtr.stanford.edu within 1 sec
no reply from hpr1-rtr.stanford.edu within 1 sec
no reply from hpr1-rtr.stanford.edu within 1 sec
no reply from hpr1-rtr.stanford.edu within 1 sec
^C
---- hpr1-rtr.Stanford.EDU (128.12.1.131) PING Statistics ----
5 packets transmitted, 0 packets received, 100% packet loss
[dholbert@elaine25:dholbert]$ ping hpr1-rtr.stanford.edu
PING hpr1-rtr-1.Stanford.EDU (171.64.0.57): 56 data bytes
64 bytes from hpr1-rtr-1.Stanford.EDU (171.64.0.57): seq=0 ttl=253 
time=1.29 ms.
64 bytes from hpr1-rtr-1.Stanford.EDU (171.64.0.57): seq=1 ttl=253 
time=0.979 ms.
64 bytes from hpr1-rtr-1.Stanford.EDU (171.64.0.57): seq=2 ttl=253 
time=1.01 ms.


~Daniel


Brent Ellwein wrote:
> Hi I'm trying to do problem 6i, but I cannot even ping (let alone 
> traceroute) hpr1-rtr.stanford.edu.  Is it not responding or am I doing 
> something wrong?
> 
> However, if I trace to say www.ucsb.edu, hpr1-rtr.stanford.edu is in the 
> list.  So, is it ok to do this for problem 6i?
> 
> Thanks,
> Brent 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS2 Q7b (ii)
Date: Fri, 10 Feb 2006 07:38:24 -0800
Lines: 37
Distribution: su
Message-ID: <dsic16$gk7$1@news.Stanford.EDU>
References: <dsh879$9vp$1@news.Stanford.EDU> <dsh9h4$b65$1@news.Stanford.EDU> <dshior$mce$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dshior$mce$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10169

I'd like to hear a response to this as well. From the research I have 
seen online, what Ramanan said seems to be true (for store and forward 
routers).

Ramanan wrote:
> Maybe I should rephrase my question. Should we assume that the routers 
> between the source and destination are store and forward routers? Coz if 
> they are, then the packets will never arrive back to back (I think).
> 
> Ram
> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dsh9h4$b65$1@news.Stanford.EDU...
>> come up with the max value of T such that it is possible for the packets 
>> to arrive back to back.
>>
>> Ramanan wrote:
>>> Hello,
>>>
>>> The question says that the second link is the slowest link in the path to 
>>> the destination. If we assume that there are more than 2 links to reach 
>>> the destination, then it doesn't seem to be possible that the packets can 
>>> arrive back to back regardless of how small T is.
>>> Say for example router X transmits P1 and P2 back-to-back to router Y 
>>> along the second link. Router Y will receive P1 and start sending it out 
>>> on to the next hop as soon as the whole packet has arrived. However, 
>>> since the outgoing link on Y is faster than the incoming link, P1 will be 
>>> sent out completely before router Y can finish receiving P2. Since Router 
>>> Y must wait till it finishes receiving P2 before transmitting it out, 
>>> there will definitely be a gap between the two packets regardless of how 
>>> close we send the two packets. Thus it seems like there can't be an 
>>> answer to this question. Does this explanation make sense? Or am I 
>>> missing something? Thanks in advance,
>>>
>>> Ram 
> 
> 
.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: last discussion section
Date: Sat, 11 Feb 2006 23:22:46 -0800
Lines: 9
Distribution: su
Message-ID: <Pine.GSO.4.44.0602112319090.3324-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10170

Hi,
   it wasn't clear questions from which problem set were being
discussed from watching the video on the web. Towards the end of the
session I also heard solutions will be posted on the class website. Can
somebody please clarify?

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw3a test script
Date: Sun, 12 Feb 2006 00:54:54 -0800
Lines: 17
Distribution: su
Message-ID: <dsmt50$2cn$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10171

Is the test script for hw3a supposed to be working yet?

When I try it, I get the error:

> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
> directory
> Killed

The test script then realizes that the server is not responding and keeps 
retrying and getting that error message every time.

It seems unlikely that this is a STCP-related error....

Thanks,
Jesse 


.

Path: shelby.stanford.edu!not-for-mail
From: "Dan T. Murphy" <dtmurphy@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: last discussion section
Date: Sun, 12 Feb 2006 19:27:46 -0500
Lines: 15
Distribution: su
Message-ID: <dsojq5$j0a$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602112319090.3324-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <Pine.GSO.4.44.0602112319090.3324-100000@elaine40.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10172

It doesn't look like solution have been posted yet, but I found this to 
match up pretty well with the questions we went over in the review section:

http://www.stanford.edu/class/cs244a/review/CS244aMidterm_Review.pdf

Vijay K Kulkarni wrote:
> Hi,
>    it wasn't clear questions from which problem set were being
> discussed from watching the video on the web. Towards the end of the
> session I also heard solutions will be posted on the class website. Can
> somebody please clarify?
> 
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: last discussion section
Date: Sun, 12 Feb 2006 23:55:30 -0800
Lines: 25
Distribution: su
Message-ID: <dspe1o$ek3$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602112319090.3324-100000@elaine40.Stanford.EDU> <dsojq5$j0a$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsojq5$j0a$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10173

They are online now.

Questions:
http://www.stanford.edu/class/cs244a/review/MidtermReview-06.pdf

Answers:
http://www.stanford.edu/class/cs244a/review/MidtermReviewSoln-06.pdf

Dan T. Murphy wrote:
> It doesn't look like solution have been posted yet, but I found this to 
> match up pretty well with the questions we went over in the review section:
> 
> http://www.stanford.edu/class/cs244a/review/CS244aMidterm_Review.pdf
> 
> Vijay K Kulkarni wrote:
> 
>> Hi,
>>    it wasn't clear questions from which problem set were being
>> discussed from watching the video on the web. Towards the end of the
>> session I also heard solutions will be posted on the class website. Can
>> somebody please clarify?
>>
>> thanks,
>> Vijay.
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Mon, 13 Feb 2006 01:04:05 -0800
Lines: 24
Distribution: su
Message-ID: <dspi2b$ivo$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsmt50$2cn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10174

Actually it looks like it's ok.  I ran on elaine with no problems:

/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h

Jesse Young wrote:
> Is the test script for hw3a supposed to be working yet?
> 
> When I try it, I get the error:
> 
> 
>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
>>directory
>>Killed
> 
> 
> The test script then realizes that the server is not responding and keeps 
> retrying and getting that error message every time.
> 
> It seems unlikely that this is a STCP-related error....
> 
> Thanks,
> Jesse 
> 
> 
.

Path: shelby.stanford.edu!elaine17.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: blank sheets for midterm
Date: Mon, 13 Feb 2006 08:46:41 -0800
Lines: 8
Distribution: su
Message-ID: <Pine.GSO.4.44.0602130843330.28305-100000@elaine17.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10175

Hi,

will we be provided any blank sheets as scrap papers during midterm exams?
are we allowed to bring scrap papers of our own?

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 6-c midterm winter 2003
Date: Mon, 13 Feb 2006 14:51:29 -0800
Lines: 5
Distribution: su
Message-ID: <dsr2hd$9sp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10176

How do you get the number of packets sent in one period (1 + W/2)? I'm
thinking it should also depend on the length of a period.

Thanks,
--Michi
.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 6-c midterm winter 2003
Date: Mon, 13 Feb 2006 16:55:15 -0800
Lines: 50
Distribution: su
Message-ID: <Pine.GSO.4.44.0602131652340.14028-100000@elaine13.Stanford.EDU>
References: <dsr2hd$9sp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Michi Mutsuzaki <michi2@stanford.edu>
In-Reply-To: <dsr2hd$9sp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10177


On Mon, 13 Feb 2006, Michi Mutsuzaki wrote:

> How do you get the number of packets sent in one period (1 + W/2)? I'm

I think it is saying (1+W/2) *window* packets being transmitted not just
(1+W/2) packets by itself. I have pasted a posting from previous
year newsgroup at the end of the mail.

thanks,
Vijay.


Path: shelby.stanford.edu!elaine18.Stanford.EDU!holliman
From:  (Matthew Jonathan Holliman)
Newsgroups: su.class.cs244a
Subject: Re: Q6c on midterm
Date: Wed, 26 Feb 2003 22:19:40 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID:
References:
22:19:40 GMT)
X-Complaints-To:
X-Newsreader: NN version 6.5.4 (NOV)
Xref: shelby.stanford.edu su.class.cs244a:4664


>Could somebody explain the solution to this question to me?
Specifically,
>why does the transmitter send 1 + W/2 windows of packets in each period
of
>the sawtooth?

At the start of the period, the window size is W/2 packets.  This
increases
by one packet after each RTT, until it reaches size W packets, at which
point a packet is lost.  Assuming W is even for simplicity, there are thus
W/2 + 1 transmissions in this period (of size W/2+0, W/2+1, ..., W/2+W/2,
respectively).


> thinking it should also depend on the length of a period.
>
> Thanks,
> --Michi
>

.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 6-c midterm winter 2003
Date: Mon, 13 Feb 2006 16:59:35 -0800
Lines: 54
Distribution: su
Message-ID: <dsra1j$i7v$1@news.Stanford.EDU>
References: <dsr2hd$9sp$1@news.Stanford.EDU> <Pine.GSO.4.44.0602131652340.14028-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <Pine.GSO.4.44.0602131652340.14028-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10178

That makes sense. Thanks, Vijay.

--Michi

Vijay K Kulkarni wrote:
> On Mon, 13 Feb 2006, Michi Mutsuzaki wrote:
> 
>> How do you get the number of packets sent in one period (1 + W/2)? I'm
> 
> I think it is saying (1+W/2) *window* packets being transmitted not just
> (1+W/2) packets by itself. I have pasted a posting from previous
> year newsgroup at the end of the mail.
> 
> thanks,
> Vijay.
> 
> 
> Path: shelby.stanford.edu!elaine18.Stanford.EDU!holliman
> From:  (Matthew Jonathan Holliman)
> Newsgroups: su.class.cs244a
> Subject: Re: Q6c on midterm
> Date: Wed, 26 Feb 2003 22:19:40 +0000 (UTC)
> Lines: 10
> Distribution: su
> Message-ID:
> References:
> NNTP-Posting-Host: elaine18.stanford.edu
> X-Trace: news.Stanford.EDU 1046297980 16997 171.64.15.83 (26 Feb 2003
> 22:19:40 GMT)
> X-Complaints-To:
> X-Newsreader: NN version 6.5.4 (NOV)
> Xref: shelby.stanford.edu su.class.cs244a:4664
> 
> 
>> Could somebody explain the solution to this question to me?
> Specifically,
>> why does the transmitter send 1 + W/2 windows of packets in each period
> of
>> the sawtooth?
> 
> At the start of the period, the window size is W/2 packets.  This
> increases
> by one packet after each RTT, until it reaches size W packets, at which
> point a packet is lost.  Assuming W is even for simplicity, there are thus
> W/2 + 1 transmissions in this period (of size W/2+0, W/2+1, ..., W/2+W/2,
> respectively).
> 
> 
>> thinking it should also depend on the length of a period.
>>
>> Thanks,
>> --Michi
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <youngj@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Mon, 13 Feb 2006 19:14:09 -0800
Lines: 76
Distribution: su
Message-ID: <dsrhtr$sn6$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10179

That's weird, because on several different elaines, the grading script 
successfully compiles "server" with my transport.c but it gets immediately 
killed by the loader because it can't find libssl 0.9.7:

make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server
gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homeworks/hw3/src 
 -o server /usr/class/cs244a/grading_script/hw3/server.o 
/usr/class/cs244a/grading_script/hw3/connection_demux.o 
/usr/class/cs244a/grading_script/hw3/mysock.o 
/usr/class/cs244a/grading_script/hw3/mysock_api.o 
/usr/class/cs244a/grading_script/hw3/network_io.o 
/usr/class/cs244a/grading_script/hw3/network_io_socket.o 
/usr/class/cs244a/grading_script/hw3/network_io_tcp.o 
/usr/class/cs244a/grading_script/hw3/stcp_api.o 
/usr/class/cs244a/grading_script/hw3/tcp_sum.o 
/usr/class/cs244a/grading_script/hw3/network.o 
transport.c -lsocket -lnsl -lm -lmd5 -lpthread

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_output
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
directory
Killed
warning:  server not responding, retrying
Starting server: 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_output
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
directory
Killed
warning:  server not responding, retrying
Starting server: 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_output
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
directory
Killed
.... etc


"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dspi2b$ivo$1@news.Stanford.EDU...
> Actually it looks like it's ok.  I ran on elaine with no problems:
>
> /usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
>
> Jesse Young wrote:
>> Is the test script for hw3a supposed to be working yet?
>>
>> When I try it, I get the error:
>>
>>
>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
>>>directory
>>>Killed
>>
>>
>> The test script then realizes that the server is not responding and keeps 
>> retrying and getting that error message every time.
>>
>> It seems unlikely that this is a STCP-related error....
>>
>> Thanks,
>> Jesse 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: blank sheets for midterm
Date: Mon, 13 Feb 2006 20:04:23 -0800
Lines: 16
Distribution: su
Message-ID: <dsrl25$288$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602130843330.28305-100000@elaine17.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602130843330.28305-100000@elaine17.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10180

There should be ample room on the midterm for you to use for scratch 
work. If you find that you need more paper, please ask us and we will 
provide it to you. Please don't bring any paper other than your 8.5 X 11 
single-sided sheet to the exam.

Ari

Vijay K Kulkarni wrote:
> Hi,
> 
> will we be provided any blank sheets as scrap papers during midterm exams?
> are we allowed to bring scrap papers of our own?
> 
> thanks,
> Vijay.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: midterm material
Date: Tue, 14 Feb 2006 21:40:04 -0800
Lines: 10
Distribution: su
Message-ID: <dsuerk$731$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10181

Two questions:

1)4.5 from the book (Multiprotocol label switching) is listed on the 
lecture page, but I don't believe we covered this in class.

2)Is it safe to assume that material from handouts 8 and 9 (which we 
didn't get to in class) will not be on the midterm?

Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: drawing out Bellman-Ford
Date: Wed, 15 Feb 2006 17:06:47 -0800
Lines: 8
Distribution: su
Message-ID: <dt0jeq$fct$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10182

when Ari drew out the evolution of Bellman-Ford in the problem session 
he drew out a whole matrix for each step.  similarly, the answer to 
problem 7 on the 2004 midterm shows a matrix for each step.

i don't get it, why do you have to draw out the whole matrix instead of 
just the column like was done in class?


.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: TCP ack and jumping window
Date: Wed, 15 Feb 2006 17:11:03 -0800
Lines: 15
Distribution: su
Message-ID: <dt0jmq$fct$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10183

since TCP ack messages tell us where we've read up to, isn't it possble 
that an ack message could be dropped, but no data resent?   (only the 
ack was lost, no data.)

imagine i send a full window's worth.
i never get an ack for the first byte (it got lost)
but before i time out waiting for that ack,
i get an ack telling me the reciever was good for the first 10 bytes.

doesn't my window just jump ahead 10 bytes?





.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: midterm material
Date: Wed, 15 Feb 2006 17:24:12 -0800
Lines: 8
Distribution: su
Message-ID: <dt0kff$hbc$1@news.Stanford.EDU>
References: <dsuerk$731$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10184

> 2)Is it safe to assume that material from handouts 8 and 9 (which we 
> didn't get to in class) will not be on the midterm?

I'm not a TA, but they did say pretty explicitly it would only be on 
what we'd gotten through in class as of Tuesday.  So, I think it's 
perfectly safe to entirely ignore handouts 8 and 9.


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TCP ack and jumping window
Date: Wed, 15 Feb 2006 18:08:59 -0800
Lines: 23
Distribution: su
Message-ID: <dt0mrr$jpg$1@news.Stanford.EDU>
References: <dt0jmq$fct$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dt0jmq$fct$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10185

Since you responded to me...
Take a look at the solution to #3 in the 2002 midterm. You can see that 
even though the sender sent packets 4,5,6,7. When 4 times out, it forces 
the sender to "start over" from 4, and it winds up sending 5,6,7 again.

That's my understanding, someone correct me if I'm wrong.

Greg Corrado wrote:
> since TCP ack messages tell us where we've read up to, isn't it possble 
> that an ack message could be dropped, but no data resent?   (only the 
> ack was lost, no data.)
> 
> imagine i send a full window's worth.
> i never get an ack for the first byte (it got lost)
> but before i time out waiting for that ack,
> i get an ack telling me the reciever was good for the first 10 bytes.
> 
> doesn't my window just jump ahead 10 bytes?
> 
> 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: drawing out Bellman-Ford
Date: Wed, 15 Feb 2006 18:08:51 -0800
Lines: 12
Distribution: su
Message-ID: <dt0mru$jpa$1@news.Stanford.EDU>
References: <dt0jeq$fct$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt0jeq$fct$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10186

Greg Corrado wrote:
> when Ari drew out the evolution of Bellman-Ford in the problem session 
> he drew out a whole matrix for each step.  similarly, the answer to 
> problem 7 on the 2004 midterm shows a matrix for each step.
> 
> i don't get it, why do you have to draw out the whole matrix instead of 
> just the column like was done in class?
> 
> 

It is shown for completeness.  If you just want the shortest paths to 
one router, you only need one column.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TCP ack and jumping window
Date: Wed, 15 Feb 2006 18:09:39 -0800
Lines: 18
Distribution: su
Message-ID: <dt0mte$jpa$2@news.Stanford.EDU>
References: <dt0jmq$fct$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt0jmq$fct$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10187

Greg Corrado wrote:
> since TCP ack messages tell us where we've read up to, isn't it possble 
> that an ack message could be dropped, but no data resent?   (only the 
> ack was lost, no data.)
> 
> imagine i send a full window's worth.
> i never get an ack for the first byte (it got lost)
> but before i time out waiting for that ack,
> i get an ack telling me the reciever was good for the first 10 bytes.
> 
> doesn't my window just jump ahead 10 bytes?
> 
> 
> 
> 
> 

Yep.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: midterm material
Date: Wed, 15 Feb 2006 18:13:15 -0800
Lines: 18
Distribution: su
Message-ID: <dt0n46$jpa$3@news.Stanford.EDU>
References: <dsuerk$731$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsuerk$731$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10188

Will Palmeri wrote:
> Two questions:
> 
> 1)4.5 from the book (Multiprotocol label switching) is listed on the 
> lecture page, but I don't believe we covered this in class.

Honestly I wouldn't worry about it, but I think you're suppoesd to do 
the assigned readings.

> 
> 2)Is it safe to assume that material from handouts 8 and 9 (which we 
> didn't get to in class) will not be on the midterm?

Yep.

> 
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TCP ack and jumping window
Date: Wed, 15 Feb 2006 18:14:16 -0800
Lines: 28
Distribution: su
Message-ID: <dt0n63$jpa$4@news.Stanford.EDU>
References: <dt0jmq$fct$2@news.Stanford.EDU> <dt0mrr$jpg$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt0mrr$jpg$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10189

You are right but Greg's talking about when you do get an ACK for a 
later byte, even though an ACK for an earlier byte got dropped.

Will Palmeri wrote:
> Since you responded to me...
> Take a look at the solution to #3 in the 2002 midterm. You can see that 
> even though the sender sent packets 4,5,6,7. When 4 times out, it forces 
> the sender to "start over" from 4, and it winds up sending 5,6,7 again.
> 
> That's my understanding, someone correct me if I'm wrong.
> 
> Greg Corrado wrote:
> 
>> since TCP ack messages tell us where we've read up to, isn't it 
>> possble that an ack message could be dropped, but no data resent?   
>> (only the ack was lost, no data.)
>>
>> imagine i send a full window's worth.
>> i never get an ack for the first byte (it got lost)
>> but before i time out waiting for that ack,
>> i get an ack telling me the reciever was good for the first 10 bytes.
>>
>> doesn't my window just jump ahead 10 bytes?
>>
>>
>>
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TCP ack and jumping window
Date: Wed, 15 Feb 2006 18:25:47 -0800
Lines: 44
Distribution: su
Message-ID: <dt0nra$knu$1@news.Stanford.EDU>
References: <dt0jmq$fct$2@news.Stanford.EDU> <dt0mrr$jpg$1@news.Stanford.EDU> <dt0n63$jpa$4@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dt0n63$jpa$4@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10190

I see what you're saying, but now I'm confused about this problem (#3 
2002 midterm).

In the solution given, the data is received successfully for packets 
9,10,11,12. The ACK is lost for packet 9 (but not 10,11,or 12). However, 
in the solution the receiver retransmits 9-12 again, even though 
presumably the ACK from packet 10 (which the sender received 
successfully) would say the receiver is next expecting packet 11.

This seems to contradict what was just discussed.

Thanks,
Will

Matt Falkenhagen wrote:
> You are right but Greg's talking about when you do get an ACK for a 
> later byte, even though an ACK for an earlier byte got dropped.
> 
> Will Palmeri wrote:
>> Since you responded to me...
>> Take a look at the solution to #3 in the 2002 midterm. You can see 
>> that even though the sender sent packets 4,5,6,7. When 4 times out, it 
>> forces the sender to "start over" from 4, and it winds up sending 
>> 5,6,7 again.
>>
>> That's my understanding, someone correct me if I'm wrong.
>>
>> Greg Corrado wrote:
>>
>>> since TCP ack messages tell us where we've read up to, isn't it 
>>> possble that an ack message could be dropped, but no data resent?   
>>> (only the ack was lost, no data.)
>>>
>>> imagine i send a full window's worth.
>>> i never get an ack for the first byte (it got lost)
>>> but before i time out waiting for that ack,
>>> i get an ack telling me the reciever was good for the first 10 bytes.
>>>
>>> doesn't my window just jump ahead 10 bytes?
>>>
>>>
>>>
>>>
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: drawing out Bellman-Ford
Date: Wed, 15 Feb 2006 18:27:33 -0800
Lines: 6
Distribution: su
Message-ID: <dt0nuk$koh$1@news.Stanford.EDU>
References: <dt0jeq$fct$1@news.Stanford.EDU> <dt0mru$jpa$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10191

> It is shown for completeness.  If you just want the shortest paths to 
> one router, you only need one column.

whew!  thanks i thought maybe there was some interaction between the 
columns that i didn't understand.

.

Path: shelby.stanford.edu!not-for-mail
From: Gian-Paolo Musumeci <gdm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TCP ack and jumping window
Date: Wed, 15 Feb 2006 18:46:34 -0800
Lines: 28
Distribution: su
Message-ID: <dt0p1t$ljq$1@news.Stanford.EDU>
References: <dt0jmq$fct$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.2
Xref: shelby.stanford.edu su.class.cs244a:10192

On 2006-02-15 17:11:03 -0800, Greg Corrado <gcorrado@stanford.edu> said:
> since TCP ack messages tell us where we've read up to, isn't it possble 
> that an ack message could be dropped, but no data resent?   (only the 
> ack was lost, no data.)
> imagine i send a full window's worth.
> i never get an ack for the first byte (it got lost)
> but before i time out waiting for that ack,
> i get an ack telling me the reciever was good for the first 10 bytes.
> doesn't my window just jump ahead 10 bytes?

I'm not a TA either, so take this with a grain of salt.  What you have 
said is correct.

Something very similar occurs when packets arrive out of order.  If 
packets n+1 and n+2 are delivered to a receiver who has not received n, 
then packets n+1 and n+2 will not be acknowledged until n has arrived.  
Once n does arrive, the receiver can acknowledge simply n+2.  This of 
course assumes that n arrives within the correct timeframe.

This is actually sometimes exploited to improve performance under the 
name "deferred acknowledgment," with the idea being that if you only 
acknowledge every other packet (within suitable timeouts, etc) you will 
reduce the acknowledgment processing overhead on the sender.  A flow of 
1500 byte packets at 1 Gbps is ~83 Kpps, so deferred acknowledgment of 
every other packet would save you about 41,500 ACKs per second.

/gdm

.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Midterm 2004, prob #7
Date: Wed, 15 Feb 2006 21:32:37 -0800
Lines: 11
Distribution: su
Message-ID: <dt12pl$1k2$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10193

In iteration #2, the table claims that router 2 can reach router 5 via 
router 3 with cost 10.  Given that there's no link from router 3 to router 
2, how can router 2 ever get router 3's table?  In other words, how can 
router 2 ever know what router 3 can reach?  (It is true that router 2 could 
reach router 5 with cost 10 through r3, I just don't think r2 could ever 
know this).  Is that right?

Thanks,
Thad 


.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Midterm 2004, prob #7
Date: Wed, 15 Feb 2006 23:29:54 -0800
Lines: 19
Distribution: su
Message-ID: <dt19lj$837$1@news.Stanford.EDU>
References: <dt12pl$1k2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt12pl$1k2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10194

Ryan brought this up with Ari in office hours tonight.  I think we 
decided that r3 can't send r2 normal data, but it can send it its 
distance vector.  There was another similar situation in the problem 
that behaved consistently with this.

Steve

Thad Hughes wrote:
> In iteration #2, the table claims that router 2 can reach router 5 via 
> router 3 with cost 10.  Given that there's no link from router 3 to router 
> 2, how can router 2 ever get router 3's table?  In other words, how can 
> router 2 ever know what router 3 can reach?  (It is true that router 2 could 
> reach router 5 with cost 10 through r3, I just don't think r2 could ever 
> know this).  Is that right?
> 
> Thanks,
> Thad 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TCP ack and jumping window
Date: Thu, 16 Feb 2006 00:03:00 -0800
Lines: 54
Distribution: su
Message-ID: <dt1bk0$c7v$1@news.Stanford.EDU>
References: <dt0jmq$fct$2@news.Stanford.EDU> <dt0mrr$jpg$1@news.Stanford.EDU> <dt0n63$jpa$4@news.Stanford.EDU> <dt0nra$knu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt0nra$knu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10195

Right, the difference here is the timeout for 9 expired before sender 
got the ACKs for 10,11,12.  Because of Go Back N, the source will 
retransmit all packets starting with 9.  Since the only packets in 
Window #7 are 9 and 10, when it recieves the ACKs for 11 and 12 during 
that time it will just ignore them because from its point of view the 
only unacked packets it has sent are 9 and 10.

Will Palmeri wrote:
> I see what you're saying, but now I'm confused about this problem (#3 
> 2002 midterm).
> 
> In the solution given, the data is received successfully for packets 
> 9,10,11,12. The ACK is lost for packet 9 (but not 10,11,or 12). However, 
> in the solution the receiver retransmits 9-12 again, even though 
> presumably the ACK from packet 10 (which the sender received 
> successfully) would say the receiver is next expecting packet 11.
> 
> This seems to contradict what was just discussed.
> 
> Thanks,
> Will
> 
> Matt Falkenhagen wrote:
> 
>> You are right but Greg's talking about when you do get an ACK for a 
>> later byte, even though an ACK for an earlier byte got dropped.
>>
>> Will Palmeri wrote:
>>
>>> Since you responded to me...
>>> Take a look at the solution to #3 in the 2002 midterm. You can see 
>>> that even though the sender sent packets 4,5,6,7. When 4 times out, 
>>> it forces the sender to "start over" from 4, and it winds up sending 
>>> 5,6,7 again.
>>>
>>> That's my understanding, someone correct me if I'm wrong.
>>>
>>> Greg Corrado wrote:
>>>
>>>> since TCP ack messages tell us where we've read up to, isn't it 
>>>> possble that an ack message could be dropped, but no data resent?   
>>>> (only the ack was lost, no data.)
>>>>
>>>> imagine i send a full window's worth.
>>>> i never get an ack for the first byte (it got lost)
>>>> but before i time out waiting for that ack,
>>>> i get an ack telling me the reciever was good for the first 10 bytes.
>>>>
>>>> doesn't my window just jump ahead 10 bytes?
>>>>
>>>>
>>>>
>>>>
>>>>
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Midterm 2003 multiple choice 2
Date: Thu, 16 Feb 2006 01:46:36 -0800
Lines: 11
Distribution: su
Message-ID: <dt1hlj$hsm$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10196

2.TCP. In the TCP protocol, the receiver advertises the current size of the
receive window to the
sender. The sender uses this information to control congestion on the
network.
(a.) True.
(b.) False.

The answer key says (b) is correct. Can somebody explain why? Isn't what is
described partially how TCP controls congestion?


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Midterm 2003 multiple choice 2
Date: Thu, 16 Feb 2006 02:14:24 -0800
Lines: 29
Distribution: su
Message-ID: <dt1j9v$jf4$1@news.Stanford.EDU>
References: <dt1hlj$hsm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dt1hlj$hsm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10197

TCP does control its rate with the window, but I think you might be 
overlooking the terminology.  The receiver uses the the advertised 
window to tell the sender how much data it can handle/process at a time 
(remember there's some application process consuming the TCP stream). 
The sender can't ever exceed this window.  Independently, the sender has 
its own congestion window that it adjusts due to network congestion 
(AIMD,slow start and so forth).

So even if the receiver advertises a monstrous window size, the sender 
might have a smaller congestion window due to heavy current network 
conditions.

We discussed this question with Ari at office hours, and I believe this 
to be correct.

-Will

Robbie Yan wrote:
> 2.TCP. In the TCP protocol, the receiver advertises the current size of the
> receive window to the
> sender. The sender uses this information to control congestion on the
> network.
> (a.) True.
> (b.) False.
> 
> The answer key says (b) is correct. Can somebody explain why? Isn't what is
> described partially how TCP controls congestion?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: MT 2004 #8C
Date: Thu, 16 Feb 2006 09:41:35 -0800
Lines: 6
Distribution: su
Message-ID: <C019F94F.33D7%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: MT 2004 #8C
Thread-Index: AcYzIDsXeYOfmZ8TEdqZqgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10198

Hi.

In understand the PROP but Where did the B/C come from?

Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Re: Midterm 2004, prob #7
Date: Thu, 16 Feb 2006 10:31:56 -0800
Lines: 37
Distribution: su
Message-ID: <dt2ger$h5o$1@news.Stanford.EDU>
References: <dt12pl$1k2$1@news.Stanford.EDU> <dt19lj$837$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10199

Ok, I can live with that, although I think its bogus.  In real life, I'm 
guessing communication is almost always bi-directional, so you'd never see 
this issue.  But in these toy problems, an arrow in one direction really 
should mean uni-directional communication.

Another question on the same problem:
In iteration #3, router 6 can reach router 1 with a cost of 14, hopping 
through r5 and then r4.  But in the answer key, the cost is given as 15.

I'm pretty sure the answer key is wrong there.  Does anyone else think this 
kind of problem isn't appropriate for an hour long exam?  Or is there some 
shortcut I don't know about?

--Thad


"Steve Goldman" <steve.goldman@stanford.edu> wrote in message 
news:dt19lj$837$1@news.Stanford.EDU...
> Ryan brought this up with Ari in office hours tonight.  I think we decided 
> that r3 can't send r2 normal data, but it can send it its distance vector. 
> There was another similar situation in the problem that behaved 
> consistently with this.
>
> Steve
>
> Thad Hughes wrote:
>> In iteration #2, the table claims that router 2 can reach router 5 via 
>> router 3 with cost 10.  Given that there's no link from router 3 to 
>> router 2, how can router 2 ever get router 3's table?  In other words, 
>> how can router 2 ever know what router 3 can reach?  (It is true that 
>> router 2 could reach router 5 with cost 10 through r3, I just don't think 
>> r2 could ever know this).  Is that right?
>>
>> Thanks,
>> Thad 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: MT 2004 #8C
Date: Thu, 16 Feb 2006 11:18:52 -0800
Lines: 19
Distribution: su
Message-ID: <dt2jd1$ka7$1@news.Stanford.EDU>
References: <C019F94F.33D7%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <C019F94F.33D7%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10200

Suppose that when the packet reaches the queue there are exactly (B-1) 
packets remaining in the queue. This packet becomes the Bth packet in 
the queue. It will take B/C seconds for the queue to empty and the 
packet to resume traveling across the wire --- during this time, the 
packet is stuck in the queue. PROP represents the rtt required for the 
packet to move along the links... PROP + B/C represents the total 
maximum time elapsed for a packet to make its way across the network and 
back again.

After waiting PROP + B/C seconds, if the sending host has not received 
an ack, it knows that the packet must have been dropped.

Sunny Balwani wrote:
> Hi.
> 
> In understand the PROP but Where did the B/C come from?
> 
> Thanks.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Midterm 2004, prob #7
Date: Thu, 16 Feb 2006 12:12:37 -0800
Lines: 46
Distribution: su
Message-ID: <dt2mbq$n08$1@news.Stanford.EDU>
References: <dt12pl$1k2$1@news.Stanford.EDU> <dt19lj$837$1@news.Stanford.EDU> <dt2ger$h5o$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dt2ger$h5o$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10201

I also thought it was inappropriate until I read the post with subject 
"drawing out Bellman-Ford" in this newsgroup. In the answer key, the 
whole table is given for completeness, but the question only asks for 
one column (routes to R6).

-Naeim


Thad Hughes wrote:
> Ok, I can live with that, although I think its bogus.  In real life, I'm 
> guessing communication is almost always bi-directional, so you'd never see 
> this issue.  But in these toy problems, an arrow in one direction really 
> should mean uni-directional communication.
> 
> Another question on the same problem:
> In iteration #3, router 6 can reach router 1 with a cost of 14, hopping 
> through r5 and then r4.  But in the answer key, the cost is given as 15.
> 
> I'm pretty sure the answer key is wrong there.  Does anyone else think this 
> kind of problem isn't appropriate for an hour long exam?  Or is there some 
> shortcut I don't know about?
> 
> --Thad
> 
> 
> "Steve Goldman" <steve.goldman@stanford.edu> wrote in message 
> news:dt19lj$837$1@news.Stanford.EDU...
>> Ryan brought this up with Ari in office hours tonight.  I think we decided 
>> that r3 can't send r2 normal data, but it can send it its distance vector. 
>> There was another similar situation in the problem that behaved 
>> consistently with this.
>>
>> Steve
>>
>> Thad Hughes wrote:
>>> In iteration #2, the table claims that router 2 can reach router 5 via 
>>> router 3 with cost 10.  Given that there's no link from router 3 to 
>>> router 2, how can router 2 ever get router 3's table?  In other words, 
>>> how can router 2 ever know what router 3 can reach?  (It is true that 
>>> router 2 could reach router 5 with cost 10 through r3, I just don't think 
>>> r2 could ever know this).  Is that right?
>>>
>>> Thanks,
>>> Thad 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Re: drawing out Bellman-Ford
Date: Thu, 16 Feb 2006 12:30:44 -0800
Lines: 33
Distribution: su
Message-ID: <dt2ndj$o09$1@news.Stanford.EDU>
References: <dt0jeq$fct$1@news.Stanford.EDU> <dt0mru$jpa$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10202

Even if you're only concerned about one router, how can you simulate the 
Bellman-Ford algorithm for an entire network with just one column per 
iteration?  If you're only doing BF for a single router, but that router is 
connected to every other router, you still have to look at the entire table 
from the previous iteration to compute the new routing information for the 
router in question.  And the routing information received from the other 
routers will change at each iteration.

You can kind of cheat and eyeball the graph for each iteration (for sparsely 
connected networks, this seems much faster to me), but then you're doing 
part of BF in your head.

Isn't that correct?

--Thad


"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dt0mru$jpa$1@news.Stanford.EDU...
> Greg Corrado wrote:
>> when Ari drew out the evolution of Bellman-Ford in the problem session he 
>> drew out a whole matrix for each step.  similarly, the answer to problem 
>> 7 on the 2004 midterm shows a matrix for each step.
>>
>> i don't get it, why do you have to draw out the whole matrix instead of 
>> just the column like was done in class?
>>
>>
>
> It is shown for completeness.  If you just want the shortest paths to one 
> router, you only need one column. 


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: proj3 on _DARWIN_
Date: Thu, 16 Feb 2006 16:09:56 -0800
Lines: 9
Distribution: su
Message-ID: <C01A5454.33EB%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: proj3 on _DARWIN_
Thread-Index: AcYzVnuRuhVsnJ9JEdqC4wARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10203

Hi.
So, it seems like out of the box, the project only compiles on
solaris/linux/win32 but not for Mac Darwin. I assume it is because of the
object files included with the project?  Other reasons??

Is there anyway we can get DARWIN_ support for those of us coding on MacOSX.

Thanks in advance.

.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Assignment #3, Number of tests permitted per day
Date: Thu, 16 Feb 2006 17:24:47 -0800
Lines: 12
Distribution: su
Message-ID: <dt38l1$d5q$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10204

In the Assignment #3 document, section "Testing Your Code", there is the 
following statement:  "All tests are free. You can run up to 5 tests a day 
until the day of the deadline. After that time you will only be allowed 3 
tests per day until the deadline."

Is there a typo on that statement?  I assume that, like in Assignment #1, we 
get only 3 tests per day as of 3 days before the deadline?

Thanks,
 --- Bruce 


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: proj3 on _DARWIN_
Date: Thu, 16 Feb 2006 19:17:18 -0800
Lines: 13
Distribution: su
Message-ID: <dt3f7s$j4h$1@news.Stanford.EDU>
References: <C01A5454.33EB%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <C01A5454.33EB%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10205

I second this as I also do all my development on OS X.
-Will

Sunny Balwani wrote:
> Hi.
> So, it seems like out of the box, the project only compiles on
> solaris/linux/win32 but not for Mac Darwin. I assume it is because of the
> object files included with the project?  Other reasons??
> 
> Is there anyway we can get DARWIN_ support for those of us coding on MacOSX.
> 
> Thanks in advance.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Re: proj3 on _DARWIN_
Date: Thu, 16 Feb 2006 21:54:34 -0800
Lines: 17
Distribution: su
Message-ID: <dt3oer$qmj$1@news.Stanford.EDU>
References: <C01A5454.33EB%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10206

I do all my development on Cygwin.  How about some windows libs?
Thanks.

"Sunny Balwani" <sunnybalwani@hotmail.com> wrote in message 
news:C01A5454.33EB%sunnybalwani@hotmail.com...
> Hi.
> So, it seems like out of the box, the project only compiles on
> solaris/linux/win32 but not for Mac Darwin. I assume it is because of the
> object files included with the project?  Other reasons??
>
> Is there anyway we can get DARWIN_ support for those of us coding on 
> MacOSX.
>
> Thanks in advance.
> 


.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 3 way handshake
Date: Fri, 17 Feb 2006 10:55:37 -0800
Lines: 10
Distribution: su
Message-ID: <Pine.GSO.4.44.0602171053550.20523-100000@elaine42.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10207

Hello,

What happens if the 3rd packet (ack) of the 3 way handshake is dropped?
Does the passive entity timeout?  (what's the initial timeout value it
should use?)  Since there's no ack for acks, how does the active entity
know to resend the ack (or does it at all?)?

Thanks in advance,
-Wai Kei

.

Path: shelby.stanford.edu!not-for-mail
From: "Greg Donaker" <gdonaker@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Change of grading basis deadline
Date: Fri, 17 Feb 2006 12:27:20 -0800
Lines: 8
Distribution: su
Message-ID: <dt5bja$equ$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10208

Stanford's 'Change of grading basis deadline' is this Monday (2/20) at 
midnight.  Is there any chance we'll have the results of the midterm by 
then?

Thanks,
Greg 


.

Path: shelby.stanford.edu!elaine28.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: slashdot thread - backboneless internet
Date: Fri, 17 Feb 2006 21:57:08 -0800
Lines: 11
Distribution: su
Message-ID: <Pine.GSO.4.44.0602172152070.21135-100000@elaine28.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10209

a bit off topic, but there's a curious thread going on in slashdot

http://ask.slashdot.org/askslashdot/06/02/17/2355231.shtml

it's a weird mix of uneducated, educated, and plainly crazy people
revisiting a lot of the concepts we've seen in this class up to now.

 fun post-midterm read :-)

- Miguel

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Sat, 18 Feb 2006 00:05:49 -0800
Lines: 83
Distribution: su
Message-ID: <dt6kh0$rlj$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU> <dsrhtr$sn6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dsrhtr$sn6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10210

Sorry I don't know.  Is anyone else seeing this?

Jesse Young wrote:
>  That's weird, because on several different elaines, the grading script
> successfully compiles "server" with my transport.c but it gets immediately 
> killed by the loader because it can't find libssl 0.9.7:
> 
> make -f /usr/class/cs244a/grading_script/hw3/Makefile 
> LIBDIR=/usr/class/cs244a/grading_script/hw3 server
> gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homeworks/hw3/src 
>  -o server /usr/class/cs244a/grading_script/hw3/server.o 
> /usr/class/cs244a/grading_script/hw3/connection_demux.o 
> /usr/class/cs244a/grading_script/hw3/mysock.o 
> /usr/class/cs244a/grading_script/hw3/mysock_api.o 
> /usr/class/cs244a/grading_script/hw3/network_io.o 
> /usr/class/cs244a/grading_script/hw3/network_io_socket.o 
> /usr/class/cs244a/grading_script/hw3/network_io_tcp.o 
> /usr/class/cs244a/grading_script/hw3/stcp_api.o 
> /usr/class/cs244a/grading_script/hw3/tcp_sum.o 
> /usr/class/cs244a/grading_script/hw3/network.o 
> transport.c -lsocket -lnsl -lm -lmd5 -lpthread
> 
> Testing input file TESTDATA.0
> 
> Starting server: 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_port 
> 2>&1 > 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_output
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
> directory
> Killed
> warning:  server not responding, retrying
> Starting server: 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_port 
> 2>&1 > 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_output
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
> directory
> Killed
> warning:  server not responding, retrying
> Starting server: 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_port 
> 2>&1 > 
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_output
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
> directory
> Killed
> ... etc
> 
> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dspi2b$ivo$1@news.Stanford.EDU...
> 
>>Actually it looks like it's ok.  I ran on elaine with no problems:
>>
>>/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
>>
>>Jesse Young wrote:
>>
>>>Is the test script for hw3a supposed to be working yet?
>>>
>>>When I try it, I get the error:
>>>
>>>
>>>
>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
>>>>directory
>>>>Killed
>>>
>>>
>>>The test script then realizes that the server is not responding and keeps 
>>>retrying and getting that error message every time.
>>>
>>>It seems unlikely that this is a STCP-related error....
>>>
>>>Thanks,
>>>Jesse 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: proj3 on _DARWIN_
Date: Sat, 18 Feb 2006 00:11:15 -0800
Lines: 13
Distribution: su
Message-ID: <dt6kr5$sb5$1@news.Stanford.EDU>
References: <C01A5454.33EB%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <C01A5454.33EB%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10211

I don't know how to do this.  Sorry.  I'd recommend developing on the 
Sweet Hall Unix machines.  ^_^

Sunny Balwani wrote:
> Hi.
> So, it seems like out of the box, the project only compiles on
> solaris/linux/win32 but not for Mac Darwin. I assume it is because of the
> object files included with the project?  Other reasons??
> 
> Is there anyway we can get DARWIN_ support for those of us coding on MacOSX.
> 
> Thanks in advance.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Change of grading basis deadline
Date: Sat, 18 Feb 2006 00:13:43 -0800
Lines: 12
Distribution: su
Message-ID: <dt6kvp$sb5$2@news.Stanford.EDU>
References: <dt5bja$equ$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt5bja$equ$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10212

I can't promise anything, but there is a good chance the grades will be 
up Monday night.

Greg Donaker wrote:
> Stanford's 'Change of grading basis deadline' is this Monday (2/20) at 
> midnight.  Is there any chance we'll have the results of the midterm by 
> then?
> 
> Thanks,
> Greg 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 3 way handshake
Date: Sat, 18 Feb 2006 00:35:50 -0800
Lines: 15
Distribution: su
Message-ID: <dt6m98$b0$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602171053550.20523-100000@elaine42.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602171053550.20523-100000@elaine42.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10213

See Peterson & Davie section 5.2, pg 387 for the answer.  "if the 
client's ACK to the server is lost...then the connection still functions 
correctly".

Wai Kei So wrote:
> Hello,
> 
> What happens if the 3rd packet (ack) of the 3 way handshake is dropped?
> Does the passive entity timeout?  (what's the initial timeout value it
> should use?)  Since there's no ack for acks, how does the active entity
> know to resend the ack (or does it at all?)?
> 
> Thanks in advance,
> -Wai Kei
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Sat, 18 Feb 2006 03:53:07 -0800
Lines: 112
Distribution: su
Message-ID: <dt71qq$8sm$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU> <dsrhtr$sn6$1@news.Stanford.EDU> <dt6kh0$rlj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10214

Nope, it works fine for me.  Well, it gets killed after some long period of
time, but I assume that's because I don't have any code yet.  I'm not seeing
the libssl.so error, though.

Waynn

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
news:dt6kh0$rlj$1@news.Stanford.EDU...
> Sorry I don't know.  Is anyone else seeing this?
>
> Jesse Young wrote:
> >  That's weird, because on several different elaines, the grading script
> > successfully compiles "server" with my transport.c but it gets
immediately
> > killed by the loader because it can't find libssl 0.9.7:
> >
> > make -f /usr/class/cs244a/grading_script/hw3/Makefile
> > LIBDIR=/usr/class/cs244a/grading_script/hw3 server
> >
gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homewo
rks/hw3/src
> >  -o server /usr/class/cs244a/grading_script/hw3/server.o
> > /usr/class/cs244a/grading_script/hw3/connection_demux.o
> > /usr/class/cs244a/grading_script/hw3/mysock.o
> > /usr/class/cs244a/grading_script/hw3/mysock_api.o
> > /usr/class/cs244a/grading_script/hw3/network_io.o
> > /usr/class/cs244a/grading_script/hw3/network_io_socket.o
> > /usr/class/cs244a/grading_script/hw3/network_io_tcp.o
> > /usr/class/cs244a/grading_script/hw3/stcp_api.o
> > /usr/class/cs244a/grading_script/hw3/tcp_sum.o
> > /usr/class/cs244a/grading_script/hw3/network.o
> > transport.c -lsocket -lnsl -lm -lmd5 -lpthread
> >
> > Testing input file TESTDATA.0
> >
> > Starting server:
> >
afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
> >
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
t
> > 2>&1 >
> >
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
put
> > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> > directory
> > Killed
> > warning:  server not responding, retrying
> > Starting server:
> >
afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
> >
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
t
> > 2>&1 >
> >
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
put
> > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> > directory
> > Killed
> > warning:  server not responding, retrying
> > Starting server:
> >
afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
> >
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
t
> > 2>&1 >
> >
/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
put
> > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> > directory
> > Killed
> > ... etc
> >
> >
> > "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> > news:dspi2b$ivo$1@news.Stanford.EDU...
> >
> >>Actually it looks like it's ok.  I ran on elaine with no problems:
> >>
> >>/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
> >>
> >>Jesse Young wrote:
> >>
> >>>Is the test script for hw3a supposed to be working yet?
> >>>
> >>>When I try it, I get the error:
> >>>
> >>>
> >>>
> >>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> >>>>directory
> >>>>Killed
> >>>
> >>>
> >>>The test script then realizes that the server is not responding and
keeps
> >>>retrying and getting that error message every time.
> >>>
> >>>It seems unlikely that this is a STCP-related error....
> >>>
> >>>Thanks,
> >>>Jesse
> >
> >
> >


.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: proj3 on _DARWIN_
Date: Sat, 18 Feb 2006 05:46:24 -0800
Lines: 18
Distribution: su
Message-ID: <dt78fh$fjv$1@news.Stanford.EDU>
References: <C01A5454.33EB%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <C01A5454.33EB%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10215

I'm having one hell of a hard time getting it compiling on Linux, let 
alone darwin. If you get it working on darwin, please let me know 
because we might be solving the same problems.

Thanks

Paul

Sunny Balwani wrote:
> Hi.
> So, it seems like out of the box, the project only compiles on
> solaris/linux/win32 but not for Mac Darwin. I assume it is because of the
> object files included with the project?  Other reasons??
> 
> Is there anyway we can get DARWIN_ support for those of us coding on MacOSX.
> 
> Thanks in advance.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: proj3 on _DARWIN_
Date: Sat, 18 Feb 2006 19:34:34 +0000 (UTC)
Lines: 15
Distribution: su
Message-ID: <dt7ssa$16g$1@news.Stanford.EDU>
References: <C01A5454.33EB%sunnybalwani@hotmail.com> <dt78fh$fjv$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10216

I have been trying to get it to work on linux and can get it to where it tries
to build our.ftpcopy_vns but to finish that it requires linux versions of
libftpcopy_vns.a which I couldnt find.  Has anyone gotten past this?

To get here I had to do the following:
    o hard define OSTYPE to be linux (could be me just being a bonehead)
    o get tar file for the sr_transport, extract the .a's into your 
      sr_transport dir (they need to be in a dir of that name with the .h's)
    o get the linux ftpcopy libs from their .tar.gz file and put them anywhere
      handy and edit the Makefile to have a -L pointing where you put them
      which must come before the old -L
    o add -lcrypt and -lssl whenever it breaks with unresolved syms

I think perhaps at this point we can build our project on linux and then
run the ftpcopy stuff on the elaines to test but I havent tried.
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: transport_init vs. control_loop
Date: Sat, 18 Feb 2006 18:02:35 -0800
Lines: 11
Distribution: su
Message-ID: <dt8jjh$ier$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10217

The documentation in transport.c implies that we shouldn't call control_loop
until the connection is established.  However, we still have to handle the
case where we get a close after we received a SYN, right?  Which means we'll
have to duplicate the logic for handling connection closing in both
control_loop and transport_init.  Is it possible to either do all the state
transitions in transport_init or not have to deal with a close after
receiving a SYN?

Waynn


.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Sat, 18 Feb 2006 18:25:50 -0800
Lines: 134
Distribution: su
Message-ID: <Pine.GSO.4.44.0602181822480.29054-100000@elaine13.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU>
 <dsrhtr$sn6$1@news.Stanford.EDU> <dt6kh0$rlj$1@news.Stanford.EDU>
 <dt71qq$8sm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dt71qq$8sm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10218

I tired running the test for hw3a on elaine13 and also ran into problems.
Same issue with

ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
directory
Killed


for those not having problems, can you please specify which machine you
ran the tests from.

I haven't implemented any functionality yet, just submitted the default
files. But I shouldn't be getting a missing file error, right? I'm
expecting that all the tests will fail, but it should at least run them.

- Miguel


On Sat, 18 Feb 2006, Waynn Lue wrote:

> Nope, it works fine for me.  Well, it gets killed after some long period of
> time, but I assume that's because I don't have any code yet.  I'm not seeing
> the libssl.so error, though.
>
> Waynn
>
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> news:dt6kh0$rlj$1@news.Stanford.EDU...
> > Sorry I don't know.  Is anyone else seeing this?
> >
> > Jesse Young wrote:
> > >  That's weird, because on several different elaines, the grading script
> > > successfully compiles "server" with my transport.c but it gets
> immediately
> > > killed by the loader because it can't find libssl 0.9.7:
> > >
> > > make -f /usr/class/cs244a/grading_script/hw3/Makefile
> > > LIBDIR=/usr/class/cs244a/grading_script/hw3 server
> > >
> gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homewo
> rks/hw3/src
> > >  -o server /usr/class/cs244a/grading_script/hw3/server.o
> > > /usr/class/cs244a/grading_script/hw3/connection_demux.o
> > > /usr/class/cs244a/grading_script/hw3/mysock.o
> > > /usr/class/cs244a/grading_script/hw3/mysock_api.o
> > > /usr/class/cs244a/grading_script/hw3/network_io.o
> > > /usr/class/cs244a/grading_script/hw3/network_io_socket.o
> > > /usr/class/cs244a/grading_script/hw3/network_io_tcp.o
> > > /usr/class/cs244a/grading_script/hw3/stcp_api.o
> > > /usr/class/cs244a/grading_script/hw3/tcp_sum.o
> > > /usr/class/cs244a/grading_script/hw3/network.o
> > > transport.c -lsocket -lnsl -lm -lmd5 -lpthread
> > >
> > > Testing input file TESTDATA.0
> > >
> > > Starting server:
> > >
> afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
> > >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
> t
> > > 2>&1 >
> > >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
> put
> > > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> > > directory
> > > Killed
> > > warning:  server not responding, retrying
> > > Starting server:
> > >
> afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
> > >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
> t
> > > 2>&1 >
> > >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
> put
> > > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> > > directory
> > > Killed
> > > warning:  server not responding, retrying
> > > Starting server:
> > >
> afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
> > >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
> t
> > > 2>&1 >
> > >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
> put
> > > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> > > directory
> > > Killed
> > > ... etc
> > >
> > >
> > > "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> > > news:dspi2b$ivo$1@news.Stanford.EDU...
> > >
> > >>Actually it looks like it's ok.  I ran on elaine with no problems:
> > >>
> > >>/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
> > >>
> > >>Jesse Young wrote:
> > >>
> > >>>Is the test script for hw3a supposed to be working yet?
> > >>>
> > >>>When I try it, I get the error:
> > >>>
> > >>>
> > >>>
> > >>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> > >>>>directory
> > >>>>Killed
> > >>>
> > >>>
> > >>>The test script then realizes that the server is not responding and
> keeps
> > >>>retrying and getting that error message every time.
> > >>>
> > >>>It seems unlikely that this is a STCP-related error....
> > >>>
> > >>>Thanks,
> > >>>Jesse
> > >
> > >
> > >
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Sat, 18 Feb 2006 19:11:07 -0800
Lines: 168
Distribution: su
Message-ID: <dt8nkf$lng$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU> <dsrhtr$sn6$1@news.Stanford.EDU> <dt6kh0$rlj$1@news.Stanford.EDU> <dt71qq$8sm$1@news.Stanford.EDU> <Pine.GSO.4.44.0602181822480.29054-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602181822480.29054-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10219

I ran these commands:

elaine19:~/cs244a/newpp3> /usr/class/cs244a/WWW/homeworks/hw3/gethw
elaine19:~/cs244a/newpp3> make
elaine19:~/cs244a/newpp3> /usr/class/cs244a/bin/test_code.pl hw3a 
Makefile *.c *.h

and don't see any libssl errors (but test script is running for a long 
time).

Can someone seeing the error e-mail me the commands you ran and the 
output you got?

Miguel Sanchez wrote:
> I tired running the test for hw3a on elaine13 and also ran into problems.
> Same issue with
> 
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> directory
> Killed
> 
> 
> for those not having problems, can you please specify which machine you
> ran the tests from.
> 
> I haven't implemented any functionality yet, just submitted the default
> files. But I shouldn't be getting a missing file error, right? I'm
> expecting that all the tests will fail, but it should at least run them.
> 
> - Miguel
> 
> 
> On Sat, 18 Feb 2006, Waynn Lue wrote:
> 
> 
>>Nope, it works fine for me.  Well, it gets killed after some long period of
>>time, but I assume that's because I don't have any code yet.  I'm not seeing
>>the libssl.so error, though.
>>
>>Waynn
>>
>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>news:dt6kh0$rlj$1@news.Stanford.EDU...
>>
>>>Sorry I don't know.  Is anyone else seeing this?
>>>
>>>Jesse Young wrote:
>>>
>>>> That's weird, because on several different elaines, the grading script
>>>>successfully compiles "server" with my transport.c but it gets
>>
>>immediately
>>
>>>>killed by the loader because it can't find libssl 0.9.7:
>>>>
>>>>make -f /usr/class/cs244a/grading_script/hw3/Makefile
>>>>LIBDIR=/usr/class/cs244a/grading_script/hw3 server
>>>>
>>
>>gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homewo
>>rks/hw3/src
>>
>>>> -o server /usr/class/cs244a/grading_script/hw3/server.o
>>>>/usr/class/cs244a/grading_script/hw3/connection_demux.o
>>>>/usr/class/cs244a/grading_script/hw3/mysock.o
>>>>/usr/class/cs244a/grading_script/hw3/mysock_api.o
>>>>/usr/class/cs244a/grading_script/hw3/network_io.o
>>>>/usr/class/cs244a/grading_script/hw3/network_io_socket.o
>>>>/usr/class/cs244a/grading_script/hw3/network_io_tcp.o
>>>>/usr/class/cs244a/grading_script/hw3/stcp_api.o
>>>>/usr/class/cs244a/grading_script/hw3/tcp_sum.o
>>>>/usr/class/cs244a/grading_script/hw3/network.o
>>>>transport.c -lsocket -lnsl -lm -lmd5 -lpthread
>>>>
>>>>Testing input file TESTDATA.0
>>>>
>>>>Starting server:
>>>>
>>
>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>t
>>
>>>>2>&1 >
>>>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>put
>>
>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>directory
>>>>Killed
>>>>warning:  server not responding, retrying
>>>>Starting server:
>>>>
>>
>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>t
>>
>>>>2>&1 >
>>>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>put
>>
>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>directory
>>>>Killed
>>>>warning:  server not responding, retrying
>>>>Starting server:
>>>>
>>
>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>t
>>
>>>>2>&1 >
>>>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>put
>>
>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>directory
>>>>Killed
>>>>... etc
>>>>
>>>>
>>>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>>>news:dspi2b$ivo$1@news.Stanford.EDU...
>>>>
>>>>
>>>>>Actually it looks like it's ok.  I ran on elaine with no problems:
>>>>>
>>>>>/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
>>>>>
>>>>>Jesse Young wrote:
>>>>>
>>>>>
>>>>>>Is the test script for hw3a supposed to be working yet?
>>>>>>
>>>>>>When I try it, I get the error:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>>>>directory
>>>>>>>Killed
>>>>>>
>>>>>>
>>>>>>The test script then realizes that the server is not responding and
>>
>>keeps
>>
>>>>>>retrying and getting that error message every time.
>>>>>>
>>>>>>It seems unlikely that this is a STCP-related error....
>>>>>>
>>>>>>Thanks,
>>>>>>Jesse
>>>>
>>>>
>>>>
>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Sat, 18 Feb 2006 19:13:42 -0800
Lines: 140
Distribution: su
Message-ID: <dt8np7$lro$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU> <dsrhtr$sn6$1@news.Stanford.EDU> <dt6kh0$rlj$1@news.Stanford.EDU> <dt71qq$8sm$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10220

It still gives me that libssl error, no matter what I do. Here is what I've 
tried:

* Submitting the starter code
* Compiling from /tmp instead of AFS
* Moving everything out of my home directory (including dot files)
* Freeing 150MB of AFS space
* Submitting from saga and several different elaines
* Varying the parameters to the test_script call

I'm beginning to think that the test script has something against me 
personally.

Could someone try submitting the starter code from my home directory (you 
should have AFS permissions) and tell me what happens?

> cd /afs/ir.stanford.edu/users/y/o/youngj/test
> /afs/ir/class/cs244a/bin/test_code.pl hw3a transport.c

Thanks,
Jesse

"Waynn Lue" <wlue@stanford.edu> wrote in message 
news:dt71qq$8sm$1@news.Stanford.EDU...
> Nope, it works fine for me.  Well, it gets killed after some long period 
> of
> time, but I assume that's because I don't have any code yet.  I'm not 
> seeing
> the libssl.so error, though.
>
> Waynn
>
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> news:dt6kh0$rlj$1@news.Stanford.EDU...
>> Sorry I don't know.  Is anyone else seeing this?
>>
>> Jesse Young wrote:
>> >  That's weird, because on several different elaines, the grading script
>> > successfully compiles "server" with my transport.c but it gets
> immediately
>> > killed by the loader because it can't find libssl 0.9.7:
>> >
>> > make -f /usr/class/cs244a/grading_script/hw3/Makefile
>> > LIBDIR=/usr/class/cs244a/grading_script/hw3 server
>> >
> gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homewo
> rks/hw3/src
>> >  -o server /usr/class/cs244a/grading_script/hw3/server.o
>> > /usr/class/cs244a/grading_script/hw3/connection_demux.o
>> > /usr/class/cs244a/grading_script/hw3/mysock.o
>> > /usr/class/cs244a/grading_script/hw3/mysock_api.o
>> > /usr/class/cs244a/grading_script/hw3/network_io.o
>> > /usr/class/cs244a/grading_script/hw3/network_io_socket.o
>> > /usr/class/cs244a/grading_script/hw3/network_io_tcp.o
>> > /usr/class/cs244a/grading_script/hw3/stcp_api.o
>> > /usr/class/cs244a/grading_script/hw3/tcp_sum.o
>> > /usr/class/cs244a/grading_script/hw3/network.o
>> > transport.c -lsocket -lnsl -lm -lmd5 -lpthread
>> >
>> > Testing input file TESTDATA.0
>> >
>> > Starting server:
>> >
> afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>> >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
> t
>> > 2>&1 >
>> >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
> put
>> > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>> > directory
>> > Killed
>> > warning:  server not responding, retrying
>> > Starting server:
>> >
> afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>> >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
> t
>> > 2>&1 >
>> >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
> put
>> > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>> > directory
>> > Killed
>> > warning:  server not responding, retrying
>> > Starting server:
>> >
> afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>> >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
> t
>> > 2>&1 >
>> >
> /afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
> put
>> > ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>> > directory
>> > Killed
>> > ... etc
>> >
>> >
>> > "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>> > news:dspi2b$ivo$1@news.Stanford.EDU...
>> >
>> >>Actually it looks like it's ok.  I ran on elaine with no problems:
>> >>
>> >>/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
>> >>
>> >>Jesse Young wrote:
>> >>
>> >>>Is the test script for hw3a supposed to be working yet?
>> >>>
>> >>>When I try it, I get the error:
>> >>>
>> >>>
>> >>>
>> >>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>> >>>>directory
>> >>>>Killed
>> >>>
>> >>>
>> >>>The test script then realizes that the server is not responding and
> keeps
>> >>>retrying and getting that error message every time.
>> >>>
>> >>>It seems unlikely that this is a STCP-related error....
>> >>>
>> >>>Thanks,
>> >>>Jesse
>> >
>> >
>> >
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: proj3 on _DARWIN_
Date: Sat, 18 Feb 2006 19:56:48 -0800
Lines: 25
Distribution: su
Message-ID: <dt8q9v$nog$1@news.Stanford.EDU>
References: <C01A5454.33EB%sunnybalwani@hotmail.com> <dt78fh$fjv$1@news.Stanford.EDU> <dt7ssa$16g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dt7ssa$16g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10221

Very good job :)

You did exactly as I did (except I didn't hardcode anything (like OSTYPE 
= linx) so my code is still compilable on solaris).

I've got a call into Martin about this. I'll keep you posted.

Paul

Stefan Thomas Mohler wrote:
> I have been trying to get it to work on linux and can get it to where it tries
> to build our.ftpcopy_vns but to finish that it requires linux versions of
> libftpcopy_vns.a which I couldnt find.  Has anyone gotten past this?
> 
> To get here I had to do the following:
>     o hard define OSTYPE to be linux (could be me just being a bonehead)
>     o get tar file for the sr_transport, extract the .a's into your 
>       sr_transport dir (they need to be in a dir of that name with the .h's)
>     o get the linux ftpcopy libs from their .tar.gz file and put them anywhere
>       handy and edit the Makefile to have a -L pointing where you put them
>       which must come before the old -L
>     o add -lcrypt and -lssl whenever it breaks with unresolved syms
> 
> I think perhaps at this point we can build our project on linux and then
> run the ftpcopy stuff on the elaines to test but I havent tried.
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test
Date: Sat, 18 Feb 2006 19:58:56 -0800
Lines: 17
Distribution: su
Message-ID: <dt8qdv$nog$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10222

It appears the the elaines don't have the SSL libraries on them. I keep 
getting this when I'm testing:

Starting server: 
/afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/server 
  -p 
/afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/.server_output
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
directory
Killed
warning:  server not responding, retrying

why does the server need ssl btw?

Paul
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Sat, 18 Feb 2006 21:02:15 -0800
Lines: 166
Distribution: su
Message-ID: <dt8u4r$qoa$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU> <dsrhtr$sn6$1@news.Stanford.EDU> <dt6kh0$rlj$1@news.Stanford.EDU> <dt71qq$8sm$1@news.Stanford.EDU> <dt8np7$lro$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt8np7$lro$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10223

libssl should be in /usr/pubsw/lib.  Does your LD_LIBRARY_PATH include 
that dir?  I thought everyone's would by default.

Jesse Young wrote:
> It still gives me that libssl error, no matter what I do. Here is what I've 
> tried:
> 
> * Submitting the starter code
> * Compiling from /tmp instead of AFS
> * Moving everything out of my home directory (including dot files)
> * Freeing 150MB of AFS space
> * Submitting from saga and several different elaines
> * Varying the parameters to the test_script call
> 
> I'm beginning to think that the test script has something against me 
> personally.
> 
> Could someone try submitting the starter code from my home directory (you 
> should have AFS permissions) and tell me what happens?
> 
> 
>>cd /afs/ir.stanford.edu/users/y/o/youngj/test
>>/afs/ir/class/cs244a/bin/test_code.pl hw3a transport.c
> 
> 
> Thanks,
> Jesse
> 
> "Waynn Lue" <wlue@stanford.edu> wrote in message 
> news:dt71qq$8sm$1@news.Stanford.EDU...
> 
>>Nope, it works fine for me.  Well, it gets killed after some long period 
>>of
>>time, but I assume that's because I don't have any code yet.  I'm not 
>>seeing
>>the libssl.so error, though.
>>
>>Waynn
>>
>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>news:dt6kh0$rlj$1@news.Stanford.EDU...
>>
>>>Sorry I don't know.  Is anyone else seeing this?
>>>
>>>Jesse Young wrote:
>>>
>>>> That's weird, because on several different elaines, the grading script
>>>>successfully compiles "server" with my transport.c but it gets
>>
>>immediately
>>
>>>>killed by the loader because it can't find libssl 0.9.7:
>>>>
>>>>make -f /usr/class/cs244a/grading_script/hw3/Makefile
>>>>LIBDIR=/usr/class/cs244a/grading_script/hw3 server
>>>>
>>
>>gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homewo
>>rks/hw3/src
>>
>>>> -o server /usr/class/cs244a/grading_script/hw3/server.o
>>>>/usr/class/cs244a/grading_script/hw3/connection_demux.o
>>>>/usr/class/cs244a/grading_script/hw3/mysock.o
>>>>/usr/class/cs244a/grading_script/hw3/mysock_api.o
>>>>/usr/class/cs244a/grading_script/hw3/network_io.o
>>>>/usr/class/cs244a/grading_script/hw3/network_io_socket.o
>>>>/usr/class/cs244a/grading_script/hw3/network_io_tcp.o
>>>>/usr/class/cs244a/grading_script/hw3/stcp_api.o
>>>>/usr/class/cs244a/grading_script/hw3/tcp_sum.o
>>>>/usr/class/cs244a/grading_script/hw3/network.o
>>>>transport.c -lsocket -lnsl -lm -lmd5 -lpthread
>>>>
>>>>Testing input file TESTDATA.0
>>>>
>>>>Starting server:
>>>>
>>
>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>t
>>
>>>>2>&1 >
>>>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>put
>>
>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>directory
>>>>Killed
>>>>warning:  server not responding, retrying
>>>>Starting server:
>>>>
>>
>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>t
>>
>>>>2>&1 >
>>>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>put
>>
>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>directory
>>>>Killed
>>>>warning:  server not responding, retrying
>>>>Starting server:
>>>>
>>
>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>t
>>
>>>>2>&1 >
>>>>
>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>put
>>
>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>directory
>>>>Killed
>>>>... etc
>>>>
>>>>
>>>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>>>news:dspi2b$ivo$1@news.Stanford.EDU...
>>>>
>>>>
>>>>>Actually it looks like it's ok.  I ran on elaine with no problems:
>>>>>
>>>>>/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
>>>>>
>>>>>Jesse Young wrote:
>>>>>
>>>>>
>>>>>>Is the test script for hw3a supposed to be working yet?
>>>>>>
>>>>>>When I try it, I get the error:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>>>>directory
>>>>>>>Killed
>>>>>>
>>>>>>
>>>>>>The test script then realizes that the server is not responding and
>>
>>keeps
>>
>>>>>>retrying and getting that error message every time.
>>>>>>
>>>>>>It seems unlikely that this is a STCP-related error....
>>>>>>
>>>>>>Thanks,
>>>>>>Jesse
>>>>
>>>>
>>>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a test script
Date: Sat, 18 Feb 2006 21:32:00 -0800
Lines: 182
Distribution: su
Message-ID: <dt8vsh$sbt$1@news.Stanford.EDU>
References: <dsmt50$2cn$1@news.Stanford.EDU> <dspi2b$ivo$1@news.Stanford.EDU> <dsrhtr$sn6$1@news.Stanford.EDU> <dt6kh0$rlj$1@news.Stanford.EDU> <dt71qq$8sm$1@news.Stanford.EDU> <dt8np7$lro$1@news.Stanford.EDU> <dt8u4r$qoa$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10224

I didn't have a LD_LIBRARY_PATH environment variable before, so I set it and 
recompiled but it doesn't seem to make any difference:

> echo $LD_LIBRARY_PATH
/usr/pubsw/lib

(recompile server in grading_src/build)

> ./server
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
directory
Killed

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dt8u4r$qoa$1@news.Stanford.EDU...
> libssl should be in /usr/pubsw/lib.  Does your LD_LIBRARY_PATH include 
> that dir?  I thought everyone's would by default.
>
> Jesse Young wrote:
>> It still gives me that libssl error, no matter what I do. Here is what 
>> I've tried:
>>
>> * Submitting the starter code
>> * Compiling from /tmp instead of AFS
>> * Moving everything out of my home directory (including dot files)
>> * Freeing 150MB of AFS space
>> * Submitting from saga and several different elaines
>> * Varying the parameters to the test_script call
>>
>> I'm beginning to think that the test script has something against me 
>> personally.
>>
>> Could someone try submitting the starter code from my home directory (you 
>> should have AFS permissions) and tell me what happens?
>>
>>
>>>cd /afs/ir.stanford.edu/users/y/o/youngj/test
>>>/afs/ir/class/cs244a/bin/test_code.pl hw3a transport.c
>>
>>
>> Thanks,
>> Jesse
>>
>> "Waynn Lue" <wlue@stanford.edu> wrote in message 
>> news:dt71qq$8sm$1@news.Stanford.EDU...
>>
>>>Nope, it works fine for me.  Well, it gets killed after some long period 
>>>of
>>>time, but I assume that's because I don't have any code yet.  I'm not 
>>>seeing
>>>the libssl.so error, though.
>>>
>>>Waynn
>>>
>>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>>news:dt6kh0$rlj$1@news.Stanford.EDU...
>>>
>>>>Sorry I don't know.  Is anyone else seeing this?
>>>>
>>>>Jesse Young wrote:
>>>>
>>>>> That's weird, because on several different elaines, the grading script
>>>>>successfully compiles "server" with my transport.c but it gets
>>>
>>>immediately
>>>
>>>>>killed by the loader because it can't find libssl 0.9.7:
>>>>>
>>>>>make -f /usr/class/cs244a/grading_script/hw3/Makefile
>>>>>LIBDIR=/usr/class/cs244a/grading_script/hw3 server
>>>>>
>>>
>>>gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homewo
>>>rks/hw3/src
>>>
>>>>> -o server /usr/class/cs244a/grading_script/hw3/server.o
>>>>>/usr/class/cs244a/grading_script/hw3/connection_demux.o
>>>>>/usr/class/cs244a/grading_script/hw3/mysock.o
>>>>>/usr/class/cs244a/grading_script/hw3/mysock_api.o
>>>>>/usr/class/cs244a/grading_script/hw3/network_io.o
>>>>>/usr/class/cs244a/grading_script/hw3/network_io_socket.o
>>>>>/usr/class/cs244a/grading_script/hw3/network_io_tcp.o
>>>>>/usr/class/cs244a/grading_script/hw3/stcp_api.o
>>>>>/usr/class/cs244a/grading_script/hw3/tcp_sum.o
>>>>>/usr/class/cs244a/grading_script/hw3/network.o
>>>>>transport.c -lsocket -lnsl -lm -lmd5 -lpthread
>>>>>
>>>>>Testing input file TESTDATA.0
>>>>>
>>>>>Starting server:
>>>>>
>>>
>>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>>
>>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>>t
>>>
>>>>>2>&1 >
>>>>>
>>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>>put
>>>
>>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>>directory
>>>>>Killed
>>>>>warning:  server not responding, retrying
>>>>>Starting server:
>>>>>
>>>
>>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>>
>>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>>t
>>>
>>>>>2>&1 >
>>>>>
>>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>>put
>>>
>>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>>directory
>>>>>Killed
>>>>>warning:  server not responding, retrying
>>>>>Starting server:
>>>>>
>>>
>>>afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/server  -p
>>>
>>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_por
>>>t
>>>
>>>>>2>&1 >
>>>>>
>>>/afs/ir.stanford.edu/users/y/o/youngj/cs244a/3/grading_src/build/.server_out
>>>put
>>>
>>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
>>>>>directory
>>>>>Killed
>>>>>... etc
>>>>>
>>>>>
>>>>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>>>>news:dspi2b$ivo$1@news.Stanford.EDU...
>>>>>
>>>>>
>>>>>>Actually it looks like it's ok.  I ran on elaine with no problems:
>>>>>>
>>>>>>/usr/class/cs244a/bin/test_code.pl hw3a Makefile *.c *.h
>>>>>>
>>>>>>Jesse Young wrote:
>>>>>>
>>>>>>
>>>>>>>Is the test script for hw3a supposed to be working yet?
>>>>>>>
>>>>>>>When I try it, I get the error:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file 
>>>>>>>>or
>>>>>>>>directory
>>>>>>>>Killed
>>>>>>>
>>>>>>>
>>>>>>>The test script then realizes that the server is not responding and
>>>
>>>keeps
>>>
>>>>>>>retrying and getting that error message every time.
>>>>>>>
>>>>>>>It seems unlikely that this is a STCP-related error....
>>>>>>>
>>>>>>>Thanks,
>>>>>>>Jesse
>>>>>
>>>>>
>>>>>
>>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: READ THIS IF YOUR TESTING DOESN'T WORK
Date: Sat, 18 Feb 2006 22:41:42 -0800
Lines: 37
Distribution: su
Message-ID: <dt93v5$21p$1@news.Stanford.EDU>
References: <dt8qdv$nog$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dt8qdv$nog$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10225

Well... It appears it was a LD_LIBRARY_PATH problem. It seems I have a 
LD_RUN_PATH that is set properly, but not the LD_LIBRARY_PATH.

Anyone with this problem, type this in a console before testing your 
code (if you are using bash):

export LD_LIBRARY_PATH=/usr/pubsw/lib/

or if you are using tcsh:

set LD_LIBRARY_PATH=/usr/pubsw/lib/

then run the test script.

I wonder why the defaults aren't setup properly?

Paul

Paul Tarjan wrote:
> It appears the the elaines don't have the SSL libraries on them. I keep 
> getting this when I'm testing:
> 
> Starting server: 
> /afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/server 
>  -p 
> /afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/.server_port 
> 2>&1 > 
> /afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/.server_output 
> 
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
> directory
> Killed
> warning:  server not responding, retrying
> 
> why does the server need ssl btw?
> 
> Paul
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: proj3 on _DARWIN_
Date: Sat, 18 Feb 2006 23:39:40 -0800
Lines: 62
Distribution: su
Message-ID: <dt97bq$4h4$1@news.Stanford.EDU>
References: <C01A5454.33EB%sunnybalwani@hotmail.com> <dt78fh$fjv$1@news.Stanford.EDU> <dt7ssa$16g$1@news.Stanford.EDU> <dt8q9v$nog$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dt8q9v$nog$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10226

Indeed, after the changes from Stefan, it works under linux :) Here are 
the detailed instructions (for anyone interested).

I'm assuming your current directory contains all the checked out files, 
and you want to copy the files onto the machine named "my_linux_box" 
with username "username" into the directory "cs244a".

1. 	Copy all your files from elaine to a linux box. Something like:
	scp -r . username@my_linux_box:~/cs244a

2.	Insert this line at the top of ENVCFG.MK:
	OSTYPE = $(shell uname)
	
	And change the line "ifeq ($(strip $(OSTYPE)),linux)" to
	"ifeq ($(strip $(OSTYPE)),Linux)"

	Optional: Change "ifeq ($(strip $(OSTYPE)),solaris)" to
	"ifeq ($(strip $(OSTYPE)),SunOS)" if you want it to still 			compile on 
solaris

3.	Run:
	make client server

Thats it. It should compile cleanly. You will be missing the ftd_client 
support but your own client and server should work together.

Hope this helps.

Paul


Paul Tarjan wrote:
> Very good job :)
> 
> You did exactly as I did (except I didn't hardcode anything (like OSTYPE 
> = linx) so my code is still compilable on solaris).
> 
> I've got a call into Martin about this. I'll keep you posted.
> 
> Paul
> 
> Stefan Thomas Mohler wrote:
> 
>> I have been trying to get it to work on linux and can get it to where 
>> it tries
>> to build our.ftpcopy_vns but to finish that it requires linux versions of
>> libftpcopy_vns.a which I couldnt find.  Has anyone gotten past this?
>>
>> To get here I had to do the following:
>>     o hard define OSTYPE to be linux (could be me just being a bonehead)
>>     o get tar file for the sr_transport, extract the .a's into your 
>>       sr_transport dir (they need to be in a dir of that name with the 
>> .h's)
>>     o get the linux ftpcopy libs from their .tar.gz file and put them 
>> anywhere
>>       handy and edit the Makefile to have a -L pointing where you put 
>> them
>>       which must come before the old -L
>>     o add -lcrypt and -lssl whenever it breaks with unresolved syms
>>
>> I think perhaps at this point we can build our project on linux and then
>> run the ftpcopy stuff on the elaines to test but I havent tried.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: transport_init vs. control_loop
Date: Sun, 19 Feb 2006 01:08:09 -0800
Lines: 17
Distribution: su
Message-ID: <dt9cht$b6h$1@news.Stanford.EDU>
References: <dt8jjh$ier$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt8jjh$ier$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10227

It just means you shouldn't unblock app until you reached ESTABLISHED 
state.  You can call control_loop before that happens.

You should deal with a close after SYN received, yes.

Waynn Lue wrote:
> The documentation in transport.c implies that we shouldn't call control_loop
> until the connection is established.  However, we still have to handle the
> case where we get a close after we received a SYN, right?  Which means we'll
> have to duplicate the logic for handling connection closing in both
> control_loop and transport_init.  Is it possible to either do all the state
> transitions in transport_init or not have to deal with a close after
> receiving a SYN?
> 
> Waynn
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: READ THIS IF YOUR TESTING DOESN'T WORK
Date: Sun, 19 Feb 2006 01:24:38 -0800
Lines: 48
Distribution: su
Message-ID: <dt9dgp$bbb$1@news.Stanford.EDU>
References: <dt8qdv$nog$2@news.Stanford.EDU> <dt93v5$21p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt93v5$21p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10228

Actually use:

setenv LD_LIBRARY_PATH /usr/pubsw/lib/

if you're using tcsh.

Sry for all this mess, I think the Leland machines were updated somehow 
from previous years.

Paul Tarjan wrote:
> Well... It appears it was a LD_LIBRARY_PATH problem. It seems I have a 
> LD_RUN_PATH that is set properly, but not the LD_LIBRARY_PATH.
> 
> Anyone with this problem, type this in a console before testing your 
> code (if you are using bash):
> 
> export LD_LIBRARY_PATH=/usr/pubsw/lib/
> 
> or if you are using tcsh:
> 
> set LD_LIBRARY_PATH=/usr/pubsw/lib/
> 
> then run the test script.
> 
> I wonder why the defaults aren't setup properly?
> 
> Paul
> 
> Paul Tarjan wrote:
> 
>> It appears the the elaines don't have the SSL libraries on them. I 
>> keep getting this when I'm testing:
>>
>> Starting server: 
>> /afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/server 
>>  -p 
>> /afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/.server_port 
>> 2>&1 > 
>> /afs/ir.stanford.edu/users/p/t/ptarjan/cs244a/assign3/grading_src/build/.server_output 
>>
>> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
>> directory
>> Killed
>> warning:  server not responding, retrying
>>
>> why does the server need ssl btw?
>>
>> Paul
.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: more fun iwth purify
Date: Sun, 19 Feb 2006 11:27:42 -0800
Lines: 43
Distribution: su
Message-ID: <dtagss$aj0$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10229

So, I can't get purify to work for hw3.  I haven't had any problems on the 
other assignments though, so I'm thinking that something in the leland 
enviornment has changed since then?  Has anybody else encounterred this or 
knows how to fix it?  The error that I'm getting is :

Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright IBM 
Corp. 1992, 2005 All rights reserved.
Instrumenting:
Purify engine: Error: Tried to link with directory (/usr/lib): skipping.

Purify engine: Error: Errors detected while instrumenting files.
Linking suppressed.
(To force continuation, use "purify -best-effort $(CC) ...".)


so, if I include the -best-effort flag in the makefile, I get the following 
error


Purify or PureCoverage engine: Warning: Could not locate gcc demangler
"c++filt" or "cxxfilt" in gcc install directory 
/usr/pubsw/package/Languages/gcc-3.4.4/sun4x_58/bin/.
When gcc/g++ 3.x compilers are used, purify or purecov requires an external
demangler, in order to show function names correctly. You can specify
the demangler using the -demangle-program option or create a link to the
demangler, named either c++filt or cxxfilt.   cxxfilt is a part of the
"binutils" package.

Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright IBM 
Corp. 1992, 2005 All rights reserved.
Instrumenting:
Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
 Linking
ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors

Purify engine: Error: The linker returned error code: 1


Can anyone offer assistance?
Thanks 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Error handling
Date: Sun, 19 Feb 2006 20:21:21 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: <dtak01$ag6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10230

So, in looking at mywrite() in mysock_api.c I cant see how it handles 
errors.  It looks like it returns the buffer length it was handed meaning
all bytes were buffered, no errors.  

I know we process the requests asynchronously from when they are sent down
the stack but what happens if in writing the packet out onto the network we
get an error from gettimeofday or some such thing.  If we call 
stcp_unblock_application() it will see the error as an error during creation
not writing.  Can anyone point me in the right direction?

Stefan
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: more fun iwth purify
Date: Sun, 19 Feb 2006 16:18:05 -0800
Lines: 46
Distribution: su
Message-ID: <dtb1s2$ns2$1@news.Stanford.EDU>
References: <dtagss$aj0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtagss$aj0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10231

My bad, didn't update Makefile again.  Get the new Makefile.

Brent Ellwein wrote:
> So, I can't get purify to work for hw3.  I haven't had any problems on the 
> other assignments though, so I'm thinking that something in the leland 
> enviornment has changed since then?  Has anybody else encounterred this or 
> knows how to fix it?  The error that I'm getting is :
> 
> Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright IBM 
> Corp. 1992, 2005 All rights reserved.
> Instrumenting:
> Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
> 
> Purify engine: Error: Errors detected while instrumenting files.
> Linking suppressed.
> (To force continuation, use "purify -best-effort $(CC) ...".)
> 
> 
> so, if I include the -best-effort flag in the makefile, I get the following 
> error
> 
> 
> Purify or PureCoverage engine: Warning: Could not locate gcc demangler
> "c++filt" or "cxxfilt" in gcc install directory 
> /usr/pubsw/package/Languages/gcc-3.4.4/sun4x_58/bin/.
> When gcc/g++ 3.x compilers are used, purify or purecov requires an external
> demangler, in order to show function names correctly. You can specify
> the demangler using the -demangle-program option or create a link to the
> demangler, named either c++filt or cxxfilt.   cxxfilt is a part of the
> "binutils" package.
> 
> Purify 2003a.06.13 FixPack 0172 050110 Solaris 2 (32-bit) (c) Copyright IBM 
> Corp. 1992, 2005 All rights reserved.
> Instrumenting:
> Purify engine: Error: Tried to link with directory (/usr/lib): skipping.
>  Linking
> ld: fatal: option -dn and -P are incompatible
> ld: fatal: Flags processing errors
> 
> Purify engine: Error: The linker returned error code: 1
> 
> 
> Can anyone offer assistance?
> Thanks 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assignment #3, Number of tests permitted per day
Date: Sun, 19 Feb 2006 16:21:21 -0800
Lines: 18
Distribution: su
Message-ID: <dtb225$ns2$2@news.Stanford.EDU>
References: <dt38l1$d5q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt38l1$d5q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10232

Thanks for pointing this out, yes it's a typo.  We've updated the page:

"You can run up to 5 tests a day until 3 days before the deadline. After 
that time you will only be allowed 3 tests per day until the deadline."

Bruce Schechter wrote:
> In the Assignment #3 document, section "Testing Your Code", there is the 
> following statement:  "All tests are free. You can run up to 5 tests a day 
> until the day of the deadline. After that time you will only be allowed 3 
> tests per day until the deadline."
> 
> Is there a typo on that statement?  I assume that, like in Assignment #1, we 
> get only 3 tests per day as of 3 days before the deadline?
> 
> Thanks,
>  --- Bruce 
> 
> 
.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: compile errors with clean source
Date: Sun, 19 Feb 2006 22:22:11 -0800
Lines: 26
Distribution: su
Message-ID: <Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10233

doing a clean get of the source code and compiling produces

elaine27:~/cs244a/hw3a> make
Makefile:107: ***compiling with reference ftpcopy...***
gcc -g -DSOLARIS -D_REENTRANT -ansi -D__EXTENSIONS__ -Wall -W
-Wno-unused-function -Wno-unused-parameter  -c sr_transport/sr_vns_api.c
-o sr_transport/sr_vns_api.o
In file included from sr_transport/sr_arp.h:44,
                 from sr_transport/sr_router.h:16,
                 from sr_transport/sr_rt.h:21,
                 from sr_transport/sr_vns_api.c:28:
sr_transport/sr_protocol.h:87:2: #error "Byte ordering ot specified "
sr_transport/sr_vns_api.c: In function `sr_api_init_log':
sr_transport/sr_vns_api.c:89: warning: control reaches end of non-void
function
sr_transport/sr_vns_api.c: In function `sr_api_init':
sr_transport/sr_vns_api.c:143: warning: implicit declaration of function
`strncpy'
make: *** [sr_transport/sr_vns_api.o] Error 1


anyone else seeing this? the source was compiling earlier today

- Miguel


.

Path: shelby.stanford.edu!not-for-mail
From: "Nick Cooper" <nacooper@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: compile errors with clean source
Date: Sun, 19 Feb 2006 22:38:07 -0800
Lines: 35
Distribution: su
Message-ID: <dtbo59$bse$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10234

I'm having the same problem, even with clean source.

-Nick


"Miguel Sanchez" <sanchezm@stanford.edu> wrote in message 
news:Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU...
> doing a clean get of the source code and compiling produces
>
> elaine27:~/cs244a/hw3a> make
> Makefile:107: ***compiling with reference ftpcopy...***
> gcc -g -DSOLARIS -D_REENTRANT -ansi -D__EXTENSIONS__ -Wall -W
> -Wno-unused-function -Wno-unused-parameter  -c sr_transport/sr_vns_api.c
> -o sr_transport/sr_vns_api.o
> In file included from sr_transport/sr_arp.h:44,
>                 from sr_transport/sr_router.h:16,
>                 from sr_transport/sr_rt.h:21,
>                 from sr_transport/sr_vns_api.c:28:
> sr_transport/sr_protocol.h:87:2: #error "Byte ordering ot specified "
> sr_transport/sr_vns_api.c: In function `sr_api_init_log':
> sr_transport/sr_vns_api.c:89: warning: control reaches end of non-void
> function
> sr_transport/sr_vns_api.c: In function `sr_api_init':
> sr_transport/sr_vns_api.c:143: warning: implicit declaration of function
> `strncpy'
> make: *** [sr_transport/sr_vns_api.o] Error 1
>
>
> anyone else seeing this? the source was compiling earlier today
>
> - Miguel
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: compile errors with clean source
Date: Sun, 19 Feb 2006 22:38:05 -0800
Lines: 35
Distribution: su
Message-ID: <dtbo5v$bsj$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10235

I'm seeing the same thing, but it was working about an hour ago

--Brent


"Miguel Sanchez" <sanchezm@stanford.edu> wrote in message 
news:Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU...
> doing a clean get of the source code and compiling produces
>
> elaine27:~/cs244a/hw3a> make
> Makefile:107: ***compiling with reference ftpcopy...***
> gcc -g -DSOLARIS -D_REENTRANT -ansi -D__EXTENSIONS__ -Wall -W
> -Wno-unused-function -Wno-unused-parameter  -c sr_transport/sr_vns_api.c
> -o sr_transport/sr_vns_api.o
> In file included from sr_transport/sr_arp.h:44,
>                 from sr_transport/sr_router.h:16,
>                 from sr_transport/sr_rt.h:21,
>                 from sr_transport/sr_vns_api.c:28:
> sr_transport/sr_protocol.h:87:2: #error "Byte ordering ot specified "
> sr_transport/sr_vns_api.c: In function `sr_api_init_log':
> sr_transport/sr_vns_api.c:89: warning: control reaches end of non-void
> function
> sr_transport/sr_vns_api.c: In function `sr_api_init':
> sr_transport/sr_vns_api.c:143: warning: implicit declaration of function
> `strncpy'
> make: *** [sr_transport/sr_vns_api.o] Error 1
>
>
> anyone else seeing this? the source was compiling earlier today
>
> - Miguel
>
> 


.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: compile errors with clean source
Date: Sun, 19 Feb 2006 23:03:17 -0800
Lines: 47
Distribution: su
Message-ID: <Pine.GSO.4.44.0602192254480.568-100000@elaine27.Stanford.EDU>
References: <Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10236

I had a copy of the source from a few hours ago (no links) and there seems
to be some white space changes in sr_transport/sr_protocol.h

as a temporary solution, I've removed my linked version of the
sr_transport directory and copied my backup version, that seems to have
fixed the problem with my copy for now. Of course a real fix will have to
be done to the original sr_protocol.h

if you guys don't have a copy of the sr_protocol.h file from a few hours
ago, I've put one up for now at

homepage.mac.com/msanchez/sr_protocol.h


 - Miguel


On Sun, 19 Feb 2006, Miguel Sanchez wrote:

> doing a clean get of the source code and compiling produces
>
> elaine27:~/cs244a/hw3a> make
> Makefile:107: ***compiling with reference ftpcopy...***
> gcc -g -DSOLARIS -D_REENTRANT -ansi -D__EXTENSIONS__ -Wall -W
> -Wno-unused-function -Wno-unused-parameter  -c sr_transport/sr_vns_api.c
> -o sr_transport/sr_vns_api.o
> In file included from sr_transport/sr_arp.h:44,
>                  from sr_transport/sr_router.h:16,
>                  from sr_transport/sr_rt.h:21,
>                  from sr_transport/sr_vns_api.c:28:
> sr_transport/sr_protocol.h:87:2: #error "Byte ordering ot specified "
> sr_transport/sr_vns_api.c: In function `sr_api_init_log':
> sr_transport/sr_vns_api.c:89: warning: control reaches end of non-void
> function
> sr_transport/sr_vns_api.c: In function `sr_api_init':
> sr_transport/sr_vns_api.c:143: warning: implicit declaration of function
> `strncpy'
> make: *** [sr_transport/sr_vns_api.o] Error 1
>
>
> anyone else seeing this? the source was compiling earlier today
>
> - Miguel
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: compile errors with clean source
Date: Sun, 19 Feb 2006 23:29:14 -0800
Lines: 54
Distribution: su
Message-ID: <dtbr5q$eb5$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602192221110.27653-100000@elaine27.Stanford.EDU> <Pine.GSO.4.44.0602192254480.568-100000@elaine27.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Xref: shelby.stanford.edu su.class.cs244a:10237

Hey thanks, I didn't have local copies of my own.


"Miguel Sanchez" <sanchezm@stanford.edu> wrote in message 
news:Pine.GSO.4.44.0602192254480.568-100000@elaine27.Stanford.EDU...
>I had a copy of the source from a few hours ago (no links) and there seems
> to be some white space changes in sr_transport/sr_protocol.h
>
> as a temporary solution, I've removed my linked version of the
> sr_transport directory and copied my backup version, that seems to have
> fixed the problem with my copy for now. Of course a real fix will have to
> be done to the original sr_protocol.h
>
> if you guys don't have a copy of the sr_protocol.h file from a few hours
> ago, I've put one up for now at
>
> homepage.mac.com/msanchez/sr_protocol.h
>
>
> - Miguel
>
>
> On Sun, 19 Feb 2006, Miguel Sanchez wrote:
>
>> doing a clean get of the source code and compiling produces
>>
>> elaine27:~/cs244a/hw3a> make
>> Makefile:107: ***compiling with reference ftpcopy...***
>> gcc -g -DSOLARIS -D_REENTRANT -ansi -D__EXTENSIONS__ -Wall -W
>> -Wno-unused-function -Wno-unused-parameter  -c sr_transport/sr_vns_api.c
>> -o sr_transport/sr_vns_api.o
>> In file included from sr_transport/sr_arp.h:44,
>>                  from sr_transport/sr_router.h:16,
>>                  from sr_transport/sr_rt.h:21,
>>                  from sr_transport/sr_vns_api.c:28:
>> sr_transport/sr_protocol.h:87:2: #error "Byte ordering ot specified "
>> sr_transport/sr_vns_api.c: In function `sr_api_init_log':
>> sr_transport/sr_vns_api.c:89: warning: control reaches end of non-void
>> function
>> sr_transport/sr_vns_api.c: In function `sr_api_init':
>> sr_transport/sr_vns_api.c:143: warning: implicit declaration of function
>> `strncpy'
>> make: *** [sr_transport/sr_vns_api.o] Error 1
>>
>>
>> anyone else seeing this? the source was compiling earlier today
>>
>> - Miguel
>>
>>
>>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Parial ACKs
Date: Mon, 20 Feb 2006 03:45:51 -0800
Lines: 5
Distribution: su
Message-ID: <dtca5d$soc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10238

Will we ever get ACKs for data in the middle of a packet boundary? Or 
will it always be ACKing on packet boundaries?

Like: I send a packet starting at byte 20 with lenth 10, can an ACK come 
back saying "the next byte I want is 26"?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Parial ACKs
Date: Mon, 20 Feb 2006 04:19:20 -0800
Lines: 8
Distribution: su
Message-ID: <dtcc4e$2lm$1@news.Stanford.EDU>
References: <dtca5d$soc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtca5d$soc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10239

You have to handle this, yes.

Paul Tarjan wrote:
> Will we ever get ACKs for data in the middle of a packet boundary? Or 
> will it always be ACKing on packet boundaries?
> 
> Like: I send a packet starting at byte 20 with lenth 10, can an ACK come 
> back saying "the next byte I want is 26"?
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Parial ACKs
Date: Mon, 20 Feb 2006 13:33:31 -0800
Lines: 14
Distribution: su
Message-ID: <dtdcjb$sue$1@news.Stanford.EDU>
References: <dtca5d$soc$1@news.Stanford.EDU> <dtcc4e$2lm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dtcc4e$2lm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10240

Wow you're up late :)

Thanks for the answer.

Matt Falkenhagen wrote:
> You have to handle this, yes.
> 
> Paul Tarjan wrote:
> 
>> Will we ever get ACKs for data in the middle of a packet boundary? Or 
>> will it always be ACKing on packet boundaries?
>>
>> Like: I send a packet starting at byte 20 with lenth 10, can an ACK 
>> come back saying "the next byte I want is 26"?
.

Path: shelby.stanford.edu!not-for-mail
From: Eric B Friedman <eric06@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Receive buffer size?
Date: Mon, 20 Feb 2006 13:46:52 -0800
Lines: 12
Distribution: su
Message-ID: <dtddcd$hv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10241

Hi,

In the retransmissions section: "Your receiver must buffer any data it 
receives, even if it arrives out of order."

I assume this applies only to data received that falls within the 
current window? Otherwise, this would contradict the sliding window 
section, which says to discard data with sequence number outside the 
window. Could a TA please confirm? Thanks.

Eric

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Receive buffer size?
Date: Mon, 20 Feb 2006 15:55:15 -0800
Lines: 15
Distribution: su
Message-ID: <dtdkt9$741$1@news.Stanford.EDU>
References: <dtddcd$hv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtddcd$hv$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10242

Yes this is correct.

Eric B Friedman wrote:
> Hi,
> 
> In the retransmissions section: "Your receiver must buffer any data it 
> receives, even if it arrives out of order."
> 
> I assume this applies only to data received that falls within the 
> current window? Otherwise, this would contradict the sliding window 
> section, which says to discard data with sequence number outside the 
> window. Could a TA please confirm? Thanks.
> 
> Eric
> 
.

Path: shelby.stanford.edu!elaine37.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Connection Termination
Date: Mon, 20 Feb 2006 18:23:08 -0800
Lines: 22
Distribution: su
Message-ID: <Pine.GSO.4.44.0602201814580.17209-100000@elaine37.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10243

Hello,

Just wanted to make sure I understnad this 4 way handshake thing.  The
project handout says under the network termination section that "when one
of the peers has finished sending data, it transmit a FIN..."  So does
this mean that only the server (sender of data) should initiate the
connection teardown?  This seems to contradict the behavior I'm observing,
which is that the client receives a close request from the APP.

Also, what happens if the sender sends me data so fast that I dont' send
acks fast enough that the sender timeout and quits on me?  That'd leave
the client hanging...how do I handle this?

Sometimes I'm also observing that the app never calls myclose (and again
hangs).  The file transfer happens correctly (diff successful).  What's
going on?

Thanks a bunch,

-wks


.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Assertion failure in mysocket.c line 408
Date: Mon, 20 Feb 2006 19:02:08 -0800
Lines: 14
Distribution: su
Message-ID: <dtdvrg$gft$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10244

I get an assertion failure in mysocket.c:408 when doing the call

stcp_network_send( sd, (void *)tcphdr, sizeof( struct tcphdr ),	NULL)

in transport_init where sd is the socket descriptor passed in to 
transport_init. Looking in mysocket.c this is a sanity check of the 
global table of socket descriptors. For some reason the program is not 
able to find the context of this socket descriptor.

Are we supposed to do something to set up the context of the socket 
descriptor passed in to transport_init before we use it? I tried delving 
into the provided code but finding answers in there is a pain.

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assertion failure in mysocket.c line 408
Date: Mon, 20 Feb 2006 22:30:27 -0800
Lines: 49
Distribution: su
Message-ID: <dtec24$rrb$1@news.Stanford.EDU>
References: <dtdvrg$gft$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dtdvrg$gft$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10245

Here's the backtrace from gdb:

#0  0xff0d92f0 in __sigprocmask () from /usr/lib/libthread.so.1
#1  0xff0ce59c in _resetsig () from /usr/lib/libthread.so.1
#2  0xff0cdd3c in _sigon () from /usr/lib/libthread.so.1
#3  0xff0d0d98 in _thrp_kill () from /usr/lib/libthread.so.1
#4  0xff14bde0 in raise () from /usr/lib/libc.so.1
#5  0xff13598c in abort () from /usr/lib/libc.so.1
#6  0xff135c30 in _assert () from /usr/lib/libc.so.1
#7  0x00014c8c in verify_mysocket_descriptor (comp_ctx=0x0, my_sd=7) at 
mysock.c:408
#8  0x00013e00 in _mysock_get_context (sd=7) at mysock.c:74
#9  0x00012d88 in mywrite (sd=7, buf=0xfec0753a, buf_len=2) at 
mysock_api.c:200
#10 0x00011fac in write (sd=7, data=0xfec0753a, size=2) at transport.c:62
#11 0x00017aa4 in _tcp_io (tcp_sd=7, buf=0xfec0753a, count=2, 
io_func=0x11f58 <write>) at network_io_tcp.c:253
#12 0x00017634 in _network_send_packet (ctx=0x2d108, src=0xfec07648, 
len=20) at network_io_tcp.c:154
#13 0x000150c8 in _network_send (sd=0, buf=0xfec07648, len=20) at 
network.c:81
#14 0x00013b24 in stcp_network_send (sd=0, src=0x2d7c0, src_len=20) at 
stcp_api.c:234
#15 0x000122a4 in transport_init (sd=0, is_active=1) at transport.c:121
#16 0x00014ab0 in transport_thread_func (arg_ptr=0x2d100) at mysock.c:359
#17 0xff0db124 in _thread_start () from /usr/lib/libthread.so.1
#18 0xff0db124 in _thread_start () from /usr/lib/libthread.so.1
Previous frame identical to this frame (corrupt stack?)

I don't think this is related to my code, but I could be missing 
something. Any help appreciated.

Jens

Jens Pillgram-Larsen wrote:
> I get an assertion failure in mysocket.c:408 when doing the call
> 
> stcp_network_send( sd, (void *)tcphdr, sizeof( struct tcphdr ),    NULL)
> 
> in transport_init where sd is the socket descriptor passed in to 
> transport_init. Looking in mysocket.c this is a sanity check of the 
> global table of socket descriptors. For some reason the program is not 
> able to find the context of this socket descriptor.
> 
> Are we supposed to do something to set up the context of the socket 
> descriptor passed in to transport_init before we use it? I tried delving 
> into the provided code but finding answers in there is a pain.
> 
> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Another Assertion Failure
Date: Mon, 20 Feb 2006 22:53:48 -0800
Lines: 11
Distribution: su
Message-ID: <dteddq$t2n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10246

Are you guys getting bad checksums with the test server / client?

I get

Assertion failed: len <= 0 || 
_mysock_verify_checksum(_mysock_get_context(sd), dst, len), file 
stcp_api.c, line 166

Whenever I'm testing against the given server implementation.

Paul
.

Path: shelby.stanford.edu!not-for-mail
From: Eric B Friedman <eric06@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Fixed window implies unlimited receive buffer size?
Date: Mon, 20 Feb 2006 23:20:28 -0800
Lines: 27
Distribution: su
Message-ID: <dteevs$19s$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10247

Hi,

I am a bit confused.

The assignment states the local receive window has a fixed size of 3072 
bytes. First, am I correct in interpreting this as meaning the 
advertised receive window is always 3072 bytes?

If so, then by the logic on Peterson p391 this implies MaxRcvBuffer must 
be variable, not constant, and allowed to grow arbitrarily large.

For suppose data within the window arrives in-order to the socket. In 
response, an ACK with the fixed window is sent. Then NextByteExpected is 
incremented by the amount received. Unless the application keeps up by 
reading from the socket, LastByteRead will not decrease. Then the only 
way the equation for AdvertisedWindow can hold is if MaxRcvBffer increases.

Is this interpretation correct? This implies the transport layer will 
use up all available memory in the worst case...

Or did I totally misinterpret things, and the correct interpretation is 
instead that MaxRecvBuffer is fixed at 3072?

Thanks,

Eric

.

Path: shelby.stanford.edu!not-for-mail
From: "Junhee Seok" <jseok@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Some questions about PA#3
Date: Mon, 20 Feb 2006 23:25:59 -0800
Lines: 21
Distribution: su
Message-ID: <dtefac$1gb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10248

I have some questions about PA#3.

1) Does STCP use TCP congestion control with windowing?
As shown in website, receiver window and congestion window have a fixed 
size.
Does it mean that we don't increase or decrease the window size during 
transmission?

2) How does transport layer return an error message to application layer?
For example, when we call mywrite() in app it returns success after it 
pushes data into a mid-layer queue.
Then, transport layer reads the mid-layer queue and sends to network.
If transport layer fails sending data to network or fails by some reason 
like memory allocation failure,
how can it report the error to the mywrite()?

Thank you.

Junhee Seok 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Connection Termination
Date: Tue, 21 Feb 2006 03:16:12 -0800
Lines: 35
Distribution: su
Message-ID: <dtesq3$fo1$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602201814580.17209-100000@elaine37.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602201814580.17209-100000@elaine37.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10249

Wai Kei So wrote:
> Hello,
> 
> Just wanted to make sure I understnad this 4 way handshake thing.  The
> project handout says under the network termination section that "when one
> of the peers has finished sending data, it transmit a FIN..."  So does
> this mean that only the server (sender of data) should initiate the
> connection teardown?  This seems to contradict the behavior I'm observing,
> which is that the client receives a close request from the APP.

TCP is full-duplex, both sides can send data.  Each side sends a FIN to 
indicate that its done transmitting data.  Either one can send the first 
FIN.

> 
> Also, what happens if the sender sends me data so fast that I dont' send
> acks fast enough that the sender timeout and quits on me?  That'd leave
> the client hanging...how do I handle this?

I don't think this could happen.  The sender won't send more than your 
advertised window.

> 
> Sometimes I'm also observing that the app never calls myclose (and again
> hangs).  The file transfer happens correctly (diff successful).  What's
> going on?

Are you running in interactive mode?  Hit Ctrl+D to make client call 
myclose.
> 
> Thanks a bunch,
> 
> -wks
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Fixed window implies unlimited receive buffer size?
Date: Tue, 21 Feb 2006 03:23:21 -0800
Lines: 37
Distribution: su
Message-ID: <dtet7h$fun$1@news.Stanford.EDU>
References: <dteevs$19s$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dteevs$19s$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10250

Eric B Friedman wrote:
> Hi,
> 
> I am a bit confused.
> 
> The assignment states the local receive window has a fixed size of 3072 
> bytes. First, am I correct in interpreting this as meaning the 
> advertised receive window is always 3072 bytes?

Yes.
> 
> If so, then by the logic on Peterson p391 this implies MaxRcvBuffer must 
> be variable, not constant, and allowed to grow arbitrarily large.
> 
> For suppose data within the window arrives in-order to the socket. In 
> response, an ACK with the fixed window is sent. Then NextByteExpected is 
> incremented by the amount received. Unless the application keeps up by 
> reading from the socket, LastByteRead will not decrease. Then the only 
> way the equation for AdvertisedWindow can hold is if MaxRcvBffer increases.
> 
> Is this interpretation correct? This implies the transport layer will 
> use up all available memory in the worst case...
> 
> Or did I totally misinterpret things, and the correct interpretation is 
> instead that MaxRecvBuffer is fixed at 3072?

Yeah MaxRecvBuffer is fixed at 3072...

You pass data up to the app as soon as possible (i.e., it's in order), 
and assume it can buffer it before consumed by myread.  So yeah you're 
basically assuming an infinite buffer on the part of the app, but you 
don't have to worry about it.
> 
> Thanks,
> 
> Eric
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Some questions about PA#3
Date: Tue, 21 Feb 2006 03:24:55 -0800
Lines: 30
Distribution: su
Message-ID: <dtetae$fun$2@news.Stanford.EDU>
References: <dtefac$1gb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtefac$1gb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10251

Junhee Seok wrote:
> I have some questions about PA#3.
> 
> 1) Does STCP use TCP congestion control with windowing?
> As shown in website, receiver window and congestion window have a fixed 
> size.
> Does it mean that we don't increase or decrease the window size during 
> transmission?

Right, STCP doesn't use congestion control, you have a fixed congestion 
window size.

> 
> 2) How does transport layer return an error message to application layer?
> For example, when we call mywrite() in app it returns success after it 
> pushes data into a mid-layer queue.
> Then, transport layer reads the mid-layer queue and sends to network.
> If transport layer fails sending data to network or fails by some reason 
> like memory allocation failure,
> how can it report the error to the mywrite()?

Don't worry about reporting the error, you can just silently drop the 
connection.

> 
> Thank you.
> 
> Junhee Seok 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assertion failure in mysocket.c line 408
Date: Tue, 21 Feb 2006 03:28:39 -0800
Lines: 17
Distribution: su
Message-ID: <dtethf$g1q$1@news.Stanford.EDU>
References: <dtdvrg$gft$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtdvrg$gft$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10252

No, the sd should be ready to use.  Maybe you have corrupted memory?

Jens Pillgram-Larsen wrote:
> I get an assertion failure in mysocket.c:408 when doing the call
> 
> stcp_network_send( sd, (void *)tcphdr, sizeof( struct tcphdr ),    NULL)
> 
> in transport_init where sd is the socket descriptor passed in to 
> transport_init. Looking in mysocket.c this is a sanity check of the 
> global table of socket descriptors. For some reason the program is not 
> able to find the context of this socket descriptor.
> 
> Are we supposed to do something to set up the context of the socket 
> descriptor passed in to transport_init before we use it? I tried delving 
> into the provided code but finding answers in there is a pain.
> 
> Thanks, Jens.
.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: testing PA3
Date: Tue, 21 Feb 2006 15:44:51 -0800
Lines: 14
Distribution: su
Message-ID: <Pine.GSO.4.44.0602211541320.28676-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10253

Ok, So this is a really simple question...

So, to run our code with the dummy client and server, the steps are what
exactly?

1) in another window, start the server with ./server
2) in another window, start the client with ./client
3) Do we need to start something else running, or are both already using
our code?
4) use ftp commands on the client side to get what we want?

Thanks,
Megan

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: testing PA3
Date: Tue, 21 Feb 2006 18:44:38 -0800
Lines: 30
Distribution: su
Message-ID: <Pine.GSO.4.44.0602211843100.26678-100000@elaine15.Stanford.EDU>
References: <Pine.GSO.4.44.0602211541320.28676-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0602211541320.28676-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10254

you just need to do 1 and 2 and the client and server will talk to each
other using our code. No need to start anything else nor to ftp into any
process.

Of course, the client and server won't talk to each other until we
actually implement the transport layer

but they are already linking into our transport layer

- Miguel


On Tue, 21 Feb 2006, Megan Anneke Wachs wrote:

> Ok, So this is a really simple question...
>
> So, to run our code with the dummy client and server, the steps are what
> exactly?
>
> 1) in another window, start the server with ./server
> 2) in another window, start the client with ./client
> 3) Do we need to start something else running, or are both already using
> our code?
> 4) use ftp commands on the client side to get what we want?
>
> Thanks,
> Megan
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ACK number for FIN packet with data
Date: Tue, 21 Feb 2006 21:44:16 -0800
Lines: 10
Distribution: su
Message-ID: <dtgtnm$i9u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10255

What ACK number do we need to send back in the acknowledgement packet when 
we receive a packet that contains both data and has the FIN flag set? For an 
empty FIN packet, it has to be the sequence number of that packet plus 1, 
right?

Thanks,
Tahir.



.

Path: shelby.stanford.edu!saga6.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: size of sender window
Date: Tue, 21 Feb 2006 22:13:36 -0800
Lines: 7
Distribution: su
Message-ID: <Pine.GSO.4.44.0602212212340.23727-100000@saga6.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10256

Is the advertised window size constant after the connection is
established, or is it something that we have to keep checking and
adjusting over the lifetime of the connection?

Thanks,
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: stcp_wait_for_event ignore APP_CLOSE_REQUESTED bit
Date: Tue, 21 Feb 2006 23:49:07 -0800
Lines: 9
Distribution: su
Message-ID: <dth51l$ppb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10257

Looking at stcp_api.c:78
         if (/*(flags & APP_CLOSE_REQUESTED) &&*/
             ctx->close_requested && (ctx->app_recv_queue.head == NULL))

it looks like the logic that checks for whether the user wants to listen 
for APP_CLOSE_REQUESTED event is commented out.  Is there a good reason 
why this check is not performed?

--George
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: STCP_MSS and window size
Date: Wed, 22 Feb 2006 07:55:14 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: <dth5d2$qka$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10258

Hi,

When we talk about the STCP_MSS and the sender/receiver window sizes, does
it include the TCP header size? in addition to the payload size.

thanks,
Samantha
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ACK number for FIN packet with data
Date: Tue, 21 Feb 2006 23:57:54 -0800
Lines: 13
Distribution: su
Message-ID: <dth5ib$r6f$1@news.Stanford.EDU>
References: <dtgtnm$i9u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtgtnm$i9u$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10259

Yep, SYN and FIN occupy one sequence number.

Tahir Azim wrote:
> What ACK number do we need to send back in the acknowledgement packet when 
> we receive a packet that contains both data and has the FIN flag set? For an 
> empty FIN packet, it has to be the sequence number of that packet plus 1, 
> right?
> 
> Thanks,
> Tahir.
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: size of sender window
Date: Tue, 21 Feb 2006 23:59:10 -0800
Lines: 10
Distribution: su
Message-ID: <dth5km$r6f$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602212212340.23727-100000@saga6.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602212212340.23727-100000@saga6.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10260

You always advertise the fixed 3072 window.

Megan Anneke Wachs wrote:
> Is the advertised window size constant after the connection is
> established, or is it something that we have to keep checking and
> adjusting over the lifetime of the connection?
> 
> Thanks,
> Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp_wait_for_event ignore APP_CLOSE_REQUESTED bit
Date: Wed, 22 Feb 2006 00:00:25 -0800
Lines: 12
Distribution: su
Message-ID: <dth5n2$r6f$3@news.Stanford.EDU>
References: <dth51l$ppb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dth51l$ppb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10261

See thread "stcp_api.c:72" from the 2004 newsgroup.

George Su wrote:
> Looking at stcp_api.c:78
>         if (/*(flags & APP_CLOSE_REQUESTED) &&*/
>             ctx->close_requested && (ctx->app_recv_queue.head == NULL))
> 
> it looks like the logic that checks for whether the user wants to listen 
> for APP_CLOSE_REQUESTED event is commented out.  Is there a good reason 
> why this check is not performed?
> 
> --George
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: STCP_MSS and window size
Date: Wed, 22 Feb 2006 00:04:47 -0800
Lines: 11
Distribution: su
Message-ID: <dth5v8$r6f$4@news.Stanford.EDU>
References: <dth5d2$qka$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dth5d2$qka$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10262

MSS generally means only payload.  The STCP max payload size is 536, and 
the window sizes only include data.

Samantha Kwan Chan wrote:
> Hi,
> 
> When we talk about the STCP_MSS and the sender/receiver window sizes, does
> it include the TCP header size? in addition to the payload size.
> 
> thanks,
> Samantha
.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: server not getting APP_CLOSE_REQUESTED
Date: Wed, 22 Feb 2006 01:20:23 -0800
Lines: 63
Distribution: su
Message-ID: <Pine.GSO.4.44.0602220102150.24227-100000@elaine5.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10263

I've short circuited the client and server programs to skip the file
transfer part and close their sockets right after connecting. My
theory is that I can test my code for  the 3-way open handshake and 4-way
close handshake (before doing all the sliding window stuff).

The 3-way handshake is working fine, but on the connection close, my
server seems to exit before telling me that it got APP_CLOSE_REQUESTED.

elaine15:> ./server
Server's address is elaine15.Stanford.EDU:55130
server accepting
INITIAL STATE : CLOSED
STATE CHANGE: CLOSED -> LISTEN
STATE CHANGE: LISTEN -> SYN_RCVD
STATE CHANGE: SYN_RCVD -> ESTABLISHED

THREE WAY HANDSHAKE COMPLETE
entering close handshake
STATE CHANGE: ESTABLISHED -> CLOSE_WAIT

elaine15:>  ( back to the sheel,  the server program exits without error)


in my close handshake function I'm expecting to detect a
APP_CLOSE_REQUESTED so that I can move from CLOSE_WAIT to LAST_ACK, but
it never arrives, and in fact, the program exits even before finishing
executing my code (I have a log that prints "exiting close-handshake
function" but never gets printed). I've tried stepping in gdb but I just
see that some invocations of stcp_wait_for_event just exit my program.

Meanwhile, my client is stuck in FIN_WAIT2

elaine43:a> ./client elaine15:55130
client connecting
INITIAL STATE : CLOSED
STATE CHANGE: CLOSED -> SYN_SENT
STATE CHANGE: SYN_SENT -> ESTABLISHED

THREE WAY HANDSHAKE COMPLETE
client connected
entering close handshake
STATE CHANGE: ESTABLISHED -> FIN_WAIT1
STATE CHANGE: FIN_WAIT1 -> FIN_WAIT2

(app is stuck here)


   any idea why the server is so eager to shut down before telling me? On
the client I do get the APP_CLOSE_REQUESTED which gets me to FIN_WAIT1

   I'm thinking that the main server thread ends even before the rest of
the subsystem gets a chance to pass me the APP_CLOSE_REQUESTED and the app
just exits.

   thanks,

- Miguel






.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ACK number for FIN packet with data
Date: Wed, 22 Feb 2006 01:36:50 -0800
Lines: 20
Distribution: su
Message-ID: <dthbbt$3ht$1@news.Stanford.EDU>
References: <dtgtnm$i9u$1@news.Stanford.EDU> <dth5ib$r6f$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10264

But what about a packet that contains both data and has the FIN flag set? Do 
we need to acknowledge with header sequence number plus one? Or with back 
header sequence number plus data length ? Or two separate acks with those 
two ACK numbers?

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dth5ib$r6f$1@news.Stanford.EDU...
> Yep, SYN and FIN occupy one sequence number.
>
> Tahir Azim wrote:
>> What ACK number do we need to send back in the acknowledgement packet 
>> when we receive a packet that contains both data and has the FIN flag 
>> set? For an empty FIN packet, it has to be the sequence number of that 
>> packet plus 1, right?
>>
>> Thanks,
>> Tahir.
>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ACK number for FIN packet with data
Date: Wed, 22 Feb 2006 01:59:55 -0800
Lines: 28
Distribution: su
Message-ID: <dthcn4$4d6$1@news.Stanford.EDU>
References: <dtgtnm$i9u$1@news.Stanford.EDU> <dth5ib$r6f$1@news.Stanford.EDU> <dthbbt$3ht$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dthbbt$3ht$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10265

No need for separate ACKs.  SYN and FIN just occupy one sequence number 
in the sequence space.  Each data byte also occupies a sequence number. 
  So given that just ACK what the next sequence number you expect is.

Tahir Azim wrote:
> But what about a packet that contains both data and has the FIN flag set? Do 
> we need to acknowledge with header sequence number plus one? Or with back 
> header sequence number plus data length ? Or two separate acks with those 
> two ACK numbers?
> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dth5ib$r6f$1@news.Stanford.EDU...
> 
>>Yep, SYN and FIN occupy one sequence number.
>>
>>Tahir Azim wrote:
>>
>>>What ACK number do we need to send back in the acknowledgement packet 
>>>when we receive a packet that contains both data and has the FIN flag 
>>>set? For an empty FIN packet, it has to be the sequence number of that 
>>>packet plus 1, right?
>>>
>>>Thanks,
>>>Tahir.
>>>
>>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: stcp_network_recv_wrapper
Date: Wed, 22 Feb 2006 10:32:36 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: <dthek4$670$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10266

Hi,

For the stcp_network_recv function, are we guarantee to get a whole
packet and not half of a packet such that we need to make multiple calls
to piece together the packet?  Also should we also assume that the packets
received have the TCP_MSS size + the TCP header?

also for the stcp_network_send function, will it send out the total number of
bytes that was specified in its parameter or there is no guarantee?

thanks,
Sam
.

Path: shelby.stanford.edu!saga22.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: size of sender window
Date: Wed, 22 Feb 2006 10:49:27 -0800
Lines: 23
Distribution: su
Message-ID: <Pine.GSO.4.44.0602221048100.27003-100000@saga22.Stanford.EDU>
References: <Pine.GSO.4.44.0602212212340.23727-100000@saga6.Stanford.EDU>
 <dth5km$r6f$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dth5km$r6f$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10267

That's not really my question, I mean that when we are the sender, we
should initially check our receiver's (which could be something other than
our code with a hard-coded window)  advertised window size. Is that
something that will change or stays constant once the connection is
established.

Thanks,
Megan

On Tue, 21 Feb 2006, Matt Falkenhagen wrote:

> You always advertise the fixed 3072 window.
>
> Megan Anneke Wachs wrote:
> > Is the advertised window size constant after the connection is
> > established, or is it something that we have to keep checking and
> > adjusting over the lifetime of the connection?
> >
> > Thanks,
> > Megan
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Testing PA3
Date: Wed, 22 Feb 2006 12:41:11 -0800
Lines: 5
Distribution: su
Message-ID: <dtii9e$8hi$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10268

So when we start the server and client, is there a logfile of packets like 
in project 2, so we can test what packets are getting exchanged? How can we 
know what is going on since there are no printfs either. 


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: pthread_rwlock_rdlock(&listen_lock) returns 22
Date: Wed, 22 Feb 2006 13:29:21 -0800
Lines: 8
Distribution: su
Message-ID: <C02217B1.34BA%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: pthread_rwlock_rdlock(&listen_lock) returns 22
Thread-Index: AcY39wskSZGW+KPqEdqb8AARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10269

Hi.

When I call the function pthread_rwlock_rdlock(&listen_lock)  in
connection_demux.c, it returns 22.  What does 22 mean?

Thanks in advance.
Sunny.

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: pthread_rwlock_rdlock(&listen_lock) returns 22
Date: Wed, 22 Feb 2006 13:45:30 -0800
Lines: 29
Distribution: su
Message-ID: <C0221B7A.34C7%sunnybalwani@hotmail.com>
References: <C02217B1.34BA%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: pthread_rwlock_rdlock(&listen_lock) returns 22
Thread-Index: AcY39wskSZGW+KPqEdqb8AARJHuZqgAAkGSK
Xref: shelby.stanford.edu su.class.cs244a:10270

OK so this is an error you get when you don't initialize listen_lock object
before calling pthread_rwlock_rdlock() function.

Martin.  What is the proper place to initialize the lock objects in the
provided code?  Thanks for help in advance.  I could walkthru the code but
if you already know then this will save me significant amount of time.


Thanks for help in advance.


Solaris is more forgiving when you use the lock object without initializing
it first but Darwin is not.



On 2/22/06 1:29 PM, in article C02217B1.34BA%sunnybalwani@hotmail.com,
"Sunny Balwani" <sunnybalwani@hotmail.com> wrote:

> Hi.
> 
> When I call the function pthread_rwlock_rdlock(&listen_lock)  in
> connection_demux.c, it returns 22.  What does 22 mean?
> 
> Thanks in advance.
> Sunny.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: pthread_rwlock_rdlock(&listen_lock) returns 22
Date: Wed, 22 Feb 2006 13:53:26 -0800
Lines: 39
Distribution: su
Message-ID: <C0221D56.34CA%sunnybalwani@hotmail.com>
References: <C02217B1.34BA%sunnybalwani@hotmail.com> <C0221B7A.34C7%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: pthread_rwlock_rdlock(&listen_lock) returns 22
Thread-Index: AcY39wskSZGW+KPqEdqb8AARJHuZqgAAkGSKAABG7gs=
Xref: shelby.stanford.edu su.class.cs244a:10271

Sorry.  Please ignore last two postings.  I figured it out.

Really Sorry for the spam.


On 2/22/06 1:45 PM, in article C0221B7A.34C7%sunnybalwani@hotmail.com,
"Sunny Balwani" <sunnybalwani@hotmail.com> wrote:

> OK so this is an error you get when you don't initialize listen_lock object
> before calling pthread_rwlock_rdlock() function.
> 
> Martin.  What is the proper place to initialize the lock objects in the
> provided code?  Thanks for help in advance.  I could walkthru the code but
> if you already know then this will save me significant amount of time.
> 
> 
> Thanks for help in advance.
> 
> 
> Solaris is more forgiving when you use the lock object without initializing
> it first but Darwin is not.
> 
> 
> 
> On 2/22/06 1:29 PM, in article C02217B1.34BA%sunnybalwani@hotmail.com,
> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
> 
>> Hi.
>> 
>> When I call the function pthread_rwlock_rdlock(&listen_lock)  in
>> connection_demux.c, it returns 22.  What does 22 mean?
>> 
>> Thanks in advance.
>> Sunny.
>> 
> 
> 


.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Unexpected peer behavior
Date: Wed, 22 Feb 2006 14:06:45 -0800
Lines: 6
Distribution: su
Message-ID: <dtin9l$dnu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10272

In general if the peer does something that its not supposed to do, like 
sending a SYN packet while the connection is established, ACK'ing unsent 
data (but within the window), or just do other weird stuff.  Is it 
better to ignore them or just kill the connection?

--George
.

Path: shelby.stanford.edu!saga20.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Unexpected peer behavior
Date: Wed, 22 Feb 2006 14:30:58 -0800
Lines: 14
Distribution: su
Message-ID: <Pine.GSO.4.44.0602221430120.27942-100000@saga20.Stanford.EDU>
References: <dtin9l$dnu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dtin9l$dnu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10273

as a follow up to that, I think a lot of this is in the RFC, about sending
reset commands. Are we expected to implement RST?
Thanks,
Megan
On Wed, 22 Feb 2006, George Su wrote:

> In general if the peer does something that its not supposed to do, like
> sending a SYN packet while the connection is established, ACK'ing unsent
> data (but within the window), or just do other weird stuff.  Is it
> better to ignore them or just kill the connection?
>
> --George
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: size of sender window
Date: Wed, 22 Feb 2006 16:03:26 -0800
Lines: 28
Distribution: su
Message-ID: <dtiu4o$lbi$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602212212340.23727-100000@saga6.Stanford.EDU> <dth5km$r6f$2@news.Stanford.EDU> <Pine.GSO.4.44.0602221048100.27003-100000@saga22.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602221048100.27003-100000@saga22.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10274

Oh I see.  Yeah you should keep checking it, it may not remain constant.

Megan Anneke Wachs wrote:
> That's not really my question, I mean that when we are the sender, we
> should initially check our receiver's (which could be something other than
> our code with a hard-coded window)  advertised window size. Is that
> something that will change or stays constant once the connection is
> established.
> 
> Thanks,
> Megan
> 
> On Tue, 21 Feb 2006, Matt Falkenhagen wrote:
> 
> 
>>You always advertise the fixed 3072 window.
>>
>>Megan Anneke Wachs wrote:
>>
>>>Is the advertised window size constant after the connection is
>>>established, or is it something that we have to keep checking and
>>>adjusting over the lifetime of the connection?
>>>
>>>Thanks,
>>>Megan
>>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing PA3
Date: Wed, 22 Feb 2006 16:07:36 -0800
Lines: 9
Distribution: su
Message-ID: <dtiuci$lmr$1@news.Stanford.EDU>
References: <dtii9e$8hi$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtii9e$8hi$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10275

I don't think so.  I'd recommend adding printfs to them and/or to your 
own code for debugging.

Nazia Zaman wrote:
> So when we start the server and client, is there a logfile of packets like 
> in project 2, so we can test what packets are getting exchanged? How can we 
> know what is going on since there are no printfs either. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Unexpected peer behavior
Date: Wed, 22 Feb 2006 16:14:16 -0800
Lines: 22
Distribution: su
Message-ID: <dtiup2$m8q$1@news.Stanford.EDU>
References: <dtin9l$dnu$1@news.Stanford.EDU> <Pine.GSO.4.44.0602221430120.27942-100000@saga20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602221430120.27942-100000@saga20.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10276

No, you're not required to use RST.  If you get something unexpected you 
can just ignore it, killing the connection seems pretty extreme.  I 
think in the case of ACK'ing unsent data the RFC says to send an ACK 
back so the peer knows where you stand.

Megan Anneke Wachs wrote:
> as a follow up to that, I think a lot of this is in the RFC, about sending
> reset commands. Are we expected to implement RST?
> Thanks,
> Megan
> On Wed, 22 Feb 2006, George Su wrote:
> 
> 
>>In general if the peer does something that its not supposed to do, like
>>sending a SYN packet while the connection is established, ACK'ing unsent
>>data (but within the window), or just do other weird stuff.  Is it
>>better to ignore them or just kill the connection?
>>
>>--George
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 3 way handshake
Date: Wed, 22 Feb 2006 16:37:10 -0800
Lines: 22
Distribution: su
Message-ID: <dtj03n$non$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602171053550.20523-100000@elaine42.Stanford.EDU> <dt6m98$b0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dt6m98$b0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10277

However this is true only if the client machine always sets the ACK 
field on at least the data packets.  Is this the way it should be done?

--George

Matt Falkenhagen wrote:
> See Peterson & Davie section 5.2, pg 387 for the answer.  "if the 
> client's ACK to the server is lost...then the connection still functions 
> correctly".
> 
> Wai Kei So wrote:
> 
>> Hello,
>>
>> What happens if the 3rd packet (ack) of the 3 way handshake is dropped?
>> Does the passive entity timeout?  (what's the initial timeout value it
>> should use?)  Since there's no ack for acks, how does the active entity
>> know to resend the ack (or does it at all?)?
>>
>> Thanks in advance,
>> -Wai Kei
>>
.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: More on connection teardown
Date: Wed, 22 Feb 2006 18:19:26 -0800
Lines: 21
Distribution: su
Message-ID: <Pine.GSO.4.44.0602221811001.8839-100000@elaine15.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10278

Hello,

Suppose the following scenario happens:

A				B
sends fin (fin_wait1)
				gets fin/send ack (close_wait)
**then ack from b gets dropped **
				sends fin (last_ack)
gets fin, sends ack (closing)	gets ack (closed)


Now A is left in the closing state hanging for an ack.  Can this happen?
Or does A not transition to the closing state until the ack comes back for
the fin that it sent?

Thanks in advance,

-wks


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: pthread_rwlock_rdlock(&listen_lock) returns 22
Date: Wed, 22 Feb 2006 18:49:41 -0800
Lines: 45
Distribution: su
Message-ID: <dtj7s5$22p$1@news.Stanford.EDU>
References: <C02217B1.34BA%sunnybalwani@hotmail.com> <C0221B7A.34C7%sunnybalwani@hotmail.com> <C0221D56.34CA%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <C0221D56.34CA%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10279

Actually I couldn't get the client/server to run properly in Darwin 
either due to this error.  What was your solution??

Thanks,
Will

Sunny Balwani wrote:
> Sorry.  Please ignore last two postings.  I figured it out.
> 
> Really Sorry for the spam.
> 
> 
> On 2/22/06 1:45 PM, in article C0221B7A.34C7%sunnybalwani@hotmail.com,
> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
> 
>> OK so this is an error you get when you don't initialize listen_lock object
>> before calling pthread_rwlock_rdlock() function.
>>
>> Martin.  What is the proper place to initialize the lock objects in the
>> provided code?  Thanks for help in advance.  I could walkthru the code but
>> if you already know then this will save me significant amount of time.
>>
>>
>> Thanks for help in advance.
>>
>>
>> Solaris is more forgiving when you use the lock object without initializing
>> it first but Darwin is not.
>>
>>
>>
>> On 2/22/06 1:29 PM, in article C02217B1.34BA%sunnybalwani@hotmail.com,
>> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
>>
>>> Hi.
>>>
>>> When I call the function pthread_rwlock_rdlock(&listen_lock)  in
>>> connection_demux.c, it returns 22.  What does 22 mean?
>>>
>>> Thanks in advance.
>>> Sunny.
>>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Not holding mutex when signalling Pthreads condition variables
Date: Wed, 22 Feb 2006 20:03:34 -0800
Lines: 16
Distribution: su
Message-ID: <dtjc6m$63r$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10280

In stcp_api.c:stcp_unblock_application, a pthread condition variable is 
signaled like so:

    PTHREAD_CALL(pthread_mutex_lock(&ctx->blocking_lock));
    ...
    PTHREAD_CALL(pthread_mutex_unlock(&ctx->blocking_lock));
    PTHREAD_CALL(pthread_cond_signal(&ctx->blocking_cond));

This looks wrong to me.  Shouldn't the mutex be held when the condition is 
signalled?  (Ie. reverse the last two lines?)  I could imagine some pthread 
implementations complaining about this at runtime.  Maybe this is related to 
the problem the OS X people are seeing?

--Thad


.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Re: Fixed window implies unlimited receive buffer size?
Date: Wed, 22 Feb 2006 20:33:51 -0800
Lines: 64
Distribution: su
Message-ID: <dtjdvf$7gn$1@news.Stanford.EDU>
References: <dteevs$19s$1@news.Stanford.EDU> <dtet7h$fun$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10281

I'm still confused about this.  How can the answer to both of Eric's 
questions be yes?

Either he interpreted correctly (first yes, meaning advertised receive 
window is always 3072 and transport receive buffer can use all available 
memory) or he "totally misinterpreted" (second yes, meaning that the 
transport receive buffer never exceeds 3072 bytes).

Another way to ask this:
Starting from initial state, transport layer receive 1000 bytes.  App hasn't 
read anything from transport yet.  Does the transport advertise 3072 bytes 
(the first interpretation) or 2072 bytes (the second interpretation) for the 
receive window?  If it advertises 3072 bytes (the first interpretation), the 
sender can overwhelm the receiver's buffers and the window isn't providing 
any flow control at all, which isn't what happens in real TCP.

I'm pretty sure interpretation #2 is correct, but this reply confused me.

Thanks,
Thad Hughes


"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dtet7h$fun$1@news.Stanford.EDU...
> Eric B Friedman wrote:
>> Hi,
>>
>> I am a bit confused.
>>
>> The assignment states the local receive window has a fixed size of 3072 
>> bytes. First, am I correct in interpreting this as meaning the advertised 
>> receive window is always 3072 bytes?
>
> Yes.
>>
>> If so, then by the logic on Peterson p391 this implies MaxRcvBuffer must 
>> be variable, not constant, and allowed to grow arbitrarily large.
>>
>> For suppose data within the window arrives in-order to the socket. In 
>> response, an ACK with the fixed window is sent. Then NextByteExpected is 
>> incremented by the amount received. Unless the application keeps up by 
>> reading from the socket, LastByteRead will not decrease. Then the only 
>> way the equation for AdvertisedWindow can hold is if MaxRcvBffer 
>> increases.
>>
>> Is this interpretation correct? This implies the transport layer will use 
>> up all available memory in the worst case...
>>
>> Or did I totally misinterpret things, and the correct interpretation is 
>> instead that MaxRecvBuffer is fixed at 3072?
>
> Yeah MaxRecvBuffer is fixed at 3072...
>
> You pass data up to the app as soon as possible (i.e., it's in order), and 
> assume it can buffer it before consumed by myread.  So yeah you're 
> basically assuming an infinite buffer on the part of the app, but you 
> don't have to worry about it.
>>
>> Thanks,
>>
>> Eric
>> 


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: pthread_rwlock_rdlock(&listen_lock) returns 22
Date: Wed, 22 Feb 2006 21:51:25 -0800
Lines: 59
Distribution: su
Message-ID: <C0228D5D.34E6%sunnybalwani@hotmail.com>
References: <C02217B1.34BA%sunnybalwani@hotmail.com> <C0221B7A.34C7%sunnybalwani@hotmail.com> <C0221D56.34CA%sunnybalwani@hotmail.com> <dtj7s5$22p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: pthread_rwlock_rdlock(&listen_lock) returns 22
Thread-Index: AcY4PS5xbRK9CKQwEdqEtgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10282

I wrote a small function in connection_demux.c as follows:
void init_pthread_locks()
{
    pthread_rwlock_init(&listen_lock,NULL);
}
And called it in main to initliaze lock.  After that, everything works fine
and you can could in darwin. No problems so far.


On 2/22/06 6:49 PM, in article dtj7s5$22p$1@news.Stanford.EDU, "Will
Palmeri" <wjp@stanford.edu> wrote:

> Actually I couldn't get the client/server to run properly in Darwin
> either due to this error.  What was your solution??
> 
> Thanks,
> Will
> 
> Sunny Balwani wrote:
>> Sorry.  Please ignore last two postings.  I figured it out.
>> 
>> Really Sorry for the spam.
>> 
>> 
>> On 2/22/06 1:45 PM, in article C0221B7A.34C7%sunnybalwani@hotmail.com,
>> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
>> 
>>> OK so this is an error you get when you don't initialize listen_lock object
>>> before calling pthread_rwlock_rdlock() function.
>>> 
>>> Martin.  What is the proper place to initialize the lock objects in the
>>> provided code?  Thanks for help in advance.  I could walkthru the code but
>>> if you already know then this will save me significant amount of time.
>>> 
>>> 
>>> Thanks for help in advance.
>>> 
>>> 
>>> Solaris is more forgiving when you use the lock object without initializing
>>> it first but Darwin is not.
>>> 
>>> 
>>> 
>>> On 2/22/06 1:29 PM, in article C02217B1.34BA%sunnybalwani@hotmail.com,
>>> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
>>> 
>>>> Hi.
>>>> 
>>>> When I call the function pthread_rwlock_rdlock(&listen_lock)  in
>>>> connection_demux.c, it returns 22.  What does 22 mean?
>>>> 
>>>> Thanks in advance.
>>>> Sunny.
>>>> 
>>> 
>> 
>> 


.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Fixed window implies unlimited receive buffer size?
Date: Wed, 22 Feb 2006 22:26:37 -0800
Lines: 103
Distribution: su
Message-ID: <Pine.GSO.4.44.0602222214020.7905-100000@elaine13.Stanford.EDU>
References: <dteevs$19s$1@news.Stanford.EDU> <dtet7h$fun$1@news.Stanford.EDU>
 <dtjdvf$7gn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dtjdvf$7gn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10283

I'm not a TA but I play one on TV, and here's how I understand the origins
of this "fixed" window we are told in the assignment...

I think the key is that the transmit side always sends data as soon as the
app requires it, so

LastByteWritten = LastByteSent

Likewise, the receiver always pushes data to the app as soon as it
receives it, so

LastByteRead + 1 = NextByteExpected

basically, those middle pointers in page 389 are always right on the
edges. Now, from page 391, the Advertised Window is

AdvertisedWindow = MaxRcvBuffer - ((NextByteExpected -1) - LastRead)
AdvertisedWindow = 3072 - 0 = 3072

so the advertized window size in SCTP is always 3072, same as the buffer
size.

On the receiver, the EffectiveWindow (pg 391) is

EffectiveWindow = AdvertisedWindow - (LastSent - LastAck)

this value DOES change on the receiver, both because LastSent-LastAck is
variable, but also because we could be getting advertized windows from non
SCPT connections (I assume)

please correct me if I'm wrong, thanks,

- Miguel


On Wed, 22 Feb 2006, Thad Hughes wrote:

> I'm still confused about this.  How can the answer to both of Eric's
> questions be yes?
>
> Either he interpreted correctly (first yes, meaning advertised receive
> window is always 3072 and transport receive buffer can use all available
> memory) or he "totally misinterpreted" (second yes, meaning that the
> transport receive buffer never exceeds 3072 bytes).
>
> Another way to ask this:
> Starting from initial state, transport layer receive 1000 bytes.  App hasn't
> read anything from transport yet.  Does the transport advertise 3072 bytes
> (the first interpretation) or 2072 bytes (the second interpretation) for the
> receive window?  If it advertises 3072 bytes (the first interpretation), the
> sender can overwhelm the receiver's buffers and the window isn't providing
> any flow control at all, which isn't what happens in real TCP.
>
> I'm pretty sure interpretation #2 is correct, but this reply confused me.
>
> Thanks,
> Thad Hughes
>
>
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> news:dtet7h$fun$1@news.Stanford.EDU...
> > Eric B Friedman wrote:
> >> Hi,
> >>
> >> I am a bit confused.
> >>
> >> The assignment states the local receive window has a fixed size of 3072
> >> bytes. First, am I correct in interpreting this as meaning the advertised
> >> receive window is always 3072 bytes?
> >
> > Yes.
> >>
> >> If so, then by the logic on Peterson p391 this implies MaxRcvBuffer must
> >> be variable, not constant, and allowed to grow arbitrarily large.
> >>
> >> For suppose data within the window arrives in-order to the socket. In
> >> response, an ACK with the fixed window is sent. Then NextByteExpected is
> >> incremented by the amount received. Unless the application keeps up by
> >> reading from the socket, LastByteRead will not decrease. Then the only
> >> way the equation for AdvertisedWindow can hold is if MaxRcvBffer
> >> increases.
> >>
> >> Is this interpretation correct? This implies the transport layer will use
> >> up all available memory in the worst case...
> >>
> >> Or did I totally misinterpret things, and the correct interpretation is
> >> instead that MaxRecvBuffer is fixed at 3072?
> >
> > Yeah MaxRecvBuffer is fixed at 3072...
> >
> > You pass data up to the app as soon as possible (i.e., it's in order), and
> > assume it can buffer it before consumed by myread.  So yeah you're
> > basically assuming an infinite buffer on the part of the app, but you
> > don't have to worry about it.
> >>
> >> Thanks,
> >>
> >> Eric
> >>
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: pthread_rwlock_rdlock(&listen_lock) returns 22
Date: Wed, 22 Feb 2006 22:28:38 -0800
Lines: 68
Distribution: su
Message-ID: <dtjkmk$d6c$1@news.Stanford.EDU>
References: <C02217B1.34BA%sunnybalwani@hotmail.com> <C0221B7A.34C7%sunnybalwani@hotmail.com> <C0221D56.34CA%sunnybalwani@hotmail.com> <dtj7s5$22p$1@news.Stanford.EDU> <C0228D5D.34E6%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <C0228D5D.34E6%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10284

Does it work darwin <-> darwin? darwin <-> solaris? darwin <-> linux?

I'm try to port it to linux, and I can get linux <-> linux but not linux 
<-> solaris

Sunny Balwani wrote:
> I wrote a small function in connection_demux.c as follows:
> void init_pthread_locks()
> {
>     pthread_rwlock_init(&listen_lock,NULL);
> }
> And called it in main to initliaze lock.  After that, everything works fine
> and you can could in darwin. No problems so far.
> 
> 
> On 2/22/06 6:49 PM, in article dtj7s5$22p$1@news.Stanford.EDU, "Will
> Palmeri" <wjp@stanford.edu> wrote:
> 
> 
>>Actually I couldn't get the client/server to run properly in Darwin
>>either due to this error.  What was your solution??
>>
>>Thanks,
>>Will
>>
>>Sunny Balwani wrote:
>>
>>>Sorry.  Please ignore last two postings.  I figured it out.
>>>
>>>Really Sorry for the spam.
>>>
>>>
>>>On 2/22/06 1:45 PM, in article C0221B7A.34C7%sunnybalwani@hotmail.com,
>>>"Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
>>>
>>>
>>>>OK so this is an error you get when you don't initialize listen_lock object
>>>>before calling pthread_rwlock_rdlock() function.
>>>>
>>>>Martin.  What is the proper place to initialize the lock objects in the
>>>>provided code?  Thanks for help in advance.  I could walkthru the code but
>>>>if you already know then this will save me significant amount of time.
>>>>
>>>>
>>>>Thanks for help in advance.
>>>>
>>>>
>>>>Solaris is more forgiving when you use the lock object without initializing
>>>>it first but Darwin is not.
>>>>
>>>>
>>>>
>>>>On 2/22/06 1:29 PM, in article C02217B1.34BA%sunnybalwani@hotmail.com,
>>>>"Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
>>>>
>>>>
>>>>>Hi.
>>>>>
>>>>>When I call the function pthread_rwlock_rdlock(&listen_lock)  in
>>>>>connection_demux.c, it returns 22.  What does 22 mean?
>>>>>
>>>>>Thanks in advance.
>>>>>Sunny.
>>>>>
>>>>
>>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 3 way handshake
Date: Wed, 22 Feb 2006 22:30:10 -0800
Lines: 29
Distribution: su
Message-ID: <dtjkpt$dbt$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602171053550.20523-100000@elaine42.Stanford.EDU> <dt6m98$b0$1@news.Stanford.EDU> <dtj03n$non$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtj03n$non$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10285

Yes, this is how it's done in TCP and STCP.  From the handout:

The th_ack field should be set whenever possible (this again isn't 
required by STCP, but is done for compatibility with standard TCP in HW4).

George Su wrote:
> However this is true only if the client machine always sets the ACK 
> field on at least the data packets.  Is this the way it should be done?
> 
> --George
> 
> Matt Falkenhagen wrote:
> 
>> See Peterson & Davie section 5.2, pg 387 for the answer.  "if the 
>> client's ACK to the server is lost...then the connection still 
>> functions correctly".
>>
>> Wai Kei So wrote:
>>
>>> Hello,
>>>
>>> What happens if the 3rd packet (ack) of the 3 way handshake is dropped?
>>> Does the passive entity timeout?  (what's the initial timeout value it
>>> should use?)  Since there's no ack for acks, how does the active entity
>>> know to resend the ack (or does it at all?)?
>>>
>>> Thanks in advance,
>>> -Wai Kei
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Another Assertion Failure
Date: Wed, 22 Feb 2006 22:31:00 -0800
Lines: 18
Distribution: su
Message-ID: <dtjkr1$d6c$2@news.Stanford.EDU>
References: <dteddq$t2n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dteddq$t2n$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10286

Can anyone get past this? Is it my problem or a problem with the test 
script? Did anyone get 100% verified? I get this problem for both hw3a 
and hw3b

Paul

Paul Tarjan wrote:
> Are you guys getting bad checksums with the test server / client?
> 
> I get
> 
> Assertion failed: len <= 0 || 
> _mysock_verify_checksum(_mysock_get_context(sd), dst, len), file 
> stcp_api.c, line 166
> 
> Whenever I'm testing against the given server implementation.
> 
> Paul
.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Fixed window implies unlimited receive buffer size?
Date: Wed, 22 Feb 2006 22:31:22 -0800
Lines: 116
Distribution: su
Message-ID: <Pine.GSO.4.44.0602222229100.8312-100000@elaine13.Stanford.EDU>
References: <dteevs$19s$1@news.Stanford.EDU> <dtet7h$fun$1@news.Stanford.EDU>
 <dtjdvf$7gn$1@news.Stanford.EDU> <Pine.GSO.4.44.0602222214020.7905-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0602222214020.7905-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10287

Correction, when I talk about the Effective window at the end, I said
receiver twice when I meant sender

talk about adding to the confusion :-)


- Miguel


On Wed, 22 Feb 2006, Miguel Sanchez wrote:

> I'm not a TA but I play one on TV, and here's how I understand the origins
> of this "fixed" window we are told in the assignment...
>
> I think the key is that the transmit side always sends data as soon as the
> app requires it, so
>
> LastByteWritten = LastByteSent
>
> Likewise, the receiver always pushes data to the app as soon as it
> receives it, so
>
> LastByteRead + 1 = NextByteExpected
>
> basically, those middle pointers in page 389 are always right on the
> edges. Now, from page 391, the Advertised Window is
>
> AdvertisedWindow = MaxRcvBuffer - ((NextByteExpected -1) - LastRead)
> AdvertisedWindow = 3072 - 0 = 3072
>
> so the advertized window size in SCTP is always 3072, same as the buffer
> size.
>
> On the receiver, the EffectiveWindow (pg 391) is
>
> EffectiveWindow = AdvertisedWindow - (LastSent - LastAck)
>
> this value DOES change on the receiver, both because LastSent-LastAck is
> variable, but also because we could be getting advertized windows from non
> SCPT connections (I assume)
>
> please correct me if I'm wrong, thanks,
>
> - Miguel
>
>
> On Wed, 22 Feb 2006, Thad Hughes wrote:
>
> > I'm still confused about this.  How can the answer to both of Eric's
> > questions be yes?
> >
> > Either he interpreted correctly (first yes, meaning advertised receive
> > window is always 3072 and transport receive buffer can use all available
> > memory) or he "totally misinterpreted" (second yes, meaning that the
> > transport receive buffer never exceeds 3072 bytes).
> >
> > Another way to ask this:
> > Starting from initial state, transport layer receive 1000 bytes.  App hasn't
> > read anything from transport yet.  Does the transport advertise 3072 bytes
> > (the first interpretation) or 2072 bytes (the second interpretation) for the
> > receive window?  If it advertises 3072 bytes (the first interpretation), the
> > sender can overwhelm the receiver's buffers and the window isn't providing
> > any flow control at all, which isn't what happens in real TCP.
> >
> > I'm pretty sure interpretation #2 is correct, but this reply confused me.
> >
> > Thanks,
> > Thad Hughes
> >
> >
> > "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> > news:dtet7h$fun$1@news.Stanford.EDU...
> > > Eric B Friedman wrote:
> > >> Hi,
> > >>
> > >> I am a bit confused.
> > >>
> > >> The assignment states the local receive window has a fixed size of 3072
> > >> bytes. First, am I correct in interpreting this as meaning the advertised
> > >> receive window is always 3072 bytes?
> > >
> > > Yes.
> > >>
> > >> If so, then by the logic on Peterson p391 this implies MaxRcvBuffer must
> > >> be variable, not constant, and allowed to grow arbitrarily large.
> > >>
> > >> For suppose data within the window arrives in-order to the socket. In
> > >> response, an ACK with the fixed window is sent. Then NextByteExpected is
> > >> incremented by the amount received. Unless the application keeps up by
> > >> reading from the socket, LastByteRead will not decrease. Then the only
> > >> way the equation for AdvertisedWindow can hold is if MaxRcvBffer
> > >> increases.
> > >>
> > >> Is this interpretation correct? This implies the transport layer will use
> > >> up all available memory in the worst case...
> > >>
> > >> Or did I totally misinterpret things, and the correct interpretation is
> > >> instead that MaxRecvBuffer is fixed at 3072?
> > >
> > > Yeah MaxRecvBuffer is fixed at 3072...
> > >
> > > You pass data up to the app as soon as possible (i.e., it's in order), and
> > > assume it can buffer it before consumed by myread.  So yeah you're
> > > basically assuming an infinite buffer on the part of the app, but you
> > > don't have to worry about it.
> > >>
> > >> Thanks,
> > >>
> > >> Eric
> > >>
> >
> >
> >
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Fixed window implies unlimited receive buffer size?
Date: Wed, 22 Feb 2006 22:35:24 -0800
Lines: 110
Distribution: su
Message-ID: <dtjl3n$dkq$1@news.Stanford.EDU>
References: <dteevs$19s$1@news.Stanford.EDU> <dtet7h$fun$1@news.Stanford.EDU> <dtjdvf$7gn$1@news.Stanford.EDU> <Pine.GSO.4.44.0602222214020.7905-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602222214020.7905-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10288

Miguel is right, although I think you mean "on the sender" in the last 
paragraph.

Miguel Sanchez wrote:
> I'm not a TA but I play one on TV, and here's how I understand the origins
> of this "fixed" window we are told in the assignment...
> 
> I think the key is that the transmit side always sends data as soon as the
> app requires it, so
> 
> LastByteWritten = LastByteSent
> 
> Likewise, the receiver always pushes data to the app as soon as it
> receives it, so
> 
> LastByteRead + 1 = NextByteExpected
> 
> basically, those middle pointers in page 389 are always right on the
> edges. Now, from page 391, the Advertised Window is
> 
> AdvertisedWindow = MaxRcvBuffer - ((NextByteExpected -1) - LastRead)
> AdvertisedWindow = 3072 - 0 = 3072
> 
> so the advertized window size in SCTP is always 3072, same as the buffer
> size.
> 
> On the receiver, the EffectiveWindow (pg 391) is
> 
> EffectiveWindow = AdvertisedWindow - (LastSent - LastAck)
> 
> this value DOES change on the receiver, both because LastSent-LastAck is
> variable, but also because we could be getting advertized windows from non
> SCPT connections (I assume)
> 
> please correct me if I'm wrong, thanks,
> 
> - Miguel
> 
> 
> On Wed, 22 Feb 2006, Thad Hughes wrote:
> 
> 
>>I'm still confused about this.  How can the answer to both of Eric's
>>questions be yes?
>>
>>Either he interpreted correctly (first yes, meaning advertised receive
>>window is always 3072 and transport receive buffer can use all available
>>memory) or he "totally misinterpreted" (second yes, meaning that the
>>transport receive buffer never exceeds 3072 bytes).
>>
>>Another way to ask this:
>>Starting from initial state, transport layer receive 1000 bytes.  App hasn't
>>read anything from transport yet.  Does the transport advertise 3072 bytes
>>(the first interpretation) or 2072 bytes (the second interpretation) for the
>>receive window?  If it advertises 3072 bytes (the first interpretation), the
>>sender can overwhelm the receiver's buffers and the window isn't providing
>>any flow control at all, which isn't what happens in real TCP.
>>
>>I'm pretty sure interpretation #2 is correct, but this reply confused me.
>>
>>Thanks,
>>Thad Hughes
>>
>>
>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>news:dtet7h$fun$1@news.Stanford.EDU...
>>
>>>Eric B Friedman wrote:
>>>
>>>>Hi,
>>>>
>>>>I am a bit confused.
>>>>
>>>>The assignment states the local receive window has a fixed size of 3072
>>>>bytes. First, am I correct in interpreting this as meaning the advertised
>>>>receive window is always 3072 bytes?
>>>
>>>Yes.
>>>
>>>>If so, then by the logic on Peterson p391 this implies MaxRcvBuffer must
>>>>be variable, not constant, and allowed to grow arbitrarily large.
>>>>
>>>>For suppose data within the window arrives in-order to the socket. In
>>>>response, an ACK with the fixed window is sent. Then NextByteExpected is
>>>>incremented by the amount received. Unless the application keeps up by
>>>>reading from the socket, LastByteRead will not decrease. Then the only
>>>>way the equation for AdvertisedWindow can hold is if MaxRcvBffer
>>>>increases.
>>>>
>>>>Is this interpretation correct? This implies the transport layer will use
>>>>up all available memory in the worst case...
>>>>
>>>>Or did I totally misinterpret things, and the correct interpretation is
>>>>instead that MaxRecvBuffer is fixed at 3072?
>>>
>>>Yeah MaxRecvBuffer is fixed at 3072...
>>>
>>>You pass data up to the app as soon as possible (i.e., it's in order), and
>>>assume it can buffer it before consumed by myread.  So yeah you're
>>>basically assuming an infinite buffer on the part of the app, but you
>>>don't have to worry about it.
>>>
>>>>Thanks,
>>>>
>>>>Eric
>>>>
>>
>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Another Assertion Failure
Date: Thu, 23 Feb 2006 06:40:50 +0000 (UTC)
Lines: 2
Distribution: su
Message-ID: <dtjldi$dm9$1@news.Stanford.EDU>
References: <dteddq$t2n$1@news.Stanford.EDU> <dtjkr1$d6c$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10289

I am not getting this problem Paul nor have I seen it show up so its 
likely something else biting you and revealing itself there.
.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Another Assertion Failure
Date: Wed, 22 Feb 2006 22:57:02 -0800
Lines: 32
Distribution: su
Message-ID: <Pine.GSO.4.44.0602222255110.22977-100000@elaine35.Stanford.EDU>
References: <dteddq$t2n$1@news.Stanford.EDU> <dtjkr1$d6c$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Paul Tarjan <ptarjan@stanford.edu>
In-Reply-To: <dtjkr1$d6c$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10290


I did get past this(there was a case of mix and match of read buffer with
the old one with the new one). After I fixed it I don't see it anymore.
I don't think it is an issue with either test scripts or given server
code.

thanks,
Vijay.


On Wed, 22 Feb 2006, Paul Tarjan wrote:

> Can anyone get past this? Is it my problem or a problem with the test
> script? Did anyone get 100% verified? I get this problem for both hw3a
> and hw3b
>
> Paul
>
> Paul Tarjan wrote:
> > Are you guys getting bad checksums with the test server / client?
> >
> > I get
> >
> > Assertion failed: len <= 0 ||
> > _mysock_verify_checksum(_mysock_get_context(sd), dst, len), file
> > stcp_api.c, line 166
> >
> > Whenever I'm testing against the given server implementation.
> >
> > Paul
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp_network_recv_wrapper
Date: Wed, 22 Feb 2006 23:46:25 -0800
Lines: 20
Distribution: su
Message-ID: <dtjp8s$hf7$1@news.Stanford.EDU>
References: <dthek4$670$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dthek4$670$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10291

Samantha Kwan Chan wrote:
> Hi,
> 
> For the stcp_network_recv function, are we guarantee to get a whole
> packet and not half of a packet such that we need to make multiple calls
> to piece together the packet?  Also should we also assume that the packets
> received have the TCP_MSS size + the TCP header?

You'll get the packet provided you give it a big enough buffer.  To 
calculate the buffer size you can assume an MSS of 536, and you have to 
add TCP header size to that (and remember the header can have options!)
> 
> also for the stcp_network_send function, will it send out the total number of
> bytes that was specified in its parameter or there is no guarantee?

Looks like it takes care of it for you.  You should still check for 
error though.
> 
> thanks,
> Sam
.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: The ack number for a SYN packet
Date: Thu, 23 Feb 2006 07:46:45 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: <dtjp95$gv6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10292

What do I set the ACK field to if my packet is a SYN packet? If my initial
sequence number is 100, then what the ACK field should be?  The project
description said we should set the ACK field whenever possible to make
STCP compatible with TCP.

Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: More on connection teardown
Date: Wed, 22 Feb 2006 23:56:56 -0800
Lines: 25
Distribution: su
Message-ID: <dtjpsj$jic$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602221811001.8839-100000@elaine15.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602221811001.8839-100000@elaine15.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10293

Wai Kei So wrote:
> Hello,
> 
> Suppose the following scenario happens:
> 
> A				B
> sends fin (fin_wait1)
> 				gets fin/send ack (close_wait)
> **then ack from b gets dropped **
> 				sends fin (last_ack)
> gets fin, sends ack (closing)	gets ack (closed)
> 
> 
> Now A is left in the closing state hanging for an ack.  Can this happen?
> Or does A not transition to the closing state until the ack comes back for
> the fin that it sent?
> 
> Thanks in advance,
> 
> -wks
> 
> 

That's pretty cool.  I think you're right, A won't ACK B's FIN until it 
got an ACK back for its own FIN.
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Another Assertion Failure
Date: Wed, 22 Feb 2006 23:58:06 -0800
Lines: 36
Distribution: su
Message-ID: <dtjpub$je3$1@news.Stanford.EDU>
References: <dteddq$t2n$1@news.Stanford.EDU> <dtjkr1$d6c$2@news.Stanford.EDU> <Pine.GSO.4.44.0602222255110.22977-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602222255110.22977-100000@elaine35.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10294

Alright. Thanks a bunch for the responses guys. Here's to fun debugging!

Vijay K Kulkarni wrote:
> I did get past this(there was a case of mix and match of read buffer with
> the old one with the new one). After I fixed it I don't see it anymore.
> I don't think it is an issue with either test scripts or given server
> code.
> 
> thanks,
> Vijay.
> 
> 
> On Wed, 22 Feb 2006, Paul Tarjan wrote:
> 
> 
>>Can anyone get past this? Is it my problem or a problem with the test
>>script? Did anyone get 100% verified? I get this problem for both hw3a
>>and hw3b
>>
>>Paul
>>
>>Paul Tarjan wrote:
>>
>>>Are you guys getting bad checksums with the test server / client?
>>>
>>>I get
>>>
>>>Assertion failed: len <= 0 ||
>>>_mysock_verify_checksum(_mysock_get_context(sd), dst, len), file
>>>stcp_api.c, line 166
>>>
>>>Whenever I'm testing against the given server implementation.
>>>
>>>Paul
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: The ack number for a SYN packet
Date: Wed, 22 Feb 2006 23:58:14 -0800
Lines: 12
Distribution: su
Message-ID: <dtjpv0$jic$2@news.Stanford.EDU>
References: <dtjp95$gv6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtjp95$gv6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10295

Right, it is not possible to set ACK when you're starting the connection 
and have not gotten a SYN from the other side yet.

Hector Chan wrote:
> What do I set the ACK field to if my packet is a SYN packet? If my initial
> sequence number is 100, then what the ACK field should be?  The project
> description said we should set the ACK field whenever possible to make
> STCP compatible with TCP.
> 
> Thanks,
> 
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Another Assertion Failure
Date: Thu, 23 Feb 2006 00:25:35 -0800
Lines: 51
Distribution: su
Message-ID: <dtjrhs$loa$1@news.Stanford.EDU>
References: <dteddq$t2n$1@news.Stanford.EDU> <dtjkr1$d6c$2@news.Stanford.EDU> <Pine.GSO.4.44.0602222255110.22977-100000@elaine35.Stanford.EDU> <dtjpub$je3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dtjpub$je3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10296

Well, thank you very much. I got it :)

And for the rest of you, just a hint so you don't fall into my trap.

"""
The Max packet size is NOT 536
"""

Thanks again Vijay and Stefan

Paul

Paul Tarjan wrote:
> Alright. Thanks a bunch for the responses guys. Here's to fun debugging!
> 
> Vijay K Kulkarni wrote:
> 
>> I did get past this(there was a case of mix and match of read buffer with
>> the old one with the new one). After I fixed it I don't see it anymore.
>> I don't think it is an issue with either test scripts or given server
>> code.
>>
>> thanks,
>> Vijay.
>>
>>
>> On Wed, 22 Feb 2006, Paul Tarjan wrote:
>>
>>
>>> Can anyone get past this? Is it my problem or a problem with the test
>>> script? Did anyone get 100% verified? I get this problem for both hw3a
>>> and hw3b
>>>
>>> Paul
>>>
>>> Paul Tarjan wrote:
>>>
>>>> Are you guys getting bad checksums with the test server / client?
>>>>
>>>> I get
>>>>
>>>> Assertion failed: len <= 0 ||
>>>> _mysock_verify_checksum(_mysock_get_context(sd), dst, len), file
>>>> stcp_api.c, line 166
>>>>
>>>> Whenever I'm testing against the given server implementation.
>>>>
>>>> Paul
>>>
>>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: More on connection teardown
Date: Thu, 23 Feb 2006 00:27:32 -0800
Lines: 34
Distribution: su
Message-ID: <dtjrlh$loa$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602221811001.8839-100000@elaine15.Stanford.EDU> <dtjpsj$jic$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dtjpsj$jic$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10297

Actually, since ACKs aren't ACKed, every ACK from B could just be eaten 
by the internet gods.

In that case, I think A just dies after sending 5 retransmissions of its 
  FIN.

Matt Falkenhagen wrote:
> Wai Kei So wrote:
> 
>> Hello,
>>
>> Suppose the following scenario happens:
>>
>> A                B
>> sends fin (fin_wait1)
>>                 gets fin/send ack (close_wait)
>> **then ack from b gets dropped **
>>                 sends fin (last_ack)
>> gets fin, sends ack (closing)    gets ack (closed)
>>
>>
>> Now A is left in the closing state hanging for an ack.  Can this happen?
>> Or does A not transition to the closing state until the ack comes back 
>> for
>> the fin that it sent?
>>
>> Thanks in advance,
>>
>> -wks
>>
>>
> 
> That's pretty cool.  I think you're right, A won't ACK B's FIN until it 
> got an ACK back for its own FIN.
.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: unexpected exit status 11
Date: Thu, 23 Feb 2006 02:23:16 -0800
Lines: 50
Distribution: su
Message-ID: <Pine.GSO.4.44.0602230218520.5575-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10298

Hi,
 while testing with the garding script I get the error Unexpected exit
status 11...

 the same thing happens with the test 1.J:
Checks student Tx (server) against student Rx (client).


But if I run both the server and client myself, I see it exiting
normally.

With the test run I get something like:
log: network_recv: an ACK packet with seq=18682, len=500 and ack=188 and
timestamp=2523466704
log: network_send: an ACK packet with seq=188, len=0 and ack=19182 and
timestamp=2523466704

Killed
^^^^^^^^
is anybody else seeing this? does it mean there are any errors in my
program?

thanks,
Vijay.

Test 1.B [out of 10]
Checks student Tx (server) against reference Rx (client).

Results:  OK
----------------------------------------------------------------------

Test 1.C [out of 10]
Checks reference Tx (server) against student Rx (client).

Results:  NOT OK

Unexpected exit status 11.  Program output:

 Initial seq num = 250

 SYN Seq num = 250, Ack num = 0

 reciving ack

 ACK Seq num = 251, Ack num = 158

 APP_DATA Seq num = 251, Ack num = 158, len=12
server: TESTDATA.0,110230,Ok


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: pthread_rwlock_rdlock(&listen_lock) returns 22
Date: Thu, 23 Feb 2006 04:50:02 -0800
Lines: 86
Distribution: su
Message-ID: <C022EF7A.350D%sunnybalwani@hotmail.com>
References: <C02217B1.34BA%sunnybalwani@hotmail.com> <C0221B7A.34C7%sunnybalwani@hotmail.com> <C0221D56.34CA%sunnybalwani@hotmail.com> <dtj7s5$22p$1@news.Stanford.EDU> <C0228D5D.34E6%sunnybalwani@hotmail.com> <dtjkmk$d6c$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: pthread_rwlock_rdlock(&listen_lock) returns 22
Thread-Index: AcY4d6lX55zb76RqEdqEtgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10299

This change doesn't require any changes/special handling in transport.c and
since that's the only file we are going to submit, it seems to work fine so
far.  *So far* being the key word as you seem to have started sooner than me
so I may not have encountered issues you may have.

Also, under Darwin, I am coding in Xcode so I am not using make.  Once my
code works there, I just copy the transport.c to solaris and compile and
test there and that seems to work perfectly so far.

Thanks.

On 2/22/06 10:28 PM, in article dtjkmk$d6c$1@news.Stanford.EDU, "Paul
Tarjan" <ptarjan@stanford.edu> wrote:

> Does it work darwin <-> darwin? darwin <-> solaris? darwin <-> linux?
> 
> I'm try to port it to linux, and I can get linux <-> linux but not linux
> <-> solaris
> 
> Sunny Balwani wrote:
>> I wrote a small function in connection_demux.c as follows:
>> void init_pthread_locks()
>> {
>>     pthread_rwlock_init(&listen_lock,NULL);
>> }
>> And called it in main to initliaze lock.  After that, everything works fine
>> and you can could in darwin. No problems so far.
>> 
>> 
>> On 2/22/06 6:49 PM, in article dtj7s5$22p$1@news.Stanford.EDU, "Will
>> Palmeri" <wjp@stanford.edu> wrote:
>> 
>> 
>>> Actually I couldn't get the client/server to run properly in Darwin
>>> either due to this error.  What was your solution??
>>> 
>>> Thanks,
>>> Will
>>> 
>>> Sunny Balwani wrote:
>>> 
>>>> Sorry.  Please ignore last two postings.  I figured it out.
>>>> 
>>>> Really Sorry for the spam.
>>>> 
>>>> 
>>>> On 2/22/06 1:45 PM, in article C0221B7A.34C7%sunnybalwani@hotmail.com,
>>>> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
>>>> 
>>>> 
>>>>> OK so this is an error you get when you don't initialize listen_lock
>>>>> object
>>>>> before calling pthread_rwlock_rdlock() function.
>>>>> 
>>>>> Martin.  What is the proper place to initialize the lock objects in the
>>>>> provided code?  Thanks for help in advance.  I could walkthru the code but
>>>>> if you already know then this will save me significant amount of time.
>>>>> 
>>>>> 
>>>>> Thanks for help in advance.
>>>>> 
>>>>> 
>>>>> Solaris is more forgiving when you use the lock object without
>>>>> initializing
>>>>> it first but Darwin is not.
>>>>> 
>>>>> 
>>>>> 
>>>>> On 2/22/06 1:29 PM, in article C02217B1.34BA%sunnybalwani@hotmail.com,
>>>>> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote:
>>>>> 
>>>>> 
>>>>>> Hi.
>>>>>> 
>>>>>> When I call the function pthread_rwlock_rdlock(&listen_lock)  in
>>>>>> connection_demux.c, it returns 22.  What does 22 mean?
>>>>>> 
>>>>>> Thanks in advance.
>>>>>> Sunny.
>>>>>> 
>>>>> 
>>>> 
>> 
>> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Junhee Seok" <jseok@stanford.edu>
Newsgroups: su.class.cs244a
Subject: running test code error
Date: Thu, 23 Feb 2006 10:58:30 -0800
Lines: 20
Distribution: su
Message-ID: <dtl0kq$om0$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10300

I am trying to run the test code for hw3a.
I got error message like,

Starting server: 
/afs/ir.stanford.edu/users/j/s/jseok/classes/cs244a/pa3/grading_src/build/server 
  -p 
/afs/ir.stanford.edu/users/j/s/jseok/classes/cs244a/pa3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/j/s/jseok/classes/cs244a/pa3/grading_src/build/.server_output
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
directory
Killed
warning:  server not responding, retrying

I don't know what the problem is.
Please help me.

Junhee 


.

Path: shelby.stanford.edu!elaine16.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: running test code error
Date: Thu, 23 Feb 2006 11:03:41 -0800
Lines: 58
Distribution: su
Message-ID: <Pine.GSO.4.44.0602231102440.2548-100000@elaine16.Stanford.EDU>
References: <dtl0kq$om0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Junhee Seok <jseok@stanford.edu>
In-Reply-To: <dtl0kq$om0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10301

here is a reply from Matt earlier:

.........
.......

Actually use:

setenv LD_LIBRARY_PATH /usr/pubsw/lib/

if you're using tcsh.

Sry for all this mess, I think the Leland machines were updated somehow
from previous years.

Paul Tarjan wrote:
> Well... It appears it was a LD_LIBRARY_PATH problem. It seems I have a
> LD_RUN_PATH that is set properly, but not the LD_LIBRARY_PATH.
>
> Anyone with this problem, type this in a console before testing your
> code (if you are using bash):
>
> export LD_LIBRARY_PATH=/usr/pubsw/lib/
>
> or if you are using tcsh:
>
> set LD_LIBRARY_PATH=/usr/pubsw/lib/
>
> then run the test script.
>
> I wonder why the defaults aren't setup properly?
>
> Paul


On Thu, 23 Feb 2006, Junhee Seok wrote:

> I am trying to run the test code for hw3a.
> I got error message like,
>
> Starting server:
> /afs/ir.stanford.edu/users/j/s/jseok/classes/cs244a/pa3/grading_src/build/server
>   -p
> /afs/ir.stanford.edu/users/j/s/jseok/classes/cs244a/pa3/grading_src/build/.server_port
> 2>&1 >
> /afs/ir.stanford.edu/users/j/s/jseok/classes/cs244a/pa3/grading_src/build/.server_output
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> directory
> Killed
> warning:  server not responding, retrying
>
> I don't know what the problem is.
> Please help me.
>
> Junhee
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 3 way handshake
Date: Thu, 23 Feb 2006 11:23:47 -0800
Lines: 7
Distribution: su
Message-ID: <dtl24o$q5u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10302

Just making sure I got this right.
1) Client sends SYN to server (is_active)
2) Server replies with SYN-ACK and sets its state to connection established, 
and unblocks application (here or when it receives the ack for its syn ack)
3) Client sends ack, and sets state connection established.


.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: unexpected exit status 11
Date: Thu, 23 Feb 2006 12:55:44 -0800
Lines: 63
Distribution: su
Message-ID: <Pine.GSO.4.44.0602231253140.28859-100000@elaine7.Stanford.EDU>
References: <Pine.GSO.4.44.0602230218520.5575-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0602230218520.5575-100000@elaine35.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10303


ok, it was a problem in my code. "Killed" message do appear for the passed
tests too so it is harmless message(as part of killing the spawned
processes during testing I believe).

thanks,
Vijay.


On Thu, 23 Feb 2006, Vijay K Kulkarni wrote:

> Hi,
>  while testing with the garding script I get the error Unexpected exit
> status 11...
>
>  the same thing happens with the test 1.J:
> Checks student Tx (server) against student Rx (client).
>
>
> But if I run both the server and client myself, I see it exiting
> normally.
>
> With the test run I get something like:
> log: network_recv: an ACK packet with seq=18682, len=500 and ack=188 and
> timestamp=2523466704
> log: network_send: an ACK packet with seq=188, len=0 and ack=19182 and
> timestamp=2523466704
>
> Killed
> ^^^^^^^^
> is anybody else seeing this? does it mean there are any errors in my
> program?
>
> thanks,
> Vijay.
>
> Test 1.B [out of 10]
> Checks student Tx (server) against reference Rx (client).
>
> Results:  OK
> ----------------------------------------------------------------------
>
> Test 1.C [out of 10]
> Checks reference Tx (server) against student Rx (client).
>
> Results:  NOT OK
>
> Unexpected exit status 11.  Program output:
>
>  Initial seq num = 250
>
>  SYN Seq num = 250, Ack num = 0
>
>  reciving ack
>
>  ACK Seq num = 251, Ack num = 158
>
>  APP_DATA Seq num = 251, Ack num = 158, len=12
> server: TESTDATA.0,110230,Ok
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: The ack number for a SYN packet
Date: Thu, 23 Feb 2006 19:13:34 -0800
Lines: 28
Distribution: su
Message-ID: <C023B9DE.352F%sunnybalwani@hotmail.com>
References: <dtjp95$gv6$1@news.Stanford.EDU> <dtjpv0$jic$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: The ack number for a SYN packet
Thread-Index: AcY48EuzilGdmaTjEdqs1AARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10304

In 3-way handshake, when the active client sends the ACK in response to
ACK+SYN from server, should it contain the next sequence number?  So if my
initial seed sequence number was 100, then when I send the ACK to passive
server for its ACK+SYN, should the sequence be 101 (and the first data
packet will have 102)? Or is it ignored and the first data packet will have
101 as its sequence number?

Thanks in advance..



On 2/22/06 11:58 PM, in article dtjpv0$jic$2@news.Stanford.EDU, "Matt
Falkenhagen" <mjf@stanford.edu> wrote:

> Right, it is not possible to set ACK when you're starting the connection
> and have not gotten a SYN from the other side yet.
> 
> Hector Chan wrote:
>> What do I set the ACK field to if my packet is a SYN packet? If my initial
>> sequence number is 100, then what the ACK field should be?  The project
>> description said we should set the ACK field whenever possible to make
>> STCP compatible with TCP.
>> 
>> Thanks,
>> 
>> Hector


.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: data in SYN+ACK packets, stcp_set_context, multiple connections
Date: Thu, 23 Feb 2006 20:04:34 -0800
Lines: 24
Distribution: su
Message-ID: <dtm0kr$sat$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10306

Hi,

A few quick questions:

1. Are we expected to deal with the case where the server sends back data in
the SYN+ACK packet after receiving the SYN from the client? Similarly, when
the client sends the ACK back for for the SYN+ACK from the server, is it
allowed to send data in that packet?

2. Are we expected to call stcp_set_context() in the stcp_api.c at any time?
I don't seem to see how it fits anywhere into the STCP implementation,
especially we have defined a context structure (the context_t struct) in
transport.c. I don't know if I'm missing something here.

3. Is our server implementation supposed to be able to handle multiple 
simultaneous connections from many clients?


Thanks

Ram



.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: The ack number for a SYN packet
Date: Thu, 23 Feb 2006 20:10:33 -0800
Lines: 56
Distribution: su
Message-ID: <dtm103$skf$1@news.Stanford.EDU>
References: <dtjp95$gv6$1@news.Stanford.EDU> <dtjpv0$jic$2@news.Stanford.EDU> <C023B9DE.352F%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10307

Hi Sunny,

I think what the assignment says is that ACKs never occupy any sequence 
numbers, so in this case, when the client sends the ACK for the SYN+ACK, 
followed by data, as far as the sequence number is concerned, it's as though 
the ACK never happened. In your example, the first data packet should 
therefore have a sequence number of 101.

This means that the contents of sequence number field in an ACK packet 
theoretically doesn't matter at all. However, in practice, when you do send 
ACK packets, instead of leaving it as some (potentially) garbled value, you 
just fill that field up with the next sequence number you're planning to 
send anyway, but then don't increment the sequence number when you send the 
next data packet.

Coming back to your example, that means the client's ACK will have sequence 
number 101 and the first data packet will also have sequence number 101.

That's the way I understand it. Maybe the TAs can confirm this.

Ram

"Sunny Balwani" <sunnybalwani@hotmail.com> wrote in message 
news:C023B9DE.352F%sunnybalwani@hotmail.com...
> In 3-way handshake, when the active client sends the ACK in response to
> ACK+SYN from server, should it contain the next sequence number?  So if my
> initial seed sequence number was 100, then when I send the ACK to passive
> server for its ACK+SYN, should the sequence be 101 (and the first data
> packet will have 102)? Or is it ignored and the first data packet will 
> have
> 101 as its sequence number?
>
> Thanks in advance..
>
>
>
> On 2/22/06 11:58 PM, in article dtjpv0$jic$2@news.Stanford.EDU, "Matt
> Falkenhagen" <mjf@stanford.edu> wrote:
>
>> Right, it is not possible to set ACK when you're starting the connection
>> and have not gotten a SYN from the other side yet.
>>
>> Hector Chan wrote:
>>> What do I set the ACK field to if my packet is a SYN packet? If my 
>>> initial
>>> sequence number is 100, then what the ACK field should be?  The project
>>> description said we should set the ACK field whenever possible to make
>>> STCP compatible with TCP.
>>>
>>> Thanks,
>>>
>>> Hector
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: SYN+ACK
Date: Fri, 24 Feb 2006 07:58:07 +0000 (UTC)
Lines: 8
Distribution: su
Message-ID: <dtmeaf$cdp$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10308

When the active end is waiting for a SYN+ACK during the 3-way handshake, is 
there any chance we are going to recevie one segment for SYN and another 
segment for ACK?  Or can we just assume the SYN+ACK always come in one segment?

Thanks,

Hector

.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Timeouts
Date: Thu, 23 Feb 2006 23:59:24 -0800
Lines: 8
Distribution: su
Message-ID: <dtmed1$d7q$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10309

For implementing timeouts etc, are we required to use some existing 
functions from the provided code, or do we need to introduce our own 
pthreads to implement the timers and timeouts?

Thanks
Tahir. 


.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Zero effective window size
Date: Fri, 24 Feb 2006 01:48:08 -0800
Lines: 12
Distribution: su
Message-ID: <dtmkoq$iq1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10310

Hi,

I came across this in the Peterson's book on the fact that the receiver's 
advertised window's size can be zero. I know that the window size of STCP is 
fixed. But what about the other party doesn't use STCP. Are u supposed to 
handle this case? (In the textbook, it mentioned that we have to keep 
sending a packet until the ACK indicates a non-zero window size.)

Thanks,
Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Testing 3-way handshake
Date: Fri, 24 Feb 2006 09:54:48 +0000 (UTC)
Lines: 22
Distribution: su
Message-ID: <dtml58$i8a$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10311

Hi,

Does anyone know if I can test the 3-way handshake using provided client with 
www.stanford.edu:80 ?  Is it going to work?

I have sent a SYN with the following values to www.stanford.edu using 

  SYN:
     tcp_segment.th_seq   = 0
     tcp_segment.th_ack   = 0
     tcp_segment.th_off   = 0
     tcp_segment.th_flags = TH_SYN
     tcp_segment.th_win   = 3072 / 32

  stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr));


Any idea?

Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Project 3a Deliverables
Date: Fri, 24 Feb 2006 10:20:38 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: <dtmmlm$k22$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10312

Hi,

For project 3a, am I correct to assume there won't be any loss packet and all packets will arrive in sequence?

Are we only responsible for implementing the following for 3a:

  3-Way Handshake
  Sliding Window
  Network Termination

The project description just mentioned what is NOT needed for projectg 3a. 



Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: alex qi <alexqi@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Assertion Error
Date: Fri, 24 Feb 2006 02:49:45 -0800
Lines: 11
Distribution: su
Message-ID: <dtmoc9$lj1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10313

During the three way handshake, whenever I tried to set 
ctx->initial_sequence_num = 1;, i got the following error:

Assertion failed: packet_len + next_len <= sizeof(packet), file 
stcp_api.c, line 212
Abort

However, it works if i set ctx->initial_sequence_num = 0;
Is there any special reason for that?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: SYN+ACK
Date: Fri, 24 Feb 2006 03:02:59 -0800
Lines: 18
Distribution: su
Message-ID: <dtmp4r$m7q$1@news.Stanford.EDU>
References: <dtmeaf$cdp$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10314

The TCP state diagram allows for a SYN in that state, but I don't know if we
need to handle that.  If you get a SYN, you're supposed to send a SYN-ACK
back.

"Hector Chan" <chanhp@Stanford.EDU> wrote in message
news:dtmeaf$cdp$1@news.Stanford.EDU...
> When the active end is waiting for a SYN+ACK during the 3-way handshake,
is
> there any chance we are going to recevie one segment for SYN and another
> segment for ACK?  Or can we just assume the SYN+ACK always come in one
segment?
>
> Thanks,
>
> Hector
>


.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: debugging Test 1.B
Date: Fri, 24 Feb 2006 11:09:29 -0800
Lines: 27
Distribution: su
Message-ID: <Pine.GSO.4.44.0602241105170.28850-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10315

When I run the test scripts, all tests pass except 1.B (most important,
I guess).

The test log says

----------
Test 1.B [out of 10]
Checks student Tx (server) against reference Rx (client).

Results:  NOT OK

No 'rcvd' created!  Client output:
server:
Malformed response from server.

----------

is there a way to see what happened in the test? In my grading_src/build
directory I see some output files but .server_output and .client_output
are binary and .output.normal_reliable.TESTDATA.0 seems to show normal
client output.

thanks,

- Miguel


.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing 3-way handshake
Date: Fri, 24 Feb 2006 13:36:31 -0800
Lines: 32
Distribution: su
Message-ID: <dtnu93$rj6$1@news.Stanford.EDU>
References: <dtml58$i8a$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtml58$i8a$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10316

I'm interested in this, too.  I'm passing all the tests except the first 
two, the ones in which our program is tested against some "reference" 
program.  I don't see why running "./client -f blah www.stanford.edu:80" 
shouldn't at least cause the server to reply with a SYNACK.  Has anyone 
whose program passes the first two tests tried this?

Thanks,
Steve

Hector Chan wrote:
> Hi,
> 
> Does anyone know if I can test the 3-way handshake using provided client with 
> www.stanford.edu:80 ?  Is it going to work?
> 
> I have sent a SYN with the following values to www.stanford.edu using 
> 
>   SYN:
>      tcp_segment.th_seq   = 0
>      tcp_segment.th_ack   = 0
>      tcp_segment.th_off   = 0
>      tcp_segment.th_flags = TH_SYN
>      tcp_segment.th_win   = 3072 / 32
> 
>   stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr));
> 
> 
> Any idea?
> 
> Thanks,
> 
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing 3-way handshake
Date: Fri, 24 Feb 2006 14:02:34 -0800
Lines: 36
Distribution: su
Message-ID: <C024C27A.2C2F%jpettit@stanford.edu>
References: <dtml58$i8a$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Testing 3-way handshake
Thread-Index: AcY5jgPjQpEGlaWBEdqaEgARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10317

I don't know if this is your problem, but I got inconsistent behavior unless
I put the NULL character as the last argument of that call.  So, for
example, your call would be written:

    stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr), NULL);

--Justin


On 2/24/06 1:54 AM, in article dtml58$i8a$1@news.Stanford.EDU, "Hector Chan"
<chanhp@Stanford.EDU> wrote:

> Hi,
> 
> Does anyone know if I can test the 3-way handshake using provided client with
> www.stanford.edu:80 ?  Is it going to work?
> 
> I have sent a SYN with the following values to www.stanford.edu using
> 
>   SYN:
>      tcp_segment.th_seq   = 0
>      tcp_segment.th_ack   = 0
>      tcp_segment.th_off   = 0
>      tcp_segment.th_flags = TH_SYN
>      tcp_segment.th_win   = 3072 / 32
> 
>   stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr));
> 
> 
> Any idea?
> 
> Thanks,
> 
> Hector


.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assertion Error
Date: Fri, 24 Feb 2006 14:05:19 -0800
Lines: 23
Distribution: su
Message-ID: <C024C31F.2C31%jpettit@stanford.edu>
References: <dtmoc9$lj1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Assertion Error
Thread-Index: AcY5jmY8pM5iuKWBEdqaEgARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10318

I was getting that assertion error when I didn't set the last argument of
stcp_network_send to NULL.  You may want to read the comment describing the
function, which is just above it.

--Justin


On 2/24/06 2:49 AM, in article dtmoc9$lj1$1@news.Stanford.EDU, "alex qi"
<alexqi@stanford.edu> wrote:

> During the three way handshake, whenever I tried to set
> ctx->initial_sequence_num = 1;, i got the following error:
> 
> Assertion failed: packet_len + next_len <= sizeof(packet), file
> stcp_api.c, line 212
> Abort
> 
> However, it works if i set ctx->initial_sequence_num = 0;
> Is there any special reason for that?
> 
> Thanks.


.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: debugging Test 1.B
Date: Fri, 24 Feb 2006 15:21:32 -0800
Lines: 36
Distribution: su
Message-ID: <dto4dt$4t7$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602241105170.28850-100000@elaine40.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10319

You could modify your our_dprintf to write each program's debug output to a 
different file.

-Jesse

"Miguel Sanchez" <sanchezm@stanford.edu> wrote in message 
news:Pine.GSO.4.44.0602241105170.28850-100000@elaine40.Stanford.EDU...
> When I run the test scripts, all tests pass except 1.B (most important,
> I guess).
>
> The test log says
>
> ----------
> Test 1.B [out of 10]
> Checks student Tx (server) against reference Rx (client).
>
> Results:  NOT OK
>
> No 'rcvd' created!  Client output:
> server:
> Malformed response from server.
>
> ----------
>
> is there a way to see what happened in the test? In my grading_src/build
> directory I see some output files but .server_output and .client_output
> are binary and .output.normal_reliable.TESTDATA.0 seems to show normal
> client output.
>
> thanks,
>
> - Miguel
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Re: Timeouts
Date: Fri, 24 Feb 2006 15:25:23 -0800
Lines: 20
Distribution: su
Message-ID: <dto4l3$54n$1@news.Stanford.EDU>
References: <dtmed1$d7q$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10320

As long as you're careful about how long you allow stcp_wait_for_event to 
block, I don't think you need any other threads.  transport_init owns the 
thread that invokes it, so it's yours to do with as you please.  Just think 
of the timeout as one more event that can be dispatched to you from 
stcp_wait_for_event.  And you get to decide when that happens when you call 
stcp_wait_for_event.  Hope that helps.

--Thad

"Tahir Azim" <tazim@stanford.edu> wrote in message 
news:dtmed1$d7q$1@news.Stanford.EDU...
> For implementing timeouts etc, are we required to use some existing 
> functions from the provided code, or do we need to introduce our own 
> pthreads to implement the timers and timeouts?
>
> Thanks
> Tahir.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 3 way handshake
Date: Fri, 24 Feb 2006 16:33:57 -0800
Lines: 11
Distribution: su
Message-ID: <dto8m3$96d$1@news.Stanford.EDU>
References: <dtl24o$q5u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtl24o$q5u$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10321

That looks mostly right but if you looked at the TCP state diagram (in 
the book or RFC) the server would go to SYN_RECEIVED in step 2.

Nazia Zaman wrote:
> Just making sure I got this right.
> 1) Client sends SYN to server (is_active)
> 2) Server replies with SYN-ACK and sets its state to connection established, 
> and unblocks application (here or when it receives the ack for its syn ack)
> 3) Client sends ack, and sets state connection established.
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: The ack number for a SYN packet
Date: Fri, 24 Feb 2006 16:35:27 -0800
Lines: 62
Distribution: su
Message-ID: <dto8os$96d$2@news.Stanford.EDU>
References: <dtjp95$gv6$1@news.Stanford.EDU> <dtjpv0$jic$2@news.Stanford.EDU> <C023B9DE.352F%sunnybalwani@hotmail.com> <dtm103$skf$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtm103$skf$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10322

Yep Ram is right.

Ramanan wrote:
> Hi Sunny,
> 
> I think what the assignment says is that ACKs never occupy any sequence 
> numbers, so in this case, when the client sends the ACK for the SYN+ACK, 
> followed by data, as far as the sequence number is concerned, it's as though 
> the ACK never happened. In your example, the first data packet should 
> therefore have a sequence number of 101.
> 
> This means that the contents of sequence number field in an ACK packet 
> theoretically doesn't matter at all. However, in practice, when you do send 
> ACK packets, instead of leaving it as some (potentially) garbled value, you 
> just fill that field up with the next sequence number you're planning to 
> send anyway, but then don't increment the sequence number when you send the 
> next data packet.
> 
> Coming back to your example, that means the client's ACK will have sequence 
> number 101 and the first data packet will also have sequence number 101.
> 
> That's the way I understand it. Maybe the TAs can confirm this.
> 
> Ram
> 
> "Sunny Balwani" <sunnybalwani@hotmail.com> wrote in message 
> news:C023B9DE.352F%sunnybalwani@hotmail.com...
> 
>>In 3-way handshake, when the active client sends the ACK in response to
>>ACK+SYN from server, should it contain the next sequence number?  So if my
>>initial seed sequence number was 100, then when I send the ACK to passive
>>server for its ACK+SYN, should the sequence be 101 (and the first data
>>packet will have 102)? Or is it ignored and the first data packet will 
>>have
>>101 as its sequence number?
>>
>>Thanks in advance..
>>
>>
>>
>>On 2/22/06 11:58 PM, in article dtjpv0$jic$2@news.Stanford.EDU, "Matt
>>Falkenhagen" <mjf@stanford.edu> wrote:
>>
>>
>>>Right, it is not possible to set ACK when you're starting the connection
>>>and have not gotten a SYN from the other side yet.
>>>
>>>Hector Chan wrote:
>>>
>>>>What do I set the ACK field to if my packet is a SYN packet? If my 
>>>>initial
>>>>sequence number is 100, then what the ACK field should be?  The project
>>>>description said we should set the ACK field whenever possible to make
>>>>STCP compatible with TCP.
>>>>
>>>>Thanks,
>>>>
>>>>Hector
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: data in SYN+ACK packets, stcp_set_context, multiple connections
Date: Fri, 24 Feb 2006 16:50:16 -0800
Lines: 36
Distribution: su
Message-ID: <dto9km$aeb$1@news.Stanford.EDU>
References: <dtm0kr$sat$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtm0kr$sat$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10323

Ramanan wrote:
> Hi,
> 
> A few quick questions:
> 
> 1. Are we expected to deal with the case where the server sends back data in
> the SYN+ACK packet after receiving the SYN from the client? Similarly, when
> the client sends the ACK back for for the SYN+ACK from the server, is it
> allowed to send data in that packet?

You don't need to handle data in the SYN+ACK from the server.  However 
you must handle data from the ACK for the SYN+ACK (i.e., if you're in 
SYN_RECEIVED state).

> 
> 2. Are we expected to call stcp_set_context() in the stcp_api.c at any time?
> I don't seem to see how it fits anywhere into the STCP implementation,
> especially we have defined a context structure (the context_t struct) in
> transport.c. I don't know if I'm missing something here.

No it's purely optional.  From stcp_api.h:  "you may or may not need to 
use these functions depending on your implementation."
> 
> 3. Is our server implementation supposed to be able to handle multiple 
> simultaneous connections from many clients?

Nope, that's all taken care of for you.  Your code just deals with one 
connection.
> 
> 
> Thanks
> 
> Ram
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: SYN+ACK
Date: Fri, 24 Feb 2006 16:58:34 -0800
Lines: 13
Distribution: su
Message-ID: <dtoa48$at4$1@news.Stanford.EDU>
References: <dtmeaf$cdp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtmeaf$cdp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10324

Yep it is possible.  The TCP state diagram shows what happens if you get 
a plain SYN while you're in SYN_SENT.  If you get a plain ACK, check the 
RFC for details (page 66-68, search for "If the state is SYN-SENT").

Hector Chan wrote:
> When the active end is waiting for a SYN+ACK during the 3-way handshake, is 
> there any chance we are going to recevie one segment for SYN and another 
> segment for ACK?  Or can we just assume the SYN+ACK always come in one segment?
> 
> Thanks,
> 
> Hector
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Timeouts
Date: Fri, 24 Feb 2006 16:59:26 -0800
Lines: 25
Distribution: su
Message-ID: <dtoa5r$at4$2@news.Stanford.EDU>
References: <dtmed1$d7q$1@news.Stanford.EDU> <dto4l3$54n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dto4l3$54n$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10325

Right, wait_for_event is enough to do everything you need to do.

Thad Hughes wrote:
> As long as you're careful about how long you allow stcp_wait_for_event to 
> block, I don't think you need any other threads.  transport_init owns the 
> thread that invokes it, so it's yours to do with as you please.  Just think 
> of the timeout as one more event that can be dispatched to you from 
> stcp_wait_for_event.  And you get to decide when that happens when you call 
> stcp_wait_for_event.  Hope that helps.
> 
> --Thad
> 
> "Tahir Azim" <tazim@stanford.edu> wrote in message 
> news:dtmed1$d7q$1@news.Stanford.EDU...
> 
>>For implementing timeouts etc, are we required to use some existing 
>>functions from the provided code, or do we need to introduce our own 
>>pthreads to implement the timers and timeouts?
>>
>>Thanks
>>Tahir.
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Debugging Test 1.C
Date: Fri, 24 Feb 2006 17:01:03 -0800
Lines: 13
Distribution: su
Message-ID: <dtoa8i$b25$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10326

This is my test output, How do I begin debugging it!?! it works fine when I 
run my client, and server but sI can't figure out what the problem is.

Test 1.C [out of 10]
Checks reference Tx (server) against student Rx (client).

Results:  NOT OK

Unexpected exit status -1.  Program output:
***Timeout expired during grading
Program output:


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Zero effective window size
Date: Fri, 24 Feb 2006 17:06:02 -0800
Lines: 17
Distribution: su
Message-ID: <dtoai8$bat$1@news.Stanford.EDU>
References: <dtmkoq$iq1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtmkoq$iq1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10327

Sutthipong Thavisomboon wrote:
> Hi,
> 
> I came across this in the Peterson's book on the fact that the receiver's 
> advertised window's size can be zero. I know that the window size of STCP is 
> fixed. But what about the other party doesn't use STCP. Are u supposed to 
> handle this case? (In the textbook, it mentioned that we have to keep 
> sending a packet until the ACK indicates a non-zero window size.)
> 
> Thanks,
> Sutthipong 
> 
> 

I don't think we try to test this, but when interacting with real TCP in 
Assignment 4 anything can happen.  To be safe you may want to implement 
this (it should be very easy, one or two lines of code).
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Project 3a Deliverables
Date: Fri, 24 Feb 2006 17:13:29 -0800
Lines: 25
Distribution: su
Message-ID: <dtob07$bat$2@news.Stanford.EDU>
References: <dtmmlm$k22$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtmmlm$k22$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10328

Hector Chan wrote:
> Hi,
> 
> For project 3a, am I correct to assume there won't be any loss packet and all packets will arrive in sequence?

Yep.

> 
> Are we only responsible for implementing the following for 3a:
> 
>   3-Way Handshake
>   Sliding Window
>   Network Termination
> 
> The project description just mentioned what is NOT needed for projectg 3a. 

Sounds like that covers everything.

> 
> 
> 
> Thanks,
> 
> Hector

.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Testing 3-way handshake
Date: Sat, 25 Feb 2006 01:16:17 +0000 (UTC)
Lines: 48
Distribution: su
Message-ID: <dtob51$bnm$1@news.Stanford.EDU>
References: <dtml58$i8a$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10329

I am sorry there are some typos in the code segment in the earlier post.  This
is the typo-free version of what I wrote.  I was trying to connect to
www.stanford.edu:80 using the provided client.  After I sent the first SYN, I
never got back a SYN+ACK back from www.stanford.edu.

   SYN:
      tcp_segment.th_seq   = 0
      tcp_segment.th_ack   = 0
      tcp_segment.th_off   = 5
      tcp_segment.th_flags = TH_SYN
      tcp_segment.th_win   = 3072 / 4

   stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr), 0);
   event = stcp_wait_for_event(sd, NETWORK_DATA, 0);   /* Wait indefinitely */

Does anyone got a SYN+ACK back from www.stanford.edu:80 using the provided client?

Thanks,

Hector





Hector Chan <chanhp@stanford.edu> wrote:
> Hi,

> Does anyone know if I can test the 3-way handshake using provided client with 
> www.stanford.edu:80 ?  Is it going to work?

> I have sent a SYN with the following values to www.stanford.edu using 

>   SYN:
>      tcp_segment.th_seq   = 0
>      tcp_segment.th_ack   = 0
>      tcp_segment.th_off   = 0
>      tcp_segment.th_flags = TH_SYN
>      tcp_segment.th_win   = 3072 / 32

>   stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr));


> Any idea?

> Thanks,

> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: transport_init vs. control_loop
Date: Fri, 24 Feb 2006 17:20:35 -0800
Lines: 28
Distribution: su
Message-ID: <dtobd4$cb3$1@news.Stanford.EDU>
References: <dt8jjh$ier$1@news.Stanford.EDU> <dt9cht$b6h$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <dt9cht$b6h$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10330

Matt Falkenhagen wrote:
> It just means you shouldn't unblock app until you reached ESTABLISHED 
> state.  You can call control_loop before that happens.
> 
> You should deal with a close after SYN received, yes.

Does this mean we need to handle a FIN packet even before a 3-way 
handshake is completed (both active and passive) ? Is this mentioned 
anywhere in the RFC/textbook?

> 
> Waynn Lue wrote:
> 
>> The documentation in transport.c implies that we shouldn't call 
>> control_loop
>> until the connection is established.  However, we still have to handle 
>> the
>> case where we get a close after we received a SYN, right?  Which means 
>> we'll
>> have to duplicate the logic for handling connection closing in both
>> control_loop and transport_init.  Is it possible to either do all the 
>> state
>> transitions in transport_init or not have to deal with a close after
>> receiving a SYN?
>>
>> Waynn
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: debugging Test 1.B
Date: Fri, 24 Feb 2006 18:09:08 -0800
Lines: 42
Distribution: su
Message-ID: <dtoe8i$eu5$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602241105170.28850-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602241105170.28850-100000@elaine40.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10331

Hm, I never noticed this before but the test script creates 
..network_log.* files in grading_src/build.  You might want to look at those.

When I did this assignment I just did something like:

     char tmp[] = "/tmp/mjf_XXXXXX";

     mktemp(tmp);
     fprintf(stderr, "logfile is %s\n", tmp);
     logfile = fopen(tmp, "w");

And then modified our_dprintf to write to the log, and just made my own 
debugging output.

Miguel Sanchez wrote:
> When I run the test scripts, all tests pass except 1.B (most important,
> I guess).
> 
> The test log says
> 
> ----------
> Test 1.B [out of 10]
> Checks student Tx (server) against reference Rx (client).
> 
> Results:  NOT OK
> 
> No 'rcvd' created!  Client output:
> server:
> Malformed response from server.
> 
> ----------
> 
> is there a way to see what happened in the test? In my grading_src/build
> directory I see some output files but .server_output and .client_output
> are binary and .output.normal_reliable.TESTDATA.0 seems to show normal
> client output.
> 
> thanks,
> 
> - Miguel
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Debugging Test 1.C
Date: Fri, 24 Feb 2006 18:13:56 -0800
Lines: 16
Distribution: su
Message-ID: <dtoehh$eu5$2@news.Stanford.EDU>
References: <dtoa8i$b25$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtoa8i$b25$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10332

Nazia Zaman wrote:
> This is my test output, How do I begin debugging it!?! it works fine when I 
> run my client, and server but sI can't figure out what the problem is.
> 
> Test 1.C [out of 10]
> Checks reference Tx (server) against student Rx (client).
> 
> Results:  NOT OK
> 
> Unexpected exit status -1.  Program output:
> ***Timeout expired during grading
> Program output:
> 
> 

See previous post for some debugging advice... hopefully it will help you.
.

Path: shelby.stanford.edu!not-for-mail
From: "Junhee Seok" <jseok@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS#3
Date: Fri, 24 Feb 2006 23:59:21 -0800
Lines: 11
Distribution: su
Message-ID: <dtp2os$4qa$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10333

Prob. 2 of PS#3

What does the rule #1 mean?
It says that when ack is received, Wnext = Wprev + 1/Wprev.
So, does it mean that window size can be a floating number?
Let me be clearfied.
Thank you

Junhee 


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test 2.J
Date: Sat, 25 Feb 2006 01:07:08 -0800
Lines: 18
Distribution: su
Message-ID: <dtp6nt$8j1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10334

I'm trying to figure out why I'm failing the test 2.J. Here is the output:

    Test 2.J [out of 14]
    Checks student Tx (server) against student Rx (client).

    Results:  NOT OK

    Unexpected exit status -1.  Program output:
    ***Timeout expired during grading
    Program output:
    server: TESTDATA.0,110230,Ok

However, the program runs fine when I execute the same commands as the
script. I see from the previous year's newsgroup that some people had
trouble with the same test in the past. What was the problem?

Thanks!
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Testing 3-way handshake on a web server
Date: Sat, 25 Feb 2006 09:54:23 +0000 (UTC)
Lines: 23
Distribution: su
Message-ID: <dtp9gf$ab0$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10335

Hi,

I was trying to connect to www.stanford.edu:80 using the provided client.  
After I sent the first SYN, I never got back a SYN+ACK back from 
www.stanford.edu.

   SYN:
      tcp_segment.th_seq   = 0
      tcp_segment.th_ack   = 0
      tcp_segment.th_off   = 5
      tcp_segment.th_flags = TH_SYN
      tcp_segment.th_win   = 3072 / 4

   stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr), 0);
   event = stcp_wait_for_event(sd, NETWORK_DATA, 0);   /* Wait indefinitely */

Does anyone got a SYN+ACK back from www.stanford.edu:80 using the provided 
client?


Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Test script error
Date: Sat, 25 Feb 2006 04:50:14 -0800
Lines: 23
Distribution: su
Message-ID: <C0259286.356D%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Test script error
Thread-Index: AcY6CgVSQ70V7KX9EdqfxQARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10336

Hi.

When I submit my transport.c for testing, the grading script gives me
following error.  Is it because something wrong in my code or are there any
paths etc that are not properly set.

Here is the error message:

Starting server: 
/afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/server
-p 
/afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/.server
_port 2>&1 > 
/afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/.server
_output
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
directory
Killed
^Ccouldn't submit code for testing


Thanks in advance for help.

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: Test script error (please ignore)
Date: Sat, 25 Feb 2006 05:02:47 -0800
Lines: 33
Distribution: su
Message-ID: <C0259577.3570%sunnybalwani@hotmail.com>
References: <C0259286.356D%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Test script error (please ignore)
Thread-Index: AcY6CgVSQ70V7KX9EdqfxQARJHuZqgAAcDQN
Xref: shelby.stanford.edu su.class.cs244a:10337

Splease ignore this post, found the answer.
Thanks.



On 2/25/06 4:50 AM, in article C0259286.356D%sunnybalwani@hotmail.com,
"Sunny Balwani" <sunnybalwani@hotmail.com> wrote:

> Hi.
> 
> When I submit my transport.c for testing, the grading script gives me
> following error.  Is it because something wrong in my code or are there any
> paths etc that are not properly set.
> 
> Here is the error message:
> 
> Starting server: 
> /afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/server
> -p 
> /afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/.server
> _port 2>&1 > 
> /afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/.server
> _output
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or
> directory
> Killed
> ^Ccouldn't submit code for testing
> 
> 
> Thanks in advance for help.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: sender window shrinking
Date: Sat, 25 Feb 2006 12:54:20 -0800
Lines: 23
Distribution: su
Message-ID: <dtqg64$d8q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10338

LBW = last byte written
LBA = last byte acknowledged
LBS = last byte sent

Hi,

I can't convince myself how STCP should handle the following scenario:

To start off, the sender receives an advertised window of size 3000 from 
the other end. Let's say the app doesn't run out of bytes to send. The 
sender side reads MSS = 576 bytes from the app and sends them. Now 
LBW=576, LBA=0, LBS=576. This repeats until LBW=3000, LBA=0, LBS=3000.

Now let's say an ACK comes back for byte 1000, and at the same time the 
other side's advertised window shrinks to 0. Now LBW=3000, LBA=1000, but 
what is LBS? If it remains at 3000, it contradicts

LBS - LBA <= Adv. Window

Should LBS become 1000 while bytes 1001 to 3000 are buffered in the 
sender and send them out when the Adv. Window is non-zero again?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sender window shrinking
Date: Sat, 25 Feb 2006 13:14:56 -0800
Lines: 27
Distribution: su
Message-ID: <dtqhcn$dpa$1@news.Stanford.EDU>
References: <dtqg64$d8q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dtqg64$d8q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10339

MSS = 536 rather


Naeim Semsarilar wrote:
> LBW = last byte written
> LBA = last byte acknowledged
> LBS = last byte sent
> 
> Hi,
> 
> I can't convince myself how STCP should handle the following scenario:
> 
> To start off, the sender receives an advertised window of size 3000 from 
> the other end. Let's say the app doesn't run out of bytes to send. The 
> sender side reads MSS = 576 bytes from the app and sends them. Now 
> LBW=576, LBA=0, LBS=576. This repeats until LBW=3000, LBA=0, LBS=3000.
> 
> Now let's say an ACK comes back for byte 1000, and at the same time the 
> other side's advertised window shrinks to 0. Now LBW=3000, LBA=1000, but 
> what is LBS? If it remains at 3000, it contradicts
> 
> LBS - LBA <= Adv. Window
> 
> Should LBS become 1000 while bytes 1001 to 3000 are buffered in the 
> sender and send them out when the Adv. Window is non-zero again?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Testing 3-way handshake
Date: Sat, 25 Feb 2006 21:27:31 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: <dtqi43$ebr$1@news.Stanford.EDU>
References: <dtml58$i8a$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10340

I dont think you should expect to see anything if you connect to a
normal server.  As I understand the code, everything we do is wrapped
by the libraries provided into a TCP stream of the TA/professors design.
Thus when you send a SYN, the code actually wraps this up into whatever
handshaking packing is required by the underlying implementation.  The
only way you would see a SYN would be if the server at the other end
was ready to speak cs244a's handshake protocol and further, once the
handskake was accomplished, the server would have to encode a SYN/ACK
into a wrapped up packet the right way to send it back to you.

The short version then would be that the server doesnt see a SYN, it 
sees random data which is only meaningful to the cs244a code.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test 1.C
Date: Sat, 25 Feb 2006 13:28:08 -0800
Lines: 24
Distribution: su
Message-ID: <dtqi5p$enr$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10341

So I have narrowed the reason why my test is failing somewhat, but its still 
really confusing. The three way handshake completes fine. My client sends 
the file name to the server fine,
Sequence number : 139
Packet is an ACK  : 217
Packet Length is : 12
The state is ESTABLISHED********************
Sent application data
Data is: Testdata.0

But it receives from the server a simple ack, and the ack number is wrong, 
its 138 where as it should have been 139 + 12. Also the server doesn't send 
back any data.
So my client just sits there waiting for data, as it doesn't send an ack for 
an ack. (Its not supposed to). Here is the packet received by the client in 
response to the file name.
Sequence number : 217
Packet is an ACK  : 138
Packet Length is : 0
The state is ESTABLISHED********************

Help please! 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.J
Date: Sat, 25 Feb 2006 21:32:51 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: <dtqie3$ebr$2@news.Stanford.EDU>
References: <dtp6nt$8j1$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10342

As I read the message, it means your program hung during testing. I had
this problem and it was because I wasnt closing down my session cleanly
unless I was speaking to another copy of my STCP on the other end--so
I had two bugs which together allowed me to exit in my tests but when the
test script runs your code against its own STCP implementation then you
dont behave the same.

.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: RST message
Date: Sat, 25 Feb 2006 14:02:31 -0800
Lines: 9
Distribution: su
Message-ID: <Pine.GSO.4.44.0602251400270.13962-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10343

Can we safely ignore RST (reset) messages that may be sent by some actual
TCP implementation that our STCP is tested against? i.e. if we see an RST
message, we don't need to close our side of the connection down
rightaway as stated in the RFC, but rather can wait for whatever timeouts
etc before closing down?

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: submission script help needed
Date: Sat, 25 Feb 2006 22:09:57 +0000 (UTC)
Lines: 33
Distribution: su
Message-ID: <dtqkjl$g5p$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10344


I cant figure out what I am doing wrong, if anyone can help it would be
appreciated.

I am trying to submit my code with:

/afs/ir/class/cs244a/bin/submit.pl hw3.A arigreen transport.c README

When I run this I get the usage info:

usage: /afs/ir/class/cs244a/bin/submit.pl <assignment> <TA>
        e.g: /afs/ir/class/cs244a/bin/submit.pl hw1 molinero
Allowed assignments:
        hw1 => FTP Directory Copy
        hw2 => Writing your own Router
        hw3.A => STCP Simple TCP (part 1)
        hw3.B => STCP Simple TCP (part 2)
        hw3.C => STCP Simple TCP (part 3)
        hw4 => Putting it All Together

Allowed TAs:
        arigreen
        mjf

When I run without the "transport.c and README" it actually submits
successfully though it is successfully submitting no actual files (so it
is fine with my TA and assignment number I think).

When I look through the perl code for the submission script in the 
test_code.cfg initialization file both README and transport.c are listed 
as required and they are definitely present in the current directory when 
I execute the command.  I cannot submit either file by itself either.

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: submission script help needed
Date: Sat, 25 Feb 2006 15:05:41 -0800
Lines: 36
Distribution: su
Message-ID: <dtqnsl$j74$1@news.Stanford.EDU>
References: <dtqkjl$g5p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtqkjl$g5p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10345

Stefan, it just takes the files from the current directory, no need to 
specify them.  Your submission at 1:47 worked.

Stefan Thomas Mohler wrote:
> I cant figure out what I am doing wrong, if anyone can help it would be
> appreciated.
> 
> I am trying to submit my code with:
> 
> /afs/ir/class/cs244a/bin/submit.pl hw3.A arigreen transport.c README
> 
> When I run this I get the usage info:
> 
> usage: /afs/ir/class/cs244a/bin/submit.pl <assignment> <TA>
>         e.g: /afs/ir/class/cs244a/bin/submit.pl hw1 molinero
> Allowed assignments:
>         hw1 => FTP Directory Copy
>         hw2 => Writing your own Router
>         hw3.A => STCP Simple TCP (part 1)
>         hw3.B => STCP Simple TCP (part 2)
>         hw3.C => STCP Simple TCP (part 3)
>         hw4 => Putting it All Together
> 
> Allowed TAs:
>         arigreen
>         mjf
> 
> When I run without the "transport.c and README" it actually submits
> successfully though it is successfully submitting no actual files (so it
> is fine with my TA and assignment number I think).
> 
> When I look through the perl code for the submission script in the 
> test_code.cfg initialization file both README and transport.c are listed 
> as required and they are definitely present in the current directory when 
> I execute the command.  I cannot submit either file by itself either.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: RST message
Date: Sat, 25 Feb 2006 15:06:46 -0800
Lines: 14
Distribution: su
Message-ID: <dtqnul$j74$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602251400270.13962-100000@elaine35.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602251400270.13962-100000@elaine35.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10346

Yes, from the handout:

"TH_RST, TH_PUSH, and TH_URG are ignored by STCP"

Dinkar Gupta wrote:
> Can we safely ignore RST (reset) messages that may be sent by some actual
> TCP implementation that our STCP is tested against? i.e. if we see an RST
> message, we don't need to close our side of the connection down
> rightaway as stated in the RFC, but rather can wait for whatever timeouts
> etc before closing down?
> 
> Thanks,
> Dinkar.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sender window shrinking
Date: Sat, 25 Feb 2006 15:25:59 -0800
Lines: 35
Distribution: su
Message-ID: <dtqp2m$k4d$1@news.Stanford.EDU>
References: <dtqg64$d8q$1@news.Stanford.EDU> <dtqhcn$dpa$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtqhcn$dpa$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10347

Yeah, I think what the book is getting at is the sender cannot send 
until LBS - LBA <= Adv. Window.  There is no need to change LBS in this 
case (only when you Go-Back-N).


Naeim Semsarilar wrote:
> MSS = 536 rather
> 
> 
> Naeim Semsarilar wrote:
> 
>> LBW = last byte written
>> LBA = last byte acknowledged
>> LBS = last byte sent
>>
>> Hi,
>>
>> I can't convince myself how STCP should handle the following scenario:
>>
>> To start off, the sender receives an advertised window of size 3000 
>> from the other end. Let's say the app doesn't run out of bytes to 
>> send. The sender side reads MSS = 576 bytes from the app and sends 
>> them. Now LBW=576, LBA=0, LBS=576. This repeats until LBW=3000, LBA=0, 
>> LBS=3000.
>>
>> Now let's say an ACK comes back for byte 1000, and at the same time 
>> the other side's advertised window shrinks to 0. Now LBW=3000, 
>> LBA=1000, but what is LBS? If it remains at 3000, it contradicts
>>
>> LBS - LBA <= Adv. Window
>>
>> Should LBS become 1000 while bytes 1001 to 3000 are buffered in the 
>> sender and send them out when the Adv. Window is non-zero again?
>>
>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.J
Date: Sat, 25 Feb 2006 15:28:16 -0800
Lines: 34
Distribution: su
Message-ID: <dtqp6e$kag$1@news.Stanford.EDU>
References: <dtp6nt$8j1$1@news.Stanford.EDU> <dtqie3$ebr$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dtqie3$ebr$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10348

Hi Stefan,

Did you have the problem with test 2.B & test 2.C, or test 2.j? My
STCP works fine with the reference STCP:

    Test 2.B [out of 20]
    Checks student Tx (server) against reference Rx (client).

    Results:  OK

    Test 2.C [out of 20]
    Checks reference Tx (server) against student Rx (client).

    Results:  OK

It doesn't work when both client and server uses my STCP:

    Test 2.J [out of 14]
    Checks student Tx (server) against student Rx (client).

    Results:  NOT OK

But when I execute the same commands as the test script, it runs fine.

--Michi

Stefan Thomas Mohler wrote:
> As I read the message, it means your program hung during testing. I had
> this problem and it was because I wasnt closing down my session cleanly
> unless I was speaking to another copy of my STCP on the other end--so
> I had two bugs which together allowed me to exit in my tests but when the
> test script runs your code against its own STCP implementation then you
> dont behave the same.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS#3
Date: Sat, 25 Feb 2006 15:28:02 -0800
Lines: 15
Distribution: su
Message-ID: <dtqp6h$k4d$2@news.Stanford.EDU>
References: <dtp2os$4qa$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtp2os$4qa$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10349

Yeah for graphing it can be continuous.  In practice of course you would 
truncate/round to an integer.

Junhee Seok wrote:
> Prob. 2 of PS#3
> 
> What does the rule #1 mean?
> It says that when ack is received, Wnext = Wprev + 1/Wprev.
> So, does it mean that window size can be a floating number?
> Let me be clearfied.
> Thank you
> 
> Junhee 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test script problem
Date: Sat, 25 Feb 2006 15:28:41 -0800
Lines: 18
Distribution: su
Message-ID: <dtqp7a$kb0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10350

Has anyone seen this problem before?
The grading_src/build/server program seems to be looking for libssl.so 
but that is no where to be found...

Hau Jia.


Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/server 
  -p 
/afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/.server_output
ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
directory
Killed
.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script problem
Date: Sat, 25 Feb 2006 15:32:55 -0800
Lines: 26
Distribution: su
Message-ID: <dtqpf7$kb0$2@news.Stanford.EDU>
References: <dtqp7a$kb0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <dtqp7a$kb0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10351

OK, found the solution also.
But can the TA please correct this mistake or post a warning somewhere 
so that other people won't waste anymore tests?

Hau Jia.

Hau Jia Chew wrote:
> Has anyone seen this problem before?
> The grading_src/build/server program seems to be looking for libssl.so 
> but that is no where to be found...
> 
> Hau Jia.
> 
> 
> Testing input file TESTDATA.0
> 
> Starting server: 
> /afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/server 
>  -p 
> /afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/.server_port 
> 2>&1 > 
> /afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/.server_output 
> 
> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
> directory
> Killed
.

Path: shelby.stanford.edu!not-for-mail
From: "Andrew Sakai" <asakai@stanford.edu>
Newsgroups: su.class.cs244a
Subject: TIME_WAIT
Date: Sat, 25 Feb 2006 15:34:20 -0800
Lines: 8
Distribution: su
Message-ID: <dtqphv$kk0$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10352

In the assignment writeup, it is mentioned that we do not have to support 
the TIME_WAIT state.  Does this mean that all transitions to the TIME_WAIT 
state in the state diagram can go directly to CLOSED in our implementation?

    Thanks,
    Andrew 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script problem
Date: Sat, 25 Feb 2006 15:47:08 -0800
Lines: 31
Distribution: su
Message-ID: <dtqqab$l57$1@news.Stanford.EDU>
References: <dtqp7a$kb0$1@news.Stanford.EDU> <dtqpf7$kb0$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtqpf7$kb0$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10353

Hau Jia Chew wrote:
> OK, found the solution also.
> But can the TA please correct this mistake or post a warning somewhere 
> so that other people won't waste anymore tests?

Good idea.  I've sent out an email.

> 
> Hau Jia.
> 
> Hau Jia Chew wrote:
> 
>> Has anyone seen this problem before?
>> The grading_src/build/server program seems to be looking for libssl.so 
>> but that is no where to be found...
>>
>> Hau Jia.
>>
>>
>> Testing input file TESTDATA.0
>>
>> Starting server: 
>> /afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/server 
>>  -p 
>> /afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/.server_port 
>> 2>&1 > 
>> /afs/ir.stanford.edu/users/h/a/haujia/cs244a/hw3/grading_src/build/.server_output 
>>
>> ld.so.1: server: fatal: libssl.so.0.9.7: open failed: No such file or 
>> directory
>> Killed
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TIME_WAIT
Date: Sat, 25 Feb 2006 15:49:56 -0800
Lines: 12
Distribution: su
Message-ID: <dtqqfk$l57$2@news.Stanford.EDU>
References: <dtqphv$kk0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtqphv$kk0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10354

Andrew Sakai wrote:
> In the assignment writeup, it is mentioned that we do not have to support 
> the TIME_WAIT state.  Does this mean that all transitions to the TIME_WAIT 
> state in the state diagram can go directly to CLOSED in our implementation?

Yep.

> 
>     Thanks,
>     Andrew 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <nospam@nospam.com>
Newsgroups: su.class.cs244a
Subject: Assignment 3: how to handle malloc failures
Date: Sat, 25 Feb 2006 16:01:37 -0800
Lines: 6
Distribution: su
Message-ID: <dtqr4i$lti$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10355

How should we handle malloc returning null within assignment 3?  In 
previous assignments we could immediately quit with an appropriate error 
message. Is that still acceptable?

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assignment 3: how to handle malloc failures
Date: Sat, 25 Feb 2006 16:07:00 -0800
Lines: 11
Distribution: su
Message-ID: <dtqrfj$m3p$1@news.Stanford.EDU>
References: <dtqr4i$lti$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtqr4i$lti$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10356

Daniel Holbert wrote:
> How should we handle malloc returning null within assignment 3?  In 
> previous assignments we could immediately quit with an appropriate error 
> message. Is that still acceptable?

There might be problems with that because it's not a standalone program. 
  It would be best to return cleanly from transport_init.

> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.J
Date: Sun, 26 Feb 2006 00:26:21 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: <dtqsjd$n5e$1@news.Stanford.EDU>
References: <dtp6nt$8j1$1@news.Stanford.EDU> <dtqie3$ebr$2@news.Stanford.EDU> <dtqp6e$kag$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10357

I had a problem when my STCP was tested again the TA version.  I know this
wasnt exactly your problem but it seemed a bit related so I was hoping it 
might help.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: RST message
Date: Sat, 25 Feb 2006 16:26:50 -0800
Lines: 20
Distribution: su
Message-ID: <dtqskh$n5q$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602251400270.13962-100000@elaine35.Stanford.EDU> <dtqnul$j74$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dtqnul$j74$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10358

What if one of these flags is set, as well as TH_ACK? Do we ignore the 
segment or do we process the ACK anyway?

Thanks.

Matt Falkenhagen wrote:
> Yes, from the handout:
> 
> "TH_RST, TH_PUSH, and TH_URG are ignored by STCP"
> 
> Dinkar Gupta wrote:
>> Can we safely ignore RST (reset) messages that may be sent by some actual
>> TCP implementation that our STCP is tested against? i.e. if we see an RST
>> message, we don't need to close our side of the connection down
>> rightaway as stated in the RFC, but rather can wait for whatever timeouts
>> etc before closing down?
>>
>> Thanks,
>> Dinkar.
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <nospam@nospam.com>
Newsgroups: su.class.cs244a
Subject: Re: Assignment 3: Packet buffer in context_t
Date: Sat, 25 Feb 2006 16:29:28 -0800
Lines: 7
Distribution: su
Message-ID: <dtqsop$n75$1@news.Stanford.EDU>
References: <dtqr4i$lti$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dtqr4i$lti$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10359

Is it acceptable to give the context_t structure a buffer with size 
equal to maximum packet size, to use for building and reading packets? 
(I'm assuming this wouldn't count as a "global" buffer, but just wanted 
to make sure.)

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <nospam@nospam.com>
Newsgroups: su.class.cs244a
Subject: Re: Assignment 3: Packet buffer in context_t
Date: Sat, 25 Feb 2006 16:35:58 -0800
Lines: 18
Distribution: su
Message-ID: <dtqt4v$nja$1@news.Stanford.EDU>
References: <dtqr4i$lti$1@news.Stanford.EDU> <dtqsop$n75$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dtqsop$n75$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10360

Sorry, I think I was sort of unclear in my last post.

By the thing about the "global buffer", I meant that I'm wondering if 
using this static per-connection-structure buffer would be stylistically 
acceptable, given earlier requirements in the ftpcopy assignment that we 
shouldn't use global buffers.

Thanks,
~Daniel

Daniel Holbert wrote:
> Is it acceptable to give the context_t structure a buffer with size 
> equal to maximum packet size, to use for building and reading packets? 
> (I'm assuming this wouldn't count as a "global" buffer, but just wanted 
> to make sure.)
> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: RST message
Date: Sat, 25 Feb 2006 16:35:46 -0800
Lines: 30
Distribution: su
Message-ID: <dtqt5i$nfj$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602251400270.13962-100000@elaine35.Stanford.EDU> <dtqnul$j74$2@news.Stanford.EDU> <dtqskh$n5q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtqskh$n5q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10361

Naeim Semsarilar wrote:
> What if one of these flags is set, as well as TH_ACK? Do we ignore the 
> segment or do we process the ACK anyway?
> 
> Thanks.

It shouldn't matter.  It'd probably be easiest for you to just pretend 
the RST, PUSH, and URG flags don't even exist.

> 
> Matt Falkenhagen wrote:
> 
>> Yes, from the handout:
>>
>> "TH_RST, TH_PUSH, and TH_URG are ignored by STCP"
>>
>> Dinkar Gupta wrote:
>>
>>> Can we safely ignore RST (reset) messages that may be sent by some 
>>> actual
>>> TCP implementation that our STCP is tested against? i.e. if we see an 
>>> RST
>>> message, we don't need to close our side of the connection down
>>> rightaway as stated in the RFC, but rather can wait for whatever 
>>> timeouts
>>> etc before closing down?
>>>
>>> Thanks,
>>> Dinkar.
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Test script 1.I
Date: Sat, 25 Feb 2006 16:39:29 -0800
Lines: 21
Distribution: su
Message-ID: <C02638C1.358C%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Test script 1.I
Thread-Index: AcY6bRoTWF6RFqZgEdqcgwARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10362

Hi.
I am getting the following error when I run script for 3a.


Test 1.I [out of 5]
Checks that FIN is correctly ACKed.
Results:  NOT OK
No ACK for FIN with sequence number 13


I have tested the code several ways and cant reproduce this problem.  Even
when I transfer large files or just simple echo request, my code always gets
the right acks for FINs (both the client and server) and the connection gets
properly terminated (4 way termination).

Can you please give some pointers as to what this client code is doing so I
can try to reproduce this problem.

Thanks.


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assignment 3: Packet buffer in context_t
Date: Sat, 25 Feb 2006 16:38:46 -0800
Lines: 23
Distribution: su
Message-ID: <dtqtb5$nfj$2@news.Stanford.EDU>
References: <dtqr4i$lti$1@news.Stanford.EDU> <dtqsop$n75$1@news.Stanford.EDU> <dtqt4v$nja$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtqt4v$nja$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10363

Daniel Holbert wrote:
> Sorry, I think I was sort of unclear in my last post.
> 
> By the thing about the "global buffer", I meant that I'm wondering if 
> using this static per-connection-structure buffer would be stylistically 
> acceptable, given earlier requirements in the ftpcopy assignment that we 
> shouldn't use global buffers.

Sounds OK.

> 
> Thanks,
> ~Daniel
> 
> Daniel Holbert wrote:
> 
>> Is it acceptable to give the context_t structure a buffer with size 
>> equal to maximum packet size, to use for building and reading packets? 
>> (I'm assuming this wouldn't count as a "global" buffer, but just 
>> wanted to make sure.)
>>
>> Thanks,
>> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: multiple clients
Date: Sat, 25 Feb 2006 16:44:45 -0800
Lines: 14
Distribution: su
Message-ID: <dtqtlr$nvl$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10364

hi
If I have one client connet to one server I am able to copy files and 
everything is fine but if I try to connect a second client to the running 
server, it just hangs after the 3 way handshake is completed and I dont get 
the message from the server saying: Connected to ip at port x

also the program passes Test 1.B but not 1.C and 1.J

wht could be the problem

thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: multiple clients
Date: Sat, 25 Feb 2006 16:46:28 -0800
Lines: 23
Distribution: su
Message-ID: <dtqtp4$o61$1@news.Stanford.EDU>
References: <dtqtlr$nvl$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10365

just to make it clear its the second client that hangs not the server.. I am 
still able to download files from the first client open

thanks
Forum

"Forum Mangal Parmar" <forumm@stanford.edu> wrote in message 
news:dtqtlr$nvl$1@news.Stanford.EDU...
> hi
> If I have one client connet to one server I am able to copy files and 
> everything is fine but if I try to connect a second client to the running 
> server, it just hangs after the 3 way handshake is completed and I dont 
> get the message from the server saying: Connected to ip at port x
>
> also the program passes Test 1.B but not 1.C and 1.J
>
> wht could be the problem
>
> thanks
> Forum
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: behavior of application after close
Date: Sat, 25 Feb 2006 17:18:51 -0800
Lines: 12
Distribution: su
Message-ID: <dtqvlv$prc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10366

Hi,

Suppose A closes connection, according to Peterson book, this means that A 
has no more data to send but it is still available to receive data from the 
other side. So after APP_CLOSED_REQUESTED occurs, what happen to the TCP 
layer when it receive incoming packet to A? Can it just call app_send even 
though the application already sent the APP_CLOSED_REQUESTED?

Thanks,
sutthipong


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Warning: unable to close filehandle KID_TO_READ properly
Date: Sat, 25 Feb 2006 18:01:22 -0800
Lines: 5
Distribution: su
Message-ID: <dtr25g$roq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10367

wht does this warning mean?
is it safe to ignore it?



.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test 1.C and 1.J
Date: Sat, 25 Feb 2006 18:59:25 -0800
Lines: 16
Distribution: su
Message-ID: <dtr5ib$19j$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10368

I am able to copy any file (I tried copying a 1.2 MB file) when I run my 
client and server and it works but still test 1.J says NOT OK. why is that??

Also when I cheked the .network_log files, all the files show correct 
packets being exchanged, i.e. the whole file is transfered (which I 
calculated from the ACK number) and proper closing with FIN happens.

It would be great if you could point out possible problems tht causes the 
tests 1.C and 1.J to fail. Also since test 1.B is OK means the server side 
works fine with this STCP. so wht issues are only connected to the client?

any help is appreciated
thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <nospam@nospam.com>
Newsgroups: su.class.cs244a
Subject: Does 536-byte max packet size include header?
Date: Sat, 25 Feb 2006 19:01:18 -0800
Lines: 8
Distribution: su
Message-ID: <dtr5lf$18r$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10369

 From assignment description:
"An STCP packet has a maximum size of 536 bytes."

Does this value take the header into account, or does it only consider 
the amount of non-header data sent in a packet?

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: assertion errors
Date: Sat, 25 Feb 2006 19:07:33 -0800
Lines: 13
Distribution: su
Message-ID: <dtr61n$1kr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10370

Are there any differences between the server/client that we compile 
manually using our Makefile and the one that the test script makes?

My server/client work fine but when running the test script will 
generate an assertion at mysock.c:167 complaining about assert(pq->tail).

Running the purified versions didn't show any memory related issues.

Any idea on the best way to track down these kinds of assertion errors?

Thanks,

Hau Jia.
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: byte-ordering (again)
Date: Sat, 25 Feb 2006 19:17:11 -0800
Lines: 9
Distribution: su
Message-ID: <dtr6jq$282$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10371

Hi,

   Don't mean to bring this issue up again, but I just want to confirm (coz 
I keep getting it wrong) that we should use ntohl/htonl when reading/writing 
the sequence/acks number fields of the STCP header.

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: test 1.C and 1.J
Date: Sun, 26 Feb 2006 04:20:54 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: <dtrab6$509$1@news.Stanford.EDU>
References: <dtr5ib$19j$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10372


This might not be what going on but I hope it helps..

The test script tests for differences by computing a hash value for the
file which was sent across your link (think of it as a very good checksum).

It is possible to send the right about of data but have the data slightly
garbled or somehow incorrect.  For example, I was failing this test because 
of a bug where I occasionally copied from an incorrect offset in my data queue
which had the effect of repeating a few characters of data every 5k or so.

For me, the file was the right size, the acks were correct but I failed those
tests because the hash they use reveals the fact that the file was corrupted
by my protocol.
.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine2.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: stcp_echo_server, stcp_echo_client
Date: Sat, 25 Feb 2006 20:22:46 -0800
Lines: 12
Distribution: su
Message-ID: <Pine.GSO.4.44.0602252020190.7728-100000@elaine2.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10373

It sounds like stcp_echo_client/stcp_echo_server are useful for debugging.

(I'm specifically working on the failed tests 1.B and 1.C, which look fine
from the packet logs, but timeout during test runs with errors similar
to ones reported previously on this newsgroup)

Does anyone know the syntax for running these programs?  Or could you
point me to where it's discussed in the assignments/newsgroup?

Thanks,
Peter

.

Path: shelby.stanford.edu!myth15.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@myth15.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: stcp_echo_server, stcp_echo_client
Date: Sat, 25 Feb 2006 20:33:14 -0800
Lines: 48
Distribution: su
Message-ID: <Pine.LNX.4.44.0602252027430.3353-100000@myth15.Stanford.EDU>
References: <Pine.GSO.4.44.0602252020190.7728-100000@elaine2.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0602252020190.7728-100000@elaine2.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10374

Actually, could there be some bad hoodoo going on with the vns servers?  I
tried running the sr project again:

elaine2:~/cs244a/router> ./sr -s vns-1.stanford.edu -t 20
Loading routing table
---------------------------------------------
Destination     Gateway         Mask    Iface
192.168.130.9           192.168.130.9   255.255.255.255 eth2
192.168.130.7           192.168.130.7   255.255.255.255 eth1
0.0.0.0         172.24.74.17    0.0.0.0 eth0
---------------------------------------------
Client ptrlee connecting to Server vns-1.stanford.edu:12345
Requesting topology 20
connect(..):sr_client.c::sr_connect_to_server(..): Connection refused

and vns-2 gives me:

Client ptrlee connecting to Server vns-2.stanford.edu:12345
Requesting topology 20
VNS server closed session.
Reason: reservehost failed
 `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
 Make sure you are using the right topology
      ./sr -t <topoid>

 You can also check that another router isn't already
 on your topology at: http://vns-1.stanford.edu/summary
 `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~

--Peter


On Sat, 25 Feb 2006, Peter In Lee wrote:

> It sounds like stcp_echo_client/stcp_echo_server are useful for debugging.
>
> (I'm specifically working on the failed tests 1.B and 1.C, which look fine
> from the packet logs, but timeout during test runs with errors similar
> to ones reported previously on this newsgroup)
>
> Does anyone know the syntax for running these programs?  Or could you
> point me to where it's discussed in the assignments/newsgroup?
>
> Thanks,
> Peter
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: behavior of application after close
Date: Sat, 25 Feb 2006 21:54:01 -0800
Lines: 30
Distribution: su
Message-ID: <dtrfpp$9q0$1@news.Stanford.EDU>
References: <dtqvlv$prc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10375

I need help on this question as well.  I see that in the assignment 
document, in the section called
"Network Termination", it tells us that a peer needs to continue accepting
packets from the other peer even after APP_CLOSED_REQUESTED, until receiving 
a FIN from the other peer.

But it is not clear to me that we should be passing the enclosed data from 
those packets to the application via stcp_app_send() at that point. 
Clarification on all this would be greatly appreciated.

Cheers, Bruce


"Sutthipong Thavisomboon" <sthavis@stanford.edu> wrote in message
news:dtqvlv$prc$1@news.Stanford.EDU...
> Hi,
>
> Suppose A closes connection, according to Peterson book, this means that A
> has no more data to send but it is still available to receive data from
> the other side. So after APP_CLOSED_REQUESTED occurs, what happen to the
> TCP layer when it receive incoming packet to A? Can it just call app_send
> even though the application already sent the APP_CLOSED_REQUESTED?
>
> Thanks,
> sutthipong
>
>



.

Path: shelby.stanford.edu!not-for-mail
From: Alex Li <alexli@stanford.edu>
Newsgroups: su.class.cs244a
Subject: File Name on Server
Date: Sat, 25 Feb 2006 22:25:06 -0800
Lines: 5
Distribution: su
Message-ID: <dtrhk7$b7f$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10376

Maybe a stupid question... but can somebody tell me the name of a file 
that resides on the server?

Thanks,
Alex
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: daily quota runs...
Date: Sun, 26 Feb 2006 06:25:21 +0000 (UTC)
Lines: 6
Distribution: su
Message-ID: <dtrhkg$b5n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10377

In the homework sheet it said that we are allowed 5 runs a day until the
day it is due...then it becomes 3.  Currently the test script will not
allow us to run more than 3.  Is this a bug in the script?

thanks,
Sam
.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: byte-ordering (again)
Date: Sat, 25 Feb 2006 22:28:36 -0800
Lines: 24
Distribution: su
Message-ID: <Pine.GSO.4.44.0602252226370.27171-100000@elaine18.Stanford.EDU>
References: <dtr6jq$282$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dtr6jq$282$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10378

this was quickly mentioned in the TA session last friday...

YES, we do need to use the byte conversion routines for values that we get
from the tcp header. And I don't think it's just the sequence numbers and
acks, we also have the flags field.

I hope this helps,

- Miguel


On Sat, 25 Feb 2006, Ramanan wrote:

> Hi,
>
>    Don't mean to bring this issue up again, but I just want to confirm (coz
> I keep getting it wrong) that we should use ntohl/htonl when reading/writing
> the sequence/acks number fields of the STCP header.
>
> Ram
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: byte-ordering (again)
Date: Sat, 25 Feb 2006 22:32:42 -0800
Lines: 32
Distribution: su
Message-ID: <dtri2f$bdt$1@news.Stanford.EDU>
References: <dtr6jq$282$1@news.Stanford.EDU> <Pine.GSO.4.44.0602252226370.27171-100000@elaine18.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602252226370.27171-100000@elaine18.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10379

The flag bits are all in a single byte, so there is nothing to do for 
those.  But don't forget about the window size, which is 2 bytes.

Steve

Miguel Sanchez wrote:
> this was quickly mentioned in the TA session last friday...
> 
> YES, we do need to use the byte conversion routines for values that we get
> from the tcp header. And I don't think it's just the sequence numbers and
> acks, we also have the flags field.
> 
> I hope this helps,
> 
> - Miguel
> 
> 
> On Sat, 25 Feb 2006, Ramanan wrote:
> 
> 
>>Hi,
>>
>>   Don't mean to bring this issue up again, but I just want to confirm (coz
>>I keep getting it wrong) that we should use ntohl/htonl when reading/writing
>>the sequence/acks number fields of the STCP header.
>>
>>Ram
>>
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: daily quota runs...
Date: Sat, 25 Feb 2006 22:34:03 -0800
Lines: 11
Distribution: su
Message-ID: <dtri51$bdt$2@news.Stanford.EDU>
References: <dtrhkg$b5n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtrhkg$b5n$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10380

They pointed out in a previous post that this was false advertising.

Steve

Samantha Kwan Chan wrote:
> In the homework sheet it said that we are allowed 5 runs a day until the
> day it is due...then it becomes 3.  Currently the test script will not
> allow us to run more than 3.  Is this a bug in the script?
> 
> thanks,
> Sam
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: fin handshake
Date: Sun, 26 Feb 2006 06:35:44 +0000 (UTC)
Lines: 18
Distribution: su
Message-ID: <dtri80$b5n$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10381

Is the following a valid fin handshake from the point of view of the client?

^^Send: flags 0x1 seq 843 len 0 ack 307859 dst 3072 src 3072
^^Recv: flags 0x10 seq 307859 len 0 ack 844 dst 3072 src 3072
^^Recv: flags 0x1 seq 307860 len 0 ack 844 dst 3072 src 3072
^^Send: flags 0x10 seq 844 len 0 ack 307861 dst 3072 src 3072

I got the following error...so please let me know if that is a legit handshake.

Test 1.I [out of 5]
Checks that FIN is correctly ACKed.

Results:  NOT OK

No ACK for FIN with sequence number 332

thanks,
Sam
.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: behavior of application after close
Date: Sat, 25 Feb 2006 22:38:55 -0800
Lines: 57
Distribution: su
Message-ID: <Pine.GSO.4.44.0602252230340.27171-100000@elaine18.Stanford.EDU>
References: <dtqvlv$prc$1@news.Stanford.EDU> <dtrfpp$9q0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dtrfpp$9q0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10382

yeah, the 4-way handshake is probably the most challenging sequence in
part A of the assignment. This is how I understood it...

APP_CLOSED_REQUESTED means that the app will no longer be sending any
data. But you have to make sure that you have already sent all PENDING
data. For example, you might not have processed some APP_DATA events
because the send window is too small. But after you send all the pending
data, you can interpret APP_CLOSED_REQUESTED to mean that you will not get
any more data FROM the app.

But you can still get data TO the app. That is, APP_CLOSED_REQUESTED does
NOT mean that the app isn't willing to receive network data. That decision
is made by the other side of the connection when it sends you a FIN.

So, APP_CLOSED_REQUESTED ....

- send all pending data out the network
- continue to receive data from the network and pass it up to the
application

- Miguel


On Sat, 25 Feb 2006, Bruce Schechter wrote:

> I need help on this question as well.  I see that in the assignment
> document, in the section called
> "Network Termination", it tells us that a peer needs to continue accepting
> packets from the other peer even after APP_CLOSED_REQUESTED, until receiving
> a FIN from the other peer.
>
> But it is not clear to me that we should be passing the enclosed data from
> those packets to the application via stcp_app_send() at that point.
> Clarification on all this would be greatly appreciated.
>
> Cheers, Bruce
>
>
> "Sutthipong Thavisomboon" <sthavis@stanford.edu> wrote in message
> news:dtqvlv$prc$1@news.Stanford.EDU...
> > Hi,
> >
> > Suppose A closes connection, according to Peterson book, this means that A
> > has no more data to send but it is still available to receive data from
> > the other side. So after APP_CLOSED_REQUESTED occurs, what happen to the
> > TCP layer when it receive incoming packet to A? Can it just call app_send
> > even though the application already sent the APP_CLOSED_REQUESTED?
> >
> > Thanks,
> > sutthipong
> >
> >
>
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: File Name on Server
Date: Sun, 26 Feb 2006 06:42:14 +0000 (UTC)
Lines: 2
Distribution: su
Message-ID: <dtrik6$b0k$1@news.Stanford.EDU>
References: <dtrhk7$b7f$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10383

Alex, the server reads files out of the directory it is run from so if you are
running it from the current directory you could use transport.c server etc.
.

Path: shelby.stanford.edu!saga13.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: zero byte transfers
Date: Sun, 26 Feb 2006 00:16:51 -0800
Lines: 12
Distribution: su
Message-ID: <Pine.GSO.4.44.0602260007480.12241-100000@saga13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10384

I'm not quite sure about this corner case, which would come up if you
requested a zero byte file. I still
don't really understand how calls to read() can ever return 0 bytes
until a FIN is sent, but it seems that in HW1 it often returned 0 when
there was just no data to read, meaning that somehow the transport layer
indicated that there was nothing for read(). Do we need to implement this?

(this is the most poorly worded question ever... maybe someone will
understand)

-Megan

.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: 1.B 1.C pulling my hair out!
Date: Sun, 26 Feb 2006 08:34:12 +0000 (UTC)
Lines: 30
Distribution: su
Message-ID: <dtrp64$jh0$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10385

Hi,

I am getting the following errors from the test script, and I absolutely
have no idea how to go on.  Anyone has encounter these and is able to fix
it and move on, please share...I am ready to smash my laptop at this
point.

Test 1.B [out of 10]
Checks student Tx (server) against reference Rx (client).

Results:  NOT OK

Unexpected exit status -1.  Program output:
***Timeout expired during grading
Program output:

----------------------------------------------------------------------

Test 1.C [out of 10]
Checks reference Tx (server) against student Rx (client).

Results:  NOT OK

Unexpected exit status -1.  Program output:
***Timeout expired during grading
Program output:


thanks,
Sam
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw3a requirements
Date: Sun, 26 Feb 2006 00:52:06 -0800
Lines: 16
Distribution: su
Message-ID: <dtrq7n$kep$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10386

I'm passing the tests but I'm still unsure of some of the requirements.

1)We don't need to handle connecting to an unavailable host right? E.g. 
if I start the client with an invalid port number right now the client 
just hangs (waiting for a syn/ack for the initial syn).

2)Do we need to deal with changing advertised window sizes for part A? 
(Presumably the test script reference models don't do this.)

3)Are the style points going to be more lax for part A? I have some of 
the features for part B only half-way implemented, so right now code is 
executed that doesn't really do anything. Some data structures are 
written to but never read from, etc.

Thanks in advance,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Warning: unable to close filehandle KID_TO_READ properly
Date: Sun, 26 Feb 2006 01:04:28 -0800
Lines: 8
Distribution: su
Message-ID: <dtrqvc$ks0$1@news.Stanford.EDU>
References: <dtr25g$roq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtr25g$roq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10387

Forum Mangal Parmar wrote:
> wht does this warning mean?
> is it safe to ignore it?
> 
> 
> 

Something the test script does, you can ignore it.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Does 536-byte max packet size include header?
Date: Sun, 26 Feb 2006 01:05:54 -0800
Lines: 11
Distribution: su
Message-ID: <dtrr21$ks0$2@news.Stanford.EDU>
References: <dtr5lf$18r$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtr5lf$18r$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10388

Daniel Holbert wrote:
>  From assignment description:
> "An STCP packet has a maximum size of 536 bytes."
> 
> Does this value take the header into account, or does it only consider 
> the amount of non-header data sent in a packet?
> 
> Thanks,
> ~Daniel

No it only means payload is 536 bytes.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: fin handshake
Date: Sun, 26 Feb 2006 01:12:08 -0800
Lines: 22
Distribution: su
Message-ID: <dtrrdp$l8i$1@news.Stanford.EDU>
References: <dtri80$b5n$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtri80$b5n$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10389

Samantha Kwan Chan wrote:
> Is the following a valid fin handshake from the point of view of the client?
> 
> ^^Send: flags 0x1 seq 843 len 0 ack 307859 dst 3072 src 3072
> ^^Recv: flags 0x10 seq 307859 len 0 ack 844 dst 3072 src 3072
> ^^Recv: flags 0x1 seq 307860 len 0 ack 844 dst 3072 src 3072
> ^^Send: flags 0x10 seq 844 len 0 ack 307861 dst 3072 src 3072
> 
> I got the following error...so please let me know if that is a legit handshake.
> 
> Test 1.I [out of 5]
> Checks that FIN is correctly ACKed.
> 
> Results:  NOT OK
> 
> No ACK for FIN with sequence number 332
> 
> thanks,
> Sam

Looks right to me, but for some reason the script thinks there's a FIN 
with seq 332 which doesn't match your output...
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Sun, 26 Feb 2006 01:34:23 -0800
Lines: 30
Distribution: su
Message-ID: <dtrsng$m8c$1@news.Stanford.EDU>
References: <dtrq7n$kep$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtrq7n$kep$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10390

Will Palmeri wrote:
> I'm passing the tests but I'm still unsure of some of the requirements.
> 
> 1)We don't need to handle connecting to an unavailable host right? E.g. 
> if I start the client with an invalid port number right now the client 
> just hangs (waiting for a syn/ack for the initial syn).

Correct, don't need to handle this for milestone A.

> 
> 2)Do we need to deal with changing advertised window sizes for part A? 
> (Presumably the test script reference models don't do this.)

Nope, not needed.  In fact I think you can get away with not doing this 
for the whole assignment 3, but you'll definately need it in assignment 
4, so might as well do it correctly here.

> 
> 3)Are the style points going to be more lax for part A? I have some of 
> the features for part B only half-way implemented, so right now code is 
> executed that doesn't really do anything. Some data structures are 
> written to but never read from, etc.

We're going to grade style for milestone C only... so you can make your 
code as terrible as you want with expletives for variable names and 
comments insulting the TAs and get full credit.

> 
> Thanks in advance,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: zero byte transfers
Date: Sun, 26 Feb 2006 01:39:59 -0800
Lines: 18
Distribution: su
Message-ID: <dtrt20$meh$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602260007480.12241-100000@saga13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602260007480.12241-100000@saga13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10391

Megan Anneke Wachs wrote:
> I'm not quite sure about this corner case, which would come up if you
> requested a zero byte file. I still
> don't really understand how calls to read() can ever return 0 bytes
> until a FIN is sent, but it seems that in HW1 it often returned 0 when
> there was just no data to read, meaning that somehow the transport layer
> indicated that there was nothing for read(). Do we need to implement this?
> 
> (this is the most poorly worded question ever... maybe someone will
> understand)

No... that shouldn't have happened in HW 1, if you call read() you block 
until some data is received or the connection closed.  You don't need to 
tell the app if there is no data to read.

> 
> -Megan
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test 1.C and 1.J
Date: Sun, 26 Feb 2006 02:26:19 -0800
Lines: 31
Distribution: su
Message-ID: <dtrvoc$okg$1@news.Stanford.EDU>
References: <dtr5ib$19j$1@news.Stanford.EDU> <dtrab6$509$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10392

hey thanks for tht Stefan but I guess thts not the problem

Using my client and server, I chked the md5 hash of the file trasfered and 
the original file (1.28 MB) and they are the same which means that the file 
is transfered correctly.

any other reasons why its not working with the ttest script??

"Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
news:dtrab6$509$1@news.Stanford.EDU...
>
> This might not be what going on but I hope it helps..
>
> The test script tests for differences by computing a hash value for the
> file which was sent across your link (think of it as a very good 
> checksum).
>
> It is possible to send the right about of data but have the data slightly
> garbled or somehow incorrect.  For example, I was failing this test 
> because
> of a bug where I occasionally copied from an incorrect offset in my data 
> queue
> which had the effect of repeating a few characters of data every 5k or so.
>
> For me, the file was the right size, the acks were correct but I failed 
> those
> tests because the hash they use reveals the fact that the file was 
> corrupted
> by my protocol. 


.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert@NOSPAM.stanford.edu>
Newsgroups: su.class.cs244a
Subject: stcp_network_send return value
Date: Sun, 26 Feb 2006 10:49:48 -0800
Lines: 12
Distribution: su
Message-ID: <dtst8g$l4e$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10393

If I call
stcp_network_send(sd, src, src_len, NULL)
can I assume that any return value other than "src_len" is an error 
condition?

Or is it possible that this function would only send part of the "src" 
data that we give it? (And if so, what's the proper behavior? It seems 
like bad stuff would happen if I split one TCP packet across multiple IP 
packets.)

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 1.B 1.C pulling my hair out!
Date: Sun, 26 Feb 2006 11:16:50 -0800
Lines: 37
Distribution: su
Message-ID: <dtsur8$mcu$1@news.Stanford.EDU>
References: <dtrp64$jh0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtrp64$jh0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10394

Your program might be hanging because the other side is dropping your 
packet.  That might happen because some sequence number (possibly the 
ACK) is set improperly.  Did you remember to fill in the function that 
sets your initial sequence number randomly?  The reference client/server 
does this, so you need to be able to handle it.

Samantha Kwan Chan wrote:
> Hi,
> 
> I am getting the following errors from the test script, and I absolutely
> have no idea how to go on.  Anyone has encounter these and is able to fix
> it and move on, please share...I am ready to smash my laptop at this
> point.
> 
> Test 1.B [out of 10]
> Checks student Tx (server) against reference Rx (client).
> 
> Results:  NOT OK
> 
> Unexpected exit status -1.  Program output:
> ***Timeout expired during grading
> Program output:
> 
> ----------------------------------------------------------------------
> 
> Test 1.C [out of 10]
> Checks reference Tx (server) against student Rx (client).
> 
> Results:  NOT OK
> 
> Unexpected exit status -1.  Program output:
> ***Timeout expired during grading
> Program output:
> 
> 
> thanks,
> Sam
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: FIN sequence number
Date: Sun, 26 Feb 2006 11:23:21 -0800
Lines: 8
Distribution: su
Message-ID: <dtsv7k$mkm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10395

Sorry if this question has been asked before, but I'm still unclear 
about a segment that contains both a payload and has the FIN flag set. 
Let's say the seq# is 200 and the payload size is 10. Does the fact that 
FIN takes up on byte in the sequence space make the next sequence number 
to send 211? Asked differently, does the other side ACK this whole 
segment with ack# 211 (counting the FIN as one byte) or 210?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FIN sequence number
Date: Sun, 26 Feb 2006 11:45:11 -0800
Lines: 13
Distribution: su
Message-ID: <dtt0gh$ndd$1@news.Stanford.EDU>
References: <dtsv7k$mkm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dtsv7k$mkm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10396

Sure enough, I found the answer under the post with subject "ACK number 
for FIN packet with data".


Naeim Semsarilar wrote:
> Sorry if this question has been asked before, but I'm still unclear 
> about a segment that contains both a payload and has the FIN flag set. 
> Let's say the seq# is 200 and the payload size is 10. Does the fact that 
> FIN takes up on byte in the sequence space make the next sequence number 
> to send 211? Asked differently, does the other side ACK this whole 
> segment with ack# 211 (counting the FIN as one byte) or 210?
> 
> Thanks.
.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine2.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: stcp_echo_server, stcp_echo_client
Date: Sun, 26 Feb 2006 11:49:50 -0800
Lines: 134
Distribution: su
Message-ID: <Pine.GSO.4.44.0602261143110.1573-100000@elaine2.Stanford.EDU>
References: <Pine.GSO.4.44.0602252020190.7728-100000@elaine2.Stanford.EDU>
 <Pine.LNX.4.44.0602252027430.3353-100000@myth15.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.LNX.4.44.0602252027430.3353-100000@myth15.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10397


TA's: Any answers on this?

Basically, I need to debug the problems in 1.B and 1.C that have come
up before on the newgroup.  I've tried using logfiles but they look good
to me.

This is my test output:

1.b
------------------
Starting server:
/afs/ir.stanford.edu/users/p/t/ptrlee/cs244a/stcp.a/grading_src
/build/server  -p
/afs/ir.stanford.edu/users/p/t/ptrlee/cs244a/stcp.a/grading_sr
c/build/.server_port 2>&1 >
/afs/ir.stanford.edu/users/p/t/ptrlee/cs244a/stcp.a/
grading_src/build/.server_output
Server started
Starting client: /usr/class/cs244a/grading_script/hw3/client  -p
..server_port -f  TESTDATA.0 foo
logfile is /tmp/ptrlee_h0aqgE
connected to 171.64.15.67 at port 57902
client: TESTDATA.0
client: ESTDATA.0
warning:  client exited with non-zero status (65280)
program output:
server: TESTDATA.0,110230,Ok
Exiting: read bad number of bytes (110230 less than expected)...

1.c
-------------------
Starting server: /usr/class/cs244a/grading_script/hw3/server_no_retrans
-p /afs
/ir.stanford.edu/users/p/t/ptrlee/cs244a/stcp.a/grading_src/build/.server_port
2 >&1 >
/afs/ir.stanford.edu/users/p/t/ptrlee/cs244a/stcp.a/grading_src/build/.ser
ver_output
Server started
Starting client: ./client  -p .server_port -f TESTDATA.0 foo
connected to 171.64.15.67 at port 57904
client: TESTDATA.0
warning:  client exited with non-zero status (-1)
program output:
***Timeout expired during grading
Program output:
logfile is /tmp/ptrlee_rza4sE
server: TESTDATA.0,110230,Ok

1.d
-------------------
Test 1.D [out of 2.5]
Checks that Tx doesn't overflow receiver window.

Results:  NOT OK

Sender window not enforced
(8944 bytes were outstanding, but the window size is 3072 bytes)


I'm thinking I've probably misinterpreted the way ack numbering works
somewhere along the line (although I pass the other tests)

From previous year's newsgroups, it sounds like a good way to debug is to
look at reference tcp implementations.  Do you have any suggestions on how
to do this?

Last year's ng suggested looking at the tcpdump of our ./sr
implementations, but I can't connect to the vns.  (vns-1 is down, and
vns-2 blocks my topology, even though the summary page doesn't show me as
connected)  If you have other suggestions on how to debug, that would be
great.

Debugging is pretty darn hard when you can't reproduce the error cases!

Thanks,
Peter





On Sat, 25 Feb 2006, Peter In Lee wrote:

> Actually, could there be some bad hoodoo going on with the vns servers?  I
> tried running the sr project again:
>
> elaine2:~/cs244a/router> ./sr -s vns-1.stanford.edu -t 20
> Loading routing table
> ---------------------------------------------
> Destination     Gateway         Mask    Iface
> 192.168.130.9           192.168.130.9   255.255.255.255 eth2
> 192.168.130.7           192.168.130.7   255.255.255.255 eth1
> 0.0.0.0         172.24.74.17    0.0.0.0 eth0
> ---------------------------------------------
> Client ptrlee connecting to Server vns-1.stanford.edu:12345
> Requesting topology 20
> connect(..):sr_client.c::sr_connect_to_server(..): Connection refused
>
> and vns-2 gives me:
>
> Client ptrlee connecting to Server vns-2.stanford.edu:12345
> Requesting topology 20
> VNS server closed session.
> Reason: reservehost failed
>  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
>  Make sure you are using the right topology
>       ./sr -t <topoid>
>
>  You can also check that another router isn't already
>  on your topology at: http://vns-1.stanford.edu/summary
>  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
>
> --Peter
>
>
> On Sat, 25 Feb 2006, Peter In Lee wrote:
>
> > It sounds like stcp_echo_client/stcp_echo_server are useful for debugging.
> >
> > (I'm specifically working on the failed tests 1.B and 1.C, which look fine
> > from the packet logs, but timeout during test runs with errors similar
> > to ones reported previously on this newsgroup)
> >
> > Does anyone know the syntax for running these programs?  Or could you
> > point me to where it's discussed in the assignments/newsgroup?
> >
> > Thanks,
> > Peter
> >
> >
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Assertion failure in test script 1.C ( inside stcp_network_recv())
Date: Sun, 26 Feb 2006 13:31:46 -0800
Lines: 31
Distribution: su
Message-ID: <C0275E42.35B9%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Assertion failure in test script 1.C ( inside
 stcp_network_recv())
Thread-Index: AcY7HAs4SaUVAKcPEdq9GgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10398

Hi.

In the test script 1.C, I get the following  error:

Unexpected exit status 6.  Program output:
Assertion failed: len <= 0 ||
_mysock_verify_checksum(_mysock_get_context(sd), dst, len), file stcp_api.c,
line 166


I only call stcp_netowrk_recv inside (event & NETWORK_DATA) code segment so
that means there is definitely data there and len<=0 is not causing the
assertion failure.  I also malloc a buffer before I pass it to the
stcp_network_recv function as follows:

    void* buf = (void*) malloc(MAX_STCP_PACKET_LEN);
    assert(buf);

    bytes_rcvd = stcp_network_recv(sd,buf,MAX_STCP_PACKET_LEN);
    assert(bytes_rcvd>0);


Cant figure out why the test script fails inside stcp_api.c, line 166,
though all of my tests work just fine.

If you have seen this or if you have any p;ointers, I would aprpeciate the
help.

Thanks in advance.
Sunny.

.

Path: shelby.stanford.edu!elaine5.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: Assertion failure in test script 1.C ( inside stcp_network_recv())
Date: Sun, 26 Feb 2006 22:37:02 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 42
Distribution: su
Message-ID: <dttaie$3pg$1@news.Stanford.EDU>
References: <C0275E42.35B9%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10399

I've seen something like that in my server when my client crashed.
Hope your issue is the same.

Good luck,

Oleg.

In article <C0275E42.35B9%sunnybalwani@hotmail.com>,
Sunny Balwani  <sunnybalwani@hotmail.com> wrote:
>Hi.
>
>In the test script 1.C, I get the following  error:
>
>Unexpected exit status 6.  Program output:
>Assertion failed: len <= 0 ||
>_mysock_verify_checksum(_mysock_get_context(sd), dst, len), file stcp_api.c,
>line 166
>
>
>I only call stcp_netowrk_recv inside (event & NETWORK_DATA) code segment so
>that means there is definitely data there and len<=0 is not causing the
>assertion failure.  I also malloc a buffer before I pass it to the
>stcp_network_recv function as follows:
>
>    void* buf = (void*) malloc(MAX_STCP_PACKET_LEN);
>    assert(buf);
>
>    bytes_rcvd = stcp_network_recv(sd,buf,MAX_STCP_PACKET_LEN);
>    assert(bytes_rcvd>0);
>
>
>Cant figure out why the test script fails inside stcp_api.c, line 166,
>though all of my tests work just fine.
>
>If you have seen this or if you have any p;ointers, I would aprpeciate the
>help.
>
>Thanks in advance.
>Sunny.
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: sending data in SYN_RCVD state?
Date: Sun, 26 Feb 2006 14:46:55 -0800
Lines: 11
Distribution: su
Message-ID: <dttb51$4er$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10400

Just wanted to confirm: is it possible for the server to start sending out 
data in the SYN_RCVD state?

I was considering this case because then, the client's responses will 
contain a higher ACK number than the server's initial sequence number plus 
one. So the server will not be able to decide when to get out of the 
SYN_RCVD state.

Tahir. 


.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sending data in SYN_RCVD state?
Date: Sun, 26 Feb 2006 15:16:41 -0800
Lines: 22
Distribution: su
Message-ID: <dttcst$6f4$1@news.Stanford.EDU>
References: <dttb51$4er$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10401

Also, what if the ACK sent by the client as the third step of the handshake 
contains something other than server's initial sequence number plus one? Do 
we need to close the connection with an error in this case, or just ignore 
the packet? In fact, if the ACK is greater than lastByteSent+1 or less than 
initial sequence number, is it ok to just ignore the packet?

Tahir.

"Tahir Azim" <tazim@stanford.edu> wrote in message 
news:dttb51$4er$1@news.Stanford.EDU...
> Just wanted to confirm: is it possible for the server to start sending out 
> data in the SYN_RCVD state?
>
> I was considering this case because then, the client's responses will 
> contain a higher ACK number than the server's initial sequence number plus 
> one. So the server will not be able to decide when to get out of the 
> SYN_RCVD state.
>
> Tahir.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <nospam@nospam.com>
Newsgroups: su.class.cs244a
Subject: stcp_wait_for_event - should we set APP_CLOSE_REQUESTED in flags?
Date: Sun, 26 Feb 2006 15:40:27 -0800
Lines: 13
Distribution: su
Message-ID: <dtte90$7mb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10402

In the stcp_wait_for_event implementation, it looks like it'll always 
return on an APP_CLOSE_REQUESTED event, regardless of whether we set 
this bit in our flags or not.

For style points, do we need to still explicitly set this bit in the 
flags when calling stcp_wait_for_event, or can we leave it out, since 
the bit seems to have no effect? (Intuitively, it seems like we'd 
*always* want to check for this event, so it seems a little silly to 
explicitly say it every time... and I'm figuring that's why the 
implementation always checks for this event regardless of the flags.)

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Sun, 26 Feb 2006 16:03:12 -0800
Lines: 39
Distribution: su
Message-ID: <dttfk4$8uo$1@news.Stanford.EDU>
References: <dtrq7n$kep$1@news.Stanford.EDU> <dtrsng$m8c$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10403

Matt,
I quite appreciate your humor on answer 3.  It gave me a burst of energy. 
;-)
cheers, Bruce

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dtrsng$m8c$1@news.Stanford.EDU...
> Will Palmeri wrote:
>> I'm passing the tests but I'm still unsure of some of the requirements.
>>
>> 1)We don't need to handle connecting to an unavailable host right? E.g. 
>> if I start the client with an invalid port number right now the client 
>> just hangs (waiting for a syn/ack for the initial syn).
>
> Correct, don't need to handle this for milestone A.
>
>>
>> 2)Do we need to deal with changing advertised window sizes for part A? 
>> (Presumably the test script reference models don't do this.)
>
> Nope, not needed.  In fact I think you can get away with not doing this 
> for the whole assignment 3, but you'll definately need it in assignment 4, 
> so might as well do it correctly here.
>
>>
>> 3)Are the style points going to be more lax for part A? I have some of 
>> the features for part B only half-way implemented, so right now code is 
>> executed that doesn't really do anything. Some data structures are 
>> written to but never read from, etc.
>
> We're going to grade style for milestone C only... so you can make your 
> code as terrible as you want with expletives for variable names and 
> comments insulting the TAs and get full credit.
>
>>
>> Thanks in advance,
>> Will 


.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Testing 3-way handshake on a web server
Date: Sun, 26 Feb 2006 16:08:10 -0800
Lines: 39
Distribution: su
Message-ID: <C02782EA.2CAB%jpettit@stanford.edu>
References: <dtp9gf$ab0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Testing 3-way handshake on a web server
Thread-Index: AcY7MeSFIxVa9qclEdqaEgARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10404

As Stefan wrote you back on your previous query, this won't work.  When you
connect to an outside server, the provided code will setup a regular TCP
connection to your destination host and try to speak the VNS protocol (as
described in assignment #2).  The VNS protocol carries your STCP packets
over it.  Since the web server doesn't speak VNS on port 80, you don't get a
response.

--Justin


On 2/25/06 1:54 AM, in article dtp9gf$ab0$1@news.Stanford.EDU, "Hector Chan"
<chanhp@Stanford.EDU> wrote:

> Hi,
> 
> I was trying to connect to www.stanford.edu:80 using the provided client.
> After I sent the first SYN, I never got back a SYN+ACK back from
> www.stanford.edu.
> 
>    SYN:
>       tcp_segment.th_seq   = 0
>       tcp_segment.th_ack   = 0
>       tcp_segment.th_off   = 5
>       tcp_segment.th_flags = TH_SYN
>       tcp_segment.th_win   = 3072 / 4
> 
>    stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr), 0);
>    event = stcp_wait_for_event(sd, NETWORK_DATA, 0);   /* Wait indefinitely */
> 
> Does anyone got a SYN+ACK back from www.stanford.edu:80 using the provided
> client?
> 
> 
> Thanks,
> 
> Hector



.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp_network_send return value
Date: Sun, 26 Feb 2006 16:56:27 -0800
Lines: 17
Distribution: su
Message-ID: <dttioc$bn0$1@news.Stanford.EDU>
References: <dtst8g$l4e$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtst8g$l4e$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10405

Daniel Holbert wrote:
> If I call
> stcp_network_send(sd, src, src_len, NULL)
> can I assume that any return value other than "src_len" is an error 
> condition?

Yeah, this is fine.  The code seems to ensure either everything 
requested is sent or an error occurs.

> 
> Or is it possible that this function would only send part of the "src" 
> data that we give it? (And if so, what's the proper behavior? It seems 
> like bad stuff would happen if I split one TCP packet across multiple IP 
> packets.)
> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sending data in SYN_RCVD state?
Date: Sun, 26 Feb 2006 17:11:18 -0800
Lines: 18
Distribution: su
Message-ID: <dttjk7$cfl$1@news.Stanford.EDU>
References: <dttb51$4er$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dttb51$4er$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10406

Tahir Azim wrote:
> Just wanted to confirm: is it possible for the server to start sending out 
> data in the SYN_RCVD state?
> 
> I was considering this case because then, the client's responses will 
> contain a higher ACK number than the server's initial sequence number plus 
> one. So the server will not be able to decide when to get out of the 
> SYN_RCVD state.

Remember that your ACK number means you received all sequence numbers 
before that.  So it's ok if the ACK is highest than ISS+1, as long as 
the sender actually did send up to that point.

> 
> Tahir. 
> 
> 

.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: Testing 3-way handshake on a web server
Date: Mon, 27 Feb 2006 01:13:07 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 36
Distribution: su
Message-ID: <dttjn3$ch0$1@news.Stanford.EDU>
References: <dtp9gf$ab0$1@news.Stanford.EDU> <C02782EA.2CAB%jpettit@stanford.edu>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10407

BTW, I just noticed something unrelated: I think th_win is supposed to be 
in bytes, not in words.

Oleg.

>On 2/25/06 1:54 AM, in article dtp9gf$ab0$1@news.Stanford.EDU, "Hector Chan"
><chanhp@Stanford.EDU> wrote:
>
>> Hi,
>> 
>> I was trying to connect to www.stanford.edu:80 using the provided client.
>> After I sent the first SYN, I never got back a SYN+ACK back from
>> www.stanford.edu.
>> 
>>    SYN:
>>       tcp_segment.th_seq   = 0
>>       tcp_segment.th_ack   = 0
>>       tcp_segment.th_off   = 5
>>       tcp_segment.th_flags = TH_SYN
>>       tcp_segment.th_win   = 3072 / 4
>> 
>>    stcp_network_send(sd, &tcp_segment, sizeof(struct tcphdr), 0);
>>    event = stcp_wait_for_event(sd, NETWORK_DATA, 0);   /* Wait indefinitely */
>> 
>> Does anyone got a SYN+ACK back from www.stanford.edu:80 using the provided
>> client?
>> 
>> 
>> Thanks,
>> 
>> Hector
>
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Julie Tung <jct@stanford.edu>
Newsgroups: su.class.cs244a
Subject: terminating the connection
Date: Sun, 26 Feb 2006 17:11:32 -0800
Lines: 14
Distribution: su
Message-ID: <dttjnq$c7n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10408

Hi,

I'm a little confused on how the connection termination works...

So the client can send an APP_CLOSE_REQUESTED when you hit ctrl-d, and 
it sends any pending data and then sends a FIN
How does the server know when to terminate?  In looking at server.c, it 
looks like it just loops forever and doesn't ever seek to close the 
socket. Is our server code (in transport.c) supposed to send a FIN 
packet once it receives a FIN packet from the client, even if it doesn't 
get an APP_CLOSE_REQUESTED event?

Thanks,
Julie
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp_wait_for_event - should we set APP_CLOSE_REQUESTED in flags?
Date: Sun, 26 Feb 2006 17:14:20 -0800
Lines: 19
Distribution: su
Message-ID: <dttjpt$cfl$2@news.Stanford.EDU>
References: <dtte90$7mb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtte90$7mb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10409

Daniel Holbert wrote:
> In the stcp_wait_for_event implementation, it looks like it'll always 
> return on an APP_CLOSE_REQUESTED event, regardless of whether we set 
> this bit in our flags or not.
> 
> For style points, do we need to still explicitly set this bit in the 
> flags when calling stcp_wait_for_event, or can we leave it out, since 
> the bit seems to have no effect? (Intuitively, it seems like we'd 
> *always* want to check for this event, so it seems a little silly to 
> explicitly say it every time... and I'm figuring that's why the 
> implementation always checks for this event regardless of the flags.)

I think it's best to explicitly set it.  Since it wasn't documented 
anywhere that the bit is ignored, if you don't set it you're relying on 
a quirk of the implementation.

> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: terminating the connection
Date: Sun, 26 Feb 2006 17:18:53 -0800
Lines: 21
Distribution: su
Message-ID: <dttk2f$cvh$1@news.Stanford.EDU>
References: <dttjnq$c7n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dttjnq$c7n$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10410

Julie Tung wrote:
> Hi,
> 
> I'm a little confused on how the connection termination works...
> 
> So the client can send an APP_CLOSE_REQUESTED when you hit ctrl-d, and 
> it sends any pending data and then sends a FIN
> How does the server know when to terminate?  In looking at server.c, it 
> looks like it just loops forever and doesn't ever seek to close the 
> socket. Is our server code (in transport.c) supposed to send a FIN 
> packet once it receives a FIN packet from the client, even if it doesn't 
> get an APP_CLOSE_REQUESTED event?
> 

It closes the socket for a single connection in do_connection.  Nothing 
interesting is going on here... you should only send a FIN after you've 
gotten an APP_CLOSE_REQUESTED.


> Thanks,
> Julie
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: expected behavior of the server
Date: Sun, 26 Feb 2006 17:28:47 -0800
Lines: 23
Distribution: su
Message-ID: <dttkkj$dde$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10411

My question is related to the previous post titled "terminating the 
connection."

I assume the server (the simple server.c given to us for testing) will never 
terminate unless we ctl-c, correct?  In other words, after the client has 
successfully downloaded the "rcvd" file, we do not expect the server to 
terminate automatically?

My server does not terminate after sending a file to the client.  But, on 
the other hand, if I restart the client and attempt a second download, it 
does not work unless I restart the server.  Should I be able to download 
multiple files from the server without restarting it?

I would think not, as I assume the server it starting up in the 
CSTATE_LISTEN state but after a file download it will be left in 
CSTATE_CLOSED.  Thus there is no way for it to get back to CSTATE_LISTEN 
without the server application opening the connecton again.  Is this logic 
correct?

Thanks,
-- Bruce 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: expected behavior of the server
Date: Sun, 26 Feb 2006 17:43:56 -0800
Lines: 39
Distribution: su
Message-ID: <dttlhd$e1h$1@news.Stanford.EDU>
References: <dttkkj$dde$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dttkkj$dde$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10412

Bruce Schechter wrote:
> My question is related to the previous post titled "terminating the 
> connection."
> 
> I assume the server (the simple server.c given to us for testing) will never 
> terminate unless we ctl-c, correct?  In other words, after the client has 
> successfully downloaded the "rcvd" file, we do not expect the server to 
> terminate automatically?

Correct.

> 
> My server does not terminate after sending a file to the client.  But, on 
> the other hand, if I restart the client and attempt a second download, it 
> does not work unless I restart the server.  Should I be able to download 
> multiple files from the server without restarting it?

This should work.

> 
> I would think not, as I assume the server it starting up in the 
> CSTATE_LISTEN state but after a file download it will be left in 
> CSTATE_CLOSED.  Thus there is no way for it to get back to CSTATE_LISTEN 
> without the server application opening the connecton again.  Is this logic 
> correct?

No, your code only deals with a single connection... when that 
connection is done, so is all your state for that connection.  When a 
new connection is to be initiated, transport_init will be called again.

I'm not sure why isn't working for you.  Are you exiting the client 
cleanly with Ctrl+D (if in interactive mode) and is the connection 
termination handshake happening?  Finally are you returning from 
transport_init after the connection is closed?
> 
> Thanks,
> -- Bruce 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: expected behavior of the server
Date: Sun, 26 Feb 2006 17:46:42 -0800
Lines: 40
Distribution: su
Message-ID: <C0279A02.2CB9%jpettit@stanford.edu>
References: <dttkkj$dde$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: expected behavior of the server
Thread-Index: AcY7P6hY5yGmhqcyEdqaEgARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10413

I am able to connect to the same server instance with different clients
without any problems and download multiple files.  However, if I connect
multiple clients to the server simultaneously, then all of them go through
the 3-way handshake, but only the first one transfers any data.  Once I
close the first client, then the second behaves just like it should and all
the data that had previously been sent is processed.  I think this is due to
the single-threaded nature of the server implementation.  If anyone has seen
different behavior, please let me know.

--Justin


On 2/26/06 5:28 PM, in article dttkkj$dde$1@news.Stanford.EDU, "Bruce
Schechter" <bruceds@stanford.edu> wrote:

> My question is related to the previous post titled "terminating the
> connection."
> 
> I assume the server (the simple server.c given to us for testing) will never
> terminate unless we ctl-c, correct?  In other words, after the client has
> successfully downloaded the "rcvd" file, we do not expect the server to
> terminate automatically?
> 
> My server does not terminate after sending a file to the client.  But, on
> the other hand, if I restart the client and attempt a second download, it
> does not work unless I restart the server.  Should I be able to download
> multiple files from the server without restarting it?
> 
> I would think not, as I assume the server it starting up in the
> CSTATE_LISTEN state but after a file download it will be left in
> CSTATE_CLOSED.  Thus there is no way for it to get back to CSTATE_LISTEN
> without the server application opening the connecton again.  Is this logic
> correct?
> 
> Thanks,
> -- Bruce 
> 
> 


.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine2.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: seq/ack arithmetic
Date: Sun, 26 Feb 2006 17:59:35 -0800
Lines: 76
Distribution: su
Message-ID: <Pine.GSO.4.44.0602261750330.15409-100000@elaine2.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10414

Hi,

So I get output (I'll paste below) indicating that the client is in the
established state, and sends a payload to the reference server of 12
bytes.  That packet has sequence num 145.

The ack back from the reference server however, is 157.  From last year's
newsgroup there was a post that said when responding to data
starting at seq x and with length z, the appropriate ack to send back is:

x + 1 + z

This would imply that the reference server should be sending back:

145 + 12 + 1 = 158

Could someone point out to me what I'm missing here?

-- Peter

PS: I think this is part of my hang problem -- the server is acking 157,
and I keep trying to send data with 158 (lastByteSent + 1).  So the server
keeps acking 157 because it hasn't got it yet, and everything gets gummed
up.

========================================
0: CSTATE_SYN_SENT to CSTATE_ESTABLISHED

0: Sent
----------------------------------------
th_sport = 0
th_dport = 0
th_seq = 145
th_ack = 114
th_off = 5
TH_FIN = 0
TH_SYN = 0
TH_RST = 0
TH_PUSH = 0
TH_ACK = 0
TH_URG = 0
th_win = 3072
th_sum = 0
th_urp = 0

with 12 bytes of data

Socket Summary:
----------------------------------------
lastByteAcked: 		145
lastByteSent: 		157
lastByteWritten: 	157

lastByteRead: 		113
nextByteExpected: 	114
lastByteRcvd: 		113


0: Received
----------------------------------------
th_sport = 58703
th_dport = 58704
th_seq = 114
th_ack = 157
th_off = 5
TH_FIN = 0
TH_SYN = 0
TH_RST = 0
TH_PUSH = 0
TH_ACK = 16
TH_URG = 0
th_win = 3072
th_sum = 25374
th_urp = 0


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Extra Test Allotment for Assignment 1?
Date: Sun, 26 Feb 2006 18:06:07 -0800
Organization: Stanford University
Lines: 4
Distribution: su
Message-ID: <20060226180607.1573bf2c@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10415

I used fdopen/stdio in my assignment 1, which I will have to fix before
porting that code to mysock.  Is it possible to get extra allotments to
test my assignment 1 code (against the normal assignment 1 test suite)
so I can test this independently?  Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: seq/ack arithmetic
Date: Sun, 26 Feb 2006 18:08:01 -0800
Lines: 87
Distribution: su
Message-ID: <dttmui$f9g$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602261750330.15409-100000@elaine2.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602261750330.15409-100000@elaine2.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10416

Peter In Lee wrote:
> Hi,
> 
> So I get output (I'll paste below) indicating that the client is in the
> established state, and sends a payload to the reference server of 12
> bytes.  That packet has sequence num 145.
> 
> The ack back from the reference server however, is 157.  From last year's
> newsgroup there was a post that said when responding to data
> starting at seq x and with length z, the appropriate ack to send back is:
> 
> x + 1 + z
> 
> This would imply that the reference server should be sending back:
> 
> 145 + 12 + 1 = 158

That's correct.

> 
> Could someone point out to me what I'm missing here?
> 
> -- Peter
> 
> PS: I think this is part of my hang problem -- the server is acking 157,
> and I keep trying to send data with 158 (lastByteSent + 1).  So the server
> keeps acking 157 because it hasn't got it yet, and everything gets gummed
> up.
> 
> ========================================
> 0: CSTATE_SYN_SENT to CSTATE_ESTABLISHED
> 
> 0: Sent
> ----------------------------------------
> th_sport = 0
> th_dport = 0
> th_seq = 145
> th_ack = 114
> th_off = 5
> TH_FIN = 0
> TH_SYN = 0
> TH_RST = 0
> TH_PUSH = 0
> TH_ACK = 0
> TH_URG = 0
> th_win = 3072
> th_sum = 0
> th_urp = 0
> 
> with 12 bytes of data

This is likely not your problem, but you should set flag TH_ACK up there.

> 
> Socket Summary:
> ----------------------------------------
> lastByteAcked: 		145
> lastByteSent: 		157
> lastByteWritten: 	157
> 
> lastByteRead: 		113
> nextByteExpected: 	114
> lastByteRcvd: 		113
> 
> 
> 0: Received
> ----------------------------------------
> th_sport = 58703
> th_dport = 58704
> th_seq = 114
> th_ack = 157
> th_off = 5
> TH_FIN = 0
> TH_SYN = 0
> TH_RST = 0
> TH_PUSH = 0
> TH_ACK = 16
> TH_URG = 0
> th_win = 3072
> th_sum = 25374
> th_urp = 0
> 
> 

Why is it displaying TH_ACK 16?  Are you sure you're processing flags 
correctly?

.

Path: shelby.stanford.edu!elaine2.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine2.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: seq/ack arithmetic
Date: Sun, 26 Feb 2006 18:25:01 -0800
Lines: 136
Distribution: su
Message-ID: <Pine.GSO.4.44.0602261818060.16349-100000@elaine2.Stanford.EDU>
References: <Pine.GSO.4.44.0602261750330.15409-100000@elaine2.Stanford.EDU>
 <dttmui$f9g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dttmui$f9g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10417

Hi Matt,

Thanks for the reply; I'll respond inline below:

On Sun, 26 Feb 2006, Matt Falkenhagen wrote:

> Peter In Lee wrote:
> > Hi,
> >
> > So I get output (I'll paste below) indicating that the client is in the
> > established state, and sends a payload to the reference server of 12
> > bytes.  That packet has sequence num 145.
> >
> > The ack back from the reference server however, is 157.  From last year's
> > newsgroup there was a post that said when responding to data
> > starting at seq x and with length z, the appropriate ack to send back is:
> >
> > x + 1 + z
> >
> > This would imply that the reference server should be sending back:
> >
> > 145 + 12 + 1 = 158
>
> That's correct.

I actually just spoke with another student with a working
implementation and they said 157 would be the correct ack number.
145 is the initial seq num, so passing 12 bytes maps out to:

1:  145
2:  146
3:  147
4:  148
5:  149
6:  150
7:  151
8:  152
9:  153
10: 154
11: 155
12: 156

+1 for next byte expected = 157

This explanation actually makes quite a bit of sense to me.  However, with
1 test pass left for today, I'd like to be more confident before I roll
the dice!  (debugging off-by-one errors through a short-lived black box is
nerve-wracking -- still no word on the vns servers?)

So what do you think?  Should it be 158 or 157?

>
> >
> > Could someone point out to me what I'm missing here?
> >
> > -- Peter
> >
> > PS: I think this is part of my hang problem -- the server is acking 157,
> > and I keep trying to send data with 158 (lastByteSent + 1).  So the server
> > keeps acking 157 because it hasn't got it yet, and everything gets gummed
> > up.
> >
> > ========================================
> > 0: CSTATE_SYN_SENT to CSTATE_ESTABLISHED
> >
> > 0: Sent
> > ----------------------------------------
> > th_sport = 0
> > th_dport = 0
> > th_seq = 145
> > th_ack = 114
> > th_off = 5
> > TH_FIN = 0
> > TH_SYN = 0
> > TH_RST = 0
> > TH_PUSH = 0
> > TH_ACK = 0
> > TH_URG = 0
> > th_win = 3072
> > th_sum = 0
> > th_urp = 0
> >
> > with 12 bytes of data
>
> This is likely not your problem, but you should set flag TH_ACK up there.
>

Okay, so anywhere I send an ACK number (for this assign, that's whenever I
can) I should set the ACK flag?

> >
> > Socket Summary:
> > ----------------------------------------
> > lastByteAcked: 		145
> > lastByteSent: 		157
> > lastByteWritten: 	157
> >
> > lastByteRead: 		113
> > nextByteExpected: 	114
> > lastByteRcvd: 		113
> >
> >
> > 0: Received
> > ----------------------------------------
> > th_sport = 58703
> > th_dport = 58704
> > th_seq = 114
> > th_ack = 157
> > th_off = 5
> > TH_FIN = 0
> > TH_SYN = 0
> > TH_RST = 0
> > TH_PUSH = 0
> > TH_ACK = 16
> > TH_URG = 0
> > th_win = 3072
> > th_sum = 25374
> > th_urp = 0
> >
> >
>
> Why is it displaying TH_ACK 16?  Are you sure you're processing flags
> correctly?
>
>

I just our_dprintf as %d the TH_ACK & packet->th_flags so I guess since
TH_ACK is 0x10 that translates to printing a 16 to the screen.  Sorry for
the confusion.

Thanks a lot for your reply, and if you could clarify the 157/158 question
above, or have any other suggestions for debugging, that would be great.

Thanks,
Peter

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: seq/ack arithmetic
Date: Sun, 26 Feb 2006 18:31:06 -0800
Lines: 150
Distribution: su
Message-ID: <dtto9s$gnj$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602261750330.15409-100000@elaine2.Stanford.EDU> <dttmui$f9g$1@news.Stanford.EDU> <Pine.GSO.4.44.0602261818060.16349-100000@elaine2.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602261818060.16349-100000@elaine2.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10418

Peter In Lee wrote:
> Hi Matt,
> 
> Thanks for the reply; I'll respond inline below:
> 
> On Sun, 26 Feb 2006, Matt Falkenhagen wrote:
> 
> 
>>Peter In Lee wrote:
>>
>>>Hi,
>>>
>>>So I get output (I'll paste below) indicating that the client is in the
>>>established state, and sends a payload to the reference server of 12
>>>bytes.  That packet has sequence num 145.
>>>
>>>The ack back from the reference server however, is 157.  From last year's
>>>newsgroup there was a post that said when responding to data
>>>starting at seq x and with length z, the appropriate ack to send back is:
>>>
>>>x + 1 + z
>>>
>>>This would imply that the reference server should be sending back:
>>>
>>>145 + 12 + 1 = 158
>>
>>That's correct.
> 
> 
> I actually just spoke with another student with a working
> implementation and they said 157 would be the correct ack number.
> 145 is the initial seq num, so passing 12 bytes maps out to:
> 
> 1:  145
> 2:  146
> 3:  147
> 4:  148
> 5:  149
> 6:  150
> 7:  151
> 8:  152
> 9:  153
> 10: 154
> 11: 155
> 12: 156
> 
> +1 for next byte expected = 157
> 
> This explanation actually makes quite a bit of sense to me.  However, with
> 1 test pass left for today, I'd like to be more confident before I roll
> the dice!  (debugging off-by-one errors through a short-lived black box is
> nerve-wracking -- still no word on the vns servers?)
> 
> So what do you think?  Should it be 158 or 157?

Oops, yeah.  That's right.  157.

> 
> 
>>>Could someone point out to me what I'm missing here?
>>>
>>>-- Peter
>>>
>>>PS: I think this is part of my hang problem -- the server is acking 157,
>>>and I keep trying to send data with 158 (lastByteSent + 1).  So the server
>>>keeps acking 157 because it hasn't got it yet, and everything gets gummed
>>>up.
>>>
>>>========================================
>>>0: CSTATE_SYN_SENT to CSTATE_ESTABLISHED
>>>
>>>0: Sent
>>>----------------------------------------
>>>th_sport = 0
>>>th_dport = 0
>>>th_seq = 145
>>>th_ack = 114
>>>th_off = 5
>>>TH_FIN = 0
>>>TH_SYN = 0
>>>TH_RST = 0
>>>TH_PUSH = 0
>>>TH_ACK = 0
>>>TH_URG = 0
>>>th_win = 3072
>>>th_sum = 0
>>>th_urp = 0
>>>
>>>with 12 bytes of data
>>
>>This is likely not your problem, but you should set flag TH_ACK up there.
>>
> 
> 
> Okay, so anywhere I send an ACK number (for this assign, that's whenever I
> can) I should set the ACK flag?

Yes, the ACK flag tells the receiver that the ACK number has been set.

> 
> 
>>>Socket Summary:
>>>----------------------------------------
>>>lastByteAcked: 		145
>>>lastByteSent: 		157
>>>lastByteWritten: 	157
>>>
>>>lastByteRead: 		113
>>>nextByteExpected: 	114
>>>lastByteRcvd: 		113
>>>
>>>
>>>0: Received
>>>----------------------------------------
>>>th_sport = 58703
>>>th_dport = 58704
>>>th_seq = 114
>>>th_ack = 157
>>>th_off = 5
>>>TH_FIN = 0
>>>TH_SYN = 0
>>>TH_RST = 0
>>>TH_PUSH = 0
>>>TH_ACK = 16
>>>TH_URG = 0
>>>th_win = 3072
>>>th_sum = 25374
>>>th_urp = 0
>>>
>>>
>>
>>Why is it displaying TH_ACK 16?  Are you sure you're processing flags
>>correctly?
>>
>>
> 
> 
> I just our_dprintf as %d the TH_ACK & packet->th_flags so I guess since
> TH_ACK is 0x10 that translates to printing a 16 to the screen.  Sorry for
> the confusion.

oic, cool.

> 
> Thanks a lot for your reply, and if you could clarify the 157/158 question
> above, or have any other suggestions for debugging, that would be great.
> 
> Thanks,
> Peter
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: expected behavior of the server
Date: Sun, 26 Feb 2006 19:07:34 -0800
Lines: 45
Distribution: su
Message-ID: <dttqdm$ict$1@news.Stanford.EDU>
References: <dttkkj$dde$1@news.Stanford.EDU> <C0279A02.2CB9%jpettit@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <C0279A02.2CB9%jpettit@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10419

I'm seeing something similar. I guess the server isn't threaded that well.

-Will

Justin Pettit wrote:
> I am able to connect to the same server instance with different clients
> without any problems and download multiple files.  However, if I connect
> multiple clients to the server simultaneously, then all of them go through
> the 3-way handshake, but only the first one transfers any data.  Once I
> close the first client, then the second behaves just like it should and all
> the data that had previously been sent is processed.  I think this is due to
> the single-threaded nature of the server implementation.  If anyone has seen
> different behavior, please let me know.
> 
> --Justin
> 
> 
> On 2/26/06 5:28 PM, in article dttkkj$dde$1@news.Stanford.EDU, "Bruce
> Schechter" <bruceds@stanford.edu> wrote:
> 
>> My question is related to the previous post titled "terminating the
>> connection."
>>
>> I assume the server (the simple server.c given to us for testing) will never
>> terminate unless we ctl-c, correct?  In other words, after the client has
>> successfully downloaded the "rcvd" file, we do not expect the server to
>> terminate automatically?
>>
>> My server does not terminate after sending a file to the client.  But, on
>> the other hand, if I restart the client and attempt a second download, it
>> does not work unless I restart the server.  Should I be able to download
>> multiple files from the server without restarting it?
>>
>> I would think not, as I assume the server it starting up in the
>> CSTATE_LISTEN state but after a file download it will be left in
>> CSTATE_CLOSED.  Thus there is no way for it to get back to CSTATE_LISTEN
>> without the server application opening the connecton again.  Is this logic
>> correct?
>>
>> Thanks,
>> -- Bruce 
>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: time.h and struct timespec
Date: Sun, 26 Feb 2006 19:18:39 -0800
Lines: 23
Distribution: su
Message-ID: <dttr40$j1t$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10420

So, we're supposed to use these timespec structs when stcp_wait_for_event 
how long to wait.  Thats fine and all, but for some reason I couldn't get 
the following code to compile:

clock_gettime(CLOCK_REALTIME, myTimespec);

Which I'm trying to use to get the current time.  From the elaines, I can 
'man clock_gettime' and it shows the manpage, but the compiler can't seem to 
find the method.

So, I looked it up on sun's site 
http://docs.sun.com/app/docs/doc/816-0216/6m6ngupgn?a=view and found that 
you need to link against the rt library.  I'm no makefile hacker, but I 
changed the line
LIBS=$(ENVLIBS)

to
LIBS=$(ENVLIBS) -lrt

and it compiles, and (supposedly :) runs.  Just thought I'd save someone 
else the hour of frustration that I went through.  Enjoy!


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assignment 3: how to handle malloc failures
Date: Sun, 26 Feb 2006 19:55:52 -0800
Lines: 16
Distribution: su
Message-ID: <dttt89$knu$1@news.Stanford.EDU>
References: <dtqr4i$lti$1@news.Stanford.EDU> <dtqrfj$m3p$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dtqrfj$m3p$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10421

Same for stcp_network_send()?

Thanks!
--Michi

Matt Falkenhagen wrote:
> Daniel Holbert wrote:
>> How should we handle malloc returning null within assignment 3?  In 
>> previous assignments we could immediately quit with an appropriate error 
>> message. Is that still acceptable?
> 
> There might be problems with that because it's not a standalone program. 
>   It would be best to return cleanly from transport_init.
> 
>> Thanks,
>> ~Daniel
.

Path: shelby.stanford.edu!saga6.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Sun, 26 Feb 2006 21:31:30 -0800
Lines: 51
Distribution: su
Message-ID: <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU>
References: <dtrq7n$kep$1@news.Stanford.EDU> <dtrsng$m8c$1@news.Stanford.EDU>
 <dttfk4$8uo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dttfk4$8uo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10422


are we required to submit a README for this portion of the submission
(hw3a)?


thanks,
Vijay.

On Sun, 26 Feb 2006, Bruce Schechter wrote:

> Matt,
> I quite appreciate your humor on answer 3.  It gave me a burst of energy.
> ;-)
> cheers, Bruce
>
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> news:dtrsng$m8c$1@news.Stanford.EDU...
> > Will Palmeri wrote:
> >> I'm passing the tests but I'm still unsure of some of the requirements.
> >>
> >> 1)We don't need to handle connecting to an unavailable host right? E.g.
> >> if I start the client with an invalid port number right now the client
> >> just hangs (waiting for a syn/ack for the initial syn).
> >
> > Correct, don't need to handle this for milestone A.
> >
> >>
> >> 2)Do we need to deal with changing advertised window sizes for part A?
> >> (Presumably the test script reference models don't do this.)
> >
> > Nope, not needed.  In fact I think you can get away with not doing this
> > for the whole assignment 3, but you'll definately need it in assignment 4,
> > so might as well do it correctly here.
> >
> >>
> >> 3)Are the style points going to be more lax for part A? I have some of
> >> the features for part B only half-way implemented, so right now code is
> >> executed that doesn't really do anything. Some data structures are
> >> written to but never read from, etc.
> >
> > We're going to grade style for milestone C only... so you can make your
> > code as terrible as you want with expletives for variable names and
> > comments insulting the TAs and get full credit.
> >
> >>
> >> Thanks in advance,
> >> Will
>
>
>

.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Grading script issue for sending data
Date: Sun, 26 Feb 2006 21:46:02 -0800
Lines: 102
Distribution: su
Message-ID: <Pine.GSO.4.44.0602262135060.7261-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10423

Hi,

I'm getting some suspicious behaviour with the grading script. I ran it
a little while back, and one of my assertions on a packet send failed:

"Assertion failed: data_sent == data_len_recv + sizeof (STCPHeader)"

The assertion specifically checks that the number of bytes returned by
stcp_network_send () (which is set to data_sent) is equal to the sum of
the number of bytes received from the application (data_len_recv - can be
max 536) + size of the STCPHeader.

However, the assertions only got triggered in the first 2 cases. All the
other tests ran successfully and the script does say that 1.B through 1.J
are OK.

This makes me wonder:
1. Whether there is something wrong in my program that the script did not
catch in the previous run.
I'll run the script again soon enough to see if this happens again.

2. Does the grading script actually simulate some weird behaviour by not
sending all the bytes given to it in its early tests?

3. What should the behaviour be if the bytes actually sent by
stcp_network_send () are not the same number that our transport layer
wanted to send? Should we try to resend the whole packet? Should we
terminate that one connection? Should our program abort?

I've also pasted below the output of the first couple of tests where I saw
my assertion being triggered.

Also, the after printing all the output for the tests, the grading script
did not exit. I had to Ctrl-C out of it. Is that normal?

Thanks,
Dinkar.

==========================================
Output:
Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 3 test attempts applies (from Feb 24 onwards).
You've used 0 test attempt(s) so far today.
make -f /usr/class/cs244a/grading_script/hw3/Makefile
LIBDIR=/usr/class/cs244a/grading_script/hw3 server
gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall
-I/usr/class/cs244a/WWW/homeworks/hw3/src -o server
/usr/class/cs244a/grading_script/hw3/server.o
/usr/class/cs244a/grading_script/hw3/connection_demux.o
/usr/class/cs244a/grading_script/hw3/mysock.o
/usr/class/cs244a/grading_script/hw3/mysock_api.o
/usr/class/cs244a/grading_script/hw3/network_io.o
/usr/class/cs244a/grading_script/hw3/network_io_socket.o
/usr/class/cs244a/grading_script/hw3/network_io_tcp.o
/usr/class/cs244a/grading_script/hw3/stcp_api.o
/usr/class/cs244a/grading_script/hw3/tcp_sum.o
/usr/class/cs244a/grading_script/hw3/network.o transport.c -lsocket -lnsl
-lm -lmd5 -lpthread
transport.c: In function `stcp_handle_event':
transport.c:1901: warning: unused variable `init_state'
transport.c:1903: warning: unused variable `end_state'
transport.c: At top level:
transport.c:1917: warning: 'print_stcp_packet' defined but not used

Testing input file TESTDATA.0
tarting server:
/afs/ir.stanford.edu/users/d/i/dinkarg/classes/cs244a/stcp/grading_src/build/server
-p
/afs/ir.stanford.edu/users/d/i/dinkarg/classes/cs244a/stcp/grading_src/build/.server_port
2>&1 >
/afs/ir.stanford.edu/users/d/i/dinkarg/classes/cs244a/stcp/grading_src/build/.server_output
Server started
Starting client: /usr/class/cs244a/grading_script/hw3/client  -p
..server_port -f TESTDATA.0 foo
connected to 171.64.15.75 at port 36993
client: TESTDATA.0
Assertion failed: data_sent == data_len_recv + sizeof (STCPHeader), file
transport.c, line 1741
Abort
Killed
elaine10:~/classes/cs244a/stcp> Testing input file TESTDATA.1

Starting server:
/afs/ir.stanford.edu/users/d/i/dinkarg/classes/cs244a/stcp/grading_src/build/server
-p
/afs/ir.stanford.edu/users/d/i/dinkarg/classes/cs244a/stcp/grading_src/build/.server_port
2>&1 >
/afs/ir.stanford.edu/users/d/i/dinkarg/classes/cs244a/stcp/grading_src/build/.server_output
Server started
Starting client: /usr/class/cs244a/grading_script/hw3/client  -p
..server_port -f TESTDATA.1 foo
connected to 171.64.15.75 at port 36996
client: TESTDATA.1
Assertion failed: data_sent == data_len_recv + sizeof (STCPHeader), file
transport.c, line 1741
Abort
Testing input file TESTDATA.2


NOTE: AFTER THIS EVERYTHING WENT SMOOTHLY.

.

Path: shelby.stanford.edu!elaine20.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw3c
Date: Sun, 26 Feb 2006 22:13:47 -0800
Lines: 9
Distribution: su
Message-ID: <Pine.GSO.4.44.0602262212180.20891-100000@elaine20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10424

Hello,

Since mysock doesn't have a myselect, what should we do if we used a
select call for pa1?  What do we need to do to get the Makefile to compile
ftpcopy.c?  Are we required to use our ftpcopy from pa1 at all?

Thanks in advance,
wks

.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: stcp performance
Date: Sun, 26 Feb 2006 22:21:34 -0800
Lines: 19
Distribution: su
Message-ID: <dtu5pd$ss9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10425

Are there any performance metrics for stcp?

I'm noticing some troubling behavior.  It seems that network and app 
events are treated equally by stcp_wait_for_event.

So say I send enough data to fill my sending buffer, I'll then wait for 
network events only. Upon receiving an ACK, some space is freed. Now 
when I wait for APP_DATA | NETWORK_DATA, I get the App event since it 
was queued first.  I send the data and my window fills again.  Rinse and 
repeat the cycle.

Because of this event ordering the sending rate is effectively STCP_MSS 
/ RTT.  not WINDOW_SIZE / RTT.

Is this acceptable?  Should the transport layer go out of its way to 
give precedence to ACK's?

Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: expected behavior of the server
Date: Sun, 26 Feb 2006 22:42:30 -0800
Lines: 36
Distribution: su
Message-ID: <dtu70p$gh$1@news.Stanford.EDU>
References: <dttkkj$dde$1@news.Stanford.EDU> <dttlhd$e1h$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10426

Actually, until your (Matt's) post, I had forgotten that there was an 
interactive mode for the client.  That helps!

Since my earlier posting, I did some cleanup in the logic of connection 
tear-down (FIN processing) in my code.

Final clarification on this topic...

These scenarios work fine:
1. download several files (of widely varying lengths) in non-interactive 
mode by running the client repeatedly while leaving the server running.
2. download several files in interactive mode.

But, if I run the client in interactive mode and download a few files, then 
hit ctl-c, then restart the client in non-interactive mode...  then the 
client and server hang during 3-way handshake during startup.  I assume this 
is not what should happen!?

Matt, in answer to your questions from earlier post:

> I'm not sure why isn't working for you.  Are you exiting the client 
> cleanly with Ctrl+D (if in interactive mode) and is the connection 
> termination handshake happening?

yes, my log files seems to show the handshake working fine.

> Finally are you returning from transport_init after the connection is 
> closed?

yes, my log files show that I exit transport_init() in all cases (except 
when I hang in the one case mentioned above.)

Thanks,
Bruce 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Sun, 26 Feb 2006 22:45:14 -0800
Lines: 51
Distribution: su
Message-ID: <dtu766$hu$1@news.Stanford.EDU>
References: <dtrq7n$kep$1@news.Stanford.EDU> <dtrsng$m8c$1@news.Stanford.EDU> <dttfk4$8uo$1@news.Stanford.EDU> <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10427

As a follow up on that, do I get full points for part (a) if my 
implementation passes tests 1.B through 1.J? I'm also interested in the 
answer to the parent question about README.

Thanks.


Vijay K Kulkarni wrote:
> are we required to submit a README for this portion of the submission
> (hw3a)?
> 
> 
> thanks,
> Vijay.
> 
> On Sun, 26 Feb 2006, Bruce Schechter wrote:
> 
>> Matt,
>> I quite appreciate your humor on answer 3.  It gave me a burst of energy.
>> ;-)
>> cheers, Bruce
>>
>> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>> news:dtrsng$m8c$1@news.Stanford.EDU...
>>> Will Palmeri wrote:
>>>> I'm passing the tests but I'm still unsure of some of the requirements.
>>>>
>>>> 1)We don't need to handle connecting to an unavailable host right? E.g.
>>>> if I start the client with an invalid port number right now the client
>>>> just hangs (waiting for a syn/ack for the initial syn).
>>> Correct, don't need to handle this for milestone A.
>>>
>>>> 2)Do we need to deal with changing advertised window sizes for part A?
>>>> (Presumably the test script reference models don't do this.)
>>> Nope, not needed.  In fact I think you can get away with not doing this
>>> for the whole assignment 3, but you'll definately need it in assignment 4,
>>> so might as well do it correctly here.
>>>
>>>> 3)Are the style points going to be more lax for part A? I have some of
>>>> the features for part B only half-way implemented, so right now code is
>>>> executed that doesn't really do anything. Some data structures are
>>>> written to but never read from, etc.
>>> We're going to grade style for milestone C only... so you can make your
>>> code as terrible as you want with expletives for variable names and
>>> comments insulting the TAs and get full credit.
>>>
>>>> Thanks in advance,
>>>> Will
>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: time.h and struct timespec
Date: Sun, 26 Feb 2006 22:46:35 -0800
Lines: 45
Distribution: su
Message-ID: <dtu7a0$na$1@news.Stanford.EDU>
References: <dttr40$j1t$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10428

As it was kindly pointed out to me, we're not supposed to do this. 
According to the FAQ,

Q18. How can I accurately measure elapsed time?

A18. You can use the function gettimeofday(). You cannot use any function 
from the real-time library (-lrt).


My question to the TA's is, then, why must we use the timespec struct, but 
not the rt library?  It seems like if we have to use gettimeofday, then the 
wait method shouldn't expect a struct with the format of gettimeofday 
(timeval).  Any chance of these restrictions being relaxed so that we don't 
have to do weird conversions?

--Brent


"Brent Ellwein" <baellwe@cs.stanford.edu> wrote in message 
news:dttr40$j1t$1@news.Stanford.EDU...
> So, we're supposed to use these timespec structs when stcp_wait_for_event 
> how long to wait.  Thats fine and all, but for some reason I couldn't get 
> the following code to compile:
>
> clock_gettime(CLOCK_REALTIME, myTimespec);
>
> Which I'm trying to use to get the current time.  From the elaines, I can 
> 'man clock_gettime' and it shows the manpage, but the compiler can't seem 
> to find the method.
>
> So, I looked it up on sun's site 
> http://docs.sun.com/app/docs/doc/816-0216/6m6ngupgn?a=view and found that 
> you need to link against the rt library.  I'm no makefile hacker, but I 
> changed the line
> LIBS=$(ENVLIBS)
>
> to
> LIBS=$(ENVLIBS) -lrt
>
> and it compiles, and (supposedly :) runs.  Just thought I'd save someone 
> else the hour of frustration that I went through.  Enjoy!
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Sun, 26 Feb 2006 22:49:41 -0800
Lines: 69
Distribution: su
Message-ID: <dtu7eh$hu$2@news.Stanford.EDU>
References: <dtrq7n$kep$1@news.Stanford.EDU> <dtrsng$m8c$1@news.Stanford.EDU> <dttfk4$8uo$1@news.Stanford.EDU> <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU> <dtu766$hu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dtu766$hu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10429

Oh actually on the website under deliverables it says:

The deliverables for milestones HW3.A and HW3.B of this assignment are:

    1. Your modified transport.c (You are not allowed to modify or 
submit any other .c or .h file)
    2. README describing the design of your transport layer. One page is 
enough for the writeup.

Yup.


Naeim Semsarilar wrote:
> As a follow up on that, do I get full points for part (a) if my 
> implementation passes tests 1.B through 1.J? I'm also interested in the 
> answer to the parent question about README.
> 
> Thanks.
> 
> 
> Vijay K Kulkarni wrote:
>> are we required to submit a README for this portion of the submission
>> (hw3a)?
>>
>>
>> thanks,
>> Vijay.
>>
>> On Sun, 26 Feb 2006, Bruce Schechter wrote:
>>
>>> Matt,
>>> I quite appreciate your humor on answer 3.  It gave me a burst of 
>>> energy.
>>> ;-)
>>> cheers, Bruce
>>>
>>> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>> news:dtrsng$m8c$1@news.Stanford.EDU...
>>>> Will Palmeri wrote:
>>>>> I'm passing the tests but I'm still unsure of some of the 
>>>>> requirements.
>>>>>
>>>>> 1)We don't need to handle connecting to an unavailable host right? 
>>>>> E.g.
>>>>> if I start the client with an invalid port number right now the client
>>>>> just hangs (waiting for a syn/ack for the initial syn).
>>>> Correct, don't need to handle this for milestone A.
>>>>
>>>>> 2)Do we need to deal with changing advertised window sizes for part A?
>>>>> (Presumably the test script reference models don't do this.)
>>>> Nope, not needed.  In fact I think you can get away with not doing this
>>>> for the whole assignment 3, but you'll definately need it in 
>>>> assignment 4,
>>>> so might as well do it correctly here.
>>>>
>>>>> 3)Are the style points going to be more lax for part A? I have some of
>>>>> the features for part B only half-way implemented, so right now 
>>>>> code is
>>>>> executed that doesn't really do anything. Some data structures are
>>>>> written to but never read from, etc.
>>>> We're going to grade style for milestone C only... so you can make your
>>>> code as terrible as you want with expletives for variable names and
>>>> comments insulting the TAs and get full credit.
>>>>
>>>>> Thanks in advance,
>>>>> Will
>>>
>>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.J
Date: Sun, 26 Feb 2006 22:54:20 -0800
Lines: 25
Distribution: su
Message-ID: <dtu7n8$11d$1@news.Stanford.EDU>
References: <dtp6nt$8j1$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dtp6nt$8j1$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10430

Are these 2.* tests for hw3b and 3c? Because when I run the hw3a test 
script it only gives me results for 1.B through 1.J. Am I missing something?

*panics*


Michi Mutsuzaki wrote:
> I'm trying to figure out why I'm failing the test 2.J. Here is the output:
> 
>     Test 2.J [out of 14]
>     Checks student Tx (server) against student Rx (client).
> 
>     Results:  NOT OK
> 
>     Unexpected exit status -1.  Program output:
>     ***Timeout expired during grading
>     Program output:
>     server: TESTDATA.0,110230,Ok
> 
> However, the program runs fine when I execute the same commands as the
> script. I see from the previous year's newsgroup that some people had
> trouble with the same test in the past. What was the problem?
> 
> Thanks!
> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Checksum different in stcp_network_send and stcp_network_recv
Date: Sun, 26 Feb 2006 23:21:36 -0800
Lines: 14
Distribution: su
Message-ID: <C027E880.35DC%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Checksum different in stcp_network_send and stcp_network_recv
Thread-Index: AcY7bnFNr5MsRKdhEdq9GgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10431

Hi.

I am sending a simple SYN packet which is malloced to size 20 bytes (just a
stcphdr).  But the checksum from machine A running client and calling
stcp_network_send and checksum of elaine machine running my server and calls
stcp_network_recv is different.

I cant figure out what would cause this as the size of packet is 20 bytes
(32bit word aligned).

Would appreciate any pointers.

Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: debug strategy when test scripts fail
Date: Sun, 26 Feb 2006 23:34:14 -0800
Lines: 442
Distribution: su
Message-ID: <dtua1n$2k6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10432

I ran extensive testing using the provided client/server apps using a 
variety of files of varying sizes. Results all look fine (with one possible 
edge case problem discussed in earlier posting titled "expected behavior of 
the server.")



However, when I run the test scripts I failed most of the tests.   The 
output details show that most if not all of the tests result in segmentation 
faults.



I set up my code to log debugging messages to a file.  When I examine those 
log files, I find that in each case execution flow went only as far as 
sending out the first packet ( the SYN) but not receiving any packets. 
Obviously, I don't know exactly where the errors are happening, as I only 
see where my last log entry happened.



Any recommendations how to debug this?



I am amazed my personal testing can work so well, while the test scripts can 
totally fail.  Are there any known "environmental" differences between their 
tests and my client/server test that might give me hints on the problem?



Below is the script output.



Thanks,

Bruce




-------------------------------------------------------------------------------

elaine3:~/244/p3> /afs/ir/class/cs244a/bin/test_code.pl hw3a transport.c
Creating submission tarball...
transport.c

Starting...
Test 1.B, new source tree required, extracting into grading_src/build...
transport.c

Can't find a matching key for this test run.
Would you like to generate a new one?  (y/n):  y
Daily quota of 3 test attempts applies (from Feb 24 onwards).
You've used 1 test attempt(s) so far today.
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server
gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homeworks/hw3/src 
 -o server /usr/class/cs244a/grading_script/hw3/server.o 
/usr/class/cs244a/grading_script/hw3/connection_demux.o 
/usr/class/cs244a/grading_script/hw3/mysock.o 
/usr/class/cs244a/grading_script/hw3/mysock_api.o 
/usr/class/cs244a/grading_script/hw3/network_io.o 
/usr/class/cs244a/grading_script/hw3/network_io_socket.o 
/usr/class/cs244a/grading_script/hw3/network_io_tcp.o 
/usr/class/cs244a/grading_script/hw3/stcp_api.o 
/usr/class/cs244a/grading_script/hw3/tcp_sum.o 
/usr/class/cs244a/grading_script/hw3/network.o 
transport.c -lsocket -lnsl -lm -lmd5 -lpthread

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/server  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: /usr/class/cs244a/grading_script/hw3/client  -p 
..server_port -f TESTDATA.0 foo
log file is [file9J4_V]
Segmentation Fault
warning:  client exited with non-zero status (256)
program output:
myconnect: Broken pipe

Test 1.C, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 client
gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homeworks/hw3/src 
 -o client /usr/class/cs244a/grading_script/hw3/client.o 
/usr/class/cs244a/grading_script/hw3/connection_demux.o 
/usr/class/cs244a/grading_script/hw3/mysock.o 
/usr/class/cs244a/grading_script/hw3/mysock_api.o 
/usr/class/cs244a/grading_script/hw3/network_io.o 
/usr/class/cs244a/grading_script/hw3/network_io_socket.o 
/usr/class/cs244a/grading_script/hw3/network_io_tcp.o 
/usr/class/cs244a/grading_script/hw3/stcp_api.o 
/usr/class/cs244a/grading_script/hw3/tcp_sum.o 
/usr/class/cs244a/grading_script/hw3/network.o 
transport.c -lsocket -lnsl -lm -lmd5 -lpthread

Testing input file TESTDATA.0

Starting server: /usr/class/cs244a/grading_script/hw3/server_no_retrans  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client  -p .server_port -f TESTDATA.0 foo
connected to 171.64.15.68 at port 37048
client: TESTDATA.0
warning:  client exited with non-zero status (-1)
program output:
***Timeout expired during grading
Program output:
log file is [fileEQqmW]

Test 1.D, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server.log client.log
gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homeworks/hw3/src 
 -o server.log /usr/class/cs244a/grading_script/hw3/server.o 
/usr/class/cs244a/grading_script/hw3/connection_demux.o 
/usr/class/cs244a/grading_script/hw3/mysock.o 
/usr/class/cs244a/grading_script/hw3/mysock_api.o 
/usr/class/cs244a/grading_script/hw3/network_io.o 
/usr/class/cs244a/grading_script/hw3/network_io_socket.o 
/usr/class/cs244a/grading_script/hw3/network_io_tcp.o 
/usr/class/cs244a/grading_script/hw3/stcp_api.o 
/usr/class/cs244a/grading_script/hw3/tcp_sum.o 
/usr/class/cs244a/grading_script/hw3/libnetwork_grading.a 
transport.c -lsocket -lnsl -lm -lmd5 -lpthread
gcc -g -ansi -DSOLARIS -D__EXTENSIONS__ -Wall -I/usr/class/cs244a/WWW/homeworks/hw3/src 
 -o client.log /usr/class/cs244a/grading_script/hw3/client.o 
/usr/class/cs244a/grading_script/hw3/connection_demux.o 
/usr/class/cs244a/grading_script/hw3/mysock.o 
/usr/class/cs244a/grading_script/hw3/mysock_api.o 
/usr/class/cs244a/grading_script/hw3/network_io.o 
/usr/class/cs244a/grading_script/hw3/network_io_socket.o 
/usr/class/cs244a/grading_script/hw3/network_io_tcp.o 
/usr/class/cs244a/grading_script/hw3/stcp_api.o 
/usr/class/cs244a/grading_script/hw3/tcp_sum.o 
/usr/class/cs244a/grading_script/hw3/libnetwork_grading.a 
transport.c -lsocket -lnsl -lm -lmd5 -lpthread

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.0 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [filecxyzW]
Segmentation Fault
Testing input file TESTDATA.1

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.1 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [fileNvaGW]
Segmentation Fault
Testing input file TESTDATA.2

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.2 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [fileVsWLW]
Segmentation Fault
Test 1.E, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server.log client.log
make: `server.log' is up to date.
make: `client.log' is up to date.

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.0 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [filemUqZW]
Segmentation Fault
Testing input file TESTDATA.1

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.1 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [file2PGlX]
Segmentation Fault
Testing input file TESTDATA.2

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.2 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [fileuLWpX]
Segmentation Fault
Test 1.F, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server.log client.log
make: `server.log' is up to date.
make: `client.log' is up to date.

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.0 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [filey7OCX]
Segmentation Fault
Testing input file TESTDATA.1

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.1 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [file_d4LX]
Segmentation Fault
Testing input file TESTDATA.2

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.2 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [fileV_yQX]
Segmentation Fault
Test 1.G, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server.log client.log
make: `server.log' is up to date.
make: `client.log' is up to date.

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.0 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [filenvW3X]
Segmentation Fault
Test 1.H, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server.log client.log
make: `server.log' is up to date.
make: `client.log' is up to date.

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.0 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [fileDQGeY]
Segmentation Fault
Test 1.I, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server.log client.log
make: `server.log' is up to date.
make: `client.log' is up to date.

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/./server.log 
  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client.log  -p .server_port -f TESTDATA.0 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [fileqgOtY]
Segmentation Fault
Test 1.J, using current source tree and build
make -f /usr/class/cs244a/grading_script/hw3/Makefile 
LIBDIR=/usr/class/cs244a/grading_script/hw3 server client
make: `server' is up to date.
make: `client' is up to date.

Testing input file TESTDATA.0

Starting server: 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/server  -p 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_port 
2>&1 > 
/afs/ir.stanford.edu/users/b/r/bruceds/244/p3/grading_src/build/.server_output
Server started
Starting client: ./client  -p .server_port -f TESTDATA.0 foo
Warning: unable to close filehandle KID_TO_READ properly.
log file is [fileUAiFY]
Segmentation Fault
warning:  client exited with non-zero status (-1)
program output:
***Timeout expired during grading
Program output:
log file is [fileKAyFY]


======================================================================
Summary prepared for bruceds
======================================================================

Test 1.B [out of 10]
Checks student Tx (server) against reference Rx (client).

Results:  NOT OK

Unexpected exit status 256.  Program output:
myconnect: Broken pipe

----------------------------------------------------------------------

Test 1.C [out of 10]
Checks reference Tx (server) against student Rx (client).

Results:  NOT OK

Unexpected exit status -1.  Program output:
***Timeout expired during grading
Program output:
log file is [fileEQqmW]

----------------------------------------------------------------------

Test 1.D [out of 2.5]
Checks that Tx doesn't overflow receiver window.

Results:  NOT TESTED
----------------------------------------------------------------------

Test 1.E [out of 2.5]
Checks that initial sequence number is set properly.

Results:  OK
----------------------------------------------------------------------

Test 1.F [out of 2.5]
Checks transport layer enforces correct receiver window.

Results:  OK
----------------------------------------------------------------------

Test 1.G [out of 5]
Checks that SYN is correctly ACKed.

Results:  NOT OK

No SYN-ACK for SYN with sequence number 3

----------------------------------------------------------------------

Test 1.H [out of 5]
Checks that all packets are sent before FIN.

Results:  NOT OK

No FIN sent!

----------------------------------------------------------------------

Test 1.I [out of 5]
Checks that FIN is correctly ACKed.

Results:  NOT OK

No FIN sent!

----------------------------------------------------------------------

Test 1.J [out of 14]
Checks student Tx (server) against student Rx (client).

Results:  NOT OK

Unexpected exit status -1.  Program output:
***Timeout expired during grading
Program output:
log file is [fileKAyFY]

----------------------------------------------------------------------


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assignment 3: how to handle malloc failures
Date: Sun, 26 Feb 2006 23:48:26 -0800
Lines: 23
Distribution: su
Message-ID: <dtuass$43c$1@news.Stanford.EDU>
References: <dtqr4i$lti$1@news.Stanford.EDU> <dtqrfj$m3p$1@news.Stanford.EDU> <dttt89$knu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dttt89$knu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10433

Michi Mutsuzaki wrote:
> Same for stcp_network_send()?

Yeah, try to always return from transport_init.

> 
> Thanks!
> --Michi
> 
> Matt Falkenhagen wrote:
> 
>>Daniel Holbert wrote:
>>
>>>How should we handle malloc returning null within assignment 3?  In 
>>>previous assignments we could immediately quit with an appropriate error 
>>>message. Is that still acceptable?
>>
>>There might be problems with that because it's not a standalone program. 
>>  It would be best to return cleanly from transport_init.
>>
>>
>>>Thanks,
>>>~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Sun, 26 Feb 2006 23:50:24 -0800
Lines: 59
Distribution: su
Message-ID: <dtub0h$43c$2@news.Stanford.EDU>
References: <dtrq7n$kep$1@news.Stanford.EDU> <dtrsng$m8c$1@news.Stanford.EDU> <dttfk4$8uo$1@news.Stanford.EDU> <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10434

Vijay K Kulkarni wrote:
> are we required to submit a README for this portion of the submission
> (hw3a)?
> 
> 
> thanks,
> Vijay.

It's not required but please submit a README with at least your name in 
it.  And if there's anything you want to tell us about your program, put 
it in the README.

> 
> On Sun, 26 Feb 2006, Bruce Schechter wrote:
> 
> 
>>Matt,
>>I quite appreciate your humor on answer 3.  It gave me a burst of energy.
>>;-)
>>cheers, Bruce
>>
>>"Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>news:dtrsng$m8c$1@news.Stanford.EDU...
>>
>>>Will Palmeri wrote:
>>>
>>>>I'm passing the tests but I'm still unsure of some of the requirements.
>>>>
>>>>1)We don't need to handle connecting to an unavailable host right? E.g.
>>>>if I start the client with an invalid port number right now the client
>>>>just hangs (waiting for a syn/ack for the initial syn).
>>>
>>>Correct, don't need to handle this for milestone A.
>>>
>>>
>>>>2)Do we need to deal with changing advertised window sizes for part A?
>>>>(Presumably the test script reference models don't do this.)
>>>
>>>Nope, not needed.  In fact I think you can get away with not doing this
>>>for the whole assignment 3, but you'll definately need it in assignment 4,
>>>so might as well do it correctly here.
>>>
>>>
>>>>3)Are the style points going to be more lax for part A? I have some of
>>>>the features for part B only half-way implemented, so right now code is
>>>>executed that doesn't really do anything. Some data structures are
>>>>written to but never read from, etc.
>>>
>>>We're going to grade style for milestone C only... so you can make your
>>>code as terrible as you want with expletives for variable names and
>>>comments insulting the TAs and get full credit.
>>>
>>>
>>>>Thanks in advance,
>>>>Will
>>
>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3c
Date: Sun, 26 Feb 2006 23:53:40 -0800
Lines: 21
Distribution: su
Message-ID: <dtub6m$58d$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602262212180.20891-100000@elaine20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0602262212180.20891-100000@elaine20.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10435

Wai Kei So wrote:
> Hello,
> 
> Since mysock doesn't have a myselect, what should we do if we used a
> select call for pa1?  What do we need to do to get the Makefile to compile
> ftpcopy.c?  Are we required to use our ftpcopy from pa1 at all?
> 

You'll have to change the design of your program to not use select...

But if want you can use the supplied ftpcopy binaries instead.  From the 
handout:

"Alternatively, you could take these object files, which are our 
solution to Assignment#1 already modified appropriately for this 
milestone. However these object files do not contain symbol information, 
so you cannot step into them when debugging your code."

> Thanks in advance,
> wks
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp performance
Date: Sun, 26 Feb 2006 23:59:18 -0800
Lines: 23
Distribution: su
Message-ID: <dtubh8$5om$1@news.Stanford.EDU>
References: <dtu5pd$ss9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtu5pd$ss9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10436

Will Palmeri wrote:
> Are there any performance metrics for stcp?
> 
> I'm noticing some troubling behavior.  It seems that network and app 
> events are treated equally by stcp_wait_for_event.
> 
> So say I send enough data to fill my sending buffer, I'll then wait for 
> network events only. Upon receiving an ACK, some space is freed. Now 
> when I wait for APP_DATA | NETWORK_DATA, I get the App event since it 
> was queued first.  I send the data and my window fills again.  Rinse and 
> repeat the cycle.
> 
> Because of this event ordering the sending rate is effectively STCP_MSS 
> / RTT.  not WINDOW_SIZE / RTT.
> 
> Is this acceptable?  Should the transport layer go out of its way to 
> give precedence to ACK's?

This is OK.

> 
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: expected behavior of the server
Date: Mon, 27 Feb 2006 00:06:08 -0800
Lines: 45
Distribution: su
Message-ID: <dtubu2$65n$1@news.Stanford.EDU>
References: <dttkkj$dde$1@news.Stanford.EDU> <dttlhd$e1h$1@news.Stanford.EDU> <dtu70p$gh$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtu70p$gh$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10437

Bruce Schechter wrote:
> Actually, until your (Matt's) post, I had forgotten that there was an 
> interactive mode for the client.  That helps!
> 
> Since my earlier posting, I did some cleanup in the logic of connection 
> tear-down (FIN processing) in my code.
> 
> Final clarification on this topic...
> 
> These scenarios work fine:
> 1. download several files (of widely varying lengths) in non-interactive 
> mode by running the client repeatedly while leaving the server running.
> 2. download several files in interactive mode.
> 
> But, if I run the client in interactive mode and download a few files, then 
> hit ctl-c, then restart the client in non-interactive mode...  then the 
> client and server hang during 3-way handshake during startup.  I assume this 
> is not what should happen!?

You should hit Ctrl+D instead of Ctrl+C.  Ctrl+D basically tells the 
program there's no more input which will cause the client to call 
myclose(), while Ctrl+C will kill it.
> 
> Matt, in answer to your questions from earlier post:
> 
> 
>>I'm not sure why isn't working for you.  Are you exiting the client 
>>cleanly with Ctrl+D (if in interactive mode) and is the connection 
>>termination handshake happening?
> 
> 
> yes, my log files seems to show the handshake working fine.
> 
> 
>>Finally are you returning from transport_init after the connection is 
>>closed?
> 
> 
> yes, my log files show that I exit transport_init() in all cases (except 
> when I hang in the one case mentioned above.)
> 
> Thanks,
> Bruce 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Mon, 27 Feb 2006 00:07:14 -0800
Lines: 67
Distribution: su
Message-ID: <dtuc04$65n$2@news.Stanford.EDU>
References: <dtrq7n$kep$1@news.Stanford.EDU> <dtrsng$m8c$1@news.Stanford.EDU> <dttfk4$8uo$1@news.Stanford.EDU> <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU> <dtu766$hu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtu766$hu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10438

Naeim Semsarilar wrote:
> As a follow up on that, do I get full points for part (a) if my 
> implementation passes tests 1.B through 1.J? I'm also interested in the 
> answer to the parent question about README.

I think so, but there may be other tests we can run that you don't have 
access to.
> 
> Thanks.
> 
> 
> Vijay K Kulkarni wrote:
> 
>> are we required to submit a README for this portion of the submission
>> (hw3a)?
>>
>>
>> thanks,
>> Vijay.
>>
>> On Sun, 26 Feb 2006, Bruce Schechter wrote:
>>
>>> Matt,
>>> I quite appreciate your humor on answer 3.  It gave me a burst of 
>>> energy.
>>> ;-)
>>> cheers, Bruce
>>>
>>> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>> news:dtrsng$m8c$1@news.Stanford.EDU...
>>>
>>>> Will Palmeri wrote:
>>>>
>>>>> I'm passing the tests but I'm still unsure of some of the 
>>>>> requirements.
>>>>>
>>>>> 1)We don't need to handle connecting to an unavailable host right? 
>>>>> E.g.
>>>>> if I start the client with an invalid port number right now the client
>>>>> just hangs (waiting for a syn/ack for the initial syn).
>>>>
>>>> Correct, don't need to handle this for milestone A.
>>>>
>>>>> 2)Do we need to deal with changing advertised window sizes for part A?
>>>>> (Presumably the test script reference models don't do this.)
>>>>
>>>> Nope, not needed.  In fact I think you can get away with not doing this
>>>> for the whole assignment 3, but you'll definately need it in 
>>>> assignment 4,
>>>> so might as well do it correctly here.
>>>>
>>>>> 3)Are the style points going to be more lax for part A? I have some of
>>>>> the features for part B only half-way implemented, so right now 
>>>>> code is
>>>>> executed that doesn't really do anything. Some data structures are
>>>>> written to but never read from, etc.
>>>>
>>>> We're going to grade style for milestone C only... so you can make your
>>>> code as terrible as you want with expletives for variable names and
>>>> comments insulting the TAs and get full credit.
>>>>
>>>>> Thanks in advance,
>>>>> Will
>>>
>>>
>>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3a requirements
Date: Mon, 27 Feb 2006 00:10:54 -0800
Lines: 89
Distribution: su
Message-ID: <4402B40E.6030906@cs.stanford.edu>
References: <dtrq7n$kep$1@news.Stanford.EDU> <dtrsng$m8c$1@news.Stanford.EDU> <dttfk4$8uo$1@news.Stanford.EDU> <Pine.GSO.4.44.0602262130190.9668-100000@saga6.Stanford.EDU> <dtu766$hu$1@news.Stanford.EDU> <dtu7eh$hu$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
To: Naeim Semsarilar <naeim@stanford.edu>
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <dtu7eh$hu$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10439

The submit script will probably require you to include a README, but you 
don't actually have to write any useful information in the README. Just 
a blank file or whatever is fine.

Ari

Naeim Semsarilar wrote:
> Oh actually on the website under deliverables it says:
> 
> The deliverables for milestones HW3.A and HW3.B of this assignment are:
> 
>    1. Your modified transport.c (You are not allowed to modify or submit 
> any other .c or .h file)
>    2. README describing the design of your transport layer. One page is 
> enough for the writeup.
> 
> Yup.
> 
> 
> Naeim Semsarilar wrote:
> 
>> As a follow up on that, do I get full points for part (a) if my 
>> implementation passes tests 1.B through 1.J? I'm also interested in 
>> the answer to the parent question about README.
>>
>> Thanks.
>>
>>
>> Vijay K Kulkarni wrote:
>>
>>> are we required to submit a README for this portion of the submission
>>> (hw3a)?
>>>
>>>
>>> thanks,
>>> Vijay.
>>>
>>> On Sun, 26 Feb 2006, Bruce Schechter wrote:
>>>
>>>> Matt,
>>>> I quite appreciate your humor on answer 3.  It gave me a burst of 
>>>> energy.
>>>> ;-)
>>>> cheers, Bruce
>>>>
>>>> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
>>>> news:dtrsng$m8c$1@news.Stanford.EDU...
>>>>
>>>>> Will Palmeri wrote:
>>>>>
>>>>>> I'm passing the tests but I'm still unsure of some of the 
>>>>>> requirements.
>>>>>>
>>>>>> 1)We don't need to handle connecting to an unavailable host right? 
>>>>>> E.g.
>>>>>> if I start the client with an invalid port number right now the 
>>>>>> client
>>>>>> just hangs (waiting for a syn/ack for the initial syn).
>>>>>
>>>>> Correct, don't need to handle this for milestone A.
>>>>>
>>>>>> 2)Do we need to deal with changing advertised window sizes for 
>>>>>> part A?
>>>>>> (Presumably the test script reference models don't do this.)
>>>>>
>>>>> Nope, not needed.  In fact I think you can get away with not doing 
>>>>> this
>>>>> for the whole assignment 3, but you'll definately need it in 
>>>>> assignment 4,
>>>>> so might as well do it correctly here.
>>>>>
>>>>>> 3)Are the style points going to be more lax for part A? I have 
>>>>>> some of
>>>>>> the features for part B only half-way implemented, so right now 
>>>>>> code is
>>>>>> executed that doesn't really do anything. Some data structures are
>>>>>> written to but never read from, etc.
>>>>>
>>>>> We're going to grade style for milestone C only... so you can make 
>>>>> your
>>>>> code as terrible as you want with expletives for variable names and
>>>>> comments insulting the TAs and get full credit.
>>>>>
>>>>>> Thanks in advance,
>>>>>> Will
>>>>
>>>>
>>>>
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: debug strategy when test scripts fail
Date: Mon, 27 Feb 2006 00:30:55 -0800
Lines: 79
Distribution: su
Message-ID: <dtudc2$805$1@news.Stanford.EDU>
References: <dtua1n$2k6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10440

Update....

I ran the test script again, with much more detailed debugging info sent to 
the log file.  I narrowed down the location of the seg fault. (see code snip 
below.)  The last line in the log file is "DBG11,Will now call 
stcp_wait_for_event()".  Thus, it seems that the seg fault happens within 
stcp_wait_for_event().



Note that in this case...

  ctx->event_types = NETWORK_DATA+APP_CLOSE_REQUESTED;



For every test that the test script runs, the respective log file contained 
the same result!  (Except for difference in initial sequence numbers.)  Each 
one ends abruptly at the call to stcp_wait_for_event().




What could my code do to cause stcp_wait_for_event() to fail via a 
segmenation fault?



Thanks,

Bruce



----------------------------------------------





static void control_loop(mysocket_t sd, context_t *ctx)

{

  unsigned int event;

  assert(ctx);



  while (ctx->conn_state!=CSTATE_CLOSED)

  {

    if (dbg11) dbprintf("DBG11,Will now call stcp_wait_for_event() \n");

    event = stcp_wait_for_event(sd, ctx->event_types, NULL);

    if (dbg11) dbprintf("DBG11,Returned from stcp_wait_for_event() \n");



    if ( dbg11 ) dbprintf("DBG11, control_loop, event=%d\n", event);



    if (event & APP_CLOSE_REQUESTED ) process_close_request( ctx );

    if (event & NETWORK_DATA )        process_network_data( ctx );

    if (event & APP_DATA)             send_app_data_to_peer( ctx );

    if (event==TIMEOUT ) { /* awaiting assignment 3b. */  }

  }

}


.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: debug strategy when test scripts fail
Date: Mon, 27 Feb 2006 00:34:51 -0800
Lines: 83
Distribution: su
Message-ID: <dtudji$81m$1@news.Stanford.EDU>
References: <dtua1n$2k6$1@news.Stanford.EDU> <dtudc2$805$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dtudc2$805$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10441

Have you tested with Purify?  Memory errors generated in your code could 
pop up in strange places...

Bruce Schechter wrote:
> Update....
> 
> I ran the test script again, with much more detailed debugging info sent to 
> the log file.  I narrowed down the location of the seg fault. (see code snip 
> below.)  The last line in the log file is "DBG11,Will now call 
> stcp_wait_for_event()".  Thus, it seems that the seg fault happens within 
> stcp_wait_for_event().
> 
> 
> 
> Note that in this case...
> 
>   ctx->event_types = NETWORK_DATA+APP_CLOSE_REQUESTED;
> 
> 
> 
> For every test that the test script runs, the respective log file contained 
> the same result!  (Except for difference in initial sequence numbers.)  Each 
> one ends abruptly at the call to stcp_wait_for_event().
> 
> 
> 
> 
> What could my code do to cause stcp_wait_for_event() to fail via a 
> segmenation fault?
> 
> 
> 
> Thanks,
> 
> Bruce
> 
> 
> 
> ----------------------------------------------
> 
> 
> 
> 
> 
> static void control_loop(mysocket_t sd, context_t *ctx)
> 
> {
> 
>   unsigned int event;
> 
>   assert(ctx);
> 
> 
> 
>   while (ctx->conn_state!=CSTATE_CLOSED)
> 
>   {
> 
>     if (dbg11) dbprintf("DBG11,Will now call stcp_wait_for_event() \n");
> 
>     event = stcp_wait_for_event(sd, ctx->event_types, NULL);
> 
>     if (dbg11) dbprintf("DBG11,Returned from stcp_wait_for_event() \n");
> 
> 
> 
>     if ( dbg11 ) dbprintf("DBG11, control_loop, event=%d\n", event);
> 
> 
> 
>     if (event & APP_CLOSE_REQUESTED ) process_close_request( ctx );
> 
>     if (event & NETWORK_DATA )        process_network_data( ctx );
> 
>     if (event & APP_DATA)             send_app_data_to_peer( ctx );
> 
>     if (event==TIMEOUT ) { /* awaiting assignment 3b. */  }
> 
>   }
> 
> }
> 
> 
.

Path: shelby.stanford.edu!saga21.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: wasted test
Date: Mon, 27 Feb 2006 01:08:01 -0800
Lines: 11
Distribution: su
Message-ID: <Pine.GSO.4.44.0602270105050.5023-100000@saga21.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10442


I tried redirecting my output to a file using our_dprintf, but didn't
specify an aboslute path name, so when I ran the test script everything
segfaulted since the file couldn't open in the testdir. (it ran fine
before
that, so I'm pretty sure that's the cause). Is there any way I could get
that test reimbursed, or is it unlikely that that was even the cause?

thanks,
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: debug strategy when test scripts fail
Date: Mon, 27 Feb 2006 01:21:03 -0800
Lines: 52
Distribution: su
Message-ID: <dtuga3$a5m$1@news.Stanford.EDU>
References: <dtua1n$2k6$1@news.Stanford.EDU> <dtudc2$805$1@news.Stanford.EDU> <dtudji$81m$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10443

Steve,

Excellent idea.  Thanks.  However, the only error is one that does not 
appear (at least on the surface) to involve my code....

   Finished  client.purify        (   1 error, 0 leaked bytes)

      Purify instrumented client.purify (pid 16632 at Mon Feb 27 01:15:09 
2006)

      Command-line: ./client.purify elaine27:36916

      IPW: Invalid pointer write

      This is occurring while in thread 2:

            _lwp_sema_wait [libc.so.1]

            _door_return   [libc.so.1]

            _sc_door_func  [schedctl.c]

      Writing 4 bytes to 0xfdd55c04 on the stack of thread 2.

      Address 0xfdd55c04 is       28 bytes below frame pointer in function 
_lwp_sema_wait.

      Current file descriptors in use: 6

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

      Thread Summary : 10 threads in existence

      Program exited with status code 0.


(And the results are precisely the same for server.purify.)

One big problem is that I cannot run Purify during the execution of the test 
scripts.  Now that would be nice.

Any other suggestions?

Thanks, Bruce


"Steve Goldman" <steve.goldman@stanford.edu> wrote in message 
news:dtudji$81m$1@news.Stanford.EDU...
> Have you tested with Purify?  Memory errors generated in your code could 
> pop up in strange places...


.

Path: shelby.stanford.edu!elaine40.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: TCP reference client/server
Date: Mon, 27 Feb 2006 02:01:32 -0800
Lines: 8
Distribution: su
Message-ID: <Pine.GSO.4.44.0602270125290.12737-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10444

Is there some way to get access to the reference client and/or server for
further testing the STCP code against regular TCP? Alternatively, are
there any quick and dirty fixes to be able to do reference testing outside
of the testing scripts?

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: debug strategy when test scripts fail
Date: Mon, 27 Feb 2006 02:05:36 -0800
Lines: 70
Distribution: su
Message-ID: <dtuitf$ccb$1@news.Stanford.EDU>
References: <dtua1n$2k6$1@news.Stanford.EDU> <dtudc2$805$1@news.Stanford.EDU> <dtudji$81m$1@news.Stanford.EDU> <dtuga3$a5m$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10445

Yeah, that's a Purify error you can ignore.

Can you paste how you're calling wait for event?  Also, I don't think this
matters, but they use | instead of +.  Since it's all a factor of 2, I'm
pretty sure it's all the same, but just in case...

So instead of :
  ctx->event_types = NETWORK_DATA+APP_CLOSE_REQUESTED;
try:
  ctx->event_types = NETWORK_DATA | APP_CLOSE_REQUESTED;

Waynn

"Bruce Schechter" <bruceds@stanford.edu> wrote in message
news:dtuga3$a5m$1@news.Stanford.EDU...
> Steve,
>
> Excellent idea.  Thanks.  However, the only error is one that does not
> appear (at least on the surface) to involve my code....
>
>    Finished  client.purify        (   1 error, 0 leaked bytes)
>
>       Purify instrumented client.purify (pid 16632 at Mon Feb 27 01:15:09
> 2006)
>
>       Command-line: ./client.purify elaine27:36916
>
>       IPW: Invalid pointer write
>
>       This is occurring while in thread 2:
>
>             _lwp_sema_wait [libc.so.1]
>
>             _door_return   [libc.so.1]
>
>             _sc_door_func  [schedctl.c]
>
>       Writing 4 bytes to 0xfdd55c04 on the stack of thread 2.
>
>       Address 0xfdd55c04 is       28 bytes below frame pointer in function
> _lwp_sema_wait.
>
>       Current file descriptors in use: 6
>
>       Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)
>
>       Thread Summary : 10 threads in existence
>
>       Program exited with status code 0.
>
>
> (And the results are precisely the same for server.purify.)
>
> One big problem is that I cannot run Purify during the execution of the
test
> scripts.  Now that would be nice.
>
> Any other suggestions?
>
> Thanks, Bruce
>
>
> "Steve Goldman" <steve.goldman@stanford.edu> wrote in message
> news:dtudji$81m$1@news.Stanford.EDU...
> > Have you tested with Purify?  Memory errors generated in your code could
> > pop up in strange places...
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: wasted test
Date: Mon, 27 Feb 2006 02:06:10 -0800
Lines: 19
Distribution: su
Message-ID: <dtuiuh$cck$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602270105050.5023-100000@saga21.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10446

I tried something similar and I think the same thing happened.

Waynn

"Megan Anneke Wachs" <wachs@stanford.edu> wrote in message
news:Pine.GSO.4.44.0602270105050.5023-100000@saga21.Stanford.EDU...
>
> I tried redirecting my output to a file using our_dprintf, but didn't
> specify an aboslute path name, so when I ran the test script everything
> segfaulted since the file couldn't open in the testdir. (it ran fine
> before
> that, so I'm pretty sure that's the cause). Is there any way I could get
> that test reimbursed, or is it unlikely that that was even the cause?
>
> thanks,
> Megan
>


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: TCP reference client/server
Date: Mon, 27 Feb 2006 02:11:02 -0800
Lines: 17
Distribution: su
Message-ID: <C0281036.35F9%sunnybalwani@hotmail.com>
References: <Pine.GSO.4.44.0602270125290.12737-100000@elaine40.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: TCP reference client/server
Thread-Index: AcY7hhy2WwF14Kd5Edq9GgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10447

On 2/27/06 2:01 AM, in article
Pine.GSO.4.44.0602270125290.12737-100000@elaine40.Stanford.EDU, "Dinkar
Gupta" <dinkarg@stanford.edu> wrote:

> Is there some way to get access to the reference client and/or server for
> further testing the STCP code against regular TCP? Alternatively, are
> there any quick and dirty fixes to be able to do reference testing outside
> of the testing scripts?
> 
> Thanks,
> Dinkar.
> 
Dinkar.

If you look at the output of script test, you can see the location of their
..o files and you can link your transport.c file with them and test.

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: Checksum different.. (pl. ignore)
Date: Mon, 27 Feb 2006 08:18:58 -0800
Lines: 23
Distribution: su
Message-ID: <C0286672.3602%sunnybalwani@hotmail.com>
References: <C027E880.35DC%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Checksum different.. (pl. ignore)
Thread-Index: AcY7bnFNr5MsRKdhEdq9GgARJHuZqgASxG5N
Xref: shelby.stanford.edu su.class.cs244a:10449

Please ignore.  Thanks.



On 2/26/06 11:21 PM, in article C027E880.35DC%sunnybalwani@hotmail.com,
"Sunny Balwani" <sunnybalwani@hotmail.com> wrote:

> Hi.
> 
> I am sending a simple SYN packet which is malloced to size 20 bytes (just a
> stcphdr).  But the checksum from machine A running client and calling
> stcp_network_send and checksum of elaine machine running my server and calls
> stcp_network_recv is different.
> 
> I cant figure out what would cause this as the size of packet is 20 bytes
> (32bit word aligned).
> 
> Would appreciate any pointers.
> 
> Thanks.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: TCP reference client/server
Date: Mon, 27 Feb 2006 09:44:11 -0800
Lines: 14
Distribution: su
Message-ID: <dtvdpp$6h7$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0602270125290.12737-100000@elaine40.Stanford.EDU> <C0281036.35F9%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10450

This could be very useful for me.  But I was unable to determine how to make 
this concept work (as I only partly understand the inner workings of their 
Makefile, couldnt decide how to form a command line for linking with 
transport.c, etc.)  If anyone can offer more explaination, that would be 
helpful.

Thanks, Bruce

> If you look at the output of script test, you can see the location of 
> their
> .o files and you can link your transport.c file with them and test.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.J
Date: Mon, 27 Feb 2006 10:12:23 -0800
Lines: 30
Distribution: su
Message-ID: <dtvfe7$8bo$1@news.Stanford.EDU>
References: <dtp6nt$8j1$1@news.Stanford.EDU> <dtu7n8$11d$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dtu7n8$11d$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10451

They are for hw3b. Don't panic :)

--Michi

Naeim Semsarilar wrote:
> Are these 2.* tests for hw3b and 3c? Because when I run the hw3a test 
> script it only gives me results for 1.B through 1.J. Am I missing something?
> 
> *panics*
> 
> 
> Michi Mutsuzaki wrote:
>> I'm trying to figure out why I'm failing the test 2.J. Here is the output:
>>
>>     Test 2.J [out of 14]
>>     Checks student Tx (server) against student Rx (client).
>>
>>     Results:  NOT OK
>>
>>     Unexpected exit status -1.  Program output:
>>     ***Timeout expired during grading
>>     Program output:
>>     server: TESTDATA.0,110230,Ok
>>
>> However, the program runs fine when I execute the same commands as the
>> script. I see from the previous year's newsgroup that some people had
>> trouble with the same test in the past. What was the problem?
>>
>> Thanks!
>> --Michi
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: debug strategy when test scripts fail
Date: Mon, 27 Feb 2006 12:24:34 -0800
Lines: 30
Distribution: su
Message-ID: <dtvn64$gle$1@news.Stanford.EDU>
References: <dtua1n$2k6$1@news.Stanford.EDU> <dtudc2$805$1@news.Stanford.EDU> <dtudji$81m$1@news.Stanford.EDU> <dtuga3$a5m$1@news.Stanford.EDU> <dtuitf$ccb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10452

Thanks Waynn,

As for posting my call to stcp_wait_for_event(), I posted that code snip 
earlier in this thread (the second posting).

I've made the change from "+" to"|", although I agree that I think that is 
the idential operation in this context.  I hav'nt run my next precious run 
of the script with that change as yet.

Anyone have other recommendations?

Thanks, Bruce


"Waynn Lue" <wlue@stanford.edu> wrote in message 
news:dtuitf$ccb$1@news.Stanford.EDU...
> Yeah, that's a Purify error you can ignore.
>
> Can you paste how you're calling wait for event?  Also, I don't think this
> matters, but they use | instead of +.  Since it's all a factor of 2, I'm
> pretty sure it's all the same, but just in case...
>
> So instead of :
>  ctx->event_types = NETWORK_DATA+APP_CLOSE_REQUESTED;
> try:
>  ctx->event_types = NETWORK_DATA | APP_CLOSE_REQUESTED;
>
> Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS 3 Q4
Date: Mon, 27 Feb 2006 14:25:19 -0800
Lines: 8
Distribution: su
Message-ID: <dtvu8m$p66$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10453

Hi,

Question 4 refers to a figure, but there's no figure. Are we supposed to 
draw it?

Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS 3 Q4
Date: Mon, 27 Feb 2006 14:51:04 -0800
Lines: 16
Distribution: su
Message-ID: <dtvvp2$r3b$1@news.Stanford.EDU>
References: <dtvu8m$p66$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10454

Also, can c be zero since c <= P, even though that isn't a realistic 
scenario, if not then what is the lower bound for c.



"Nazia Zaman" <nazia@stanford.edu> wrote in message 
news:dtvu8m$p66$1@news.Stanford.EDU...
> Hi,
>
> Question 4 refers to a figure, but there's no figure. Are we supposed to 
> draw it?
>
> Nazia
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: HW3.A: Time alloted for test case 1C
Date: Mon, 27 Feb 2006 22:57:52 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: <du005g$r45$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10455

Hi TA,

I am just wondering how much time is allotted to test case 1C (testing my 
client with the reference server) for 3A.  My code passed test case 1C 1 out 
of 2 times I tested using the grading script (failed because of grading 
script timed out).  Is it possible my code failed because grading script 
ran out of time for the test case? (but in fact my code is still running, 
not just hanging there)

Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: John Gregorski <jfg@vine6.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Test script 1.I
Date: 27 Feb 2006 16:22:13 -0800
Organization: Stanford University, CA, USA
Lines: 29
Distribution: su
Message-ID: <ynlovev0uybu.fsf@vine6.Stanford.EDU>
References: <C02638C1.358C%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
Xref: shelby.stanford.edu su.class.cs244a:10456

Maybe you've figured this out by now, but my problem with this test case
was that I was sending my FIN twice. Eventually I found the bug in my
code, turned out I was sending a bunch of packets twice.

Sometimes the test case passed and sometimes it failed, it helped to have
debugging output showing the packets sent and received. For some reason I
never had this problem show up in my own testing.

Sunny Balwani <sunnybalwani@hotmail.com> writes:

> Hi.
> I am getting the following error when I run script for 3a.
> 
> 
> Test 1.I [out of 5]
> Checks that FIN is correctly ACKed.
> Results:  NOT OK
> No ACK for FIN with sequence number 13
> 
> 
> I have tested the code several ways and cant reproduce this problem.  Even
> when I transfer large files or just simple echo request, my code always gets
> the right acks for FINs (both the client and server) and the connection gets
> properly terminated (4 way termination).
> 
> Can you please give some pointers as to what this client code is doing so I
> can try to reproduce this problem.
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: resending packet
Date: Tue, 28 Feb 2006 00:00:58 -0800
Lines: 7
Distribution: su
Message-ID: <du0vvo$434$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10457

If I've sent a packet with seq = 100 and len = 100 (so 100-199), and I've
received an ACK for 150, is it ok to resend the packet again with seq = 100
and len = 100, or do I have to send seq = 150 and len = 50?

Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: Tom Wang <ayanami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Malformed response from server
Date: Tue, 28 Feb 2006 06:36:22 -0800
Lines: 45
Distribution: su
Message-ID: <du1n55$qd4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10458

   Somehow started getting a weird error and not sure where it's coming 
from:

../server
Server's address is elaine35.Stanford.EDU:64844
Network data received, processing SYN!
ACK number is: 228 SEQ number is: 214
SYN-ACK packet sent!
Network data received, processing ACK!
Entering control loop!
Passive!
connected to 171.64.15.103 at port 50428

../client -f TESTING elaine35:64844
SYN packet sent! Number: 227
Network data received, processing SYN-ACK!
ACK number is: 215 SEQ number is: 228
ACK packet sent!
Entering control loop!
Active!
Application data requested! Bytes 9, Window 3072
Active!
server: TESTING
Malformed response from server.
Application close requested!
Active!

The code I'm running for application data is:

    bytes_read = stcp_app_recv(sd, buf,
        MIN(STCP_MSS,ctx->window_size-bytes_sent));
    stcp_app_send(sd, buf, bytes_read);

The server ought to be printing:
client: TESTING

but instead it's tripping on
         rc = get_nvt_line(sd, line);
         if (rc < 0 || !*line)
             goto done;

Anyone have any insight?  client.c adds a \r\n to TESTING, making it 9 
bytes, so I don't see why server.c isn't running process_line() on it...

- Tom
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Test 2.L (5 retransmissions)
Date: Tue, 28 Feb 2006 20:31:19 +0000 (UTC)
Lines: 47
Distribution: su
Message-ID: <du2bun$dut$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10459

I am having trouble understanding the desired behavior of test 2.L so any
help from Matt, Ari, Santa Claus, or a helpful someone would be cool..

As I understand it, the test goes something like:
Server                            Client
Listen
                                  connect
                                  send some data (12 bytes)
Ack data
send response (20 bytes)
                                  Ack 20 bytes
send window of data
                                  dont respond, but count messages
Timeout1
resend window of data

Timeout2
resend window of data

Timeout3
resend window of data

Timeout4
resend window of data

Timeout5
resend window of data

Abort

1- If I log every packet sent for the whole of test 2 (as in all subtests) I
dont see _any_ packet with the sequence number mentioned in the test output.  
Is it possible you are printing sequence number for a byte in the packet
instead "packet with sequence number" ####?  It looks like the error message
describes the nth byte of data after the setup phase, not a sequence number.

2- Since its possible to count program invocations and thus different log files
(files are indexed by pid) I know which log corresponds to this test even
though I cant find the sequence number mentioned in 1.  This
log shows that when a failure occurs it coincides to when the "Ack 20 bytes" 
is received after the "send window of data" in which case the ack of 20 frees 
up 20 slots in the window and means that those 20 bytes go out in their own 
packet.  So, each byte of the window is sent 6 times: once originally and 5
times for retransmission.  Which leaves me not knowing what the correct
sequence should be to pass this test.


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: 2.K ^^^^^^ was what I meant
Date: Tue, 28 Feb 2006 20:41:33 +0000 (UTC)
Lines: 2
Distribution: su
Message-ID: <du2cht$dut$2@news.Stanford.EDU>
References: <du2bun$dut$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10460


Oops, I meant 2.K
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Malformed response from server
Date: Tue, 28 Feb 2006 14:30:34 -0800
Organization: Stanford University
Lines: 6
Distribution: su
Message-ID: <20060228143034.3f05b207@ballpoint>
References: <du1n55$qd4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10461

>     bytes_read = stcp_app_recv(sd, buf,
>         MIN(STCP_MSS,ctx->window_size-bytes_sent));
>     stcp_app_send(sd, buf, bytes_read);

Doesn't that mean that you are receiving data from the application (from
mywrite), then sending it right back up (to myread)?
.

Path: shelby.stanford.edu!not-for-mail
From: Eric Friedman <efriedman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Question about penalty for late assignments
Date: Tue, 28 Feb 2006 17:36:32 -0800
Lines: 6
Distribution: su
Message-ID: <4404FAA0.8000100@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10462

If the one free late day is used for an assignment, but then that 
assignment is ultimately turned in two days late, will 25% or 50% of the 
grade be lost as a penalty? I am assuming it is only 25%, but just want 
to make sure.

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw3b out of order packets
Date: Tue, 28 Feb 2006 19:12:08 -0800
Lines: 22
Distribution: su
Message-ID: <du33e7$gb0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10463

 From the assignment:
"Your receiver must buffer any data it receives, even if it arrives out 
of order. (This isn't strictly required by TCP, but almost any "real" 
TCP implementation would perform this optimization, and you must too)."

I'm not too clear on what this means.
1)In ESTABLISHED, the sender should never send data outside of my 
receiver's advertised window. Is the recv window buffer enough, or 
should I buffer everything I receive no matter what?

2)I don't see why I should buffer packets before I'm in the established 
state. I can't possibly receive a packet with a data load before I've 
received a SYN or SYN/ACK.  And if data arrives before the last ACK, it 
should just have the ACK flag set anyway.

3)Buffering "any data" I receive sounds like the buffer is unbounded and 
could pose a security risk if a malicious user tries to take advantage 
of this buffer.

Any comments appreciated.
Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: HW Problem 4
Date: Wed, 1 Mar 2006 04:36:34 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: <du38ci$kp4$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10464


In the problem it states: "The figure below shows how the traffic is
constrained" but there is no figure.  
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3b out of order packets
Date: Tue, 28 Feb 2006 20:40:36 -0800
Lines: 11
Distribution: su
Message-ID: <du38k4$l06$1@news.Stanford.EDU>
References: <du33e7$gb0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du33e7$gb0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10465


> 3)Buffering "any data" I receive sounds like the buffer is unbounded and 
> could pose a security risk if a malicious user tries to take advantage 
> of this buffer.

At first I buffered everything that came in with a higher sequence 
number than my last received, but then I failed a bunch of tests for 
part B.  I fixed it by only buffering data that falls in our receiving 
window.

Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3b out of order packets
Date: Tue, 28 Feb 2006 21:45:38 -0800
Lines: 28
Distribution: su
Message-ID: <du3ce3$odm$1@news.Stanford.EDU>
References: <du33e7$gb0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <du33e7$gb0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10466

On the same note, can a packet cross BOTH ends of the receiver window? 
What should we do in that case? Split into 3 parts and ack/discard 1st 
part, save/ack 2nd part, discard/don't ack 3rd part?


Will Palmeri wrote:
>  From the assignment:
> "Your receiver must buffer any data it receives, even if it arrives out 
> of order. (This isn't strictly required by TCP, but almost any "real" 
> TCP implementation would perform this optimization, and you must too)."
> 
> I'm not too clear on what this means.
> 1)In ESTABLISHED, the sender should never send data outside of my 
> receiver's advertised window. Is the recv window buffer enough, or 
> should I buffer everything I receive no matter what?
> 
> 2)I don't see why I should buffer packets before I'm in the established 
> state. I can't possibly receive a packet with a data load before I've 
> received a SYN or SYN/ACK.  And if data arrives before the last ACK, it 
> should just have the ACK flag set anyway.
> 
> 3)Buffering "any data" I receive sounds like the buffer is unbounded and 
> could pose a security risk if a malicious user tries to take advantage 
> of this buffer.
> 
> Any comments appreciated.
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3b out of order packets
Date: Tue, 28 Feb 2006 22:14:50 -0800
Lines: 35
Distribution: su
Message-ID: <du3e4q$pnr$1@news.Stanford.EDU>
References: <du33e7$gb0$1@news.Stanford.EDU> <du3ce3$odm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du3ce3$odm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10467

Just take the bytes that are within the window.

.... but I'm no TA.

Hau Jia Chew wrote:
> On the same note, can a packet cross BOTH ends of the receiver window? 
> What should we do in that case? Split into 3 parts and ack/discard 1st 
> part, save/ack 2nd part, discard/don't ack 3rd part?
> 
> 
> Will Palmeri wrote:
> 
>>  From the assignment:
>> "Your receiver must buffer any data it receives, even if it arrives 
>> out of order. (This isn't strictly required by TCP, but almost any 
>> "real" TCP implementation would perform this optimization, and you 
>> must too)."
>>
>> I'm not too clear on what this means.
>> 1)In ESTABLISHED, the sender should never send data outside of my 
>> receiver's advertised window. Is the recv window buffer enough, or 
>> should I buffer everything I receive no matter what?
>>
>> 2)I don't see why I should buffer packets before I'm in the 
>> established state. I can't possibly receive a packet with a data load 
>> before I've received a SYN or SYN/ACK.  And if data arrives before the 
>> last ACK, it should just have the ACK flag set anyway.
>>
>> 3)Buffering "any data" I receive sounds like the buffer is unbounded 
>> and could pose a security risk if a malicious user tries to take 
>> advantage of this buffer.
>>
>> Any comments appreciated.
>> Thanks,
>> Will
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3b out of order packets
Date: Tue, 28 Feb 2006 22:30:34 -0800
Organization: Stanford University
Lines: 38
Distribution: su
Message-ID: <20060228223034.71b6dc9b@ballpoint>
References: <du33e7$gb0$1@news.Stanford.EDU>
	<du3ce3$odm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10468

That could only happen if the data is larger than your window size. 
Since we are implementing a fixed receive window that is bigger than our
MSS, it shouldn't be able to happen for incoming packets.

Right?


On Tue, 28 Feb 2006 21:45:38 -0800
Hau Jia Chew <haujia@stanford.edu> wrote:

> On the same note, can a packet cross BOTH ends of the receiver window? 
> What should we do in that case? Split into 3 parts and ack/discard 1st 
> part, save/ack 2nd part, discard/don't ack 3rd part?
> 
> 
> Will Palmeri wrote:
> >  From the assignment:
> > "Your receiver must buffer any data it receives, even if it arrives out 
> > of order. (This isn't strictly required by TCP, but almost any "real" 
> > TCP implementation would perform this optimization, and you must too)."
> > 
> > I'm not too clear on what this means.
> > 1)In ESTABLISHED, the sender should never send data outside of my 
> > receiver's advertised window. Is the recv window buffer enough, or 
> > should I buffer everything I receive no matter what?
> > 
> > 2)I don't see why I should buffer packets before I'm in the established 
> > state. I can't possibly receive a packet with a data load before I've 
> > received a SYN or SYN/ACK.  And if data arrives before the last ACK, it 
> > should just have the ACK flag set anyway.
> > 
> > 3)Buffering "any data" I receive sounds like the buffer is unbounded and 
> > could pose a security risk if a malicious user tries to take advantage 
> > of this buffer.
> > 
> > Any comments appreciated.
> > Thanks,
> > Will
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3b out of order packets
Date: Tue, 28 Feb 2006 22:45:05 -0800
Lines: 39
Distribution: su
Message-ID: <du3fte$rdm$1@news.Stanford.EDU>
References: <du33e7$gb0$1@news.Stanford.EDU> <du3ce3$odm$1@news.Stanford.EDU> <du3e4q$pnr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <du3e4q$pnr$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10469

I agree with you. I'll await confirmation from a TA.
-Will

Steve Goldman wrote:
> Just take the bytes that are within the window.
> 
> ... but I'm no TA.
> 
> Hau Jia Chew wrote:
>> On the same note, can a packet cross BOTH ends of the receiver window? 
>> What should we do in that case? Split into 3 parts and ack/discard 1st 
>> part, save/ack 2nd part, discard/don't ack 3rd part?
>>
>>
>> Will Palmeri wrote:
>>
>>>  From the assignment:
>>> "Your receiver must buffer any data it receives, even if it arrives 
>>> out of order. (This isn't strictly required by TCP, but almost any 
>>> "real" TCP implementation would perform this optimization, and you 
>>> must too)."
>>>
>>> I'm not too clear on what this means.
>>> 1)In ESTABLISHED, the sender should never send data outside of my 
>>> receiver's advertised window. Is the recv window buffer enough, or 
>>> should I buffer everything I receive no matter what?
>>>
>>> 2)I don't see why I should buffer packets before I'm in the 
>>> established state. I can't possibly receive a packet with a data load 
>>> before I've received a SYN or SYN/ACK.  And if data arrives before 
>>> the last ACK, it should just have the ACK flag set anyway.
>>>
>>> 3)Buffering "any data" I receive sounds like the buffer is unbounded 
>>> and could pose a security risk if a malicious user tries to take 
>>> advantage of this buffer.
>>>
>>> Any comments appreciated.
>>> Thanks,
>>> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test script for Part C
Date: Tue, 28 Feb 2006 23:12:51 -0800
Lines: 11
Distribution: su
Message-ID: <du3hhj$t0q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10470

Hi,

Has anyone gotten the test script to work for part C?  Locally, when I 
type "make", everything builds including ftpcopy_tcp and ftpd_tcp.  I 
run the test script and pass it all my .c and .h files, but it tells me, 
"***not submitting test, build failed for target stcp_ftp***".

Anyone?

Thanks,
Steve
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Test script for Part C
Date: Wed, 1 Mar 2006 08:04:40 +0000 (UTC)
Lines: 2
Distribution: su
Message-ID: <du3kin$4su$1@news.Stanford.EDU>
References: <du3hhj$t0q$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10471

I got it to compile something but I am not sure its compiling my transport.c
into the code.  It does submit the test though.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW Problem 4
Date: Wed, 01 Mar 2006 00:50:55 -0800
Lines: 6
Distribution: su
Message-ID: <du3nfs$8ce$1@news.Stanford.EDU>
References: <du38ci$kp4$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <du38ci$kp4$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10472

Yes, there should be a figure there. We will have a corrected problem 
set available shortly.

Stefan Thomas Mohler wrote:
> In the problem it states: "The figure below shows how the traffic is
> constrained" but there is no figure.  
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3b out of order packets
Date: Wed, 01 Mar 2006 00:59:56 -0800
Lines: 30
Distribution: su
Message-ID: <du3o0n$8k5$1@news.Stanford.EDU>
References: <du33e7$gb0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <du33e7$gb0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10473

Yes, you should only buffer the bytes of data that fall within your 
window. If a packet arrives with some of the bytes inside the window and 
some of the bytes outside the window, buffer only the bytes that fall 
inside the window.

Ari

Will Palmeri wrote:
>  From the assignment:
> "Your receiver must buffer any data it receives, even if it arrives out 
> of order. (This isn't strictly required by TCP, but almost any "real" 
> TCP implementation would perform this optimization, and you must too)."
> 
> I'm not too clear on what this means.
> 1)In ESTABLISHED, the sender should never send data outside of my 
> receiver's advertised window. Is the recv window buffer enough, or 
> should I buffer everything I receive no matter what?
> 
> 2)I don't see why I should buffer packets before I'm in the established 
> state. I can't possibly receive a packet with a data load before I've 
> received a SYN or SYN/ACK.  And if data arrives before the last ACK, it 
> should just have the ACK flag set anyway.
> 
> 3)Buffering "any data" I receive sounds like the buffer is unbounded and 
> could pose a security risk if a malicious user tries to take advantage 
> of this buffer.
> 
> Any comments appreciated.
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question about penalty for late assignments
Date: Wed, 01 Mar 2006 01:00:52 -0800
Lines: 9
Distribution: su
Message-ID: <du3o2f$8k5$2@news.Stanford.EDU>
References: <4404FAA0.8000100@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <4404FAA0.8000100@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10474

25% would be taken off in that case.

Eric Friedman wrote:
> If the one free late day is used for an assignment, but then that 
> assignment is ultimately turned in two days late, will 25% or 50% of the 
> grade be lost as a penalty? I am assuming it is only 25%, but just want 
> to make sure.
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Possible deadlock somewhere?
Date: Wed, 1 Mar 2006 02:10:39 -0800
Lines: 25
Distribution: su
Message-ID: <du3rvc$ccj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10475

Hi,

I'm getting this problem ever since I tried to introduce timeouts, APP_DATA 
just never gets called when I specify the filename in the client. It just 
hangs there. On debugging, I found out that the thread is getting blocked on 
data_ready_cond. How do I begin to debug this?
Here is the gdb output.



Breakpoint 3, _mysock_dequeue_buffer (ctx=0x2f148, pq=0x2f7f0, 
dst=0xffbeee66, max_len=1,
    remove_partial=1) at mysock.c:193
193             assert(ctx && pq && dst);
(gdb) n
196             PTHREAD_CALL(pthread_mutex_lock(&ctx->data_ready_lock));
(gdb) n
197             while (!pq->head)
(gdb) n
199 
PTHREAD_CALL(pthread_cond_wait(&ctx->data_ready_cond,
(gdb) n
 >>> just hangs there.


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: CS140 List Code, Revisited
Date: Wed, 1 Mar 2006 04:02:31 -0800
Organization: Stanford University
Lines: 19
Distribution: su
Message-ID: <20060301040231.268c4f6c@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10476

Earlier, a student asked if we could use the CS140 list code in projects
for this class.  A TA responded that that would be unfair because it
would give us an unfair advantage over students who hadn't taken 140.  I
would like to request that the teaching staff reconsider this because:

1) CS140 is a "strict prerequisite" for this class.

2) The list code is available to anyone at
http://www.stanford.edu/class/cs140/pintos/pintos.tar.gz
(in list.c and list.h under lib/kernel)

3) The code is very well documented, making it easy to pick up for
students who have not used it before.

I'm doing some slightly tricky stuff with (two types of) linked lists
for project 3, and I'd much rather include some of that code than write
and debug my own linked list.

--David
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: CS140 List Code, Revisited
Date: Wed, 1 Mar 2006 04:05:47 -0800
Organization: Stanford University
Lines: 31
Distribution: su
Message-ID: <20060301040547.507eef17@ballpoint>
References: <20060301040231.268c4f6c@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10477

I'm sorry.  I'm a bit tired, and I forgot to say "please" and "thank you."

Would you *please* reconsider this request?  *Thank you* for your consideration.

:)

--David


On Wed, 1 Mar 2006 04:02:31 -0800
David Reiss <dreiss@stanford.edu> wrote:

> Earlier, a student asked if we could use the CS140 list code in projects
> for this class.  A TA responded that that would be unfair because it
> would give us an unfair advantage over students who hadn't taken 140.  I
> would like to request that the teaching staff reconsider this because:
> 
> 1) CS140 is a "strict prerequisite" for this class.
> 
> 2) The list code is available to anyone at
> http://www.stanford.edu/class/cs140/pintos/pintos.tar.gz
> (in list.c and list.h under lib/kernel)
> 
> 3) The code is very well documented, making it easy to pick up for
> students who have not used it before.
> 
> I'm doing some slightly tricky stuff with (two types of) linked lists
> for project 3, and I'd much rather include some of that code than write
> and debug my own linked list.
> 
> --David
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test 2.K (5 or 6 transmissions)
Date: Wed, 1 Mar 2006 11:48:51 -0800
Organization: Stanford University
Lines: 17
Distribution: su
Message-ID: <20060301114851.2a78b1a6@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10478

The assignment says:

If the timeout for a segment is reached, the segment is examined. If it
has been sent a total of 6 times (once from the original send plus 5
retransmissions), then the network is assumed to have failed and the
network terminated.

I'm pretty sure that this is what I've implemented (when I suspend the
client mid-transfer and look at the server log, it sends the last
sequence number ACKed by the client exactly 6 times).  But when I run
the tests, test 2.K says "Sequence number X was retransmitted up to 6
times."  Is it possible that the the test is testing for 5 total
transmissions instead of 5 *re*-transmissions, or is my program sending
some sequence number 7 times in a way that I haven't detected.  Is
anyone else experiencing this?

--David
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.K (5 or 6 transmissions)
Date: Wed, 1 Mar 2006 21:21:44 +0000 (UTC)
Lines: 23
Distribution: su
Message-ID: <du5398$l09$1@news.Stanford.EDU>
References: <20060301114851.2a78b1a6@ballpoint>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10479

Having spent many hours trying to understand 2.k I can answer something
of your question.

So the test is definitely looking for 5 retransmissions (6 total transmissions)
of something, but I believe it is doing it in a broken way that leaves the
answer depending on machine delay somewhat.  I pass the test half the time
and fail the other half the time.  The difference seems to be when the
test client sends an ACK for 20 bytes of info that is transmitted in test
setup. Here is a brief summar of the interchange (more detailed summuary
in my last post on this subject):

Your code (which is used in the server) gets a short message (12 bytes)
and then responds with a short message (20 bytes) and then "very soon" 
after responding with 20 bytes it begins to send a full window of data.

If the test client acks your 20 byte message after you have begun sending
the window of data then you end up clearing up 20 bytes in your send window
and sending another packet.  If you get the ack before you send the window
you send the same info with one fewer packets.  

I have posted a few times about this starting several days ago and not yet
seen any info. If you can figure anything else out I would be most 
appreciative of a post.
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Not getting reply after SYN on several tests
Date: Wed, 1 Mar 2006 13:32:41 -0800
Lines: 651
Distribution: su
Message-ID: <du53tr$md3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10480


I have a mysterious bug that is keeping me from passing over half the tests 
in 3a.  (BTW, the "a" is not a typo.)  Perhaps someone has seen something 
similar and can lend advice, as I am in serious need of a breakthrough, 
after being hung up for several days now.  Three parts to my question:

#1.)
I generate debugging log files during each run of transport_init().  During 
the test script run, most of the tests have this extremely simple result:

DBG11,generate_initial_seq_num() calling srand()
DBG06,send_packet() **************
DGG06,Outbound packet has SYN
DBG10-Outbound- SEQ#=200, ACK#=0, OFF=5, FLG=2, WIN=3072
DBG09-State change from CLOSED to SYN_SENT
DBG11, Current time is 1141245740.499996 sec
DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
DBG11, control_loop, received event=0
DBG11, Current time is 1141245740.801856 sec
DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
DBG11, control_loop, received event=0
DBG11, Current time is 1141245741.111847 sec
DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
DBG11, control_loop, received event=0
DBG11, Current time is 1141245741.421818 sec
DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
..... and this repeats forever until it terminates.

Thus, my transport_init() is sending a SYN, but it never receives a reply of 
any kind.  What could possibly keep the peer from replying?

#2.)
When I review the /grading_src/build contents, I see that the test script 
first builds to executables: client & server.  After these are built, then 
apparently three tests are run, as I have three of my log files generated at 
that time.  Each of these three log files contains what appears to be a 
complete, successful transaction, from SYN handshake at start, to data 
transfer, to FIN/teardown at end.  (An example is attached below)

Next, the test script creates two new executables: client.log & server.log. 
After these are created, all remaining 13 log files created contain the 
precise sequence I show above in part #1 of my question.  Does anyone know 
what is different about client vs client.log and server vs sever.log, in 
order that I might have a clue as to what is causing the different behaviors 
between them?

#3.)
One very curious observation is that absolutely all of the 15 log files 
created start with my transport_init() issuing the SYN at the start.  In 
other words, transport_init() always seems to think it is the "active" side 
of the transaction.  Yet in my testing with my own client & server, 
transport_init() successfully handles both cases of active and "listening" 
roles.    In fact, here is the code that makes the determination near start 
of transport_init()...

    /* Depending on whether the local side of the connection is active or
     * passive, set the "state machine" (ctx.conn_state) to proper
     * starting state before the message loop begins.  */
    if ( is_active ) {
      /* Active end of the connection sends the starting SYN packet. */
      if ( !send_packet( &ctx, TH_SYN, 0, 0 ) ) {
        send_error_to_app( &ctx, ECONNREFUSED );
        return;
      }
      ctx.conn_state = CSTATE_SYN_SENT;
      if (dbg09) dbprintf(
           "DBG09-State change from CLOSED to SYN_SENT\n");
    } else {
      /* We are the passive end, so we'll just await a SYN... */
      ctx.conn_state = CSTATE_LISTEN;
      if (dbg09) dbprintf(
           "DBG09-State change from CLOSED to CSTATE_LISTEN\n");
    }

Finally, below is a listing of a log file for one of the tests that seems to 
run successfully, as a point of comparison.

Thanks!
-- Bruce


---------------------------------------------------


DBG11,generate_initial_seq_num() calling srand()

DBG06,send_packet() **************

DGG06,Outbound packet has SYN

DBG10-Outbound- SEQ#=233, ACK#=0, OFF=5, FLG=2, WIN=3072

DBG09-State change from CLOSED to SYN_SENT

DBG11, Current time is 1141245735.986576 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has ACK

DBG06,Incoming packet has SYN

DBG10-Incoming- SEQ#=233, ACK#=234, OFF=5, FLG=18, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_SYN_SENT

DBG09-State change from SYN_SENT to ESTABLISHED

DBG06,CSTATE_SYN_SENT,send ACK

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245735.988635 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=1

DBG11,send_app_data_to_peer() started.

DBG06,send_packet() **************

DGG06,Outbound packet has DATA

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245735.989509 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG11, Current time is 1141245736.182790 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=254, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.191442 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=254, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=790, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.193028 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=790, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=1326, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.197541 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=1326, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=1862, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.199054 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=1862, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=2398, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.200503 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=2398, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=2934, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.203799 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=2934, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=3306, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.205233 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=3306, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=3326, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.383771 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=3326, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=3862, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.389391 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=3862, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=4398, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.391040 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=4398, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=4934, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.394449 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=4934, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=5254, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.395853 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has DATA

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=5254, ACK#=246, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_ESTABLISHED

DBG06,pass_packet_data_to_app called

DBG06,pass_packet_data_to_app, data passed up

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=16, WIN=3072

DBG11, Current time is 1141245736.397709 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)

DBG11, control_loop, received event=4

DBG09****---process_close_request() called

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DGG06,Outbound packet has FIN

DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=17, WIN=3072

DBG09-State change from <various> to FIN_WAIT1

DBG11, Current time is 1141245736.402595 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has ACK

DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=16, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_FIN_WAIT1

DBG09-State change from FIN_WAIT1 to FIN_WAIT2

DBG11, Current time is 1141245736.582770 sec

DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000 sec)

DBG11, control_loop, received event=2

DBG11,Will now call stcp_network_recv()

DBG06,Incoming packet************

DBG06,Incoming packet has ACK

DBG06,Incoming packet has FIN

DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=17, WIN=3072

DBG11,Will now call recalc_windows()

DBG11,Will now run switch ( ctx->conn_state )

DBG05,proc_nw_dat,CSTATE_FIN_WAIT2

DBG09-State change from FIN_WAIT2 to CLOSED

DBG06,send_packet() **************

DGG06,Outbound packet has ACK

DBG10-Outbound- SEQ#=247, ACK#=5353, OFF=5, FLG=16, WIN=3072


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Not getting reply after SYN on several tests
Date: Wed, 1 Mar 2006 21:55:29 +0000 (UTC)
Lines: 26
Distribution: su
Message-ID: <du558h$l09$2@news.Stanford.EDU>
References: <du53tr$md3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10481

Bruce-- So it looks/sounds like you are having problems only when your code
is used as a server talking to the reference/TA STCP being used as a client.

Your logging indicates that you sent a packet and did not receive a response.
So it seems safe to assume the packet left you code and was handed to the
stcp api (since you can put logging in up to that point). Since you code just
repeats messages while waiting, it seems like the server didnt crash or 
have an assertion.  

The next question I would ask is whether the test client dies upon receipt of
your packet or just drops your packet because it appears malformed.  

For the packet of death case, the most likely cause of death is probably an
assertion failure in the client since assert prints to stderr and they redirect
stderr.  Their test script output that was redirected is on some file 
which begins with a dot like grading_src/build/.server_output or something, 
(and it gets clobbered for each test) so if you can ctrl-C the test or copy
this file while your code is waiting you might get some more feedback.

For the drop case, you would have to send a pretty ugly packet since a SYN is
reasonable to receive most times.

Once all these thoughts fail, the lastest mostest desperate plan might be to
run your code in server mode on the elaines and have someone else try to 
connect to you as client and then show you the logfile of your packets.  That
doesnt sound illegal but maybe Ari or Matt will holler if it is.
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting reply after SYN on several tests
Date: Wed, 1 Mar 2006 14:21:27 -0800
Lines: 676
Distribution: su
Message-ID: <du56pd$q4p$1@news.Stanford.EDU>
References: <du53tr$md3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10482

Bruce,

    I think a possible cause of your problem is the way you call 
stcp_wait_for_event. I don't use the logging mechanism provided in 
our_dprintf(), so I don't know if I'm reading your log right, but from what 
I can see, you are calling stcp_wait_for_event with the wait-time set to 0.3 
seconds. I traced through some of the code that stcp_wait_for_event goes 
through, and I realise that the wait-time should actually be provided as an 
absolute time, not something relative to the current time. So, in effect, if 
you're passing in 0.3 seconds, the program assumes u are intending to wake 
up 0.3 seconds after midnight, Jan 1st 1970. Since this was long ago, the 
stcp_wait_for_event returns immediately with a timeout event (and that's why 
you're always getting control_loop, received event=0). So u're essentially 
cycling furiously in a loop without actually blocking for any incoming data. 
This could perhaps be why you're having a problem. Try replacing the 0.3 
seconds with a NULL and it might solve the problem. Hope that helps :)

Ram

"Bruce Schechter" <bruceds@stanford.edu> wrote in message 
news:du53tr$md3$1@news.Stanford.EDU...
>
> I have a mysterious bug that is keeping me from passing over half the 
> tests in 3a.  (BTW, the "a" is not a typo.)  Perhaps someone has seen 
> something similar and can lend advice, as I am in serious need of a 
> breakthrough, after being hung up for several days now.  Three parts to my 
> question:
>
> #1.)
> I generate debugging log files during each run of transport_init(). 
> During the test script run, most of the tests have this extremely simple 
> result:
>
> DBG11,generate_initial_seq_num() calling srand()
> DBG06,send_packet() **************
> DGG06,Outbound packet has SYN
> DBG10-Outbound- SEQ#=200, ACK#=0, OFF=5, FLG=2, WIN=3072
> DBG09-State change from CLOSED to SYN_SENT
> DBG11, Current time is 1141245740.499996 sec
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
> DBG11, control_loop, received event=0
> DBG11, Current time is 1141245740.801856 sec
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
> DBG11, control_loop, received event=0
> DBG11, Current time is 1141245741.111847 sec
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
> DBG11, control_loop, received event=0
> DBG11, Current time is 1141245741.421818 sec
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
> .... and this repeats forever until it terminates.
>
> Thus, my transport_init() is sending a SYN, but it never receives a reply 
> of any kind.  What could possibly keep the peer from replying?
>
> #2.)
> When I review the /grading_src/build contents, I see that the test script 
> first builds to executables: client & server.  After these are built, then 
> apparently three tests are run, as I have three of my log files generated 
> at that time.  Each of these three log files contains what appears to be a 
> complete, successful transaction, from SYN handshake at start, to data 
> transfer, to FIN/teardown at end.  (An example is attached below)
>
> Next, the test script creates two new executables: client.log & 
> server.log. After these are created, all remaining 13 log files created 
> contain the precise sequence I show above in part #1 of my question.  Does 
> anyone know what is different about client vs client.log and server vs 
> sever.log, in order that I might have a clue as to what is causing the 
> different behaviors between them?
>
> #3.)
> One very curious observation is that absolutely all of the 15 log files 
> created start with my transport_init() issuing the SYN at the start.  In 
> other words, transport_init() always seems to think it is the "active" 
> side of the transaction.  Yet in my testing with my own client & server, 
> transport_init() successfully handles both cases of active and "listening" 
> roles.    In fact, here is the code that makes the determination near 
> start of transport_init()...
>
>    /* Depending on whether the local side of the connection is active or
>     * passive, set the "state machine" (ctx.conn_state) to proper
>     * starting state before the message loop begins.  */
>    if ( is_active ) {
>      /* Active end of the connection sends the starting SYN packet. */
>      if ( !send_packet( &ctx, TH_SYN, 0, 0 ) ) {
>        send_error_to_app( &ctx, ECONNREFUSED );
>        return;
>      }
>      ctx.conn_state = CSTATE_SYN_SENT;
>      if (dbg09) dbprintf(
>           "DBG09-State change from CLOSED to SYN_SENT\n");
>    } else {
>      /* We are the passive end, so we'll just await a SYN... */
>      ctx.conn_state = CSTATE_LISTEN;
>      if (dbg09) dbprintf(
>           "DBG09-State change from CLOSED to CSTATE_LISTEN\n");
>    }
>
> Finally, below is a listing of a log file for one of the tests that seems 
> to run successfully, as a point of comparison.
>
> Thanks!
> -- Bruce
>
>
> ---------------------------------------------------
>
>
> DBG11,generate_initial_seq_num() calling srand()
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has SYN
>
> DBG10-Outbound- SEQ#=233, ACK#=0, OFF=5, FLG=2, WIN=3072
>
> DBG09-State change from CLOSED to SYN_SENT
>
> DBG11, Current time is 1141245735.986576 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has ACK
>
> DBG06,Incoming packet has SYN
>
> DBG10-Incoming- SEQ#=233, ACK#=234, OFF=5, FLG=18, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_SYN_SENT
>
> DBG09-State change from SYN_SENT to ESTABLISHED
>
> DBG06,CSTATE_SYN_SENT,send ACK
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245735.988635 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=1
>
> DBG11,send_app_data_to_peer() started.
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has DATA
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245735.989509 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG11, Current time is 1141245736.182790 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=254, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.191442 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=254, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=790, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.193028 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=790, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=1326, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.197541 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=1326, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=1862, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.199054 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=1862, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=2398, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.200503 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=2398, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=2934, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.203799 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=2934, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=3306, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.205233 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=3306, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=3326, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.383771 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=3326, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=3862, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.389391 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=3862, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=4398, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.391040 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=4398, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=4934, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.394449 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=4934, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=5254, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.395853 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has DATA
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=5254, ACK#=246, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>
> DBG06,pass_packet_data_to_app called
>
> DBG06,pass_packet_data_to_app, data passed up
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=16, WIN=3072
>
> DBG11, Current time is 1141245736.397709 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=4
>
> DBG09****---process_close_request() called
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DGG06,Outbound packet has FIN
>
> DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=17, WIN=3072
>
> DBG09-State change from <various> to FIN_WAIT1
>
> DBG11, Current time is 1141245736.402595 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has ACK
>
> DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=16, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_FIN_WAIT1
>
> DBG09-State change from FIN_WAIT1 to FIN_WAIT2
>
> DBG11, Current time is 1141245736.582770 sec
>
> DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000 sec)
>
> DBG11, control_loop, received event=2
>
> DBG11,Will now call stcp_network_recv()
>
> DBG06,Incoming packet************
>
> DBG06,Incoming packet has ACK
>
> DBG06,Incoming packet has FIN
>
> DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=17, WIN=3072
>
> DBG11,Will now call recalc_windows()
>
> DBG11,Will now run switch ( ctx->conn_state )
>
> DBG05,proc_nw_dat,CSTATE_FIN_WAIT2
>
> DBG09-State change from FIN_WAIT2 to CLOSED
>
> DBG06,send_packet() **************
>
> DGG06,Outbound packet has ACK
>
> DBG10-Outbound- SEQ#=247, ACK#=5353, OFF=5, FLG=16, WIN=3072
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Weird error
Date: Wed, 1 Mar 2006 14:33:32 -0800
Lines: 17
Distribution: su
Message-ID: <du57g4$qoq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10483

Hi,
The file transfer goes half way, and I'm NOT using the server and client 
with -U to check whether the rest of the implementation works, however the 
server sends this packet:
log: network_send: an ACK packet with seq=6360, len=22 and ack=118 and 
timestamp=3085920549
And on the client side, a weird packet is received with seq =1, and this is 
in stcp_api.c before transport.c kicks in. Any idea how the network could be 
messing packets up?
log: network_recv: a SYN packet with seq=1
Assertion failed: len <= 0 || 
_mysock_verify_checksum(_mysock_get_context(sd), dst, len), file stcp_api.c, 
line 166
Abort
Thanks,


.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test script for Part C
Date: Wed, 01 Mar 2006 15:24:23 -0800
Lines: 11
Distribution: su
Message-ID: <du5af8$1p2$1@news.Stanford.EDU>
References: <du3hhj$t0q$1@news.Stanford.EDU> <du3kin$4su$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du3kin$4su$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10484

Stefan, I got this to work after changing everything back to working 
directory paths in the makefile.  I think it is compiling my stuff.

Question for TAs: are these the same exact tests that we ran for 
assignment one?

Thanks.

Stefan Thomas Mohler wrote:
> I got it to compile something but I am not sure its compiling my transport.c
> into the code.  It does submit the test though.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Question about acks
Date: Wed, 01 Mar 2006 15:51:56 -0800
Lines: 6
Distribution: su
Message-ID: <du5c32$3he$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10485

Can I assume that the ACKs my STCP layer receives are on the boundaries 
of the segments it transmitted? For example if STCP transmit a data 
segment with sequence number 100 and length 200 (i.e. bytes 100 through 
299), can I assume that ACK# 147 is impossible and only expect ACK# 300?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting reply after SYN on several tests
Date: Wed, 1 Mar 2006 16:57:19 -0800
Lines: 723
Distribution: su
Message-ID: <du5fta$7mr$1@news.Stanford.EDU>
References: <du53tr$md3$1@news.Stanford.EDU> <du56pd$q4p$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10486

Also, for 3A you shouldn't have to deal with timeouts at all, so you might
as well just pass in NULL for that argument.

Waynn

"Ramanan" <ramananr@stanford.edu> wrote in message
news:du56pd$q4p$1@news.Stanford.EDU...
> Bruce,
>
>     I think a possible cause of your problem is the way you call
> stcp_wait_for_event. I don't use the logging mechanism provided in
> our_dprintf(), so I don't know if I'm reading your log right, but from
what
> I can see, you are calling stcp_wait_for_event with the wait-time set to
0.3
> seconds. I traced through some of the code that stcp_wait_for_event goes
> through, and I realise that the wait-time should actually be provided as
an
> absolute time, not something relative to the current time. So, in effect,
if
> you're passing in 0.3 seconds, the program assumes u are intending to wake
> up 0.3 seconds after midnight, Jan 1st 1970. Since this was long ago, the
> stcp_wait_for_event returns immediately with a timeout event (and that's
why
> you're always getting control_loop, received event=0). So u're essentially
> cycling furiously in a loop without actually blocking for any incoming
data.
> This could perhaps be why you're having a problem. Try replacing the 0.3
> seconds with a NULL and it might solve the problem. Hope that helps :)
>
> Ram
>
> "Bruce Schechter" <bruceds@stanford.edu> wrote in message
> news:du53tr$md3$1@news.Stanford.EDU...
> >
> > I have a mysterious bug that is keeping me from passing over half the
> > tests in 3a.  (BTW, the "a" is not a typo.)  Perhaps someone has seen
> > something similar and can lend advice, as I am in serious need of a
> > breakthrough, after being hung up for several days now.  Three parts to
my
> > question:
> >
> > #1.)
> > I generate debugging log files during each run of transport_init().
> > During the test script run, most of the tests have this extremely simple
> > result:
> >
> > DBG11,generate_initial_seq_num() calling srand()
> > DBG06,send_packet() **************
> > DGG06,Outbound packet has SYN
> > DBG10-Outbound- SEQ#=200, ACK#=0, OFF=5, FLG=2, WIN=3072
> > DBG09-State change from CLOSED to SYN_SENT
> > DBG11, Current time is 1141245740.499996 sec
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000
sec)
> > DBG11, control_loop, received event=0
> > DBG11, Current time is 1141245740.801856 sec
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000
sec)
> > DBG11, control_loop, received event=0
> > DBG11, Current time is 1141245741.111847 sec
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000
sec)
> > DBG11, control_loop, received event=0
> > DBG11, Current time is 1141245741.421818 sec
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000
sec)
> > .... and this repeats forever until it terminates.
> >
> > Thus, my transport_init() is sending a SYN, but it never receives a
reply
> > of any kind.  What could possibly keep the peer from replying?
> >
> > #2.)
> > When I review the /grading_src/build contents, I see that the test
script
> > first builds to executables: client & server.  After these are built,
then
> > apparently three tests are run, as I have three of my log files
generated
> > at that time.  Each of these three log files contains what appears to be
a
> > complete, successful transaction, from SYN handshake at start, to data
> > transfer, to FIN/teardown at end.  (An example is attached below)
> >
> > Next, the test script creates two new executables: client.log &
> > server.log. After these are created, all remaining 13 log files created
> > contain the precise sequence I show above in part #1 of my question.
Does
> > anyone know what is different about client vs client.log and server vs
> > sever.log, in order that I might have a clue as to what is causing the
> > different behaviors between them?
> >
> > #3.)
> > One very curious observation is that absolutely all of the 15 log files
> > created start with my transport_init() issuing the SYN at the start.  In
> > other words, transport_init() always seems to think it is the "active"
> > side of the transaction.  Yet in my testing with my own client & server,
> > transport_init() successfully handles both cases of active and
"listening"
> > roles.    In fact, here is the code that makes the determination near
> > start of transport_init()...
> >
> >    /* Depending on whether the local side of the connection is active or
> >     * passive, set the "state machine" (ctx.conn_state) to proper
> >     * starting state before the message loop begins.  */
> >    if ( is_active ) {
> >      /* Active end of the connection sends the starting SYN packet. */
> >      if ( !send_packet( &ctx, TH_SYN, 0, 0 ) ) {
> >        send_error_to_app( &ctx, ECONNREFUSED );
> >        return;
> >      }
> >      ctx.conn_state = CSTATE_SYN_SENT;
> >      if (dbg09) dbprintf(
> >           "DBG09-State change from CLOSED to SYN_SENT\n");
> >    } else {
> >      /* We are the passive end, so we'll just await a SYN... */
> >      ctx.conn_state = CSTATE_LISTEN;
> >      if (dbg09) dbprintf(
> >           "DBG09-State change from CLOSED to CSTATE_LISTEN\n");
> >    }
> >
> > Finally, below is a listing of a log file for one of the tests that
seems
> > to run successfully, as a point of comparison.
> >
> > Thanks!
> > -- Bruce
> >
> >
> > ---------------------------------------------------
> >
> >
> > DBG11,generate_initial_seq_num() calling srand()
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has SYN
> >
> > DBG10-Outbound- SEQ#=233, ACK#=0, OFF=5, FLG=2, WIN=3072
> >
> > DBG09-State change from CLOSED to SYN_SENT
> >
> > DBG11, Current time is 1141245735.986576 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG06,Incoming packet has SYN
> >
> > DBG10-Incoming- SEQ#=233, ACK#=234, OFF=5, FLG=18, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_SYN_SENT
> >
> > DBG09-State change from SYN_SENT to ESTABLISHED
> >
> > DBG06,CSTATE_SYN_SENT,send ACK
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245735.988635 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=1
> >
> > DBG11,send_app_data_to_peer() started.
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has DATA
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245735.989509 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG11, Current time is 1141245736.182790 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=254, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.191442 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=254, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=790, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.193028 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=790, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=1326, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.197541 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=1326, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=1862, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.199054 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=1862, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=2398, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.200503 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=2398, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=2934, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.203799 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=2934, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=3306, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.205233 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=3306, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=3326, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.383771 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=3326, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=3862, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.389391 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=3862, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=4398, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.391040 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=4398, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=4934, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.394449 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=4934, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=5254, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.395853 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has DATA
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=5254, ACK#=246, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_ESTABLISHED
> >
> > DBG06,pass_packet_data_to_app called
> >
> > DBG06,pass_packet_data_to_app, data passed up
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=16, WIN=3072
> >
> > DBG11, Current time is 1141245736.397709 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=4
> >
> > DBG09****---process_close_request() called
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DGG06,Outbound packet has FIN
> >
> > DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=17, WIN=3072
> >
> > DBG09-State change from <various> to FIN_WAIT1
> >
> > DBG11, Current time is 1141245736.402595 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=16, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_FIN_WAIT1
> >
> > DBG09-State change from FIN_WAIT1 to FIN_WAIT2
> >
> > DBG11, Current time is 1141245736.582770 sec
> >
> > DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000
sec)
> >
> > DBG11, control_loop, received event=2
> >
> > DBG11,Will now call stcp_network_recv()
> >
> > DBG06,Incoming packet************
> >
> > DBG06,Incoming packet has ACK
> >
> > DBG06,Incoming packet has FIN
> >
> > DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=17, WIN=3072
> >
> > DBG11,Will now call recalc_windows()
> >
> > DBG11,Will now run switch ( ctx->conn_state )
> >
> > DBG05,proc_nw_dat,CSTATE_FIN_WAIT2
> >
> > DBG09-State change from FIN_WAIT2 to CLOSED
> >
> > DBG06,send_packet() **************
> >
> > DGG06,Outbound packet has ACK
> >
> > DBG10-Outbound- SEQ#=247, ACK#=5353, OFF=5, FLG=16, WIN=3072
> >
> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting reply after SYN on several tests
Date: Wed, 1 Mar 2006 16:59:11 -0800
Lines: 695
Distribution: su
Message-ID: <du5g12$7ol$1@news.Stanford.EDU>
References: <du53tr$md3$1@news.Stanford.EDU> <du56pd$q4p$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10487

Hi Ram,

Actually I do pass an absolute time stcp_wait_for_event(), but I calculate 
the relative time to show in the log as a human-readable reference point. 
And I've also tried NULL.

Meanwhile, it does work with my version of client and server, as well as on 
a subset of the test script tests.

But thanks for the idea!!

-- Bruce

"Ramanan" <ramananr@stanford.edu> wrote in message 
news:du56pd$q4p$1@news.Stanford.EDU...
> Bruce,
>
>    I think a possible cause of your problem is the way you call 
> stcp_wait_for_event. I don't use the logging mechanism provided in 
> our_dprintf(), so I don't know if I'm reading your log right, but from 
> what I can see, you are calling stcp_wait_for_event with the wait-time set 
> to 0.3 seconds. I traced through some of the code that stcp_wait_for_event 
> goes through, and I realise that the wait-time should actually be provided 
> as an absolute time, not something relative to the current time. So, in 
> effect, if you're passing in 0.3 seconds, the program assumes u are 
> intending to wake up 0.3 seconds after midnight, Jan 1st 1970. Since this 
> was long ago, the stcp_wait_for_event returns immediately with a timeout 
> event (and that's why you're always getting control_loop, received 
> event=0). So u're essentially cycling furiously in a loop without actually 
> blocking for any incoming data. This could perhaps be why you're having a 
> problem. Try replacing the 0.3 seconds with a NULL and it might solve the 
> problem. Hope that helps :)
>
> Ram
>
> "Bruce Schechter" <bruceds@stanford.edu> wrote in message 
> news:du53tr$md3$1@news.Stanford.EDU...
>>
>> I have a mysterious bug that is keeping me from passing over half the 
>> tests in 3a.  (BTW, the "a" is not a typo.)  Perhaps someone has seen 
>> something similar and can lend advice, as I am in serious need of a 
>> breakthrough, after being hung up for several days now.  Three parts to 
>> my question:
>>
>> #1.)
>> I generate debugging log files during each run of transport_init(). 
>> During the test script run, most of the tests have this extremely simple 
>> result:
>>
>> DBG11,generate_initial_seq_num() calling srand()
>> DBG06,send_packet() **************
>> DGG06,Outbound packet has SYN
>> DBG10-Outbound- SEQ#=200, ACK#=0, OFF=5, FLG=2, WIN=3072
>> DBG09-State change from CLOSED to SYN_SENT
>> DBG11, Current time is 1141245740.499996 sec
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
>> DBG11, control_loop, received event=0
>> DBG11, Current time is 1141245740.801856 sec
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
>> DBG11, control_loop, received event=0
>> DBG11, Current time is 1141245741.111847 sec
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
>> DBG11, control_loop, received event=0
>> DBG11, Current time is 1141245741.421818 sec
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
>> .... and this repeats forever until it terminates.
>>
>> Thus, my transport_init() is sending a SYN, but it never receives a reply 
>> of any kind.  What could possibly keep the peer from replying?
>>
>> #2.)
>> When I review the /grading_src/build contents, I see that the test script 
>> first builds to executables: client & server.  After these are built, 
>> then apparently three tests are run, as I have three of my log files 
>> generated at that time.  Each of these three log files contains what 
>> appears to be a complete, successful transaction, from SYN handshake at 
>> start, to data transfer, to FIN/teardown at end.  (An example is attached 
>> below)
>>
>> Next, the test script creates two new executables: client.log & 
>> server.log. After these are created, all remaining 13 log files created 
>> contain the precise sequence I show above in part #1 of my question. 
>> Does anyone know what is different about client vs client.log and server 
>> vs sever.log, in order that I might have a clue as to what is causing the 
>> different behaviors between them?
>>
>> #3.)
>> One very curious observation is that absolutely all of the 15 log files 
>> created start with my transport_init() issuing the SYN at the start.  In 
>> other words, transport_init() always seems to think it is the "active" 
>> side of the transaction.  Yet in my testing with my own client & server, 
>> transport_init() successfully handles both cases of active and 
>> "listening" roles.    In fact, here is the code that makes the 
>> determination near start of transport_init()...
>>
>>    /* Depending on whether the local side of the connection is active or
>>     * passive, set the "state machine" (ctx.conn_state) to proper
>>     * starting state before the message loop begins.  */
>>    if ( is_active ) {
>>      /* Active end of the connection sends the starting SYN packet. */
>>      if ( !send_packet( &ctx, TH_SYN, 0, 0 ) ) {
>>        send_error_to_app( &ctx, ECONNREFUSED );
>>        return;
>>      }
>>      ctx.conn_state = CSTATE_SYN_SENT;
>>      if (dbg09) dbprintf(
>>           "DBG09-State change from CLOSED to SYN_SENT\n");
>>    } else {
>>      /* We are the passive end, so we'll just await a SYN... */
>>      ctx.conn_state = CSTATE_LISTEN;
>>      if (dbg09) dbprintf(
>>           "DBG09-State change from CLOSED to CSTATE_LISTEN\n");
>>    }
>>
>> Finally, below is a listing of a log file for one of the tests that seems 
>> to run successfully, as a point of comparison.
>>
>> Thanks!
>> -- Bruce
>>
>>
>> ---------------------------------------------------
>>
>>
>> DBG11,generate_initial_seq_num() calling srand()
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has SYN
>>
>> DBG10-Outbound- SEQ#=233, ACK#=0, OFF=5, FLG=2, WIN=3072
>>
>> DBG09-State change from CLOSED to SYN_SENT
>>
>> DBG11, Current time is 1141245735.986576 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=6, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG06,Incoming packet has SYN
>>
>> DBG10-Incoming- SEQ#=233, ACK#=234, OFF=5, FLG=18, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_SYN_SENT
>>
>> DBG09-State change from SYN_SENT to ESTABLISHED
>>
>> DBG06,CSTATE_SYN_SENT,send ACK
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245735.988635 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=1
>>
>> DBG11,send_app_data_to_peer() started.
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has DATA
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=234, ACK#=234, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245735.989509 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG11, Current time is 1141245736.182790 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=234, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=254, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.191442 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=254, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=790, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.193028 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=790, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=1326, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.197541 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=1326, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=1862, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.199054 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=1862, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=2398, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.200503 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=2398, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=2934, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.203799 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=2934, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=3306, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.205233 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=3306, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=3326, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.383771 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=3326, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=3862, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.389391 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=3862, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=4398, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.391040 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=4398, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=4934, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.394449 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=4934, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=5254, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.395853 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has DATA
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=5254, ACK#=246, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_ESTABLISHED
>>
>> DBG06,pass_packet_data_to_app called
>>
>> DBG06,pass_packet_data_to_app, data passed up
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=16, WIN=3072
>>
>> DBG11, Current time is 1141245736.397709 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=7, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=4
>>
>> DBG09****---process_close_request() called
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DGG06,Outbound packet has FIN
>>
>> DBG10-Outbound- SEQ#=246, ACK#=5352, OFF=5, FLG=17, WIN=3072
>>
>> DBG09-State change from <various> to FIN_WAIT1
>>
>> DBG11, Current time is 1141245736.402595 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=16, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_FIN_WAIT1
>>
>> DBG09-State change from FIN_WAIT1 to FIN_WAIT2
>>
>> DBG11, Current time is 1141245736.582770 sec
>>
>> DBG11,Call stcp_wait_for_event(sd=0,wait flags=2, wait time=0.300000 sec)
>>
>> DBG11, control_loop, received event=2
>>
>> DBG11,Will now call stcp_network_recv()
>>
>> DBG06,Incoming packet************
>>
>> DBG06,Incoming packet has ACK
>>
>> DBG06,Incoming packet has FIN
>>
>> DBG10-Incoming- SEQ#=5352, ACK#=247, OFF=5, FLG=17, WIN=3072
>>
>> DBG11,Will now call recalc_windows()
>>
>> DBG11,Will now run switch ( ctx->conn_state )
>>
>> DBG05,proc_nw_dat,CSTATE_FIN_WAIT2
>>
>> DBG09-State change from FIN_WAIT2 to CLOSED
>>
>> DBG06,send_packet() **************
>>
>> DGG06,Outbound packet has ACK
>>
>> DBG10-Outbound- SEQ#=247, ACK#=5353, OFF=5, FLG=16, WIN=3072
>>
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question about acks
Date: Wed, 1 Mar 2006 17:03:59 -0800
Organization: Stanford University
Lines: 15
Distribution: su
Message-ID: <20060301170359.1974e72c@ballpoint>
References: <du5c32$3he$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10488

Search this newsgroup for a thread called "parial ACKs" (that is a typo
in the original, not in this post).

Short answer: no.


On Wed, 01 Mar 2006 15:51:56 -0800
Naeim Semsarilar <naeim@stanford.edu> wrote:

> Can I assume that the ACKs my STCP layer receives are on the boundaries 
> of the segments it transmitted? For example if STCP transmit a data 
> segment with sequence number 100 and length 200 (i.e. bytes 100 through 
> 299), can I assume that ACK# 147 is impossible and only expect ACK# 300?
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Retransmissions
Date: Wed, 1 Mar 2006 18:02:33 -0800
Lines: 11
Distribution: su
Message-ID: <du5jo4$cmg$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10489

Hi,
I don't really understand retransmissions, so if I add these packets to my 
unacked packets list e.g seq=110, 111, 112, 113, and so if I'm using 
estimated rtt for a timeout, and it so happens that 112 times out first, 
then should what should I be retransmitting? All unacked packets according 
to go back N which would be all packets 110 - 113, or just the segment 112, 
or what!?

Thanks,


.

Path: shelby.stanford.edu!elaine35.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: Retransmissions
Date: Thu, 2 Mar 2006 02:06:50 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 25
Distribution: su
Message-ID: <du5jvq$cr5$1@news.Stanford.EDU>
References: <du5jo4$cmg$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10490

The assignment says

	> if the transport layer decides that its peer has not received the segment 
	> with sequence number n, then it will retransmit all data starting at n, 
	> not just that segment. 

So in your case, I think it is 112-113.

Oleg.

In article <du5jo4$cmg$1@news.Stanford.EDU>,
Nazia Zaman <nazia@stanford.edu> wrote:
>Hi,
>I don't really understand retransmissions, so if I add these packets to my 
>unacked packets list e.g seq=110, 111, 112, 113, and so if I'm using 
>estimated rtt for a timeout, and it so happens that 112 times out first, 
>then should what should I be retransmitting? All unacked packets according 
>to go back N which would be all packets 110 - 113, or just the segment 112, 
>or what!?
>
>Thanks,
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test script for Part C
Date: Wed, 01 Mar 2006 20:14:20 -0800
Lines: 20
Distribution: su
Message-ID: <du5res$jqn$1@news.Stanford.EDU>
References: <du3hhj$t0q$1@news.Stanford.EDU> <du3kin$4su$1@news.Stanford.EDU> <du5af8$1p2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <du5af8$1p2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10491

Steve,

What did you change in the Makefile to make the test script work? I'm
getting the same error you were getting before.

Thanks,
--Michi

Steve Goldman wrote:
> Stefan, I got this to work after changing everything back to working 
> directory paths in the makefile.  I think it is compiling my stuff.
> 
> Question for TAs: are these the same exact tests that we ran for 
> assignment one?
> 
> Thanks.
> 
> Stefan Thomas Mohler wrote:
>> I got it to compile something but I am not sure its compiling my transport.c
>> into the code.  It does submit the test though.
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test script for Part C
Date: Wed, 01 Mar 2006 20:39:44 -0800
Lines: 39
Distribution: su
Message-ID: <du5sui$l5l$1@news.Stanford.EDU>
References: <du3hhj$t0q$1@news.Stanford.EDU> <du3kin$4su$1@news.Stanford.EDU> <du5af8$1p2$1@news.Stanford.EDU> <du5res$jqn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du5res$jqn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10492

I was pointing to transport.c in a different directory.  It didn't work 
because when the files get submitted they are all in the same working 
directory so the makefile couldn't find it.

That's probably not your problem.  Did you find the line in the makefile 
that says "FTPCOPY_SRCS = "?  That is where you list the files in your 
ftpcopy implementation.  These should also be in the working directory.

When you get that working let me know if you run into any "Timeout 
expired" errors in the testing.  I'm duplicating all the commands the 
test script runs and they all finish.  It's still a mystery.  There's a 
long thread in the 2004 newsgroup about this same problem that a few 
people were having, but they didn't mention the resolution.

Steve

Michi Mutsuzaki wrote:
> Steve,
> 
> What did you change in the Makefile to make the test script work? I'm
> getting the same error you were getting before.
> 
> Thanks,
> --Michi
> 
> Steve Goldman wrote:
> 
>>Stefan, I got this to work after changing everything back to working 
>>directory paths in the makefile.  I think it is compiling my stuff.
>>
>>Question for TAs: are these the same exact tests that we ran for 
>>assignment one?
>>
>>Thanks.
>>
>>Stefan Thomas Mohler wrote:
>>
>>>I got it to compile something but I am not sure its compiling my transport.c
>>>into the code.  It does submit the test though.
.

Path: shelby.stanford.edu!elaine27.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question about acks
Date: Wed, 1 Mar 2006 20:42:25 -0800
Lines: 16
Distribution: su
Message-ID: <Pine.GSO.4.44.0603012040570.6301-100000@elaine27.Stanford.EDU>
References: <du5c32$3he$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <du5c32$3he$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10493

I believe this question in a different form has been asked before and the
answer was that no, we can't assume this. ACKS can come in anywhere.

- Miguel


On Wed, 1 Mar 2006, Naeim Semsarilar wrote:

> Can I assume that the ACKs my STCP layer receives are on the boundaries
> of the segments it transmitted? For example if STCP transmit a data
> segment with sequence number 100 and length 200 (i.e. bytes 100 through
> 299), can I assume that ACK# 147 is impossible and only expect ACK# 300?
>
> Thanks.
>

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: More Part C problems
Date: Thu, 2 Mar 2006 04:47:05 +0000 (UTC)
Lines: 32
Distribution: su
Message-ID: <du5tc9$4v5$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10494

Short Version:
I am trying to use the reference binaries provided for HW1 on Part C and I
believe the build done as part of the automatic grading is broken.

Long Version:
When I invoke the grading script with my transport.c, it copies in all the
relevant files and puts a copy in grading_src/build.  The script then does
a stealth compile with all output/input hidden and then it build ftpd_tcp
and ftpcopy_tcp by linking against various .o's and libraries.

Unfortunately, I dont think it's using the same transport.c it copies in for
the following reasons:

   -my code calls assert(0) first thing yet the program does not crash

   -"nm -o transport.o" does not include any of the code I added, in fact it
    looks like it only includes the functions which were in the original
    transport.c (the hollow shell that just hangs).
    The same is true of libmysock.a i.e. it has no functions except the starter
    functions.

   -"nm -o ..." also report the size of the machine code generated is
    suspiciously EXACTLY THE SAME SIZE as the machine code generated for
    the empty starter code. 
   
All files in grading_src/build diff as the same when compared to the files
I submit and the tranport.o generated when I call gmake in that directory
is the correct version which does exactly whats expected when I later invoke
the ftpd/tcpcopy with those binaries.

So, can some kind soul with TA powers please ensure we can use the reference
binaries with our own stcp?
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: More Part C problems
Date: Wed, 01 Mar 2006 20:57:41 -0800
Lines: 35
Distribution: su
Message-ID: <du5u06$m5n$1@news.Stanford.EDU>
References: <du5tc9$4v5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du5tc9$4v5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10495

I second that.  Something is fishy with part C.

Stefan Thomas Mohler wrote:
> Short Version:
> I am trying to use the reference binaries provided for HW1 on Part C and I
> believe the build done as part of the automatic grading is broken.
> 
> Long Version:
> When I invoke the grading script with my transport.c, it copies in all the
> relevant files and puts a copy in grading_src/build.  The script then does
> a stealth compile with all output/input hidden and then it build ftpd_tcp
> and ftpcopy_tcp by linking against various .o's and libraries.
> 
> Unfortunately, I dont think it's using the same transport.c it copies in for
> the following reasons:
> 
>    -my code calls assert(0) first thing yet the program does not crash
> 
>    -"nm -o transport.o" does not include any of the code I added, in fact it
>     looks like it only includes the functions which were in the original
>     transport.c (the hollow shell that just hangs).
>     The same is true of libmysock.a i.e. it has no functions except the starter
>     functions.
> 
>    -"nm -o ..." also report the size of the machine code generated is
>     suspiciously EXACTLY THE SAME SIZE as the machine code generated for
>     the empty starter code. 
>    
> All files in grading_src/build diff as the same when compared to the files
> I submit and the tranport.o generated when I call gmake in that directory
> is the correct version which does exactly whats expected when I later invoke
> the ftpd/tcpcopy with those binaries.
> 
> So, can some kind soul with TA powers please ensure we can use the reference
> binaries with our own stcp?
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Test script for Part C
Date: Thu, 2 Mar 2006 05:01:15 +0000 (UTC)
Lines: 14
Distribution: su
Message-ID: <du5u6r$4v5$2@news.Stanford.EDU>
References: <du3hhj$t0q$1@news.Stanford.EDU> <du3kin$4su$1@news.Stanford.EDU> <du5af8$1p2$1@news.Stanford.EDU> <du5res$jqn$1@news.Stanford.EDU> <du5sui$l5l$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10496

Steve, I am getting timeout expired messages.  I believe I tracked it down
and explained it in another thread.

go to your grading_src/build directory and run:

> nm -o transport.o | grep transport_init

You will get a line like:
[16]    |000000000000|000000000230|FUNC |GLOB |0    |1      |transport_init
                      ^^^^^^^^^^^^

If the section I put ^^^ under says 230 you likely have the same problem.

                       
.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test script for Part C
Date: Wed, 01 Mar 2006 21:18:17 -0800
Lines: 24
Distribution: su
Message-ID: <du5v6r$ndk$1@news.Stanford.EDU>
References: <du3hhj$t0q$1@news.Stanford.EDU> <du3kin$4su$1@news.Stanford.EDU> <du5af8$1p2$1@news.Stanford.EDU> <du5res$jqn$1@news.Stanford.EDU> <du5sui$l5l$1@news.Stanford.EDU> <du5u6r$4v5$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du5u6r$4v5$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10497

Yup.  It's all so fishy.  All the test script commands work when I run 
them from the command line.  And all these object files shenanigans.

Ari, Matt, does the defense's case hold water??

Steve

Stefan Thomas Mohler wrote:
> Steve, I am getting timeout expired messages.  I believe I tracked it down
> and explained it in another thread.
> 
> go to your grading_src/build directory and run:
> 
> 
>>nm -o transport.o | grep transport_init
> 
> 
> You will get a line like:
> [16]    |000000000000|000000000230|FUNC |GLOB |0    |1      |transport_init
>                       ^^^^^^^^^^^^
> 
> If the section I put ^^^ under says 230 you likely have the same problem.
> 
>                        
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: CS140 List Code, Revisited
Date: Wed, 01 Mar 2006 21:39:39 -0800
Lines: 38
Distribution: su
Message-ID: <du60l7$oa3$1@news.Stanford.EDU>
References: <20060301040231.268c4f6c@ballpoint> <20060301040547.507eef17@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <20060301040547.507eef17@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:10498

Yeah, go ahead and use the CS140 list code.

Ari


David Reiss wrote:
> I'm sorry.  I'm a bit tired, and I forgot to say "please" and "thank you."
> 
> Would you *please* reconsider this request?  *Thank you* for your consideration.
> 
> :)
> 
> --David
> 
> 
> On Wed, 1 Mar 2006 04:02:31 -0800
> David Reiss <dreiss@stanford.edu> wrote:
> 
> 
>>Earlier, a student asked if we could use the CS140 list code in projects
>>for this class.  A TA responded that that would be unfair because it
>>would give us an unfair advantage over students who hadn't taken 140.  I
>>would like to request that the teaching staff reconsider this because:
>>
>>1) CS140 is a "strict prerequisite" for this class.
>>
>>2) The list code is available to anyone at
>>http://www.stanford.edu/class/cs140/pintos/pintos.tar.gz
>>(in list.c and list.h under lib/kernel)
>>
>>3) The code is very well documented, making it easy to pick up for
>>students who have not used it before.
>>
>>I'm doing some slightly tricky stuff with (two types of) linked lists
>>for project 3, and I'd much rather include some of that code than write
>>and debug my own linked list.
>>
>>--David
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: More about retransmissions
Date: Wed, 1 Mar 2006 21:57:19 -0800
Lines: 8
Distribution: su
Message-ID: <du61gc$pbb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10499

So if a packets 112, 113, 114 were in the list of unacked packers, and I get 
an ack back for 114, and I cancel its timer, but 112's timer expires, then 
will all 3 be retransmitted? In real TCP, doesn't an ack 115 mean that ALL 
bytes uptil 114 have been received, so if I were thinking like that, then I 
would remove all 3 packets from the unacked list on getting an ack 115 
right? Which is the correct interpretation?


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: More about retransmissions
Date: Wed, 01 Mar 2006 22:14:34 -0800
Lines: 14
Distribution: su
Message-ID: <du62ga$pvh$1@news.Stanford.EDU>
References: <du61gc$pbb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <du61gc$pbb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10500

IANATA (I am not a TA), but your second interpretation is correct. If 
you get an ACK for 115, then everything through 114 inclusive is 
considered acknowledged and removed from your outstanding ack list.
-Will

Nazia Zaman wrote:
> So if a packets 112, 113, 114 were in the list of unacked packers, and I get 
> an ack back for 114, and I cancel its timer, but 112's timer expires, then 
> will all 3 be retransmitted? In real TCP, doesn't an ack 115 mean that ALL 
> bytes uptil 114 have been received, so if I were thinking like that, then I 
> would remove all 3 packets from the unacked list on getting an ack 115 
> right? Which is the correct interpretation?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting reply after SYN on several tests
Date: Wed, 1 Mar 2006 18:07:46 -0800
Lines: 32
Distribution: su
Message-ID: <du640d$rkb$1@news.Stanford.EDU>
References: <du53tr$md3$1@news.Stanford.EDU> <du558h$l09$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10501

Stefan,

Thanks for the thoughtful analysis!

> Bruce-- So it looks/sounds like you are having problems only when your 
> code
> is used as a server talking to the reference/TA STCP being used as a 
> client.

Given that the log file shows transport_init() issuing the SYN and then 
awaiting, I had concluded that the my transport_init() was running as the 
client when that failing log was written?  No?  Wouldnt the client issue the 
first SYN to create a connection to the server?

On that note... my latest debugging adventure today was running ftpcopy_tpc. 
I assume this is a version of the ftp_copy app from Assn #1, but linked with 
my STCP transport.c. (Although I havent found any substantive explaination 
anywhere.)  When I run it against a real FTP server on the internet, i get 
the same "aborted" start (send one SYN, then wait forever with reapeated 
calls to stcp_wait_for_event), exactly like the log I showed in my original 
post in this thread.  That is evidence that my problem happens when my 
transport_init is called from a client.  Anyway, my next step is to try to 
trace code flow into stcp_wait_for_event() in that senario.  Hopefully that 
will work, but I have not started that phase yet.

I will try to explore your other suggestions tonight.

Thanks again,

-- Bruce 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: More about retransmissions
Date: Wed, 01 Mar 2006 23:30:46 -0800
Lines: 22
Distribution: su
Message-ID: <du675i$15c$1@news.Stanford.EDU>
References: <du61gc$pbb$1@news.Stanford.EDU> <du62ga$pvh$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <du62ga$pvh$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10502

Yep, if you receive an ACK for 115, then this means that all bytes up to 
and including 114 have been received, so you should not resend any of 
those bytes again.

Ari

Will Palmeri wrote:
> IANATA (I am not a TA), but your second interpretation is correct. If 
> you get an ACK for 115, then everything through 114 inclusive is 
> considered acknowledged and removed from your outstanding ack list.
> -Will
> 
> Nazia Zaman wrote:
> 
>> So if a packets 112, 113, 114 were in the list of unacked packers, and 
>> I get an ack back for 114, and I cancel its timer, but 112's timer 
>> expires, then will all 3 be retransmitted? In real TCP, doesn't an ack 
>> 115 mean that ALL bytes uptil 114 have been received, so if I were 
>> thinking like that, then I would remove all 3 packets from the unacked 
>> list on getting an ack 115 right? Which is the correct interpretation?
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW3.A: Time alloted for test case 1C
Date: Wed, 01 Mar 2006 23:43:13 -0800
Lines: 16
Distribution: su
Message-ID: <du67n8$1cq$1@news.Stanford.EDU>
References: <du005g$r45$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du005g$r45$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10503

Hector Chan wrote:
> Hi TA,
> 
> I am just wondering how much time is allotted to test case 1C (testing my 
> client with the reference server) for 3A.  My code passed test case 1C 1 out 
> of 2 times I tested using the grading script (failed because of grading 
> script timed out).  Is it possible my code failed because grading script 
> ran out of time for the test case? (but in fact my code is still running, 
> not just hanging there)
> 
> Thanks,
> 
> Hector

I don't know how long it waits, but it should be waiting long enough. 
Something is wrong if your code doesn't finish in that time.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: resending packet
Date: Wed, 01 Mar 2006 23:54:23 -0800
Lines: 14
Distribution: su
Message-ID: <du68hs$4u8$1@news.Stanford.EDU>
References: <du0vvo$434$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <du0vvo$434$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10504

A few people asked about this in office hours today. While we certainly 
prefer you to resend only the bytes that have not been acknowledged, 
it's okay in this case to resend the whole packet.

Ari

Waynn Lue wrote:
> If I've sent a packet with seq = 100 and len = 100 (so 100-199), and I've
> received an ACK for 150, is it ok to resend the packet again with seq = 100
> and len = 100, or do I have to send seq = 150 and len = 50?
> 
> Waynn
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Retransmissions
Date: Thu, 02 Mar 2006 00:19:30 -0800
Lines: 16
Distribution: su
Message-ID: <du69r9$747$1@news.Stanford.EDU>
References: <du5jo4$cmg$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du5jo4$cmg$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10505

Nazia Zaman wrote:
> Hi,
> I don't really understand retransmissions, so if I add these packets to my 
> unacked packets list e.g seq=110, 111, 112, 113, and so if I'm using 
> estimated rtt for a timeout, and it so happens that 112 times out first, 
> then should what should I be retransmitting? All unacked packets according 
> to go back N which would be all packets 110 - 113, or just the segment 112, 
> or what!?
> 
> Thanks,
> 
> 

I think you're confusing packets with bytes.  Each byte takes up one 
sequence number, not each packet.  If byte with sequence number 112 
times out, you go back to that byte.
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test Script with Compile Errors
Date: Thu, 2 Mar 2006 01:19:41 -0800
Organization: Stanford University
Lines: 7
Distribution: su
Message-ID: <20060302011941.7f0f1878@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10506

I thought the test script wasn't supposed to charge us with a run if we
had compile errors.  I had a number of compile errors because I was
trying t include an extra .c file in my hw3b (which I now realize is a
mistake), and I burned through all my test runs in about 5 minutes!  Did
I misunderstand something, or is this an error?

--David
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question about acks
Date: Thu, 02 Mar 2006 01:20:30 -0800
Lines: 37
Distribution: su
Message-ID: <du6dd6$ai5$1@news.Stanford.EDU>
References: <du5c32$3he$1@news.Stanford.EDU> <20060301170359.1974e72c@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <20060301170359.1974e72c@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:10507

I should've looked more carefully..

Anyway, the reason I asked is this. Let's say the following scenario 
happens:

1. Sender sends out segment with seq# 100 and length 100 (bytes 100 to 199)
2. No ACK comes, sender retransmits the above
3. Again, no ACKs, sender retransmits again
4. ACK comes with ack# 151 (i.e. 100 to 150 are now acked)
5. Application writes another 100 bytes.

So now there are two types of bytes:
   bytes 151 through 199 have been retransmitted twice
   bytes 200 through 299 have not been retransmitted yet

Is this situation even conceivable and something we need to handle? Do 
we now need to keep track of two retransmission counts?

Thanks.


David Reiss wrote:
> Search this newsgroup for a thread called "parial ACKs" (that is a typo
> in the original, not in this post).
> 
> Short answer: no.
> 
> 
> On Wed, 01 Mar 2006 15:51:56 -0800
> Naeim Semsarilar <naeim@stanford.edu> wrote:
> 
>> Can I assume that the ACKs my STCP layer receives are on the boundaries 
>> of the segments it transmitted? For example if STCP transmit a data 
>> segment with sequence number 100 and length 200 (i.e. bytes 100 through 
>> 299), can I assume that ACK# 147 is impossible and only expect ACK# 300?
>>
>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Extra Test Allotment for Assignment 1?
Date: Thu, 02 Mar 2006 01:45:41 -0800
Lines: 8
Distribution: su
Message-ID: <du6est$bko$1@news.Stanford.EDU>
References: <20060226180607.1573bf2c@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060226180607.1573bf2c@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:10508

David Reiss wrote:
> I used fdopen/stdio in my assignment 1, which I will have to fix before
> porting that code to mysock.  Is it possible to get extra allotments to
> test my assignment 1 code (against the normal assignment 1 test suite)
> so I can test this independently?  Thanks.

OK, I've changed it to 5 per day for assignments that have already been 
due (1 and 3.A)
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: More Part C problems
Date: Thu, 02 Mar 2006 01:46:52 -0800
Lines: 36
Distribution: su
Message-ID: <du6ev4$bko$2@news.Stanford.EDU>
References: <du5tc9$4v5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du5tc9$4v5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10509

Stefan Thomas Mohler wrote:
> Short Version:
> I am trying to use the reference binaries provided for HW1 on Part C and I
> believe the build done as part of the automatic grading is broken.
> 
> Long Version:
> When I invoke the grading script with my transport.c, it copies in all the
> relevant files and puts a copy in grading_src/build.  The script then does
> a stealth compile with all output/input hidden and then it build ftpd_tcp
> and ftpcopy_tcp by linking against various .o's and libraries.
> 
> Unfortunately, I dont think it's using the same transport.c it copies in for
> the following reasons:
> 
>    -my code calls assert(0) first thing yet the program does not crash
> 
>    -"nm -o transport.o" does not include any of the code I added, in fact it
>     looks like it only includes the functions which were in the original
>     transport.c (the hollow shell that just hangs).
>     The same is true of libmysock.a i.e. it has no functions except the starter
>     functions.
> 
>    -"nm -o ..." also report the size of the machine code generated is
>     suspiciously EXACTLY THE SAME SIZE as the machine code generated for
>     the empty starter code. 
>    
> All files in grading_src/build diff as the same when compared to the files
> I submit and the tranport.o generated when I call gmake in that directory
> is the correct version which does exactly whats expected when I later invoke
> the ftpd/tcpcopy with those binaries.
> 
> So, can some kind soul with TA powers please ensure we can use the reference
> binaries with our own stcp?

Stefan, thanks for reporting this.  Something is definately not right. 
We're working on this now...
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test Script with Compile Errors
Date: Thu, 02 Mar 2006 01:53:17 -0800
Lines: 12
Distribution: su
Message-ID: <du6fb5$c2k$1@news.Stanford.EDU>
References: <20060302011941.7f0f1878@ballpoint>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <20060302011941.7f0f1878@ballpoint>
Xref: shelby.stanford.edu su.class.cs244a:10510

David Reiss wrote:
> I thought the test script wasn't supposed to charge us with a run if we
> had compile errors.  I had a number of compile errors because I was
> trying t include an extra .c file in my hw3b (which I now realize is a
> mistake), and I burned through all my test runs in about 5 minutes!  Did
> I misunderstand something, or is this an error?
> 
> --David

Hmm, looks like you're right, this test script doesn't check for compile 
time errors before charging you.  I'll free up your quota but in the 
future be careful.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.L (5 retransmissions)
Date: Thu, 02 Mar 2006 03:20:12 -0800
Lines: 58
Distribution: su
Message-ID: <du6ke4$g9j$1@news.Stanford.EDU>
References: <du2bun$dut$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du2bun$dut$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10511

Stefan Thomas Mohler wrote:
> I am having trouble understanding the desired behavior of test 2.L so any
> help from Matt, Ari, Santa Claus, or a helpful someone would be cool..
> 
> As I understand it, the test goes something like:
> Server                            Client
> Listen
>                                   connect
>                                   send some data (12 bytes)
> Ack data
> send response (20 bytes)
>                                   Ack 20 bytes
> send window of data
>                                   dont respond, but count messages
> Timeout1
> resend window of data
> 
> Timeout2
> resend window of data
> 
> Timeout3
> resend window of data
> 
> Timeout4
> resend window of data
> 
> Timeout5
> resend window of data
> 
> Abort
> 
> 1- If I log every packet sent for the whole of test 2 (as in all subtests) I
> dont see _any_ packet with the sequence number mentioned in the test output.  
> Is it possible you are printing sequence number for a byte in the packet
> instead "packet with sequence number" ####?  It looks like the error message
> describes the nth byte of data after the setup phase, not a sequence number.
> 
> 2- Since its possible to count program invocations and thus different log files
> (files are indexed by pid) I know which log corresponds to this test even
> though I cant find the sequence number mentioned in 1.  This
> log shows that when a failure occurs it coincides to when the "Ack 20 bytes" 
> is received after the "send window of data" in which case the ack of 20 frees 
> up 20 slots in the window and means that those 20 bytes go out in their own 
> packet.  So, each byte of the window is sent 6 times: once originally and 5
> times for retransmission.  Which leaves me not knowing what the correct
> sequence should be to pass this test.
> 
> 

The test is just going through the logfile and ensuring that no sequence 
number is sent more than 6 times.  (Actually it's checking that the 
sequence number submitted the most is sent exactly 6 times, I believe 
but haven't verified this is because when the test is run it is 
guaranteed that something won't be ack'd after 5 retransmissions).  It 
then prints that sequence number, so I'm not sure why you are seeing the 
behavior in 1.

Hope this helps a little...
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Question about acks
Date: Thu, 02 Mar 2006 03:34:41 -0800
Lines: 45
Distribution: su
Message-ID: <du6l99$gpl$1@news.Stanford.EDU>
References: <du5c32$3he$1@news.Stanford.EDU> <20060301170359.1974e72c@ballpoint> <du6dd6$ai5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du6dd6$ai5$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10512

Naeim Semsarilar wrote:
> I should've looked more carefully..
> 
> Anyway, the reason I asked is this. Let's say the following scenario 
> happens:
> 
> 1. Sender sends out segment with seq# 100 and length 100 (bytes 100 to 199)
> 2. No ACK comes, sender retransmits the above
> 3. Again, no ACKs, sender retransmits again
> 4. ACK comes with ack# 151 (i.e. 100 to 150 are now acked)
> 5. Application writes another 100 bytes.
> 
> So now there are two types of bytes:
>   bytes 151 through 199 have been retransmitted twice
>   bytes 200 through 299 have not been retransmitted yet
> 
> Is this situation even conceivable and something we need to handle? Do 
> we now need to keep track of two retransmission counts?
> 
> Thanks.

You should ensure that no sequence number is ever retransmitted more 
than 5 times.  It is ok to do something simplistic and just transmit 
151-199 in its own segment and then 200-299 in another.

> 
> 
> David Reiss wrote:
> 
>> Search this newsgroup for a thread called "parial ACKs" (that is a typo
>> in the original, not in this post).
>>
>> Short answer: no.
>>
>>
>> On Wed, 01 Mar 2006 15:51:56 -0800
>> Naeim Semsarilar <naeim@stanford.edu> wrote:
>>
>>> Can I assume that the ACKs my STCP layer receives are on the 
>>> boundaries of the segments it transmitted? For example if STCP 
>>> transmit a data segment with sequence number 100 and length 200 (i.e. 
>>> bytes 100 through 299), can I assume that ACK# 147 is impossible and 
>>> only expect ACK# 300?
>>>
>>> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.L (5 retransmissions)
Date: Thu, 02 Mar 2006 03:43:41 -0800
Lines: 70
Distribution: su
Message-ID: <du6lq5$h33$1@news.Stanford.EDU>
References: <du2bun$dut$1@news.Stanford.EDU> <du6ke4$g9j$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du6ke4$g9j$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10513

Matt Falkenhagen wrote:
> Stefan Thomas Mohler wrote:
> 
>> I am having trouble understanding the desired behavior of test 2.L so any
>> help from Matt, Ari, Santa Claus, or a helpful someone would be cool..
>>
>> As I understand it, the test goes something like:
>> Server                            Client
>> Listen
>>                                   connect
>>                                   send some data (12 bytes)
>> Ack data
>> send response (20 bytes)
>>                                   Ack 20 bytes
>> send window of data
>>                                   dont respond, but count messages
>> Timeout1
>> resend window of data
>>
>> Timeout2
>> resend window of data
>>
>> Timeout3
>> resend window of data
>>
>> Timeout4
>> resend window of data
>>
>> Timeout5
>> resend window of data
>>
>> Abort
>>
>> 1- If I log every packet sent for the whole of test 2 (as in all 
>> subtests) I
>> dont see _any_ packet with the sequence number mentioned in the test 
>> output.  Is it possible you are printing sequence number for a byte in 
>> the packet
>> instead "packet with sequence number" ####?  It looks like the error 
>> message
>> describes the nth byte of data after the setup phase, not a sequence 
>> number.
>>
>> 2- Since its possible to count program invocations and thus different 
>> log files
>> (files are indexed by pid) I know which log corresponds to this test even
>> though I cant find the sequence number mentioned in 1.  This
>> log shows that when a failure occurs it coincides to when the "Ack 20 
>> bytes" is received after the "send window of data" in which case the 
>> ack of 20 frees up 20 slots in the window and means that those 20 
>> bytes go out in their own packet.  So, each byte of the window is sent 
>> 6 times: once originally and 5
>> times for retransmission.  Which leaves me not knowing what the correct
>> sequence should be to pass this test.
>>
>>
> 
> The test is just going through the logfile and ensuring that no sequence 
> number is sent more than 6 times.  (Actually it's checking that the 
> sequence number submitted the most is sent exactly 6 times, I believe 
> but haven't verified this is because when the test is run it is 
> guaranteed that something won't be ack'd after 5 retransmissions).  It 
> then prints that sequence number, so I'm not sure why you are seeing the 
> behavior in 1.
> 
> Hope this helps a little...

I'm just rereading your post now... in 1) if you're asking whether it is 
possible the script prints a sequence number that is in a packet but 
isn't the initial sequence number of the packet... the answer is yes.
.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: timeout
Date: Thu, 02 Mar 2006 04:13:59 -0800
Lines: 10
Distribution: su
Message-ID: <du6ni8$kn7$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10514

The assignment says "Whenever a SYN, data, or FIN segment (i.e. an STCP 
packet containing anything more than just an acknowledgement) is 
transmitted, a timeout is scheduled some milliseconds from the time of 
transmission.".

But do we need to worry about other possible timeouts, such as a SYN 
never comes in the LISTEN state, or a FIN never shows up in the 
FIN_WAIT_2 state?

Is it ok if we just make the program wait infinitely in both these states?
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: -U clarification
Date: Thu, 2 Mar 2006 05:37:02 -0800
Lines: 8
Distribution: su
Message-ID: <du6sej$p0t$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10515

If I run the server without the -U option and the client with -U that means 
that packets will be dropped at the client end, but which packets, received 
or sent, or both? I have a log function which logs all packets 
sent/received, but how do I know what packet at what point the client 
decided to drop? I need to know this for debugging.
Thanks 


.

Path: shelby.stanford.edu!saga2.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: -U clarification
Date: Thu, 2 Mar 2006 10:48:08 -0800
Lines: 20
Distribution: su
Message-ID: <Pine.GSO.4.44.0603021047130.3334-100000@saga2.Stanford.EDU>
References: <du6sej$p0t$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <du6sej$p0t$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10516

Look in network.c, _network_send desides to randomly drop packets, send
duplicates, etc.

-Megan



On Thu,
2 Mar 2006, Nazia Zaman wrote:

> If I run the server without the -U option and the client with -U that means
> that packets will be dropped at the client end, but which packets, received
> or sent, or both? I have a log function which logs all packets
> sent/received, but how do I know what packet at what point the client
> decided to drop? I need to know this for debugging.
> Thanks
>
>
>

.

Path: shelby.stanford.edu!saga2.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: timeouts
Date: Thu, 2 Mar 2006 10:49:56 -0800
Lines: 9
Distribution: su
Message-ID: <Pine.GSO.4.44.0603021048210.3334-100000@saga2.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10517

I don't really understand how stcp_wait_for_event() works for timeouts.
Will it always return with the event flag set at 0 for a timeout, even if
other events happened in the meantime? Or does any event (including data
from the app) cancel the timer so I should check for timeouts on any event
that occurs?

Thanks,
Megan

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: timeouts
Date: Thu, 2 Mar 2006 19:20:06 +0000 (UTC)
Lines: 7
Distribution: su
Message-ID: <du7gh6$9qd$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603021048210.3334-100000@saga2.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10518

I know if there is data to read from the application layer or the network
layer you will return immediately.  When trying to determine if a timeout
happened I had to track it on the side since the app can keep feeding you
one byte of data every (RTO - epsilon) seconds which means you will always
return from wait_for_event with a flag set.  

This isnt quite what you asked but maybe its relevant.
.

Path: shelby.stanford.edu!saga20.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: timeouts
Date: Thu, 2 Mar 2006 15:05:36 -0800
Lines: 15
Distribution: su
Message-ID: <Pine.GSO.4.44.0603021505270.12108-100000@saga20.Stanford.EDU>
References: <Pine.GSO.4.44.0603021048210.3334-100000@saga2.Stanford.EDU>
 <du7gh6$9qd$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <du7gh6$9qd$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10519

yeah, that's what I meant, thanks,

Megan
On Thu, 2 Mar 2006, Stefan Thomas Mohler
wrote:

> I know if there is data to read from the application layer or the network
> layer you will return immediately.  When trying to determine if a timeout
> happened I had to track it on the side since the app can keep feeding you
> one byte of data every (RTO - epsilon) seconds which means you will always
> return from wait_for_event with a flag set.
>
> This isnt quite what you asked but maybe its relevant.
>

.

Path: shelby.stanford.edu!not-for-mail
From: Ari David Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: timeout
Date: Thu, 02 Mar 2006 17:37:25 -0800
Lines: 17
Distribution: su
Message-ID: <du86km$9dg$1@news.Stanford.EDU>
References: <du6ni8$kn7$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <du6ni8$kn7$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10520

Yes, the program should wait in LISTEN until a SYN is received, or in 
FIN_WAIT_2 until a FIN is received. You don't neeed to schedule a 
timeout when waiting in either of these states.

Ari

Hau Jia Chew wrote:
> The assignment says "Whenever a SYN, data, or FIN segment (i.e. an STCP 
> packet containing anything more than just an acknowledgement) is 
> transmitted, a timeout is scheduled some milliseconds from the time of 
> transmission.".
> 
> But do we need to worry about other possible timeouts, such as a SYN 
> never comes in the LISTEN state, or a FIN never shows up in the 
> FIN_WAIT_2 state?
> 
> Is it ok if we just make the program wait infinitely in both these states?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.K (5 or 6 transmissions)
Date: Thu, 02 Mar 2006 18:04:42 -0800
Lines: 29
Distribution: su
Message-ID: <du887q$bl2$1@news.Stanford.EDU>
References: <20060301114851.2a78b1a6@ballpoint> <du5398$l09$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <du5398$l09$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10521

Stefan Thomas Mohler wrote:
> Having spent many hours trying to understand 2.k I can answer something
> of your question.
> 
> So the test is definitely looking for 5 retransmissions (6 total transmissions)
> of something, but I believe it is doing it in a broken way that leaves the
> answer depending on machine delay somewhat.  I pass the test half the time
> and fail the other half the time.  The difference seems to be when the
> test client sends an ACK for 20 bytes of info that is transmitted in test
> setup. Here is a brief summar of the interchange (more detailed summuary
> in my last post on this subject):
> 
> Your code (which is used in the server) gets a short message (12 bytes)
> and then responds with a short message (20 bytes) and then "very soon" 
> after responding with 20 bytes it begins to send a full window of data.
> 
> If the test client acks your 20 byte message after you have begun sending
> the window of data then you end up clearing up 20 bytes in your send window
> and sending another packet.  If you get the ack before you send the window
> you send the same info with one fewer packets.  
> 
> I have posted a few times about this starting several days ago and not yet
> seen any info. If you can figure anything else out I would be most 
> appreciative of a post.

Stefan is right, it is happy with 5 retransmissions (6 total 
transmissions), see his thread above for details.  I am not convinced it 
is doing it in a broken way though; it looks correct to me and our 
reference solution passes all tests consistently.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari David Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS 3 Q4
Date: Thu, 02 Mar 2006 18:36:33 -0800
Lines: 22
Distribution: su
Message-ID: <du8a3h$dln$1@news.Stanford.EDU>
References: <dtvu8m$p66$1@news.Stanford.EDU> <dtvvp2$r3b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <dtvvp2$r3b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10522

Oops, this was a typo on our part! c should be >= p. The new problem set 
is posted on the website.

Nazia Zaman wrote:
> Also, can c be zero since c <= P, even though that isn't a realistic 
> scenario, if not then what is the lower bound for c.
> 
> 
> 
> "Nazia Zaman" <nazia@stanford.edu> wrote in message 
> news:dtvu8m$p66$1@news.Stanford.EDU...
> 
>>Hi,
>>
>>Question 4 refers to a figure, but there's no figure. Are we supposed to 
>>draw it?
>>
>>Nazia
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Andrew Sakai" <asakai@stanford.edu>
Newsgroups: su.class.cs244a
Subject: time.h
Date: Thu, 2 Mar 2006 18:37:16 -0800
Lines: 11
Distribution: su
Message-ID: <du8a4t$dnm$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10523

I have been trying to use the clock_gettime() function that is supposed to 
be defined in time.h, but for some reason when I try to compile I get an 
"undefined reference" error.  Any idea why this would be?  I'm probably 
doing something silly, but it seems strange that the definition for the 
timespec struct would be there while clock_gettime() is not.  Is the 
clock_gettime() function just not implemented in this case?

    Thanks,
    Andrew 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: time.h
Date: Fri, 3 Mar 2006 03:04:00 +0000 (UTC)
Lines: 34
Distribution: su
Message-ID: <du8bn0$bpb$1@news.Stanford.EDU>
References: <du8a4t$dnm$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10524

The "where is this lib" question comes up alot.  Do the following:

> bash
> for $lib in /usr/lib/*.{a,so}
> do
> echo $file; nm -o $file | grep clock_gettime
> done

This will search through every library in /usr/local (which is most of them)
and print out first the name of the file being searched and then, if the
function you are greping for is there a line like:

/usr/lib/libc.a
[5]     |000000000044|000000000114|FUNC |GLOB |0    |2      |__clock_gettime


Each file will be named libX.a or libX.so which you can include by adding -lX
to your compile line.  In this case, libc is the default library which I
thought was always included so I dont know why its not working for you.  As
easy fix is something like:

void get_now(struct timespec *ts) {
struct timeval tv;

assert(gettimeofdata(&tv, 0) >= 0);   // assert just to make sure it worked

ts->tv_sec  = tv.tv_sec;
ts->tv_nsec = tv.usec * 1000;
}

though please forgive any typoes..


Stefan
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: time.h
Date: Fri, 3 Mar 2006 03:05:32 +0000 (UTC)
Lines: 1
Distribution: su
Message-ID: <du8bps$bpb$2@news.Stanford.EDU>
References: <du8a4t$dnm$1@news.Stanford.EDU> <du8bn0$bpb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10525

when I said it would search /usr/local/ I meant /usr/lib..
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: resend ACK, but now with Data
Date: Thu, 02 Mar 2006 19:10:50 -0800
Lines: 13
Distribution: su
Message-ID: <C02CF3BA.3710%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: resend ACK, but now with Data 
Thread-Index: AcY+cBLXUTRj0qpjEdqmHwARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10526

Hi.

Do we need to worry about the following scenario for this assignment:

A sends B SEQ = 0  data Bytes = 100;
B send ACK = 100; no data in the segment;
ACK is lost in traffic;
B resends ACK =100 but this time ACK is piggybacking another segment that
has data also???

Thanks.
Sunny.

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: resend ACK, but now with Data
Date: Thu, 02 Mar 2006 20:37:12 -0800
Lines: 16
Distribution: su
Message-ID: <du8h5n$kkt$1@news.Stanford.EDU>
References: <C02CF3BA.3710%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <C02CF3BA.3710%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10527

Sunny Balwani wrote:
> Hi.
> 
> Do we need to worry about the following scenario for this assignment:
> 
> A sends B SEQ = 0  data Bytes = 100;
> B send ACK = 100; no data in the segment;
> ACK is lost in traffic;
> B resends ACK =100 but this time ACK is piggybacking another segment that
> has data also???
> 
> Thanks.
> Sunny.
> 

Yes, why wouldn't you?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: time.h
Date: Thu, 02 Mar 2006 20:40:12 -0800
Lines: 22
Distribution: su
Message-ID: <du8hbc$kpr$1@news.Stanford.EDU>
References: <du8a4t$dnm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <du8a4t$dnm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10528

Andrew Sakai wrote:
> I have been trying to use the clock_gettime() function that is supposed to 
> be defined in time.h, but for some reason when I try to compile I get an 
> "undefined reference" error.  Any idea why this would be?  I'm probably 
> doing something silly, but it seems strange that the definition for the 
> timespec struct would be there while clock_gettime() is not.  Is the 
> clock_gettime() function just not implemented in this case?
> 
>     Thanks,
>     Andrew 
> 
> 

See FAQ Q18:


Q18. How can I accurately measure elapsed time?

A18. You can use the function gettimeofday(). You cannot use any 
function from the real-time library (-lrt).

Btw, clock_gettime is in -lrt.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Weird error
Date: Thu, 02 Mar 2006 20:58:33 -0800
Lines: 24
Distribution: su
Message-ID: <du8idq$ljj$1@news.Stanford.EDU>
References: <du57g4$qoq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du57g4$qoq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10529

Nazia Zaman wrote:
> Hi,
> The file transfer goes half way, and I'm NOT using the server and client 
> with -U to check whether the rest of the implementation works, however the 
> server sends this packet:
> log: network_send: an ACK packet with seq=6360, len=22 and ack=118 and 
> timestamp=3085920549
> And on the client side, a weird packet is received with seq =1, and this is 
> in stcp_api.c before transport.c kicks in. Any idea how the network could be 
> messing packets up?
> log: network_recv: a SYN packet with seq=1
> Assertion failed: len <= 0 || 
> _mysock_verify_checksum(_mysock_get_context(sd), dst, len), file stcp_api.c, 
> line 166
> Abort
> Thanks,
> 
> 

Not sure what would cause this to fail.  You have access to the code so 
try poking around and figuring out what could cause this.  One thing I'd 
say is be sure you call stcp_network_recv only if a NETWORK_DATA event 
occurred, although it doesn't seem this would matter as 
stcp_network_recv blocks until data comes in.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Possible deadlock somewhere?
Date: Thu, 02 Mar 2006 21:00:11 -0800
Lines: 30
Distribution: su
Message-ID: <du8igr$ljj$2@news.Stanford.EDU>
References: <du3rvc$ccj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du3rvc$ccj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10530

Nazia Zaman wrote:
> Hi,
> 
> I'm getting this problem ever since I tried to introduce timeouts, APP_DATA 
> just never gets called when I specify the filename in the client. It just 
> hangs there. On debugging, I found out that the thread is getting blocked on 
> data_ready_cond. How do I begin to debug this?
> Here is the gdb output.
> 
> 
> 
> Breakpoint 3, _mysock_dequeue_buffer (ctx=0x2f148, pq=0x2f7f0, 
> dst=0xffbeee66, max_len=1,
>     remove_partial=1) at mysock.c:193
> 193             assert(ctx && pq && dst);
> (gdb) n
> 196             PTHREAD_CALL(pthread_mutex_lock(&ctx->data_ready_lock));
> (gdb) n
> 197             while (!pq->head)
> (gdb) n
> 199 
> PTHREAD_CALL(pthread_cond_wait(&ctx->data_ready_cond,
> (gdb) n
>  >>> just hangs there.
> 
> 

Yep, does look like a deadlock.  I can't really help you here.  All I'd 
say is make sure the args to stcp_wait_for_event are exactly what you 
want them to be.
.

Path: shelby.stanford.edu!not-for-mail
From: John Gregorski <jfg@elaine25.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Test case 2.B problem: stcp_app_recv never deactivated.
Date: 02 Mar 2006 21:33:02 -0800
Organization: Stanford University, CA, USA
Lines: 116
Distribution: su
Message-ID: <ynloacc8ay9d.fsf@elaine25.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
Xref: shelby.stanford.edu su.class.cs244a:10531

The problem is that my server keeps on seeing the APP_DATA activated and
keeps on reading app data past what seems to be the end of TESTDATA.1. The
CLOSE event is never activated.

In my trace (below, in case anyone wants to see the details) I see the
client's FIN after the amount of data in TESTDATA.1 is sent, but my server
keeps on reading app data and sending it. Also, the client keeps on acking
this data. Eventually the test times out.

Anyone have any advice? I can't reproduce this problem when I download
this file with my client and server.

Thanks,
John

----------------------------------------
Here's the trace (helps to have a small font and lots of columns),
comments are inline.


[this is the packet which is the client will fin after]

send_enqueue_pkt              Sendqing packet seq=[299382] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
process_app_data              <=== Ending in state STATE_ESTAB.
my_stcp_network_send          +++++> Sending packet: seq=[299382] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298668.1747549 (1141298668.947549+800000).
control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298668.1553860]
control_loop                  ------------------------- Events triggered, time is now 1141298669.36899.
recv_pkt                      Recvqing packet seq=[240] ack=[299320] off=[5] flags=[_A____] win=[3072] datalen=[0]
recv_pkt                      Queued on top.
process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299320] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[240] ack=[299320] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=298247 < swin_bot_seqnum=299320.
process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=298783 < swin_bot_seqnum=299320.
process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=299319 < swin_bot_seqnum=299320.
process_recv_pkt              ===> Starting in state STATE_ESTAB.
process_recv_pkt              <=== Ending in state STATE_ESTAB, not reprocessing packet.

[more app data read here]

process_app_data              ===> Starting in state STATE_ESTAB.
send_enqueue_pkt              Sendqing packet seq=[299918] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
process_app_data              <=== Ending in state STATE_ESTAB.
my_stcp_network_send          +++++> Sending packet: seq=[299918] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
process_retrans_timeout       ===> Begin retransmission check.
process_retrans_timeout       Retransmitting packet.
my_stcp_network_send          +++++> Sending packet: seq=[299320] ack=[240] off=[5] flags=[______] win=[3072] datalen=[40]
send_and_track_pkt            Packet now sent 2 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
process_retrans_timeout       Retransmitting packet.
my_stcp_network_send          +++++> Sending packet: seq=[299360] ack=[240] off=[5] flags=[______] win=[3072] datalen=[22]
send_and_track_pkt            Packet now sent 2 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
process_retrans_timeout       Retransmitting packet.
my_stcp_network_send          +++++> Sending packet: seq=[299382] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
send_and_track_pkt            Packet now sent 2 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
process_retrans_timeout       <=== End retransmission check.
control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
control_loop                  ------------------------- Events triggered, time is now 1141298669.108494.
recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
recv_pkt                      Queued on top.
process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=299359 < swin_bot_seqnum=299382.
process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=299381 < swin_bot_seqnum=299382.
process_recv_pkt              ===> Starting in state STATE_ESTAB.
process_recv_pkt              <=== Ending in state STATE_ESTAB, not reprocessing packet.
process_app_data              ===> Starting in state STATE_ESTAB.
send_enqueue_pkt              Sendqing packet seq=[300454] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
process_app_data              <=== Ending in state STATE_ESTAB.
my_stcp_network_send          +++++> Sending packet: seq=[300454] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.908494 (1141298669.108494+800000).
control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
control_loop                  ------------------------- Events triggered, time is now 1141298669.146908.
recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A___F] win=[3072] datalen=[0]
recv_pkt                      Queued on top.

[here's the client fin]

process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A___F] win=[3072] datalen=[0]
process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[240] ack=[299382] off=[5] flags=[_A___F] win=[3072] datalen=[0]
process_recv_pkt              ===> Starting in state STATE_ESTAB.
my_stcp_network_send          +++++> Sending packet: seq=[299382] ack=[241] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, reprocessing packet.
process_recv_pkt              ===> Starting in state STATE_CLOSEWAIT.
process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, not reprocessing packet.

[still reading app data and sending it off]

process_app_data              ===> Starting in state STATE_CLOSEWAIT.
send_enqueue_pkt              Sendqing packet seq=[300990] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
process_app_data              <=== Ending in state STATE_CLOSEWAIT.
my_stcp_network_send          +++++> Sending packet: seq=[300990] ack=[241] off=[5] flags=[______] win=[3072] datalen=[536]
send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.946908 (1141298669.146908+800000).
control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
control_loop                  ------------------------- Events triggered, time is now 1141298669.192388.
recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
recv_pkt                      Queued on top.
process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[241] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_recv_pkt              ===> Starting in state STATE_CLOSEWAIT.
process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, not reprocessing packet.
process_app_data              ===> Starting in state STATE_CLOSEWAIT.
send_enqueue_pkt              Sendqing packet seq=[301526] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
process_app_data              <=== Ending in state STATE_CLOSEWAIT.
my_stcp_network_send          +++++> Sending packet: seq=[301526] ack=[241] off=[5] flags=[______] win=[3072] datalen=[536]
send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.992388 (1141298669.192388+800000).
control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
control_loop                  ------------------------- Events triggered, time is now 1141298669.228188.
recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
recv_pkt                      Queued on top.
process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[241] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
process_recv_pkt              ===> Starting in state STATE_CLOSEWAIT.
process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, not reprocessing packet.

[you've actually read this far!?]
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Files with one-letter names
Date: Fri, 3 Mar 2006 00:09:43 -0800
Lines: 9
Distribution: su
Message-ID: <du8tk7$51u$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10532

It seems that the given server and client applications do not allow transfer
of files with one-letter names. Specifically, I created a file called "a" on
the server directory. I ran client and typed in "a", pressed "enter". And
the client gave no response. It did not even send the file name "a" to the
server. Is anybody else experiencing this?

Thank you.


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: # test script allowance
Date: Fri, 3 Mar 2006 00:15:47 -0800
Lines: 5
Distribution: su
Message-ID: <du8tvk$5q9$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10533

I notice that today (Friday) I am allowed only 3 test runs for hw3.B. Given
that the due date is Monday, shouldn't we be allowed 5 test runs on Friday,
and then 3 test runs each on Saturday, Sunday, and Monday? Thank you.


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Files with one-letter names
Date: Fri, 3 Mar 2006 00:35:23 -0800
Lines: 17
Distribution: su
Message-ID: <du8v42$709$1@news.Stanford.EDU>
References: <du8tk7$51u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10534

Yup, the code for client.c screws up the check for this.

"Robbie Yan" <xyan@stanford.edu> wrote in message
news:du8tk7$51u$1@news.Stanford.EDU...
> It seems that the given server and client applications do not allow
transfer
> of files with one-letter names. Specifically, I created a file called "a"
on
> the server directory. I ran client and typed in "a", pressed "enter". And
> the client gave no response. It did not even send the file name "a" to the
> server. Is anybody else experiencing this?
>
> Thank you.
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS3: Q2: loss probability
Date: Fri, 3 Mar 2006 00:59:19 -0800
Lines: 9
Distribution: su
Message-ID: <du90hb$87d$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10535

In q.2 of PS 3, is loss probability defined as the instantaneous probability 
of losing a packet (which I think would increase linearly as we go up the 
sawtooth), or is it the average probability of losing a packet (averaged 
over a long period of time)?

Thanks
Tahir. 


.

Path: shelby.stanford.edu!not-for-mail
From: "Colby Ranger" <cranger@stanford.edu>
Newsgroups: su.class.cs244a
Subject: stcp_network_send() returns -1
Date: Fri, 3 Mar 2006 01:14:53 -0800
Lines: 16
Distribution: su
Message-ID: <du91ee$90b$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10536

Hi,

I pass all my tests except for 2.C because stcp_network_send() returns -1 
every time I run the test.  Everything appears to be working properly from 
my printfs. But after about 10000 bytes the error occurs when I attempt to 
send a valid pure ack packet.  I cannot get the error to occur anywhere else 
except in test 2.C. I have been looking at this for hours and I am not sure 
why this would be happening.  Is this caused by the server failing on the 
other end of the socket? Or, could I be receiving an interrupt that is 
causing the write to fail? Any suggestions would be helpful.

Thanks,

Colby 


.

Path: shelby.stanford.edu!not-for-mail
From: "Colby Ranger" <cranger@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp_network_send() returns -1
Date: Fri, 3 Mar 2006 02:37:57 -0800
Lines: 25
Distribution: su
Message-ID: <du96aa$der$1@news.Stanford.EDU>
References: <du91ee$90b$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10537

I figured it out. I was doing something stupid by making the advertised 
window size the size of my open buffer in the packets.  I think that caused 
the server to timeout, which broke the socket connection, and caused me to 
read -1.

"Colby Ranger" <cranger@stanford.edu> wrote in message 
news:du91ee$90b$1@news.Stanford.EDU...
> Hi,
>
> I pass all my tests except for 2.C because stcp_network_send() returns -1 
> every time I run the test.  Everything appears to be working properly from 
> my printfs. But after about 10000 bytes the error occurs when I attempt to 
> send a valid pure ack packet.  I cannot get the error to occur anywhere 
> else except in test 2.C. I have been looking at this for hours and I am 
> not sure why this would be happening.  Is this caused by the server 
> failing on the other end of the socket? Or, could I be receiving an 
> interrupt that is causing the write to fail? Any suggestions would be 
> helpful.
>
> Thanks,
>
> Colby
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Failing test 2.M: Go-back N not enforced
Date: Fri, 3 Mar 2006 02:41:38 -0800
Lines: 23
Distribution: su
Message-ID: <du96h1$diu$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10538

In the Go-back N protocol, if the receiver sends an ACK with ack number n,
then the sender is supposed to send all data starting at and including n,
not just the segment with sequence number n. However, do we have to send all
data starting at and including n in one huge packet? Or are we allowed to
send this data in individual packets? The second method seems more natural
since when this data is first sent out, it is broken up into packets.

I have implemented retransmission by using the second method, and
successfully transferred large files (~40MB) between client and server. To
ensure that there are enough packet drops, I actually modified network.c to
make packet dropping more likely. Even with these packet drops, my code runs
properly. Unfortunately, however, when I tested my code in the script, I
always failed 2.M, which claims that Go-back N is not enforced in my code:
e.g. "retransmitted only up until 3152 rather than 4246."

Suppose that we have to implement the first option, namely, to concatenate
unsent bytes since n all into one gigantic packet before sending it out. In
this case, how should we recompute the number of past transmissions of this
collated packet?

Thank you!


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Weird error
Date: Fri, 03 Mar 2006 03:04:31 -0800
Lines: 24
Distribution: su
Message-ID: <du97rv$elk$1@news.Stanford.EDU>
References: <du57g4$qoq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <du57g4$qoq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10539

Crap, I'm starting to get the same thing. Packet sequences and lengths 
seem to check out so far.  Nazia, do you know why you got this??

Thanks,
Will

Nazia Zaman wrote:
> Hi,
> The file transfer goes half way, and I'm NOT using the server and client 
> with -U to check whether the rest of the implementation works, however the 
> server sends this packet:
> log: network_send: an ACK packet with seq=6360, len=22 and ack=118 and 
> timestamp=3085920549
> And on the client side, a weird packet is received with seq =1, and this is 
> in stcp_api.c before transport.c kicks in. Any idea how the network could be 
> messing packets up?
> log: network_recv: a SYN packet with seq=1
> Assertion failed: len <= 0 || 
> _mysock_verify_checksum(_mysock_get_context(sd), dst, len), file stcp_api.c, 
> line 166
> Abort
> Thanks,
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test case 2.B problem: stcp_app_recv never deactivated.
Date: Fri, 03 Mar 2006 04:55:27 -0800
Lines: 126
Distribution: su
Message-ID: <du9ec1$llm$1@news.Stanford.EDU>
References: <ynloacc8ay9d.fsf@elaine25.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ynloacc8ay9d.fsf@elaine25.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10540

John Gregorski wrote:
> The problem is that my server keeps on seeing the APP_DATA activated and
> keeps on reading app data past what seems to be the end of TESTDATA.1. The
> CLOSE event is never activated.
> 
> In my trace (below, in case anyone wants to see the details) I see the
> client's FIN after the amount of data in TESTDATA.1 is sent, but my server
> keeps on reading app data and sending it. Also, the client keeps on acking
> this data. Eventually the test times out.
> 
> Anyone have any advice? I can't reproduce this problem when I download
> this file with my client and server.
> 
> Thanks,
> John
> 
> ----------------------------------------
> Here's the trace (helps to have a small font and lots of columns),
> comments are inline.
> 
> 
> [this is the packet which is the client will fin after]
> 
> send_enqueue_pkt              Sendqing packet seq=[299382] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
> process_app_data              <=== Ending in state STATE_ESTAB.
> my_stcp_network_send          +++++> Sending packet: seq=[299382] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
> send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298668.1747549 (1141298668.947549+800000).
> control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298668.1553860]
> control_loop                  ------------------------- Events triggered, time is now 1141298669.36899.
> recv_pkt                      Recvqing packet seq=[240] ack=[299320] off=[5] flags=[_A____] win=[3072] datalen=[0]
> recv_pkt                      Queued on top.
> process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299320] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[240] ack=[299320] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=298247 < swin_bot_seqnum=299320.
> process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=298783 < swin_bot_seqnum=299320.
> process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=299319 < swin_bot_seqnum=299320.
> process_recv_pkt              ===> Starting in state STATE_ESTAB.
> process_recv_pkt              <=== Ending in state STATE_ESTAB, not reprocessing packet.
> 
> [more app data read here]
> 
> process_app_data              ===> Starting in state STATE_ESTAB.
> send_enqueue_pkt              Sendqing packet seq=[299918] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
> process_app_data              <=== Ending in state STATE_ESTAB.
> my_stcp_network_send          +++++> Sending packet: seq=[299918] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
> send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
> process_retrans_timeout       ===> Begin retransmission check.
> process_retrans_timeout       Retransmitting packet.
> my_stcp_network_send          +++++> Sending packet: seq=[299320] ack=[240] off=[5] flags=[______] win=[3072] datalen=[40]
> send_and_track_pkt            Packet now sent 2 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
> process_retrans_timeout       Retransmitting packet.
> my_stcp_network_send          +++++> Sending packet: seq=[299360] ack=[240] off=[5] flags=[______] win=[3072] datalen=[22]
> send_and_track_pkt            Packet now sent 2 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
> process_retrans_timeout       Retransmitting packet.
> my_stcp_network_send          +++++> Sending packet: seq=[299382] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
> send_and_track_pkt            Packet now sent 2 times. Packet next send time 1141298669.836899 (1141298669.36899+800000).
> process_retrans_timeout       <=== End retransmission check.
> control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
> control_loop                  ------------------------- Events triggered, time is now 1141298669.108494.
> recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> recv_pkt                      Queued on top.
> process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=299359 < swin_bot_seqnum=299382.
> process_ack                   Dequeued packet in sendq since sent-pkt_top_seqnum=299381 < swin_bot_seqnum=299382.
> process_recv_pkt              ===> Starting in state STATE_ESTAB.
> process_recv_pkt              <=== Ending in state STATE_ESTAB, not reprocessing packet.
> process_app_data              ===> Starting in state STATE_ESTAB.
> send_enqueue_pkt              Sendqing packet seq=[300454] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
> process_app_data              <=== Ending in state STATE_ESTAB.
> my_stcp_network_send          +++++> Sending packet: seq=[300454] ack=[240] off=[5] flags=[______] win=[3072] datalen=[536]
> send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.908494 (1141298669.108494+800000).
> control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
> control_loop                  ------------------------- Events triggered, time is now 1141298669.146908.
> recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A___F] win=[3072] datalen=[0]
> recv_pkt                      Queued on top.
> 
> [here's the client fin]
> 
> process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A___F] win=[3072] datalen=[0]
> process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[240] ack=[299382] off=[5] flags=[_A___F] win=[3072] datalen=[0]
> process_recv_pkt              ===> Starting in state STATE_ESTAB.
> my_stcp_network_send          +++++> Sending packet: seq=[299382] ack=[241] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, reprocessing packet.
> process_recv_pkt              ===> Starting in state STATE_CLOSEWAIT.
> process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, not reprocessing packet.
> 
> [still reading app data and sending it off]
> 
> process_app_data              ===> Starting in state STATE_CLOSEWAIT.
> send_enqueue_pkt              Sendqing packet seq=[300990] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
> process_app_data              <=== Ending in state STATE_CLOSEWAIT.
> my_stcp_network_send          +++++> Sending packet: seq=[300990] ack=[241] off=[5] flags=[______] win=[3072] datalen=[536]
> send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.946908 (1141298669.146908+800000).
> control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
> control_loop                  ------------------------- Events triggered, time is now 1141298669.192388.
> recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> recv_pkt                      Queued on top.
> process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[241] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_recv_pkt              ===> Starting in state STATE_CLOSEWAIT.
> process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, not reprocessing packet.
> process_app_data              ===> Starting in state STATE_CLOSEWAIT.
> send_enqueue_pkt              Sendqing packet seq=[301526] ack=[0] off=[5] flags=[______] win=[0] datalen=[536]
> process_app_data              <=== Ending in state STATE_CLOSEWAIT.
> my_stcp_network_send          +++++> Sending packet: seq=[301526] ack=[241] off=[5] flags=[______] win=[3072] datalen=[536]
> send_and_track_pkt            Packet now sent 1 times. Packet next send time 1141298669.992388 (1141298669.192388+800000).
> control_loop                  wait-events: NETDATA[+] APPDATA[+] APPCLOSE[+] time[1141298669.836899]
> control_loop                  ------------------------- Events triggered, time is now 1141298669.228188.
> recv_pkt                      Recvqing packet seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> recv_pkt                      Queued on top.
> process_net_data              <+++++ Processing ORIGINAL received packet: seq=[240] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_recv_pkt              <+++++ Processing MODIFIED received packet: seq=[241] ack=[299382] off=[5] flags=[_A____] win=[3072] datalen=[0]
> process_recv_pkt              ===> Starting in state STATE_CLOSEWAIT.
> process_recv_pkt              <=== Ending in state STATE_CLOSEWAIT, not reprocessing packet.
> 
> [you've actually read this far!?]

It gets really screwy after the client's FIN.

- The ACK you send in response to the FIN has a sequence number less 
than the one you're currently on.  If client has already seen seq nums 
greater than this, it might ignore that packet.
- The client isn't actually ACK'ing data you send, the ACK is always 
299382.  I think it's pissed/confused that you dropped to an earlier 
sequence number.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS3: Q2: loss probability
Date: Fri, 03 Mar 2006 04:57:46 -0800
Lines: 12
Distribution: su
Message-ID: <du9egb$llm$2@news.Stanford.EDU>
References: <du90hb$87d$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du90hb$87d$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10541

Tahir Azim wrote:
> In q.2 of PS 3, is loss probability defined as the instantaneous probability 
> of losing a packet (which I think would increase linearly as we go up the 
> sawtooth), or is it the average probability of losing a packet (averaged 
> over a long period of time)?
> 
> Thanks
> Tahir. 
> 
> 

The latter.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Failing test 2.M: Go-back N not enforced
Date: Fri, 03 Mar 2006 05:02:52 -0800
Lines: 31
Distribution: su
Message-ID: <du9epu$mdp$1@news.Stanford.EDU>
References: <du96h1$diu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du96h1$diu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10542

Robbie Yan wrote:
> In the Go-back N protocol, if the receiver sends an ACK with ack number n,
> then the sender is supposed to send all data starting at and including n,
> not just the segment with sequence number n.

Rememeber only if a timeout occurred, you go back n.

> However, do we have to send all
> data starting at and including n in one huge packet? Or are we allowed to
> send this data in individual packets? The second method seems more natural
> since when this data is first sent out, it is broken up into packets.

You can split it up into packets, and remember to respect the advertised 
window.

> 
> I have implemented retransmission by using the second method, and
> successfully transferred large files (~40MB) between client and server. To
> ensure that there are enough packet drops, I actually modified network.c to
> make packet dropping more likely. Even with these packet drops, my code runs
> properly. Unfortunately, however, when I tested my code in the script, I
> always failed 2.M, which claims that Go-back N is not enforced in my code:
> e.g. "retransmitted only up until 3152 rather than 4246."
> Suppose that we have to implement the first option, namely, to concatenate
> unsent bytes since n all into one gigantic packet before sending it out. In
> this case, how should we recompute the number of past transmissions of this
> collated packet?
> 
> Thank you!
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: # test script allowance
Date: Fri, 03 Mar 2006 05:11:52 -0800
Lines: 8
Distribution: su
Message-ID: <du9fap$mpa$1@news.Stanford.EDU>
References: <du8tvk$5q9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du8tvk$5q9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10543

Robbie Yan wrote:
> I notice that today (Friday) I am allowed only 3 test runs for hw3.B. Given
> that the due date is Monday, shouldn't we be allowed 5 test runs on Friday,
> and then 3 test runs each on Saturday, Sunday, and Monday? Thank you.
> 
> 

Sure, why not.  You can have 5 test runs today.
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: HW #2-b
Date: Fri, 3 Mar 2006 20:02:52 +0000 (UTC)
Lines: 2
Distribution: su
Message-ID: <dua7dc$g0d$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10544

In part b the answer should be in terms of p the loss probability and RTT..
Is there any chance you meant to allow us to use W-hat as well?
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Last question about retransmissions
Date: Fri, 3 Mar 2006 13:15:45 -0800
Lines: 9
Distribution: su
Message-ID: <duabmb$l04$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10545

Due to variable rtt, it is possible that some later packets in the queue of 
unacked packets timeout first,
Assume that I have packets 110, 120, 130 in my queue, each of length 10, and 
130 times out first, but the last ack I got is for 110, what packets should 
be retransmited? 110, 120, 130 meaning if any packet times out the whole 
window is retransmitted? or should just 130, and any following packets be 
retransmitted (implementing the go back n literally).


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last question about retransmissions
Date: Fri, 03 Mar 2006 13:25:29 -0800
Lines: 13
Distribution: su
Message-ID: <duac8a$lg7$1@news.Stanford.EDU>
References: <duabmb$l04$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duabmb$l04$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10546

Nazia Zaman wrote:
> Due to variable rtt, it is possible that some later packets in the queue of 
> unacked packets timeout first,
> Assume that I have packets 110, 120, 130 in my queue, each of length 10, and 
> 130 times out first, but the last ack I got is for 110, what packets should 
> be retransmited? 110, 120, 130 meaning if any packet times out the whole 
> window is retransmitted? or should just 130, and any following packets be 
> retransmitted (implementing the go back n literally).
> 
> 

You should just go back to 130, as the other ones haven't timed out yet. 
  Once they time out you can go back to them.
.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last question about retransmissions
Date: Fri, 3 Mar 2006 14:35:31 -0800
Lines: 27
Distribution: su
Message-ID: <Pine.GSO.4.44.0603031430560.12719-100000@elaine4.Stanford.EDU>
References: <duabmb$l04$1@news.Stanford.EDU> <duac8a$lg7$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <duac8a$lg7$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10547

Shouldn't this not be possible? From my reading of the STCP spec, go back
N requires sending out N bytes starting from the first un'acked one.
Aren't we supposed to set the timer for all retransmitted packets to the
current time, meaning that any new packet added to the retransmit queue
will in fact time out later than anything that was already on the
retransmit queue? So in the case below, 130 should never time out before
110, or am I missing some case?

--Dinkar.

On Fri, 3 Mar 2006, Matt Falkenhagen wrote:

> Nazia Zaman wrote:
> > Due to variable rtt, it is possible that some later packets in the queue of
> > unacked packets timeout first,
> > Assume that I have packets 110, 120, 130 in my queue, each of length 10, and
> > 130 times out first, but the last ack I got is for 110, what packets should
> > be retransmited? 110, 120, 130 meaning if any packet times out the whole
> > window is retransmitted? or should just 130, and any following packets be
> > retransmitted (implementing the go back n literally).
> >
> >
>
> You should just go back to 130, as the other ones haven't timed out yet.
>   Once they time out you can go back to them.
>

.

Path: shelby.stanford.edu!elaine4.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Shrinking send window and retransmissions
Date: Fri, 3 Mar 2006 14:45:58 -0800
Lines: 24
Distribution: su
Message-ID: <Pine.GSO.4.44.0603031439050.12719-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10548

Hi,

Do we have to account for the following case:

Suppose the retransmit queue starts are sequence 100, the send window is
900 long, so that we send out bytes 100 through 999 and expect to send
1000 next.

At this point, there are two cases I am unsure of:

1. We get an ACK for 100 again and the receiver advertised window is still
900. What do we transmit? One packet i.e. 536 bytes, or two packets - one
with 536 bytes and the other with (900 - 536) bytes?

2. We get an ACK for 100 but the receiver advertised window shrinks to
300. If we transmit 300 bytes i.e. sequence numbers 100 through 399, then
what about the remaining 600 bytes (400 through 999) in the retransmit
queue. Presumably we have to keep track of them, since the app will not
provide us that data again. Do we have to reset the retransmission count
for the "extra" 600 bytes?

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last question about retransmissions
Date: Fri, 03 Mar 2006 14:53:27 -0800
Lines: 35
Distribution: su
Message-ID: <duahd6$qhr$1@news.Stanford.EDU>
References: <duabmb$l04$1@news.Stanford.EDU> <duac8a$lg7$1@news.Stanford.EDU> <Pine.GSO.4.44.0603031430560.12719-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <Pine.GSO.4.44.0603031430560.12719-100000@elaine4.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10549

Dinkar Gupta wrote:
> Shouldn't this not be possible? From my reading of the STCP spec, go back
> N requires sending out N bytes starting from the first un'acked one.
> Aren't we supposed to set the timer for all retransmitted packets to the
> current time, meaning that any new packet added to the retransmit queue
> will in fact time out later than anything that was already on the
> retransmit queue? So in the case below, 130 should never time out before
> 110, or am I missing some case?

Set it to current time??  No, you set it based on current time and 
estimated RTT, which as Nazia said can vary.

> 
> --Dinkar.
> 
> On Fri, 3 Mar 2006, Matt Falkenhagen wrote:
> 
> 
>>Nazia Zaman wrote:
>>
>>>Due to variable rtt, it is possible that some later packets in the queue of
>>>unacked packets timeout first,
>>>Assume that I have packets 110, 120, 130 in my queue, each of length 10, and
>>>130 times out first, but the last ack I got is for 110, what packets should
>>>be retransmited? 110, 120, 130 meaning if any packet times out the whole
>>>window is retransmitted? or should just 130, and any following packets be
>>>retransmitted (implementing the go back n literally).
>>>
>>>
>>
>>You should just go back to 130, as the other ones haven't timed out yet.
>>  Once they time out you can go back to them.
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Shrinking send window and retransmissions
Date: Fri, 03 Mar 2006 15:02:33 -0800
Lines: 34
Distribution: su
Message-ID: <duahua$r2s$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603031439050.12719-100000@elaine4.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <Pine.GSO.4.44.0603031439050.12719-100000@elaine4.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10550

Dinkar Gupta wrote:
> Hi,
> 
> Do we have to account for the following case:
> 
> Suppose the retransmit queue starts are sequence 100, the send window is
> 900 long, so that we send out bytes 100 through 999 and expect to send
> 1000 next.
> 
> At this point, there are two cases I am unsure of:
> 
> 1. We get an ACK for 100 again and the receiver advertised window is still
> 900. What do we transmit? One packet i.e. 536 bytes, or two packets - one
> with 536 bytes and the other with (900 - 536) bytes?

I don't think it really matters, but it would be ideal to do the two 
packets.  However if you do it that way you have to be careful about 
retransmissions: don't send any sequence number more than 6 times.

> 
> 2. We get an ACK for 100 but the receiver advertised window shrinks to
> 300. If we transmit 300 bytes i.e. sequence numbers 100 through 399, then
> what about the remaining 600 bytes (400 through 999) in the retransmit
> queue. Presumably we have to keep track of them, since the app will not
> provide us that data again. Do we have to reset the retransmission count
> for the "extra" 600 bytes?
> 

I don't see why you'd reset the retransmission count.  Why not leave 
them queued but don't send them until you can?

> Thanks,
> Dinkar.
> 
.

Path: shelby.stanford.edu!myth7.Stanford.EDU!lerhaupt
From: Gary Lerhaupt <lerhaupt@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last question about retransmissions
Date: Fri, 3 Mar 2006 15:05:23 -0800
Lines: 24
Distribution: su
Message-ID: <Pine.LNX.4.44.0603031500140.20924-100000@myth7.Stanford.EDU>
References: <duabmb$l04$1@news.Stanford.EDU> <duac8a$lg7$1@news.Stanford.EDU>
 <Pine.GSO.4.44.0603031430560.12719-100000@elaine4.Stanford.EDU>
 <duahd6$qhr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
To: Matt Falkenhagen <mjf@stanford.edu>
In-Reply-To: <duahd6$qhr$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10551

On Fri, 3 Mar 2006, Matt Falkenhagen wrote:

> Dinkar Gupta wrote:
> > Shouldn't this not be possible? From my reading of the STCP spec, go back
> > N requires sending out N bytes starting from the first un'acked one.
> > Aren't we supposed to set the timer for all retransmitted packets to the
> > current time, meaning that any new packet added to the retransmit queue
> > will in fact time out later than anything that was already on the
> > retransmit queue? So in the case below, 130 should never time out before
> > 110, or am I missing some case?
>
> Set it to current time??  No, you set it based on current time and
> estimated RTT, which as Nazia said can vary.
>

I was thinking something along the lines of Dinkar.  If you send a packet
and then send a later packet with a smaller RTT, then that RTT represents
how you view the state of the connection in general, not just for that
second packet.  So once that second smaller RTT expires you should expect
that not only your later packet got through by that time, but also your
earlier one.  Is this not the case?

Gary

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Exiting after max reties
Date: Fri, 03 Mar 2006 15:30:29 -0800
Lines: 8
Distribution: su
Message-ID: <C02E1195.3749%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Exiting after max reties
Thread-Index: AcY/GnTss2xdt6sNEdq9BgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10552

Hi.

What is the acceptable behaviour after the connection has timed out and peer
is not responding.  Do we need to set any errors or just returning from
control_loop is good enough.

Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last question about retransmissions
Date: Fri, 03 Mar 2006 15:53:07 -0800
Lines: 52
Distribution: su
Message-ID: <duakt5$1pe$1@news.Stanford.EDU>
References: <duabmb$l04$1@news.Stanford.EDU> <duac8a$lg7$1@news.Stanford.EDU> <Pine.GSO.4.44.0603031430560.12719-100000@elaine4.Stanford.EDU> <duahd6$qhr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <duahd6$qhr$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10553

Matt Falkenhagen wrote:
> Dinkar Gupta wrote:
> 
>> Shouldn't this not be possible? From my reading of the STCP spec, go back
>> N requires sending out N bytes starting from the first un'acked one.
>> Aren't we supposed to set the timer for all retransmitted packets to the
>> current time, meaning that any new packet added to the retransmit queue
>> will in fact time out later than anything that was already on the
>> retransmit queue? So in the case below, 130 should never time out before
>> 110, or am I missing some case?
> 
> 
> Set it to current time??  No, you set it based on current time and 
> estimated RTT, which as Nazia said can vary.

However, if you only remember the sending time of the packets and 
calculate the timeout based on the lastest estimated RTT (not the 
estimated RTT when the packet was sent), then packets will not timeout 
earlier than the packets sent before them.

Can we take this approach instead? I think it is more accurate to use 
the latest estimation then sticking with the old values.

> 
>>
>> --Dinkar.
>>
>> On Fri, 3 Mar 2006, Matt Falkenhagen wrote:
>>
>>
>>> Nazia Zaman wrote:
>>>
>>>> Due to variable rtt, it is possible that some later packets in the 
>>>> queue of
>>>> unacked packets timeout first,
>>>> Assume that I have packets 110, 120, 130 in my queue, each of length 
>>>> 10, and
>>>> 130 times out first, but the last ack I got is for 110, what packets 
>>>> should
>>>> be retransmited? 110, 120, 130 meaning if any packet times out the 
>>>> whole
>>>> window is retransmitted? or should just 130, and any following 
>>>> packets be
>>>> retransmitted (implementing the go back n literally).
>>>>
>>>>
>>>
>>> You should just go back to 130, as the other ones haven't timed out yet.
>>>  Once they time out you can go back to them.
>>>
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Ari David Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Exiting after max reties
Date: Fri, 03 Mar 2006 16:31:12 -0800
Lines: 14
Distribution: su
Message-ID: <duan4g$45r$1@news.Stanford.EDU>
References: <C02E1195.3749%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <C02E1195.3749%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10554

Yes, that's fine. Remember that if the connection could not be 
established, to set errno to ECONNREFUSED.



Sunny Balwani wrote:
> Hi.
> 
> What is the acceptable behaviour after the connection has timed out and peer
> is not responding.  Do we need to set any errors or just returning from
> control_loop is good enough.
> 
> Thanks.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test script allowance
Date: Fri, 3 Mar 2006 16:33:24 -0800
Lines: 10
Distribution: su
Message-ID: <duan8m$4hl$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10555

In the spirit of "it never hurts to ask"...   Could I rerun the 3A test just 
to be absolutely certain I haven't broken anything (without decrementing my 
3B use count), before I run the 3B test?  In other words, are there seperate 
daily counters for 3A, 3B, etc, or is there one universal counter?



Thanks, Bruce


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script allowance
Date: Fri, 03 Mar 2006 16:34:51 -0800
Lines: 13
Distribution: su
Message-ID: <duanba$4jq$1@news.Stanford.EDU>
References: <duan8m$4hl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Debian/1.7.12-0ubuntu2
X-Accept-Language: en
In-Reply-To: <duan8m$4hl$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10556

Bruce Schechter wrote:
> In the spirit of "it never hurts to ask"...   Could I rerun the 3A test just 
> to be absolutely certain I haven't broken anything (without decrementing my 
> 3B use count), before I run the 3B test?  In other words, are there seperate 
> daily counters for 3A, 3B, etc, or is there one universal counter?
> 
> 
> 
> Thanks, Bruce
> 
> 

Yep, separate counters.
.

Path: shelby.stanford.edu!not-for-mail
From: "Jeremy Robin" <jirobin@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test script failing
Date: Fri, 3 Mar 2006 18:19:09 -0800
Lines: 16
Distribution: su
Message-ID: <duatev$chc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10557

has anyone else had the test script fail with this error?

connected to 171.64.15.80 at port 34833
/usr/pubsw/bin/tar tf failed with rc -1
couldn't submit code for testing



i can't get any results.........



thanks,
Jeremy 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Tests for Part C
Date: Fri, 3 Mar 2006 21:09:47 -0600
Lines: 40
Distribution: su
Message-ID: <dub0dt$fgq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10558


Is anyone else having problems getting the program to run for part c? I gave 
the scripts a shot after the scripts were up and running and almost all the 
tests are failing during the three way handshake:

Here is my output:

Testing special case:  .././ftpcopy_tcp -U ext 1 41659@elaine42.Stanford.EDU
Got a data segment with 0 bytes
Connection state = 1
sending a SYN/ACK with seq(221)/ack(222)
Timed out waiting for response from peer.
Reducing number of tries to 4
sending a SYN/ACK with seq(221)/ack(222)
Timed out waiting for response from peer.
Reducing number of tries to 3
sending a SYN/ACK with seq(221)/ack(222)
Timed out waiting for response from peer.
Reducing number of tries to 2
sending a SYN/ACK with seq(221)/ack(222)
Timed out waiting for response from peer.
Reducing number of tries to 1
sending a SYN/ACK with seq(221)/ack(222)
Timed out waiting for response from peer.
Reducing number of tries to 0
sending a SYN/ACK with seq(221)/ack(222)
Timed out waiting for response from peer.
Reducing number of tries to -1

It looks like whatever my program is talking to is not responding to the 
SYN/ACK with an ACK.

My code passes all the tests for Parts A and B, and seems to work with the 
ftpd server supplied, so something seems fishy.

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Tests for Part C
Date: Fri, 3 Mar 2006 21:12:46 -0600
Lines: 49
Distribution: su
Message-ID: <dub0jf$fmr$1@news.Stanford.EDU>
References: <dub0dt$fgq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10559

As a follow-up, if these tests are actually running for anyone, please let 
me know.  I am curious if there is something just generally wrong with the 
scripts.


"Roy Zeighami" <zeighami@stanford.edu> wrote in message 
news:dub0dt$fgq$1@news.Stanford.EDU...
>
> Is anyone else having problems getting the program to run for part c? I 
> gave the scripts a shot after the scripts were up and running and almost 
> all the tests are failing during the three way handshake:
>
> Here is my output:
>
> Testing special case:  .././ftpcopy_tcp -U ext 1 
> 41659@elaine42.Stanford.EDU
> Got a data segment with 0 bytes
> Connection state = 1
> sending a SYN/ACK with seq(221)/ack(222)
> Timed out waiting for response from peer.
> Reducing number of tries to 4
> sending a SYN/ACK with seq(221)/ack(222)
> Timed out waiting for response from peer.
> Reducing number of tries to 3
> sending a SYN/ACK with seq(221)/ack(222)
> Timed out waiting for response from peer.
> Reducing number of tries to 2
> sending a SYN/ACK with seq(221)/ack(222)
> Timed out waiting for response from peer.
> Reducing number of tries to 1
> sending a SYN/ACK with seq(221)/ack(222)
> Timed out waiting for response from peer.
> Reducing number of tries to 0
> sending a SYN/ACK with seq(221)/ack(222)
> Timed out waiting for response from peer.
> Reducing number of tries to -1
>
> It looks like whatever my program is talking to is not responding to the 
> SYN/ACK with an ACK.
>
> My code passes all the tests for Parts A and B, and seems to work with the 
> ftpd server supplied, so something seems fishy.
>
> Thanks,
>
> Roy
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Tests for Part C
Date: Fri, 3 Mar 2006 21:43:35 -0600
Lines: 59
Distribution: su
Message-ID: <dub2d9$hf5$1@news.Stanford.EDU>
References: <dub0dt$fgq$1@news.Stanford.EDU> <dub0jf$fmr$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10560

Never mind, I found the problem with my stuff :)

Thanks,

Roy

"Roy Zeighami" <zeighami@stanford.edu> wrote in message 
news:dub0jf$fmr$1@news.Stanford.EDU...
> As a follow-up, if these tests are actually running for anyone, please let 
> me know.  I am curious if there is something just generally wrong with the 
> scripts.
>
>
> "Roy Zeighami" <zeighami@stanford.edu> wrote in message 
> news:dub0dt$fgq$1@news.Stanford.EDU...
>>
>> Is anyone else having problems getting the program to run for part c? I 
>> gave the scripts a shot after the scripts were up and running and almost 
>> all the tests are failing during the three way handshake:
>>
>> Here is my output:
>>
>> Testing special case:  .././ftpcopy_tcp -U ext 1 
>> 41659@elaine42.Stanford.EDU
>> Got a data segment with 0 bytes
>> Connection state = 1
>> sending a SYN/ACK with seq(221)/ack(222)
>> Timed out waiting for response from peer.
>> Reducing number of tries to 4
>> sending a SYN/ACK with seq(221)/ack(222)
>> Timed out waiting for response from peer.
>> Reducing number of tries to 3
>> sending a SYN/ACK with seq(221)/ack(222)
>> Timed out waiting for response from peer.
>> Reducing number of tries to 2
>> sending a SYN/ACK with seq(221)/ack(222)
>> Timed out waiting for response from peer.
>> Reducing number of tries to 1
>> sending a SYN/ACK with seq(221)/ack(222)
>> Timed out waiting for response from peer.
>> Reducing number of tries to 0
>> sending a SYN/ACK with seq(221)/ack(222)
>> Timed out waiting for response from peer.
>> Reducing number of tries to -1
>>
>> It looks like whatever my program is talking to is not responding to the 
>> SYN/ACK with an ACK.
>>
>> My code passes all the tests for Parts A and B, and seems to work with 
>> the ftpd server supplied, so something seems fishy.
>>
>> Thanks,
>>
>> Roy
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Three Way Handshake Question
Date: Fri, 3 Mar 2006 21:57:58 -0600
Lines: 15
Distribution: su
Message-ID: <dub387$i9u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10561

I figured out why the tests were failing for Part C and made a change that 
"fixed" the problem.

The problem was that the Client's ACK was being dropped.  The client 
transitioned to the to the ESTABLISHED state but the server was stuck in 
SYN_RCVD.

The first thing the client does is try to read from its socket (rather than 
write), so no ACK is sent to the server.  In my implementation, the server 
resends the SYN/ACK, but it looks like to me that the TCP spec wants anyone 
in the ESTABLISHED state to reset the connection when they get a SYN.  We 
aren't using reset so I was wondering if anyone else had any ideas how they 
were deal with this issue. 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last question about retransmissions
Date: Sat, 04 Mar 2006 01:22:05 -0800
Lines: 30
Distribution: su
Message-ID: <dubm7v$7j6$1@news.Stanford.EDU>
References: <duabmb$l04$1@news.Stanford.EDU> <duac8a$lg7$1@news.Stanford.EDU> <Pine.GSO.4.44.0603031430560.12719-100000@elaine4.Stanford.EDU> <duahd6$qhr$1@news.Stanford.EDU> <Pine.LNX.4.44.0603031500140.20924-100000@myth7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.LNX.4.44.0603031500140.20924-100000@myth7.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10562

Gary Lerhaupt wrote:
> On Fri, 3 Mar 2006, Matt Falkenhagen wrote:
> 
> 
>>Dinkar Gupta wrote:
>>
>>>Shouldn't this not be possible? From my reading of the STCP spec, go back
>>>N requires sending out N bytes starting from the first un'acked one.
>>>Aren't we supposed to set the timer for all retransmitted packets to the
>>>current time, meaning that any new packet added to the retransmit queue
>>>will in fact time out later than anything that was already on the
>>>retransmit queue? So in the case below, 130 should never time out before
>>>110, or am I missing some case?
>>
>>Set it to current time??  No, you set it based on current time and
>>estimated RTT, which as Nazia said can vary.
>>
> 
> 
> I was thinking something along the lines of Dinkar.  If you send a packet
> and then send a later packet with a smaller RTT, then that RTT represents
> how you view the state of the connection in general, not just for that
> second packet.  So once that second smaller RTT expires you should expect
> that not only your later packet got through by that time, but also your
> earlier one.  Is this not the case?
> 
> Gary
> 

OK, I see your point.  Either way is OK.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last question about retransmissions
Date: Sat, 04 Mar 2006 01:22:52 -0800
Lines: 61
Distribution: su
Message-ID: <dubm9f$7j6$2@news.Stanford.EDU>
References: <duabmb$l04$1@news.Stanford.EDU> <duac8a$lg7$1@news.Stanford.EDU> <Pine.GSO.4.44.0603031430560.12719-100000@elaine4.Stanford.EDU> <duahd6$qhr$1@news.Stanford.EDU> <duakt5$1pe$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duakt5$1pe$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10563

Hau Jia Chew wrote:
> Matt Falkenhagen wrote:
> 
>> Dinkar Gupta wrote:
>>
>>> Shouldn't this not be possible? From my reading of the STCP spec, go 
>>> back
>>> N requires sending out N bytes starting from the first un'acked one.
>>> Aren't we supposed to set the timer for all retransmitted packets to the
>>> current time, meaning that any new packet added to the retransmit queue
>>> will in fact time out later than anything that was already on the
>>> retransmit queue? So in the case below, 130 should never time out before
>>> 110, or am I missing some case?
>>
>>
>>
>> Set it to current time??  No, you set it based on current time and 
>> estimated RTT, which as Nazia said can vary.
> 
> 
> However, if you only remember the sending time of the packets and 
> calculate the timeout based on the lastest estimated RTT (not the 
> estimated RTT when the packet was sent), then packets will not timeout 
> earlier than the packets sent before them.
> 
> Can we take this approach instead? I think it is more accurate to use 
> the latest estimation then sticking with the old values.
> 

Yes you can do this.

>>
>>>
>>> --Dinkar.
>>>
>>> On Fri, 3 Mar 2006, Matt Falkenhagen wrote:
>>>
>>>
>>>> Nazia Zaman wrote:
>>>>
>>>>> Due to variable rtt, it is possible that some later packets in the 
>>>>> queue of
>>>>> unacked packets timeout first,
>>>>> Assume that I have packets 110, 120, 130 in my queue, each of 
>>>>> length 10, and
>>>>> 130 times out first, but the last ack I got is for 110, what 
>>>>> packets should
>>>>> be retransmited? 110, 120, 130 meaning if any packet times out the 
>>>>> whole
>>>>> window is retransmitted? or should just 130, and any following 
>>>>> packets be
>>>>> retransmitted (implementing the go back n literally).
>>>>>
>>>>>
>>>>
>>>> You should just go back to 130, as the other ones haven't timed out 
>>>> yet.
>>>>  Once they time out you can go back to them.
>>>>
>>>
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script failing
Date: Sat, 04 Mar 2006 01:24:12 -0800
Lines: 19
Distribution: su
Message-ID: <dubmbv$7j6$3@news.Stanford.EDU>
References: <duatev$chc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duatev$chc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10564

Jeremy Robin wrote:
> has anyone else had the test script fail with this error?
> 
> connected to 171.64.15.80 at port 34833
> /usr/pubsw/bin/tar tf failed with rc -1
> couldn't submit code for testing
> 
> 
> 
> i can't get any results.........
> 
> 
> 
> thanks,
> Jeremy 
> 
> 

Very odd.  Which test are you running and is this happening consistently?
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Three Way Handshake Question
Date: Sat, 4 Mar 2006 01:33:04 -0800
Lines: 27
Distribution: su
Message-ID: <dubmsn$7v6$1@news.Stanford.EDU>
References: <dub387$i9u$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10565

Hey Roy,

  My client just treats the repeated SYN/ACK as a duplicate packet, just 
like any other, and resends an ACK for the next byte that it is expecting. 
The server should recognize this an acknowledgement for its SYNACK and 
transition to the ESTABLISHED state. This method worked for me.

Ram

"Roy Zeighami" <zeighami@stanford.edu> wrote in message 
news:dub387$i9u$1@news.Stanford.EDU...
>I figured out why the tests were failing for Part C and made a change that 
>"fixed" the problem.
>
> The problem was that the Client's ACK was being dropped.  The client 
> transitioned to the to the ESTABLISHED state but the server was stuck in 
> SYN_RCVD.
>
> The first thing the client does is try to read from its socket (rather 
> than write), so no ACK is sent to the server.  In my implementation, the 
> server resends the SYN/ACK, but it looks like to me that the TCP spec 
> wants anyone in the ESTABLISHED state to reset the connection when they 
> get a SYN.  We aren't using reset so I was wondering if anyone else had 
> any ideas how they were deal with this issue.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: gethostbyname in PA 3.C
Date: Sat, 4 Mar 2006 01:51:15 -0800
Lines: 11
Distribution: su
Message-ID: <dubnuu$8mo$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10566

Are we allowed to use gethostbyname in our ftpcopy code? I keep getting the 
following assertion from inside gethostbyname...

Assertion failed: ctx, file mysock.c, line 408

If that doesnt work with the mysock api, is there an alternate function that 
can be used?

Tahir. 


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Failing 2.M, revisited
Date: Sat, 4 Mar 2006 03:21:48 -0800
Lines: 21
Distribution: su
Message-ID: <dubt8b$d5l$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10567

Hi,

My code has been consistently passing every test but 2.M. Specifically, the
output complains that "Go-back N not enforced (retransmitted only up until
3132 rather than 4204".

I checked my .network_log* files and found that I was indeed sending out all
packets that were unacknowledged. In this case, I only got ACK of up to
ackNum=1132. So I kept resending packets covering data from bytes numbered
1132 to 4204. I retransmitted every single packet exactly 5 times until the
first time I had to retransmit a packet for the 6th time, my program
terminated the network connection.

So I think that my program is doing exactly go-back-N: retransmit all
segments with sequence numbers equal or above the maximum ACK number
received. Is anybody else experiencing a similar issue? Or am I missing
something here?

Thank you!


.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: libftpcopy.a
Date: Sat, 4 Mar 2006 11:50:39 -0800
Lines: 7
Distribution: su
Message-ID: <Pine.GSO.4.44.0603041147330.27574-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10568

Hello,

I'm not much of a Makefile guru...how do we incorporate the libftpcopy.a
and other .a files into the Makefile?  Thanks in advance.

-wks

.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: SYN-ACK retransmission
Date: Sat, 04 Mar 2006 13:04:21 -0800
Lines: 5
Distribution: su
Message-ID: <ducvcl$cmd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10569

Suppose you are in state SYN RCVD, but you timeout and runs out of 
retransmissions on you SYN-ACK.  Do you go back to state LISTEN or 
terminate the connection with some error?

--George
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: gethostbyname in PA 3.C
Date: Sat, 04 Mar 2006 13:12:03 -0800
Lines: 17
Distribution: su
Message-ID: <ducvr3$d1q$1@news.Stanford.EDU>
References: <dubnuu$8mo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dubnuu$8mo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10570

I'm getting the same assertation failure by on mywrite. We might not be 
initializing something. I'll get back to you if I fix it.

Paul

Tahir Azim wrote:
> Are we allowed to use gethostbyname in our ftpcopy code? I keep getting the 
> following assertion from inside gethostbyname...
> 
> Assertion failed: ctx, file mysock.c, line 408
> 
> If that doesnt work with the mysock api, is there an alternate function that 
> can be used?
> 
> Tahir. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: gethostbyname in PA 3.C
Date: Sat, 04 Mar 2006 13:17:28 -0800
Lines: 8
Distribution: su
Message-ID: <dud058$dfl$1@news.Stanford.EDU>
References: <dubnuu$8mo$1@news.Stanford.EDU> <ducvr3$d1q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <ducvr3$d1q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10571

I found my error (might be yours too).

I was using mywrite on a filedescriptor and not a socket that was opened 
with mysocket and myaccept. Make sure all your methods are using "my" in 
front of them or else the ctx won't be initialized (or in my case, don't 
use my infront of a method that isn't over TCP).

Paul
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: overlapping packets
Date: Sat, 04 Mar 2006 13:25:04 -0800
Lines: 37
Distribution: su
Message-ID: <dud0je$dqn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10572

I'm passing all the tests for hw3b but overlapping packets and receiver 
window. The test script is telling me way too few bytes were actually 
transferred so it's most likely due to 5 timeouts and an early 
connection close.

I think I'm confused about what to do when receiving overlapping 
packets. Right now I'm just receiving incoming data until I get to a 
byte I already received, and then just dropping the rest. (give 
precedence to data already received).  Should I just blow away the old 
data and receive as much as I can into my window for any new packet?

I'm thankful for any comments,
Will


----------------------------------------------------------------------
Test 2.E [out of 5]
Checks Rx against bad sender (overlapping packets, etc.)

Results:  NOT OK

File size differs for 
/usr/class/cs244a/grading_script/hw3/net_instruct_resend_seqnum.out!
(You downloaded 265 byte(s), expected 3092).
Client output:

----------------------------------------------------------------------

Test 2.F [out of 5]
Checks transport layer enforces correct receiver window.

Results:  NOT OK

File size differs for 
/usr/class/cs244a/grading_script/hw3/net_instruct_pkts_overlapping_upper_window.out!
(You downloaded 225 byte(s), expected 3212).
Client output:
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: libftpcopy.a
Date: Sat, 04 Mar 2006 13:57:20 -0800
Lines: 11
Distribution: su
Message-ID: <dud2g4$ffs$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603041147330.27574-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603041147330.27574-100000@elaine7.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10573

Wai Kei So wrote:
> Hello,
> 
> I'm not much of a Makefile guru...how do we incorporate the libftpcopy.a
> and other .a files into the Makefile?  Thanks in advance.
> 
> -wks
> 

The Makefile is setup to use the reference ftpcopy by default.  If you 
want to use your own ftpcopy, add all your .c files to FTPCOPY_SRCS.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Failing 2.M, revisited
Date: Sat, 04 Mar 2006 14:00:10 -0800
Lines: 25
Distribution: su
Message-ID: <dud2ld$ffs$2@news.Stanford.EDU>
References: <dubt8b$d5l$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dubt8b$d5l$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10574

Robbie Yan wrote:
> Hi,
> 
> My code has been consistently passing every test but 2.M. Specifically, the
> output complains that "Go-back N not enforced (retransmitted only up until
> 3132 rather than 4204".
> 
> I checked my .network_log* files and found that I was indeed sending out all
> packets that were unacknowledged. In this case, I only got ACK of up to
> ackNum=1132. So I kept resending packets covering data from bytes numbered
> 1132 to 4204. I retransmitted every single packet exactly 5 times until the
> first time I had to retransmit a packet for the 6th time, my program
> terminated the network connection.
> 
> So I think that my program is doing exactly go-back-N: retransmit all
> segments with sequence numbers equal or above the maximum ACK number
> received. Is anybody else experiencing a similar issue? Or am I missing
> something here?
> 
> Thank you!
> 
> 

Make sure you send all data from 1132 to 4204 at once.  The test script 
is complaining that you only got up to 3132.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: SYN-ACK retransmission
Date: Sat, 04 Mar 2006 14:03:27 -0800
Lines: 8
Distribution: su
Message-ID: <dud2rj$frq$1@news.Stanford.EDU>
References: <ducvcl$cmd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <ducvcl$cmd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10575

George Su wrote:
> Suppose you are in state SYN RCVD, but you timeout and runs out of 
> retransmissions on you SYN-ACK.  Do you go back to state LISTEN or 
> terminate the connection with some error?
> 
> --George

Always drop the connection if you run out of retransmissions.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: overlapping packets
Date: Sat, 04 Mar 2006 14:13:58 -0800
Lines: 47
Distribution: su
Message-ID: <dud3fa$gcd$1@news.Stanford.EDU>
References: <dud0je$dqn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dud0je$dqn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10576

Will Palmeri wrote:
> I'm passing all the tests for hw3b but overlapping packets and receiver 
> window. The test script is telling me way too few bytes were actually 
> transferred so it's most likely due to 5 timeouts and an early 
> connection close.
> 
> I think I'm confused about what to do when receiving overlapping 
> packets. Right now I'm just receiving incoming data until I get to a 
> byte I already received, and then just dropping the rest. (give 
> precedence to data already received).  Should I just blow away the old 
> data and receive as much as I can into my window for any new packet?

The problem with dropping the rest is you could have a highly fragmented 
receive window and the new packet can span many fragments, so you 
wouldn't get all the data from the new packet.  You should get as much 
data as you can (everything within the receiver window).  Whether you 
blow away old data or just write in the "holes" doesn't matter, you can 
assume the old and new data are the same.

> 
> I'm thankful for any comments,
> Will
> 
> 
> ----------------------------------------------------------------------
> Test 2.E [out of 5]
> Checks Rx against bad sender (overlapping packets, etc.)
> 
> Results:  NOT OK
> 
> File size differs for 
> /usr/class/cs244a/grading_script/hw3/net_instruct_resend_seqnum.out!
> (You downloaded 265 byte(s), expected 3092).
> Client output:
> 
> ----------------------------------------------------------------------
> 
> Test 2.F [out of 5]
> Checks transport layer enforces correct receiver window.
> 
> Results:  NOT OK
> 
> File size differs for 
> /usr/class/cs244a/grading_script/hw3/net_instruct_pkts_overlapping_upper_window.out! 
> 
> (You downloaded 225 byte(s), expected 3212).
> Client output:
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: overlapping packets
Date: Sat, 04 Mar 2006 14:16:54 -0800
Lines: 51
Distribution: su
Message-ID: <dud3kj$gf4$1@news.Stanford.EDU>
References: <dud0je$dqn$1@news.Stanford.EDU> <dud3fa$gcd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dud3fa$gcd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10577

Matt you are right, thanks so much for the help.
-Will

Matt Falkenhagen wrote:
> Will Palmeri wrote:
>> I'm passing all the tests for hw3b but overlapping packets and 
>> receiver window. The test script is telling me way too few bytes were 
>> actually transferred so it's most likely due to 5 timeouts and an 
>> early connection close.
>>
>> I think I'm confused about what to do when receiving overlapping 
>> packets. Right now I'm just receiving incoming data until I get to a 
>> byte I already received, and then just dropping the rest. (give 
>> precedence to data already received).  Should I just blow away the old 
>> data and receive as much as I can into my window for any new packet?
> 
> The problem with dropping the rest is you could have a highly fragmented 
> receive window and the new packet can span many fragments, so you 
> wouldn't get all the data from the new packet.  You should get as much 
> data as you can (everything within the receiver window).  Whether you 
> blow away old data or just write in the "holes" doesn't matter, you can 
> assume the old and new data are the same.
> 
>>
>> I'm thankful for any comments,
>> Will
>>
>>
>> ----------------------------------------------------------------------
>> Test 2.E [out of 5]
>> Checks Rx against bad sender (overlapping packets, etc.)
>>
>> Results:  NOT OK
>>
>> File size differs for 
>> /usr/class/cs244a/grading_script/hw3/net_instruct_resend_seqnum.out!
>> (You downloaded 265 byte(s), expected 3092).
>> Client output:
>>
>> ----------------------------------------------------------------------
>>
>> Test 2.F [out of 5]
>> Checks transport layer enforces correct receiver window.
>>
>> Results:  NOT OK
>>
>> File size differs for 
>> /usr/class/cs244a/grading_script/hw3/net_instruct_pkts_overlapping_upper_window.out! 
>>
>> (You downloaded 225 byte(s), expected 3212).
>> Client output:
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW #2-b
Date: Sat, 04 Mar 2006 14:47:09 -0800
Lines: 5
Distribution: su
Message-ID: <dud5dg$huf$1@news.Stanford.EDU>
References: <dua7dc$g0d$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dua7dc$g0d$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10578

Stefan Thomas Mohler wrote:
> In part b the answer should be in terms of p the loss probability and RTT..
> Is there any chance you meant to allow us to use W-hat as well?

No, you don't need W-hat.
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS3 1a
Date: Sat, 04 Mar 2006 15:05:14 -0800
Lines: 8
Distribution: su
Message-ID: <dud6fa$j7n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10579

Hello,

The sender sends 1000 packets/second, which means TRANSP (transmission
time) at the sender is 1 ms. So how could the end-to-end delay be less
than 1 ms?

Thanks,
--Michi
.

Path: shelby.stanford.edu!not-for-mail
From: "Jeremy Robin" <jirobin@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script failing
Date: Sat, 4 Mar 2006 15:51:01 -0800
Lines: 30
Distribution: su
Message-ID: <dud955$lmb$1@news.Stanford.EDU>
References: <duatev$chc$1@news.Stanford.EDU> <dubmbv$7j6$3@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10580

I'm running hw3b script and it only happens once the test script reaches the 
newer test files, net_instruct_resend_same_info, etc....  and it does happen 
every time.


Jeremy



"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dubmbv$7j6$3@news.Stanford.EDU...
> Jeremy Robin wrote:
>> has anyone else had the test script fail with this error?
>>
>> connected to 171.64.15.80 at port 34833
>> /usr/pubsw/bin/tar tf failed with rc -1
>> couldn't submit code for testing
>>
>>
>>
>> i can't get any results.........
>>
>>
>>
>> thanks,
>> Jeremy
>
> Very odd.  Which test are you running and is this happening consistently? 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: PS3 1a
Date: Sat, 4 Mar 2006 23:52:21 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: <dud97l$lii$1@news.Stanford.EDU>
References: <dud6fa$j7n$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10581

I think the 1000 pkts/sec do not use the line to capacity which means you
cannot infer the TRANSP time.  I.e. you could send 1000 pkts/sec on a one Gb/s
line or on a 10 Gb/s line and each would have different transmission times..
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Style grade
Date: Sat, 4 Mar 2006 16:21:33 -0800
Lines: 9
Distribution: su
Message-ID: <dudaue$n5a$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10582

Hi TAs,

Does the style grade for 3C only depend on our implementation of STCP in 
transport.c, or will you guys look at ftpcopy as well (if we decide to our 
own version).

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: stcp_app_send
Date: Sat, 04 Mar 2006 16:39:17 -0800
Lines: 6
Distribution: su
Message-ID: <dudc04$npi$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10583

Is there a limit on how many bytes can be passed to stcp_app_send() at a 
time? When I pass more than MSS bytes, the first MSS bytes get sent fine 
but the rest are zero'd out. I'm wondering if there's a limitation on 
app_send or is something wrong with my code.

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Unix question
Date: Sat, 4 Mar 2006 16:42:59 -0800
Lines: 7
Distribution: su
Message-ID: <dudc6g$o0g$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10584

Can a Unix guru out there tell me a way to pipe the printout of a program
into a file but in the meantime, still keep the program interactive? I would
like to run the test script, pipe its output into a file, but still be able
to answer "y" or "n" to the question that the script poses (whether I would
like to create a separate solution). Thank you!


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS3 1a
Date: Sat, 04 Mar 2006 16:43:45 -0800
Lines: 10
Distribution: su
Message-ID: <dudc81$o14$1@news.Stanford.EDU>
References: <dud6fa$j7n$1@news.Stanford.EDU> <dud97l$lii$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dud97l$lii$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10585

Good point, Stefan. But then the question becomes: What's the
transmission rate at the host? I guess I can assume it's same as the
switches ... or can I?

--Michi

Stefan Thomas Mohler wrote:
> I think the 1000 pkts/sec do not use the line to capacity which means you
> cannot infer the TRANSP time.  I.e. you could send 1000 pkts/sec on a one Gb/s
> line or on a 10 Gb/s line and each would have different transmission times..
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp_app_send
Date: Sat, 04 Mar 2006 16:43:56 -0800
Lines: 10
Distribution: su
Message-ID: <dudc8r$o0v$1@news.Stanford.EDU>
References: <dudc04$npi$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dudc04$npi$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10586

NM. The latter was the case.


Naeim Semsarilar wrote:
> Is there a limit on how many bytes can be passed to stcp_app_send() at a 
> time? When I pass more than MSS bytes, the first MSS bytes get sent fine 
> but the rest are zero'd out. I'm wondering if there's a limitation on 
> app_send or is something wrong with my code.
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Style grade
Date: Sat, 04 Mar 2006 16:44:13 -0800
Lines: 12
Distribution: su
Message-ID: <dudcfa$o2e$1@news.Stanford.EDU>
References: <dudaue$n5a$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <dudaue$n5a$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10587

Only transport.c

Ramanan wrote:
> Hi TAs,
> 
> Does the style grade for 3C only depend on our implementation of STCP in 
> transport.c, or will you guys look at ftpcopy as well (if we decide to our 
> own version).
> 
> Ram 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Style grade
Date: Sat, 04 Mar 2006 16:55:33 -0800
Lines: 15
Distribution: su
Message-ID: <dudcuk$opa$1@news.Stanford.EDU>
References: <dudaue$n5a$1@news.Stanford.EDU> <dudcfa$o2e$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dudcfa$o2e$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10588

Is a full-fledged README required for 3B?


Ari Greenberg wrote:
> Only transport.c
> 
> Ramanan wrote:
>> Hi TAs,
>>
>> Does the style grade for 3C only depend on our implementation of STCP 
>> in transport.c, or will you guys look at ftpcopy as well (if we decide 
>> to our own version).
>>
>> Ram
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Unix question
Date: Sat, 04 Mar 2006 16:57:37 -0800
Lines: 19
Distribution: su
Message-ID: <dudd20$ot2$1@news.Stanford.EDU>
References: <dudc6g$o0g$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dudc6g$o0g$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10589

You can use tee command to read from stdin and write to both stdout
and file. For example,

   program | tee out_file

puts the output of the program to stdout and out_file, so you can
interact with the program and save the output to the file at the same
time.

--Michi

Robbie Yan wrote:
> Can a Unix guru out there tell me a way to pipe the printout of a program
> into a file but in the meantime, still keep the program interactive? I would
> like to run the test script, pipe its output into a file, but still be able
> to answer "y" or "n" to the question that the script poses (whether I would
> like to create a separate solution). Thank you!
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Can't submit 3C for testing
Date: Sat, 4 Mar 2006 17:16:58 -0800
Lines: 83
Distribution: su
Message-ID: <dude6b$pva$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10590

Hi,

I'm know I'm probably missing something silly here, but whenever I try and 
submit 3C for testing, I get this message. Can someone please tell me what 
I'm missing? Thanks.

Ram

----

elaine19:~/cs244a/hw3> /afs/ir/class/cs244a/bin/test_code.pl hw3c *.c *.h 
Makefile ENVCFG.MK
Creating submission tarball...
ENVCFG.MK
Makefile
client.c
connection_demux.c
connection_demux.h
echo_client_main.c
echo_server_main.c
ftpcopy.c
ftpparse.c
ftpparse.h
mysock.c
mysock.h
mysock_api.c
mysock_hash.h
mysock_impl.h
mysock_vns.h
network.c
network.h
network_io.c
network_io.h
network_io_socket.c
network_io_socket.h
network_io_tcp.c
network_io_vns.c
server.c
stcp_api.c
stcp_api.h
tcp_sum.c
tcp_sum.h
transport.c
transport.h
ENVCFG.MK
Makefile
client.c
tar: client.c: Could not create file: Permission denied
connection_demux.c
connection_demux.h
echo_client_main.c
echo_server_main.c
ftpcopy.c
ftpparse.c
ftpparse.h
mysock.c
mysock.h
mysock_api.c
mysock_hash.h
mysock_impl.h
mysock_vns.h
network.c
network.h
network_io.c
network_io.h
network_io_socket.c
network_io_socket.h
network_io_tcp.c
network_io_vns.c
server.c
tar: server.c: Could not create file: Permission denied
stcp_api.c
stcp_api.h
tcp_sum.c
tcp_sum.h
transport.c
transport.h
tar: Error exit delayed from previous errors
can't untar temporary tarball
elaine19:~/cs244a/hw3>



.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: PS3 1a
Date: Sun, 5 Mar 2006 01:26:30 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: <dudeo5$lii$2@news.Stanford.EDU>
References: <dud6fa$j7n$1@news.Stanford.EDU> <dud97l$lii$1@news.Stanford.EDU> <dudc81$o14$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10591

The way I parse the grammer of the question is that the 6 links and 5 routers
all share the transmission rate of 1 Gb/s while the source host chooses to
transmit at 1000 pkts of 1024 bytes a second.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 04 Mar 2006 17:39:01 -0800
Lines: 87
Distribution: su
Message-ID: <dudffp$quf$1@news.Stanford.EDU>
References: <dude6b$pva$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dude6b$pva$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10592

Ramanan wrote:
> Hi,
> 
> I'm know I'm probably missing something silly here, but whenever I try and 
> submit 3C for testing, I get this message. Can someone please tell me what 
> I'm missing? Thanks.
> 
> Ram
> 
> ----
> 
> elaine19:~/cs244a/hw3> /afs/ir/class/cs244a/bin/test_code.pl hw3c *.c *.h 
> Makefile ENVCFG.MK
> Creating submission tarball...
> ENVCFG.MK
> Makefile
> client.c
> connection_demux.c
> connection_demux.h
> echo_client_main.c
> echo_server_main.c
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> mysock.c
> mysock.h
> mysock_api.c
> mysock_hash.h
> mysock_impl.h
> mysock_vns.h
> network.c
> network.h
> network_io.c
> network_io.h
> network_io_socket.c
> network_io_socket.h
> network_io_tcp.c
> network_io_vns.c
> server.c
> stcp_api.c
> stcp_api.h
> tcp_sum.c
> tcp_sum.h
> transport.c
> transport.h
> ENVCFG.MK
> Makefile
> client.c
> tar: client.c: Could not create file: Permission denied
> connection_demux.c
> connection_demux.h
> echo_client_main.c
> echo_server_main.c
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> mysock.c
> mysock.h
> mysock_api.c
> mysock_hash.h
> mysock_impl.h
> mysock_vns.h
> network.c
> network.h
> network_io.c
> network_io.h
> network_io_socket.c
> network_io_socket.h
> network_io_tcp.c
> network_io_vns.c
> server.c
> tar: server.c: Could not create file: Permission denied
> stcp_api.c
> stcp_api.h
> tcp_sum.c
> tcp_sum.h
> transport.c
> transport.h
> tar: Error exit delayed from previous errors
> can't untar temporary tarball
> elaine19:~/cs244a/hw3>
> 
> 
> 

Yikes.  Has anyone ran the 3.C script successfully?  Or does everyone 
get this?
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 04 Mar 2006 17:44:40 -0800
Lines: 95
Distribution: su
Message-ID: <C02F8288.2E2C%jpettit@stanford.edu>
References: <dude6b$pva$1@news.Stanford.EDU> <dudffp$quf$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Can't submit 3C for testing
Thread-Index: AcY/9l4bnLL0QKvpEdqKdwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10593

On 3/4/06 5:39 PM, in article dudffp$quf$1@news.Stanford.EDU, "Matt
Falkenhagen" <mjf@stanford.edu> wrote:

> Ramanan wrote:
>> Hi,
>> 
>> I'm know I'm probably missing something silly here, but whenever I try and
>> submit 3C for testing, I get this message. Can someone please tell me what
>> I'm missing? Thanks.
>> 
>> Ram
>> 
>> ----
>> 
>> elaine19:~/cs244a/hw3> /afs/ir/class/cs244a/bin/test_code.pl hw3c *.c *.h
>> Makefile ENVCFG.MK
>> Creating submission tarball...
>> ENVCFG.MK
>> Makefile
>> client.c
>> connection_demux.c
>> connection_demux.h
>> echo_client_main.c
>> echo_server_main.c
>> ftpcopy.c
>> ftpparse.c
>> ftpparse.h
>> mysock.c
>> mysock.h
>> mysock_api.c
>> mysock_hash.h
>> mysock_impl.h
>> mysock_vns.h
>> network.c
>> network.h
>> network_io.c
>> network_io.h
>> network_io_socket.c
>> network_io_socket.h
>> network_io_tcp.c
>> network_io_vns.c
>> server.c
>> stcp_api.c
>> stcp_api.h
>> tcp_sum.c
>> tcp_sum.h
>> transport.c
>> transport.h
>> ENVCFG.MK
>> Makefile
>> client.c
>> tar: client.c: Could not create file: Permission denied
>> connection_demux.c
>> connection_demux.h
>> echo_client_main.c
>> echo_server_main.c
>> ftpcopy.c
>> ftpparse.c
>> ftpparse.h
>> mysock.c
>> mysock.h
>> mysock_api.c
>> mysock_hash.h
>> mysock_impl.h
>> mysock_vns.h
>> network.c
>> network.h
>> network_io.c
>> network_io.h
>> network_io_socket.c
>> network_io_socket.h
>> network_io_tcp.c
>> network_io_vns.c
>> server.c
>> tar: server.c: Could not create file: Permission denied
>> stcp_api.c
>> stcp_api.h
>> tcp_sum.c
>> tcp_sum.h
>> transport.c
>> transport.h
>> tar: Error exit delayed from previous errors
>> can't untar temporary tarball
>> elaine19:~/cs244a/hw3>
>> 
>> 
>> 
> 
> Yikes.  Has anyone ran the 3.C script successfully?  Or does everyone
> get this?

I ran it successfully last night.

--Justin

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 04 Mar 2006 17:55:54 -0800
Lines: 101
Distribution: su
Message-ID: <dudgfe$rof$1@news.Stanford.EDU>
References: <dude6b$pva$1@news.Stanford.EDU> <dudffp$quf$1@news.Stanford.EDU> <C02F8288.2E2C%jpettit@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <C02F8288.2E2C%jpettit@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10594

Justin Pettit wrote:
> On 3/4/06 5:39 PM, in article dudffp$quf$1@news.Stanford.EDU, "Matt
> Falkenhagen" <mjf@stanford.edu> wrote:
> 
> 
>>Ramanan wrote:
>>
>>>Hi,
>>>
>>>I'm know I'm probably missing something silly here, but whenever I try and
>>>submit 3C for testing, I get this message. Can someone please tell me what
>>>I'm missing? Thanks.
>>>
>>>Ram
>>>
>>>----
>>>
>>>elaine19:~/cs244a/hw3> /afs/ir/class/cs244a/bin/test_code.pl hw3c *.c *.h
>>>Makefile ENVCFG.MK
>>>Creating submission tarball...
>>>ENVCFG.MK
>>>Makefile
>>>client.c
>>>connection_demux.c
>>>connection_demux.h
>>>echo_client_main.c
>>>echo_server_main.c
>>>ftpcopy.c
>>>ftpparse.c
>>>ftpparse.h
>>>mysock.c
>>>mysock.h
>>>mysock_api.c
>>>mysock_hash.h
>>>mysock_impl.h
>>>mysock_vns.h
>>>network.c
>>>network.h
>>>network_io.c
>>>network_io.h
>>>network_io_socket.c
>>>network_io_socket.h
>>>network_io_tcp.c
>>>network_io_vns.c
>>>server.c
>>>stcp_api.c
>>>stcp_api.h
>>>tcp_sum.c
>>>tcp_sum.h
>>>transport.c
>>>transport.h
>>>ENVCFG.MK
>>>Makefile
>>>client.c
>>>tar: client.c: Could not create file: Permission denied
>>>connection_demux.c
>>>connection_demux.h
>>>echo_client_main.c
>>>echo_server_main.c
>>>ftpcopy.c
>>>ftpparse.c
>>>ftpparse.h
>>>mysock.c
>>>mysock.h
>>>mysock_api.c
>>>mysock_hash.h
>>>mysock_impl.h
>>>mysock_vns.h
>>>network.c
>>>network.h
>>>network_io.c
>>>network_io.h
>>>network_io_socket.c
>>>network_io_socket.h
>>>network_io_tcp.c
>>>network_io_vns.c
>>>server.c
>>>tar: server.c: Could not create file: Permission denied
>>>stcp_api.c
>>>stcp_api.h
>>>tcp_sum.c
>>>tcp_sum.h
>>>transport.c
>>>transport.h
>>>tar: Error exit delayed from previous errors
>>>can't untar temporary tarball
>>>elaine19:~/cs244a/hw3>
>>>
>>>
>>>
>>Yikes.  Has anyone ran the 3.C script successfully?  Or does everyone
>>get this?
> 
> 
> I ran it successfully last night.
> 
> --Justin
> 

Hm.  Ram, what happens if you just submit the non-starter code files? 
(probably Makefile, ftpcopy.c ftpparse.c, ftpparse.h, transport.c)
.

Path: shelby.stanford.edu!not-for-mail
From: Arun Penmetsa <penmetsa@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Timeouts while running tests
Date: Sat, 04 Mar 2006 18:00:23 -0800
Lines: 12
Distribution: su
Message-ID: <dudgno$s5h$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.4 (Windows/20050908)
Xref: shelby.stanford.edu su.class.cs244a:10595

hey everyone,

I am having an issue with one of the tests (2.C) timing out sometimes. I 
ran the script 3 times since yesterday and all the tests passed. When I 
ran it today, 2.C timed out. I looked at the log file I generated and it 
seems like there was no error. During the process of sending and 
receiving packets the client seems to have been killed. Has anyone else 
had this problem? Is there a limit on how long the tests can be run and 
if the machine is a little slow, the script ends the test?

thanks in advance,
Arun
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Timeouts while running tests
Date: Sat, 04 Mar 2006 18:21:07 -0800
Lines: 23
Distribution: su
Message-ID: <dudhun$t9b$1@news.Stanford.EDU>
References: <dudgno$s5h$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dudgno$s5h$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10596

Arun Penmetsa wrote:
> hey everyone,
> 
> I am having an issue with one of the tests (2.C) timing out sometimes. I 
> ran the script 3 times since yesterday and all the tests passed. When I 
> ran it today, 2.C timed out. I looked at the log file I generated and it 
> seems like there was no error. During the process of sending and 
> receiving packets the client seems to have been killed. Has anyone else 
> had this problem? Is there a limit on how long the tests can be run and 
> if the machine is a little slow, the script ends the test?
> 
> thanks in advance,
> Arun

Yes there's a limit on how long the tests can be run.  If you have a 
good design and disable log output (which can significantly slow down 
the program), you should consistently finish in that time (as seems to 
be the case for you).  There are possible edge cases like if you're on a 
heavily loaded machine, for which you won't terminate in time.  If this 
happens switch to another machine.

We keep this in mind when grading, you will only fail the test if you 
consistently timeout.
.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!sstanek
From: "Steven C. Stanek" <sstanek@stanford.edu>
Newsgroups: su.class.cs244a
Subject: struct timeval vs. struct timespec
Date: Sat, 4 Mar 2006 18:27:43 -0800
Lines: 29
Distribution: su
Message-ID: <Pine.GSO.4.44.0603041806490.25103-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10597

I've been a little confused about timespec so I thought I'd post
this in hopes of enlightening anyone with the same confusion (or to yelled
at if I'm wrong :-) I don't think this post is redundant

gettimeofday takes a pointer to struct timeval while stcp_wait_for_event
takes a struct timespec. THESE STRUCTURES ARE RELATED
BUT NOT THE SAME. According to /usr/include/sys/time.h timeval has the
following format: struct timeval {
	time_t tv_sec; /*second*/
	suseconds_t tv_usec; /*MICROSECONDS; that is 10^-6 seconds*/
}

struct timespec is defined in /usr/include/sys/time_impl.h as follows:
typedef struct timespec{
	time_t tv_sec; /*seconds*/
	long tv_ncsec; /*NANOSECONDS; that is 10^-9 seconds*/
}

gettimeofday works with the former and stcp_wait_for_event works with
latter. I would like to point out that contrary to what the comments the
file and FAQ imply, these are not the same structure and are used for
different functions. You must multiply/divide to convert between them (if
you care about the subsecond precision).

Also, does anyone know what l502.exe is? I mention this because every
single elaine machine I've checked seems to running at least one copy of
it and it's hogging a heck of alot of CPU time (run top to see for
yourself).

.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Timeouts while running tests
Date: Sat, 4 Mar 2006 19:05:01 -0800
Lines: 25
Distribution: su
Message-ID: <Pine.GSO.4.44.0603041903210.19100-100000@elaine18.Stanford.EDU>
References: <dudgno$s5h$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dudgno$s5h$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10598

Yeah, I run into this.  The sender seems to retransmit too fast, and I'll
have to ACK all the retransmitted packets, which slows me down further,
and eventually the sender terminates the connection and my client hangs.

Any one has any good solution for this?

-wks


On Sat, 4 Mar 2006, Arun Penmetsa wrote:

> hey everyone,
>
> I am having an issue with one of the tests (2.C) timing out sometimes. I
> ran the script 3 times since yesterday and all the tests passed. When I
> ran it today, 2.C timed out. I looked at the log file I generated and it
> seems like there was no error. During the process of sending and
> receiving packets the client seems to have been killed. Has anyone else
> had this problem? Is there a limit on how long the tests can be run and
> if the machine is a little slow, the script ends the test?
>
> thanks in advance,
> Arun
>

.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS3 1a
Date: Sat, 04 Mar 2006 19:08:31 -0800
Lines: 16
Distribution: su
Message-ID: <dudknf$26k$1@news.Stanford.EDU>
References: <dud6fa$j7n$1@news.Stanford.EDU> <dud97l$lii$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dud97l$lii$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10599

On the second thought...

The 1 Gb/s line and 10 Gb/s would have different transmission time iff
the sender has transmission rate higher than 1 Gb/s. Say you are
sending 10-bit packet and the transmission rate of the sender is 1
b/s. In this case TRANSP is 10 seconds for both lines.

Still it doesn't really tell me what the transmission rate of the
sender is.

--Michi

Stefan Thomas Mohler wrote:
> I think the 1000 pkts/sec do not use the line to capacity which means you
> cannot infer the TRANSP time.  I.e. you could send 1000 pkts/sec on a one Gb/s
> line or on a 10 Gb/s line and each would have different transmission times..
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Style grade
Date: Sat, 04 Mar 2006 19:22:52 -0800
Lines: 23
Distribution: su
Message-ID: <dudlop$30i$1@news.Stanford.EDU>
References: <dudaue$n5a$1@news.Stanford.EDU> <dudcfa$o2e$1@news.Stanford.EDU> <dudcuk$opa$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <dudcuk$opa$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10600

Nope, just a blank file or a quick summary of your frustrations will 
suffice for part 3B.

Ari

Naeim Semsarilar wrote:
> Is a full-fledged README required for 3B?
> 
> 
> Ari Greenberg wrote:
> 
>> Only transport.c
>>
>> Ramanan wrote:
>>
>>> Hi TAs,
>>>
>>> Does the style grade for 3C only depend on our implementation of STCP 
>>> in transport.c, or will you guys look at ftpcopy as well (if we 
>>> decide to our own version).
>>>
>>> Ram
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: gethostbyname in PA 3.C
Date: Sat, 04 Mar 2006 19:29:18 -0800
Lines: 19
Distribution: su
Message-ID: <dudm4r$3ci$1@news.Stanford.EDU>
References: <dubnuu$8mo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <dubnuu$8mo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10601

Tahir,

Are you still having a problem with gethostbyname? You should be able to 
use it with the mysock api without a problem.

Ari

Tahir Azim wrote:
> Are we allowed to use gethostbyname in our ftpcopy code? I keep getting the 
> following assertion from inside gethostbyname...
> 
> Assertion failed: ctx, file mysock.c, line 408
> 
> If that doesnt work with the mysock api, is there an alternate function that 
> can be used?
> 
> Tahir. 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Chris McNett <mcnett@stanford.edu>
Newsgroups: su.class.cs244a
Subject: SYN-ACKs in 2.D,E,F
Date: Sat, 04 Mar 2006 19:35:56 -0800
Lines: 14
Distribution: su
Message-ID: <dudmcs$3kt$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Complaints-To: news@news.stanford.edu
User-Agent: KNode/0.8.2
Xref: shelby.stanford.edu su.class.cs244a:10602

For tests 2.D, 2.E, and 2.F, the SYNACK I receive has the wrong ACK number:

sent 0 bytes (seq=131, ack=0, flags=SYN)
received 20 bytes (seq=2, ack=2, flags=SYNACK)
sent ACK (3)
(...)

This causes my implementation not to initiate the connection.

Is anyone else having the same problem?  What's the correct behavior here?
How does the test come up with an ack of 2?  Or should I simply hard-code a
starting sequence number of 1?

Thanks!
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 4 Mar 2006 19:46:26 -0800
Lines: 31
Distribution: su
Message-ID: <dudmuk$44b$1@news.Stanford.EDU>
References: <dude6b$pva$1@news.Stanford.EDU> <dudffp$quf$1@news.Stanford.EDU> <C02F8288.2E2C%jpettit@stanford.edu> <dudgfe$rof$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10603

> Hm.  Ram, what happens if you just submit the non-starter code files? 
> (probably Makefile, ftpcopy.c ftpparse.c, ftpparse.h, transport.c)

Tried that, and I still get the same error. I've pasted it below

Ram



elaine19:~/cs244a/hw3/submit> /afs/ir/class/cs244a/bin/test_code.pl hw3c *.c 
*.h Makefile ENVCFG.MK
Creating submission tarball...
ENVCFG.MK
Makefile
ftpcopy.c
ftpparse.c
ftpparse.h
transport.c
ENVCFG.MK
tar: ENVCFG.MK: Could not create file: Permission denied
Makefile
ftpcopy.c
ftpparse.c
ftpparse.h
transport.c
tar: Error exit delayed from previous errors
can't untar temporary tarball
elaine19:~/cs244a/hw3/submit>



.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 04 Mar 2006 19:47:34 -0800
Lines: 36
Distribution: su
Message-ID: <dudn0q$44i$1@news.Stanford.EDU>
References: <dude6b$pva$1@news.Stanford.EDU> <dudffp$quf$1@news.Stanford.EDU> <C02F8288.2E2C%jpettit@stanford.edu> <dudgfe$rof$1@news.Stanford.EDU> <dudmuk$44b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dudmuk$44b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10604

Ramanan wrote:
>>Hm.  Ram, what happens if you just submit the non-starter code files? 
>>(probably Makefile, ftpcopy.c ftpparse.c, ftpparse.h, transport.c)
> 
> 
> Tried that, and I still get the same error. I've pasted it below
> 
> Ram

Did you modify ENVCFG.MK?  Can you try without it?

> 
> 
> 
> elaine19:~/cs244a/hw3/submit> /afs/ir/class/cs244a/bin/test_code.pl hw3c *.c 
> *.h Makefile ENVCFG.MK
> Creating submission tarball...
> ENVCFG.MK
> Makefile
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> transport.c
> ENVCFG.MK
> tar: ENVCFG.MK: Could not create file: Permission denied
> Makefile
> ftpcopy.c
> ftpparse.c
> ftpparse.h
> transport.c
> tar: Error exit delayed from previous errors
> can't untar temporary tarball
> elaine19:~/cs244a/hw3/submit>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 04 Mar 2006 20:10:35 -0800
Lines: 23
Distribution: su
Message-ID: <C02FA4BB.2E3D%jpettit@stanford.edu>
References: <dude6b$pva$1@news.Stanford.EDU> <dudffp$quf$1@news.Stanford.EDU> <C02F8288.2E2C%jpettit@stanford.edu> <dudgfe$rof$1@news.Stanford.EDU> <dudmuk$44b$1@news.Stanford.EDU> <dudn0q$44i$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Can't submit 3C for testing
Thread-Index: AcZACsB+/04TPqv9EdqKdwARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10605

On 3/4/06 7:47 PM, in article dudn0q$44i$1@news.Stanford.EDU, "Matt
Falkenhagen" <mjf@stanford.edu> wrote:

> Ramanan wrote:
>>> Hm.  Ram, what happens if you just submit the non-starter code files?
>>> (probably Makefile, ftpcopy.c ftpparse.c, ftpparse.h, transport.c)
>> 
>> 
>> Tried that, and I still get the same error. I've pasted it below
>> 
>> Ram
> 
> Did you modify ENVCFG.MK?  Can you try without it?
> 

When I did my submission, I just did it as:

    [whole_path]/test_code.pl hw3c *.c *.h Makefile

I didn't submit an ENVCFG.MK file (or have one for that matter).

--Justin

.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Unix question
Date: Sat, 4 Mar 2006 20:53:46 -0800
Organization: Stanford University
Lines: 29
Distribution: su
Message-ID: <20060304205346.1cb0928e@ballpoint>
References: <dudc6g$o0g$1@news.Stanford.EDU>
	<dudd20$ot2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10606

Another way is to use the "script" program.  It will start up a new
shell with all terminal interaction logged to a file (called typescript
by default).  The output is a tiny bit garbled, but should still be
suitable for human examination.  The problem with tee is that
"program"'s stdout is no longer a terminal, so it might put stdout into
fully buffered mode instead of line buffered.

On Sat, 04 Mar 2006 16:57:37 -0800
Michi Mutsuzaki <michi2@stanford.edu> wrote:

> You can use tee command to read from stdin and write to both stdout
> and file. For example,
> 
>    program | tee out_file
> 
> puts the output of the program to stdout and out_file, so you can
> interact with the program and save the output to the file at the same
> time.
> 
> --Michi
> 
> Robbie Yan wrote:
> > Can a Unix guru out there tell me a way to pipe the printout of a program
> > into a file but in the meantime, still keep the program interactive? I would
> > like to run the test script, pipe its output into a file, but still be able
> > to answer "y" or "n" to the question that the script poses (whether I would
> > like to create a separate solution). Thank you!
> > 
> > 
.

Path: shelby.stanford.edu!not-for-mail
From: David Reiss <dreiss@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: struct timeval vs. struct timespec
Date: Sat, 4 Mar 2006 21:01:57 -0800
Organization: Stanford University
Lines: 25
Distribution: su
Message-ID: <20060304210157.52047a69@ballpoint>
References: <Pine.GSO.4.44.0603041806490.25103-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Sylpheed-Claws 1.0.5 (GTK+ 1.2.10; i686-pc-linux-gnu)
Xref: shelby.stanford.edu su.class.cs244a:10607

It appears to be some sort of mathematical program.  Run
ps -af | grep gaussian
to see where the package is.

You can probably email ITSS if you want to get them killed.  The elaine
login message says:

If you are logging in remotely to run a large job, consider using
Vine (32 bit linux) or Tree (solaris) instead. If you are logging in to
just check your e-mail, you should use Cardinal as your first choice.

And the vine login message says:

During the regular school quarter, you are limited to 5 cpu-intensive
processes across all Leland systems and workstations (except those 
having a login message stating otherwise).


On Sat, 4 Mar 2006 18:27:43 -0800
"Steven C. Stanek" <sstanek@stanford.edu> wrote:

> Also, does anyone know what l502.exe is? I mention this because every
> single elaine machine I've checked seems to running at least one copy of
> it and it's hogging a heck of alot of CPU time (run top to see for
> yourself).
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: SYN-ACKs in 2.D,E,F
Date: Sun, 5 Mar 2006 05:58:22 +0000 (UTC)
Lines: 5
Distribution: su
Message-ID: <dudulu$a5j$1@news.Stanford.EDU>
References: <dudmcs$3kt$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10608


The test code is written in some cases with hard coded ACK/SEQ numbers assuming
your generate_initial_sequence_num() function is supporting the start at 1
#define.  From the output you included it looks like you are beginning at 
SEQ number 131 which is probably assumed to be 1.
.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: FIN packets and data
Date: Sat, 4 Mar 2006 22:00:46 -0800
Lines: 8
Distribution: su
Message-ID: <duduqf$aar$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10609

I know that a FIN packet may also have a data payload.  But could the sender 
of the FIN ever send any additional data (with sequence numbers higher than 
the ending sequence of the FIN packet) afterward?   I dont think so, but 
want to be sure.

Thanks, Bruce 


.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 4 Mar 2006 22:01:36 -0800
Lines: 45
Distribution: su
Message-ID: <dudus2$abd$1@news.Stanford.EDU>
References: <dude6b$pva$1@news.Stanford.EDU> <dudffp$quf$1@news.Stanford.EDU> <C02F8288.2E2C%jpettit@stanford.edu> <dudgfe$rof$1@news.Stanford.EDU> <dudmuk$44b$1@news.Stanford.EDU> <dudn0q$44i$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10610

Ya, it works when I submit from a folder with only the 5 files, and without 
the ENVCFG.MK. Maybe the website should be updated, since I took those 
parameters straight from the website. Thanks for the help Matt and Justin

Ram


"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dudn0q$44i$1@news.Stanford.EDU...
> Ramanan wrote:
>>>Hm.  Ram, what happens if you just submit the non-starter code files? 
>>>(probably Makefile, ftpcopy.c ftpparse.c, ftpparse.h, transport.c)
>>
>>
>> Tried that, and I still get the same error. I've pasted it below
>>
>> Ram
>
> Did you modify ENVCFG.MK?  Can you try without it?
>
>>
>>
>>
>> elaine19:~/cs244a/hw3/submit> /afs/ir/class/cs244a/bin/test_code.pl hw3c 
>> *.c *.h Makefile ENVCFG.MK
>> Creating submission tarball...
>> ENVCFG.MK
>> Makefile
>> ftpcopy.c
>> ftpparse.c
>> ftpparse.h
>> transport.c
>> ENVCFG.MK
>> tar: ENVCFG.MK: Could not create file: Permission denied
>> Makefile
>> ftpcopy.c
>> ftpparse.c
>> ftpparse.h
>> transport.c
>> tar: Error exit delayed from previous errors
>> can't untar temporary tarball
>> elaine19:~/cs244a/hw3/submit>
>>
>> 

.

Path: shelby.stanford.edu!xenon.Stanford.EDU!wkso
From: Wai-Kei So <wkso@xenon.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Can't submit 3C for testing
Date: Sat, 4 Mar 2006 22:16:25 -0800
Lines: 56
Distribution: su
Message-ID: <Pine.LNX.4.62.0603042215390.1952@xenon.Stanford.EDU>
References: <dude6b$pva$1@news.Stanford.EDU> <dudffp$quf$1@news.Stanford.EDU>
 <C02F8288.2E2C%jpettit@stanford.edu> <dudgfe$rof$1@news.Stanford.EDU>
 <dudmuk$44b$1@news.Stanford.EDU> <dudn0q$44i$1@news.Stanford.EDU>
 <dudus2$abd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dudus2$abd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10611


Hi Ram,

I think the problem happens because you modified some of the files.  If 
you just leave the symbolic links as is, submission should be fine.

-wks

On Sat, 4 Mar 2006, Ramanan wrote:

> Ya, it works when I submit from a folder with only the 5 files, and without
> the ENVCFG.MK. Maybe the website should be updated, since I took those
> parameters straight from the website. Thanks for the help Matt and Justin
>
> Ram
>
>
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message
> news:dudn0q$44i$1@news.Stanford.EDU...
>> Ramanan wrote:
>>>> Hm.  Ram, what happens if you just submit the non-starter code files?
>>>> (probably Makefile, ftpcopy.c ftpparse.c, ftpparse.h, transport.c)
>>>
>>>
>>> Tried that, and I still get the same error. I've pasted it below
>>>
>>> Ram
>>
>> Did you modify ENVCFG.MK?  Can you try without it?
>>
>>>
>>>
>>>
>>> elaine19:~/cs244a/hw3/submit> /afs/ir/class/cs244a/bin/test_code.pl hw3c
>>> *.c *.h Makefile ENVCFG.MK
>>> Creating submission tarball...
>>> ENVCFG.MK
>>> Makefile
>>> ftpcopy.c
>>> ftpparse.c
>>> ftpparse.h
>>> transport.c
>>> ENVCFG.MK
>>> tar: ENVCFG.MK: Could not create file: Permission denied
>>> Makefile
>>> ftpcopy.c
>>> ftpparse.c
>>> ftpparse.h
>>> transport.c
>>> tar: Error exit delayed from previous errors
>>> can't untar temporary tarball
>>> elaine19:~/cs244a/hw3/submit>
>>>
>>>
>
>
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FIN packets and data
Date: Sat, 04 Mar 2006 23:20:18 -0800
Lines: 11
Distribution: su
Message-ID: <due3fm$e71$1@news.Stanford.EDU>
References: <duduqf$aar$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duduqf$aar$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10612

Bruce Schechter wrote:
> I know that a FIN packet may also have a data payload.  But could the sender 
> of the FIN ever send any additional data (with sequence numbers higher than 
> the ending sequence of the FIN packet) afterward?   I dont think so, but 
> want to be sure.
> 
> Thanks, Bruce 
> 
> 

Nope, FIN means sender is done sending data.
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Out of Memory Error in test script for 3b
Date: Sun, 05 Mar 2006 00:20:57 -0800
Lines: 26
Distribution: su
Message-ID: <C02FDF69.379B%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Out of Memory Error in test script for 3b
Thread-Index: AcZALbpN+MUEnawgEdqMWAARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10613

HI.
I am getting the following error when I run the script for HW 3B for
testing.  Has this been discussed/addressed?  Has anyone else encounrterd
this?

Thanks.



Testing input file net_instruct_resend_same_info

Starting server: /usr/class/cs244a/grading_script/hw3/testserver -f
/usr/class/cs244a/grading_script/hw3/net_instruct_resend_same_info.txt -p
/afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/.server
_port 2>&1 > 
/afs/ir.stanford.edu/users/s/u/sunnyb/cs244a/proj3/grading_src/build/.server
_output
Server started
Starting client: ./testclient  -p .server_port -f
net_instruct_resend_same_info foo
connected to 171.64.15.117 at port 51759
Out of memory during "large" request for 134221824 bytes, total sbrk() is
587012312 bytes at cs244a/STCPTestCase.pm line 1061, <KID_TO_READ> line
1252707.
couldn't submit code for testing

.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Ragahvan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Do we need to handle segment data < nxt_byte_exp & payload size>rcv window
Date: Sun, 5 Mar 2006 00:25:38 -0800
Lines: 23
Distribution: su
Message-ID: <due7a4$k85$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10614

The RFC mentions 4 cases that need to be handled
for a segment to be accepted.
[
the 4th case being :
RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
or RCV.NXT =< SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND
]
It however doest talk about the following possibility
[although...i'm unsure if this can even happen]

received segment->th_seq = 2900 (for eg)
next_expected_byte (on the receiver side)= 3000
receive window size = 172 (for eg)
payload size = 536

here is a case where the packet th_seq is < next_byte_expected
and the th_seq+segment_length-1 > next_byte_expected+receive_window_size
are we supposed to be digging into this packet and extracting the 
appropriate bytes?




.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Do we need to handle segment data < nxt_byte_exp & payload size>rcv
 window
Date: Sun, 05 Mar 2006 00:30:50 -0800
Lines: 28
Distribution: su
Message-ID: <due7q7$khb$1@news.Stanford.EDU>
References: <due7a4$k85$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <due7a4$k85$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10615

Yes, you should handle this.

Ari

Nikhil Ragahvan wrote:
> The RFC mentions 4 cases that need to be handled
> for a segment to be accepted.
> [
> the 4th case being :
> RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
> or RCV.NXT =< SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND
> ]
> It however doest talk about the following possibility
> [although...i'm unsure if this can even happen]
> 
> received segment->th_seq = 2900 (for eg)
> next_expected_byte (on the receiver side)= 3000
> receive window size = 172 (for eg)
> payload size = 536
> 
> here is a case where the packet th_seq is < next_byte_expected
> and the th_seq+segment_length-1 > next_byte_expected+receive_window_size
> are we supposed to be digging into this packet and extracting the 
> appropriate bytes?
> 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Small Make corretion
Date: Sun, 05 Mar 2006 00:51:21 -0800
Lines: 9
Distribution: su
Message-ID: <due8q6$li5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10616

You might want to change the second line of the clean to have

$(FTPCOPY_OBJS)

instead of

$(FTPCOPY_PASV_OBJS)

It just makes things nicer :)
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script failing
Date: Sun, 05 Mar 2006 01:07:20 -0800
Lines: 39
Distribution: su
Message-ID: <due9oc$m75$1@news.Stanford.EDU>
References: <duatev$chc$1@news.Stanford.EDU> <dubmbv$7j6$3@news.Stanford.EDU> <dud955$lmb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dud955$lmb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10617

Jeremy Robin wrote:
> I'm running hw3b script and it only happens once the test script reaches the 
> newer test files, net_instruct_resend_same_info, etc....  and it does happen 
> every time.
> 
> 
> Jeremy
> 
> 

Jeremy can you email me your files (or give me read perms to your dir)? 
  And let me know exactly what command you're running.  I'll see if I 
can reproduce this.

> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dubmbv$7j6$3@news.Stanford.EDU...
> 
>>Jeremy Robin wrote:
>>
>>>has anyone else had the test script fail with this error?
>>>
>>>connected to 171.64.15.80 at port 34833
>>>/usr/pubsw/bin/tar tf failed with rc -1
>>>couldn't submit code for testing
>>>
>>>
>>>
>>>i can't get any results.........
>>>
>>>
>>>
>>>thanks,
>>>Jeremy
>>
>>Very odd.  Which test are you running and is this happening consistently? 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Wierd things happening in 3C
Date: Sun, 5 Mar 2006 01:34:46 -0800
Lines: 43
Distribution: su
Message-ID: <duebbn$ng5$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10618

Hi,

   I've been trying very hard to understand what's going on in my tests for 
Assignment 3C. It seems very strange to me.

When I use the reference FTPcopy, or my own, and run in with the ftpd, I am 
consistently able to copy files correctly without any trouble whatsoever. 
When I submit my transport.c code for test however, the very first test 
fails, because the ftpcopy client bails. This happens when I test with the 
reference ftpcopy and with my own ftpcopy.

The error occurs when I do:

dataSocket = myaccept(servSocket, (struct sockaddr *)&data_addr, 
&data_addrlen)

in the FTP copyclient to accept an incoming connection from the ftp daemon 
after doing a PORT. The myaccept function always returns -1.

I'm guessing this is because I'm running into some sort of problem in the 
stcp layer, and therefore setting errno and returning from transport_init 
during the connection handshake. Is that assumption correct?

I checked the stcp logfiles that I write out to during the tests, and they 
seem even stranger. The files seems to be written to by multiple concurrent 
threads. I say this because I see 2 sets of sequence numbers being sent and 
received, quite distinctly far apart. I have no idea why this happens.

Also, from what I can manually decipher from the confusing log, it seems 
like the FTP daemon sends out a SYN with seq num 99, but my ftp client seems 
to receive a SYN with sequence number 233, and sends an ACK back for 234, 
together with a SYN sequence number 103. The daemon never seems to get this 
SYN, and my ftpcopy client just retransmits 5 times, timesout, sets errno 
and returns from transport_init(). I'm guessing this is why myaccept() 
returns -1, but I have no idea why this would be happening when all tests in 
3A and 3B have passed fine.

It would really really be great if someone could help me see what I'm 
missing. Thanks!

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Retransmitting both SYNs and SYN-ACKs?
Date: Sun, 5 Mar 2006 02:10:32 -0800
Lines: 18
Distribution: su
Message-ID: <duedf2$pl6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10619

I am sorry if this has already been asked before, but here goes:

When is a new context created on the server; i.e. when is transport_init 
called on the server? Is it called when the server receives a SYN from a 
client? I am confused because I think that a new transport_init is called 
whenever the server receives a syn, which means that if we retransmit both 
SYNs and SYN-ACKs, two transport_inits might start running concurrently on 
the server? An example of this is when the client resends a SYN causing a 
new transport_init on the server, but the server retransmits another 
SYN-ACK, causing the client to get confused which server context to actually 
work with. Do we need to handle this confusion? Or are there underlying 
provisions that prevent this from happening?

Thanks, Tahir.




.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Wierd things happening in 3C
Date: Sun, 05 Mar 2006 02:24:00 -0800
Lines: 60
Distribution: su
Message-ID: <C02FFC40.2E54%jpettit@stanford.edu>
References: <duebbn$ng5$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Wierd things happening in 3C
Thread-Index: AcZAPurqKV8y3KwyEdq+tAARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10620

I spent quite a bit of time trying to decipher the output from 3C's test
script with only moderate success.  One thing to keep in mind is that FTP
uses multiple sockets, so if your debug lines don't print the socket number
it can be hard to follow.  I had to make that change in my code.

The tests in part 3C uncovered a couple of subtle bugs in my STCP that
weren't found with the tests from 3B, so be prepared for that.  It is
possible to pass the tests from 3C, though.

--Justin
 

On 3/5/06 1:34 AM, in article duebbn$ng5$1@news.Stanford.EDU, "Ramanan"
<ramananr@stanford.edu> wrote:

> Hi,
> 
>    I've been trying very hard to understand what's going on in my tests for
> Assignment 3C. It seems very strange to me.
> 
> When I use the reference FTPcopy, or my own, and run in with the ftpd, I am
> consistently able to copy files correctly without any trouble whatsoever.
> When I submit my transport.c code for test however, the very first test
> fails, because the ftpcopy client bails. This happens when I test with the
> reference ftpcopy and with my own ftpcopy.
> 
> The error occurs when I do:
> 
> dataSocket = myaccept(servSocket, (struct sockaddr *)&data_addr,
> &data_addrlen)
> 
> in the FTP copyclient to accept an incoming connection from the ftp daemon
> after doing a PORT. The myaccept function always returns -1.
> 
> I'm guessing this is because I'm running into some sort of problem in the
> stcp layer, and therefore setting errno and returning from transport_init
> during the connection handshake. Is that assumption correct?
> 
> I checked the stcp logfiles that I write out to during the tests, and they
> seem even stranger. The files seems to be written to by multiple concurrent
> threads. I say this because I see 2 sets of sequence numbers being sent and
> received, quite distinctly far apart. I have no idea why this happens.
> 
> Also, from what I can manually decipher from the confusing log, it seems
> like the FTP daemon sends out a SYN with seq num 99, but my ftp client seems
> to receive a SYN with sequence number 233, and sends an ACK back for 234,
> together with a SYN sequence number 103. The daemon never seems to get this
> SYN, and my ftpcopy client just retransmits 5 times, timesout, sets errno
> and returns from transport_init(). I'm guessing this is why myaccept()
> returns -1, but I have no idea why this would be happening when all tests in
> 3A and 3B have passed fine.
> 
> It would really really be great if someone could help me see what I'm
> missing. Thanks!
> 
> Ram 
> 
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Makefile for 3c
Date: Sun, 5 Mar 2006 03:05:54 -0800
Lines: 12
Distribution: su
Message-ID: <duegno$sak$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10621

I added my source files to FTPCOPY_SRC in the make file as follows:
FTPCOPY_SRCS = ftp_client.c ftpcopy.c ftp_parse.c
and it gives the following error:

make: *** No rule to make target `ftp_client.o', needed by 
`your.ftpcopy_tcp'.  Stop.

What do I need to change?
Thanks,
Nazia 


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Initial RTT and RTO
Date: Sun, 5 Mar 2006 11:47:29 +0000 (UTC)
Lines: 10
Distribution: su
Message-ID: <duej4h$lm$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10622

Hello TA,

What is a good initial RTT and RTO for the first SYN?  With 0.5 sec RTT 
and 1 sec RTO, if the server went down, then the client would have to wait 
(1+2+4+8+16+32) = 63 seconds before detecting the network failure. Is it OK
to wait that long or should I choose a smaller initial RTT and RTO?

Thanks

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Counting Retransmissions
Date: Sun, 5 Mar 2006 12:39:36 +0000 (UTC)
Lines: 12
Distribution: su
Message-ID: <duem68$5eu$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10623

Hi TA,

I am a little confused as to how do we count the number of retransmission. 
Let's look at an example: Sequence number 100 len 50 timed out and the 
current sequence number is 500.  In other words, I have bytes 100 to 
499 unACKed.  According to the Go-Back-N protocol, I have to retransmit bytes 
100 to 499.  Do I count only bytes 100 to 149 as retransmitted once or do I 
count bytes 100 to 499 as retransmitted once?

Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Arun Penmetsa <penmetsa@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Application not closing
Date: Sun, 05 Mar 2006 08:38:53 -0800
Lines: 19
Distribution: su
Message-ID: <duf46u$hed$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.4 (Windows/20050908)
Xref: shelby.stanford.edu su.class.cs244a:10624

Hey,

I am having this issue with closing my connection for tests in part 3C.
It looks like once a file transfer has completed, the client sends a 
FIN, which the Server acknowledges and moves into the CLOSE_WAIT state.
Then there are a few out of order packets being processed. But the 
application never sends a close request. So the server is just stuck 
waiting for the application to close while the client is waiting for a 
FIN. I did call the stcp_fin_received function as soon as I got a FIN
and the flags show that I am waiting for ANY_EVENT (value is 7).

Does anyone know why the application doesn't seem to close. The same 
thing happens with the reference implementation of ftpcopy as well, so i 
doubt its an issue with the ftpcopy code. I pass all the tests for Part 
B, so I am not sure what could be causing this.

I would appreciate any help
thanks
Arun
.

Path: shelby.stanford.edu!not-for-mail
From: Arun Penmetsa <penmetsa@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Application not closing
Date: Sun, 05 Mar 2006 09:06:51 -0800
Lines: 30
Distribution: su
Message-ID: <duf5r3$iid$1@news.Stanford.EDU>
References: <duf46u$hed$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.4 (Windows/20050908)
In-Reply-To: <duf46u$hed$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10625

hey,

One correction to my previous post. Since the connection is a data 
connection, it is the server that sends the FIN first and the client 
that goes into the CLOSE_WAIT state. So the client side application is 
not closing.

thanks
Arun

Arun Penmetsa wrote:
> Hey,
> 
> I am having this issue with closing my connection for tests in part 3C.
> It looks like once a file transfer has completed, the client sends a 
> FIN, which the Server acknowledges and moves into the CLOSE_WAIT state.
> Then there are a few out of order packets being processed. But the 
> application never sends a close request. So the server is just stuck 
> waiting for the application to close while the client is waiting for a 
> FIN. I did call the stcp_fin_received function as soon as I got a FIN
> and the flags show that I am waiting for ANY_EVENT (value is 7).
> 
> Does anyone know why the application doesn't seem to close. The same 
> thing happens with the reference implementation of ftpcopy as well, so i 
> doubt its an issue with the ftpcopy code. I pass all the tests for Part 
> B, so I am not sure what could be causing this.
> 
> I would appreciate any help
> thanks
> Arun
.

Path: shelby.stanford.edu!not-for-mail
From: "Jeremy Robin" <jirobin@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test script failing
Date: Sun, 5 Mar 2006 11:51:33 -0800
Lines: 52
Distribution: su
Message-ID: <duffg4$qit$1@news.Stanford.EDU>
References: <duatev$chc$1@news.Stanford.EDU> <dubmbv$7j6$3@news.Stanford.EDU> <dud955$lmb$1@news.Stanford.EDU> <due9oc$m75$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10626

Hey Matt-

It fixed itself.  i think i was giving too much program output and the tar 
was failing trying to capture it all........


thanks,
Jeremy



"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:due9oc$m75$1@news.Stanford.EDU...
> Jeremy Robin wrote:
>> I'm running hw3b script and it only happens once the test script reaches 
>> the newer test files, net_instruct_resend_same_info, etc....  and it does 
>> happen every time.
>>
>>
>> Jeremy
>>
>>
>
> Jeremy can you email me your files (or give me read perms to your dir)? 
> And let me know exactly what command you're running.  I'll see if I can 
> reproduce this.
>
>>
>> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
>> news:dubmbv$7j6$3@news.Stanford.EDU...
>>
>>>Jeremy Robin wrote:
>>>
>>>>has anyone else had the test script fail with this error?
>>>>
>>>>connected to 171.64.15.80 at port 34833
>>>>/usr/pubsw/bin/tar tf failed with rc -1
>>>>couldn't submit code for testing
>>>>
>>>>
>>>>
>>>>i can't get any results.........
>>>>
>>>>
>>>>
>>>>thanks,
>>>>Jeremy
>>>
>>>Very odd.  Which test are you running and is this happening consistently?
>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Steve Goldman <steve.goldman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Application not closing
Date: Sun, 05 Mar 2006 11:59:17 -0800
Lines: 45
Distribution: su
Message-ID: <duffur$qqk$1@news.Stanford.EDU>
References: <duf46u$hed$1@news.Stanford.EDU> <duf5r3$iid$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duf5r3$iid$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10627

I had this problem due to some bonehead logic of mine... probably yours 
is something different.

I initially designed my control loop as a series of if...else if 
statements, really for no reason at all.  I had noted to myself that all 
the signals would persist until the next call to stcp_wait_event if I 
didn't handle them right away, so I handled one at a time, for debugging 
reasons I guess.  It turns out that isn't true for CLOSE_REQUEST; it is 
signalled once and only once.  If you don't handle it the first time 
stcp_wait_event gives it to you, then you'll never close.

Steve

Arun Penmetsa wrote:
> hey,
> 
> One correction to my previous post. Since the connection is a data 
> connection, it is the server that sends the FIN first and the client 
> that goes into the CLOSE_WAIT state. So the client side application is 
> not closing.
> 
> thanks
> Arun
> 
> Arun Penmetsa wrote:
> 
>> Hey,
>>
>> I am having this issue with closing my connection for tests in part 3C.
>> It looks like once a file transfer has completed, the client sends a 
>> FIN, which the Server acknowledges and moves into the CLOSE_WAIT state.
>> Then there are a few out of order packets being processed. But the 
>> application never sends a close request. So the server is just stuck 
>> waiting for the application to close while the client is waiting for a 
>> FIN. I did call the stcp_fin_received function as soon as I got a FIN
>> and the flags show that I am waiting for ANY_EVENT (value is 7).
>>
>> Does anyone know why the application doesn't seem to close. The same 
>> thing happens with the reference implementation of ftpcopy as well, so 
>> i doubt its an issue with the ftpcopy code. I pass all the tests for 
>> Part B, so I am not sure what could be causing this.
>>
>> I would appreciate any help
>> thanks
>> Arun
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Application not closing
Date: Sun, 5 Mar 2006 11:59:47 -0800
Lines: 36
Distribution: su
Message-ID: <duffvf$qr6$1@news.Stanford.EDU>
References: <duf46u$hed$1@news.Stanford.EDU> <duf5r3$iid$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10628

I am experiencing the exact same problem ...

"Arun Penmetsa" <penmetsa@stanford.edu> wrote in message
news:duf5r3$iid$1@news.Stanford.EDU...
> hey,
>
> One correction to my previous post. Since the connection is a data
> connection, it is the server that sends the FIN first and the client
> that goes into the CLOSE_WAIT state. So the client side application is
> not closing.
>
> thanks
> Arun
>
> Arun Penmetsa wrote:
> > Hey,
> >
> > I am having this issue with closing my connection for tests in part 3C.
> > It looks like once a file transfer has completed, the client sends a
> > FIN, which the Server acknowledges and moves into the CLOSE_WAIT state.
> > Then there are a few out of order packets being processed. But the
> > application never sends a close request. So the server is just stuck
> > waiting for the application to close while the client is waiting for a
> > FIN. I did call the stcp_fin_received function as soon as I got a FIN
> > and the flags show that I am waiting for ANY_EVENT (value is 7).
> >
> > Does anyone know why the application doesn't seem to close. The same
> > thing happens with the reference implementation of ftpcopy as well, so i
> > doubt its an issue with the ftpcopy code. I pass all the tests for Part
> > B, so I am not sure what could be causing this.
> >
> > I would appreciate any help
> > thanks
> > Arun


.

Path: shelby.stanford.edu!not-for-mail
From: Arun Penmetsa <penmetsa@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Application not closing
Date: Sun, 05 Mar 2006 12:17:07 -0800
Lines: 62
Distribution: su
Message-ID: <dufh01$ro6$1@news.Stanford.EDU>
References: <duf46u$hed$1@news.Stanford.EDU> <duf5r3$iid$1@news.Stanford.EDU> <duffur$qqk$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.4 (Windows/20050908)
In-Reply-To: <duffur$qqk$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10629

hey steve,

No my problem is different. If i ever receive an application close 
request, I send out the FIN immediately. Besides I log the event with a 
bunch of print statements. THese never get printed, so its definitely 
not getting into my code.

This is happening when the server sends the client the result of the ls 
command. I don't remember, but does the server first inform the client 
of the size of the message (I don't think it does for the ls command). 
So maybe, the client is expecting more data and is not closing (which 
shouldn't happen since I called the stcp_fin_received)

thanks
Arun

Steve Goldman wrote:
> I had this problem due to some bonehead logic of mine... probably yours 
> is something different.
> 
> I initially designed my control loop as a series of if...else if 
> statements, really for no reason at all.  I had noted to myself that all 
> the signals would persist until the next call to stcp_wait_event if I 
> didn't handle them right away, so I handled one at a time, for debugging 
> reasons I guess.  It turns out that isn't true for CLOSE_REQUEST; it is 
> signalled once and only once.  If you don't handle it the first time 
> stcp_wait_event gives it to you, then you'll never close.
> 
> Steve
> 
> Arun Penmetsa wrote:
>> hey,
>>
>> One correction to my previous post. Since the connection is a data 
>> connection, it is the server that sends the FIN first and the client 
>> that goes into the CLOSE_WAIT state. So the client side application is 
>> not closing.
>>
>> thanks
>> Arun
>>
>> Arun Penmetsa wrote:
>>
>>> Hey,
>>>
>>> I am having this issue with closing my connection for tests in part 3C.
>>> It looks like once a file transfer has completed, the client sends a 
>>> FIN, which the Server acknowledges and moves into the CLOSE_WAIT state.
>>> Then there are a few out of order packets being processed. But the 
>>> application never sends a close request. So the server is just stuck 
>>> waiting for the application to close while the client is waiting for 
>>> a FIN. I did call the stcp_fin_received function as soon as I got a FIN
>>> and the flags show that I am waiting for ANY_EVENT (value is 7).
>>>
>>> Does anyone know why the application doesn't seem to close. The same 
>>> thing happens with the reference implementation of ftpcopy as well, 
>>> so i doubt its an issue with the ftpcopy code. I pass all the tests 
>>> for Part B, so I am not sure what could be causing this.
>>>
>>> I would appreciate any help
>>> thanks
>>> Arun
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Counting Retransmissions
Date: Sun, 05 Mar 2006 13:16:06 -0800
Lines: 18
Distribution: su
Message-ID: <dufkl4$1br$1@news.Stanford.EDU>
References: <duem68$5eu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <duem68$5eu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10630

Each byte that you retransmit should count as being retransmitted -- so 
in your example, bytes 100 to 499 will all have been retransmitted once.

Ari

Hector Chan wrote:
> Hi TA,
> 
> I am a little confused as to how do we count the number of retransmission. 
> Let's look at an example: Sequence number 100 len 50 timed out and the 
> current sequence number is 500.  In other words, I have bytes 100 to 
> 499 unACKed.  According to the Go-Back-N protocol, I have to retransmit bytes 
> 100 to 499.  Do I count only bytes 100 to 149 as retransmitted once or do I 
> count bytes 100 to 499 as retransmitted once?
> 
> Thanks,
> 
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Initial RTT and RTO
Date: Sun, 05 Mar 2006 13:19:22 -0800
Lines: 16
Distribution: su
Message-ID: <dufkrb$1v9$1@news.Stanford.EDU>
References: <duej4h$lm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <duej4h$lm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10631

That seems a bit high to me.. try something like 250 MS for the initial 
RTT estimate.

Ari

Hector Chan wrote:
> Hello TA,
> 
> What is a good initial RTT and RTO for the first SYN?  With 0.5 sec RTT 
> and 1 sec RTO, if the server went down, then the client would have to wait 
> (1+2+4+8+16+32) = 63 seconds before detecting the network failure. Is it OK
> to wait that long or should I choose a smaller initial RTT and RTO?
> 
> Thanks
> 
> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Failing test 2.M: Go-back N not enforced
Date: Sun, 05 Mar 2006 13:52:28 -0800
Lines: 55
Distribution: su
Message-ID: <dufmit$3bi$1@news.Stanford.EDU>
References: <du96h1$diu$1@news.Stanford.EDU> <du9epu$mdp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <du9epu$mdp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10632

I am having the same problem.  Is it ok to send the packets out of order 
in this case due to possibly different RTO values?  How about this scenario:

Packet 0-99 and 100-199 is sent out, and the packet 0-99 is lost.  So 
the sender retransmits 0-99, and then waits for 100-199 to timeout. 
Mean while the receiver has received 0-199, and so acks 200.  This way 
packet 100-199 is never retransmitted during go back N.

--George


Matt Falkenhagen wrote:
> Robbie Yan wrote:
> 
>> In the Go-back N protocol, if the receiver sends an ACK with ack 
>> number n,
>> then the sender is supposed to send all data starting at and including n,
>> not just the segment with sequence number n.
> 
> 
> Rememeber only if a timeout occurred, you go back n.
> 
>> However, do we have to send all
>> data starting at and including n in one huge packet? Or are we allowed to
>> send this data in individual packets? The second method seems more 
>> natural
>> since when this data is first sent out, it is broken up into packets.
> 
> 
> You can split it up into packets, and remember to respect the advertised 
> window.
> 
>>
>> I have implemented retransmission by using the second method, and
>> successfully transferred large files (~40MB) between client and 
>> server. To
>> ensure that there are enough packet drops, I actually modified 
>> network.c to
>> make packet dropping more likely. Even with these packet drops, my 
>> code runs
>> properly. Unfortunately, however, when I tested my code in the script, I
>> always failed 2.M, which claims that Go-back N is not enforced in my 
>> code:
>> e.g. "retransmitted only up until 3152 rather than 4246."
>> Suppose that we have to implement the first option, namely, to 
>> concatenate
>> unsent bytes since n all into one gigantic packet before sending it 
>> out. In
>> this case, how should we recompute the number of past transmissions of 
>> this
>> collated packet?
>>
>> Thank you!
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: George Su <gpsu@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Failing test 2.M: Go-back N not enforced
Date: Sun, 05 Mar 2006 14:27:57 -0800
Lines: 72
Distribution: su
Message-ID: <dufold$52t$1@news.Stanford.EDU>
References: <du96h1$diu$1@news.Stanford.EDU> <du9epu$mdp$1@news.Stanford.EDU> <dufmit$3bi$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dufmit$3bi$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10633

Ok, after more digging and tests, I can now positively conclude that the 
reason why I'm failing 2.M is because I'm retransmitting packets out of 
order.  The test script told me that I am retransmitting up to X, and 
the next packet is the first one that I retransmits out of order.  So is 
the test script correct or should I somehow retransmits in order?



--George

George Su wrote:
> I am having the same problem.  Is it ok to send the packets out of order 
> in this case due to possibly different RTO values?  How about this 
> scenario:
> 
> Packet 0-99 and 100-199 is sent out, and the packet 0-99 is lost.  So 
> the sender retransmits 0-99, and then waits for 100-199 to timeout. Mean 
> while the receiver has received 0-199, and so acks 200.  This way packet 
> 100-199 is never retransmitted during go back N.
> 
> --George
> 
> 
> Matt Falkenhagen wrote:
> 
>> Robbie Yan wrote:
>>
>>> In the Go-back N protocol, if the receiver sends an ACK with ack 
>>> number n,
>>> then the sender is supposed to send all data starting at and 
>>> including n,
>>> not just the segment with sequence number n.
>>
>>
>>
>> Rememeber only if a timeout occurred, you go back n.
>>
>>> However, do we have to send all
>>> data starting at and including n in one huge packet? Or are we 
>>> allowed to
>>> send this data in individual packets? The second method seems more 
>>> natural
>>> since when this data is first sent out, it is broken up into packets.
>>
>>
>>
>> You can split it up into packets, and remember to respect the 
>> advertised window.
>>
>>>
>>> I have implemented retransmission by using the second method, and
>>> successfully transferred large files (~40MB) between client and 
>>> server. To
>>> ensure that there are enough packet drops, I actually modified 
>>> network.c to
>>> make packet dropping more likely. Even with these packet drops, my 
>>> code runs
>>> properly. Unfortunately, however, when I tested my code in the script, I
>>> always failed 2.M, which claims that Go-back N is not enforced in my 
>>> code:
>>> e.g. "retransmitted only up until 3152 rather than 4246."
>>> Suppose that we have to implement the first option, namely, to 
>>> concatenate
>>> unsent bytes since n all into one gigantic packet before sending it 
>>> out. In
>>> this case, how should we recompute the number of past transmissions 
>>> of this
>>> collated packet?
>>>
>>> Thank you!
>>>
>>>
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Wierd things happening in 3C
Date: Sun, 5 Mar 2006 15:11:01 -0800
Lines: 87
Distribution: su
Message-ID: <dufr68$783$1@news.Stanford.EDU>
References: <duebbn$ng5$1@news.Stanford.EDU> <C02FFC40.2E54%jpettit@stanford.edu>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10634

Thanks again justin, I took your advice and added the socket number to my 
log, and it helped greatly in debugging.

For those who are seeing something similar, my problem turned out to be that 
I was ignoring any SYN packets that I received in the FIN-WAIT1 state, which 
I shouldn't have been. It turns out that there are cases when the server 
might try to retransmit a SYNACK packet after timing out, when the client 
has already gone into the FIN-WAIT-1 state. I was not sending any ACK for 
this retransmitted SYNACK and so the server kept timing out.

Ram

"Justin Pettit" <jpettit@stanford.edu> wrote in message 
news:C02FFC40.2E54%jpettit@stanford.edu...
>I spent quite a bit of time trying to decipher the output from 3C's test
> script with only moderate success.  One thing to keep in mind is that FTP
> uses multiple sockets, so if your debug lines don't print the socket 
> number
> it can be hard to follow.  I had to make that change in my code.
>
> The tests in part 3C uncovered a couple of subtle bugs in my STCP that
> weren't found with the tests from 3B, so be prepared for that.  It is
> possible to pass the tests from 3C, though.
>
> --Justin
>
>
> On 3/5/06 1:34 AM, in article duebbn$ng5$1@news.Stanford.EDU, "Ramanan"
> <ramananr@stanford.edu> wrote:
>
>> Hi,
>>
>>    I've been trying very hard to understand what's going on in my tests 
>> for
>> Assignment 3C. It seems very strange to me.
>>
>> When I use the reference FTPcopy, or my own, and run in with the ftpd, I 
>> am
>> consistently able to copy files correctly without any trouble whatsoever.
>> When I submit my transport.c code for test however, the very first test
>> fails, because the ftpcopy client bails. This happens when I test with 
>> the
>> reference ftpcopy and with my own ftpcopy.
>>
>> The error occurs when I do:
>>
>> dataSocket = myaccept(servSocket, (struct sockaddr *)&data_addr,
>> &data_addrlen)
>>
>> in the FTP copyclient to accept an incoming connection from the ftp 
>> daemon
>> after doing a PORT. The myaccept function always returns -1.
>>
>> I'm guessing this is because I'm running into some sort of problem in the
>> stcp layer, and therefore setting errno and returning from transport_init
>> during the connection handshake. Is that assumption correct?
>>
>> I checked the stcp logfiles that I write out to during the tests, and 
>> they
>> seem even stranger. The files seems to be written to by multiple 
>> concurrent
>> threads. I say this because I see 2 sets of sequence numbers being sent 
>> and
>> received, quite distinctly far apart. I have no idea why this happens.
>>
>> Also, from what I can manually decipher from the confusing log, it seems
>> like the FTP daemon sends out a SYN with seq num 99, but my ftp client 
>> seems
>> to receive a SYN with sequence number 233, and sends an ACK back for 234,
>> together with a SYN sequence number 103. The daemon never seems to get 
>> this
>> SYN, and my ftpcopy client just retransmits 5 times, timesout, sets errno
>> and returns from transport_init(). I'm guessing this is why myaccept()
>> returns -1, but I have no idea why this would be happening when all tests 
>> in
>> 3A and 3B have passed fine.
>>
>> It would really really be great if someone could help me see what I'm
>> missing. Thanks!
>>
>> Ram
>>
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Makefile for 3c
Date: Sun, 05 Mar 2006 15:49:50 -0800
Lines: 15
Distribution: su
Message-ID: <duftf4$9jq$1@news.Stanford.EDU>
References: <duegno$sak$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duegno$sak$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10635

Nazia Zaman wrote:
> I added my source files to FTPCOPY_SRC in the make file as follows:
> FTPCOPY_SRCS = ftp_client.c ftpcopy.c ftp_parse.c
> and it gives the following error:
> 
> make: *** No rule to make target `ftp_client.o', needed by 
> `your.ftpcopy_tcp'.  Stop.
> 
> What do I need to change?
> Thanks,
> Nazia 
> 
> 

You need to copy your ftpcopy source and header files to the directory.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Application not closing
Date: Sun, 05 Mar 2006 15:56:29 -0800
Lines: 72
Distribution: su
Message-ID: <duftrj$a7r$1@news.Stanford.EDU>
References: <duf46u$hed$1@news.Stanford.EDU> <duf5r3$iid$1@news.Stanford.EDU> <duffur$qqk$1@news.Stanford.EDU> <dufh01$ro6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dufh01$ro6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10636

Arun Penmetsa wrote:
> hey steve,
> 
> No my problem is different. If i ever receive an application close 
> request, I send out the FIN immediately. Besides I log the event with a 
> bunch of print statements. THese never get printed, so its definitely 
> not getting into my code.
> 
> This is happening when the server sends the client the result of the ls 
> command. I don't remember, but does the server first inform the client 
> of the size of the message (I don't think it does for the ls command). 
> So maybe, the client is expecting more data and is not closing (which 
> shouldn't happen since I called the stcp_fin_received)
> 
> thanks
> Arun
> 

No, client simply reads until the data connection is closed by the 
server, at which point the client is supposed to close also.  Not sure 
why you're having this problem.


> Steve Goldman wrote:
> 
>> I had this problem due to some bonehead logic of mine... probably 
>> yours is something different.
>>
>> I initially designed my control loop as a series of if...else if 
>> statements, really for no reason at all.  I had noted to myself that 
>> all the signals would persist until the next call to stcp_wait_event 
>> if I didn't handle them right away, so I handled one at a time, for 
>> debugging reasons I guess.  It turns out that isn't true for 
>> CLOSE_REQUEST; it is signalled once and only once.  If you don't 
>> handle it the first time stcp_wait_event gives it to you, then you'll 
>> never close.
>>
>> Steve
>>
>> Arun Penmetsa wrote:
>>
>>> hey,
>>>
>>> One correction to my previous post. Since the connection is a data 
>>> connection, it is the server that sends the FIN first and the client 
>>> that goes into the CLOSE_WAIT state. So the client side application 
>>> is not closing.
>>>
>>> thanks
>>> Arun
>>>
>>> Arun Penmetsa wrote:
>>>
>>>> Hey,
>>>>
>>>> I am having this issue with closing my connection for tests in part 3C.
>>>> It looks like once a file transfer has completed, the client sends a 
>>>> FIN, which the Server acknowledges and moves into the CLOSE_WAIT state.
>>>> Then there are a few out of order packets being processed. But the 
>>>> application never sends a close request. So the server is just stuck 
>>>> waiting for the application to close while the client is waiting for 
>>>> a FIN. I did call the stcp_fin_received function as soon as I got a FIN
>>>> and the flags show that I am waiting for ANY_EVENT (value is 7).
>>>>
>>>> Does anyone know why the application doesn't seem to close. The same 
>>>> thing happens with the reference implementation of ftpcopy as well, 
>>>> so i doubt its an issue with the ftpcopy code. I pass all the tests 
>>>> for Part B, so I am not sure what could be causing this.
>>>>
>>>> I would appreciate any help
>>>> thanks
>>>> Arun
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Retransmitting both SYNs and SYN-ACKs?
Date: Sun, 05 Mar 2006 15:57:35 -0800
Lines: 22
Distribution: su
Message-ID: <dufttl$a7r$2@news.Stanford.EDU>
References: <duedf2$pl6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duedf2$pl6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10637

Tahir Azim wrote:
> I am sorry if this has already been asked before, but here goes:
> 
> When is a new context created on the server; i.e. when is transport_init 
> called on the server? Is it called when the server receives a SYN from a 
> client? I am confused because I think that a new transport_init is called 
> whenever the server receives a syn, which means that if we retransmit both 
> SYNs and SYN-ACKs, two transport_inits might start running concurrently on 
> the server? An example of this is when the client resends a SYN causing a 
> new transport_init on the server, but the server retransmits another 
> SYN-ACK, causing the client to get confused which server context to actually 
> work with. Do we need to handle this confusion? Or are there underlying 
> provisions that prevent this from happening?
> 
> Thanks, Tahir.
> 
> 
> 
> 

You don't need to worry about this.  The underlying code properly 
demultiplexes everything for you.
.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: gethostbyname in PA 3.C
Date: Sun, 5 Mar 2006 16:30:58 -0800
Lines: 29
Distribution: su
Message-ID: <dufvse$c2t$1@news.Stanford.EDU>
References: <dubnuu$8mo$1@news.Stanford.EDU> <dudm4r$3ci$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10638

Yes it still is :(

My theory is that for some reason calls to gethostbyname go through the 
mysock TCP/IP layer, and since I havent initialized any context to a DNS 
server etc, the context is NULL, and the assertion "assert (ctx)" fails.

Tahir.

"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message 
news:dudm4r$3ci$1@news.Stanford.EDU...
> Tahir,
>
> Are you still having a problem with gethostbyname? You should be able to 
> use it with the mysock api without a problem.
>
> Ari
>
> Tahir Azim wrote:
>> Are we allowed to use gethostbyname in our ftpcopy code? I keep getting 
>> the following assertion from inside gethostbyname...
>>
>> Assertion failed: ctx, file mysock.c, line 408
>>
>> If that doesnt work with the mysock api, is there an alternate function 
>> that can be used?
>>
>> Tahir. 


.

Path: shelby.stanford.edu!not-for-mail
From: Arun Penmetsa <penmetsa@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Application not closing
Date: Sun, 05 Mar 2006 16:45:51 -0800
Lines: 54
Distribution: su
Message-ID: <dug0nn$clj$1@news.Stanford.EDU>
References: <duf46u$hed$1@news.Stanford.EDU> <duf5r3$iid$1@news.Stanford.EDU> <duffur$qqk$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.4 (Windows/20050908)
In-Reply-To: <duffur$qqk$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10639

hey,

Actually, the problem was similar to the one suggested below. I was 
looking for only one event at a time which was why the application close 
was not being detected. It works now. thanks guys

Arun

Steve Goldman wrote:
> I had this problem due to some bonehead logic of mine... probably yours 
> is something different.
> 
> I initially designed my control loop as a series of if...else if 
> statements, really for no reason at all.  I had noted to myself that all 
> the signals would persist until the next call to stcp_wait_event if I 
> didn't handle them right away, so I handled one at a time, for debugging 
> reasons I guess.  It turns out that isn't true for CLOSE_REQUEST; it is 
> signalled once and only once.  If you don't handle it the first time 
> stcp_wait_event gives it to you, then you'll never close.
> 
> Steve
> 
> Arun Penmetsa wrote:
>> hey,
>>
>> One correction to my previous post. Since the connection is a data 
>> connection, it is the server that sends the FIN first and the client 
>> that goes into the CLOSE_WAIT state. So the client side application is 
>> not closing.
>>
>> thanks
>> Arun
>>
>> Arun Penmetsa wrote:
>>
>>> Hey,
>>>
>>> I am having this issue with closing my connection for tests in part 3C.
>>> It looks like once a file transfer has completed, the client sends a 
>>> FIN, which the Server acknowledges and moves into the CLOSE_WAIT state.
>>> Then there are a few out of order packets being processed. But the 
>>> application never sends a close request. So the server is just stuck 
>>> waiting for the application to close while the client is waiting for 
>>> a FIN. I did call the stcp_fin_received function as soon as I got a FIN
>>> and the flags show that I am waiting for ANY_EVENT (value is 7).
>>>
>>> Does anyone know why the application doesn't seem to close. The same 
>>> thing happens with the reference implementation of ftpcopy as well, 
>>> so i doubt its an issue with the ftpcopy code. I pass all the tests 
>>> for Part B, so I am not sure what could be causing this.
>>>
>>> I would appreciate any help
>>> thanks
>>> Arun
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: SCTP
Date: Sun, 05 Mar 2006 16:55:52 -0800
Lines: 13
Distribution: su
Message-ID: <dug1ba$dfb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10640

Interesting article on Slashdot about SCTP, if you're interested:

http://linux.slashdot.org/linux/06/03/05/0627206.shtml

"SCTP is a reliable, general-purpose transport layer protocol for use on 
IP networks. While the protocol was originally designed for telephony 
signaling, SCTP provided an added bonus -- it solved some of the 
limitations of TCP while borrowing beneficial features of UDP. SCTP 
provides features for high availability, increased reliability, and 
improved security for socket initiation."

I swear I thought they were talking about our very own STCP when I first 
saw it!
.

Path: shelby.stanford.edu!not-for-mail
From: Eric Friedman <efriedman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Counting Retransmissions
Date: Sun, 05 Mar 2006 17:06:19 -0800
Lines: 23
Distribution: su
Message-ID: <440B8B0B.2000109@stanford.edu>
References: <duem68$5eu$1@news.Stanford.EDU> <dufkl4$1br$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
In-Reply-To: <dufkl4$1br$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10641

And to be clear: the timeout would be reset for all those bytes, also?

Ari Greenberg wrote:
> Each byte that you retransmit should count as being retransmitted -- so 
> in your example, bytes 100 to 499 will all have been retransmitted once.
> 
> Ari
> 
> Hector Chan wrote:
> 
>> Hi TA,
>>
>> I am a little confused as to how do we count the number of 
>> retransmission. Let's look at an example: Sequence number 100 len 50 
>> timed out and the current sequence number is 500.  In other words, I 
>> have bytes 100 to 499 unACKed.  According to the Go-Back-N protocol, I 
>> have to retransmit bytes 100 to 499.  Do I count only bytes 100 to 149 
>> as retransmitted once or do I count bytes 100 to 499 as retransmitted 
>> once?
>>
>> Thanks,
>>
>> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Eric Friedman <efriedman@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Do we need to handle segment data < nxt_byte_exp & payload size>rcv
   window
Date: Sun, 05 Mar 2006 17:10:24 -0800
Lines: 33
Distribution: su
Message-ID: <440B8C00.6010309@stanford.edu>
References: <due7a4$k85$1@news.Stanford.EDU> <due7q7$khb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
In-Reply-To: <due7q7$khb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10642

But in our code, our receive window is fixed, and is larger than the 
MSS. So really we don't need to handle it, right?

Ari Greenberg wrote:
> Yes, you should handle this.
> 
> Ari
> 
> Nikhil Ragahvan wrote:
> 
>> The RFC mentions 4 cases that need to be handled
>> for a segment to be accepted.
>> [
>> the 4th case being :
>> RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
>> or RCV.NXT =< SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND
>> ]
>> It however doest talk about the following possibility
>> [although...i'm unsure if this can even happen]
>>
>> received segment->th_seq = 2900 (for eg)
>> next_expected_byte (on the receiver side)= 3000
>> receive window size = 172 (for eg)
>> payload size = 536
>>
>> here is a case where the packet th_seq is < next_byte_expected
>> and the th_seq+segment_length-1 > next_byte_expected+receive_window_size
>> are we supposed to be digging into this packet and extracting the 
>> appropriate bytes?
>>
>>
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Error Handling
Date: Mon, 6 Mar 2006 01:30:15 +0000 (UTC)
Lines: 9
Distribution: su
Message-ID: <dug3b6$f3c$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10643

Hi TA,

How should we handle errors?  Should we always set errno and return cleanly 
from the STCP layer?  Or should we act selectly depending on the error?  Or 
should we just simply exit the program when we found an error?

Thanks,

Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Do we need to handle segment data < nxt_byte_exp & payload
 size>rcv window
Date: Sun, 05 Mar 2006 17:35:56 -0800
Lines: 46
Distribution: su
Message-ID: <C030D1FC.2E7B%jpettit@stanford.edu>
References: <due7a4$k85$1@news.Stanford.EDU> <due7q7$khb$1@news.Stanford.EDU> <440B8C00.6010309@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Do we need to handle segment data < nxt_byte_exp & payload
 size>rcv window
Thread-Index: AcZAvlAxjpinBqyxEdq+tAARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10644

I'm pretty sure that you'll fail two of the part B tests if you don't
implement this properly.  They are able to test for this condition by not
using our implementation of STCP on one side of the connection.  As you can
probably guess, I had to fix this in my implementation.  :)

--Justin


On 3/5/06 5:10 PM, in article 440B8C00.6010309@stanford.edu, "Eric Friedman"
<efriedman@stanford.edu> wrote:

> But in our code, our receive window is fixed, and is larger than the
> MSS. So really we don't need to handle it, right?
> 
> Ari Greenberg wrote:
>> Yes, you should handle this.
>> 
>> Ari
>> 
>> Nikhil Ragahvan wrote:
>> 
>>> The RFC mentions 4 cases that need to be handled
>>> for a segment to be accepted.
>>> [
>>> the 4th case being :
>>> RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
>>> or RCV.NXT =< SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND
>>> ]
>>> It however doest talk about the following possibility
>>> [although...i'm unsure if this can even happen]
>>> 
>>> received segment->th_seq = 2900 (for eg)
>>> next_expected_byte (on the receiver side)= 3000
>>> receive window size = 172 (for eg)
>>> payload size = 536
>>> 
>>> here is a case where the packet th_seq is < next_byte_expected
>>> and the th_seq+segment_length-1 > next_byte_expected+receive_window_size
>>> are we supposed to be digging into this packet and extracting the
>>> appropriate bytes?
>>> 
>>> 
>>> 
>>> 


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Assertion failure in stcp_wait_for_event
Date: Sun, 05 Mar 2006 18:16:02 -0800
Lines: 9
Distribution: su
Message-ID: <C030DB62.37A7%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Assertion failure in stcp_wait_for_event
Thread-Index: AcZAw+pHKOy+/Ky3EdqR6QARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10645

Hi.

when I call stcp_wait_for_event with a timeout value, I get an assertion
failure in pthread_cond_timedwait as it returns EINVAL.  What causes the
function to get an EINVAL and raise this assertion.

Thanks for help in advance.
Sunny 

.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assertion failure in stcp_wait_for_event
Date: Sun, 05 Mar 2006 18:25:44 -0800
Lines: 22
Distribution: su
Message-ID: <C030DDA8.2E85%jpettit@stanford.edu>
References: <C030DB62.37A7%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Assertion failure in stcp_wait_for_event
Thread-Index: AcZAw+pHKOy+/Ky3EdqR6QARJHuZqgAAVrkL
Xref: shelby.stanford.edu su.class.cs244a:10646

I think it's usually from a bad timespec argument.  Make sure that the
tv_nsec element isn't greater than 1,000,000,000--at that point the tv_sec
element should be incremented.

--Justin


On 3/5/06 6:16 PM, in article C030DB62.37A7%sunnybalwani@hotmail.com, "Sunny
Balwani" <sunnybalwani@hotmail.com> wrote:

> Hi.
> 
> when I call stcp_wait_for_event with a timeout value, I get an assertion
> failure in pthread_cond_timedwait as it returns EINVAL.  What causes the
> function to get an EINVAL and raise this assertion.
> 
> Thanks for help in advance.
> Sunny 
> 



.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: help with debugging checksum errors
Date: Sun, 5 Mar 2006 19:13:09 -0800
Lines: 12
Distribution: su
Message-ID: <Pine.GSO.4.44.0603051909290.26146-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10647

Hi,

when I transfer a small .o file I seem to be getting a checksum of rcvd
correct. When I try with larger file, say etcp_echo_client as rcvd file,
the checksum differs. Its driving me crazy in debugging the
overlapping/extra bytes that I am passing to the application. Will be
really helpful if people can share as to what I need to observe here or
any debugging tips will be helpful.

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Error Handling
Date: Sun, 05 Mar 2006 19:15:24 -0800
Lines: 13
Distribution: su
Message-ID: <dug9gh$khg$1@news.Stanford.EDU>
References: <dug3b6$f3c$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dug3b6$f3c$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10648

Hector Chan wrote:
> Hi TA,
> 
> How should we handle errors?  Should we always set errno and return cleanly 
> from the STCP layer?  Or should we act selectly depending on the error?  Or 
> should we just simply exit the program when we found an error?
> 
> Thanks,
> 
> Hector

Return cleanly from the STCP layer.  You only need to set errno if the 
connection establishment failed (set to ECONNREFUSED).
.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: gethostbyname in PA 3.C
Date: Sun, 5 Mar 2006 19:24:29 -0800
Lines: 39
Distribution: su
Message-ID: <duga1p$lbq$1@news.Stanford.EDU>
References: <dubnuu$8mo$1@news.Stanford.EDU> <dudm4r$3ci$1@news.Stanford.EDU> <dufvse$c2t$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10649

I got it fixed. It was actually due to a function in my code called 
"_read()" that was being used in place of a similarly named function in the 
socket or mysock library. Renaming that function fixed the problem.

Tahir.

"Tahir Azim" <tazim@stanford.edu> wrote in message 
news:dufvse$c2t$1@news.Stanford.EDU...
> Yes it still is :(
>
> My theory is that for some reason calls to gethostbyname go through the 
> mysock TCP/IP layer, and since I havent initialized any context to a DNS 
> server etc, the context is NULL, and the assertion "assert (ctx)" fails.
>
> Tahir.
>
> "Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message 
> news:dudm4r$3ci$1@news.Stanford.EDU...
>> Tahir,
>>
>> Are you still having a problem with gethostbyname? You should be able to 
>> use it with the mysock api without a problem.
>>
>> Ari
>>
>> Tahir Azim wrote:
>>> Are we allowed to use gethostbyname in our ftpcopy code? I keep getting 
>>> the following assertion from inside gethostbyname...
>>>
>>> Assertion failed: ctx, file mysock.c, line 408
>>>
>>> If that doesnt work with the mysock api, is there an alternate function 
>>> that can be used?
>>>
>>> Tahir.
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw3c submission
Date: Sun, 5 Mar 2006 22:35:12 -0600
Lines: 8
Distribution: su
Message-ID: <duge62$p53$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10650

How does the script know which files to pick up?  Does it just snag them all 
or am I supposed to specify the right ones?

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: /usr/class/cs244a/grading_script/hw3/testserver
Date: Sun, 05 Mar 2006 20:55:23 -0800
Lines: 6
Distribution: su
Message-ID: <dugfbt$q10$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10651

I'm trying to use this binary to test my code against. When I try to run 
it there is no output and it immediately dies. First of all are we 
allowed to use this binary? If we are, how do we get it to accept 
connections from our STCP client?

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: hw3c submission
Date: Mon, 6 Mar 2006 05:21:00 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: <duggrs$nmo$2@news.Stanford.EDU>
References: <duge62$p53$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10652

If you poke around in the perl code you can see that it has a config file
that it reads which describes which files are required and thus the script
will break if they are missing and which are optional and included only
if present.  
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: hw3c submission
Date: Mon, 6 Mar 2006 05:36:17 +0000 (UTC)
Lines: 5
Distribution: su
Message-ID: <dughoh$10t$1@news.Stanford.EDU>
References: <duge62$p53$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10653

I looked up the file for you if you want to check the specifics:

/afs/ir/class/cs244a/bin/test_code.cfg


.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Style
Date: Sun, 5 Mar 2006 21:42:56 -0800
Lines: 8
Distribution: su
Message-ID: <dugi55$1fo$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10654

Hi Ari/Matt,

For the milestone B, are you going to grade the style? Or the style part is 
only graded at milestone C?

Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Ragahvan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: elaine,saga down!!!
Date: Sun, 5 Mar 2006 22:19:06 -0800
Lines: 8
Distribution: su
Message-ID: <dugk8u$3tc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10655

I'm trying to get my testing/debugging done and
hoping to submit in a bit..and dont seem to be able to
log into elaine, saga or anything... i called a couple of others
now and checked and everyone seems to be having the same problem.

Can a TA or someone help? 


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: elaine,saga down!!!
Date: Sun, 05 Mar 2006 22:22:29 -0800
Lines: 17
Distribution: su
Message-ID: <dugkf5$41n$1@news.Stanford.EDU>
References: <dugk8u$3tc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dugk8u$3tc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10656

Phew! Totally thought my local machine was the problem. Matt/Ari, can we 
get a couple hours extension on the deadline tomorrow? :). How could 
multiple clusters actually go down like this??

BTW, I'm still able to ssh into the tree cluster.

-Will

Nikhil Ragahvan wrote:
> I'm trying to get my testing/debugging done and
> hoping to submit in a bit..and dont seem to be able to
> log into elaine, saga or anything... i called a couple of others
> now and checked and everyone seems to be having the same problem.
> 
> Can a TA or someone help? 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Ragahvan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: elaine,saga down!!!
Date: Sun, 5 Mar 2006 22:33:19 -0800
Lines: 15
Distribution: su
Message-ID: <dugl3k$5uq$1@news.Stanford.EDU>
References: <dugk8u$3tc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10657

ok..they're back up......
sorry abt that....looks like they went down momentarily.


"Nikhil Ragahvan" <nikhilr@cs.stanford.edu> wrote in message 
news:dugk8u$3tc$1@news.Stanford.EDU...
> I'm trying to get my testing/debugging done and
> hoping to submit in a bit..and dont seem to be able to
> log into elaine, saga or anything... i called a couple of others
> now and checked and everyone seems to be having the same problem.
>
> Can a TA or someone help?
> 


.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: help with debugging checksum errors
Date: Sun, 5 Mar 2006 23:02:31 -0800
Lines: 42
Distribution: su
Message-ID: <Pine.GSO.4.44.0603052251260.12663-100000@elaine7.Stanford.EDU>
References: <Pine.GSO.4.44.0603051909290.26146-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <Pine.GSO.4.44.0603051909290.26146-100000@elaine7.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10658


on some more debugging here is what I find:

offset: 114240: XXXXXXXXXXXXXXX
      :
      : ... all valid here

offset: 126528: XXXX repeats i.e 1088 bytes reappears
      .
      .
offset: 127610: all valid here.

so it seems just one block of 1088 bytes gets repeated in between!!


since the reciever window size is only 3072 bytes, and the repeat pattern
is happening after 127610-114240, 12288 bytes I don't think it is reciever
window passing in some stale data. It is puzzling as to how just one block
of 1082 could get overwritten.

any wild guesses are greatly appreciated.

thanks,,
Vijay.


On Sun, 5 Mar 2006, Vijay K Kulkarni wrote:

> Hi,
>
> when I transfer a small .o file I seem to be getting a checksum of rcvd
> correct. When I try with larger file, say etcp_echo_client as rcvd file,
> the checksum differs. Its driving me crazy in debugging the
> overlapping/extra bytes that I am passing to the application. Will be
> really helpful if people can share as to what I need to observe here or
> any debugging tips will be helpful.
>
> thanks,
> Vijay.
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: /usr/class/cs244a/grading_script/hw3/testserver
Date: Mon, 06 Mar 2006 00:15:27 -0800
Lines: 9
Distribution: su
Message-ID: <dugr35$e5m$1@news.Stanford.EDU>
References: <dugfbt$q10$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dugfbt$q10$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10659

Jens Pillgram-Larsen wrote:
> I'm trying to use this binary to test my code against. When I try to run 
> it there is no output and it immediately dies. First of all are we 
> allowed to use this binary? If we are, how do we get it to accept 
> connections from our STCP client?
> 
> Thanks, Jens.

We don't support this binary, but if you get it to work, go ahead.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Style
Date: Mon, 06 Mar 2006 00:15:45 -0800
Lines: 11
Distribution: su
Message-ID: <dugr3n$e5m$2@news.Stanford.EDU>
References: <dugi55$1fo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dugi55$1fo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10660

Sutthipong Thavisomboon wrote:
> Hi Ari/Matt,
> 
> For the milestone B, are you going to grade the style? Or the style part is 
> only graded at milestone C?
> 
> Sutthipong 
> 
> 

Style is only graded for C.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Counting Retransmissions
Date: Mon, 06 Mar 2006 00:21:54 -0800
Lines: 28
Distribution: su
Message-ID: <dugrlg$et5$1@news.Stanford.EDU>
References: <duem68$5eu$1@news.Stanford.EDU> <dufkl4$1br$1@news.Stanford.EDU> <440B8B0B.2000109@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <440B8B0B.2000109@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10661

Yes.

Eric Friedman wrote:
> And to be clear: the timeout would be reset for all those bytes, also?
> 
> Ari Greenberg wrote:
> 
>> Each byte that you retransmit should count as being retransmitted -- 
>> so in your example, bytes 100 to 499 will all have been retransmitted 
>> once.
>>
>> Ari
>>
>> Hector Chan wrote:
>>
>>> Hi TA,
>>>
>>> I am a little confused as to how do we count the number of 
>>> retransmission. Let's look at an example: Sequence number 100 len 50 
>>> timed out and the current sequence number is 500.  In other words, I 
>>> have bytes 100 to 499 unACKed.  According to the Go-Back-N protocol, 
>>> I have to retransmit bytes 100 to 499.  Do I count only bytes 100 to 
>>> 149 as retransmitted once or do I count bytes 100 to 499 as 
>>> retransmitted once?
>>>
>>> Thanks,
>>>
>>> Hector
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Style
Date: Mon, 06 Mar 2006 00:25:06 -0800
Lines: 11
Distribution: su
Message-ID: <dugrrg$et5$2@news.Stanford.EDU>
References: <dugi55$1fo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <dugi55$1fo$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10662

C only.

Sutthipong Thavisomboon wrote:
> Hi Ari/Matt,
> 
> For the milestone B, are you going to grade the style? Or the style part is 
> only graded at milestone C?
> 
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Not getting an APP_CLOSE_REQUESTED event
Date: Mon, 6 Mar 2006 00:47:50 -0800
Lines: 30
Distribution: su
Message-ID: <dugsvu$fv8$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10663

Hi,
I am trying to run part c. Test L1 fails with the following error

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

Results:  NOT OK

Incorrect program status code -1 (exit code 16777215).  Program output:
***Timeout expired during grading
--------------------------------------------------------------------------------

On looking at my log files, I found that it actually reaches the passive 
close stage and then loops infintely while I wait for an APP_CLOSE_REQUESTED 
event. I even dumped out the event immediately after it is returned after 
wait_for_event.  I should be getting a 4 (APP_CLOSE_REQUESTED) at some 
point, however all I get are 0 (TIMEOUT). I tried to change the timeout to 0 
as an experiment and that causes it to hang infinitely as well.

I do call stcp_fin_received before I get into this waiting loop. I also 
tried adding the stcp_fin_received call in the loop, so that it is called 
every iteration. However I still get 0 events.

Could anyone suggest what could be going wrong in this case?

Thanks
Krishna


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting an APP_CLOSE_REQUESTED event
Date: Mon, 06 Mar 2006 00:55:09 -0800
Lines: 33
Distribution: su
Message-ID: <dugtdj$gc9$1@news.Stanford.EDU>
References: <dugsvu$fv8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dugsvu$fv8$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10664

Krishna Monian wrote:
> Hi,
> I am trying to run part c. Test L1 fails with the following error
> 
> --------------------------------------------------------------------------------
> Test L.1 [out of 0.5]
> Checks that ftpcopy transfers zero byte file correctly.
> 
> Results:  NOT OK
> 
> Incorrect program status code -1 (exit code 16777215).  Program output:
> ***Timeout expired during grading
> --------------------------------------------------------------------------------
> 
> On looking at my log files, I found that it actually reaches the passive 
> close stage and then loops infintely while I wait for an APP_CLOSE_REQUESTED 
> event. I even dumped out the event immediately after it is returned after 
> wait_for_event.  I should be getting a 4 (APP_CLOSE_REQUESTED) at some 
> point, however all I get are 0 (TIMEOUT). I tried to change the timeout to 0 
> as an experiment and that causes it to hang infinitely as well.
> 
> I do call stcp_fin_received before I get into this waiting loop. I also 
> tried adding the stcp_fin_received call in the loop, so that it is called 
> every iteration. However I still get 0 events.
> 
> Could anyone suggest what could be going wrong in this case?
> 
> Thanks
> Krishna
> 
> 

Have you seen the thread "Application not closing" by Arun Penmesta?
.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting an APP_CLOSE_REQUESTED event
Date: Mon, 6 Mar 2006 01:52:52 -0800
Lines: 44
Distribution: su
Message-ID: <duh0q1$j5t$1@news.Stanford.EDU>
References: <dugsvu$fv8$1@news.Stanford.EDU> <dugtdj$gc9$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10665

Does this mean we need to buffer any APP_CLOSE_EVENT that we receive since
the previous posts seemed to suggest that it is signalled only once?

Thanks
Krishna

"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dugtdj$gc9$1@news.Stanford.EDU...
> Krishna Monian wrote:
>> Hi,
>> I am trying to run part c. Test L1 fails with the following error
>>
>> --------------------------------------------------------------------------------
>> Test L.1 [out of 0.5]
>> Checks that ftpcopy transfers zero byte file correctly.
>>
>> Results:  NOT OK
>>
>> Incorrect program status code -1 (exit code 16777215).  Program output:
>> ***Timeout expired during grading
>> --------------------------------------------------------------------------------
>>
>> On looking at my log files, I found that it actually reaches the passive 
>> close stage and then loops infintely while I wait for an 
>> APP_CLOSE_REQUESTED event. I even dumped out the event immediately after 
>> it is returned after wait_for_event.  I should be getting a 4 
>> (APP_CLOSE_REQUESTED) at some point, however all I get are 0 (TIMEOUT). I 
>> tried to change the timeout to 0 as an experiment and that causes it to 
>> hang infinitely as well.
>>
>> I do call stcp_fin_received before I get into this waiting loop. I also 
>> tried adding the stcp_fin_received call in the loop, so that it is called 
>> every iteration. However I still get 0 events.
>>
>> Could anyone suggest what could be going wrong in this case?
>>
>> Thanks
>> Krishna
>>
>>
>
> Have you seen the thread "Application not closing" by Arun Penmesta? 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting an APP_CLOSE_REQUESTED event
Date: Mon, 06 Mar 2006 02:17:02 -0800
Lines: 53
Distribution: su
Message-ID: <duh2dh$l2g$1@news.Stanford.EDU>
References: <dugsvu$fv8$1@news.Stanford.EDU> <dugtdj$gc9$1@news.Stanford.EDU> <duh0q1$j5t$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <duh0q1$j5t$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10666

If by buffer you mean mark down somehow that you have received an 
APP_CLOSE_EVENT, then yes. You won't be getting another one.

Ari

Krishna Monian wrote:
> Does this mean we need to buffer any APP_CLOSE_EVENT that we receive since
> the previous posts seemed to suggest that it is signalled only once?
> 
> Thanks
> Krishna
> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:dugtdj$gc9$1@news.Stanford.EDU...
> 
>>Krishna Monian wrote:
>>
>>>Hi,
>>>I am trying to run part c. Test L1 fails with the following error
>>>
>>>--------------------------------------------------------------------------------
>>>Test L.1 [out of 0.5]
>>>Checks that ftpcopy transfers zero byte file correctly.
>>>
>>>Results:  NOT OK
>>>
>>>Incorrect program status code -1 (exit code 16777215).  Program output:
>>>***Timeout expired during grading
>>>--------------------------------------------------------------------------------
>>>
>>>On looking at my log files, I found that it actually reaches the passive 
>>>close stage and then loops infintely while I wait for an 
>>>APP_CLOSE_REQUESTED event. I even dumped out the event immediately after 
>>>it is returned after wait_for_event.  I should be getting a 4 
>>>(APP_CLOSE_REQUESTED) at some point, however all I get are 0 (TIMEOUT). I 
>>>tried to change the timeout to 0 as an experiment and that causes it to 
>>>hang infinitely as well.
>>>
>>>I do call stcp_fin_received before I get into this waiting loop. I also 
>>>tried adding the stcp_fin_received call in the loop, so that it is called 
>>>every iteration. However I still get 0 events.
>>>
>>>Could anyone suggest what could be going wrong in this case?
>>>
>>>Thanks
>>>Krishna
>>>
>>>
>>
>>Have you seen the thread "Application not closing" by Arun Penmesta? 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: RTO RTT estimation required?
Date: Mon, 6 Mar 2006 02:30:15 -0800
Lines: 10
Distribution: su
Message-ID: <duh37c$lds$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10667

the assignment says:
"Note that a fixed RTO may not be sufficient--we strongly suggest that 
you implement RTT estimation in some form."

does that mean that RTT estimation is not required for submission for 3b?
i've been passing all the tests with a fixed RTO, and i'd rather get 
some sleep.



.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: RTO RTT estimation required?
Date: Mon, 06 Mar 2006 02:47:51 -0800
Lines: 16
Distribution: su
Message-ID: <duh475$mdr$1@news.Stanford.EDU>
References: <duh37c$lds$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041124)
X-Accept-Language: en-us, en
In-Reply-To: <duh37c$lds$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10668

We'll be taking a look at RTT estimation as part of your style grade, to 
be done only after you have submitted 3C. Hope that helps you rest easier.

Ari

Greg Corrado wrote:
> the assignment says:
> "Note that a fixed RTO may not be sufficient--we strongly suggest that 
> you implement RTT estimation in some form."
> 
> does that mean that RTT estimation is not required for submission for 3b?
> i've been passing all the tests with a fixed RTO, and i'd rather get 
> some sleep.
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Greg Corrado <gcorrado@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: RTO RTT estimation required?
Date: Mon, 6 Mar 2006 03:15:30 -0800
Lines: 20
Distribution: su
Message-ID: <duh5s8$o7c$1@news.Stanford.EDU>
References: <duh37c$lds$1@news.Stanford.EDU> <duh475$mdr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.3
Xref: shelby.stanford.edu su.class.cs244a:10669

zzzzzzzzzzzzzzzzzzzz....

Ari Greenberg said:

> We'll be taking a look at RTT estimation as part of your style grade, 
> to be done only after you have submitted 3C. Hope that helps you rest 
> easier.
> 
> Ari
> 
> Greg Corrado wrote:
>> the assignment says:
>> "Note that a fixed RTO may not be sufficient--we strongly suggest that 
>> you implement RTT estimation in some form."
>> 
>> does that mean that RTT estimation is not required for submission for 3b?
>> i've been passing all the tests with a fixed RTO, and i'd rather get 
>> some sleep.


.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Not getting an APP_CLOSE_REQUESTED event
Date: Mon, 6 Mar 2006 03:23:54 -0800
Lines: 61
Distribution: su
Message-ID: <duh64q$ods$1@news.Stanford.EDU>
References: <dugsvu$fv8$1@news.Stanford.EDU> <dugtdj$gc9$1@news.Stanford.EDU> <duh0q1$j5t$1@news.Stanford.EDU> <duh2dh$l2g$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10670

Thanks a lot. That solved my problem

Krishna


"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message 
news:duh2dh$l2g$1@news.Stanford.EDU...
> If by buffer you mean mark down somehow that you have received an 
> APP_CLOSE_EVENT, then yes. You won't be getting another one.
>
> Ari
>
> Krishna Monian wrote:
>> Does this mean we need to buffer any APP_CLOSE_EVENT that we receive 
>> since
>> the previous posts seemed to suggest that it is signalled only once?
>>
>> Thanks
>> Krishna
>>
>> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
>> news:dugtdj$gc9$1@news.Stanford.EDU...
>>
>>>Krishna Monian wrote:
>>>
>>>>Hi,
>>>>I am trying to run part c. Test L1 fails with the following error
>>>>
>>>>--------------------------------------------------------------------------------
>>>>Test L.1 [out of 0.5]
>>>>Checks that ftpcopy transfers zero byte file correctly.
>>>>
>>>>Results:  NOT OK
>>>>
>>>>Incorrect program status code -1 (exit code 16777215).  Program output:
>>>>***Timeout expired during grading
>>>>--------------------------------------------------------------------------------
>>>>
>>>>On looking at my log files, I found that it actually reaches the passive 
>>>>close stage and then loops infintely while I wait for an 
>>>>APP_CLOSE_REQUESTED event. I even dumped out the event immediately after 
>>>>it is returned after wait_for_event.  I should be getting a 4 
>>>>(APP_CLOSE_REQUESTED) at some point, however all I get are 0 (TIMEOUT). 
>>>>I tried to change the timeout to 0 as an experiment and that causes it 
>>>>to hang infinitely as well.
>>>>
>>>>I do call stcp_fin_received before I get into this waiting loop. I also 
>>>>tried adding the stcp_fin_received call in the loop, so that it is 
>>>>called every iteration. However I still get 0 events.
>>>>
>>>>Could anyone suggest what could be going wrong in this case?
>>>>
>>>>Thanks
>>>>Krishna
>>>>
>>>>
>>>
>>>Have you seen the thread "Application not closing" by Arun Penmesta?
>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: rcvd in mysock
Date: Mon, 06 Mar 2006 03:27:22 -0800
Lines: 3
Distribution: su
Message-ID: <duh6ar$ogn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10671

I used rcvd() in our ftpcopy implementation, but this is not available 
in mysock. Does that mean I must port my code to use read() in order to 
use mysock?
.

Path: shelby.stanford.edu!not-for-mail
From: "Greg Donaker" <gdonaker@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Using reference ftpcopy
Date: Mon, 6 Mar 2006 03:38:37 -0800
Lines: 9
Distribution: su
Message-ID: <duh6vs$ote$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10672

I'm passing all the HW3C tests using the reference ftpcopy binaries, yet 
I've been having significant trouble having my ftpcopy work correctly.  Does 
it factor into our grade at all whether or not we're using our own ftpcopy? 
Will using the reference ftpcopy come back to haunt us for HW4?

Thanks,
Greg 


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Bursty Traffic
Date: Mon, 6 Mar 2006 03:52:29 -0800
Lines: 15
Distribution: su
Message-ID: <duh7ps$pn7$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10673

I'm noticing an unusually high number of retransmissions in my code, and I
was wondering if anyone had experienced anything similar and had any
suggestions.  Basically, every time I get a packet, I ACK it.  However, the
ACK doesn't seem to show up at the other end until 200 ms or more later,
along with 8 or 9 packets that have been queued up along the way.  This can
get so bad that the 5 retransmit limit is hit, and the connection is torn
down.

So...I realize this is kind of vague, but has anyone had any similar
problems?

Thanks,
Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Using reference ftpcopy
Date: Mon, 6 Mar 2006 03:53:14 -0800
Lines: 21
Distribution: su
Message-ID: <duh7r8$pnq$1@news.Stanford.EDU>
References: <duh6vs$ote$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10674

IANATA, but the handout says you can use the reference ftpcopy.  And for
HW4, you get one free component so if you trust your router and STCP, you
can just use their ftpcopy for the final submit.

Waynn

"Greg Donaker" <gdonaker@stanford.edu> wrote in message
news:duh6vs$ote$1@news.Stanford.EDU...
> I'm passing all the HW3C tests using the reference ftpcopy binaries, yet
> I've been having significant trouble having my ftpcopy work correctly.
Does
> it factor into our grade at all whether or not we're using our own
ftpcopy?
> Will using the reference ftpcopy come back to haunt us for HW4?
>
> Thanks,
> Greg
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: rcvd in mysock
Date: Mon, 6 Mar 2006 03:54:09 -0800
Lines: 13
Distribution: su
Message-ID: <duh7t0$po8$1@news.Stanford.EDU>
References: <duh6ar$ogn$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10675

I asked Matt and that's what he told me.  But it should be fairly
straightforward, you just replace rcvd with read everywhere and drop the
last argument.

Waynn

"Hau Jia Chew" <haujia@stanford.edu> wrote in message
news:duh6ar$ogn$1@news.Stanford.EDU...
> I used rcvd() in our ftpcopy implementation, but this is not available
> in mysock. Does that mean I must port my code to use read() in order to
> use mysock?


.

Path: shelby.stanford.edu!saga21.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Bursty Traffic
Date: Mon, 6 Mar 2006 07:40:09 -0800
Lines: 25
Distribution: su
Message-ID: <Pine.GSO.4.44.0603060739380.3595-100000@saga21.Stanford.EDU>
References: <duh7ps$pn7$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <duh7ps$pn7$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10676

I don't really see that that's a problem if the RTO is set
appropriately... my RTO ends up being pretty high.

Megan

On Mon, 6 Mar 2006,
Waynn Lue wrote:

> I'm noticing an unusually high number of retransmissions in my code, and I
> was wondering if anyone had experienced anything similar and had any
> suggestions.  Basically, every time I get a packet, I ACK it.  However, the
> ACK doesn't seem to show up at the other end until 200 ms or more later,
> along with 8 or 9 packets that have been queued up along the way.  This can
> get so bad that the 5 retransmit limit is hit, and the connection is torn
> down.
>
> So...I realize this is kind of vague, but has anyone had any similar
> problems?
>
> Thanks,
> Waynn
>
>
>

.

Path: shelby.stanford.edu!elaine41.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Free late and HW3.B
Date: Mon, 6 Mar 2006 18:18:46 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 7
Distribution: su
Message-ID: <duhue6$icp$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10677

1. Am I allowed to use my free late for the milestone B?
2. If the answer to 1 is 'yes', does it automatically extend
   my HW3 milestone C by one day too?

Thanks,

Oleg.
.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Bursty Traffic
Date: Mon, 6 Mar 2006 12:23:14 -0800
Lines: 39
Distribution: su
Message-ID: <dui5ng$q4c$1@news.Stanford.EDU>
References: <duh7ps$pn7$1@news.Stanford.EDU> <Pine.GSO.4.44.0603060739380.3595-100000@saga21.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10678

Well, the problem is with the ftpd not using my STCP implementation.  If it
uses mine, it works fine, but over regular TCP, not so much.  I'm thinking
of just increasing the # of ACKs I send, but that's kind of hacky.

Waynn

"Megan Anneke Wachs" <wachs@stanford.edu> wrote in message
news:Pine.GSO.4.44.0603060739380.3595-100000@saga21.Stanford.EDU...
> I don't really see that that's a problem if the RTO is set
> appropriately... my RTO ends up being pretty high.
>
> Megan
>
> On Mon, 6 Mar 2006,
> Waynn Lue wrote:
>
> > I'm noticing an unusually high number of retransmissions in my code, and
I
> > was wondering if anyone had experienced anything similar and had any
> > suggestions.  Basically, every time I get a packet, I ACK it.  However,
the
> > ACK doesn't seem to show up at the other end until 200 ms or more later,
> > along with 8 or 9 packets that have been queued up along the way.  This
can
> > get so bad that the 5 retransmit limit is hit, and the connection is
torn
> > down.
> >
> > So...I realize this is kind of vague, but has anyone had any similar
> > problems?
> >
> > Thanks,
> > Waynn
> >
> >
> >
>


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Free late and HW3.B
Date: Mon, 06 Mar 2006 12:28:49 -0800
Lines: 22
Distribution: su
Message-ID: <dui627$q4u$1@news.Stanford.EDU>
References: <duhue6$icp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duhue6$icp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10679

Oleg Slezberg wrote:
> 1. Am I allowed to use my free late for the milestone B?

Yes.

> 2. If the answer to 1 is 'yes', does it automatically extend
>    my HW3 milestone C by one day too?

No, these are considered separate assignments.

You could also avail yourself of this option: "If for some reason you 
fail to complete Milestone A and/or B on time, you may specify in your 
final README for Milestone C that we should use your final (milestone C) 
submission for grading the earlier milestone(s). (If you don't specify 
this, we will simply grade the code as it was submitted at each 
milestone). There will be a 10-point penalty for each such milestone you 
specify (i.e. if your code is completely broken for parts A and B, but 
you fix it by the final deadline, the most you can get is 80/100)"
> 
> Thanks,
> 
> Oleg.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Error when running ftpd
Date: Mon, 6 Mar 2006 13:09:25 -0800
Lines: 10
Distribution: su
Message-ID: <dui8e7$sk3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10680

I got this error (in ftpd) and was wondering why this happened. As far as I 
know ftpd doesn't depend on my transport.c so it should work fine right? If 
yes, then that means I don't need to worry about something being wrong with 
my code.

thread call error 45: Deadlock situation detected/avoided
Assertion failed: 0, file mysock_impl.h, line 30
exiting on signal 6Abort


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Error when running ftpd
Date: Mon, 06 Mar 2006 13:23:52 -0800
Lines: 16
Distribution: su
Message-ID: <dui99e$ed$1@news.Stanford.EDU>
References: <dui8e7$sk3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dui8e7$sk3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10681

Nazia Zaman wrote:
> I got this error (in ftpd) and was wondering why this happened. As far as I 
> know ftpd doesn't depend on my transport.c so it should work fine right? If 
> yes, then that means I don't need to worry about something being wrong with 
> my code.
> 
> thread call error 45: Deadlock situation detected/avoided
> Assertion failed: 0, file mysock_impl.h, line 30
> exiting on signal 6Abort
> 
> 

If you run make, ftpd_tcp is compiled using your transport.c.  You can 
run the one in /usr/class/cs244a/WWW/homeworks/hw3/ftpd_src which uses 
our transport.c (there should be a symlink ftpd_tcp.debug in your dir to 
it).
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Bizzare problem with 3C: LIST
Date: Mon, 6 Mar 2006 13:31:27 -0800
Lines: 47
Distribution: su
Message-ID: <dui9na$116$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10682

Hi,

My code passes all tests in the test script for 3B. But it fails most tests
in the test script for 3C. For the first test in 3C, for instance, client
gets stuck and the final output is this:

Incorrect program status code -1 (exit code 16777215).  Program output:
***Timeout expired during grading

I have been trying to trace the problem for like 2 days. I tested my TCP
code with both the reference ftpcopy program and my own program, and found
that the following seems to be occurring for both ftpcopy programs:

- FTP client sends a bunch of commands (USER, PASS etc.) to the server and
the server responds. Everything is cool.
- FTP client wants to send LIST command. Before doing so, it sets up a data
socket and calls mylisten() on it.
- Then, FTP client sends the LIST command. Server sends back one-line
response "150 Opening ASCII mode data connection for /bin/ls." The client
reads this.
- Somehow, FTP server then sends "226 Transfer complete." The client calls
myread() to read this response but never returns.
- In the meantime, actual data (with file names and dates etc.) in response
to LIST command arrive on the data socket. But since client never returns
from the myread() call, it never gets a chance to call myaccept() and
myread() on the data socket.

I printed out all the packets in response to LIST command that arrived on
the data socket and found that these packets contained all phases of a TCP
connection: SYN, ACK, and FIN. So eventually, when my TCP code received the
FIN packet, it called stcp_fin_received(). Of course, since the client was
stuck at myread(), it never got a chance to call myaccept() and myread() on
the data socket to process any of these.

This problem seems related to a post titled "Application not closing" by
Arun Penmetsa before. I checked my code to ensure that whenever
APP_CLOSE_REQUESTED is received, I immediately send out a FIN. Moreover, I
feel that the problem is not in the way how I handle events, since myread()
does not even return!

I have been pulling my hair out over this problem for 2 days. If anybody
could offer any suggestions on what might be causing the problem, I would
really appreciate it. Thank you so much  in advance!

Robbie


.

Path: shelby.stanford.edu!not-for-mail
From: Jose Daniel Palencia Castro <milk345@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.J
Date: Mon, 06 Mar 2006 14:00:48 -0800
Lines: 38
Distribution: su
Message-ID: <440CB110.5010100@stanford.edu>
References: <dtp6nt$8j1$1@news.Stanford.EDU> <dtu7n8$11d$1@news.Stanford.EDU> <dtvfe7$8bo$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
To: Michi Mutsuzaki <michi2@stanford.edu>
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10683

Did you figure out what the problem was?  I have the same issue. 
Driving me nuts.

Michi Mutsuzaki wrote:
> They are for hw3b. Don't panic :)
> 
> --Michi
> 
> Naeim Semsarilar wrote:
> 
>>Are these 2.* tests for hw3b and 3c? Because when I run the hw3a test 
>>script it only gives me results for 1.B through 1.J. Am I missing something?
>>
>>*panics*
>>
>>
>>Michi Mutsuzaki wrote:
>>
>>>I'm trying to figure out why I'm failing the test 2.J. Here is the output:
>>>
>>>    Test 2.J [out of 14]
>>>    Checks student Tx (server) against student Rx (client).
>>>
>>>    Results:  NOT OK
>>>
>>>    Unexpected exit status -1.  Program output:
>>>    ***Timeout expired during grading
>>>    Program output:
>>>    server: TESTDATA.0,110230,Ok
>>>
>>>However, the program runs fine when I execute the same commands as the
>>>script. I see from the previous year's newsgroup that some people had
>>>trouble with the same test in the past. What was the problem?
>>>
>>>Thanks!
>>>--Michi
>>

.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Bizzare problem with 3C: LIST
Date: Mon, 6 Mar 2006 14:04:25 -0800
Lines: 63
Distribution: su
Message-ID: <duibla$2tt$1@news.Stanford.EDU>
References: <dui9na$116$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10684

I had the same problem initially. Modify your transport.c so it dprintfs the 
data it sends to the app layer, and it should become very obvious what's 
happening.

-Jesse

"Robbie Yan" <xyan@stanford.edu> wrote in message 
news:dui9na$116$1@news.Stanford.EDU...
> Hi,
>
> My code passes all tests in the test script for 3B. But it fails most 
> tests
> in the test script for 3C. For the first test in 3C, for instance, client
> gets stuck and the final output is this:
>
> Incorrect program status code -1 (exit code 16777215).  Program output:
> ***Timeout expired during grading
>
> I have been trying to trace the problem for like 2 days. I tested my TCP
> code with both the reference ftpcopy program and my own program, and found
> that the following seems to be occurring for both ftpcopy programs:
>
> - FTP client sends a bunch of commands (USER, PASS etc.) to the server and
> the server responds. Everything is cool.
> - FTP client wants to send LIST command. Before doing so, it sets up a 
> data
> socket and calls mylisten() on it.
> - Then, FTP client sends the LIST command. Server sends back one-line
> response "150 Opening ASCII mode data connection for /bin/ls." The client
> reads this.
> - Somehow, FTP server then sends "226 Transfer complete." The client calls
> myread() to read this response but never returns.
> - In the meantime, actual data (with file names and dates etc.) in 
> response
> to LIST command arrive on the data socket. But since client never returns
> from the myread() call, it never gets a chance to call myaccept() and
> myread() on the data socket.
>
> I printed out all the packets in response to LIST command that arrived on
> the data socket and found that these packets contained all phases of a TCP
> connection: SYN, ACK, and FIN. So eventually, when my TCP code received 
> the
> FIN packet, it called stcp_fin_received(). Of course, since the client was
> stuck at myread(), it never got a chance to call myaccept() and myread() 
> on
> the data socket to process any of these.
>
> This problem seems related to a post titled "Application not closing" by
> Arun Penmetsa before. I checked my code to ensure that whenever
> APP_CLOSE_REQUESTED is received, I immediately send out a FIN. Moreover, I
> feel that the problem is not in the way how I handle events, since 
> myread()
> does not even return!
>
> I have been pulling my hair out over this problem for 2 days. If anybody
> could offer any suggestions on what might be causing the problem, I would
> really appreciate it. Thank you so much  in advance!
>
> Robbie
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Bizzare problem with 3C: LIST
Date: Mon, 6 Mar 2006 14:18:22 -0800
Lines: 90
Distribution: su
Message-ID: <duicf9$430$1@news.Stanford.EDU>
References: <dui9na$116$1@news.Stanford.EDU> <duibla$2tt$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: shelby.stanford.edu su.class.cs244a:10685

Hi Jesse,

Thank you very much for your response. I did print out all the data sent
from my transport layer to the application. However, all the data that I saw
were as expected. There was nothing bizzare about them. Could you be a
little more specific about what you encountered when you did your printout?

Thank you!

Robbie

"Jesse Young" <jesse.young@stanford.edu> wrote in message
news:duibla$2tt$1@news.Stanford.EDU...
> I had the same problem initially. Modify your transport.c so it dprintfs
the
> data it sends to the app layer, and it should become very obvious what's
> happening.
>
> -Jesse
>
> "Robbie Yan" <xyan@stanford.edu> wrote in message
> news:dui9na$116$1@news.Stanford.EDU...
> > Hi,
> >
> > My code passes all tests in the test script for 3B. But it fails most
> > tests
> > in the test script for 3C. For the first test in 3C, for instance,
client
> > gets stuck and the final output is this:
> >
> > Incorrect program status code -1 (exit code 16777215).  Program output:
> > ***Timeout expired during grading
> >
> > I have been trying to trace the problem for like 2 days. I tested my TCP
> > code with both the reference ftpcopy program and my own program, and
found
> > that the following seems to be occurring for both ftpcopy programs:
> >
> > - FTP client sends a bunch of commands (USER, PASS etc.) to the server
and
> > the server responds. Everything is cool.
> > - FTP client wants to send LIST command. Before doing so, it sets up a
> > data
> > socket and calls mylisten() on it.
> > - Then, FTP client sends the LIST command. Server sends back one-line
> > response "150 Opening ASCII mode data connection for /bin/ls." The
client
> > reads this.
> > - Somehow, FTP server then sends "226 Transfer complete." The client
calls
> > myread() to read this response but never returns.
> > - In the meantime, actual data (with file names and dates etc.) in
> > response
> > to LIST command arrive on the data socket. But since client never
returns
> > from the myread() call, it never gets a chance to call myaccept() and
> > myread() on the data socket.
> >
> > I printed out all the packets in response to LIST command that arrived
on
> > the data socket and found that these packets contained all phases of a
TCP
> > connection: SYN, ACK, and FIN. So eventually, when my TCP code received
> > the
> > FIN packet, it called stcp_fin_received(). Of course, since the client
was
> > stuck at myread(), it never got a chance to call myaccept() and myread()
> > on
> > the data socket to process any of these.
> >
> > This problem seems related to a post titled "Application not closing" by
> > Arun Penmetsa before. I checked my code to ensure that whenever
> > APP_CLOSE_REQUESTED is received, I immediately send out a FIN. Moreover,
I
> > feel that the problem is not in the way how I handle events, since
> > myread()
> > does not even return!
> >
> > I have been pulling my hair out over this problem for 2 days. If anybody
> > could offer any suggestions on what might be causing the problem, I
would
> > really appreciate it. Thank you so much  in advance!
> >
> > Robbie
> >
> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Bizzare problem with 3C: LIST
Date: Mon, 6 Mar 2006 14:20:44 -0800
Lines: 108
Distribution: su
Message-ID: <duicjm$4e3$1@news.Stanford.EDU>
References: <dui9na$116$1@news.Stanford.EDU> <duibla$2tt$1@news.Stanford.EDU> <duicf9$430$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10686

Another attribute of the situation is that, 2 out of 5 times, the FTP client
successfully copies data and successfully terminates. The other times, it
fails. Note that I have been running in reliable mode all along. Really
strange ...

"Robbie Yan" <xyan@stanford.edu> wrote in message
news:duicf9$430$1@news.Stanford.EDU...
> Hi Jesse,
>
> Thank you very much for your response. I did print out all the data sent
> from my transport layer to the application. However, all the data that I
saw
> were as expected. There was nothing bizzare about them. Could you be a
> little more specific about what you encountered when you did your
printout?
>
> Thank you!
>
> Robbie
>
> "Jesse Young" <jesse.young@stanford.edu> wrote in message
> news:duibla$2tt$1@news.Stanford.EDU...
> > I had the same problem initially. Modify your transport.c so it dprintfs
> the
> > data it sends to the app layer, and it should become very obvious what's
> > happening.
> >
> > -Jesse
> >
> > "Robbie Yan" <xyan@stanford.edu> wrote in message
> > news:dui9na$116$1@news.Stanford.EDU...
> > > Hi,
> > >
> > > My code passes all tests in the test script for 3B. But it fails most
> > > tests
> > > in the test script for 3C. For the first test in 3C, for instance,
> client
> > > gets stuck and the final output is this:
> > >
> > > Incorrect program status code -1 (exit code 16777215).  Program
output:
> > > ***Timeout expired during grading
> > >
> > > I have been trying to trace the problem for like 2 days. I tested my
TCP
> > > code with both the reference ftpcopy program and my own program, and
> found
> > > that the following seems to be occurring for both ftpcopy programs:
> > >
> > > - FTP client sends a bunch of commands (USER, PASS etc.) to the server
> and
> > > the server responds. Everything is cool.
> > > - FTP client wants to send LIST command. Before doing so, it sets up a
> > > data
> > > socket and calls mylisten() on it.
> > > - Then, FTP client sends the LIST command. Server sends back one-line
> > > response "150 Opening ASCII mode data connection for /bin/ls." The
> client
> > > reads this.
> > > - Somehow, FTP server then sends "226 Transfer complete." The client
> calls
> > > myread() to read this response but never returns.
> > > - In the meantime, actual data (with file names and dates etc.) in
> > > response
> > > to LIST command arrive on the data socket. But since client never
> returns
> > > from the myread() call, it never gets a chance to call myaccept() and
> > > myread() on the data socket.
> > >
> > > I printed out all the packets in response to LIST command that arrived
> on
> > > the data socket and found that these packets contained all phases of a
> TCP
> > > connection: SYN, ACK, and FIN. So eventually, when my TCP code
received
> > > the
> > > FIN packet, it called stcp_fin_received(). Of course, since the client
> was
> > > stuck at myread(), it never got a chance to call myaccept() and
myread()
> > > on
> > > the data socket to process any of these.
> > >
> > > This problem seems related to a post titled "Application not closing"
by
> > > Arun Penmetsa before. I checked my code to ensure that whenever
> > > APP_CLOSE_REQUESTED is received, I immediately send out a FIN.
Moreover,
> I
> > > feel that the problem is not in the way how I handle events, since
> > > myread()
> > > does not even return!
> > >
> > > I have been pulling my hair out over this problem for 2 days. If
anybody
> > > could offer any suggestions on what might be causing the problem, I
> would
> > > really appreciate it. Thank you so much  in advance!
> > >
> > > Robbie
> > >
> > >
> >
> >
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: Michi Mutsuzaki <michi2@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.J
Date: Mon, 06 Mar 2006 14:30:45 -0800
Lines: 46
Distribution: su
Message-ID: <duid6i$57c$1@news.Stanford.EDU>
References: <dtp6nt$8j1$1@news.Stanford.EDU> <dtu7n8$11d$1@news.Stanford.EDU> <dtvfe7$8bo$1@news.Stanford.EDU> <440CB110.5010100@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <440CB110.5010100@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10687

I don't remember exactly, but I got it fixed by poking around all the
edge conditions. For example, my code wasn't taking care of the case
when client's FIN-ACK got lost (in which case my server was stuck at
the LAST-ACK state).

Hope this helps,
--Michi

Jose Daniel Palencia Castro wrote:
> Did you figure out what the problem was?  I have the same issue. 
> Driving me nuts.
> 
> Michi Mutsuzaki wrote:
>> They are for hw3b. Don't panic :)
>>
>> --Michi
>>
>> Naeim Semsarilar wrote:
>>
>>> Are these 2.* tests for hw3b and 3c? Because when I run the hw3a test 
>>> script it only gives me results for 1.B through 1.J. Am I missing something?
>>>
>>> *panics*
>>>
>>>
>>> Michi Mutsuzaki wrote:
>>>
>>>> I'm trying to figure out why I'm failing the test 2.J. Here is the output:
>>>>
>>>>    Test 2.J [out of 14]
>>>>    Checks student Tx (server) against student Rx (client).
>>>>
>>>>    Results:  NOT OK
>>>>
>>>>    Unexpected exit status -1.  Program output:
>>>>    ***Timeout expired during grading
>>>>    Program output:
>>>>    server: TESTDATA.0,110230,Ok
>>>>
>>>> However, the program runs fine when I execute the same commands as the
>>>> script. I see from the previous year's newsgroup that some people had
>>>> trouble with the same test in the past. What was the problem?
>>>>
>>>> Thanks!
>>>> --Michi
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Tests 2.[E,F,G]
Date: Mon, 06 Mar 2006 14:40:37 -0800
Lines: 19
Distribution: su
Message-ID: <duidom$5pe$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10688

Good news is that I am passing all tests in 3C and most in 3B. I am 
however running into trouble with the following tests for 3B.

E and F are failing for the same reason. I think they are related to a 
sender sending data that falls outside the receiver window of the 
receiver. When this happens I receive the packet, but only send the data 
that is within my receiving window to the application. Did anyone have 
any experience with what these tests are expecting? The test says that I 
fail by downloading a certain amount of bytes, larger than the expected. 
The difference is how many bytes I receive outside of my window.

Test 2.G fails by saying I never send an ACK for a SYN+ACK. No matter 
how many tests I run on my own I'm not able to reproduce this behavior. 
Anybody have any experience with this test?

To the TA's: It seems 2.E and 2.F fails because of the same bug. Does 
this still mean that I get -10 if this was a grading run?

Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <youngj@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Bizzare problem with 3C: LIST
Date: Mon, 6 Mar 2006 14:49:29 -0800
Lines: 126
Distribution: su
Message-ID: <duie9f$6h7$1@news.Stanford.EDU>
References: <dui9na$116$1@news.Stanford.EDU> <duibla$2tt$1@news.Stanford.EDU> <duicf9$430$1@news.Stanford.EDU> <duicjm$4e3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10689

Oh right, I guess it would be easier to see what's going on by looking at 
the data on the FTP client side. What happens when you print out the entire 
string that you get from call to myread when you get the 150 response?

-Jesse

"Robbie Yan" <xyan@stanford.edu> wrote in message 
news:duicjm$4e3$1@news.Stanford.EDU...
> Another attribute of the situation is that, 2 out of 5 times, the FTP 
> client
> successfully copies data and successfully terminates. The other times, it
> fails. Note that I have been running in reliable mode all along. Really
> strange ...
>
> "Robbie Yan" <xyan@stanford.edu> wrote in message
> news:duicf9$430$1@news.Stanford.EDU...
>> Hi Jesse,
>>
>> Thank you very much for your response. I did print out all the data sent
>> from my transport layer to the application. However, all the data that I
> saw
>> were as expected. There was nothing bizzare about them. Could you be a
>> little more specific about what you encountered when you did your
> printout?
>>
>> Thank you!
>>
>> Robbie
>>
>> "Jesse Young" <jesse.young@stanford.edu> wrote in message
>> news:duibla$2tt$1@news.Stanford.EDU...
>> > I had the same problem initially. Modify your transport.c so it 
>> > dprintfs
>> the
>> > data it sends to the app layer, and it should become very obvious 
>> > what's
>> > happening.
>> >
>> > -Jesse
>> >
>> > "Robbie Yan" <xyan@stanford.edu> wrote in message
>> > news:dui9na$116$1@news.Stanford.EDU...
>> > > Hi,
>> > >
>> > > My code passes all tests in the test script for 3B. But it fails most
>> > > tests
>> > > in the test script for 3C. For the first test in 3C, for instance,
>> client
>> > > gets stuck and the final output is this:
>> > >
>> > > Incorrect program status code -1 (exit code 16777215).  Program
> output:
>> > > ***Timeout expired during grading
>> > >
>> > > I have been trying to trace the problem for like 2 days. I tested my
> TCP
>> > > code with both the reference ftpcopy program and my own program, and
>> found
>> > > that the following seems to be occurring for both ftpcopy programs:
>> > >
>> > > - FTP client sends a bunch of commands (USER, PASS etc.) to the 
>> > > server
>> and
>> > > the server responds. Everything is cool.
>> > > - FTP client wants to send LIST command. Before doing so, it sets up 
>> > > a
>> > > data
>> > > socket and calls mylisten() on it.
>> > > - Then, FTP client sends the LIST command. Server sends back one-line
>> > > response "150 Opening ASCII mode data connection for /bin/ls." The
>> client
>> > > reads this.
>> > > - Somehow, FTP server then sends "226 Transfer complete." The client
>> calls
>> > > myread() to read this response but never returns.
>> > > - In the meantime, actual data (with file names and dates etc.) in
>> > > response
>> > > to LIST command arrive on the data socket. But since client never
>> returns
>> > > from the myread() call, it never gets a chance to call myaccept() and
>> > > myread() on the data socket.
>> > >
>> > > I printed out all the packets in response to LIST command that 
>> > > arrived
>> on
>> > > the data socket and found that these packets contained all phases of 
>> > > a
>> TCP
>> > > connection: SYN, ACK, and FIN. So eventually, when my TCP code
> received
>> > > the
>> > > FIN packet, it called stcp_fin_received(). Of course, since the 
>> > > client
>> was
>> > > stuck at myread(), it never got a chance to call myaccept() and
> myread()
>> > > on
>> > > the data socket to process any of these.
>> > >
>> > > This problem seems related to a post titled "Application not closing"
> by
>> > > Arun Penmetsa before. I checked my code to ensure that whenever
>> > > APP_CLOSE_REQUESTED is received, I immediately send out a FIN.
> Moreover,
>> I
>> > > feel that the problem is not in the way how I handle events, since
>> > > myread()
>> > > does not even return!
>> > >
>> > > I have been pulling my hair out over this problem for 2 days. If
> anybody
>> > > could offer any suggestions on what might be causing the problem, I
>> would
>> > > really appreciate it. Thank you so much  in advance!
>> > >
>> > > Robbie
>> > >
>> > >
>> >
>> >
>>
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Peter Lee" <ptrlee@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FIN packets and data
Date: Mon, 6 Mar 2006 15:27:05 -0800
Lines: 28
Distribution: su
Message-ID: <duiggf$90b$1@news.Stanford.EDU>
References: <duduqf$aar$1@news.Stanford.EDU> <due3fm$e71$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10690

What happens to the data already in the receive buffer when a FIN is 
received?  Is it all processed before the FIN is processed?  Or should the 
FIN be handled right away?  I.e. should the FIN be buffered and handled in 
due turn.

Also, I have been assuming that when incoming network data overlaps in 
sequence numbers with data that's already buffered in my receive window, I 
just keep whatever's already in the window.  For tests 2.E, 2.F, could it be 
possible that I should actually be _replacing_ the overlapping parts?

Thanks a lot,
Peter



"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:due3fm$e71$1@news.Stanford.EDU...
> Bruce Schechter wrote:
>> I know that a FIN packet may also have a data payload.  But could the 
>> sender of the FIN ever send any additional data (with sequence numbers 
>> higher than the ending sequence of the FIN packet) afterward?   I dont 
>> think so, but want to be sure.
>>
>> Thanks, Bruce
>
> Nope, FIN means sender is done sending data. 


.

Path: shelby.stanford.edu!not-for-mail
From: Surendra Kumar <surendra@stanford.edu>
Newsgroups: su.class.cs244a
Subject: test scripts
Date: Mon, 06 Mar 2006 15:46:09 -0800
Lines: 24
Distribution: su
Message-ID: <duihk6$a0u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10691

#Part B

2.B
I see that the script timesout after 60secs.
I see that my server had transmitted about ~95K  when the script timed 
out. Is it implicit that we limit our upperbound on the KP-backoff to a 
low-value, (... hence finish the test in 60secs ?)
I see that with about 1sec upperbound, my server can do 0.5MB in about a 
min. Is this reasoning correct ? [The same server, obviosuly does 0.5MB 
in < 4secs.]

2.C
I see that the ref.server sends two SYN_ACKs with two different seq. nos.
---@client---
          0 : rx NET  20b; s:125 a:52; flags 0x12
<conn-ESTABLISHED and later client sends some data to server which is
acked by srvr. But server sends a another SYN_ACK>
          0 : rx NET  20b; s:126 a:52; flags 0x12
---
Client keeps acking only 126 (for SYN_ACK/125) but server keeps sending 
the second SYN_ACK ...the script eventually timesout after 60secs!
I thought the cilent should drop the second SYN_ACK ?

Surendra.
.

Path: shelby.stanford.edu!elaine20.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Running with the reference STCP copy
Date: Mon, 6 Mar 2006 16:27:38 -0800
Lines: 15
Distribution: su
Message-ID: <Pine.GSO.4.44.0603061622270.5706-100000@elaine20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10692

If our STCP is working correctly, the should ftpcopy_tcp executable that
Make builds using the reference solution work straight off the bat for us?

My STCP passes all the 3B test script tests, but when I try:
../ftpcopy_tcp html 1 ftp.fedworld.gov /tmp/dinkarg/ .

I find that the program tries to send a SYN out 6 times and then times out
for lack of a response.

Has anyone else seen such behaviour? Am I missing something basic?
Currently I am not using any of my own ftpcopy code.

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Tests 2.[E,F,G]
Date: Tue, 7 Mar 2006 00:38:28 +0000 (UTC)
Lines: 42
Distribution: su
Message-ID: <duikm4$csr$1@news.Stanford.EDU>
References: <duidom$5pe$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10693

Jens-
The test program reads in the net_instruct*.txt file I mention below and
processing each line as a packet (format is pretty clear from inspection)
and basically not paying attention to what you send.  The app which invokes
your code just saves all the bytes you hand up to a file which is compared
against the identically named net_instruct*.out file.

So..

Go to 

/afs/ir/class/cs244a/grading_script/hw3

I think test E is net_instruct_resend_seqnum.txt which basically sends a 
set of overlapping or illegal packets which in total fill exactly one
window of data (and yes it sends too much data and expects you to clip).

The file in this case looks like:

@time 1, SYA, seq 2, ack 2, len 0, content "A"
@time 100, ACK, seq 3, ack 2, len 10, content "B"
@time 200, ACK, seq 3, ack 2, len 10, content "C"
@time 300, ACK, seq 3, ack 2, len 20, content "D"
@time 400, ACK, seq 1, ack 2, len 10, content "E"
@time 500, ACK, seq 3040, ack 2, len 300, content "F"
@time 600, ACK, seq 1000, ack 2, len 520, content "G"
@time 700, ACK, seq 1520, ack 2, len 520, content "H"
@time 800, ACK, seq 500, ack 2, len 500, content "I"
@time 850, ACK, seq 1, ack 2, len 499, content "J"
@time 900, ACK, seq 2040, ack 2, len 500, content "K"
@time 1000, ACK, seq 2540, ack 2, len 500, content "L"
@time 1300, FIA, seq 3095, ack 2, len 0, content "Z"

With the expected output stored in net_instruct_resend_seqnum.out
but not particularly interesting to copy in.

Test 2.F I dont remember but you can easily read off which one is
failing by reading the verbose output of the testing script--by
verbose I mean the output it generates as it tests as opposed to the
pretty printed output at the end.

Stefan
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Running with the reference STCP copy
Date: Tue, 7 Mar 2006 00:41:53 +0000 (UTC)
Lines: 5
Distribution: su
Message-ID: <duiksh$csr$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603061622270.5706-100000@elaine20.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10694

This came up a while back.  

The brief version is that you cant expect any given host
to handshake with the mysocket layer.  I posted a longer
explanation last time if you want to search for it.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Tests 2.[E,F,G]
Date: Mon, 06 Mar 2006 19:38:15 -0800
Lines: 27
Distribution: su
Message-ID: <duiv77$q6c$1@news.Stanford.EDU>
References: <duidom$5pe$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <duidom$5pe$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10695

I used to pass all tests but 2.E and 2.F when I didn't have the 
buffering of segments as they arrived implemented. Once I had that done, 
E and F passed. So I think E and F test whether you buffer incoming data 
that's in your receive window and arrives not necessarily in the right 
order.


Jens Pillgram-Larsen wrote:
> Good news is that I am passing all tests in 3C and most in 3B. I am 
> however running into trouble with the following tests for 3B.
> 
> E and F are failing for the same reason. I think they are related to a 
> sender sending data that falls outside the receiver window of the 
> receiver. When this happens I receive the packet, but only send the data 
> that is within my receiving window to the application. Did anyone have 
> any experience with what these tests are expecting? The test says that I 
> fail by downloading a certain amount of bytes, larger than the expected. 
> The difference is how many bytes I receive outside of my window.
> 
> Test 2.G fails by saying I never send an ACK for a SYN+ACK. No matter 
> how many tests I run on my own I'm not able to reproduce this behavior. 
> Anybody have any experience with this test?
> 
> To the TA's: It seems 2.E and 2.F fails because of the same bug. Does 
> this still mean that I get -10 if this was a grading run?
> 
> Thanks, Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3c submission
Date: Mon, 6 Mar 2006 21:53:25 -0600
Lines: 28
Distribution: su
Message-ID: <duj03o$rcb$1@news.Stanford.EDU>
References: <duge62$p53$1@news.Stanford.EDU> <dughoh$10t$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10696

Hi Stefan...

Thanks for taking the time to look that up.  I assume that the following 
lines in the config file mean that it will suck in any *.c *.h files:


Allow: hw3.C, *.c
Allow: hw3.C, *.h


That is, if our ftpcopy code is comprised of several files, it will get them 
all without us having to do anything.  If this isn't correct, please let me 
know.

Thanks,

Roy


"Stefan Thomas Mohler" <smohler@Stanford.EDU> wrote in message 
news:dughoh$10t$1@news.Stanford.EDU...
>I looked up the file for you if you want to check the specifics:
>
> /afs/ir/class/cs244a/bin/test_code.cfg
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: hw3c submission
Date: Tue, 7 Mar 2006 04:08:16 +0000 (UTC)
Lines: 11
Distribution: su
Message-ID: <duj0vf$js8$1@news.Stanford.EDU>
References: <duge62$p53$1@news.Stanford.EDU> <dughoh$10t$1@news.Stanford.EDU> <duj03o$rcb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10697

Yup, thats my understanding.  If you want, once you finish submitting you
can inspect the tar file it creates of your code in:

/afs/ir/class/cs244a/submissions/grading/hw3.B/mjf/zeighami/files.tar.fz

The directory was created by your userid when you submitted so other people
cant see whats in there but you have permissions to copy it somewhere and
untar it to double check in case you want to be extra super duper really alot
cautious.

Stefan
.

Path: shelby.stanford.edu!elaine20.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 3C - which ftpcopy?
Date: Mon, 6 Mar 2006 22:42:16 -0800
Lines: 22
Distribution: su
Message-ID: <Pine.GSO.4.44.0603062234490.26430-100000@elaine20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10698

	so let me double check, we want to get our ftpcopy from
HW1, but if we run into problems, we can just use the default
implementation of ftcopy WITHOUT ANY POINTS BEING LOST?

   Running the 3C tests with my transport.c but the default ftpcopy
succeeds? Am I done?

   I'm so sleep deprived that I'm not even sure that the deliverable is
for 3C :-)

  Related question, I would just submit with

/afs/ir/class/cs244a/bin/submit.pl hw3.C arigreen

I haven't changed the Makefile since I'm using the default implementation.
This would just submit my transport.c?

thanks,

- Miguel


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Question about ftpd
Date: Tue, 7 Mar 2006 00:27:49 -0800
Lines: 14
Distribution: su
Message-ID: <dujg69$gbu$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10699

The website says,
 This ftp server talks STCP over our simulated network layer, and you are 
required to modify your ftp client from the first assignment to work with 
this server when your ftp client uses the mysock/stcp implementation you 
have completed in milestone HW3.B.
Which seems to imply that ONLY the ftpcopy will use our transport.c, but the 
script checks with the locally compiled ftpd (compiled with our transport.c)
My code works fine with the provided server, but some edge condition 
sometimes causes problems with the local version. Why is the script checking 
ftpd with the locally compiled version anyway?
HELP!
Thanks,


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: ftpd server
Date: Tue, 07 Mar 2006 09:27:03 -0800
Lines: 10
Distribution: su
Message-ID: <C0330267.3842%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: ftpd server
Thread-Index: AcZCDFkwl6DaiK3/EdqaQAARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10700

Hi.
When I run referecne ftpcopy_tcp client againser ftpd server, I get the
following message repeated several times from the server:

retrieve(): closed socket after sending data

Is this an inforamtion message or error message from server?

Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Timeout in 3C
Date: Tue, 07 Mar 2006 09:42:49 -0800
Lines: 29
Distribution: su
Message-ID: <C0330619.3844%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.1.051004
Thread-Topic: Timeout in 3C
Thread-Index: AcZCDo0My2Fb5q4BEdqaQAARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10701

Hi.

I am using referecne FTP client.

During 3c test scripts, half my tests are timing out though from command
line they seem to work fine.  Also, in test L, the program does output the
correct error message but after the timeout.




Test L.7 [out of 0.5]
Checks that ftpcopy returns error on non-existent remote dir.

Results:  NOT OK

Exit status (16777215) incorrect.  Program output:

***Timeout expired during grading
Program output:
ERROR: Could not access the requested file or directory (-4)




Would appreciate help understanding why the timeouts (and how to fix it).

Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Timeout in 3C
Date: Tue, 7 Mar 2006 10:16:56 -0800
Lines: 41
Distribution: su
Message-ID: <dukio4$k16$1@news.Stanford.EDU>
References: <C0330619.3844%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10702

I was having a similar problem, and it happens if you don't handle the 
connection teardown properly since the client/'server just hangs around 
waiting. You might want to take a look at the post, "Not getting an 
APP_CLOSE_REQUESTED event"


~ Krishna

"Sunny Balwani" <sunnybalwani@hotmail.com> wrote in message 
news:C0330619.3844%sunnybalwani@hotmail.com...
> Hi.
>
> I am using referecne FTP client.
>
> During 3c test scripts, half my tests are timing out though from command
> line they seem to work fine.  Also, in test L, the program does output the
> correct error message but after the timeout.
>
>
>
>
> Test L.7 [out of 0.5]
> Checks that ftpcopy returns error on non-existent remote dir.
>
> Results:  NOT OK
>
> Exit status (16777215) incorrect.  Program output:
>
> ***Timeout expired during grading
> Program output:
> ERROR: Could not access the requested file or directory (-4)
>
>
>
>
> Would appreciate help understanding why the timeouts (and how to fix it).
>
> Thanks.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: ftpd server
Date: Tue, 7 Mar 2006 18:24:17 +0000 (UTC)
Lines: 4
Distribution: su
Message-ID: <dukj4h$kbd$1@news.Stanford.EDU>
References: <C0330267.3842%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10703

I saw the message when testing.  I think its just a debug message from their
that happens when a RETR finishes.  Even when using their testing script
many messages were printed out and it didnt seems to affect whether or not
a given test was failed or passed.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nick Cooper" <nacooper@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Tests 2.[E,F,G]
Date: Tue, 7 Mar 2006 12:16:21 -0800
Lines: 36
Distribution: su
Message-ID: <dukpn2$sf8$1@news.Stanford.EDU>
References: <duidom$5pe$1@news.Stanford.EDU> <duiv77$q6c$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10704

I have been having some serious issues with E and F. I get no output from 
them, and it says that I copied 0 bytes. This is strange cause I have a 
printf statement at the top of transport_init(), and it is never printed 
when these tests are run. All of my other tests are passing, too. Any ideas?


"Naeim Semsarilar" <naeim@stanford.edu> wrote in message 
news:duiv77$q6c$1@news.Stanford.EDU...
>I used to pass all tests but 2.E and 2.F when I didn't have the buffering 
>of segments as they arrived implemented. Once I had that done, E and F 
>passed. So I think E and F test whether you buffer incoming data that's in 
>your receive window and arrives not necessarily in the right order.
>
>
> Jens Pillgram-Larsen wrote:
>> Good news is that I am passing all tests in 3C and most in 3B. I am 
>> however running into trouble with the following tests for 3B.
>>
>> E and F are failing for the same reason. I think they are related to a 
>> sender sending data that falls outside the receiver window of the 
>> receiver. When this happens I receive the packet, but only send the data 
>> that is within my receiving window to the application. Did anyone have 
>> any experience with what these tests are expecting? The test says that I 
>> fail by downloading a certain amount of bytes, larger than the expected. 
>> The difference is how many bytes I receive outside of my window.
>>
>> Test 2.G fails by saying I never send an ACK for a SYN+ACK. No matter how 
>> many tests I run on my own I'm not able to reproduce this behavior. 
>> Anybody have any experience with this test?
>>
>> To the TA's: It seems 2.E and 2.F fails because of the same bug. Does 
>> this still mean that I get -10 if this was a grading run?
>>
>> Thanks, Jens. 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nick Cooper" <nacooper@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Assertion failure in test script 1.C ( inside stcp_network_recv())
Date: Tue, 7 Mar 2006 12:23:11 -0800
Lines: 44
Distribution: su
Message-ID: <dukq3p$ssq$1@news.Stanford.EDU>
References: <C0275E42.35B9%sunnybalwani@hotmail.com>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10705

Have you been able to get this working? I am having the same problem.

Thanks,

Nick


"Sunny Balwani" <sunnybalwani@hotmail.com> wrote in message 
news:C0275E42.35B9%sunnybalwani@hotmail.com...
> Hi.
>
> In the test script 1.C, I get the following  error:
>
> Unexpected exit status 6.  Program output:
> Assertion failed: len <= 0 ||
> _mysock_verify_checksum(_mysock_get_context(sd), dst, len), file 
> stcp_api.c,
> line 166
>
>
> I only call stcp_netowrk_recv inside (event & NETWORK_DATA) code segment 
> so
> that means there is definitely data there and len<=0 is not causing the
> assertion failure.  I also malloc a buffer before I pass it to the
> stcp_network_recv function as follows:
>
>    void* buf = (void*) malloc(MAX_STCP_PACKET_LEN);
>    assert(buf);
>
>    bytes_rcvd = stcp_network_recv(sd,buf,MAX_STCP_PACKET_LEN);
>    assert(bytes_rcvd>0);
>
>
> Cant figure out why the test script fails inside stcp_api.c, line 166,
> though all of my tests work just fine.
>
> If you have seen this or if you have any p;ointers, I would aprpeciate the
> help.
>
> Thanks in advance.
> Sunny.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: style points.. using given ftp
Date: Tue, 7 Mar 2006 13:11:02 -0800
Lines: 9
Distribution: su
Message-ID: <dukst7$2c9$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10706

hi,

for pa 3c will we pe penalized for using the given ftp client in style 
grading?

thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: Hector Chan <chanhp@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: More Timeout on the ftpd_tcp.debug
Date: Tue, 7 Mar 2006 21:13:52 +0000 (UTC)
Lines: 31
Distribution: su
Message-ID: <dukt2g$1q0$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10707

Hi TA,

In the project description, it says, "If the timeout for a segment is reached, 
the segment is examined. If it has been reached a total of 6 times (once from
the original send plus 5 retransmissions), then the network is assumed to have
failed..."  Does this mean that I should assume the network failed after a
total of 6 transmissions on a single segment?  


It seems to me the reference/debugging ftpd_tcp.debug server assumes the 
network failed if there are a total of 5 aggregate retransmissions.  The
following is an excerpt of the output log from the reference ftpd_tcp.debug
server. 


  current time:  (sd=0) 1141765083.866 ms
  ***timed out: seq # 7814 (sd=0, 3 timeout(s), next timeout 538 ms)***
  segment timer:  (sd=0) 1141765083.834 ms
  ***timed out: seq # 8302 (sd=0, 1 timeout(s), next timeout 538 ms)***
  segment timer:  (sd=0) 1141765083.835 ms
  ***timed out: seq # 8838 (sd=0, 1 timeout(s), next timeout 538 ms)***
  segment timer:  (sd=0) 1141765083.861 ms
****retransmitting segments****
cancel: -1 (heap size 3)
_network_recv_packet peer:  171.64.15.152:40586
_send_segment windows (sd=0)
  send: last_byte_sent = 10885, last_byte_acked = 7813, last_byte_written = 10885
  recv: next_byte_expected = 76, last_byte_read = 75, last_byte_received = 75
  advertised recv wnd = 3072
*********segment retransmission limit reached
exiting control loop(0)
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 3C - which ftpcopy?
Date: Tue, 07 Mar 2006 14:10:14 -0800
Lines: 35
Distribution: su
Message-ID: <dul0cf$6j7$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603062234490.26430-100000@elaine20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603062234490.26430-100000@elaine20.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10708

Miguel Sanchez wrote:
> 	so let me double check, we want to get our ftpcopy from
> HW1, but if we run into problems, we can just use the default
> implementation of ftcopy WITHOUT ANY POINTS BEING LOST?

yes

> 
>    Running the 3C tests with my transport.c but the default ftpcopy
> succeeds? Am I done?

probably

> 
>    I'm so sleep deprived that I'm not even sure that the deliverable is
> for 3C :-)

it's ok

> 
>   Related question, I would just submit with
> 
> /afs/ir/class/cs244a/bin/submit.pl hw3.C arigreen
> 
> I haven't changed the Makefile since I'm using the default implementation.
> This would just submit my transport.c?

yep

> 
> thanks,
> 
> - Miguel
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: style points.. using given ftp
Date: Tue, 07 Mar 2006 14:10:52 -0800
Lines: 12
Distribution: su
Message-ID: <dul0dk$6j7$2@news.Stanford.EDU>
References: <dukst7$2c9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dukst7$2c9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10709

Forum Mangal Parmar wrote:
> hi,
> 
> for pa 3c will we pe penalized for using the given ftp client in style 
> grading?
> 
> thanks
> Forum 
> 
> 

no
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: More Timeout on the ftpd_tcp.debug
Date: Tue, 07 Mar 2006 14:12:25 -0800
Lines: 38
Distribution: su
Message-ID: <dul0gh$6j7$3@news.Stanford.EDU>
References: <dukt2g$1q0$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dukt2g$1q0$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10710

Hector Chan wrote:
> Hi TA,
> 
> In the project description, it says, "If the timeout for a segment is reached, 
> the segment is examined. If it has been reached a total of 6 times (once from
> the original send plus 5 retransmissions), then the network is assumed to have
> failed..."  Does this mean that I should assume the network failed after a
> total of 6 transmissions on a single segment?  

yes, that's what the grading script checks for

> 
> 
> It seems to me the reference/debugging ftpd_tcp.debug server assumes the 
> network failed if there are a total of 5 aggregate retransmissions.  The
> following is an excerpt of the output log from the reference ftpd_tcp.debug
> server. 

possibly a bug in the reference code

> 
> 
>   current time:  (sd=0) 1141765083.866 ms
>   ***timed out: seq # 7814 (sd=0, 3 timeout(s), next timeout 538 ms)***
>   segment timer:  (sd=0) 1141765083.834 ms
>   ***timed out: seq # 8302 (sd=0, 1 timeout(s), next timeout 538 ms)***
>   segment timer:  (sd=0) 1141765083.835 ms
>   ***timed out: seq # 8838 (sd=0, 1 timeout(s), next timeout 538 ms)***
>   segment timer:  (sd=0) 1141765083.861 ms
> ****retransmitting segments****
> cancel: -1 (heap size 3)
> _network_recv_packet peer:  171.64.15.152:40586
> _send_segment windows (sd=0)
>   send: last_byte_sent = 10885, last_byte_acked = 7813, last_byte_written = 10885
>   recv: next_byte_expected = 76, last_byte_read = 75, last_byte_received = 75
>   advertised recv wnd = 3072
> *********segment retransmission limit reached
> exiting control loop(0)
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FIN packets and data
Date: Tue, 07 Mar 2006 14:16:09 -0800
Lines: 40
Distribution: su
Message-ID: <dul0ni$73j$1@news.Stanford.EDU>
References: <duduqf$aar$1@news.Stanford.EDU> <due3fm$e71$1@news.Stanford.EDU> <duiggf$90b$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duiggf$90b$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10711

Peter Lee wrote:
> What happens to the data already in the receive buffer when a FIN is 
> received?  Is it all processed before the FIN is processed?  Or should the 
> FIN be handled right away?  I.e. should the FIN be buffered and handled in 
> due turn.
> 
not sure what you mean by processed.  you shouldn't call 
stcp_fin_received until all data has been passed to the app.

> Also, I have been assuming that when incoming network data overlaps in 
> sequence numbers with data that's already buffered in my receive window, I 
> just keep whatever's already in the window.  For tests 2.E, 2.F, could it be 
> possible that I should actually be _replacing_ the overlapping parts?

no, not possible, it's ok to keep the previous data

> 
> Thanks a lot,
> Peter
> 


> 
> 
> "Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
> news:due3fm$e71$1@news.Stanford.EDU...
> 
>>Bruce Schechter wrote:
>>
>>>I know that a FIN packet may also have a data payload.  But could the 
>>>sender of the FIN ever send any additional data (with sequence numbers 
>>>higher than the ending sequence of the FIN packet) afterward?   I dont 
>>>think so, but want to be sure.
>>>
>>>Thanks, Bruce
>>
>>Nope, FIN means sender is done sending data. 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test scripts
Date: Tue, 07 Mar 2006 14:23:41 -0800
Lines: 33
Distribution: su
Message-ID: <dul15m$7kc$1@news.Stanford.EDU>
References: <duihk6$a0u$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duihk6$a0u$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10712

Surendra Kumar wrote:
> #Part B
> 
> 2.B
> I see that the script timesout after 60secs.
> I see that my server had transmitted about ~95K  when the script timed 
> out. Is it implicit that we limit our upperbound on the KP-backoff to a 
> low-value, (... hence finish the test in 60secs ?)
> I see that with about 1sec upperbound, my server can do 0.5MB in about a 
> min. Is this reasoning correct ? [The same server, obviosuly does 0.5MB 
> in < 4secs.]
> 

Hmm, it is possible.  If it helps you pass the tests, put an upperbound 
on RTO.

> 2.C
> I see that the ref.server sends two SYN_ACKs with two different seq. nos.
> ---@client---
>          0 : rx NET  20b; s:125 a:52; flags 0x12
> <conn-ESTABLISHED and later client sends some data to server which is
> acked by srvr. But server sends a another SYN_ACK>
>          0 : rx NET  20b; s:126 a:52; flags 0x12
> ---
> Client keeps acking only 126 (for SYN_ACK/125) but server keeps sending 
> the second SYN_ACK ...the script eventually timesout after 60secs!
> I thought the cilent should drop the second SYN_ACK ?

Yeah you should drop the second SYN_ACK, I've never seen this happen. 
How exactly are you running this?

> 
> Surendra.
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: which ftpcopy does test script use?
Date: Tue, 07 Mar 2006 15:43:22 -0800
Lines: 18
Distribution: su
Message-ID: <dul5qt$d4n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10713

1.How do we specify which ftpcopy the test script should use? If I just 
pass transport.c to the script, naturally it should use the reference 
ftpcopy, correct? And if I pass transport.c plus the *.c and *.h files 
relevant to my ftpcopy + the modified Makefile, does it then know that 
it should use my ftpcopy?

2. Is changing the following line in the Makefile sufficient for having 
the test script use my ftpcopy?

FTPCOPY_SRCS = #put your sources here

3. To test with the reference ftpcopy, is the following command sufficient?

/afs/ir/class/cs244a/bin/test_code.pl hw3c transport.c



Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: data with syn or syn/ack packets
Date: Tue, 7 Mar 2006 16:30:14 -0800
Lines: 11
Distribution: su
Message-ID: <dul8in$gjn$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10714

hi,

this may hv been answered before but just wanted to confirm :

for pa 3c/4 is the stcp supposed to handle incoming data in the first 2 
packets of the syn handshake -> syn or syn/ack ?

thanks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: data with syn or syn/ack packets
Date: Tue, 07 Mar 2006 16:36:50 -0800
Lines: 14
Distribution: su
Message-ID: <dul8va$gu5$1@news.Stanford.EDU>
References: <dul8in$gjn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dul8in$gjn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10715

Forum Mangal Parmar wrote:
> hi,
> 
> this may hv been answered before but just wanted to confirm :
> 
> for pa 3c/4 is the stcp supposed to handle incoming data in the first 2 
> packets of the syn handshake -> syn or syn/ack ?
> 
> thanks
> Forum 
> 
> 

no, don't need to handle data in packets with SYN set
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: which ftpcopy does test script use?
Date: Tue, 07 Mar 2006 16:39:36 -0800
Lines: 21
Distribution: su
Message-ID: <dul94h$gu5$2@news.Stanford.EDU>
References: <dul5qt$d4n$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dul5qt$d4n$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10716

Naeim Semsarilar wrote:
> 1.How do we specify which ftpcopy the test script should use? If I just 
> pass transport.c to the script, naturally it should use the reference 
> ftpcopy, correct? And if I pass transport.c plus the *.c and *.h files 
> relevant to my ftpcopy + the modified Makefile, does it then know that 
> it should use my ftpcopy?
> 
> 2. Is changing the following line in the Makefile sufficient for having 
> the test script use my ftpcopy?
> 
> FTPCOPY_SRCS = #put your sources here
> 
> 3. To test with the reference ftpcopy, is the following command sufficient?
> 
> /afs/ir/class/cs244a/bin/test_code.pl hw3c transport.c
> 
> 

yes to all your questions
> 
> Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: HW4: which components do you provide binaries for
Date: Tue, 7 Mar 2006 16:43:45 -0800
Lines: 4
Distribution: su
Message-ID: <dul9bo$hgk$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10717

For hw4, which components would you provide binaries for? ftpcopy, sr, and
stcp? Or only ftpcopy and sr? Thanks!


.

Path: shelby.stanford.edu!not-for-mail
From: Surendra Kumar <surendra@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: test scripts
Date: Tue, 07 Mar 2006 17:46:20 -0800
Lines: 35
Distribution: su
Message-ID: <440E376C.4090108@stanford.edu>
References: <duihk6$a0u$1@news.Stanford.EDU> <dul15m$7kc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
To: Matt Falkenhagen <mjf@stanford.edu>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
In-Reply-To: <dul15m$7kc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10718


> 
>> 2.C
>> I see that the ref.server sends two SYN_ACKs with two different seq. nos.
>> ---@client---
>>          0 : rx NET  20b; s:125 a:52; flags 0x12
>> <conn-ESTABLISHED and later client sends some data to server which is
>> acked by srvr. But server sends a another SYN_ACK>
>>          0 : rx NET  20b; s:126 a:52; flags 0x12
>> ---
>> Client keeps acking only 126 (for SYN_ACK/125) but server keeps 
>> sending the second SYN_ACK ...the script eventually timesout after 
>> 60secs!
>> I thought the cilent should drop the second SYN_ACK ?
> 
> 
> Yeah you should drop the second SYN_ACK, I've never seen this happen. 
> How exactly are you running this?
> 
This is a bug in the provided code.
If the server happens to retransmit the SYN_ACK (because the net 
dropped ...) it sends a new seq for SYN, causing  2.C to fail.
Dropping it is the right thing to do as SYN should not take two 
spaces. However, the server locks up in this loop and retransmts 5 
times and givesup. I'm hoping you guys will fix this before grading :)
[When the server does not resend SYN_ACK, i've passed 2.C]

Another bug I saw was with 2.E. - bad sender
For one of the packets, the S43,L480 one, stcp_network_recv() only 
return 477bytes!! Causes a 3byte hole in the window and the subsequent 
segs just pileup in the window and are never sent to the app. This is 
very consistent, 7 causes 2.E to fail.

Surendra.
PS: I've alerted Ari over this and put a NOTE in my readme.
.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ACK number on retransmission
Date: Tue, 7 Mar 2006 18:06:47 -0800
Lines: 23
Distribution: su
Message-ID: <Pine.GSO.4.44.0603071758160.23008-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10719

Need a clarification on the Ack number behaviour for retransmitted
segments.

Suppose we (Peer1) send a good (i.e. correct) segment S1 of 100 bytes from
Peer1 to Peer2 with the following fields:
S1.seq_num = 100, S1.ack_num = 300, ....

At this point we queue S1 onto the retransmission queue.
Now we receive 100 bytes of data from Peer2 which we acknowledge with  a
0 data segment, S2:
S2.seq_num = 200, S2.ack_num = 400, [no other data since this is an ACK
only].

The 100 bytes of data did not acknowledge S1. Nothing happens until S1
times out, so we need to retransmit S1. At this point:
S1.seq_num = 100  /* Should not change */

But what should the ack_num be here? Originally it was 300, but then we
got 100 more bytes. Should the ack_num be 400 or should it remain 300?

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: About go back N
Date: Tue, 7 Mar 2006 18:38:27 -0800
Lines: 18
Distribution: su
Message-ID: <dulg35$p7q$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10720

Hi,

In my implementation for C, I decided not to penalise a packet if it is 
retransmitted due to a go back N and hasn't actually timed out itself, that 
means, its number of transmissions is increment only when it actually times 
out, and not for every time it is actually transmitted. This lets 3c work 
fine, but 3b Test  K fails, because the packet may be retransmitted more 
than 5 times. So I was wondering it this is okay, and whether only tests for 
3c will be checked for 3c, or if scripts for all versions (a,b,c) will be 
run to check 3c. Basically what I want to know is my code should penalise a 
packet every time it is transmitted, whether it actually timed out or not, 
or if it should only be counted as "retransmitted" if timed out and needed 
to be retransmitted.

Thanks
Nazia 


.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Timeouts in the test script for 3.C
Date: Tue, 7 Mar 2006 18:40:22 -0800
Lines: 26
Distribution: su
Message-ID: <Pine.GSO.4.44.0603071825210.24599-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10721

Wanted to understand how the timeouts in the test scripts can affect us:
1. I had a case today once where the ftpd_tcp timed out and terminated the
control connection. The transfer logs showed that in fact the client had
not got any of the control messages. The net effect though was that of an
aborted transfer. If this were to happen when the test script were
running, would you re-run that specific test?

2. Does the test script put an absolute bound on how long file transfers
take, or does it monitor activity. Once today after quite a few successful
runs on the same copy of the code, the test script reported a timeout and
some failed tests.

Since then, I saw that the last ACK of the 4 way teardown is getting lost
quite often. In a file transfer, the client requests for a data
connection that the server closes once a given file transfer is complete.
The client acknowledges, and then sends its own FIN once it gets all the
data. The server acknowledges the FIN and ends its side of the connection.
However the server ACK is getting lost, so the client retransmits its FIN
5 times before tearing its end of the connection down.

If this happens many times, then the total time taken for the file
transfer is increased quite a lot. Could this make the test scripts
declare a timeout on the test, and make us fail the test?

--Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW4: which components do you provide binaries for
Date: Tue, 07 Mar 2006 19:15:28 -0800
Lines: 9
Distribution: su
Message-ID: <dulieu$rmt$1@news.Stanford.EDU>
References: <dul9bo$hgk$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dul9bo$hgk$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10722

All 3.

Ari

Robbie Yan wrote:
> For hw4, which components would you provide binaries for? ftpcopy, sr, and
> stcp? Or only ftpcopy and sr? Thanks!
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: John Gregorski <jfg@elaine29.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Timeouts in the test script for 3.C
Date: 07 Mar 2006 19:54:30 -0800
Organization: Stanford University, CA, USA
Lines: 34
Distribution: su
Message-ID: <ynlohd69oakp.fsf@elaine29.Stanford.EDU>
References: <Pine.GSO.4.44.0603071825210.24599-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
Xref: shelby.stanford.edu su.class.cs244a:10723

Dinkar Gupta <dinkarg@stanford.edu> writes:

I had the same problem #2. I fixed it by checking the return value of
stcp_network_send, which should return -1 in this case, and closing the
connection. In reality a network layer doesn't offer this functionality,
but I'm assuming this is what we should do? After this change I passed
most of the tests.


> Wanted to understand how the timeouts in the test scripts can affect us:
> 1. I had a case today once where the ftpd_tcp timed out and terminated the
> control connection. The transfer logs showed that in fact the client had
> not got any of the control messages. The net effect though was that of an
> aborted transfer. If this were to happen when the test script were
> running, would you re-run that specific test?
> 
> 2. Does the test script put an absolute bound on how long file transfers
> take, or does it monitor activity. Once today after quite a few successful
> runs on the same copy of the code, the test script reported a timeout and
> some failed tests.
> 
> Since then, I saw that the last ACK of the 4 way teardown is getting lost
> quite often. In a file transfer, the client requests for a data
> connection that the server closes once a given file transfer is complete.
> The client acknowledges, and then sends its own FIN once it gets all the
> data. The server acknowledges the FIN and ends its side of the connection.
> However the server ACK is getting lost, so the client retransmits its FIN
> 5 times before tearing its end of the connection down.
> 
> If this happens many times, then the total time taken for the file
> transfer is increased quite a lot. Could this make the test scripts
> declare a timeout on the test, and make us fail the test?
> 
> --Dinkar.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ACK number on retransmission
Date: Tue, 07 Mar 2006 19:53:33 -0800
Lines: 29
Distribution: su
Message-ID: <dulkmd$m9$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603071758160.23008-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603071758160.23008-100000@elaine7.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10724

You should set ack_num to 400 in this case because that is the next byte 
you are expecting (now).

Ari

Dinkar Gupta wrote:
> Need a clarification on the Ack number behaviour for retransmitted
> segments.
> 
> Suppose we (Peer1) send a good (i.e. correct) segment S1 of 100 bytes from
> Peer1 to Peer2 with the following fields:
> S1.seq_num = 100, S1.ack_num = 300, ....
> 
> At this point we queue S1 onto the retransmission queue.
> Now we receive 100 bytes of data from Peer2 which we acknowledge with  a
> 0 data segment, S2:
> S2.seq_num = 200, S2.ack_num = 400, [no other data since this is an ACK
> only].
> 
> The 100 bytes of data did not acknowledge S1. Nothing happens until S1
> times out, so we need to retransmit S1. At this point:
> S1.seq_num = 100  /* Should not change */
> 
> But what should the ack_num be here? Originally it was 300, but then we
> got 100 more bytes. Should the ack_num be 400 or should it remain 300?
> 
> Thanks,
> Dinkar.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: About go back N
Date: Tue, 07 Mar 2006 19:55:09 -0800
Lines: 26
Distribution: su
Message-ID: <dulkpb$m9$2@news.Stanford.EDU>
References: <dulg35$p7q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dulg35$p7q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10725

You should penalize a packet every time it is transmitted, regardless of 
whether it actually timed out or not.

For milestone 3c we will only be running the tests for C.

Ari

Nazia Zaman wrote:
> Hi,
> 
> In my implementation for C, I decided not to penalise a packet if it is 
> retransmitted due to a go back N and hasn't actually timed out itself, that 
> means, its number of transmissions is increment only when it actually times 
> out, and not for every time it is actually transmitted. This lets 3c work 
> fine, but 3b Test  K fails, because the packet may be retransmitted more 
> than 5 times. So I was wondering it this is okay, and whether only tests for 
> 3c will be checked for 3c, or if scripts for all versions (a,b,c) will be 
> run to check 3c. Basically what I want to know is my code should penalise a 
> packet every time it is transmitted, whether it actually timed out or not, 
> or if it should only be counted as "retransmitted" if timed out and needed 
> to be retransmitted.
> 
> Thanks
> Nazia 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: passive connection listening
Date: Tue, 07 Mar 2006 20:25:16 -0800
Lines: 13
Distribution: su
Message-ID: <dulmbd$2h8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10726

I'm just going through my code checking for edge cases and i have 2 
questions.

For a passive connection that is listening for a SYN.

1)Should the connection ever time out, or do we wait indefinitely for a SYN?

2)What do we do if the first packet the pasv connection receives is not 
a SYN packet?  Ignore and wait again? Or just close the connection?


Thanks,
Will
.

Path: shelby.stanford.edu!not-for-mail
From: John Gregorski <jfg@elaine29.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Bizzare problem with 3C: LIST
Date: 07 Mar 2006 20:32:12 -0800
Organization: Stanford University, CA, USA
Lines: 53
Distribution: su
Message-ID: <ynlobqwho8tv.fsf@elaine29.Stanford.EDU>
References: <dui9na$116$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
Xref: shelby.stanford.edu su.class.cs244a:10727

"Robbie Yan" <xyan@stanford.edu> writes:

It sounds from your description that the client is trying to read the 226
before accepting. It should accept the data connection and download the
data before reading the 226 (and after reading the 150). But I would
assume the reference ftpcopy does this, and I don't see how your ftpcopy
could have passed hw1, so I don't know ...

> Hi,
> 
> My code passes all tests in the test script for 3B. But it fails most tests
> in the test script for 3C. For the first test in 3C, for instance, client
> gets stuck and the final output is this:
> 
> Incorrect program status code -1 (exit code 16777215).  Program output:
> ***Timeout expired during grading
> 
> I have been trying to trace the problem for like 2 days. I tested my TCP
> code with both the reference ftpcopy program and my own program, and found
> that the following seems to be occurring for both ftpcopy programs:
> 
> - FTP client sends a bunch of commands (USER, PASS etc.) to the server and
> the server responds. Everything is cool.
> - FTP client wants to send LIST command. Before doing so, it sets up a data
> socket and calls mylisten() on it.
> - Then, FTP client sends the LIST command. Server sends back one-line
> response "150 Opening ASCII mode data connection for /bin/ls." The client
> reads this.
> - Somehow, FTP server then sends "226 Transfer complete." The client calls
> myread() to read this response but never returns.
> - In the meantime, actual data (with file names and dates etc.) in response
> to LIST command arrive on the data socket. But since client never returns
> from the myread() call, it never gets a chance to call myaccept() and
> myread() on the data socket.
> 
> I printed out all the packets in response to LIST command that arrived on
> the data socket and found that these packets contained all phases of a TCP
> connection: SYN, ACK, and FIN. So eventually, when my TCP code received the
> FIN packet, it called stcp_fin_received(). Of course, since the client was
> stuck at myread(), it never got a chance to call myaccept() and myread() on
> the data socket to process any of these.
> 
> This problem seems related to a post titled "Application not closing" by
> Arun Penmetsa before. I checked my code to ensure that whenever
> APP_CLOSE_REQUESTED is received, I immediately send out a FIN. Moreover, I
> feel that the problem is not in the way how I handle events, since myread()
> does not even return!
> 
> I have been pulling my hair out over this problem for 2 days. If anybody
> could offer any suggestions on what might be causing the problem, I would
> really appreciate it. Thank you so much  in advance!
> 
> Robbie
.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Sequence number wrap-around
Date: Tue, 7 Mar 2006 23:04:21 -0600
Lines: 14
Distribution: su
Message-ID: <dulokn$4jk$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10728

Hello...

My stcp implementation assumes that its peers sequence number doesn't wrap 
around.  Obviously, this works fine for hw3 since STCP is guaranteed to 
start with a low sequence number.

For hw4, is this something that I will need to fix or does some "magic" in 
the provided infrastructure hide this issue?

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: "Peter Lee" <ptrlee@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftpd signal 27
Date: Tue, 7 Mar 2006 21:34:43 -0800
Lines: 148
Distribution: su
Message-ID: <dulqdk$6a8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_01AA_01C6422E.F2E87FD0"
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10729

This is a multi-part message in MIME format.

------=_NextPart_000_01AA_01C6422E.F2E87FD0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm getting the handshake set up correctly -- but what's supposed to =
happen next?  From the ftpd_tcp.debug version, it looks like once the =
connection is established, it just closes the socket again and exits.  =
From the output from myclose, it looks like the socket gets shut =
completely (why do we close the socket?) and then I get signal 27.

Has anyone else seen this?

I've tried both the included ftpcopy as well as porting my code and get =
the same output:

Thanks for the help,
Peter

----------------------------------------

_send_packet (sd=3D1) seq # 30 ack # 140: SYN ACK  0 byte payload
_network_send_packet peer:  171.64.15.67:57940
queue (sd=3D1): 1 entries
  (sd=3D1) 1141792779.347 ms
  ***queue entry: seq # 30 (sd=3D1, 0 timeout(s), next timeout 500 =
ms)***

  current time:  (sd=3D1) 1141792778.847 ms
control loop state (sd=3D1): SYN_RCVD
  wait_for_event with timeout at 1141792779:347145000 secs
>>> Control Socket: 0
_network_recv_packet peer:  171.64.15.67:57940
transport_sock_io windows (sd=3D1)
  send: last_byte_sent =3D 30, last_byte_acked =3D 29, last_byte_written =
=3D 30
  recv: next_byte_expected =3D 140, last_byte_read =3D 139, =
last_byte_received =3D 139
  advertised recv wnd =3D 3072
_recv_packet (sd=3D1) seq # 140 ack # 31: ACK  0 byte payload
  (rcvd packet th_win=3D3072)
completed SYN handshake
segment transmission count=3D1
sample RTT: 95 ms, estimated RTT: 219 ms
cancel: 0 (heap size 1)
queue (sd=3D1): 0 entries

control loop state (sd=3D1): ESTABLISHED
  wait_for_event with infinite timeout
dequeueing established connection from 171.64.15.67:57940
***myaccept(0) returning new sd 1***
***myclose(0)***
stopping receive thread
stopped receive thread
socket network layer, closing socket 3
myclose(0) returning...
connected to 171.64.15.67 at port 57940
exiting on signal 27
[2]    Abort                         =
/usr/class/cs244a/WWW/homeworks/hw3/ftpd_src/ftpd_tcp.debug

------=_NextPart_000_01AA_01C6422E.F2E87FD0
Content-Type: text/html;
	charset="iso-8859-1"
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=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I'm getting the handshake set up =
correctly -- but=20
what's supposed to happen next?  From the ftpd_tcp.debug version, =
it looks=20
like once the connection is established, it just closes the socket again =
and=20
exits.  From the output from myclose, it looks like the socket gets =
shut=20
completely (why do we close the socket?) and then I get signal =
27.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Has anyone else seen this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I've tried both the included ftpcopy as =
well as=20
porting my code and get the same output:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for the help,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Peter</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2>----------------------------------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>_send_packet (sd=3D1) seq # 30 =
ack # 140: SYN=20
ACK  0 byte payload<BR>_network_send_packet peer: =20
171.64.15.67:57940<BR>queue (sd=3D1): 1 entries<BR>  (sd=3D1) =
1141792779.347=20
ms<BR>  ***queue entry: seq # 30 (sd=3D1, 0 timeout(s), next =
timeout 500=20
ms)***</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>  current time:  =
(sd=3D1)=20
1141792778.847 ms<BR>control loop state (sd=3D1): SYN_RCVD<BR> =20
wait_for_event with timeout at 1141792779:347145000 secs<BR>>>> =
Control=20
Socket: 0<BR>_network_recv_packet peer: =20
171.64.15.67:57940<BR>transport_sock_io windows (sd=3D1)<BR>  send: =

last_byte_sent =3D 30, last_byte_acked =3D 29, last_byte_written =3D =
30<BR> =20
recv: next_byte_expected =3D 140, last_byte_read =3D 139, =
last_byte_received =3D=20
139<BR>  advertised recv wnd =3D 3072<BR>_recv_packet (sd=3D1) seq =
# 140 ack #=20
31: ACK  0 byte payload<BR>  (rcvd packet =
th_win=3D3072)<BR>completed=20
SYN handshake<BR>segment transmission count=3D1<BR>sample RTT: 95 ms, =
estimated=20
RTT: 219 ms<BR>cancel: 0 (heap size 1)<BR>queue (sd=3D1): 0 =
entries</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>control loop state (sd=3D1):=20
ESTABLISHED<BR>  wait_for_event with infinite timeout<BR>dequeueing =

established connection from 171.64.15.67:57940<BR>***myaccept(0) =
returning new=20
sd 1***<BR>***myclose(0)***<BR>stopping receive thread<BR>stopped =
receive=20
thread<BR>socket network layer, closing socket 3<BR>myclose(0)=20
returning...<BR>connected to 171.64.15.67 at port 57940<BR>exiting on =
signal=20
27<BR>[2]   =20
Abort           &n=
bsp;           &nb=
sp;=20
/usr/class/cs244a/WWW/homeworks/hw3/ftpd_src/ftpd_tcp.debug<BR></FONT></D=
IV></BODY></HTML>

------=_NextPart_000_01AA_01C6422E.F2E87FD0--

.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Stcp_network_send does not send everything
Date: Tue, 7 Mar 2006 22:13:37 -0800
Lines: 20
Distribution: su
Message-ID: <Pine.GSO.4.44.0603072209450.15787-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10730

Hi,

Is there really any need to check for the condition where STCP network
send does not send all the data we wanted to send i.e. say it sent only 16
of the requested 50 bytes?

My guess is that given that we code for an unreliable network, a packet
sent partially will either be:
1. Partially acknowledged by the peer and hence have its remaining part
sent out later.
2. Time out on the sender's end for lack of an ACK and be resent.

In either case, if it is retransmitted 5 times, the connection will be
closed.

So will we be deducted style points for not explicitly checking the return
value of stcp_network_send?

--Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: Gian-Paolo Musumeci <gdm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Connection initiation and a _tcp_io error
Date: Tue, 7 Mar 2006 22:42:38 -0800
Lines: 30
Distribution: su
Message-ID: <dulucq$5kj$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.5
Xref: shelby.stanford.edu su.class.cs244a:10731

When testing 3C I have been seeing very strange problems with session 
initiation.  The problem occurs as follows:

The active endpoint (AE) sends a SYN (say, seq=91 ack=0 flags=0x2) and 
transitions to SYN_SENT.  This packet arrives at the passive endpoint 
(PE), which replies with a SYN+ACK (seq=218 ack=92 flags=0x12) and 
transitions to SYN_RCVD.  This SYN+ACK arrives at the AE and an 
acknowledgement is sent (seq=92 ack=219 flags=0x10), so the AE 
transitions to ESTABLISHED, but the ACK is apparently lost as it never 
arrives at the PE.  Consequently, the PE attempts retransmission of the 
SYN+ACK segment, but this packet is lost; the second retransmission is 
successful.  This is all entirely normal.

However, when the PE (which is of course still in SYN_RCVD as it has 
not yet gotten an ACK) calls stcp_wait_for_event, something extremely 
strange happens.  The next call to stcp_wait_for_event() generates the 
following error messages:
  _tcp_io rc: -1
  couldn't read packet: -1
  _network_recv_packet interrupted, errno=14
and no more packets are ever received by the PE.  The retransmission 
timer does continue to fire, so SYN+ACKs continue to be sent to the AE 
(which continues to acknowledge them); as the PE's transport layer does 
not actually receive them, the retransmission limit is hit and the 
session is dropped.

I can reliably get this to occur with my FTP client, but the 
TA-provided one works just fine.  Has anyone ever seen this before?  
/gdm

.

Path: shelby.stanford.edu!not-for-mail
From: "Peter Lee" <ptrlee@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpd signal 27
Date: Tue, 7 Mar 2006 23:02:47 -0800
Lines: 77
Distribution: su
Message-ID: <dulvir$b90$1@news.Stanford.EDU>
References: <dulqdk$6a8$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10732

So it looks like signal 27 could either be

SIGTTOU (tty output)

or

SIGPROF (profiling timer expired)

neither of which I'm sure how to to debug.  Does anyone have suggestions on 
how I might debug the ftp server?

Alternatively, TA's: if I pass all of the tests in hw3a and fail only one of 
the randomized receive window boundary tests for part b, is it reasonable to 
assume that I should be able to run ftpcopy on top of my transport layer?

Thanks,
Peter



"Peter Lee" <ptrlee@stanford.edu> wrote in message 
news:dulqdk$6a8$1@news.Stanford.EDU...
I'm getting the handshake set up correctly -- but what's supposed to happen 
next?  From the ftpd_tcp.debug version, it looks like once the connection is 
established, it just closes the socket again and exits.  From the output 
from myclose, it looks like the socket gets shut completely (why do we close 
the socket?) and then I get signal 27.

Has anyone else seen this?

I've tried both the included ftpcopy as well as porting my code and get the 
same output:

Thanks for the help,
Peter

----------------------------------------

_send_packet (sd=1) seq # 30 ack # 140: SYN ACK  0 byte payload
_network_send_packet peer:  171.64.15.67:57940
queue (sd=1): 1 entries
  (sd=1) 1141792779.347 ms
  ***queue entry: seq # 30 (sd=1, 0 timeout(s), next timeout 500 ms)***

  current time:  (sd=1) 1141792778.847 ms
control loop state (sd=1): SYN_RCVD
  wait_for_event with timeout at 1141792779:347145000 secs
>>> Control Socket: 0
_network_recv_packet peer:  171.64.15.67:57940
transport_sock_io windows (sd=1)
  send: last_byte_sent = 30, last_byte_acked = 29, last_byte_written = 30
  recv: next_byte_expected = 140, last_byte_read = 139, last_byte_received = 
139
  advertised recv wnd = 3072
_recv_packet (sd=1) seq # 140 ack # 31: ACK  0 byte payload
  (rcvd packet th_win=3072)
completed SYN handshake
segment transmission count=1
sample RTT: 95 ms, estimated RTT: 219 ms
cancel: 0 (heap size 1)
queue (sd=1): 0 entries

control loop state (sd=1): ESTABLISHED
  wait_for_event with infinite timeout
dequeueing established connection from 171.64.15.67:57940
***myaccept(0) returning new sd 1***
***myclose(0)***
stopping receive thread
stopped receive thread
socket network layer, closing socket 3
myclose(0) returning...
connected to 171.64.15.67 at port 57940
exiting on signal 27
[2]    Abort 
/usr/class/cs244a/WWW/homeworks/hw3/ftpd_src/ftpd_tcp.debug 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: stcp network send CAN legally fail.
Date: Tue, 7 Mar 2006 23:15:28 -0800
Lines: 31
Distribution: su
Message-ID: <dum0an$bu3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10733

Consider this...:

Client                                  Server
-------                               ---------
Sends FIN  - >                  GETS FIN
                                    < - ACKS THE FIN

                                    < - SENDS A FIN

ACKS Server's FIN ->        (assume the ack dies in the unreliable mode
                                             and hence server never gets 
this)

(Client closes its end
immediately after sending
that last ack).
                                         Server time's out and retransmit's 
the ACK.(say 5 times)

now stcp_network_send will fail on each of those retransmissions.
(I'm still trying to think of any other such cases where that api can 
legally fail.)

So what is the expected course of action when stcp_network_send fails? . Can 
a TA or
anyone who knows reply?

thanks.
 


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: different behavior between my/auto tests
Date: Tue, 07 Mar 2006 23:21:07 -0800
Lines: 12
Distribution: su
Message-ID: <dum0l6$c61$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10734

I am using the reference ftpcopy.

When I run ftpd_tcp locally and connect to it with our.ftpcopy_tcp, it 
downloads files properly and exits gracefully.

When I run the automated tests of 3c, 50% of them fail. I don't think 
any file transfer whatsoever happens.

What do the automated tests do differently that I'm not reproducing in 
my manual tests?

Thanks for any shred of help in advance.
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp network send CAN legally fail.
Date: Tue, 07 Mar 2006 23:35:59 -0800
Lines: 38
Distribution: su
Message-ID: <dum1gu$ctc$1@news.Stanford.EDU>
References: <dum0an$bu3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dum0an$bu3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10735

I believe it was discussed earlier (perhaps over a week ago), that 
silently closing the connection is acceptable in this situation. 
(Obviously killing the entire process is not acceptable.)

-Will

Nikhil Raghavan wrote:
> Consider this...:
> 
> Client                                  Server
> -------                               ---------
> Sends FIN  - >                  GETS FIN
>                                     < - ACKS THE FIN
> 
>                                     < - SENDS A FIN
> 
> ACKS Server's FIN ->        (assume the ack dies in the unreliable mode
>                                              and hence server never gets 
> this)
> 
> (Client closes its end
> immediately after sending
> that last ack).
>                                          Server time's out and retransmit's 
> the ACK.(say 5 times)
> 
> now stcp_network_send will fail on each of those retransmissions.
> (I'm still trying to think of any other such cases where that api can 
> legally fail.)
> 
> So what is the expected course of action when stcp_network_send fails? . Can 
> a TA or
> anyone who knows reply?
> 
> thanks.
>  
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Gian-Paolo Musumeci <gdm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp network send CAN legally fail.
Date: Tue, 7 Mar 2006 23:39:38 -0800
Lines: 44
Distribution: su
Message-ID: <dum1nm$5kh$2@news.Stanford.EDU>
References: <dum0an$bu3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Unison/1.7.5
Xref: shelby.stanford.edu su.class.cs244a:10736

The situation you have described should not happen.  From the 
assignment:  "Whenever a SYN, data, or FIN segment (i.e. a STCP packet 
containing anything more than just an acknowledgement) is transmitted, 
a timeout is scheduled some milliseconds from the time of 
transmission."  So acknowledgements need never be retransmitted.

With that being said I think the server should be smart enough to know 
that if it's in LAST_ACK, has to retransmit its FIN, and either hits 
the retransmission timeout (or for real TCP gets a RST) the session is 
clearly over.

Just my thoughts; maybe a TA will say if I'm right or not.  :-)  /gdm

On 2006-03-07 23:15:28 -0800, "Nikhil Raghavan" <nikhilr@cs.stanford.edu> said:
> Consider this...:
> 
> Client                                  Server
> -------                               ---------
> Sends FIN  - >                  GETS FIN
>                                     < - ACKS THE FIN
> 
>                                     < - SENDS A FIN
> 
> ACKS Server's FIN ->        (assume the ack dies in the unreliable mode
>                                              and hence server never gets this)
> 
> (Client closes its end
> immediately after sending
> that last ack).
>                                          Server time's out and 
> retransmit's the ACK.(say 5 times)
> 
> now stcp_network_send will fail on each of those retransmissions.
> (I'm still trying to think of any other such cases where that api can 
> legally fail.)
> 
> So what is the expected course of action when stcp_network_send fails? 
> . Can a TA or
> anyone who knows reply?
> 
> thanks.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: STCP FIN
Date: Tue, 7 Mar 2006 23:51:37 -0800
Lines: 4
Distribution: su
Message-ID: <dum2e2$fbp$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10737

Can we assume that the given FTP server will not send FIN until it is
certain that all data packets have been received by the FTP client?


.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: STCP FIN
Date: Wed, 08 Mar 2006 00:08:38 -0800
Lines: 15
Distribution: su
Message-ID: <dum3e5$h0q$1@news.Stanford.EDU>
References: <dum2e2$fbp$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dum2e2$fbp$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10738

I was thinking of that same situation and came to the conclusion that 
even if we make that guarantee in our STCP sender, we can't make that 
assumption for the receiver given the RFC.  So I went ahead and 
implemented out-of-order FIN receiving.

That being said, this situation never occurred for me while testing and 
I was passing the tests even before implementing this.

-Will

Robbie Yan wrote:
> Can we assume that the given FTP server will not send FIN until it is
> certain that all data packets have been received by the FTP client?
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: different behavior between my/auto tests
Date: Wed, 08 Mar 2006 00:22:26 -0800
Lines: 18
Distribution: su
Message-ID: <dum485$ij1$1@news.Stanford.EDU>
References: <dum0l6$c61$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dum0l6$c61$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10739

I don't know what caused the discrepancy between manual / auto tests, 
but my problem was that I wasn't processing the payload in the SYN_RCVD 
state.


Naeim Semsarilar wrote:
> I am using the reference ftpcopy.
> 
> When I run ftpd_tcp locally and connect to it with our.ftpcopy_tcp, it 
> downloads files properly and exits gracefully.
> 
> When I run the automated tests of 3c, 50% of them fail. I don't think 
> any file transfer whatsoever happens.
> 
> What do the automated tests do differently that I'm not reproducing in 
> my manual tests?
> 
> Thanks for any shred of help in advance.
.

Path: shelby.stanford.edu!elaine7.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: different behavior between my/auto tests
Date: Wed, 8 Mar 2006 08:26:29 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 24
Distribution: su
Message-ID: <dum4fl$iqf$1@news.Stanford.EDU>
References: <dum0l6$c61$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10740

Are you using -U for your manual testing? This accounted 
for ~ 50% failures for me.

Note that you have to also implement -U in your own version of ftpcopy
(if you are not using the provided one). 

Oleg.

In article <dum0l6$c61$1@news.Stanford.EDU>,
Naeim Semsarilar  <naeim@stanford.edu> wrote:
>I am using the reference ftpcopy.
>
>When I run ftpd_tcp locally and connect to it with our.ftpcopy_tcp, it 
>downloads files properly and exits gracefully.
>
>When I run the automated tests of 3c, 50% of them fail. I don't think 
>any file transfer whatsoever happens.
>
>What do the automated tests do differently that I'm not reproducing in 
>my manual tests?
>
>Thanks for any shred of help in advance.


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: passive connection listening
Date: Wed, 08 Mar 2006 00:54:10 -0800
Lines: 21
Distribution: su
Message-ID: <dum63r$kaa$1@news.Stanford.EDU>
References: <dulmbd$2h8$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dulmbd$2h8$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10741

Will Palmeri wrote:
> I'm just going through my code checking for edge cases and i have 2 
> questions.
> 
> For a passive connection that is listening for a SYN.
> 
> 1)Should the connection ever time out, or do we wait indefinitely for a 
> SYN?

Either is fine, probably easier to wait indefinately.

> 
> 2)What do we do if the first packet the pasv connection receives is not 
> a SYN packet?  Ignore and wait again? Or just close the connection?
> 

Just ignore it.

> 
> Thanks,
> Will
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Sequence number wrap-around
Date: Wed, 08 Mar 2006 00:56:52 -0800
Lines: 21
Distribution: su
Message-ID: <dum68t$kaa$2@news.Stanford.EDU>
References: <dulokn$4jk$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dulokn$4jk$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10742

Roy Zeighami wrote:
> Hello...
> 
> My stcp implementation assumes that its peers sequence number doesn't wrap 
> around.  Obviously, this works fine for hw3 since STCP is guaranteed to 
> start with a low sequence number.
> 
> For hw4, is this something that I will need to fix or does some "magic" in 
> the provided infrastructure hide this issue?
> 

Not required to fix this.  However there is no magic in the 
infrastructure.  We will test hw4 by transfering quite small files so 
unless you are really unlucky you will pass the tests (and we will run 
multiple times, so you only fail if you consistently fail).

> Thanks,
> 
> Roy 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stcp_network_send does not send everything
Date: Wed, 08 Mar 2006 00:57:47 -0800
Lines: 25
Distribution: su
Message-ID: <dum6ak$kaa$3@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603072209450.15787-100000@elaine7.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603072209450.15787-100000@elaine7.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10743

Dinkar Gupta wrote:
> Hi,
> 
> Is there really any need to check for the condition where STCP network
> send does not send all the data we wanted to send i.e. say it sent only 16
> of the requested 50 bytes?
> 
> My guess is that given that we code for an unreliable network, a packet
> sent partially will either be:
> 1. Partially acknowledged by the peer and hence have its remaining part
> sent out later.
> 2. Time out on the sender's end for lack of an ACK and be resent.
> 
> In either case, if it is retransmitted 5 times, the connection will be
> closed.
> 
> So will we be deducted style points for not explicitly checking the return
> value of stcp_network_send?

Don't need to check for partial write (as it seems to check itself), but 
you should check for error (returns < 0).

> 
> --Dinkar.
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Connection initiation and a _tcp_io error
Date: Wed, 08 Mar 2006 01:30:33 -0800
Lines: 33
Distribution: su
Message-ID: <dum883$mbg$1@news.Stanford.EDU>
References: <dulucq$5kj$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dulucq$5kj$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10744

Gian-Paolo Musumeci wrote:
> When testing 3C I have been seeing very strange problems with session 
> initiation.  The problem occurs as follows:
> 
> The active endpoint (AE) sends a SYN (say, seq=91 ack=0 flags=0x2) and 
> transitions to SYN_SENT.  This packet arrives at the passive endpoint 
> (PE), which replies with a SYN+ACK (seq=218 ack=92 flags=0x12) and 
> transitions to SYN_RCVD.  This SYN+ACK arrives at the AE and an 
> acknowledgement is sent (seq=92 ack=219 flags=0x10), so the AE 
> transitions to ESTABLISHED, but the ACK is apparently lost as it never 
> arrives at the PE.  Consequently, the PE attempts retransmission of the 
> SYN+ACK segment, but this packet is lost; the second retransmission is 
> successful.  This is all entirely normal.
> 
> However, when the PE (which is of course still in SYN_RCVD as it has not 
> yet gotten an ACK) calls stcp_wait_for_event, something extremely 
> strange happens.  The next call to stcp_wait_for_event() generates the 
> following error messages:
>  _tcp_io rc: -1
>  couldn't read packet: -1
>  _network_recv_packet interrupted, errno=14
> and no more packets are ever received by the PE.  The retransmission 
> timer does continue to fire, so SYN+ACKs continue to be sent to the AE 
> (which continues to acknowledge them); as the PE's transport layer does 
> not actually receive them, the retransmission limit is hit and the 
> session is dropped.
> 
> I can reliably get this to occur with my FTP client, but the TA-provided 
> one works just fine.  Has anyone ever seen this before?  /gdm
> 

I have not seen this before.... anyone else?  Since it doesn't work with 
your FTP client, maybe you haven't properly called the stcp_api functions?
.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Strange behavior with ftpd_tcp
Date: Wed, 8 Mar 2006 01:34:36 -0800
Lines: 20
Distribution: su
Message-ID: <dum8f3$mej$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10745

When the test script is run, how is ftpd_tcp generated? Is it simply copied
from /usr/class/cs244a/WWW/homeworks/hw3/ftpd_src? Or is it somehow compiled
against our transport.c code?

The reason why I ask is the following:

When I tested my transport layer with the reference FTP client against
/usr/class/cs244a/WWW/homeworks/hw3/ftpd_src/ftpd_tcp, my code works fine.
When running the test script, however, half of my tests timed out. I noticed
that a ftpd_tcp was placed in my grading_script/build folder so I assumed
that this is the binary that the test script tested my FTP client against.
So I tested my transport layer with the reference FTP client against this
ftpd_tcp. And it simply timed out, identical to the behavior I was
experiencing while running the test script. Furthermore, I diff'ed ftpd_tcp
in the WWW/homeworks/... directory and this ftpd_tcp left by the test
script. They differ.

Can somebody tell me what I am missing here? Thanks a lot!


.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: different behavior between my/auto tests
Date: Wed, 8 Mar 2006 09:50:52 +0000 (UTC)
Lines: 19
Distribution: su
Message-ID: <dum9ds$p2c$1@news.Stanford.EDU>
References: <dum0l6$c61$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10746


I am also experiencing the same problem!  Any thoughts? anyone?
thanks,
Sam

Naeim Semsarilar <naeim@stanford.edu> wrote:

> I am using the reference ftpcopy.

> When I run ftpd_tcp locally and connect to it with our.ftpcopy_tcp, it 
> downloads files properly and exits gracefully.

> When I run the automated tests of 3c, 50% of them fail. I don't think 
> any file transfer whatsoever happens.

> What do the automated tests do differently that I'm not reproducing in 
> my manual tests?

> Thanks for any shred of help in advance.
.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw3b test script allowance
Date: Wed, 08 Mar 2006 02:32:10 -0800
Lines: 5
Distribution: su
Message-ID: <dumbrg$rfv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10747

In the spirit of it-never-hurts-to-ask, would it be possible to get the 
allowance of the test script for hw3b upped to 5 from 3?

Thanks,
Drew
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: hw3b test script allowance
Date: Wed, 08 Mar 2006 02:40:27 -0800
Lines: 8
Distribution: su
Message-ID: <dumcb4$rnq$1@news.Stanford.EDU>
References: <dumbrg$rfv$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dumbrg$rfv$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10748

Drew Willcoxon wrote:
> In the spirit of it-never-hurts-to-ask, would it be possible to get the 
> allowance of the test script for hw3b upped to 5 from 3?
> 
> Thanks,
> Drew

Sure.
.

Path: shelby.stanford.edu!not-for-mail
From: Josh Sandberg <jsandberg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Stuck in CLOSE-WAIT (no response to stcp_fin_received)
Date: Wed, 08 Mar 2006 03:25:10 -0800
Lines: 14
Distribution: su
Message-ID: <C033FF16.11193%jsandberg@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.1.0.040913
Xref: shelby.stanford.edu su.class.cs244a:10749

I'm testing now with the reference FTPcopy and the test server for Part C.
When I receive a FIN packet from the server I signal the event to the
application using stcp_fin_received(sd). Most times this works as expected,
the app sends a FIN in response, and life is good. However, on rare
occasions (every 50-100 connections) it makes the call to
stcp_fin_received(sd) and nothing ever happens: in particular, the app never
signals APP_CLOSE_REQUESTED, so it just sits there awaiting more packets
from the server. I'm pretty sure that I'm checking for APP_CLOSE_REQUESTED
events correctly, and I know that I'm making the fin_received() call, so I
was wondering if anyone else has seen this problem and knows what might be
going on?

--Josh

.

Path: shelby.stanford.edu!not-for-mail
From: Drew Willcoxon <drew.willcoxon@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Test 2.K, enforcing retransmissions
Date: Wed, 08 Mar 2006 03:40:28 -0800
Lines: 26
Distribution: su
Message-ID: <dumfre$12l$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10750

So I'm still trying to get test 2.K, "Checks that Tx enforces 5 
retransmissions," to work, and I'm not understanding the test script output:

--snip--

Test 2.K [out of 2.5]
Checks that Tx enforces 5 retransmissions.

Results:  NOT OK

Retransmission count of 5 not enforced
(Your code retransmitted sequence number 4293 up to 4 times)
Client output:

--snip--

"Up to 4 times" means no more than 4 times, right?  How is that 
exceeding 5 retransmissions?  (If it helps, originally I had my "max 
transmissions" constant set to 6.  In that case, the test script 
reported the same thing, but "up to 6 times," instead of 4.  So I tried 
lowering the constant to 5, and that produced the output above.)

And thanks, Matt, for the bump in test script allowance.

Thanks,
Drew
.

Path: shelby.stanford.edu!not-for-mail
From: Josh Sandberg <jsandberg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stuck in CLOSE-WAIT (no response to stcp_fin_received)
Date: Wed, 08 Mar 2006 04:34:08 -0800
Lines: 32
Distribution: su
Message-ID: <C0340F40.1119B%jsandberg@stanford.edu>
References: <C033FF16.11193%jsandberg@stanford.edu>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.1.0.040913
Xref: shelby.stanford.edu su.class.cs244a:10751

Nevermind, I found the problem here: as mentioned previously in the
newsgroup, I was using an if/else structure to check for flags in the return
from stcp_wait_for_event(), rather than checking for each of them
individually.

That said, I'm now having a different problem in Part B, test 2.C: I send my
FIN, get ACK'd, and then hang in FIN_WAIT_2 waiting for a FIN from the
server. Since this test is against the reference server, I'm not quite sure
how I could be screwing this up? Everything gets transferred correctly, I
just never get the final FIN from the server, so the test eventually times
out (and fails).

Any help is appreciated,

--Josh


> I'm testing now with the reference FTPcopy and the test server for Part C.
> When I receive a FIN packet from the server I signal the event to the
> application using stcp_fin_received(sd). Most times this works as expected,
> the app sends a FIN in response, and life is good. However, on rare
> occasions (every 50-100 connections) it makes the call to
> stcp_fin_received(sd) and nothing ever happens: in particular, the app never
> signals APP_CLOSE_REQUESTED, so it just sits there awaiting more packets
> from the server. I'm pretty sure that I'm checking for APP_CLOSE_REQUESTED
> events correctly, and I know that I'm making the fin_received() call, so I
> was wondering if anyone else has seen this problem and knows what might be
> going on?
> 
> --Josh
> 

.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: hw3c, Tests L.1,L.2..
Date: Wed, 8 Mar 2006 05:37:55 -0800
Lines: 15
Distribution: su
Message-ID: <dummnn$94f$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10752

hi ..
all except L.1 /2/3/4 pass.
These 4 tests return timeout expired during
grading.

I created a zero byte file and watched it transfer (using
the reference ftp solution and the ftpd_tcp..and it seems to
work alright (ive gone through the debug logs to see if im missing
something and dont seem to be missing anything).

Did someone run into something similar?

thanks. 


.

Path: shelby.stanford.edu!elaine10.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stcp_network_send does not send everything
Date: Wed, 8 Mar 2006 10:53:03 -0800
Lines: 36
Distribution: su
Message-ID: <Pine.GSO.4.44.0603081050410.19889-100000@elaine10.Stanford.EDU>
References: <Pine.GSO.4.44.0603072209450.15787-100000@elaine7.Stanford.EDU>
 <dum6ak$kaa$3@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dum6ak$kaa$3@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10753

What could we do on network send returning -1?  We will already be trying
to retransmit it, in which case if all retransmissions fail (and no acks
come back for it) we close the connection.  So the check seems unnecssary for network send,
right?

-wks

On Wed, 8 Mar 2006, Matt Falkenhagen wrote:

> Dinkar Gupta wrote:
> > Hi,
> >
> > Is there really any need to check for the condition where STCP network
> > send does not send all the data we wanted to send i.e. say it sent only 16
> > of the requested 50 bytes?
> >
> > My guess is that given that we code for an unreliable network, a packet
> > sent partially will either be:
> > 1. Partially acknowledged by the peer and hence have its remaining part
> > sent out later.
> > 2. Time out on the sender's end for lack of an ACK and be resent.
> >
> > In either case, if it is retransmitted 5 times, the connection will be
> > closed.
> >
> > So will we be deducted style points for not explicitly checking the return
> > value of stcp_network_send?
>
> Don't need to check for partial write (as it seems to check itself), but
> you should check for error (returns < 0).
>
> >
> > --Dinkar.
> >
>

.

Path: shelby.stanford.edu!elaine18.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stuck in CLOSE-WAIT (no response to stcp_fin_received)
Date: Wed, 8 Mar 2006 11:01:53 -0800
Lines: 24
Distribution: su
Message-ID: <Pine.GSO.4.44.0603081100390.28292-100000@elaine18.Stanford.EDU>
References: <C033FF16.11193%jsandberg@stanford.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <C033FF16.11193%jsandberg@stanford.edu>
Xref: shelby.stanford.edu su.class.cs244a:10754

I don't know the answer but its driving me crazy, specifially the
control connection never signals a close on either side, though all
other connections close properly.

-Megan

..On Wed, 8 Mar 2006, Josh Sandberg wrote:

> I'm testing now with the reference FTPcopy and the test server for Part C.
> When I receive a FIN packet from the server I signal the event to the
> application using stcp_fin_received(sd). Most times this works as expected,
> the app sends a FIN in response, and life is good. However, on rare
> occasions (every 50-100 connections) it makes the call to
> stcp_fin_received(sd) and nothing ever happens: in particular, the app never
> signals APP_CLOSE_REQUESTED, so it just sits there awaiting more packets
> from the server. I'm pretty sure that I'm checking for APP_CLOSE_REQUESTED
> events correctly, and I know that I'm making the fin_received() call, so I
> was wondering if anyone else has seen this problem and knows what might be
> going on?
>
> --Josh
>
>

.

Path: shelby.stanford.edu!elaine13.Stanford.EDU!ptrlee
From: Peter In Lee <ptrlee@elaine13.Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: SIGNAL 27
Date: Wed, 8 Mar 2006 12:02:59 -0800
Lines: 61
Distribution: su
Message-ID: <Pine.GSO.4.44.0603081147360.20285-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10755


Hi TA's,

So I've stepped through my code pretty carefully and actually found some
other stuff going on in my sender window that was a good bug to find.  But
I am still stuck on what signal 27 is supposed to mean.

Again, I can get to connection state ESTABLISHED on both the provided
ftpcopy_tcp and the ftpd_tcp.  I even changed my transport layer so that
once it reaches the ESTABLISHED state, it just busy waits.

In other words, I get myself to the ESTABLISHED state, the debug output
from ftpd_tcp tells me that it too is in the ESTABLISHED state, and is
happy with the SYN handshake, I do NOTHING on my side (don't look at any
of my buffers, don't send, don't look on the receive queue, _nothing_) and
the ftpd server still crashes.

Pardon my french, but WTF?  My understanding is that after the handshake,
either:

a) the server should start sending me something
b) the server is waiting for me to send it something

If a, then why would the server crash?  It says it's in a good state.  It
should just send away and I just never reply.

If b, then why would the server crash if I don't send it anything?  (my
busy waiting loop)

This leads me to believe that something is broken at a lower level --
something at the socket level.  Using gdb is kind of a crapshoot with all
of these threads, but it looks like the abort is happening somewhere in
one of the PTHREAD _cond_wait type calls in myattach.

Could I at least get a response as to whether it's possible for me to
break something at that level, and how I might be doing that?  (excepting
memory bounds errors -- which purify tells me I'm okay with)  I understand
about some forms of debugging help being out-of-bounds, but I'm coming
up against a wall here, and it's name is signal 27.

Thanks,
Peter


ftpd_tcp.debug output:
-----------------------------------------------------------

control loop state (sd=1): ESTABLISHED
  wait_for_event with infinite timeout
dequeueing established connection from 171.64.15.78:49287
***myaccept(0) returning new sd 1***
***myclose(0)***
stopping receive thread
stopped receive thread
socket network layer, closing socket 3
myclose(0) returning...
connected to 171.64.15.78 at port 49287
exiting on signal 27
[3]    Abort                         ./ftpd_tcp.debug


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: How test script checks output of the program
Date: Wed, 8 Mar 2006 12:47:00 -0800
Lines: 5
Distribution: su
Message-ID: <dunfrq$3cd$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10756

There is one test that checks to ensure that our program meets the UI
specification. I assume that the script is only checking stderr, but not
stdout, right?


.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: STCP FIN
Date: Wed, 08 Mar 2006 13:22:32 -0800
Lines: 22
Distribution: su
Message-ID: <dunhuq$5s0$1@news.Stanford.EDU>
References: <dum2e2$fbp$1@news.Stanford.EDU> <dum3e5$h0q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
In-Reply-To: <dum3e5$h0q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10757

Will Palmeri wrote:
> I was thinking of that same situation and came to the conclusion that 
> even if we make that guarantee in our STCP sender, we can't make that 
> assumption for the receiver given the RFC.  So I went ahead and 
> implemented out-of-order FIN receiving.
> 
> That being said, this situation never occurred for me while testing and 
> I was passing the tests even before implementing this.
> 

Some of tests timed out before I implemented this. ftpd will send FIN 
after sending all data, but you are not guaranteed to receive them in 
order. That's what happened to me.

> -Will
> 
> Robbie Yan wrote:
> 
>> Can we assume that the given FTP server will not send FIN until it is
>> certain that all data packets have been received by the FTP client?
>>
>>
.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert.NOSPAM@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: How test script checks output of the program
Date: Wed, 08 Mar 2006 13:29:50 -0800
Lines: 10
Distribution: su
Message-ID: <dunigu$6vd$1@news.Stanford.EDU>
References: <dunfrq$3cd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007)
X-Accept-Language: en-us, en
In-Reply-To: <dunfrq$3cd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10758

I'm not a TA, but I'd guess that it checks both.

~Daniel

Robbie Yan wrote:
 > There is one test that checks to ensure that our program meets the UI
 > specification. I assume that the script is only checking stderr, but not
 > stdout, right?
 >
 >
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Last minute question about FINs
Date: Wed, 08 Mar 2006 14:39:49 -0800
Lines: 13
Distribution: su
Message-ID: <dunmfr$d8q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10759

I've implemented exponential backoff such that if there's a timeout, 
next time the receiver waits twice as long for an ACK.

What's happening is that with ftpd_tcp, for some reason when the client 
is in the FIN_WAIT_1 state, the FIN it sent never gets ACKed, so after 6 
retransmissions, it just assumes the connection is over.

But now with exponential backoff, this means that by the 6th 
retransmission, the timeout is up to something like 12 seconds.

Is this okay? All the tests pass and everything.

Thanks!
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Last minute question about FINs
Date: Wed, 08 Mar 2006 14:53:54 -0800
Lines: 17
Distribution: su
Message-ID: <dunnac$e9m$1@news.Stanford.EDU>
References: <dunmfr$d8q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dunmfr$d8q$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10760

Naeim Semsarilar wrote:
> I've implemented exponential backoff such that if there's a timeout, 
> next time the receiver waits twice as long for an ACK.
> 
> What's happening is that with ftpd_tcp, for some reason when the client 
> is in the FIN_WAIT_1 state, the FIN it sent never gets ACKed, so after 6 
> retransmissions, it just assumes the connection is over.
> 
> But now with exponential backoff, this means that by the 6th 
> retransmission, the timeout is up to something like 12 seconds.
> 
> Is this okay? All the tests pass and everything.

If everything passes, we're all happy.

> 
> Thanks!
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Connection refused?
Date: Wed, 08 Mar 2006 14:59:18 -0800
Lines: 17
Distribution: su
Message-ID: <dunnkb$eii$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10761

I'm trying to run tests of part C one last time and I'm getting:

---
Test C [out of 4.5]
Checks that ftpcopy transfers at least one file.

Results:  NOT OK (passed only 0 out of 1 subtests)

Program output (localhost):
ERROR: Connection refused (-1)
---

Some other tests fail as well as a result. I haven't changed anything 
since the last time I ran the tests. Is a server down somewhere? If yes, 
can I please get reimbursed for this wasted test run?

Thanks.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: How test script checks output of the program
Date: Wed, 08 Mar 2006 15:19:37 -0800
Lines: 9
Distribution: su
Message-ID: <dunoqk$g8i$1@news.Stanford.EDU>
References: <dunfrq$3cd$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dunfrq$3cd$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10762

Robbie Yan wrote:
> There is one test that checks to ensure that our program meets the UI
> specification. I assume that the script is only checking stderr, but not
> stdout, right?
> 
> 

If you print to stderr, you'll be fine.  I don't know what it does with 
stdout.
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Stcp_network_send does not send everything
Date: Wed, 08 Mar 2006 15:19:37 -0800
Lines: 46
Distribution: su
Message-ID: <dunp0m$gad$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603072209450.15787-100000@elaine7.Stanford.EDU> <dum6ak$kaa$3@news.Stanford.EDU> <Pine.GSO.4.44.0603081050410.19889-100000@elaine10.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603081050410.19889-100000@elaine10.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10763

That's true. However, it would be simpler to just exit your transport 
layer as soon as you detect that stcp_network_send failed. In theory 
returning an error here would make your application easier to debug, as 
you would know that the packet never got sent onto the wire.

Ari

Wai Kei So wrote:
> What could we do on network send returning -1?  We will already be trying
> to retransmit it, in which case if all retransmissions fail (and no acks
> come back for it) we close the connection.  So the check seems unnecssary for network send,
> right?
> 
> -wks
> 
> On Wed, 8 Mar 2006, Matt Falkenhagen wrote:
> 
> 
>>Dinkar Gupta wrote:
>>
>>>Hi,
>>>
>>>Is there really any need to check for the condition where STCP network
>>>send does not send all the data we wanted to send i.e. say it sent only 16
>>>of the requested 50 bytes?
>>>
>>>My guess is that given that we code for an unreliable network, a packet
>>>sent partially will either be:
>>>1. Partially acknowledged by the peer and hence have its remaining part
>>>sent out later.
>>>2. Time out on the sender's end for lack of an ACK and be resent.
>>>
>>>In either case, if it is retransmitted 5 times, the connection will be
>>>closed.
>>>
>>>So will we be deducted style points for not explicitly checking the return
>>>value of stcp_network_send?
>>
>>Don't need to check for partial write (as it seems to check itself), but
>>you should check for error (returns < 0).
>>
>>
>>>--Dinkar.
>>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Test 2.K, enforcing retransmissions
Date: Wed, 08 Mar 2006 15:35:45 -0800
Lines: 32
Distribution: su
Message-ID: <dunpos$hl1$1@news.Stanford.EDU>
References: <dumfre$12l$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dumfre$12l$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10764

Drew Willcoxon wrote:
> So I'm still trying to get test 2.K, "Checks that Tx enforces 5 
> retransmissions," to work, and I'm not understanding the test script 
> output:
> 
> --snip--
> 
> Test 2.K [out of 2.5]
> Checks that Tx enforces 5 retransmissions.
> 
> Results:  NOT OK
> 
> Retransmission count of 5 not enforced
> (Your code retransmitted sequence number 4293 up to 4 times)
> Client output:
> 
> --snip--
> 
> "Up to 4 times" means no more than 4 times, right?  How is that 
> exceeding 5 retransmissions?  (If it helps, originally I had my "max 
> transmissions" constant set to 6.  In that case, the test script 
> reported the same thing, but "up to 6 times," instead of 4.  So I tried 
> lowering the constant to 5, and that produced the output above.)
> 
> And thanks, Matt, for the bump in test script allowance.
> 
> Thanks,
> Drew

It's looking for exactly 6 transmissions (5 retransmissions) before you 
die.  The first time it complained that you retransmitted 6 times, now 
it's claiming that you retransmitted 4 times.
.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert.NOSPAM@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: SIGNAL 27
Date: Wed, 08 Mar 2006 16:00:17 -0800
Lines: 70
Distribution: su
Message-ID: <dunrb1$jbt$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603081147360.20285-100000@elaine13.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603081147360.20285-100000@elaine13.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10765

I'm getting a signal 27 after the handshake as well, but only when I 
redirect my debug server output to a file, for some reason.  When I 
stream output to terminal (no redirection), I have other issues :)  but 
I don't even get far enough to see the other issues when I put my output 
in a file, because of the signal 27.

~Daniel


Peter In Lee wrote:
> Hi TA's,
> 
> So I've stepped through my code pretty carefully and actually found some
> other stuff going on in my sender window that was a good bug to find.  But
> I am still stuck on what signal 27 is supposed to mean.
> 
> Again, I can get to connection state ESTABLISHED on both the provided
> ftpcopy_tcp and the ftpd_tcp.  I even changed my transport layer so that
> once it reaches the ESTABLISHED state, it just busy waits.
> 
> In other words, I get myself to the ESTABLISHED state, the debug output
> from ftpd_tcp tells me that it too is in the ESTABLISHED state, and is
> happy with the SYN handshake, I do NOTHING on my side (don't look at any
> of my buffers, don't send, don't look on the receive queue, _nothing_) and
> the ftpd server still crashes.
> 
> Pardon my french, but WTF?  My understanding is that after the handshake,
> either:
> 
> a) the server should start sending me something
> b) the server is waiting for me to send it something
> 
> If a, then why would the server crash?  It says it's in a good state.  It
> should just send away and I just never reply.
> 
> If b, then why would the server crash if I don't send it anything?  (my
> busy waiting loop)
> 
> This leads me to believe that something is broken at a lower level --
> something at the socket level.  Using gdb is kind of a crapshoot with all
> of these threads, but it looks like the abort is happening somewhere in
> one of the PTHREAD _cond_wait type calls in myattach.
> 
> Could I at least get a response as to whether it's possible for me to
> break something at that level, and how I might be doing that?  (excepting
> memory bounds errors -- which purify tells me I'm okay with)  I understand
> about some forms of debugging help being out-of-bounds, but I'm coming
> up against a wall here, and it's name is signal 27.
> 
> Thanks,
> Peter
> 
> 
> ftpd_tcp.debug output:
> -----------------------------------------------------------
> 
> control loop state (sd=1): ESTABLISHED
>   wait_for_event with infinite timeout
> dequeueing established connection from 171.64.15.78:49287
> ***myaccept(0) returning new sd 1***
> ***myclose(0)***
> stopping receive thread
> stopped receive thread
> socket network layer, closing socket 3
> myclose(0) returning...
> connected to 171.64.15.78 at port 49287
> exiting on signal 27
> [3]    Abort                         ./ftpd_tcp.debug
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Connection refused?
Date: Wed, 08 Mar 2006 16:34:22 -0800
Lines: 24
Distribution: su
Message-ID: <dunt6k$l9v$1@news.Stanford.EDU>
References: <dunnkb$eii$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dunnkb$eii$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10766

It was my own fault. I had taken an important piece out during the final 
cleaning of the code :P

ps: diff is your friend.


Naeim Semsarilar wrote:
> I'm trying to run tests of part C one last time and I'm getting:
> 
> ---
> Test C [out of 4.5]
> Checks that ftpcopy transfers at least one file.
> 
> Results:  NOT OK (passed only 0 out of 1 subtests)
> 
> Program output (localhost):
> ERROR: Connection refused (-1)
> ---
> 
> Some other tests fail as well as a result. I haven't changed anything 
> since the last time I ran the tests. Is a server down somewhere? If yes, 
> can I please get reimbursed for this wasted test run?
> 
> Thanks.
.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: HW4: Unable to ftp outside the VNS topology
Date: Thu, 9 Mar 2006 00:56:33 -0800
Lines: 43
Distribution: su
Message-ID: <Pine.GSO.4.44.0603090041340.19677-100000@elaine42.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10767

Hi,

Is there something special we need to do in order to talk to FTP servers
outside our topology?

I'm having trouble FTP'ing outside the VNS topology for HW4. So far, using
my components, I can:

1. Copy from the internal FTP server using all 3 of my own components.
2. FTP from the internal FTP server after running my router.

However when I try using FTP copy for an outside site (e.g.
ftp.microsoft.com), the connection times out. I looked at the vhost and
vrouter logs in ethereal and find that the router is sending the ftpcopy
host's SYN packets to the internet firewall, but receives no response from
the outside server.

I also tried to use all three reference solutions simultaneously, but they
behave the same way also i.e. the vhost times out waiting for a SYN+ACK in
response to its original SYN.

The command lines I have been trying for the router and host are:
~/fullstack/sr_src> ./sr -t 88 -s vns-1 -v vrouter -l router.log

~/fullstack> ./ftpcopy_vns -t 88 -s vns-1 -l host.log -v vhost -U mp3 2
ftp.microsoft.com /tmp/dinkarg/

I am wondering if there is issue with my routing table. The topology
specific routing table for the router is:
192.168.131.91 192.168.131.91 255.255.255.255 eth1
192.168.131.93 192.168.131.93 255.255.255.255 eth2
0.0.0.0 172.24.74.17 0.0.0.0  eth0

The routing table for the host is:
..0.0.0 192.168.131.92 0.0.0.0 eth0

Has anyone else seen behaviour like this? Any suggestions on what I might
be doing wrong?

Thanks,
Dinkar.


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW4: Unable to ftp outside the VNS topology
Date: Thu, 09 Mar 2006 01:05:25 -0800
Lines: 50
Distribution: su
Message-ID: <duor50$ocq$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603090041340.19677-100000@elaine42.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603090041340.19677-100000@elaine42.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10768

Dinkar,

You're right you can't connect to ftp.microsoft.com.  You only get a 
private IP so can't connect externally.  I'm going to update the 
handout, try connecting to something like ftp.cs.stanford.edu

Dinkar Gupta wrote:
> Hi,
> 
> Is there something special we need to do in order to talk to FTP servers
> outside our topology?
> 
> I'm having trouble FTP'ing outside the VNS topology for HW4. So far, using
> my components, I can:
> 
> 1. Copy from the internal FTP server using all 3 of my own components.
> 2. FTP from the internal FTP server after running my router.
> 
> However when I try using FTP copy for an outside site (e.g.
> ftp.microsoft.com), the connection times out. I looked at the vhost and
> vrouter logs in ethereal and find that the router is sending the ftpcopy
> host's SYN packets to the internet firewall, but receives no response from
> the outside server.
> 
> I also tried to use all three reference solutions simultaneously, but they
> behave the same way also i.e. the vhost times out waiting for a SYN+ACK in
> response to its original SYN.
> 
> The command lines I have been trying for the router and host are:
> ~/fullstack/sr_src> ./sr -t 88 -s vns-1 -v vrouter -l router.log
> 
> ~/fullstack> ./ftpcopy_vns -t 88 -s vns-1 -l host.log -v vhost -U mp3 2
> ftp.microsoft.com /tmp/dinkarg/
> 
> I am wondering if there is issue with my routing table. The topology
> specific routing table for the router is:
> 192.168.131.91 192.168.131.91 255.255.255.255 eth1
> 192.168.131.93 192.168.131.93 255.255.255.255 eth2
> 0.0.0.0 172.24.74.17 0.0.0.0  eth0
> 
> The routing table for the host is:
> .0.0.0 192.168.131.92 0.0.0.0 eth0
> 
> Has anyone else seen behaviour like this? Any suggestions on what I might
> be doing wrong?
> 
> Thanks,
> Dinkar.
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW4: Unable to ftp outside the VNS topology
Date: Thu, 09 Mar 2006 01:10:37 -0800
Lines: 65
Distribution: su
Message-ID: <duorch$oit$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603090041340.19677-100000@elaine42.Stanford.EDU> <duor50$ocq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <duor50$ocq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10769

This is a mistake in the writeup. In previous years, we allocated public 
IP addresses to the vhost interface allowing it to route off campus.
Unfortunately, we don't have the liberty of doing the same this year, so 
you'll have to test on ftp servers within Stanford.  The website should
be updated shortly and apologies for any confusion.

cheers,
Martin



> Dinkar,
> 
> You're right you can't connect to ftp.microsoft.com.  You only get a 
> private IP so can't connect externally.  I'm going to update the 
> handout, try connecting to something like ftp.cs.stanford.edu
> 
> Dinkar Gupta wrote:
>> Hi,
>>
>> Is there something special we need to do in order to talk to FTP servers
>> outside our topology?
>>
>> I'm having trouble FTP'ing outside the VNS topology for HW4. So far, 
>> using
>> my components, I can:
>>
>> 1. Copy from the internal FTP server using all 3 of my own components.
>> 2. FTP from the internal FTP server after running my router.
>>
>> However when I try using FTP copy for an outside site (e.g.
>> ftp.microsoft.com), the connection times out. I looked at the vhost and
>> vrouter logs in ethereal and find that the router is sending the ftpcopy
>> host's SYN packets to the internet firewall, but receives no response 
>> from
>> the outside server.
>>
>> I also tried to use all three reference solutions simultaneously, but 
>> they
>> behave the same way also i.e. the vhost times out waiting for a 
>> SYN+ACK in
>> response to its original SYN.
>>
>> The command lines I have been trying for the router and host are:
>> ~/fullstack/sr_src> ./sr -t 88 -s vns-1 -v vrouter -l router.log
>>
>> ~/fullstack> ./ftpcopy_vns -t 88 -s vns-1 -l host.log -v vhost -U mp3 2
>> ftp.microsoft.com /tmp/dinkarg/
>>
>> I am wondering if there is issue with my routing table. The topology
>> specific routing table for the router is:
>> 192.168.131.91 192.168.131.91 255.255.255.255 eth1
>> 192.168.131.93 192.168.131.93 255.255.255.255 eth2
>> 0.0.0.0 172.24.74.17 0.0.0.0  eth0
>>
>> The routing table for the host is:
>> .0.0.0 192.168.131.92 0.0.0.0 eth0
>>
>> Has anyone else seen behaviour like this? Any suggestions on what I might
>> be doing wrong?
>>
>> Thanks,
>> Dinkar.
>>
>>
.

Path: shelby.stanford.edu!elaine9.Stanford.EDU!sstanek
From: "Steven C. Stanek" <sstanek@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS3 3A/B?
Date: Thu, 9 Mar 2006 01:20:26 -0800
Lines: 14
Distribution: su
Message-ID: <Pine.GSO.4.44.0603090108080.6975-100000@elaine9.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10770

I'm a little confused about problem 3. Are the rhos in parts A & B
supposed to be the same?

Part A asks for sigma/rho as defined for a leaky bucket regulator. My
lecture notes and the slides indicate that a leaky bucket regulator releases tokens at a
at an arbitrarily fast rate, but they are put in only at rate rho.

Part B reuses the rho notation, but as I read it, in a different context.
It says "The WFQ scheduler serves each flow at a fixed rate, rho". The
word "serves" is somewhat ambigious, but I read that to say that the max departure rate from the FIFO (for each flow) is
now rho. This has a very different meaning from Part A, where we could release bursts
immediately and thus the value for rho here should, if my understanding is
correct, should be different.

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS3 3A/B?
Date: Thu, 09 Mar 2006 01:33:05 -0800
Lines: 18
Distribution: su
Message-ID: <duosot$q0e$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603090108080.6975-100000@elaine9.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603090108080.6975-100000@elaine9.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10771

Steven C. Stanek wrote:
> I'm a little confused about problem 3. Are the rhos in parts A & B
> supposed to be the same?
> 
> Part A asks for sigma/rho as defined for a leaky bucket regulator. My
> lecture notes and the slides indicate that a leaky bucket regulator releases tokens at a
> at an arbitrarily fast rate, but they are put in only at rate rho.
> 
> Part B reuses the rho notation, but as I read it, in a different context.
> It says "The WFQ scheduler serves each flow at a fixed rate, rho". The
> word "serves" is somewhat ambigious, but I read that to say that the max departure rate from the FIFO (for each flow) is
> now rho. This has a very different meaning from Part A, where we could release bursts
> immediately and thus the value for rho here should, if my understanding is
> correct, should be different.
> 

It's just saying that the service rate is equal to the value of rho, 
from part (a).
.

Path: shelby.stanford.edu!elaine42.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Will the VNS stub run in silent mode?
Date: Thu, 9 Mar 2006 01:49:55 -0800
Lines: 9
Distribution: su
Message-ID: <Pine.GSO.4.44.0603090137240.28834-100000@elaine42.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10772

Hi,

It seems by default that the VNS stub runs in a verbose mode, printing out
diagnostic messages. Is there a quick way to turn these messages off? Can
I remove some debug parameters from the Makefile?

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: "Thad Hughes" <thad@alumni.virginia.edu>
Newsgroups: su.class.cs244a
Subject: Returning problem sets
Date: Thu, 9 Mar 2006 08:45:53 -0800
Lines: 9
Distribution: su
Message-ID: <dupm40$nrb$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10773

TAs,

Is it possible to get back the graded paper copy of the the problem sets 
that we handed in?

Thanks,
Thad Hughes 


.

Path: shelby.stanford.edu!not-for-mail
From: "Junhee Seok" <jseok@stanford.edu>
Newsgroups: su.class.cs244a
Subject: I am trying to test HW#4
Date: Thu, 9 Mar 2006 11:10:22 -0800
Lines: 39
Distribution: su
Message-ID: <dupuj2$3u6$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10774

Hi,

I am using reference ftpcopy and my own tcp stack and sr.
In that case, I don't have to modify any code of mine. Am I right?
Then, I tested the ftpcopy_vns, and got error message like this,

********************
Destination: 192.168.131.146
  Gateway : 192.168.131.146
  Mask : 255.255.255.255
  Interface : eth1
Destination: 192.168.131.148
  Gateway : 192.168.131.148
  Mask : 255.255.255.255
  Interface : eth2
Destination: 0.0.0.0
  Gateway : 172.24.74.17
  Mask : 0.0.0.0
  Interface : eth0
********************
Sending c_open (type=1 len=108)
Received Hardware Info with 6 entries
Interface: eth0
Speed: 0
Hardware Address: 70:00:00:63:00:06
Ethernet IP: 192.168.131.148
Subnet: 0.0.0.0
Mask: 0.0.0.0
Routing table not consistent with hardware

routing table shown above is mine, but I cannot understand the second part 
of the message.
Can someone help me?

Thanks

Junhee 


.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: I am trying to test HW#4
Date: Thu, 09 Mar 2006 11:25:55 -0800
Lines: 38
Distribution: su
Message-ID: <dupvg3$4vf$1@news.Stanford.EDU>
References: <dupuj2$3u6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dupuj2$3u6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10775

Junhee Seok wrote:
> Hi,
> 
> I am using reference ftpcopy and my own tcp stack and sr.
> In that case, I don't have to modify any code of mine. Am I right?
> Then, I tested the ftpcopy_vns, and got error message like this,
> 
> ********************
> Destination: 192.168.131.146
>   Gateway : 192.168.131.146
>   Mask : 255.255.255.255
>   Interface : eth1
> Destination: 192.168.131.148
>   Gateway : 192.168.131.148
>   Mask : 255.255.255.255
>   Interface : eth2
> Destination: 0.0.0.0
>   Gateway : 172.24.74.17
>   Mask : 0.0.0.0
>   Interface : eth0
> ********************
> Sending c_open (type=1 len=108)
> Received Hardware Info with 6 entries
> Interface: eth0
> Speed: 0
> Hardware Address: 70:00:00:63:00:06
> Ethernet IP: 192.168.131.148
> Subnet: 0.0.0.0
> Mask: 0.0.0.0
> Routing table not consistent with hardware
> 
> 

Your vhost only has a single interface.
Make sure your vhost routing table only has a single entry (the default 
entry).

..m
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Returning problem sets
Date: Thu, 09 Mar 2006 13:58:55 -0800
Lines: 12
Distribution: su
Message-ID: <duq8fb$eho$1@news.Stanford.EDU>
References: <dupm40$nrb$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dupm40$nrb$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10776

Thad Hughes wrote:
> TAs,
> 
> Is it possible to get back the graded paper copy of the the problem sets 
> that we handed in?
> 
> Thanks,
> Thad Hughes 
> 
> 
They'll be handed out in class today and the leftovers will be in the 
Gates 3rd floor cabinet.
.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!dinkarg
From: Dinkar Gupta <dinkarg@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Using mylocalip
Date: Thu, 9 Mar 2006 19:11:35 -0800
Lines: 14
Distribution: su
Message-ID: <Pine.GSO.4.44.0603091908210.29565-100000@elaine15.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10777

Just wanted to check that I am using mylocalip correctly in conjuction
with gethostbyname:

1. If we get the hostname using getenv ("HOST"), then the input parameter
to mylocalip should be the IP address returned from
gethostbyname (getenv ("HOST"))?

2. We only need the mylocalip to get the "local IP" of the host.
Specifically, when downloading from say ftp.cs.stanford.edu, we get the
server IP address using only gethostbyname ("ftp.cs.stanford.edu")?

Thanks,
Dinkar.

.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: make problem
Date: Thu, 9 Mar 2006 21:49:30 -0800
Lines: 15
Distribution: su
Message-ID: <dur413$f0r$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10778

I'm trying to use my ftpcopy and router, and the reference STCP layer.
However, when I try to make in the directory, I get this error.

elaine26:~/cs244a/hw4> make
make: *** No rule to make target `sr_transport/sr_vns.h', needed by
`network_io_
vns.o'.  Stop.

Aren't the sources for sr supposed to be in sr_src/?  I don't even have a
sr_vns.h file.  What am I doing wrong?

Thanks,
Waynn


.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PS3 4A
Date: Thu, 9 Mar 2006 22:24:59 -0800
Lines: 16
Distribution: su
Message-ID: <dur63s$h8h$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10779

Question 4a asks: "If the first router allocates the flow a service rate 
greater than or equal to c (where rho ? c), write down expressions for the 
maximum delay of a bit in the router, and the size of the buffer needed to 
prevent overflows. (Write your answers in terms of sigma, rho and R, but not 
c)."
Isn't the answer dependent on the rate at which the router serves the flow? 
The problem doesn't give a variable for this. It seems like the router needs 
to serve the packet at some rate R_out where rho < R_out < R.

Also, what is the point of even mentioning "c" in this problem if we're not 
allowed to use it in the answer? Couldn't it just say "If the first router 
allocates the flow a service rate greater than or equal to rho..." ?

-Jesse


.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS3 4A
Date: Thu, 9 Mar 2006 22:30:17 -0800
Lines: 24
Distribution: su
Message-ID: <dur6dq$hii$1@news.Stanford.EDU>
References: <dur63s$h8h$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10780

Or should we just assume that the router is serving the flow at the slowest 
possible rate, i.e. R_out = rho?

"Jesse Young" <jesse.young@stanford.edu> wrote in message 
news:dur63s$h8h$1@news.Stanford.EDU...
> Question 4a asks: "If the first router allocates the flow a service rate 
> greater than or equal to c (where rho ? c), write down expressions for the 
> maximum delay of a bit in the router, and the size of the buffer needed to 
> prevent overflows. (Write your answers in terms of sigma, rho and R, but 
> not c)."
> Isn't the answer dependent on the rate at which the router serves the 
> flow? The problem doesn't give a variable for this. It seems like the 
> router needs to serve the packet at some rate R_out where rho < R_out < R.
>
> Also, what is the point of even mentioning "c" in this problem if we're 
> not allowed to use it in the answer? Couldn't it just say "If the first 
> router allocates the flow a service rate greater than or equal to rho..." 
> ?
>
> -Jesse
>
> 


.

Path: shelby.stanford.edu!elaine1.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PA4
Date: Thu, 9 Mar 2006 22:34:03 -0800
Lines: 16
Distribution: su
Message-ID: <Pine.GSO.4.44.0603092227040.24150-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10781

Hello,

How will PA4 be graded?  I am using my router and stcp layer...given
that previous year's newsgroup says style points will not be
re-evaluated, should I correct "trivial" inadequacies in my router (such as not setting the
ip->id fields when my router generates icmp messages) and not making the
code portable (htons stuff), or is it as-long-as-it-works and ftpcopy copies and stcp_echo_server echoes?

Also, since we won't be able to go to such sites as ftp.microsoft.com,
what are some of the of ftp servers it will be tested against besides
ftp.cs.stanford.edu and the local ftpd?

Thanks in advance,

-wks

.

Path: shelby.stanford.edu!saga17.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: is 2:00pm deadline for PS3?
Date: Thu, 9 Mar 2006 22:34:40 -0800
Lines: 8
Distribution: su
Message-ID: <Pine.GSO.4.44.0603092233000.13656-100000@saga17.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10782


Matt, Ari,

what time is the deadline for PS3 tomorrow? is it 2:00PM?

thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: Hau Jia Chew <haujia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: HW3 Q5
Date: Thu, 09 Mar 2006 23:08:58 -0800
Lines: 5
Distribution: su
Message-ID: <dur8mb$joq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10783

In Q5,
Does PROPmin mean the minimum time to get from src to dest or just from 
src to the next node between src and dest?

While we are at it, does PROP mean the maximum time between any two nodes?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PS3 4A
Date: Thu, 09 Mar 2006 23:56:18 -0800
Lines: 30
Distribution: su
Message-ID: <durbf3$o67$1@news.Stanford.EDU>
References: <dur63s$h8h$1@news.Stanford.EDU> <dur6dq$hii$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dur6dq$hii$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10784

Jesse Young wrote:
> Or should we just assume that the router is serving the flow at the slowest 
> possible rate, i.e. R_out = rho?

Yeah, you should assume worst case.

> 
> "Jesse Young" <jesse.young@stanford.edu> wrote in message 
> news:dur63s$h8h$1@news.Stanford.EDU...
> 
>>Question 4a asks: "If the first router allocates the flow a service rate 
>>greater than or equal to c (where rho ? c), write down expressions for the 
>>maximum delay of a bit in the router, and the size of the buffer needed to 
>>prevent overflows. (Write your answers in terms of sigma, rho and R, but 
>>not c)."
>>Isn't the answer dependent on the rate at which the router serves the 
>>flow? The problem doesn't give a variable for this. It seems like the 
>>router needs to serve the packet at some rate R_out where rho < R_out < R.
>>
>>Also, what is the point of even mentioning "c" in this problem if we're 
>>not allowed to use it in the answer? Couldn't it just say "If the first 
>>router allocates the flow a service rate greater than or equal to rho..." 
>>?
>>
>>-Jesse
>>
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PA4
Date: Thu, 09 Mar 2006 23:57:12 -0800
Lines: 23
Distribution: su
Message-ID: <durbgp$o67$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603092227040.24150-100000@elaine1.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603092227040.24150-100000@elaine1.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10785

Wai Kei So wrote:
> Hello,
> 
> How will PA4 be graded?  I am using my router and stcp layer...given
> that previous year's newsgroup says style points will not be
> re-evaluated, should I correct "trivial" inadequacies in my router (such as not setting the
> ip->id fields when my router generates icmp messages) and not making the
> code portable (htons stuff), or is it as-long-as-it-works and ftpcopy copies and stcp_echo_server echoes?

Don't bother (unless you want to), it's just as long as it works.

> 
> Also, since we won't be able to go to such sites as ftp.microsoft.com,
> what are some of the of ftp servers it will be tested against besides
> ftp.cs.stanford.edu and the local ftpd?

Erm, ftp.slac.stanford.edu, I'm not aware of any others.

> 
> Thanks in advance,
> 
> -wks
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: is 2:00pm deadline for PS3?
Date: Thu, 09 Mar 2006 23:57:25 -0800
Lines: 10
Distribution: su
Message-ID: <durbh6$o67$3@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603092233000.13656-100000@saga17.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603092233000.13656-100000@saga17.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10786

Vijay K Kulkarni wrote:
> Matt, Ari,
> 
> what time is the deadline for PS3 tomorrow? is it 2:00PM?
> 
> thanks,
> Vijay.
> 

Yes 2pm.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: HW3 Q5
Date: Thu, 09 Mar 2006 23:59:19 -0800
Lines: 11
Distribution: su
Message-ID: <durbkn$o67$4@news.Stanford.EDU>
References: <dur8mb$joq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dur8mb$joq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10787

Hau Jia Chew wrote:
> In Q5,
> Does PROPmin mean the minimum time to get from src to dest or just from 
> src to the next node between src and dest?

The latter.

> 
> While we are at it, does PROP mean the maximum time between any two nodes?

Yes.
.

Path: shelby.stanford.edu!elaine10.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PA4
Date: Fri, 10 Mar 2006 00:12:07 -0800
Lines: 41
Distribution: su
Message-ID: <Pine.GSO.4.44.0603100008490.18098-100000@elaine10.Stanford.EDU>
References: <Pine.GSO.4.44.0603092227040.24150-100000@elaine1.Stanford.EDU>
 <durbgp$o67$2@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <durbgp$o67$2@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10788

Hello,

Actually, (correct me if I'm wrong) the reason I asked was because
ftp.slac.stanford.edu doesn't work (even with the reference stcp...).  So
does that mean as long as ftp.cs.stnaford.edu works we're good?

Also, what should we put in the README (if we don't add any new
functionalities)?  Seems like not a whole lot we can say (I've already
talked too much in my PA1-3's readmes in describing how my implementation works...)

How will style be graded on PA4?

-wks

On Thu, 9 Mar 2006, Matt Falkenhagen wrote:

> Wai Kei So wrote:
> > Hello,
> >
> > How will PA4 be graded?  I am using my router and stcp layer...given
> > that previous year's newsgroup says style points will not be
> > re-evaluated, should I correct "trivial" inadequacies in my router (such as not setting the
> > ip->id fields when my router generates icmp messages) and not making the
> > code portable (htons stuff), or is it as-long-as-it-works and ftpcopy copies and stcp_echo_server echoes?
>
> Don't bother (unless you want to), it's just as long as it works.
>
> >
> > Also, since we won't be able to go to such sites as ftp.microsoft.com,
> > what are some of the of ftp servers it will be tested against besides
> > ftp.cs.stanford.edu and the local ftpd?
>
> Erm, ftp.slac.stanford.edu, I'm not aware of any others.
>
> >
> > Thanks in advance,
> >
> > -wks
> >
>

.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ps3c
Date: Fri, 10 Mar 2006 00:18:40 -0800
Lines: 15
Distribution: su
Message-ID: <durcov$qc3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10789

Maybe it's just the lack of sleep, but I'm having trouble parsing this 
sentence:

The WFQ...ensures that each packet will depart within P bit times from 
when it would depart if a bit-by-bit scheduler was used.

Should I read this as depart within:
1)(P bits) * (when it would depart if bit-by-bit)
2) P bit times + (when it would depart if bit-by-bit)

I think my confusion is if "times" is a noun or verb here.

Thanks,
Will

.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: sorry, that's for ps3 - question 3c
Date: Fri, 10 Mar 2006 00:19:29 -0800
Lines: 16
Distribution: su
Message-ID: <durcqg$qc3$2@news.Stanford.EDU>
References: <durcov$qc3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <durcov$qc3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10790

Will Palmeri wrote:
> Maybe it's just the lack of sleep, but I'm having trouble parsing this 
> sentence:
> 
> The WFQ...ensures that each packet will depart within P bit times from 
> when it would depart if a bit-by-bit scheduler was used.
> 
> Should I read this as depart within:
> 1)(P bits) * (when it would depart if bit-by-bit)
> 2) P bit times + (when it would depart if bit-by-bit)
> 
> I think my confusion is if "times" is a noun or verb here.
> 
> Thanks,
> Will
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Jeremy Robin" <jirobin@stanford.edu>
Newsgroups: su.class.cs244a
Subject: stcp_echo_client and server
Date: Fri, 10 Mar 2006 14:12:16 -0800
Lines: 11
Distribution: su
Message-ID: <dustjq$ebl$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10791

I can't quite figure out what we are supposed to do to get these working....

if anyone could just post a quick example showing how to use these modules, 
I would appreciate it.



Thanks,
jeremy 


.

Path: shelby.stanford.edu!elaine10.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: rtable
Date: Fri, 10 Mar 2006 16:20:53 -0800
Lines: 6
Distribution: su
Message-ID: <Pine.GSO.4.44.0603101620220.9049-100000@elaine10.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10792

Hello,

Since there will be 2 rtable files, how do you want us to name them?

-wks

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: stcp_echo_client and server
Date: Fri, 10 Mar 2006 17:11:08 -0800
Lines: 15
Distribution: su
Message-ID: <dut83e$pg1$1@news.Stanford.EDU>
References: <dustjq$ebl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dustjq$ebl$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10793

Jeremy Robin wrote:
> I can't quite figure out what we are supposed to do to get these working....
> 
> if anyone could just post a quick example showing how to use these modules, 
> I would appreciate it.
> 
> 
> 
> Thanks,
> jeremy 
> 
>

Check out the review session slides from today.  There is an example 
there.  If it doesn't make sense, post again.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: rtable
Date: Fri, 10 Mar 2006 17:11:30 -0800
Lines: 10
Distribution: su
Message-ID: <dut843$pg1$2@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603101620220.9049-100000@elaine10.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603101620220.9049-100000@elaine10.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10794

Wai Kei So wrote:
> Hello,
> 
> Since there will be 2 rtable files, how do you want us to name them?
> 
> -wks
> 

You don't submit the rtables (we test against our own), so name them 
whatever you like.
.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: program args
Date: Fri, 10 Mar 2006 20:43:44 -0600
Lines: 15
Distribution: su
Message-ID: <dutdh2$2jn$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10795

I am a bit confused about the arguments my program should take.


The web site says to take:

 -t [topo id] -v [hostname] -s [server] -p [port] -r [rtable] -l [logfile].

The help session said:


.. -t 244 -v vhost -s vns-2 -r rtable [ftpargs]




.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: program args
Date: Fri, 10 Mar 2006 23:02:41 -0800
Lines: 24
Distribution: su
Message-ID: <dutsmm$fut$1@news.Stanford.EDU>
References: <dutdh2$2jn$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10796

As a followup... in PA 4, are there any penalties for not checking missing 
arguments, not providing default values for missing arguments etc?

Tahir.

"Roy Zeighami" <zeighami@stanford.edu> wrote in message 
news:dutdh2$2jn$1@news.Stanford.EDU...
>I am a bit confused about the arguments my program should take.
>
>
> The web site says to take:
>
> -t [topo id] -v [hostname] -s [server] -p [port] -r [rtable] -l [logfile].
>
> The help session said:
>
>
> . -t 244 -v vhost -s vns-2 -r rtable [ftpargs]
>
>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: program args
Date: Sat, 11 Mar 2006 01:52:57 -0800
Lines: 22
Distribution: su
Message-ID: <duu6lr$qfg$1@news.Stanford.EDU>
References: <dutdh2$2jn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dutdh2$2jn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10797

Roy Zeighami wrote:
> I am a bit confused about the arguments my program should take.
> 
> 
> The web site says to take:
> 
>  -t [topo id] -v [hostname] -s [server] -p [port] -r [rtable] -l [logfile].
> 
> The help session said:
> 
> 
> . -t 244 -v vhost -s vns-2 -r rtable [ftpargs]
> 
> 
> 
> 

The command in the help session was just an example of how you could run 
ftpcopy_vns.

The assignment handout lists all the parameters you need to handle (and 
you can just take the code from echo_client_main.c for that).
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: program args
Date: Sat, 11 Mar 2006 01:54:34 -0800
Lines: 32
Distribution: su
Message-ID: <duu6ot$qfg$2@news.Stanford.EDU>
References: <dutdh2$2jn$1@news.Stanford.EDU> <dutsmm$fut$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dutsmm$fut$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10798

Tahir Azim wrote:
> As a followup... in PA 4, are there any penalties for not checking missing 
> arguments, not providing default values for missing arguments etc?
> 
> Tahir.

You should provide default values and of course not crash/read bad 
memory.  This is not a style penalty but it ensures correct 
functionality.  Again just take the code from the echo_client_main.c.

> 
> "Roy Zeighami" <zeighami@stanford.edu> wrote in message 
> news:dutdh2$2jn$1@news.Stanford.EDU...
> 
>>I am a bit confused about the arguments my program should take.
>>
>>
>>The web site says to take:
>>
>>-t [topo id] -v [hostname] -s [server] -p [port] -r [rtable] -l [logfile].
>>
>>The help session said:
>>
>>
>>. -t 244 -v vhost -s vns-2 -r rtable [ftpargs]
>>
>>
>>
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: default route for vrouter_table
Date: Sat, 11 Mar 2006 08:25:21 -0600
Lines: 11
Distribution: su
Message-ID: <duumki$dki$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10799

For hw2 I was given a gateway ip address for routing packets out of my 
topology.  My hw2 topology said use "172.24.74.17" for example.

The email I got for assignment 4 didn't list any such ip address.  What 
should I use?

Thanks,

Roy 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Trouble with sr_api_init
Date: Sat, 11 Mar 2006 14:11:53 -0600
Lines: 37
Distribution: su
Message-ID: <duvaue$1fc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10800

Hello...

I am trying to call sr_api_init in my ftpcopy, but I get teh following 
output

elaine15:~/cs244a/hw4> ftpcopy_vns -t 89 -v 192.168.131.98 -r vhost_rtable
********************
Destination: 0.0.0.0
  Gateway : 192.168.131.97
  Mask : 0.0.0.0
  Interface : eth0
********************
Sending c_open (type=1 len=108)
vns server closed session.
Reason: reservehost failed
recv(..):sr_client.c::sr_read_from_server: Bad file number
Error: could not get hardware information from the server[TODO]: 
sr_vns_integ_destroy
Can't initialize vns subsystem


My topology is number 89 and the ip address I am supplying ont he command 
line
is for the vhost in that topology.

My vhost_rtable looks like this:

elaine15:~/cs244a/hw4> cat vhost_rtable
0.0.0.0 192.168.131.97 0.0.0.0  eth0

See anything I am doing wrong?

Thanks,

Roy 


.

Path: shelby.stanford.edu!elaine10.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: simple sockets question
Date: Sat, 11 Mar 2006 14:01:26 -0800
Lines: 33
Distribution: su
Message-ID: <Pine.GSO.4.44.0603111356120.18928-100000@elaine10.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10801

I'm playing around with something for another class, and was trying to
implement the simple UDP example from the textbook (p 242). however, I get
a permission denied error(-13) whenever I try to bind to the socket...


  int  sockfd;
  struct sockaddr_in servaddr, cliaddr;

  sockfd = socket(AF_INET, SOCK_DGRAM, 0);
  if (sockfd < 0){
    printf("bad socket call: %d\n", sockfd);
    return -1;
  }
  bzero(&servaddr, sizeof(servaddr));
  servaddr.sin_family = AF_INET;
  servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
  servaddr.sin_port = htons(SERV_PORT);

  int val;
  if((val =bind(sockfd, (SA*) &servaddr, sizeof(servaddr)))){
    printf("error in binding: %d , %d !\n", val, errno);
    perror(NULL);
    return -1;
  }
 ... etc

Is there something obvious that I'm doing wrong here? I basically copied
the example from the book, and have tried various values for SERV_PORT
(including using getservbyname() to get the default port), any ideas?

Thanks!
Megan

.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!zeighami
From: Roy Mehdi Zeighami <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Trouble with sr_api_init
Date: Sat, 11 Mar 2006 14:04:23 -0800
Lines: 45
Distribution: su
Message-ID: <Pine.GSO.4.44.0603111403570.2394-100000@elaine15.Stanford.EDU>
References: <duvaue$1fc$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <duvaue$1fc$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10802

Oops... I was trying run ftpcopy without firing up the router. duh!

:)

On Sat, 11 Mar 2006, Roy Zeighami wrote:

> Hello...
>
> I am trying to call sr_api_init in my ftpcopy, but I get teh following
> output
>
> elaine15:~/cs244a/hw4> ftpcopy_vns -t 89 -v 192.168.131.98 -r vhost_rtable
> ********************
> Destination: 0.0.0.0
>   Gateway : 192.168.131.97
>   Mask : 0.0.0.0
>   Interface : eth0
> ********************
> Sending c_open (type=1 len=108)
> vns server closed session.
> Reason: reservehost failed
> recv(..):sr_client.c::sr_read_from_server: Bad file number
> Error: could not get hardware information from the server[TODO]:
> sr_vns_integ_destroy
> Can't initialize vns subsystem
>
>
> My topology is number 89 and the ip address I am supplying ont he command
> line
> is for the vhost in that topology.
>
> My vhost_rtable looks like this:
>
> elaine15:~/cs244a/hw4> cat vhost_rtable
> 0.0.0.0 192.168.131.97 0.0.0.0  eth0
>
> See anything I am doing wrong?
>
> Thanks,
>
> Roy
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: simple sockets question
Date: Sat, 11 Mar 2006 14:06:47 -0800
Lines: 42
Distribution: su
Message-ID: <duvhlc$7tn$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603111356120.18928-100000@elaine10.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10803

If you're doing this on a UNIX machine, you can't bind any port < 1024,
those are reserved for system use only.

Waynn

"Megan Anneke Wachs" <wachs@stanford.edu> wrote in message
news:Pine.GSO.4.44.0603111356120.18928-100000@elaine10.Stanford.EDU...
> I'm playing around with something for another class, and was trying to
> implement the simple UDP example from the textbook (p 242). however, I get
> a permission denied error(-13) whenever I try to bind to the socket...
>
>
>   int  sockfd;
>   struct sockaddr_in servaddr, cliaddr;
>
>   sockfd = socket(AF_INET, SOCK_DGRAM, 0);
>   if (sockfd < 0){
>     printf("bad socket call: %d\n", sockfd);
>     return -1;
>   }
>   bzero(&servaddr, sizeof(servaddr));
>   servaddr.sin_family = AF_INET;
>   servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
>   servaddr.sin_port = htons(SERV_PORT);
>
>   int val;
>   if((val =bind(sockfd, (SA*) &servaddr, sizeof(servaddr)))){
>     printf("error in binding: %d , %d !\n", val, errno);
>     perror(NULL);
>     return -1;
>   }
>  ... etc
>
> Is there something obvious that I'm doing wrong here? I basically copied
> the example from the book, and have tried various values for SERV_PORT
> (including using getservbyname() to get the default port), any ideas?
>
> Thanks!
> Megan
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Trouble with sr_api_init
Date: Sat, 11 Mar 2006 14:07:04 -0800
Lines: 43
Distribution: su
Message-ID: <duvhlt$7u4$1@news.Stanford.EDU>
References: <duvaue$1fc$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10804

You should be passing in -v vhost, not the address.

"Roy Zeighami" <zeighami@stanford.edu> wrote in message
news:duvaue$1fc$1@news.Stanford.EDU...
> Hello...
>
> I am trying to call sr_api_init in my ftpcopy, but I get teh following
> output
>
> elaine15:~/cs244a/hw4> ftpcopy_vns -t 89 -v 192.168.131.98 -r vhost_rtable
> ********************
> Destination: 0.0.0.0
>   Gateway : 192.168.131.97
>   Mask : 0.0.0.0
>   Interface : eth0
> ********************
> Sending c_open (type=1 len=108)
> vns server closed session.
> Reason: reservehost failed
> recv(..):sr_client.c::sr_read_from_server: Bad file number
> Error: could not get hardware information from the server[TODO]:
> sr_vns_integ_destroy
> Can't initialize vns subsystem
>
>
> My topology is number 89 and the ip address I am supplying ont he command
> line
> is for the vhost in that topology.
>
> My vhost_rtable looks like this:
>
> elaine15:~/cs244a/hw4> cat vhost_rtable
> 0.0.0.0 192.168.131.97 0.0.0.0  eth0
>
> See anything I am doing wrong?
>
> Thanks,
>
> Roy
>
>


.

Path: shelby.stanford.edu!elaine10.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: simple sockets question
Date: Sat, 11 Mar 2006 14:10:49 -0800
Lines: 49
Distribution: su
Message-ID: <Pine.GSO.4.44.0603111410420.20902-100000@elaine10.Stanford.EDU>
References: <Pine.GSO.4.44.0603111356120.18928-100000@elaine10.Stanford.EDU>
 <duvhlc$7tn$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <duvhlc$7tn$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10805

thanks, that was my problem!

Megan
On Sat, 11 Mar 2006, Waynn Lue wrote:

> If you're doing this on a UNIX machine, you can't bind any port < 1024,
> those are reserved for system use only.
>
> Waynn
>
> "Megan Anneke Wachs" <wachs@stanford.edu> wrote in message
> news:Pine.GSO.4.44.0603111356120.18928-100000@elaine10.Stanford.EDU...
> > I'm playing around with something for another class, and was trying to
> > implement the simple UDP example from the textbook (p 242). however, I get
> > a permission denied error(-13) whenever I try to bind to the socket...
> >
> >
> >   int  sockfd;
> >   struct sockaddr_in servaddr, cliaddr;
> >
> >   sockfd = socket(AF_INET, SOCK_DGRAM, 0);
> >   if (sockfd < 0){
> >     printf("bad socket call: %d\n", sockfd);
> >     return -1;
> >   }
> >   bzero(&servaddr, sizeof(servaddr));
> >   servaddr.sin_family = AF_INET;
> >   servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
> >   servaddr.sin_port = htons(SERV_PORT);
> >
> >   int val;
> >   if((val =bind(sockfd, (SA*) &servaddr, sizeof(servaddr)))){
> >     printf("error in binding: %d , %d !\n", val, errno);
> >     perror(NULL);
> >     return -1;
> >   }
> >  ... etc
> >
> > Is there something obvious that I'm doing wrong here? I basically copied
> > the example from the book, and have tried various values for SERV_PORT
> > (including using getservbyname() to get the default port), any ideas?
> >
> > Thanks!
> > Megan
> >
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PA4: Window size
Date: Sat, 11 Mar 2006 16:34:40 -0800
Lines: 9
Distribution: su
Message-ID: <duvqas$gpi$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10806

Can we assume that once a TCP connection is established, a TCP end host will
not change its advertised window? That is, if a TCP peer advertises a window
size of, say, 1024, in its SYN packet, will it ever change this window size
in the middle of the connection? If this number does change, I feel that
there would need to be some major modification work to my code in PA3 ...

Thanks!


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: default route for vrouter_table
Date: Sat, 11 Mar 2006 16:38:44 -0800
Lines: 14
Distribution: su
Message-ID: <duvqin$gtb$1@news.Stanford.EDU>
References: <duumki$dki$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duumki$dki$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10807

Roy Zeighami wrote:
> For hw2 I was given a gateway ip address for routing packets out of my 
> topology.  My hw2 topology said use "172.24.74.17" for example.
> 
> The email I got for assignment 4 didn't list any such ip address.  What 
> should I use?
> 
> Thanks,
> 
> Roy 
> 
> 

Right, use the same one as hw2 (172.24.74.17)
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PA4: Window size
Date: Sat, 11 Mar 2006 16:41:04 -0800
Lines: 12
Distribution: su
Message-ID: <duvqn3$gtb$2@news.Stanford.EDU>
References: <duvqas$gpi$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duvqas$gpi$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10808

Robbie Yan wrote:
> Can we assume that once a TCP connection is established, a TCP end host will
> not change its advertised window? That is, if a TCP peer advertises a window
> size of, say, 1024, in its SYN packet, will it ever change this window size
> in the middle of the connection? If this number does change, I feel that
> there would need to be some major modification work to my code in PA3 ...
> 
> Thanks!
> 
> 

This can happen in real TCP.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: mylocalip()
Date: Sat, 11 Mar 2006 16:51:21 -0800
Lines: 12
Distribution: su
Message-ID: <duvrad$hsg$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10809

Someone asked in the review session to clarify how to use mylocalip(), 
which is declared to be:

/* return IP address of interface on which packets to/from peer_addr are
  * delivered.  peer_addr is in network byte order.
  */
extern uint32_t mylocalip(uint32_t peer_addr);

peer_addr is the IP address of the other side (in the case of ftp, the 
address of the ftp server).  You can find that address using 
mygetpeername(), which is analogous to the real sockets function 
getpeername().
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Vns error
Date: Sat, 11 Mar 2006 16:55:03 -0800
Lines: 29
Distribution: su
Message-ID: <duvrhg$i37$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10810

This is the command I'm using to run the ftpcopy:

../ftpcopy_vns -t 33 -v vhost -r vhost_rtable -U 0 txt 192.168.130.72 
localhost_c_3_0/

and I get this error:

********************
Destination: 0.0.0.0
  Gateway : 192.168.130.73
  Mask : 0.0.0.0
  Interface : eth0
********************
Sending c_open (type=1 len=108)
vns server closed session.
Reason: reservehost failed
recv(..):sr_client.c::sr_read_from_server: Bad file number
Error: could not get hardware information from the server[TODO]: 
sr_vns_integ_destroy
can't initialise VNS subsystem

Please help. Am I  running it wrong, is my rtable not correct, or do I need 
to start debugging sr.
For reference, my rtable is:
0.0.0.0 192.168.130.73  0.0.0.0  eth0
Where .73 is eth 2 of my router.
Thanks 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Internal ftp server vs ftp.cs.stanford
Date: Sun, 12 Mar 2006 00:24:54 -0800
Lines: 9
Distribution: su
Message-ID: <dv0lsq$gfu$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10811

So my transport. c (I isolated that component to be buggy) works with the 
Internal ftp server, and not with ftp.cs.stanford. The ftpcopy (not my own) 
just doesn't send a RETR command for welcome.msg , but sends other CWD 
commands, any ideas what these two ftp servers do differently?

Thanks
Nazia 


.

Path: shelby.stanford.edu!elaine15.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: FIN soon after handshake!!
Date: Sun, 12 Mar 2006 00:52:24 -0800
Lines: 23
Distribution: su
Message-ID: <Pine.GSO.4.44.0603120043440.22585-100000@elaine15.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10812

Hi,

   I am using the reference ftpcopy with my transport.c Soon after the
handshake is done, I call stcp_unblock_application() but the moment I do
this, I am receiving myclose() from ftpcopy() and a FIN is sent as a
result of this. So I am stuck right at the start..! Using the reference ftpcopy
ofcourse goes further without issuing a FIN.

  tcpdump of the reference STCP version and mine are same till the initial
handshake is complete. My transport.c had worked with the ftpcopy_tcp
as part of hw3c. This is bit wierd as to why FIN would come from
ftpcopy in this case. Has anybody seens this? Am I forgetting something
here w.r.t vns?

  I am using the following cmd:
../our.ftpcopy_vns -v vhost -t 81 -s vns-2 -r vhost_table -l vns_ftp_log_mine
jpg 2 192.168.131.56



thanks,
Vijay.

.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Client gets stuck sometimes
Date: Sun, 12 Mar 2006 02:24:43 -0800
Lines: 16
Distribution: su
Message-ID: <dv0sth$n78$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10813

I've been using my own ftpcopy client, transport.c and sr for PA 4. It runs 
nicely 9 times out of 10. But sometimes, it just gets stuck and stops 
sending any data except ARP requests. On inspecting the ethereal log, it 
seems that the transport.c layer on my side resets the connection for some 
reason by sending out an RST packet. I tried this with the provided stcp 
binary but that causes the same problem as well. The pre-built sr doesn't 
seem to work at all for me, neither with my own transport.c nor with the 
provided stcp.

Should I be worried about this problem? Has anybody else encountered 
anything similar?

Thanks
Tahir. 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PA4
Date: Sun, 12 Mar 2006 04:00:46 -0800
Lines: 54
Distribution: su
Message-ID: <dv12o3$sr6$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603092227040.24150-100000@elaine1.Stanford.EDU> <durbgp$o67$2@news.Stanford.EDU> <Pine.GSO.4.44.0603100008490.18098-100000@elaine10.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603100008490.18098-100000@elaine10.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10814

We'll probably just use ftp.cs.stanford.edu to test against.

No style grade for PA4.

README doesn't have to be very long, just be sure to mention if you are 
using any of our binaries and also what changes you had to make to get 
HW4 working.

Ari

Wai Kei So wrote:
> Hello,
> 
> Actually, (correct me if I'm wrong) the reason I asked was because
> ftp.slac.stanford.edu doesn't work (even with the reference stcp...).  So
> does that mean as long as ftp.cs.stnaford.edu works we're good?
> 
> Also, what should we put in the README (if we don't add any new
> functionalities)?  Seems like not a whole lot we can say (I've already
> talked too much in my PA1-3's readmes in describing how my implementation works...)
> 
> How will style be graded on PA4?
> 
> -wks
> 
> On Thu, 9 Mar 2006, Matt Falkenhagen wrote:
> 
> 
>>Wai Kei So wrote:
>>
>>>Hello,
>>>
>>>How will PA4 be graded?  I am using my router and stcp layer...given
>>>that previous year's newsgroup says style points will not be
>>>re-evaluated, should I correct "trivial" inadequacies in my router (such as not setting the
>>>ip->id fields when my router generates icmp messages) and not making the
>>>code portable (htons stuff), or is it as-long-as-it-works and ftpcopy copies and stcp_echo_server echoes?
>>
>>Don't bother (unless you want to), it's just as long as it works.
>>
>>
>>>Also, since we won't be able to go to such sites as ftp.microsoft.com,
>>>what are some of the of ftp servers it will be tested against besides
>>>ftp.cs.stanford.edu and the local ftpd?
>>
>>Erm, ftp.slac.stanford.edu, I'm not aware of any others.
>>
>>
>>>Thanks in advance,
>>>
>>>-wks
>>>
>>
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FIN soon after handshake!!
Date: Sun, 12 Mar 2006 09:19:46 -0800
Lines: 43
Distribution: su
Message-ID: <dv1l7m$iao$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603120043440.22585-100000@elaine15.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10815

Hey Vijay,

    I was just working on figuring out the same problem. In my case, I 
realised that the reason this is happening is because errno was not 0 when I 
was calling stcp_unblock_application, so the moment I unblock, the ftpcopy 
application thinks that the connection setup failed, and calls close(sd) as 
part of its cleanup, and that's why I was sending a FIN out immediately 
after unblocking. I made the problem disappear by manually setting errno to 
0 before calling unblock, although its a kind of a hacky fix. I can't 
explain why errno would be anything other than 0 to start with.

Ram


"Vijay K Kulkarni" <vijayk@stanford.edu> wrote in message 
news:Pine.GSO.4.44.0603120043440.22585-100000@elaine15.Stanford.EDU...
> Hi,
>
>   I am using the reference ftpcopy with my transport.c Soon after the
> handshake is done, I call stcp_unblock_application() but the moment I do
> this, I am receiving myclose() from ftpcopy() and a FIN is sent as a
> result of this. So I am stuck right at the start..! Using the reference 
> ftpcopy
> ofcourse goes further without issuing a FIN.
>
>  tcpdump of the reference STCP version and mine are same till the initial
> handshake is complete. My transport.c had worked with the ftpcopy_tcp
> as part of hw3c. This is bit wierd as to why FIN would come from
> ftpcopy in this case. Has anybody seens this? Am I forgetting something
> here w.r.t vns?
>
>  I am using the following cmd:
> ./our.ftpcopy_vns -v vhost -t 81 -s vns-2 -r vhost_table -l 
> vns_ftp_log_mine
> jpg 2 192.168.131.56
>
>
>
> thanks,
> Vijay.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: STCP sends out RST
Date: Sun, 12 Mar 2006 12:07:28 -0800
Lines: 15
Distribution: su
Message-ID: <dv1v23$rn3$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10816

Hi,

    Has anyone encountered this. I was just running my ftpcopy client built 
with my stcp implementation and downloading files from ftp.cs.stanford.edu, 
and the transfer just hung halfway. When I checked the log on ethereal, i 
realised that halfway through, the FTP server responded with a "450 Transfer 
Aborted. Link to file server lost." to my control connection. More strange 
than this was the fact that the ongoing data connection then sent out a RST 
packet. I've not implemented anything to do with RSTs anywhere in my STCP 
code. I have no idea why I would then be sending out RSTs. Is this done in 
some part of the stub code provided?

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Internal ftp server vs ftp.cs.stanford
Date: Sun, 12 Mar 2006 12:32:22 -0800
Lines: 17
Distribution: su
Message-ID: <dv20n8$33$1@news.Stanford.EDU>
References: <dv0lsq$gfu$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dv0lsq$gfu$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10817

This problem occurs using your transport.c with the reference router and 
the reference ftpcopy?

Do the LIST commands work?

Ari

Nazia Zaman wrote:
> So my transport. c (I isolated that component to be buggy) works with the 
> Internal ftp server, and not with ftp.cs.stanford. The ftpcopy (not my own) 
> just doesn't send a RETR command for welcome.msg , but sends other CWD 
> commands, any ideas what these two ftp servers do differently?
> 
> Thanks
> Nazia 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Client gets stuck sometimes
Date: Sun, 12 Mar 2006 16:20:34 -0800
Lines: 24
Distribution: su
Message-ID: <dv2dss$ebm$1@news.Stanford.EDU>
References: <dv0sth$n78$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10818

I get the same thing, and only when I am testing with ftp.cs.stanford, 
please let me know if you know what is causing the RST to be sent! It is 
weird.


"Tahir Azim" <tazim@stanford.edu> wrote in message 
news:dv0sth$n78$1@news.Stanford.EDU...
> I've been using my own ftpcopy client, transport.c and sr for PA 4. It 
> runs nicely 9 times out of 10. But sometimes, it just gets stuck and stops 
> sending any data except ARP requests. On inspecting the ethereal log, it 
> seems that the transport.c layer on my side resets the connection for some 
> reason by sending out an RST packet. I tried this with the provided stcp 
> binary but that causes the same problem as well. The pre-built sr doesn't 
> seem to work at all for me, neither with my own transport.c nor with the 
> provided stcp.
>
> Should I be worried about this problem? Has anybody else encountered 
> anything similar?
>
> Thanks
> Tahir.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Ryan Matthew Smith <rysmi@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: sr_transport for HW4 submission?
Date: Mon, 13 Mar 2006 00:21:07 +0000 (UTC)
Lines: 25
Distribution: su
Message-ID: <dv2dtj$di2$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10819

hi -- 

i was wondering what the best/expected policy was for the 
sr_transport directory for HW4 submission. 

the "gethw3" script from last time makes a symlink for sr_transport/
to a directory that already has a couple compiled .a files

we link against these, but they are rather chatty; i see debug output
on every packet. although this could be helpful, it was making it 
very difficult to see what the output of my program actually was. 

so eventually i made a local copy of the sr_transport directory, 
modified the makefile a bit (removed -D_DEBUG_ and made only the
libs build) and now i don't see all those prints. 

when i go to submit, would you TAs recommend that i use the
symlinked-but-chatty libs or the quiet ones? 

is everybody else seeing all that debug output? what did you decide
to do about it? 

thanks, 
ryan. 

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Vns error
Date: Sun, 12 Mar 2006 18:55:09 -0800
Lines: 33
Distribution: su
Message-ID: <dv2muj$nr2$1@news.Stanford.EDU>
References: <duvrhg$i37$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <duvrhg$i37$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10820

Nazia Zaman wrote:
> This is the command I'm using to run the ftpcopy:
> 
> ./ftpcopy_vns -t 33 -v vhost -r vhost_rtable -U 0 txt 192.168.130.72 
> localhost_c_3_0/
> 
> and I get this error:
> 
> ********************
> Destination: 0.0.0.0
>   Gateway : 192.168.130.73
>   Mask : 0.0.0.0
>   Interface : eth0
> ********************
> Sending c_open (type=1 len=108)
> vns server closed session.
> Reason: reservehost failed
> recv(..):sr_client.c::sr_read_from_server: Bad file number
> Error: could not get hardware information from the server[TODO]: 
> sr_vns_integ_destroy
> can't initialise VNS subsystem
> 
> Please help. Am I  running it wrong, is my rtable not correct, or do I need 
> to start debugging sr.
> For reference, my rtable is:
> 0.0.0.0 192.168.130.73  0.0.0.0  eth0
> Where .73 is eth 2 of my router.
> Thanks 
> 
> 

I've seen that before when I still had some process connected as vhost. 
  Make sure you don't have such a process.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_transport for HW4 submission?
Date: Sun, 12 Mar 2006 18:55:31 -0800
Lines: 28
Distribution: su
Message-ID: <dv2mv8$nr2$2@news.Stanford.EDU>
References: <dv2dtj$di2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dv2dtj$di2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10821

Ryan Matthew Smith wrote:
> hi -- 
> 
> i was wondering what the best/expected policy was for the 
> sr_transport directory for HW4 submission. 
> 
> the "gethw3" script from last time makes a symlink for sr_transport/
> to a directory that already has a couple compiled .a files
> 
> we link against these, but they are rather chatty; i see debug output
> on every packet. although this could be helpful, it was making it 
> very difficult to see what the output of my program actually was. 
> 
> so eventually i made a local copy of the sr_transport directory, 
> modified the makefile a bit (removed -D_DEBUG_ and made only the
> libs build) and now i don't see all those prints. 
> 
> when i go to submit, would you TAs recommend that i use the
> symlinked-but-chatty libs or the quiet ones? 
> 
> is everybody else seeing all that debug output? what did you decide
> to do about it? 
> 
> thanks, 
> ryan. 
> 

Either one is fine.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nazia Zaman" <nazia@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Client gets stuck sometimes
Date: Sun, 12 Mar 2006 19:53:21 -0800
Lines: 23
Distribution: su
Message-ID: <dv2qbr$ra7$1@news.Stanford.EDU>
References: <dv0sth$n78$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10822

I fixed my RST problem by checking for data piggybacking on FIN packets, if 
that helps anyone!


"Tahir Azim" <tazim@stanford.edu> wrote in message 
news:dv0sth$n78$1@news.Stanford.EDU...
> I've been using my own ftpcopy client, transport.c and sr for PA 4. It 
> runs nicely 9 times out of 10. But sometimes, it just gets stuck and stops 
> sending any data except ARP requests. On inspecting the ethereal log, it 
> seems that the transport.c layer on my side resets the connection for some 
> reason by sending out an RST packet. I tried this with the provided stcp 
> binary but that causes the same problem as well. The pre-built sr doesn't 
> seem to work at all for me, neither with my own transport.c nor with the 
> provided stcp.
>
> Should I be worried about this problem? Has anybody else encountered 
> anything similar?
>
> Thanks
> Tahir.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Frans Effendi <franse@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Reference ftpcopy
Date: Sun, 12 Mar 2006 20:00:56 -0800
Lines: 30
Distribution: su
Message-ID: <dv2qpo$rmf$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10823

Hi,

I am using all 3 reference components but still somehow can't do ftpcopy
correctly from ftp.cs.stanford.edu.

I try to copy all .txt files within 2 level from ftp.cs.stanford.edu 
using this commands:

saga19:~/cs244a/ref_fullstack> ./ftpcopy_vns -t 80 -v vhost -s 
vns-1.stanford.edu txt 2 ftp.cs.stanford.edu test .

However, what I get at the end of ftpcopy session is:
	ERROR: 550 uploads: No such file or directory (-5)
(burried somewhere in the middle of the router's chatiness)
and there is also no files copied at all inside test directory.
I already confirm that there are txt files within 2 level in
ftp.cs.stanford.edu in
    /pub/csd-info/
    /pub/srp/
    /pub/text/

I believe there is something wrong with the reference ftpcopy.
Does anyone who use the reference ftpcopy can get something copied 
succesfully? Or TA, could you please check whether it is right?
I really appreciate any help.

Thanks,

Frans

.

Path: shelby.stanford.edu!not-for-mail
From: Frans Effendi <franse@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftp.slac.stanford.edu
Date: Sun, 12 Mar 2006 20:06:56 -0800
Lines: 12
Distribution: su
Message-ID: <dv2r51$rsa$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10824

Hi,

I can't do ftpcopy to ftp.slac.stanford.edu (even using all 3 reference 
components) although ftp.slac.stanford.edu is actually not dead;
it seems that the client's SYN is never responded by the ftp server.
Does anyone can ftpcopy from ftp.slac.stanford.edu? TA, do we need to
worry about this?

Thank you very much,

Frans

.

Path: shelby.stanford.edu!elaine20.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FIN soon after handshake!!
Date: Mon, 13 Mar 2006 11:31:48 -0800
Lines: 51
Distribution: su
Message-ID: <Pine.GSO.4.44.0603131129230.16540-100000@elaine20.Stanford.EDU>
References: <Pine.GSO.4.44.0603120043440.22585-100000@elaine15.Stanford.EDU>
 <dv1l7m$iao$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dv1l7m$iao$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10825

thanks Ramanan. That helped.

Vijay.

On Sun, 12 Mar 2006, Ramanan wrote:

> Hey Vijay,
>
>     I was just working on figuring out the same problem. In my case, I
> realised that the reason this is happening is because errno was not 0 when I
> was calling stcp_unblock_application, so the moment I unblock, the ftpcopy
> application thinks that the connection setup failed, and calls close(sd) as
> part of its cleanup, and that's why I was sending a FIN out immediately
> after unblocking. I made the problem disappear by manually setting errno to
> 0 before calling unblock, although its a kind of a hacky fix. I can't
> explain why errno would be anything other than 0 to start with.
>
> Ram
>
>
> "Vijay K Kulkarni" <vijayk@stanford.edu> wrote in message
> news:Pine.GSO.4.44.0603120043440.22585-100000@elaine15.Stanford.EDU...
> > Hi,
> >
> >   I am using the reference ftpcopy with my transport.c Soon after the
> > handshake is done, I call stcp_unblock_application() but the moment I do
> > this, I am receiving myclose() from ftpcopy() and a FIN is sent as a
> > result of this. So I am stuck right at the start..! Using the reference
> > ftpcopy
> > ofcourse goes further without issuing a FIN.
> >
> >  tcpdump of the reference STCP version and mine are same till the initial
> > handshake is complete. My transport.c had worked with the ftpcopy_tcp
> > as part of hw3c. This is bit wierd as to why FIN would come from
> > ftpcopy in this case. Has anybody seens this? Am I forgetting something
> > here w.r.t vns?
> >
> >  I am using the following cmd:
> > ./our.ftpcopy_vns -v vhost -t 81 -s vns-2 -r vhost_table -l
> > vns_ftp_log_mine
> > jpg 2 192.168.131.56
> >
> >
> >
> > thanks,
> > Vijay.
> >
>
>
>

.

Path: shelby.stanford.edu!elaine20.Stanford.EDU!vijayk
From: Vijay K Kulkarni <vijayk@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reference ftpcopy
Date: Mon, 13 Mar 2006 11:47:56 -0800
Lines: 46
Distribution: su
Message-ID: <Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU>
References: <dv2qpo$rmf$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dv2qpo$rmf$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10826


I also find the same behaviour i.e reference ftpcopy and reference stcp
don't download all *.txt files.

From previous year's newsgroup I assuming we won't get penalized as long
as our implementation is consistent with the reference implementation. Can
Matt/Ari confirm this?

thanks,
Vijay.


On Sun, 12 Mar 2006, Frans Effendi wrote:

> Hi,
>
> I am using all 3 reference components but still somehow can't do ftpcopy
> correctly from ftp.cs.stanford.edu.
>
> I try to copy all .txt files within 2 level from ftp.cs.stanford.edu
> using this commands:
>
> saga19:~/cs244a/ref_fullstack> ./ftpcopy_vns -t 80 -v vhost -s
> vns-1.stanford.edu txt 2 ftp.cs.stanford.edu test .
>
> However, what I get at the end of ftpcopy session is:
> 	ERROR: 550 uploads: No such file or directory (-5)
> (burried somewhere in the middle of the router's chatiness)
> and there is also no files copied at all inside test directory.
> I already confirm that there are txt files within 2 level in
> ftp.cs.stanford.edu in
>     /pub/csd-info/
>     /pub/srp/
>     /pub/text/
>
> I believe there is something wrong with the reference ftpcopy.
> Does anyone who use the reference ftpcopy can get something copied
> succesfully? Or TA, could you please check whether it is right?
> I really appreciate any help.
>
> Thanks,
>
> Frans
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Jesse Young" <jesse.young@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.slac.stanford.edu
Date: Mon, 13 Mar 2006 12:19:41 -0800
Lines: 22
Distribution: su
Message-ID: <dv4k4u$saj$1@news.Stanford.EDU>
References: <dv2r51$rsa$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10827

Looks like 192.168.* traffic isn't routed between the academic network and 
SLAC. Traceroute shows that you have to go through the campus gateway 
routers to get there.

-Jesse

"Frans Effendi" <franse@stanford.edu> wrote in message 
news:dv2r51$rsa$1@news.Stanford.EDU...
> Hi,
>
> I can't do ftpcopy to ftp.slac.stanford.edu (even using all 3 reference 
> components) although ftp.slac.stanford.edu is actually not dead;
> it seems that the client's SYN is never responded by the ftp server.
> Does anyone can ftpcopy from ftp.slac.stanford.edu? TA, do we need to
> worry about this?
>
> Thank you very much,
>
> Frans
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Roy Zeighami" <zeighami@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: sr_transport for HW4 submission?
Date: Mon, 13 Mar 2006 21:18:05 -0600
Lines: 27
Distribution: su
Message-ID: <dv5clf$18q$1@news.Stanford.EDU>
References: <dv2dtj$di2$1@news.Stanford.EDU> <dv2mv8$nr2$2@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10828

I just redirect stdout to /dev/null


"Matt Falkenhagen" <mjf@stanford.edu> wrote in message 
news:dv2mv8$nr2$2@news.Stanford.EDU...
> Ryan Matthew Smith wrote:
>> hi -- 
>>
>> i was wondering what the best/expected policy was for the sr_transport 
>> directory for HW4 submission. the "gethw3" script from last time makes a 
>> symlink for sr_transport/
>> to a directory that already has a couple compiled .a files
>>
>> we link against these, but they are rather chatty; i see debug output
>> on every packet. although this could be helpful, it was making it very 
>> difficult to see what the output of my program actually was. so 
>> eventually i made a local copy of the sr_transport directory, modified 
>> the makefile a bit (removed -D_DEBUG_ and made only the
>> libs build) and now i don't see all those prints. when i go to submit, 
>> would you TAs recommend that i use the
>> symlinked-but-chatty libs or the quiet ones? is everybody else seeing all 
>> that debug output? what did you decide
>> to do about it? thanks, ryan.
>
> Either one is fine. 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reference ftpcopy
Date: Mon, 13 Mar 2006 20:14:23 -0800
Lines: 69
Distribution: su
Message-ID: <dv5fv6$44r$1@news.Stanford.EDU>
References: <dv2qpo$rmf$1@news.Stanford.EDU> <Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10829

hi..
i'm also getting a similar behavior with the reference ftpcopy.
im using my router and tcp but testing with the reference ftp copy

i tried ftp.cs.stanford.edu with 1 and gz.. and it only downloads the gnu 
directory
when /pub actually has a 3 meg gz in it. i see the exact same ERROR 550 
uploads
in the screen dump.

saying that the reference ftpcopy is not functioning perfectly might
sound like a huge claim im growing increasingly convinced that this might 
just be the case.

I'd be grateful for a definitive comment from a TA on what they will accept 
and what they
wont.

thanks.
"Vijay K Kulkarni" <vijayk@stanford.edu> wrote in message 
news:Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU...
>
> I also find the same behaviour i.e reference ftpcopy and reference stcp
> don't download all *.txt files.
>
> From previous year's newsgroup I assuming we won't get penalized as long
> as our implementation is consistent with the reference implementation. Can
> Matt/Ari confirm this?
>
> thanks,
> Vijay.
>
>
> On Sun, 12 Mar 2006, Frans Effendi wrote:
>
>> Hi,
>>
>> I am using all 3 reference components but still somehow can't do ftpcopy
>> correctly from ftp.cs.stanford.edu.
>>
>> I try to copy all .txt files within 2 level from ftp.cs.stanford.edu
>> using this commands:
>>
>> saga19:~/cs244a/ref_fullstack> ./ftpcopy_vns -t 80 -v vhost -s
>> vns-1.stanford.edu txt 2 ftp.cs.stanford.edu test .
>>
>> However, what I get at the end of ftpcopy session is:
>> ERROR: 550 uploads: No such file or directory (-5)
>> (burried somewhere in the middle of the router's chatiness)
>> and there is also no files copied at all inside test directory.
>> I already confirm that there are txt files within 2 level in
>> ftp.cs.stanford.edu in
>>     /pub/csd-info/
>>     /pub/srp/
>>     /pub/text/
>>
>> I believe there is something wrong with the reference ftpcopy.
>> Does anyone who use the reference ftpcopy can get something copied
>> succesfully? Or TA, could you please check whether it is right?
>> I really appreciate any help.
>>
>> Thanks,
>>
>> Frans
>>
>>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Alan Sheinberg <alanbs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Connecting to VNS server
Date: Mon, 13 Mar 2006 20:37:55 -0800
Lines: 39
Distribution: su
Message-ID: <dv5hlu$5vq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 0.9 (X11/20041103)
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10830

This is probably a trivial problem, but for the life of me, I cannot 
connect to my topology as either the router or the host.  As the email 
with our topologies says:

  To connect to the router on your topology:

   >./sr -v vrouter -t 54 -s vns-1.stanford.edu

   To connect to the virtual host on your topology:

   >./sr -v vhost -t 54 -s vns-1.stanford.edu

I have tried this simple task with my (working) project 2, and it gives me:

../sr -v vrouter -t 54
Loading routing table
---------------------------------------------
Destination     Gateway         Mask    Iface
192.168.130.177         192.168.130.177 255.255.255.255 eth1
192.168.130.179         192.168.130.179 255.255.255.255 eth2
0.0.0.0         172.24.74.17    0.0.0.0 eth0
---------------------------------------------
Client alanbs connecting to Server 171.67.71.18:12345
Requesting topology 54
VNS server closed session.
Reason: reservehost failed
  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
  Make sure you are using the right topology
       ./sr -t <topoid>

  You can also check that another router isn't already
  on your topology at: http://vns-1.stanford.edu/summary
  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~

Am I missing some simple thing that I have not done?  So far as I know, 
we should even be able to take a skeleton project 2 and do this simple 
connection with the -v option even if it doesn't route anything.  Thanks.

Alan
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 00:05:30 -0800
Lines: 15
Distribution: su
Message-ID: <dv5tga$kp3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10831

I just want to make sure I understand the way this works...

When I compile ftpcopy_vns and run it, I see debug messages from the IP 
layer such as:

* routing packet to default gateway at 192.168.131.187 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:192.168.131.186][dst:192.168.131.188]

This is the the VNS sub-system component, correct?  Even though my sr 
code is capable of handling and routing packets on a host, it only 
actually runs on the router, right?

Thanks,
Will
.

Path: shelby.stanford.edu!elaine20.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: how to test stcp_echo_server and stcp_echo_client
Date: Tue, 14 Mar 2006 00:37:43 -0800
Lines: 50
Distribution: su
Message-ID: <Pine.GSO.4.44.0603140030430.20377-100000@elaine20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10832

 I know this has been asked before and we were pointed to Friday's slides,
but I still can't figure out how to test stcp_echo_server and
stcp_echo_client

1) I start the router

elaine15:> ./sr -v vrouter -t 28 -s vns-1.stanford.edu -r rtable

the rtable is
---------------------------------------------
Destination     Gateway         Mask    Iface
192.168.130.49          0.0.0.0 255.255.255.255 eth2
192.168.130.47          0.0.0.0 255.255.255.255 eth1
0.0.0.0         172.24.74.17    0.0.0.0 eth0
---------------------------------------------

2) I start the server

elaine36> ./stcp_echo_server -t 28 -v vhost -r sr_src/rtable2

rtable2 is just one line

0.0.0.0 192.168.130.48 0.0.0.0  eth0

and the server's IP is 192.168.130.49

3) I can't launch the client

elaine13> ./stcp_echo_client -t 28 -v vhost -r sr_src/rtable2 192.168.130.49
********************
Destination: 0.0.0.0
  Gateway : 192.168.130.48
  Mask : 0.0.0.0
  Interface : eth0
********************
Sending c_open (type=1 len=108)
vns server closed session.
Reason: reservehost failed
recv(..):sr_client.c::sr_read_from_server: Bad file number
Error: could not get hardware information from the server[TODO]:
sr_vns_integ_destroy
can't initialise VNS subsystem


thanks,

- Miguel



.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reference ftpcopy
Date: Tue, 14 Mar 2006 02:41:26 -0800
Lines: 82
Distribution: su
Message-ID: <dv66rb$136$1@news.Stanford.EDU>
References: <dv2qpo$rmf$1@news.Stanford.EDU> <Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU> <dv5fv6$44r$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dv5fv6$44r$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10833

Sure enough, it seems that the reference ftpcopy (with reference STCP 
and sr components) has been exhibiting some weird behavior. Thanks to 
lots of people for pointing this out.

When we test your code for HW4 we will just use some basic tests to make 
sure you can copy files. You certainly don't have to worry about 
supporting servers or directories for which the reference solution 
doesn't seem to work.

Ari

Nikhil Raghavan wrote:
> hi..
> i'm also getting a similar behavior with the reference ftpcopy.
> im using my router and tcp but testing with the reference ftp copy
> 
> i tried ftp.cs.stanford.edu with 1 and gz.. and it only downloads the gnu 
> directory
> when /pub actually has a 3 meg gz in it. i see the exact same ERROR 550 
> uploads
> in the screen dump.
> 
> saying that the reference ftpcopy is not functioning perfectly might
> sound like a huge claim im growing increasingly convinced that this might 
> just be the case.
> 
> I'd be grateful for a definitive comment from a TA on what they will accept 
> and what they
> wont.
> 
> thanks.
> "Vijay K Kulkarni" <vijayk@stanford.edu> wrote in message 
> news:Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU...
> 
>>I also find the same behaviour i.e reference ftpcopy and reference stcp
>>don't download all *.txt files.
>>
>>From previous year's newsgroup I assuming we won't get penalized as long
>>as our implementation is consistent with the reference implementation. Can
>>Matt/Ari confirm this?
>>
>>thanks,
>>Vijay.
>>
>>
>>On Sun, 12 Mar 2006, Frans Effendi wrote:
>>
>>
>>>Hi,
>>>
>>>I am using all 3 reference components but still somehow can't do ftpcopy
>>>correctly from ftp.cs.stanford.edu.
>>>
>>>I try to copy all .txt files within 2 level from ftp.cs.stanford.edu
>>>using this commands:
>>>
>>>saga19:~/cs244a/ref_fullstack> ./ftpcopy_vns -t 80 -v vhost -s
>>>vns-1.stanford.edu txt 2 ftp.cs.stanford.edu test .
>>>
>>>However, what I get at the end of ftpcopy session is:
>>>ERROR: 550 uploads: No such file or directory (-5)
>>>(burried somewhere in the middle of the router's chatiness)
>>>and there is also no files copied at all inside test directory.
>>>I already confirm that there are txt files within 2 level in
>>>ftp.cs.stanford.edu in
>>>    /pub/csd-info/
>>>    /pub/srp/
>>>    /pub/text/
>>>
>>>I believe there is something wrong with the reference ftpcopy.
>>>Does anyone who use the reference ftpcopy can get something copied
>>>succesfully? Or TA, could you please check whether it is right?
>>>I really appreciate any help.
>>>
>>>Thanks,
>>>
>>>Frans
>>>
>>>
>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reference ftpcopy
Date: Tue, 14 Mar 2006 02:45:51 -0800
Lines: 79
Distribution: su
Message-ID: <dv66t1$159$1@news.Stanford.EDU>
References: <dv2qpo$rmf$1@news.Stanford.EDU> <Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU> <dv5fv6$44r$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dv5fv6$44r$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10834

I concur. The reference ftpcopy misses some files with extensions gz and 
dvi. There are a lot of symlinks in the ftp server, could that be the 
culprit?

ftp.cs.stanford.edu is also giving my ftpcopy (which scored full 
functionality points previously) problems wrt downloading everything

Any input from the TA's?

-Will

Nikhil Raghavan wrote:
> hi..
> i'm also getting a similar behavior with the reference ftpcopy.
> im using my router and tcp but testing with the reference ftp copy
> 
> i tried ftp.cs.stanford.edu with 1 and gz.. and it only downloads the gnu 
> directory
> when /pub actually has a 3 meg gz in it. i see the exact same ERROR 550 
> uploads
> in the screen dump.
> 
> saying that the reference ftpcopy is not functioning perfectly might
> sound like a huge claim im growing increasingly convinced that this might 
> just be the case.
> 
> I'd be grateful for a definitive comment from a TA on what they will accept 
> and what they
> wont.
> 
> thanks.
> "Vijay K Kulkarni" <vijayk@stanford.edu> wrote in message 
> news:Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU...
>> I also find the same behaviour i.e reference ftpcopy and reference stcp
>> don't download all *.txt files.
>>
>> From previous year's newsgroup I assuming we won't get penalized as long
>> as our implementation is consistent with the reference implementation. Can
>> Matt/Ari confirm this?
>>
>> thanks,
>> Vijay.
>>
>>
>> On Sun, 12 Mar 2006, Frans Effendi wrote:
>>
>>> Hi,
>>>
>>> I am using all 3 reference components but still somehow can't do ftpcopy
>>> correctly from ftp.cs.stanford.edu.
>>>
>>> I try to copy all .txt files within 2 level from ftp.cs.stanford.edu
>>> using this commands:
>>>
>>> saga19:~/cs244a/ref_fullstack> ./ftpcopy_vns -t 80 -v vhost -s
>>> vns-1.stanford.edu txt 2 ftp.cs.stanford.edu test .
>>>
>>> However, what I get at the end of ftpcopy session is:
>>> ERROR: 550 uploads: No such file or directory (-5)
>>> (burried somewhere in the middle of the router's chatiness)
>>> and there is also no files copied at all inside test directory.
>>> I already confirm that there are txt files within 2 level in
>>> ftp.cs.stanford.edu in
>>>     /pub/csd-info/
>>>     /pub/srp/
>>>     /pub/text/
>>>
>>> I believe there is something wrong with the reference ftpcopy.
>>> Does anyone who use the reference ftpcopy can get something copied
>>> succesfully? Or TA, could you please check whether it is right?
>>> I really appreciate any help.
>>>
>>> Thanks,
>>>
>>> Frans
>>>
>>>
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftp.slac.stanford.edu
Date: Tue, 14 Mar 2006 02:44:33 -0800
Lines: 30
Distribution: su
Message-ID: <dv6714$1bj$1@news.Stanford.EDU>
References: <dv2r51$rsa$1@news.Stanford.EDU> <dv4k4u$saj$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dv4k4u$saj$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10835

Don't worry about ftp.slac.stanford.edu. We'll probably do our testing 
on ftp.cs.

Ari

Jesse Young wrote:
> Looks like 192.168.* traffic isn't routed between the academic network and 
> SLAC. Traceroute shows that you have to go through the campus gateway 
> routers to get there.
> 
> -Jesse
> 
> "Frans Effendi" <franse@stanford.edu> wrote in message 
> news:dv2r51$rsa$1@news.Stanford.EDU...
> 
>>Hi,
>>
>>I can't do ftpcopy to ftp.slac.stanford.edu (even using all 3 reference 
>>components) although ftp.slac.stanford.edu is actually not dead;
>>it seems that the client's SYN is never responded by the ftp server.
>>Does anyone can ftpcopy from ftp.slac.stanford.edu? TA, do we need to
>>worry about this?
>>
>>Thank you very much,
>>
>>Frans
>>
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Connecting to VNS server
Date: Tue, 14 Mar 2006 05:23:28 -0800
Lines: 50
Distribution: su
Message-ID: <dv6g4p$bum$1@news.Stanford.EDU>
References: <dv5hlu$5vq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dv5hlu$5vq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10836

Alan Sheinberg wrote:
> This is probably a trivial problem, but for the life of me, I cannot 
> connect to my topology as either the router or the host.  As the email 
> with our topologies says:
> 
>  To connect to the router on your topology:
> 
>   >./sr -v vrouter -t 54 -s vns-1.stanford.edu
> 
>   To connect to the virtual host on your topology:
> 
>   >./sr -v vhost -t 54 -s vns-1.stanford.edu
> 
> I have tried this simple task with my (working) project 2, and it gives me:
> 
> ./sr -v vrouter -t 54
> Loading routing table
> ---------------------------------------------
> Destination     Gateway         Mask    Iface
> 192.168.130.177         192.168.130.177 255.255.255.255 eth1
> 192.168.130.179         192.168.130.179 255.255.255.255 eth2
> 0.0.0.0         172.24.74.17    0.0.0.0 eth0
> ---------------------------------------------
> Client alanbs connecting to Server 171.67.71.18:12345
> Requesting topology 54
> VNS server closed session.
> Reason: reservehost failed
>  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
>  Make sure you are using the right topology
>       ./sr -t <topoid>
> 
>  You can also check that another router isn't already
>  on your topology at: http://vns-1.stanford.edu/summary
>  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
> 
> Am I missing some simple thing that I have not done?  So far as I know, 
> we should even be able to take a skeleton project 2 and do this simple 
> connection with the -v option even if it doesn't route anything.  Thanks.
> 
> Alan

Yeah this should work.  Maybe a stupid question but did you do this:

 >  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
 >  Make sure you are using the right topology
 >       ./sr -t <topoid>
 >
 >  You can also check that another router isn't already
 >  on your topology at: http://vns-1.stanford.edu/summary
 >  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 05:30:20 -0800
Lines: 22
Distribution: su
Message-ID: <dv6ghk$c63$1@news.Stanford.EDU>
References: <dv5tga$kp3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dv5tga$kp3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10837

Will Palmeri wrote:
> I just want to make sure I understand the way this works...
> 
> When I compile ftpcopy_vns and run it, I see debug messages from the IP 
> layer such as:
> 
> * routing packet to default gateway at 192.168.131.187 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
> 
> This is the the VNS sub-system component, correct?  Even though my sr 
> code is capable of handling and routing packets on a host, it only 
> actually runs on the router, right?
> 
> Thanks,
> Will

No this is not right.  You have two instances of sr, one connected as 
vhost and one as vrouter.  Even though vhost happens to have only one 
interface, it still needs sr to "route" packets that it generates 
through that interface to the next hop.  This also enables the vhost to 
send ICMPs back in response to ping, traceroute, packets sent to it, etc.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: how to test stcp_echo_server and stcp_echo_client
Date: Tue, 14 Mar 2006 05:37:40 -0800
Lines: 78
Distribution: su
Message-ID: <dv6gvd$cej$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603140030430.20377-100000@elaine20.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603140030430.20377-100000@elaine20.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10838

Miguel Sanchez wrote:
>  I know this has been asked before and we were pointed to Friday's slides,
> but I still can't figure out how to test stcp_echo_server and
> stcp_echo_client
> 
> 1) I start the router
> 
> elaine15:> ./sr -v vrouter -t 28 -s vns-1.stanford.edu -r rtable
> 
> the rtable is
> ---------------------------------------------
> Destination     Gateway         Mask    Iface
> 192.168.130.49          0.0.0.0 255.255.255.255 eth2
> 192.168.130.47          0.0.0.0 255.255.255.255 eth1
> 0.0.0.0         172.24.74.17    0.0.0.0 eth0
> ---------------------------------------------
> 
> 2) I start the server
> 
> elaine36> ./stcp_echo_server -t 28 -v vhost -r sr_src/rtable2
> 
> rtable2 is just one line
> 
> 0.0.0.0 192.168.130.48 0.0.0.0  eth0
> 
> and the server's IP is 192.168.130.49
> 
> 3) I can't launch the client
> 
> elaine13> ./stcp_echo_client -t 28 -v vhost -r sr_src/rtable2 192.168.130.49
> ********************
> Destination: 0.0.0.0
>   Gateway : 192.168.130.48
>   Mask : 0.0.0.0
>   Interface : eth0
> ********************
> Sending c_open (type=1 len=108)
> vns server closed session.
> Reason: reservehost failed
> recv(..):sr_client.c::sr_read_from_server: Bad file number
> Error: could not get hardware information from the server[TODO]:
> sr_vns_integ_destroy
> can't initialise VNS subsystem
> 
> 
> thanks,
> 
> - Miguel
> 
> 
> 

Yeah, the slides are a bit unclear.

The problem is you're having both stcp_echo_server and stcp_echo_client 
connect to VNS as the vhost for your topology.  You aren't allowed to do 
this; otherwise, both of them would spawn sr to do the routing for 
vhost, and they will collide.  So you can only have one sr running for 
vhost.

The two bullets on the slide are two separate things you can do.  You 
can run:

   $ stcp_echo_server ?t topoid ?v vhost

to have stcp_echo_server run on vhost, and then from there you can do:

   $ telnet (ip of your vhost) 7

to connect to your echo server (7 is the echo server port) from elaine 
or whatever.

The other thing you can do is run:

   $ stcp_echo_client ?t topoid ?v vhost klamath

Which will run echo_client as vhost and connect to klamath.stanford.edu 
from there.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: STCP sends out RST
Date: Tue, 14 Mar 2006 05:57:16 -0800
Lines: 18
Distribution: su
Message-ID: <dv6i44$dgv$1@news.Stanford.EDU>
References: <dv1v23$rn3$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dv1v23$rn3$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10839

Ramanan wrote:
> Hi,
> 
>     Has anyone encountered this. I was just running my ftpcopy client built 
> with my stcp implementation and downloading files from ftp.cs.stanford.edu, 
> and the transfer just hung halfway. When I checked the log on ethereal, i 
> realised that halfway through, the FTP server responded with a "450 Transfer 
> Aborted. Link to file server lost." to my control connection. More strange 
> than this was the fact that the ongoing data connection then sent out a RST 
> packet. I've not implemented anything to do with RSTs anywhere in my STCP 
> code. I have no idea why I would then be sending out RSTs. Is this done in 
> some part of the stub code provided?
> 
> Ram 
> 
> 

Check out the above thread.
.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reference ftpcopy
Date: Tue, 14 Mar 2006 10:12:05 -0800
Lines: 92
Distribution: su
Message-ID: <dv711o$so4$1@news.Stanford.EDU>
References: <dv2qpo$rmf$1@news.Stanford.EDU> <Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU> <dv5fv6$44r$1@news.Stanford.EDU> <dv66rb$136$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10840

Hi Ari,

            Thank you for the confirmation. This definitely helps.



------------------------------------------------------------------------------------
"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message 
news:dv66rb$136$1@news.Stanford.EDU...
> Sure enough, it seems that the reference ftpcopy (with reference STCP and 
> sr components) has been exhibiting some weird behavior. Thanks to lots of 
> people for pointing this out.
>
> When we test your code for HW4 we will just use some basic tests to make 
> sure you can copy files. You certainly don't have to worry about 
> supporting servers or directories for which the reference solution doesn't 
> seem to work.
>
> Ari
>
> Nikhil Raghavan wrote:
>> hi..
>> i'm also getting a similar behavior with the reference ftpcopy.
>> im using my router and tcp but testing with the reference ftp copy
>>
>> i tried ftp.cs.stanford.edu with 1 and gz.. and it only downloads the gnu 
>> directory
>> when /pub actually has a 3 meg gz in it. i see the exact same ERROR 550 
>> uploads
>> in the screen dump.
>>
>> saying that the reference ftpcopy is not functioning perfectly might
>> sound like a huge claim im growing increasingly convinced that this might 
>> just be the case.
>>
>> I'd be grateful for a definitive comment from a TA on what they will 
>> accept and what they
>> wont.
>>
>> thanks.
>> "Vijay K Kulkarni" <vijayk@stanford.edu> wrote in message 
>> news:Pine.GSO.4.44.0603131145130.16540-100000@elaine20.Stanford.EDU...
>>
>>>I also find the same behaviour i.e reference ftpcopy and reference stcp
>>>don't download all *.txt files.
>>>
>>>From previous year's newsgroup I assuming we won't get penalized as long
>>>as our implementation is consistent with the reference implementation. 
>>>Can
>>>Matt/Ari confirm this?
>>>
>>>thanks,
>>>Vijay.
>>>
>>>
>>>On Sun, 12 Mar 2006, Frans Effendi wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>I am using all 3 reference components but still somehow can't do ftpcopy
>>>>correctly from ftp.cs.stanford.edu.
>>>>
>>>>I try to copy all .txt files within 2 level from ftp.cs.stanford.edu
>>>>using this commands:
>>>>
>>>>saga19:~/cs244a/ref_fullstack> ./ftpcopy_vns -t 80 -v vhost -s
>>>>vns-1.stanford.edu txt 2 ftp.cs.stanford.edu test .
>>>>
>>>>However, what I get at the end of ftpcopy session is:
>>>>ERROR: 550 uploads: No such file or directory (-5)
>>>>(burried somewhere in the middle of the router's chatiness)
>>>>and there is also no files copied at all inside test directory.
>>>>I already confirm that there are txt files within 2 level in
>>>>ftp.cs.stanford.edu in
>>>>    /pub/csd-info/
>>>>    /pub/srp/
>>>>    /pub/text/
>>>>
>>>>I believe there is something wrong with the reference ftpcopy.
>>>>Does anyone who use the reference ftpcopy can get something copied
>>>>succesfully? Or TA, could you please check whether it is right?
>>>>I really appreciate any help.
>>>>
>>>>Thanks,
>>>>
>>>>Frans
>>>>
>>>>
>>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 10:17:29 -0800
Lines: 36
Distribution: su
Message-ID: <dv71bo$t7l$1@news.Stanford.EDU>
References: <dv5tga$kp3$1@news.Stanford.EDU> <dv6ghk$c63$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dv6ghk$c63$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10841

Ok, then I'm confused about the Makefile.

I have my sr code in sr_src. running make sr from ../sr_src compiles my 
sr code cleanly. I can run ./sr and I see my debug messages so I know 
that my code is being used.

But then when I run ftpcopy_vns I see the reference sr debug messages.

How do I get ftpcopy_vns to link against my sr code??

Thanks,
Will

Matt Falkenhagen wrote:
> Will Palmeri wrote:
>> I just want to make sure I understand the way this works...
>>
>> When I compile ftpcopy_vns and run it, I see debug messages from the 
>> IP layer such as:
>>
>> * routing packet to default gateway at 192.168.131.187 on interface eth0
>> Attempting to send packet out on interface eth0
>> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
>>
>> This is the the VNS sub-system component, correct?  Even though my sr 
>> code is capable of handling and routing packets on a host, it only 
>> actually runs on the router, right?
>>
>> Thanks,
>> Will
> 
> No this is not right.  You have two instances of sr, one connected as 
> vhost and one as vrouter.  Even though vhost happens to have only one 
> interface, it still needs sr to "route" packets that it generates 
> through that interface to the next hop.  This also enables the vhost to 
> send ICMPs back in response to ping, traceroute, packets sent to it, etc.
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 17:54:55 -0800
Lines: 37
Distribution: su
Message-ID: <dv7s5e$sbl$1@news.Stanford.EDU>
References: <dv5tga$kp3$1@news.Stanford.EDU> <dv6ghk$c63$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dv6ghk$c63$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10842

Ok, digging through the makefile reveals this:

# VNS library/header file location (assumed to be relative to current dir)
SR_TRANSPORT=sr_transport

So ftpcopy uses the sr_transport sr code, NOT my code in sr_src.
Is this ok?  changing this to sr_src fails to compile. And this was not 
mentioned in the assn writeup or discussion section.

Has anyone out there successfully linked their sr_src code with 
ftpcopy_vns??

-Will

Matt Falkenhagen wrote:
> Will Palmeri wrote:
>> I just want to make sure I understand the way this works...
>>
>> When I compile ftpcopy_vns and run it, I see debug messages from the 
>> IP layer such as:
>>
>> * routing packet to default gateway at 192.168.131.187 on interface eth0
>> Attempting to send packet out on interface eth0
>> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
>>
>> This is the the VNS sub-system component, correct?  Even though my sr 
>> code is capable of handling and routing packets on a host, it only 
>> actually runs on the router, right?
>>
>> Thanks,
>> Will
> 
> No this is not right.  You have two instances of sr, one connected as 
> vhost and one as vrouter.  Even though vhost happens to have only one 
> interface, it still needs sr to "route" packets that it generates 
> through that interface to the next hop.  This also enables the vhost to 
> send ICMPs back in response to ping, traceroute, packets sent to it, etc.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 18:43:37 -0800
Lines: 49
Distribution: su
Message-ID: <dv7v12$1qf$1@news.Stanford.EDU>
References: <dv5tga$kp3$1@news.Stanford.EDU> <dv6ghk$c63$1@news.Stanford.EDU> <dv7s5e$sbl$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dv7s5e$sbl$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10843

Will Palmeri wrote:
> Ok, digging through the makefile reveals this:
> 
> # VNS library/header file location (assumed to be relative to current dir)
> SR_TRANSPORT=sr_transport
> 
> So ftpcopy uses the sr_transport sr code, NOT my code in sr_src.
> Is this ok?  changing this to sr_src fails to compile. And this was not 
> mentioned in the assn writeup or discussion section.
> 
> Has anyone out there successfully linked their sr_src code with 
> ftpcopy_vns??
> 
> -Will

It should just work.  Are you sure it's not using your sr?  Can you 
print some output and see?

I think you're right, some/all of that output from your first post is 
from VNS.

> 
> Matt Falkenhagen wrote:
> 
>> Will Palmeri wrote:
>>
>>> I just want to make sure I understand the way this works...
>>>
>>> When I compile ftpcopy_vns and run it, I see debug messages from the 
>>> IP layer such as:
>>>
>>> * routing packet to default gateway at 192.168.131.187 on interface eth0
>>> Attempting to send packet out on interface eth0
>>> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
>>>
>>> This is the the VNS sub-system component, correct?  Even though my sr 
>>> code is capable of handling and routing packets on a host, it only 
>>> actually runs on the router, right?
>>>
>>> Thanks,
>>> Will
>>
>>
>> No this is not right.  You have two instances of sr, one connected as 
>> vhost and one as vrouter.  Even though vhost happens to have only one 
>> interface, it still needs sr to "route" packets that it generates 
>> through that interface to the next hop.  This also enables the vhost 
>> to send ICMPs back in response to ping, traceroute, packets sent to 
>> it, etc.
.

Path: shelby.stanford.edu!not-for-mail
From: Will Palmeri <wjp@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 19:02:29 -0800
Lines: 90
Distribution: su
Message-ID: <dv8044$31j$1@news.Stanford.EDU>
References: <dv5tga$kp3$1@news.Stanford.EDU> <dv6ghk$c63$1@news.Stanford.EDU> <dv7s5e$sbl$1@news.Stanford.EDU> <dv7v12$1qf$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Macintosh/20051201)
In-Reply-To: <dv7v12$1qf$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10844

:( Well it doesn't seem to be working.

Here's what I'm doing:
make clean;
make sr;
make;

  ./sr -t 107 -v vrouter -r router_rtable
--This runs my sr, with tons of debug messages

*** -> Received packet of length 60 on interface eth0
DEBUG: sending queued packets!
*** -> Received packet of length 98 on interface eth0
DEBUG:  destination IP in ARP cache, forwarding IP packet

../ftpcopy_vns -t 107 -v vhost -r host_rtable -U jpg 1 192.168.131.186 temp
--ftpcopy runs successfully, hitting my router correctly.
--my sr code is not used, I see the output like the following:

Attempting to send packet out on interface eth0
* routing packet to default gateway at 192.168.131.187 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:192.168.131.186][dst:192.168.131.188]
-> received IP packet [src:192.168.131.186][dst:192.168.131.188]
-> received IP packet [src:192.168.131.186][dst:192.168.131.188]
* routing packet to default gateway at 192.168.131.187 on interface eth0
Attempting to send packet out on interface eth0
* routing packet to default gateway at 192.168.131.187 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:192.168.131.186][dst:192.168.131.188]

It's definitely linking against sr_transport, not sr_src (which compiles 
cleanly and works fine).

Any ideas??



Matt Falkenhagen wrote:
> Will Palmeri wrote:
>> Ok, digging through the makefile reveals this:
>>
>> # VNS library/header file location (assumed to be relative to current 
>> dir)
>> SR_TRANSPORT=sr_transport
>>
>> So ftpcopy uses the sr_transport sr code, NOT my code in sr_src.
>> Is this ok?  changing this to sr_src fails to compile. And this was 
>> not mentioned in the assn writeup or discussion section.
>>
>> Has anyone out there successfully linked their sr_src code with 
>> ftpcopy_vns??
>>
>> -Will
> 
> It should just work.  Are you sure it's not using your sr?  Can you 
> print some output and see?
> 
> I think you're right, some/all of that output from your first post is 
> from VNS.
> 
>>
>> Matt Falkenhagen wrote:
>>
>>> Will Palmeri wrote:
>>>
>>>> I just want to make sure I understand the way this works...
>>>>
>>>> When I compile ftpcopy_vns and run it, I see debug messages from the 
>>>> IP layer such as:
>>>>
>>>> * routing packet to default gateway at 192.168.131.187 on interface 
>>>> eth0
>>>> Attempting to send packet out on interface eth0
>>>> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
>>>>
>>>> This is the the VNS sub-system component, correct?  Even though my 
>>>> sr code is capable of handling and routing packets on a host, it 
>>>> only actually runs on the router, right?
>>>>
>>>> Thanks,
>>>> Will
>>>
>>>
>>> No this is not right.  You have two instances of sr, one connected as 
>>> vhost and one as vrouter.  Even though vhost happens to have only one 
>>> interface, it still needs sr to "route" packets that it generates 
>>> through that interface to the next hop.  This also enables the vhost 
>>> to send ICMPs back in response to ping, traceroute, packets sent to 
>>> it, etc.
.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 19:06:22 -0800
Lines: 100
Distribution: su
Message-ID: <dv80bh$377$1@news.Stanford.EDU>
References: <dv5tga$kp3$1@news.Stanford.EDU> <dv6ghk$c63$1@news.Stanford.EDU> <dv7s5e$sbl$1@news.Stanford.EDU> <dv7v12$1qf$1@news.Stanford.EDU> <dv8044$31j$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10845

I, for one, have been doing it exactly the same way Will has. I was a little 
confused abt the linking with sr_transport as well, but quickly forgot about 
it, supposing that what I was getting was the correct results...

Tahir.

"Will Palmeri" <wjp@stanford.edu> wrote in message 
news:dv8044$31j$1@news.Stanford.EDU...
> :( Well it doesn't seem to be working.
>
> Here's what I'm doing:
> make clean;
> make sr;
> make;
>
>  ./sr -t 107 -v vrouter -r router_rtable
> --This runs my sr, with tons of debug messages
>
> *** -> Received packet of length 60 on interface eth0
> DEBUG: sending queued packets!
> *** -> Received packet of length 98 on interface eth0
> DEBUG:  destination IP in ARP cache, forwarding IP packet
>
> ./ftpcopy_vns -t 107 -v vhost -r host_rtable -U jpg 1 192.168.131.186 temp
> --ftpcopy runs successfully, hitting my router correctly.
> --my sr code is not used, I see the output like the following:
>
> Attempting to send packet out on interface eth0
> * routing packet to default gateway at 192.168.131.187 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
> * routing packet to default gateway at 192.168.131.187 on interface eth0
> Attempting to send packet out on interface eth0
> * routing packet to default gateway at 192.168.131.187 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
>
> It's definitely linking against sr_transport, not sr_src (which compiles 
> cleanly and works fine).
>
> Any ideas??
>
>
>
> Matt Falkenhagen wrote:
>> Will Palmeri wrote:
>>> Ok, digging through the makefile reveals this:
>>>
>>> # VNS library/header file location (assumed to be relative to current 
>>> dir)
>>> SR_TRANSPORT=sr_transport
>>>
>>> So ftpcopy uses the sr_transport sr code, NOT my code in sr_src.
>>> Is this ok?  changing this to sr_src fails to compile. And this was not 
>>> mentioned in the assn writeup or discussion section.
>>>
>>> Has anyone out there successfully linked their sr_src code with 
>>> ftpcopy_vns??
>>>
>>> -Will
>>
>> It should just work.  Are you sure it's not using your sr?  Can you print 
>> some output and see?
>>
>> I think you're right, some/all of that output from your first post is 
>> from VNS.
>>
>>>
>>> Matt Falkenhagen wrote:
>>>
>>>> Will Palmeri wrote:
>>>>
>>>>> I just want to make sure I understand the way this works...
>>>>>
>>>>> When I compile ftpcopy_vns and run it, I see debug messages from the 
>>>>> IP layer such as:
>>>>>
>>>>> * routing packet to default gateway at 192.168.131.187 on interface 
>>>>> eth0
>>>>> Attempting to send packet out on interface eth0
>>>>> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
>>>>>
>>>>> This is the the VNS sub-system component, correct?  Even though my sr 
>>>>> code is capable of handling and routing packets on a host, it only 
>>>>> actually runs on the router, right?
>>>>>
>>>>> Thanks,
>>>>> Will
>>>>
>>>>
>>>> No this is not right.  You have two instances of sr, one connected as 
>>>> vhost and one as vrouter.  Even though vhost happens to have only one 
>>>> interface, it still needs sr to "route" packets that it generates 
>>>> through that interface to the next hop.  This also enables the vhost to 
>>>> send ICMPs back in response to ping, traceroute, packets sent to it, 
>>>> etc. 


.

Path: shelby.stanford.edu!not-for-mail
From: Alan Sheinberg <alanbs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Connecting to VNS server
Date: Tue, 14 Mar 2006 19:54:11 -0800
Lines: 62
Distribution: su
Message-ID: <dv835f$71t$1@news.Stanford.EDU>
References: <dv5hlu$5vq$1@news.Stanford.EDU> <dv6g4p$bum$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
Xref: shelby.stanford.edu su.class.cs244a:10846

My topology was in use by Martin.  I was in a cold sweat all weekend 
questioning my sanity.  Damn you Martin, damn you!!  Just kidding.  Next 
time we get cookies, I want an extra one!

Alan

Matt Falkenhagen wrote:
> Alan Sheinberg wrote:
> 
>> This is probably a trivial problem, but for the life of me, I cannot 
>> connect to my topology as either the router or the host.  As the email 
>> with our topologies says:
>>
>>  To connect to the router on your topology:
>>
>>   >./sr -v vrouter -t 54 -s vns-1.stanford.edu
>>
>>   To connect to the virtual host on your topology:
>>
>>   >./sr -v vhost -t 54 -s vns-1.stanford.edu
>>
>> I have tried this simple task with my (working) project 2, and it 
>> gives me:
>>
>> ./sr -v vrouter -t 54
>> Loading routing table
>> ---------------------------------------------
>> Destination     Gateway         Mask    Iface
>> 192.168.130.177         192.168.130.177 255.255.255.255 eth1
>> 192.168.130.179         192.168.130.179 255.255.255.255 eth2
>> 0.0.0.0         172.24.74.17    0.0.0.0 eth0
>> ---------------------------------------------
>> Client alanbs connecting to Server 171.67.71.18:12345
>> Requesting topology 54
>> VNS server closed session.
>> Reason: reservehost failed
>>  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
>>  Make sure you are using the right topology
>>       ./sr -t <topoid>
>>
>>  You can also check that another router isn't already
>>  on your topology at: http://vns-1.stanford.edu/summary
>>  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
>>
>> Am I missing some simple thing that I have not done?  So far as I 
>> know, we should even be able to take a skeleton project 2 and do this 
>> simple connection with the -v option even if it doesn't route 
>> anything.  Thanks.
>>
>> Alan
> 
> 
> Yeah this should work.  Maybe a stupid question but did you do this:
> 
>  >  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
>  >  Make sure you are using the right topology
>  >       ./sr -t <topoid>
>  >
>  >  You can also check that another router isn't already
>  >  on your topology at: http://vns-1.stanford.edu/summary
>  >  `~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~

.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: vns subsystem vs. sr
Date: Tue, 14 Mar 2006 21:12:35 -0800
Lines: 65
Distribution: su
Message-ID: <dv87od$bhi$1@news.Stanford.EDU>
References: <dv5tga$kp3$1@news.Stanford.EDU> <dv6ghk$c63$1@news.Stanford.EDU> <dv7s5e$sbl$1@news.Stanford.EDU> <dv7v12$1qf$1@news.Stanford.EDU> <dv8044$31j$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dv8044$31j$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10847

Will Palmeri wrote:
> :( Well it doesn't seem to be working.

I was wrong... sr isn't used for vhost when using ftpcopy_vns.  You were 
right all along.  Sorry for the confusion.

> 
> 
> 
> Matt Falkenhagen wrote:
> 
>> Will Palmeri wrote:
>>
>>> Ok, digging through the makefile reveals this:
>>>
>>> # VNS library/header file location (assumed to be relative to current 
>>> dir)
>>> SR_TRANSPORT=sr_transport
>>>
>>> So ftpcopy uses the sr_transport sr code, NOT my code in sr_src.
>>> Is this ok?  changing this to sr_src fails to compile. And this was 
>>> not mentioned in the assn writeup or discussion section.
>>>
>>> Has anyone out there successfully linked their sr_src code with 
>>> ftpcopy_vns??
>>>
>>> -Will
>>
>>
>> It should just work.  Are you sure it's not using your sr?  Can you 
>> print some output and see?
>>
>> I think you're right, some/all of that output from your first post is 
>> from VNS.
>>
>>>
>>> Matt Falkenhagen wrote:
>>>
>>>> Will Palmeri wrote:
>>>>
>>>>> I just want to make sure I understand the way this works...
>>>>>
>>>>> When I compile ftpcopy_vns and run it, I see debug messages from 
>>>>> the IP layer such as:
>>>>>
>>>>> * routing packet to default gateway at 192.168.131.187 on interface 
>>>>> eth0
>>>>> Attempting to send packet out on interface eth0
>>>>> -> received IP packet [src:192.168.131.186][dst:192.168.131.188]
>>>>>
>>>>> This is the the VNS sub-system component, correct?  Even though my 
>>>>> sr code is capable of handling and routing packets on a host, it 
>>>>> only actually runs on the router, right?
>>>>>
>>>>> Thanks,
>>>>> Will
>>>>
>>>>
>>>>
>>>> No this is not right.  You have two instances of sr, one connected 
>>>> as vhost and one as vrouter.  Even though vhost happens to have only 
>>>> one interface, it still needs sr to "route" packets that it 
>>>> generates through that interface to the next hop.  This also enables 
>>>> the vhost to send ICMPs back in response to ping, traceroute, 
>>>> packets sent to it, etc.
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: make error...
Date: Wed, 15 Mar 2006 08:41:23 +0000 (UTC)
Lines: 17
Distribution: su
Message-ID: <dv8jvj$jpv$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10848

Hi 

I am unable to do a make:

make: *** No rule to make target `sr_transport/sr_vns.h', needed by
`network_io_vns.o'.  Stop.

I created an sr_src folder to contain pp2.

Any ideas?  this is weird.  Someone has encountered the same problem from
an earlier message, but no one has responded yet, which is why I am
posting again.

thanks,
Samantha


.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: make error...
Date: Wed, 15 Mar 2006 08:53:57 +0000 (UTC)
Lines: 22
Distribution: su
Message-ID: <dv8kn5$rl9$1@news.Stanford.EDU>
References: <dv8jvj$jpv$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10849


Ignore the message...I have forgotten to copy the sr_transport folder.
-Samantha

Samantha Kwan Chan <huichan@stanford.edu> wrote:
> Hi 

> I am unable to do a make:

> make: *** No rule to make target `sr_transport/sr_vns.h', needed by
> `network_io_vns.o'.  Stop.

> I created an sr_src folder to contain pp2.

> Any ideas?  this is weird.  Someone has encountered the same problem from
> an earlier message, but no one has responded yet, which is why I am
> posting again.

> thanks,
> Samantha


.

Path: shelby.stanford.edu!not-for-mail
From: "Ramanan" <ramananr@stanford.edu>
Newsgroups: su.class.cs244a
Subject: All 3 reference implementations fail
Date: Wed, 15 Mar 2006 12:21:26 -0800
Lines: 11
Distribution: su
Message-ID: <dv9t08$9vq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10850

Hi,

    I've noticed that my file transfer sometimes just stops abruptly, even 
when testing with all 3 reference implementations. Has anyone else 
experienced this? If so, I wonder if there could be a problem external to 
our router, tcp stack and ftp client. In this case, could the TAs please 
take this into account while grading our submissions. Thanks.

Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: Arun Penmetsa <penmetsa@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: All 3 reference implementations fail
Date: Wed, 15 Mar 2006 12:49:17 -0800
Lines: 60
Distribution: su
Message-ID: <dv9ukk$bha$1@news.Stanford.EDU>
References: <dv9t08$9vq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.4 (Windows/20050908)
In-Reply-To: <dv9t08$9vq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10851

Hi,

I am having the same problem as well. I checked the ethereal logs and I 
am not sending out or receiving any reset packets as suggested in 
another post. A copy of the final messages printed by the vhost is 
below. It looks like the host running ftpcopy receives a bunch of out of 
  order messages and never responds. The ARP handshake immediately 
follows this. Also, the problem does not occur everytime and seems to be 
happening when I transfer a large number of files (greater than 10).


* routing packet to default gateway at 192.168.131.82 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
* routing packet to default gateway at 192.168.131.82 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
* routing packet to default gateway at 192.168.131.82 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
* routing packet to default gateway at 192.168.131.82 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
* arp cache entry for 192.168.131.82 timed out.. deleting
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received ARP request from 192.168.131.82 on interface eth0
  <- sent ARP reply to 192.168.131.82 on interface eth0
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]
-> received ARP request from 192.168.131.82 on interface eth0
  <- sent ARP reply to 192.168.131.82 on interface eth0
-> received IP packet [src:171.64.64.64][dst:192.168.131.83]



Has anyone else run into the same problem,

thanks in advance
Arun

Ramanan wrote:
> Hi,
> 
>     I've noticed that my file transfer sometimes just stops abruptly, even 
> when testing with all 3 reference implementations. Has anyone else 
> experienced this? If so, I wonder if there could be a problem external to 
> our router, tcp stack and ftp client. In this case, could the TAs please 
> take this into account while grading our submissions. Thanks.
> 
> Ram 
> 
> 
.

Path: shelby.stanford.edu!saga18.Stanford.EDU!wachs
From: Megan Anneke Wachs <wachs@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: mylocalip()
Date: Wed, 15 Mar 2006 15:18:40 -0800
Lines: 27
Distribution: su
Message-ID: <Pine.GSO.4.44.0603151515310.25794-100000@saga18.Stanford.EDU>
References: <duvrad$hsg$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <duvrad$hsg$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10852

I still don't get this. So, we're passed in a server name such as
ftp.cs.stanford.edu. We can use gethostbyname() on this, correct?
But if we are given something of the form 19825@elaine.stanford.edu, we
should... do what? Or do we *only* need to worry about this when
determining our local IP to send to the PORT command? In that case, how
exactly do we get the peer ip to give to mylocalip()?

Thanks for any help,
Megan

On Sat,
11 Mar 2006, Matt Falkenhagen wrote:

> Someone asked in the review session to clarify how to use mylocalip(),
> which is declared to be:
>
> /* return IP address of interface on which packets to/from peer_addr are
>   * delivered.  peer_addr is in network byte order.
>   */
> extern uint32_t mylocalip(uint32_t peer_addr);
>
> peer_addr is the IP address of the other side (in the case of ftp, the
> address of the ftp server).  You can find that address using
> mygetpeername(), which is analogous to the real sockets function
> getpeername().
>

.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Working with FTP server on topology, not working with ftp.cs.stanford.edu
Date: Wed, 15 Mar 2006 15:51:50 -0800
Lines: 12
Distribution: su
Message-ID: <dva9am$o00$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10853

I'm using the reference ftpcopy_vns and my own STCP and router. 
Everything works fine when connecting and downloading from the FTP 
router on my topology, but when I try to download from 
ftp.cs.stanford.edu I get an error after a while. My STCP implementation 
times out while waiting for events (none are received from the network 
or from the application). It seems the application is waiting for 
something, and nothing is coming. I've looked at all the logs and it 
seems this happens right after a data connection is closed down.

Any insights appreciated? I'm stuck on how to approach this.

Jens.
.

Path: shelby.stanford.edu!not-for-mail
From: Stefan Thomas Mohler <smohler@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: Re: Working with FTP server on topology, not working with ftp.cs.stanford.edu
Date: Thu, 16 Mar 2006 00:15:55 +0000 (UTC)
Lines: 3
Distribution: su
Message-ID: <dvaanr$oie$1@news.Stanford.EDU>
References: <dva9am$o00$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Xref: shelby.stanford.edu su.class.cs244a:10854

This is a low probability suggestion, but I saw this happen to me once 
when I wasnt handling FIN's correctly and one direction of the shutdown
was skipped.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: mylocalip()
Date: Wed, 15 Mar 2006 16:45:12 -0800
Lines: 42
Distribution: su
Message-ID: <dvacf3$r8q$1@news.Stanford.EDU>
References: <duvrad$hsg$1@news.Stanford.EDU> <Pine.GSO.4.44.0603151515310.25794-100000@saga18.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <Pine.GSO.4.44.0603151515310.25794-100000@saga18.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10855

Megan Anneke Wachs wrote:
> I still don't get this. So, we're passed in a server name such as
> ftp.cs.stanford.edu. We can use gethostbyname() on this, correct?
> But if we are given something of the form 19825@elaine.stanford.edu, we
> should... do what?

You still use gethostbyname, because you still want to connect to elaine.

> Or do we *only* need to worry about this when
> determining our local IP to send to the PORT command? In that case, how
> exactly do we get the peer ip to give to mylocalip()?

mylocalip() is only for the PORT command, correct.  You can't use the 
usual methods of getting local ip because it will give you the true host 
you're running on (e.g., elaine20) instead of your virtual IP for VNS.

You can get the peer ip by first establishing the control connection 
then using mygetpeername() on that socket.

> 
> Thanks for any help,
> Megan
> 
> On Sat,
> 11 Mar 2006, Matt Falkenhagen wrote:
> 
> 
>>Someone asked in the review session to clarify how to use mylocalip(),
>>which is declared to be:
>>
>>/* return IP address of interface on which packets to/from peer_addr are
>>  * delivered.  peer_addr is in network byte order.
>>  */
>>extern uint32_t mylocalip(uint32_t peer_addr);
>>
>>peer_addr is the IP address of the other side (in the case of ftp, the
>>address of the ftp server).  You can find that address using
>>mygetpeername(), which is analogous to the real sockets function
>>getpeername().
>>
> 
> 
.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: ftpcopy_vns command-line parameters
Date: Thu, 16 Mar 2006 01:04:43 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 7
Distribution: su
Message-ID: <dvadjb$se9$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10856

Can we assume that all VNS-related command-line parameters
(-t, -v, -s, -l, -p, -r) will appear first, and all assignment
1 parameters will appear after them?

Thanks,

Oleg.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy_vns command-line parameters
Date: Wed, 15 Mar 2006 18:08:29 -0800
Lines: 10
Distribution: su
Message-ID: <dvahb7$2qd$1@news.Stanford.EDU>
References: <dvadjb$se9$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dvadjb$se9$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10857

Oleg Slezberg wrote:
> Can we assume that all VNS-related command-line parameters
> (-t, -v, -s, -l, -p, -r) will appear first, and all assignment
> 1 parameters will appear after them?
> 
> Thanks,
> 
> Oleg.

Sure.
.

Path: shelby.stanford.edu!not-for-mail
From: Jens Pillgram-Larsen <jenspl@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Working with FTP server on topology, not working with ftp.cs.stanford.edu
Date: Wed, 15 Mar 2006 18:15:34 -0800
Lines: 9
Distribution: su
Message-ID: <dvaho5$373$1@news.Stanford.EDU>
References: <dva9am$o00$1@news.Stanford.EDU> <dvaanr$oie$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dvaanr$oie$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10858

My problem was that I was sending a packed with the FIN flag set, but no 
ACK flag set. The FTP server was ignoring this packet.

Jens.

Stefan Thomas Mohler wrote:
> This is a low probability suggestion, but I saw this happen to me once 
> when I wasnt handling FIN's correctly and one direction of the shutdown
> was skipped.
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: mylocalip()
Date: Wed, 15 Mar 2006 19:17:29 -0800
Lines: 57
Distribution: su
Message-ID: <C03E18C9.3A0B%sunnybalwani@hotmail.com>
References: <duvrad$hsg$1@news.Stanford.EDU> <Pine.GSO.4.44.0603151515310.25794-100000@saga18.Stanford.EDU> <dvacf3$r8q$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.3.060209
Thread-Topic: mylocalip()
Thread-Index: AcZIqCgIZuFED7SbEdqStgARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10859

So, right before we send the PORT command, if we call mylocalip() and use
its return value to get the sin_addr.s_addr and sin_port then that's the
only change needed and the rest of the code can still use get
mygetsockname() (and gethostbyname())?

Thanks for clarification.
sunny



On 3/15/06 4:45 PM, in article dvacf3$r8q$1@news.Stanford.EDU, "Matt
Falkenhagen" <mjf@stanford.edu> wrote:

> Megan Anneke Wachs wrote:
>> I still don't get this. So, we're passed in a server name such as
>> ftp.cs.stanford.edu. We can use gethostbyname() on this, correct?
>> But if we are given something of the form 19825@elaine.stanford.edu, we
>> should... do what?
> 
> You still use gethostbyname, because you still want to connect to elaine.
> 
>> Or do we *only* need to worry about this when
>> determining our local IP to send to the PORT command? In that case, how
>> exactly do we get the peer ip to give to mylocalip()?
> 
> mylocalip() is only for the PORT command, correct.  You can't use the
> usual methods of getting local ip because it will give you the true host
> you're running on (e.g., elaine20) instead of your virtual IP for VNS.
> 
> You can get the peer ip by first establishing the control connection
> then using mygetpeername() on that socket.
> 
>> 
>> Thanks for any help,
>> Megan
>> 
>> On Sat,
>> 11 Mar 2006, Matt Falkenhagen wrote:
>> 
>> 
>>> Someone asked in the review session to clarify how to use mylocalip(),
>>> which is declared to be:
>>> 
>>> /* return IP address of interface on which packets to/from peer_addr are
>>>  * delivered.  peer_addr is in network byte order.
>>>  */
>>> extern uint32_t mylocalip(uint32_t peer_addr);
>>> 
>>> peer_addr is the IP address of the other side (in the case of ftp, the
>>> address of the ftp server).  You can find that address using
>>> mygetpeername(), which is analogous to the real sockets function
>>> getpeername().
>>> 
>> 
>> 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: mylocalip()
Date: Wed, 15 Mar 2006 19:50:50 -0800
Lines: 65
Distribution: su
Message-ID: <dvanb4$8sa$1@news.Stanford.EDU>
References: <duvrad$hsg$1@news.Stanford.EDU> <Pine.GSO.4.44.0603151515310.25794-100000@saga18.Stanford.EDU> <dvacf3$r8q$1@news.Stanford.EDU> <C03E18C9.3A0B%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <C03E18C9.3A0B%sunnybalwani@hotmail.com>
Xref: shelby.stanford.edu su.class.cs244a:10860

Sunny Balwani wrote:
> So, right before we send the PORT command, if we call mylocalip() and use
> its return value to get the sin_addr.s_addr and sin_port then that's the
> only change needed and the rest of the code can still use get
> mygetsockname() (and gethostbyname())?
> 
> Thanks for clarification.
> sunny
> 

Sounds right.  If it doesn't work you'll know.

> 
> 
> On 3/15/06 4:45 PM, in article dvacf3$r8q$1@news.Stanford.EDU, "Matt
> Falkenhagen" <mjf@stanford.edu> wrote:
> 
> 
>>Megan Anneke Wachs wrote:
>>
>>>I still don't get this. So, we're passed in a server name such as
>>>ftp.cs.stanford.edu. We can use gethostbyname() on this, correct?
>>>But if we are given something of the form 19825@elaine.stanford.edu, we
>>>should... do what?
>>
>>You still use gethostbyname, because you still want to connect to elaine.
>>
>>
>>>Or do we *only* need to worry about this when
>>>determining our local IP to send to the PORT command? In that case, how
>>>exactly do we get the peer ip to give to mylocalip()?
>>
>>mylocalip() is only for the PORT command, correct.  You can't use the
>>usual methods of getting local ip because it will give you the true host
>>you're running on (e.g., elaine20) instead of your virtual IP for VNS.
>>
>>You can get the peer ip by first establishing the control connection
>>then using mygetpeername() on that socket.
>>
>>
>>>Thanks for any help,
>>>Megan
>>>
>>>On Sat,
>>>11 Mar 2006, Matt Falkenhagen wrote:
>>>
>>>
>>>
>>>>Someone asked in the review session to clarify how to use mylocalip(),
>>>>which is declared to be:
>>>>
>>>>/* return IP address of interface on which packets to/from peer_addr are
>>>> * delivered.  peer_addr is in network byte order.
>>>> */
>>>>extern uint32_t mylocalip(uint32_t peer_addr);
>>>>
>>>>peer_addr is the IP address of the other side (in the case of ftp, the
>>>>address of the ftp server).  You can find that address using
>>>>mygetpeername(), which is analogous to the real sockets function
>>>>getpeername().
>>>>
>>>
>>>
> 
> 
.

Path: shelby.stanford.edu!elaine36.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: klamath echo server
Date: Thu, 16 Mar 2006 05:03:33 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 18
Distribution: su
Message-ID: <dvarj5$d1v$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10861

Is klamath echo server alive? Here is what I'm getting:

elaine36:~> telnet klamath 7
Trying 171.64.74.58...
Connected to yuba.Stanford.EDU (171.64.74.58).
Escape character is '^]'.
Connection closed by foreign host.
elaine36:~> 

Obviously, because of this I can't use stcp_echo_client 
to debug.

Any suggestions? Is it possible to bring it up?
Is there another echo server we could use?

Thanks in advance for your help,

Oleg.
.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: All 3 reference implementations fail
Date: Wed, 15 Mar 2006 21:05:21 -0800
Lines: 67
Distribution: su
Message-ID: <dvarml$d43$1@news.Stanford.EDU>
References: <dv9t08$9vq$1@news.Stanford.EDU> <dv9ukk$bha$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10862

Me too! And only after receiving a 3.5 MB file 4-5 times in quick 
succession..



"Arun Penmetsa" <penmetsa@stanford.edu> wrote in message 
news:dv9ukk$bha$1@news.Stanford.EDU...
> Hi,
>
> I am having the same problem as well. I checked the ethereal logs and I am 
> not sending out or receiving any reset packets as suggested in another 
> post. A copy of the final messages printed by the vhost is below. It looks 
> like the host running ftpcopy receives a bunch of out of order messages 
> and never responds. The ARP handshake immediately follows this. Also, the 
> problem does not occur everytime and seems to be happening when I transfer 
> a large number of files (greater than 10).
>
>
> * routing packet to default gateway at 192.168.131.82 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> * routing packet to default gateway at 192.168.131.82 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> * routing packet to default gateway at 192.168.131.82 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> * routing packet to default gateway at 192.168.131.82 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> * arp cache entry for 192.168.131.82 timed out.. deleting
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received ARP request from 192.168.131.82 on interface eth0
>  <- sent ARP reply to 192.168.131.82 on interface eth0
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
> -> received ARP request from 192.168.131.82 on interface eth0
>  <- sent ARP reply to 192.168.131.82 on interface eth0
> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>
>
>
> Has anyone else run into the same problem,
>
> thanks in advance
> Arun
>
> Ramanan wrote:
>> Hi,
>>
>>     I've noticed that my file transfer sometimes just stops abruptly, 
>> even when testing with all 3 reference implementations. Has anyone else 
>> experienced this? If so, I wonder if there could be a problem external to 
>> our router, tcp stack and ftp client. In this case, could the TAs please 
>> take this into account while grading our submissions. Thanks.
>>
>> Ram 


.

Path: shelby.stanford.edu!not-for-mail
From: "Tahir Azim" <tazim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: All 3 reference implementations fail
Date: Wed, 15 Mar 2006 21:09:08 -0800
Lines: 82
Distribution: su
Message-ID: <dvarto$d9d$1@news.Stanford.EDU>
References: <dv9t08$9vq$1@news.Stanford.EDU> <dv9ukk$bha$1@news.Stanford.EDU> <dvarml$d43$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10863

P.S. And this happens with all 3 reference implementations too.

Following is the command that causes it:

while 1
../ftpcopy_vns -v vhost -U -t topo_id -s vns-1.stanford.edu -r host_rtable gz 
1 ftp.cs.stanford.edu . pub
end

Tahir.

"Tahir Azim" <tazim@stanford.edu> wrote in message 
news:dvarml$d43$1@news.Stanford.EDU...
> Me too! And only after receiving a 3.5 MB file 4-5 times in quick 
> succession..
>
>
>
> "Arun Penmetsa" <penmetsa@stanford.edu> wrote in message 
> news:dv9ukk$bha$1@news.Stanford.EDU...
>> Hi,
>>
>> I am having the same problem as well. I checked the ethereal logs and I 
>> am not sending out or receiving any reset packets as suggested in another 
>> post. A copy of the final messages printed by the vhost is below. It 
>> looks like the host running ftpcopy receives a bunch of out of order 
>> messages and never responds. The ARP handshake immediately follows this. 
>> Also, the problem does not occur everytime and seems to be happening when 
>> I transfer a large number of files (greater than 10).
>>
>>
>> * routing packet to default gateway at 192.168.131.82 on interface eth0
>> Attempting to send packet out on interface eth0
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> * routing packet to default gateway at 192.168.131.82 on interface eth0
>> Attempting to send packet out on interface eth0
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> * routing packet to default gateway at 192.168.131.82 on interface eth0
>> Attempting to send packet out on interface eth0
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> * routing packet to default gateway at 192.168.131.82 on interface eth0
>> Attempting to send packet out on interface eth0
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> * arp cache entry for 192.168.131.82 timed out.. deleting
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received ARP request from 192.168.131.82 on interface eth0
>>  <- sent ARP reply to 192.168.131.82 on interface eth0
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>> -> received ARP request from 192.168.131.82 on interface eth0
>>  <- sent ARP reply to 192.168.131.82 on interface eth0
>> -> received IP packet [src:171.64.64.64][dst:192.168.131.83]
>>
>>
>>
>> Has anyone else run into the same problem,
>>
>> thanks in advance
>> Arun
>>
>> Ramanan wrote:
>>> Hi,
>>>
>>>     I've noticed that my file transfer sometimes just stops abruptly, 
>>> even when testing with all 3 reference implementations. Has anyone else 
>>> experienced this? If so, I wonder if there could be a problem external 
>>> to our router, tcp stack and ftp client. In this case, could the TAs 
>>> please take this into account while grading our submissions. Thanks.
>>>
>>> Ram
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Robbie Yan" <xyan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: PA#4: Program default arguments
Date: Wed, 15 Mar 2006 23:51:53 -0800
Lines: 16
Distribution: su
Message-ID: <dvb5ef$nbe$1@news.Stanford.EDU>
X-Complaints-To: news@news.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: shelby.stanford.edu su.class.cs244a:10864

Just to confirm, our program should have the following default arguments,
right?

vns_host: NULL
vns_server: NULL
vns_rtable: NULL
vns_logfile: NULL
vns_port: -1
vns_topo: -1

Or should we hard-code some values specific to our topology/server
reference?

Thanks!


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: run vrouter once, ftpcopy multiple times
Date: Thu, 16 Mar 2006 00:02:40 -0800
Lines: 23
Distribution: su
Message-ID: <dvb637$ol2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10865

Hi,

I'm using
ftpcopy: reference
sr: my own
stcp: my own

I run these commands:

sr -t 21 -v vrouter -r vrouter_rtable -s vns-1 &
../ftpcopy_vns -t 21 -v vhost -r vhost_rtable -s vns-1 mp3 0 
192.168.130.12 rcv pub

It downloads the file smoothly and everything. Then if I try running 
ftpcopy_vns (the second command) again, vhost sends 6 ARP requests and I 
get:

ERROR: Connection refused (-1)

This is not expected behavior is it? If I kill the sr running in vrouter 
and run it again, it works again.

Any ideas?
.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: how to test stcp_echo_server and stcp_echo_client
Date: Thu, 16 Mar 2006 00:27:37 -0800
Lines: 31
Distribution: su
Message-ID: <dvb7jm$qui$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603140030430.20377-100000@elaine20.Stanford.EDU> <dv6gvd$cej$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10866

So I try to run the commands as you suggested, but I'm seeing odd behavior.

Once I close the connection from telnet, my transport recieves and ACKs a 
FIN.  However, when it tries to send it's own FIN, no response is received. 
Looking at the nice verbose reference sr output, it appears that telnet 
doesn't actually bother to try and send an akc for my FIN.  Is this normal 
behavior, or an indication that I'm doing something incorrectly?

Thanks,
Brent

> The two bullets on the slide are two separate things you can do.  You can 
> run:
>
>   $ stcp_echo_server ?t topoid ?v vhost
>
> to have stcp_echo_server run on vhost, and then from there you can do:
>
>   $ telnet (ip of your vhost) 7
>
> to connect to your echo server (7 is the echo server port) from elaine or 
> whatever.
>
> The other thing you can do is run:
>
>   $ stcp_echo_client ?t topoid ?v vhost klamath
>
> Which will run echo_client as vhost and connect to klamath.stanford.edu 
> from there. 


.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: PA#4: Program default arguments
Date: Thu, 16 Mar 2006 04:39:19 -0800
Lines: 21
Distribution: su
Message-ID: <dvbma2$d42$1@news.Stanford.EDU>
References: <dvb5ef$nbe$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dvb5ef$nbe$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10867

Robbie Yan wrote:
> Just to confirm, our program should have the following default arguments,
> right?
> 
> vns_host: NULL
> vns_server: NULL
> vns_rtable: NULL
> vns_logfile: NULL
> vns_port: -1
> vns_topo: -1
> 
> Or should we hard-code some values specific to our topology/server
> reference?
> 
> Thanks!
> 
> 

Sure this is fine.   The handout says: "Note that if you pass in a 0 
(null) for server_in, logfile_in and rtable_in and (uint16_t)-1 for 
port_in, it will default to the standard values."
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: klamath echo server
Date: Thu, 16 Mar 2006 04:45:13 -0800
Lines: 22
Distribution: su
Message-ID: <dvbml4$dcm$1@news.Stanford.EDU>
References: <dvarj5$d1v$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dvarj5$d1v$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10868

Oleg Slezberg wrote:
> Is klamath echo server alive? Here is what I'm getting:
> 
> elaine36:~> telnet klamath 7
> Trying 171.64.74.58...
> Connected to yuba.Stanford.EDU (171.64.74.58).
> Escape character is '^]'.
> Connection closed by foreign host.
> elaine36:~> 
> 
> Obviously, because of this I can't use stcp_echo_client 
> to debug.
> 
> Any suggestions? Is it possible to bring it up?
> Is there another echo server we could use?
> 
> Thanks in advance for your help,
> 
> Oleg.

I'll see if we can get it back up.  In the meantime you could run the 
server off your vrouter and the client off your vhost.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: run vrouter once, ftpcopy multiple times
Date: Thu, 16 Mar 2006 05:03:14 -0800
Lines: 27
Distribution: su
Message-ID: <dvbnmt$eem$1@news.Stanford.EDU>
References: <dvb637$ol2$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dvb637$ol2$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10869

Naeim Semsarilar wrote:
> Hi,
> 
> I'm using
> ftpcopy: reference
> sr: my own
> stcp: my own
> 
> I run these commands:
> 
> sr -t 21 -v vrouter -r vrouter_rtable -s vns-1 &
> ./ftpcopy_vns -t 21 -v vhost -r vhost_rtable -s vns-1 mp3 0 
> 192.168.130.12 rcv pub
> 
> It downloads the file smoothly and everything. Then if I try running 
> ftpcopy_vns (the second command) again, vhost sends 6 ARP requests and I 
> get:
> 
> ERROR: Connection refused (-1)
> 
> This is not expected behavior is it? If I kill the sr running in vrouter 
> and run it again, it works again.
> 
> Any ideas?

No this is not expected.  Have you tried with just your sr or just your 
stcp?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: All 3 reference implementations fail
Date: Thu, 16 Mar 2006 05:12:58 -0800
Lines: 15
Distribution: su
Message-ID: <dvbo95$f7p$1@news.Stanford.EDU>
References: <dv9t08$9vq$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dv9t08$9vq$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10870

Ramanan wrote:
> Hi,
> 
>     I've noticed that my file transfer sometimes just stops abruptly, even 
> when testing with all 3 reference implementations. Has anyone else 
> experienced this? If so, I wonder if there could be a problem external to 
> our router, tcp stack and ftp client. In this case, could the TAs please 
> take this into account while grading our submissions. Thanks.
> 
> Ram 
> 
> 

OK.  We will find a small workload/server/directory for which the 
reference solutions consistently work.  Thanks for reporting this.
.

Path: shelby.stanford.edu!not-for-mail
From: Paul Tarjan <ptarjan@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Working with FTP server on topology, not working with ftp.cs.stanford.edu
Date: Thu, 16 Mar 2006 06:03:19 -0800
Lines: 15
Distribution: su
Message-ID: <dvbr77$hut$1@news.Stanford.EDU>
References: <dva9am$o00$1@news.Stanford.EDU> <dvaanr$oie$1@news.Stanford.EDU> <dvaho5$373$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: en-us, en
In-Reply-To: <dvaho5$373$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10871

You are my saviuor! You just saved me a boat load of time. Thanks!

Paul

Jens Pillgram-Larsen wrote:
> My problem was that I was sending a packed with the FIN flag set, but no 
> ACK flag set. The FTP server was ignoring this packet.
> 
> Jens.
> 
> Stefan Thomas Mohler wrote:
> 
>> This is a low probability suggestion, but I saw this happen to me once 
>> when I wasnt handling FIN's correctly and one direction of the shutdown
>> was skipped.
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: klamath echo server
Date: Thu, 16 Mar 2006 13:00:39 -0800
Lines: 25
Distribution: su
Message-ID: <dvcjm3$e34$1@news.Stanford.EDU>
References: <dvarj5$d1v$1@news.Stanford.EDU> <dvbml4$dcm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dvbml4$dcm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10872

Matt Falkenhagen wrote:
> Oleg Slezberg wrote:
> 
>> Is klamath echo server alive? Here is what I'm getting:
>>
>> elaine36:~> telnet klamath 7
>> Trying 171.64.74.58...
>> Connected to yuba.Stanford.EDU (171.64.74.58).
>> Escape character is '^]'.
>> Connection closed by foreign host.
>> elaine36:~>
>> Obviously, because of this I can't use stcp_echo_client to debug.
>>
>> Any suggestions? Is it possible to bring it up?
>> Is there another echo server we could use?
>>
>> Thanks in advance for your help,
>>
>> Oleg.
> 
> 
> I'll see if we can get it back up.  In the meantime you could run the 
> server off your vrouter and the client off your vhost.

There's one on nity.stanford.edu
.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Reference ftpcopy_vns exiting
Date: Thu, 16 Mar 2006 16:36:29 -0800
Lines: 41
Distribution: su
Message-ID: <C03F448D.3A39%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.3.060209
Thread-Topic: Reference ftpcopy_vns exiting
Thread-Index: AcZJWtSjE0jLWLVOEdqDBQARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10873

Hi.

I am having trouble ftpcopy_vns files so would appreciate help.

My ftpcopy on stcp works perfectly and downloads all files but  ftpcopy_vns
ends without transfering any files.


My ping tests works fine when I start 2 windows running vrouter and vhost as
follows:
window1 ->   ./sr -v vrouter -t 46 -r vrouter_rtable
Window2 ->    ./sr ?v vhost ?t 46 ?r vhost_rtable


But using referecne ftpcopy, reference transport layer and MY router, when I
do the following: 
window1 ->   sr_src/sr -v vrouter -t 46 -r vrouter_rtable
window2 ->  ./ftpcopy_vns -t 46 -r vhost_rtable -vvhost -U 1 mp3
192.168.130.137 temp

In window 2 I get the following output:

........ ......
ERROR: 250 Directory successfully changed. (-5)
* routing packet to default gateway at 192.168.130.138 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:192.168.130.137][dst:192.168.130.139]
* routing packet to default gateway at 192.168.130.138 on interface eth0
Attempting to send packet out on interface eth0
* routing packet to default gateway at 192.168.130.138 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:192.168.130.137][dst:192.168.130.139]
* routing packet to default gateway at 192.168.130.138 on interface eth0
Attempting to send packet out on interface eth0
-> received IP packet [src:192.168.130.137][dst:192.168.130.139]
elaine36:~/cs244a/proj4>

   
Would greatly appreciate the help.
Thanks.

.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: Re: Reference ftpcopy_vns exiting (please ignore)
Date: Thu, 16 Mar 2006 17:16:19 -0800
Lines: 52
Distribution: su
Message-ID: <C03F4DE3.3A3C%sunnybalwani@hotmail.com>
References: <C03F448D.3A39%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.3.060209
Thread-Topic: Reference ftpcopy_vns exiting (please ignore)
Thread-Index: AcZJWtSjE0jLWLVOEdqDBQARJHuZqgABZCMB
Xref: shelby.stanford.edu su.class.cs244a:10874

Please ignore my question.  Dumb operator error :-)
Thanks.



On 3/16/06 4:36 PM, in article C03F448D.3A39%sunnybalwani@hotmail.com,
"Sunny Balwani" <sunnybalwani@hotmail.com> wrote:

> Hi.
> 
> I am having trouble ftpcopy_vns files so would appreciate help.
> 
> My ftpcopy on stcp works perfectly and downloads all files but  ftpcopy_vns
> ends without transfering any files.
> 
> 
> My ping tests works fine when I start 2 windows running vrouter and vhost as
> follows:
> window1 ->   ./sr -v vrouter -t 46 -r vrouter_rtable
> Window2 ->    ./sr ?v vhost ?t 46 ?r vhost_rtable
> 
> 
> But using referecne ftpcopy, reference transport layer and MY router, when I
> do the following:
> window1 ->   sr_src/sr -v vrouter -t 46 -r vrouter_rtable
> window2 ->  ./ftpcopy_vns -t 46 -r vhost_rtable -vvhost -U 1 mp3
> 192.168.130.137 temp
> 
> In window 2 I get the following output:
> 
> ....... ......
> 
> ERROR: 250 Directory successfully changed. (-5)
> * routing packet to default gateway at 192.168.130.138 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:192.168.130.137][dst:192.168.130.139]
> * routing packet to default gateway at 192.168.130.138 on interface eth0
> Attempting to send packet out on interface eth0
> * routing packet to default gateway at 192.168.130.138 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:192.168.130.137][dst:192.168.130.139]
> * routing packet to default gateway at 192.168.130.138 on interface eth0
> Attempting to send packet out on interface eth0
> -> received IP packet [src:192.168.130.137][dst:192.168.130.139]
> elaine36:~/cs244a/proj4>
> 
>    
> Would greatly appreciate the help.
> Thanks.
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Bill Dwyer" <wdwyer@stanford.edu>
Newsgroups: su.class.cs244a
Subject: ftpcopy_vns not putting any files in directory
Date: Thu, 16 Mar 2006 19:49:54 -0800
Lines: 16
Distribution: su
Message-ID: <dvdbl2$enq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10875

I ran the following commands using the reference servers, sctp, etc.

/usr/class/cs244a/WWW/homeworks/hw4/prebuilt/sr -t 115 -v vrouter -r 
vrouter_rtable
../ftpcopy_vns -t 115 -v vhost -r vhost_rtable 1 msg ftp.cs.stanford.edu . .

but no .msg files were created in my directory. It appeared from the debug 
output that things were connecting and sending data, but shouldn't there be 
a welcome.msg file now sitting in my the directory from which i ran these 
commands (in seperate terminal windows on seperate elaine machines)?

Thanks,

Bill 


.

Path: shelby.stanford.edu!elaine38.Stanford.EDU!olegs
From: olegs@Stanford.EDU (Oleg Slezberg)
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy_vns not putting any files in directory
Date: Fri, 17 Mar 2006 04:21:26 +0000 (UTC)
Organization: Stanford University, CA 94305, USA
Lines: 24
Distribution: su
Message-ID: <dvddg6$glf$1@news.Stanford.EDU>
References: <dvdbl2$enq$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10876

I think the order of parameters is "msg 1" and not "1 msg".

Oleg. 

In article <dvdbl2$enq$1@news.Stanford.EDU>,
Bill Dwyer <wdwyer@stanford.edu> wrote:
>I ran the following commands using the reference servers, sctp, etc.
>
>/usr/class/cs244a/WWW/homeworks/hw4/prebuilt/sr -t 115 -v vrouter -r 
>vrouter_rtable
>./ftpcopy_vns -t 115 -v vhost -r vhost_rtable 1 msg ftp.cs.stanford.edu . .
>
>but no .msg files were created in my directory. It appeared from the debug 
>output that things were connecting and sending data, but shouldn't there be 
>a welcome.msg file now sitting in my the directory from which i ran these 
>commands (in seperate terminal windows on seperate elaine machines)?
>
>Thanks,
>
>Bill 
>
>


.

Path: shelby.stanford.edu!not-for-mail
From: "Bill Dwyer" <wdwyer@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: ftpcopy_vns not putting any files in directory
Date: Thu, 16 Mar 2006 21:12:26 -0800
Lines: 36
Distribution: su
Message-ID: <dvdgfu$jd7$1@news.Stanford.EDU>
References: <dvdbl2$enq$1@news.Stanford.EDU> <dvddg6$glf$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Xref: shelby.stanford.edu su.class.cs244a:10877

Lol... Thanks

I guess that's what I get for copy and pasting the TA's lecture notes =P

Bill

"Oleg Slezberg" <olegs@Stanford.EDU> wrote in message 
news:dvddg6$glf$1@news.Stanford.EDU...
>I think the order of parameters is "msg 1" and not "1 msg".
>
> Oleg.
>
> In article <dvdbl2$enq$1@news.Stanford.EDU>,
> Bill Dwyer <wdwyer@stanford.edu> wrote:
>>I ran the following commands using the reference servers, sctp, etc.
>>
>>/usr/class/cs244a/WWW/homeworks/hw4/prebuilt/sr -t 115 -v vrouter -r
>>vrouter_rtable
>>./ftpcopy_vns -t 115 -v vhost -r vhost_rtable 1 msg ftp.cs.stanford.edu . 
>>.
>>
>>but no .msg files were created in my directory. It appeared from the debug
>>output that things were connecting and sending data, but shouldn't there 
>>be
>>a welcome.msg file now sitting in my the directory from which i ran these
>>commands (in seperate terminal windows on seperate elaine machines)?
>>
>>Thanks,
>>
>>Bill
>>
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: how to test stcp_echo_server and stcp_echo_client
Date: Thu, 16 Mar 2006 22:13:40 -0800
Lines: 38
Distribution: su
Message-ID: <dvdk98$n37$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603140030430.20377-100000@elaine20.Stanford.EDU> <dv6gvd$cej$1@news.Stanford.EDU> <dvb7jm$qui$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dvb7jm$qui$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10878

Seems odd to me. Can you post your ethereal log file?

Ari

Brent Ellwein wrote:
> So I try to run the commands as you suggested, but I'm seeing odd behavior.
> 
> Once I close the connection from telnet, my transport recieves and ACKs a 
> FIN.  However, when it tries to send it's own FIN, no response is received. 
> Looking at the nice verbose reference sr output, it appears that telnet 
> doesn't actually bother to try and send an akc for my FIN.  Is this normal 
> behavior, or an indication that I'm doing something incorrectly?
> 
> Thanks,
> Brent
> 
> 
>>The two bullets on the slide are two separate things you can do.  You can 
>>run:
>>
>>  $ stcp_echo_server ?t topoid ?v vhost
>>
>>to have stcp_echo_server run on vhost, and then from there you can do:
>>
>>  $ telnet (ip of your vhost) 7
>>
>>to connect to your echo server (7 is the echo server port) from elaine or 
>>whatever.
>>
>>The other thing you can do is run:
>>
>>  $ stcp_echo_client ?t topoid ?v vhost klamath
>>
>>Which will run echo_client as vhost and connect to klamath.stanford.edu 
>>from there. 
> 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: make sr
Date: Fri, 17 Mar 2006 06:23:39 +0000 (UTC)
Lines: 28
Distribution: su
Message-ID: <dvdklb$n4e$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10879

My file structure:
hw4
hw4/sr_src

When I do make sr on the hw4 directory, the Makefile from sr_src is
invoked and sr is made and is copied into the hw4 directory
automatically.  However, the following message is printed out indicating
that reference sr is being used which is incorrect, is this an error in the makefile?

Anyone seeing this? 

Makefile:116: ***compiling with reference STCP layer...***
make -C sr_src && cp -f sr_src/sr sr || \
 echo "***using reference sr***"
make[1]: Entering directory
`/afs/ir.stanford.edu/users/h/u/huichan/cs244a/hw4/sr_src'
gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_router.c -o sr_router.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_main.c -o sr_main.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_if.c -o sr_if.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_dumper.c -o sr_dumper.o
gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ mr_function.c -o mr_function.o
gcc -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ -o sr sr_router.o sr_main.o
sr_if.o sr_rt.o sr_vns_comm.o sr_dumper.o mr_function.o -lnsl -lsocket
-lresolv -lm -lpthread 
make[1]: Leaving directory`/afs/ir.stanford.edu/users/h/u/huichan/cs244a/hw4/sr_src'


thanks, Sam
.

Path: shelby.stanford.edu!elaine19.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: make sr
Date: Thu, 16 Mar 2006 22:57:38 -0800
Lines: 37
Distribution: su
Message-ID: <Pine.GSO.4.44.0603162256540.23654-100000@elaine19.Stanford.EDU>
References: <dvdklb$n4e$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dvdklb$n4e$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10880

I also see this message but when I actually run sr it's my bits that are
executed, so I think it's ok

- Miguel

On Fri, 17 Mar 2006, Samantha Kwan Chan wrote:

> My file structure:
> hw4
> hw4/sr_src
>
> When I do make sr on the hw4 directory, the Makefile from sr_src is
> invoked and sr is made and is copied into the hw4 directory
> automatically.  However, the following message is printed out indicating
> that reference sr is being used which is incorrect, is this an error in the makefile?
>
> Anyone seeing this?
>
> Makefile:116: ***compiling with reference STCP layer...***
> make -C sr_src && cp -f sr_src/sr sr || \
>  echo "***using reference sr***"
> make[1]: Entering directory
> `/afs/ir.stanford.edu/users/h/u/huichan/cs244a/hw4/sr_src'
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_router.c -o sr_router.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_main.c -o sr_main.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_if.c -o sr_if.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_dumper.c -o sr_dumper.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ mr_function.c -o mr_function.o
> gcc -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ -o sr sr_router.o sr_main.o
> sr_if.o sr_rt.o sr_vns_comm.o sr_dumper.o mr_function.o -lnsl -lsocket
> -lresolv -lm -lpthread
> make[1]: Leaving directory`/afs/ir.stanford.edu/users/h/u/huichan/cs244a/hw4/sr_src'
>
>
> thanks, Sam
>

.

Path: shelby.stanford.edu!not-for-mail
From: Justin Pettit <jpettit@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: make sr
Date: Thu, 16 Mar 2006 23:09:21 -0800
Lines: 44
Distribution: su
Message-ID: <C03FA0A1.31E4%jpettit@stanford.edu>
References: <dvdklb$n4e$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.3.060209
Thread-Topic: make sr
Thread-Index: AcZJkbal9RYPQ7WEEdqLLgARJDbi7g==
Xref: shelby.stanford.edu su.class.cs244a:10881

If you're referring to the 'echo "***using reference sr***"' line, Matt
mentioned this in the review.  The "echo" part is printing the command that
is being executed, which includes the previous line that starts with "make".
If you were actually using the reference sr, it would have printed "***using
reference sr***" without the "echo".

--Justin


On 3/16/06 10:23 PM, in article dvdklb$n4e$1@news.Stanford.EDU, "Samantha
Kwan Chan" <huichan@Stanford.EDU> wrote:

> My file structure:
> hw4
> hw4/sr_src
> 
> When I do make sr on the hw4 directory, the Makefile from sr_src is
> invoked and sr is made and is copied into the hw4 directory
> automatically.  However, the following message is printed out indicating
> that reference sr is being used which is incorrect, is this an error in the
> makefile?
> 
> Anyone seeing this?
> 
> Makefile:116: ***compiling with reference STCP layer...***
> make -C sr_src && cp -f sr_src/sr sr || \
>  echo "***using reference sr***"
> make[1]: Entering directory
> `/afs/ir.stanford.edu/users/h/u/huichan/cs244a/hw4/sr_src'
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_router.c -o sr_router.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_main.c -o sr_main.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_if.c -o sr_if.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ sr_dumper.c -o sr_dumper.o
> gcc -c -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ mr_function.c -o mr_function.o
> gcc -g -Wall -ansi -D_DEBUG_ -D_SOLARIS_ -o sr sr_router.o sr_main.o
> sr_if.o sr_rt.o sr_vns_comm.o sr_dumper.o mr_function.o -lnsl -lsocket
> -lresolv -lm -lpthread
> make[1]: Leaving 
> directory`/afs/ir.stanford.edu/users/h/u/huichan/cs244a/hw4/sr_src'
> 
> 
> thanks, Sam


.

Path: shelby.stanford.edu!not-for-mail
From: Samantha Kwan Chan <huichan@Stanford.EDU>
Newsgroups: su.class.cs244a
Subject: reference ftpcopy error???
Date: Fri, 17 Mar 2006 07:33:09 +0000 (UTC)
Lines: 19
Distribution: su
Message-ID: <dvdonl$r22$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.6.15.1smp (i686))
Xref: shelby.stanford.edu su.class.cs244a:10882

Hi

I executed the following command:

.../ftpcopy_vns -r ../vhost_rtable -t 57 -s vns-1 -v vhost gz 1
ftp.cs.stanford.edu . .

The reference ftpcopy actually went into the gnu directory and ftp out all
the .gz files in that level.  However, the gnu directory is actually a
symbolic link path.  Our ftpcopy explicitly said don't go into symbolic
path.

So which is correct?  Currently my implementation do not go into a
directory that is symboliclly linked.

thanks,
Sam


.

Path: shelby.stanford.edu!not-for-mail
From: Naeim Semsarilar <naeim@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: run vrouter once, ftpcopy multiple times
Date: Thu, 16 Mar 2006 23:35:32 -0800
Lines: 33
Distribution: su
Message-ID: <dvdos6$rat$1@news.Stanford.EDU>
References: <dvb637$ol2$1@news.Stanford.EDU> <dvbnmt$eem$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (Windows/20051201)
In-Reply-To: <dvbnmt$eem$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10883

Thanks. I isolated the problem by mixing and matching. Turns out there 
was a sneaky deadlock situation in my sr code which never surfaced before.



Matt Falkenhagen wrote:
> Naeim Semsarilar wrote:
>> Hi,
>>
>> I'm using
>> ftpcopy: reference
>> sr: my own
>> stcp: my own
>>
>> I run these commands:
>>
>> sr -t 21 -v vrouter -r vrouter_rtable -s vns-1 &
>> ./ftpcopy_vns -t 21 -v vhost -r vhost_rtable -s vns-1 mp3 0 
>> 192.168.130.12 rcv pub
>>
>> It downloads the file smoothly and everything. Then if I try running 
>> ftpcopy_vns (the second command) again, vhost sends 6 ARP requests and 
>> I get:
>>
>> ERROR: Connection refused (-1)
>>
>> This is not expected behavior is it? If I kill the sr running in 
>> vrouter and run it again, it works again.
>>
>> Any ideas?
> 
> No this is not expected.  Have you tried with just your sr or just your 
> stcp?
.

Path: shelby.stanford.edu!not-for-mail
From: Matt Falkenhagen <mjf@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: reference ftpcopy error???
Date: Thu, 16 Mar 2006 23:40:05 -0800
Lines: 23
Distribution: su
Message-ID: <dvdp4m$rjb$1@news.Stanford.EDU>
References: <dvdonl$r22$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
In-Reply-To: <dvdonl$r22$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10884

Samantha Kwan Chan wrote:
> Hi
> 
> I executed the following command:
> 
> ../ftpcopy_vns -r ../vhost_rtable -t 57 -s vns-1 -v vhost gz 1
> ftp.cs.stanford.edu . .
> 
> The reference ftpcopy actually went into the gnu directory and ftp out all
> the .gz files in that level.  However, the gnu directory is actually a
> symbolic link path.  Our ftpcopy explicitly said don't go into symbolic
> path.
> 
> So which is correct?  Currently my implementation do not go into a
> directory that is symboliclly linked.
> 
> thanks,
> Sam
> 
> 

Yeah several ppl reported this, it appears to be a bug in the reference 
ftpcopy.  We'll find a directory free of symlinks to test on.
.

Path: shelby.stanford.edu!not-for-mail
From: "Sutthipong Thavisomboon" <sthavis@stanford.edu>
Newsgroups: su.class.cs244a
Subject: FTPserver on STCP
Date: Fri, 17 Mar 2006 00:10:52 -0800
Lines: 14
Distribution: su
Message-ID: <dvdquf$2fm$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10885

Hi,

I tested my code with a ftpd running on my STCP and I saw some strange 
behaviors such as having a RST message. I'm not sure why but since STCP does 
not handle RST, my program just hangs. and I have no idea how I can debug 
this. My question is that are we supposed to support this case where 
ftpserver is running on STCP? Or are we only expected to support the case 
where we download files from ftpserver running on a real TCP such as 
ftp.cs.stanford.edu

Thanks,
Sutthipong 


.

Path: shelby.stanford.edu!not-for-mail
From: Sunny Balwani <sunnybalwani@hotmail.com>
Newsgroups: su.class.cs244a
Subject: PORT command fails on ftp.cs.stanford.edu
Date: Fri, 17 Mar 2006 00:55:44 -0800
Lines: 17
Distribution: su
Message-ID: <C03FB990.3A51%sunnybalwani@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Microsoft-Entourage/11.2.3.060209
Thread-Topic: PORT command fails on ftp.cs.stanford.edu
Thread-Index: AcZJoJM10d2dm7WTEdqFKQARJHuZqg==
Xref: shelby.stanford.edu su.class.cs244a:10886

Hi.

My ftpcopy_vns works fine with internal ftp server but with
ftp.cs.stanford.edu it fails on PORT command.

I need to confirm the following to make sure this is how its to be done:

I am calling mylocalip() properly and it return the host ip address
correctly (192.168.130.139 in my case).  I am picking up local port on which
to listen on by calling mygetsockname() before I call mylocalip() to get
local ip.  I assume this is correct?

Would appreciate the help.

Thanks.
Sunny

.

Path: shelby.stanford.edu!not-for-mail
From: "Brent Ellwein" <baellwe@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: how to test stcp_echo_server and stcp_echo_client
Date: Fri, 17 Mar 2006 01:33:41 -0800
Lines: 47
Distribution: su
Message-ID: <dvdvre$78l$1@news.Stanford.EDU>
References: <Pine.GSO.4.44.0603140030430.20377-100000@elaine20.Stanford.EDU> <dv6gvd$cej$1@news.Stanford.EDU> <dvb7jm$qui$1@news.Stanford.EDU> <dvdk98$n37$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10887

It turns out that I was sending FIN's without the ACK bit set (which I 
thought was ok).  But when I included the ACK bit it started working.

Brent

"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message 
news:dvdk98$n37$1@news.Stanford.EDU...
> Seems odd to me. Can you post your ethereal log file?
>
> Ari
>
> Brent Ellwein wrote:
>> So I try to run the commands as you suggested, but I'm seeing odd 
>> behavior.
>>
>> Once I close the connection from telnet, my transport recieves and ACKs a 
>> FIN.  However, when it tries to send it's own FIN, no response is 
>> received. Looking at the nice verbose reference sr output, it appears 
>> that telnet doesn't actually bother to try and send an akc for my FIN. 
>> Is this normal behavior, or an indication that I'm doing something 
>> incorrectly?
>>
>> Thanks,
>> Brent
>>
>>
>>>The two bullets on the slide are two separate things you can do.  You can 
>>>run:
>>>
>>>  $ stcp_echo_server ?t topoid ?v vhost
>>>
>>>to have stcp_echo_server run on vhost, and then from there you can do:
>>>
>>>  $ telnet (ip of your vhost) 7
>>>
>>>to connect to your echo server (7 is the echo server port) from elaine or 
>>>whatever.
>>>
>>>The other thing you can do is run:
>>>
>>>  $ stcp_echo_client ?t topoid ?v vhost klamath
>>>
>>>Which will run echo_client as vhost and connect to klamath.stanford.edu 
>>>from there.
>>
>> 

.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: FTPserver on STCP
Date: Fri, 17 Mar 2006 03:08:45 -0800
Lines: 25
Distribution: su
Message-ID: <dve5iq$dfb$1@news.Stanford.EDU>
References: <dvdquf$2fm$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dvdquf$2fm$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10888

You should be compatible with both.

One common problem that many people seem to have experienced that could 
perhaps lead to a RST packet being sent is connection teardown -- off 
the top of my head I would suggest making sure that you are handling 
FINs correctly, that you always have the ACK bit set, and that you can 
handle incoming FINs on packets containing data as well.

Ari

Sutthipong Thavisomboon wrote:
> Hi,
> 
> I tested my code with a ftpd running on my STCP and I saw some strange 
> behaviors such as having a RST message. I'm not sure why but since STCP does 
> not handle RST, my program just hangs. and I have no idea how I can debug 
> this. My question is that are we supposed to support this case where 
> ftpserver is running on STCP? Or are we only expected to support the case 
> where we download files from ftpserver running on a real TCP such as 
> ftp.cs.stanford.edu
> 
> Thanks,
> Sutthipong 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: Daniel Holbert <dholbert@NOSPAM.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Reference FTPCopy doesn't ignore symbolic links
Date: Fri, 17 Mar 2006 05:44:29 -0800
Lines: 28
Distribution: su
Message-ID: <dveeg6$ok6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
Xref: shelby.stanford.edu su.class.cs244a:10889

Hi TA's,

Unless I'm misunderstanding something, I think the reference ftpcopy_vns 
mishandles symbolic links.  It treats symlinks as normal directories, 
but it should ignore them -- according to the hw1 specification: "Your 
utility should ignore any symbolic links it encounters."

This behavior arises when I execute this command:

  our.ftpcopy_vns -v vhost -t 72 -r rtable -s vns-1.stanford.edu txt \
    3 ftp.cs.stanford.edu

The result of the above command is that I end up with just a "gnu" 
subdirectory and no other directories, when in fact the "cs" and "pub" 
directories should also have been downloaded.  I think this happens 
because ftpcopy_vns happens to pick "gnu" as the first directory to 
descend into, and "gnu" is a symlink, and when it finishes "gnu" and 
tries to step back to the root directory with a "cd .." command, it 
instead steps back one level to the *actual* parent of the gnu 
directory.  Then, it's in the wrong location and can't find any of the 
other directories it was looking for, so it just finishes quickly and quits.

This isn't a huge issue --  I just thought I'd report it for the benefit 
of future classes and for anyone else who might be confused about 
differences in output.

Thanks,
~Daniel
.

Path: shelby.stanford.edu!not-for-mail
From: Martin Casado <casado@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: Reference FTPCopy doesn't ignore symbolic links
Date: Fri, 17 Mar 2006 11:25:25 -0800
Lines: 37
Distribution: su
Message-ID: <dvf2f5$hqr$1@news.Stanford.EDU>
References: <dveeg6$ok6$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Thunderbird 1.5 (X11/20051201)
In-Reply-To: <dveeg6$ok6$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10890

I took a look at the reference code.  It turns out we're using a really 
old version that was built when the requirements for symlinks was 
different.  This should really be updated, thanks for pointing it out.

cheers,
Martin


> Hi TA's,
> 
> Unless I'm misunderstanding something, I think the reference ftpcopy_vns 
> mishandles symbolic links.  It treats symlinks as normal directories, 
> but it should ignore them -- according to the hw1 specification: "Your 
> utility should ignore any symbolic links it encounters."
> 
> This behavior arises when I execute this command:
> 
>  our.ftpcopy_vns -v vhost -t 72 -r rtable -s vns-1.stanford.edu txt \
>    3 ftp.cs.stanford.edu
> 
> The result of the above command is that I end up with just a "gnu" 
> subdirectory and no other directories, when in fact the "cs" and "pub" 
> directories should also have been downloaded.  I think this happens 
> because ftpcopy_vns happens to pick "gnu" as the first directory to 
> descend into, and "gnu" is a symlink, and when it finishes "gnu" and 
> tries to step back to the root directory with a "cd .." command, it 
> instead steps back one level to the *actual* parent of the gnu 
> directory.  Then, it's in the wrong location and can't find any of the 
> other directories it was looking for, so it just finishes quickly and 
> quits.
> 
> This isn't a huge issue --  I just thought I'd report it for the benefit 
> of future classes and for anyone else who might be confused about 
> differences in output.
> 
> Thanks,
> ~Daniel
.

Path: shelby.stanford.edu!elaine30.Stanford.EDU!sanchezm
From: Miguel Sanchez <sanchezm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 1972 ARPAnet documentary
Date: Sun, 19 Mar 2006 12:54:44 -0800
Lines: 8
Distribution: su
Message-ID: <Pine.GSO.4.44.0603191252110.8883-100000@elaine30.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
Xref: shelby.stanford.edu su.class.cs244a:10891

if you're looking for a 30 minute break from finals studying, you might
find this 1972 documentary interesting

http://video.google.com/videoplay?docid=-7426343190324622223

- Miguel


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: 2004 final, #6
Date: Tue, 21 Mar 2006 19:47:48 -0800
Lines: 50
Distribution: su
Message-ID: <dvqhd5$edr$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10892

Question 6 of the 2004 Final (appended below) has me confused, on a 
seemingly simple point.  The correct answer is d., +/- 1000 ppm.   But that 
is not what I calculate....



Tolerance in ppm  = (Rmax-Rmin)/R * 10^6

                = (100.001 MHz - 99.999 MHz)/(100 MHz) * 10^6

                = (0.002)/(100)  * 10^6

                = 20 ppm



....which is not even close to 1000 ppm.  Where am I going wrong?



Thanks,

-- Bruce





6. Elasticity Buffer. An elasticity buffer is used to store bits arriving at 
a network interface. If the receiving

station uses a 200-bit elasticity buffer and the clocks of the transmitter 
and receiver have a minimum

frequency of 99.999MHz and a maximum frequency of 100.001MHz, which of the 
following statements

are true:

(a.) All packets have to be less than or equal to 12,500 bytes long.

(b.) All packets have to be less than or equal to 4500 bytes long.

(c.) The clocks have a tolerance of +/- 100 ppm.

(d.) The clocks have a tolerance of +/- 1000 ppm.

(e.) The transmitter's clock is always faster than the receiver's clock.


.

Path: shelby.stanford.edu!elaine10.Stanford.EDU!wkso
From: Wai Kei So <wkso@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2004 final, #6
Date: Tue, 21 Mar 2006 22:13:07 -0800
Lines: 58
Distribution: su
Message-ID: <Pine.GSO.4.44.0603212212200.203-100000@elaine10.Stanford.EDU>
References: <dvqhd5$edr$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Complaints-To: news@news.stanford.edu
In-Reply-To: <dvqhd5$edr$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10893

I think the crux is:  100.001 Mhz = 100001000 hz.  Hence 1000 ppm.

-wks

On Tue, 21 Mar 2006, Bruce Schechter wrote:

> Question 6 of the 2004 Final (appended below) has me confused, on a
> seemingly simple point.  The correct answer is d., +/- 1000 ppm.   But that
> is not what I calculate....
>
>
>
> Tolerance in ppm  = (Rmax-Rmin)/R * 10^6
>
>                 = (100.001 MHz - 99.999 MHz)/(100 MHz) * 10^6
>
>                 = (0.002)/(100)  * 10^6
>
>                 = 20 ppm
>
>
>
> ...which is not even close to 1000 ppm.  Where am I going wrong?
>
>
>
> Thanks,
>
> -- Bruce
>
>
>
>
>
> 6. Elasticity Buffer. An elasticity buffer is used to store bits arriving at
> a network interface. If the receiving
>
> station uses a 200-bit elasticity buffer and the clocks of the transmitter
> and receiver have a minimum
>
> frequency of 99.999MHz and a maximum frequency of 100.001MHz, which of the
> following statements
>
> are true:
>
> (a.) All packets have to be less than or equal to 12,500 bytes long.
>
> (b.) All packets have to be less than or equal to 4500 bytes long.
>
> (c.) The clocks have a tolerance of +/- 100 ppm.
>
> (d.) The clocks have a tolerance of +/- 1000 ppm.
>
> (e.) The transmitter's clock is always faster than the receiver's clock.
>
>
>

.

Path: shelby.stanford.edu!not-for-mail
From: "Krishna Monian" <kmonian@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2004 final, #6
Date: Tue, 21 Mar 2006 22:58:22 -0800
Lines: 58
Distribution: su
Message-ID: <dvqsjd$r87$1@news.Stanford.EDU>
References: <dvqhd5$edr$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10894

Its +/- 1000ppm

~ Krishna

"Bruce Schechter" <bruceds@stanford.edu> wrote in message 
news:dvqhd5$edr$1@news.Stanford.EDU...
> Question 6 of the 2004 Final (appended below) has me confused, on a 
> seemingly simple point.  The correct answer is d., +/- 1000 ppm.   But 
> that is not what I calculate....
>
>
>
> Tolerance in ppm  = (Rmax-Rmin)/R * 10^6
>
>                = (100.001 MHz - 99.999 MHz)/(100 MHz) * 10^6
>
>                = (0.002)/(100)  * 10^6
>
>                = 20 ppm
>
>
>
> ...which is not even close to 1000 ppm.  Where am I going wrong?
>
>
>
> Thanks,
>
> -- Bruce
>
>
>
>
>
> 6. Elasticity Buffer. An elasticity buffer is used to store bits arriving 
> at a network interface. If the receiving
>
> station uses a 200-bit elasticity buffer and the clocks of the transmitter 
> and receiver have a minimum
>
> frequency of 99.999MHz and a maximum frequency of 100.001MHz, which of the 
> following statements
>
> are true:
>
> (a.) All packets have to be less than or equal to 12,500 bytes long.
>
> (b.) All packets have to be less than or equal to 4500 bytes long.
>
> (c.) The clocks have a tolerance of +/- 100 ppm.
>
> (d.) The clocks have a tolerance of +/- 1000 ppm.
>
> (e.) The transmitter's clock is always faster than the receiver's clock.
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Nikhil Raghavan" <nikhilr@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2004 final, #6
Date: Wed, 22 Mar 2006 01:31:47 -0800
Lines: 84
Distribution: su
Message-ID: <dvr5i8$ah1$1@news.Stanford.EDU>
References: <dvqhd5$edr$1@news.Stanford.EDU> <dvqsjd$r87$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10895

Hi ,
      Rmax and Rmin are rates in terms of bits/sec or packets/s .
The question has a couple of frequencies mentioned in it.  I dont think
it makes sense to just plug those values into a equation that is meant for
rates (that concern different units and quantities).

My reasoning for this was as follows : (if you think im wrong, please
do let me know.)
So, the difference in the frequencies = 0.002 * 10^(-6).
0.002 * 10 ^-6 is the range(in terms of frequency).
The range is just the span between fmax to fmin.
Hence the tolerance(+/-) value = 1/2 of this range.
hence the tolerance in terms of freq = 0.002(* 10^ -6) / 2.
= 0.001(*10^-6).
frequency = 1/Time.
hence Time =  1/frequency.
so the clock tolerance  =(+/-)  1/(0.001 * 10^ - 6)
                                   = (+/-) 1000 (* 10 ^ 6 ) = +/- 1000 ppm..

If ive got something wrong here...do let me know.

 Hence the clock tolerance
"Krishna Monian" <kmonian@stanford.edu> wrote in message 
news:dvqsjd$r87$1@news.Stanford.EDU...
> Its +/- 1000ppm
>
> ~ Krishna
>
> "Bruce Schechter" <bruceds@stanford.edu> wrote in message 
> news:dvqhd5$edr$1@news.Stanford.EDU...
>> Question 6 of the 2004 Final (appended below) has me confused, on a 
>> seemingly simple point.  The correct answer is d., +/- 1000 ppm.   But 
>> that is not what I calculate....
>>
>>
>>
>> Tolerance in ppm  = (Rmax-Rmin)/R * 10^6
>>
>>                = (100.001 MHz - 99.999 MHz)/(100 MHz) * 10^6
>>
>>                = (0.002)/(100)  * 10^6
>>
>>                = 20 ppm
>>
>>
>>
>> ...which is not even close to 1000 ppm.  Where am I going wrong?
>>
>>
>>
>> Thanks,
>>
>> -- Bruce
>>
>>
>>
>>
>>
>> 6. Elasticity Buffer. An elasticity buffer is used to store bits arriving 
>> at a network interface. If the receiving
>>
>> station uses a 200-bit elasticity buffer and the clocks of the 
>> transmitter and receiver have a minimum
>>
>> frequency of 99.999MHz and a maximum frequency of 100.001MHz, which of 
>> the following statements
>>
>> are true:
>>
>> (a.) All packets have to be less than or equal to 12,500 bytes long.
>>
>> (b.) All packets have to be less than or equal to 4500 bytes long.
>>
>> (c.) The clocks have a tolerance of +/- 100 ppm.
>>
>> (d.) The clocks have a tolerance of +/- 1000 ppm.
>>
>> (e.) The transmitter's clock is always faster than the receiver's clock.
>>
>>
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Bruce Schechter" <bruceds@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2004 final, #6
Date: Wed, 22 Mar 2006 09:26:58 -0800
Lines: 68
Distribution: su
Message-ID: <dvs1d4$h5i$1@news.Stanford.EDU>
References: <dvqhd5$edr$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10896

I emailed prof McKeown.  Here is his answer....
     clocks differ by +/- 0.001 out of 100, which is +/- 0.001 percent, or

     +/- 0.001* (10^6/10^2) ppm = +/-10ppm.

     So yes, I agree with you. Thanks for pointing it out. I have a vague

      recollection of this being caught when grading, but I guess it didn't 
make it to the solution :-(

     Good luck tomorrow.

Likewise, Good luck tonight everyone!  -- Bruce

"Bruce Schechter" <bruceds@stanford.edu> wrote in message 
news:dvqhd5$edr$1@news.Stanford.EDU...
> Question 6 of the 2004 Final (appended below) has me confused, on a 
> seemingly simple point.  The correct answer is d., +/- 1000 ppm.   But 
> that is not what I calculate....
>
>
>
> Tolerance in ppm  = (Rmax-Rmin)/R * 10^6
>
>                = (100.001 MHz - 99.999 MHz)/(100 MHz) * 10^6
>
>                = (0.002)/(100)  * 10^6
>
>                = 20 ppm
>
>
>
> ...which is not even close to 1000 ppm.  Where am I going wrong?
>
>
>
> Thanks,
>
> -- Bruce
>
>
>
>
>
> 6. Elasticity Buffer. An elasticity buffer is used to store bits arriving 
> at a network interface. If the receiving
>
> station uses a 200-bit elasticity buffer and the clocks of the transmitter 
> and receiver have a minimum
>
> frequency of 99.999MHz and a maximum frequency of 100.001MHz, which of the 
> following statements
>
> are true:
>
> (a.) All packets have to be less than or equal to 12,500 bytes long.
>
> (b.) All packets have to be less than or equal to 4500 bytes long.
>
> (c.) The clocks have a tolerance of +/- 100 ppm.
>
> (d.) The clocks have a tolerance of +/- 1000 ppm.
>
> (e.) The transmitter's clock is always faster than the receiver's clock.
>
> 


.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: rho sigmae constraint
Date: Wed, 22 Mar 2006 14:08:17 -0800
Lines: 17
Distribution: su
Message-ID: <dvshsh$b9f$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Xref: shelby.stanford.edu su.class.cs244a:10897

I had 2 questions:

1. is it possible for the avg arrival rate that has dropped much below rho 
to come up to an avg of rho by having a burst of sigma or cud there be cases 
where the avg rate would never be able to come back to rho once it drops 
down a lot (=> more than sigma).

2. referring to slide 29 in HO9:
is this correct:
over all time sigma rho shd be satisfied.. i.e we draw the rho sigma line 
(blue line) for every t on A(t) then A(t) should be such that it is below 
the min of all the blue lines.

thnaks
Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: Ari Greenberg <arigreen@cs.stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: rho sigmae constraint
Date: Wed, 22 Mar 2006 14:59:46 -0800
Lines: 31
Distribution: su
Message-ID: <dvsl40$ggj$1@news.Stanford.EDU>
References: <dvshsh$b9f$1@news.Stanford.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@news.stanford.edu
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
X-Accept-Language: en-us, en
In-Reply-To: <dvshsh$b9f$1@news.Stanford.EDU>
Xref: shelby.stanford.edu su.class.cs244a:10898

Forum Mangal Parmar wrote:
> I had 2 questions:
> 
> 1. is it possible for the avg arrival rate that has dropped much below rho 
> to come up to an avg of rho by having a burst of sigma or cud there be cases 
> where the avg rate would never be able to come back to rho once it drops 
> down a lot (=> more than sigma).

There could be cases where the average arrival rate drops more than 
sigma bytes below rho -- for example if sigma = 100 bytes and rho is 100 
bytes/second, then if no bytes at all are sent for the first two seconds 
then the arrival rate A(t) will never equal rho*t, even if a burst of 
sigma is received. I'm not sure if this answers your question.

> 
> 2. referring to slide 29 in HO9:
> is this correct:
> over all time sigma rho shd be satisfied.. i.e we draw the rho sigma line 
> (blue line) for every t on A(t) then A(t) should be such that it is below 
> the min of all the blue lines.

Over any interval t, it must be the case that no more than sigma + 
rho(t) bytes arrive.Yes, it is always beneath the min of the blue lines 
in this diagram.

Ari
> 
> thnaks
> Forum 
> 
> 
.

Path: shelby.stanford.edu!not-for-mail
From: "Forum Mangal Parmar" <forumm@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: rho sigmae constraint
Date: Wed, 22 Mar 2006 15:53:56 -0800
Lines: 34
Distribution: su
Message-ID: <dvsrkj$psl$1@news.Stanford.EDU>
References: <dvshsh$b9f$1@news.Stanford.EDU> <dvsl40$ggj$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Xref: shelby.stanford.edu su.class.cs244a:10899

thanks a lot Ari!
"Ari Greenberg" <arigreen@cs.stanford.edu> wrote in message 
news:dvsl40$ggj$1@news.Stanford.EDU...
> Forum Mangal Parmar wrote:
>> I had 2 questions:
>>
>> 1. is it possible for the avg arrival rate that has dropped much below 
>> rho to come up to an avg of rho by having a burst of sigma or cud there 
>> be cases where the avg rate would never be able to come back to rho once 
>> it drops down a lot (=> more than sigma).
>
> There could be cases where the average arrival rate drops more than sigma 
> bytes below rho -- for example if sigma = 100 bytes and rho is 100 
> bytes/second, then if no bytes at all are sent for the first two seconds 
> then the arrival rate A(t) will never equal rho*t, even if a burst of 
> sigma is received. I'm not sure if this answers your question.
>
>>
>> 2. referring to slide 29 in HO9:
>> is this correct:
>> over all time sigma rho shd be satisfied.. i.e we draw the rho sigma line 
>> (blue line) for every t on A(t) then A(t) should be such that it is below 
>> the min of all the blue lines.
>
> Over any interval t, it must be the case that no more than sigma + rho(t) 
> bytes arrive.Yes, it is always beneath the min of the blue lines in this 
> diagram.
>
> Ari
>>
>> thnaks
>> Forum 


.

Path: shelby.stanford.edu!not-for-mail
From: "Waynn Lue" <wlue@stanford.edu>
Newsgroups: su.class.cs244a
Subject: Re: 2004 final, #6
Date: Wed, 22 Mar 2006 17:08:02 -0800
Lines: 82
Distribution: su
Message-ID: <dvssdd$qqr$1@news.Stanford.EDU>
References: <dvqhd5$edr$1@news.Stanford.EDU> <dvs1d4$h5i$1@news.Stanford.EDU>
X-Complaints-To: news@news.stanford.edu
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Xref: shelby.stanford.edu su.class.cs244a:10900

Hm, so does that mean there was no correct answer to the question?  I
calculated the max packet size to be 1,250,000 bytes, which also isn't an
answer.  I may have messed it up, though.

Waynn

"Bruce Schechter" <bruceds@stanford.edu> wrote in message
news:dvs1d4$h5i$1@news.Stanford.EDU...
> I emailed prof McKeown.  Here is his answer....
>      clocks differ by +/- 0.001 out of 100, which is +/- 0.001 percent, or
>
>      +/- 0.001* (10^6/10^2) ppm = +/-10ppm.
>
>      So yes, I agree with you. Thanks for pointing it out. I have a vague
>
>       recollection of this being caught when grading, but I guess it
didn't
> make it to the solution :-(
>
>      Good luck tomorrow.
>
> Likewise, Good luck tonight everyone!  -- Bruce
>
> "Bruce Schechter" <bruceds@stanford.edu> wrote in message
> news:dvqhd5$edr$1@news.Stanford.EDU...
> > Question 6 of the 2004 Final (appended below) has me confused, on a
> > seemingly simple point.  The correct answer is d., +/- 1000 ppm.   But
> > that is not what I calculate....
> >
> >
> >
> > Tolerance in ppm  = (Rmax-Rmin)/R * 10^6
> >
> >                = (100.001 MHz - 99.999 MHz)/(100 MHz) * 10^6
> >
> >                = (0.002)/(100)  * 10^6
> >
> >                = 20 ppm
> >
> >
> >
> > ...which is not even close to 1000 ppm.  Where am I going wrong?
> >
> >
> >
> > Thanks,
> >
> > -- Bruce
> >
> >
> >
> >
> >
> > 6. Elasticity Buffer. An elasticity buffer is used to store bits
arriving
> > at a network interface. If the receiving
> >
> > station uses a 200-bit elasticity buffer and the clocks of the
transmitter
> > and receiver have a minimum
> >
> > frequency of 99.999MHz and a maximum frequency of 100.001MHz, which of
the
> > following statements
> >
> > are true:
> >
> > (a.) All packets have to be less than or equal to 12,500 bytes long.
> >
> > (b.) All packets have to be less than or equal to 4500 bytes long.
> >
> > (c.) The clocks have a tolerance of +/- 100 ppm.
> >
> > (d.) The clocks have a tolerance of +/- 1000 ppm.
> >
> > (e.) The transmitter's clock is always faster than the receiver's clock.
> >
> >
>
>


.