in ipctrl.c routerware_control is put under _MSC_VER

in udpsock.c this is masked 
	sptr_lsl_message = (LSL_MESSAGE *) lsl_control (ALLOCATE_LSL_MESSAGE, sizeof (LSL_MESSAGE));

	in socket_udp_receive 
	if ((sptr_sockaddr != NULL) && ((ULONG *) usptr_sockaddr_length != NULL) && (*usptr_sockaddr_length >= sizeof (SOCKADDR))) usptr_sockaddr_length is a ptr
	to an int.

	in (check_if_protocol_to_which_packet_is_destined_is_supported () check for
	tcp is made.

	in IP_ROUTE_ENTRY metric is changed from BYTE to ULONG for snmp.

in ipinit.c in initialize_ip if ip is not enabled return PASS rather than FAIL.

in iputil.c in free_an_ip_packet if the port number is NO_SUCH_PORT size 
returned is stupid. I have given a return if it is so. Check if it ever comes.
Atleast now it wont crash if the port number is invalid. but buffers will
be lost.

in icmprxpr.c process_icmp_echo_request is slightly modified   and put under 
RTRERROR this was causing the above listed problem. There might be other 
places where such a thing might be happening.


bring_up_port in ipctrl.c is been modified so that a rip response is sent
on the port whichever is coming up. this was done as if DOD is enabled 
there will be rip response is diabled for that port not even one response
will go the other side. This will guarantee that at least one of them will
go thro.


in rip.c in rip_periodic_timer some mod for routing tables to take care of
aging timer. check for RTRERROR.


23/05/96 Sachin
---------------
File : RIPINIT.C
	. Calls to ip_convert_masks_to_bits() which were wrongly passing network
	  address are made to pass the net mask now.
	. In rip_delete_route_for_port(), duplicated the block of code to
	  delete entries corresponding to both the network and the remote host
	  in case of point to point links. Earlier, both the entries were not being
	  deleted properly in case a point-to_point link goes down.
	. In case of LAN port, changed the parameter to ip_convert_mask_to_bits()

24/05/96 Sachin
---------------
File ICMPRXPR.C
	. The virtual_port feild of ip_upper_layer_parameters in
	  process_icmp_echo_request() is now set to NO_SUCH_PORT. It is only when
	  this is done that the later routines try and find the correct gateway to
	  put the packet on. If the value is not NO_SUCH_PORT, then the gateway
	  field needs to have the address of the correct gateway.
	    This is how it was originally coded. But to work around some other problem,
	  it was #if-ed out. The scare was that if the port is not known, the routine
	  which frees up the buffer does not know the beginning of the buffer (which
	  is calculated by moving the buff-ptr back by an amount determined by the
	  port number). But it is not this feild that is passed to the
	  free_an_ip_send_packet() routine. So looks like, it's ok.

04/06/96 Vidy
-------------

1. IP - RIPREPPR.c
------------------
static USHORT process_rip_entry_when_current_route_is_through_a_different_gateway (USHORT rx_port_number,

Due to DOD route_aging_timeout_value could be zero.
This will cause the route to be never changed.
(May have some other side effects!!)

2. IP - RIP.C
----------------------------------------
void rip_periodic_timer (void)

Due to DOD route_aging_timeout_value could be zero.
This used to cause the NO_DIRECT routes to be deleted immediately.

10/06/96 Vidy
-------------
1. IP - IPROUTE.C

IP_ROUTE_ENTRY *ip_find_route_and_update_cache (ULONG destination_ip_address, ULONG type_of_service)

Due to the check for RIP_enabled in the above route, default routes were not working


2. IP - IPCONFIG.C

Problem with long and short confusion in default route case.
metric was read as a short where as it is long
******************
Kevin reports a (rare) bus error probelem!! He has only default routes
and no rip. While he does FTP file xfer he got busserror once. Also Rick once.
But couldn't reproduce later.

Only the above two changes could have caused it? Default route without rip
was never working in routeware code.

******************

11/06/96 Vidy
-------------
Since the SNMP agent looks for RIP entries only into the ip.route_list and
the default route was not added to this, it was not shown by the SNMP manager.
So modified the following files with a condition compilation and added
to new routines to iputil.c

#ifdef ADD_IP_DEFAULT_ROUTE_TO_ROUTE_LIST
/* vidy added this to fix the SNMP-manager-not-showing-default-route problem */
/* this routine skips the default route(target= 0 for default_route) */
IP_ROUTE_ENTRY *get_first_ip_route_entry(void)
/* this routine skips the default route(target= 0 for default_route) */
IP_ROUTE_ENTRY *get_next_ip_route_entry( IP_ROUTE_ENTRY *sptr_route_entry)
#endif

files modified

        riptx.c                    
        ipnwcnfg.c                    
        iptimer.c                    
        iputil.c                    
        icmprxpr.c                    
        iproute.c                    
        riptxrep.c                    
        ripreppr.c                    
        rip.c                    
	(total of 9 files)
------------------------------------------------------------------------------
12/06/96 Vidy
-------------
iproute.c - void ip_add_route_for_port (USHORT port_number)

After route looses carrier on a dialup link and then reconnects, the metric and
flag.down_state, aging_timer was not updated properly. 

ipctrl.c - bring_up_port()
the rip is send only if it is dod enabled.

05/06/1996 Sachin
-----------------
	. We were answering ARP requests on LAN where the target address is not
	  necessarily ours, but has got into our cache. The specifications do
	  not say such a thing is necessary and it is a problem in case the target
	  has gone down and come up. In any case, we have no business to be responding
	  for someone else. Now, if the target is not our address, we do not
	  reply.

07/06/1996 Sachin
-----------------
	. Modified processing_for_proxy_arp() to handle proxying correctly in a
	  subnetted environment.

12/06/1996 Sachin
-----------------
	. Made the following changes for subnetting to work
		(a). Introduced a function, which constructs an index list in decreasing
		     order of the widths of the subnet masks.
		(b). Recoded check_if_the_target_is_a_host...() using (a).
		(c). Recoded check_if_the_target_is_a_subnet...() using (a).
		(d). Made a small change in find_rip_route_and_update_cache() to handle
		     routing in a subnetted environment.

		(e). Made a small modification in
		     check_if_another_route_with_a_lesser...()

13/06/1996 Sachin
-----------------
	. Added a new field in IP_UPPER_LAYER_PARAMETERS to keep track of the port
	  for which the buffer is allocated. Made changes accordingly to fill the
	  field to reflect the port for which the buffer is allocated.

13/06/1996 Sachin
-----------------
	. Made a small change in check_if_another_route_with_a_lesser_metric_already_exists_to_that_network()


17/06/1996 Sachin
-----------------
	. Made a small change in send_redirect_icmp_if_necessary().


17/06/1996 Sachin
-----------------
	. Made a small change in ip_router_rx_packet() to see that if IP is disabled
	  for a particular port, and if the packet is not an IP packet, return
	  PACKET_NOT_RECOGNIZED.

17/07/1996
----------
	. Made changes in arprx.c and ipremacc.c to handle IP addressing for remote
	  access clients only ports.

Sachin 07/10/1996
-----------------
	. Made a small change in check_if_time_to_live_field_in_ip_packet_is_valid ()
	  to restore the time_to_live field in the received packet's header. Otherwise
	  the header that is to be duplicated in the icmp data area will not be an
	  exact image of the IP header received.

	. Made a change in send_icmp_error_packet() to have icmp_packet_size computed
	  differently for ICMP_TIME_EXCEEDED_TYPE. Accordingly, a small change has
	  been made in get_size_of_icmp_message() to handle ICMP_TIME_EXCEEDED_TYPE,
	  which hitherto was not given any special treatment.

	. Made a change in send_icmp_error_packet() to have the source ip address
	  put correctly, after it is filled with some value already. Note that for
	  any ICMP error message packet that the router originates, the source address
	  is going to be the local IP address of the interface on which the packet has
	  to go (which happens also to be the port on which the packet was received).
	  Consequently, the ICMP checksum is recomputed to accomodate the change.

	. Made similar changes as the above to handle ICMP redirect message. Again
	  the recomputation of checksum, copying the correct amount of data (64 bits),
	  and handling ICMP_REDIRECT_MESSAGE in get_size_of_icmp_message().

Srikar, 22nd November 1996
--------------------------
	Added a call to function create_ip_mib_table_sorted_on_indices() in the
	end of function initialize_ip. This function is called to initalize the
	IP address table. 
	The definition of the function create_ip_mib_table_sorted_on_indices is 
	in the file "IPADRTAB.C". This file is added newly to this directory.
	File is taken from Router ware code that was being used in RN server.
	This file contains some other function definitions which have been
	commented out.	

Kamalnath 07 Dec 1996
------------------

File IPINIT.C
       .is_dhcp_enabled function() is added which will check remote_access_enabled
and bootp_enabled parameters in IP_PORT_CLASS. It will be called from PPP as soon
as LOWER_DEVICE_DRIVER_UP (link up) and LOWER_DEVICE_DRIVER_DOWN (link down) called.

File UDPTX.C
------------
	.In send_udp function the tx_port_number is made to zero if the local_address
is INTERNET_ADDRESS_ANY.

File RIP.C
----------
	in rip_is_it_ok_to_announce_this_route(). Changed the way netmask
is computed.

Sachin 31st Dec. 1996
---------------------
	In iprxpr.c, ip_rx_filter() :
	made a small change.

Sachin 09th Jan 1997
--------------------
	In IPFILT.C there was a bug in ip_get_desf_filtering_entry().
	In IPTXPR.C there was a small bug in ip_tx_filter().

Sachin 03 April, 1997
---------------------
	RIPINIT.C : Port calculation of default and static routes.
	Introduced a different function to calculate the port from
	the configured default route address.


Kamalnath 26\02\1997
--------------------
	IP (UDP) broacasts forwarding is added to support RAS. For the details
   about changes and testplan see the file ipbc.doc
   
Sudhir 1/4/97 
--------------
Iptimer.c Included dns client timer here
Ipinit.c  Calling dnsinit from here
ipconfig.c included dns.h files
vnvip.h new classes are added
   
Newfiles 
--------
dnsinit.c
dnstimer.c
dnstx.c
dnsrx.c

Makefile is modified to include the above mentioned files


Naveen.P.N. 22/04/1997
 vnvip.h - included offset for Frame Type
 vnvip.h - for some field offset were taken w.r.t RIP class.
           Now it is changed and made to compute offset of RIP fields
           w.r.t IP_CLASS


--------------------------------------------------------------------------
Changes made by Sachin (courtesy Bala) to fix the memory leakage bugs ip
IP on the 2nd and 3rd May, 1997

ARPRX.C
-------
. Added another parameter in processing_for_proxy_arp () to collect the
  return value from the function. In some cases, processing_for_proxy_arp()
  sends a proxy arp, in which case, we should not be returning
  IP_DATA_PACKET_RXED_AND_WAS_NOT_FORWARDED because LSL will then free
  up the buffer. Further, processing_for_proxy_arp() does not always
  return IP_DATA_PACKET_RXED_AND_WAS_FORWARDED.

. If the call to arp_processing_for_remote_clients () returns PASS, we
  MUST return IP_DATA_PACKET_RXED_AND_WAS_FORWARDED because the same buffer
  is used up.

. We were not checking for the NULL value of sptr_arp_table_entry
  before sending the arp reply.

. In check_for_valid_arp_packet(), we were returning FAIL in case the
  arp request has an IP address equal to one of our addresses
  (misconfiguration of some host with our IP address). Even in this case,
  we need to react to the ARP request.

IPTX.C
------
. normalize_ip_send_packet_header() is called in the IP module to get
  the pointer to be given to free_an_ip_send_packet(). Note that this
  function is called to normalize only those pointers, that have been
  returned by get_an_ip_send_packet(). This function is rewritten so
  that this function, togeather with free_an..() gets to the right pointer.

. Lots of places where the buffers are to be freed up, we need to make
  a call to normalize_ip_send_packet_header() followed by a call to
  the fptr_tx_completion routine, which happens to be free_an...().
  All such code is put in during May 2nd to May 6th.

RARP.C
------
. In rarp_packet_received(), when we send a packet thru' send_packet_to_lsl(),
  we were earlier not looking at the return value of the function.  If the
  function returns FAIL, we should be returning
  IP_DATA_PACKET_RXED_AND_WAS_NOT_FORWARDED.

RIPTXREP.C
----------
. send_rip_response_packet(). When we have to free the buffer, we need to
  make a call to normali...() befre calling free_an_ip...().

. allocate_rip_response_packet_and_build_header(). We were not checking
  for NULL return from get_an_ip...().

RIPRX.C
-------
. processing_for_individual_route_requests(). When we need to free the buffer,
  we need to make a call to nor...() before calling free_an_ip..().

IPUTIL.C
--------
. Rewrote free_an_ip_send_packet().

. Added two new functions get_an_icmp_send_packet() and
  send_completion_icmp_packet() to be used for ICMP packets only.

ICMPRXPR.C and ICMPTX.C
-----------------------
. In lots of places, where a buffer was allocated using get_an_ip..()
  it is now done thru' get_an_icmp_send_packet.

. Similarly, instead of calling free_an_ip_send_packet() or passing
  the function pointer as a parameter to send_ip_packet_from_upper_layer(),
  send_completion_icmp_packet() is called now.

Kamalnath 07-05-1997
--------------------
IPCTRL.C
.Added code for IP (stacks) get informed about MTU by the device driver underneath.

Sachin 13th May, 1997
---------------------
IPRXASSM.C
----------
. Some places, receive_..._packet for TCP, ICMP, UDP was being given rx_port_number
  instead of ip_para...->rx_port_number. It is set right now.

. Before freeing, normalizing was not being done. It is set right now.


IPREASSM.C
----------
. rx_port_number should be set to 0 in update_ip_...() because the buffer
  has been allocated for port 0 in copy_ip_list...()

IPFRAGTX.C
----------
. A small fix in fragment_packet_and_forward()

. copy_header_to_packet_and_send_fragment() changes to return the success/
  failure so that the caller can free in case of a failure.

. modified determine_the_number_of_bytes_to_be_copied().

. fragment_packet_and_forward() : bptr_copy_to should not be incremented

. Noted the following :

   . We must have the IP Port Maximum Reassembly Size parameter (set to
      about 64K (65535)
   . The MTU in IP Section is 1500 and NOT 1514

Sachin 16th May 1997
 Small fix in pass_ip_packet_to...()

Sachin 17th 1997
   arp.c for incrementing the number_of_retransmissions
   The problem was this :
      When a packet addressed to x is given to IP, it tries to find an entry
   for it in the arp table. If the entry is found, the packet is sent and
   life is simple. But if the entry is not found, ARP sends a request, copies
   the IP packet to a buffer (queues it basically) so that it can transmit
   it after getting the ARP response. Now, it is so happening that in case
   of such entries that have the arp request sent but responses not received,
   the number_of_retransmission counter was not incremented and the entry
   along with the queued buffers stay till doomsday.

Observed that the number of retries counter was not being included
in our ini. There is a set default values string that is not enabled
in our ini. So these parameters have to be explicitly put in.

Kamalnath 28-06-1997
--------------------
 * The new function enable_ip_bootp_params_for_dhcp_relay_agent (void) is
   added to configure BOOTP parameter in the case of DHCP Relay Agent since
   it has been renoved from the Roucon.This is added in ipinit.c.

28/08/1997 Sudhir and Sachin (to get the IP address from the server)
--------------------------------------------------------------------
Added another parameter, parameter_3 to get the local IP address from
PPP. This also requires a few changes in LSL and PPP.


sudhir 29/10/97 
---------------
ipctrl.c:
        bring_up_port(); if (rip_enabled) check is made before initiating
        triggered broadcast.
iptx.c:
        send_ip_packet_from_upper_layer(); upper_layer_parameters->gateway
        is inited to default gateway based on certain conditions.

icmprxpr.x:
        process_icmp_echo_request();
        upper_layer_parameters->virtual_port_number is inited to NO_SUCH_PORT 
        for lan (default is 0);

sudhir for proxy server on 9/11/97
----------------------------------

iprx.c : checking for the proxy response packet and processing response packet
is removed from here and put in iprxassm.c

iprxassm.c : after reassembling packets is_proxy_response_packet is called 
and processed . if we check for proxy response before reassembly we won't
be able to detect all the fragments (because all the fragments won't
contain transport layer headers).

iptx.c: if the packet to be forwarded is reassembled by our ip stack
we will have to free it there itself. So we souldn't try to free at device
driver level. do_not_free_buffer flag is added for this purpose.

sudhir 1/1/98
-------------
tcp checksum verification is added in files iprx.c and iprxassm.c. In
case proxy packets with wrong checksum is received these packets are
forwarded with a new checksum of 0.

iprx.c 
------
	ip_parameters.union_ip_packet_is_to_be_freed flag is set to FALSE here.
	explanation is given in iprx.c

icmptx.c
--------
	ip_upper_layer_parameters.source_address is set to rx_port_address in case
   if the address is INTERNET_ADDRESS_ANY.This is to avoid sending packets
   with source address of 0.0.0.0.
  
udprx.c
-------
	check for the destination address is made before sending icmp error 
	message.

sudhir 17/3/98
--------------
	Modified Ipctrl.c to support RAS.


Naveen 30/6/1998
----------------
   Chnaged the function is_dhcp_client_enabled. One more condition is added
   to know whether to activate dhcp client function to get IP Address for
   the upcoming RAS client.

Sudha for dns caching 10 Nov 1998
---------------------------------
** if proxy's clients have proxy's lan addr as dns server addr in their
	tcp/ip stack & if any such client requests proxy for any dns query on
	UDP protocol, proxy should send dns response to those clients either :
	* any dns query in proxy's dns response cache matches with client's 
	  query of domain name.	If so, proxy sends the dns response directly
	  to client.
	* If no matching is found in cache, proxy will try to proxy that client's
     dns query to the dns server addr configured for proxy & hence will
     send the response as got from dns server addr.

** dnsresp.c, a new file has been introduced in ip dir for dns caching.
** changes made in
* dns.h, kdns.h, kip.h, vdns.h, vdnsstr.h, vipstr.h 
* makefile
* dnsinit.c, dnsresp.c, dnsrx.c, dnstimer.c, dnstx.c, iprx.c, iptx.c, iprxassm.c, 
  iputil.c, udptx.c
* proxy.c of proxy dir

sudha 10-Oct-1999 /* For changes, search with date */
-----------------
For DNS caching changes made in
* dnsresp.c 
	** display_proxy_dns_cache_info() register_debugger function
		*** changed slightly to display configured primary, secondary DNS server addr
			as well as negoiated primary, secondary DNS server addr along with the
			DNS server addr taken for DNS caching on a particular wan port.
	** get_dns_server_address() function
		*** order of preference of configured_primary changed.
* dnscache.txt
		*** This txt file explains briefly about DNS caching, issues involved, 
		present scheme followed etc.,

sudha 11-Oct-1999 /* For changes, search with date */
-----------------
* ipctrl.c
	** ip_control() function
		*** case UPDATE_DNS_SERVER_ADDRESS -> calling update_dns_server_address
				_in_dhcp_address_list() function with negotiated primary DNS
				server addr, if any & if it is non-zero.		

sudha 12-Oct-1999	/* For changes, search with date */
----------------- 
* dnsresp.c 
	** get_dns_server_address() function.
		*** order of preference of dns server addr used for dns caching changed.
			 1. configured non-zero primary, if any.
			 2. latest negotiated non-zero primary, if any.
			 3. configured non-zero secondary, if any.
			 4. latest negotiated non-zero secondary, if any.
 				
-----------------------------------------------------------------------------
          Name of Engineer : sudha
                      Date : 28-Oct-1999
            Files modified : iprxassm.c
Problem/change description : If we have domain name filters & also nat mapping 
									  for wan interface address exists, dns queries sent 
									  by proxy DNS client wont get dns response pkts. 
									  This was the problem. What was happening was, the dns
									  response pkts sent from internet DNS server to proxy 
									  DNS client, was mistaken for nat request pkt from 
									  Internet client to local server. So DNS response pkt,
									  instead of being given to upper layer was being put in
									  the lan of proxy. Taken care for that now.

-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
          Name of Engineer : sudha
                      Date : 11-Nov-1999
            Files modified : dnsinit.c, dnsrx.c, dnsresp.c
Problem/change description : If dns configured primary, secondary addresses
									  are empty, (i.e., not zero, as well as no valid
									  address )	they are taken to be 0xFFFFFFFFL. 
									  Those 0xFFFFFFFFL addresses, since they are 
									  non-zero are mistaken to be some valid address & 
									  used for dhcp dns server address updation as well 
									  as dns server to be contacted for domain name 
									  queries. This is a bug. Hence introduced a check
									  for 0xFFFFFFFFL value along with 0x0L value,
									  before updation. Similarly, taken bug fix from
									  RAS from Pankaj, if domain name is an ALIAS name.
	 	
-----------------------------------------------------------------------------


