jashitha kp(deleted)
|
Re: Tun/Tap driver for qnx
|
jashitha kp(deleted)
06/29/2017 2:38 AM
post117832
|
Re: Tun/Tap driver for qnx
Hi nick,
Thank you for your quick response. I am using "io-pkt-V6-hc" driver.
# use -i io-pkt-v6-hc
"QNX_BUILDID=(GNU)e95deb846dd9d566e9778f9582863b43
NAME=io-pkt-v6-hc
DESCRIPTION=TCP/IP protocol module.
DATE=2016/02/10-11:08:06-EST
STATE=experimental
HOST=gusbuild10
USER=builder
VERSION=897
TAGID=PSP_networking_br660_be660
As you suggested, I could find the tap interface /alt2/dev/tap.
I wrote an application
- opening this tap interface
- sending ioctl with TAPGIFNAME
- read on the tap fd in an infinite loop
Code snippet for this,
tap_fd = open("/alt2/dev/tap", O_RDONLY);
.
.
ifr.ifr_flags = TAPGIFNAME;
strncpy(ifr.ifr_name, "tap0", IFNAMSIZ);
ret = ioctl(tap_fd, TAPGIFNAME, &ifr);
.
.
system("ifconfig tap0 up");
while (1) {
ret = read(tap_fd, tap_buf, sizeof(tap_buf));
.
.
print_data()
}
After running this app in background, I'm assigning a IPv6 IP (2001::2/64) to the tap0 interface.
In another application (running on same board), I'm opening an IPv6 UDP socket and sending datagram packets to the tap0
interface's IP.
But I'm not receiving any packets in my first application 'read'ing on the tap0 interface.
Is it not a valid scenario?
What could be the posible issue in this? Appreciate any help in this regard.
Thank you,
Jashitha
|
|
|