diff options
author | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-18 21:36:36 +0000 |
---|---|---|
committer | joeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-18 21:36:36 +0000 |
commit | fec76682596feddc9011ae25edaecf69977d0c70 (patch) | |
tree | f78e3d451bff1248b6d61966d7af83fe0845e223 /ace/ATM_Stream.i | |
parent | e77a278580a8905e097f21635d0f09720da609aa (diff) | |
download | ATCD-fec76682596feddc9011ae25edaecf69977d0c70.tar.gz |
Adding changes for FORE's latest NT support
Diffstat (limited to 'ace/ATM_Stream.i')
-rw-r--r-- | ace/ATM_Stream.i | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/ace/ATM_Stream.i b/ace/ATM_Stream.i index f0f42d47b6b..904934e75a5 100644 --- a/ace/ATM_Stream.i +++ b/ace/ATM_Stream.i @@ -23,13 +23,34 @@ ACE_ATM_Stream::open (ACE_ATM_Params params) #elif defined (ACE_HAS_FORE_ATM_WS2) params.set_flags( ACE_FLAG_MULTIPOINT_C_ROOT | ACE_FLAG_MULTIPOINT_D_ROOT ); - return stream_.open (params.get_type(), - params.get_protocol_family(), - params.get_protocol(), - params.get_protocol_info(), - params.get_sock_group(), - params.get_flags(), - params.get_reuse_addr()); + int retval = stream_.open (params.get_type(), + params.get_protocol_family(), + params.get_protocol(), + params.get_protocol_info(), + params.get_sock_group(), + params.get_flags(), + params.get_reuse_addr()); + if (retval == -1) + return -1; + + struct sockaddr_atm sock_addr; + + ACE_OS::memset(&sock_addr, 0, sizeof(struct sockaddr_atm)); + sock_addr.satm_family = AF_ATM; + sock_addr.satm_number.AddressType=ADDR_ANY; + sock_addr.satm_number.NumofDigits = ATM_ADDR_SIZE; + sock_addr.satm_blli.Layer2Protocol = SAP_FIELD_ABSENT; + sock_addr.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT; + sock_addr.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT; + if (ACE_OS::bind(get_handle(), + (struct sockaddr FAR *)&sock_addr, + sizeof(struct sockaddr_atm)) < 0) + { + ACE_OS::printf("Error binding local address: %d",WSAGetLastError()); + return -1; + } + + return 0; #else ACE_UNUSED_ARG(params); return 0; @@ -48,18 +69,6 @@ ACE_ATM_Stream::close (void) #endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */ } -//ACE_INLINE -//ACE_HANDLE -//ACE_ATM_Stream::get_handle (void) const -//{ -// ACE_TRACE ("ACE_ATM_Stream::get_handle"); -//#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) -// return ((ACE_SOCK_Stream)stream_).get_handle (); -//#else -// return 0; -//#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */ -//} - ACE_INLINE ATM_Stream& ACE_ATM_Stream::get_stream (void) |