The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
_NetAddr Struct Reference

The NetAddr class class represents a general network address - whether IP, MAC, or any other type of address. More...

#include <netaddr.h>

Collaboration diagram for _NetAddr:

Data Fields

AssimObj baseclass
 
void(* setport )(NetAddr *, guint16)
 Set port for this NetAddr. More...
 
guint16(* port )(const NetAddr *self)
 Return port from this address. More...
 
guint16(* addrtype )(const NetAddr *self)
 Return IANA Address Family Numbers address type. More...
 
gboolean(* ismcast )(const NetAddr *self)
 Return TRUE if this address is a multicast address. More...
 
gboolean(* islocal )(const NetAddr *self)
 Return TRUE if this address is a local address. More...
 
gboolean(* isanyaddr )(const NetAddr *self)
 Return TRUE if this address is an 'ANY' address. More...
 
struct sockaddr_in6(* ipv6sockaddr )(const NetAddr *self)
 Return the ipv6 sockaddr corresponding to this address. More...
 
struct sockaddr_in(* ipv4sockaddr )(const NetAddr *self)
 Return the ipv4 sockaddr corresponding to this address. More...
 
gboolean(* equal )(const NetAddr *, const NetAddr *)
 Compare NetAddrs. More...
 
guint(* hash )(const NetAddr *)
 Compute hash of the NetAddr. More...
 
char *(* canonStr )(const NetAddr *)
 Canonical form toString. More...
 
NetAddr *(* toIPv6 )(const NetAddr *)
 Convert this NetAddr to the IPv6 equivalent It always returns a new object. More...
 
gpointer _addrbody
 private: Address body More...
 
guint16 _addrtype
 private: Address type More...
 
guint16 _addrlen
 private: Length of _addrbody More...
 
guint16 _addrport
 private: Address port (if applicable) More...
 

Detailed Description

The NetAddr class class represents a general network address - whether IP, MAC, or any other type of address.

It is a class from which we might eventually make subclasses, and is managed by our C-Class Management system.

Definition at line 43 of file netaddr.h.

Field Documentation

gpointer _NetAddr::_addrbody

private: Address body

Definition at line 58 of file netaddr.h.

Referenced by _addrframe_setnetaddr(), _netaddr_equal(), _netaddr_hash(), and ipportframe_netaddr_new().

guint16 _NetAddr::_addrlen

private: Length of _addrbody

Definition at line 60 of file netaddr.h.

Referenced by _addrframe_setnetaddr(), _netaddr_equal(), and _netaddr_hash().

guint16 _NetAddr::_addrport

private: Address port (if applicable)

Definition at line 61 of file netaddr.h.

Referenced by _netaddr_equal(), _netaddr_hash(), _netio_recvframesets(), and netaddr_new().

guint16 _NetAddr::_addrtype

private: Address type

Definition at line 59 of file netaddr.h.

Referenced by _fsprotocol_find(), _netaddr_equal(), _netaddr_hash(), and _netio_mcastjoin().

guint16(* _NetAddr::addrtype)(const NetAddr *self)
char*(* _NetAddr::canonStr)(const NetAddr *)

Canonical form toString.

Definition at line 55 of file netaddr.h.

gboolean(* _NetAddr::equal)(const NetAddr *, const NetAddr *)
guint(* _NetAddr::hash)(const NetAddr *)

Compute hash of the NetAddr.

Definition at line 54 of file netaddr.h.

Referenced by _fsprotocol_protoelem_hash().

struct sockaddr_in(* _NetAddr::ipv4sockaddr)(const NetAddr *self)

Return the ipv4 sockaddr corresponding to this address.

Definition at line 52 of file netaddr.h.

Referenced by _netio_mcastjoin().

struct sockaddr_in6(* _NetAddr::ipv6sockaddr)(const NetAddr *self)

Return the ipv6 sockaddr corresponding to this address.

Definition at line 51 of file netaddr.h.

Referenced by _netio_bindaddr(), _netio_mcastjoin(), and _netio_sendapacket().

gboolean(* _NetAddr::isanyaddr)(const NetAddr *self)

Return TRUE if this address is an 'ANY' address.

Definition at line 50 of file netaddr.h.

gboolean(* _NetAddr::islocal)(const NetAddr *self)

Return TRUE if this address is a local address.

Definition at line 49 of file netaddr.h.

Referenced by main().

gboolean(* _NetAddr::ismcast)(const NetAddr *self)

Return TRUE if this address is a multicast address.

Definition at line 48 of file netaddr.h.

Referenced by _netio_bindaddr(), _netio_mcastjoin(), and main().

guint16(* _NetAddr::port)(const NetAddr *self)

Return port from this address.

Definition at line 46 of file netaddr.h.

Referenced by _netio_bindaddr(), fakecma_startup(), ipportframe_netaddr_new(), and main().

void(* _NetAddr::setport)(NetAddr *, guint16)

Set port for this NetAddr.

Definition at line 45 of file netaddr.h.

Referenced by cma.AssimCclasses.pyNetAddr::__init__(), _ipportframe_setaddr(), and main().

NetAddr*(* _NetAddr::toIPv6)(const NetAddr *)

Convert this NetAddr to the IPv6 equivalent It always returns a new object.

Definition at line 56 of file netaddr.h.

Referenced by _arpdiscovery_dispatch(), _fsprotocol_addconn(), _fsprotocol_find(), _netio_recvframesets(), and main().


The documentation for this struct was generated from the following file: