Re: Tcl-Tk and network.



Uwe Klein wrote:
> Melissa Schrumpf wrote:

> > http://wiki.tcl.tk/udp

> > And found that it would work as expected with normal IP addresses, but
> > that it didn't work for broadcast. Oddly, it's the client side (sending
> > to a UDP broadcast address) that doesn't seem to work, because I can use
> > the server side of this and send raw UDP packets from a compiled C
> > program I wrote, and it receives ok. For some reason, it doesn't look
> > like the udp package supports sending to a broadcast address.

> have you traced your broadcast packets with tcpdump? There is a good
> chance that you send them to the localloop (127.0.0.0) and not eth[01].

Yes.

% set sock [udp_create 127.0.0.1 2345]; puts $sock TOFROMLO;
close $sock

Results in:

10:50:41.675964 IP (tos 0x0, ttl 64, id 15749, offset 0, flags
[none], length: 36, bad cksum 0 (->3f42)!) 127.0.0.1.50571 >
127.0.0.1.2345: [bad udp cksum feb4!] UDP, length: 8

10:50:41.676034 IP (tos 0x0, ttl 64, id 15750, offset 0, flags
[none], length: 29, bad cksum 0 (->3f48)!) 127.0.0.1.50571 >
127.0.0.1.2345: [bad udp cksum 2b08!] UDP, length: 1

And shows up in the "server" tclsh process:

127.0.0.1 50571: 8 {TOFROMLO}
127.0.0.1 50571: 1 {
}

set sock [udp_create 192.168.1.9 2345] ;puts $sock TOFROMLE0; close $sock

Results in:

11:00:24.753053 IP (tos 0x0, ttl 64, id 16765, offset 0, flags
[none], length: 37, bad cksum 0 (->b5e8)!) 192.168.1.9.50608 >
192.168.1.9.2345: [bad udp cksum c3d5!] UDP, length: 9

11:00:24.753124 IP (tos 0x0, ttl 64, id 16766, offset 0, flags
[none], length: 29, bad cksum 0 (->b5ef)!) 192.168.1.9.50608 >
192.168.1.9.2345: [bad udp cksum 2022!] UDP, length: 1

And shows up in the "server" tclsh process:

192.168.1.9 50588: 9 {TOFROMLE0}
192.168.1.9 50588: 1 {
}

set sock [udp_create 192.168.1.255 2345] ;puts $sock TOBCAST; close $sock

Does not get sent at all. On any interface.

On the other hand:

sudo ./sendraw -prot udp -sip 192.168.1.9 -dip 192.168.1.255 -sp 5678
-dp 2345 -p BCASTFROMSENDRAW

11:01:39.421322 IP (tos 0x0, ttl 255, id 16789, offset 0, flags [none],
length: 44) 192.168.1.9.5678 > 192.168.1.255.2345: [udp sum ok] UDP,
length: 16

11:01:40.139676 IP (tos 0x0, ttl 64, id 16790, offset 0, flags [none],
length: 130) 192.168.1.9.631 > 192.168.1.255.631: UDP, length: 102

Server:

192.168.1.9 5678: 16 {BCASTFROMSENDRAW}

> > Reading down that page, I find this to be known for Linux, though it may
> > work on Windows. I just confirmed OS X won't broadcast either. It says
> > there's a development branch that may work.

> I have used multicast for this ( serverless point to multipoint ) with
> the udp implementations from scotty and tcludp in the vein of tequila.

What, like 224.*?

--
MKS
.



Relevant Pages

  • Re: Suggestion
    ... Yes database is a single point of failure, but that's not relevant in my ... But if the socket server goes down all of the clients are down - single ... Use UDP and a broadcast, have all clients monitor the same UDP ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Suggestion
    ... But if the socket server goes down all of the clients are down - single ... Use UDP and a broadcast, have all clients monitor the same UDP ... I am wondering how you don't have a central point of failure with a ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: client-server network
    ... the msg using sendto..then waits for a reply from the server using ... sent by server didn't reach the client...... ... Note that for broadcast, you must set the SO_BROADCAST option, which your ... UDP might not be better than TCP, ...
    (microsoft.public.vc.mfc)
  • Re: How to stop UDP port 86 BroadCast
    ... > Is it possible multipal CCITCP server can talk to each other without ... > using UDP port 86 broadcast. ... > 86 broadcast on all WAN then server-B replay it. ... you don't need more than one ccitcp2 process per LAN segment ...
    (comp.lang.cobol)
  • RE: IP addresses and VPN
    ... UDP on all machines in the network or just the servers at each end of the VPN ... > Browser receives server announcements from another computer, ... > Microsoft CSS Online Newsgroup Support ... > This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)