From ad284e7acb01d6e67b8d5c3d5d5db37aa761730f Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Tue, 4 May 2021 18:07:54 -0500 Subject: [PATCH] ifconfig: expand 10Gbps media knowledge * These are pretty much the 10G standards that have any potential for usage on a desktop system. Change-Id: I2cb49f41ca61e82e091d042f877ee2f1acb9c4ec Reviewed-on: https://review.haiku-os.org/c/haiku/+/3900 Reviewed-by: Alex von Gluck IV Reviewed-by: Adrien Destugues --- headers/posix/net/if_media.h | 8 ++++++-- src/bin/network/ifconfig/MediaTypes.cpp | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/headers/posix/net/if_media.h b/headers/posix/net/if_media.h index b712905d92..35cdc9570f 100644 --- a/headers/posix/net/if_media.h +++ b/headers/posix/net/if_media.h @@ -29,10 +29,14 @@ #define IFM_AUTO 0 #define IFM_10_T 3 /* 10Base-T - RJ45 */ #define IFM_100_TX 6 /* 100Base-TX - RJ45 */ +#define IFM_1000_SX 11 /* 1000Base-SX - Fiber Optic */ #define IFM_1000_T 16 /* 1000Base-T - RJ45 */ -#define IFM_1000_SX 18 /* 1000Base-SX - Fiber Optic */ -#define IFM_10G_T 22 /* 10GBase-T - RJ45 */ +#define IFM_10G_LR 18 /* 10GBase-LR - Fiber 1310nm */ +#define IFM_10G_SR 19 /* 10GBase-SR - Fiber 850nm */ +#define IFM_10G_TWINAX 22 /* 10GBase-CR (DAC) */ +#define IFM_10G_LRM 24 /* 10GBase-LRM Fiber Optic */ #define IFM_UNKNOWN 25 /* media types not defined yet */ +#define IFM_10G_T 26 /* 10GBase-T - RJ45 */ /* General options */ diff --git a/src/bin/network/ifconfig/MediaTypes.cpp b/src/bin/network/ifconfig/MediaTypes.cpp index 5e7c6b8f64..ecead54a79 100644 --- a/src/bin/network/ifconfig/MediaTypes.cpp +++ b/src/bin/network/ifconfig/MediaTypes.cpp @@ -23,7 +23,7 @@ struct media_type { int subtype; const char* name; const char* pretty; - } subtypes [6]; + } subtypes [10]; struct { int option; bool read_only; @@ -63,6 +63,10 @@ const media_type kMediaTypes[] = { { IFM_1000_T, "1000baseT", "1 GBit, 1000BASE-T" }, { IFM_1000_SX, "1000baseSX", "1 GBit, 1000BASE-SX" }, { IFM_10G_T, "10GbaseT", "10 GBit, 10GBASE-T" }, + { IFM_10G_SR, "10GbaseSR", "10 Gbit, 850 nm Fibre"}, + { IFM_10G_LR, "10GbaseLR", "10 Gbit, 1310 nm Fibre"}, + { IFM_10G_LRM, "10GbaseLRM", "10 Gbit, 1300 nm Fibre"}, + { IFM_10G_TWINAX, "10GbaseCR", "10 Gbit, Direct Attach"}, { -1, NULL, NULL } }, {