mirror of
https://github.com/soypat/lneto.git
synced 2026-09-10 08:39:30 +00:00
restructure package, rename module/repo
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
# tseq
|
# lneto
|
||||||
[](https://pkg.go.dev/github.com/soypat/tseq)
|
[](https://pkg.go.dev/github.com/soypat/lneto)
|
||||||
[](https://goreportcard.com/report/github.com/soypat/tseq)
|
[](https://goreportcard.com/report/github.com/soypat/lneto)
|
||||||
[](https://codecov.io/gh/soypat/tseq)
|
[](https://codecov.io/gh/soypat/lneto)
|
||||||
[](https://github.com/soypat/tseq/actions/workflows/go.yml)
|
[](https://github.com/soypat/lneto/actions/workflows/go.yml)
|
||||||
[](https://sourcegraph.com/github.com/soypat/tseq?badge)
|
[](https://sourcegraph.com/github.com/soypat/lneto?badge)
|
||||||
|
|
||||||
Userspace networking primitives.
|
Userspace networking primitives.
|
||||||
|
|
||||||
|
`lneto` is pronounced "L-net-oh", a.k.a. "El Neto"; a.k.a. "Don Networkio"; a.k.a "Neto, connector of worlds".
|
||||||
|
|
||||||
## Packages
|
## Packages
|
||||||
- `lneto`: Low-level Networking Operations, or "El Neto", the big networking package. Zero copy network frame marshalling and unmarshalling.
|
- `lneto`: Low-level Networking Operations, or "El Neto", the networking package. Zero copy network frame marshalling and unmarshalling.
|
||||||
- [`lneto/frames.go`](./lneto/frames.go): Ethernet, IPv4/IPv6, ARP, TCP, UDP packet marshalling/unmarshalling.
|
- [`lneto/frames.go`](./lneto/frames.go): Ethernet, IPv4/IPv6, ARP, TCP, UDP packet marshalling/unmarshalling.
|
||||||
|
|
||||||
- [`lneto/tcp`](./lneto/ntp): TCP implementation and low level logic.
|
- [`lneto/tcp`](./lneto/ntp): TCP implementation and low level logic.
|
||||||
@@ -20,7 +22,7 @@ Userspace networking primitives.
|
|||||||
## Install
|
## Install
|
||||||
How to install package with newer versions of Go (+1.16):
|
How to install package with newer versions of Go (+1.16):
|
||||||
```sh
|
```sh
|
||||||
go mod download github.com/soypat/tseq@latest
|
go mod download github.com/soypat/lneto@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/soypat/tseq/lneto/tcp"
|
"github.com/soypat/lneto/tcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewEthFrame returns a EthFrame with data set to buf.
|
// NewEthFrame returns a EthFrame with data set to buf.
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
module github.com/soypat/tseq
|
module github.com/soypat/lneto
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errRingBufferFull = errors.New("tseq/ring: buffer full")
|
var errRingBufferFull = errors.New("lneto/ring: buffer full")
|
||||||
|
|
||||||
// NewRing returns a new ring buffer ready for use.
|
// NewRing returns a new ring buffer ready for use.
|
||||||
func NewRing(buf []byte) *Ring {
|
func NewRing(buf []byte) *Ring {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/soypat/tseq/lneto/tcp"
|
"github.com/soypat/lneto/tcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTCPMarshalUnmarshal(t *testing.T) {
|
func TestTCPMarshalUnmarshal(t *testing.T) {
|
||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/soypat/tseq/internal"
|
"github.com/soypat/lneto/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ControlBlock is a partial Transmission Control Block (TCB) implementation as
|
// ControlBlock is a partial Transmission Control Block (TCB) implementation as
|
||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"github.com/soypat/tseq/internal"
|
"github.com/soypat/lneto/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (tcb *ControlBlock) logenabled(lvl slog.Level) bool {
|
func (tcb *ControlBlock) logenabled(lvl slog.Level) bool {
|
||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/soypat/tseq/lneto"
|
"github.com/soypat/lneto"
|
||||||
"github.com/soypat/tseq/lneto/tcp"
|
"github.com/soypat/lneto/tcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/soypat/tseq/internal"
|
"github.com/soypat/lneto/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newRingTx(buf []byte, maxQueuedPackets int) *ringTx {
|
func newRingTx(buf []byte, maxQueuedPackets int) *ringTx {
|
||||||
Reference in New Issue
Block a user