Browse code

- minor serdev doc edits - removed fifo default value - added -i fifo_path parameter - updated man page

Andrei Pelinescu-Onciul authored on 25/09/2002 10:03:20
Showing 5 changed files
... ...
@@ -1,4 +1,5 @@
1
-<!DOCTYPE Book SYSTEM "/usr/share/sgml/docbook/dtd-4.2/docbook.dtd">
1
+<!-- $Id$ -->
2
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
2 3
 
3 4
 <book label="serdev" id="serdev" lang="EN">
4 5
     <title>SIP Express Router</title>
... ...
@@ -93,8 +94,8 @@
93 94
 	<section id="cmd-line-params">
94 95
 	    <title>Processing Command Line Parameters</title>
95 96
 	    <para>
96
-		<acronym>SER</acronym> utilizes <acronym>GNU</acronym><function moreinfo="none">getopt</function>function to 
97
-		parse command line parameters.
97
+		<acronym>SER</acronym> utilizes the <function moreinfo="none">getopt
98
+		</function>function to parse command line parameters.
98 99
 		The function is extensively described in the man pages.
99 100
 	    </para>
100 101
 	</section> <!-- cmd-line-params -->
... ...
@@ -242,18 +243,18 @@
242 243
 		    will be issued and the server will be aborted.
243 244
 		</para>
244 245
 		<para>
245
-		    There is a utility called Bison. Input of the utility is a file containing the grammar of
246
+		    There is a utility called yacc. Input of the utility is a file containing the grammar of
246 247
 		    the configuration file, in addition to the grammar, you can describe what action the parser
247 248
 		    should do at various stages of parsing. For example, you can instruct the parser to create a
248 249
 		    structure describing an <acronym>IP</acronym> address every time it finds an <acronym>IP</acronym> 
249 250
 		    address in the configuration file and convert the address to its binary representation.
250 251
 		</para>
251
-		<para>For more information see Bison documentation.</para>
252
+		<para>For more information see yacc documentation.</para>
252 253
 		<para>
253
-		    Bison creates the parser when the server is being compiled from the sources.
254
-		    Input file for bison is <filename moreinfo="none">cfg.y</filename>. The file contains grammar
254
+		    yacc creates the parser when the server is being compiled from the sources.
255
+		    Input file for yacc is <filename moreinfo="none">cfg.y</filename>. The file contains grammar
255 256
 		    of the config file along with actions that create the binary representation of the file.
256
-		    Bison will write its result into file <filename moreinfo="none">cfg.tab.c</filename>. The
257
+		    Yacc will write its result into file <filename moreinfo="none">cfg.tab.c</filename>. The
257 258
 		    file contains function <function moreinfo="none">yyparse</function> which will parse the whole
258 259
 		    configuration file and construct the binary representation. For more information about the
259 260
 		    bison input file syntax see bison documentation.
... ...
@@ -76,7 +76,7 @@
76 76
 #include "pt.h"
77 77
 
78 78
 /* FIFO server vars */
79
-char *fifo="/tmp/ser_fifo"; /* FIFO name */
79
+char *fifo=0; /* FIFO name */
80 80
 int fifo_mode=S_IRUSR | S_IWUSR | S_IRGRP | 
81 81
 	S_IWGRP | S_IROTH | S_IWOTH;
82 82
 pid_t fifo_pid;
... ...
@@ -173,9 +173,10 @@ Options:\n\
173 173
     -t  dir      chroot to \"dir\"\n\
174 174
     -u uid       change uid \n\
175 175
     -g gid       change gid \n\
176
-    -P file      create a pid file\n"
176
+    -P file      create a pid file\n\
177
+    -i fifo_path create a fifo (usefull for monitoring " NAME ") \n"
177 178
 #ifdef STATS
178
-"    -s file	 File to which statistics is dumped (disabled otherwise)\n"
179
+"    -s file     File to which statistics is dumped (disabled otherwise)\n"
179 180
 #endif
180 181
 ;
181 182
 
... ...
@@ -917,7 +918,7 @@ int main(int argc, char** argv)
917 918
 #ifdef STATS
918 919
 	"s:"
919 920
 #endif
920
-	"f:p:m:b:l:n:rRvdDEVhw:t:u:g:P:";
921
+	"f:p:m:b:l:n:rRvdDEVhw:t:u:g:P:i:";
921 922
 	
922 923
 	while((c=getopt(argc,argv,options))!=-1){
923 924
 		switch(c){
... ...
@@ -1043,6 +1044,9 @@ int main(int argc, char** argv)
1043 1044
 			case 'P':
1044 1045
 					pid_file=optarg;
1045 1046
 					break;
1047
+			case 'i':
1048
+					fifo=optarg;
1049
+					break;
1046 1050
 			case '?':
1047 1051
 					if (isprint(optopt))
1048 1052
 						fprintf(stderr, "Unknown option `-%c�.\n", optopt);
... ...
@@ -1073,7 +1077,7 @@ int main(int argc, char** argv)
1073 1077
 	}
1074 1078
 
1075 1079
 
1076
-        init_hfname_parser();
1080
+	init_hfname_parser();
1077 1081
 	init_digest_parser();
1078 1082
 
1079 1083
 	/* init hash fucntion */
... ...
@@ -91,7 +91,9 @@ struct sip_msg {
91 91
 	int parsed_flag;               /* Already parsed header field types */
92 92
 
93 93
 	     /* Via, To, CSeq, Call-Id, From, end of header*/
94
-	     /* first occurance of it; subsequent occurances saved in 'headers' */
94
+	     /* pointers to the first occurances of these headers;
95
+		  * everything is also saved in 'headers'
96
+		  * (WARNING: do not deallocate them twice!)*/
95 97
 
96 98
 	struct hdr_field* h_via1;
97 99
 	struct hdr_field* h_via2;
... ...
@@ -32,6 +32,8 @@ ser \- very fast and configurable sip proxy
32 32
 .BI \-g " gid"
33 33
 ] [
34 34
 .BI \-P " pid\-file"
35
+] [
36
+.BI \-i " fifo\-path"
35 37
 ]
36 38
 
37 39
 .SH DESCRIPTION
... ...
@@ -126,6 +128,11 @@ runs.
126 128
 Creates a file containing the pid of the main 
127 129
 .B ser 
128 130
 process.
131
+.TP
132
+.BI \-i " fifo\-path"
133
+Creates a fifo, usefull for monitoring
134
+.B ser
135
+status.
129 136
 
130 137
 
131 138
 .SH FILES