eudora-mac/Include/tcp.h

1 line
10 KiB
C
Raw Permalink Normal View History

2018-05-23 09:59:15 +00:00
/* Copyright (c) 2017, Computer History Museum All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Computer History Museum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TCP_H #define TCP_H /* Copyright (c) 1990-1992 by the University of Illinois Board of Trustees */ /************************************************************************ * declarations for dealing with tcp streams ************************************************************************/ enum { NUM_ALT_ADDRS = 4 }; struct hostInfo { long rtnCode; char cname[255]; SInt8 filler; /* Filler for proper byte alignment */ unsigned long addr[NUM_ALT_ADDRS]; }; typedef struct hostInfo hostInfo; typedef struct HIQ HostInfoQ, *HostInfoQPtr, **HostInfoQHandle; struct HIQ { HostInfoQHandle next; struct hostInfo hi; short done; Boolean inUse; }; void TcpFastFlush(Boolean destroy); int GetTCPStatus(TransStream stream,TCPiopb *pb); OSErr GetHostByAddr(struct hostInfo *hi, long addr); int GetHostByName(UPtr name, struct hostInfo **hostInfoPtr); OSErr GetMyHostid(uLong *myAddr,uLong *myMask); Boolean SplitPort(PStr host,long *port); // These are PPP error codes, not yet defined in the OT Headers. // Remove these once the OT/PPP header is finalized. #define kCCLErrorBaseCode -6000 #define kCCLErrorAbortMatchRead kCCLErrorBaseCode // internal error used to abort match read #define kCCLErrorGeneric (kCCLErrorBaseCode - 2) // CCL error base #define kCCLErrorSubroutineOverFlow (kCCLErrorBaseCode - 3) // target label undefined #define kCCLErrorLabelUndefined (kCCLErrorBaseCode - 4) // target label undefined #define kCCLErrorBadParameter (kCCLErrorBaseCode - 5) // bad parameter error #define kCCLErrorDuplicateLabel (kCCLErrorBaseCode - 6) // duplicate label error #define kCCLErrorCloseError (kCCLErrorBaseCode - 7) // There is at least one script open #define kCCLErrorScriptCancelled (kCCLErrorBaseCode - 8) // Script Canceled #define kCCLErrorTooManyLines (kCCLErrorBaseCode - 9) // Script contains too many lines #define kCCLErrorScriptTooBig (kCCLErrorBaseCode - 10) // Script contains too many characters #define kCCLErrorNotInitialized (kCCLErrorBaseCode - 11) // CCL has not been initialized #define kCCLErrorCancelInProgress (kCCLErrorBaseCode - 12) // Cancel in progress. #define kCCLErrorPlayInProgress (kCCLErrorBaseCode - 13) // Play command already in progress. #define kCCLErrorExitOK (kCCLErrorBaseCode - 14) // Exit with no error. #define kCCLErrorLabelOutOfRange (kCCLErrorBaseCode - 15) // Label out of rang