Added ask for lan function

This commit is contained in:
2025-09-13 23:11:48 -03:00
parent f3ccd6d683
commit 1c00df24a4
4 changed files with 91 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ import (
"errors"
"io"
"log"
"net"
"net/http"
"os"
"path/filepath"
@@ -150,3 +151,11 @@ func GetConfigTOML() (*ConfigTOML, error) {
return &config, nil
}
func BroadcastAddr(ip net.IP, mask net.IPMask) net.IP {
b := make(net.IP, len(ip))
for i := range ip {
b[i] = ip[i] | ^mask[i]
}
return b
}