Skip to content

usbarmory/go-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bare metal Go TCP/IP connectivity

This Go package implements TCP/IP connectivity through a generic network interface to be used with GOOS=tamago as supported by the TamaGo framework for bare metal Go.

The package supports TCP/IP networking through gVisor (go branch) tcpip stack pure Go implementation.

The interface TCP/IP stack can be attached to the Go runtime by setting net.SocketFunc to the interface Socket function:

// TamaGo UEFI Simple Network interface
nic, _ := &x64.UEFI.Boot.GetNetwork{}

// gnet interface
iface := gnet.Interface{}

// initialize IP, MAC, Gateway
_ = iface.Init(nic, "10.0.0.1/24", "", "10.0.0.2")

// Go runtime hook
net.SocketFunc = iface.Socket

See go-boot for a full integration example with the UEFI Simple Network Protocol.

Authors

Andrea Barisani
[email protected]

Andrej Rosano
[email protected]

Documentation

The package API documentation can be found on pkg.go.dev.

For more information about TamaGo see its repository and project wiki.

License

tamago | https://github.com/usbarmory/go-net
Copyright (c) The go-net authors. All Rights Reserved.

These source files are distributed under the BSD-style license found in the LICENSE file.

About

Bare metal Go TCP/IP connectivity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages