|
|
Base class for raw sockets. Supports write only.
RawSocket4 (uint32_t protocol)
throw (RawSocket4Exception) | RawSocket4 |
~RawSocket4 ()
| ~RawSocket4 |
[virtual]
inline uint32_t protocol ()
| protocol |
[const]
ssize_t write (const uint8_t* buf, size_t bufbytes)
| write |
[const]
Write data to raw socket.
Parameters:
buf | pointer to raw IPv4 packet. Packet fields are expected to be in network order. |
bufbytes | number of bytes in packet pointed to by buf. |
Returns: number of bytes written on success. If return value is negative check errno for system errors. Invalid IPv4 fields may cause packet to be rejected before being passed to system, in which case errno will not indicate an error. The error is recorded in the xlog.
int32_t _fd | _fd |
[protected]
uint32_t _pf | _pf |
[protected]