From 59f27d69358efc919b50760f3d6dac0b637b5488 Mon Sep 17 00:00:00 2001 From: Pavel Krotkiy Date: Wed, 3 Apr 2024 12:52:56 +0100 Subject: [netdevice] Add "linktype" setting Add a new setting to provide access to the link layer protocol type from scripts. This can be useful in order to skip configuring interfaces based on their link layer protocol or, conversely, configure only selected interface types (Ethernet, IPoIB, etc.) Example script: set idx:int32 0 :loop isset ${net${idx}/mac} || exit 0 iseq ${net${idx}/linktype} IPoIB && goto try_next || autoboot net${idx} || :try_next inc idx && goto loop Signed-off-by: Pavel Krotkiy Modified-by: Michael Brown Signed-off-by: Michael Brown --- src/include/ipxe/settings.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/settings.h b/src/include/ipxe/settings.h index 424188deb..0301da12e 100644 --- a/src/include/ipxe/settings.h +++ b/src/include/ipxe/settings.h @@ -471,6 +471,8 @@ mac_setting __setting ( SETTING_NETDEV, mac ); extern const struct setting busid_setting __setting ( SETTING_NETDEV, busid ); extern const struct setting +linktype_setting __setting ( SETTING_NETDEV, linktype ); +extern const struct setting user_class_setting __setting ( SETTING_HOST_EXTRA, user-class ); extern const struct setting vendor_class_setting __setting ( SETTING_HOST_EXTRA, vendor-class ); -- cgit