Skip to content

Commit

Permalink
Merge pull request #26 from hadriansecurity/more_help_info
Browse files Browse the repository at this point in the history
main: include NIC name in version output
  • Loading branch information
kalmjasper authored Sep 20, 2024
2 parents fa48aaa + b79386b commit 021ee7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/eth_rxtx_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ struct AF_XDP_OPTS {

#ifdef NIC_AF_XDP
using NIC_OPTS = AF_XDP_OPTS;
constexpr auto NIC_NAME = "AF_XDP";
#elif NIC_I40E
using NIC_OPTS = I40E_OPTS;
constexpr auto NIC_NAME = "I40E";
#endif

using NICType = EthRxTx<NIC_OPTS>;
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ std::optional<UserConfig> InitConfigFromArgs(int argc, char** argv) {
}

if (version.was_set()) {
std::cout << fmt::format("sanicdns {}", SANICDNS_VERSION) << std::endl;
std::cout << fmt::format("sanicdns {}, built for NIC type: {}", SANICDNS_VERSION, NIC_NAME) << std::endl;
return std::nullopt;
}

Expand Down

0 comments on commit 021ee7d

Please sign in to comment.