detect_address_column

Function detect_address_column 

Source
pub fn detect_address_column(field: &FieldDescriptor) -> Option<AddressKind>
Expand description

Detect if a column represents a network address based on its type and name.

This uses a hybrid approach: both the data type AND the column name must match expected patterns. This prevents false positives (e.g., a UInt32 column named “count” won’t be treated as an IPv4 address).

§Detection Rules

AddressKindDataKindName Patterns
Ipv4UInt32*_ip, *_ip_*, *addr, router, server_id, subnet_mask, ciaddr, yiaddr, siaddr, giaddr
Ipv6FixedBinary(16)*_ip, *_ip_*, *_address, *_prefix
MacFixedBinary(6)*_mac, chaddr, *_mac_*