Question
Implement an iterator that walks IPv4 addresses from a seed, either forward, backward, or within the seed's CIDR block.
```python
class IPV4Iterator:
def __init__(self, seed: str, direction: str = "forward"): ...
def has_next(self) -> bool: ...
def next(self) -> str: ...
```
## Requirements
- Accept a plain IPv4 address or CIDR such as `10.2.3.4/24`.
- Include the seed as the first result.
- Forward iteration ends at `255.255.255.255` or the block broadcast address.
- Backward iteration ends at `0.0.0.0` or the block network address.
- Validate octets, prefix lengths, and direction; raise `StopIteration` after exhaustion.
- Use integer address arithmetic rather than incrementing dotted components as strings.
State whether network and broadcast addresses are included; for this problem, include both boundaries.
## Follow-ups
1. Add `step(n)` and `take(n)` with overflow-safe bounds.
2. Iterate only usable host addresses.
3. Add IPv6 using a shared address abstraction.
4. Split a CIDR into smaller blocks lazily.