{"id":33236996,"url":"https://github.com/ynadji/netaddr","last_synced_at":"2026-01-14T15:17:03.321Z","repository":{"id":258564600,"uuid":"846567943","full_name":"ynadji/netaddr","owner":"ynadji","description":"A network address manipulation library for Common Lisp","archived":false,"fork":false,"pushed_at":"2025-04-26T02:00:20.000Z","size":186,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T02:56:03.186Z","etag":null,"topics":["cidr","common-lisp","ipv4","ipv6","netaddr","network","networking","subnet"],"latest_commit_sha":null,"homepage":"http://yacin.nadji.us/netaddr/","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ynadji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-23T13:36:38.000Z","updated_at":"2025-04-26T01:59:53.000Z","dependencies_parsed_at":"2024-10-19T15:33:34.589Z","dependency_job_id":"809f11cc-f653-4b36-8c9e-4a3bf542cb6a","html_url":"https://github.com/ynadji/netaddr","commit_stats":null,"previous_names":["ynadji/netaddr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ynadji/netaddr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynadji%2Fnetaddr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynadji%2Fnetaddr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynadji%2Fnetaddr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynadji%2Fnetaddr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ynadji","download_url":"https://codeload.github.com/ynadji/netaddr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ynadji%2Fnetaddr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cidr","common-lisp","ipv4","ipv6","netaddr","network","networking","subnet"],"created_at":"2025-11-16T19:00:28.311Z","updated_at":"2026-01-14T15:17:03.314Z","avatar_url":"https://github.com/ynadji.png","language":"Common Lisp","readme":"# netaddr\n\nNETADDR is a Common Lisp library for manipulating IP addresses, subnets, ranges,\nand sets. It is inspired by its namesake library in Python,\n[netaddr](https://github.com/netaddr/netaddr). NETADDR supports/provides:\n\n* IPv4 and IPv6 addresses, subnets, and ranges.\n* Shorthand syntax for the above with a reader macro `#I`. See the [IP\n  Syntax](#IP-syntax) section for details.\n* Helper lookup functions for reserved space, e.g., `PRIVATE?`, `RESERVED?`, and\n  `PUBLIC?`.\n* An `IP-SET` data structure for working with sets of addresses, subnets, and\n  ranges. See `MAKE-IP-SET`.\n* Set operations on the above like union, intersection, difference, and\n  symmetric difference.\n* Membership checks of IPs against subnets, ranges, and sets using `CONTAINS?`.\n\n## Class Hierarchy\n\n```\n                           ┌ ─ ─ ─ ┐\n                   ┌───────   IP+   ────────┐\n                   │       └ ─ ─ ─ ┘        │\n                   │                        │\n                   │                        │\n                   │                        │\n                   ▼                        ▼\n               ┌ ─ ─ ─ ┐              ┌──────────┐\n                IP-LIKE ◀─ ─ set of─ ─│  IP-SET  │\n               └ ─ ─ ─ ┘              └──────────┘\n                   │\n                   ├──────┐\n      ┌────────────┘      ▼\n      │               ┌ ─ ─ ─ ┐\n      │             ┌─ IP-PAIR ──┐\n      ▼             ▼ └ ─ ─ ─ ┘  ▼\n┌──────────┐  ┌──────────┐ ┌──────────┐\n│IP-ADDRESS│  │IP-NETWORK│ │ IP-RANGE │\n└──────────┘  └──────────┘ └──────────┘\n```\n\nUsers of this library will only instantiate the leaf classes in the tree above,\nusing their respective `MAKE-*` functions, or in the case of the three that\ninherit from `IP-LIKE`, the short-hand `#I` notation. `IP-SET`s are comprised of\na set of `IP-LIKE`s. Most operations will expect either `IP-LIKE`s as arguments\nand/or `IP+`s. For example, `CONTAINS?` takes an `IP+` as its first argument and\nan `IP-LIKE` as its second argument because:\n\n* An `IP-ADDRESS` `CONTAINS?` itself.\n* An `IP-NETWORK` and an `IP-RANGE` `CONTAINS?` themselves, any subset of those\n  networks or ranges, and any `IP-ADDRESS` that is a member of the network or\n  range.\n* An `IP-SET` `CONTAINS?` any of its member `IP-LIKE`s, and so on.\n\n## Equality\n\nThere are two equality operators for `IP+` subclasses:\n\n* `IP-EQUAL` (aliased to `IP=`)\n* `IP-EQUALP`\n\nSimilar to Common Lisp's EQUAL and EQUALP, `IP-EQUAL` is more specific than\n`IP-EQUALP`. The former considers different classes to always be unequal, while\nthe latter allows comparisons across all leaf classes described in the [Class\nHierarchy](#Class-Hierarchy). For example:\n\n```\nNETADDR\u003e (ip-equal #I(\"1.1.1.1\") #I(\"1.1.1.1/32\"))\nNIL\nNETADDR\u003e (ip-equalp #I(\"1.1.1.1\") #I(\"1.1.1.1/32\"))\nT\nNETADDR\u003e (ip-equalp #I(\"1.1.1.1\") #I(\"1.1.1.1/31\"))\nNIL\nNETADDR\u003e (ip-equal #I(\"1.0.0.0/8\") #I(\"1.0.0.0-1.255.255.255\"))\nNIL\nNETADDR\u003e (ip-equalp #I(\"1.0.0.0/8\") #I(\"1.0.0.0-1.255.255.255\"))\nT\nNETADDR\u003e (ip-equal (make-ip-set (list #I(\"1.1.1.1\"))) (make-ip-set (list #I(\"1.1.1.1/32\"))))\nNIL\nNETADDR\u003e (ip-equalp (make-ip-set (list #I(\"1.1.1.1\"))) (make-ip-set (list #I(\"1.1.1.1/32\"))))\nT\n```\n\n`IP-EQUAL` always returns NIL if classes are different. However, `IP-EQUALP`\nreturns T if the underlying object refers to the same set of IP addresses,\nregardless of the concrete object type. In general, if you are comparing\nindividual `IP-LIKE`s, you'll want to use `IP-EQUAL`. If you are comparing\n`IP-SET`s, which may contain a mixture of classes internally, or `IP-NETWORK`s\nand `IP-RANGE`s, you'll want to use `IP-EQUALP`.\n\n## IP Syntax\n\nNETADDR provides a shorthand syntax for defining `IP-LIKE`s from strings with\nthe reader macro `#I` that can be enabled by first calling `ENABLE-IP-SYNTAX`.\nIf a single argument is provided, a single object is returned. If multiple\narguments are provided, a list of objects is returned. Example usage is shown\nbelow:\n\n```\nNETADDR\u003e #I(\"1.2.3.4\")\n#\u003cIP-ADDRESS 1.2.3.4\u003e\nNETADDR\u003e #I(\"192.168.1.0/24\")\n#\u003cIP-NETWORK 192.168.1.0/24\u003e\nNETADDR\u003e #I(\"::-ffff::\")\n#\u003cIP-RANGE ::-ffff::\u003e\nNETADDR\u003e #I(\"0.0.0.0\" \"1.1.1.1\")\n(#\u003cIP-ADDRESS 0.0.0.0\u003e #\u003cIP-ADDRESS 1.1.1.1\u003e)\nNETADDR\u003e (multiple-value-bind (x y z) (values \"1.1.1.1\" \"::/96\" \"10.20.30.40-11.20.30.40\")\n           #I(x y z))\n(#\u003cIP-ADDRESS 1.1.1.1\u003e #\u003cIP-NETWORK ::/96\u003e #\u003cIP-RANGE 10.20.30.40-11.20.30.40\u003e)\n```\n","funding_links":[],"categories":["Interfaces to other package managers"],"sub_categories":["Isomorphic web frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fynadji%2Fnetaddr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fynadji%2Fnetaddr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fynadji%2Fnetaddr/lists"}