Re: Tcl-Tk and network.
- From: Melissa Schrumpf <m_schrumpf_at_yahoo_com_NOT@xxxxxxxxxxxxx>
- Date: Wed, 11 Jan 2006 11:02:48 -0500
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
.
- Follow-Ups:
- Re: Tcl-Tk and network.
- From: Uwe Klein
- Re: Tcl-Tk and network.
- References:
- Tcl-Tk and network.
- From: Jean-Pierre Morin
- Re: Tcl-Tk and network.
- From: Melissa Schrumpf
- Re: Tcl-Tk and network.
- From: Uwe Klein
- Tcl-Tk and network.
- Prev by Date: Re: Anyone see the New Apple/Intel Presentation?
- Next by Date: Re: Best alternative to bgexec?
- Previous by thread: Re: Tcl-Tk and network.
- Next by thread: Re: Tcl-Tk and network.
- Index(es):
Relevant Pages
|