diff --git a/README.md b/README.md index df951a4..2dcc001 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ -# tseq -[![go.dev reference](https://pkg.go.dev/badge/github.com/soypat/tseq)](https://pkg.go.dev/github.com/soypat/tseq) -[![Go Report Card](https://goreportcard.com/badge/github.com/soypat/tseq)](https://goreportcard.com/report/github.com/soypat/tseq) -[![codecov](https://codecov.io/gh/soypat/tseq/branch/main/graph/badge.svg)](https://codecov.io/gh/soypat/tseq) -[![Go](https://github.com/soypat/tseq/actions/workflows/go.yml/badge.svg)](https://github.com/soypat/tseq/actions/workflows/go.yml) -[![sourcegraph](https://sourcegraph.com/github.com/soypat/tseq/-/badge.svg)](https://sourcegraph.com/github.com/soypat/tseq?badge) +# lneto +[![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/lneto)](https://goreportcard.com/report/github.com/soypat/lneto) +[![codecov](https://codecov.io/gh/soypat/lneto/branch/main/graph/badge.svg)](https://codecov.io/gh/soypat/lneto) +[![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/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 -- `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/tcp`](./lneto/ntp): TCP implementation and low level logic. @@ -20,7 +22,7 @@ Userspace networking primitives. ## Install How to install package with newer versions of Go (+1.16): ```sh -go mod download github.com/soypat/tseq@latest +go mod download github.com/soypat/lneto@latest ``` diff --git a/lneto/crc.go b/crc.go similarity index 100% rename from lneto/crc.go rename to crc.go diff --git a/lneto/definitions.go b/definitions.go similarity index 100% rename from lneto/definitions.go rename to definitions.go diff --git a/lneto/dhcpv4/client.go b/dhcpv4/client.go similarity index 100% rename from lneto/dhcpv4/client.go rename to dhcpv4/client.go diff --git a/lneto/dhcpv4/definitions.go b/dhcpv4/definitions.go similarity index 100% rename from lneto/dhcpv4/definitions.go rename to dhcpv4/definitions.go diff --git a/lneto/dhcpv4/frame.go b/dhcpv4/frame.go similarity index 100% rename from lneto/dhcpv4/frame.go rename to dhcpv4/frame.go diff --git a/lneto/dhcpv4/stringers.go b/dhcpv4/stringers.go similarity index 100% rename from lneto/dhcpv4/stringers.go rename to dhcpv4/stringers.go diff --git a/lneto/dns/definitions.go b/dns/definitions.go similarity index 100% rename from lneto/dns/definitions.go rename to dns/definitions.go diff --git a/lneto/dns/dns.go b/dns/dns.go similarity index 100% rename from lneto/dns/dns.go rename to dns/dns.go diff --git a/lneto/dns/dns_test.go b/dns/dns_test.go similarity index 100% rename from lneto/dns/dns_test.go rename to dns/dns_test.go diff --git a/lneto/dns/stringers.go b/dns/stringers.go similarity index 100% rename from lneto/dns/stringers.go rename to dns/stringers.go diff --git a/lneto/frames.go b/frames.go similarity index 99% rename from lneto/frames.go rename to frames.go index 9c3867b..38967b3 100644 --- a/lneto/frames.go +++ b/frames.go @@ -6,7 +6,7 @@ import ( "fmt" "math" - "github.com/soypat/tseq/lneto/tcp" + "github.com/soypat/lneto/tcp" ) // NewEthFrame returns a EthFrame with data set to buf. diff --git a/go.mod b/go.mod index 2e0c8b9..219f4f0 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/soypat/tseq +module github.com/soypat/lneto go 1.20 diff --git a/internal/ring.go b/internal/ring.go index 22dc322..52c0897 100644 --- a/internal/ring.go +++ b/internal/ring.go @@ -8,7 +8,7 @@ import ( "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. func NewRing(buf []byte) *Ring { diff --git a/lneto/lneto_test.go b/lneto_test.go similarity index 99% rename from lneto/lneto_test.go rename to lneto_test.go index dcfece9..3d64cc9 100644 --- a/lneto/lneto_test.go +++ b/lneto_test.go @@ -5,7 +5,7 @@ import ( "math/rand" "testing" - "github.com/soypat/tseq/lneto/tcp" + "github.com/soypat/lneto/tcp" ) func TestTCPMarshalUnmarshal(t *testing.T) { diff --git a/lneto/ntp/client.go b/ntp/client.go similarity index 100% rename from lneto/ntp/client.go rename to ntp/client.go diff --git a/lneto/ntp/definitions.go b/ntp/definitions.go similarity index 100% rename from lneto/ntp/definitions.go rename to ntp/definitions.go diff --git a/lneto/ntp/ntp.go b/ntp/ntp.go similarity index 100% rename from lneto/ntp/ntp.go rename to ntp/ntp.go diff --git a/lneto/ntp/ntp_test.go b/ntp/ntp_test.go similarity index 100% rename from lneto/ntp/ntp_test.go rename to ntp/ntp_test.go diff --git a/lneto/stringers.go b/stringers.go similarity index 100% rename from lneto/stringers.go rename to stringers.go diff --git a/lneto/tcp/control.go b/tcp/control.go similarity index 99% rename from lneto/tcp/control.go rename to tcp/control.go index ad890eb..0668af9 100644 --- a/lneto/tcp/control.go +++ b/tcp/control.go @@ -6,7 +6,7 @@ import ( "math" "net" - "github.com/soypat/tseq/internal" + "github.com/soypat/lneto/internal" ) // ControlBlock is a partial Transmission Control Block (TCB) implementation as diff --git a/lneto/tcp/control_rcvhandlers.go b/tcp/control_rcvhandlers.go similarity index 100% rename from lneto/tcp/control_rcvhandlers.go rename to tcp/control_rcvhandlers.go diff --git a/lneto/tcp/debug.go b/tcp/debug.go similarity index 97% rename from lneto/tcp/debug.go rename to tcp/debug.go index 1c7889f..d8f6462 100644 --- a/lneto/tcp/debug.go +++ b/tcp/debug.go @@ -4,7 +4,7 @@ import ( "context" "log/slog" - "github.com/soypat/tseq/internal" + "github.com/soypat/lneto/internal" ) func (tcb *ControlBlock) logenabled(lvl slog.Level) bool { diff --git a/lneto/tcp/definitions.go b/tcp/definitions.go similarity index 100% rename from lneto/tcp/definitions.go rename to tcp/definitions.go diff --git a/lneto/tcp/internal_test.go b/tcp/internal_test.go similarity index 100% rename from lneto/tcp/internal_test.go rename to tcp/internal_test.go diff --git a/lneto/tcp/stringers.go b/tcp/stringers.go similarity index 100% rename from lneto/tcp/stringers.go rename to tcp/stringers.go diff --git a/lneto/tcp/tcp_test.go b/tcp/tcp_test.go similarity index 99% rename from lneto/tcp/tcp_test.go rename to tcp/tcp_test.go index fc1c52e..c8ab48a 100644 --- a/lneto/tcp/tcp_test.go +++ b/tcp/tcp_test.go @@ -5,8 +5,8 @@ import ( "strconv" "testing" - "github.com/soypat/tseq/lneto" - "github.com/soypat/tseq/lneto/tcp" + "github.com/soypat/lneto" + "github.com/soypat/lneto/tcp" ) const ( diff --git a/lneto/tcp/txqueue.go b/tcp/txqueue.go similarity index 99% rename from lneto/tcp/txqueue.go rename to tcp/txqueue.go index 68ace79..8268b02 100644 --- a/lneto/tcp/txqueue.go +++ b/tcp/txqueue.go @@ -4,7 +4,7 @@ import ( "errors" "time" - "github.com/soypat/tseq/internal" + "github.com/soypat/lneto/internal" ) func newRingTx(buf []byte, maxQueuedPackets int) *ringTx { diff --git a/lneto/tcp/valuesize.go b/tcp/valuesize.go similarity index 100% rename from lneto/tcp/valuesize.go rename to tcp/valuesize.go diff --git a/lneto/validation.go b/validation.go similarity index 100% rename from lneto/validation.go rename to validation.go