Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-13-2006, 11:28 PM   #1 (permalink)
 
True Techie

Join Date: Jun 2005

Posts: 211

Dr Nick

Question C Network Program

Hi Everybody,
Been a while since i've been here last but now i'm finnally in the (never ending ) process of learning a language (C).
Anyway, I am looking for a way to create a program to act as a bridge between an ethernet port and a modem (telephone) port on a computer basicly acting as a dialup server. First of all i need to know if this task is even possible. If it is, i'm guessing i can't do this with the standard stdio.h lybrary so if anyone knows one to us that would be very helpful. Other than that any comments or helpful suggestions would be great!

Thanks
Dr Nick is offline  
Old 08-14-2006, 09:48 AM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default

Why would you want to use the modem at all, then? Why not cut out the middle man and just use a socket directly?
jaeusm is offline  
Old 08-14-2006, 11:44 AM   #3 (permalink)
 
True Techie

Join Date: Jun 2005

Posts: 211

Dr Nick

Default

huh?? Maybe i didn't explain enough, heres the story:

I have a new cell phone that when you intstal it's usb drivers on a computer and connect the phone via usb, the computer recognises it as a modem. I do not subscribe to any dialup services, I have broadband cable going to my home. I want to set up some way for me to be able to call my home # through the cell phone connected to the laptop and be able to acces my home internet connection anywhere I have cell coverage and only be charged basic airtime. I am looking for a way to make a program to relay my internet connection comming in the ethernet port and output it to the modem port.

There, is that clear enough?
Dr Nick is offline  
Old 08-14-2006, 01:37 PM   #4 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default

I'm not 100% sure about the feasibility of your project, but I know similar things have been done using cell phones as modems.

As for writing a program to forward data between two resources, that's quite simple. Since this is a network oriented programming project, I'd use Java, but C will work. If you've never done any socket programming, start learning. However, before you proceed in that direction, spend time researching similar projects on Google to get an idea about the feasibility. I briefly searched "cell phone modem" and got a few results on the first page that were similar projects (but not exactly the same) to yours. If you need direction with socket programming, post back here.
jaeusm is offline  
Old 08-14-2006, 02:03 PM   #5 (permalink)
 
True Techie

Join Date: Jun 2005

Posts: 211

Dr Nick

Default

Well, I have read a little in socket programming but didn't think that would suit the task seeing as there isn't a program at the other end that my program needs to connect to. But I will forllow your advice and hope it helps .
Dr Nick is offline  
Old 08-14-2006, 03:20 PM   #6 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default

Quote:
Originally posted by Dr Nick
Well, I have read a little in socket programming but didn't think that would suit the task seeing as there isn't a program at the other end that my program needs to connect to.
There certainly is a program at the other end! TCP/IP Sockets are the logical abstraction for sending/receiving data over a network connection. In other words, if you want to send or receive data over a network connection, you will do so through a socket. Your web browser is using a socket to send/receive data from this very website. The "program at the other end" is the web server you are communicating with.

So, as far as your project is concerned, you would not be relaying data to the ethernet port. You would be relaying data to a socket, and receiving data from it.
jaeusm is offline  
 
Closed Thread

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On