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

📄 errors.nr

📁 早期freebsd实现
💻 NR
字号:
.\"$Header: errors.nr,v 1.2 88/12/06 16:06:07 nhall Exp $.\"$Source: /usr/argo/doc/kernel/RCS/errors.nr,v $.NC "Error Handling"This section describes the various ways that the ARGO kernel handles errors.For the purpose of this description,errors are divided intothree classes : user errors, remote-end errors, and internal errors.These three classes of errors and the way the ARGO kernel handles them are described below..sh 1 "Network Layer Errors".ppThe following section describes how errors are handled by CLNP..sh 2 "User Errors".ppUser errors occur when attempting to send a CLNP packet. These errorsare reflected back to the caller of \fIclnp_output()\fR as the return valueof the function. The following table indicates the types of errors possibleand their associated return codes:.(b L.TStab(+), expand box;l l.Problem+Return Code=Unsupported option selected+EINVALIncorrect address+ENAMETOOLONGInsufficient \fImbufs\fR+ENOBUFSCan't route packet+ENETUNREACH,EHOSTUNREACHInsufficient \fImbufs\fR+ENOBUFS.TE.)b.sh 2 "Remote-end Errors".ppAn error that occurs as the result of incoming NPDUis a remote-end error.  .ppIn the case of CONS, the majority of these are addressing problems,PDN-generated errors (network or gateway congestion, number busy),or higher layer negotiation problems.All ISO 8208 diagnostic codes that may appear in a call clearing packetare passed up to the higher layer.Some of the higher layer protocols pass this error indication to theuser level program as well.The CONS statistics that are maintained by the "glue" moduleinclude counters for each of the possibleISO 8208 diagnostic codes seen on incoming packets.In addition to these error codes, there are some codes that may appeardue to device driver problems when an NPDU arrives, for example,the driver may run out of buffers.All possible errors that may occur in the CONS module are listedin the file\fC<netargo/iso_errno.h>\fR,and the values listed in this file are passed to the user levelprogram in the global integer variable \fIerrno\fR.The ARGO library\fClibisodir.a\fRincludes an expanded version of\fIperror()\fR that interprets these extra values..ppIn the case of CLNP,the most remote-end errors are parsing errors.When a remote-end error is discovered, processing of the NPDU stops. TheNPDU is discarded, and if error reporting is not disabled, and ER NPDUis sent back to the source of the offending packet. The followingtables show the errors that may occur, and the error reason that will specified when the ER NPDU is returned..ppThe following general errors may occur while parsing an NPDU:.(b L.TStab(+), box, expand;l l.Problem+Error Reason=NPDU arrives before interface is configured+ADDR_DESTUNREACHPacket too short or too big+GEN_INCOMPLETEProtocol identification wrong+GEN_HDRSYNTAXVersion wrong+DISC_UNSUPPVERSLifetime expired+TTL_EXPTRANSITIncorrect checksum+GEN_BADCSUMAddress section too short+GEN_INCOMPLETESegment section too short+GEN_INCOMPLETEOptions section too short+GEN_INCOMPLETEUnknown packet type+GEN_HDRSYNTAXCan't route packet (forwarding)+ADDR_DESTUNREACH.TE.)bThe following errors are related to options processing:.(b L.TStab(+), box, expand;l l.Problem+Error Reason=Duplicate option+GEN_DUPOPTUnknown option+DISC_UNSUPPTOPTSecurity format bad+GEN_HDRSYNTAXSecurity option present+DISC_UNSUPPSECURESource route format bad+SRCRT_SYNTAXRecord route too short+GEN_INCOMPLETERecord route format bad+GEN_HDRSYNTAXQOS format bad+GEN_HDRSYNTAXPriority format bad+GEN_HDRSYNTAXError reason format bad+GEN_HDRSYNTAXError reason on non-ER NPDU+DISC_UNSUPPOPTError reason absent from ER NPDU+GEN_HDRSYNTAX.TE.)b.sh 2 "Internal Errors".ppInternal errors occur as a result of a programmer error. These errorswill result in a kernel \fIpanic()\fR. The following panics have beencoded into CLNP:.(b L.TStab(+), box, expand;l l.\fIPanic()\fR message+Reason=clnp_init: no raw clnp+The raw clnp protocol is not+configured into the kernel._clnp_srcaddr: ifp does not match interface+The ifp+passed to \fIclnp_srcaddr()\fR is invalid..TE.)b.sh 1 "Transport Layer Errors".pp.sh 2 "User Errors".ppTP handles these errors in the "standard"way for 4.3BSD:it causes an E\fIxxx\fR error constant (from thelist in /sys/h/errno.h)to be put into the user program'sglobal variable \fIerrno\fR.In most routines, in particularthose routines called directly or indirectlythe by system-call routines,this is doneby simply returningthis integer value. The errors that fall into this category are describedin the following table:.(b L.TSexpand box tab(+);l l.Error+Meaning=EAFNOSUPPORT+Attempting to use an address family +other than AF_ISO and AF_INET._ENOPROTOOPT+TP was not configured at boot time._ESOCKTNOSUPPORT+The given socket type is not supported._EPROTOTYPE+Attempting to use an inappropriate transport +class for the network service. (e.g. class 0 over CLNS) +or attempting to use an unknown network service._EISCONN+Attempting to perform on a connected socket an action  +that is permitted only on unconnected sockets._ENOTCONN+Attempting to perform on an unconnected socket an +action that is permitted only on connected sockets._EMSGSIZE+Trying to send more data than are permitted on  +connect, disconnect, or expedited data PDUs._ENOTSOCK+The integer argument passed in the system +call is not a socket descriptor or is a socket but +has no transport pcb._EINVAL+Some argument to the system call is invalid._EOPNOTSUPP+Some command argument to the system call is invalid +or the operation is not supported._EACCES+An unprivileged user tried to use a privileged command._ETOOMANYREFS+TP ran out of reference blocks._ENOBUFS+TP ran out of memory (mbufs)..TE.)bErrors that should be reported to the userby \fIerrno\fR but which occur asynchronouslyare detected by the socket layer when the valueof the field \fIso_error\fR in the socketstructure is non-zero.This is used to report such errors as ECONNRESET,ECONNABORTED, andECONNTIMEDOUT, which are really remote-end errors..sh 2 "Remote-end Errors".ppAn error that occurs is the result of a timeror is a result of an incoming TPDUis a remote-end error.The majority of these errors are parsing errors.They also include some protocol errors.Some of these errors cause the connection to beclosed locally.It is unfortunate that when a connection is closed,the kernel will not permit the user program to performanything on the socket in question, so the user cannotinquire about the reason for disconnection.There is no clean way to pass this information to asignal handler either, since the process being signalledmay be swapped out at the time.Some of these errors cause TP to return an ER TPDUor a DR TPDU to the sending site.Some have no effect on the connection locally.These errors and their effects are described below..(b L.TSexpand box tab(+);l l l.Error+Meaning+Return code or action taken=Retransmission+The remote end has not responded +ETIMEDOUTtimeout+to repeated attempts to send.+  +This can occur during connection+  +or after connection establishment.+ _Inactivity+The remote end has not sent anything +ETIMEDOUTtimeout+within the last \fIx\fR time, where++\fIx\fR is a locally defined++large value.+ _Unacceptable+An unacceptable TPDU has arrived, and the+TPDU droppedTPDU +remote end can be identified.+possibly DR/ER returned_DR TPDU+A DR TPDU arrived, with any+Disconnect indication,arrived+value in the reason field.+so_error == ECONNRESET_ER TPDU+An ER TPDU arrived, with any+Disconnect indication,arrived+anything in the reason field.+so_error == ECONNABORTED.TE.)bTPDUs may be unacceptable for a variety of reasons:.(b L.TSexpand box tab(+);l l.Problem+Action taken by TP=No connection at destination+Respond with DR, reason: session entityreference or reference frozen+not attached to TSAP_Invalid destination reference+Respond with DR, reason: mismatched +references_Invalid parameter code+Respond with ER, cause: inval. param. code_Invalid DU type+Respond with ER, cause: invalid TPDU type_Invalid version number+ Respond with ER, cause: inval. param. code_Invalid suffix value+Respond with ER, cause: inval. param. value_Suffix missing or is of+Respond with DR, reason:invalid length+header or parameter length invalid_Invalid checksum+packet discarded_Can't find a connection+Respond with DR, reason:for (dest ref, src ref) pair+mismatched references_Old ACK TPDU+packet discarded, possibly send ACK w/ FCC_Class requested isn't supported+Respond with DR, reason: +negotiation failed_Invalid TPDU size parameter+Respond with ER, cause: inval. param. value_Illegal amount of data+Respond with DR, reason:on CR, CC, DR, or XPD+header or parameter length invalid_Header length and length+Respond with DR, reason:indicator field of TPDU don't agree+header or parameter length invalid.TE.)b.lpThe file \fC<argo/iso_errno.h>\fR is a listof the error codes and diagnostic that can be returnedfrom the peer transport entity in a DR TPDU or an ER TPDU,and those that can be returned from the CONS, initiated by the DCE,the remote DTE, or by the local network adapter.These error values are too numerous to list here.Most of them are taken from the ISO 8208 standard and the ISO 8073 standard.The ARGO distribution contains an expanded form of the BSD libraryroutine \fIperror()\fR that prints an error messages for a given\fIerrno\fR value..sh 2 "Internal Errors".ppSome internal errors are the result of a lack of resources such as buffers.These are reported to the user with theglobal variable\fIerrno\fRset to a value from\fC<errno.h>\fR.The errors that fall into this category are describedin the following table:.(b L.TSexpand box tab(+);l l.Return code+Problem=ENOBUFS+TP ran out of mbufs._EPROTONOOPT+TP hasn't been configured._ETOOMANYREFS+TP ran out of (unfrozen) reference numbers..TE.)b.ppOtherinternal errors are coding errorsor errors of misinterpretation of a specification.They result in the printing of a message on the console followed by a system panic.The following panics have been coded into TP:.(b L.TSexpand box tab(+);l l.\fIPanic()\fR message+Problem=tp_emit CR/CC+The length indicator field of a TPDU is longer than the +amount of space in an mbuf; TP is attempting to send a +CR TPDU that is too large (perhaps legal but too large for  +this implementation to manage)._tp_rcvoob: unexpected cluster+An incoming XPD TPDU was put into a cluster  +mbuf by a lower layer._tp timeout table overflow+The system ran out of structures for TP timers._tp: T_DETACH+The connected socket that is being detached has  +no parent socket._tp_soisdisconnected+The socket head queue is  +corrupted._tp_soisdisconnecting+The socket head queue is  +corrupted._tpclnp_input: bad clnp_len +The length parameter passed by clnp +is bad._iso_control: SIOCDIFADDR+ioctl() system call passed downiso_control: SIOCSIFADDR+a null interface pointer_sofree dq+The list of socket structures is +is inconsistent..TE.)b

⌨️ 快捷键说明

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