Netdev List
 help / color / mirror / Atom feed
* Creating virtual interface using C++
@ 2011-01-16 14:37 Chin Shi Hong
  2011-01-16 14:43 ` Rémi Denis-Courmont
  0 siblings, 1 reply; 3+ messages in thread
From: Chin Shi Hong @ 2011-01-16 14:37 UTC (permalink / raw)
  To: netdev

Dear All,

Can someone give me suggestion for C++ codes that will create a
virtual network interface for the existing network interface
(including wired and wireless network interface)?

Regards,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating virtual interface using C++
  2011-01-16 14:37 Creating virtual interface using C++ Chin Shi Hong
@ 2011-01-16 14:43 ` Rémi Denis-Courmont
  2011-01-16 15:26   ` Chin Shi Hong
  0 siblings, 1 reply; 3+ messages in thread
From: Rémi Denis-Courmont @ 2011-01-16 14:43 UTC (permalink / raw)
  To: Chin Shi Hong; +Cc: netdev

	Hello,

Le dimanche 16 janvier 2011 16:37:05 Chin Shi Hong, vous avez écrit :
> Can someone give me suggestion for C++ codes that will create a
> virtual network interface

It depends what you mean by virtual. Normally, you should use /dev/net/tun 
which is documented at linux-2.6/Documentation/networking/tuntap.txt

> for the existing network interface
> (including wired and wireless network interface)?

But that part of your question does not make any sense.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating virtual interface using C++
  2011-01-16 14:43 ` Rémi Denis-Courmont
@ 2011-01-16 15:26   ` Chin Shi Hong
  0 siblings, 0 replies; 3+ messages in thread
From: Chin Shi Hong @ 2011-01-16 15:26 UTC (permalink / raw)
  To: Rémi Denis-Courmont; +Cc: netdev

2011/1/16 Rémi Denis-Courmont <remi@remlab.net>:
>        Hello,
>
> Le dimanche 16 janvier 2011 16:37:05 Chin Shi Hong, vous avez écrit :
>> Can someone give me suggestion for C++ codes that will create a
>> virtual network interface
>
> It depends what you mean by virtual. Normally, you should use /dev/net/tun
> which is documented at linux-2.6/Documentation/networking/tuntap.txt
>
>> for the existing network interface
>> (including wired and wireless network interface)?
>
> But that part of your question does not make any sense.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> http://fi.linkedin.com/in/remidenis
>

Don't know how to explain by virtual. But, you know the "iw" utility
(http://wireless.kernel.org/en/users/Documentation/iw)? If you
installed this utility, and then run the command "sudo iw dev
<wireless interface> interface add <virtual interface name> type
<wireless mode>", for example "sudo iw dev wlan0 interface add mon0
type monitor", it will add an virtual wireless interface named "mon0"
for the wireless interface "wlan0", then switch it to monitor mode. if
you run that command, you will know what I mean.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-16 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-16 14:37 Creating virtual interface using C++ Chin Shi Hong
2011-01-16 14:43 ` Rémi Denis-Courmont
2011-01-16 15:26   ` Chin Shi Hong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox