Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 2 of 3 < 1 2 3 >
Topic Options
#65797 - 02/02/2002 20:28 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Okay. I've changed it so that it just edits the file now without moving and creating stuff.

Before using this version you MUST remove any lines previously added with the old version. Otherwise "Bad Things Will Happen" (tm)

Added the -i argument to attempt to ID all the players as well.

Tell me how this one goes

- Trevor


Attachments
64376-findempeg.exe (32 downloads)


Top
#65798 - 02/02/2002 20:50 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
jimhogan
carpal tunnel

Registered: 06/10/1999
Posts: 2591
Loc: Seattle, WA, U.S.A.
hybrid8: Other than checking on player name to distinguish players, it would (I suspect) also be possible to identify individual players based on their hardware address

In the ugly-but-doable department (sorry if this has already been thrown out and I missed it), one cheap way to do some of this (say if you're talking about a single local subnet) would be to set a script to progressively ping across the entire network address range and pipe an arp -a to grep for your MAC address. Script exits the ping loop when it finds the desired match and cats the IP address back to /etc/hosts.

Any help? (Someday I'll learn sed/awk for this kind of stuff!)
_________________________
Jim


'Tis the exceptional fellow who lies awake at night thinking of his successes.

Top
#65799 - 02/02/2002 20:52 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Very nice. Still working quite well. This method may very well be producing faster results. I've put back the large hosts file.

How about compiling a version under windows that won't need the cygwin dll? I don't plan on removing cygwin, but not requiring it will open the door to a lot more people. In case you're thinking of asking me to compile it for you, I don't have a compiler installed right now except gcc with cygwin.

It might be a good idea to put this up at riocar.org. Right now it's doing everything I wanted this app to do. THANKS!

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65800 - 02/02/2002 21:31 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I don't have another compiler as well I'll have to see if I can port it to MinGW. I've packaged it with the DLL anyway.

I'm trying to make a Linux version but it doesn't like me trying to broadcast a UDP packet for some reason. I'll have to see what I'm doing wrong.

Anybody want any other features added?

I've put it up on my webpage if anybody else wants it. It's here. Who do I ask to put it on riocar.org?

- Trevor

Top
#65801 - 02/02/2002 21:46 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Ask Drakino.

I just messaged him, but he might be off playing a game or something. Probably off crashing new graphics drivers...

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65802 - 02/02/2002 22:02 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Did you set SO_BROADCAST?

Suggestion: send the broadcast out to 255.255.255.255 rather than the official broadcast for the current subnet. This requires less interaction from the user. Routers aren't going to pass the broadcast off the subnet anyway... just makes coding (and using) a bit simpler.
_________________________
--The Amigo

Top
#65803 - 02/02/2002 22:23 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Yup. I do set SO_BROADCAST. It does kind of work in Linux if you do what I've been doing so far and just broadcast on the network broadcast address. I don't know why it doesn't work for 255.255.255.255 though which is what's been puzzling me. I need to run Ethereal to see if it's actually sending it out properly.

I'll change the default broadcast address to 255.255.255.255 in the next version.

Thanks for the help though

- Trevor

Top
#65804 - 02/02/2002 22:37 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Are you coding in C? Would you like a second set of eyes to read the code?
_________________________
--The Amigo

Top
#65805 - 02/02/2002 22:52 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Well, the new drivers didn't crash yet.

But anyhow, any user can go to riocar.org and submit a web site or download to be added to the database. This is the method I prefer actually, unless it needs to be hosted as well.

Top
#65806 - 03/02/2002 00:53 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Even though it only supports command line options for one player, it would be nice to be able to just get back the id info for all.

Back off, man, that's outside my specification.

I call feature creep.
_________________________
Tony Fabris

Top
#65807 - 03/02/2002 01:18 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Tman, your handle is appropriate, as you are THE MAN. I just tried this (after locating a loose copy of cygwin1.dll) and it works like a freaking charm. It does exactly what we needed it to do. I can now connect to my empeg by name on my network, it is freaking brilliant. WOW.

And there were parameters you put in there that I didn't know I needed, like the address of the broadcast subnet. I had to change it from the default as my subnet was one digit off. Worked perfectly. WOW.

(Wiping tear from eye) I love you guys. You're the best. (Sniff.)
_________________________
Tony Fabris

Top
#65808 - 03/02/2002 03:45 Re: empeg protocol [Re: TheAmigo]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
Here's mod mods to the perl version.

Does this work on unix? I tried sending to the broadcast address and it failed for me (on FreeBSD and OS X) with some sort of permission denied error.

Just curious,
-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#65809 - 03/02/2002 08:27 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Glad to see you're happy

I've compiled it for Linux now. It's at the webpage here

I've changed it to now use 255.255.255.255 as the default broadcast address so you shouldn't need to even specify it now. But you can if you still want/need to.

It can also give a default name to all of the empegs it finds on the network. It consists of the serial number appended to empeg- so for mine it's empeg-40103318. Call findempeg with -i as an argument and tell it where the hosts file is.

This is in addition to the old stuff where it will name a specific empeg with a given name.

I'll add multiple name support later for all the people lucky enough to have more than 1 empeg device on their network

- Trevor


Attachments
64476-findempeg.exe (26 downloads)


Top
#65810 - 03/02/2002 08:29 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Yeah. I'm writing it in C. I think I've squashed the bug anyway.

Thanks for the offer

- Trevor

Top
#65811 - 03/02/2002 09:18 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Tman has been nice enough to finalize each version. Beta? We don't need no stinkin' beta. Each version has worked properly for me with its own little feature set. Yay! Make a suggestion, get that suggestion turned into a thread by someone else, and have a finished program in my grubby little hands - all within 24 hours. Cool. That's the way I'd like things to move at work when I put my foot down. Haha.

Oh, Tony, you're using a broadband connection, aren't you? Do you have any idea how long it takes me to connect with my 56Kbit modem now that I have that enormous HOSTS file? Uuuuugh. I think I'm going to have to make my own very cut down version of the ad-list.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65812 - 03/02/2002 10:11 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Oh, Tony, you're using a broadband connection, aren't you? Do you have any idea how long it takes me to connect with my 56Kbit modem now that I have that enormous HOSTS file?

The size of the hosts file should not have any bearing whatsoever on your connection speed. All processing of the file should be happening locally before there's a communication with the modem. In fact, by preventing ad downloads, it should be speeding things up for you.

But, if you are using Windows 2000, there is a known bug in the operating system where you get slowdowns if you have more than a couple entries in your hosts file. Therefore this technique should not be used in Windows 2000. This is described on that page I linked, the page where you got the hosts file. Are you using Windows 2000?

The files at that page are out-of-date, and I wonder if anyone else has taken up the slack of maintaining a similar file?
_________________________
Tony Fabris

Top
#65813 - 03/02/2002 10:17 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
I didn't see the note about 2K. Argh.

Once the file has been fully parsed I don't seem to get any slow downs. It's not affecting my connection speed beyond the time it takes to actually "register on the network" - it might be because I didn't wait 15 minutes after turning on my machine before running the dialer.

And of course running the findempeg program causes a nice HOSTS related delay as well, but it doesn't last that long.

So, is this 2K problem addressed in XP? I wouldn't consider switching off to any other OS. And in fact would like to hold off on XP until I move and hopefully some additional updates or a service pack are released.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65814 - 03/02/2002 10:22 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
So, is this 2K problem addressed in XP?

I have no idea. All I know is what it says on that page which (we already know) is hopelessly out of date.

If you're running Windows 2000 and you want to do ad-blocking, I'm sure there are other alternatives besides editing the hosts file.
_________________________
Tony Fabris

Top
#65815 - 03/02/2002 10:30 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
"register on the network"

Under 98, there was an easy way to stop this, and 2000 it might be the same (My dialup experience under 2000 is limited). Taking a quick look at XP's dial up properties, there is a Networking tab. Ensure only TCP/IP is checked there. Also dig around and disable any windows centric features, like domain logon.

Top
#65816 - 03/02/2002 10:38 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: drakino]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
That should all be taken care of. I just took a look and I don't see anything checked that would cause a problem. No WINS, no MS this or that. The only thing that was checked was a feature for importing an lmhosts file for NetBIOS lookups. And currently I don't have an lmhosts file.

Without the really long hosts, my connection takes what I consider an average time to complete. It may be that I launched the dialer while the HOSTS file was still being parsed after bootup. I'll go read the original page to see what 2K information they mention.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65817 - 03/02/2002 10:57 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tfabris]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Have you checked out DNSKong? I briefly looked at it - it was linked via a HOSTS-information page on the main site you provided. http://www.accs-net.com/hosts/

I've also gone and disabled my DNS and DHCP client services. I had been playing with this the night before last already, even before the whole HOSTS issue. Now to do a reboot to make sure it doesn't affect the other machine on the net (shouldn't since I gave it a static IP and think I have static gateway and dns information as well).

Oh, after these changes, findempeg takes a FRACTION of a second (instead of multiple seconds) to make its one-line change to my long hosts file. Excellent.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65818 - 03/02/2002 12:33 Re: empeg protocol [Re: mcomb]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
I'm running on Linux and it doesn't require root. Maybe your OSes only allow root to send to the broadcast addr? If you change the IP does the error go away?
_________________________
--The Amigo

Top
#65819 - 03/02/2002 12:38 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
v 1.3 works great for me on Linux. I run my own DNS server so I didn't let it modify the hosts file, but it detected the empeg just fine. Running with no options produces the expected results. Thanks!
_________________________
--The Amigo

Top
#65820 - 03/02/2002 12:45 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Ok, how about two feature requests for the next version? I use static DHCP, but maybe these features would be helpful to others here.

1: specifying a -h without a file name defaults to using /etc/hosts (Linux only)
2: specifying a -n without a name puts the name of the unit in the hosts file (without serial number; best used with -i).

The 2nd feature would make an easy way for people with multiple units and dynamic addresses to have them all added with their host names without having to run findempeg again for each unit and search by serial number.
_________________________
--The Amigo

Top
#65821 - 03/02/2002 13:02 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Is your second option going to work for units with a space in their names? My unit is called "Twisted Melon" for instance.

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65822 - 03/02/2002 13:22 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: hybrid8]
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
Well, you'd have to do something like map all invalid chars to underscore.
_________________________
--The Amigo

Top
#65823 - 03/02/2002 13:34 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: TheAmigo]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
But my player name doesn't have an undersore. It has a space.

Bruno

Ya, just pulling your leg.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#65824 - 07/02/2002 10:31 Re: Hybrid8's Hosts File Idea (rubbing the lamp) [Re: tman]
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
hi.

If you are interested, I can compile the windows version completely static (not requiring any DLLs).

cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top
#65825 - 14/01/2003 11:54 findEmpeg for OS X (Darwin) [Re: smu]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
I compiled a version of findEmpeg for OS X. Feel free to dl if you like. I haven't effectively tested it - but it finds my peg on my network just fine. cheers! .::trs


Attachments
133756-wherepeg.tgz (68 downloads)

_________________________
- trs

Top
#65826 - 14/01/2003 17:03 Re: findEmpeg for OS X (Darwin) [Re: trs24]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I do find it quite rude that you've removed my name from it...

- Trevor

Top
Page 2 of 3 < 1 2 3 >