func ParseRIB(typ RIBType, b []byte) ([]Message, error) {
	if !typ.parseable() {
		return nil, errUnsupportedMessage
	}
	var msgs []Message
	nmsgs, nskips := 0, 0
	for len(b) > 4 {
		nmsgs++
		l := int(nativeEndian.Uint16(b[:2]))
		if l == 0 {
			return nil, errInvalidMessage
		}
		if len(b) < l {
			return nil, errMessageTooShort
		}
		if b[2] != sysRTM_VERSION {
			b = b[l:]
			continue
		}
		mtyp := int(b[3])
		if fn, ok := parseFns[mtyp]; !ok {
			nskips++
		} else {
			m, err := fn(typ, b)
			if err != nil {
				return nil, err
			}
			if m == nil {
				nskips++
			} else {
				msgs = append(msgs, m)
			}
		}
		b = b[l:]
	}
	if nmsgs != len(msgs)+nskips {
		return nil, errMessageMismatch
	}
	return msgs, nil
}
ParseRIB parses b as a routing information base and returns a list
of routing messages.
package route
type Message interface {
	Sys() []Sys
}
type Sys interface {
	SysType() SysType
}
type SysType int
const (
	SysMetrics SysType = iota
	SysStats
)