Show HN:SwiftNet 0.6.0 – 轻量级 L2 以太网 C 网络库(支持 pcap 和早期 DPDK)

2作者: morcules9 天前
SwiftNet 是一个 C 语言编写的小型网络库,它通过 libpcap 工作在第二层(数据链路层),并且现在有一个非常初期的 DPDK 实现。 我构建它是因为我厌倦了使用套接字或复杂的库,想要一个足够简单,能够用于我的游戏,同时又能通过编译时定制实现高性能的库。 0.6.0 版本更新: - 动态库构建 - 更改了 buffer 函数的 API - 简单的 DPDK 实现,目前仅可用于回环(loopback) - 更整洁的源代码 - 启用了最大警告级别进行构建 - 为 buffer 添加了写入偏移量函数 - 性能优化 - 在 Ubuntu Linux arm64 上可用 - 添加了 DISABLE_DYNAMIC_RATE_LIMITING 标志 新版本发布:https://github.com/Morcules/SwiftNet/releases/tag/0.6.0 代码仓库:https://github.com/Morcules/SwiftNet
查看原文
SwiftNet is a small C networking library that works at Layer 2 with libpcap (and now has a very early DPDK implementation).<p>I built it because I was tired of using sockets or complex libraries and wanted something simple enough for my game while still being able to go fast using compile time customizations<p>0.6.0 changes: - Dynamic library build - Changed API in buffer functions - Simple DPDK implementation only usable right now with loopback - Cleaner source code - Built with maximum warnings enabled - Added write at offset function for buffer - Performance optimizations - Working on ubuntu linux arm64 - Added DISABLE_DYNAMIC_RATE_LIMITING flag<p>New version release: <a href="https:&#x2F;&#x2F;github.com&#x2F;Morcules&#x2F;SwiftNet&#x2F;releases&#x2F;tag&#x2F;0.6.0" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Morcules&#x2F;SwiftNet&#x2F;releases&#x2F;tag&#x2F;0.6.0</a> Repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;Morcules&#x2F;SwiftNet" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Morcules&#x2F;SwiftNet</a>