code: func toVirtualServer(svc *libipvs.Service) (*VirtualServer, error) {
  	if svc == nil {
  		return nil, errors.New("ipvs svc should not be empty")
  	}
  	vs := &VirtualServer{
  		Address:   svc.Address,
  		Port:      svc.Port,
  		Scheduler: svc.SchedName,
  		Protocol:  protocolToString(Protocol(svc.Protocol)),
  		Timeout:   svc.Timeout,
  	}
  
  	// Test Flags >= 0x2, valid Flags ranges [0x2, 0x3]
  	if svc.Flags&FlagHashed == 0 {
  		return nil, fmt.Errorf("Flags of successfully created IPVS service should be >= %d since every service is hashed into the service table", FlagHashed)
  	}
  	// Sub Flags to 0x2
  	// 011 -> 001, 010 -> 000
  	vs.Flags = ServiceFlags(svc.Flags &^ uint32(FlagHashed))
  
  	if vs.Address == nil {
  		if svc.AddressFamily == syscall.AF_INET {
  			vs.Address = net.IPv4zero
  		} else {
  			vs.Address = net.IPv6zero
  		}
  	}
  	return vs, nil
  }
docs: // toVirtualServer converts an IPVS Service to the equivalent VirtualServer structure.