{"id":23478417,"url":"https://github.com/opennms/iplike","last_synced_at":"2025-04-14T21:29:40.375Z","repository":{"id":7973568,"uuid":"9374869","full_name":"OpenNMS/iplike","owner":"OpenNMS","description":"PostgreSQL stored procedure for comparing IP addresses in the style of SQL LIKE","archived":false,"fork":false,"pushed_at":"2021-06-30T16:19:58.000Z","size":168,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":34,"default_branch":"master","last_synced_at":"2024-04-15T15:36:11.512Z","etag":null,"topics":["c","postgresql"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenNMS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-11T16:24:18.000Z","updated_at":"2021-08-11T00:28:42.000Z","dependencies_parsed_at":"2022-09-18T15:21:25.258Z","dependency_job_id":null,"html_url":"https://github.com/OpenNMS/iplike","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fiplike","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fiplike/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fiplike/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fiplike/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenNMS","download_url":"https://codeload.github.com/OpenNMS/iplike/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231143306,"owners_count":18334373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","postgresql"],"created_at":"2024-12-24T19:19:26.446Z","updated_at":"2024-12-24T19:19:29.505Z","avatar_url":"https://github.com/OpenNMS.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced IP Address String Matching for PostgreSQL\n\nWhile PostgreSQL has native support for IP addresses, there are use\ncases for text columns when you either have a legacy database\nschema or need more control over how addresses are stored.\n\nIPLIKE is a PostgreSQL plugin for doing wildcard-like IP address\nmatching using a simple rule grammar.\n\n\n# Building from Source\n\n## Preparing a Git Checkout for Building\n\nIf you checked IPLIKE out from Git, you will need to prepare the build\ndirectory.  If you downloaded a source tarball you can skip this step.\n\nYou will need to have GNU Autoconf, Automake, and Libtool installed.\n\n```\ngit submodule init\ngit submodule update\nautoreconf -fvi\n```\n\n## Building\n\nBuilding uses the standard GNU Autoconf process:\n\n\n```\n./configure\nmake\nsudo make install\n```\n\nIf your PostgreSQL is in a non-standard location, you can compile\nagainst it by passing `--with-pgsql=/path/to/pg_config` to the\n`./configure` command.\n\n## Creating RPM Packages\n\nIf RPM is detected, the source build will also have support for\nbuilding RPM packages.  Just run:\n\n```\n./configure\nmake rpm\n```\n\n## Creating Debian/Ubuntu Packages\n\nDebian IPLIKE packages are named to match the PostgreSQL version\nthey are built against, so that multiple IPLIKE packages can\nbe installed at the same time (`iplike-pgsql9.5`, `iplike-pgsql10`,\nand so on).\n\nFor this reason, you first must run `configure` before doing the\nnormal Debian packaging process.\n\n```\n./configure\ndpkg-buildpackage\n```\n\n\n# Installing IPLIKE to PostgreSQL\n\nYou should be able to run the `install_iplike.sh` script to insert\nIPLIKE into your database.  By default it will associate it with\na database called `opennms`, but you can choose a different database\nby passing the `-d` flag (eg, `-d template1`).\n\n\n# Using IPLIKE\n\nIPLIKE uses a very flexible search format, allowing you to separate\nthe octets (fields) of an IPv4 or IPv6 address into specific searches.\nAn asterisk (*) in place of any octet matches any value for that octet.\nRanges are indicated by two numbers separated by a dash (-),\nand commas are used for lists of matching octets.\n\n## Example Queries\n\nMatch all addresses from 192.168.0.0 through 192.168.255.255:\n\n* `SELECT iplike(ipaddr, '192.168.*.*');`\n* `SELECT iplike(ipaddr, '192.168.0-255.0-255');`\n* `SELECT iplike(ipaddr, '192.168.*.0-255');`\n\nMatch any link-local IPv6 address:\n\n* `SELECT iplike(ipaddr, 'fe80:*:*:*:*:*:*:*');`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennms%2Fiplike","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopennms%2Fiplike","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennms%2Fiplike/lists"}