5-3
Cisco SFS InfiniBand Host Drivers User Guide for Linux
OL-12309-01
Chapter 5 Sockets Direct Protocol
Converting Sockets-Based Application
Log Statement
This section describes the log statement. The log directive allows the user to specify which debug and
error messages are sent and where they are sent. The log statement format is as follows
:
log
[destination stderr | syslog | file
filename
] [min-level
1-9
]
The file destination must be relative to /tmp. This is to prevent non-superuser accounts from having the
ability to create arbitrary files on the system. Any path components of the filename are stripped.
The following example shows how to get the full verbosity printed into the /tmp/libsdp.log file:
log min-level 1 destination file libsdp.log
The following example shows how to get the full verbosity printed into the /STDERR:
log min-level 1 destination stderr
Match Statement
This section describes the match statement. The match directive enables the user to specify when libsdp
replaces AF_INET/SOCK_STREAM sockets with AF_SDP/SOCK_STREAM sockets. Each match
directive specifies a group for which all expressions must evaluate as true (logical and).
The four expressions are as follows:
destination
ip_port
listen
ip_port
shared
ip_port
program
program_name
The syntax description for the match statement is as follows:
Command
Description
destination
Defines the destination of the log messages.
stderr
Forwards messages to the STDERR.
syslog
Sends messages to the syslog service.
file
filename
Writes messages to the file/tmp/filename.
min-level
Defines the verbosity of the log as follows:
9—Errors are printed.
3—Protocol-matching messages.
2—Socket-creation messages.
1—Function calls and return values.
destination
This expression enables the user to match a client-connect request and
convert the TCP socket to an SDP socket. The rule is applied during the
connect system call.
listen
This expression enables the user to match a server-bind request and convert
the TCP socket to an SDP socket. The rule is applied during the bind system
call.