Skip to content

Commit e9bc312

Browse files
committed
LocalIP: support MTU in localip-format
1 parent 9351c48 commit e9bc312

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/modules/localip/localip.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "util/stringUtils.h"
66

77
#define FF_LOCALIP_DISPLAY_NAME "Local IP"
8-
#define FF_LOCALIP_NUM_FORMAT_ARGS 5
8+
#define FF_LOCALIP_NUM_FORMAT_ARGS 6
99
#pragma GCC diagnostic ignored "-Wsign-conversion"
1010

1111
static int sortIps(const FFLocalIpResult* left, const FFLocalIpResult* right)
@@ -116,6 +116,7 @@ void ffPrintLocalIp(FFLocalIpOptions* options)
116116
{FF_FORMAT_ARG_TYPE_STRBUF, &ip->mac, "mac"},
117117
{FF_FORMAT_ARG_TYPE_STRBUF, &ip->name, "ifname"},
118118
{FF_FORMAT_ARG_TYPE_BOOL, &ip->defaultRoute, "is-default-route"},
119+
{FF_FORMAT_ARG_TYPE_INT, &ip->mtu, "mtu"},
119120
}));
120121
}
121122
++index;
@@ -392,7 +393,8 @@ void ffPrintLocalIpHelpFormat(void)
392393
"Local IPv6 address - ipv6",
393394
"Physical (MAC) address - mac",
394395
"Interface name - ifname",
395-
"Is default route - is-default-route"
396+
"Is default route - is-default-route",
397+
"MTU size in bytes - mtu",
396398
}));
397399
}
398400

0 commit comments

Comments
 (0)