src.tools.simnet.simnet module

Summary

Contents

class src.tools.simnet.simnet.CellularNetwork(name)

Bases: src.tools.simnet.simnet.WiFiNetwork

exception src.tools.simnet.simnet.CommandException

Bases: exceptions.Exception

exception src.tools.simnet.simnet.ConfigException

Bases: exceptions.Exception

class src.tools.simnet.simnet.ExistingHostInterface(node, hostInterfaceConfig)

Bases: src.tools.simnet.simnet.NodeInterface

buildInterface()
clearInterface()
typeSummary()
class src.tools.simnet.simnet.Gateway(name, outsideNetwork=None, outsideInterface)

Bases: src.tools.simnet.simnet.Node

clearNode()
getHostsEntries()
requestIP4AutoConfig(interface)
requestIP6AdvertisedRoutes(interface)
requestIP6AutoConfig(interface)
class src.tools.simnet.simnet.HostNetwork(name)

Bases: src.tools.simnet.simnet.Network

buildNetwork()
clearNetwork()
summary(prefix='')
class src.tools.simnet.simnet.IP4AutoConfigInfo(address=None, defaultGateway=None, dnsServers=[])
class src.tools.simnet.simnet.IP6AutoConfigInfo(addresses=[], delegatedPrefixes=None, defaultGateway=None, dnsServers=[], furtherRoutes=[])
class src.tools.simnet.simnet.IPRoute(dest, interface=None, via=None, options=None)
summary(prefix='')
class src.tools.simnet.simnet.Internet(ip4Subnet='4.0.0.0/8', ip6Prefix='2000::/3')

Bases: src.tools.simnet.simnet.Network

requestIP4AdvertisedRoutes(interface)
requestIP4AutoConfig(interface)
requestIP6AdvertisedRoutes(interface)
requestIP6AutoConfig(interface)
summary(prefix='')
class src.tools.simnet.simnet.LegacyThreadNetwork(name)

Bases: src.tools.simnet.simnet.Network

class src.tools.simnet.simnet.Network(name)
buildNetwork()
clearNetwork()
static findNetwork(name, errMsg='')
requestIP4AdvertisedRoutes(interface)
requestIP4AutoConfig(interface)
requestIP6AdvertisedRoutes(interface)
requestIP6AutoConfig(interface)
summary(prefix='')
class src.tools.simnet.simnet.Node(name, isHostNode=False)
addInterface(network, name)
buildNode(hostsTable)
clearNode()
configureAddresses()
configureRoutes()
filterIP6AutoConfig(interface, autoConfigs)
getHostsEntries()
getLwIPConfig()
installHostsTable(hostsTable)
installResolverConfig()
isNodeBuilt()
requestIP4AdvertisedRoutes(interface)
requestIP4AutoConfig(interface)
requestIP6AdvertisedRoutes(interface)
requestIP6AutoConfig(interface)
setEnvironVars(environ)
summary(prefix='')
class src.tools.simnet.simnet.NodeInterface(node, network, name)
requestIP4AutoConfig()
requestIP6AutoConfig(interface)
summary(prefix='')
class src.tools.simnet.simnet.SimNet
buildNetworksAndNodes()
clearAll()
clearNetworksAndNodes()
findNode(nodeName)
generateHostsTable(prefix='')
getHostsEntries()
loadLayoutFile(layoutFileName)
startShell(node, noOverridePrompt=False)
summarizeNetwork(networks=True, nodes=True, hosts=True, env=True)
class src.tools.simnet.simnet.SimpleNode(name, network, ip4Address=None, ip6Addresses=[], autoConfigIP4=True, autoConfigIP6=True, useHost=False, hostAliases=[])

Bases: src.tools.simnet.simnet.Node

class src.tools.simnet.simnet.TapInterface(node, network, name=None)

Bases: src.tools.simnet.simnet.NodeInterface

buildInterface()
clearInterface()
getLwIPConfig()
typeSummary()
class src.tools.simnet.simnet.ThreadNetwork(name, meshLocalPrefix)

Bases: src.tools.simnet.simnet.Network

requestIP6AutoConfig(interface)
summary(prefix='')
exception src.tools.simnet.simnet.UsageException

Bases: exceptions.Exception

class src.tools.simnet.simnet.VirtualInterface(node, network, name)

Bases: src.tools.simnet.simnet.NodeInterface

buildInterface()
clearInterface()
typeSummary()
class src.tools.simnet.simnet.WeaveDevice(name, wifiNetwork=None, wifiInterface=None, threadNetwork=None, threadInterface=None, legacyNetwork=None, legacyInterface=None, cellularNetwork=None, cellularInterface=None, weaveNodeId=None, weaveFabricId=None, isWeaveBorderGateway=False, advertiseWiFiPrefix=True, hostAliases=[], useLwIP=False, useHost=False)

Bases: src.tools.simnet.simnet.Node

filterIP6AutoConfig(interface, autoConfigs)
getHostsEntries()
requestIP6AutoConfig(interface)
setEnvironVars(environ)
summary(prefix='')
weaveInterfaceAddress(subnetNum)
weaveSubnetPrefix(subnetNum)
class src.tools.simnet.simnet.WiFiNetwork(name)

Bases: src.tools.simnet.simnet.Network

requestIP4AdvertisedRoutes(interface)
requestIP4AutoConfig(interface)
requestIP6AdvertisedRoutes(interface)
requestIP6AutoConfig(interface)
src.tools.simnet.simnet.addBridge(name, nsName=None)
src.tools.simnet.simnet.addNamespace(name)
src.tools.simnet.simnet.addRoute(dest, dev=None, via=None, options=None, nsName=None)
src.tools.simnet.simnet.assignAddressToInterface(ifName, addr, nsName=None)
src.tools.simnet.simnet.attachInterfaceToBridge(ifName, brName, nsName=None)
src.tools.simnet.simnet.clearSimnetIPTables(nsName=None)
src.tools.simnet.simnet.containsGlobalAddress(addrList)
src.tools.simnet.simnet.createTapInterface(name, user='root', group='root')
src.tools.simnet.simnet.createVETHPair(name, peerName)
src.tools.simnet.simnet.deleteBridge(name, nsName=None)
src.tools.simnet.simnet.deleteInterface(name, nsName=None)
src.tools.simnet.simnet.deleteNamespace(name)
src.tools.simnet.simnet.disableInterface(name, nsName=None)
src.tools.simnet.simnet.enableIP4NAT(insideIfName, outsideIfName, nsName=None)
src.tools.simnet.simnet.enableIP6Forwarding(insideIfName, outsideIfName, nsName=None)
src.tools.simnet.simnet.enableInterface(name, nsName=None)
src.tools.simnet.simnet.getBridges(nsName=None)
src.tools.simnet.simnet.getHostInterfaces()
src.tools.simnet.simnet.getHostRoutes(ipv6=False)
src.tools.simnet.simnet.getInterfaceAddresses(dev, ipv6=False, nsName=None)
src.tools.simnet.simnet.getInterfaces(nsName=None)
src.tools.simnet.simnet.getNamespaces()
src.tools.simnet.simnet.getRoutes(ipv6=False, nsName=None)
src.tools.simnet.simnet.initSimnetIPTables(nsName=None)
src.tools.simnet.simnet.isNetworkAddress(addr)
src.tools.simnet.simnet.logAction(msg)
src.tools.simnet.simnet.macAddressToString(addr)
src.tools.simnet.simnet.makeIP4IntefaceAddress(subnet, nodeIndex, prefixLen=-1)
src.tools.simnet.simnet.makeIP6InterfaceAddress(prefix, subnetNum=0, iid=None, macAddr=None, prefixLen=-1, macIs64Bit=False)
src.tools.simnet.simnet.makeIP6Prefix(basePrefix, networkNum=0, subnetNum=0, prefixLen=48)
src.tools.simnet.simnet.moveInterfaceToNamespace(ifName, nsName=None)
src.tools.simnet.simnet.parseMACAddress(addrStr)
src.tools.simnet.simnet.preferGlobalAddresses(addrList)
src.tools.simnet.simnet.removeAddressFromInterface(ifName, addr, nsName=None)
src.tools.simnet.simnet.renameInterface(name, newName, nsName=None)
src.tools.simnet.simnet.runCmd(cmd, errMsg='', ignoreErr=False, nsName=None)
src.tools.simnet.simnet.setInterfaceMACAddress(ifName, macAddr, nsName=None)
src.tools.simnet.simnet.setSysctl(name, value, nsName=None)
src.tools.simnet.simnet.toIP4InterfaceAddress(v, errStr)
src.tools.simnet.simnet.toIP4Subnet(v, errStr)
src.tools.simnet.simnet.toIP6InterfaceAddress(v, errStr)
src.tools.simnet.simnet.toIP6Prefix(v, errStr)
src.tools.simnet.simnet.verifyRoot()