Find a port in node

My model holds an array of ports for each node.
Links are connected to between ports.
For a given link i need to find its port elements (and port attributes) in a their particular nodes.
How can do it ?

Take a look at the Link API. There are many properties and methods you can use to get different pieces of information. For ports:

I see,