Operation Integer getLinkid (Integer deviceID, Integer port_nbr, Integer option, String system_name), in Class Connectivity

Documentation
returns the linkid of the link which
starts from switch_name,port_nbr if option=0
ends to switch_name,port_nbr if option=1