mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-06 05:16:50 +08:00
google永远的神
This commit is contained in:
@@ -46,13 +46,6 @@ const (
|
||||
CapabilityLoopback
|
||||
)
|
||||
|
||||
// 包含网络协议栈用于在 数据链路层 处理数据包后将数据包传送到适当网络端点的方法。
|
||||
type NetworkDispatcher interface {
|
||||
// deliver 递送
|
||||
DeliverNetworkPacket(linkEP LinkEndpoint, dstLinkAddr, srcLinkAddr tcpip.LinkAddress,
|
||||
protocol tcpip.NetworkProtocolNumber, vv buffer.VectorisedView)
|
||||
}
|
||||
|
||||
var (
|
||||
// 传输层协议的注册存储结构
|
||||
//transportProtocols = make(map[string]TransportProtocolFactory)
|
||||
@@ -77,3 +70,29 @@ func RegisterLinkEndpoint(linkEP LinkEndpoint) tcpip.LinkEndpointID {
|
||||
return v
|
||||
|
||||
}
|
||||
|
||||
type TransportProtocol interface {
|
||||
}
|
||||
|
||||
type TransportEndpointID struct {
|
||||
LocalPort uint16
|
||||
LocalAddress tcpip.Address
|
||||
RemotePort uint16
|
||||
RemoteAddress tcpip.Address
|
||||
}
|
||||
|
||||
type NetworkProtocol interface {
|
||||
//Number() tcpip.NetworkProtocolNumber
|
||||
//MinimumPacketSize() int
|
||||
//ParseAddresses(v buffer.View) (src, dst tcpip.Address)
|
||||
}
|
||||
|
||||
// 包含网络协议栈用于在 数据链路层 处理数据包后将数据包传送到适当网络端点的方法。
|
||||
type NetworkDispatcher interface {
|
||||
// deliver 递送
|
||||
DeliverNetworkPacket(linkEP LinkEndpoint, dstLinkAddr, srcLinkAddr tcpip.LinkAddress,
|
||||
protocol tcpip.NetworkProtocolNumber, vv buffer.VectorisedView)
|
||||
}
|
||||
|
||||
type LinkAddressResolver interface {
|
||||
}
|
||||
|
Reference in New Issue
Block a user