[comp.protocols.appletalk] Writing TCP/IP programs on the mac?

jsb@pokey.dsd.trw.com (John Bien) (07/07/90)

  I was hoping one of you developers could help me.
  What tools do I need to write a TCP/IP program for the MAC?  I've looked
at the APDA catalog and I can't figure which of the packages I need.
Do I need "MacTCP", "MacTCP Developer's kit", "Communication Toolbox"?
What compiler can I use?  Do I need MPW?  Is anybody using Lightspeed C
with MacTCP?

Any direction would be appreciated.
Thanks

-John

	John Bien 				(213) 814-8546
	TRW Space and Defense Sector, Communications services
	jsb@gumby.dsd.TRW.COM			(Internet)

amanda@mermaid.intercon.com (Amanda Walker) (07/08/90)

In article <18@gumby.dsd.TRW.COM>, jsb@pokey.dsd.trw.com (John Bien) writes:
>   What tools do I need to write a TCP/IP program for the MAC?
> Do I need "MacTCP", "MacTCP Developer's kit", "Communication Toolbox"?
> What compiler can I use?

What you probably want is the MacTCP Developer's Kit, which includes a
programming manual and some example source code (for TCP/IP XCMDs for
HyperCard).  The kit is aimed at developers using MPW, but it shouldn't
be too hard to change the header files so that they'll work with THINK C.
The driver itself doesn't much care as long as it gets PBControl() calls
with the right arguments...

--
Amanda Walker <amanda@intercon.com>
InterCon Systems Corporation
--
Entropy requires no maintenance.

resnick@lees.cogsci.uiuc.edu (Pete Resnick) (07/09/90)

I am using THINK C 4.0 with MacTCP and it is working fine. There are
just a couple of header file changes that you have to make (drop me
e-mail if you want them) and it will work just fine. Personally, I
am just using the evaluation kit, not the development kit, and am
doing OK, but I'd imagine some examples would've been nice.

pr
--
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet/ARPAnet/EDUnet  : resnick@kant.cogsci.uiuc.edu
BITNET (if no other way) : FREE0285@UIUCVMD

resnick@lees.cogsci.uiuc.edu (Pete Resnick) (07/10/90)

I have gotten enough request for the changes I have made to the MacTCP
header files that I think I will post them here. There are only a few
changes that I have made so far, but there may be others that I
haven't used yet.

In MacTCPCommonTypes.h, change the "ifndef/include" definition to look
like this:

#ifndef _MacTypes_
#include <MacTypes.h>
#endif /* _MacTypes_ */

In UDPPB.h, comment out the word "pascal" in the declaration of
UDPNotifyProc so that it looks like this (THINK C doesn't like a
typedefed pascal funtion):

typedef /*pascal*/ void (*UDPNotifyProc) (
		StreamPtr udpStream, 
		unsigned short eventCode, 
		Ptr userDataPtr,
		struct ICMPReport *icmpMsg);

Do the same thing in TCPPB.h for TCPNotifyProc:

typedef /*pascal*/ void (*TCPNotifyProc) (
		StreamPtr tcpStream,
		unsigned short eventCode,
		Ptr userDataPtr,
		unsigned short terminReason,
		struct ICMPReport *icmpMsg);

You will not be able to use these typedefs in your own programs; they
are only to deal with other declarations in your header files. In your
code, declare your notify procs as 'pascal void whatever' with all of
the parameters as they are declare in the typedef.

That's all I have found so far, except that in my copy of TCPPB.h,
instead of the csCode for receive buffer return being TCPBfrReturn as
documented, it was TCPRcvBfrReturn. I changed it to TCPBfrReturn.

pr
--
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet/ARPAnet/EDUnet  : resnick@kant.cogsci.uiuc.edu
BITNET (if no other way) : FREE0285@UIUCVMD

astor@dev8j.mdcbbs.com (07/10/90)

In article <18@gumby.dsd.TRW.COM>, jsb@pokey.dsd.trw.com (John Bien) writes:
> 
>   I was hoping one of you developers could help me.
>   What tools do I need to write a TCP/IP program for the MAC?  I've looked
> at the APDA catalog and I can't figure which of the packages I need.
> Do I need "MacTCP", "MacTCP Developer's kit", "Communication Toolbox"?
> What compiler can I use?  Do I need MPW?  Is anybody using Lightspeed C
> with MacTCP?
> 

Just to give you another option, I'm using THINK C 4.0 with Novell
Kinetics TCPort 2.0 product.  It works just fine for me.

Kinetics can be reached at 415-947-0998 ( probably an 800 number also,
but I don't know it offhand ).

-- 
  ================================================================
 |    Andy Astor            |   Voice:     (714) 952-5836        |
 |    McDonnell Douglas M&E |   UUCP:     uunet!mdcbbs!astor     |
 |    Cypress, CA           |   Internet: astor@mdcbbs.com       |
  ================================================================