Documentation ¶
Index ¶
- func BrTransit(payload string, mac hash.Hash) (string, string, []byte)
- func DeviceName(AS int, intf int) string
- func FakeMAC(AS byte) hash.Hash
- func HostAddr(ip netip.Addr) addr.Host
- func ISDAS(AS byte) addr.IA
- func In(payload string, mac hash.Hash) (string, string, []byte)
- func InTransit(payload string, mac hash.Hash) (string, string, []byte)
- func InitInterfaces(pairs []string)
- func InternalIP(AS byte, routerIndex byte) netip.Addr
- func InternalIPPort(AS byte, routerIndex byte) (netip.Addr, layers.UDPPort)
- func ListInterfaces() string
- func MACAddr(ip netip.Addr) net.HardwareAddr
- func Out(payload string, mac hash.Hash) (string, string, []byte)
- func OutTransit(payload string, mac hash.Hash) (string, string, []byte)
- func PublicIP(localAS byte, remoteAS byte) netip.Addr
- func PublicIPPort(localAS byte, remoteAS byte) (netip.Addr, layers.UDPPort)
- func Underlay(srcIP netip.Addr, srcPort layers.UDPPort, dstIP netip.Addr, ...) (*layers.Ethernet, *layers.IPv4, *layers.UDP)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrTransit ¶
BrTransit generates one packet of "br_transit" traffic over the router under test. The outcome is a raw packet which the test must feed to the router. The flowID field is 0.
func DeviceName ¶
interfaceName returns the name of the host interface that this test must use in order to exchange traffic with the interface designated by the given AS and interface indices.
func HostAddr ¶
hostAddr returns a the SCION Hosts addresse that corresponds to the given underlay address. Except for SVC addresses (which we do not support here), this is a restating of the underlay address.
func ISDAS ¶
isdAS returns a complete string form ISD/AS number for the given AS index. All are in ISD-1, except AS 4.
func In ¶
oneIn generates one packet of incoming traffic into AS1 at br1a. The outcome is a raw packet that the test must feed into the router. The flow ID is 0.
func InTransit ¶
oneInTransit generates one packet of "in_transit" traffic over the router under test. The outcome is a raw packet that the test must feed into the router. The flow ID is 0.
func InitInterfaces ¶
func InitInterfaces(pairs []string)
InitInterfaces collects the names and mac addresses for the interfaces setup by the invoker according to instructions given via listInterfaces(). This information is indexed by our own interface labels.
func InternalIP ¶
internalIP returns the IP address that is assigned to the internal interface of the given router in the AS of the given index.
func InternalIPPort ¶
internalIPPort returns internalIP and the UDPPort to go with.
func ListInterfaces ¶
func ListInterfaces() string
ListInterfaces outputs a string describing the interfaces of the router under test. The invoker of this test gets this when using the show-interfaces command and is expected to set up the network accordingly before executing the test without that option. We do not choose interface names or mac addresses those will be provided by the invoker via the --interfaces options.
func MACAddr ¶
func MACAddr(ip netip.Addr) net.HardwareAddr
macAddr returns the mac address assigned to the interface that has the given IP address. if that address is imposed by our environment it is listed in the macAddrs map and that is what this function returns. Else, the address is made-up according to our scheme.
func Out ¶
oneOut generates one packet of outgoing traffic from AS1 at br1a. The outcome is a raw packet that the test must feed into the router. The flow ID is 0.
func OutTransit ¶
oneOutTransit generates one packet of "out_transit" traffic over the router under test. The outcome is a raw packet that the test must feed to the router. The flow ID is 0.
func PublicIP ¶
publicIP returns the IP address that is assigned to external interface designated by the given AS index and the peer AS (that is, the AS that this interface connects to). Per our scheme, the subnet number is the largest of the two AS numbers and the host is always the local AS. This works if there are no cycles. Else there could be subnet number collisions.
func PublicIPPort ¶
publicIP returns the IP address that is assigned to external interface designated by the given AS index and the peer AS, plus the port to go with.
Types ¶
This section is empty.