|
Mixe for Privacy and Anonymity in the Internet
|
This is a class for Unix Domain Protocol Sockat Addresses. More...
#include <CASocketAddrUnix.hpp>
Public Member Functions | |
| CASocketAddrUnix () | |
| Constructs an address with an empty path. More... | |
| CASocketAddrUnix (const CASocketAddrUnix &addr) | |
| Constructs an Unix Adress from an other Unix-Address. More... | |
| SINT32 | getType () const |
| Returns the type (family) of the socket this address is for (always AF_LOCAL) More... | |
| CASocketAddr * | clone () const |
| Creates a new copy of this address. More... | |
| SINT32 | getSize () const |
| Resturns the size of the SOCKADDR struct used. More... | |
| const SOCKADDR * | LPSOCKADDR () const |
| Makes a cast to SOCKADDR* . More... | |
| SINT32 | setPath (const char *path) |
| Sets the path of this unix address. More... | |
| UINT8 * | getPath () const |
| Retruns the path of this address. More... | |
| virtual SINT32 | toString (UINT8 *buff, UINT32 bufflen) const |
| Returns a human readable string describing this address. More... | |
Public Member Functions inherited from CASocketAddr | |
| virtual | ~CASocketAddr () |
This is a class for Unix Domain Protocol Sockat Addresses.
Definition at line 33 of file CASocketAddrUnix.hpp.
| CASocketAddrUnix::CASocketAddrUnix | ( | ) |
Constructs an address with an empty path.
Definition at line 34 of file CASocketAddrUnix.cpp.
References AF_LOCAL.
Referenced by clone().
| CASocketAddrUnix::CASocketAddrUnix | ( | const CASocketAddrUnix & | addr | ) |
Constructs an Unix Adress from an other Unix-Address.
Definition at line 41 of file CASocketAddrUnix.cpp.
References AF_LOCAL.
|
inlinevirtual |
Creates a new copy of this address.
Implements CASocketAddr.
Definition at line 52 of file CASocketAddrUnix.hpp.
References CASocketAddrUnix().
| UINT8 * CASocketAddrUnix::getPath | ( | ) | const |
Retruns the path of this address.
Gets the path for the unix domain protocol address.
The returned char array has to be freed by the caller using delete[].
| NULL | if path was no specified yet |
| copy | of the path value |
Definition at line 69 of file CASocketAddrUnix.cpp.
References len.
Referenced by toString().
|
inlinevirtual |
Resturns the size of the SOCKADDR struct used.
return sizeof(sockaddr_un)
Implements CASocketAddr.
Definition at line 61 of file CASocketAddrUnix.hpp.
|
inlinevirtual |
Returns the type (family) of the socket this address is for (always AF_LOCAL)
| AF_LOCAL |
Implements CASocketAddr.
Definition at line 42 of file CASocketAddrUnix.hpp.
References AF_LOCAL.
|
inlinevirtual |
Makes a cast to SOCKADDR* .
Implements CASocketAddr.
Definition at line 67 of file CASocketAddrUnix.hpp.
| SINT32 CASocketAddrUnix::setPath | ( | const char * | path | ) |
Sets the path of this unix address.
Sets the path for the unix domain protocol address.
| path | the new path of this address |
| E_SUCCESS | if succesful |
| E_UNKNOWN | otherwise |
| path | the new path value (zero terminated) |
| E_SUCCESS | if no error occured |
| E_UNSPECIFIED | if path was NULL |
| E_SPACE | if path was to long |
Definition at line 53 of file CASocketAddrUnix.cpp.
References E_SPACE, E_SUCCESS, and E_UNSPECIFIED.
Returns a human readable string describing this address.
| buff | buffer which holds the string |
| bufflen | size of the buffer |
| E_SPACE | if the bufvfer is to small for the string |
| E_UNKNOWN | if an error occured |
| E_SUCCESS | if successfull |
Implements CASocketAddr.
Definition at line 92 of file CASocketAddrUnix.hpp.
References E_SPACE, E_SUCCESS, E_UNKNOWN, and getPath().