WinSockNetEvents.c File Reference

#include "frontier.h"
#include "standard.h"
#include "error.h"
#include "file.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 "winsocknetevents.h"
#include "about.h"

Include dependency graph for WinSockNetEvents.c:

Go to the source code of this file.

Data Structures

struct  tysockRecord

Defines

#define ACCEPT_CONN_WITHOUT_GLOBALS   1
#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 FRONTIER_MAX_STREAM   256
#define INTNETERROR_INVALIDSTREAM   -1
#define _entercriticalsockstacksection()
#define _leavecriticalsockstacksection()
#define STR_P_ERROR_CLOSED_PREMATURELY   BIGSTRING ("\x45" "Can't read stream because the TCP connection was closed unexpectedly.")
#define TCPTRACKER   1
#define fllogger   (aboutstatsshowing())
#define TCPprintf(msg)   msg
#define TCPERRORprintf(msg)   msg
#define TCPERRORWRITEMSG   TCPWRITEMSG
#define TCPTRACKERCLOSE()

Typedefs

typedef short tysocktypeid
typedef tysockRecord sockRecord

Functions

static char * TCPGETTYPE (tysocktypeid typeID)
static void TCPWRITEMSG ()
static void TCPTRACKERIN (char *functionName, int linenumber, unsigned long streamID)
static void TCPTRACKEROUT (char *functionName, int linenumber, unsigned long streamID)
static boolean getsockrecord (SOCKET sock, long *stream)
static void initsockrecord (long i)
static boolean addsockrecord (long *stream)
static void clearsockstack ()
static void gettcperrorstring (int errcode, bigstring bs)
static void plainneterror (bigstring bs)
static void neterror (char *cannot, long errcode)
static void intneterror (long errcode)
static boolean incrementconnectioncounter (void)
static void decrementconnectioncounter (void)
long fwsNetEventGetConnectionCount (void)
static boolean fwsNetEventLaunch (struct hostData *data)
boolean fwsNetEventShutDown (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 (long listenstream, long acceptstream, long refcon)
static void parsecallbackstring (long stream, long p1, long p2, bigstring bs)
static boolean fwsrunstring (bigstring bs)
static boolean restartAccepter (SOCKET s, short listenstream)
static boolean checkAccepter (unsigned long stream)
void fwsNetEventShutdownDependentListeners (long hdatabase)
boolean fwsNetEventAbortStream (unsigned long stream)
boolean fwsNetEventCloseStream (unsigned long stream)
boolean fwsNetEventCloseListen (unsigned long stream)
static short is_ipaddress (char *name)
static boolean fwsOpenStream (struct sockaddr_in *sa, 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 fwsNetEventReadStream (unsigned long stream, unsigned long *bytesToRead, char *buffer)
boolean fwsNetEventWriteStream (unsigned long stream, unsigned long bytesToWrite, char *buffer)
boolean fwsNetEventListenStream (unsigned long port, long depth, bigstring callback, unsigned long refcon, unsigned long *stream, unsigned long ipaddr, long hdatabase)
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 * tcperrorstrings [80]
static short frontierWinSockCount = 0
static boolean frontierWinSockLoaded = false
static sockRecord sockstack [FRONTIER_MAX_STREAM]
static char TCPmsg [400]
long maxconnections = longinfinity
long ctconnections = 0


Define Documentation

 
#define _entercriticalsockstacksection  ) 
 

Definition at line 458 of file WinSockNetEvents.c.

Referenced by addsockrecord(), and clearsockstack().

 
#define _leavecriticalsockstacksection  ) 
 

Definition at line 460 of file WinSockNetEvents.c.

Referenced by addsockrecord().

#define ACCEPT_CONN_WITHOUT_GLOBALS   1
 

Definition at line 251 of file WinSockNetEvents.c.

#define fllogger   (aboutstatsshowing())
 

Definition at line 703 of file WinSockNetEvents.c.

#define FRONTIER_MAX_STREAM   256
 

Definition at line 398 of file WinSockNetEvents.c.

Referenced by addsockrecord(), getsockrecord(), TCPTRACKERIN(), and TCPTRACKEROUT().

#define INTNETERROR_INVALIDSTREAM   -1
 

Definition at line 399 of file WinSockNetEvents.c.

#define NO_HOST_SERVICES   NULL
 

Definition at line 316 of file WinSockNetEvents.c.

#define SOCKTYPE_CLOSED   4
 

Definition at line 394 of file WinSockNetEvents.c.

#define SOCKTYPE_DATA   2
 

Definition at line 392 of file WinSockNetEvents.c.

#define SOCKTYPE_INACTIVE   6
 

Definition at line 396 of file WinSockNetEvents.c.

#define SOCKTYPE_INVALID   -1
 

Definition at line 389 of file WinSockNetEvents.c.

#define SOCKTYPE_LISTENING   3
 

Definition at line 393 of file WinSockNetEvents.c.

#define SOCKTYPE_LISTENSTOPPED   5
 

Definition at line 395 of file WinSockNetEvents.c.

#define SOCKTYPE_OPEN   1
 

Definition at line 391 of file WinSockNetEvents.c.

#define SOCKTYPE_UNKNOWN   0
 

Definition at line 390 of file WinSockNetEvents.c.

#define STR_P_ERROR_CLOSED_PREMATURELY   BIGSTRING ("\x45" "Can't read stream because the TCP connection was closed unexpectedly.")
 

Definition at line 500 of file WinSockNetEvents.c.

Referenced by fwsNetEventReadStreamBytes(), and fwsNetEventReadStreamUntil().

#define TCPERRORprintf msg   )     msg
 

Definition at line 705 of file WinSockNetEvents.c.

#define TCPERRORWRITEMSG   TCPWRITEMSG
 

Definition at line 719 of file WinSockNetEvents.c.

#define TCPprintf msg   )     msg
 

Definition at line 704 of file WinSockNetEvents.c.

#define TCPTRACKER   1
 

Definition at line 514 of file WinSockNetEvents.c.

 
#define TCPTRACKERCLOSE  ) 
 

Definition at line 754 of file WinSockNetEvents.c.


Typedef Documentation

typedef struct tysockRecord sockRecord
 

typedef short tysocktypeid
 

Definition at line 401 of file WinSockNetEvents.c.


Function Documentation

static boolean addsockrecord long stream  )  [static]
 

Definition at line 809 of file WinSockNetEvents.c.

References _entercriticalsockstacksection, _leavecriticalsockstacksection, FRONTIER_MAX_STREAM, i, initsockrecord(), sockstack, and SOCKTYPE_INVALID.

Referenced by fwsNetEventListenStream(), and fwsOpenStream().

Here is the call graph for this function:

static boolean checkAccepter unsigned long  stream  )  [static]
 

Definition at line 1986 of file WinSockNetEvents.c.

References tysockRecord::currentListenDepth, grabthreadglobalsnopriority(), tysockRecord::listenReference, releasethreadglobalsnopriority(), restartAccepter(), and sockstack.

Referenced by fwsNetEventAbortStream(), and fwsNetEventCloseStream().

Here is the call graph for this function:

static void clearsockstack  )  [static]
 

Definition at line 861 of file WinSockNetEvents.c.

References _entercriticalsockstacksection, i, sockstack, SOCKTYPE_INVALID, and tysockRecord::typeID.

Referenced by fwsNetEventLaunch().

static void decrementconnectioncounter void   )  [static]
 

Definition at line 1329 of file WinSockNetEvents.c.

References assert.

static boolean fwsgetcallbackcodetree bigstring  bs,
Handle htree
[static]
 

Definition at line 1710 of file WinSockNetEvents.c.

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

Here is the call graph for this function:

boolean fwsNetEventAbortStream unsigned long  stream  ) 
 

Definition at line 2256 of file WinSockNetEvents.c.

References checkAccepter(), decrementconnectioncounter(), fwsNetEventLaunch(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, neterror(), NO_HOST_SERVICES, releasethreadglobalsnopriority(), tysockRecord::sockID, sockstack, SOCKTYPE_CLOSED, TCPTRACKERIN(), TCPTRACKEROUT(), and tysockRecord::typeID.

Referenced by inetdsupervisor(), and langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventAddressDecode unsigned long  addr,
bigstring  IPaddr
 

Definition at line 1496 of file WinSockNetEvents.c.

References cantdecodeaddress, copyctopstring(), fwsNetEventLaunch(), langlongparamerror(), NULL, and setstringlength.

Referenced by inetdsupervisor(), and langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventAddressEncode bigstring  IPaddr,
unsigned long addr
 

Definition at line 1526 of file WinSockNetEvents.c.

References cantencodeaddress, copyptocstring(), fwsNetEventLaunch(), and langparamerror().

Referenced by fwsNetEventOpenNameStream(), and langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventAddressToName unsigned long  addr,
bigstring  domainName
 

Definition at line 1570 of file WinSockNetEvents.c.

References copyctopstring(), fwsNetEventLaunch(), grabthreadglobalsnopriority(), h, neterror(), NULL, releasethreadglobalsnopriority(), TCPprintf, TCPWRITEMSG(), and wsprintf.

Referenced by langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventCloseListen unsigned long  stream  ) 
 

Definition at line 2390 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), i, intneterror(), INTNETERROR_INVALIDSTREAM, tysockRecord::maxdepth, NO_HOST_SERVICES, releasethreadglobalsnopriority(), shellframewindow, tysockRecord::sockID, sockstack, and TCPTRACKERIN().

Referenced by langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventCloseStream unsigned long  stream  ) 
 

Definition at line 2317 of file WinSockNetEvents.c.

References checkAccepter(), decrementconnectioncounter(), error, fwsNetEventLaunch(), getcurrentthreadglobals(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, neterror(), NO_HOST_SERVICES, releasethreadglobalsnopriority(), tysockRecord::sockID, sockstack, SOCKTYPE_CLOSED, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tysockRecord::typeID, and wsprintf.

Referenced by inetdsupervisor(), and langfunctionvalue().

Here is the call graph for this function:

long fwsNetEventGetConnectionCount void   ) 
 

Definition at line 1338 of file WinSockNetEvents.c.

Referenced by langfunctionvalue().

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

Definition at line 3439 of file WinSockNetEvents.c.

References intneterror(), INTNETERROR_INVALIDSTREAM, neterror(), tysockRecord::sockID, sockstack, TCPTRACKERIN(), and TCPTRACKEROUT().

Referenced by inetdsupervisor(), and langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventGetStats unsigned long  stream,
bigstring  bs
 

Definition at line 4368 of file WinSockNetEvents.c.

References setemptystring, sockstack, SOCKTYPE_CLOSED, SOCKTYPE_DATA, SOCKTYPE_INACTIVE, and SOCKTYPE_OPEN.

Referenced by langfunctionvalue().

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

Definition at line 4243 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), gethandlesize(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, lockhandle(), neterror(), NO_HOST_SERVICES, NULL, releasethreadglobalsnopriority(), select, sethandlesize(), tysockRecord::sockID, sockstack, SOCKTYPE_INACTIVE, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tysockRecord::typeID, unlockhandle(), and wsprintf.

Referenced by inetdsupervisor().

Here is the call graph for this function:

static boolean fwsNetEventLaunch struct hostData *  data  )  [static]
 

Definition at line 1348 of file WinSockNetEvents.c.

References BIGSTRING, boolean, clearsockstack(), data, frontierWinSockCount, frontierWinSockLoaded, getProfileLong(), neterror(), newclearhandle(), nil, setProfileLong(), shellpushwakeuphook(), WINSOCK_VERSION_MAJOR, and WINSOCK_VERSION_MINOR.

Here is the call graph for this function:

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

Definition at line 3190 of file WinSockNetEvents.c.

References addsockrecord(), copystring(), tysockRecord::currentListenDepth, disposehandle(), tysockRecord::flNotification, fwsgetcallbackcodetree(), fwslaunchacceptingthread(), fwsNetEventLaunch(), grabthreadglobalsnopriority(), tysockRecord::hcallbacktree, tysockRecord::listenReference, tysockRecord::maxdepth, neterror(), nil, NO_HOST_SERVICES, nullterminate, tysockRecord::refcon, releasethreadglobalsnopriority(), shellframewindow, tysockRecord::sockID, sockstack, SOCKTYPE_INACTIVE, SOCKTYPE_LISTENING, TCPprintf, TCPTRACKEROUT(), TCPWRITEMSG(), tysockRecord::typeID, wm_processAccept, and wsprintf.

Referenced by langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventMyAddress unsigned long addr  ) 
 

Definition at line 1657 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), grabthreadglobalsnopriority(), h, neterror(), NULL, and releasethreadglobalsnopriority().

Referenced by langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventNameToAddress bigstring  domainName,
unsigned long addr
 

Definition at line 1614 of file WinSockNetEvents.c.

References copyptocstring(), fwsNetEventLaunch(), grabthreadglobalsnopriority(), h, neterror(), NULL, releasethreadglobalsnopriority(), TCPprintf, TCPWRITEMSG(), and wsprintf.

Referenced by fwsNetEventOpenNameStream(), and langfunctionvalue().

Here is the call graph for this function:

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

Definition at line 2587 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), fwsOpenStream(), sizeof(), TCPprintf, TCPWRITEMSG(), and wsprintf.

Referenced by fwsNetEventOpenNameStream(), and langfunctionvalue().

Here is the call graph for this function:

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

Definition at line 2623 of file WinSockNetEvents.c.

References copyptocstring(), fwsNetEventAddressEncode(), fwsNetEventLaunch(), fwsNetEventOpenAddrStream(), fwsOpenStream(), grabthreadglobalsnopriority(), is_ipaddress(), neterror(), NULL, releasethreadglobalsnopriority(), TCPprintf, TCPWRITEMSG(), and wsprintf.

Referenced by langfunctionvalue().

Here is the call graph for this function:

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

Definition at line 2683 of file WinSockNetEvents.c.

References bigstring, convertpstring(), firstword(), fwsNetEventLaunch(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, neterror(), NO_HOST_SERVICES, releasethreadglobalsnopriority(), tysockRecord::sockID, sockstack, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), texttostring(), and wsprintf.

Referenced by langfunctionvalue().

Here is the call graph for this function:

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

Definition at line 3742 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), gethandlesize(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, lockhandle(), neterror(), NO_HOST_SERVICES, NULL, plainneterror(), releasethreadglobalsnopriority(), select, sethandlesize(), tysockRecord::sockID, sockstack, SOCKTYPE_INACTIVE, STR_P_ERROR_CLOSED_PREMATURELY, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tysockRecord::typeID, unlockhandle(), and wsprintf.

Referenced by langfunctionvalue(), and webserverreadrequest().

Here is the call graph for this function:

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

Definition at line 3474 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), gethandlesize(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, lockhandle(), neterror(), NO_HOST_SERVICES, NULL, plainneterror(), releasethreadglobalsnopriority(), searchhandle(), select, sethandlesize(), tysockRecord::sockID, sockstack, SOCKTYPE_INACTIVE, STR_P_ERROR_CLOSED_PREMATURELY, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tysockRecord::typeID, unlockhandle(), and wsprintf.

Referenced by langfunctionvalue(), and webserverreadrequest().

Here is the call graph for this function:

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

Definition at line 3615 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), gethandlesize(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, lockhandle(), neterror(), NO_HOST_SERVICES, NULL, releasethreadglobalsnopriority(), select, sethandlesize(), tysockRecord::sockID, sockstack, SOCKTYPE_INACTIVE, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tysockRecord::typeID, unlockhandle(), and wsprintf.

Referenced by langfunctionvalue().

Here is the call graph for this function:

boolean fwsNetEventShutDown void   ) 
 

Definition at line 1473 of file WinSockNetEvents.c.

References frontierWinSockCount, frontierWinSockLoaded, and TCPTRACKERCLOSE.

Referenced by WinMain().

void fwsNetEventShutdownDependentListeners long  hdatabase  ) 
 

Definition at line 2242 of file WinSockNetEvents.c.

References i, sockstack, SOCKTYPE_LISTENING, and SOCKTYPE_LISTENSTOPPED.

Referenced by ccdisposerecord().

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

Definition at line 3320 of file WinSockNetEvents.c.

References copyctopstring(), fwsNetEventLaunch(), inmainthread(), intneterror(), INTNETERROR_INVALIDSTREAM, neterror(), NO_HOST_SERVICES, NULL, nullterminate, select, tysockRecord::sockID, sockstack, SOCKTYPE_CLOSED, SOCKTYPE_INACTIVE, SOCKTYPE_INVALID, SOCKTYPE_LISTENING, SOCKTYPE_LISTENSTOPPED, SOCKTYPE_OPEN, SOCKTYPE_UNKNOWN, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tysockRecord::typeID, and wsprintf.

Referenced by langfunctionvalue().

Here is the call graph for this function:

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

Definition at line 4084 of file WinSockNetEvents.c.

References copyptocstring(), fsname, fwsNetEventLaunch(), fwsNetEventWriteStream(), fwstransmitfile(), gethandlesize(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, lockhandle(), neterror(), nil, NO_HOST_SERVICES, NULL, oserror(), releasethreadglobalsnopriority(), tysockRecord::sockID, sockstack, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), unlockhandle(), and wsprintf.

Referenced by langfunctionvalue(), and webservercallresponder().

Here is the call graph for this function:

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

Definition at line 3882 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), gethandlesize(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, lockhandle(), neterror(), NO_HOST_SERVICES, NULL, releasethreadglobalsnopriority(), select, tysockRecord::sockID, sockstack, SOCKTYPE_INACTIVE, TCPERRORprintf, TCPERRORWRITEMSG, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), tysockRecord::typeID, unlockhandle(), and wsprintf.

Referenced by inetdsupervisor(), and langfunctionvalue().

Here is the call graph for this function:

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

Definition at line 2731 of file WinSockNetEvents.c.

References fwsNetEventLaunch(), grabthreadglobalsnopriority(), intneterror(), INTNETERROR_INVALIDSTREAM, neterror(), NO_HOST_SERVICES, releasethreadglobalsnopriority(), tysockRecord::sockID, sockstack, TCPprintf, TCPTRACKERIN(), TCPWRITEMSG(), and wsprintf.

Referenced by fwsNetEventWriteFileToStream(), fwstransmitfile(), and langfunctionvalue().

Here is the call graph for this function:

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

Definition at line 1742 of file WinSockNetEvents.c.

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

Here is the call graph for this function:

static boolean fwsOpenStream struct sockaddr_in *  sa,
unsigned long stream
[static]
 

Definition at line 2517 of file WinSockNetEvents.c.

References addsockrecord(), BIGSTRING, decrementconnectioncounter(), grabthreadglobalsnopriority(), neterror(), plainneterror(), releasethreadglobalsnopriority(), tysockRecord::sockID, sockstack, SOCKTYPE_INVALID, SOCKTYPE_OPEN, and tysockRecord::typeID.

Here is the call graph for this function:

static boolean fwsruncallback long  listenstream,
long  acceptstream,
long  refcon
[static]
 

Definition at line 1806 of file WinSockNetEvents.c.

References addprocess(), copyhandle(), functionop, fwsnewprocess(), h, hcode, langdisposetree(), langunpacktree(), moduleop, newconstnode(), nil, pushbinaryoperation(), pushlastlink(), setlongvalue(), and sockstack.

Here is the call graph for this function:

static boolean fwsrunstring bigstring  bs  )  [static]
 

Definition at line 1880 of file WinSockNetEvents.c.

References grabthreadglobalsnopriority(), processrunstringnoerrorclear(), and releasethreadglobalsnopriority().

Referenced by restartAccepter().

Here is the call graph for this function:

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

Definition at line 4024 of file WinSockNetEvents.c.

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

Here is the call graph for this function:

static boolean getsockrecord SOCKET  sock,
long stream
[static]
 

Definition at line 769 of file WinSockNetEvents.c.

References FRONTIER_MAX_STREAM, i, and sockstack.

static void gettcperrorstring int  errcode,
bigstring  bs
[static]
 

Definition at line 879 of file WinSockNetEvents.c.

References copystring(), firstword(), getsystemerrorstring(), isemptystring, pushchar(), and tcperrorstrings.

Here is the call graph for this function:

static boolean incrementconnectioncounter void   )  [static]
 

Definition at line 1319 of file WinSockNetEvents.c.

static void initsockrecord long  i  )  [static]
 

Definition at line 785 of file WinSockNetEvents.c.

References copystring(), tysockRecord::currentListenDepth, emptystring, tysockRecord::flNotification, tysockRecord::hcallbacktree, tysockRecord::listenReference, tysockRecord::maxdepth, nil, tysockRecord::refcon, tysockRecord::sockID, sockstack, SOCKTYPE_UNKNOWN, and tysockRecord::typeID.

Referenced by addsockrecord().

Here is the call graph for this function:

static void intneterror long  errcode  )  [static]
 

Definition at line 965 of file WinSockNetEvents.c.

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

Here is the call graph for this function:

static short is_ipaddress char *  name  )  [static]
 

Definition at line 2487 of file WinSockNetEvents.c.

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

Definition at line 934 of file WinSockNetEvents.c.

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

Here is the call graph for this function:

static void parsecallbackstring long  stream,
long  p1,
long  p2,
bigstring  bs
[static]
 

Definition at line 1863 of file WinSockNetEvents.c.

References copystring(), nullterminate, pushchar(), pushlong(), and sockstack.

Referenced by restartAccepter().

Here is the call graph for this function:

static void plainneterror bigstring  bs  )  [static]
 

Definition at line 915 of file WinSockNetEvents.c.

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

Here is the call graph for this function:

static boolean restartAccepter SOCKET  s,
short  listenstream
[static]
 

Definition at line 1902 of file WinSockNetEvents.c.

References bigstring, tysockRecord::flNotification, fwsruncallback(), fwsrunstring(), maxdepth, nil, parsecallbackstring(), shellframewindow, sockstack, SOCKTYPE_LISTENSTOPPED, TCPERRORprintf, TCPERRORWRITEMSG, TCPprintf, TCPTRACKERIN(), TCPTRACKEROUT(), TCPWRITEMSG(), tysockRecord::typeID, wm_processAccept, and wsprintf.

Referenced by checkAccepter().

Here is the call graph for this function:

static char* TCPGETTYPE tysocktypeid  typeID  )  [static]
 

Definition at line 465 of file WinSockNetEvents.c.

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

static void TCPTRACKERIN char *  functionName,
int  linenumber,
unsigned long  streamID
[static]
 

Definition at line 721 of file WinSockNetEvents.c.

References FRONTIER_MAX_STREAM, maxdepth, sockstack, TCPGETTYPE(), TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

static void TCPTRACKEROUT char *  functionName,
int  linenumber,
unsigned long  streamID
[static]
 

Definition at line 738 of file WinSockNetEvents.c.

References FRONTIER_MAX_STREAM, maxdepth, sockstack, TCPGETTYPE(), TCPWRITEMSG(), and wsprintf.

Here is the call graph for this function:

static void TCPWRITEMSG  )  [static]
 

Definition at line 709 of file WinSockNetEvents.c.

References aboutsetmiscstring(), and convertcstring().

Here is the call graph for this function:


Variable Documentation

long ctconnections = 0
 

short frontierWinSockCount = 0 [static]
 

Definition at line 422 of file WinSockNetEvents.c.

boolean frontierWinSockLoaded = false [static]
 

Definition at line 423 of file WinSockNetEvents.c.

long maxconnections = longinfinity
 

Definition at line 1309 of file WinSockNetEvents.c.

Referenced by initenvironment().

sockRecord sockstack[FRONTIER_MAX_STREAM] [static]
 

Definition at line 424 of file WinSockNetEvents.c.

Referenced by addsockrecord(), checkAccepter(), clearsockstack(), fwsNetEventAbortStream(), fwsNetEventCloseListen(), fwsNetEventCloseStream(), fwsNetEventGetPeerAddress(), fwsNetEventGetStats(), fwsNetEventInetdRead(), fwsNetEventListenStream(), fwsNetEventReadStream(), fwsNetEventReadStreamBytes(), fwsNetEventReadStreamUntil(), fwsNetEventReadStreamUntilClosed(), fwsNetEventShutdownDependentListeners(), fwsNetEventStatusStream(), fwsNetEventWriteFileToStream(), fwsNetEventWriteHandleToStream(), fwsNetEventWriteStream(), fwsOpenStream(), fwsruncallback(), getsockrecord(), initsockrecord(), parsecallbackstring(), restartAccepter(), TCPTRACKERIN(), and TCPTRACKEROUT().

unsigned char* tcperrorstrings[80] [static]
 

Definition at line 155 of file WinSockNetEvents.c.

Referenced by gettcperrorstring().

char TCPmsg[400] [static]
 

Definition at line 707 of file WinSockNetEvents.c.


Generated on Thu Jun 15 01:11:53 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6