Skip to content

Instantly share code, notes, and snippets.

@zeroFruit

zeroFruit/network.go

Created Oct 31, 2020
Embed
What would you like to do?
Modeling the Internet from the scratch: Link-layer, LAN, Switch - Code snippet: Build network-1
func Build() (host1 *link.Host, host2 *link.Host, host3 *link.Host,
swch1 *link.Switch, swch2 *link.Switch) {
// setup node
host1 = link.NewHost()
host2 = link.NewHost()
host3 = link.NewHost()
swch1 = link.NewSwitch()
swch2 = link.NewSwitch()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.