Define if_set_mode, if_set_port_vlan and if_get_type

The functions will work only if all switches are on the same host
because for some of them the index of the interface is provided not the
name.

Signed-off-by: Mihaela Martinas <martinas.mihaela21@gmail.com>