Help requested - Application to use an IP interface

M

MikeC

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.
 
M

Morris Dovey

MikeC (in [email protected]) said:

| 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!)

Your programming life is about to become _very_ much more
interesting - you're taking a big step foreward.

CLC isn't the place for discussing networking; and without knowing
anything about the environment it's difficult to help - but I'll
mention in passing that W. Richard Stevens wrote a number of
(unix-oriented) books that you might find helpful in about any
operating environment. A google search on his name will provide
titles.

If you're working "close to the machine" (my normal mode), then you
might also find "Fast Ethernet" by Quinn and Russel informative.
 
R

Roberto Waltman

MikeC said:
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>
 
M

MikeC

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

Best Regards,

MikeC
 
M

MikeC

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.
 
M

Morris Dovey

MikeC (in [email protected]) 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top