ETHERNET Basic Software Programmer Guide¶
ND-60.197.01 - Norsk Data. Product 210582A, approx. February 1985, 102 pages.
OCR TEXT - VERBATIM IMPORT. This is the raw OCR of the scanned manual, imported unedited so that nothing is silently altered. Expect OCR artefacts: mangled table rules, dropped/!-for-1 substitutions, broken column alignment, and figures rendered as scattered fragments. For any table, bit assignment, address layout or numeric value, read the source PDF page rather than trusting this text. PDF page number = document page number + 11.
Source scan:
F:\NDDOC\ND\60\ND-60197-01-EN ETHERNET Basic Software Programmers Guide.pdf(also mirrored atE:\Dev\Ronny\mirror-sintran-com\mirror\library\libsw\ND-60197-01-EN.pdf, byte-identical, 4,278,595 bytes). Source OCR:F:\NDDOC\txt\60\txt\ND-60197-01-EN ETHERNET Basic Software Programmers Guide.txtImported: 2026-07-26.
Why this manual matters¶
It is the programmer-level specification of the host <-> Ethernet controller interface - the layer our reverse engineering of the ENCOS 68000 firmware reconstructs from bytes. Key content:
- Section 2.4, document page 11 - the four-address scheme. "The ND Ethernet hardware does not
check the two last bits in the destination address of an incoming frame. This means that each
Ethernet Interface has in fact four physical addresses. This has been done in order to make it
possible to support multiple link level protocols simultaneously, using the same hardware."
Bits 7-6 of MAC byte 5:
00IEEE protocols,01DIX protocols,10User written protocols,11ND protocols (COSMOS Ethernet Option). Address string is08:00:26 | sysno-low | sysno-high | <user><000000>. - Section 2.2 - "Datagram: The datagram contains the function field (DIX), or the length field (IEEE)." Both framings are supported at the API level.
- Chapter 3, Media Access Process - the driver's three Service Points: Command, Receive, Transmit. These correspond to the command ring, receive-buffer pool and transmit list carved out of the ENCOS firmware.
- Chapters 5 and 6 - the call/routine interface: Send Datagram, Declare a User Buffer for Receive, Attach/Detach to Server, Get Server Statistics, Define/Remove Multicast Address, ND system number <-> 48-bit address conversion, plus the buffer/timeout/event/statistics descriptors and status codes.
- Max datagram 1502 bytes ("as defined in DIX 2.0, or the maximum XMSG message size, minus 18 bytes used for communication between the server in PIOC and the interface on the ND-100").
IMPORTANT SCOPE CAVEAT¶
This manual describes the two-board Ethernet I Interface, not the one-board ND 110063 Ethernet II controller. Document page 3: "The ND Ethernet Interface consists of two boards on the ND-100 bus. The physical level functions are taken care of by the Ethernet Controller card. The Link Level functions are implemented as processes running in the MC 68000 based Ethernet Master." Product sheet ND0106 calls ND 110063 the "Ethernet-II controller (1-board version)".
The generations share architecture and vocabulary, but do not assume a detail carries over. One
known divergence: the ENCOS firmware on the Ethernet II card compares all six destination MAC bytes
exactly (RCVCOMPLETE at 0x5D7E), which would defeat the four-address scheme described here. Whether
Ethernet II retained it is unresolved.
Related in this repository¶
- Devices/ND-12.055.1 EN Ethernet II Controller.md -
the one-board ND 110063 hardware manual; its Appendix C tabulates the COSMOS stack as
LLC1 / MACand the ARPA stack asLLC1 / DIX - ../SINTRAN/XMSG/DOC/COSMOS-RE/ETHERNET-II-FEASIBILITY-AND-MODE-WORD-RE-2026-07-25.md - the firmware reverse engineering of the 0x1888A framing mode word
- ../SINTRAN/XMSG/DOC/COSMOS-RE/HOW-ND-SHIPPED-TCPIP-PRODUCT-EVIDENCE-2026-07-26.md - how ND actually shipped TCP/IP
- Referenced by this manual but not yet in this repository: ND-60.161.02 PIOC Software Description - the layer beneath, likely the full service-point and message-format spec.
Norsk Data ETHERNET Basic Software Programmer Guide
ND -60.197.01
This manual is in loose-leaf form for ease of updating. Old pages may be removed and new pages easily inserted if the manual is revised.
The loose-leaf form also allows you to place the manual! in a ring binder {A) for greater protection and convenience of use. Ring binders with 4 rings corresponding to the holes in the manual may be ordered in two widths, 30 mm and 40 mm. Use the order form below.
The manual may also be placed in a plastic cover (B). This cover is more suitable for manuals of less than 100 pages than for large manuals. Plastic covers may also be ordered below.
i NORSK OATA AS NORSK DATA AS
+ Si he, Fa
> Bay #8 “HE
A: Ring Binder B: Plastic Cover
Please send your order to the local ND office or (in Norway) to:
Norsk Data A.S Graphic Center P.O. Box 25, Bogerud 0621 Oslo 6, Norway
ORDER FORM | would like to order
_ Ring Binders, 30 mm, at nkr 20,- per binder
boven Ring Binders, 40 mm, at nkr 25,- per binder
veeeee Plastic Covers at nkr 10,- per cover
COMPADY cece cc cne ee eee e ee eee cc bese ecaete eee epe ecu ete eesceuepereresetersttteveceteeenveneeenieigerseesaees
AGr€SS ooocccececccccccccecnseceecee te ceceveecesnssecegegenenecaeeceseseres seen teuueresetstsseeae teeter nenteeQutteteegs PRINTING RECORD Printing Notes 02/85 VERSION 01
ETHERNET Basic Software Programmer Guide
Publ.No. ND-60.197.01
February 1985
eee vee
Norsk Data A.S
oq »e o4 »@ 660 eee prgphie oer d .QO.Box 25, Bogeru Norsk Data 0621 Oslo 6, Norway iv
Manuals can be updated in two ways, new versions and revisions. New versions consist of a complete new manual which replaces the old manual. New versions Incorporate all revisions since the previous version. Revisions consist of one or more single pages to be merged into the manual by the user, each revised page being Hsted on the new printing racord sent out with the revision. The old printing record should be replaced by the new one.
New versions and revisions are announced in the Customer Support information {CSi} and can be ordered as described below.
The reader's comments form at the back of this manual can be used both to report errors in the manual and to give an evaluation of the manual. Both detailed and general comments are welcome.
These forms and comments should be sent to:
Documentation Department Norsk Data ALS P.O. Box 25, Bogerud 0621 Osio 6, Norway
Requests for documentation should be sent to the local ND office ar {in Norway} to:
Graphic Center Norsk Data A.S P.O. Box 25, Bogerud 0621 Oslo 6, Narway Preface:
THE PRODUCT
This manual describes the product: ND 10852.
THE READER
The manual iS intended for system programmers. It should also be of use to system operators (supervisors) in charge of installing, loading, testing and maintaining the Ethernet.
THE MANUAL
The manual consists of seven chapters and four appendices. Chapter 1 gives an introduction to Ethernet, and chapter 2 contains an overview of the software. Chapter 3 gives the principles of the Media Access Process, While chapter 4 contains some general information on the Ethernet Media User Server, both running in the MC 68000 based Ethernet Master. Chapters 5 and 6 should serve as a reference guide for the routines (in PLANC and FORTRAN respectively), for the Ethernet Media User Interface on the ND-100. Chapter 7 describes the Ethernet Configuration Test Process. Appendix A contains error messages from the console and appendix B contains an example of the Configuration Test Program. Appendix C gives the installation procedure and appendix OD gives complete programming examples in PLANC and FORTRAN. In the manual, operator input is underlined and means carriage return.
PREREQUISITE KNOWLEDGE
The reader should know the DIX 2.0 or the IEEE 802.3 local area networking standards. The reader must also know one of the programming languages PLANC or FORTRAN. Familiarity with the SINTRAN III operating system is recommended.
RELATED MANUALS
The manual below supplies additional information about products closely related to the Ethernet Basic Software:
PIOC Software Description ND-60.161.02
ND-60.197.01
Vil
TABLE OF CONTENTS
Section Page
| INTRODUCTION. 1
1.4 General. 3
2 SOFTWARE OVERVIEW. 7
2.1 Facilities. 3
2.2 Some Definitions. 8
2.3 The Different Processes. 10
2.4 Addressing. 14
3 MEDIA ACCESS PROCESS. 43
3.1 Service Points . Cok ee ee ke ek ke 15
3.2 The Interface between a User Process and the Ethernet Media
Access. 16
4 THE ETHERNET MEDIA USER SERVICE. 17
4. General. 19
5 ETHERNET MEDIA USER INTERFACE ON ND-100 (PLANC). 21
5.4 Send Datagram. . 23 5.2 Declare a User Buffer for “Receive. 24 §.3 Await an Event. 25 5.4 Attach to Server. 27 § 5 Detach from Server. 23 5.6 Get Server Statistics. , 30 5.7 Define a Multicast Address for Incoming ‘Datagrams. 34 5.8 Remove a Multicast Address for Incoming Datagrams. 32 5.3 Conversion from ND System Number to a 48-Bit Address. 33 5.10 Conversion from a 48-Bit Address to ND System Number. 34 5.11 Type Definitions. fo 35 5.17.1 Event Record. 35 5.11.2 Timeout Record. 35 5.11.3 Statistic Record. 36 §.11.4 Attach/Detach Records. 37 5.41.5 General Types. . 37 5.12 Status from Routines. 38
§ ETHERNET MEDIA USER INTERFACE ON ND-100 (FORTRAN). 39
ND-60.197.01
Vil
Section Page
6.1 Send Datagram. 44
6.2 Declare a User Buffer for Receive. 43
6.3 Wait for an Event. 44
6.4 Attach to Server. 46
6.5 Detach from Server. AB
€.6 Get Server Statistics. 49
6.7 Define a Multicast Address for Incoming ‘Datagrans. 50
6.8 Remove a Multicast Address for Incoming Datagrams. 5
6.9 Conversion from ND System Number to 48-Bit Address. §2
6.10 Conversion from 48-Bit Address to ND System Number. 53
6.14 Pseudo Records. 54
6.11.7 Buffer Descriptor. 54 6.11.2 Timeout Descriptor. 54 6.11.3 Event Descriptor. 55 6.11.4 Statistics Descriptor. 55 6.12 Status from Calls. 56
7 THE ETHERNET CONFIGURATION TEST. 57
7.4 General. . 9 7.2 The Configuration. Server. 60 7.3 The Loopback Assistant Group Address. 6 j
APPENDIX
A CONSOLE ERROR MESSAGES FROM THE SERVER. 63
B AN EXAMPLE OF THE CONFIGURATION TEST. 6?
C INSTALLATION & LOADING OF USER PROGRAMS. 73
D COMPLETE PROGRAM EXAMPLES (PLANC & FORTRAN). 79
Index 85
ND-60.197.07
L § 8 T 0 F Foi G UR EOS
Litie page
-
The OS] Model 4
-
Stations on an Ethernet Cable. 4
-
Ethernet Architecture and Implementation. 5
-
Current Ethernet Software. 10
-
The Address String. 14
-
Ethernet Media User Service. 20
-
Ethernet Configuration Test with Loopback Assistant. 59
&, Ethernet Configuration Test Frame. 60
LEST OF CALLS
PLANC
- Send Datagram 2a
- Define a User Buffer for. Receive. 2%
- Await an Event. 25 &. Attach to Server. 2?
- Detach from Server. 29
- Get Server Statistics 30
- Define a Multicast far Incoming Datagrame 34 8B. Remove a Multicast for [ncoming SBatagrams . 32
- Conversion from ND System Number to 48=Bit Address. 33
- Conversion from 488it Address to ND System Number. 34
FORTRAN
- Send Datagram 44
- Declare a User Buffer far Receive &3
- Wait for an Event 44
- Attach to Server. 46
- Detach from Server. 4§
- Get Server Statistics rn &3
- Define a Multicast for Incoming Datagrams 59
- Remove a Multicast for Incoming Datagrams . 54
- Conversion from ND System Number to 48-B8it Address. Be
- Canversion from 48-Bit Address to ND System Number. 53
ND-60.197.01ETHERNET BASIC SOFTWARE
CHAPTER 4 ND-60.197.04ETHERNET BASIC SOFTWARE
ND-60,.197.07 ETHERNET BASIC SOFTWARE 3 Introduction.
1 Introduction.
1.1 General.
Ethernet is a trade mark of the Xerox Corporation and the networking concept has been developed by the Xerox Corporation. The first 3 Mbit/second networks were implemented in the early seventies. The specification which is the base for the ND-863 design is a result of a joint effort of Digital, Intel and Xerox Corporations to make Ethernet a de facto standard for local area networking. This specification is also used as base for a part of the IEEE 802 local area networking standard, the IEEE 802.3, which seems to become compatible with the Ethernet.
The Ethernet has bus topology, an important difference from the point- to-point networks based on HDLC, Megalink and PIOC. The algorithm for gaining access to the cable (see figure ?}) is based on Carrier Sense Multiple Access with Collision Detection (CSMA/CD). The bitrate is {OMbit/second.
Ethernet gives advantages when traffic consists of burst of data. The routing function is simple. Reliability and flexibility is very goad Since there is no centralized control. There is, furthermore, no priority mechanism for accessing the transmission medium. It is not possible to calculate a maximum delivery delay. This makes Ethernet less suited for process control and voice communication, if the traffic intensity is unpredictable.
The ND Ethernet Interface consists of two boards on the ND-100 bus. The physical level functions are taken care of by the Ethernet Controller card. The Link Level functions are implemented as processes running in the MC 68000 based Fthernet Master.
Figure 1 on the following page shows the layers in the OSI model. The Ethernet System is separated into two parts, the Link Level and the Physical Level, which correspond to the two lowest levels in the OST standard.
ND-60.197.01
4 ETHERNET BASIC SOFTWARE Introduction.
Application level |
Physical level
Figure 1. The OSI - Model
Ethernet Cable
Figure 2. Stations on an Ethernet Cable.
A station in the above figure means an ND-100/ND-500 computer with Ethernet Interface.
ND-60.197.01
ETHERNET BASIC SOFTWARE 5 Introduction.
Figure 3 below shows the Ethernet design. The Architecture shows how the logical parts fit together. Implementation shows how the components are connected.
Network control level
—~—Link level
ARCHITECTURE Physical layer
|
Data Link Controller Physical Channel
i | |
——
[— Station Data tink |! |Encode Transmit & & Interface Encapsulation Mgmt . F Toecoae Receive J
Ethernet Controller Board Tranceiver Tranceiver Coax
Cable “apne
IMPLEMENTATION J
| L | =
Compatibility
Interfaces ——--——
|
Figure 3. Ethernet Architecture and Implementation.
ND-60.197.01
ETHERNET BASIC SOFTWARE
NDB-60.197.0% ETHERNET BASIC SOFTWARE
CHAP TER 2
ND-60.197.0%4
ETHERNET BASIC SOFTWARE
ND-60.137.01 ETHERNET BASIC SOFTWARE 9 Software Overview.
2 SOFTWARE OVERVIEW.
2.1 Facilities.
The Ethernet Basic Software is the first software module released for the ND Ethernet Interface. The module provides two services to the user. The most important service is supplying a routine interface on the ND-100 for technical users who want to implement their own (PLANC or FORTRAN) protocols on the Ethernet. The other service is to offer means for testing the network from a simple command program on the ND-100. The configuration test giving this service iS implemented as described in DIX 2.0. Ethernet Basic Software also includes supervisory processes for loading, unloading and error reporting of the Ethernet Interface.
2.2 Some Definitions.
Datagram: The datagram contains the function field (DIX), or the length field (IEEE).
XMSG: Interprocess communication in and between ND systems.
Physical address: A globally unique 48-bit address for a station on the net.
Pseudorecords: As FORTRAN has mo record concept, records are implemented as integer arrays with indexes reflecting contents.
Multicast: Each station on the Ethernet can listen to a number of multicast addresses in addition to its physical address. The multicast bit must be Set.
Multicast address: The defined address to which a group of stations listen. One station sends to multiple stations that listen to a specific address.
Broadcast address: In this case the complete address field is set to (FF-FF-FF-FF-FF-FF hex).
Server: Process in the Ethernet Interface providing a service for the user of the ND-100.
Configuration test: Protocol specified in the DIX 2.0.
Media access: The lower sublevel in the OSI level 2 as used in YEEE 802 standards.
Service Points: See section 3.1.
ND-60.197.01
10 ETHERNET BASIC SOFTWARE Software Overview.
@ MEDIA ACCESS PROCESS {A sublevel of the Link Level -
Service Points.)
@ MEDIA USER SERVER PROCESS
@ CONFIGURATION TEST SERVER PROCESS
@ MANAGEMENT PROCESSES (ND-100/PI0C Handles unload,
stop, load, start and error
reports to the system console.)
ND- 100
ETHERNET ETHERNET ETHERNET
CONFIGURATION MEDIA SUPERVISOR ERROR
TEST PROGRAM USER(S) AND ERROR DEVICE
PROCESS
*
CONFIGURATION MEDIA USER MANAGER
TEST SERVER SERVER PROCESS
— |
ETHERNET
MEDIA
ACCESS
PROCESS
ETHERNET INTERFACE
Figure 4. Current Ethernet Software.
ND-60.197.0%
ETHERNET BASIC SOFTWARE 14 Software Overview.
2.4 Addressing.
in figure 5 below is shown the addressing concept.
0 1 2 3 4 (7-6) 5
r
6000100 | O |G0000000) 00100110 | Low Byte | High Byte ! OO0000
[_ Multicast bit
a e
Xerox defined values ND system number Physical user
Figure 5. The Address String.
The NDB Ethernet hardware does not check the two last bits in the destination address of an incoming frame. This means that each Ethernet Interface has in fact four physical addresses. This has been done in order to make it possible to support multiple link level protocols simultaneously, using the same hardware.
Bits 7-6 in byte 5 (physical user) are assigned as shown below:
7- 6) Protocols
IEEE protocols
=©
DIX protocols
User written protocols
O
ND protocols (COSMOS Ethernet Option)
—~
ND-60.197.01
ETHERNET BASIC SOFTWARE
ND-60.197.0% ETHERNET BASIC SOFTWARE
CHAP TER 3
ND-60.197.04
14 ETHERNET BASIC SOFTWARE
ND-60.197.01
ETHERNET BASIC SOFTWARE 15 Media Access Process.
3 MEDIA ACCESS PROCCSS. The media access process supports up to four link level processes, implementing different link level protocols based on the four physical addresses provided.
3.1 Service Points
The link level process interfaces to the driver by queueing request blocks on the driver “Service Points". The driver has three service points, namely Command, Receive and Transmit Service Points. The requests currently implemented are described in the section below.
The command service point is used for establishing initial contact between the media access and the higher level processes. The higher level process may make additional requests for specifying a number of multicast addresses that it will listen to.
Copying of incoming multicast datagrams to
NOTE several link level processes listening to the
Same multicast address, is not implemented.
Multicast addresses consequently have to be specific for each physical user, as is also the case for the broadcast address (FF-FF-FF~FF-FF-FF).
The transmit service point is for transmitting frames onto the net. The link level process provides the data buffer and initiates a request. The media access process then takes care of encapsulating the data in an Ethernet envelope, and transmitting them onto the net. If collisions occur, an attempt to transmit the data takes place, after an arbitrary timeout period. The maximum number of retransmissions is 15.
The receive service point is used for receiving frames from the net. The receive buffers are, in the current implementation, the responsibility of the media access process. The different link level processes initially make several receive requests with no buffers. When datagram frames arrive for link level processes with pending requests, the buffer containing the frame is linked to the request/response block and the link level process is notified through an event. If the actual link level has no pending receive request, the incoming frame is discarded.
ND-60.197.01
16 ETHERNET BASIC SOFTWARE Media Access Process.
The interface between a user process and the Ethernet Media Access is Similar to that of the current PIOC PHLS in its use of ‘service points", to which Device Control Blocks (DCBs) are appended for service and removed when processing is completed.
However, the Ethernet Driver currently runs as a process rather than as an integral part of the PIOC (or Ethernet Interface) operating system PlOCcoOS, and it is therefore activated by an event rather than by a system call. This is transparent to the user, however, as a queue of one or more DCBs is appended to a service point and the driver activated by means of a library routine:
toServicePoint(servicePoint, clientProcessNumber, firstDCBPointer)
When processing is completed on a DCB, the user process is signalled with the event bits requested in the DCB header. Finished DCBs are then retrieved from the service point by means of the routine
fromServicePoint(servicePoint, clientProcessNumber ,FinishedDCBPointer)
(This routine returns a “NIL" pointer when there are no more completed DCBs belonging to the user on the service point queue.}
The media access process also keeps and updates low level statistics for each physical user, as well as some common statistic counters. For an explanation of the different counters, refer to section 5.177 or 6.47.
When the counters reach their maximum value, they are "frozen" and must be read and reinitialized by higher level processes.
ND~60.197.01
ETHERNET BASIC SOFTWARE 17
CHAP TER 4
ND-60.497.04
18 ETHERNET BASIC SOFTWARE
ND-60.197.01
ETHERNET BASIC SOFTWARE 19 The Ethernet Media User Service.
4 THE ETHERNET MEDIA USER SERVICE.
4.1 General.
The server 1s a separate process running in the Ethernet Controller. It can be configured to handle from one to four physical users. The server can also be used from remote computers over COSMOS.
One user program may attach itself to servers in Ethernet Interfaces connected to different Ethernet segments. This opens for possibilities to implement gateways. If the Ethernet Basic Software 18S generated with the configuration test protocol, the DIX reserved physical user address may not be used by media user programs.
The same library of primitives (routines) is used both on the Ethernet Interface and on the ND-100 side of the communication channel. This is to make possible future changes in speed increases in the transport mechanism between the Ethernet Interface and the host computer transparent to the user interface and to the server process.
The library of functions is callable from both RT-programs and from background programs. Please note that background programs have to be run under user SYSTEM.
The interface module contains a pool of descriptor blocks for linking of the user-provided buffers to the data and buffer queues. The maximum number of outstanding buffers given in the definition file, refers to these blocks. Note that there is one block from the pool in use during the send datagram call.
The maximum size of datagrams is 1502, as defined in DIX 2.0, or the maximum XMSG message size, minus 18 bytes used for communication between the server in PIOC and the interface on the ND-100. There is no minimum datagram size, but if datagrams shorter than 48 bytes are transmitted, 48 bytes are received at the destination address (DIX z2.0.)
Refer also to figure 6 on page 20.
ND-60.197.01
20 ETHERNET BASIC SOFTWARE The Ethernet Media User Service.
NbD- 100
USERS PROGRAM USERS PROGRAM
(PLANC) (FORTRAN)
ENMF~USER
ENMP-USER ENMP-USER
ENUM-LIB ENUM-LIB
|
ENUM-LIB
ENOUM-SERVER eon we ew ew
ENMA-~USER
ENMA- PROCESS
ETHERNET
INTERFACE
Figure 6. Ethernet Media User Service.
ND-60.197
04
ETHERNET BASIC SOFTWARE 21
CHAP TER 5
NB-60.197.01
22 ETHERNET BASIC SOFTWARE
ND-60.1397.01
ETHERNET BASIC SOFTWARE 23 Ethernet Media User Interface on ND-100 (PLANC).
5 ETHERNET KEDIA USER INTERFACE ON ND-100 {PLANC).
5.1 Send Datagran.
Function Name : ENMPSENDDATAGRAM
Parameter Name: R/W]| Explanation:
1 datagram R Pointer and border indexes to datagram
BYTES POINTER
2 server R Logical server to use
INTEGER2
3 destination R |} 48 bit destination address as defined in
ENUMAD section 5.2
4 status W | Returned status from routine
INTEGER2
USAGE: Send datagram.
FUNCTION CALL: ENMPsendDatagram(datagram, server, destination) =: status
COMMENTS: The datagram is immediately sent through the communication channel to the server in the Ethernet interface.The buffer that contained the datagram is free to use on return.
EXAMPLE:
| Send Datagram.
BYTES POINTER : datagram
INTEGER2 : server,status
ENUMAD : address
ADDR(thisBuffer) =: datagram
myServer =: server
thisAddress =: address
ENMPsendDatagram(datagram,server,address) =: status
IF status = ENUMok THEN
ND~60.197.01
24 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
5.2 Declare a User Buffer for Receive.
Function Name : ENMPGIVEBUFFER
Parameter Name: R/W| Explanation:
1 buffer R | Pointer and border indexes to buffer
BYTES POINTER
2 identifier R | For buffer identification
INTEGER2
3 status W | Status returned from routine
INTEGER2
USAGE: Declare a user buffer for receive.
FUNCTION CALL: ENMPgiveBuffer(buffer,identifier) =: ENMPstatus
COMMENTS: If a datagram has arrived from a server, (section 2.2) it is copied to the user buffer which is linked to the logical servers data queue, waiting for the user to do a walt call. If no datagrams have arrived, the buffer is linked to the buffer queue. Buffers are always given to a pool common for all logical servers. Note that the identifier is of no importance when writing in PLANC, as the buffer may also be identified by its pointer.
EXAMPLE:
| Declare a User Buffer for Receive.
BYTES POINTER : buffer
INTEGER2 : Status,identifier
ADDR(thisBuffer) =: buffer
1234 =~: identifier
ENMPgiveBuffer(buffer,identifier) =: status
ND-60.197.01
ETHERNET BASIC SOFTWARE 25 Ethernet Media User Interface on ND-100 {PLANC).
5.3 Await an Event.
Function Name : ENMPHAIT
Parameter Name: R/Wi Explanation:
1 datagram W Pointer and border indexes of incoming
BYTES POINTER datagram
2 identifier W | For identifying buffer used in incoming
INTEGER2 datagram ’
3 server W Datagram received through this logical
INTEGER2 server
4 destination W 48-bit destination address of incoming
datagram
5 source w 48-bit source address of incoming
ENUMAD datagram
6 timeout R | Record describing timeout
ENUMTO
7 events RWi Record describing event mask and events
ENUMEV occurred
8 status W | Returned status from routine
INTEGERZ
USAGE: Await an event.
FUNCTION CALL: ENMPwait (datagram, identifiler,server,destination, ‘source, timeout,events) =: status
COMMENTS: The function receives all datagrams that have arrived, as long as there are buffers in the buffer queue, and links them to the logical server's data queues. The first datagram in the first (numbered from1 upwards), logical server's data queue 15 returned. If no datagrams arrive, or other events occur, the function times out after a user specified period. The user can decide which events to wait for by specifying a mask in the event bit field. (Tf bit "N" is 1 the user waits for the event "N".}) Note that the identifier is of no importance when writing in PLANC, as the buffer may be identified by its pointer as well.
Refer to the example on the following page.
ND-60.197.01
26 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
EXAMPLE:
Await an Event.
ENUMTO : timeout
ENUMEV > event
BYTES POINTER : datagram
INTEGER2 : identifier,server,status
ENUMAD : destination, source
ENUManyEvent =: event.ENUMEVbits
10 =; timeout. ENUMTOnumber
seconds =: timeout.ENUMTOtype
ENMPwait(datagram,identifier,server,destination, &
source, timeout,event) =: status
IF status = ENUMok THEN
IF BIT(thisEvent.ENUMEVbits,ENUMEVrr) THEN
If you use ENUMEVrt event, observe the following note:
A routine ENUMoev is called from within ENMPwait. When using
the ENUMEVrt event, remember to provide for a routine in your
program called ENUMoev:
ROUTINE STANDARD VOID,BOOLEAN: ENUMoev
This routine should check for all "other" possible events
that you may use, e.g., the presence of terminal input, and
NOTE §return TRUE if there are events pending. If no terminal input
is present, FALSE is returned. ENMP provides for a default
version of ENUMoev which always returns FALSE. If you want
to make sure that no events of the type ENUMEVrt are missing,
you hav to provide for ENUMoev in your program. The reason
why you may miss an “other” event, is that all wakeups from
the wait state use one single bit in the RT-description of
the program (the 5REP bit). If two wakeups (one leading to an
"other" event, and another done by XMSG) occur close together
just before ENMP executes the TMOUT monitor call, the infor-
mation about the "other" event is lost.
ND~-60.197.01
ETHERNET BASIC SOFTWARE 27 Ethernet Media User Interface on ND-100 (PLANC).
§.4 Attach to Server.
Function Name : ENMPATTACH
Parameter Name: R/W| Explanation:
1 attachRecord RW] Means for identifying the Ethernet
ENUMDE interface and the physical user (5.11.4)
2 status W Return status from routine
INTEGER2
USAGE: Attach to server.
FUNCTION CALL: ENMPattach(attachRecord) =: status
COMMENTS: The function establishes contact with the server yunning in PIOC, and opens a communication channel between the user process in the ND-100 and the server. The physical user parameter refers to the two least significant bits in the 48-bit address. In ND format, these are bits 6-7 in the last character of the address string. The basic software module may be generated with from one to four legal, physical user numbers. If the user attempts to attach to an illegal user number, or to a number already in use, the error “illegal user" is returned. The function increases the program's maximum XMSG space.
The Ethernet hardware initialization currently
NOTE fi takes approximately 10 seconds. The first cali
to the server should therefore not be attempted
until this period of time has elapsed.
Refer to the example on the page 28.
ND-60.197.01
28 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
EXAMPLE:
| Attach to Server.
BYTES : system(0:5)
ENUMDE : attach
INTEGER2 : server,status
'ENTEST' =: system(Q:5)
ADDR(system) =: attach. ENUMDEsystem
0 =: attach. ENUMDEpioc
2 =: attach. ENUMDEaddress
ENMPattach(attach) =: status
IF status = ENUMok THEN
attach.ENUMDEserver =: server
ND-60.197.01
ETHERNET BASIC SOFTWARE 29 Ethernet Media User Interface on ND-100 (PLANC).
5.5 Detach fron Server.
Function Name : ENMPOETACH
Parameter Name: R/W) Explanation:
1 detachRecord R Identifies the Ethernet Interface and
ENUMDE the the physical address (5.11.4)
2 status W Returned status from routine
INTEGER2
USAGE: Detach from server.
FUNCTION CALL: ENMPdetach(detachRecord) =: status
COMMENTS: The communication channel between the user program and the server is closed. Another user program may attach to the server, using the same logical user number. The user has to name the system, the PIOC and the physical user in order for the DETACH to function even after restart of XMSG, or after ABORT of a uSer progran.
EXAMPLE s
| Detach from Server.
BYTES system(0:5)
ENUMDE detach
INTEGER2 status
'ENTEST' =: system(0:5)
ADDR(system) =: detach. ENUMDEsystem
0 = detach. ENUMDEpioc
2 = : detach.ENUMDEaddress
ENMPdetach(detach) =: returnStatus
IF status = ENUMok THEN
ND-60.197.01
30 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
5.6 Get Server Statistics.
Function Name : ENMPGETSTATISTICS
Parameter Name: R/W| Explanation:
t clear R Do you want to clear this servers
BOOLEAN Statistics block ?
2 server R Logical server to get statistics from
INTEGER2
3 statisticsRecord| W Statistics counter record as defined in
ENUMSTperUser section 5.11.3
4 status W Returned status from routine
INTEGER2
USAGE: Get server statistics.
FUNCTION CALL: ENMPgetStatistics(clear,server,statisticsRecord) =: status
COMMENTS: The user must be sure that sufficient buffers are provided before doing this call, otherwise incoming datagrams might be lost.
EXAPIPLE:
| Get Server Statistics. |
ENUMSTperUser : statistics
INTEGER2 : status,server
BOOLEAN : clear
FALSE clear
fl
4 =: server
ENMPgetStatistics(clear,server,statistics) =: status
IF status = ENUMok THEN
ND-60.197.01
ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
5.7 Define a Multicast Address for Incoming Datagrams.
—
Function Name : ENMPNEWMULTICAST
Parameter Name: R/W| Explanation:
1 server R Logical server to start listening to
INTEGER2 Specified address
2 address R A 48-bit multicast address, record as
ENUMAD defined in 5.11.5
3 status W | Returned status from routine
INTEGER2
USAGE: To order a server to pass datagrams for a multicast address on to the user progran.
FUNCTION CALL: ENMPnewMulticast(server,address) =: status
COMMENTS: After this call, all frames on the Ethernet are passed on to the user in the same way as if the destination were the 48-bit physical address. If the user attempts to specify an address in which the multicast address bit (bit O in character 1) 1s not set, the routine returns an error status.
EXAMPLE:
| Define a multicast address for incoming datagrans.l
INTEGER2 : server,status
ENUMAD : address
1 =: server
multicast =: address
ENMPnewMulticast(server,address) =: status
IF status = ENUMok THEN
ND-60.197.01
32 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
5.8 Remove a Multicast Address for Incoming Datagrams.
Function Name : ENMPREMOVEMULTICAST
Parameter Name: R/W| Explanation:
1 server R | Logical server to stop from listening to
INTEGER2 specified address
2 address R | A 48-bit address. Record as defined in
ENUMAD section 5.11.5
3 status W | Returned status from routine
INTEGER2
USAGE: To stop a server from passing datagrams for a multicast address on to the user program.
FUNCTION CALL: ENMPremoveMulticast(server,address) =: status
COMMENTS: The user will no longer receive the multicast frames with the above address as a destination. If the user attempts to specify an address in which the multicast bit (bit O in character 1) is not set, the routine returns an error status.
EXAMPLE:
Renove a multicast address for incoming dategrans.|
INTEGER2 : server,status
ENUMAD : address
{ =: server
multicast =: address
ENMPremoveMulticast(server,address) =: status
IF status = ENUMok THEN
ND-60.197.01
ETHERNET BASIC SOFTWARE 33 Ethernet Media User Interface on ND-100 (PLANC).
5.9 Conversion from ND System Number to a 48-Bit Address.
Function Name : ENMPNUMBERTOADDRESS
Parameter Name: R/W| Explanation:
{ system R Number as defined in section 5.11.5 of
ENUMNDsystemNum ND system numbers
2 physical R Number as defined in section 5.11.5 of
ENUMRGaddress possible physical users
3 address W | 48 bit address as defined in section
ENUMAD 5.11.5
4 status W | Number and physical within range?
BOOLEAN
USAGE: To convert from ND system number to 48-bit address.
FUNCTION CALL: ENMPnumberToAddress (system, physical, address) =: status
COMMENTS: ND system numbers, in the range O - 177777B, are contained (in reversed order), in bytes 3-4 of the record. Physical user numbers are contained in byte 5 of the address record. If the physical user address is out of range, FALSE is returned.
EXAMPLE:
[convert from ND system number to a 48-bit |
BOOLEAN : okPhysical ENUMNDsystemNumber : destSysten ENUMRGadd@ress : destPhysical ENUMAD : destAddress
547 =: destSystem 2 =: destPhysical ENMPnumberToAddress (destSystem,destPhysical,destaddress) =: okPhysical
ND-~60.197.01
34 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
5.10 Conversion from a 48-Bit Address to ND System Number.
Function Name : ENMPADDRESSTONUMBER
Parameter Name: R/W| Explanation:
1 system W | Number as defined in section 5.11.5 of
ENUMNDsystemNum ND system numbers
2 physical W Physical user. Range as defined in
ENUMRGaddress section 5.11.5
3 address R | A 48-bit address as defined in section
ENUMAD 5.11.5
4 status W Was the address to convert an ND
BOOLEAN address?
USAGE: Convert from 48 bit address to ND system number.
FUNCTION CALL: ENMPaddress(system,physical,address) =: status
COMMENTS: This function compares bytes 0-2 in the address with the 24 Xerox defined bits common for all ND systems connected to the Ethernet. If the address does not belong to an ND system, FALSE is returned.
EXAPIPLE:
BOOLEAN : NDsystem ENUMNDsystemNumber : sourSystem ENUMRGaddress : sourPhysical ENUMAD : sSourAddress
thisAddress =: sourAddress ENMPaddressToNumber(sourSystem, sourPhysical,sourAddress) =: NDsystem IF NDsystem THEN
ND~60.197.01
ETHERNET BASIC SOFTWARE 35 Ethernet Media User Interface on ND-100 (PLANC).
5.11 Type Definitions.
TYPE ENOUMEV = RECORD
INTEGER2 : ENUMEVbits
INTEGER2 : ENUMEVinfo
ENDRECORD
event. ENUMEVbits Event mask for significant events when calling the walt routine. Occurred event, one bit only set, OK return from routine.
POSSIBLE EVENTS:
ENUMEVtimeout The function has timed out without receiving
any datagrams.
ENUMEVreceived Datagram has been received.
ENUMEVotherPort Message has arrived at another of the user's
XMSG ports.
ENUMEVrtWake An RT type event has occurred.
ENUMEVdeadServer The server process in the PIOC has stopped
for some reason.
event. ENUMEVinfo If the message has arrived at another of the user program's XMSG ports, the port number is found here
5.14.2 Timeout Record.
TYPE ENUMTO = RECORD
INTEGER2 : ENUMTOnumber
INTEGER? : ENUMTOtype
ENDRECORD
timeout. ENUMTOnumber Number of time units to wait for incoming datagram or other events.
timeunit. ENUMTOtype Standard SINTRAN time units: ENUMBTUs (20ms} ENUMseconds ENUMminutes ENUMhours
ND-60.197.01
ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
5.14.3 Statistic Record.
TYPE ENUMSTperUser = RECORD
INTEGER4: ENUMSTtransmitted
INTEGER4: ENUMSToneCollision
INTEGER4: ENUMSTmultiCollision
INTEGER2: ENUMSTaborted
INTEGER4: ENUMSTrecelived
INTEGER4: ENUMSTdropped
INTEGER2: ENUMSTcrcErrors
INTEGER2: ENUMSTalignErrors
ENDRECORD
statistics, ENUMSTtransmitted Number of frames transmitted onto the net for this physical user: (Total with and without collision.)
statistics. ENUMSToneCollision Number of frames transmitted after one collision.
statistics. ENUMSTmulticollision Number of frames transmitted after from 2 to 15 collisions.
statistics. ENUMSTaborted Number of frames aborted (after 16 collisions).
statistics. ENUMSTreceived Number of frames received from the net for this physical user.
statistics, ENUMSTdropped Number of frames Lost on receive. No yecelve requests from the actual physical user.
statistics. ENUMSTcrcErrors Number of frames received with errors detected in CRC check.
statistics. ENUMSTalignErrors Number of frames received with Length differing from a multiple of octets.
ND-60,797.03
ZTHERNET BASIC SOFTWARE 37 Ethernet Media User Interface on NDB-100 (PLANC).
§.11.4 Attach/Detach Records.
TYPE ENUMDE = RECORD
ENUMRGaddress : ENUMDEaddress
INTEGER2 : ENUMDEpioc
BYTES POINTER : ENUMDEsystem
INTEGER2 : ENUMDEserver
ENDRECORD
attach. ENUMDEaddress Physical user address (0-3) ina specified Ethernet interface.
attach. ENUMDEpioc Ethernet interface number to use. Given by thumbwheel setting on the Ethernet interface.
attach. ENUMDEsystem Pointer to a string containing the host system's COSMOS name. To be used by the interface,
attach. ENUMDEserver Returned logical server number.
5.11.5 General Types.
TYPE ENUMRGaddress = INTEGER2 RANGE (0:3}
TYPE ENUMNDsystemNumber = INTEGER2 RANGE (0:177777B)
TYPE ENUMAD = RECORD
BYTES : ENUMADbyte (0:5)
ENDRECORD
ND-60.197.07
ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (PLANC).
5.12 Status from Routines.
ENUMOK The call was executed correctly.
ENUMERnS No contact with the server. XMSG 1s down or the server i85 not running. Unsuccessful request for statistics.
ENUMERDSs No more Buffer Space. KMSG does not allow the task more space, or the user has given too many buffers.
ENUMERie Waiting for Impossible Event. The user interface has not been given any buffers for incoming datagrams. Waiting is thus meaningless.
ENUMERio Tllegal offset to data. Offset has to he an even number of bytes.
ENUMERsb Buffer overflow. The buffer provided by the user is too small for incoming datagrams.
ENUMERLAa Tllegal Physical Address. Either the system is not generated for this address, or the physical address is already in use.
ENUMERm@S All logical servers are already in use.
ENUMERMmC The address is not a multicast address. The multicast bit is not set.
ND-60.197.01
ETHERNET BASIC SOFTWARE 39
CHAP TER 6
ND-60.797.01
AQ ETHERNET BASIC SOFTWARE
ND-60.197.01
ETHERNET BASIC SOFTWARE 41 Ethernet Media User Interface on ND-100 (FORTRAN).
6 ETHERNET MEDIA USER INTERFACE ON ND-100_ (FORTRAN).
6.1 Send Datagran.
In this chapter returnStatus is listed as a
NOTE parameter. It should in fact, be regarded as
a function.
Function Name : ENMFSENDDATAGRAM
Parameter Name/Type: |I/0| Explanation:
{ usexrData I The integer array containing the
INTEGER datagran.
2 buffer I Elements defined in section 6.11.1
INTEGER
3 destination I Destination 48-bit address
CHARACTER * 6
4 returnStatus 0 Returns call status
INTEGER
USAGE: Send datagram.
FUNCTION CALL: returnStatus = ENMFsendDatagram(userData, buffer, destination)
COMMENTS: The datagram iS immediately sent through the communication channel to the server in the Ethernet Interface. The buffer that contained the datagram is free to use on return. The logical server to use must be specified in the buffer descriptor (parameter 2).
Refer to the example on page 42.
ND-60.197.01
42 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (FORTRAN).
EXAMPLE:
The Send Datagram Funct ion-|
$INCLUDE ENMF-USER:DEFS EXTERNAL ENMFsendDatagranm INTEGER ENMFsendDatagram,myServer INTEGER thisBuf(0:ENUMLEbuffer-1),retStat, firstFree LOGICAL ENMFnumberToAddress CHARACTER*6 destin
thisBuf (ENUMBUoffset) = 0
thisBuf(ENUMBUlength) = 100
thisBuf(ENUMBUserver) = myServer
retStat = ENMFsendDatagram(buffer(firstFree) ,thisBuf,destin)
END
ND-60.197.01
ETHERNET BASIC SOFTWARE 43 Ethernet Media User Interface on ND-100 (FORTRAN).
6.2 Declare a User Buffer for Receive.
Function Name : ENMFGIVEBUFFER
Parameter Name/Type: {1I/0| Explanation:
1 userBuffer I The integer array containing the user
INTEGER buffer for incoming datagram.
2 buffer I Elements defined in section 6.11.1
INTEGER
3 returnStatus 0 Returns call status
INTEGER
USAGE: Declare a user buffer for receive.
FUNCTION CALL: returnStatus = ENMFgiveBuffer(userBuffer, buffer)
COMMENTS: If a datagram has arrived from a server, it is copied to the user buffer which is linked to the logical server's data queue, waiting for the user to do a wait call. If no datagrams have arrived, the buffer is linked to the buffer queue. Buffers are always given to a pool common for all logical servers.
EXAMPLE :
The Give Buffer Function-|
SINCLUDE ENMF-USER:DEFS EXTERNAL ENMFgiveBuffer INTEGER ENMFgivebBuffer, retStat, firstFree INTEGER thisBuf(0O:ENUMLEbuffer-1) INTEGER buffer(0:650)
thisBuf (ENUMBUidentifier) firstFree
thisBuf (ENUMBUoffset) 0
thisBuf (ENUMBULength) 650
retStat ENMFgiveBuffer (buffer, thisBuf)
END
ND-60.197.01
44 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (FORTRAN).
6.3 Wait for an Event.
Function Name : ENMFWAIT
Parameter Name/Type: |1/60!) Explanation:
1 buffer 0 buffer(0O:ENUMLEbuffer-1) - Elements
INTEGER defined in section 6.11.1
2 destination 0 Destination 48-bit address
CHARACTER * 6
3 source 0 Source 48 bit address
CHARACTER * 6
4 timeout IO| timeout(O:ENUMLEtime-1) - Elements
INTEGER defined in section 6.11.2
5 event IO} event (OQ: ENUMLEevent-1} ~ Elements
INTEGER defined in section 6.11.3
6 returnStatus 0 Returns call status
INTEGER
USAGE: Wait for an event.
FUNCTION CALL: returnStatus = ENMFwait(buffer,destination, source, timeout, event)
COMRENTS: The function receives all the arrived datagrams, as long as there are buffers in the buffer quene, and links them to the logical server's data queues. The first datagram in the first {numbered from 1 and upwards), active logical server's data queue is returned. If no datagrams arrive, or other events occur, the function times out after a user specified period. The user can decide which events to wait for by specifying a mask in the event bit field. (If bit "N“ is 1 the user waits for event “N’
Refer to the example on page 45.
ND-60.197.01
ETHERNET BASIC SOFTWARE A5 Ethernet Media User Interface on ND-100 (FORTRAN).
EXAMPLE:
Fre Wait Function. ff
$INCLUDE ENMF-USER:DEFS EXTERNAL ENMFwait, INTEGER ENMFwalt, retStat,inBuffer CHARACTER source6,dest6 INTEGER thisBuf (0:ENUMLEbuffer-1),thisTimeout(0:ENUMLEtime-1) INTEGER thisEvent(0:ENUMLEevent~1) INTEGER buffer(0:650)
thisTimeout (ENUMTItime) 1
thisTimeout (ENUMTIunit) oof ENMFseconds
thisEvent (ENUMEVbits ) ENUManyEvent
tt
retStat = ENMFwait(thisBuf,dest,
source, thisTimeout, thisEvent)
IF (retStat .EQ. ENUMok) THEN
IF (IBIT(thisEvent(ENUMEVbits),ENMFEVreceived) .EQ. -1)THEN
inBuffer = thisBuf(ENUMBUidentifier)
END
If you use ENUMEVrt event observe the following note. v
A routine ENUMoev is called from within ENMFwalt. When using
the ENUMEVrt event, remember to provide for a routine in your
program called ENUMoev:
FUNCTION LOGICAL ENUMoev
This routine should check for all “other” possible events
that you may use, e.g., the presence of terminal input, and
NOTE freturn TRUE if there are any pending. If not FALSE is
returned. ENMF provides for a default version of ENUMoev
which always returns FALSE. If you want to make sure that no
events of the type ENUMEVrt are missing, you have to provide
for ENUMoev in your program. The reason that you may miss an
“other” event is that all wakeups from the wait state use one
Single bit in the program's RT-description (the 5REP bit). If
two wakeups, one leading to an “other" event followed by one
done by XMSG, occur close together just before ENMF executes
the TMOUT monitor call, the information about the "other"
event is lost.
ND-60.197.01
46 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (FORTRAN).
6.4 Attach to Server.
Function Name : ENMFATTACH
Parameter Name/Type: |1/0O| Explanation:
1 system I COSMOS name of the system with Ethernet
CHARACTER * 6 interface.(Zero length is local system.)
2 pioc I The PIOC number (0-3)
INTEGER
3 physicalUser I Number from O to 3
INTEGER
4 logicalServer O Returns logical server number for use in
subsequent calls
5 returnStatus 0 Returns call status
INTEGER
USAGE: Attach to server.
FUNCTSON CALL: returnStatus = ENMFattach(system,pioc,physicalUser, logicalServer)
COMMENTS: The function establishes contact with the server running in the Ethernet Interface, and opens a communication channel between the user process in in the ND-100 and the server. The physical user parameters refer to the two least significant bits in the 48 bits address. In ND format these are bits 6-7 in the last character of the address string. The basic software module may be generated with from one to four legal physical user numbers. If the user attempts to attach to an illegal user number, or with a number already in use, the error “illegal user” is returned. The function increases the program's maximum XMSG space.
T he Ethernet hardware initialization currently
NOTE t akes approximately 10 seconds. The first call
t o the server should therefore not be attempted
b efore this period of time has elapsed.
Refer to the exampl Ge on page 47.
ND-60.197.01
ETHERNET BASIC SOFTWARE 4} Ethernet Media User Interface on ND-100 (FORTRAN).
EXAMPLE:
The Attach Function.)
EXTERNAL ENMFattach
INTEGER ENMFattach,myPhysical ,retStat,myPioc,myServer
CHARACTER * 5 mySystem
retStat = ENMFattach(mySystem,myPioc,myPhysical
,myServer)
END
ND-60.197.01
48 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (FORTRAN).
6.5 Detach from Server.
Function Name ; ENMFOETACH
Parameter Name/Type: |1I/0] Explanation:
1 system I COSMOS name of system with Ethernet
CHARACTER * (*) Controller. Zero length, local system.
2 pioc I The PIOC number 0 to 3
INTEGER
3 physicalUser I Number from 0 to 3
INTEGER
4 returnStatus 0 Returns call status
INTEGER
USAGE: Detach from server.
FUNCTION CALL: returnStatus = ENMFdetach(system,pioc, physicalUser)
COMMENTS: The communication channel between the user program and the server is closed. Another user program may attach to the server, using the same physical user number. The user has to name the system, the PIOC and the physical user in order for the DETACH to function even after restart of XMSG, or after ABORT of a user program.
EXAPIPLE:
The Detach Funct an. |
EXTERNAL ENMFdetach
INTEGER ENMFdetach,myPhysical,retStat,myPioc
CHARACTER * 5 mySysten
retStat ENMFdetach(mySystem,myPioc,myPhysical)
END
ND-60.197.04
ETHERNET BASIC SOFTWARE 49 Ethernet Media User Interface on ND-100 (FORTRAN).
6.6 Get Server Statistics.
Function Name : ENMFGETSTATISTICS
Parameter Name/Type: |1I/0] Explanation:
| reset I Reset the counters?
LOGICAL
2 logicalServer I Indicates which logical server to get
INTEGER the statistics from
3 statistics O See section 6.11.4
INTEGER *4
4 returnStatus 0 Returns call status
INTEGER
USAGE: Get server statistics.
FUNCTION CALL: returnStatus = ENMFgetStatistics(reset, logicalServer, statistics)
COMMENTS: The user must be sure that sufficient buffers are provided before doing this call, otherwise incoming datagrams are lost.
EXAPPLEs
The Get Statistics Function-f
$INCLUDE ENMF-USER:DEFS EXTERNAL ENMFgetStatistics INTEGER ENMFgetStatistics, retStat,myServer INTEGER * 4 counters(0:ENMFLEstatistics-1) LOGICAL clearCount
retStat = ENMFgetStatistics(clearCount,myServer,
counters)
END
ND-~60.197.01
50 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (FORTRAN).
6.7 Define a Multicast Address for Incoming Datagrams.
Function Name : ENMFNEWMULTICAST
Parameter Name/Type: |1I/0] Explanation:
{ logicaiServer I Indicates which logical server the
INTEGER define multicast is for
2 address I The 48-bit multicast address
CHARACTER * 6
3 returnStatus 0 Returns call status
INTEGER
USAGE: Defining a multicast address for incoming datagrams.
FUNCTION CALL: returnStatus = ENMFnewMulticast(logicalServer, address)
COMMENTS: After this call, all frames on the Ethernet are passed on to the user in the same way as if the destination were the 48-bit physical address. If the user attempts to specify an address in which the multicast address bit (bit O in character 1) 1s not set, the routine returns an error.
EXAMPLE:
the New Multicast Funct ion |
EXTERNAL ENMFnewMulticast
INTEGER ENMFnewMulticast,retStat,myServer
CHARACTER*6 multiAddress
retStat ENMFnewMulticast(myServer,multiAddress)
END
ND-60.197.01
ETHERNET BASIC SOFTWARE 54 Ethernet Media User Interface on ND-100 (FORTRAN).
6.8 Remove a Multicast Address for Incoming Dataqrams.
Function Name : ENMFREMOVEMULTICAST
Parameter Name/Type: |I/0| Explanation:
{ logicalServer r Indicates which logical server the
INTEGER remove multicast is for
2 address I The 48-bit multicast address
CHARACTER * 6
3 returnStatus 0 Returns call status
INTEGER
USAGE: Removing a multicast address for incoming datagrams.
FUNCTION CALL: returnStatus = ENMFremoveMulticast(logicalServer, address)
COMMENTS: The user will no longer receive the multicast frames with the above address as destination. If the user attempts to specify an address in which the multicast bit (bit O in character 1) is not set, the routine returns an error status.
EXAMPLE:
The Remove Multicast Function.
EXTERNAL ENMFremoveMulticast
INTEGER ENMFremoveMulticast,retStat,myServer
CHARACTER*6 multiAddress
retStat = ENMFremoveMulticast(myServer,multiAddress)
END
ND-60.197.01
52 ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (FORTRAN).
6.9 Conversion from ND System Number to 48-Bit Address.
Function Name : ENMFNUMBERTOADDRESS
Parameter Name/Type: |I/O| Explanation:
1 number I The ND system number
INTEGER
2 physicalUser I Logical user number from O to 3
INTEGER
3 address © | The ND system 48-bit address
CHARACTER * 6
4 returnStatus 0 Returns call status
LOGICAL
USAGE: Conversion from an ND system number to 48-bit address.
FUNCTION CALL: returnStatus = ENMFnumberToAddress (number, physicalUser,address)
COMMENTS: ND system numbers, in the range O ~ 177777B, are contained {in reversed order) in characters 4-5 of the address string. Physical user numbers are contained in character 6 of the address string. If the physical user address is out of range, .FALSE., is returned.
EXAPIPLE:
The number ta address function.f
$INCLUDE ENMF-USER:DEFS EXTERNAL ENMFnumberToAddress LOGICAL ENMFnumberToAddress, numbersOK CHARACTER *6 thisAddress INTEGER thisNumber, thisPhysical
thisPhysical=myUser thisNumber=mySystem numbersOK=ENMFnumberToAddress(thisNumber, thisPhysical, thisAddress) IF (numbersOK) THEN
ND-60.197.01
ETHERNET BASIC SOFTWARE 53 Ethernet Media User Interface on ND-100 (FORTRAN).
6.10 Conversion from 48-Bit Address to ND System Number.
Function Name : ENMFADDRESSTONUMBER
Parameter Name/Type: |1/0} Explanation:
| number 0 Indicates the ND system number
INTEGER
2 physicalUser oO The logical user number from 0 to 3
INTEGER
3 address I The 48-bit address
CHARACTER * 6
4 returnStatus 0 Returns call status.
LOGICAL
USAGE: Conversion from 48-bit address to an ND = system number,
FUNCTION CALL: v returnStatus = ENMPaddressToNumber (number, physicalUser,address)
COMMENTS: The function compares characters 1-3 in the address with the 24 Xerox defined bits common for all ND systems connected to the Ethernet. If the address does not belong to an ND system, .FALSE., 1s returned.
EXAMPLE:
acdress to number function.
¢INCLUDE ENMF-USER:DEFS EXTERNAL ENMFaddressToNumber LOGICAL addressOK CHARACTER *6 thisAddress INTEGER thisNumber, thisPhysical
thisAddress = source addressOK = ENMFaddressToNumber(thisNumber, thisPhysical,thisAddress) IF (addressOK) THEN
ND~60.197.01
ETHERNET BASIC SOFTWARE Ethernet Media User Interface on ND-100 (FORTRAN).
6.11 Pseudo Records.
6.11.1 Butfer Descriptor.
buffer (ENUMBUidentifier) The means for the user program to identify which buffer the incoming datagram was was copied into.
buffer (ENUMBUctfset) In give buffer call: Index to the first first character of the buffer string that the user wants the datagram copied to. In send datagram and wait call: Index to the first character of the string containing data.
buffer (ENUMBULength) In give buffer call: Length of (sub)string buffer. In send datagram and wait calls: Length of datagram.
buffer (ENUMBUserver} The datagram is sent via this logical server in the send datagram call. It is received via the logical server in the wait call.
6.11.2 Timeout Descriptor.
timeout (ENDFTItime) Number of time-units to wait for incoming datagram or other events.
timeout (ENUMTIunit} Standard SINTRAN time-units: ENUMBTUs (20ms) ENUMseconds ENUMminutes ENUMhours
ND-60.197.01
ETHERNET BASIC SOFTWARE 55 Ethernet Media User Interface on ND-100 (FORTRAN).
6.14.3 Event Descriptor.
event (ENUMEVeventBits) One bit only is set. When OK, the OK status is returned from the wait call.
POSSIBLE EVENTS:
ENUMEVtimeout The function has timed out without
receiving any datagrams.
ENUMEVreceived The datagram has been received.
ENUMEVotherPort The message has arrived at another of
the user's XMSG ports.
ENUMEVrtWake An RT type event has occurred.
ENUMEVdeadServer The server process in POC has stopped,
for some reason.
event (ENUMEVeventiInfo) If the message has arrived at another of the user program's XMSG ports, the port mumber is found here,
6.11.4 Statistics Descriptor.
statistics (ENUMSTtramsmitted) Number of frames transmitted onto the net for this physical user. (Total, with and without collisions.)
statistics (ENUMSToneCollision) Number of frames transmitted after one collision.
statistics {ENUMSTMultiCollision}) Number of frames transmitted after 2 to 15 collisions.
statistics (ENUMSTaborted) Number of frames aborted after 16 collisions.
statistics (ENUMSTreceived) Number of frames received from the net for this physical user.
statistics (ENUMSTdropped) Number of frames lost on receive. No receive requests from: the actual physical user.
statistics (ENUDSTcrcErrors) Number of frames received with errors detected in CRC check.
statistics (ENUDSTalignErrors) Number of frames received with Length differing from a multiple of octets.
ND-60.197.0%
ETHERNET BASIC SOFTWARE Ethernet Media User Interface on NB-100 (FORTRAN}.
6.12 Status From Calis.
ENUMok The call was executed correctly.
ENUMERnS No contact with the server. XMSG is down or the server iS not running. Unsuccessful request for statistics.
ENUMERDS No more Buffer Space. XMSG does not allow the task more space. The user has given too many buffers.
ENUMERie Walting for Impossible Event. The user has not been given any buffers for incoming datagrams, 30 Waiting has no meaning.
ENUMERLO Illegal offset to data. Offset has to be an even number of bytes. Not possible from FORTRAN as integer arrays are used.
ENUMERSb Buffer overflow. The buffer provided by the user is too small for incoming datagrams.
ENUMER1La Tllegal Physical Address. Either the system is not generated for this address, or the physical address is already in use.
ENUMERMS All ‘logical servers are already in use.
ENUMERRC The address is not a multicast address. The multicast bit is not set.
ND-60.197.01
ETHERNET BASIC SOFTWARE 57
CHAP TER 7?
THE ETHERNET CONFIGURATION TEST.
NB-60.197.014
ETHERNET BASIC SOFTWARE
ND-60.197.0% ETHERNET BASIC SOFTWARE 59 The Ethernet Configuration Test.
7 THE ETHERNET CONE IGURATION TEST.
7.1 General.
The Ethernet Configuration test is a means for testing of the communication between stations on an Ethernet. All Ethernet stations should support the functions used for to test the configuration.
Using the Configuration Testing Protocol makes sure of:
@ the possibility to communicate with a remote station.
@ the possibility to communicate with a specific remote station.
& the possibility to hear, or be heard, by a specific station.
(Using a third station.}
TESTER ASSISTANT SUSPECT
4
'
ORIGNAL FRAME: FROM ASSISTANT: FROM SUSPECT:
ASSISTANT SUSPECT TESTER
TESTER ASSISTANT SOSPECT
Typefield Typefield Typefield
Skipcount ] Skipcount Skipcount 7
Forward +- Forward Forward
SUSPECT SUSPECT SUSPECT
Forward Forward + Forward
TESTER TESTER TESTER
Reply Reply Reply e~
Receipt Receipt Receipt
Data Data Data
Figure 7, Ethernet Configuration Test with Loopback Assistant.
It is important to note that the only field that is changed during a Configuration Test frame's lifetime is the skipcount field (except for the immediate addresses).
ND~60.197.01
60 ETHERNET BASIC SOFTWARE The Ethernet Configuration Test.
7.2 The Configuration Server.
The Configuration Server is implemented in order to support the functions mentioned above. The Configuration Server receives, processes and forwards test frames. The Configuration Test Server also provides an interface similar to that of the media access process. The figure below shows the Ethernet Configuration Test Frame.
tem OCteh ——+
+ 4 + Forward Func.- r Reply Funct. +4
+ Immediate +
- 4 - 4 - Receipt -
+ Nestination - Forward 4
Ll. ~ ;
- Address 7 - 7
b 4 F 7 Data :
+ Immediate + 5 :
i = - 4 ba ws
7 Source 4 - 4 +
- ‘ - Data 1 —
- Typefield + “
- SkipCount - —
- 44 - 1498 - |
- Data Octets + |
r 1 - CRC +
Figure 8. Ethernet Configuration Test Frame.
ND-60.197.04
ETHERNET BASIC SOFTWARE 6 1 The Ethernet Configuration Test.
If the user wants to implement his own Xerox (XNS)
NOTE protocols, uSing the DIX physical user address, s/he
must also implement the Configuration Test protocol.
The Configuration Test Program on the ND-100 only supports one or two forward messages in a configuration test frame because this should be the maXlmum requirement. The DIX 2.0, however, specifies no such limitations.
7.3 The Loopback Assistant Group Address.
To get hold of at least one station on the net for testing of a third party, the testing station can send to the Loopback Assistant Group Address. This is specified in DIX 2.0 to be CF-00-00-00-00-00 (hex). In the current implementation, each station must be explicitly activated as a Loopback Assistant in the configuration test program, in order to respond to the above address.
An example of the use of the test program is shown in appendix B.
ND-60.197.01
62 ETHERNET BASIC SOFTWARE
ND-60.797.0%
ETHERNET BASIC SOFTWARE 63
AP PEN
OT XA
CONSOLE ERROR MESSAGES FROM THE SERVER.
ND~60.197.01
ETHERNET BASIC SOFTWARE
ND-60.797.01 ETHERNET BASIC SOFTWARE 65 Console Error Messages From The Server.
| ERROR PIESSAGES AND Nunes]
ENERpoOS 18832 —»+ Unexpected return value from PIOCOS (46620B).
ENERxmsg = 18833 —+ Unexpected return value from XMSG.
ENERclsp = 18834 —~ Unexpected return value from client SP routines
ENERsrsp = 18835 -—~+ Unexpected return value from server SP routines
ENERrssp 18836 —+ Unexpected service point response type.
ENERpoev = 18837 ——~ Unexpected PIOCOS event.
ENERmars = 18838 -——~+ Unexpected response status from media access. ¥
ENERumsr = 18839 — > Errors from media user server process.
ENERxtrs = 18840 —~+ Unexpected response status from Xerox test server.
ENERxtft = 18841 —~+ Format error in received frame.
ENERhard = 18878 —+ Hardware error cauSing ENMA process to restart.
ENERfatl = 18879 -—~» Fatal error. Ethernet interface has to be reloaded. Upper bounder for Ethernet basic errors (44677B).
For ENERclsp, the additional information contains the POSPstatus returned from POSPappend/remove routines. POSPERntrn 15 not reported (on hardware restarts).
For ENERrssp, the additional information contains the ENRBtype in response block from ENMA process. All unexpected types are reported.
For ENERmars, the additional information contains the ENRBstatus in response block from ENMA process. Note that excess collisions are currently reported.
For ENERpoos, the additional information contains the PIOCOS system call return value (see PIOC Software Guide).
Continued on the next page.
ND-60.197.01
- 66 ETHERNET BASIC SOFTWARE
- Console Error Messages From The Server.
-
ADDITIONAL INFORMATION:
For ENERumsr the additional information takes the following values:
ENUMINxmtNoBlock 1 Xmtblock not found in the expected queue.
ENUMINxmtIl]1Addr 2 Illegal buffer address in xmitResp.
ENUMINrcvNoBlock Revblock not found in the expected queue.
ENUMINnoUser User number not in the range 0-3. {¢th
ENUMINi11User User not legal as ENUM user. if
ENUMINnotAct Received frame for inactive user. ff
ENUMINillHeader Unknown/illegal message type received. i
ND-60.197.01
ETHERNET BASIC SOFTWARE 67
APPEND TXB
AN EXAMPLE OF THE CONEIGURATION
TFST_.
NOD-60.497.04
68 ETHERNET BASIC SOFTWARE
ND-66.197.01
ETHERNET BASIC SOFTWARE 69 An Example of the Configuration Test.
The configuration tests are called by typing;
@(
Make sure that the Ethernet interfaces are
NOTE loaded from segments with software including
the configuration option.
See the following example.
@ENBAS-XTTEST a ENBAS - Version: AOO - 1984-12-20 ENXT: ETHERNET CONFIGURATION TEST PROGRAM STARTED
ENXT: SEND - Send Ethernet Configuration Test Frame Sending to specific ND system? Specify ND system number: 284 Forward to another station? N+ (Possible to forward to 1 more) Choose a frame identifier (Receipt Number): 222 Specify length of datafield: 100- Specify name of originating system: — (etault is local system) Specify Ethernet Interface number: 0 Loopback Frame received. Receipt: 222 Source ND system: 284 ENXT: HELP - List available commands send Send Ethernet Configuration Test Frame activate Activate Loopback Assistant Group Address deactivate Deactivate Loopback Assistant Group Address list List available commands exit Exit from program ENXT: act +t Activate Loopback Assistant Group Address Specify name of assistance system: —_, (Default is local system) Specify Ethernet Interface number: Loopback Assistant address defined
(Continued on the next page)
ND-60.197.01
70 ETHERNET BASIC SOFTWARE An Example of the Configuration Test.
ENXT: SEND «/ Send Ethernet Configuration Test Frame Sending to specific ND system? N+ Sending to Loopback Assistance Address? Y ed Forward to another station? N+ Choose a frame identifier (Receipt,Number): 333 - Specify length of datafield: 100 ed Specify name of originating system: Jt Specify Ethernet Interface number: 0 + Loopback Frame received. Recelpt: 333 Source ND system 284 ENXT: DEACT J Deactivate Loopback Assistant Group Address Specify name of assistance system: +/ , (Default is local system) Specify Ethernet Interface number: 1 «7 ENXT: EXIT + Exit from program
ENXT: LEAVING ETHERNET CONFIGURATION TEST PROGRAM
[he Command Processing. |
(Control A) - deletes the last character.
(Control Q) - deletes the line.
If the specified system or the server on the specified Ethernet Interface LS unknown, the system operator will receive this information.
If the test server detects errors in a reply frame, or receives no reply at all, the following is reported to the operator:
ENXT: SEND e
Negative response. Error: <error code>
ENXT:
(Continued on the next page)
ND-60.197.01
ETHERNET BASIC SOFTWARE 74 An Example of the Confiquration Test.
The following error codes apply:
Error Code Explanation
Timeout on loopback request.
No reply frame received.
Error in loopback request
from user.
Unsuccessful attempt to
transmit Loopback frame.
Unsuccessful attempt to
receive loopback frame.
Error in intermediate
addresses of reply frame.
Error in receipt of reply
frame.
Error in length of reply
frame.
ND-60.197.074
72 ETHERNET BASIC SOFTWARE
ND-60.197.04
ETHERNET BASIC SOFTWARE 73
APPENDIX £
INSTALLATION
4 LOADING OF USER PROGRAMS |
ND~60.197.01
14 ETHERNET BASIC SOFTWARE
ND-60.197.014
ETHERNET BASIC SOFTWARE 75 Installation & Loading of User Programs.
| LoapiNe OF USER PROGRAMS
- The following MODE job loads FORTRAN B user programs on ND100 onto a PROG-file.
QC - mre rn er rr rr rrr rn tt en rr st css @cC MODE JOB FOR LOADING AN ETHERNET MEDIA USER PROGRAM IN FORTRAN QC Hn rrr nr rrr rr rt en rr re nr rer cscs @NRL PROG-FILE < user program > LOAD < uSer program > LOAD ENBAS~MF LOAD ENBAS~-MP LOAD ENBAS-UMLIB LOAD FORT- 1BANK ENTRIES-DEFINED ENTRIES-UNDEFINED EXIT QCO ~~ rr rrr rer rr tr rte rt rr rr ctr rr ste
- The following MODE-job loads PLANC user programs onto a PROG-file.
QCC HH nner n rrr rr rn tt rr tr rr ttre @cC MODE JOB FOR LOADING AN ETHERNET MEDIA USER PROGRAM IN PLANC Q@CO mow rer rt rr rn rt rt re er @NRL PROG-FILE < user program > LOAD < user program > LOAD ENBAS-MP LOAD ENBAS-UMLIB LOAD PLANC- 1BANK ENTRIES-DEFINED ENTRIES-UNDEFINED EXIT acc ewe ee eee em
ND-60.197.01
76 ETHERNET BASIC SOFTWARE Installation & Loading of User Programs.
| INSTALLATION OF SYSTEM SOFTWARE
This procedure is described in more detail in the Program Description sheets (PD-sheets), delivered with the system software.
Observe the following when installing the software:
- one or more Ethernet Interfaces (ND 863) have to be installed.
- the whole procedure must be run under user SYSTEM.
- even though the patchfile delivered with the PIOC operating system
(PIOCOS) has been run, the following procedure must be followed:
1. Run the ENBAS-IPATCH-AOO:MODE file delivered with the Ethernet Basic Software floppy. 2. Copy XCOM-D4:PROG and INSTALL-ENBAS:XCOM from the first floppy to any user. 3. Perform the following procedure: @(<username>)XCOM-D4 (<username>) INSTALL-ENBAS : KXCOM fa ENBAS - Version: AOO - 1984-12-20 INSTALLATION PROGRAM FOR ETHERNET BASIC SOFTWARE »Initial installation (Def.NO)? YES »Ethernet Basic Software files will be copied from floppy. >» Specify destination user(Def.UTILITY): <username> > Insert floppy 10852A00 in floppy 1 station O and type "CR". 4 --)> Copying from (10852A00-1:FLOPPY-USER) ENBAS-SUPER-AOO: BRF ~-) to (<Username>)ENBAS-SUPER-AOO: BRF --) Copied. --> Copying from (10852-1:FLOPPY-USER) ENBAS-XT-AO0:DSEG --)> to (<Username>) ENBAS-XT-AOO: DSEG --)>) Copied. >» Directory 10852A00 released. (Continued on the following page) ND-60.197.01ETHERNET BASIC SOFTWARE 77 Installation & Loading of User Programs.
Remove PrOPPy 10852A00 from floppy station 1 unit o and type a “ CR ib . > Generate with Configuration Test (Def.NO)? <yes/no> a > Ethernet Interface 0 installed (Def.NO)? <yes/no> + > Ethernet Interface 1 installed (Def.NO)? <yes/no> a > Ethernet Interface 2 installed (Def.NO}? <yes/no) 4 » Ethernet Interface 3 installed (BDef.NO)? <yes/no e+ > Specify output file (Def. INSTALL-ENBAS-LIST): <filename> J MODE JOB TO INSTALL ETHERNET BASIC SOFTWARE STARTED
- @START-ENBAS
(Load the system software to the Ethernet interface.)
The following is written on the system console when only the Ethernet interface 0 is installed:
ENBAS - Version: AOO ~ 4984-12-20 ENSU: Ethernet Supervisor
activated. ENSU: ~Ethernet Interface O installed. ENSU: Ethernet Interface loaded, started and attached to error port.
- @START-ENBAS a
(Restart the system.)
- @STOP-ENBAS _
(Unload and stop.)
ND-60.197.01
ETHERNET BASIC SOFTWARE aD ~
ND-60.137.01
ETHERNET BASIC SOFTWARE
APPENDIX 0
COMPLETE PROGRAM EXAMPLES (PLANC s FORTRAN) .
ND~60.197.0%
ETHERNET BASIC SOFTWARE
ND-60.197.01 ETHERNET BASIC SOFTWARE
ay
Complete Program Examples (PLANC & FORTRAN).
{- - +e eee ee ee ee ee eee we eee nee ee 7
Z SIMPLE ECHO TEST PROGRAM FOR PLANC ROUTINE INTERFACE Z
v4 t Tne program establashes contact with server, sends a frame ane f
z waits for echo a specified number of times, gets statistics i
Z and finally closes the connection to server. i
i ee ee ee ee ee ee eee ee 1
MODULE example
Peccween---- Definatians & Imports ----- 2 ene eee ee re ee ee we eee]
CONSTANT poolSize = 2 7 number of userbuffers
CONSTANT bufferSize = 41024 Zz size of nuffers
SENCLUDE (ETHER) ENBAS-HP:OEFS
SINCLUDE (ETHERS EMBAS-HP:ITMPY
{---e------- Global varlables------~-------+---
2-2 eee ee nn ee ee eee i
INTEGER? ARRAY: ENUTstack{(G: 1000} Zz stack
BYTES ARRAY :
ENUTpool(G:poo0liSize-1,0:buffersize-1}
INTEGER? : thistthernet 2 Ethernet Interface number
BYTES > thisSystem(1:0) i default 15 local system
pe c ee --ewn- Improved inout/outout functions ~----- <0 eet on er ee renner nee i
ROUTINE VOID VOID{ BYTES) -outtewt(text}
eutput{1,
A’, text)
ENDROUTENE
ROUTINE VGIO VOTO(BYTES BYTES INTEGER2Z): outinteger(text,
fieldlen, value)
outtext text
output(t, fieldlen, value)
ENGROUTINE
ben cc ree ee re et ee ee we we eee ae oe ee ee ¢
ROUTINE VOLO VOTD( BYTES BYTES, INTEGER¢} :outintegeritexc,
fieldlen, value)
outtext text
ovtoue(1, faeldien, value}
ENDROUTINE
ee wre ee ee ee Lae PR ee ee ne - ee ef
ROUTINE VOTO ,VOTO(BYTES, ,INTEGER2 WRITE) :getintegerfpsrompt ,paramvalue)
outtext prompt
raputcdd,
Lté’ ,paramyalue)
ENDROUTINE
f-~------ i - om we RR ee eee - eee ee t
ROUTINE VOID, VGEOCBYTES INTEGER WRITE}: getinteger{loromot, paramvalue})
outtext prompt
saput(t,' 11s’) paramvalue)
ENDROUTINE
a TERMINSTE USE GF SERVER -------+------
ee ene een nee re ee i
ROUTINE VOYO,VOIO : exterm
ERUMDE : thisOef
INTEGER2 : status
AQBR thasSystem =: thisdef ENUMDEsystem
tarséthernet =: thisdef ENUNDECioc
2 x; thasdef. ENUMDEaddress
ENHPdetach(thisDef} =: status
TF status >< ENUNOk THEN
outinteger( S$Error 10 detach: °,'15'
, status)
ERDIF
ENOROUTINE
Pesce reer ee eee ere ee INITIALIZE USE GF SERVER -22---- +e rere ern ee errr reer ee £
ROUTINE WOTD, INTEGER? : exinit
ENUMBE » thisdef
INTEGER2 +: status
getinteger{ SLocal Ethernet Interface: © ,thasttnernet}
ADOR thasSystem =; thisdef.ENUMDEsystem
thisithernet 2: thisdef. ENUMDEpioc
2 ze: thisDef ENUMDEaddress
ENMPattacnh(thisfef) =: status
IF status >< ENUKok THEN
outintéeger( SError ian attach: °,’15' status}
ENOLF
thisBef ENUMDEserver RETURN
ENOROUTINE [n- e A ee ee ~~ oe eee eee ee GET STATISTICS FROM SERVER ~-------~----~--~-~-------- i ROUTINE INTEGER2 VOTO : exStat EMUMSTperlser : thasStat INTEGER? « returnStatus
-t =; returnStatus
BO WHILE returnStatus »<¢ ENUHok
ENMPgetStatistacs(TRUE a, thisStat) =: returnStatus
ff returaStatus = ENUMok THEN
OuUtinteger ('S§Total successful transmissions : °“,'342' thisStat.ENUMSTtransmittad)
outinteger (‘$Transmitted after one collision : ','al2' thisStat.ENUNSToneCollisior
outinteger (‘STranamitted after multiple coll.: ‘,'142' thasStat. ECXUMSTmulticollisy4
outinteger {'$Aborted tramsmissions fexcess) : ','a12' thasstat. ENUMSTaborted)
outinteger ( $frames received and sent ta user; ©, a2) thisstact. ENUMSTreceived)
outinteger (‘S$ Oropped since no user request > 0, 342) thasStat. EXUMSTdropped}
outinteger { SReceived with bad CRC : 7 292° thasStat ENUMSTercErrors }
outinteger {(' $0ctet alignment errors 5°, at? thisStat ENUMSTalignErrors}
ELSE
outinteger( S$f€rror in statastics: ',‘i5' returnStatus}
ENOUF
ENDDS
ETHERNET BASIC SOFTWARE Complete Program Examples (PLANC & FORTRAN). Pon en ee t i HAIN PROGRAM i é a meeee ee ck ee ee eee ee 7 PROGRAM : example INTEGERS ; arSent,arToaSend ENUMNDsystemNumber : destSystem,sourcesSysteam ENUMRGaddress : destPhysical, sourcefhysical INTEGER2 : norSentNoEcho interval, status, thisServer, framServer , dummy ENUHAD : destination, source ,gumbast ENUNTOS : thisTimeout ENUMEYV > thistvent BOOLEAN +: sendOk INTEGER2 POINTER : outGatagram Z pointer to bytes in same Locatian INTEGERZ : minut, mardut BYTES POINTER : cutOataPntr = cutDatagram,inBataPntr INISTACK ENUTStack outtext (> $---------------- ECCO-EXAMPLE ---22--- ee eee reer} exInit =: thisServer Z inkthalize server connection getinteger{ S$Total number to send: ‘ nrtoSend} getinteger( $Progress report interval: °,iaterval) getinteger{ SBestanation NO number: ‘,destSystem) 2 2: destPhysical Z destination physical user ENMPnumber ToAddress{destSystam,destPhysical destination} 7 convert to 48 bit d initialize timeout recard i =: thisTimeout .ENUMTOnumber;: seconds =: thisTimeout. ENUMTOtype d initialize datagram ADOR (ENUTpool (0)) =: ogutBataPntr 7 = outdatagram $023 =: maxdut Z set fixed length of dummy datagrams qZ amitialize variables aos: mrSent; @ +: nvrSentNoEcha: TRUE =: sendOk i Give one buffer for echo frame ENMPogive@uffer(ADOR(ENUTpooL(T}! dummy] =: status TF status >< ENUMHOok THEN outioteger{ SError in give buffer: ‘,°35°> ,status) FALSE =: sendok ENOITF DO WHILE sendOk AND [nrSent < nrtToSend) AND [nmrSentNoEcho <« 16) TF ((nrSent MOD interval} = 0) AND {arSant >< 0) THEN outinteger ('Sframes sent and echoed: |, '18' ,arSent} ENOLF ENHPsendDatagram(autDatafnir, thisServer,destination) =: status 1F status >< ENUMOk THEN outinteger( $frror 1m send: |. °A5' , status} FALSE =: sendOk ENDIF i awaiting Echo ENUManyévent =: thaisEvent.&NUMEVbits ENMPwait(indataPotr, dummy, fromServer,dumbest, source, thisTimeeut ,thistvent) =: status TF status = ENLMok THER TF BIT(this€vent ERUMEVbits ,ENUHEVrr) THEN 7% datagram received LF fromServer >< thisServer THEN outtext('$€rror. Message via unexpected server, ‘3 ELSIF NOT ENMPaddressToNumber (sourceSystem, sourcePhysical,source} THEN outtext('S€rror. Source is mot a NB system. °) ELSIF sourceSystem >< destSystem THEN Duttext(’ SError. Not expected source.’) ELSE 7% ak echo frame 0 =: nrSentNoFcno ¢t clear number cf timeouts nrSent *« 4 2: mySent ¢ increase number echoed ck ENDIF ENMPoiVveBuUTfer{ADDR(ENUTpool(i)}, dummy) <=: status IF status >< ENUMok THEN outinteger( SError in give buffer: |, °i5' status) FALSE 2: sgenddk ENOTF ELSIF BIT(thisEvent. ENUMEVbits, ENUNEVtO) THEN nrSentNoEcho + t =: arSenthoEchoa outtexti S$Timeaut’ } ELSE outtext ('Error. Server has died or unknown event} FALSE =: sendO0k ENOLF ELSE ovtinteger( SError in wait: °,'i4’,status} FALSE =; sandOk Z Bon’t continue sending ENDIF Z response (wait) status ENODO % sendaK thisServer exStat ¢ Get and print statistical information exTerm Zz Terminate connection with server outtext [ G---+---- +227 - ee ee ee ne re ee nn ee ee ee ee eee i) ENOROUT INE ENGMODULE Yr ee -}
SEGF ND-60.197.01 ETHERNET BASIC SOFTWARE Complete Program Examples (PLANC & FORTRAN).
FORTRAN
OR ee
Cc SIMPLE ECHO TEST PROGRAM FOR FORTRAN ROUTINE INTERFACE c
c * The program establishes contact with server, sends a frame c
Cc and waits for echo. a4 specified number of times,gets Cc c statistics and finally closes the connection to server c
SUBROUTINE getint (prompt, value)
CHARACTER * (%) prompt
INTEGER value
WRITE(1.°(3X,/,*$*,A)°) prompt
READ (1,*) value
RETURN
END
Cn = 2 2 oon nn ee oe nen nnn nn nn ee nn nn nn een nn en ne ee ee een een ee eee c INTEGER FUNCTION exAttach EXTERNAL ENMFattach INTEGER ENMFattach,mylog,retStat,mySer CHARACTER * 32 piocSys COMMON /EXCOMMON/ piocNumber INTEGER piocNumber CALL getInt (‘Server Interface: ',piocNumber}) mylog = 2 retStat = ENMFattach(piocSys(1:0),piocNumber ,myLog,mySer} IF (retStat .NE. ENUMok) THEN WRITE(1,*) ‘Error in attach: “,retStat END JF exAttach = mySer RETURN END C--- eer er eee ee en re nr es re rr ee rr et ent C SUBROUTINE exDetach EXTERNAL ENMFdetach TNTEGER ENMFdetach,retStat,mylog CHARACTER * 32 piocSys COMMON /EXCOMMON/ piocNumber INTEGER piocNumber myLog = 2 retStat = ENMFdetach(piocSys{(1:0) ,piocNumber ,myLog) IF (retStat .NE. ENUMok) THEN WRITE(1,%) ‘Error an detach: °,retStat END IF RETURN
SUBROUTINE exStat(myServer)
SLIST OFF SINCLUOE (ETHER) ENBAS-MF:ODEFS SLIST ON EXTERNAL ENMFgetStatistics INTEGER ENMFgetStatistics, retStat ,myServer INTEGER * & counters(O:ENUMLEsStatistics-1) LOGICAL clearCount clearCount = .TRUE. retStat = ENMFoetStatistics(clearCount ,myServer,counters) IF (retStat .€0. ENUMok} THEN WRITE (1,%) ‘Tot. transmit: ',counters(ENUMSTtransmitted ) WRITE (41,%) ‘One Coll. : ',counters(ENUMSToneCollasion ) WRITE (1,) ‘Multi.Coll. : °,counters(ENUMSTmultiCollision) WRITE (1,7) “Aborted : ',counters(ENUMSTaborted ) WRITE (1,) “Receives : ', counters l(ENUMSTreceived ) WRITE (1,) "Oropped ; ‘,counters(ENUMSTdropped ) WRITE (4,) "CRC errors : °,counters(ENUMSTcrcErrors } WRITE (1,#) ‘Align.errors: °,counters(ENUMSTalignErrors ) ELSE WRITE (1,%) “Error in statistics: ,retStat END IF RETURN END
ND-60.197.01
ETHERNET BASIC SOFTWARE Compleblo Pioegiae Mxamples (PLANC & FORTRAN) € emer Ae me ee ee ee ee ee ee ee ee é
PROGRAM TESTER
SLIST OFF
SENCLUDE (ETHERJENBAS-HF:OEFS
SUXST ON
EXTERNAL ENMFgive@utfer, ENMFsendDdDatagram, ENMFwalt
EXTERNAL ENMFgetStatistics
EXTERNAL ENMFoumberTodAddress ,ENHFaddressToNumbter
INTEGER ENMFoivebuffer, ENMPsendDatagram, ENMPwaLlt
INTEGER ENMFgetStatastics exAttach
COGICAL ENNFnumberTodAddress ENMFaddressToNumber
INTEGER neTaSend interval orSent, rest
INTEGER nmrSantNoeche retStat,thisServer
INTEGER inBed(1:650) ,cuteuf(1:650). theNumber . thePhysical
LOGICAL sendodk,adoreasok
CHARACTEP * 6 destination, suurce
INTEGER this8uf(0: ENUMLEbuffer-t)
INTEGER thasTimeout(:ENUBLEtime-1}
INTEGER this€vent(O:ENUMLEevent-1}
INTEGER pracNumser
COMMON /EXCOMMON/ piocNumber
WRITE (1,%}) | -------2+-e%5%----- ECHO-EXAMPLE--- ~- 252-0
--- ee ee ‘
thisServer = exAttach(}
CALL getint ('Tatal number to send: ° .mrToSead)
CALL getini (‘Progress interval: °,interval}
CALL getint ('Destinatian ND system: “, sestSystem)
sendok = ENKFnumberToAddress(destiystem,2,destinatiran)
{Ff (.NOT. sgendak} TREN
WRITE {1,7} ‘Error in number to address °,retStat
END TF
1 Give ome buffer for echo frame
thistuf (ENUMBUOffset) = 0
this®Buf (ENUMBULength}) = 5174
thisGuf (CNUHBUrdentifrer) = 1234
thasTameoutlENUMTItime) = 3
thistTimeoutiE€NUeTlunit) = ENUMsSeconds
thasEvent{ENUMeVoits) =< ENUManyEvent
retStat += ENMFoiveGuffer(ainguf, thisBut}
YF (ratStat .NE. ENUMok) THEN
WRETE (1,*} ‘Error in give “,retStat
sendQk = FALSE.
ERD LF
mrSent = 6
nrSentNotcha = 0
DO WHILE ({sendOk}) .AND. (nrSent .LT. nrToSend}
+ -AND. (mrSentNoEcho . LT. 10}}
yest = J2@MOO(nrSent interval}
IF (rest .E€@. &} THEN
WRIYE (1,*) ‘frames sent and echoed: © ,arSent
END LF
thisBuf (ENUHBUcHfset} = 6
thisBuf (ENUMBULength} = 514
thisBbudi ENuUMBUserver} = thisServer
retStat = ERMFsendDatagram(outBuf,
‘ thisBuf,dastinatironit:6))
IF fyetStat .NE. ENUMok} THEN
WRETE (4,*}) ‘Error in send °,retStat
send0k = . FALSE.
END YF
retStat = ENNFwaat{(this®@uf,thebest, theScurce,
4 thisTimeout ,thisfvent}
IF tretStat .€Q0. ERUMok} THEN
IF (T@YT{ thisEventlENUMEVbitsEvent),
4 ENUMEVrecelved) .€9. -14} THEN
addressOx = ENNFaddressToNumber(theNumber,
+ thelLogical.theSource!}
IF (,RQT, addressd0k) THEN
WRITE (1,%) “SOURCE IS NOT NG SYSTEM:
sendGk = , FALSE.
ELSE
nrSentNoEcho = &
nrSent = mrSent + 1
thisBuF{ENUMBUoffset) = G
thisBut(ENUMBUlength} = 511
thasBuof{(ENUMGUidentifier) = 1338
retStat = ENMFgiveButfer(inBuf, thisBuF)
IF t{retStat .NE. ENUNoCK} THEN
WRITE (¢.*) “Error in gave |, ,retStat
send0¥ = . FALSE,
END F
ENO TF
ELSE YF (YBITithasEvent (CRUHEVbitsevent),
4 ENUMEVtimeocut) .£@. -1) THEN
erSentNotcho = nrSentNoEehno + 1
WRITE {4,.%}) ‘Timeout’
ELSE
WRITE (4,*1} ‘Server has died or unexpected event
END TF
ELSE
WRIYE (1.4%) (Error in wast: “,retStat
END JF
END BO
CALL exStab(thisServer}
CALL exBetach(}
WRITE LL, 6) 0 anew wee nn ee nee ee ee ee eee ee ,
END
C a ETHERNET BASIC SOFTWARE Index
aadress conversion 2... 2... ee ee, 5B, 5B. string 2 2 2. we ee eS address-to-ND wumber-planc . . 2... 2... lL 4, address-to-number-fortran . . 0...) 8B addressing . 2... . ew application level . . 1... Coe ee A, assistant . 2... ee 5G, attach record . . 2... ee BF, attach to server fortran . . 2... ......,.. . ~~, 46, attach-to-server-planc .......... ,.. 4... 27. aWait-event-planc . 2. 2 2. 8, broadcast address ...... ee bus topology . . . .. 2... ee, ee BE configuration SEYVeD 2 0. 2 ee ee BO, test 2... ee ee ee BG, configuration test server-process ........,. .. 40. CSMA/CD 2... eB datagram 2 2. 2 ee eG, NS, DCB 2. 1G, fe DCBS 2. 1B BCE 2 ee A, declare user buffer fortran ...........~, . 43. declare-user-buffer-plane . 2... . DA, define-multicast-address . ...........,.. . 50. define-multicast-plane . 2... 2... BT: detach record. .........0. BF, detach-from-server-fortran . .......,... . 48. detach-from-server-planc . . .... 0... BE, device-control-blocks . 2... 2... HBS Digital 2 2 2... BE enmfaddresstonumber . . 2... 2... 8B, enpmfattach . 2. 2... ewe ee 4G, enmfdetach . 2... 2. ee 4B, enmfgetstatistics . 2... AS, enmfgivebuffer 2. 2... 2... 4B ENMPnewMulticast 2... 2... 2. 88, enmfnumbertoaddress . 2... 2... ee 8B, ENMFremoveMulticast . 2... ... 5 eamfsenddatagram . . ......02.¢2~02~«C~2~C a A, enmfwait 2... 2... ee A, enmpaddresstonumber . . . .... ee OB enmpattach . 2...) BT enmmpdetach . 2... we BF, enmpgetstatistics . 2... 2... BO. enmpgivebuffer 2... . 2... ee ee ee BAL enmpnewmulticast . 2... we ee ee BF. enmpnumbertoaddress . . .. . . ee ee BD. enmpremovemulticast 2. 2. 2. 2... ee BD. enmpsenddatagram . . ... .... ee, 28, enmpwaito 2... ee ee BB,
ND-60.197.07
&6 ETHERNET BASIC SOFTWARE Index
error numbers ethernet controller envelope interface master - oe ethernet media-access event record - . get-server-statistics- fortran . get-server-statistics-planc HDLC [EEE 802 Intel Loe ak link-level-process Link-level-protocols loading programs Loopback to. management-process MC 68000 media access medila-acces-process media-access-process media-user-process Megalink modem .. . multicall facility multicast address NDB-863 ND-number-to--~address- ‘plane. ND-system-number network control | number to-address fortran physical level PIOC PLOCOS polnt-to- point “networks pool of-descriptor-blocks presentation level primitives . process controll protocols DIX TEEE NDB uSEX pseudorecords Lo remove-multicast- -address remove-multicast-fortran 50, 54. remove-multicast-pianc 32. return status 38. routing
ND-60.497. O07
ETHERNET BASIC SOFTWARE 87 Index
send-datagram-fortran 41, 42. send-datagram-planc 23. server ; service point 16, service-pionts service-point-queue session level software installation statistic record status-from-calls status-from-routines-planc suspect tester . timeout record transport level type definitions user process .... user-provided-buffers volLce communication wait for-event-fortran RELOK rn Xerox-defined-values XMSG
ND-~60.197.03
sasaveeeseees SEND US YOUR COMMENTS!!! .osceeceensees
Are you frustrated because of unclear information in
this manual? Do you have trouble finding things?
Why don’t you join the Reader’s Club and send us a
note? You will receive a membership card — and
an answer to your comments.
Please let us know if you * find errors * cannot understand information * cannot find information * find needless information Do you think we could improve the manual by rearranging the contents? You could also tell us if you like the manual!
sereceeennee HALELP YOURSELF BY HELPING US!! cascsnasnnne
Manual name: ETHERNET Basic Software Programmer Guide Manual number: ND-60.197.01
What problems do you have? (use extra pages if needed)
Do you have suggestions for improving this manual ?
Your name: Date:
Company: Position:
Address:
What are you using this manual for ?
NOTE! Send to: This form is primarily for Norsk Data A.S : — documentation errors. Software and Documentation Department system errors should be reported on P.O. Box 25, Bogerud Norsk Data’s answer will be found Customer System Reports. 0621 Oslo 6, Norway on reverse side Answer from Norsk Data
Answered by. Date
a re rete meme ewe eee ee ee ee ee eee eee ree te ewe tee me ewe eee ee meee wee we ee a ee es ee ee ee eee seas
Norsk Data A.S Documentation Department P.O. Box 25, Bogerud 0621 Oslo6, Norway - ; : - : a EtTaAMsS Wa Le. x THAT , 'CAl HLT halUa HNeOoOKnIeC Ld 7 ed he 4 Tre ia <>!
NORSK DATA A.S OLAF HELSETS VEI 5 P.O. BOX 25 BOGERUD 0621 OSLO 6 NORWAY “
EL.: 02 - 2954 00 - TELEX: 18284 NDN