OSDN Git Service

Ver.1.4.8: Fix bugs. Modify pages and mesurement items.
authorwatanaby <>
Sun, 19 Nov 2006 07:20:21 +0000 (07:20 +0000)
committerwatanaby <>
Sun, 19 Nov 2006 07:20:21 +0000 (07:20 +0000)
opengate/doc/Changes.html
opengate/javahtml/en/accept-http.html
opengate/javahtml/en/accept-java.html
opengate/javahtml/en/accept-time.html
opengate/javahtml/en/httpkeep.html
opengate/javahtml/ja/accept-http.html
opengate/javahtml/ja/accept-java.html
opengate/javahtml/ja/accept-time.html
opengate/javahtml/ja/httpkeep.html
opengate/opengatesrv/ctrl-firewall.c
opengate/opengatesrv/main.c

index 02762e8..07fb126 100644 (file)
@@ -518,6 +518,11 @@ Ver.1.4.7 at 2006.11.18</DT>
 <DD>\r
 Fix small bugs and modify pages. Add processing time measurement for research.\r
 </DD>\r
+<DT>\r
+Ver.1.4.8 at 2006.11.19</DT>\r
+<DD>\r
+Fix small bugs and modify pages and measurement items.\r
+</DD>\r
 \r
 </DL>\r
 <b>Please see CVS in SourceForge.net to check the file difference between versions.</b>\r
index 8fa3174..17b5e8b 100644 (file)
@@ -49,13 +49,15 @@ and close your browser.
 
 <table bgcolor="lightyellow" border="1">
 <tr><td>
-<b>Please keep this window as it is or in minimized mode. </b> 
-Start other browsers or other programs for network usage.  
+<b>Please keep this window as it is or in minimized mode. 
+Start browsers or other applications for network usage. </b> 
 Or click <a href="%%STARTURL%%" target="_blank"><b>[Start Page]</b></a> 
-to start browsing (In some browsers, 
-it is needed to push SHIFT or CTRL key to open new window. 
-The window may be popped up automatically, if it is
-permited in the browser setting).  </td></tr> </table>
+to start browsing 
+(If the page is not opened by CLICK, push SHIFT key and CLICK.
+The window can be popped up automatically, if it is
+permited in the browser setting).  
+</td></tr> 
+</table>
 
 </BODY>
 </HTML>
index ca63885..be10cfb 100644 (file)
@@ -48,15 +48,14 @@ Or you can run Java, if you download JavaPlugIn from <a href=http://java.com/ja/
 
 <table bgcolor="lightyellow" border="1">
 <tr><td>
-<b>Please keep this window as it is or in minimized mode. </b>
-Start other browsers or other programs for network usage.  
-Or click <a href="%%STARTURL%%" target="_blank"><b>[Start Page]</b></a>
- to start browsing 
-(In some browsers, 
-it is needed to push SHIFT or CTRL key to open new window. 
-The window may be popped up automatically, if it is
-permited in the browser setting).
-</td></tr>
+<b>Please keep this window as it is or in minimized mode. 
+Start browsers or other applications for network usage. </b> 
+Or click <a href="%%STARTURL%%" target="_blank"><b>[Start Page]</b></a> 
+to start browsing 
+(If the page is not opened by CLICK, push SHIFT key and CLICK.
+The window can be popped up automatically, if it is
+permited in the browser setting).  
+</td></tr> 
 </table>
 
 </body>
index 16b9339..797371b 100644 (file)
 <table bgcolor="lightyellow" border="1">
 <tr><td>
 <b>This page can be closed.</b> But it is recommended to save this page for termination request.
-If possible, keep this window as it is or in minimized mode. 
-And start other browsers or other programs for network usage.  
-Or click <a href="%%STARTURL%%" target="_blank"><b>[Start Page]</b></a>
- to start browsing 
-(In some browsers, 
-it is needed to push SHIFT or CTRL key to open new window. 
-The window may be popped up automatically, if it is
-permited in the browser setting).
-</td></tr>
+If possible, please keep this window as it is or in minimized mode. 
+Start browsers or other applications for network usage.
+Or click <a href="%%STARTURL%%" target="_blank"><b>[Start Page]</b></a> 
+to start browsing 
+(If the page is not opened by CLICK, push SHIFT key and CLICK.
+The window can be popped up automatically, if it is
+permited in the browser setting).  
+</td></tr> 
 </table>
 
 </BODY>
index 8fe9c14..2c57565 100644 (file)
@@ -42,15 +42,14 @@ click <a href="%%TERMINATEURL%%"><b>TERMINATE</b></a>,
 
 <table bgcolor="lightyellow" border="1">
 <tr><td>
-<b>Please keep this window as it is or in minimized mode. </b>
-Start other browsers or other programs for network usage. 
-Or click <a href="%%STARTURL%%" target="_blank"><b>[Start Page]</b></a>
- to start browsing 
-(In some browsers, 
-it is needed to push SHIFT or CTRL key to open new window. 
-The window may be popped up automatically, if it is
-permited in the browser setting).
-</td></tr>
+<b>Please keep this window as it is or in minimized mode. 
+Start browsers or other applications for network usage. </b> 
+Or click <a href="%%STARTURL%%" target="_blank"><b>[Start Page]</b></a> 
+to start browsing 
+(If the page is not opened by CLICK, push SHIFT key and CLICK.
+The window can be popped up automatically, if it is
+permited in the browser setting).  
+</td></tr> 
 </table>
 
 <script type="text/JavaScript">
index 8a3058a..a5309f0 100644 (file)
@@ -48,12 +48,12 @@ if(!navigator.javaEnabled()){
 
 <table bgcolor="lightyellow" border="1">
 <tr><td>
-<b>\e$B$3$N%Z!<%8$O$3$N$^$^$+!"Kt$O:G>/2=>uBV$K$7$F2<$5$$!#\e(B</b>
-\e$B%M%C%H%o!<%/MxMQ$O!"JL$K%V%i%&%6$=$NB>$N%M%C%H%o!<%/MxMQ%W%m%0%i%`$r5/F0$7$F9T$C$F$/$@$5$$!#\e(B
+<b>\e$B$3$N%Z!<%8$O!"$3$N$^$^$+Kt$O:G>/2=>uBV$K$7$F2<$5$$!#\e(B
+\e$B%M%C%H%o!<%/MxMQ$O!"JL$K%V%i%&%6$=$NB>$N%M%C%H%o!<%/MxMQ%W%m%0%i%`$r5/F0$7$F9T$C$F$/$@$5$$!#\e(B</b>
 \e$B$^$?$O!"\e(B<a href="%%STARTURL%%" target="_blank"><b>[\e$B%9%?!<%H%Z!<%8\e(B]
-</b></a>\e$B$+$i3+;O$7$F$/$@$5$$!J%V%i%&%6$K$h$C$F$O!"%7%U%H$^$?\e(B
-\e$B$O%3%s%H%m!<%k%-!<$r2!$7$J$,$i%/%j%C%/$9$kI,MW$,$"$j$^$9!#%]%C%W%"%C%W5v2D$K@_Dj$9$l$P<+F0I=<(2DG=$G$9!K!#\e(B
-
+</b></a>\e$B$+$i3+;O$7$F$/$@$5$$!J%/%j%C%/$G%9%?!<%H%Z!<%8$,3+$+$J$1$l$P!"\e(B
+\e$B%7%U%H%-!<$r2!$7$J$,$i%/%j%C%/$7$F$/$@$5$$!#\e(B
+\e$B$^$?%]%C%W%"%C%W5v2D$K@_Dj$9$l$P<+F0E*$K%]%C%W%"%C%W$7$^$9!K!#\e(B
 </td></tr>
 </table>
 
index 31657c2..47f4d33 100644 (file)
@@ -47,11 +47,12 @@ if(!navigator.javaEnabled()){
 
 <table bgcolor="lightyellow" border="1">
 <tr><td>
-<b>\e$B$3$N%Z!<%8$O$3$N$^$^$+!"Kt$O:G>/2=>uBV$K$7$F2<$5$$!#\e(B</b>
-\e$B%M%C%H%o!<%/MxMQ$O!"JL$K%V%i%&%6$=$NB>$N%M%C%H%o!<%/MxMQ%W%m%0%i%`$r5/F0$7$F9T$C$F$/$@$5$$!#\e(B
+<b>\e$B$3$N%Z!<%8$O!"$3$N$^$^$+Kt$O:G>/2=>uBV$K$7$F2<$5$$!#\e(B
+\e$B%M%C%H%o!<%/MxMQ$O!"JL$K%V%i%&%6$=$NB>$N%M%C%H%o!<%/MxMQ%W%m%0%i%`$r5/F0$7$F9T$C$F$/$@$5$$!#\e(B</b>
 \e$B$^$?$O!"\e(B<a href="%%STARTURL%%" target="_blank"><b>[\e$B%9%?!<%H%Z!<%8\e(B]
-</b></a>\e$B$+$i3+;O$7$F$/$@$5$$!J%V%i%&%6$K$h$C$F$O!"%7%U%H$^$?\e(B
-\e$B$O%3%s%H%m!<%k%-!<$r2!$7$J$,$i%/%j%C%/$9$kI,MW$,$"$j$^$9!#%]%C%W%"%C%W5v2D$K@_Dj$9$l$P<+F0I=<(2DG=$G$9!K!#\e(B
+</b></a>\e$B$+$i3+;O$7$F$/$@$5$$!J%/%j%C%/$G%9%?!<%H%Z!<%8$,3+$+$J$1$l$P!"\e(B
+\e$B%7%U%H%-!<$r2!$7$J$,$i%/%j%C%/$7$F$/$@$5$$!#\e(B
+\e$B$^$?%]%C%W%"%C%W5v2D$K@_Dj$9$l$P<+F0E*$K%]%C%W%"%C%W$7$^$9!K!#\e(B
 </td></tr>
 </table>
 
index 3fa1b1d..97b7295 100644 (file)
 <table bgcolor="lightyellow" border="1">
 <tr><td>
 <b>\e$B$3$N%Z!<%8$OJD$8$F$b9=$$$^$;$s!#\e(B</b>\e$BMxM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$^$^$+Kt$O:G>/2=>uBV$K$7$F2<$5$$!#\e(B
+\e$B%M%C%H%o!<%/MxMQ$O!"JL$K%V%i%&%6$=$NB>$N%M%C%H%o!<%/MxMQ%W%m%0%i%`$r5/F0$7$F9T$C$F$/$@$5$$!#\e(B</b>
 \e$B$^$?$O!"\e(B<a href="%%STARTURL%%" target="_blank"><b>[\e$B%9%?!<%H%Z!<%8\e(B]
-</b></a>\e$B$+$i3+;O$7$F$/$@$5$$!J%V%i%&%6$K$h$C$F$O!"%7%U%H$^$?\e(B
-\e$B$O%3%s%H%m!<%k%-!<$r2!$7$J$,$i%/%j%C%/$9$kI,MW$,$"$j$^$9!#%]%C%W%"%C%W5v2D$K@_Dj$9$l$P<+F0I=<(2DG=$G$9!K!#\e(B</td></tr>
+</b></a>\e$B$+$i3+;O$7$F$/$@$5$$!J%/%j%C%/$G%9%?!<%H%Z!<%8$,3+$+$J$1$l$P!"\e(B
+\e$B%7%U%H%-!<$r2!$7$J$,$i%/%j%C%/$7$F$/$@$5$$!#\e(B
+\e$B$^$?%]%C%W%"%C%W5v2D$K@_Dj$9$l$P<+F0E*$K%]%C%W%"%C%W$7$^$9!K!#\e(B
+</td></tr>
 </table>
 
 <script type="text/JavaScript">
index e91d93f..099a765 100644 (file)
@@ -168,7 +168,7 @@ int openClientGate(char *clientAddr4, char *macAddr4, char *clientAddr6, char *m
       RemoveOverlapRule(overlapRule4,overlapRule6);
       KillOverlapProcess(overlapRule4,overlapRule6,clientAddr4,clientAddr6);
 
-      if(debug>0)err_msg("INFO: user %s forces to close overlapped client", userid);
+      err_msg("INFO: user %s forces to close overlapped client", userid);
       PutClientMsg("Network is closed. Please End Web and Retry. ");
     }
     return FALSE;
index 2c057c7..efeed40 100644 (file)
@@ -40,6 +40,7 @@ char useridshort[USERMAXLN];/* userID before @ mark(cut off extraID) */
 char extraId[USERMAXLN];
 char userProperty[BUFFMAXLN];
 time_t timeIn, timeOut;
+int ipStatus;              /* flag for IPV4ONLY,IPV6ONLY or IPV46DUAL */
 int connectionMode;   /* client connect mode */
 /* variable to measuring processing time (in msec) */
 struct timeval timeBeginCgi, timeBeginWait, timeConnect, timeDisconnect;
@@ -48,7 +49,7 @@ char sessionId[BUFFMAXLN];    /* session ID */
 
 void PutCloseMsg(time_t timeOut, time_t timeIn);
 void SetProcessTitle(char *useridshort, char *clientAddr4, char * ruleNumber4, char *clientAddr6, char * ruleNumber6, int ipStatus);
-void logConnectMode(char *userid);
+void logConnectMode();
 void closeExit(int signo);
 
 /***************************************************/
@@ -63,7 +64,6 @@ int  main(int argc, char **argv)
   int parentpid;
   int duration;     /* requested usage duration */
   int authResult;
-  int ipStatus;              /* flag for IPv4 or IPv6 */
   char watchMode[WORDMAXLN];  /* client watch mode Http or Java or Timeout */
 
   /* get time at the cgi starting (in msec) */
@@ -237,7 +237,7 @@ void putCloseMsg(time_t timeOut, time_t timeIn)
 void closeExit(int signo)
 {
   /* save the connect mode */
-  logConnectMode(userid);
+  logConnectMode();
 
   /* signal is disabled */
   Signal(SIGTERM, SIG_DFL);
@@ -287,22 +287,30 @@ void setProcessTitle(char *useridshort, char *clientAddr4, char * ruleNumber4, c
 }
 
 
-/************************************/
-/* save connectMode to syslog       */
-/************************************/
-void logConnectMode(char *userid)
+/*****************************************/
+/* save connectMode and others to syslog */
+/*****************************************/
+void logConnectMode()
 {
   char *mode[4]={"NONE","JAVA","HTTP","TIME"};
   long time1sec,time2sec,time3sec;
   long time1usec,time2usec,time3usec;
 
+  /* set value on failure */
+  if(connectionMode<0 || connectionMode>3) connectionMode=NOCONNECT;
+  if(connectionMode==NOCONNECT){
+    gettimeofday(&timeBeginWait, NULL) ;
+    gettimeofday(&timeConnect, NULL) ;
+  }
+
   /* get time at the end of connection (in msec) */
   gettimeofday(&timeDisconnect, NULL) ;
 
-  /* time difference (seconds(sec) and micro-seconds(usec)) */
+  /* calc time difference (seconds(sec) and micro-seconds(usec)) */
   time1sec=(timeBeginWait.tv_sec - timeBeginCgi.tv_sec);
   time1usec=(timeBeginWait.tv_usec - timeBeginCgi.tv_usec);
-  if(time1usec<0){
+  /* if microsec diff is minus, bolow from sec diff */
+  if(time1usec<0){ 
     time1usec += 1000000; time1sec--;
   }
   time2sec=(timeConnect.tv_sec - timeBeginWait.tv_sec);
@@ -316,12 +324,12 @@ void logConnectMode(char *userid)
     time3usec += 1000000; time3sec--;
   }
 
-  if(connectionMode<0 || connectionMode>3) connectionMode=0;
-  if(debug>0) err_msg("INFO: user %s is watched by [%s] procsec(%ld.%ld,%ld.%ld,%ld.%ld)",
+  if(debug>0) err_msg("INFO: user=%s watchmode=%s procsec=%ld.%ld,%ld.%ld,%ld.%ld ipversion=%d useragent=%s",
                      userid, mode[connectionMode], 
                      time1sec,time1usec,
                      time2sec,time2usec,
-                     time3sec,time3usec);
+                     time3sec,time3usec,
+                     ipStatus, getenv("HTTP_USER_AGENT"));
 }