restructure package, rename module/repo

This commit is contained in:
soypat
2025-01-07 11:34:35 -03:00
parent 73f0b547b3
commit 9abf0c11b9
30 changed files with 20 additions and 18 deletions
+10 -8
View File
@@ -1,14 +1,16 @@
# tseq # lneto
[![go.dev reference](https://pkg.go.dev/badge/github.com/soypat/tseq)](https://pkg.go.dev/github.com/soypat/tseq) [![go.dev reference](https://pkg.go.dev/badge/github.com/soypat/lneto)](https://pkg.go.dev/github.com/soypat/lneto)
[![Go Report Card](https://goreportcard.com/badge/github.com/soypat/tseq)](https://goreportcard.com/report/github.com/soypat/tseq) [![Go Report Card](https://goreportcard.com/badge/github.com/soypat/lneto)](https://goreportcard.com/report/github.com/soypat/lneto)
[![codecov](https://codecov.io/gh/soypat/tseq/branch/main/graph/badge.svg)](https://codecov.io/gh/soypat/tseq) [![codecov](https://codecov.io/gh/soypat/lneto/branch/main/graph/badge.svg)](https://codecov.io/gh/soypat/lneto)
[![Go](https://github.com/soypat/tseq/actions/workflows/go.yml/badge.svg)](https://github.com/soypat/tseq/actions/workflows/go.yml) [![Go](https://github.com/soypat/lneto/actions/workflows/go.yml/badge.svg)](https://github.com/soypat/lneto/actions/workflows/go.yml)
[![sourcegraph](https://sourcegraph.com/github.com/soypat/tseq/-/badge.svg)](https://sourcegraph.com/github.com/soypat/tseq?badge) [![sourcegraph](https://sourcegraph.com/github.com/soypat/lneto/-/badge.svg)](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
``` ```
View File
View File
+1 -1
View File
@@ -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 -1
View File
@@ -1,3 +1,3 @@
module github.com/soypat/tseq module github.com/soypat/lneto
go 1.20 go 1.20
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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) {
View File
View File
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 {
+2 -2
View File
@@ -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 (
+1 -1
View File
@@ -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 {