components/open-fabrics/libsdp/manpages/libsdp.conf.5
changeset 5004 2883c86b26b8
parent 369 cc8c00719da9
equal deleted inserted replaced
5003:3fb951baeb51 5004:2883c86b26b8
       
     1 '\" te
       
     2 .TH libsdp.conf 5 "21 Oct 2015"
       
     3 .SH NAME
       
     4 libsdp.conf \- configuration file for libsdp(3LIB) 
       
     5 .SH SYNOPSIS
       
     6 .LP
       
     7 .nf
       
     8 /etc/libsdp.conf
       
     9 .fi
       
    10 
       
    11 .SH DESCRIPTION
       
    12 .sp
       
    13 .LP
       
    14 The \fB/etc/libsdp.conf\fR file is the configuration file for libsdp(3LIB), and is used to select which sockets will be using SDP and which will not.
       
    15 There are 2 main types of statements supported by this configuration file:
       
    16 .TP
       
    17 \fB\ "use")
       
    18 which defines the address family to be used for the sockets that match the line
       
    19 .TP
       
    20 \fB\ "log")
       
    21 for setting logging related configuration. As the log settings takes immidiate effect we define these at the beggining of the file.
       
    22 
       
    23 .SH DEAFUALT SETTINGS:
       
    24 Get errors printed into the files /tmp/libsdp.log.<uid>
       
    25 or /var/log/<filename> for root:
       
    26 .sp
       
    27 .in +2
       
    28 .nf
       
    29 
       
    30 log min-level 9 destination file libsdp.log
       
    31 .fi
       
    32 .in -2
       
    33 
       
    34 By default we let all servers and client try SDP first.
       
    35 to exclude SDP add "use tcp" rules before these defaults.
       
    36 .sp
       
    37 .in +2
       
    38 .nf
       
    39 use both server * *:*
       
    40 use both client * *:*
       
    41 .fi
       
    42 .in -2
       
    43 
       
    44 .SS LOG CONFIGURATION:
       
    45 The log directive allows the user to specify which and where debug and error
       
    46 messages get sent. The log statement format is:
       
    47 .sp
       
    48 .in +2
       
    49 .nf
       
    50 log [destination stderr|syslog|file <filename>] [min-level <1-9>]
       
    51 .fi
       
    52 .in -2
       
    53 .sp
       
    54 .LP
       
    55 The fields are defined as follows:
       
    56 .sp
       
    57 .ne 2
       
    58 .mk
       
    59 .na
       
    60 \fB\fIdestination\fR\fR
       
    61 .ad
       
    62 .sp .6
       
    63 .RS 4n
       
    64 defines the destination of the log messages:
       
    65 .TP 5
       
    66 \fB\ "stderr")
       
    67 messages will be forwarded to the stderr
       
    68 
       
    69 .TP 5
       
    70 \fB\ "syslog")
       
    71 messages sent to the  syslog  service
       
    72 
       
    73 .TP 5
       
    74 \fB\ "file <filename>")
       
    75 messages will be written to the file /var/log/<filename> for root.
       
    76 for regular user, if full path is requsted <filename with path>.<uid>
       
    77 or /tmp/<filename>.<uid> if no path is requested
       
    78 .RE
       
    79 .ne 2
       
    80 .mk
       
    81 .na
       
    82 \fB\fImin-level\fR\fR
       
    83 .ad
       
    84 .sp .6
       
    85 .RS 4n
       
    86 defines the verbosity of the log:
       
    87 .TP 5
       
    88 \fB\9)
       
    89 only errors are printed
       
    90 .TP 5
       
    91 \fB\8)
       
    92 warnings
       
    93 .TP 5
       
    94 \fB\7)
       
    95 connect and listen summary (useful for tracking SDP usage)
       
    96 .TP 5
       
    97 \fB\4)
       
    98 positive match summary (useful for config file debug)
       
    99 .TP 5
       
   100 \fB\3)
       
   101 negative match summary (useful for config file debug)
       
   102 .TP 5
       
   103 \fB\2)
       
   104 function calls and return values
       
   105 .TP 5
       
   106 \fB\1)
       
   107 debug messages
       
   108 
       
   109 .SH SOCKET ADDRESS FAMILY CONTROL
       
   110 
       
   111 The socket control statements allows the user to specify when libsdp will
       
   112 replace AF_INET_SDP/SOCK_STREAM sockets with AF_SDP/SOCK_STREAM
       
   113 sockets. Each control statement specifies a matching rule that all its
       
   114 subexpressions must evaluate as true (logical and) to apply.
       
   115 .PP
       
   116 The statements that control which type of sockets to open are made
       
   117 of the following:
       
   118 
       
   119 .sp
       
   120 .in +2
       
   121 .nf
       
   122 use <address-family> <role> <program name> <address|*>:<port range|*>
       
   123 .fi
       
   124 .in -2
       
   125 .PP
       
   126 where
       
   127 
       
   128 .ne 2
       
   129 .mk
       
   130 .na
       
   131 \fB\fI<address-family>\fR\fR
       
   132 .ad
       
   133 .sp .6
       
   134 .RS 4n
       
   135 can be one of:
       
   136 .TP 5
       
   137 \fB\ "sdp")
       
   138 for specifying when an SDP should be used
       
   139 .TP 5
       
   140 \fB\ "tcp")
       
   141 for specifying when SDP socket should not be matched
       
   142 .TP 5
       
   143 \fB\ "both")
       
   144 for specifying when both SDP and AF_INET sockets should be used.
       
   145 .PP
       
   146 Note: that "both" semantics is different between "server" and "client" roles:
       
   147 For a "server" is means that the server will be listening on both sdp and tcp
       
   148 For a "client" the connect will prefer using sdp but will silently
       
   149 fall back to tcp if the sdp connection failed.
       
   150 .RE
       
   151 
       
   152 .ne 2
       
   153 .mk
       
   154 .na
       
   155 \fB\fI<role>\fR\fR
       
   156 .ad
       
   157 .sp .6
       
   158 .RS 4n
       
   159 can be one of:
       
   160 .TP 5
       
   161 \fB\ "server" or "listen")
       
   162 for defining the listening port address family
       
   163 .TP 5
       
   164 \fB\ "client" or "connect")
       
   165 for defining the connected port address family
       
   166 .RE
       
   167 
       
   168 
       
   169 .ne 2
       
   170 .mk
       
   171 .na
       
   172 \fB\fI<program-name|*>\fR\fR
       
   173 .ad
       
   174 .sp .6
       
   175 .RS 4n
       
   176 Defines the program name (not including the path) the rule applies to.
       
   177 Wildcards with same semantics as "ls" are supported (* and ?).
       
   178 So db2* would match on any program with a name starting with db2.
       
   179 t?cp would match on ttcp, etc.
       
   180 If not provided (default) the statement matches all programs.
       
   181 .RE
       
   182 
       
   183 .ne 2
       
   184 .mk
       
   185 .na
       
   186 \fB\fI<address|*>\fR\fR
       
   187 .ad
       
   188 .sp .6
       
   189 .RS 4n
       
   190 Either the local address the server is bound to or the remote server
       
   191 address the client connects to. Syntax for address matching is:
       
   192 .PP
       
   193 <IPv4 address>[/<prefix_length>]|*
       
   194 .PP
       
   195 IPv4 address = [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+ each sub number < 255
       
   196 .PP
       
   197 prefix_length = [0-9]+ and with value <= 32. A prefix_length of 24
       
   198 matches the subnet mask 255.255.255.0 . A prefix_length of 32
       
   199 requires matching of the exact IP.
       
   200 .RE
       
   201 
       
   202 .ne 2
       
   203 .mk
       
   204 .na
       
   205 \fB\fI<port range>\fR\fR
       
   206 .ad
       
   207 .sp .6
       
   208 .RS 4n
       
   209 start-port[-end-port] where port numbers are >0 and < 65536
       
   210 .RE
       
   211 .PP
       
   212 Rules are evaluated in order of definition. So the first match wins.
       
   213 If no match is made libsdp will default to "both".
       
   214 .SH EXAMPLES
       
   215 .HP
       
   216 LOG CONFIGURATION:
       
   217 .Br
       
   218 .br
       
   219 .PP
       
   220 .LP
       
   221 
       
   222 
       
   223 .TP 1
       
   224 \fB\ Example 1:
       
   225 Get SDP usage per connect and listen into stderr
       
   226 .sp
       
   227 .in +5
       
   228 log min-level 7 destination stderr
       
   229 .nf
       
   230 .in -5
       
   231 
       
   232 .TP 1
       
   233 \fB\ Example 2:
       
   234 Send errors only into syslog
       
   235 .sp
       
   236 .in +5
       
   237 log min-level 9 destination syslog
       
   238 .nf
       
   239 .in -5
       
   240 .RE
       
   241 
       
   242 .HP
       
   243 SOCKET ADDRESS FAMILY CONTROL
       
   244 
       
   245 .TP 1
       
   246 \fB\ Example 1:
       
   247 Use SDP by clients connecting to machines that belongs to subnet 192.168.1.*
       
   248 .sp
       
   249 .in +5
       
   250 .nf
       
   251 #   family role    program   address:port[-range]
       
   252 use sdp    connect *         192.168.1.0/24:*
       
   253 .in -5
       
   254 
       
   255 .TP 1
       
   256 \fB\ Example 2:
       
   257 Use SDP by ttcp when it connects to port 5001 of any machine
       
   258 .sp
       
   259 .in +5
       
   260 .nf
       
   261 #   family role    program   address:port[-range]
       
   262 use sdp    listen  ttcp      *:5001
       
   263 .in -5
       
   264 
       
   265 .TP 1
       
   266 \fB\ Example 3:
       
   267 Use TCP for any program with name starting with ttcp* serving ports 22 to
       
   268 25
       
   269 .sp
       
   270 .in +5
       
   271 .nf
       
   272 #   family role    program   address:port[-range]
       
   273 use tcp    server  ttcp*     *:22-25
       
   274 .in -5
       
   275 
       
   276 .TP 1
       
   277 \fB\ Example 4:
       
   278 Listen on both TCP and SDP by any server that listen on port 8080
       
   279 .sp
       
   280 .in +5
       
   281 .nf
       
   282 #   family role    program   address:port[-range]
       
   283 use both   server  *         *:8080
       
   284 .in -5
       
   285 
       
   286 .TP 1
       
   287 \fB\ Example 5:
       
   288 Connect ssh through SDP and fallback to TCP to hosts on 11.4.8.* port 22
       
   289 .sp
       
   290 .in +5
       
   291 .nf
       
   292 #   family role    program   address:port[-range]
       
   293 use both   connect *         11.4.8.0/24:22
       
   294 .in -5
       
   295 
       
   296 .RE
       
   297 .PP
       
   298 
       
   299 NOTE: If all "use" rules are commented SDP will take "simple SDP"
       
   300 mode and use SDP for all connections
       
   301 
       
   302  
       
   303 .RE
       
   304 
       
   305 .SH SEE ALSO
       
   306 .sp
       
   307 .LP
       
   308 \fBlibsdp\fR(3LIB), \fBattributes\fR(5)
       
   309 
       
   310