|
The Assimilation Monitoring Project
|
Defines interfaces for the NetAddr (network address) object. More...
#include <stdlib.h>#include <memory.h>#include <projectcommon.h>#include <netaddr.h>#include <address_family_numbers.h>
Go to the source code of this file.
Macros | |
| #define | CHAR_BIT 8 |
Functions | |
| FSTATIC struct sockaddr_in6 | _netaddr_ipv6sockaddr (const NetAddr *self) |
| FSTATIC struct sockaddr_in | _netaddr_ipv4sockaddr (const NetAddr *self) |
| FSTATIC void | _netaddr_finalize (AssimObj *base) |
| Finalize (free) this object. More... | |
| FSTATIC guint16 | _netaddr_port (const NetAddr *self) |
| Return the port of this NetAddr. More... | |
| FSTATIC void | _netaddr_setport (NetAddr *self, guint16 port) |
| Set the port of this NetAddr. More... | |
| FSTATIC guint16 | _netaddr_addrtype (const NetAddr *self) |
| Return the address type of this NetAddr. More... | |
| FSTATIC gboolean | _netaddr_ismcast (const NetAddr *self) |
| Return TRUE if this is a multicast address. More... | |
| FSTATIC gboolean | _netaddr_islocal (const NetAddr *self) |
| Return TRUE if this is a multicast address. More... | |
| FSTATIC gconstpointer | _netaddr_addrinnetorder (gsize *addrlen) |
| FSTATIC gboolean | _netaddr_equal (const NetAddr *self, const NetAddr *other) |
| Return TRUE if these two addresses are "equal" (equivalent) More... | |
| FSTATIC guint | _netaddr_hash (const NetAddr *self) |
| NetAddr hash function which worries about denial of service via hash collisions. More... | |
| FSTATIC gchar * | _netaddr_toStringflex (const NetAddr *self, gboolean canon_format) |
| Convert this NetAddr to a string. More... | |
| FSTATIC gchar * | _netaddr_toString (gconstpointer baseobj) |
| Convert this IPv6-encapsulated IPv4 NetAddr to an IPv4 representation Convert this NetAddr to a string. More... | |
| FSTATIC gchar * | _netaddr_canonStr (const NetAddr *) |
| FSTATIC NetAddr * | _netaddr_toIPv6 (const NetAddr *self) |
| Convert this IPv6-encapsulated IPv4 NetAddr to an IPv4 representation. More... | |
| FSTATIC gchar * | _netaddr_toString_ipv6_ipv4 (const NetAddr *self, gboolean ipv4format) |
| Convert this IPv6-encapsulated IPv4 NetAddr to a string. More... | |
| FSTATIC NetAddr * | _netaddr_string_ipv4_new (const char *addrstr) |
| Convert a string to an IPv4 NetAddr. More... | |
| FSTATIC NetAddr * | _netaddr_string_ipv6_new (const char *addrstr) |
| Convert a string into an IPv6 address - possibly including a port as per RFC 4291. More... | |
| WINEXPORT gboolean | netaddr_g_hash_equal (gconstpointer lhs, gconstpointer rhs) |
| g_hash_table equal comparator for a NetAddr More... | |
| WINEXPORT guint | netaddr_g_hash_hash (gconstpointer addrptr) |
| g_hash_table hash function for a NetAddr More... | |
| NetAddr * | netaddr_new (gsize objsize, guint16 port, guint16 addrtype, gconstpointer addrbody, guint16 addrlen) |
| Generic NetAddr constructor. More... | |
| NetAddr * | netaddr_string_new (const char *addrstr) |
| NetAddr * | netaddr_macaddr_new (gconstpointer macbuf, guint16 maclen) |
| Create new NetAddr from a MAC address. More... | |
| NetAddr * | netaddr_mac48_new (gconstpointer macbuf) |
| Create new NetAddr from a MAC48 address. More... | |
| NetAddr * | netaddr_mac64_new (gconstpointer macbuf) |
| Create new NetAddr from a MAC64 address. More... | |
| NetAddr * | netaddr_ipv4_new (gconstpointer ipbuf, guint16 port) |
| Create new NetAddr from a IPv4 address. More... | |
| NetAddr * | netaddr_ipv6_new (gconstpointer ipbuf, guint16 port) |
| Create new NetAddr from a IPv6 address. More... | |
| NetAddr * | netaddr_sockaddr_new (const struct sockaddr_in6 *sa_in6, socklen_t length) |
| Create new NetAddr from a struct sockaddr More... | |
Defines interfaces for the NetAddr (network address) object.
These can be various kinds of network addresses - IPV4, IPv6, MAC addresses, etc. as enumerated by IANA, and covered by RFC 3232. This class implements a basic API on these objects.
This file is part of the Assimilation Project.
The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see http://www.gnu.org/licenses/
Definition in file netaddr.c.
| FSTATIC gconstpointer _netaddr_addrinnetorder | ( | gsize * | addrlen | ) |