📄 net_design.nr
字号:
connection oriented network service.The X.25 protocols are implemented in a coprocessormade by Eicon Technology, Inc.The device driver \fBecn\fR is the Unix kernel interface to thiscoprocessor.The sections that follow describe the glue and the \fBecn\fR devicedriver..sh 2 "The Glue".ppThe glue provides services to several modules in the kernel:.ip "Subnetwork service" 5is provided to other network layer protocols, such as CLNP (ISO 8473).The ARGO CLNP uses this service. The Internet IP could be made to use this service with minimal effort, because this service interface is made to looklike a standard Unix BSD link layer service (it hasa device driver interface)..ip "Network service" 5is provided to transport layer protocols, such as TP (ISO 8073).This service interface looks like a standard Unix BSD network service (a procedure call interface)..ip "Transport service" 5could be provided to the socket module. While this is not provided with the ARGO software, the glue is designed to permitsuch a service to be provided with little additional programming effort..ppHigher layer protocols that use a connection-orientednetwork or subnetwork service need to manage virtualcircuits in a similar fashion. Rather than put connection management functions into each higherlayer protocol (HLP) entitythat uses the CONS or COSNS,in ARGO the connection management is in one module, the glue.Other alternatives exist, for example in the OSI world,one may place in the TP entity the function of connection management for TP,and implement a network connection management subprotocolof the transport layer (ISO 8073 DAD1, NCMS). In addition, connection management for CLNP may be implemented as part of the CLNP entity.A subnetwork dependent convergence protocol (ISO 8878/A) maybe implemented to support connection management for CLNP.The approach taken in ARGO is different from those suggested in ISOfor two reasons.First, ARGO aims to minimize the amount of code written to perform a giventask.Second, ARGO has several coexisting paths through the network layer,which the ISO approach does not address.For example, in both ISO 8878/A and in NCMS it is assumed that ifan incoming call arrives from NSAP \(*b while a call to NSAP \(*b is being placed,the two calls are resolved to one virtual circuit.This is not feasible in the ARGO scenario, since it may not be knownuntil afterthe calls are established and higher level packets are exchanged whether the two calls are to be usedfor the same path and for the same higher layer protocols.A possible alternative approach is to use an NSAP-address for each paththrough the network layer(or protocol suite).This was rejected in the ARGO design because it puts the burdenon the calling application entity or network entity to determine the proper NSAP-address to use to determine the protocolsuite to be used to reach the destination end system.For this reason, none of the approaches suggested in ISO is adoptedhere..ppThe glue provided in the ARGOkernel does not provide the full OSI network service.It provides that subset of the network service that is usedby ARGO TP and by ARGO CLNP.The OSI connection-oriented network service elements that areare provided are described in Chapter Four,in the section titled "Connection Oriented Network Service"..ppEach module using the glue has its own serviceinterface to the glue..\" When X.25 is used as a .\"transport service, the standard protocol switch table is used, and the procedure.\"\fIcons_usrreq()\fR is the protosw entry for a.\"service in the iso protosw table that provides the .\"SOCK_STREAM abstraction in the AF_ISO address family,.\"with protocol ISOPROTO_X25..\"This service is called XTS in the glue code and hereafter.\"in this document..\".ppWhen the transport layer uses the glue as a network service,the interface is the procedure.(b\fC.TStab(+);l s s s.error = cons_output( isop, m, len, isdgm ).T&l l l. +struct isopcb +*isop; +struct mbuf +*m; +int+error, len, isdgm;.TE\fR.)b.ppWhen the network layer uses the glue as a subnetwork servicethe interface is the device driver-like procedure.(b\fC.TStab(+);l s s s.error = cosns_output( ifp, m, dst ).T&l l l. +struct ifnet +*ifp; +struct mbuf +*m; +struct sockaddr_iso +*dst; +int+error;.TE\fR.)b.ppWhen the glue is used as a connection-oriented service (i.e., by TP 0, and by TP 4 during the transport connection establishment phase, during whichit is not yet known whether class 0 or class 4 will be used)the following procedures are used:.(b\fC.TStab(+);l s s s.error = cons_openvc( copcb, dstaddr, so ).T&l l l. +struct cons_pcb +*copcb; +struct sockaddr_iso +*dstaddr; +struct socket+*so;.T&l s s s. +++error = cons_netcmd( cmd, isop, vc, isdgm ).T&l l l. +int+cmd; +struct isopcb +*isop; +int+channel, isdgm;.TE\fR.)b.ppThe procedure \fIcons_openvc()\fR places a call.The procedure \fIcons_netcmd()\fR accepts, rejects, or clearsa call. There is no incoming call indication, becausethe glue uses the passive open model for accepting calls.The HLP simply sees a new incoming packet, and is givena virtual circuit number (channel) along with the incoming packet.If the HLP chooses to reject the callit may do so, which will cause the virtual circuit (VC) to be cleared..ppThe glue may reject (clear) an incoming call for its own reasons.The following table lists the reasons that the glue mayclear a call and the ISO 8208 diagnostic code used on the X.25 clear packetin each case.For a complete list of the permissible diagnostic codes, seeFigure 14-B of ISO 8208..in -5.(b.TScenter expand box tab(+);l l.Reason+Diagnosic code=The VC was opened for use with CLNP +Higher level initiated resetor TP 4 and has been idle for the +user resynchronizationmaximum inactivity time. +(0xfa)_The HLP closed +Higher level initiated disconnectionthis network connection. +- normal (0xf1)_The HLP rejected +Higher level initiated connectionthis network connection. +rejection - transient condition (0xf4)_The X.25 call packet contained +Higher level initiated connectionfacilities that are not supported +rejection - incompatibleby the glue, or did not contain +information in user data (0xf8)necessary information, e.g. calling + or called DTE address. +_The X.25 call packet contained +Higher level initiated connectioncall user data that does not +rejection - unrecognizable protocolindicate any HLP supported by ARGO +identifier in user dataHLP supported by ARGO +(0xf9)_The given destination +OSI Network service problem: NSAPNSAP-address is not supported +address unknown (permanent +condition) (0xeb)_The X.25 packet or a facility +Packet not allowed-therein was too long +packet too long. (0x27).TE.)b.in +5.ppThe glue provides several functions common to all modules (HLPs) that use the glue.Regardless of the HLP,the DTE addresses and NSAP addresses are associated in the same manner.One same network layer protocol identification scheme(ISO PDTR 9577) for all HLPs.Several different HLPs need to close inactive X.25virtual circuits after a timer expires.The glue insulates the device driver interface to the X.25 coprocessor from the HLP..ppTP class 0 connections.\" and the X.25 "transport service" do not share X.25 VCs.\" with each other or among transport service-level circuits (sockets), so.\" these two modules need to keep X.25the glue needs to maintain a 1-1 correspondence between VCsand sockets..\" For use by TP 0 and XTS,For use by TP 0, one network-level pcb is needed for each socket, and that is a\fIcons_pcb\fR, described below..ppTP class 4 connections may share VCs, and TP 4 makes no correspondence between sockets and VCs.CLNP regards VCs similarly to TP 4.A given VC may be used simultaneously for many higher level connections,but all higher level connections using a given VC must use the samepath or protocol suite.In other words, a TP4 connection running over CONS may not share aVC with a TP4 connection running over CLNS/COSNS..ppTo manage VCs and to maintain the separation of sharable and non-sharableVCs, the glue uses the following protocol control block:.(b\fC.TStab(+);l s s s.struct cons_pcb {.T&l l l. +struct isopcb+_co_isopcb;+u_short+co_state; +u_char+co_flags; +u_short+co_ttl;+u_short+co_init_ttl;+int+co_channel;+struct ifnet+*co_ifp;+struct protosw+*co_proto; +struct dte_addr+co_peer_dte;+struct ifqueue+co_pending;};.T&l l s.#define co_next+_co_isopcb.isop_next#define co_prev+_co_isopcb.isop_prev#define co_head+_co_isopcb.isop_head#define co_laddr+_co_isopcb.isop_laddr#define co_faddr+_co_isopcb.isop_faddr#define co_lport+_co_isopcb.isop_laddr.siso_tsuffix#define co_fport+_co_isopcb.isop_faddr.siso_tsuffix#define co_route+_co_isopcb.isop_route#define co_socket+_co_isopcb.isop_socket}+.TE\fR.)b.ppThe \fIcons_pcb\fR containsan \fIisopcb\fR so that TP 0 .\" and XTS may use the routines that manipulate \fIisopcb\fR structures for allocatingand deallocating PCBs, binding addresses to PCBs,and finding routes..ppA CONS PCB has states CLOSED, LISTENING, CLOSING, CONNECTING, ACKWAIT, and OPEN.This represents the state of the VC to the degree necessary to the glue.The glue uses the passive open model for opening VCs.The coprocessor device driver always acceptsincoming calls and passes an indication to the glue whena call is accepted by the coprocessor.If the user of the glue (the HLP) or the glue itself decidesthat the VC is not desired, the VC is cleared..ppThe \fIcons_pcb\fR contains a bit mask, \fIco_flags\fR, with values:.(b\fC.TStab(+);l l l l.#define+CONSF_OCRE+0x40+/* created on OUTPUT */#define+CONSF_ICRE+0x20+/* created on INPUT */#define+CONSF_DGM+0x04+/* for datagram use only */.TE\fR.)b.ppThe flag CONSF_DGM means that the VC is being used to provide adatagram (connectionless, unreliable, unsequenced) service to the higher layer, and that requests for additional VCsfrom the same higher layer entitymay be served by this VC, effectively multiplexing higher layer connections on this VC.When this flag is set in a \fIcons_pcb\fR, there is no associated\fIco_socket\fR pointer.When CONSF_DGM is not set, there is an associated\fIco_socket\fR pointer, and the VC is being used forTP 0..ppThe flag CONSF_ICRE means that the VC was created by and incoming call indication.The flag CONSF_OCRE means that the VC was created on behalf of an outgoing call request..ppThe \fIstruct dte_addr\fR field, \fIco_peer_dte\fR,contains the peer's DTE address.The glue locates VCs by searching the list of protocol controlblocks for a PCB with a DTE matching that desired..ppThe glue is given an NSAP-address by the HLP entity.The glue finds the desired DTE address by searching theES-IS SNPA cache for an SNPA-address (DTE address) associatedwith the NSAP-address given by the HLP entity.This means that to use the CONS, an entry for each desiredpeer must appear in the SNPA cache.ARGO does not provide the ES-IS protocol for use with ISO 8208, so"permanent" or static entries must be placed in this cache by hand,using the utility program \fIclnlutil\fR..ppWhen an incoming call is accepted, the peer's DTE address isplaced in the SNPA cache along withan NSAP address generated as follows:.npIf the incoming call contained the peer's NSAP-addressin an Address Extension Facility (AEF, available with 1984 X.25),this NSAP-address is used, otherwise.npthe glue creates a "type-37" address (the format defined by AFI 37in ISO 8348/AD 2)..ppTP 4 can have its outgoing packets sent on more than one VC.The glue presently contains no mechanism for fanning outgoingpackets onto several VCs, however,it does not prohibit packets arriving for TP 4 on any VC that opened with the protocol identifier for TP..ppThe glue has the ability to generate AEFs on outgoing calls, butthis ability is turned off,since the public data network on which ARGO runs at Wisconsindoes not support 1984 X.25, and so it rejects packets containingAEFs.The use of AEFs can be reinstated by making a kernel with the option \fBX25_1984\fR or by adding the line.nf.in +5\fC#define X25_1984\fR.in -5.fiat the top of the file\fC/sys/netargo/if_cons.c\fRand rebuilding the kernel.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -