class WinRtmPipe

WinRtmPipe class opens a routing socket and forwards data arriving on the socket to WinRtmPipeObservers. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

WinRtmPipe class opens a routing socket and forwards data arriving on the socket to WinRtmPipeObservers. The WinRtmPipe hooks itself into the EventLoop and activity usually happens asynchronously.

 WinRtmPipe (EventLoop& eventloop)

WinRtmPipe

 ~WinRtmPipe ()

~WinRtmPipe

int  start (int af, string& error_msg)

start

Start the routing socket operation for a given address family.

Parameters:

afthe address family.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  stop (string& error_msg)

stop

Stop the routing socket operation.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

inline bool  is_open ()

is_open

[const]

Test if the routing socket is open.

This method is needed because WinRtmPipe may fail to open routing socket during startup.

Returns: true if the routing socket is open, otherwise false.

ssize_t  write (const void* data, size_t nbytes)

write

Write data to routing socket.

This method also updates the sequence number associated with this routing socket.

Returns: the number of bytes which were written, or -1 if error.

inline uint32_t  seqno ()

seqno

[const]

Get the sequence number for next message written into the kernel.

The sequence number is derived from the instance number of this routing socket and a 16-bit counter.

Returns: the sequence number for the next message written into the kernel.

inline pid_t  pid ()

pid

[const]

Get the cached process identifier value.

Returns: the cached process identifier value.

int  force_read (string& error_msg)

force_read

Force socket to read data.

This usually is performed after writing a request that the kernel will answer (e.g., after writing a route lookup). Use sparingly, with caution, and at your own risk.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.


Generated by: pavlin on possum.icir.org on Wed Mar 21 11:23:22 2007, using kdoc $.