# Network utilities

This is a set of networking utilities used to retrieve various information from the OS about the network interfaces (MAC, IP etc)

# Installation

`composer require "buckhill/net: *"`

# Use:

```php
<?php

use function Buckhill\Net\getmacaddr;
use function Buckhill\Net\getinterfaces;

// Returns an array of MAC addresses found
$macs = getmaccaddr();

// Returns an array of available network interfaces
$interfaces = getinterfaces();

```

# Error handling:

Every method will throw a `Buckhill\Net\Exceptions\NetworkException` so wrap your function calls in a `try{}catch` block.

# Unit tests:

Running tests:

- `make test`
