Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - PPP protocol: (2 Items)
   
PPP protocol  
Hi ,

Here I can mention my software requirements as follows.

I need to transfer data between PC (linux/windows based) and QNX based hardware board

Method 1 :

Transfer using TCP/IP ( Ethernet card is interface ) protocol :

Here we can transfer data using socket programming .One PC acted as a server and other one as a client . I know this 
method .

Method 2 :

Transfer using PPP protocols ( RS 232 and serial cable interface) :

I am not very clear about this method. My doubts are as follows.

1) As per my understanding same socket program as I mentioned above can reuse in this case without any modification, 
because PPP is a data link layer protocol and If I open socket means we are directly communicate with TCP or UDP layer 
which is above Data link layer. If this is true

a) How I can make sure that in which route data is passing( Either ethernet layer / PPP layer ) ? Defenitely some 
configuration is required in order to select PPP or ethernet protocol in QNX in application program.Assume that I am 
working only in application layer not in Kernel level.

b) Which is equivalent protocol for PPP if I use ethernet card ?

2) Here one more use case that is in windows. It is as follows.

One PC is running windows based tool , that is connected with QNX based hardware.( RS 232 interface) . This is for modem
 dial up.
when I have press connect button in this tool, Internally source code is using windows RAS API with remote phone number 
(like RasDial()). As a result of this remote hardware (QNX based hardware) will send back its IP address. Once IP 
address was obtained by windows based tool, it will open a socket and connect to port 2000 of Remote hardware . Here 
communication medium is RS 232 .

    a) Is RAS service in windows make use of PPP protocol ? Here windows is using RAS service for dial up(to connect to 
remote QNX hardware). How I can receive this data in remote QNX hardware ? I dont think we can socket program here 
because I dont have remote QNX hardware IP address now. So may be QNX also have same kind of RAS service ? please 
clarify it ?
    b) Here also once IP adress received, windows opening a socket and send data to QNX hardware . But communication is 
through serial (PPP). Here how we can select specifically PPP(Normally we use ethernet protocol and ethernet card )

If you know any site regarding this , please forward to me .

Thanks,
Sethu









Re: PPP protocol  
Hi Sethu,

as I understand your requirements, you want to transfer the data via IP from within your own application, right?

> Method 2 :
>
> Transfer using PPP protocols ( RS 232 and serial cable interface) :
> I am not very clear about this method. My doubts are as follows.
>
> 1) As per my understanding same socket program as I mentioned 
> above can reuse in this case without any modification, because PPP 
> is a data link layer protocol and If I open socket means we are directly 
> communicate with TCP or UDP layer which is above Data link layer. 
> If this is true

Yes, that's correct.

> a) How I can make sure that in which route data is passing (Either 
> ethernet layer / PPP layer ) ? Defenitely some configuration is required 
> in order to select PPP or ethernet protocol in QNX in application
> program.Assume that I am working only in application layer not in 
> Kernel level.

Apart from the fact that under QNX, you'll always be working at application level (and never in a kernel context): This 
isn't exactly a question of PPP or ethernet - it is the more general question of which interface to use.

If you have only one single connection between the two hosts, either ethernet or serial, then you won't need to bother. 
If you have more than one interface on your QNX host through which you could reach the remote host, then of course these
 interfaces must have different IP addresses. To select which one you'll be using, call bind() for your socket, 
providing the IP address of the desired interface. This works both for incoming as for outgoing traffic/connections. 
When acting as a server, one often bind()s to INADDR_ANY, meaning that one will accept requests through any interface, 
but you can just as well bind to a specific one.

> b) Which is equivalent protocol for PPP if I use ethernet card ?

See above - at the application layer, you don't care whether your physical layer is ethernet, PPP or carrier pigeon.

> 2) Here one more use case that is in windows. It is as follows.
>
> One PC is running windows based tool , that is connected with QNX 
> based hardware.( RS 232 interface) . This is for modem dial up.
> when I have press connect button in this tool, Internally source code 
> is using windows RAS API with remote phone number (like RasDial()). 
> As a result of this remote hardware (QNX based hardware) will send 
> back its IP address. Once IP address was obtained by windows based 
> tool, it will open a socket and connect to port 2000 of Remote hardware . 
> Here communication medium is RS 232 .

I'm not sure about your setup here... is this actually a dial-up (i.e. true modem) or merely a direct serial connection 
as above?

> a) Is RAS service in windows make use of PPP protocol ? 

I couldn't tell - that's a windows question. But to my knowledge, RAS is a wide collection of remote access services, 
with PPP being a part of them.

> Here windows is using RAS service for dial up(to connect to remote QNX
> hardware). How I can receive this data in remote QNX hardware ? 

That, again, depends on your type of connection. Also, I don't know what data actually gets sent to the remote host once
 the serial connection is established.

> I dont think we can socket program here because I dont have 
> remote QNX hardware IP address now. 
...Again, it depends: If PPP is already running, you could broadcast through your windows host's PPP interface - there 
will always be at most one (the QNX) host on the other side...

> So may be QNX also have same kind of RAS service ? please clarify it ?
> b) Here also once IP adress received, windows opening a socket and 
> send data to QNX hardware . But communication is through serial (PPP). 
> Here how we can select specifically PPP(Normally we use ethernet protocol 
> and ethernet card )

See above: If you provide the...