- Add docker-compose.yml with server + init + 3 clients + tester - Add Dockerfile.server (CGO multi-stage) and Dockerfile.client - Add .dockerignore for efficient builds - Add cmd/testclient/main.go: full E2E test binary using SDK - Fix agent handshake loop: only respond to new handshakes - Add tapInterface.SetMAC() to match agent's generated MAC - Call SetMAC() in agent SetTAPIP to fix ARP resolution - Add data-plane debug logging for troubleshooting - Change config database path to /tmp/data/ for container use - Add SetMAC stub for non-Linux builds
31 lines
558 B
Go
31 lines
558 B
Go
//go:build !linux
|
|
|
|
package sdk
|
|
|
|
import "fmt"
|
|
|
|
type tapInterface struct {
|
|
Name string
|
|
MTU int
|
|
}
|
|
|
|
func openTap(name string, mtu int) (*tapInterface, error) {
|
|
return nil, fmt.Errorf("TAP device requires Linux")
|
|
}
|
|
|
|
func (ti *tapInterface) Read(buf []byte) (int, error) {
|
|
return 0, fmt.Errorf("not supported")
|
|
}
|
|
|
|
func (ti *tapInterface) Write(buf []byte) error {
|
|
return fmt.Errorf("not supported")
|
|
}
|
|
|
|
func (ti *tapInterface) Close() error {
|
|
return nil
|
|
}
|
|
|
|
func (ti *tapInterface) SetIP(cidr string) error {
|
|
return fmt.Errorf("TAP device requires Linux")
|
|
}
|