added functions to determine interface masters

Signed-off-by: Jan Dvořák <mordae@anilinux.org>