H323TransportUDP Class Reference

#include <transports.h>

Inheritance diagram for H323TransportUDP:

H323TransportIP H323Transport List of all members.

Public Member Functions

 H323TransportUDP (H323EndPoint &endpoint, PIPSocket::Address binding=PIPSocket::GetDefaultIpAny(), WORD localPort=0, WORD remotePort=0)
 ~H323TransportUDP ()
virtual BOOL SetRemoteAddress (const H323TransportAddress &address)
virtual BOOL Connect ()
virtual void SetPromiscuous (PromisciousModes promiscuous)
virtual H323TransportAddress GetLastReceivedAddress () const
virtual BOOL ReadPDU (PBYTEArray &pdu)
BOOL ExtractPDU (const PBYTEArray &pdu, PINDEX &len)
virtual BOOL WritePDU (const PBYTEArray &pdu)
virtual BOOL DiscoverGatekeeper (H323Gatekeeper &gk, H323RasPDU &pdu, const H323TransportAddress &address)
virtual H323TransportAddress GetLocalAddress () const

Protected Attributes

PromisciousModes promiscuousReads
H323TransportAddress lastReceivedAddress
PIPSocket::Address lastReceivedInterface
WORD interfacePort

Detailed Description

This class represents a particular H323 transport using UDP/IP.

Definition at line 900 of file transports.h.


Constructor & Destructor Documentation

H323TransportUDP::H323TransportUDP ( H323EndPoint endpoint,
PIPSocket::Address  binding = PIPSocket::GetDefaultIpAny(),
WORD  localPort = 0,
WORD  remotePort = 0 
)

Create a new transport channel.

Parameters:
endpoint  H323 End Point object
binding  Local interface to listen on
localPort  Local port to listen on
remotePort  Remote port to connect on

Definition at line 1947 of file transports.cxx.

References H323Transport::AcceptFromRemoteOnly, H323Transport::canGetInterface, H225_RAS::DefaultRasUdpPort, interfacePort, promiscuousReads, and H323TransportIP::remotePort.


Member Function Documentation

BOOL H323TransportUDP::SetRemoteAddress ( const H323TransportAddress address  )  [virtual]

Set default remote address to connect to. Note that this does not necessarily initiate a transport level connection, but only indicates where to connect to. The actual connection is made by the Connect() function.

Implements H323Transport.

Definition at line 1978 of file transports.cxx.

References H323TransportAddress::GetIpAndPort(), H323TransportIP::remoteAddress, and H323TransportIP::remotePort.

BOOL H323TransportUDP::Connect (  )  [virtual]

Connect to the remote party.

Implements H323Transport.

Definition at line 1984 of file transports.cxx.

References H323Transport::endpoint, H323TransportIP::localAddress, H323TransportIP::remoteAddress, and H323TransportIP::remotePort.

Referenced by DiscoverGatekeeper().

void H323TransportUDP::SetPromiscuous ( PromisciousModes  promiscuous  )  [virtual]

Set read to promiscuous mode. Normally only reads from the specifed remote address are accepted. This flag allows packets to be accepted from any remote, provided the underlying protocol can do so.

The Read() call may optionally set the remote address automatically to whatever the sender host of the last received message was.

Default behaviour sets the internal flag, so that Read() operates as described.

Reimplemented from H323Transport.

Definition at line 2011 of file transports.cxx.

References promiscuousReads.

H323TransportAddress H323TransportUDP::GetLastReceivedAddress (  )  const [virtual]

Get the transport address of the last received PDU.

Default behaviour returns the lastReceivedAddress member variable.

Reimplemented from H323Transport.

Definition at line 2017 of file transports.cxx.

References H323Transport::GetLastReceivedAddress(), and lastReceivedAddress.

BOOL H323TransportUDP::ReadPDU ( PBYTEArray &  pdu  )  [virtual]

Read a protocol data unit from the transport. This will read using the transports mechanism for PDU boundaries, for example UDP is a single Read() call, while for TCP there is a TPKT header that indicates the size of the PDU.

Parameters:
pdu  PDU read from transport

Implements H323Transport.

Definition at line 2030 of file transports.cxx.

References H323Transport::AcceptFromAnyAutoSet, H323Transport::AcceptFromLastReceivedOnly, H323Transport::AcceptFromRemoteOnly, H323Transport::canGetInterface, H323TransportAddress::GetIpAndPort(), lastReceivedAddress, lastReceivedInterface, promiscuousReads, H323TransportIP::remoteAddress, and H323TransportIP::remotePort.

BOOL H323TransportUDP::ExtractPDU ( const PBYTEArray &  pdu,
PINDEX &  len 
) [virtual]

Extract a protocol data unit from the transport

Implements H323Transport.

Definition at line 2025 of file transports.cxx.

BOOL H323TransportUDP::WritePDU ( const PBYTEArray &  pdu  )  [virtual]

Write a protocol data unit from the transport. This will write using the transports mechanism for PDU boundaries, for example UDP is a single Write() call, while for TCP there is a TPKT header that indicates the size of the PDU.

Parameters:
pdu  PDU to write

Implements H323Transport.

Definition at line 2084 of file transports.cxx.

BOOL H323TransportUDP::DiscoverGatekeeper ( H323Gatekeeper gk,
H323RasPDU pdu,
const H323TransportAddress address 
) [virtual]

Discover a Gatekeeper on the local network. This locates a gatekeeper on the network and associates this transport object with packet exchange with that gatekeeper. This broadcasts a UDP packet on the local network to find the gatekeeper's IP address.

Parameters:
gk  Gatekeeper to set on discovery.
pdu  GatekeeperRequest PDU
address  Address of gatekeeper (if present)

Reimplemented from H323Transport.

Definition at line 2090 of file transports.cxx.

References H323Transport::AcceptFromAnyAutoSet, H323Transport::AcceptFromRemoteOnly, Connect(), H225_RAS::DefaultRasMulticastPort, H225_RAS::DefaultRasUdpPort, H323Transport::endpoint, H323EndPoint::GetGatekeeperRequestTimeout(), H323TransportAddress::GetIpAndPort(), H225_RAS::HandleTransaction(), H323EndPoint::InternalTranslateTCPAddress(), H323Gatekeeper::IsDiscoveryComplete(), H323TransportIP::localAddress, H225_GatekeeperRequest::m_rasAddress, promiscuousReads, H323TransactionPDU::Read(), H323TransportIP::remoteAddress, H323TransportIP::remotePort, H323TransportIP::SetUpTransportPDU(), H323EndPoint::TranslateTCPPort(), and H323TransactionPDU::Write().

H323TransportAddress H323TransportUDP::GetLocalAddress (  )  const [virtual]

Get the transport address of the local endpoint.

Reimplemented from H323TransportIP.

Definition at line 2318 of file transports.cxx.

References H323Transport::canGetInterface, H323TransportAddress::GetIpAddress(), H323TransportAddress::GetIpAndPort(), H323TransportIP::GetLocalAddress(), interfacePort, lastReceivedAddress, and lastReceivedInterface.


The documentation for this class was generated from the following files:
Generated on Thu Oct 25 13:45:34 2007 for h323plus by  doxygen 1.5.2