Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-05-2003, 08:59 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 15

Rep: Reputation: 0
Question Sending data after establishing PPP connection


I have a shell script that I invoke from my C function to establish PPP connection to a remote PPP server via a 1X modem attached to the serial port of my Linux box. After establishing PPP connection (ie once I have dialed into the PPP server and received a CONNECT prompt), can I use socket functions to send/receive data to/from the PPP server? If no, how else do I send/receive data?
If yes, can I follow the standard sequence of socket calls to send/receive data to/from my server? More specifically,

g_sdClntSkt = socket(PF_INET, SOCK_STREAM, psProtocolEntry->p_proto);

fcntl(g_sdClntSkt, F_SETFL, fcntl(g_sdClntSkt, F_GETFL) | O_NONBLOCK);

connect(g_sdClntSkt, (struct sockaddr*)& g_sSocketAddress, sizeof( g_sSocketAddress);

int iNumBytesWritten = write (g_sdClntSkt, kpucOutputBuffer, iOutputBufferSizeBytes);

int iNumBytesRead = read (g_sdClntSkt, pucInputBuffer, iInputBufferSizeBytes);

I am confused now. I am talking of two different servers here - PPP server and MyServer that is listening on a port. So after establishing connection with the PPP server, what IP address do I need to specify in the connect call or do I not need this call at all?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Establishing Internet Connection TtWEAK Linux - Networking 1 09-21-2005 04:15 AM
Establishing an Internet Connection anders_ant Linux - Networking 3 07-27-2004 01:37 PM
Establishing an ethernet connection mikefoo Linux - Networking 2 11-07-2003 06:58 AM
Sending data over ppp shibdas Linux - Networking 0 06-26-2003 01:40 PM
establishing a internet connection iguarin Linux - Newbie 1 05-20-2003 07:35 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration