diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
commit | 53284e215e3d3351a7d7e9c4b68f14b427fb4377 (patch) | |
tree | 97236ece363cff48fd287c780db4290da39b02cb /ace/ATM_Addr.h | |
parent | 7b7c52ad2abd228138ba1a948d5e28bf6dc3b880 (diff) | |
download | ATCD-53284e215e3d3351a7d7e9c4b68f14b427fb4377.tar.gz |
ChangeLogTag:Wed Nov 1 14:11:48 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/ATM_Addr.h')
-rw-r--r-- | ace/ATM_Addr.h | 146 |
1 files changed, 80 insertions, 66 deletions
diff --git a/ace/ATM_Addr.h b/ace/ATM_Addr.h index f36d386aed7..639d2f71e0c 100644 --- a/ace/ATM_Addr.h +++ b/ace/ATM_Addr.h @@ -1,17 +1,14 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// ATM_Addr.h -// -// = AUTHOR -// Joe Hoffert <joeh@cs.wustl.edu> -// -// ============================================================================ + +//============================================================================= +/** + * @file ATM_Addr.h + * + * $Id$ + * + * @author Joe Hoffert <joeh@cs.wustl.edu> + */ +//============================================================================= + #ifndef ACE_ATM_ADDR_H #define ACE_ATM_ADDR_H @@ -30,21 +27,26 @@ typedef ATMSAPAddress ATM_Addr; #define FORE_NAME_SPACE NS_ALL typedef struct sockaddr_atm ATM_Addr; #elif defined (ACE_HAS_LINUX_ATM) + #include "atm.h" + //pbrandao:as Linux has this 2 structs separeted we "link it" here typedef struct _linux_atm_addr { struct sockaddr_atmsvc sockaddratmsvc; - struct atm_sap atmsap; + struct atm_sap atmsap; } ATM_Addr; #else typedef int ATM_Addr; #endif /* ACE_HAS_FORE_ATM_XTI/ACE_HAS_FORE_ATM_WS2/ACE_HAS_LINUX_ATM */ +/** + * @class ACE_ATM_Addr + * + * @brief Defines the ATM domain address family address format. + */ class ACE_Export ACE_ATM_Addr : public ACE_Addr { - // = TITLE - // Defines the ATM domain address family address format. public: // Constants used for ATM options static const long LINE_RATE; @@ -53,98 +55,113 @@ public: static const int DEFAULT_SELECTOR; // = Initialization methods. + /// Default constructor. ACE_ATM_Addr (unsigned char selector = DEFAULT_SELECTOR); - // Default constructor. + /// Copy constructor. ACE_ATM_Addr (const ACE_ATM_Addr &, unsigned char selector = DEFAULT_SELECTOR); - // Copy constructor. + /** + * Creates an <ACE_ATM_Addr> from an ATMSAPAddress structure. This + * is vendor specific (FORE systems). May need to change when other + * vendors are supported. + */ ACE_ATM_Addr (const ATM_Addr *, unsigned char selector = DEFAULT_SELECTOR); - // Creates an <ACE_ATM_Addr> from an ATMSAPAddress structure. This - // is vendor specific (FORE systems). May need to change when other - // vendors are supported. + /** + * Initializes an <ACE_ATM_Addr> from the <sap> which can be + * "atm-address" (e.g., + * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" + * (e.g., "frisbee.cs.wustl.edu"). + */ ACE_ATM_Addr (const ACE_TCHAR sap[], unsigned char selector = DEFAULT_SELECTOR); - // Initializes an <ACE_ATM_Addr> from the <sap> which can be - // "atm-address" (e.g., - // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" - // (e.g., "frisbee.cs.wustl.edu"). + /// Default dtor. ~ACE_ATM_Addr (void); - // Default dtor. // = Initialization methods (useful after object construction). + /// Default initialization for non-address values (e.g., + /// t_atm_sap_addr.SVE_tag_addr, t_atm_sap_addr.SVE_tag_selector) void init (unsigned char selector = DEFAULT_SELECTOR); - // Default initialization for non-address values (e.g., - // t_atm_sap_addr.SVE_tag_addr, t_atm_sap_addr.SVE_tag_selector) + /// Initializes from another <ACE_ATM_Addr>. int set (const ACE_ATM_Addr &, unsigned char selector = DEFAULT_SELECTOR); - // Initializes from another <ACE_ATM_Addr>. + /** + * Initializes an <ACE_ATM_Addr> from an ATMSAPAddress/sockaddr_atm + * structure. This is vendor specific (FORE systems). May need to + * change when other vendors are supported. + */ int set (const ATM_Addr *, unsigned char selector = DEFAULT_SELECTOR); - // Initializes an <ACE_ATM_Addr> from an ATMSAPAddress/sockaddr_atm - // structure. This is vendor specific (FORE systems). May need to - // change when other vendors are supported. + /** + * Initializes an <ACE_ATM_Addr> from the <sap> which can be + * "atm-address" (e.g., + * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" + * (e.g., "frisbee.cs.wustl.edu"). + */ int set (const ACE_TCHAR sap[], unsigned char selector = DEFAULT_SELECTOR); - // Initializes an <ACE_ATM_Addr> from the <sap> which can be - // "atm-address" (e.g., - // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" - // (e.g., "frisbee.cs.wustl.edu"). + /** + * Initializes an <ACE_ATM_Addr> from the <sap> which can be + * "atm-address" (e.g., + * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" + * (e.g., "frisbee.cs.wustl.edu"). + */ virtual int string_to_addr (const ACE_TCHAR sap[]); - // Initializes an <ACE_ATM_Addr> from the <sap> which can be - // "atm-address" (e.g., - // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" - // (e.g., "frisbee.cs.wustl.edu"). - virtual int addr_to_string (ACE_TCHAR addr[], + /** + * Return the character representation of the ATM address (e.g., + * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") storing it in + * the <addr> (which is assumed to be <addrlen> bytes long). This + * version is reentrant. Returns -1 if the <addrlen> of the <addr> + * is too small, else 0. + */ + virtual int addr_to_string (ACE_TCHAR addr[], size_t addrlen) const; - // Return the character representation of the ATM address (e.g., - // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") storing it in - // the <addr> (which is assumed to be <addrlen> bytes long). This - // version is reentrant. Returns -1 if the <addrlen> of the <addr> - // is too small, else 0. + /** + * Return the character representation of the ATM address (e.g., + * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00"). Returns -1 + * if the <size> of the <buffer> is too small, else 0.(This version + * is non-reentrant since it returns a pointer to a static data + * area.) + */ const ACE_TCHAR *addr_to_string (void) const; - // Return the character representation of the ATM address (e.g., - // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00"). Returns -1 - // if the <size> of the <buffer> is too small, else 0.(This version - // is non-reentrant since it returns a pointer to a static data - // area.) + /// Return a pointer to the underlying network address. virtual void *get_addr (void) const; - // Return a pointer to the underlying network address. + /// Set a pointer to the address. virtual void set_addr (void *, int); - // Set a pointer to the address. + /// Return the selector for network address. unsigned char get_selector (void) const; - // Return the selector for network address. + /// Set the selector for the network address. void set_selector (unsigned char); - // Set the selector for the network address. + /** + * Compare two addresses for equality. The addresses are considered + * equal if they contain the same ATM address. Q: Is there any + * other check for equality needed for ATM? + */ int operator == (const ACE_ATM_Addr &SAP) const; - // Compare two addresses for equality. The addresses are considered - // equal if they contain the same ATM address. Q: Is there any - // other check for equality needed for ATM? + /// Compare two addresses for inequality. int operator != (const ACE_ATM_Addr &SAP) const; - // Compare two addresses for inequality. + /// Dump the state of an object. void dump (void) const; - // Dump the state of an object. - + /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. // char *construct_options (ACE_HANDLE fd, // int qos_kb, @@ -152,8 +169,6 @@ public: // long *optsize); // // Construct options for ATM connections -protected: - private: ATM_Addr atm_addr_; }; @@ -164,4 +179,3 @@ private: #include "ace/post.h" #endif /* ACE_ATM_ADDR_H */ - |