No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

RESTful API Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes the OPS APIs supported by the device, including OPS-supported operations, request examples, elements in the requests, response examples, elements in the responses, and response status codes.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Socket

Socket

Query Abnormal TCP Packets

Operation

URI

Description

GET

/socket/SockTcpVers/SockTcpVer

Query statistics abnormal TCP packets.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
    <SockTcpVer>
    <type/>
    <cksumErr/>
        <fmtErr/>
        <noPort/>
        <mD5Err/>
        <kCErr/>
    </SockTcpVer>

    Table 3-788 describes elements in requests.

    Table 3-788  Elements

    Element

    Description

    type

    Specifies the protocol type. The value can be BGP, LDP, TELNET, FTP, MSDP, SSH, or Others. This element is mandatory.

    cksumErr

    Indicates statistics about packets with checksum errors.

    fmtErr

    Indicates statistics about packets in wrong formats.

    noPort

    Indicates statistics about packets whose destination ports cannot be found.

    mD5Err

    Indicates statistics about packets failing MD5 authentication.

    kCErr

    Indicates statistics about packets failing keychain authentication.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <rpc-reply>
      <data>
        <socket xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0" content-version="1.0">
          <SockTcpVers>
            <SockTcpVer>
              <cksumErr>0</cksumErr>
              <fmtErr>0</fmtErr>
              <noPort>0</noPort>
              <mD5Err>0</mD5Err>
              <kCErr>0</kCErr>
              <type>BGP</type>
            </SockTcpVer>
            <SockTcpVer>
              <cksumErr>0</cksumErr>
              <fmtErr>0</fmtErr>
              <noPort>0</noPort>
              <mD5Err>0</mD5Err>
              <kCErr>0</kCErr>
              <type>FTP</type>
            </SockTcpVer>
            <SockTcpVer>
              <cksumErr>0</cksumErr>
              <fmtErr>0</fmtErr>
              <noPort>0</noPort>
              <mD5Err>0</mD5Err>
              <kCErr>0</kCErr>
              <type>LDP</type>
            </SockTcpVer>
            <SockTcpVer>
              <cksumErr>0</cksumErr>
              <fmtErr>0</fmtErr>
              <noPort>0</noPort>
              <mD5Err>0</mD5Err>
              <kCErr>0</kCErr>
              <type>MSDP</type>
            </SockTcpVer>
            <SockTcpVer>
              <cksumErr>0</cksumErr>
              <fmtErr>0</fmtErr>
              <noPort>0</noPort>
              <mD5Err>0</mD5Err>
              <kCErr>0</kCErr>
              <type>TELNET</type>
            </SockTcpVer>
            <SockTcpVer>
              <cksumErr>0</cksumErr>
              <fmtErr>0</fmtErr>
              <noPort>0</noPort>
              <mD5Err>0</mD5Err>
              <kCErr>0</kCErr>
              <type>SSH</type>
            </SockTcpVer>
            <SockTcpVer>
              <cksumErr>0</cksumErr>
              <fmtErr>0</fmtErr>
              <noPort>0</noPort>
              <mD5Err>0</mD5Err>
              <kCErr>0</kCErr>
              <type>Others</type>
            </SockTcpVer>
          </SockTcpVers>
    </socket>
      </data>
    </rpc-reply>

    Table 3-789 describes elements in responses.

    Table 3-789  Elements

    Element

    Description

    type

    Specifies the protocol type. The value can be BGP, LDP, TELNET, FTP, MSDP, SSH, or Others. This element is mandatory.

    cksumErr

    Indicates statistics about packets with checksum errors.

    fmtErr

    Indicates statistics about packets in wrong formats.

    noPort

    Indicates statistics about packets whose destination ports cannot be found.

    mD5Err

    Indicates statistics about packets failing MD5 authentication.

    kCErr

    Indicates statistics about packets failing keychain authentication.

Query the TCP Connection Status

Operation

URI

Description

GET

/socket/SockTcpStatusess/SockTcpStatuses

Query the TCP connection status.

  • Request example
    Request example  
    <?xml version="1.0" encoding="UTF-8"?>
     <SockTcpStatuses>
      <soFd/>
      <pid/>
      <type/>
      <inpLAddr/>
      <inpLPort/>
      <inpFAddr/>
      <inpFPort/>
      <tcpState/>
     </SockTcpStatuses> 

    Table 6-1 describes elements in requests.

Table 3-790  Elements in requests

Element

Description

soFd

Specifies a socket ID.

pid

Specifies a CID.

type

Specifies a protocol type.

inpLAddr

Specifies a source address.

inpLPort

Specifies a source port number.

inpFAddr

Specifies a destination address.

inpFPort

Specifies a destination port number.

tcpState

Specifies a TCP connection state.

LISTEN: The connection is listened to.

SYN_SENT: The device has sent a synchronize (SYN) message and is waiting for a matching SYN from the other device.

SYN_RECEIVED: The device has received an SYN (connection request). It is now waiting for an ACK to its SYN to complete connection setup.

ESTABLISHED: The connection is set up.

CLOSE_WAIT: The device has received a close request from the other device and is waiting for an acknowledgement.

FIN_WAIT_1: The device is waiting for an acknowledgement for an FIN it has sent or is waiting for a connection termination request from the other device.

CLOSING: The connection is being closed.

LAST_ACK: The device is waiting for a final ACK to a close request.

FIN_WAIT_2: The device has received an ACK for its request to terminate the connection and is now waiting for a matching FIN from the other device.

TIME_WAIT: The device has now received a FIN from the other device and acknowledged it, and sent its own FIN and received an ACK for it.

CLOSED: The connection is closed.

  • Response example (XML format)
    Response example
    <?xml version="1.0" encoding="UTF-8"?>
     <rpc-reply>
      <data>
      <socket xmlns="http://www.huawei.com/netconf/vrp" format-version="1.0" content-version="1.0">
      <SockTcpStatusess>
      <SockTcpStatuses>
      <type>IPv4</type>
      <inpFAddr>0.0.0.0</inpFAddr>
      <inpLAddr>0.0.0.0</inpLAddr>
      <inpFPort>0</inpFPort>
      <inpLPort>23</inpLPort>
      <tcpState>LISTEN</tcpState>
      <soFd>1</soFd>
      <pid>0x80c82720</pid>
      </SockTcpStatuses>
      <SockTcpStatuses>
      </socket>
      </data>
     </rpc-reply>
    

Table 3-791 describes elements in responses.

Table 3-791  Elements in responses

Element

Description

soFd

Specifies a socket ID.

pid

Specifies a CID.

type

Specifies a protocol type.

inpLAddr

Specifies a source address.

inpLPort

Specifies a source port number.

inpFAddr

Specifies a destination address.

inpFPort

Specifies a destination port number.

tcpState

Specifies a TCP connection state.

LISTEN: The connection is listened to.

SYN_SENT: The device has sent a synchronize (SYN) message and is waiting for a matching SYN from the other device.

SYN_RECEIVED: The device has received an SYN (connection request). It is now waiting for an ACK to its SYN to complete connection setup.

ESTABLISHED: The connection is set up.

CLOSE_WAIT: The device has received a close request from the other device and is waiting for an acknowledgement.

FIN_WAIT_1: The device is waiting for an acknowledgement for an FIN it has sent or is waiting for a connection termination request from the other device.

CLOSING: The connection is being closed.

LAST_ACK: The device is waiting for a final ACK to a close request.

FIN_WAIT_2: The device has received an ACK for its request to terminate the connection and is now waiting for a matching FIN from the other device.

TIME_WAIT: The device has now received a FIN from the other device and acknowledged it, and sent its own FIN and received an ACK for it.

CLOSED: The connection is closed.

Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166567

Views: 21610

Downloads: 116

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next