## NAME

ACE_ATM_Addr - Defines the ATM domain address family address format.

## SYNOPSIS

    #include <ace/ATM_Addr.h>

    class ACE_ATM_Addr : public ACE_Addr
    {
      public:
        static const long LINE_RATE;
        static const int OPT_FLAGS_CPID;
        static const int OPT_FLAGS_PMP;
        static const int DEFAULT_SELECTOR;
        ACE_ATM_Addr (unsigned char selector = DEFAULT_SELECTOR);
        ACE_ATM_Addr (
            const ACE_ATM_Addr &,
            unsigned char selector = DEFAULT_SELECTOR
            );
        ACE_ATM_Addr (
            const ATMSAPAddress *,
            unsigned char selector = DEFAULT_SELECTOR
            );
        ACE_ATM_Addr (
            const ASYS_TCHAR sap[],
            unsigned char selector = DEFAULT_SELECTOR
            );
        ~ACE_ATM_Addr (void);
        void init (unsigned char selector = DEFAULT_SELECTOR);
        int set (
            const ACE_ATM_Addr &,
            unsigned char selector = DEFAULT_SELECTOR
            );
        int set (
            const ATMSAPAddress *,
            unsigned char selector = DEFAULT_SELECTOR
            );
        int set (
            const ASYS_TCHAR sap[],
            unsigned char selector = DEFAULT_SELECTOR
            );
        virtual int string_to_addr (const ASYS_TCHAR sap[]);
        virtual int addr_to_string (
            ASYS_TCHAR addr[],
            size_t addrlen
            ) const;
        const ASYS_TCHAR *addr_to_string (void) const;
        virtual void *get_addr (void) const;
        virtual void set_addr (void *, int);
        unsigned char get_selector (void) const;
        void set_selector (unsigned char);
        int operator == (const ACE_ATM_Addr &SAP) const;
        int operator != (const ACE_ATM_Addr &SAP) const;
        void dump (void) const;
        ACE_ALLOC_HOOK_DECLARE;
        static char *construct_options (
            ACE_HANDLE fd,
            int qos_kb,
            int flags,
            long *optsize
            );
      protected:
        static int get_local_address (ACE_HANDLE handle, u_char addr[]);
      private:
        ATMSAPAddress atm_addr_;
    };

## Initialization methods.

    ACE_ATM_Addr (unsigned char selector = DEFAULT_SELECTOR);

Default constructor.

    ACE_ATM_Addr (
        const ACE_ATM_Addr &,
        unsigned char selector = DEFAULT_SELECTOR
        );

Copy constructor.

    ACE_ATM_Addr (
        const ATMSAPAddress *,
        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.

    ACE_ATM_Addr (
        const ASYS_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").

    ~ACE_ATM_Addr (void);

Default dtor.

## Initialization methods (useful after object construction).

    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)

    int set (
        const ACE_ATM_Addr &,
        unsigned char selector = DEFAULT_SELECTOR
        );

Initializes from another `ACE_ATM_Addr`.

    int set (
        const ATMSAPAddress *,
        unsigned char selector = DEFAULT_SELECTOR
        );

Initializes an `ACE_ATM_Addr` from an ATMSAPAddress structure. This is vendor specific (FORE systems). May need to change when other vendors are supported.

    int set (
        const ASYS_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").

    virtual int string_to_addr (const ASYS_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 (ASYS_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.

    const ASYS_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.)

    virtual void *get_addr (void) const;

Return a pointer to the underlying network address.

    virtual void set_addr (void *, int);

Set a pointer to the address.

    unsigned char get_selector (void) const;

Return the selector for network address.

    void set_selector (unsigned char);

Set the selector for the network address.

    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?

    int operator != (const ACE_ATM_Addr &SAP) const;

Compare two addresses for inequality.

    void dump (void) const;

Dump the state of an object.

    ACE_ALLOC_HOOK_DECLARE;

Declare the dynamic allocation hooks.

    static char *construct_options (
        ACE_HANDLE fd,
        int qos_kb,
        int flags,
        long *optsize
        );

Construct options for ATM connections

## AUTHOR

Joe Hoffert `joeh@cs.wustl.edu`

## LIBRARY

ace