mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-08 06:10:04 +08:00
NIC 对象绑定IP还未实现完成 明天继续
This commit is contained in:
@@ -108,12 +108,11 @@ type Stats struct {
|
||||
}
|
||||
|
||||
func (a Address) String() string {
|
||||
fmt.Println(string(a), len(a))
|
||||
switch len(a) {
|
||||
case 4:
|
||||
fmt.Println(string(a))
|
||||
return fmt.Sprintf("%d.%d.%d.%d", int(a[0]), int(a[1]), int(a[2]), int(a[3]))
|
||||
case 16:
|
||||
fmt.Println(string(a))
|
||||
// Find the longest subsequence of hexadecimal zeros.
|
||||
start, end := -1, -1
|
||||
for i := 0; i < len(a); i += 2 {
|
||||
|
Reference in New Issue
Block a user