Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - io-pkt-v6-hc Wifi driver transmit UDP on IPv6 issue: Page 1 of 4 (4 Items)
   
io-pkt-v6-hc Wifi driver transmit UDP on IPv6 issue  
Hi all,

    I am develop a new wifi driver on QNX. I reference to the sam.c, and basically, this driver works fine. But I face a
 issue that transmit UDP on IPv6 with wifi driver. 
    I have en0 and wifi0 on QNX, I use the same source code to transmit UDP(on IPv6), en0 is successful, but wifi0 is 
strange, becase driver only get [Ethernet header(14bytes)] from io-pkt, no IPv6 header and UDP header ,data. I use 
following source code to transmit UDP(on IPv6).

mysocket=socket(AF_INET6,SOCK_DGRAM,0);
...
dst_sock_in.sin6_family = 0x18
dst_sock_in.sin6_port = 0x3930
dst_sock_in.sin6_scope_id = 0
dst_sock_in.sin6_addr.s6_addr = FE 80 0 12 0 0 0 0 2C 9 A FF FE 0 8F B1
...
send_bytes = sendto( g_Socket_Fd[ SOCKET_UDP ], Data_p, (size_t)Length, 0, ( struct sockaddr* )&dst_sock_in, sizeof( 
dst_sock_in ) );

But the driver only get below data:
            | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
     -----+-------------------------------------------------+-----------------
 0000 | 2E 09 0A 00 8F B1 2E 09 0A 00 8F B4 86 DD      

No IPv6 header and UDP data.

Then I change the source code: use connect function, and use send() function to transmit UDP(on IPv6) data(this is 
described in Helo content of the IDE). Then the driver get IPv6 data and UDP header from io-pkt, although the udp length
 in UDP header is right, but there is no UDP data after the UDP header. Isend 5bytes udp data.

            | +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
     -----+-------------------------------------------------+-----------------										
 0040 | 2E 09 0A 00 8F B1 2E 09 0A 00 8F B4 86 DD 60 00 											
 0050 | 00 00 00 0D 11 40 FE 80 00 00 00 00 00 00 2C 09 											
 0060 | 0A FF FE 00 8F 56 FE 80 00 00 00 00 00 00 2C 09 											
 0070 |  0A FF FE 00 8F 57 30 39 30 39 00 0D F5 CD                             											

Would you please give me some advice? I dont know whether there is any mistake in the driver source code. Since en0 
works fine with UDP(on IPv6).

NOTE: I use raw socket to compose UDP data, and it works fine on both en0 and wifi0.
(sock = socket (AF_INET6, SOCK_RAW, IPPROTO_UDP)

Thank you in andvance!


Attachment: Text udp_send.c 1.98 KB