setMAC() (Previous) (Next) findVendor()

View this page in Last updated: Sun, 28 Sep 2008
English | French | German | Hungarian | Japanese | Polish | Spanish | Plain HTML

importVendors()

importVendors() -- Import a manufacturers' file to the database or to an array

Beschreibung

This method will parse a manufacturers' file, such as the one from http://anonsvn.wireshark.org/wireshark/trunk/manuf, containing a list of MAC address prefix-to-vendor relationships. If the $doReturn parameter is FALSE, then the data will be imported into the database defined by the factory of this class. However, if $doReturn is TRUE, then the return will be an associative array with the key being the MAC address prefix and the data being an associative array with the keys 'vendor' and 'description'.

Parameter

  • string $file - The filename or URL of the manufacturers' file to parse

  • string $doReturn - If TRUE, an array will be returned, if FALSE, the data will be imported into the database.

Rückgabewert

mixed - If $doReturn is TRUE, the method will return an array. Otherwise, the method will return TRUE on success. A Net_MAC_Exception Exception object will be thrown on failure in either case.

Hinweise

Diese Methode kann nicht statisch aufgerufen werden.

This method can throw exceptions on error, so the method should always be called from inside a try/catch block.

Beispiel

Fehler-Meldungen

throws Net_MAC_Exception

setMAC() (Previous) (Next) findVendor()

Download Documentation Last updated: Sun, 28 Sep 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.