...

Source file src/net/interface_bsdvar.go

Documentation: net

		 1  // Copyright 2011 The Go Authors. All rights reserved.
		 2  // Use of this source code is governed by a BSD-style
		 3  // license that can be found in the LICENSE file.
		 4  
		 5  //go:build dragonfly || netbsd || openbsd
		 6  // +build dragonfly netbsd openbsd
		 7  
		 8  package net
		 9  
		10  import (
		11  	"syscall"
		12  
		13  	"golang.org/x/net/route"
		14  )
		15  
		16  func interfaceMessages(ifindex int) ([]route.Message, error) {
		17  	rib, err := route.FetchRIB(syscall.AF_UNSPEC, syscall.NET_RT_IFLIST, ifindex)
		18  	if err != nil {
		19  		return nil, err
		20  	}
		21  	return route.ParseRIB(syscall.NET_RT_IFLIST, rib)
		22  }
		23  
		24  // interfaceMulticastAddrTable returns addresses for a specific
		25  // interface.
		26  func interfaceMulticastAddrTable(ifi *Interface) ([]Addr, error) {
		27  	// TODO(mikio): Implement this like other platforms.
		28  	return nil, nil
		29  }
		30  

View as plain text