Proposal for "Net_MAC"

» Metadata » Status
  • Category: Networking
  • Proposer: Andrew Teixeira 
  • License: PHP License 3.01
» Description
This package validates and cleanly formats Media Access Control (MAC) addresses.
The Net_MAC class can also import a list of MAC address vendors and store them in a database which the class can then use to identify vendors of any MAC address.

This package is based off the Net_CheckIP package.
» Dependencies » Links
» Timeline » Changelog
  • First Draft: 2006-10-18
  • Proposal: 2006-10-25
  • Call for Votes: 2006-12-13
  • Voting Extended: 2006-12-21
  • Andrew Teixeira
    [2006-10-31 16:23 UTC]

    I have tried to respond to the comments I have received thus far.

    Firstly, I changed the ternary statement as Graham and Justin suggested. I also tried to keep everything single-quoted as Justin suggested.

    I have also renamed the proposal to 'Net_MAC' based on Stefan's suggestion as I now have a 'check' and a 'format' method in the Net_MAC class so that we can distinguish between checking for validity and formatting.

    One point I did not change was the "removing all invalid MAC characters" part in format. The reason I did this originally is because it makes later regular expressions much easier if you don't know what the delimiter will be. In this way, you can use check() to make sure the MAC address is valid and then use format() without needing to tell format() what the original delimiter is. If not, I would need to create another parameter where you pass the original delimiter to format(). I thought that might be confusing since you also pass a "new delimiter" to the method. Suggestions are always welcome.

    As for Stefan's suggestions about several other MAC formats (including EUI-64), I am still looking into it. For right now, I want to concentrate on EUI-48 with 6 octets for the first release and hopefully extend to EUI-64 and the "3 groups of 4" format later on.

    I also want to work on some way of using Wireshark or similar lists to identify MAC manufacturers, but I also think that will be after the first release. I was thinking something along the lines of a method that will go out and retrieve the file from Wireshark or others. You could then have the ability to save it locally (i.e. not part of the actual package). Basically, you could either use a URL to get the validation material, or a file link to a local copy (which you may have retrieved using Net_MAC in the first place). I'm still up in the air on that, but I'm very interested in any suggestions in that direction.
  • Andrew Teixeira
    [2006-12-13 16:41 UTC]

    Added 2 more example source files to test the new vendor identification functionality included in the updated MAC.php