⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eicon.nr

📁 早期freebsd实现
💻 NR
📖 第 1 页 / 共 2 页
字号:
.sh 2 "X.25 Public Data Network Support".ppThis ARGO release includes support for an X.25 Public Data Network (PDN)in the form of a device driver for the Eicon TechnologyNetwork Adapter \**..(fThis adapter, its software, and its documentation areavailable from Eicon Technology Corporation, 3452 Ashby Street, Montreal,Quebec, Canada H4R 2C1..)fThe adapter and its software, together withthe ARGO \fIecn(4)\fR driver, implementthe X.25 packet layer protocol as required to support the OSI connectionoriented network service.The remainder of this section of this manualdestribes the ARGO device driver (hereinafter called "the driver")for the Eicon Technology Network Adapter (hereinafter called "the adapter"),the interface between the driverand the CONS software described above, and the interfacebetween the driver and the software on the adapter..sh 3 "Software Modules".lpThe modules relevant to the design of the driver are listed below..ip "\fICONS -\fR"The Connection Oriented Network Service (CONS) provides the upper ISO layerswith an interface to the PDN. In this release,the PDN is 1980 X.25, although support for 1984 X.25 is included.CONS can receive requestsfrom the CLNP entity andfrom the OSI transport entity.In addition, the CONS module supports \fIioctl()\fR commands used by \fIifconfig(8)\fR to configure the X.25 network address and todeclare the adapter to be up or down. See \fIcons(4p)\fR..ip "\fIDriver -\fR"The driver accepts commands from CONS, formats these commands for the adapter, and interprets error indications delivered by the adapter.  This driver supports all the UNIX configuration device structures. See \fIecn(4)\fR..ip "\fIEcnconf -\fR"\fIEcnconf\fR is a program that allows the privileged user toreconfigurethe options offered by the software on the adapter. \fIEcnconf\fR can be run at any time. See \fIecnconf(8)\fR..ip "\fIEcnload -\fR"\fIEcnload\fR is a program that downloads Eicon Technology softwareto the adapter and passes the configuration changes made with the \fIecnconf\fR program to the driver. \fIEcnload must be run only when the X.25 link is considered down\fR.See \fIecnload(8)\fR. .ip "\fIEcnstat -\fR"\fIEcnstat\fR is a program thatprints the connection state information and counters kept bythe adapter and by the driver.The statistics include the number of sends and receives,active connections, and errors.For more information, see \fI ecnstat(8)\fR..ip "\fIAdapter -\fR"The adapter's interface to the driver is the Network ControlBlock and Request Vector that exist within the adapter's shared memory (oftencalled the "Common Data Area").This is described in detail below..sh 3 "Interactions Among the Modules".lpThe commandspassed between CONS and the driver can be any one of the \fIECN\fRcommands outlined in thesections "ECN Requests" and "ECN Replies", below.CONS uses the \fCecnrestart()\fR procedure for restart requests,\fCecnshutdown()\fR procedure for shutdown requests, and \fCecnoutput()\fR procedure for allnormal data transfer requests. CONS uses the \fCecnioctl()\fR procedure call forservicing adapter status requests from the X.25 statistics program \fIecnstat\fR..lpCommands passed between the driver and the adapter canbe any one of the network control block (\fINCB\fR)commands described in the section "NCB Commands", below.All commands to and from the adapter arecommunicated in the Network Control Block and Request Vector withinthe adapter's Common Data Area..lp\fIEcnload\fR starts the Eicon Technology Network Adapter software on the adapterand downloads the validated configurationto the driver..sh 3 "ECN Requests".lpThe \fIECN\fR request types that CONS can pass to the driver are listed below..ip "\fIECN_STOP - (by calling ecnshutdown())\fR"This request instructs the driver to restart the network but not to listen for any incoming calls. CONS issues this request in response to an \fIioctl()\fR commandissued by the utility program \fIifconfig\fR, when\fIifconfig\fR is used to bring down the adapter..ip "\fIECN_RESTART - (by calling ecnrestart())\fR"This request instructs the driver to restart the network \fIand\fR to listen and accept any incoming calls. CONS issues this request in response to an \fIioctl()\fR commandissued by the utility program \fIifconfig\fR, when\fIifconfig\fR is used to bring the adapter up..ip "\fIECN_CALL - 0x90\fR"This request instructs the driver to placea call requestto the specified DTE..ip "\fIECN_CLEAR - 0x92\fR"This request instructs the driver to clear a given virtual circuit. All outbound data are acknowledged by the remote DTEbefore the circuit is cleared..ip "\fIECN_SEND - 0x94\fR"This request instructs the driver to transmit a data buffer across a given virtual circuit..ip "\fIECN_RESET - 0x04\fR"This request instructs the driver to reset the given virtual circuit andclear out all outstanding requestsassociated with that virtual circuit..ip "\fIECN_STATUS - 0xb4 (exclusively through ecnioctl())\fR"This requests instructs the driver to solicit the adapter's current connection state information andcounters..sh 3 "ECN Replies".lpThe \fIECN\fR responsesthe driver can giveto CONS are listed below..ip "\fIECN_CONNECT - 0x01\fR"This reply notifies CONS that the driver has established a virtual circuitconnection initiated by the remote DTE..ip "\fIECN_ACCEPT - 0x03\fR"This reply notifies CONS that an ECN_CALL request has succeeded. Thereply contains a pointer to a protocol control block..ip "\fIECN_REFUSE - 0x02\fR"This reply notifies CONS that a previous \fIECN_CALL\fR request has failed.The reply contains a pointer to a protocol control block..ip "\fIECN_CLEAR - 0x92\fR"This reply notifies CONS that a given virtual circuit has been clearedeither by the DCE or by the remote DTE..ip "\fIECN_RECEIVE - 0x95\fR"This reply notifies CONS that the driver has received a data packet fromthe remote DTE..ip "\fIECN_RESET - 0x04\fR"This reply notifies CONS that the virtual circuit has been reset eitherby the DCE or by the remote DTE..ip "\fIECN_ACK - 0x05\fR"This reply tells CONS that the associated ECN_SEND request has been beencompleted by the adapter..sh 3 "NCB Commands".lpThe driver hides from the CONS modulemany of the idiosyncrasies of the adapter's software interfaceby mapping many of the above \fIECN\fR requests into corresponding\fINCB\fR commands. Below is a list of requests that the driver can place tothe adapter. For each request that the driver places to the adapter, the adapterreturns with a command completion..ip "\fINCB_CALL - 0x90\fR"This command creates a virtual circuit. .ip "\fINCB_LISTEN - 0x91\fR"This command tells the adapter that our host iswilling to accept incoming calls. .ip "\fINCB_CLEAR (and NCB_ABORT) - 0x92\fR"This command clears a virtual circuit. An option exists to clear the circuitimmediately, without waiting first for outstanding acknowledgments..ip "\fINCB_SEND (and NCB_RESET) - 0x94\fR"This command sends data to the remote DTE. An option isavailable for resetting thevirtual circuit. This command can return a status indicating that thecircuit has been cleared by the DCE or the remote DTE..ip "\fINCB_RECEIVE - 0x95\fR"This command tells the adapter that our host iswilling to receive data on a given virtual circuit. This command can returnreceived data, a reset circuit, M-, D-, and Q-bits, interrupt packets,or a cleared circuit..ip "\fINCB_STATUS - 0xb4\fR"This command queries the adapter about the status of a virtual circuit.The driver uses this command to support the ECN_STATUS request..ip "\fINCB_RESTART - 0xb2\fR"This command restarts the network. This command requires that a correspondingconfiguration file be passed down to the adapter..bp.sh 3 "ECN Request and Reply Structure".lpBelow isthe data structure used in CONS-driver communications.This data structure is a parameter to the \fIecnoutput()\fR procedure.\fC.nf/* Eicon Driver Request Structure -- used between CONS and the driver */struct eicon_request {    struct ecn_ncb  eicon_req_ncb;   /* the network control block       */    caddr_t         eicon_req_pcb;   /* CONS pcb used on CALL requests  */    int             eicon_req_state; /* used internally by the driver   */    int             eicon_retry_cnt; /* used internally by the driver   */    int             eicon_more;      /* used internally by the driver   */    u_char          eicon_reason;    /* source of CLEAR requests        */};\fR.lpThe \fCeicon_req_ncb\fR field in the eicon request structure is oftype \fCecn_ncb\fR, defined in the following section. This structure stores the command blockthat the driver uses in communicating with the adapter. The command block contains a \fIlogical session number\fR (LSN),which identifies a virtual circuit.Requests such as ECN_CALL are made without an LSN to identifya circuit.When an LSN is not available, the request is identified bythe field\fCeicon_req_pcb\fR, which is a pointer to a CONS protocol control block. The \fCeicon_req_state\fR field is used by the driver to keep track of the status of the given request. The following list defines the various values for this field:.ip "\fIREQ_NEW\fR"The driver recognizes a new request, has placed the request into the driver's own request queue, but has yet to interrupt theadapter. (The driver maintains a pointer \fCecn_pending_req\fR that indicateswhether an interrupt to the adapter is outstanding. If one is outstanding, thedriver places any new requests in this \fIREQ_NEW\fR state. If an interrupt is notoutstanding, the driver places the request immediately in the \fIREQ_INTERRUPT\fR state defined below.).ip "\fIREQ_INTERRUPT\fR"The driver has dequeued the CONS request, assigned \fCecn_pending_req\fR topoint to the request, andinterrupted the adapter for a chance to post this request..ip "\fIREQ_POSTED\fR"The driver has sent the request to the adapter..ip "\fIREQ_COMPLETE\fR"The driver has just completed the request, and if necessary, is now posting it to CONS..lpThe \fCeicon_retry_cnt\fR field in the eicon request structure keeps trackof how many times the driver has tried posting this command to the adapter.After the second retry, the driver gives up and performs the appropriateerror routine. The \fCeicon_more\fR field defines a \fIRECEIVE\fR request thathas been re-posted to the adapter to take care of m-bit transfers.The \fCeicon_reason\fR field quantifies the reason for a connection beingcleared. These reasons are defined in the include file \fCiso_errno.h\fR..lpAny data associated with the request are linked to the request through therequest mbuf's \fCm_next\fR field. This is done so that whenthe driver calls the \fIMFREE_M\fR deallocation routine, both the request and the data are freed together..lpThe following chart defines those fields within the eicon request structurethat are relevant in any CONS requestto the driver via the \fIecnoutput()\fR call. .sp.sz 8.TScenter,box,tab(:);c s s s sc||c s s sc||c|c|c|cl||l|l|l|l.\fBField Definitions for CONS \(-> Driver Requests\fR_\fI:Request Types (CONS \(-> Driver)\fR\fIField:ECN_CALL:ECN_CLEAR:ECN_SEND:ECN_RESET\fR=\fIncb\(->command\fR:0x90:0x92:0x94:0x04 _\fIncb\(->loc_ses_num\fR:T{.naleave as zeroT}:VC #:VC #:VC #_\fIncb\(->info\fR:0x0:0x0:0x0:0x2_\fIeicon_req_pcb\fR:T{.naaddress of CONS' protocol control blockT}:NULL:NULL:NULL_\fIeicon_req_data\fR:T{.naaddress of mbuf containing contents of Call Request packet (including DTE address, facilities, and call user data)T}:T{.naNULL or address of mbuf containing contents of Clear Request packetT}:T{.naaddress of mbuf containing contents of user dataT}:T{.naNULL or the address of mbuf containing a one byte Reset Diagnostic codeT}.TE.sz 10.sh 3 "Structure of the Network Control Block (NCB)".lpThe \fCecn_ncb\fR structure is used by the driver tomake requests of the adapter. \fC.nf/* Network Control Block -- used between the driver and the Eicon adapter */struct ecn_ncb {    u_char      command;        /* command field                         */    u_char      retcode;        /* return code field                     */    u_char      lsn;            /* local session number                  */    u_char      info;           /* additional information                */    caddr_t     buffer;         /* pointer to data buffer's mbuf         */    u_short     length;         /* buffer length                         */    u_char      callname[16];   /* module name on NA "X25"               */    u_char      appl_name[16];  /* application name                      */    u_char      rxto;           /* receive timeout in secs               */    u_char      txto;           /* send(tx) timeout in secs              */    caddr_t     post;           /* NULL                                  */    u_char      lana_num;       /* specifies Eicon Tech NA               */    u_char      cmd_cplt;       /* command status                        */    u_char      reserve[14];    /* reserved area                         */};\fR.sp.lpThe chart below defines those fields that are relevant in anyreply passed by the driver back up to CONS..sp.sz 7.TScenter,box,tab(:);c s s s s s sc||c s s s s s c||c|c|c|c|c|cl||l|l|l|l|l|l.\fBField Definitions for Driver \(-> CONS Replies\fR_\fI:Reply Types (Driver \(-> CONS)\fR\fIField:ECN_CONNECT:ECN_ACCEPT:ECN_REFUSE:ECN_CLEAR:ECN_RECEIVE:ECN_RESET\fR=\fIncb\(->command\fR:0x01:0x03:0x02:0x92:0x95:0x04_\fIncb\(->loc_ses_num\fR:VC #:VC #:ignore:VC #:VC #:VC #_\fIncb\(->info\fR:ignore:ignore:ignore:ignore:T{.naInterrupt received (bit 0), D-bit set (bit 6), and/or Q-bit set (bit 7). Zeroinfo field implies a normal receive.T}:ignore_\fIeicon_req_pcb\fR:NULL:T{.naaddress of CONS's protocol control blockT}:T{.naaddress of CONS's protocol control blockT}:ignore:ignore:ignore_\fIeicon_req_data\fR:T{.naNULL or address of mbuf containing contents of Call Indication packet T}:T{.naNULL or address of mbuf containing contents of Call Connected data 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -