cidram / aggregator Goto Github PK
View Code? Open in Web Editor NEWA stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.
License: GNU General Public License v2.0
A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.
License: GNU General Public License v2.0
Hi again, very handy stuff you have, thanks!
I'm wondering if it would be possible to have the $input figure out if it's a simple pass of plain data or an array. To give you some context we have a program that writes out a flat file with a series of prefixes of varying lengths, both v4/v6. Right now when we pass the data we do it this way:
if (($addresses = file($routefile)) == FALSE)
{
status(STATUS_WARNING, "Unable to open route file (might be empty), skipping.");
return FALSE;
}
// First normalize the routes, no array.
$addresses_normal = implode("", $addresses);
// Process the aggregation
$addresses_agg = aggregate($addresses_normal);
// Return them in an array
return explode(" ", $addresses_agg);
I'm wondering if it's possible to add the ability to detect if an array is being passed and do the magic within the Input?
Hacktoberfest by Digital Ocean will be running again this year through the month of October 2017. If anyone sees any room for improvement to the codebase, has ideas, suggestions, bug-fixes, or whatever else, if you want to win a free Hacktoberfest t-shirt and some stickers, consider signing up for this year and sending some pull requests to this repository. :-)
For more details: https://hacktoberfest.digitalocean.com/#details
Issue will remain open until the end of October.
Hello,
When running results with Aggregator it appears that NumberEntered is always 0.
When I simply hack it up with the following I have returned numbers:
private function stripInvalidCharactersAndSort(&$In)
{
$In = explode("\n", strtolower(trim(str_replace("\r", '', $In))));
$InCount = count($In);
$this->NumberEntered = $InCount;
if (isset($this->callbacks['newParse']) && is_callable($this->callbacks['newParse'])) {
$this->callbacks['newParse']($InCount);
}
unset($InCount);
Not sure if this is the best place or not, or if better before in the previous function on the intake?
Thanks!
Tests are currently failing. This should be fixed.
Possible future feature: Adding support for netmasks to the Aggregator (currently it just supports IPs and CIDRs).
This has been requested by several different people now, both privately and publicly, so I'm pretty sure this is something that others would find useful. Most recently requested via PHPClasses.org:
I think it's a good idea, but it's currently a low-priority thing for me (got too many other things to do for too many other projects already). I've got a reasonably good idea of how I could go about doing it though, if and when it happens. Definitely not an impossible thing to do.
If anyone else wanted to give it a whirl, they're welcome to it. Otherwise, I should be able to make a start on it at some point next month or thereafter, probably.
Creating this issue for reference and labeling as "attention required".
Hi there,
I'm wondering if there's any known issue with performance when trying to feed in 100k prefixes? When I enable some extra output on the classes/functions I find that it seems to drag along at stripInvalidRangesAndSubs($this->Output), specifically the $Line area I think.
Any idea?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.