For Programmers: Free Programming Magazines  


Home > Archive > C > June 2006 > Help requested - Application to use an IP interface









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help requested - Application to use an IP interface
MikeC

2006-06-24, 7:59 am

Folks,

I am writing an application that interfaces with a machine that has both
serial and IP communications.
The application sends and receives text strings.
I have written it using the serial interface, because I have easy access to
it, but when it is used for real, it needs to send and receive the same
strings to an IP address. I have never done this kind of programming before
(the IP interface).

Given the IP address of the machine (and possibly the address of a gateway
to it), can anybody give me any pointers of where to find what I need, and
if somebody could give me a short and simple working example, it would be
like a preview of the next world (Heaven, I hope!)

Typically, I will send strings like

> sendLog


.... and write the returned log intom a buffer.

Thanks (with bated breath)

Mike.


Roberto Waltman

2006-06-24, 7:59 am

"MikeC" wrote:
>I am writing an application that interfaces with a machine that has both
>serial and IP communications.
>The application sends and receives text strings.
>... it needs to send and receive the same
>strings to an IP address. I have never done this kind of programming before
>(the IP interface).
>
>Given the IP address of the machine (and possibly the address of a gateway
>to it), can anybody give me any pointers of where to find what I need, and
>if somebody could give me a short and simple working example...


<OT>
1st) This is a good (and small) book to get you started:
"Pocket Guide to TCP/IP Sockets" (C Version) ISBN 1558606866

2nd) Inspect the source code for common network utilities, such as
telnet, rsh, rcp, etc. (Skip anything related to authentication and
cryptography, at least for now.)

3rd) Web search for "socket tutorials", etc.

4th) Standard advice: post again in a newsgroup or mailing list
dedicated to the platform/OS/environment etc. you are using for this
project, and/or to network programming. (comp.protocols.tcp-ip,
comp.os.???)
</OT>
MikeC

2006-06-24, 6:56 pm

Many thanks to both who responded. I'll order the books and see where we go
from there.

Best Regards,

MikeC

"MikeC" <my.address@end_of.post> wrote in message
news:0mTmg.40745$lQ.16858@newsfe3-gui.ntli.net...
> Folks,
>
> I am writing an application that interfaces with a machine that has both
> serial and IP communications.
> The application sends and receives text strings.
> I have written it using the serial interface, because I have easy access

to
> it, but when it is used for real, it needs to send and receive the same
> strings to an IP address. I have never done this kind of programming

before
> (the IP interface).
>
> Given the IP address of the machine (and possibly the address of a gateway
> to it), can anybody give me any pointers of where to find what I need, and
> if somebody could give me a short and simple working example, it would be
> like a preview of the next world (Heaven, I hope!)
>
> Typically, I will send strings like
>
>
> ... and write the returned log intom a buffer.
>
> Thanks (with bated breath)
>
> Mike.
>
>



MikeC

2006-06-28, 7:57 am

Folks,

I already replied. I don't know why it didn't get posted.

Just a note to say thanks to my two respondants, and to ask where I can
examine the source code for "common network utilities, such as
telnet, rsh, rcp, etc.", as suggested by Roberto Waltman.

Thanks and Regards,

Mike.


Morris Dovey

2006-06-28, 7:58 am

MikeC (in Qhuog.12673$IU2.8106@newsfe2-win.ntli.net) said:

| Just a note to say thanks to my two respondants, and to ask where I
| can examine the source code for "common network utilities, such as
| telnet, rsh, rcp, etc.", as suggested by Roberto Waltman.

A full Linux distribution (I think) includes sources of the modules
for which you're looking - you can download or buy a CD. Prepare to
spend a _lot_ of time reading. I'm not sure, but think sources may
also accompany BSD distributions.

If you can't find 'em or lack resources, e-mail me and I'll send one
of my ancient Linux CDs.

--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto


Roberto Waltman

2006-06-28, 6:56 pm

"MikeC" wrote:
>... to ask where I can
>examine the source code for "common network utilities, such as
>telnet, rsh, rcp, etc."


http://www.debian.org/distrib/packages
http://www.netbsd.org/Documentation...e/packages.html
http://cvs.opensolaris.org/source/
http://www.freebsd.org/ports/master-index.html
http://packages.gentoo.org/
http://www.openbsd.org/3.9_packages/i386.html
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com