mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
Fix getself, gettuntap etc
This commit is contained in:
parent
31c1c9b586
commit
058dec0cca
2 changed files with 22 additions and 10 deletions
|
@ -7,11 +7,17 @@ import (
|
|||
)
|
||||
|
||||
type GetTUNRequest struct{}
|
||||
type GetTUNResponse map[string]uint64
|
||||
type GetTUNResponse map[string]TUNEntry
|
||||
|
||||
type TUNEntry struct {
|
||||
MTU uint64 `json:"mtu"`
|
||||
}
|
||||
|
||||
func (t *TunAdapter) getTUNHandler(req *GetTUNRequest, res *GetTUNResponse) error {
|
||||
res = &GetTUNResponse{
|
||||
t.Name(): t.MTU(),
|
||||
*res = GetTUNResponse{
|
||||
t.Name(): TUNEntry{
|
||||
MTU: t.MTU(),
|
||||
},
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue