|
@@ -79,6 +79,8 @@ static void usage(const char *cmd)
|
|
printf(" -m <dest-MAC> Used in sending the IP Tunneled pkt\n");
|
|
printf(" -m <dest-MAC> Used in sending the IP Tunneled pkt\n");
|
|
printf(" -T <stop-after-X-seconds> Default: 0 (forever)\n");
|
|
printf(" -T <stop-after-X-seconds> Default: 0 (forever)\n");
|
|
printf(" -P <IP-Protocol> Default is TCP\n");
|
|
printf(" -P <IP-Protocol> Default is TCP\n");
|
|
|
|
+ printf(" -S use skb-mode\n");
|
|
|
|
+ printf(" -N enforce native mode\n");
|
|
printf(" -h Display this help\n");
|
|
printf(" -h Display this help\n");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -138,7 +140,7 @@ int main(int argc, char **argv)
|
|
{
|
|
{
|
|
unsigned char opt_flags[256] = {};
|
|
unsigned char opt_flags[256] = {};
|
|
unsigned int kill_after_s = 0;
|
|
unsigned int kill_after_s = 0;
|
|
- const char *optstr = "i:a:p:s:d:m:T:P:Sh";
|
|
|
|
|
|
+ const char *optstr = "i:a:p:s:d:m:T:P:SNh";
|
|
int min_port = 0, max_port = 0;
|
|
int min_port = 0, max_port = 0;
|
|
struct iptnl_info tnl = {};
|
|
struct iptnl_info tnl = {};
|
|
struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
|
|
struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
|
|
@@ -206,6 +208,9 @@ int main(int argc, char **argv)
|
|
case 'S':
|
|
case 'S':
|
|
xdp_flags |= XDP_FLAGS_SKB_MODE;
|
|
xdp_flags |= XDP_FLAGS_SKB_MODE;
|
|
break;
|
|
break;
|
|
|
|
+ case 'N':
|
|
|
|
+ xdp_flags |= XDP_FLAGS_DRV_MODE;
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
usage(argv[0]);
|
|
usage(argv[0]);
|
|
return 1;
|
|
return 1;
|