TestPeer Class Reference

List of all members.


struct  Queued

Public Member Functions

 TestPeer (EventLoop &eventloop, XrlRouter &xrlrouter, const char *server, bool verbose)
bool done ()
void register_coordinator (const string &name)
void register_genid (const uint32_t &genid)
bool packetisation (const string &protocol)
void use_4byte_asnums (bool use)
bool connect (const string &host, const uint32_t &port, string &error_string)
bool listen (const string &host, const uint32_t &port, string &error_string)
bool bind (const string &host, const uint32_t &port, string &error_string)
bool send (const vector< uint8_t > &data, string &error_string)
void send_complete (AsyncFileWriter::Event ev, const uint8_t *buf, const size_t buf_bytes, const size_t offset)
bool zap (XorpFd &fd, const char *msg)
bool disconnect (string &error_string)
void reset ()
bool terminate (string &error_string)

Protected Types

enum  status { GOOD, CLOSED, ERROR }

Protected Member Functions

void connect_attempt (XorpFd fd, IoEventType type)
void receive (XorpFd fd, IoEventType type)
void datain (status st, uint8_t *ptr, size_t len, string error="")
void queue_data (status st, uint8_t *ptr, size_t len, string error)
void sendit ()
void xrl_callback (const XrlError &error)

Private Member Functions

 TestPeer (const TestPeer &)
TestPeeroperator= (const TestPeer &)

Private Attributes

const char * _server
const bool _verbose
bool _done
XorpFd _s
XorpFd _listen
XorpFd _bind
string _coordinator
uint32_t _genid
bool _bgp
bool _use_4byte_asnums
queue< Queued_xrl_queue
int _flying
size_t _bgp_bytes
uint8_t _bgp_buf [BGPPacket::MAXPACKETSIZE]

Static Private Attributes

static const int FLYING_LIMIT = 100

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations