ip/iplink_virt_wifi: add support for virt_wifi
Subsystems (2)
PATCH 1/1 ip/iplink_virt_wifi: add support for virt_wifi
Add support for creating virt_wifi devices type.
Syntax:
$ ip link add link eth0 name wlan0 type virt_wifi
--- ip/Makefile | 2 +- ip/iplink_virt_wifi.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ip/iplink_virt_wifi.c
ip/Makefile +1 -1
@@ -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
ip/iplink_virt_wifi.c new file +24 -0
@@ -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 <[email protected]> +*/ + +#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, +};
Signature · 1 line
2.25.1
Quoted 9 lines · Baligh Gasmi
Add support for creating
virt_wifidevices type.Syntax:
$ ip link add link eth0 name wlan0 type virt_wifiSigned-off-by Baligh Gasmi <[email protected]>--- ip/Makefile | 2 +- ip/iplink_virt_wifi.c | 24 ++++++++++++++++++++++++
I think man/man8/ip-link.8.in should also be updated.
ip/iplink_virt_wifi.c line 6
Quoted 12 lines · On Mon, 18 Apr 2022 00:53:18 +0200 Baligh Gasmi <[email protected]> wrote:
ip/iplink_virt_wifi.c new file +6
-0@@ -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 <[email protected]>
Please add SPDX license header at start of file.
PATCH v2 1/1 ip/iplink_virt_wifi: add support for virt_wifi
Add support for creating virt_wifi devices type.
Syntax:
$ ip link add link eth0 name wlan0 type virt_wifi
--- ip/Makefile | 2 +- ip/iplink.c | 2 +- ip/iplink_virt_wifi.c | 26 ++++++++++++++++++++++++++ man/man8/ip-link.8.in | 6 +++++- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 ip/iplink_virt_wifi.c
ip/Makefile +1 -1
@@ -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
ip/iplink.c +1 -1
@@ -57,7 +57,7 @@ void iplink_types_usage(void)" macsec | macvlan | macvtap |\n" " netdevsim | nlmon | rmnet | sit | team | team_slave |\n" " vcan | veth | vlan | vrf | vti | vxcan | vxlan | wwan |\n" - " xfrm }\n"); + " xfrm | virt_wifi }\n"); }void iplink_usage (void )
ip/iplink_virt_wifi.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* 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 <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0 +*/ + +#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, +};
man/man8/ip-link.8.in +5 -1
@@ -244,7 +244,8 @@ ip-link \- network device configuration .BR netdevsim " |" .BR rmnet " |" .BR xfrm " |" -.BR gtp " ]" +.BR gtp " |" +.BR virt_wifi " ]" .ti -8 .IR ETYPE " := [ " TYPE " |"
@@ -396,6 +397,9 @@ Link types: .sp .BR gtp - GPRS Tunneling Protocol +.sp +.B virt_wifi +- rtnetlink wifi simulation device .in -8 .TP
Signature · 1 line
2.25.1
Quoted 9 lines · On Tue, 19 Apr 2022 00:18:54 +0200 Baligh Gasmi <[email protected]> wrote:
+/*
+ *iplink_virt_wifi.cA fake implementation ofcfg80211_opsthat can be tacked
+ * on to an ethernetnet_deviceto make it appear as a
+ * wireless connection.
+ *
+ * Authors: Baligh Gasmi <[email protected]>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
The SPDX License Id must be first line of the file.
Sorry, I didn't catch that !
Quoted 15 lines · Stephen Hemminger
Quoted 9 lines · On Tue, 19 Apr 2022 00:18:54 +0200 Baligh Gasmi <[email protected]> wrote:
+/*
+ *iplink_virt_wifi.cA fake implementation ofcfg80211_opsthat can be tacked
+ * on to an ethernetnet_deviceto make it appear as a
+ * wireless connection.
+ *
+ * Authors: Baligh Gasmi <[email protected]>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */The SPDX License Id must be first line of the file.
PATCH v3 1/1 ip/iplink_virt_wifi: add support for virt_wifi
In reply to Stephen HemmingerAdd support for creating virt_wifi devices type.
Syntax:
$ ip link add link eth0 name wlan0 type virt_wifi
--- ip/Makefile | 2 +- ip/iplink.c | 2 +- ip/iplink_virt_wifi.c | 26 ++++++++++++++++++++++++++ man/man8/ip-link.8.in | 6 +++++- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 ip/iplink_virt_wifi.c
ip/Makefile +1 -1
@@ -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
ip/iplink.c +1 -1
@@ -57,7 +57,7 @@ void iplink_types_usage(void)" macsec | macvlan | macvtap |\n" " netdevsim | nlmon | rmnet | sit | team | team_slave |\n" " vcan | veth | vlan | vrf | vti | vxcan | vxlan | wwan |\n" - " xfrm }\n"); + " xfrm | virt_wifi }\n"); }void iplink_usage (void )
ip/iplink_virt_wifi.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* 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 <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0 +*/ + +#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, +};
man/man8/ip-link.8.in +5 -1
@@ -244,7 +244,8 @@ ip-link \- network device configuration .BR netdevsim " |" .BR rmnet " |" .BR xfrm " |" -.BR gtp " ]" +.BR gtp " |" +.BR virt_wifi " ]" .ti -8 .IR ETYPE " := [ " TYPE " |"
@@ -396,6 +397,9 @@ Link types: .sp .BR gtp - GPRS Tunneling Protocol +.sp +.BR virt_wifi +- rtnetlink wifi simulation device .in -8 .TP
Signature · 1 line
2.25.1
PATCH v4 1/1 ip/iplink_virt_wifi: add support for virt_wifi
In reply to Stephen HemmingerAdd support for creating virt_wifi devices type.
Syntax:
$ ip link add link eth0 name wlan0 type virt_wifi
--- ip/Makefile | 2 +- ip/iplink.c | 2 +- ip/iplink_virt_wifi.c | 25 +++++++++++++++++++++++++ man/man8/ip-link.8.in | 6 +++++- 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 ip/iplink_virt_wifi.c
ip/Makefile +1 -1
@@ -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
ip/iplink.c +1 -1
@@ -57,7 +57,7 @@ void iplink_types_usage(void)" macsec | macvlan | macvtap |\n" " netdevsim | nlmon | rmnet | sit | team | team_slave |\n" " vcan | veth | vlan | vrf | vti | vxcan | vxlan | wwan |\n" - " xfrm }\n"); + " xfrm | virt_wifi }\n"); }void iplink_usage (void )
ip/iplink_virt_wifi.c new file +25 -0
@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 +* +* 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 <[email protected]> +*/ + +#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, +};
man/man8/ip-link.8.in +5 -1
@@ -244,7 +244,8 @@ ip-link \- network device configuration .BR netdevsim " |" .BR rmnet " |" .BR xfrm " |" -.BR gtp " ]" +.BR gtp " |" +.BR virt_wifi " ]" .ti -8 .IR ETYPE " := [ " TYPE " |"
@@ -396,6 +397,9 @@ Link types: .sp .BR gtp - GPRS Tunneling Protocol +.sp +.BR virt_wifi +- rtnetlink wifi simulation device .in -8 .TP
Signature · 1 line
2.25.1
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:
Hello:
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:
Quoted 8 lines · On Tue, 19 Apr 2022 01:25:07 +0200 you wrote:
Add support for creating
virt_wifidevices type.Syntax:
$ ip link add link eth0 name wlan0 type virt_wifiSigned-off-by Baligh Gasmi <[email protected]>[...]
Here is the summary with links:
- [v4] ip/iplink_virt_wifi: add support for virt_wifi
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=ee53174bd977
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html