|
|
NetlinkSocket class opens a netlink socket and forwards data arriving on the socket to NetlinkSocketObservers. The NetlinkSocket hooks itself into the EventLoop and activity usually happens asynchronously.
NetlinkSocket (EventLoop& e)
| NetlinkSocket |
~NetlinkSocket ()
| ~NetlinkSocket |
int start (int af)
| start |
Start the netlink socket operation.
Parameters:
af | the address family. |
Returns: XORP_OK on success, otherwise XORP_ERROR.
int stop ()
| stop |
Stop the netlink socket operation.
Returns: XORP_OK on success, otherwise XORP_ERROR.
inline bool is_open ()
| is_open |
[const]
ssize_t write (const void* data, size_t nbytes)
| write |
Write data to netlink socket. Update sequence number associated with netlink socket.
ssize_t sendto (const void* data, size_t nbytes, int flags,
const struct sockaddr* to, socklen_t tolen)
| sendto |
Sendto data on netlink socket. Update sequence number associated with netlink socket.
inline uint32_t seqno ()
| seqno |
[const]
Get sequence number for next message written into kernel. Sequence number is derived of the instance number of the netlink socket and a 16bit counter.
inline pid_t pid ()
| pid |
[const]
Get cached process identifier value.
void force_read ()
| force_read |
Force socket to read data - usually performed after writing a request that the kernel will answer, eg after writing a route lookup.
Use sparingly, with caution, and at your own risk.
void force_recvfrom (int flags, struct sockaddr* from, socklen_t* fromlen)
| force_recvfrom |
Force socket to recvfrom data - usually performed after writing a sendto() request that the kernel will answer, eg after writing a route lookup.
Use sparingly, with caution, and at your own risk.
void force_recvmsg (int flags)
| force_recvmsg |
Force socket to recvmsg data - usually performed after writing a sendto() request that the kernel will answer, eg after writing a route lookup.
Use sparingly, with caution, and at your own risk.
typedef list<NetlinkSocketObserver*> ObserverList | ObserverList |
Generated by: pavlin on possum.icir.org on Thu Aug 28 12:52:10 2003, using kdoc 2.0a54+XORP. |