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

📄 rfc2661.txt

📁 第二层隧道模块l2tp源码,开发环境为linux
💻 TXT
📖 第 1 页 / 共 5 页
字号:
      length of the Random Octet String.4.4.2 Result and Error Codes   Result Code (CDN, StopCCN)      The Result Code AVP, Attribute Type 1, indicates the reason for      terminating the control channel or session.      The Attribute Value field for this AVP has the following format:       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |          Result Code          |        Error Code (opt)       |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      | Error Message (opt) ...      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      The Result Code is a 2 octet unsigned integer.  The optional Error      Code is a 2 octet unsigned integer.  An optional Error Message can      follow the Error Code field.  Presence of the Error Code andTownsley, et al.            Standards Track                    [Page 18]RFC 2661                          L2TP                       August 1999      Message are indicated by the AVP Length field. The Error Message      contains an arbitrary string providing further (human readable)      text associated with the condition. Human readable text in all      error messages MUST be provided in the UTF-8 charset using the      Default Language [RFC2277].      This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for      this AVP MUST be set to 1.  The Length is 8 if there is no Error      Code or Message, 10 if there is an Error Code and no Error Message      or 10 + the length of the Error Message if there is an Error Code      and Message.      Defined Result Code values for the StopCCN message are:         0 - Reserved         1 - General request to clear control connection         2 - General error--Error Code indicates the problem         3 - Control channel already exists         4 - Requester is not authorized to establish a control             channel         5 - The protocol version of the requester is not             supported              Error Code indicates highest version supported         6 - Requester is being shut down         7 - Finite State Machine error      Defined Result Code values for the CDN message are:         0 - Reserved         1 - Call disconnected due to loss of carrier         2 - Call disconnected for the reason indicated             in error code         3 - Call disconnected for administrative reasons         4 - Call failed due to lack of appropriate facilities             being available (temporary condition)         5 - Call failed due to lack of appropriate facilities being             available (permanent condition)         6 - Invalid destination         7 - Call failed due to no carrier detected         8 - Call failed due to detection of a busy signal         9 - Call failed due to lack of a dial tone         10 - Call was not established within time allotted by LAC         11 - Call was connected but no appropriate framing was              detected      The Error Codes defined below pertain to types of errors that are      not specific to any particular L2TP request, but rather to      protocol or message format errors. If an L2TP reply indicates inTownsley, et al.            Standards Track                    [Page 19]RFC 2661                          L2TP                       August 1999      its Result Code that a general error occurred, the General Error      value should be examined to determine what the error was. The      currently defined General Error codes and their meanings are:         0 - No general error         1 - No control connection exists yet for this LAC-LNS pair         2 - Length is wrong         3 - One of the field values was out of range or             reserved field was non-zero         4 - Insufficient resources to handle this operation now         5 - The Session ID is invalid in this context         6 - A generic vendor-specific error occurred in the LAC         7 - Try another.  If LAC is aware of other possible LNS             destinations, it should try one of them.  This can be             used to guide an LAC based on LNS policy, for instance,             the existence of multilink PPP bundles.         8 - Session or tunnel was shutdown due to receipt of an unknown             AVP with the M-bit set (see section 4.2). The Error Message             SHOULD contain the attribute of the offending AVP in (human             readable) text form.      When a General Error Code of 6 is used, additional information      about the error SHOULD be included in the Error Message field.4.4.3 Control Connection Management AVPs   Protocol Version (SCCRP, SCCRQ)      The Protocol Version AVP, Attribute Type 2, indicates the L2TP      protocol version of the sender.      The Attribute Value field for this AVP has the following format:       0                   1       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |      Ver      |     Rev       |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      The Ver field is a 1 octet unsigned integer containing the value      1. Rev field is a 1 octet unsigned integer containing 0. This      pertains to L2TP protocol version 1, revision 0. Note this is not      the same version number that is included in the header of each      message.      This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for      this AVP MUST be set to 1.  The Length of this AVP is 8.Townsley, et al.            Standards Track                    [Page 20]RFC 2661                          L2TP                       August 1999   Framing Capabilities (SCCRP, SCCRQ)      The Framing Capabilities AVP, Attribute Type 3, provides the peer      with an indication of the types of framing that will be accepted      or requested by the sender.      The Attribute Value field for this AVP has the following format:       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |     Reserved for future framing type definitions          |A|S|      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      The Attribute Value field is a 32-bit mask, with two bits defined.      If bit A is set, asynchronous framing is supported. If bit S is      set, synchronous framing is supported.      A peer MUST NOT request an incoming or outgoing call with a      Framing Type AVP specifying a value not advertised in the Framing      Capabilities AVP it received during control connection      establishment.  Attempts to do so will result in the call being      rejected.      This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for      this AVP MUST be set to 1.  The Length (before hiding) is 10.   Bearer Capabilities (SCCRP, SCCRQ)      The Bearer Capabilities AVP, Attribute Type 4, provides the peer      with an indication of the bearer device types supported by the      hardware interfaces of the sender for outgoing calls.      The Attribute Value field for this AVP has the following format:       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |     Reserved for future bearer type definitions           |A|D|      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      This is a 32-bit mask, with two bits defined. If bit A is set,      analog access is supported. If bit D is set, digital access is      supported.Townsley, et al.            Standards Track                    [Page 21]RFC 2661                          L2TP                       August 1999      An LNS should not request an outgoing call specifying a value in      the Bearer Type AVP for a device type not advertised in the Bearer      Capabilities AVP it received from the LAC during control      connection establishment. Attempts to do so will result in the      call being rejected.      This AVP MUST be present if the sender can place outgoing calls      when requested.      Note that an LNS that cannot act as an LAC as well will not      support hardware devices for handling incoming and outgoing calls      and should therefore set the A and D bits of this AVP to 0, or      should not send the AVP at all. An LNS that can also act as an LAC      and place outgoing calls should set A or D as appropriate.      Presence of this message is not a guarantee that a given outgoing      call will be placed by the sender if requested, just that the      physical capability exists.      This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for      this AVP MUST be set to 1.  The Length (before hiding) is 10.   Tie Breaker (SCCRQ)      The Tie Breaker AVP, Attribute Type 5, indicates that the sender      wishes a single tunnel to exist between the given LAC-LNS pair.      The Attribute Value field for this AVP has the following format:       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      | Tie Break Value...      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                                 ...(64 bits)         |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      The Tie Breaker Value is an 8 octet value that is used to choose a      single tunnel where both LAC and LNS request a tunnel      concurrently. The recipient of a SCCRQ must check to see if a      SCCRQ has been sent to the peer, and if so, must compare its Tie      Breaker value with the received one. The lower value "wins", and      the "loser" MUST silently discard its tunnel. In the case where a      tie breaker is present on both sides, and the value is equal, both      sides MUST discard their tunnels.Townsley, et al.            Standards Track                    [Page 22]RFC 2661                          L2TP                       August 1999      If a tie breaker is received, and an outstanding SCCRQ had no tie      breaker value, the initiator which included the Tie Breaker AVP      "wins". If neither side issues a tie breaker, then two separate      tunnels are opened.      This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for      this AVP MUST be set to 0.  The Length of this AVP is 14.   Firmware Revision (SCCRP, SCCRQ)      The Firmware Revision AVP, Attribute Type 6, indicates the      firmware revision of the issuing device.      The Attribute Value field for this AVP has the following format:       0                   1       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |       Firmware Revision       |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      The Firmware Revision is a 2 octet unsigned integer encoded in a      vendor specific format.      For devices which do not have a firmware revision (general purpose      computers running L2TP software modules, for instance), the      revision of the L2TP software module may be reported instead.      This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for      this AVP MUST be set to 0.  The Length (before hiding) is 8.   Host Name (SCCRP, SCCRQ)      The Host Name AVP, Attribute Type 7, indicates the name of the      issuing LAC or LNS.      The Attribute Value field for this AVP has the following format:       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      | Host Name ... (arbitrary number of octets)      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      The Host Name is of arbitrary length, but MUST be at least 1      octet.Townsley, et al.            Standards Track                    [Page 23]RFC 2661                          L2TP                       August 1999      This name should be as broadly unique as possible; for hosts      participating in DNS [RFC1034], a hostname with fully qualified      domain would be appropriate.      This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for      this AVP MUST be set to 1.  The Length of this AVP is 6 plus the      length of the Host Name.   Vendor Name (SCCRP, SCCRQ)      The Vendor Name AVP, Attribute Type 8, contains a vendor specific      (possibly human readable) string describing the type of LAC or LNS      being used.      The Attribute Value field for this AVP has the following format:       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

⌨️ 快捷键说明

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