Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Mud Server (http://www.topmudsites.com/forums/showthread.php?t=376)

Khadgar 12-29-2004 04:57 PM


Yui Unifex 12-30-2004 08:00 AM

However, the compiler gives me a warning that I am forcing the value to true or false from an int.[/quote]
Microsoft had this particular kick for representing boolean values as 0 and -1, and they commonly stored booleans in ints. I think changing your code to: flags.indoors = variant.m_boolVal ? true : false; should do the trick if the value contains what I think it does. Besides, have you tried printing the value to see what you get, or looking at the documentation to see what type it is?

The former is a NETBIOS machine name, the latter is your fully qualified hostname. The former is used on your LAN only, while the rest of the internet talks to you using the latter.

Yes, but you don't want to do it. At the application level, particularly for a game, it is wholly unnecessary. We have these things called IP addresses that we use to address machines and networks. MAC addresses are not magic values that can't be changed -- if you're thinking of using them as a security measure, forget it.

Khadgar 12-30-2004 05:18 PM

1)  I found some documentation about my first question after I made my first post.  It appears to be a compiler bug:

2) After I had some friends connect to my server, I seen that the hostname was printing out correctly.  Thus, I was able to implement host banning.  Thanks for clarification Yui Unifex about why mine was different.  

3) I was planning to use MAC address banning as a security measure.  I was aware of the ability to change a MAC address.  However, in my opinion, people know less about that than changing their IP address.  Host banning appears to work really well, but it may prevent non-troublemakers from logging onto the server. Nevertheless, I would just like to keep my options open when it comes to security, for I would like to take whatever measures best benefits my future mudding community.  Thus, if anybody has any information regarding the third issue, please feel free to share it.

Teelf 12-31-2004 01:52 AM

I've looked into it only briefly in the past, but it seemed to be a non-trivial task.  Someone else may have better info for you.  

You have to send an ARP packet to request the MAC address of the source machine.  That may not be terribly difficult I'm not sure, but the ARP reply packet is not normally passed up to the application layer.  So I imagine you have to have some sort of low-level packet capture program running that is looking for the ARP reply.    

You'd be dealing with a lot of low-level raw socket type stuff.  libpcap may help you in this.


All times are GMT -4. The time now is 11:32 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022