这个仓库代码量太大了 以读为主 不写了

This commit is contained in:
impact-eintr
2021-10-15 19:17:11 +08:00
parent 14862c4bb0
commit 03c0e5427f
126 changed files with 31369 additions and 7 deletions

View File

@@ -1,29 +0,0 @@
package stack
import "github.com/impact-eintr/netstack/tcpip"
// 贯穿整个协议栈的路由,也就是在链路层和网络层都可以路由
// 如果目标地址是链路层地址,那么在链路层路由
// 如果目标地址是网络层地址,那么在网络层路由
type Route struct {
// 远端网络层地址 ipv4 or ipv6
RemoteAddress tcpip.Address
// 远端网卡MAC地址
RemoteLinkAddress tcpip.LinkAddress
// 本地网络层地址
LocalAddress tcpip.Address
// 本地网卡MAC地址
LocalLinkAddress tcpip.LinkAddress
// 下一跳网络层地址
NextHop tcpip.Address
// 网络层协议号
NextProto tcpip.NetworkProtocolNumber
// 相关的网络终端
ref *referencedNetworkEndpoint
}