Chapter 8. Menu
SOCTEST - USER'S GUIDE

In this chapter, describes the functions of Menu.

There are app's preferences, log viewer, and some information.

PREFERENCES

Changes setting for app operating and user interface.

ParameterDescription
DESCRIPTIONShows description article in each view.
And, the additional information, Socket parameters, is displayed in socket list. See Chapter 1. Socket Simulator for details.
AUTO
MONITORING
Monitors some status, reflects them in Top View. Details is described later.
See Chapter 1. Socket Simulator for details of Top View.
IDLE TIMERTurns off iOS's idle timer.
To avoid disconnection, disables this setting.
SCREEN COLORInverts the background color of each data view (binary editor view, log view, etc).
When disabled, displays in iOS device's appearance (Light or Dark).
SYSTEM CALL
TRACE
Selects the output level of the system call trace. Details will be described later.

It discribes the details of AUTO MONITORING.
When enables this parameter, the app monitors the following status. In this case, keep in mind that the app will automatically calls poll(2), getsockopt(2) and getsockname(2).
If you need to watch exactly a socket behavior, it recommends that disabling these setting.

  1. Incoming data / Connection requests
  2. Polls the socket just after each operation.
    In these polling, it calls poll(2) with POLLIN|POLLPRI|POLLOUT as request events and 0 seconds as timeout.

  3. Socket address
  4. Finds out own address which assigned by kernel.
    Gets a address with getsockname(2) after connect(2) or listen(2) is called.

  5. Socket connection status
  6. Monitors the result of connect processing and the state of full duplex.
    In connect in progress for a non-blocking socket, checks the connection status with calling poll(2) and getsockopt(2).
    See Chapter 1. Socket Simulator for details of status transition.

  7. TCP state / TCP traffic / TCP RTT
  8. Monitors the state of the connection associated with a TCP socket, the amount of data sent and received via a socket, and RTT.
    Gets a TCP information (TCP_CONNECTION_INFO) with getsockopt(2) after each system call is called.


LOG

When the app executes socket system calls, trace log of the system call is output.
Trace log can be referd in log view.
If a line wraps, please look in landscape.

[Note]
Error log also is output here. Error log means that something wrong with the app itself occurs.
Because it needs to reduce memory usage, no further trace log is output after the number of lines reaches 10000. At the end of log, Reached the limit of log lines is output. But, log is reset with tapping Clear.

Format of the log is as below.

Output example of trace log is as below.

Oct 11 15:52:19.719 [0.000521] socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 5
Oct 11 15:52:23.929 [0.000537] getsockopt(5, SOL_SOCKET, SO_DONTROUTE, [0], [4]) = 0
Oct 11 15:52:25.790 [0.000102] setsockopt(5, SOL_SOCKET, SO_DONTROUTE, [1], 4) = 0
Oct 11 15:52:32.035 [0.000221] connect(5, {sin_family=AF_INET, sin_port=9999, sin_addr="12.34.56.78"}, 16) = -1 Err#51 ENETUNREACH
Oct 11 15:52:36.371 [0.006439] poll([{fd=5, events=POLLIN|POLLPRI|POLLOUT, revents=0}], 1, 0) = 0
Oct 11 15:52:39.736 [0.000100] close(5) = 0

It discribes each colmun.

ColmunDescription
MMM dd
Call Date
Date which called the system call.
Month: Jan, Feb, ...
HH:mm:ss.SSS
Call Time
Time that the system call returned (milisecond accuracy).
This is a local time depending on device's timezone setting.
response
Response Time
Indicates the time required for system call's process (microsecond accuracy).
function
System call Name
Indicates the name of system calls.
There are the system calls which selectable in the list (see Chapter 2. Socket Simulator - Functions), socket(2) used to create a socket, and close(2) used to delete a socket.
arg1, arg2, ...
Argument Parameters
Indicates the values specified to system call.
It described later in details.
retval
Return value
Indicates the reterun value of system call.
When error occurred (returned -1), displays the following information.

  Err#<errno number> <errno name>


The specification for notation of argument parameters is as below.

Integer

Integer parameter passing by value is output with define name or digit.
In the case of passing by reference as output parameter, it is output as [output value].

Structure

Structure parameter passing by reference is output as {key1=value1, key2=value2, ...}.

[Note]

Array of structure

Array parameter passing by reference is output as [{element1}, {element2}, ...].
Each element is followed the structure notation above.

Buffer (Bytes array)

Buffer parameter (mainly void*) such as data with sendXXX(2) and recvXXX(2) is passed by reference. Such parameters are output as follows, depending on the setting of SYSTEM CALL TRACE.
Output levelDescription
Level 1No data output.
<DATA> is displayed in the argument of system call.
Level 2Up to the first 16 bytes of bytes array is output as a string "xxxxxxx".
The byte is replaced with Ascii if a byte is printable Ascii code, and resplaced with dot(.) otherwise.
Level 3Up to the 512 bytes is output by Hexadecimal dump in the next line of system call.


INFORMATION

Some information is posted.

About App

App version information.

errno

Error define value and corresponded messages in iOS.

man

Manuals of socket interface (hyperlink to Apple Inc. site).

Help

This article. Users guide for this app (hyperlink to Github Pages site).

Privacy Policy

Privacy policy for app (hyperlink to Github Pages site).

Terms of Service

App Terms of service (hyperlink to Github Pages site).