Documentation ¶
Overview ¶
Package netconf handles the network configuration of the router as described by the topology.
Multiple interfaces can share the same local addresses, so this package supplies support for determining the local address for a given interface, and for determining a list of interfaces for a given local address. (Local address is defined as an address internal to the local AS.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface struct { // Id is the interface ID. It is unique per AS. Id common.IFIDType // IFAddr contains both the bind address and the public address of the // interface. Normally these are the same, but for example in the case of // NAT, the bind address may differ from the address visible from outside // the AS. IFAddr *topology.TopoAddr // RemoteAddr is the public address of the border router on the other end // of the link. RemoteAddr *overlay.OverlayAddr // RemoteIA is the ISD-AS of the other end of the link. RemoteIA addr.IA // BW is the bandwidth of the link. BW int // MTU is the maximum packet size allowed on the link, in bytes. MTU int // Type describes the type of link, in terms of relationship between this // AS and the remote AS. Type proto.LinkType }
Interface describes the configuration of a router interface.
type NetConf ¶
type NetConf struct { // LocAddr is the local addresses from the topology. LocAddr *topology.TopoAddr // IFs maps interface IDs to Interfaces. IFs map[common.IFIDType]*Interface // IFAddrMap maps external public address strings to interface IDs. IFAddrMap map[string]common.IFIDType }
NetConf contains the local addresses, interface config, and some maps for accessing these by different methods.
Click to show internal directories.
Click to hide internal directories.