{"id":21561883,"url":"https://github.com/0x9ef/lpcap","last_synced_at":"2025-03-18T04:47:32.958Z","repository":{"id":144394466,"uuid":"507533386","full_name":"0x9ef/lpcap","owner":"0x9ef","description":"Lightweight PCAP format written in Go","archived":false,"fork":false,"pushed_at":"2023-12-27T20:10:53.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T11:31:32.899Z","etag":null,"topics":["file-format","library","lpcap","network","pcap"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"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/0x9ef.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-26T09:41:58.000Z","updated_at":"2024-08-12T20:24:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"9cf4b463-9368-4621-83dd-50d59c9c8369","html_url":"https://github.com/0x9ef/lpcap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Flpcap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Flpcap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Flpcap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Flpcap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x9ef","download_url":"https://codeload.github.com/0x9ef/lpcap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244159990,"owners_count":20408019,"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":["file-format","library","lpcap","network","pcap"],"created_at":"2024-11-24T09:29:07.070Z","updated_at":"2025-03-18T04:47:32.938Z","avatar_url":"https://github.com/0x9ef.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lightweight PCAP written in Go\n\nThis format is not backward compatible with original PCAP or Wireshark PCAP format. \n\n## Structure\nLightweight PCAP very similar to original PCAP format. Format also has file header (general) and packet headers that cames after file header. \nSizes:\n - File header: 14 octets \n - Packet header: minimal packet size is 10 octets, maximal packet size is 16383 (2^14-1) octets.\n\n## File header\n![LPCAP file header](images/file_header.png)\n- Magic Number (16 bits):\nan unsigned magic number, whose value is the hexadecimal number 0x4F3E.\n- Major Version (16 bits):\nan unsigned value, giving the number of the current major version of the format. The value for the current version of the format is 1. This value should change if the format changes in such a way that code that reads the new format could not read the old format (not backward compatible)\n- Minor Version (16 bits):\nan unsigned value, giving the number of the current minor version of the format. The value is for the current version of the format is 4. This value should change if the format changes in such a way that code that reads the new format could read the old format without checking the version number but code that reads the old format could not read all files in the new format.\n- Snap length (32 bits): \nan unsigned value indicating the maximum number of octets captured from each packet. The portion of each packet that exceeds this value will not be stored in the file. This value MUST NOT be zero.\n- Link type (32 bits):\nan unsigned value that defines the link layer type of packets in the file.\n\n## Packet header\n![LPCAP packet header](images/packet_header.png) \n- Index (8 bits): \nan unsigned value, an index of network interface where packet was been captured. \n- Type (8 bits): \nan unsigned value, traffic type to what packet has been assigned, can have several states: broadcast/multicast/unicast\n- Timestamp (32 bits): \nan 32-bit unsigned integer that represents the number of nanoseconds that have elapsed since 1970-01-01 00:00:00 UTC. Value always represents in nanoseconds!\n- Captured (Original) packet length (32 bits): \nan 32-bits unsigned integer value that indicates the actual length of the packet when it was transmitted on the network. \n\n## File extension\nTo avoid confusion with the extension of the original PCAP format, it is recommended to use the suffix \"l\" from the word \"lightweight\". \n\nRecommended file extension: `.lpcap`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x9ef%2Flpcap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x9ef%2Flpcap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x9ef%2Flpcap/lists"}