PDA

View Full Version : Network Utility



twj42
2009-04-30, 02:26
Due to the nature of my network, and the disparate players I have (Slimp3, Softsqueeze & slimrio), it would be very very handy if I had a network utility that listened for player broadcasts and responded with the Squeezecentre IP address.

Before I start wrestling with Perl, I wonder if this has been done before? Alternatively can anyone suggest a Perl script that would be a good start for me to modify? I know Perl but have never done any network programming using it. This is for a Windows environment.

Cheers

Tim

snarlydwarf
2009-05-01, 12:55
This should be done automatically already.

The SB's broadcast a "discovery" packet to find servers, servers respond.

Perhaps you have a firewall or something interfering with this process?

pippin
2009-05-01, 13:15
Perhaps you have a firewall or something interfering with this process?

Could just be a router.

twj42
2009-05-02, 15:57
Yes, I realise that it should work automatically, but my Squeezecentre is on a multi homed firewall and just is not found reliably.

A simple utility as I have described should solve the problem.

Cheers

Tim

pippin
2009-05-02, 16:12
A simple utility as I have described should solve the problem.


No, it would not because it would have the same issue: You can't reach a server (or utility) reliably with a broadcast through a router or firewall.

twj42
2009-05-03, 02:53
Perhaps I haven't explained it properly - it would respond to the broadcast with a direct packet containing the IP of the Squeezecentre.

I've come across this type of utility before with software that relies on broadcast yet may have to work in a multi IP subnet environment. Called a relay agent IIRC.

Cheers

Tim

pippin
2009-05-03, 05:53
That's exactly what SC's server discovery does. The problem is not the reply but that the broadcast doesnt come through

radish
2009-05-04, 08:35
That's exactly what SC's server discovery does. The problem is not the reply but that the broadcast doesnt come through

Right, so you put this agent on the same subnet as the client, not the server. It sees the broadcast, and replies with a preset IP (pointing to the server which never saw the broadcast because it's on another subnet). I can see how it would work, but I've never seen such a thing in reality. Should be pretty easy to put together though.

pippin
2009-05-04, 08:46
Right, so you put this agent on the same subnet as the client, not the server. It sees the broadcast, and replies with a preset IP (pointing to the server which never saw the broadcast because it's on another subnet). I can see how it would work, but I've never seen such a thing in reality. Should be pretty easy to put together though.

Ah, I start to understand. You want to simulate the server discovery reply to make the player find the server and connect?
Would this work (the player would have to ignore the IP address of the proxy)?
Plus you would still have to manually configure the proxy.

radish
2009-05-04, 09:41
Would this work (the player would have to ignore the IP address of the proxy)?

The discovery protocol appears to allow for it, the IP should be embedded in the response.



Plus you would still have to manually configure the proxy.
Indeed.

pippin
2009-05-04, 10:17
The discovery protocol appears to allow for it, the IP should be embedded in the response.


I know, I've used it. The question is: do the players use this or the source IP of the response. There's good reasons for both since the letter can allow you to use it through a proxy.

radish
2009-05-04, 11:54
I know, I've used it. The question is: do the players use this or the source IP of the response. There's good reasons for both since the letter can allow you to use it through a proxy.

The protocol docs say to use the IP in the packet unless it's 0, in which case use the source IP. I'd be kinda surprised if SD's own players didn't implement their own protocol properly, but I guess you never know.

pippin
2009-05-04, 12:50
I'd be kinda surprised if SD's own players didn't implement their own protocol properly

Actually after implementing the SqueezePlay protocol I would be rather surprised if they did :-)
However, the players have been around a bit longer, so I assume you are correct.