drivers: eth: native_posix: if_name from cmd line
Iface name which is used by native posix ethernet driver can only be specified at compile-time. I wanted to run two instances of the same program on native posix but did not want to make two separate builds only to change the iface name. I have implemented getting the iface name from command line. Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
This commit is contained in:
parent
313a92baf9
commit
52197b515a
2 changed files with 41 additions and 0 deletions
|
@ -142,3 +142,17 @@ For TCP test, type:
|
|||
.. code-block:: console
|
||||
|
||||
./echo-client -t 127.0.0.1
|
||||
|
||||
Setting interface name from command line
|
||||
****************************************
|
||||
|
||||
By default the Ethernet interface name used by native_sim is determined by
|
||||
:kconfig:option:`CONFIG_ETH_NATIVE_POSIX_DRV_NAME`, but is also possible
|
||||
to set it from the command line using ``--eth-if=<interface_name>``.
|
||||
This can be useful if the application has to be
|
||||
run in multiple instances and recompiling it for each instance would be
|
||||
troublesome.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
./zephyr.exe --eth-if=zeth2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue