diff -r -N -c ppp-nat6/main.c ppp/main.c
*** ppp-nat6/main.c	Sat Jan 25 14:01:27 1997
--- ppp/main.c	Sat Feb 15 18:27:21 1997
***************
*** 49,54 ****
--- 49,55 ----
   *  1997
   *    Jan. 15 : Support of filtering incomming packets after re-addressing.
   *              Fix of not recalculate checksum on error packets.
+  *    Feb. 15 : Support of VDO Live Video.
   */
  
  #include "fsm.h"
***************
*** 111,116 ****
--- 112,118 ----
  char pid_filename[128];
  UPORT *utport[65536], *uuport[65536];
  URAPORT *uraport;
+ UVDOPORT *uvdoport;
  ICMPADDR *icmpaddr;
  u_short sub_port, real_port;
  
***************
*** 299,304 ****
--- 301,307 ----
    argc--; argv++;
  
    uraport = NULL;
+   uvdoport = NULL;
    mode = MODE_INTER;		/* default operation is interactive mode */
    netfd = -1;
    ProcessArgs(argc, argv);
diff -r -N -c ppp-nat6/nat.c ppp/nat.c
*** ppp-nat6/nat.c	Wed Jan 15 17:50:45 1997
--- ppp/nat.c	Sat Feb 15 18:18:45 1997
***************
*** 1,6 ****
  /*
   *  NAT module for iij-ppp
!  *    Programmed by Junichi SATOH (junichi@astec.co.jp) in 1996.
   */
  
  #include "fsm.h"
--- 1,6 ----
  /*
   *  NAT module for iij-ppp
!  *    Programmed by Junichi SATOH (junichi@astec.co.jp) in 1996,1997.
   */
  
  #include "fsm.h"
***************
*** 39,44 ****
--- 39,45 ----
  
  extern UPORT *utport[65536], *uuport[65536];
  extern URAPORT *uraport;
+ extern UVDOPORT *uvdoport;
  extern ICMPADDR *icmpaddr;
  extern u_short sub_port, real_port;
  
***************
*** 262,272 ****
      static int ipaddr[5], port[3];
      UPORT *recstart, *tmp_uuport = NULL, *tmp_utport = NULL;
      UPORT *data_utport = NULL, *prev_utport;
- #if 0
-     UPORT *prev_uuport;
- #endif
      ICMPADDR *tmp_icmpaddr;
      URAPORT *tmp_uraport;
      int sc_status = 0, i, len;
      char *tcpdata;
      static char ipbuf[20];
--- 263,271 ----
      static int ipaddr[5], port[3];
      UPORT *recstart, *tmp_uuport = NULL, *tmp_utport = NULL;
      UPORT *data_utport = NULL, *prev_utport;
      ICMPADDR *tmp_icmpaddr;
      URAPORT *tmp_uraport;
+     UVDOPORT *tmp_uvdoport;
      int sc_status = 0, i, len;
      char *tcpdata;
      static char ipbuf[20];
***************
*** 285,322 ****
  	  (struct udphdr *)(ipheader + 2 * ((struct ip *)buf)->ip_hl);
  	sport = ntohs(udpheader->uh_sport);
  	dport = ntohs(udpheader->uh_dport);
- #if 0
- /* from */
- 	if(uuport[sport] != NULL) {
- 	    recstart = uuport[sport];
- 	    prev_uuport = NULL;
- 	    while(recstart) {
- 		if(recstart->dstaddr.s_addr == 
- 		   ((struct ip *)buf)->ip_dst.s_addr) {
- 		    tmp_uuport = recstart;
- 		    break;
- 		}
- 		if(recstart->lm_time + KEEP_UDP < time(NULL) && prev_uuport) {
- 		    prev_uuport->next = recstart->next;
- 		    free(recstart);
- 		    recstart = prev_uuport->next;
- 		} else {
- 		    prev_uuport = recstart;
- 		    recstart = recstart->next;
- 		}
- 	    }
- 	    if(recstart == NULL) {
- 		tmp_uuport = (UPORT*)malloc(sizeof(UPORT));
- 		tmp_uuport->next = uuport[sport];
- 		uuport[sport] = tmp_uuport;
- 	    }
- 	} else {
- 	    uuport[sport] = (UPORT*)malloc(sizeof(UPORT));
- 	    uuport[sport]->next = NULL;
- 	    tmp_uuport = uuport[sport];
- 	}
- /* to */
- #endif
  	tmp_uuport = GetUPortPointer(buf, sport, sport, &subport, sc_status);
  	if(sc_status == 1) {
  	    tmp_uuport->srcaddr.s_addr = ((struct ip *)buf)->ip_src.s_addr;
--- 284,289 ----
***************
*** 357,362 ****
--- 324,335 ----
  		tmp_uraport->next = uraport;
  		uraport = tmp_uraport;
  	    }
+ 	    if((dport == VDO1 || dport == VDO2) && sc_status == 1) {
+ 		tmp_uvdoport = (UVDOPORT*)malloc(sizeof(UVDOPORT));
+ 		tmp_uvdoport->vdolink = tmp_utport;
+ 		tmp_uvdoport->next = uvdoport;
+ 		uvdoport = tmp_uvdoport;
+ 	    }
  	}
  	if(tcpheader->th_flags & TH_FIN == TH_FIN) {
  	    recstart = utport[sport];
***************
*** 511,516 ****
--- 484,490 ----
      static int ch_flag;
      UPORT *recstart, *tmp_uuport;
      URAPORT *tmp_uraport, *prev_uraport;
+     UVDOPORT *tmp_uvdoport, *prev_uvdoport;
      ICMPADDR *icmp_recstart;
      static struct ip *er_ipheader;
  
***************
*** 562,567 ****
--- 536,569 ----
  		}
  		prev_uraport = tmp_uraport;
  		tmp_uraport = tmp_uraport->next;
+ 	    }
+ 	}
+ 	if(ch_flag == 0) {
+ 	    /* Check VDOLiveVideo UDP packet. */
+ 	    prev_uvdoport = NULL;
+ 	    tmp_uvdoport = uvdoport;
+ 	    while(tmp_uvdoport) {
+ 		if(tmp_uvdoport->vdolink->dstaddr.s_addr == 
+ 		   ((struct ip *)buf)->ip_src.s_addr) {
+ 		    ch_flag = 1;
+ 		    if(prev_uvdoport == NULL) {
+ 			uvdoport = tmp_uvdoport->next;
+ 		    } else {
+ 			prev_uvdoport->next = tmp_uvdoport->next;
+ 		    }
+ 		    realaddr->s_addr = tmp_uvdoport->vdolink->srcaddr.s_addr;
+ 		    tmp_uuport = (UPORT*)malloc(sizeof(UPORT));
+ 		    tmp_uuport->srcaddr.s_addr = 
+ 		      tmp_uvdoport->vdolink->srcaddr.s_addr;
+ 		    tmp_uuport->dstaddr.s_addr = 
+ 		      tmp_uvdoport->vdolink->dstaddr.s_addr;
+ 		    tmp_uuport->next = uuport[dport];
+ 		    uuport[dport] = tmp_uuport;
+ 		    free(tmp_uvdoport);
+ 		    break;
+ 		}
+ 		prev_uvdoport = tmp_uvdoport;
+ 		tmp_uvdoport = tmp_uvdoport->next;
  	    }
  	}
  	break;
diff -r -N -c ppp-nat6/nat.h ppp/nat.h
*** ppp-nat6/nat.h	Wed Jan 15 17:49:46 1997
--- ppp/nat.h	Sat Feb 15 18:15:55 1997
***************
*** 1,6 ****
  /*
   *  nat.h    for iij-ppp
!  *    by Junichi SATOH (junichi@astec.co.jp)
   */
  
  /* using ports */
--- 1,6 ----
  /*
   *  nat.h    for iij-ppp
!  *    by Junichi SATOH (junichi@astec.co.jp)  1996,1997.
   */
  
  /* using ports */
***************
*** 22,27 ****
--- 22,33 ----
      struct usera *next;
  };
  
+ /* using ports used by VDOLive Video */
+ struct usevdo {
+     struct useport *vdolink;
+     struct usevdo *next;
+ };
+ 
  /* address translation table for ICMP(echo) packets */
  struct icmpaddr {
      struct icmpaddr *next;
***************
*** 32,37 ****
--- 38,44 ----
  
  typedef struct useport UPORT;
  typedef struct usera URAPORT;
+ typedef struct usevdo UVDOPORT;
  typedef struct icmpaddr ICMPADDR;
  
  /* Time to keep a exchanging table. (sec) */
***************
*** 49,54 ****
--- 56,65 ----
  /* client udp port */
  #define RAUDP_L 1000
  #define RAUDP_H 9999
+ 
+ /* VDOLive Video */
+ #define VDO1 7000
+ #define VDO2 7010
  
  /* PORT numbers */
  #define POUT 0
