Download the PHP package ocolin/hyconext without Composer

On this page you can find all versions of the php package ocolin/hyconext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyconext

PHP Version Latest Version Downloads

ocolin/hyconext

A PHP client for monitoring and managing Hyconext network switches via SNMP and SSH. Provides structured access to interface data, system information, POE port statistics, and MAC address tables.

Built on top of ocolin/EasySNMP for SNMP and phpseclib for SSH.


Table of Contents


Requirements


Installation


Configuration

Configuration can be provided in three ways:

1. Environment variables with the default prefix — the simplest approach. Set HYCONEXT_* variables in your environment and instantiate with no arguments:

2. Environment variables with a custom prefix — useful when managing multiple devices with different credentials, or if you prefer a different naming convention:

With SWITCH_FLOOR2_SNMP_HOST, SWITCH_FLOOR2_SNMP_COMMUNITY etc. as your ENV vars.

3. Direct constructor arguments — pass values explicitly, bypassing ENV vars entirely:

Constructor arguments always take priority over environment variables. The tables below list all available parameters, their ENV suffix, and defaults. The full ENV var name is {PREFIX}{SUFFIX} where the prefix defaults to HYCONEXT — for example HYCONEXT_SNMP_HOST.

SNMP Configuration

Argument ENV Suffix Type Default Description
host _SNMP_HOST string Hostname or IP of device
community _SNMP_COMMUNITY string public SNMP community string (v2c)
port _SNMP_PORT int 161 SNMP UDP port
version _SNMP_VERSION int 2 SNMP version (1, 2, or 3)
timeout_connect _SNMP_TIMEOUT_CONNECT int 3 Connection timeout in seconds
timeout_read _SNMP_TIMEOUT_READ int 10 Read timeout in seconds
user _SNMP_USER string SNMPv3 username
use_auth _SNMP_USE_AUTH bool true SNMPv3 enable authentication
auth_pwd _SNMP_AUTH_PWD string SNMPv3 authentication password
auth_mech _SNMP_AUTH_MECH string SHA SNMPv3 authentication mechanism
use_priv _SNMP_USE_PRIV bool true SNMPv3 enable privacy/encryption
priv_mech _SNMP_PRIV_MECH string AES SNMPv3 privacy mechanism
priv_pwd _SNMP_PRIV_PWD string SNMPv3 privacy password
engine_id _SNMP_ENGINE_ID string SNMPv3 engine ID (usually auto-discovered)
context_name _SNMP_CONTEXT_NAME string SNMPv3 context name

SSH Configuration

Argument ENV Suffix Type Default Description
host _SSH_HOST string Hostname or IP of device
username _SSH_USERNAME string admin SSH username
password _SSH_PASSWORD string SSH password
port _SSH_PORT int 22 SSH port
timeout _SSH_TIMEOUT int 10 SSH timeout in seconds

Usage

SNMP Client

SSH Client

The SSH client is used to retrieve the MAC address table, which is not available via SNMP on Hyconext switches.


Available Methods

HyconextSNMP

Method Returns Description
getSystem() System Device system information
getInterfaces( array $columns ) Port[] Interface/port data
getPoe( array $columns ) Poe[] POE port data

getInterfaces() Columns

Column Type Description
name string Interface name (e.g. 2.5GigaEthernet1/0/1)
alias string Administrator-assigned description
description string Interface description
speed int Speed in bps
highSpeed int Speed in Mbps
adminStatus int Administrative status (1=up, 2=down, 3=testing)
operStatus int Operational status (1=up, 2=down, 3=testing, 4=unknown, 5=dormant, 6=notPresent, 7=lowerLayerDown)
mtu int Maximum transmission unit in bytes
macAddress string Interface MAC address
type int Interface type (see IANA ifType registry)
lastChange int Last status change in TimeTicks
inOctets int 32-bit input byte counter (wraps at ~4GB)
outOctets int 32-bit output byte counter (wraps at ~4GB)
inHcOctets int 64-bit input byte counter
outHcOctets int 64-bit output byte counter
inErrors int Input error counter
outErrors int Output error counter

Default columns: name, alias, description, speed, operStatus, adminStatus

getPoe() Columns

Column Type Description
adminEnable int POE enabled (1=enabled, 2=disabled)
availability int Power pairs control ability (TruthValue)
configPair int Configured pair mode (1=2pair-low, 2=4pair-low, 3=2pair, 4=4pair, 5=auto)
detection int Detection status (1=disabled, 2=searching, 3=deliveringPower, 4=fault, 5=test, 6=otherFault)
priority int Port power priority (1-16)
mpsAbsent int Power dropout counter
type string Port type string
classification int POE device class (0-4)
invalidSignature int Invalid signature counter
overloadCounter int Overload event counter
shortCounter int Short circuit counter
modeState int Port mode state (0=auto, 2=force)
maxPower int Configured max power in milliwatts
peakPower int Peak power consumption in milliwatts
currentPower int Current power consumption in milliwatts
currentMa int Current draw in milliamps
voltage int Port voltage in volts
label string Administrator-assigned POE label
operPairs int Operating pair mode (1=2pair-low, 2=4pair-low, 3=2pair, 4=4pair, 8=auto-bt, 9=auto)
pairs int Active pair count

Default: All columns

HyconextSSH

Method Returns Description
getMacTable() MacTable MAC address table
getPorts() Port List of interface ports

Data Objects

Port

Returned by getPorts().

Poe

Returned by getPoe(). All properties except index are nullable depending on requested columns.

System

Returned by getSystem().

MacTable

Returned by getMacTable().


Notes


Contributing & Roadmap

This package is under active development. The current release covers the most commonly needed functionality — interfaces, system information, POE, and MAC address tables — but Hyconext switches support much more than what is documented here.

Planned additions include more SNMP traits for things like routing tables, ARP tables, and VLAN information. If there is a specific feature you need that isn't yet implemented, feel free to open an issue on GitHub and it will be considered for a future release. Pull requests are also welcome.


All versions of hyconext with dependencies

PHP Build Version
Package Version
Requires ext-openssl Version *
ext-gmp Version *
php Version ^8.4
phpseclib/phpseclib Version ^3.0
ocolin/global-type Version ^2.0
ocolin/easysnmp Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ocolin/hyconext contains the following files

Loading the files please wait ...