(vec *vector.IP, index []uint32, bits int)
| 176 | } |
| 177 | |
| 178 | func (n *NetworkOf) intMaskFastLoop(vec *vector.IP, index []uint32, bits int) (vector.Any, []uint32) { |
| 179 | var errs []uint32 |
| 180 | var nets []netip.Prefix |
| 181 | for i := range vec.Len() { |
| 182 | idx := i |
| 183 | if index != nil { |
| 184 | idx = index[i] |
| 185 | } |
| 186 | ip := vec.Values[idx] |
| 187 | net := netip.PrefixFrom(ip, bits) |
| 188 | if net.Bits() < 0 { |
| 189 | errs = append(errs, i) |
| 190 | continue |
| 191 | } |
| 192 | nets = append(nets, net.Masked()) |
| 193 | } |
| 194 | return vector.NewNet(nets), errs |
| 195 | } |
| 196 | |
| 197 | func errCIDRRange(sctx *super.Context, ipvec, maskvec vector.Any) vector.Any { |
| 198 | vec := addressAndMask(sctx, ipvec, maskvec) |
no test coverage detected