* Replace custom queries with dbDeleteOrphans().
Generalize dbDeleteOrphans() a bit more. Allow for multiple tables and custom key pairs.
* fix whitespace
* fix: lldp discovery change local port resolution
dot1dBasePortIfIndex seems to skip some ports in certain configurations on Cisco devices.
Add quirk for Calix devices that return different port labels than they actually are.
* bdcom uses NMS-LLDP-MIB too.
* use dot1dBasePort to look up ifIndex if we can.
fix find_port_id() deleting all variables when device_id was given
improve find_port_id() to find ports where only a number is given
fix orphan deletion count
fix insert and update of links with strings where int are required
* refactor: discovery protocols re-write
extract more code to make it easier to read
use snmpwalk_group
walk lldpRemTable instead of lldpRemoteSystemsData
Optimize discover_device to reduce dns lookups of bad dns names
Make discovery_by_ip behavior consistent between cdp and lldp
move can_skip_discovery to discovery functions
Tested lldp, cdp, and ospf.
* always discover links even if the remote device isn't in system
Fix discover_link always updating
* fix style
* fix update, not fetching id
* increase platform length. Most devices use sysDescr here, which is max length 255
* remove orphaned links
* update db_schema.yaml
* refactor: use the Config class includes/discovery
* fix issue with $config variable not accessible in include-dir.inc.php
* improved whitespace
* Tidy up discovery_by_ip
* Refactor remove use of pear Net_IPv4 and Net_IPv6
Caution, I added tests to test the functionality of the new functions, but I'm not 100% certain the replaced usages match 100%. Please test.
Left usage in generate-iplist.php because I'm not sure the use of that script, so I didn't want to implement additional functionality to support it.
Add support for ipv6 fo ipInNetwork() function
Add phpdocs to functions
Remove accidental inclusion
Use binary operations instead of string for networKFromIp()
Tidy up binary operations in ipInNetwork()
tidy parsing cidr network
Change to a class based implementation.
Update phpdocs.
Fully catch exceptions for hex parsing.
Fix mistake.
support older phpunit versions
Fix php shifting to negative with php 5
* Fix graph authorization. Uncaught exception and checking an ipv4 against an ipv6 network == fail.
* Also remove colons from hex strings.
* Fix typo in bgp polling
Two passes of removing invalid characters from hex strings. (That way we don't mangle valid IPs)
* Use foreach $key => value
* use get_port_by_ifIndex
get rid of the rest of the array_keys()
* improve hex_to_ip() function, add tests, use in more places
* Simplify can_skip_discovery logic
* Update LLDP discovery to use IP address if discovery_by_ip is enabled
* Update as per laf's suggetions
* Fix indentation
* Updated with Laf's suggestion
* Add more debugging
* Trim MAC address
* Remove debug statements
* Update discovery-protocols.inc.php
Allow invalid hostnames if discovery by IP is true
* Update AUTHORS.md
signing
* Update AUTHORS.md
signing
* CDP discovery by IP modification
CDP would not discover devices that had invalid DNS value for cdpCacheDeviceId - modified to accept
Also exclude adding devices whose hostname matches the IP
* Update AUTHORS.md
* I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md.
I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md.
* refactor: Centralize MIB include directory specification
The default is now:
```
$config['mib_dir'].'/mibdirname:'.$config['mib_dir']
```
This means we exclude OS mibs and only use ours (we could prepend `+` if we want to include os mibs.
All snmp calls should only include the name of the subdirectory under the mibs directory.
* Remove d_echo from Proc
Fix snmpsim tests.
Both OSPF & ARP discovery use discover_new_device(), but it was checking
$config[autodiscovery][xdp] internally, meaning xDP had to be enabled for the other two to work.