status-go/vendor/github.com/libp2p/go-netroute
RichΛrd 0babdad17b
chore: upgrade go-waku to v0.5 (#3213)
* chore: upgrade go-waku to v0.5
* chore: add println and logs to check what's being stored in the enr, and preemptively delete the multiaddr field (#3219)
* feat: add wakuv2 test (#3218)
2023-02-22 17:58:17 -04:00
..
LICENSE go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
README.md go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
common.go chore: upgrade go-waku to v0.5 (#3213) 2023-02-22 17:58:17 -04:00
netroute_bsd.go chore: upgrade go-waku to v0.5 (#3213) 2023-02-22 17:58:17 -04:00
netroute_linux.go chore: upgrade go-waku to v0.5 (#3213) 2023-02-22 17:58:17 -04:00
netroute_plan9.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
netroute_stub.go chore: upgrade go-waku to v0.5 (#3213) 2023-02-22 17:58:17 -04:00
netroute_windows.go chore: upgrade go-waku to v0.5 (#3213) 2023-02-22 17:58:17 -04:00
sockaddr_windows.go chore: upgrade go-waku to v0.5 (#3213) 2023-02-22 17:58:17 -04:00
version.json chore: upgrade go-waku to v0.5 (#3213) 2023-02-22 17:58:17 -04:00

README.md

Go Netroute

Build Status

A cross-platform implementation of the gopacket/routing.Router interface.

This library is derived from gopacket for linux, x/net/route for mac, and iphlpapi.dll for windows.

Table of Contents

Install

go get github.com/libp2p/go-netroute

Usage

To be used for querying the local OS routing table.

import (
    netroute "github.com/libp2p/go-netroute"
)

func main() {
    r, err := netroute.New()
    if err != nil {
        panic(err)
    }
    iface, gw, src, err := r.Route(net.IPv4(127, 0, 0, 1))
    fmt.Printf("%v, %v, %v, %v\n", iface, gw, src, err)
}

Documentation

See the gopacket interface for thoughts on design, and godoc for API documentation.

Contribute

Contributions welcome. Please check out the issues.

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.

Small note: If editing the README, please conform to the standard-readme specification.

License

BSD © Will Scott, and the Gopacket authors (i.e. Google)