def get_ip_prefix_from_adapters(local_ip, adapters):
    """Find the network prefix for an adapter."""
    for adapter in adapters:
        for ip_cfg in adapter.ips:
            if local_ip == ip_cfg.ip:
                return ip_cfg.network_prefix