The function ba_encode_ifname() builds the interface name ifname from the physical interface name interface and the direction of traffic handled by the interface. For example, if interface is leo and direction is BA_DIR_INCOMING, ifname contains le0_in.