Giter Club home page Giter Club logo

php-mac-address's People

Contributors

blakegardner avatar vsc55 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-mac-address's Issues

why return this

boolean false
string '00:A1:0A:F7:91:D4' (length=17)
boolean true
boolean false
boolean false

Fails to grab the MAC on OpenVZ virtual server.

When this package is used on an OpenVZ virtual server with virtual interfaces it incorrectly detects venet0 as the interface for grabbing the MAC address from even though the VPS has an eth0 interface I manually create for that purpose. Since virtual interfaces venet0 and venet0:0 can not have a MAC address it fails to grab it.

ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 127.0.0.2  netmask 255.255.255.255  broadcast 0.0.0.0
        ether 00:17:54:7b:b6:4c  txqueuelen 0  (Ethernet)
        RX packets 1  bytes 76 (76.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 168 (168.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 26549593  bytes 3905852680 (3.6 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 26549593  bytes 3905852680 (3.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

venet0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP>  mtu 1500
        inet 127.0.0.1  netmask 255.255.255.255  broadcast 0.0.0.0  destination 127.0.0.1
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 0  (UNSPEC)
        RX packets 17385507  bytes 5207240613 (4.8 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15444595  bytes 2569783211 (2.3 GiB)
        TX errors 0  dropped 45 overruns 0  carrier 0  collisions 0

venet0:0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP>  mtu 1500
        inet 77.25.34.23  netmask 255.255.255.255  broadcast 77.25.34.23  destination 77.25.34.23
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 0  (UNSPEC

The above MAC and public IP have been changed and are not my real ones. The eth0 interface was created for this container, specifically for attaching a MAC address to, using the following command on the physical server. $VEID is the virtual server ID #.

vzctl set $VEID --netif_add eth0 --save

I would be helpful if this package was updated to ignore virtual interfaces, such as venet0 and venet0:0, and only detect MAC capable interfaces, if they exist, instead.

bool(false)

https://folkeposten.dk/test/

Code
// require the class
require_once $_SERVER['DOCUMENT_ROOT'].'/src/BlakeGardner/MacAddress.php';

// import the class
use BlakeGardner\MacAddress;

var_dump(MacAddress::getCurrentMacAddress('eth0'));
/Code

returns bool(false)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.