Documentation
¶
Index ¶
- Constants
- func New[K comparable, V any](capacity int) *cache[K, V]
- type Config
- type NIC
- type Packet
- type PacketPool
- type Peer
- type VirtualNIC
- func (r *VirtualNIC) AddPeer(peer Peer)
- func (r *VirtualNIC) AddRoute(dst *net.IPNet, via net.IP) bool
- func (r *VirtualNIC) DelRoute(dst *net.IPNet, via net.IP) bool
- func (r *VirtualNIC) GetPeer(ip string) (net.Addr, bool)
- func (r *VirtualNIC) Peers() []*Peer
- func (r *VirtualNIC) RemovePeer(addr net.Addr)
Constants ¶
View Source
const (
IPPacketOffset = 16
)
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New[K comparable, V any](capacity int) *cache[K, V]
Types ¶
type Packet ¶
type Packet struct {
// contains filtered or unexported fields
}
type PacketPool ¶
type PacketPool struct {
MTU int
// contains filtered or unexported fields
}
var IPPacketPool *PacketPool = &PacketPool{MTU: 1428}
func (*PacketPool) Get ¶
func (pool *PacketPool) Get() *Packet
func (*PacketPool) Put ¶
func (pool *PacketPool) Put(p *Packet)
type VirtualNIC ¶
type VirtualNIC struct {
NIC
// contains filtered or unexported fields
}
func (*VirtualNIC) AddPeer ¶
func (r *VirtualNIC) AddPeer(peer Peer)
func (*VirtualNIC) Peers ¶
func (r *VirtualNIC) Peers() []*Peer
func (*VirtualNIC) RemovePeer ¶
func (r *VirtualNIC) RemovePeer(addr net.Addr)
Click to show internal directories.
Click to hide internal directories.