... | ... |
@@ -15,16 +15,12 @@ TODO |
15 | 15 |
--we'll probably go for mysql dependancy, |
16 | 16 |
then INSTALL needs to be completely |
17 | 17 |
changed |
18 |
- ser binds to 127.0.0.1 -- not really good for |
|
19 |
- quick-start |
|
20 |
- |
|
21 | 18 |
|
22 | 19 |
|
23 | 20 |
Installation Notes |
24 | 21 |
|
25 | 22 |
Supported arhitectures: Linux/i386, Linux/armv4l, FreeBSD/i386, Solaris/sparc64, |
26 |
-Win*/i386 (CYGWIN) |
|
23 |
+Win*/i386 (CYGWIN) - only the core |
|
27 | 24 |
(for other arhitectures the Makefile must be edited) |
28 | 25 |
|
29 | 26 |
There are various configuration options defined in the Makefile. |
... | ... |
@@ -220,46 +216,3 @@ C) Troubleshooting |
220 | 216 |
listen |
221 | 217 |
aliases |
222 | 218 |
|
223 |
- |
|
224 |
-TROUBLES |
|
225 |
- |
|
226 |
-In the following config, ser bound itself to /dev/lo -- not |
|
227 |
-good for quick start. |
|
228 |
- |
|
229 |
- |
|
230 |
-[jiri@cat jiri]$ hostname -a |
|
231 |
-localhost.localdomain localhost |
|
232 |
-[jiri@cat jiri]$ hostname |
|
233 |
-cat |
|
234 |
-[jiri@cat jiri]$ |
|
235 |
- |
|
236 |
- |
|
237 |
-[root@cat log]# uname -a |
|
238 |
-Linux cat 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown |
|
239 |
- |
|
240 |
-/etc/hosts |
|
241 |
- |
|
242 |
-# Do not remove the following line, or various programs |
|
243 |
-# that require network functionality will fail. |
|
244 |
-127.0.0.1 cat localhost.localdomain localhost |
|
245 |
- |
|
246 |
- |
|
247 |
-[root@cat log]# /sbin/ifconfig |
|
248 |
-eth0 Link encap:Ethernet HWaddr 00:08:02:38:D9:A0 |
|
249 |
- inet addr:192.168.0.16 Bcast:192.168.0.255 Mask:255.255.255.0 |
|
250 |
- UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 |
|
251 |
- RX packets:152917 errors:0 dropped:0 overruns:0 frame:0 |
|
252 |
- TX packets:87759 errors:0 dropped:0 overruns:0 carrier:0 |
|
253 |
- collisions:35 txqueuelen:100 |
|
254 |
- RX bytes:216441566 (206.4 Mb) TX bytes:5542812 (5.2 Mb) |
|
255 |
- Interrupt:5 Base address:0x7000 |
|
256 |
- |
|
257 |
-lo Link encap:Local Loopback |
|
258 |
- inet addr:127.0.0.1 Mask:255.0.0.0 |
|
259 |
- UP LOOPBACK RUNNING MTU:16436 Metric:1 |
|
260 |
- RX packets:162 errors:0 dropped:0 overruns:0 frame:0 |
|
261 |
- TX packets:162 errors:0 dropped:0 overruns:0 carrier:0 |
|
262 |
- collisions:0 txqueuelen:0 |
|
263 |
- RX bytes:10568 (10.3 Kb) TX bytes:10568 (10.3 Kb) |
|
264 |
- |
|
265 |
- |
... | ... |
@@ -83,9 +83,17 @@ static_modules: |
83 | 83 |
dbg: ser |
84 | 84 |
gdb -command debug.gdb |
85 | 85 |
|
86 |
- |
|
86 |
+.PHONY: tar |
|
87 | 87 |
tar: mantainer-clean |
88 |
- tar -C .. -zcf ../$(NAME)-$(RELEASE)_src.tar.gz $(notdir $(CURDIR)) |
|
88 |
+ $(TAR) -C .. -zcf ../$(NAME)-$(RELEASE)_src.tar.gz $(notdir $(CURDIR)) |
|
89 |
+ |
|
90 |
+# binary dist. tar.gz |
|
91 |
+.PHONY: bin |
|
92 |
+bin: |
|
93 |
+ mkdir -p tmp/ser/usr/local |
|
94 |
+ $(MAKE) install prefix=tmp/ser/usr/local |
|
95 |
+ $(TAR) -C tmp/ser/ -zcf ../$(NAME)-$(RELEASE)_$(OS)_$(ARCH).tar.gz . |
|
96 |
+ rm -rf tmp/ser |
|
89 | 97 |
|
90 | 98 |
|
91 | 99 |
install: all mk-install-dirs install-cfg install-bin install-modules \ |
... | ... |
@@ -8,10 +8,10 @@ |
8 | 8 |
VERSION = 0 |
9 | 9 |
PATCHLEVEL = 8 |
10 | 10 |
SUBLEVEL = 7 |
11 |
-EXTRAVERSION = -15-tests |
|
11 |
+EXTRAVERSION = -16 |
|
12 | 12 |
|
13 | 13 |
RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
14 |
-OS = $(shell uname -s) |
|
14 |
+OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]") |
|
15 | 15 |
ARCH = $(shell uname -m |sed -e s/i.86/i386/ -e s/sun4u/sparc64/ ) |
16 | 16 |
|
17 | 17 |
prefix = /usr/local |
... | ... |
@@ -28,7 +28,15 @@ modules-dir = lib/ser/modules/ |
28 | 28 |
doc-dir = share/doc/ser/ |
29 | 29 |
man-dir = share/man/ |
30 | 30 |
|
31 |
+ |
|
32 |
+ifeq ($(OS), solaris) |
|
33 |
+#use GNU versions |
|
34 |
+INSTALL = ginstall |
|
35 |
+TAR = gtar |
|
36 |
+else |
|
31 | 37 |
INSTALL = install |
38 |
+TAR= tar |
|
39 |
+endif |
|
32 | 40 |
INSTALL-CFG = $(INSTALL) -m 644 |
33 | 41 |
INSTALL-BIN = $(INSTALL) -m 755 |
34 | 42 |
INSTALL-MODULES = $(INSTALL) -m 755 |
... | ... |
@@ -431,7 +439,7 @@ ifeq ($(OS), Linux) |
431 | 439 |
#same as common |
432 | 440 |
endif |
433 | 441 |
|
434 |
-ifeq ($(OS), SunOS) |
|
442 |
+ifeq ($(OS), solaris) |
|
435 | 443 |
ifeq ($(mode), release) |
436 | 444 |
#use these only if you're using gcc with Solaris ld |
437 | 445 |
#LDFLAGS=-O2 $(PROFILE) |
... | ... |
@@ -450,7 +458,7 @@ endif |
450 | 458 |
# -lrt needed for sched_yield |
451 | 459 |
endif |
452 | 460 |
|
453 |
-ifeq ($(OS), FreeBSD) |
|
461 |
+ifeq ($(OS), freebsd) |
|
454 | 462 |
|
455 | 463 |
YACC=yacc |
456 | 464 |
LIBS= -lfl #dlopen is in libc |
... | ... |
@@ -20,10 +20,12 @@ Configuration files: |
20 | 20 |
Global parameters: |
21 | 21 |
- debug |
22 | 22 |
- listen |
23 |
+ - alias |
|
23 | 24 |
- port |
24 | 25 |
- fork |
25 | 26 |
- children_no |
26 | 27 |
- log_stderror |
28 |
+ - fifo |
|
27 | 29 |
- loadmodule "path/modulename" |
28 | 30 |
... |
29 | 31 |
|
... | ... |
@@ -38,12 +40,15 @@ Configuration files: |
38 | 40 |
- uri |
39 | 41 |
- method |
40 | 42 |
- src_ip |
41 |
- - dst_ip [not working yet] |
|
43 |
+ - dst_ip |
|
44 |
+ - myself |
|
42 | 45 |
Rvalues: |
43 | 46 |
- string |
44 | 47 |
- integer |
45 | 48 |
- ipv4 or ipv6 address |
46 | 49 |
- netv4 or netv6 address |
50 |
+ - myself (matches any uri or ip address the server listens on or |
|
51 |
+ registered as an alias for the server) |
|
47 | 52 |
|
48 | 53 |
Commands: |
49 | 54 |
- forward |
... | ... |
@@ -1163,7 +1163,9 @@ int main(int argc, char** argv) |
1163 | 1163 |
r++; |
1164 | 1164 |
} |
1165 | 1165 |
/* get ips & fill the port numbers*/ |
1166 |
+#ifdef EXTRA_DEBUG |
|
1166 | 1167 |
printf("Listening on \n"); |
1168 |
+#endif |
|
1167 | 1169 |
for (r=0; r<sock_no;r++){ |
1168 | 1170 |
he=resolvehost(sock_info[r].name.s); |
1169 | 1171 |
if (he==0){ |
... | ... |
@@ -1228,8 +1230,10 @@ int main(int argc, char** argv) |
1228 | 1230 |
strncpy(sock_info[r].port_no_str.s, port_no_str, strlen(port_no_str)+1); |
1229 | 1231 |
sock_info[r].port_no_str.len=strlen(port_no_str); |
1230 | 1232 |
|
1233 |
+#ifdef EXTRA_DEBUG |
|
1231 | 1234 |
printf(" %s [%s]:%s\n",sock_info[r].name.s, |
1232 | 1235 |
sock_info[r].address_str.s, sock_info[r].port_no_str.s); |
1236 |
+#endif |
|
1233 | 1237 |
} |
1234 | 1238 |
/* removing duplicate addresses*/ |
1235 | 1239 |
for (r=0; r<sock_no; r++){ |
... | ... |
@@ -1240,10 +1244,11 @@ int main(int argc, char** argv) |
1240 | 1244 |
sock_info[t].address.u.addr, |
1241 | 1245 |
sock_info[r].address.len) == 0) |
1242 | 1246 |
){ |
1247 |
+#ifdef EXTRA_DEBUG |
|
1243 | 1248 |
printf("removing duplicate (%d) %s [%s] == (%d) %s [%s]\n", |
1244 | 1249 |
r, sock_info[r].name.s, sock_info[r].address_str.s, |
1245 | 1250 |
t, sock_info[t].name.s, sock_info[t].address_str.s); |
1246 |
- |
|
1251 |
+#endif |
|
1247 | 1252 |
/* add the name to the alias list*/ |
1248 | 1253 |
if ((!sock_info[t].is_ip) && ( |
1249 | 1254 |
(sock_info[t].name.len!=sock_info[r].name.len)|| |
... | ... |
@@ -45,32 +45,32 @@ struct t_stats *cur_stats, *acc_stats; |
45 | 45 |
int print_stats( FILE *f ) |
46 | 46 |
{ |
47 | 47 |
fprintf(f, "Current:\n"); |
48 |
- fprintf(f, "# of transactions: %ld, ", |
|
48 |
+ fprintf(f, "# of transactions: %10lu, ", |
|
49 | 49 |
cur_stats->transactions ); |
50 |
- fprintf(f, "local: %ld, ", |
|
50 |
+ fprintf(f, "local: %10lu, ", |
|
51 | 51 |
cur_stats->client_transactions ); |
52 |
- fprintf(f, "waiting: %ld" CLEANUP_EOL , |
|
52 |
+ fprintf(f, "waiting: %10lu" CLEANUP_EOL , |
|
53 | 53 |
cur_stats->waiting ); |
54 | 54 |
|
55 | 55 |
fprintf(f, "Total:\n"); |
56 |
- fprintf(f, "# of transactions: %ld,", |
|
56 |
+ fprintf(f, "# of transactions: %10lu,", |
|
57 | 57 |
acc_stats->transactions ); |
58 |
- fprintf(f, " local: %ld,", |
|
58 |
+ fprintf(f, " local: %10lu,", |
|
59 | 59 |
acc_stats->client_transactions ); |
60 |
- fprintf(f, " waiting: %ld" CLEANUP_EOL , |
|
60 |
+ fprintf(f, " waiting: %10lu" CLEANUP_EOL , |
|
61 | 61 |
acc_stats->waiting ); |
62 | 62 |
|
63 |
- fprintf(f, "Replied localy: %ld" CLEANUP_EOL , |
|
63 |
+ fprintf(f, "Replied localy: %10lu" CLEANUP_EOL , |
|
64 | 64 |
acc_stats->replied_localy ); |
65 |
- fprintf(f, "Completion status 6xx: %ld,", |
|
65 |
+ fprintf(f, "Completion status 6xx: %10lu,", |
|
66 | 66 |
acc_stats->completed_6xx ); |
67 |
- fprintf(f, " 5xx: %ld,", |
|
67 |
+ fprintf(f, " 5xx: %10lu,", |
|
68 | 68 |
acc_stats->completed_5xx ); |
69 |
- fprintf(f, " 4xx: %ld,", |
|
69 |
+ fprintf(f, " 4xx: %10lu,", |
|
70 | 70 |
acc_stats->completed_4xx ); |
71 |
- fprintf(f, " 3xx: %ld,", |
|
71 |
+ fprintf(f, " 3xx: %10lu,", |
|
72 | 72 |
acc_stats->completed_3xx ); |
73 |
- fprintf(f, "2xx: %ld" CLEANUP_EOL , |
|
73 |
+ fprintf(f, "2xx: %10lu" CLEANUP_EOL , |
|
74 | 74 |
acc_stats->completed_2xx ); |
75 | 75 |
|
76 | 76 |
return 1; |