Interworking between shared objects

Hi, everybody

I would like to interwork between PPP and GRE(Generic Routing
Encapsulation). I have GRE module and I intend to ‘porting’ it to QNXRTP
using Network DDK, that is to say, make a shared object.
The whole protocol stack I want to make is the following.

Mobile IP
UDP

IP
PPP

GRE
UDP

IP
Ethernet

As you know, this protocol stack is A10 interface of CDMA 2000-1x.
My problem is how can the GRE(shared object) receives PPP frames from PPP(is
this ppp manager ?) and then send the frames to UDP.
I’m learning Network DDK API and the procedure.

Q1) Is it right that the GRE module would be ported to QNXRTP(shared object)
using Network DDK API ?

Q2-1) If so, how can the GRE receives PPP frames from PPP and send the
frames to UDP ?

Q2-2) If not, could you advise me on other good solution ?

thanks,
Hoon