[fabbione/kronosnet] feb742: Move all link related code to link.{c, h}