senf::ConnectedRawV4SocketProtocol Class Reference
[Protocol Implementations (Concrete Protocol Classes)]

IPv4 RAW Socket Protocol, connected. More...

#include <senf/Socket/Protocols/INet/ConnectedRawINetSocketHandle.hh>

Inheritance diagram for senf::ConnectedRawV4SocketProtocol:
Inheritance graph
[legend]

List of all members.


Detailed Description

IPv4 RAW Socket Protocol, connected.
Socket Handle typedefs:
ConnectedRawV4ClientSocketHandle (ProtocolClientSocketHandle)
Policy Interface:
ClientSocketHandle::read(), ClientSocketHandle::write(), ClientSocketHandle::bind(), ClientSocketHandle::local(), ClientSocketHandle::connect(), ClientSocketHandle::peer()
Address Type:
INet4SocketAddress
ConnectedRawV4SocketProtocol provides an Internet protocol raw socket based on IPv4 addressing. This socket will put data written to it onto the IPv4 layer: if you call writeto don't include the header!

On the other hand `read` will return the packet data including the IP header. This behaviour is strange and differs from the behaviour of IPv6 RAW sockets and should be changed in the future.

This class is utilized as the protocol class of the ProtocolClientSocketHandle via the Socket Handle typedefs above.

Attention:
If socket handle with ConnectedRawV4SocketProtocol is connected via INet4SocketAddress, the port number is interpreted as protocol number for IPv4 layer. Please refer manpage: "man 7 raw".
See also:
ConnectedRawV6SocketProtocol

RawV4SocketProtocol

RawV6SocketProtocol

Definition at line 83 of file ConnectedRawINetSocketHandle.hh.


Constructors

void  init_client () const
  Create unconnected client socket for IPPROTO_RAW.
void  init_client (int const &protocol) const
  Create unconnected client socket for protocol.
void  init_client (int const &protocol, INet4SocketAddress const &address) const
  Create client socket and connect.

Member Function Documentation

void senf::ConnectedRawV4SocketProtocol::
init_client ( int const &  protocol,
INet4SocketAddress const &  address )

Create client socket and connect.

Creates a new client socket for the given protocol and connects to the given address.

Parameters:
[in]  protocol  Layer 4 protocol to filter for / to send
[in]  address  local address to connect to

Definition at line 56 of file ConnectedRawINetSocketHandle.cc.

void senf::ConnectedRawV4SocketProtocol::
init_client ( int const &  protocol )

Create unconnected client socket for protocol.

Definition at line 46 of file ConnectedRawINetSocketHandle.cc.

void senf::ConnectedRawV4SocketProtocol::
init_client ()

Create unconnected client socket for IPPROTO_RAW.

Note:
This member is implicitly called from the ProtocolClientSocketHandle::ProtocolClientSocketHandle() constructor

Definition at line 39 of file ConnectedRawINetSocketHandle.cc.


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