Documentation ¶
Index ¶
- Variables
- func Configure()
- func InterfaceByIP(ip net.IP) (*net.Interface, error)
- func InterfaceByMAC(mac net.HardwareAddr) (*net.Interface, error)
- func RegisterInternalTransport() (LinkService, *InternalTransport)
- type InternalTransport
- func (t *InternalTransport) ExpirationPeriod() time.Duration
- func (t *InternalTransport) GetSendQueueSize() uint64
- func (t *InternalTransport) LinkType() ndn.LinkType
- func (t *InternalTransport) LocalURI() *ndn.URI
- func (t *InternalTransport) MTU() int
- func (t *InternalTransport) NInBytes() uint64
- func (t *InternalTransport) NOutBytes() uint64
- func (t *InternalTransport) Persistency() Persistency
- func (t *InternalTransport) Receive() (*tlv.Block, []byte, uint64)
- func (t *InternalTransport) RemoteURI() *ndn.URI
- func (t *InternalTransport) Scope() ndn.Scope
- func (t *InternalTransport) Send(block *tlv.Block, pitToken []byte, nextHopFaceID *uint64)
- func (t *InternalTransport) SetMTU(mtu int)
- func (t *InternalTransport) SetPersistency(persistency Persistency) bool
- func (t *InternalTransport) State() ndn.State
- func (t *InternalTransport) String() string
- type LinkService
- type Listener
- type MulticastEthernetTransport
- func (t *MulticastEthernetTransport) ExpirationPeriod() time.Duration
- func (t *MulticastEthernetTransport) GetSendQueueSize() uint64
- func (t *MulticastEthernetTransport) LinkType() ndn.LinkType
- func (t *MulticastEthernetTransport) LocalURI() *ndn.URI
- func (t *MulticastEthernetTransport) MTU() int
- func (t *MulticastEthernetTransport) NInBytes() uint64
- func (t *MulticastEthernetTransport) NOutBytes() uint64
- func (t *MulticastEthernetTransport) Persistency() Persistency
- func (t *MulticastEthernetTransport) RemoteURI() *ndn.URI
- func (t *MulticastEthernetTransport) Scope() ndn.Scope
- func (t *MulticastEthernetTransport) SetMTU(mtu int)
- func (t *MulticastEthernetTransport) SetPersistency(persistency Persistency) bool
- func (t *MulticastEthernetTransport) State() ndn.State
- func (t *MulticastEthernetTransport) String() string
- type MulticastUDPTransport
- func (t *MulticastUDPTransport) ExpirationPeriod() time.Duration
- func (t *MulticastUDPTransport) GetSendQueueSize() uint64
- func (t *MulticastUDPTransport) LinkType() ndn.LinkType
- func (t *MulticastUDPTransport) LocalURI() *ndn.URI
- func (t *MulticastUDPTransport) MTU() int
- func (t *MulticastUDPTransport) NInBytes() uint64
- func (t *MulticastUDPTransport) NOutBytes() uint64
- func (t *MulticastUDPTransport) Persistency() Persistency
- func (t *MulticastUDPTransport) RemoteURI() *ndn.URI
- func (t *MulticastUDPTransport) Scope() ndn.Scope
- func (t *MulticastUDPTransport) SetMTU(mtu int)
- func (t *MulticastUDPTransport) SetPersistency(persistency Persistency) bool
- func (t *MulticastUDPTransport) State() ndn.State
- func (t *MulticastUDPTransport) String() string
- type NDNLPLinkService
- func (l *NDNLPLinkService) Close()
- func (l *NDNLPLinkService) ExpirationPeriod() time.Duration
- func (l *NDNLPLinkService) FaceID() uint64
- func (l *NDNLPLinkService) GetHasQuit() chan bool
- func (l *NDNLPLinkService) LinkType() ndn.LinkType
- func (l *NDNLPLinkService) LocalURI() *ndn.URI
- func (l *NDNLPLinkService) MTU() int
- func (l *NDNLPLinkService) NInBytes() uint64
- func (l *NDNLPLinkService) NInData() uint64
- func (l *NDNLPLinkService) NInInterests() uint64
- func (l *NDNLPLinkService) NOutBytes() uint64
- func (l *NDNLPLinkService) NOutData() uint64
- func (l *NDNLPLinkService) NOutInterests() uint64
- func (l *NDNLPLinkService) Options() NDNLPLinkServiceOptions
- func (l *NDNLPLinkService) Persistency() Persistency
- func (l *NDNLPLinkService) RemoteURI() *ndn.URI
- func (l *NDNLPLinkService) Run()
- func (l *NDNLPLinkService) Scope() ndn.Scope
- func (l *NDNLPLinkService) SendPacket(packet *ndn.PendingPacket)
- func (l *NDNLPLinkService) SetFaceID(faceID uint64)
- func (l *NDNLPLinkService) SetMTU(mtu int)
- func (l *NDNLPLinkService) SetOptions(options NDNLPLinkServiceOptions)
- func (l *NDNLPLinkService) SetPersistency(persistency Persistency)
- func (l *NDNLPLinkService) State() ndn.State
- func (l *NDNLPLinkService) String() string
- func (l *NDNLPLinkService) Transport() transport
- type NDNLPLinkServiceOptions
- type NullLinkService
- func (l *NullLinkService) Close()
- func (l *NullLinkService) ExpirationPeriod() time.Duration
- func (l *NullLinkService) FaceID() uint64
- func (l *NullLinkService) GetHasQuit() chan bool
- func (l *NullLinkService) LinkType() ndn.LinkType
- func (l *NullLinkService) LocalURI() *ndn.URI
- func (l *NullLinkService) MTU() int
- func (l *NullLinkService) NInBytes() uint64
- func (l *NullLinkService) NInData() uint64
- func (l *NullLinkService) NInInterests() uint64
- func (l *NullLinkService) NOutBytes() uint64
- func (l *NullLinkService) NOutData() uint64
- func (l *NullLinkService) NOutInterests() uint64
- func (l *NullLinkService) Persistency() Persistency
- func (l *NullLinkService) RemoteURI() *ndn.URI
- func (l *NullLinkService) Run()
- func (l *NullLinkService) Scope() ndn.Scope
- func (l *NullLinkService) SendPacket(packet *ndn.PendingPacket)
- func (l *NullLinkService) SetFaceID(faceID uint64)
- func (l *NullLinkService) SetMTU(mtu int)
- func (l *NullLinkService) SetPersistency(persistency Persistency)
- func (l *NullLinkService) State() ndn.State
- func (l *NullLinkService) String() string
- func (l *NullLinkService) Transport() transport
- type NullTransport
- func (t *NullTransport) ExpirationPeriod() time.Duration
- func (t *NullTransport) GetSendQueueSize() uint64
- func (t *NullTransport) LinkType() ndn.LinkType
- func (t *NullTransport) LocalURI() *ndn.URI
- func (t *NullTransport) MTU() int
- func (t *NullTransport) NInBytes() uint64
- func (t *NullTransport) NOutBytes() uint64
- func (t *NullTransport) Persistency() Persistency
- func (t *NullTransport) RemoteURI() *ndn.URI
- func (t *NullTransport) Scope() ndn.Scope
- func (t *NullTransport) SetMTU(mtu int)
- func (t *NullTransport) SetPersistency(persistency Persistency) bool
- func (t *NullTransport) State() ndn.State
- func (t *NullTransport) String() string
- type Persistency
- type Table
- type UDPListener
- type UnicastUDPTransport
- func (t *UnicastUDPTransport) ExpirationPeriod() time.Duration
- func (t *UnicastUDPTransport) GetSendQueueSize() uint64
- func (t *UnicastUDPTransport) LinkType() ndn.LinkType
- func (t *UnicastUDPTransport) LocalURI() *ndn.URI
- func (t *UnicastUDPTransport) MTU() int
- func (t *UnicastUDPTransport) NInBytes() uint64
- func (t *UnicastUDPTransport) NOutBytes() uint64
- func (t *UnicastUDPTransport) Persistency() Persistency
- func (t *UnicastUDPTransport) RemoteURI() *ndn.URI
- func (t *UnicastUDPTransport) Scope() ndn.Scope
- func (t *UnicastUDPTransport) SetMTU(mtu int)
- func (t *UnicastUDPTransport) SetPersistency(persistency Persistency) bool
- func (t *UnicastUDPTransport) State() ndn.State
- func (t *UnicastUDPTransport) String() string
- type UnixStreamListener
- type UnixStreamTransport
- func (t *UnixStreamTransport) ExpirationPeriod() time.Duration
- func (t *UnixStreamTransport) GetSendQueueSize() uint64
- func (t *UnixStreamTransport) LinkType() ndn.LinkType
- func (t *UnixStreamTransport) LocalURI() *ndn.URI
- func (t *UnixStreamTransport) MTU() int
- func (t *UnixStreamTransport) NInBytes() uint64
- func (t *UnixStreamTransport) NOutBytes() uint64
- func (t *UnixStreamTransport) Persistency() Persistency
- func (t *UnixStreamTransport) RemoteURI() *ndn.URI
- func (t *UnixStreamTransport) Scope() ndn.Scope
- func (t *UnixStreamTransport) SetMTU(mtu int)
- func (t *UnixStreamTransport) SetPersistency(persistency Persistency) bool
- func (t *UnixStreamTransport) State() ndn.State
- func (t *UnixStreamTransport) String() string
Constants ¶
This section is empty.
Variables ¶
var EthernetMulticastAddress string
EthernetMulticastAddress is the standard multicast Ethernet URI for NDN.
var UDPMulticastPort uint16
UDPMulticastPort is the standard multicast UDP port for NDN.
var UDPUnicastPort uint16
UDPUnicastPort is the standard unicast UDP port for NDN.
var UnixSocketPath string
UnixSocketPath is the standard Unix socket file path for NDN.
Functions ¶
func InterfaceByIP ¶
InterfaceByIP gets an interface by its IP address.
func InterfaceByMAC ¶
func InterfaceByMAC(mac net.HardwareAddr) (*net.Interface, error)
InterfaceByMAC gets an interface by its MAC address.
func RegisterInternalTransport ¶
func RegisterInternalTransport() (LinkService, *InternalTransport)
RegisterInternalTransport creates, registers, and starts an InternalTransport.
Types ¶
type InternalTransport ¶
type InternalTransport struct {
// contains filtered or unexported fields
}
InternalTransport is a transport for use by internal YaNFD modules (e.g., management).
func MakeInternalTransport ¶
func MakeInternalTransport() *InternalTransport
MakeInternalTransport makes an InternalTransport.
func (*InternalTransport) ExpirationPeriod ¶
ExpirationPeriod returns the time until this face expires. If transport not on-demand, returns 0.
func (*InternalTransport) GetSendQueueSize ¶
func (t *InternalTransport) GetSendQueueSize() uint64
GetSendQueueSize returns the current size of the send queue.
func (*InternalTransport) MTU ¶
func (t *InternalTransport) MTU() int
MTU returns the maximum transmission unit (MTU) of the Transport.
func (*InternalTransport) NInBytes ¶
func (t *InternalTransport) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this transport.
func (*InternalTransport) NOutBytes ¶
func (t *InternalTransport) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this transport.
func (*InternalTransport) Persistency ¶
func (t *InternalTransport) Persistency() Persistency
Persistency returns the persistency of the transport.
func (*InternalTransport) Receive ¶
func (t *InternalTransport) Receive() (*tlv.Block, []byte, uint64)
Receive receives a packet from the perspective of the internal component.
func (*InternalTransport) Send ¶
func (t *InternalTransport) Send(block *tlv.Block, pitToken []byte, nextHopFaceID *uint64)
Send sends a packet from the perspective of the internal component.
func (*InternalTransport) SetMTU ¶
func (t *InternalTransport) SetMTU(mtu int)
SetMTU sets the MTU of the transport.
func (*InternalTransport) SetPersistency ¶
func (t *InternalTransport) SetPersistency(persistency Persistency) bool
SetPersistency changes the persistency of the face.
func (*InternalTransport) String ¶
func (t *InternalTransport) String() string
type LinkService ¶
type LinkService interface { String() string Transport() transport SetFaceID(faceID uint64) FaceID() uint64 LocalURI() *ndn.URI RemoteURI() *ndn.URI Persistency() Persistency SetPersistency(persistency Persistency) Scope() ndn.Scope LinkType() ndn.LinkType MTU() int SetMTU(mtu int) ExpirationPeriod() time.Duration State() ndn.State // Main entry point for running face thread Run() // SendPacket Add a packet to the send queue for this link service SendPacket(packet *ndn.PendingPacket) Close() GetHasQuit() chan bool // Counters NInInterests() uint64 NInData() uint64 NInBytes() uint64 NOutInterests() uint64 NOutData() uint64 NOutBytes() uint64 // contains filtered or unexported methods }
LinkService is an interface for link service implementations
type Listener ¶
type Listener interface { String() string Run() Close() }
Listener listens for incoming unicast connections for a transport type.
type MulticastEthernetTransport ¶
type MulticastEthernetTransport struct {
// contains filtered or unexported fields
}
MulticastEthernetTransport is a multicast Ethernet transport.
func MakeMulticastEthernetTransport ¶
func MakeMulticastEthernetTransport(remoteURI *ndn.URI, localURI *ndn.URI) (*MulticastEthernetTransport, error)
MakeMulticastEthernetTransport creates a new multicast Ethernet transport.
func (*MulticastEthernetTransport) ExpirationPeriod ¶
ExpirationPeriod returns the time until this face expires. If transport not on-demand, returns 0.
func (*MulticastEthernetTransport) GetSendQueueSize ¶
func (t *MulticastEthernetTransport) GetSendQueueSize() uint64
GetSendQueueSize returns the current size of the send queue.
func (*MulticastEthernetTransport) MTU ¶
func (t *MulticastEthernetTransport) MTU() int
MTU returns the maximum transmission unit (MTU) of the Transport.
func (*MulticastEthernetTransport) NInBytes ¶
func (t *MulticastEthernetTransport) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this transport.
func (*MulticastEthernetTransport) NOutBytes ¶
func (t *MulticastEthernetTransport) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this transport.
func (*MulticastEthernetTransport) Persistency ¶
func (t *MulticastEthernetTransport) Persistency() Persistency
Persistency returns the persistency of the transport.
func (*MulticastEthernetTransport) SetMTU ¶
func (t *MulticastEthernetTransport) SetMTU(mtu int)
SetMTU sets the MTU of the transport.
func (*MulticastEthernetTransport) SetPersistency ¶
func (t *MulticastEthernetTransport) SetPersistency(persistency Persistency) bool
SetPersistency changes the persistency of the face.
func (*MulticastEthernetTransport) String ¶
func (t *MulticastEthernetTransport) String() string
type MulticastUDPTransport ¶
type MulticastUDPTransport struct {
// contains filtered or unexported fields
}
MulticastUDPTransport is a multicast UDP transport.
func MakeMulticastUDPTransport ¶
func MakeMulticastUDPTransport(localURI *ndn.URI) (*MulticastUDPTransport, error)
MakeMulticastUDPTransport creates a new multicast UDP transport.
func (*MulticastUDPTransport) ExpirationPeriod ¶
ExpirationPeriod returns the time until this face expires. If transport not on-demand, returns 0.
func (*MulticastUDPTransport) GetSendQueueSize ¶
func (t *MulticastUDPTransport) GetSendQueueSize() uint64
GetSendQueueSize returns the current size of the send queue.
func (*MulticastUDPTransport) MTU ¶
func (t *MulticastUDPTransport) MTU() int
MTU returns the maximum transmission unit (MTU) of the Transport.
func (*MulticastUDPTransport) NInBytes ¶
func (t *MulticastUDPTransport) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this transport.
func (*MulticastUDPTransport) NOutBytes ¶
func (t *MulticastUDPTransport) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this transport.
func (*MulticastUDPTransport) Persistency ¶
func (t *MulticastUDPTransport) Persistency() Persistency
Persistency returns the persistency of the transport.
func (*MulticastUDPTransport) SetMTU ¶
func (t *MulticastUDPTransport) SetMTU(mtu int)
SetMTU sets the MTU of the transport.
func (*MulticastUDPTransport) SetPersistency ¶
func (t *MulticastUDPTransport) SetPersistency(persistency Persistency) bool
SetPersistency changes the persistency of the face.
func (*MulticastUDPTransport) String ¶
func (t *MulticastUDPTransport) String() string
type NDNLPLinkService ¶
type NDNLPLinkService struct {
// contains filtered or unexported fields
}
NDNLPLinkService is a link service implementing the NDNLPv2 link protocol
func MakeNDNLPLinkService ¶
func MakeNDNLPLinkService(transport transport, options NDNLPLinkServiceOptions) *NDNLPLinkService
MakeNDNLPLinkService creates a new NDNLPv2 link service
func (*NDNLPLinkService) ExpirationPeriod ¶
ExpirationPeriod returns the time until the underlying transport expires. If transport not on-demand, returns 0.
func (*NDNLPLinkService) FaceID ¶
func (l *NDNLPLinkService) FaceID() uint64
FaceID returns the ID of the face
func (*NDNLPLinkService) GetHasQuit ¶
func (l *NDNLPLinkService) GetHasQuit() chan bool
GetHasQuit returns the channel that indicates when the face has quit.
func (*NDNLPLinkService) MTU ¶
func (l *NDNLPLinkService) MTU() int
MTU returns the MTU of the underlying transport.
func (*NDNLPLinkService) NInBytes ¶
func (l *NDNLPLinkService) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this face.
func (*NDNLPLinkService) NInData ¶
func (l *NDNLPLinkService) NInData() uint64
NInData returns the number of Data packets received on this face.
func (*NDNLPLinkService) NInInterests ¶
func (l *NDNLPLinkService) NInInterests() uint64
NInInterests returns the number of Interests received on this face.
func (*NDNLPLinkService) NOutBytes ¶
func (l *NDNLPLinkService) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this face.
func (*NDNLPLinkService) NOutData ¶
func (l *NDNLPLinkService) NOutData() uint64
NInData returns the number of Data packets sent on this face.
func (*NDNLPLinkService) NOutInterests ¶
func (l *NDNLPLinkService) NOutInterests() uint64
NOutInterests returns the number of Interests sent on this face.
func (*NDNLPLinkService) Options ¶
func (l *NDNLPLinkService) Options() NDNLPLinkServiceOptions
Options gets the settings of the NDNLPLinkService.
func (*NDNLPLinkService) Persistency ¶
func (l *NDNLPLinkService) Persistency() Persistency
Persistency returns the MTU of the underlying transport.
func (*NDNLPLinkService) Run ¶
func (l *NDNLPLinkService) Run()
Run starts the face and associated goroutines
func (*NDNLPLinkService) SendPacket ¶
func (l *NDNLPLinkService) SendPacket(packet *ndn.PendingPacket)
SendPacket adds a packet to the send queue for this link service
func (*NDNLPLinkService) SetMTU ¶
func (l *NDNLPLinkService) SetMTU(mtu int)
SetMTU sets the MTU of the underlying transport.
func (*NDNLPLinkService) SetOptions ¶
func (l *NDNLPLinkService) SetOptions(options NDNLPLinkServiceOptions)
SetOptions changes the settings of the NDNLPLinkService.
func (*NDNLPLinkService) SetPersistency ¶
func (l *NDNLPLinkService) SetPersistency(persistency Persistency)
SetPersistency sets the MTU of the underlying transport.
func (*NDNLPLinkService) String ¶
func (l *NDNLPLinkService) String() string
type NDNLPLinkServiceOptions ¶
type NDNLPLinkServiceOptions struct { IsFragmentationEnabled bool IsReassemblyEnabled bool IsReliabilityEnabled bool MaxRetransmissions int // ReservedAckSpace represents the number of Acks to reserve space for in ReservedAckSpace int IsConsumerControlledForwardingEnabled bool IsIncomingFaceIndicationEnabled bool IsLocalCachePolicyEnabled bool IsCongestionMarkingEnabled bool BaseCongestionMarkingInterval time.Duration DefaultCongestionThresholdBytes uint64 }
NDNLPLinkServiceOptions contains the settings for an NDNLPLinkService.
func MakeNDNLPLinkServiceOptions ¶
func MakeNDNLPLinkServiceOptions() NDNLPLinkServiceOptions
type NullLinkService ¶
type NullLinkService struct {
// contains filtered or unexported fields
}
NullLinkService is a link service that drops all packets.
func MakeNullLinkService ¶
func MakeNullLinkService(transport transport) *NullLinkService
MakeNullLinkService makes a NullLinkService.
func (*NullLinkService) ExpirationPeriod ¶
ExpirationPeriod returns the time until the underlying transport expires. If transport not on-demand, returns 0.
func (*NullLinkService) FaceID ¶
func (l *NullLinkService) FaceID() uint64
FaceID returns the ID of the face
func (*NullLinkService) GetHasQuit ¶
func (l *NullLinkService) GetHasQuit() chan bool
GetHasQuit returns the channel that indicates when the face has quit.
func (*NullLinkService) MTU ¶
func (l *NullLinkService) MTU() int
MTU returns the MTU of the underlying transport.
func (*NullLinkService) NInBytes ¶
func (l *NullLinkService) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this face.
func (*NullLinkService) NInData ¶
func (l *NullLinkService) NInData() uint64
NInData returns the number of Data packets received on this face.
func (*NullLinkService) NInInterests ¶
func (l *NullLinkService) NInInterests() uint64
NInInterests returns the number of Interests received on this face.
func (*NullLinkService) NOutBytes ¶
func (l *NullLinkService) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this face.
func (*NullLinkService) NOutData ¶
func (l *NullLinkService) NOutData() uint64
NInData returns the number of Data packets sent on this face.
func (*NullLinkService) NOutInterests ¶
func (l *NullLinkService) NOutInterests() uint64
NOutInterests returns the number of Interests sent on this face.
func (*NullLinkService) Persistency ¶
func (l *NullLinkService) Persistency() Persistency
Persistency returns the MTU of the underlying transport.
func (*NullLinkService) SendPacket ¶
func (l *NullLinkService) SendPacket(packet *ndn.PendingPacket)
SendPacket adds a packet to the send queue for this link service
func (*NullLinkService) SetMTU ¶
func (l *NullLinkService) SetMTU(mtu int)
SetMTU sets the MTU of the underlying transport.
func (*NullLinkService) SetPersistency ¶
func (l *NullLinkService) SetPersistency(persistency Persistency)
SetPersistency sets the MTU of the underlying transport.
func (*NullLinkService) String ¶
func (l *NullLinkService) String() string
type NullTransport ¶
type NullTransport struct {
// contains filtered or unexported fields
}
NullTransport is a transport that drops all packets.
func MakeNullTransport ¶
func MakeNullTransport() *NullTransport
MakeNullTransport makes a NullTransport.
func (*NullTransport) ExpirationPeriod ¶
ExpirationPeriod returns the time until this face expires. If transport not on-demand, returns 0.
func (*NullTransport) GetSendQueueSize ¶
func (t *NullTransport) GetSendQueueSize() uint64
GetSendQueueSize returns the current size of the send queue.
func (*NullTransport) MTU ¶
func (t *NullTransport) MTU() int
MTU returns the maximum transmission unit (MTU) of the Transport.
func (*NullTransport) NInBytes ¶
func (t *NullTransport) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this transport.
func (*NullTransport) NOutBytes ¶
func (t *NullTransport) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this transport.
func (*NullTransport) Persistency ¶
func (t *NullTransport) Persistency() Persistency
Persistency returns the persistency of the transport.
func (*NullTransport) SetMTU ¶
func (t *NullTransport) SetMTU(mtu int)
SetMTU sets the MTU of the transport.
func (*NullTransport) SetPersistency ¶
func (t *NullTransport) SetPersistency(persistency Persistency) bool
SetPersistency changes the persistency of the face.
func (*NullTransport) String ¶
func (t *NullTransport) String() string
type Persistency ¶
type Persistency uint64
Persistency represents the persistency of a face.
const ( PersistencyPersistent Persistency = 0 PersistencyOnDemand Persistency = 1 PersistencyPermanent Persistency = 2 )
Face persistencies (shared with management).
func (Persistency) String ¶
func (p Persistency) String() string
type Table ¶
type Table struct { Faces map[uint64]LinkService // contains filtered or unexported fields }
Table hold all faces used by the forwarder.
var FaceTable Table
FaceTable is the global face table for this forwarder
func (*Table) Get ¶
func (t *Table) Get(id uint64) LinkService
Get gets the face with the specified ID (if any) from the face table.
type UDPListener ¶
type UDPListener struct { HasQuit chan bool // contains filtered or unexported fields }
UDPListener listens for incoming UDP unicast connections.
func MakeUDPListener ¶
func MakeUDPListener(localURI *ndn.URI) (*UDPListener, error)
MakeUDPListener constructs a UDPListener.
func (*UDPListener) String ¶
func (l *UDPListener) String() string
type UnicastUDPTransport ¶
type UnicastUDPTransport struct {
// contains filtered or unexported fields
}
UnicastUDPTransport is a unicast UDP transport.
func MakeUnicastUDPTransport ¶
func MakeUnicastUDPTransport(remoteURI *ndn.URI, localURI *ndn.URI, persistency Persistency) (*UnicastUDPTransport, error)
MakeUnicastUDPTransport creates a new unicast UDP transport.
func (*UnicastUDPTransport) ExpirationPeriod ¶
ExpirationPeriod returns the time until this face expires. If transport not on-demand, returns 0.
func (*UnicastUDPTransport) GetSendQueueSize ¶
func (t *UnicastUDPTransport) GetSendQueueSize() uint64
GetSendQueueSize returns the current size of the send queue.
func (*UnicastUDPTransport) MTU ¶
func (t *UnicastUDPTransport) MTU() int
MTU returns the maximum transmission unit (MTU) of the Transport.
func (*UnicastUDPTransport) NInBytes ¶
func (t *UnicastUDPTransport) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this transport.
func (*UnicastUDPTransport) NOutBytes ¶
func (t *UnicastUDPTransport) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this transport.
func (*UnicastUDPTransport) Persistency ¶
func (t *UnicastUDPTransport) Persistency() Persistency
Persistency returns the persistency of the transport.
func (*UnicastUDPTransport) SetMTU ¶
func (t *UnicastUDPTransport) SetMTU(mtu int)
SetMTU sets the MTU of the transport.
func (*UnicastUDPTransport) SetPersistency ¶
func (t *UnicastUDPTransport) SetPersistency(persistency Persistency) bool
SetPersistency changes the persistency of the face.
func (*UnicastUDPTransport) String ¶
func (t *UnicastUDPTransport) String() string
type UnixStreamListener ¶
type UnixStreamListener struct { HasQuit chan bool // contains filtered or unexported fields }
UnixStreamListener listens for incoming Unix stream connections.
func MakeUnixStreamListener ¶
func MakeUnixStreamListener(localURI *ndn.URI) (*UnixStreamListener, error)
MakeUnixStreamListener constructs a UnixStreamListener.
func (*UnixStreamListener) Close ¶
func (l *UnixStreamListener) Close()
Close closes the UnixStreamListener.
func (*UnixStreamListener) Run ¶
func (l *UnixStreamListener) Run()
Run starts the Unix stream listener.
func (*UnixStreamListener) String ¶
func (l *UnixStreamListener) String() string
type UnixStreamTransport ¶
type UnixStreamTransport struct {
// contains filtered or unexported fields
}
UnixStreamTransport is a Unix stream transport for communicating with local applications.
func MakeUnixStreamTransport ¶
func MakeUnixStreamTransport(remoteURI *ndn.URI, localURI *ndn.URI, conn net.Conn) (*UnixStreamTransport, error)
MakeUnixStreamTransport creates a Unix stream transport.
func (*UnixStreamTransport) ExpirationPeriod ¶
ExpirationPeriod returns the time until this face expires. If transport not on-demand, returns 0.
func (*UnixStreamTransport) GetSendQueueSize ¶
func (t *UnixStreamTransport) GetSendQueueSize() uint64
GetSendQueueSize returns the current size of the send queue.
func (*UnixStreamTransport) MTU ¶
func (t *UnixStreamTransport) MTU() int
MTU returns the maximum transmission unit (MTU) of the Transport.
func (*UnixStreamTransport) NInBytes ¶
func (t *UnixStreamTransport) NInBytes() uint64
NInBytes returns the number of link-layer bytes received on this transport.
func (*UnixStreamTransport) NOutBytes ¶
func (t *UnixStreamTransport) NOutBytes() uint64
NOutBytes returns the number of link-layer bytes sent on this transport.
func (*UnixStreamTransport) Persistency ¶
func (t *UnixStreamTransport) Persistency() Persistency
Persistency returns the persistency of the transport.
func (*UnixStreamTransport) SetMTU ¶
func (t *UnixStreamTransport) SetMTU(mtu int)
SetMTU sets the MTU of the transport.
func (*UnixStreamTransport) SetPersistency ¶
func (t *UnixStreamTransport) SetPersistency(persistency Persistency) bool
SetPersistency changes the persistency of the face.
func (*UnixStreamTransport) String ¶
func (t *UnixStreamTransport) String() string
Source Files ¶
- init.go
- interfaces.go
- internal-transport.go
- link-service.go
- listener.go
- multicast-ethernet-transport.go
- multicast-udp-transport.go
- ndnlp-link-service.go
- null-link-service.go
- null-transport.go
- persistency.go
- table.go
- transport.go
- udp-listener.go
- unicast-udp-transport.go
- unix-stream-listener.go
- unix-stream-transport.go