Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Sock_Connect.h File Reference

#include "ace/ACE_export.h"
#include "ace/Basic_Types.h"
#include "ace/os_include/netinet/os_in.h"

Include dependency graph for Sock_Connect.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph


namespace  ACE


ACE_Export int bind_port (ACE_HANDLE handle, ACE_UINT32 ip_addr=INADDR_ANY, int address_family=AF_UNSPEC)
 Bind a new unused port to handle.
ACE_Export int get_bcast_addr (ACE_UINT32 &bcast_addr, const ACE_TCHAR *hostname=0, ACE_UINT32 host_addr=0, ACE_HANDLE handle=ACE_INVALID_HANDLE)
ACE_Export int get_ip_interfaces (size_t &count, ACE_INET_Addr *&addr_array)
ACE_Export int count_interfaces (ACE_HANDLE handle, size_t &how_many)
ACE_Export ACE_HANDLE get_handle (void)
ACE_Export int ipv6_enabled (void)

Detailed Description

Sock_Connect.h,v 1.12 2005/10/28 16:14:55 ossama Exp

Priyanka Gontla <>

Based on code that existed formerly in ACE.h.

Function Documentation

ACE_UINT32  ip_addr = INADDR_ANY,
int  address_family = AF_UNSPEC

Bind a new unused port to handle.

int ACE::count_interfaces ACE_HANDLE  handle,
size_t &  how_many

Helper routine for get_ip_interfaces, differs by UNIX platform so put into own subroutine. perform some ioctls to retrieve ifconf list of ifreq structs.

int ACE::get_bcast_addr ACE_UINT32 &  bcast_addr,
const ACE_TCHAR hostname = 0,
ACE_UINT32  host_addr = 0,

Get our broadcast address based on our host_addr. If hostname is non-0 we'll use it to determine our IP address. If handle is not ACE_INVALID_HANDLE then we'll use this to determine our broadcast address, otherwise we'll have to create a socket internally (and free it). Returns -1 on failure and 0 on success.

ACE_HANDLE ACE::get_handle void   ) 

Routine to return a handle from which ioctl requests can be made. Caller must close the handle.

int ACE::get_ip_interfaces size_t &  count,
ACE_INET_Addr *&  addr_array

Return count and array of all configured IP interfaces on this host, rc = 0 on success (count == number of interfaces else -1). Caller is responsible for calling delete [] on addr_array.

int ACE::ipv6_enabled void   ) 

Returns 1 if IPv6 is enabled on the current host; 0 if not. This is an execution-time check. If ACE has not been compiled with ACE_HAS_IPV6, it always returns 0. If ACE_HAS_IPV6 is enabled, this function tries to create a PF_INET6 socket, returning 1 if it succeeds, and 0 if it fails. Caches the result so it only gets checked once.

Generated on Thu Feb 16 03:35:20 2006 for ACE by  doxygen