|
The Assimilation Monitoring Project
|
(Abstract) NetIO objects are able to perform network writes and reads. More...
|
Modules | |
| NetIOudp class | |
| A NetIOudp object performs network writes and reads on UDP sockets. | |
Functions | |
| FSTATIC gint | _netio_getfd (const NetIO *self) |
| Member function to return the file descriptor underlying this NetIO object. More... | |
| FSTATIC void | _netio_setblockio (const NetIO *self, gboolean blocking) |
| Member function to set blocking/non-blocking mode on our sockets. More... | |
| FSTATIC gboolean | _netio_mcastjoin (NetIO *self, const NetAddr *src, const NetAddr *localaddr) |
| Set up a NetIO object to listen to (join) a particular multicast group. More... | |
| FSTATIC gboolean | _netio_setmcast_ttl (NetIO *self,guint8 ttlin) |
| Set up the multicast TTL for this NetIO object. More... | |
| FSTATIC gboolean | _netio_input_queued (const NetIO *self) |
| Member function that returns TRUE if input is ready to be read. More... | |
| FSTATIC gboolean | _netio_bindaddr (NetIO *self,const NetAddr *src,gboolean silent) |
| Member function to bind this NewIO object to a NetAddr address. More... | |
| FSTATIC NetAddr * | _netio_boundaddr (const NetIO *self) |
| Member function to return the bound NetAddr (with port) of this NetIO object. More... | |
| FSTATIC void | _netio_finalize (AssimObj *aself) |
| Member function to free this NetIO object. More... | |
| FSTATIC gsize | _netio_getmaxpktsize (const NetIO *self) |
| Get the max packet size for this NetIO transport. More... | |
| FSTATIC gsize | _netio_setmaxpktsize (NetIO *self,gsize maxpktsize) |
| Set the max packet size for this NetIO transport. More... | |
| FSTATIC Frame * | _netio_compressframe (NetIO *self) |
| FSTATIC Frame * | _netio_cryptframe (NetIO *self) |
| FSTATIC SignFrame * | _netio_signframe (NetIO *self) |
| NetIO * | netio_new (gsize objsize, ConfigContext *config, PacketDecoder *decoder) |
| NetIO constructor. More... | |
| FSTATIC void | _netio_sendapacket (NetIO *self,gconstpointer packet,gconstpointer pktend,const NetAddr *destaddr) |
| NetIO internal function to send a packet (datagram) More... | |
| FSTATIC void | _netio_sendframesets (NetIO *self,const NetAddr *destaddr,GSList *framesets) |
| NetIO member function to send a GSList of FrameSets. More... | |
| FSTATIC void | _netio_sendaframeset (NetIO *self, const NetAddr *destaddr, FrameSet *frameset) |
| FSTATIC gpointer | _netio_recvapacket (NetIO *self,gpointer *pktend,struct sockaddr_in6 *srcaddr, socklen_t *addrlen) |
| Internal function to receive a packet from our NetIO object General method: More... | |
| FSTATIC GSList * | _netio_recvframesets (NetIO *self,NetAddr **src) |
| Member function to receive a collection of FrameSets (GSList*) out of our NetIO object. More... | |
| FSTATIC void | _netio_setpktloss (NetIO *self, double rcvloss, double xmitloss) |
| Set the desired level of packet loss - doesn't take effect from this call alone. More... | |
| FSTATIC void | _netio_enablepktloss (NetIO *self, gboolean enable) |
| Enable (or disable) packet loss as requested. More... | |
| gboolean | netio_is_dual_ipv4v6_stack (void) |
| FSTATIC gboolean | _netio_sendareliablefs (NetIO *self, NetAddr *dest, guint16 queueid, FrameSet *frameset) |
| FSTATIC gboolean | _netio_sendreliablefs (NetIO *self, NetAddr *dest, guint16 queueid, GSList *fslist) |
| FSTATIC gboolean | _netio_ackmessage (NetIO *self, NetAddr *dest, FrameSet *frameset) |
| FSTATIC gboolean | _netio_supportsreliable (NetIO *self) |
| FSTATIC void | _netio_closeconn (NetIO *self, guint16 qid, const NetAddr *destaddr) |
| FSTATIC void | _netio_netaddr_destroy (gpointer addrptr) |
| g_hash_table destructor for a NetAddr More... | |
| FSTATIC void | _netio_addalias (NetIO *self, NetAddr *fromaddr, NetAddr *toaddr) |
| Add an alias to our alias table. More... | |
| typedef struct _NetIOstats | NetIOstats |
| typedef struct _NetIO | NetIO |
(Abstract) NetIO objects are able to perform network writes and reads.
It is a class from which we must make subclasses, and is managed by our C-Class Management system.
| typedef struct _NetIOstats NetIOstats |
Definition at line 769 of file netio.c.
References __FUNCTION__.
Referenced by netio_new().

Add an alias to our alias table.
| self | Us |
| fromaddr | Address to map from |
| toaddr | Address to map the from address to |
Definition at line 797 of file netio.c.
References _NetAddr::baseclass, DUMP3, and REF.
Referenced by netio_new().

Member function to bind this NewIO object to a NetAddr address.
| [in,out] | self | The object being bound |
| [in] | src | The address to bind it to |
| [in] | silent | TRUE if no message on error |
Definition at line 253 of file netio.c.
References __FUNCTION__, ADDR_FAMILY_IPV4, ADDR_FAMILY_IPV6, _NetAddr::addrtype, _NetAddr::ipv6sockaddr, _NetAddr::ismcast, _NetAddr::port, and cma.cma::rc.
Referenced by netio_new().

Member function to return the bound NetAddr (with port) of this NetIO object.
| [in] | self | The object being examined |
Definition at line 283 of file netio.c.
References __FUNCTION__, and netaddr_sockaddr_new().
Referenced by netio_new().


Definition at line 782 of file netio.c.
Referenced by netio_new().

Definition at line 350 of file netio.c.
Referenced by netio_new().

Definition at line 355 of file netio.c.
Referenced by netio_new().

Enable (or disable) packet loss as requested.
Definition at line 678 of file netio.c.
Referenced by netio_new().

Member function to free this NetIO object.
| [in,out] | aself | The object being freed |
Definition at line 305 of file netio.c.
References _assimobj_finalize(), CASTTOCLASS, UNREF, and UNREF2.
Referenced by netio_new().


Member function to return the file descriptor underlying this NetIO object.
| [in] | self | The object whose file descriptor is being returned |
Definition at line 91 of file netio.c.
Referenced by netio_new().

Get the max packet size for this NetIO transport.
| [in] | self | The object whose max pkt size is being returned |
Definition at line 336 of file netio.c.
Referenced by netio_new().

Member function that returns TRUE if input is ready to be read.
| [in] | self | The NetIO object being queried |
Definition at line 245 of file netio.c.
Referenced by netio_new().

Set up a NetIO object to listen to (join) a particular multicast group.
Definition at line 127 of file netio.c.
References __FUNCTION__, _NetAddr::_addrtype, ADDR_FAMILY_IPV4, ADDR_FAMILY_IPV6, _NetAddr::addrtype, _NetAddr::ipv4sockaddr, _NetAddr::ipv6sockaddr, _NetAddr::ismcast, cma.cma::rc, and UNREF.
Referenced by netio_new().

| FSTATIC void _netio_netaddr_destroy | ( | gpointer | addrptr | ) |
g_hash_table destructor for a NetAddr
Definition at line 789 of file netio.c.
References CASTTOCLASS, and UNREF.
Referenced by netio_new().

| FSTATIC gpointer _netio_recvapacket | ( | NetIO * | self, |
| gpointer * | pktend, | ||
| struct sockaddr_in6 * | srcaddr, | ||
| socklen_t * | addrlen | ||
| ) |
Internal function to receive a packet from our NetIO object General method:
| [in,out] | self | Transport to receive packet from |
| [out] | pktend | Pointer to one past end of packet |
| [out] | srcaddr | Pointer to source address as sockaddr |
| [out] | addrlen | length of address in 'srcaddr' |
Definition at line 544 of file netio.c.
References __FUNCTION__, CONST_IPV6_IPV4SPACE, CONST_IPV6_IPV4START, DEBUGMSG3, FREE, and MALLOC.
Referenced by _netio_recvframesets().

Member function to receive a collection of FrameSets (GSList*) out of our NetIO object.
| [in,out] | self | NetIO routine to receive a set of FrameSets from a single address. |
| [out] | src | constructed source address for FrameSets |
Definition at line 629 of file netio.c.
References _NetAddr::_addrport, _netio_recvapacket(), FREE, netaddr_sockaddr_new(), _NetAddr::toIPv6, and UNREF.
Referenced by netio_new().


| [in,out] | self | The NetIO object doing the sending |
| [in] | destaddr | Where to send the FrameSets |
| [in] | frameset | The framesets being sent |
Definition at line 510 of file netio.c.
References __FUNCTION__, _netio_sendapacket(), DEBUGMSG3, frameset_construct_packet(), _FrameSet::packet, _FrameSet::pktend, and REF.
Referenced by netio_new().


| FSTATIC void _netio_sendapacket | ( | NetIO * | self, |
| gconstpointer | packet, | ||
| gconstpointer | pktend, | ||
| const NetAddr * | destaddr | ||
| ) |
NetIO internal function to send a packet (datagram)
| [in] | self | Object doing the sending |
| [in] | packet | Packet to send |
| [in] | pktend | one byte past end of packet |
| [in] | destaddr | where to send it |
Definition at line 429 of file netio.c.
References __FUNCTION__, _NetAddr::baseclass, DEBUGMSG3, _NetAddr::ipv6sockaddr, cma.cma::rc, and _AssimObj::toString.
Referenced by _netio_sendaframeset(), and _netio_sendframesets().

| FSTATIC gboolean _netio_sendareliablefs | ( | NetIO * | self, |
| NetAddr * | dest, | ||
| guint16 | queueid, | ||
| FrameSet * | frameset | ||
| ) |
Definition at line 755 of file netio.c.
Referenced by netio_new().

NetIO member function to send a GSList of FrameSets.
| [in,out] | self | The NetIO object doing the sending |
| [in] | destaddr | Where to send the FrameSets |
| [in] | framesets | The framesets being sent |
Definition at line 479 of file netio.c.
References _netio_sendapacket(), CASTTOCLASS, frameset_construct_packet(), _FrameSet::packet, _FrameSet::pktend, and REF.
Referenced by netio_new().


| FSTATIC gboolean _netio_sendreliablefs | ( | NetIO * | self, |
| NetAddr * | dest, | ||
| guint16 | queueid, | ||
| GSList * | fslist | ||
| ) |
Definition at line 762 of file netio.c.
Referenced by netio_new().

Member function to set blocking/non-blocking mode on our sockets.
Definition at line 100 of file netio.c.
References __FUNCTION__.
Referenced by netio_new().

Set the max packet size for this NetIO transport.
| [in,out] | self | The object whose max packet size to set |
| [in] | maxpktsize | Size to set the max packet size to. |
Definition at line 343 of file netio.c.
Referenced by netio_new().

| gboolean _netio_setmcast_ttl | ( | NetIO * | self, |
| guint8 | ttlin | ||
| ) |
Set up the multicast TTL for this NetIO object.
| [in,out] | self | netIO object to set the TTL of |
| [in] | ttlin | multicast TTL TTL Scope 0 Restricted to the same host. Won't be output by any interface. 1 Restricted to the same subnet. Won't be forwarded by a router. <32 Restricted to the same site, organization or department. <64 Restricted to the same region. <128 Restricted to the same continent. <255 Unrestricted in scope. Global. |
Definition at line 229 of file netio.c.
Referenced by netio_new().

Set the desired level of packet loss - doesn't take effect from this call alone.
Definition at line 670 of file netio.c.
Referenced by netio_new().

Definition at line 361 of file netio.c.
Referenced by netio_new().

Definition at line 776 of file netio.c.
Referenced by netio_new().

| gboolean netio_is_dual_ipv4v6_stack | ( | void | ) |
| NetIO* netio_new | ( | gsize | objsize, |
| ConfigContext * | config, | ||
| PacketDecoder * | decoder | ||
| ) |
NetIO constructor.
Don't call directly! - this is an abstract class...
| [in] | objsize | The size of the object to construct (or zero) |
| [in] | config | Configuration Information |
| [in] | decoder | Packet decoder |
Definition at line 368 of file netio.c.
References _NetIO::_compressframe, _NetIO::_configinfo, _NetIO::_cryptframe, _NetIO::_decoder, _AssimObj::_finalize, _NetIO::_maxpktsize, _netio_ackmessage(), _netio_addalias(), _netio_bindaddr(), _netio_boundaddr(), _netio_closeconn(), _netio_compressframe(), _netio_cryptframe(), _netio_enablepktloss(), _netio_finalize(), _netio_getfd(), _netio_getmaxpktsize(), _netio_input_queued(), _netio_mcastjoin(), _netio_netaddr_destroy(), _netio_recvframesets(), _netio_sendaframeset(), _netio_sendareliablefs(), _netio_sendframesets(), _netio_sendreliablefs(), _netio_setblockio(), _netio_setmaxpktsize(), _netio_setmcast_ttl(), _netio_setpktloss(), _netio_signframe(), _netio_supportsreliable(), _NetIO::_signframe, _NetIO::ackmessage(), _NetIO::addalias, _NetIO::aliases, assimobj_new(), _NetIO::baseclass, _NetIO::bindaddr(), BINDDEBUG, _NetIO::boundaddr, CASTTOCLASS, _NetIO::closeconn(), _NetIO::compressframe(), cma.cma::config, CONFIGNAME_COMPRESS, CONFIGNAME_CRYPT, CONFIGNAME_OUTSIG, _NetIO::cryptframe(), _NetIO::enablepktloss(), cma.frameinfo::f, _NetIO::getfd(), _ConfigContext::getframe, _NetIO::getmaxpktsize(), _NetIO::input_queued(), _NetIO::mcastjoin(), netaddr_g_hash_equal(), netaddr_g_hash_hash(), NEWSUBCLASS, _NetIO::outputpending(), _NetIO::recvframesets(), REF, _NetIO::sendaframeset(), _NetIO::sendareliablefs(), _NetIO::sendframesets(), _NetIO::sendreliablefs(), _NetIO::setblockio(), _NetIO::setmaxpktsize(), _NetIO::setmcast_ttl(), _NetIO::setpktloss(), _NetIO::signframe(), _NetIO::stats, and _NetIO::supportsreliable().
Referenced by cma.AssimCclasses.pyNetIO::__init__(), and netioudp_new().

