Re: [Opalvoip-devel] in_addr H225TransportAddress
Brought to you by:
csoutheren,
rjongbloed
From: Craig S. <cr...@po...> - 2011-03-31 11:32:03
|
On 31/03/2011 8:04 PM, Maximilian Michel wrote: > Dear all, > > is there a proposed way how to get the IP address from an TransportAddress to a in_addr struct? The best way to find things like this is to look for usages of the ASN structure in Opal. For instance, this function in transaddr.cxx shows how to extra the information fromH225_TransportAddress: H323TransportAddress::H323TransportAddress(const H225_TransportAddress & transport, const char * proto) { switch (transport.GetTag()) { case H225_TransportAddress::e_ipAddress : { const H225_TransportAddress_ipAddress & ip = transport; *this = BuildIP(PIPSocket::Address(ip.m_ip.GetSize(), ip.m_ip.GetValue()), ip.m_port, proto); break; } #if OPAL_PTLIB_IPV6 case H225_TransportAddress::e_ip6Address : { const H225_TransportAddress_ip6Address & ip = transport; *this = BuildIP(PIPSocket::Address(ip.m_ip.GetSize(), ip.m_ip.GetValue()), ip.m_port, proto); break; } #endif } SetInternalTransport(0, NULL); } -- ----------------------------------------------------------------------- Craig Southeren Post Increment – VoIP Consulting and Software cr...@po... www.postincrement.com.au Phone: +61 243654666 ICQ: #86852844 Fax: +61 243656905 MSN: cra...@ho... Mobile: +61 417231046 Jabber: cr...@ja... "Science is the poetry of reality." Richard Dawkins |