mirror of
https://github.com/soypat/lneto.git
synced 2026-09-10 16:49:37 +00:00
add ipv6 to xnet.StackAsync (#107)
* add ipv6 to xnet.StackAsync * dns improvements * improve DNS workings of StackAsync * add tentative ICMPv6 * work on prefixes and fix some small bugs, plan UDP/TCP6 * fix bugs in StackAsync and ipv4.Prefix.Contains * update arpsubtable * completely remove legacy internet.StackIP for StackIPv4/v6 * ipv4/ipv6 tcp/udp * add TCP6/UDP6 dialing APIs * add xnet.Stack6 interface * more ipv6 integration into StackAsync; various tweaks to lneto and documentation+TODOs * add stack6 tests * replace netip.Prefix with ipv4.Prefix where it makes sense
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package lneto_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"math/rand"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/soypat/lneto"
|
||||
@@ -156,3 +158,17 @@ func TestIPv4TCPChecksum(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNoDeps(t *testing.T) {
|
||||
data, err := os.ReadFile("go.mod")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
const expect = "module github.com/soypat/lneto\n\ngo 1.2"
|
||||
if !bytes.HasPrefix(data, []byte(expect)) {
|
||||
t.Fatalf("unexpected go.mod file:\nexpect:%sx\ngot:%s", expect, string(data))
|
||||
}
|
||||
if bytes.Contains(data, []byte("require")) {
|
||||
t.Fatal("no dependencies allowed in lneto")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user