File: gateway_freebsd.go

package info (click to toggle)
golang-github-jackpal-gateway 1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, bullseye-backports, forky, sid, trixie
  • size: 128 kB
  • sloc: makefile: 2
file content (22 lines) | stat: -rw-r--r-- 391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// +build freebsd

package gateway

import (
	"net"
	"os/exec"
)

func discoverGatewayOSSpecific() (ip net.IP, err error) {
	routeCmd := exec.Command("netstat", "-rn")
	output, err := routeCmd.CombinedOutput()
	if err != nil {
		return nil, err
	}

	return parseBSDSolarisNetstat(output)
}

func discoverGatewayInterfaceOSSpecific() (ip net.IP, err error) {
	return nil, errNotImplemented
}