Platform SDK: Windows Sockets |
A new address family, AF_ATM, is introduced for native ATM services, and the corresponding SOCKADDR structure, sockaddr_atm, is defined in the following. To open a socket for native ATM services, parameters in socket should contain AF_ATM, SOCK_RAW, and ATMPROTO_AAL5 or ATMPROTO_AALUSER, respectively.
struct sockaddr_atm { u_short satm_family; /* address family should be AF_ATM */ ATM_ADDRESS satm_number; /* ATM address */ ATM_BLLI satm_blli; /* B-LLI */ ATM_BHLI satm_bhli; /* B-HLI */ };
Note Satm_bhli is treated as not present if its HighLayerInfoType field contains SAP_FIELD_ABSENT, or as a wildcard if it contains SAP_FIELD_ANY.
For listening sockets, the SOCKADDR_ATM structure is used in bind/WSPBind to register a Service Access Point (SAP) to receive incoming connection requests destined to this SAP. SAP registration is used to match against the SAP specified in an incoming connection request in order to determine which listening socket is to receive this request. In the current version of this specification, overlapping registration is not allowed. Overlapping registration is defined as having more than one registered SAP to potentially match the SAP specified in any incoming connection request. Listen and WSPListen will return the error code WSAEADDRINUSE if the SAP associated with the listening socket overlaps with any currently registered SAPs in the system.
The fields in a SAP to be registered must contain either a valid value, or one of two special manifest constants: SAP_FIELD_ABSENT or SAP_FIELD_ANY.
SAP_FIELD_ABSENT simply means that this field is not presented as part of a SAP. SAP_FIELD_ANY means using wildcards.
Note that the requirement of nonoverlapping registration does not preclude using wildcards. For example, it is possible to have two registered SAPs that both contain SAP_FIELD_ANY in some fields and different values in other fields.
Note The called party ATM number is mandatory, thus the satm_number field cannot contain SAP_FIELD_ABSENT.
For connecting sockets, the SOCKADDR_ATM structure is used to specify the destination SAP in connect/WSAConnect/WSPConnect for point-to-point connections, and WSAJoinLeaf/WSPJoinLeaf for point-to-multipoint connections. The fields in the destination SAP of a connecting socket must contain either a valid value or SAP_FIELD_ABSENT, that is, SAP_FIELD_ANY is not allowed.
Furthermore, SAP_FIELD_ABSENT is not allowed for the satm_number field. The destination SAP is used to match against all the registered SAPs in the destination machine to determine the forwarding destination for this connection request. If each and every field of the destination SAP of an incoming request either equals the corresponding field of a registered SAP, or the corresponding field contains the SAP_FIELD_ANY, the listening socket associated with this registered SAP will receive the incoming connection request.
If bind and/or WSPBind are used on a connecting socket to specify the calling party ATM address, the satm_blli and satm_bhli fields should be ignored and the ones specified in connect, WSAConnect, or WSPConnect will be used.