IFT (interface templates)
Template strings to extract the correct interface and IpAddr to bind your to. Heavily inspired by https://github.com/hashicorp/go-sockaddr
What is it?
eval
(docs)
takes an interface template string. The template is a string that starts with a
producer
and is followed by filters
and sorts
each of which is pipe |
delimited. eval
returns a vector of IpAddr objects
that can then be used as bindings
Usage
general
use eval;
print!;
actix
use ;
let mut s = new;
for ip in eval.unwrap.into_iter
Example Templates
- get private interfaces
GetAllInterfaces | FilterFlags "up" | FilterForwardable | SortBy "default"
- get private interfaces short
GetPrivateInterfaces
- get specific interface by name
GetInterface "en0"
- get only interfaces with ipv6 addresses
GetAllInterfaces | FilterIPv6
Examples
There are examples in the examples folder.
- actix - bind multiple private interfaces
To regenerate the rfc code
To Update README
To Release
You can use the cargo release command.
License: MIT