From d6e5cbd55e1ba508e88190f26c983e68ded70ffe Mon Sep 17 00:00:00 2001 From: ProtoTess <32490978+0x524A@users.noreply.github.com> Date: Mon, 17 Nov 2025 17:34:28 +0000 Subject: [PATCH] docs: add network interface discovery section to QUICKSTART Add examples showing how to: - Discover on specific interface by name (eth0, wlan0) - Discover using IP address (192.168.1.100) - List available network interfaces Reference new NETWORK_INTERFACE_GUIDE.md for detailed documentation. --- QUICKSTART.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/QUICKSTART.md b/QUICKSTART.md index dd27766..42c753f 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -40,6 +40,34 @@ func main() { } ``` +### Discover on Specific Network Interface + +If you have multiple network interfaces, specify which one to use: + +```go +import "github.com/0x524a/onvif-go/discovery" + +// Option 1: Discover on specific interface by name +opts := &discovery.DiscoverOptions{ + NetworkInterface: "eth0", // Use Ethernet +} +devices, err := discovery.DiscoverWithOptions(ctx, 5*time.Second, opts) + +// Option 2: Discover using IP address +opts := &discovery.DiscoverOptions{ + NetworkInterface: "192.168.1.100", +} +devices, err := discovery.DiscoverWithOptions(ctx, 5*time.Second, opts) + +// Option 3: List available interfaces +interfaces, err := discovery.ListNetworkInterfaces() +for _, iface := range interfaces { + fmt.Printf("%s: %v (Multicast: %v)\n", iface.Name, iface.Addresses, iface.Multicast) +} +``` + +For more details, see [NETWORK_INTERFACE_GUIDE.md](discovery/NETWORK_INTERFACE_GUIDE.md). + ## Step 2: Connect to Camera Create a client and get basic information. The endpoint can be specified in multiple formats: