func FetchRIB(af int, typ RIBType, arg int) ([]byte, error) {
	try := 0
	for {
		try++
		mib := [6]int32{sysCTL_NET, sysAF_ROUTE, 0, int32(af), int32(typ), int32(arg)}
		n := uintptr(0)
		if err := sysctl(mib[:], nil, &n, nil, 0); err != nil {
			return nil, os.NewSyscallError("sysctl", err)
		}
		if n == 0 {
			return nil, nil
		}
		b := make([]byte, n)
		if err := sysctl(mib[:], &b[0], &n, nil, 0); err != nil {
			const maxTries = 3
			if err == syscall.ENOMEM && try < maxTries {
				continue
			}
			return nil, os.NewSyscallError("sysctl", err)
		}
		return b[:n], nil
	}
}
FetchRIB fetches a routing information base from the operating
system.

The provided af must be an address family.

The provided arg must be a RIBType-specific argument.
When RIBType is related to routes, arg might be a set of route
flags. When RIBType is related to network interfaces, arg might be
an interface index or a set of interface flags. In most cases, zero
means a wildcard.
package route
import (
	"errors"
	"os"
	"syscall"
)
var (
	errUnsupportedMessage = errors.New("unsupported message")
	errMessageMismatch    = errors.New("message mismatch")
	errMessageTooShort    = errors.New("message too short")
	errInvalidMessage     = errors.New("invalid message")
	errInvalidAddr        = errors.New("invalid address")
	errShortBuffer        = errors.New("short buffer")
)
type RouteMessage struct {
	Version int      
	Type    int      
	Flags   int      
	Index   int      
	ID      uintptr  
	Seq     int      
	Err     error    
	Addrs   []Addr   
	extOff int     
	raw    []byte  
}
func (m *RouteMessage) Marshal() ([]byte, error) {
	return m.marshal()
}
type RIBType int
const (
	RIBTypeRoute     RIBType = syscall.NET_RT_DUMP
	RIBTypeInterface RIBType = syscall.NET_RT_IFLIST
)