Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#34 closed defect (fixed)

Adjust RTPipe API

Reported by: dmik Owned by: Valery V. Sedletski
Priority: blocker Milestone: VBox driver
Component: Runtime Keywords:
Cc:

Description

The current OS/2 implementation of the RTPipe api uses DosCreateNPipe and friends, i.e. OS/2 native named pipes. This imposes a problem though: some cross-platform code (e.g. DrvNAT.cpp, DrvTAP.cpp) uses LIBC poll() to work with pipes created by RTPipeCreate, but OS/2 native pipes are incompatible with LIBC select() which is used there by the poll() implementation.

There are several ways to deal with that:

  1. Replace RPIPE with RTSOCKET and use RTSocket instead (sockets are compatible with select()). Seems to work but creates a lot of OS/2-specific #ifdefs in the sources, not very good.
  2. Change the RTPlpe implementation to use the posix code path (the one Linux uses). This implies using socketpair instead of pipe (as the latter also creates handles incompatible with select). Looks attractive as doesn't require any changes in the using code.
  3. Change the using code (DrvNAT.cpp and others) to use RTPoll instead of poll as the former knows how to deal with OS/2 native pipes created with RTPipeCreate.

Change History (6)

comment:1 by dmik, 9 years ago

Owner: set to vladest
Status: newassigned

comment:2 by dmik, 9 years ago

Valerius is currently working on approach 2 to see if it works (as it requires less changes in other sources once implemented).

Last edited 9 years ago by dmik (previous) (diff)

comment:3 by dmik, 9 years ago

Owner: changed from vladest to Valery V. Sedletski

comment:4 by Valery V. Sedletski, 9 years ago

The ways 1) and 2) result in the same, poll() / select() is working on sockets only, but NAT/Network/DHCP is still not working. E.g., the IP address is not set via DHCP. But the NIC is working, is detected by the Guest OS, and a driver is successfully installed. In windows, the 169.xx.xx.xx IP is set up, but not 10.2.0.xx, as set by VBox's DHCP server. No error like in #18, though, and VM is working (except for the Network -- packets are sent, but no packets are received). So, it seems, the problem is elsewhere.
The approach 3) is also tried, but unfinished.

Last edited 9 years ago by Valery V. Sedletski (previous) (diff)

comment:5 by dmik, 9 years ago

Resolution: fixed
Status: assignedclosed

So the issue we are still seeing is unrelated to this ticket. As I also understand, this issue is different from #18 as well. So, Valerius, please create a new ticket for it.

We finally decided to stick with approach 2 for this ticket's original problem (see comment:2) and the respective changes are committed in r63. Closing this ticket.

comment:6 by diver, 9 years ago

Milestone: VBox SDL InterfaceVBox driver
Note: See TracTickets for help on using tickets.