Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getWithPrefixLen method #89

Merged
merged 20 commits into from
Sep 30, 2019
Merged

Add getWithPrefixLen method #89

merged 20 commits into from
Sep 30, 2019

Conversation

oschwald
Copy link
Member

@oschwald oschwald commented Sep 27, 2019

Closes #60.

@oschwald oschwald force-pushed the greg/network branch 2 times, most recently from 4647b25 to 6fa5e55 Compare September 27, 2019 15:48
Copy link
Contributor

@horgh horgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
$tempBit = 0xFF & $rawAddress[$i >> 3];
for ($i = 0; $i < $bitCount && $node < $nodeCount; ++$i) {
$tempBit = 0xFF & $rawAddress[($i >> 3) + 1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why +1? Oh... the array is starting at 1 😕

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, PHP...

ext/maxminddb.c Outdated
THROW_EXCEPTION("InvalidArgumentException",
"The value \"%s\" is not a valid IP address.",
ip_address);
return;
}
if (!addresses && !addresses->ai_addr) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be ||?

README.md Outdated
## Installation (RPM)

RPMs are available in the [official Fedora repository](https://apps.fedoraproject.org/packages/php-maxminddb)
and in [Remi's RPM repository](https://rpms.remirepo.net/rpmphp/zoom.php?rpm=python-maxminddb).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gah. I can't find a good link. I'll just leave it off.

@horgh horgh merged commit 3154d61 into master Sep 30, 2019
@horgh horgh deleted the greg/network branch September 30, 2019 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

How to get Routing Prefix (CIDR) ?
2 participants