KO
|
EN
gitlite — search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#cli
#claude-code
#codex
#developer-tools
#react
#windows
ip-packet
★ 45
Open GitHub ↗
Encode/decode raw ip packets
Download README (.md)
Explore Similar Repositories
go-ais
:
Automatic Identification System (ITU-R M.1371-5) packet decoder and encoder written in Go
meshcore-decoder
:
A TypeScript library for decoding MeshCore mesh networking packets with full cryptographic support.
itm
:
ARMv7-M ITM packet protocol decoder library crate and CLI tool.
BetterWH2
:
An improved Arduino sketch for decoding packets from the WH2 outdoor temperature and humidity sensor from Fine Offset Electronics
minecraft-protocol
:
Library for decoding and encoding Minecraft packets
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
ip-packet
?
Download (.md)
# ip-packet Encode/decode raw ip packets ``` npm install ip-packet ``` ## Usage ``` js // compact-encoder const ip = require('ip-packet') ip.encode(state, { version, ... }) console.log(ip.decode(state)) ``` ## API #### `ip.encode(state, packet)` Encode a packet. A packet should look like this ``` js { version: 4, dscp: 0, ecn: 0, identification: 0, flags: 0, fragmentOffset: 0, ttl: 0, protocol: 0, checksum: 0, sourceIp: '127.0.0.1', destinationIp: '127.0.0.1', data: <Buffer> } ``` #### `packet = ip.decode(state) Decode a packet. #### `ip.preencode(state, packet)` Preencode a packet. ## License Apache-2.0