Fix getself, gettuntap etc

This commit is contained in:
Neil Alexander 2021-05-16 21:01:59 +01:00
parent 31c1c9b586
commit 058dec0cca
2 changed files with 22 additions and 10 deletions

View file

@ -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
}