# `MaeBPF.Plugs.Blocklist`
[🔗](https://github.com/cocoa-xu/MaeBPF/blob/v0.1.0/maebpf/lib/maebpf/plugs/blocklist.ex#L1)

Looks up the packet's IPv4 source (or destination) address against a
module-level exact IPv4 map (`:hash` / `:lru_hash`, 4-byte key) or CIDR
longest-prefix-match map (`:lpm_trie`, 8-byte
`<<32::32-little, ipv4::32-big>>` key).

On a map hit, optionally increments a counter and emits a 16-byte RingBuf
event, then halts with `:drop` (or custom `:action`).

Options:
  * `:map` - target blocklist map atom (required)
  * `:field` - `:src` (default) or `:dst`
  * `:action` - `:drop` (default) or `:pass`
  * `:count` - optional counter map name to increment on hit
  * `:emit` - optional RingBuf stream name to emit an event on hit
  * `:type` - optional map type (`:lpm_ipv4`, `:lru_hash`, `:hash`) when
    auto-declaring maps for standalone pipelines
  * `:max_entries` - optional map capacity when auto-declaring maps
  * `:cidrs` - optional list of CIDR strings validated statically at compile time

---

*Consult [api-reference.md](api-reference.md) for complete listing*
