{"id":32609197,"url":"https://github.com/gregfoletta/bgpsee","last_synced_at":"2025-10-30T12:55:39.155Z","repository":{"id":28587777,"uuid":"32105898","full_name":"gregfoletta/bgpsee","owner":"gregfoletta","description":"A Read-Only BGP CLI Peering Tool","archived":false,"fork":false,"pushed_at":"2024-01-05T19:27:58.000Z","size":138,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-01-06T10:40:18.600Z","etag":null,"topics":["bgp","routing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregfoletta.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2015-03-12T22:17:46.000Z","updated_at":"2024-01-06T10:40:18.601Z","dependencies_parsed_at":"2022-09-03T17:30:48.772Z","dependency_job_id":"9e7b76fa-e3aa-49c3-963d-60c38ce5da7f","html_url":"https://github.com/gregfoletta/bgpsee","commit_stats":null,"previous_names":["gregfoletta/bgpsee"],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/gregfoletta/bgpsee","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregfoletta%2Fbgpsee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregfoletta%2Fbgpsee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregfoletta%2Fbgpsee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregfoletta%2Fbgpsee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregfoletta","download_url":"https://codeload.github.com/gregfoletta/bgpsee/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregfoletta%2Fbgpsee/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281810108,"owners_count":26565431,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bgp","routing"],"created_at":"2025-10-30T12:55:28.206Z","updated_at":"2025-10-30T12:55:39.150Z","avatar_url":"https://github.com/gregfoletta.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BGPSee\n\n![Build Tests](https://github.com/gregfoletta/bgpsee/actions/workflows/make.yml/badge.svg)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/gregfoletta/bgpsee/blob/master/img/logo.png\"/\u003e\n\u003c/p\u003e\n\nBGPSee is a multi-threaded BGP client for the CLI. It's goal it to allow you to quickly and easily view the BGP paths that a peer or peers are advertising. Previously you would have had to either spin-up a virtual routers, or use a Linux routing daemon (FRR, Zebra, etc) to view this information.\n\n# Version\n\nCurrent version is **0.0.3**\n\nMajor changes from **0.0.2** to **0.0.3**:\n- Now supports JSON as an output format.\n- Now requires [jansson](https://github.com/akheron/jansson) library to support JSON output. \n\nSeee the [CHANGELOG](CHANGELOG.md) for further information.\n\nVersions \u003c 0.1.0 are considered beta version of bgpsee. There may be rough edges, and the CLI interface is subject to major changes between versions. By default BGPSee will compile with debug symbols and a number of other compile-time sanitisation flags. If bgpsee crashes, I would ask you to please raise an issue and copy/paste the crash output into the issue.\n\n# Usage\n\n```\nUsage: bgpsee [options...] \u003cpeer\u003e [\u003cpeer\u003e ...]\n-s, --source \u003cip\u003e\tIP to source BGP connection from\n-a, --asn \u003casn\u003e\t\tLocal ASN of bgpsee. If not provided 65000 will be used.\n-r, --rid \u003cip\u003e\t\tLocal router ID of bgpsee. If not provided 1.1.1.1 will be used.\n-l, --logging \u003clevel\u003e\tLogging output level, 0: BGP messages only, 1: Errors, 2: Warnings, 3: Info (default), 4: Debug \n-f, --format \u003cfmt\u003e\tFormat of the output, \u003cfmt\u003e may be 'json' or 'kv'. Defaults to 'json'\n-h, --help\t\tPrint this help message\n\n\u003cpeer\u003e formats: \u003cip\u003e,\u003casn\u003e or \u003cip\u003e,\u003casn\u003e,\u003cname\u003e\n```\n\n# Example\n\nHere's an example of *bgpsee* peering with an external router. You only see BGP messages recieved from the peer, not the messages sent by *bgpsee* iteslef.\n\n```sh\n./bgpsee -f json --asn 65001 fw1.i.foletta.xyz,65011,\"External Router\"\n```\n```json\n{\n  \"recv_time\": 1701025221,\n  \"peer_name\": \"External Router\",\n  \"id\": 0,\n  \"type\": \"OPEN\",\n  \"length\": 69,\n  \"message\": {\n    \"version\": 4,\n    \"asn\": 65011,\n    \"hold_time\": 180,\n    \"router_id\": \"10.50.254.1\",\n    \"optional_parameter_length\": 40\n  }\n}\n{\n  \"recv_time\": 1701025222,\n  \"peer_name\": \"External Router\",\n  \"id\": 1,\n  \"type\": \"KEEPALIVE\",\n  \"length\": 19,\n  \"message\": {}\n}\n{\n  \"recv_time\": 1701025844,\n  \"peer_name\": \"External Router\",\n  \"id\": 2336,\n  \"type\": \"UPDATE\",\n  \"length\": 97,\n  \"message\": {\n    \"withdrawn_route_length\": 0,\n    \"withdrawn_routes\": [],\n    \"path_attribute_length\": 70,\n    \"path_attributes\": {\n      \"ORIGIN\": \"IGP\",\n      \"AS_PATH\": {\n        \"n_as_segments\": 2,\n        \"n_total_as\": 1,\n        \"path_segments\": [\n          {\n            \"type\": \"AS_SEQUENCE\",\n            \"n_as\": 5,\n            \"asns\": [\n              45270,\n              4764,\n              3356,\n              1299,\n              56595\n            ]\n          },\n          {\n            \"type\": \"AS_SET\",\n            \"n_as\": 1,\n            \"asns\": [\n              23456\n            ]\n          }\n        ]\n      },\n      \"NEXT_HOP\": \"10.50.254.1\",\n      \"AGGREGATOR\": {\n        \"aggregator_asn\": 56595,\n        \"aggregator_ip\": \"192.124.193.146\"\n      }\n    },\n    \"nlri\": [\n      \"5.172.183.0/24\"\n    ]\n  }\n}\n```\n\nWe see a connection to an external router, with the peer router sending an OPEN and an immediate KEEPALIVE signalling it accepts the OPEN message we sent. After 5 seconds the peer starts sending UPDATEs from all of the paths it has. This router has a full BGP table, and shown is one of the paths that contains most of the path attributes, including AGGREGATOR and an AS_PATH with AS segments.\n\n# Building\n\nAs of version 0.0.3, *bgpsee* now requires libjansson. You'll need to install the development libraries before building, for example\n\n```\n# Debian based distros\nsudo apt install libjansson-dev\n\n# Red Hat based distros\nsudo yum install jansson-devel\n```\n\nTo build simply download/clone and build using make:\n```\ngit clone --recurse-submodules https://github.com/gregfoletta/bgpsee.git\ncd bgpsee\nmake\n```\n\nThis builds a *bgpsee* executable in the root directory. There is no make install.\n\n# Roadmap\n\nTop 3 items to add in future releases:\n\n- Expansion on the BGP Path Attribute handling, with a priority on:\n    - [COMMUNITY](https://www.iana.org/go/rfc1997)\n    - [EXTENDED COMMUNITIES](https://www.iana.org/go/rfc4360)\n    - [MP_REACH_NLRI](https://www.iana.org/go/rfc4760)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregfoletta%2Fbgpsee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregfoletta%2Fbgpsee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregfoletta%2Fbgpsee/lists"}