From: Baligh Gasmi <gasmibal@gmail.com>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
David Ahern <dsahern@kernel.org>,
Baligh Gasmi <gasmibal@gmail.com>
Subject: [PATCH] ip/iplink_virt_wifi: add support for virt_wifi
Date: Mon, 18 Apr 2022 00:53:18 +0200 [thread overview]
Message-ID: <20220417225318.18765-1-gasmibal@gmail.com> (raw)
Add support for creating virt_wifi devices type.
Syntax:
$ ip link add link eth0 name wlan0 type virt_wifi
Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
---
ip/Makefile | 2 +-
ip/iplink_virt_wifi.c | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 ip/iplink_virt_wifi.c
diff --git a/ip/Makefile b/ip/Makefile
index 0f14c609..e06a7c84 100644
--- a/ip/Makefile
+++ b/ip/Makefile
@@ -12,7 +12,7 @@ IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
iplink_geneve.o iplink_vrf.o iproute_lwtunnel.o ipmacsec.o ipila.o \
ipvrf.o iplink_xstats.o ipseg6.o iplink_netdevsim.o iplink_rmnet.o \
ipnexthop.o ipmptcp.o iplink_bareudp.o iplink_wwan.o ipioam6.o \
- iplink_amt.o iplink_batadv.o iplink_gtp.o
+ iplink_amt.o iplink_batadv.o iplink_gtp.o iplink_virt_wifi.o
RTMONOBJ=rtmon.o
diff --git a/ip/iplink_virt_wifi.c b/ip/iplink_virt_wifi.c
new file mode 100644
index 00000000..28157d85
--- /dev/null
+++ b/ip/iplink_virt_wifi.c
@@ -0,0 +1,24 @@
+/*
+ * iplink_virt_wifi.c A fake implementation of cfg80211_ops that can be tacked
+ * on to an ethernet net_device to make it appear as a
+ * wireless connection.
+ *
+ * Authors: Baligh Gasmi <gasmibal@gmail.com>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "utils.h"
+#include "ip_common.h"
+
+static void virt_wifi_print_help(struct link_util *lu,
+ int argc, char **argv, FILE *f)
+{
+ fprintf(f, "Usage: ... virt_wifi \n");
+}
+
+struct link_util virt_wifi_link_util = {
+ .id = "virt_wifi",
+ .print_help = virt_wifi_print_help,
+};
--
2.25.1
next reply other threads:[~2022-04-17 22:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-17 22:53 Baligh Gasmi [this message]
2022-04-18 4:39 ` [PATCH] ip/iplink_virt_wifi: add support for virt_wifi Benjamin Poirier
2022-04-18 15:06 ` Stephen Hemminger
2022-04-18 22:18 ` [PATCH v2] " Baligh Gasmi
2022-04-18 23:15 ` Stephen Hemminger
2022-04-18 23:25 ` Baligh GASMI
2022-04-18 22:28 ` [PATCH v3] " Baligh Gasmi
2022-04-18 23:25 ` [PATCH v4] " Baligh Gasmi
2022-04-20 2:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220417225318.18765-1-gasmibal@gmail.com \
--to=gasmibal@gmail.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).