DMTCP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | List of all members
dmtcp::TcpConnection Class Reference

#include <socketconnection.h>

Inheritance diagram for dmtcp::TcpConnection:
dmtcp::Connection dmtcp::SocketConnection

Public Types

enum  TcpType {
  TCP_INVALID = TCP, TCP_ERROR, TCP_CREATED, TCP_BIND,
  TCP_LISTEN, TCP_ACCEPT, TCP_CONNECT, TCP_PREEXISTING,
  TCP_EXTERNAL_CONNECT
}
 
- Public Types inherited from dmtcp::Connection
enum  ConnectionType {
  INVALID = 0x00000, TCP = 0x10000, RAW = 0x11000, PTY = 0x20000,
  FILE = 0x21000, STDIO = 0x22000, FIFO = 0x24000, EPOLL = 0x30000,
  EVENTFD = 0x31000, SIGNALFD = 0x32000, INOTIFY = 0x34000, POSIXMQ = 0x40000,
  TYPEMASK
}
 
- Public Types inherited from dmtcp::SocketConnection
enum  PeerType { PEER_UNKNOWN, PEER_INTERNAL, PEER_EXTERNAL }
 

Public Member Functions

 TcpConnection ()
 
void markExternalConnect ()
 
bool isBlacklistedTcp (const sockaddr *saddr, socklen_t len)
 
 TcpConnection (int domain, int type, int protocol)
 
void onBind (const struct sockaddr *addr, socklen_t len)
 
void onListen (int backlog)
 
void onConnect (const struct sockaddr *serv_addr=NULL, socklen_t addrlen=0)
 
 TcpConnection (const TcpConnection &parent, const ConnectionIdentifier &remote)
 
void onError ()
 
void onDisconnect ()
 
void markPreExisting ()
 
virtual void drain ()
 
virtual void refill (bool isRestart)
 
virtual void postRestart ()
 
void doSendHandshakes (const ConnectionIdentifier &coordId)
 
void doRecvHandshakes (const ConnectionIdentifier &coordId)
 
void sendHandshake (int remotefd, const ConnectionIdentifier &coordId)
 
void recvHandshake (int remotefd, const ConnectionIdentifier &coordId)
 
virtual string str ()
 
virtual void serializeSubClass (jalib::JBinarySerializer &o)
 
- Public Member Functions inherited from dmtcp::Connection
 Connection ()
 
virtual ~Connection ()
 
void addFd (int fd)
 
void removeFd (int fd)
 
uint32_t numFds () const
 
const vector< int32_t > & getFds () const
 
uint32_t conType () const
 
uint32_t subType () const
 
bool hasLock ()
 
bool isStdio ()
 
void checkLocking ()
 
const ConnectionIdentifierid () const
 
virtual void saveOptions ()
 
virtual void doLocking ()
 
virtual void preCkpt ()
 
virtual void resume (bool isRestart)
 
virtual bool isPreExistingCTTY () const
 
virtual void restoreOptions ()
 
void serialize (jalib::JBinarySerializer &o)
 
- Public Member Functions inherited from dmtcp::SocketConnection
uint32_t peerType () const
 
 SocketConnection ()
 
 SocketConnection (int domain, int type, int protocol)
 
void addSetsockopt (int level, int option, const char *value, int len)
 
void restoreSocketOptions (vector< int32_t > &fds)
 
void serialize (jalib::JBinarySerializer &o)
 
int sockDomain () const
 

Additional Inherited Members

- Protected Member Functions inherited from dmtcp::Connection
 Connection (uint32_t t)
 
- Protected Attributes inherited from dmtcp::Connection
ConnectionIdentifier _id
 
uint32_t _type
 
int64_t _fcntlFlags
 
int64_t _fcntlOwner
 
int64_t _fcntlSignal
 
bool _hasLock
 
vector< int32_t > _fds
 
- Protected Attributes inherited from dmtcp::SocketConnection
int64_t _sockDomain
 
int64_t _sockType
 
int64_t _sockProtocol
 
uint32_t _peerType
 
map< int64_t, map< int64_t,
jalib::JBuffer > > 
_sockOptions
 

Detailed Description

Definition at line 68 of file socketconnection.h.

Member Enumeration Documentation

Enumerator
TCP_INVALID 
TCP_ERROR 
TCP_CREATED 
TCP_BIND 
TCP_LISTEN 
TCP_ACCEPT 
TCP_CONNECT 
TCP_PREEXISTING 
TCP_EXTERNAL_CONNECT 

Definition at line 71 of file socketconnection.h.

Constructor & Destructor Documentation

dmtcp::TcpConnection::TcpConnection ( )
inline

Definition at line 84 of file socketconnection.h.

TcpConnection::TcpConnection ( int  domain,
int  type,
int  protocol 
)

Definition at line 177 of file socketconnection.cpp.

TcpConnection::TcpConnection ( const TcpConnection parent,
const ConnectionIdentifier remote 
)

Definition at line 339 of file socketconnection.cpp.

Member Function Documentation

void TcpConnection::doRecvHandshakes ( const ConnectionIdentifier coordId)

Definition at line 421 of file socketconnection.cpp.

void TcpConnection::doSendHandshakes ( const ConnectionIdentifier coordId)

Definition at line 407 of file socketconnection.cpp.

void TcpConnection::drain ( )
virtual

Implements dmtcp::Connection.

Definition at line 366 of file socketconnection.cpp.

bool TcpConnection::isBlacklistedTcp ( const sockaddr *  saddr,
socklen_t  len 
)

Definition at line 219 of file socketconnection.cpp.

void dmtcp::TcpConnection::markExternalConnect ( )
inline

Definition at line 87 of file socketconnection.h.

void dmtcp::TcpConnection::markPreExisting ( )
inline

Definition at line 103 of file socketconnection.h.

void TcpConnection::onBind ( const struct sockaddr *  addr,
socklen_t  len 
)

Definition at line 271 of file socketconnection.cpp.

void TcpConnection::onConnect ( const struct sockaddr *  serv_addr = NULL,
socklen_t  addrlen = 0 
)

Definition at line 321 of file socketconnection.cpp.

void dmtcp::TcpConnection::onDisconnect ( )
void TcpConnection::onError ( )

Definition at line 356 of file socketconnection.cpp.

void TcpConnection::onListen ( int  backlog)

Definition at line 297 of file socketconnection.cpp.

void TcpConnection::postRestart ( )
virtual

Implements dmtcp::Connection.

Definition at line 446 of file socketconnection.cpp.

void TcpConnection::recvHandshake ( int  remotefd,
const ConnectionIdentifier coordId 
)

Definition at line 601 of file socketconnection.cpp.

void TcpConnection::refill ( bool  isRestart)
virtual

Implements dmtcp::Connection.

Definition at line 435 of file socketconnection.cpp.

void TcpConnection::sendHandshake ( int  remotefd,
const ConnectionIdentifier coordId 
)

Definition at line 591 of file socketconnection.cpp.

void TcpConnection::serializeSubClass ( jalib::JBinarySerializer &  o)
virtual

Implements dmtcp::Connection.

Definition at line 628 of file socketconnection.cpp.

virtual string dmtcp::TcpConnection::str ( )
inlinevirtual

Implements dmtcp::Connection.

Definition at line 116 of file socketconnection.h.

Member Data Documentation

struct sockaddr_storage dmtcp::TcpConnection::_bindAddr

Definition at line 128 of file socketconnection.h.

socklen_t dmtcp::TcpConnection::_bindAddrlen

Definition at line 123 of file socketconnection.h.

struct sockaddr_storage dmtcp::TcpConnection::_connectAddr

Definition at line 129 of file socketconnection.h.

socklen_t dmtcp::TcpConnection::_connectAddrlen

Definition at line 124 of file socketconnection.h.


The documentation for this class was generated from the following files: