code: func (b *NexthopLookupBody) Serialize(version uint8) ([]byte, error) {
  	family := addressFamilyFromApi(b.Api, version)
  	buf := make([]byte, 0)
  
  	if family == syscall.AF_INET {
  		buf = append(buf, b.Addr.To4()...)
  	} else if family == syscall.AF_INET6 {
  		buf = append(buf, b.Addr.To16()...)
  	}
  	return buf, nil
  }
docs: // Quagga only. Reference: zread_ipv[4|6]_nexthop_lookup in zebra/zserv.c of Quagga1.2.x (ZAPI3)