Platform.cpp File Reference

#include "Platform.h"
#include "Declarations.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "Message.h"
#include "PacketQueue.h"
#include "ResponseWaitQueue.h"
#include "MessageBuffers.h"
#include "PeerList.h"
#include "NetworkQueue.h"

Include dependency graph for Platform.cpp:

Go to the source code of this file.

Defines

#define MAXLEN   1024

Functions

ONECHAR * platformIPAddrConvert (const UINT32 ip_hostorder)
UINT32 platformIPAddrConvert (const ONECHAR *ip_addr_dotted_string)
void platformInitializeSocketSubsystem ()
void platformDeinitializeSocketSubsystem ()
socktype platformSocketCreateInet (INT32 type)
 create a socket for use with TCP or UDP wrapper
INT32 platformSocketConnect (socktype s, const struct sockaddr *Saddr, size_t size_sockaddr)
INT32 platformSocketBind (socktype s, const struct sockaddr *Saddr, size_t size_sockaddr)
INT32 platformSocketClose (socktype s)
INT32 platformSocketSelect (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
INT32 platformSocketReceiveFromFunction (socktype s, UINT8 *buf, UINT32 buflen, UINT32 &ip_hostorder, UINT16 &port_hostorder)
INT32 platformSocketSendToFunction (socktype s, const UINT8 *buf, UINT32 buflen, UINT32 ip_hostorder, UINT16 port_hostorder)
INT32 platformSocketDisconnectUDP (socktype s)
INT32 platformSocketSetNonblocking (socktype s)
void stoupper (char *s)
int _strnicmp (const char *string1, const char *string2, size_t count)
VOID platformSleepMilliseconds (UINT32 msec)
UINT32 platformGetTickCount ()
void platformInitializeConsoleInput ()
void platformDeinitializeConsoleInput ()
INT32 platformgetch ()
INT32 platformkbhit ()

Variables

const INT32 platformMaxFdSets = PLF_MAX_FDSETS
static char strtmp1 [MAXLEN]
static char strtmp2 [MAXLEN]


Define Documentation

#define MAXLEN   1024

Definition at line 1860 of file Platform.cpp.

Referenced by _strnicmp().


Function Documentation

int _strnicmp ( const char *  string1,
const char *  string2,
size_t  count 
)

Definition at line 1885 of file Platform.cpp.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void platformDeinitializeConsoleInput (  ) 

Definition at line 2054 of file Platform.cpp.

Referenced by SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

void platformDeinitializeSocketSubsystem (  ) 

Definition at line 87 of file Platform.cpp.

Referenced by SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

INT32 platformgetch (  ) 

Definition at line 2073 of file Platform.cpp.

Referenced by SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

UINT32 platformGetTickCount (  ) 

Definition at line 1949 of file Platform.cpp.

Referenced by SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

void platformInitializeConsoleInput (  ) 

Definition at line 2023 of file Platform.cpp.

Referenced by SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

void platformInitializeSocketSubsystem (  ) 

Definition at line 77 of file Platform.cpp.

Referenced by SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

UINT32 platformIPAddrConvert ( const ONECHAR *  ip_addr_dotted_string  ) 

Definition at line 53 of file Platform.cpp.

ONECHAR* platformIPAddrConvert ( const UINT32  ip_hostorder  ) 

Definition at line 39 of file Platform.cpp.

Referenced by CNetworkQueue::create(), CNetworkQueue::ReceiveProcessTask(), SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

INT32 platformkbhit (  ) 

Definition at line 2113 of file Platform.cpp.

Referenced by SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

VOID platformSleepMilliseconds ( UINT32  msec  ) 

Definition at line 1911 of file Platform.cpp.

Referenced by CNetworkQueue::close(), CNetworkQueue::create(), SimulateLocalPeer(), and SimulateRemotePeer().

Here is the caller graph for this function:

INT32 platformSocketBind ( socktype  s,
const struct sockaddr *  Saddr,
size_t  size_sockaddr 
)

Definition at line 213 of file Platform.cpp.

Referenced by CNetworkQueue::create().

Here is the caller graph for this function:

INT32 platformSocketClose ( socktype  s  ) 

Definition at line 242 of file Platform.cpp.

Referenced by CNetworkQueue::close(), and CNetworkQueue::create().

Here is the caller graph for this function:

INT32 platformSocketConnect ( socktype  s,
const struct sockaddr *  Saddr,
size_t  size_sockaddr 
)

Definition at line 182 of file Platform.cpp.

socktype platformSocketCreateInet ( INT32  type  ) 

create a socket for use with TCP or UDP wrapper

type: SOCK_STREAM - tcp socket SOCK_DGRAM - udp socket

return: (socktype) SOCKET_ERROR on error an appropriate socket otherwise

This function is part of the platform-independence wrapping and will be accessed by platform-independent parts of the Network Queue.

Definition at line 108 of file Platform.cpp.

Referenced by CNetworkQueue::create().

Here is the caller graph for this function:

INT32 platformSocketDisconnectUDP ( socktype  s  ) 

Definition at line 354 of file Platform.cpp.

INT32 platformSocketReceiveFromFunction ( socktype  s,
UINT8 *  buf,
UINT32  buflen,
UINT32 &  ip_hostorder,
UINT16 &  port_hostorder 
)

Definition at line 297 of file Platform.cpp.

Referenced by CNetworkQueue::ReceiveProcessTask().

Here is the caller graph for this function:

INT32 platformSocketSelect ( int  n,
fd_set *  readfds,
fd_set *  writefds,
fd_set *  exceptfds,
struct timeval *  timeout 
)

Definition at line 267 of file Platform.cpp.

Referenced by CNetworkQueue::ReceiveProcessTask(), and CNetworkQueue::SendProcessTask().

Here is the caller graph for this function:

INT32 platformSocketSendToFunction ( socktype  s,
const UINT8 *  buf,
UINT32  buflen,
UINT32  ip_hostorder,
UINT16  port_hostorder 
)

Definition at line 333 of file Platform.cpp.

Referenced by CNetworkQueue::SendProcessTask().

Here is the caller graph for this function:

INT32 platformSocketSetNonblocking ( socktype  s  ) 

Definition at line 394 of file Platform.cpp.

Referenced by CNetworkQueue::create().

Here is the caller graph for this function:

void stoupper ( char *  s  ) 

Definition at line 1866 of file Platform.cpp.

Referenced by _strnicmp().

Here is the caller graph for this function:


Variable Documentation

const INT32 platformMaxFdSets = PLF_MAX_FDSETS

char strtmp1[MAXLEN] [static]

Definition at line 1879 of file Platform.cpp.

char strtmp2[MAXLEN] [static]

Definition at line 1880 of file Platform.cpp.


Generated on Wed Apr 16 18:22:15 2008 for NetworkQueue by  doxygen 1.5.5