1、COVERING NOTE GENERAL SECRETARIAT INTERNATIONAL TELECOMMUNICATION UNION Geneva, 17 March 2004 ITU - TELECOMMUNICATION STAN DARD IZATION SECTOR Subject: Erratum 1 (032004) to ITU-T Recommendation 4.2 1 1 1 (1 999) Amendment 2 (2002), B-ISDN ATM adaptation layer - Service specijic connection oriented
2、protocol in a multilink and connectionless environment (SSCOPMCE) - Amendment 2: API for SSCOPMCE over Ethernet Renumber all clauses of new Annex F (API for SSCOPMCE over Ethernet) by adding “F.“ as follows: Renumber clauses: 1,2, 3,4, 5, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7 respectively into: F.l,F.2,
3、F.3,F.4,F.5,F.5.1,F.5.2,F.5.3,F.5.4,F.5.5,F.5.6,F.5.7 Union internationale des tlcommunications Place des Nations 121 1 GENVE 20 Suisse - Switzerland - Suiza INTERNATIONAL TELECOMMUNICATION UNION ITU-T TE LEC0 M M U N I CATI ON STANDARDIZATION SECTOR OF ITU Q.21 I I Amendment 2 (04/2002) SERIES Q: S
4、WITCHING AND SIGNALLING Broadband ISDN - Signalling ATM adaptation layer (SAAL) B-ISDN ATM adaptation layer - Service specific connection oriented protocol in a multilink and connectionless environment (SSCOPMCE) Amendment 2: API for SSCOPMCE over Ethernet ITU-T Recommendation Q.2111 - Amendment 2 I
5、TU-T Q-SERIES RECOMMENDATIONS SWITCHING AND SIGNALLING SIGNALLING IN THE INTERNATIONAL MANUAL SERVICE FUNCTIONS AND INFORMATION FLOWS FOR SERVICES IN THE ISDN SPECIFICATIONS OF SIGNALLING SYSTEM No. 4 SPECIFICATIONS OF SIGNALLING SYSTEM No. 5 SPECIFICATIONS OF SIGNALLING SYSTEM No. 6 SPECIFICATIONS
6、OF SIGNALLING SYSTEM R1 SPECIFICATIONS OF SIGNALLING SYSTEM R2 DIGITAL EXCHANGES INTERWORIUNG OF SIGNALLING SYSTEMS SPECIFICATIONS OF SIGNALLING SYSTEM No. 7 43 INTERFACE DIGITAL SUBSCRIBER SIGNALLING SYSTEM No. 1 PUBLIC LAND MOBILE NETWORK INTERWORIUNG WITH SATELLITE MOBILE SYSTEMS INTELLIGENT NETW
7、ORK SPECIFICATIONS OF SIGNALLING RELATED TO BEARER INDEPENDENT CALL CONTROL (BICC) INTERNATIONAL AUTOMATIC AND SEMI-AUTOMATIC WORKING CLAUSES APPLICABLE TO ITU-T STANDARD SYSTEMS SIGNALLING REQUIREMENTS AND PROTOCOLS FOR IMT-2000 Q. 14.3 4.44.59 Q.6w.99 Q.lO Assured transfer of data; Transparency of
8、 transferred information; Establishment and release of connections for assured transfer of data. Whereas the main body of the Recommendation and Annex E contain the specifications necessary to develop a product based on an Ethernet network interface card, this annex specifies an application programm
9、ing interface (API) to the SAP. The reason for specifjdng an API is to drive development tool and/or real-time operating system vendors to offer a standard, open and familiar ITU-T Rec. Q.211UAmd.2 (04/2002) 1 interface for software developers to take advantage of the network capabilities offered by
10、 an Ethernet-based databus. 2 The Ethernet Databus API is relatively small and self-contained, allowing a programmer to access SSCOPMCE services when such services operate over an Ethernet datalink layer. Two objectives were used in designing an API: Objectives of the Ethernet Databus API The API sh
11、ould be based on the notion of sockets, which has been widely used in the majority of existing network APIS for desktop and real-time operating systems. Sockets essentially treat each network connection as a stream into which bytes can be written-to or read-from, allowing them to be an extension of
12、familiar file 1/0 concepts. The API should include provisions for exception-handling in order to manage run-time errors. 3 The Ethernet Databus API is written in the Ada 95 programming language 3. The choice of Ada is based on its widespread use in aerospace and defense systems, one of the applicati
13、on areas driving the specification of Annex E/Q.2111. Consequently, an Ada-based API will permit the migration of existing system architectures toward an Ethernet-based databus. In addition, new system architectures may be based on it. Such an API will also offer a standard programming interface for
14、 use with an Ethernet-based databus. The Ada-based API defines the following types (objects): Overview of the Ethernet Databus API Implementation EtherAddress: Represents an Ethernet address. Ethersocket: capabilities of SSCOPMCE. Data is transported in one or more sequenced-data (SD) PDUs within Et
15、hernet frames. Implements a client-side socket that utilizes the assured data transfer EtherTag: Contains the attributes associated with the 802.1 tag type 22. EtherServerSocket: Implements a server-side socket that utilizes the assured data transfer capabilities of SSCOPMCE. Data is transported in
16、one or more sequenced-data (SD) PDUs within Ethernet frames. Datagram: Creates a datagram referring to an un-numbered user data (UD) PDU. Datagramsocket: Creates a socket to send or receive a datagram. MulticastSocket: Creates a multicast socket to send or receive a datagram. Data is transported in
17、one or more un-numbered user data (UD) PDUs. Multicast operation is based on the GARP Multicast Registration Protocol (GMRP) 21. The fact that only a few types are defined is based in large part to the streamlined mapping of protocol layers allowed in Annex E/Q.2111. From a definition viewpoint, the
18、se types, and the associated operations on these types, are contained in the package Ethernet Databus. A driver associated with a network interface card must be compliant with it. From an implementation viewpoint, these types are designated as private, and, like the specification of associated opera
19、tions, are outside the scope of this Recommendation. This has been done to allow flexibility in the implementation and evolution of the API. 2 ITU-T Rec. Q.2111/Amd.2 (04/2002) 4 The following is a summary of the Ethernet Databus package: Summary of Ada Package Definition package Ethernet Databus is
20、 type EtherAddress is private; type EtherAddresses is (POSITIVE range ) of BYTE; type Datagramsocket is private; type MulticastSocket is private; - EtherAddress function getAddress(addr: EtherAddress) return STRING; function getOUI(addr: EtherAddress) return STRING; function getLocal(addr: EtherAddr
21、ess) return STRING; function isGroupAddress(addr: EtherAddress) return BOOLEAN; function getLocalAddress return EtherAddress; function getLocalAddresses return EtherAddresses; - EtherTag procedure makeEtherTag(c0s: in COS TYPE) return EtherTag; procedure makeEtherTag(v1an: in VLN TYPE) return EtherT
22、ag; procedure makeEtherTag(c0s: in COS TYPE; cfi: in BOOLEAN; vlan: in VLAN-TYPE) return EtherTag; function get-cos(tag: EtherTag) return COS-TYPE; function get-cfi(tag: EtherTag) return BOOLEAN; function get-vlan(tag: EtherTag) return VLAN-TYPE; - Ethersocket function makeethersocket(host: etheradd
23、ress; port: port-type) return ethersocket; function makeEtherSocket(host: EtherAddress; tag: EtherTag; port: PORT-TYPE) return Ethersocket; port: PORT - TYPE; interface: EtherAddress; localPort: PORT-TYPE) return Ethersocket; function makeEtherSocket(host: EtherAddress; port: PORT TYPE; tag: EtherTa
24、g; interface: EtherAddress; localPort: PORT-TYPE) function makeEtherSocket(host: EtherAddress; return Ethersocket; function getEtherAddress(s0cket: Ethersocket) return EtherAddress; function getPort(socket: Ethersocket) return PORT-TYPE; function getLocalPort(socket: Ethersocket) return PORT-TYPE; I
25、TU-T Rec. Q.211UAmd.2 (04/2002) 3 4 function getlocaladdress(socket: ethersocket) return etheraddress; function getInputStream(socket: Ethersocket) return STREAMACCESS; function getOutputStream(socket: Ethersocket) return STREAMACCESS; procedure close(socket: in Ethersocket) ; - EtherServerSocket fu
26、nction makeEtherServerSocket(port: PORT-TYPE) function makeEtherServerSocket(port: PORT TYPE; return Etherserversocket; tag: EtheTTag) return Etherserversocket; queuelength: POSITIVE) return Etherserversocket; queuelength: POSITIVE; tag: EtherTag) return Etherserversocket; queuelength: POSITIVE; bin
27、dAddress: EtherAddress) return Etherserversocket; queuelength: POSITIVE; tag: EtherTag; bindAddress: EtherAddress) return Etherserversocket; function accept(socket: Etherserversocket) return Ethersocket; procedure close(socket: in Etherserversocket) ; function getEtherAddress (socket: Etherserversoc
28、ket) function getlocalPort(socket: Etherserversocket) function getTag(socket: Etherserversocket) return EtherTag; function makeEtherServerSocket(port: PORT TYPE; function makeEtherServerSocket(port: PORT TYPE; function makeEtherServerSocket(port: PORT TYPE; function makeEtherServerSocket(port: PORT
29、TYPE; return EtherAddress; return PORT-TYPE; - DATAGRAM - for receiving datagrams function makeDatagram (buffer: BYTE ARRAY; length: POSITIVE) return Datagram; offset: NATURAL; length: POSITIVE) return Datagram; function makeDatagram (buffer: BYTE ARRAY; - for sending datagrams function makeDatagram
30、 (data: BYTE ARRAY; offset: NATURAL; length: POSITIVE) return Datagram; function makeDatagram (data: BYTE ARRAY; length: POSITIVE; destination: EtherAddress; port: PORT-TYPE) return Datagram; function getAddress(d: Datagram) return EtherAddress; function getPort(d: Datagram) return PORT-TYPE; functi
31、on getData(d: Datagram) return BYTEARRAY; function getlength(d: Datagram) return POSITIVE; function getOffset(d: Datagram) return NATURAL; ITU-T Rec. Q.2111/Amd.2 (04/2002) procedure setData(d: in Datagram; procedure setData(d: in Datagram; data: in BYTEARRAY) ; data: in BYTE ARRAY; offset: in NATUR
32、AL; length: in POSITIVE); procedure setAddress(d: in Datagram; procedure setPort(d: in Datagram ; procedure setLength(d: in Datagram; remote: in EtherAddress); port: in PORT-TYPE); length: in POSITIVE); - Datagramsocket function makeDatagramSocket return Datagramsocket; function makeDatagramSocket(p
33、ort: PORT-TYPE) return Datagramsocket; tag: EtherTg) return Datagramsocket; function makeDatagramSocket(port: PORT TYPE; function makeDatagramSocket(port: PORT TYPE; address: EtherAddrss) return Datagramsocket; function makeDatagramSocket(port: PORT TYPE; tag: EtherTag; address: EtherAddress; return
34、 Datagramsocket; procedure send(socket: in Datagramsocket; procedure receive(socket: in Datagramsocket; procedure close(socket: in Datagramsocket) ; function getLocalPort(socket: Datagramsocket) return PORT-TYPE; procedure connect(socket: in Datagramsocket; d: in Datagram); d: in out Datagram); host
35、: in EtherAddress; procedure disconnect(socket: in Datagramsocket) ; function getPort(socket: Datagramsocket) return PORT-TYPE; function getEtherAddress(s0cket: Datagramsocket) function getTag(socket: Datagramsocket) return EtherTag; port: in PORT-TYPE); return EtherAddress; - MulticastSocket functi
36、on makeMulticastSocket return MulticastSocket; function makeMulticastSocket(port: PORT-TYPE) return MulticastSocket; function makeMulticastSocket(port: PORT TYPE; tag: EtherTag) return MulticastSocket; procedure joinGroup(socket: in MulticastSocket; procedure leaveGroup(socket: in MulticastSocket; p
37、rocedure setInterface(socket: in MulticastSocket; function getInterface(socket: MulticastSocket) address: in EtherAddress); address: in EtherAddress); address: in EtherAddress); return EtherAddress; procedure send(socket: in MulticastSocket; d: in Datagram); procedure receive(socket: in MulticastSoc
38、ket; procedure close(socket: in MulticastSocket); d: in out Datagram); ITU-T Rec. Q.211UAmd.2 (04/2002) 5 function getLocalPort(socket: MulticastSocket) procedure connect(socket: in MulticastSocket; return PORT-TYPE; host: in EtherAddress; port: in PORT-TYPE); procedure disconnect(socket: in Multica
39、stSocket); function getPort(socket: MulticastSocket) return PORT-TYPE; function getEtherAddress(s0cket: MulticastSocket) function getTag(socket: MulticastSocket) return EtherAddress; return EtherAddress; - Exceptions UnknownHostException: exception; IlegalArgumentException: exception; BindException:
40、 exception; IOException: exception; SocketException: exception; private - Implementation dependent end Ethernet Databus; 5 The following is a detailed description of each of the subroutines: Description of Ada Package Definition 5.1 EtherAddress Subroutines getAddress function getAddress(addr: Ether
41、Address) return STRING; Returns a fully-qualified 48-bit Ethernet address Parameters: addr - Ethernet address Returns: A single Ethernet address, as a string describing the bytes in hex notation, e.g., I 3407A4CEOOOO“. getUI function getOUI(addr: EtherAddress) return STRING; Returns the first three
42、bytes of an Ethernet address: the Organizationally Universal Identifier. Parameters: addr - Ethernet address Returns: The OUI part of the address, as a string describing the bytes in hex notation, e.g., “3407A4“. getlocal function getLocal(addr: EtherAddress) return STRING; Returns the last three by
43、tes of an Ethernet address: the locally assigned part. Parameters: addr - Ethernet address Returns: The locally assigned part of the address, as a string describing the bytes in hex notation, e.g., “CE0000“. isGroupAddress function isGroupAddress(addr: EtherAddress) return BOOLEAN; Determines whethe
44、r the Ethernet address is a group address, if the first bit of the highest order byte is zero Parameters: addr - Ethernet address Returns: True if the address is a group address, false otherwise 6 ITU-T Rec. Q.2111/Amd.2 (04/2002) getLocalAddress function getLocalAddress(addr: EtherAddress) return S
45、TRING; Returns the address associated with the local host. Parameters: addr - local Ethernet address Returns: An Ethernet address Throws: UnknownHostException if no Ethernet address for the host could be found getA11HostAddresses function getLocalAddresses return EtherAddresses; Returns an array of
46、the addresses associated with a multi-homed host Returns: An array of Ethernet addresses Throws: UnknownHostException If not Ethernet address for the host could be found 5.2 EtherTag Subroutines makeEtherTag function makeEtherTag(c0s: in COS TYPE) return EtherTag; Sets the COS field of the 802.1 tag
47、. The CAN field is set to a default value of all zeroes. The CFI field is set to a default value of zero. Parameters: cos - class of service makeEtherTag function makeEtherTag(v1an: in VLAN TYPE) return EtherTag; Sets the VLAN field of the 802.1 tag. The COS field is set to a default value of all ze
48、roes. The CFI field is set to a default value of zero. Parameters: vlan - vlan identifier makeEtherTag function makeEtherTag(c0s: in COS - TYPE; cfi: in BOOLEAN; vlan: in VLAN-TYPE) return EtherTag; Sets all the fields of the 802.1 tag. Parameters: cos - class of service cfi - canonical format ident
49、ifier vlan - virtual LAN identifier get-cos function get-cos(tag: EtherTag) return COS-TYPE; Returns the value of the COS field in the 802.1 tag. Parameters: Returns: the class of service tag - 802.1 tag get-cos function get-cfi(tag: EtherTag) return BOOLEAN; Returns the value of the CFI field in the 802.1 tag. Parameters: Returns: the canonical format identifier tag - 802.1 tag get-vlan function get-vlan(tag: EtherTag) return VLAN-TYPE; Returns the value of the VLAN field in the 802.1 tag. Parameters: tag - 802.1 tag ITU-T Rec. Q.211UAmd.2 (04/2002) 7 Returns: the vl