At present, master/slave relationships in FreshPorts are not stored optimally. Each port has a field, master_port, which contains the category/port of its master_port, otherwise, it is an empty string.