Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.
/ pecl-arp Public archive

A quick and dirty PHP module to get mac from IP through the sysctl interface

License

Notifications You must be signed in to change notification settings

echothrust/pecl-arp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PECL php-arp

A simple module to manipulate ip and mac requests though the sysctl interface of OpenBSD.

This module can be helpfull in situations where you cannot exec/fork an extrernal shell command (eg to run arp), such as chroot environments.

The module currently supports the following call

  • arp_get_mac(ip_str) Get the mac address associated with the provided IP (if any).

Installation

First install the required packages to compile the module

pkg_add -vvi autoconf-2.69p1

Download the release appropriate to your system

git clone [email protected]:echothrust/pecl-arp.git
cd arp-pecl
AUTOCONF_VERSION=2.69 phpize-5.5
./configure --enable-arp --with-php-config=/usr/local/bin/php-config-5.5
make
sudo make install
echo "extension=arp.so" > /etc/php-5.5.sample/arp.ini
ln -sf /etc/php-5.5.sample/arp.ini /etc/php-5.5/arp.ini

Restart the php-fpm server

/etc/rc.d/php_fpm restart

About

A quick and dirty PHP module to get mac from IP through the sysctl interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages