LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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


Hi,

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?

Thanks,
Ruchika
 
  


Reply


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 03:15 AM
Establishing an Internet Connection anders_ant Linux - Networking 3 07-27-2004 12:37 PM
Establishing an ethernet connection mikefoo Linux - Networking 2 11-07-2003 05:58 AM
Sending data over ppp shibdas Linux - Networking 0 06-26-2003 12:40 PM
establishing a internet connection iguarin Linux - Newbie 1 05-20-2003 06:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:07 PM.

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