According to NDI API, there is no direct way to control network devices programmatically. With the 2.6 version of Medialooks SDK that includes update to NDI 5, you can configure the devices with a JSON file located here:
If there is no such file, NDI uses default parameters.
You can create a file and change it by following the NDI documentation. A sample JSON file is attached to the article.
To control the network adapters, you should modify the "adapters" attribute in the JSON file. Here is a quote from the documentation:
Starting in NDI version 5, this lists all of the network
adapters that will be used for network transmission.
One or more NICs can be used for transmission and
receipt of video and audio data. This capability can be
used to ensure that the NDI primary stream data
remains on particular group of network adapters, for
instance allowing you to ensure that dedicated audio is
on a separate network card from the NDI video.
It is generally preferred that you let NDI select the
network adapters automatically which can smartly
select which to use and how to choose the ones that
result in the best bandwidth. While in some modes NDI
can automatically balance bandwidth across multiple
NICs it is normally better for you to use NIC teaming at
a machine configuration level which can result in much
better performance than what is possible in software.
If this setting is configured incorrectly to specify NICs
that might not exist then NDI might fail to function
correctly. Also please note that the operation of
computer systems that are separately on entirely
different networks with different IP address ranges is
often not handled robustly by the operating system
and NDI might not fully function in these