linux kernel sctp test

来源:互联网 发布:pp助手和淘宝手机助手 编辑:程序博客网 时间:2024/06/06 19:29

Testing Tools

Kernel tests

We have a number of test cases developed for testing specific APIs for the SCTP kernel implementation. To access these test cases, complete the following steps:
  1. Obtain the current release either by download or via the GIT tree. 
  2. Follow the instructions for building and installing SCTP in the README file or in the user's notes. 
  3. Reboot the system with the newly built kernel. 
  4. Change directory to the src/func_tests in your source tree from step 1. 
  5. Run make v4test, and all of the kernel functional test cases will be built and run automatically. You can also build and run each test case individually. Refer to the Makefile for more details. 
  6. If IPv6 is configured in the kernel, also run make v6test to exercise the tests for IPv6 support 

sctp_darn

sctp_darn is a testing tool providing command line options for users to exercise the SCTP implementation interactively. It can be used to create various client/server tests by transmitting data through the real network connections on the systems. To run sctp_darn:
  1. Obtain the current release either by download or via the BK tree. 
  2. Follow the instruction for building and installing SCTP in the README file or in the user's notes. 
  3. Reboot the system with the newly built kernel. 
  4. Change directory to the src/apps in your source tree from step 1. 
  5. Type make sctp_darn
  6. Type sctp_darn --help for usage information. 
Here's an example of using sctp_darn on your system: 
  1. Type sctp_darn -H 0 -P 250 -l to start a server that listens on the SCTP port 250 bound with IP address INADDR_ANY. 
  2. From another shell, type sctp_darn -H 0 -P 260 -h 127.0.0.1 -p 250 -s to start a client on SCTP port 260. Note that a remote address of 127.0.0.1 and a remote port of 250 are specified for the client. 
  3. The client would prompt you for a text string to send to the server, in this case, the port 250 on the localhost. After you input a text string and pressed Enter, an SCTP association would be established between the client and the server, and the message would be transmitted and displayed by the server.