Re: Crypto Coding Project - TCP broadcasts won't work for chat.

New Message Reply About this list Date view Thread view Subject view Author view

Ray Arachelian (sunder@brainlink.com)
Thu, 20 Aug 1998 13:27:56 -0400


Perry E. Metzger wrote:
>
> Ray Arachelian writes:
> > Mok-Kong Shen wrote:
> > >
> > > Perry E. Metzger wrote:
> > >
> > > > Remember, UDP is unreliable, so you have to build a reliable structure
> > > > on top of it. By the time you are done, what you have usually ends up
> > > > looking like TCP anyway, only less well designed and implemented.
> > >
> > > Simply a question from an ignorant: Can TCP do a braodcast?
> >
> > Yes, but that wouldn't work for a chat program unless all of your clients
> > live on the same tcp network.
>
> This must be some TCP I was heretofore unfamiliar with.

Must be. If I recall correctly, the topic was about building a chat program.
If you use TCP broadcasts, you've two choices: 255.255.255.255 which will
certainly be filtered by your router, or direct broadcasts which will be sent
to the broadcast address of that net.

i.e. for 198.68.5.0/24 this would be 198.68.5.255. Every machine on that
subnet will receive the broadcast. Not all of the machines on that subnet are
going to partake in the conversation. Further, unless you're on the 198.68.5.0
net,
you'll have to go through a router, and due to lovely things such as smurfing
and other similar attacks most routers generally filter out directed broadcasts
these days.

Besides, even if you do have clients behind routers that accept directed
broadcasts, most of the machines on that net won't be taking part in the chat,
and you'll just be wasting their cpu cycles while they look at and discard the
tcp frames. You'd also wind up pissing off admins of those subnets who don't
like their resources wasted just because one dude wants to chat.

Further, since you're not at the client's network, you've almost no way of
knowing his netmask, hence you won't know the broadcast address of his net. If
he's on a subnetted class B, i.e. 128.5.8.13/27 and you do a broadcast, your
broadcast is not likely to reach him if you assume 128.5.255.255 since the
router handling the subnet will drop the packets.

So like I said, unless the project involves all of the clients living in the
same subnet, using TCP broadcasts ain't gonna cut it.

-- 

=====================================Kaos=Keraunos=Kybernetos============== .+.^.+.| Ray Arachelian |Prying open my 3rd eye. So good to see |./|\. ..\|/..|sunder@sundernet.com|you once again. I thought you were |/\|/\ <--*-->| ------------------ |hiding, and you thought that I had run |\/|\/ ../|\..| "A toast to Odin, |away chasing the tail of dogma. I opened|.\|/. .+.v.+.|God of screwdrivers"|my eye and there we were.... |..... ======================= http://www.sundernet.com ==========================


New Message Reply About this list Date view Thread view Subject view Author view

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

The following archive was created by hippie-mail 7.98617-22 on Sat Apr 10 1999 - 01:10:59