OpenTransportNetEvents.c File Reference

#include "frontier.h"
#include "standard.h"
#include "mac.h"
#include "error.h"
#include "kb.h"
#include "ops.h"
#include "memory.h"
#include "threads.h"
#include "strings.h"
#include "lang.h"
#include "langinternal.h"
#include "process.h"
#include "processinternal.h"
#include "shell.h"
#include "shellhooks.h"
#include "timedate.h"
#include "WinSockNetEvents.h"
#include "frontierdebug.h"
#include "file.h"
#include "about.h"

Include dependency graph for OpenTransportNetEvents.c:

Go to the source code of this file.

Data Structures

struct  tyepstatsrecord
struct  tylistenrecord
struct  tyendpointrecord
struct  TKeepAliveOpt
struct  dnsquery

Defines

#define wsprintf   sprintf
#define OTAssert(name, cond)   ((cond) ? ((void) 0) : (DebugStr( __FILE__ ": " #name ": " #cond )))
#define NO_HOST_SERVICES   NULL
#define SOCKTYPE_INVALID   -1
#define SOCKTYPE_UNKNOWN   0
#define SOCKTYPE_OPEN   1
#define SOCKTYPE_DATA   2
#define SOCKTYPE_LISTENING   3
#define SOCKTYPE_CLOSED   4
#define SOCKTYPE_LISTENSTOPPED   5
#define SOCKTYPE_INACTIVE   6
#define INTNETERROR_INVALIDSTREAM   -1
#define TCPTRACKER   1
#define fllogger   (aboutstatsshowing())
#define TCPprintf(msg)   msg
#define TCPERRORprintf(msg)   msg
#define TCPERRORWRITEMSG   TCPWRITEMSG
#define TCPTRACKERCLOSE()

Typedefs

typedef short tysocktypeid
typedef tylistenrecordListenRecordRef
typedef tyendpointrecordEndpointRecordRef
typedef TKeepAliveOpt TKeepAliveOpt

Enumerations

enum  {
  kBrokenBit = 0, kOpenInProgressBit = 1, kPassconBit = 2, kBoundBit = 3,
  kDontDisposeBit = 4, kWaitingForConnectBit = 5, kWaitingForDisconnectBit = 6, kConnectCompleteBit = 0,
  kGetProtAddressBit = 1, kRcvdDisconnectBit = 2, kSntDisconnectBit = 3, kRcvdOrderlyDisconnectBit = 4,
  kIPReuseAddrBit = 5, kTCPKeepAliveBit = 6, kOTVersion111 = 0x01110000, kTCPKeepAliveInMinutes = 1,
  kTCPWaitSecsForConnect = 30, kTCPWaitSecsForOrderlyDisconnect = 60, kDontQueueIt = 0, kQueueIt = 1
}

Functions

static void InitEndpoint (EndpointRecordRef epref, EndpointRef ep, ListenRecordRef listenref)
static pascal void ReturnEndpoint (EndpointRecordRef epref, OTResult result, int completionbit)
static boolean CheckEndpointList (EndpointRecordRef epref)
static boolean CheckListenList (ListenRecordRef listenref)
static void CheckUnbind (EndpointRecordRef epref, OTResult result, Boolean queueIt)
static OSStatus DoBind (EndpointRecordRef epref)
static void DoRcvDisconnect (EndpointRecordRef epref)
static void EnterRcvDisconnect (EndpointRecordRef epref)
static void DoListenRcvDisconnect (ListenRecordRef listenref)
static void EnterListenAccept (ListenRecordRef listenref)
static OSStatus DoSndOrderlyDisconnect (EndpointRecordRef epref, boolean flrecurse)
static OSStatus DoSndDisconnect (EndpointRecordRef epref)
static OSStatus EnterSndDisconnect (EndpointRecordRef epref)
static void ReadAllAndClose (EndpointRecordRef epref)
static pascal void DNRNotifier (void *context, OTEventCode event, OTResult result, void *cookie)
static pascal void ListenNotifier (void *context, OTEventCode code, OTResult result, void *cookie)
static pascal void Notifier (void *context, OTEventCode code, OTResult result, void *cookie)
static OSStatus EPOpen (EndpointRecordRef epref, OTConfigurationRef cfg)
static boolean EPClose (EndpointRecordRef epref)
static void Recycle (ListenRecordRef listenref)
static void * fwsacceptingthreadmain (void *param)
static char * TCPGETTYPE (tysocktypeid typeID)
static void TCPWRITEMSG ()
static void TCPTRACKERIN (char *functionName, int linenumber, EndpointRecordRef epref, ListenRecordRef listenref)
static void TCPTRACKEROUT (char *functionName, int linenumber, EndpointRecordRef epref, ListenRecordRef listenref)
long fwsNetEventGetConnectionCount (void)
static boolean incrementconnectioncounter (void)
static void decrementconnectioncounter (void)
static pascal boolean listendatabasevisit (const void *ref, OTLink *linkToCheck)
static pascal boolean listenlinkvisit (const void *ref, OTLink *linkToCheck)
static pascal boolean endpointlinkvisit (const void *ref, OTLink *linkToCheck)
static OSStatus EnterBind (EndpointRecordRef epref)
static void DoRcvOrderlyDisconnect (EndpointRecordRef epref)
static void EnterRcvOrderlyDisconnect (EndpointRecordRef epref)
static void DoListenAccept (ListenRecordRef listenref)
static OSStatus SetIpReuseAddrOption (EndpointRecordRef epref)
static OSStatus SetTcpKeepAliveOption (EndpointRecordRef epref)
static OSStatus SetTcpConnAbortThresholdOption (EndpointRecordRef epref)
static void ProcessWaitingEndpoints (ListenRecordRef listenref)
static void gettcperrorstring (int errcode, bigstring bs)
static void plainneterror (bigstring bs)
static void closedunexpectedlyerror (char *cannot)
static void neterror (char *cannot, long errcode)
static void intneterror (long errcode)
static boolean fwsbackgroundtask (void)
static boolean fwsNetEventLaunch (void *data)
boolean fwsNetEventQuit (void)
boolean fwsNetEventAddressDecode (unsigned long addr, bigstring IPaddr)
boolean fwsNetEventAddressEncode (bigstring IPaddr, unsigned long *addr)
boolean fwsNetEventAddressToName (unsigned long addr, bigstring domainName)
boolean fwsNetEventNameToAddress (bigstring domainName, unsigned long *addr)
boolean fwsNetEventMyAddress (unsigned long *addr)
static boolean fwsgetcallbackcodetree (bigstring bs, Handle *htree)
static boolean fwsnewprocess (hdltreenode hcode, bigstring bsname, hdlprocessrecord *hprocess)
static boolean fwsruncallback (EndpointRecordRef epref)
static long fwsprocesspendingconnections (ListenRecordRef listenref)
static void fwscleanuplistener (ListenRecordRef listenref)
static boolean fwslaunchacceptingthread (ListenRecordRef listenref)
boolean fwsNetEventListenStream (unsigned long port, long depth, bigstring pCallback, unsigned long refcon, unsigned long *stream, unsigned long ipaddr, long hdatabase)
boolean fwsNetEventCloseListen (unsigned long stream)
void fwsNetEventShutdownDependentListeners (long hdatabase)
boolean fwsNetEventCheckAndAcceptSocket (void)
static short is_ipaddress (char *name)
static boolean fwsOpenStream (TCall *ptrSndCall, unsigned long *stream)
boolean fwsNetEventOpenAddrStream (unsigned long addr, unsigned long port, unsigned long *stream)
boolean fwsNetEventOpenNameStream (bigstring name, unsigned long port, unsigned long *stream)
boolean fwsNetEventAbortStream (unsigned long stream)
boolean fwsNetEventCloseStream (unsigned long stream)
boolean fwsNetEventReadStream (unsigned long stream, unsigned long *bytesToRead, char *buffer)
boolean fwsNetEventWriteStream (unsigned long stream, unsigned long bytesToWrite, char *buffer)
boolean fwsNetEventStatusStream (unsigned long stream, bigstring status, unsigned long *bytesPending)
boolean fwsNetEventGetPeerAddress (unsigned long stream, unsigned long *peeraddress, unsigned long *peerport)
boolean fwsNetEventReadStreamUntil (unsigned long stream, Handle hbuffer, Handle hpattern, unsigned long timeoutsecs)
boolean fwsNetEventReadStreamUntilClosed (unsigned long stream, Handle hbuffer, unsigned long timeoutsecs)
boolean fwsNetEventReadStreamBytes (unsigned long stream, Handle hbuffer, long ctbytes, unsigned long timeoutsecs)
boolean fwsNetEventWriteHandleToStream (unsigned long stream, Handle hbuffer, unsigned long chunksize, unsigned long timeoutsecs)
static boolean fwstransmitfile (unsigned long stream, ptrfilespec fs)
boolean fwsNetEventWriteFileToStream (unsigned long stream, Handle hprefix, Handle hsuffix, ptrfilespec fs)
boolean fwsNetEventInetdRead (unsigned long stream, Handle hbuffer, unsigned long timeoutsecs)
boolean fwsNetEventGetStats (unsigned long stream, bigstring bs)

Variables

static unsigned char * xtierrorstrings []
static unsigned char * stdcliberrorstrings [80]
static const long kPacketSize = 8192L
static tyepstatsrecord epstats
static OTList sListenList
static OTList sEndpointList
static OTLIFO sIdleEPs
static OTLIFO sBrokenEPs
static OTLIFO sWaitingEPs
static OTConfigurationRef sMasterConfig
static OSType sOTVersionSelector = 'otvr'
static long sOTVersion
static short frontierWinSockCount = 0
static boolean frontierWinSockLoaded = false
const unsigned long fcomplete = 1L
static char TCPmsg [400]
long maxconnections = longinfinity
static long ctconnections = 0


Define Documentation

#define fllogger   (aboutstatsshowing())
 

Definition at line 675 of file OpenTransportNetEvents.c.

#define INTNETERROR_INVALIDSTREAM   -1
 

Definition at line 314 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventAbortStream(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventGetStats(), fwsNetEventInetdRead(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), and intneterror().

#define NO_HOST_SERVICES   NULL
 

Definition at line 303 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventAbortStream(), fwsNetEventAddressDecode(), fwsNetEventAddressEncode(), fwsNetEventAddressToName(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventInetdRead(), fwsNetEventListenStream(), fwsNetEventMyAddress(), fwsNetEventNameToAddress(), fwsNetEventOpenAddrStream(), fwsNetEventOpenNameStream(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), and fwsNetEventWriteStream().

#define OTAssert name,
cond   )     ((cond) ? ((void) 0) : (DebugStr( __FILE__ ": " #name ": " #cond )))
 

Definition at line 300 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventListenStream(), fwsNetEventMyAddress(), and ListenNotifier().

#define SOCKTYPE_CLOSED   4
 

Definition at line 310 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventAbortStream(), fwsNetEventCloseStream(), fwsNetEventGetStats(), fwsNetEventStatusStream(), and TCPGETTYPE().

#define SOCKTYPE_DATA   2
 

Definition at line 308 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventGetStats(), and TCPGETTYPE().

#define SOCKTYPE_INACTIVE   6
 

Definition at line 312 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventGetStats(), fwsNetEventInetdRead(), fwsNetEventListenStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteHandleToStream(), and TCPGETTYPE().

#define SOCKTYPE_INVALID   -1
 

Definition at line 305 of file OpenTransportNetEvents.c.

Referenced by addsockrecord(), clearsockstack(), fwsNetEventStatusStream(), fwsOpenStream(), InitEndpoint(), and TCPGETTYPE().

#define SOCKTYPE_LISTENING   3
 

Definition at line 309 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventListenStream(), fwsNetEventShutdownDependentListeners(), fwsNetEventStatusStream(), and TCPGETTYPE().

#define SOCKTYPE_LISTENSTOPPED   5
 

Definition at line 311 of file OpenTransportNetEvents.c.

Referenced by fwsacceptingthreadmain(), fwsNetEventCloseListen(), fwsNetEventShutdownDependentListeners(), fwsNetEventStatusStream(), restartAccepter(), and TCPGETTYPE().

#define SOCKTYPE_OPEN   1
 

Definition at line 307 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventGetStats(), fwsNetEventStatusStream(), fwsOpenStream(), fwsprocesspendingconnections(), and TCPGETTYPE().

#define SOCKTYPE_UNKNOWN   0
 

Definition at line 306 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventStatusStream(), initsockrecord(), and TCPGETTYPE().

#define TCPERRORprintf msg   )     msg
 

Definition at line 677 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventAbortStream(), fwsNetEventCloseListen(), fwsNetEventWriteHandleToStream(), neterror(), plainneterror(), and restartAccepter().

#define TCPERRORWRITEMSG   TCPWRITEMSG
 

Definition at line 691 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventAbortStream(), fwsNetEventCloseListen(), fwsNetEventWriteHandleToStream(), neterror(), plainneterror(), and restartAccepter().

#define TCPprintf msg   )     msg
 

Definition at line 676 of file OpenTransportNetEvents.c.

Referenced by fwsacceptingthreadmain(), fwsNetEventAddressToName(), fwsNetEventCloseStream(), fwsNetEventInetdRead(), fwsNetEventListenStream(), fwsNetEventNameToAddress(), fwsNetEventOpenAddrStream(), fwsNetEventOpenNameStream(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), fwsprocesspendingconnections(), and restartAccepter().

#define TCPTRACKER   1
 

Definition at line 533 of file OpenTransportNetEvents.c.

 
#define TCPTRACKERCLOSE  ) 
 

Definition at line 693 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventQuit(), and fwsNetEventShutDown().

#define wsprintf   sprintf
 

Definition at line 278 of file OpenTransportNetEvents.c.

Referenced by closedunexpectedlyerror(), fwsacceptingthreadmain(), fwsNetEventAbortStream(), fwsNetEventAddressToName(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventInetdRead(), fwsNetEventListenStream(), fwsNetEventNameToAddress(), fwsNetEventOpenAddrStream(), fwsNetEventOpenNameStream(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), fwsprocesspendingconnections(), neterror(), numbertostring(), plainneterror(), replacevariabledialog(), restartAccepter(), savedialog(), sysfunctionvalue(), TCPTRACKERIN(), and TCPTRACKEROUT().


Typedef Documentation

typedef struct tyendpointrecord* EndpointRecordRef
 

Definition at line 322 of file OpenTransportNetEvents.c.

typedef struct tylistenrecord* ListenRecordRef
 

Definition at line 320 of file OpenTransportNetEvents.c.

typedef struct TKeepAliveOpt TKeepAliveOpt
 

Definition at line 443 of file OpenTransportNetEvents.c.

typedef short tysocktypeid
 

Definition at line 318 of file OpenTransportNetEvents.c.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
kBrokenBit 
kOpenInProgressBit 
kPassconBit 
kBoundBit 
kDontDisposeBit 
kWaitingForConnectBit 
kWaitingForDisconnectBit 
kConnectCompleteBit 
kGetProtAddressBit 
kRcvdDisconnectBit 
kSntDisconnectBit 
kRcvdOrderlyDisconnectBit 
kIPReuseAddrBit 
kTCPKeepAliveBit 
kOTVersion111 
kTCPKeepAliveInMinutes 
kTCPWaitSecsForConnect 
kTCPWaitSecsForOrderlyDisconnect 
kDontQueueIt 
kQueueIt 

Definition at line 399 of file OpenTransportNetEvents.c.


Function Documentation

static boolean CheckEndpointList EndpointRecordRef  epref  )  [static]
 

Definition at line 859 of file OpenTransportNetEvents.c.

References endpointlinkvisit(), nil, and sEndpointList.

Referenced by fwsNetEventAbortStream(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventInetdRead(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), TCPTRACKERIN(), and TCPTRACKEROUT().

Here is the call graph for this function:

static boolean CheckListenList ListenRecordRef  listenref  )  [static]
 

Definition at line 873 of file OpenTransportNetEvents.c.

References listenlinkvisit(), nil, and sListenList.

Referenced by fwsNetEventGetStats(), fwsNetEventStatusStream(), TCPTRACKERIN(), and TCPTRACKEROUT().

Here is the call graph for this function:

static void CheckUnbind EndpointRecordRef  epref,
OTResult  result,
Boolean  queueIt
[static]
 

Definition at line 937 of file OpenTransportNetEvents.c.

References tylistenrecord::brokenEPs, tyepstatsrecord::ctbroken, tyepstatsrecord::ctidle, tyepstatsrecord::ctworking, EnterListenAccept(), tyendpointrecord::ep, EPClose(), epstats, tylistenrecord::fllistenpending, tylistenrecord::idleEPs, kBrokenBit, tyendpointrecord::link, tyendpointrecord::listener, nil, sBrokenEPs, sIdleEPs, tyendpointrecord::stateflags, tylistenrecord::stats, and TCP_ASSERT_1.

Referenced by DoRcvDisconnect(), DoRcvOrderlyDisconnect(), DoSndDisconnect(), DoSndOrderlyDisconnect(), fwsNetEventCloseStream(), fwsOpenStream(), Notifier(), ProcessWaitingEndpoints(), ReadAllAndClose(), and ReturnEndpoint().

Here is the call graph for this function:

static void closedunexpectedlyerror char *  cannot  )  [static]
 

Definition at line 2349 of file OpenTransportNetEvents.c.

References bigstring, copyctopstring(), plainneterror(), and wsprintf.

Referenced by fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventWriteHandleToStream(), and fwsNetEventWriteStream().

Here is the call graph for this function:

static void decrementconnectioncounter void   )  [static]
 

Definition at line 815 of file OpenTransportNetEvents.c.

Referenced by DoListenAccept(), fwsNetEventAbortStream(), fwsNetEventCloseStream(), fwsOpenStream(), and Notifier().

static pascal void DNRNotifier void *  context,
OTEventCode  event,
OTResult  result,
void *  cookie
[static]
 

Definition at line 1481 of file OpenTransportNetEvents.c.

References fcomplete, dnsquery::flags, and dnsquery::result.

Referenced by fwsNetEventAddressToName(), fwsNetEventLaunch(), and fwsNetEventNameToAddress().

static OSStatus DoBind EndpointRecordRef  epref  )  [static]
 

Definition at line 1014 of file OpenTransportNetEvents.c.

References tyendpointrecord::ep, NULL, and TCP_MSG_1.

Referenced by EnterBind(), and Notifier().

static void DoListenAccept ListenRecordRef  listenref  )  [static]
 

Definition at line 1165 of file OpenTransportNetEvents.c.

References tyepstatsrecord::ctidle, tyepstatsrecord::ctworking, decrementconnectioncounter(), DoListenRcvDisconnect(), tylistenrecord::ep, tyendpointrecord::ep, tylistenrecord::fllistenpending, tylistenrecord::idleEPs, incrementconnectioncounter(), InitEndpoint(), tyendpointrecord::link, NULL, tylistenrecord::stats, and TCP_MSG_1.

Referenced by EnterListenAccept(), and ListenNotifier().

Here is the call graph for this function:

static void DoListenRcvDisconnect ListenRecordRef  listenref  )  [static]
 

Definition at line 1132 of file OpenTransportNetEvents.c.

References tylistenrecord::ep, NULL, and TCP_MSG_1.

Referenced by DoListenAccept(), and ListenNotifier().

static void DoRcvDisconnect EndpointRecordRef  epref  )  [static]
 

Definition at line 1081 of file OpenTransportNetEvents.c.

References CheckUnbind(), tyendpointrecord::completionflags, tyendpointrecord::ep, kDontDisposeBit, kDontQueueIt, kRcvdDisconnectBit, nil, tyendpointrecord::result, tyendpointrecord::stateflags, and TCP_MSG_1.

Referenced by DoSndDisconnect(), DoSndOrderlyDisconnect(), EnterRcvDisconnect(), and Notifier().

Here is the call graph for this function:

static void DoRcvOrderlyDisconnect EndpointRecordRef  epref  )  [static]
 

Definition at line 1052 of file OpenTransportNetEvents.c.

References CheckUnbind(), tyendpointrecord::completionflags, tyendpointrecord::ep, kDontDisposeBit, kDontQueueIt, kRcvdOrderlyDisconnectBit, and tyendpointrecord::stateflags.

Referenced by DoSndOrderlyDisconnect(), EnterRcvOrderlyDisconnect(), Notifier(), and ReadAllAndClose().

Here is the call graph for this function:

static OSStatus DoSndDisconnect EndpointRecordRef  epref  )  [static]
 

Definition at line 1378 of file OpenTransportNetEvents.c.

References CheckUnbind(), DoRcvDisconnect(), tyendpointrecord::ep, kDontDisposeBit, kDontQueueIt, nil, tyendpointrecord::stateflags, and TCP_MSG_1.

Referenced by EnterSndDisconnect(), and ProcessWaitingEndpoints().

Here is the call graph for this function:

static OSStatus DoSndOrderlyDisconnect EndpointRecordRef  epref,
boolean  flrecurse
[static]
 

Definition at line 1311 of file OpenTransportNetEvents.c.

References CheckUnbind(), DoRcvDisconnect(), DoRcvOrderlyDisconnect(), tyendpointrecord::ep, kDontQueueIt, ReadAllAndClose(), and TCP_MSG_1.

Referenced by fwsNetEventCloseStream().

Here is the call graph for this function:

static pascal boolean endpointlinkvisit const void *  ref,
OTLink *  linkToCheck
[static]
 

Definition at line 851 of file OpenTransportNetEvents.c.

Referenced by CheckEndpointList(), and fwsNetEventLaunch().

static OSStatus EnterBind EndpointRecordRef  epref  )  [static]
 

Definition at line 1038 of file OpenTransportNetEvents.c.

References DoBind(), and tyendpointrecord::ep.

Referenced by fwsOpenStream().

Here is the call graph for this function:

static void EnterListenAccept ListenRecordRef  listenref  )  [static]
 

Definition at line 1294 of file OpenTransportNetEvents.c.

References DoListenAccept(), and tylistenrecord::ep.

Referenced by CheckUnbind(), fwsacceptingthreadmain(), and Notifier().

Here is the call graph for this function:

static void EnterRcvDisconnect EndpointRecordRef  epref  )  [static]
 

Definition at line 1115 of file OpenTransportNetEvents.c.

References DoRcvDisconnect(), and tyendpointrecord::ep.

Referenced by fwsNetEventInetdRead(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventWriteHandleToStream(), and fwsNetEventWriteStream().

Here is the call graph for this function:

static void EnterRcvOrderlyDisconnect EndpointRecordRef  epref  )  [static]
 

Definition at line 1069 of file OpenTransportNetEvents.c.

References DoRcvOrderlyDisconnect(), and tyendpointrecord::ep.

Referenced by fwsNetEventInetdRead(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteHandleToStream(), and fwsNetEventWriteStream().

Here is the call graph for this function:

static OSStatus EnterSndDisconnect EndpointRecordRef  epref  )  [static]
 

Definition at line 1424 of file OpenTransportNetEvents.c.

References DoSndDisconnect(), and tyendpointrecord::ep.

Referenced by fwsNetEventAbortStream().

Here is the call graph for this function:

static boolean EPClose EndpointRecordRef  epref  )  [static]
 

Definition at line 2137 of file OpenTransportNetEvents.c.

References tyendpointrecord::ep, kOpenInProgressBit, nil, noErr, NULL, tyendpointrecord::stateflags, and TCP_MSG_1.

Referenced by CheckUnbind(), fwscleanuplistener(), and Recycle().

static OSStatus EPOpen EndpointRecordRef  epref,
OTConfigurationRef  cfg
[static]
 

Definition at line 2103 of file OpenTransportNetEvents.c.

References kOpenInProgressBit, nil, Notifier(), and tyendpointrecord::stateflags.

Referenced by fwsNetEventListenStream(), fwsOpenStream(), and Recycle().

Here is the call graph for this function:

static void * fwsacceptingthreadmain void *  param  )  [static]
 

Definition at line 3176 of file OpenTransportNetEvents.c.

References ct, EnterListenAccept(), tylistenrecord::fllistenpending, fwscleanuplistener(), fwsprocesspendingconnections(), nil, ProcessWaitingEndpoints(), Recycle(), SOCKTYPE_LISTENSTOPPED, TCP_ASSERT_1, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tylistenrecord::typeID, and wsprintf.

Referenced by fwslaunchacceptingthread(), and fwsNetEventLaunch().

Here is the call graph for this function:

static boolean fwsbackgroundtask void   )  [static]
 

Definition at line 2443 of file OpenTransportNetEvents.c.

References activMask, fl, inmainthread(), keyDownMask, langbackgroundtask(), mask, mDownMask, nil, osMask, and shellprocessevent().

Referenced by fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), and fwsOpenStream().

Here is the call graph for this function:

static void fwscleanuplistener ListenRecordRef  listenref  )  [static]
 

Definition at line 3090 of file OpenTransportNetEvents.c.

References tylistenrecord::acceptors, assert, tylistenrecord::brokenEPs, tyepstatsrecord::ctbroken, tyepstatsrecord::ctidle, tyepstatsrecord::ctworking, disposehandle(), EPClose(), fwsprocesspendingconnections(), tylistenrecord::hcallbacktree, tylistenrecord::idleEPs, tylistenrecord::masterconfig, maxdepth, nil, and tylistenrecord::stats.

Referenced by fwsacceptingthreadmain().

Here is the call graph for this function:

static boolean fwsgetcallbackcodetree bigstring  bs,
Handle htree
[static]
 

Definition at line 2897 of file OpenTransportNetEvents.c.

References ctscanchars, ctscanlines, fl, langcompiletext(), langdisposetree(), langpacktree(), newtexthandle(), and nil.

Referenced by fwsNetEventListenStream().

Here is the call graph for this function:

static boolean fwslaunchacceptingthread ListenRecordRef  listenref  )  [static]
 

Definition at line 3218 of file OpenTransportNetEvents.c.

References fwsacceptingthreadmain(), nil, and oserror().

Referenced by fwsNetEventListenStream().

Here is the call graph for this function:

boolean fwsNetEventAbortStream unsigned long  stream  ) 
 

Definition at line 3801 of file OpenTransportNetEvents.c.

References CheckEndpointList(), decrementconnectioncounter(), EnterSndDisconnect(), fwsNetEventLaunch(), intneterror(), INTNETERROR_INVALIDSTREAM, nil, NO_HOST_SERVICES, sEndpointList, TCPERRORprintf, TCPERRORWRITEMSG, TCPTRACKERIN(), TCPTRACKEROUT(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventAddressDecode unsigned long  addr,
bigstring  IPaddr
 

Definition at line 2600 of file OpenTransportNetEvents.c.

References fwsNetEventLaunch(), NO_HOST_SERVICES, and setstringlength.

Here is the call graph for this function:

boolean fwsNetEventAddressEncode bigstring  IPaddr,
unsigned long addr
 

Definition at line 2617 of file OpenTransportNetEvents.c.

References cantencodeaddress, fwsNetEventLaunch(), langparamerror(), NO_HOST_SERVICES, and nullterminate.

Here is the call graph for this function:

boolean fwsNetEventAddressToName unsigned long  addr,
bigstring  domainName
 

Definition at line 2644 of file OpenTransportNetEvents.c.

References DNRNotifier(), fcomplete, fwsNetEventLaunch(), neterror(), nil, NO_HOST_SERVICES, poptrailingchars(), setstringlength, TCPprintf, TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventCheckAndAcceptSocket void   ) 
 

Definition at line 3548 of file OpenTransportNetEvents.c.

References frontierWinSockLoaded, nil, ProcessWaitingEndpoints(), and Recycle().

Referenced by shelleventloop().

Here is the call graph for this function:

boolean fwsNetEventCloseListen unsigned long  stream  ) 
 

Definition at line 3449 of file OpenTransportNetEvents.c.

References fwsNetEventLaunch(), intneterror(), INTNETERROR_INVALIDSTREAM, listenlinkvisit(), nil, NO_HOST_SERVICES, sListenList, SOCKTYPE_LISTENSTOPPED, TCPERRORprintf, TCPERRORWRITEMSG, TCPTRACKERIN(), TCPTRACKEROUT(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventCloseStream unsigned long  stream  ) 
 

Definition at line 3846 of file OpenTransportNetEvents.c.

References CheckEndpointList(), CheckUnbind(), tyepstatsrecord::ctwaiting, tyepstatsrecord::ctworking, decrementconnectioncounter(), DoSndOrderlyDisconnect(), epstats, fwsNetEventLaunch(), intneterror(), INTNETERROR_INVALIDSTREAM, kBrokenBit, kDontDisposeBit, kDontQueueIt, kWaitingForDisconnectBit, nil, NO_HOST_SERVICES, sEndpointList, tylistenrecord::stats, sWaitingEPs, TCPTRACKEROUT(), timenow(), and tylistenrecord::waitingEPs.

Here is the call graph for this function:

long fwsNetEventGetConnectionCount void   ) 
 

Definition at line 795 of file OpenTransportNetEvents.c.

boolean fwsNetEventGetPeerAddress unsigned long  stream,
unsigned long peeraddress,
unsigned long peerport
 

Definition at line 4276 of file OpenTransportNetEvents.c.

References CheckEndpointList(), fwsNetEventLaunch(), intneterror(), INTNETERROR_INVALIDSTREAM, kGetProtAddressBit, neterror(), nil, NO_HOST_SERVICES, TCPTRACKERIN(), and TCPTRACKEROUT().

Here is the call graph for this function:

boolean fwsNetEventGetStats unsigned long  stream,
bigstring  bs
 

Definition at line 5095 of file OpenTransportNetEvents.c.

References CheckListenList(), tyepstatsrecord::ctbroken, tyepstatsrecord::ctidle, tyepstatsrecord::cttotal, tyepstatsrecord::ctworking, epstats, intneterror(), INTNETERROR_INVALIDSTREAM, nil, pushchar(), pushlong(), and setemptystring.

Here is the call graph for this function:

boolean fwsNetEventInetdRead unsigned long  stream,
Handle  hbuffer,
unsigned long  timeoutsecs
 

Definition at line 4980 of file OpenTransportNetEvents.c.

References CheckEndpointList(), EnterRcvDisconnect(), EnterRcvOrderlyDisconnect(), fwsNetEventLaunch(), gethandlesize(), intneterror(), INTNETERROR_INVALIDSTREAM, kPacketSize, kRcvdDisconnectBit, kRcvdOrderlyDisconnectBit, lockhandle(), neterror(), nil, NO_HOST_SERVICES, sethandlesize(), TCP_MSG_2, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), unlockhandle(), and wsprintf.

Here is the call graph for this function:

static boolean fwsNetEventLaunch void *  data  )  [static]
 

Definition at line 2462 of file OpenTransportNetEvents.c.

References BIGSTRING, clearbytes(), DNRNotifier(), endpointlinkvisit(), epstats, frontierWinSockCount, frontierWinSockLoaded, fwsacceptingthreadmain(), kOTVersion111, listenlinkvisit(), ListenNotifier(), memoryerror(), neterror(), nil, noErr, Notifier(), plainneterror(), sBrokenEPs, sEndpointList, sIdleEPs, sListenList, sMasterConfig, sOTVersion, sOTVersionSelector, and sWaitingEPs.

Referenced by fwsNetEventAbortStream(), fwsNetEventAddressDecode(), fwsNetEventAddressEncode(), fwsNetEventAddressToName(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventInetdRead(), fwsNetEventListenStream(), fwsNetEventMyAddress(), fwsNetEventNameToAddress(), fwsNetEventOpenAddrStream(), fwsNetEventOpenNameStream(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), and fwsNetEventWriteStream().

Here is the call graph for this function:

boolean fwsNetEventListenStream unsigned long  port,
long  depth,
bigstring  pCallback,
unsigned long  refcon,
unsigned long stream,
unsigned long  ipaddr,
long  hdatabase
 

Definition at line 3237 of file OpenTransportNetEvents.c.

References tylistenrecord::callback, copystring(), tylistenrecord::ep, EPOpen(), fwsgetcallbackcodetree(), fwslaunchacceptingthread(), fwsNetEventLaunch(), tylistenrecord::hcallbacktree, tylistenrecord::hdatabase, i, tyendpointrecord::listener, ListenNotifier(), tylistenrecord::maxdepth, memoryerror(), neterror(), nil, NO_HOST_SERVICES, nullterminate, OTAssert, tylistenrecord::refcon, sizeof(), sListenList, SOCKTYPE_LISTENING, TCPprintf, TCPTRACKEROUT(), TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventMyAddress unsigned long addr  ) 
 

Definition at line 2850 of file OpenTransportNetEvents.c.

References fl, fwsNetEventLaunch(), info, neterror(), nil, NO_HOST_SERVICES, and OTAssert.

Here is the call graph for this function:

boolean fwsNetEventNameToAddress bigstring  domainName,
unsigned long addr
 

Definition at line 2747 of file OpenTransportNetEvents.c.

References alllower(), copyptocstring(), DNRNotifier(), fcomplete, fwsNetEventLaunch(), neterror(), nil, NO_HOST_SERVICES, TCPprintf, TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventOpenAddrStream unsigned long  addr,
unsigned long  port,
unsigned long stream
 

Definition at line 3716 of file OpenTransportNetEvents.c.

References fwsNetEventLaunch(), fwsOpenStream(), nil, NO_HOST_SERVICES, TCPprintf, TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventOpenNameStream bigstring  name,
unsigned long  port,
unsigned long stream
 

Definition at line 3745 of file OpenTransportNetEvents.c.

References alllower(), copyptocstring(), fwsNetEventAddressEncode(), fwsNetEventLaunch(), fwsNetEventNameToAddress(), fwsNetEventOpenAddrStream(), fwsOpenStream(), is_ipaddress(), nil, NO_HOST_SERVICES, TCPprintf, TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventQuit void   ) 
 

Definition at line 2561 of file OpenTransportNetEvents.c.

References frontierWinSockCount, frontierWinSockLoaded, nil, and TCPTRACKERCLOSE.

Referenced by shellshutdown().

boolean fwsNetEventReadStream unsigned long  stream,
unsigned long bytesToRead,
char *  buffer
 

Definition at line 3923 of file OpenTransportNetEvents.c.

References CheckEndpointList(), closedunexpectedlyerror(), EnterRcvDisconnect(), EnterRcvOrderlyDisconnect(), error, fwsbackgroundtask(), fwsNetEventLaunch(), intneterror(), INTNETERROR_INVALIDSTREAM, kRcvdDisconnectBit, kRcvdOrderlyDisconnectBit, neterror(), nil, NO_HOST_SERVICES, TCP_MSG_2, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventReadStreamBytes unsigned long  stream,
Handle  hbuffer,
long  ctbytes,
unsigned long  timeoutsecs
 

Definition at line 4610 of file OpenTransportNetEvents.c.

References CheckEndpointList(), closedunexpectedlyerror(), EnterRcvDisconnect(), EnterRcvOrderlyDisconnect(), fwsbackgroundtask(), fwsNetEventLaunch(), gethandlesize(), intneterror(), INTNETERROR_INVALIDSTREAM, kRcvdDisconnectBit, kRcvdOrderlyDisconnectBit, lockhandle(), neterror(), nil, NO_HOST_SERVICES, sethandlesize(), TCP_MSG_2, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), unlockhandle(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventReadStreamUntil unsigned long  stream,
Handle  hbuffer,
Handle  hpattern,
unsigned long  timeoutsecs
 

Definition at line 4333 of file OpenTransportNetEvents.c.

References CheckEndpointList(), closedunexpectedlyerror(), EnterRcvDisconnect(), EnterRcvOrderlyDisconnect(), fwsbackgroundtask(), fwsNetEventLaunch(), gethandlesize(), intneterror(), INTNETERROR_INVALIDSTREAM, kPacketSize, kRcvdDisconnectBit, kRcvdOrderlyDisconnectBit, lockhandle(), neterror(), nil, NO_HOST_SERVICES, searchhandle(), sethandlesize(), TCP_MSG_2, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), unlockhandle(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventReadStreamUntilClosed unsigned long  stream,
Handle  hbuffer,
unsigned long  timeoutsecs
 

Definition at line 4482 of file OpenTransportNetEvents.c.

References CheckEndpointList(), EnterRcvDisconnect(), EnterRcvOrderlyDisconnect(), fwsbackgroundtask(), fwsNetEventLaunch(), gethandlesize(), intneterror(), INTNETERROR_INVALIDSTREAM, kPacketSize, kRcvdDisconnectBit, kRcvdOrderlyDisconnectBit, lockhandle(), neterror(), nil, NO_HOST_SERVICES, sethandlesize(), TCP_MSG_2, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), unlockhandle(), and wsprintf.

Here is the call graph for this function:

void fwsNetEventShutdownDependentListeners long  hdatabase  ) 
 

Definition at line 3511 of file OpenTransportNetEvents.c.

References frontierWinSockLoaded, listendatabasevisit(), nil, sListenList, SOCKTYPE_LISTENSTOPPED, tylistenrecord::typeID, and tylistenrecord::validationlink.

Here is the call graph for this function:

boolean fwsNetEventStatusStream unsigned long  stream,
bigstring  status,
unsigned long bytesPending
 

Definition at line 4135 of file OpenTransportNetEvents.c.

References CheckEndpointList(), CheckListenList(), copyctopstring(), EnterRcvOrderlyDisconnect(), fwsNetEventLaunch(), inmainthread(), intneterror(), INTNETERROR_INVALIDSTREAM, kRcvdDisconnectBit, kRcvdOrderlyDisconnectBit, neterror(), nil, NO_HOST_SERVICES, nullterminate, SOCKTYPE_CLOSED, SOCKTYPE_INACTIVE, SOCKTYPE_INVALID, SOCKTYPE_LISTENING, SOCKTYPE_LISTENSTOPPED, SOCKTYPE_OPEN, SOCKTYPE_UNKNOWN, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventWriteFileToStream unsigned long  stream,
Handle  hprefix,
Handle  hsuffix,
ptrfilespec  fs
 

Definition at line 4935 of file OpenTransportNetEvents.c.

References fl, fwsNetEventLaunch(), fwsNetEventWriteStream(), fwstransmitfile(), gethandlesize(), lockhandle(), nil, NO_HOST_SERVICES, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), unlockhandle(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventWriteHandleToStream unsigned long  stream,
Handle  hbuffer,
unsigned long  chunksize,
unsigned long  timeoutsecs
 

Definition at line 4748 of file OpenTransportNetEvents.c.

References CheckEndpointList(), closedunexpectedlyerror(), EnterRcvDisconnect(), EnterRcvOrderlyDisconnect(), fwsbackgroundtask(), fwsNetEventLaunch(), gethandlesize(), intneterror(), INTNETERROR_INVALIDSTREAM, kRcvdDisconnectBit, lockhandle(), neterror(), nil, NO_HOST_SERVICES, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), unlockhandle(), and wsprintf.

Here is the call graph for this function:

boolean fwsNetEventWriteStream unsigned long  stream,
unsigned long  bytesToWrite,
char *  buffer
 

Definition at line 4027 of file OpenTransportNetEvents.c.

References CheckEndpointList(), closedunexpectedlyerror(), EnterRcvDisconnect(), EnterRcvOrderlyDisconnect(), fwsbackgroundtask(), fwsNetEventLaunch(), intneterror(), INTNETERROR_INVALIDSTREAM, kRcvdDisconnectBit, neterror(), nil, NO_HOST_SERVICES, TCP_MSG_2, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

static boolean fwsnewprocess hdltreenode  hcode,
bigstring  bsname,
hdlprocessrecord hprocess
[static]
 

Definition at line 2929 of file OpenTransportNetEvents.c.

References copystring(), disposehandle(), tyerrorrecord::errorcallback, tyerrorrecord::errorchar, tyerrorrecord::errorline, tyerrorrecord::errorrefcon, hcode, langerrordialog(), newclearhandle(), nil, and truenoop().

Referenced by fwsruncallback().

Here is the call graph for this function:

static boolean fwsOpenStream TCall *  ptrSndCall,
unsigned long stream
[static]
 

Definition at line 3596 of file OpenTransportNetEvents.c.

References BIGSTRING, CheckUnbind(), tyendpointrecord::completionflags, tyepstatsrecord::ctidle, tyepstatsrecord::cttotal, tyepstatsrecord::ctworking, decrementconnectioncounter(), EnterBind(), tyendpointrecord::ep, EPOpen(), epstats, fwsbackgroundtask(), incrementconnectioncounter(), InitEndpoint(), kBoundBit, kConnectCompleteBit, kDontDisposeBit, kDontQueueIt, kQueueIt, kWaitingForConnectBit, neterror(), nil, plainneterror(), tyendpointrecord::result, tyendpointrecord::sendCall, sEndpointList, sIdleEPs, sMasterConfig, SOCKTYPE_OPEN, tyendpointrecord::stateflags, tyendpointrecord::typeID, and tyendpointrecord::validationlink.

Referenced by fwsNetEventOpenAddrStream(), and fwsNetEventOpenNameStream().

Here is the call graph for this function:

static long fwsprocesspendingconnections ListenRecordRef  listenref  )  [static]
 

Definition at line 3055 of file OpenTransportNetEvents.c.

References ct, fl, fwsruncallback(), nil, tylistenrecord::readyEPs, sEndpointList, SOCKTYPE_OPEN, TCP_ASSERT_1, TCPprintf, TCPWRITEMSG(), tyendpointrecord::typeID, tyendpointrecord::validationlink, and wsprintf.

Referenced by fwsacceptingthreadmain(), and fwscleanuplistener().

Here is the call graph for this function:

static boolean fwsruncallback EndpointRecordRef  epref  )  [static]
 

Definition at line 2993 of file OpenTransportNetEvents.c.

References addprocess(), bigstring, tylistenrecord::callback, copyhandle(), copystring(), functionop, fwsnewprocess(), h, tylistenrecord::hcallbacktree, hcode, langdisposetree(), langunpacktree(), tyendpointrecord::listener, moduleop, newconstnode(), nil, pushbinaryoperation(), pushlastlink(), tylistenrecord::refcon, and setlongvalue().

Referenced by fwsprocesspendingconnections(), and restartAccepter().

Here is the call graph for this function:

static boolean fwstransmitfile unsigned long  stream,
ptrfilespec  fs
[static]
 

Definition at line 4875 of file OpenTransportNetEvents.c.

References closefile(), filereaddata(), filesetposition(), fl, fnum, fwsNetEventWriteStream(), memoryerror(), nil, and openfile().

Referenced by fwsNetEventWriteFileToStream().

Here is the call graph for this function:

static void gettcperrorstring int  errcode,
bigstring  bs
[static]
 

Definition at line 2294 of file OpenTransportNetEvents.c.

References copystring(), getsystemerrorstring(), isemptystring, pushchar(), stdcliberrorstrings, and xtierrorstrings.

Referenced by neterror().

Here is the call graph for this function:

static boolean incrementconnectioncounter void   )  [static]
 

Definition at line 805 of file OpenTransportNetEvents.c.

Referenced by DoListenAccept(), and fwsOpenStream().

static void InitEndpoint EndpointRecordRef  epref,
EndpointRef  ep,
ListenRecordRef  listenref
[static]
 

Definition at line 887 of file OpenTransportNetEvents.c.

References tyendpointrecord::ep, tyendpointrecord::listener, SOCKTYPE_INVALID, and tyendpointrecord::typeID.

Referenced by DoListenAccept(), fwsOpenStream(), and Recycle().

static void intneterror long  errcode  )  [static]
 

Definition at line 2431 of file OpenTransportNetEvents.c.

References bigstring, copyctopstring(), INTNETERROR_INVALIDSTREAM, and langerrormessage().

Referenced by fwsNetEventAbortStream(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventGetStats(), fwsNetEventInetdRead(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), and fwsNetEventWriteStream().

Here is the call graph for this function:

static short is_ipaddress char *  name  )  [static]
 

Definition at line 3566 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventOpenNameStream().

static pascal boolean listendatabasevisit const void *  ref,
OTLink *  linkToCheck
[static]
 

Definition at line 835 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventShutdownDependentListeners().

static pascal boolean listenlinkvisit const void *  ref,
OTLink *  linkToCheck
[static]
 

Definition at line 843 of file OpenTransportNetEvents.c.

Referenced by CheckListenList(), fwsNetEventCloseListen(), and fwsNetEventLaunch().

static pascal void ListenNotifier void *  context,
OTEventCode  code,
OTResult  result,
void *  cookie
[static]
 

Definition at line 1502 of file OpenTransportNetEvents.c.

References DoListenAccept(), DoListenRcvDisconnect(), OTAssert, and TCP_MSG_1.

Referenced by fwsNetEventLaunch(), and fwsNetEventListenStream().

Here is the call graph for this function:

static void neterror char *  cannot,
long  errcode
[static]
 

Definition at line 2365 of file OpenTransportNetEvents.c.

References BIGSTRING, bigstring, copyctopstring(), gettcperrorstring(), isemptystring, langerrormessage(), nullterminate, pushchar(), pushstring(), TCPERRORprintf, TCPERRORWRITEMSG, and wsprintf.

Referenced by fwsNetEventAbortStream(), fwsNetEventAddressToName(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventInetdRead(), fwsNetEventLaunch(), fwsNetEventListenStream(), fwsNetEventMyAddress(), fwsNetEventNameToAddress(), fwsNetEventOpenNameStream(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), and fwsOpenStream().

Here is the call graph for this function:

static pascal void Notifier void *  context,
OTEventCode  code,
OTResult  result,
void *  cookie
[static]
 

Definition at line 1624 of file OpenTransportNetEvents.c.

References CheckUnbind(), tyendpointrecord::completionflags, tyepstatsrecord::ctidle, tyepstatsrecord::ctworking, decrementconnectioncounter(), DoBind(), DoRcvDisconnect(), DoRcvOrderlyDisconnect(), EnterListenAccept(), tyendpointrecord::ep, epstats, tylistenrecord::fllistenpending, tylistenrecord::idleEPs, kBoundBit, kConnectCompleteBit, kDontDisposeBit, kDontQueueIt, kGetProtAddressBit, kIPReuseAddrBit, kOpenInProgressBit, kPassconBit, kQueueIt, kTCPKeepAliveBit, kWaitingForConnectBit, kWaitingForDisconnectBit, tyendpointrecord::link, tyendpointrecord::listener, nil, noErr, ReadAllAndClose(), tylistenrecord::readyEPs, ReturnEndpoint(), tyendpointrecord::sendCall, SetIpReuseAddrOption(), SetTcpConnAbortThresholdOption(), SetTcpKeepAliveOption(), sIdleEPs, tyendpointrecord::stateflags, tylistenrecord::stats, TCP_ASSERT_1, TCP_MSG_1, and TCP_MSG_2.

Referenced by EPOpen(), and fwsNetEventLaunch().

Here is the call graph for this function:

static void plainneterror bigstring  bs  )  [static]
 

Definition at line 2330 of file OpenTransportNetEvents.c.

References bigstring, copystring(), langerrormessage(), nullterminate, TCPERRORprintf, TCPERRORWRITEMSG, and wsprintf.

Referenced by closedunexpectedlyerror(), fwsNetEventLaunch(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), and fwsOpenStream().

Here is the call graph for this function:

static void ProcessWaitingEndpoints ListenRecordRef  listenref  )  [static]
 

Definition at line 2236 of file OpenTransportNetEvents.c.

References CheckUnbind(), tyepstatsrecord::ctwaiting, tyepstatsrecord::ctworking, DoSndDisconnect(), tyendpointrecord::ep, epstats, kDontDisposeBit, kDontQueueIt, kTCPWaitSecsForOrderlyDisconnect, tyendpointrecord::link, nil, tyendpointrecord::stateflags, tylistenrecord::stats, sWaitingEPs, timenow(), tyendpointrecord::timestamp, and tylistenrecord::waitingEPs.

Referenced by fwsacceptingthreadmain(), and fwsNetEventCheckAndAcceptSocket().

Here is the call graph for this function:

static void ReadAllAndClose EndpointRecordRef  epref  )  [static]
 

Definition at line 1452 of file OpenTransportNetEvents.c.

References CheckUnbind(), DoRcvOrderlyDisconnect(), tyendpointrecord::ep, kDontDisposeBit, kDontQueueIt, kPacketSize, and tyendpointrecord::stateflags.

Referenced by DoSndOrderlyDisconnect(), and Notifier().

Here is the call graph for this function:

static void Recycle ListenRecordRef  listenref  )  [static]
 

Definition at line 2180 of file OpenTransportNetEvents.c.

References tylistenrecord::brokenEPs, tyepstatsrecord::ctbroken, tyepstatsrecord::ctworking, EPClose(), EPOpen(), epstats, InitEndpoint(), kBrokenBit, tylistenrecord::masterconfig, nil, sBrokenEPs, sMasterConfig, and tylistenrecord::stats.

Referenced by fwsacceptingthreadmain(), and fwsNetEventCheckAndAcceptSocket().

Here is the call graph for this function:

static pascal void ReturnEndpoint EndpointRecordRef  epref,
OTResult  result,
int  completionbit
[static]
 

Definition at line 901 of file OpenTransportNetEvents.c.

References CheckUnbind(), tyendpointrecord::completionflags, tyendpointrecord::ep, kBoundBit, kDontDisposeBit, kWaitingForConnectBit, tyendpointrecord::result, and tyendpointrecord::stateflags.

Referenced by Notifier().

Here is the call graph for this function:

static OSStatus SetIpReuseAddrOption EndpointRecordRef  epref  )  [static]
 

Definition at line 1566 of file OpenTransportNetEvents.c.

References tyendpointrecord::ep, and nil.

Referenced by Notifier().

static OSStatus SetTcpConnAbortThresholdOption EndpointRecordRef  epref  )  [static]
 

Definition at line 1605 of file OpenTransportNetEvents.c.

References tyendpointrecord::ep, kTCPWaitSecsForConnect, and nil.

Referenced by Notifier().

static OSStatus SetTcpKeepAliveOption EndpointRecordRef  epref  )  [static]
 

Definition at line 1585 of file OpenTransportNetEvents.c.

References tyendpointrecord::ep, kTCPKeepAliveInMinutes, TKeepAliveOpt::len, TKeepAliveOpt::level, TKeepAliveOpt::name, nil, TKeepAliveOpt::status, TKeepAliveOpt::tcpKeepAliveOn, and TKeepAliveOpt::tcpKeepAliveTimer.

Referenced by Notifier().

static char* TCPGETTYPE tysocktypeid  typeID  )  [static]
 

Definition at line 488 of file OpenTransportNetEvents.c.

References SOCKTYPE_CLOSED, SOCKTYPE_DATA, SOCKTYPE_INACTIVE, SOCKTYPE_INVALID, SOCKTYPE_LISTENING, SOCKTYPE_LISTENSTOPPED, SOCKTYPE_OPEN, and SOCKTYPE_UNKNOWN.

Referenced by TCPTRACKERIN(), and TCPTRACKEROUT().

static void TCPTRACKERIN char *  functionName,
int  linenumber,
EndpointRecordRef  epref,
ListenRecordRef  listenref
[static]
 

Definition at line 709 of file OpenTransportNetEvents.c.

References CheckEndpointList(), CheckListenList(), TCPGETTYPE(), TCPWRITEMSG(), and wsprintf.

Referenced by fwsacceptingthreadmain(), fwsNetEventAbortStream(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventInetdRead(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), and restartAccepter().

Here is the call graph for this function:

static void TCPTRACKEROUT char *  functionName,
int  linenumber,
EndpointRecordRef  epref,
ListenRecordRef  listenref
[static]
 

Definition at line 741 of file OpenTransportNetEvents.c.

References CheckEndpointList(), CheckListenList(), TCPGETTYPE(), TCPWRITEMSG(), and wsprintf.

Referenced by fwsNetEventAbortStream(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventListenStream(), and restartAccepter().

Here is the call graph for this function:

static void TCPWRITEMSG  )  [static]
 

Definition at line 681 of file OpenTransportNetEvents.c.

References aboutsetmiscstring(), BIGSTRING, and convertcstring().

Referenced by fwsacceptingthreadmain(), fwsNetEventAddressToName(), fwsNetEventCloseStream(), fwsNetEventInetdRead(), fwsNetEventListenStream(), fwsNetEventNameToAddress(), fwsNetEventOpenAddrStream(), fwsNetEventOpenNameStream(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), fwsprocesspendingconnections(), restartAccepter(), TCPTRACKERIN(), and TCPTRACKEROUT().

Here is the call graph for this function:


Variable Documentation

long ctconnections = 0 [static]
 

Definition at line 792 of file OpenTransportNetEvents.c.

tyepstatsrecord epstats [static]
 

Definition at line 381 of file OpenTransportNetEvents.c.

Referenced by CheckUnbind(), fwsNetEventCloseStream(), fwsNetEventGetStats(), fwsNetEventLaunch(), fwsOpenStream(), Notifier(), ProcessWaitingEndpoints(), and Recycle().

const unsigned long fcomplete = 1L
 

Definition at line 448 of file OpenTransportNetEvents.c.

Referenced by DNRNotifier(), fwsNetEventAddressToName(), and fwsNetEventNameToAddress().

short frontierWinSockCount = 0 [static]
 

Definition at line 395 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventLaunch(), fwsNetEventQuit(), and fwsNetEventShutDown().

boolean frontierWinSockLoaded = false [static]
 

Definition at line 396 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventCheckAndAcceptSocket(), fwsNetEventLaunch(), fwsNetEventQuit(), fwsNetEventShutDown(), and fwsNetEventShutdownDependentListeners().

const long kPacketSize = 8192L [static]
 

Definition at line 316 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventInetdRead(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), and ReadAllAndClose().

long maxconnections = longinfinity
 

Definition at line 788 of file OpenTransportNetEvents.c.

OTLIFO sBrokenEPs [static]
 

Definition at line 387 of file OpenTransportNetEvents.c.

Referenced by CheckUnbind(), fwsNetEventLaunch(), and Recycle().

OTList sEndpointList [static]
 

Definition at line 384 of file OpenTransportNetEvents.c.

Referenced by CheckEndpointList(), fwsNetEventAbortStream(), fwsNetEventCloseStream(), fwsNetEventLaunch(), fwsOpenStream(), and fwsprocesspendingconnections().

OTLIFO sIdleEPs [static]
 

Definition at line 386 of file OpenTransportNetEvents.c.

Referenced by CheckUnbind(), fwsNetEventLaunch(), fwsOpenStream(), and Notifier().

OTList sListenList [static]
 

Definition at line 383 of file OpenTransportNetEvents.c.

Referenced by CheckListenList(), fwsNetEventCloseListen(), fwsNetEventLaunch(), fwsNetEventListenStream(), and fwsNetEventShutdownDependentListeners().

OTConfigurationRef sMasterConfig [static]
 

Definition at line 390 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventLaunch(), fwsOpenStream(), and Recycle().

long sOTVersion [static]
 

Definition at line 393 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventLaunch().

OSType sOTVersionSelector = 'otvr' [static]
 

Definition at line 392 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventLaunch().

unsigned char* stdcliberrorstrings[80] [static]
 

Definition at line 183 of file OpenTransportNetEvents.c.

Referenced by gettcperrorstring().

OTLIFO sWaitingEPs [static]
 

Definition at line 388 of file OpenTransportNetEvents.c.

Referenced by fwsNetEventCloseStream(), fwsNetEventLaunch(), and ProcessWaitingEndpoints().

char TCPmsg[400] [static]
 

Definition at line 679 of file OpenTransportNetEvents.c.

unsigned char* xtierrorstrings[] [static]
 

Definition at line 136 of file OpenTransportNetEvents.c.

Referenced by gettcperrorstring().


Generated on Thu Jun 8 05:24:08 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6