History: mip_base

This page describes all changes made to the mip_base package, IP Base, since its release.


6.70 (2021-08-18, 13:45):

  • Added ip_v6_nd_add_slaac() function to set IPv6 SLAAC prefix. 
  • ND checks autonomous address configuration flag in prefix option.
  • ND configures SLAAC address only if autonomous address configuration flag is set in prefix option.

6.69 (2021-07-11, 18:00):

  • Introduced internal ip_enter_task() function in order to support optimized operation when SOCK_AUTO_ENTER_TASK socket option is enabled.

6.68 (2021-06-30, 08:00):

  • Added ip_v6_nd_add_prefix() to be able to add user-defined prefixes.
  • Static address is now accessible also if DHCPv6 is disabled (that is, IP_DHCP_V6_ENABLE=0).

6.67 (2021-06-10, 17:30):

  • In arp_send_gratuitous_req() instead of the own HW address now use 0 as a target HW address in the ARP request frame. (RFC3927).
  • Introduced an internal configuration notification which is used in AutoIP extension to get a notification about the IP configuration and link status.
  • Introduced ip_ifc_get_options() public function to be able to check the active interface options.
  • Renamed get_entry_index() to arp_get_entry_index().
  • Fixed compiler warnings.
  • Fixed typo in ip.c.

6.66 (2021-05-05, 14:30):

  • Fixed compiler warnings.

6.65 (2021-05-04, 19:00):

  • Typo fixed (FILED->FIELD).

6.64 (2021-03-02, 11:10):

  • IPv6 removed unused function nd_is_addr_local_priv().

6.63r2 (2021-01-11, 12:38):

  • Fixed function header of ip_v6_set_router_addr() function.
  • Typo fixed in ip_v6.c.

6.63 (2020-12-01, 10:27):

  • Corrected destination address recognition in case of aliased IP addresses in IPv4 stack.
  • Corrected removal of IP Aliases when routing is disabled.
  • Corrected compilation error in IPv6 and socket when routing was disabled.

6.62 (2020-11-20, 08:35):

  • Corrected ip_pifc_to_routehdl() to return correct route handle if IPv4 is Disabled.

6.61 (2020-10-22, 11:30):

  • IPv6: fixed compilation warning about cast truncation of const value.

6.60 (2020-10-05, 10:05):

  • IPv4: source IP address could have been other than in not configured state.
  • Fixed DHCP handling when IPv4 aliases are enabled.
  • IPv4 aliases broadcast addresses are now added to ARP table.

6.59 (2020-10-01, 16:30):

  • Compiler error fixed for IPv4 when IP_DEFRAG_ENABLE or ARP_PROBE_ENABLE was set.

6.58 (2020-09-15, 13:05):

  • ND in ipv6 does Duplicate address detection for all addresses.
  • Link-Local is always set even if static ipv6 address is defined.
  • Added DHCP inform message for v4 and v6 version.
  • Added API for adding ipv6 router address.

6.57 (2020-09-08, 14:00):

  • Removed ARP probe in situation that MAC address is not available.
  • DHCPv6 is started when router advertisement is not received.
  • Router assigned prefixes are also used even if DHCPv6 is enabled.
  • IPv6 ND now adds all nodes multicast address to MAC driver multicast filtering list (previously router advertisement was not received if MAC driver used a multicast address hashing table).

6.56 (2020-08-26, 09:30):

  • Added ability to disable IPv4 or IPv6 stack on given interface.
  • Removed check for starting IPv4 interface with IP address.

6.55 (2020-07-15, 15:20)

  • IP buffers are released from the TX pending queue when processing received packets to make sure IP buffers are released as fast as possible.

6.54 (2020-07-13, 13:10)

  • State change notification could be called mistakenly when disconnected state was entered for IP_V6 (with not configured state) when IP_V6 was not enabled. 

6.53 (2020-06-15, 13:45):

  • Added ip_ifc_set_current_gateway() function to change the gateway address at runtime.
  • Added ip_ifc_set_gateway_priorities() to define the gateway priority list for the interfaces. This is required if multiple interfaces are present to set which interface should act as the default gateway if a link goes down for one or more interfaces.

6.52 (2020-05-27, 15:44):

  • IPv4 packet reception did not work if IP_V4_ALIAS_COUNT was set to 0.

6.51 (2020-05-20, 22:31):

  • MISRA-C:2012: violations eliminated (MISRA-C:2004 revoked).
  • Public API-s return IP_ERR_INVALID_PARAM if input parameter is not valid (e.g. NULL).

6.50 (2020-03-31, 19:00):

  • const removed from interface pointer parameter of interface handler functions to be compatible with all interfaces (it didn't work with PPP).

6.49 (2020-03-26, 11:10):

  • Corrected size of Interface multicast table hardware addresses to include one extra entry for IGMP module.
  • Corrected IGMP init sequence to initialize all entries in g_multicast_hw_table.
  • Added function ip_ifc_check_multicast_address() that is called by ifc_eth to check if given multicast address is listened.

6.48 (2020-03-19, 11:30):

  • Corrected hardware multicast address to/from static multicast to be not overwritten by IGMP of ND modules.
  • IPv6 now allows to set static IP configuration when DHCPv6 is enabled.

6.47 (2020-03-03, 15:00):

  • Add/Delete hardware multicast address to/from static multicast address table APIs added.

6.46 (2019-12-05, 11:00):

  • Corrected ip_v6_set_config() missing const for input parameter p_ip_config.
  • Added const qualifiers for input parameter p_ifc in p_nwifc_fill_hdr and p_nwifc_receive.

6.45 (2019-11-25, 15:56):

  • MISRA-C:2004: violations eliminated.

6.44r2 (2019-11-25, 12:30):

  • AutoSAR test report added to ip_base_v4 package.

6.44 (2019-09-06, 12:00):

  • If an IPv4 fragment was received which overlapped with a previously received IPv4 fragment, and all fragments were released to the free IP buffer queue due to a lack of RX buffers in the low-level Ethernet driver, then the recently received IPv4 fragment was not released back to the free IP buffer queue, meaning that the system continued operating with one IP buffer less.

6.43 (2019-06-12, 19:00):

  • IP buffer was released to the incorrect interface when a frame was routed between two interfaces sharing the same pool. This could lead to a situation where the interface receiving the frame was starved of receive buffers and, after the frame was sent to the destination interface, the IP buffer was not added back to the original interface.

6.42 (2019-06-04, 19:00):

  • Added the internal option to retrieve route list only for the active interfaces. This is only used internally to be able to send UDP packets with global broadcast address destination to all active interfaces from the socket layer.

6.41 (2019-05-30, 09:00):

  • NULL pointer access could happen if the registered ICMPv4 callback function was called by the ICMPv4 module just after removing it (due to interface drop).

6.40 (2019-05-16, 18:23):

  • Introduced new API function ip_ifc_enable_dhcpv4() to enable/disable DHCP on an interface without deleting/re-initializing the interface.

6.39 (2019-02-13, 16:55):

  • MISRA-C:2004: violations eliminated.

6.38 (2019-02-01, 11:10)

  • MLD: secured mldi_response_itv to have minimal value of 1  to prevent further operations failing with error division by 0.

6.37 (2018-12-14, 12:00):

  • MISRA-C:2004: remaining violations eliminated.

6.36 (2018-10-15, 13:49): 

  • MISRA-C:2004: violations partially eliminated.

6.35 (2018-10-05, 18:05):

  • Renamed ip_v4_set_config_alias() to ip_v4_set_alias().
  • Changed ip_v4_set_alias() parameters : alias_idx not needed (is found automatically).
  • Added new function to delete IP aliases: ip_v4_delete_alias().

6.34 (2018-09-19, 11:25):

  • Added IP aliasing support for IPv4.

6.33 (2018-09-10, 13:07):

  • If no route found and IP address is global broadcast (, the packet is sent through the first interface.
  • Implemented sanity check of gateway address in ip_set_config() : gateway shall be in the same network as device IP address.

6.32 (2018-09-06, 09:19):

  • Fixed IP checksum calculation for unaligned buffers.

6.31 (2018-08-31, 13:33):

  • Interface stop()/delete()/init()/start() could return error when functions were used multiple times with IPv6.

6.30r2 (2018-08-29, 18:11):

  • Added document HTML link to the documentation folder.
  • Renamed history and document files to the package name.

6.30 (2018-05-17, 09:03):

  • Implemented ARP probing and announcement.
  • Eliminated compiler error that occurred when IP_DEFRAG_ENABLE is 0.

6.29 (2018-03-06, 13:00):

  • Saturated ICMP port unreachable message to 576 bytes as specified by RFC 1812.
  • ICMP port unreachable message size is now correct (previously it was reduced by 20 bytes).

6.28 (2018-02-02, 14:15)r2:

  • Moved IGMP from mip_base to ip_base_v4.

6.28 (2018-01-29, 10:15):

  • Neighbor Discovery: corrected reading of retransmit time.
  • Neighbor Discovery: neighbor solicitation is sent immediately when no cache entry for given address is found.

6.27 (2018-01-19, 15:00):

  • Added sending of fragmented packets to IP v4.
  • ICMPv4 now handles fragmented packets.
  • Corrected matching of fragmented packets (id, protocol, source and destination address).

6.26 (2018-01-15, 13:45):

  • Corrected reading of reach time in ND solicitation messages.
  • Corrected initialization of Neighbor cache table.
  • Added support for handling of gratuitous ARP messages.

6.25 (2017-11-21, 13:00)

  • MLD deletes entries that are in INCLUDE mode and have no source addresses defined.
  • Corrected setting of MLD timeout ( previously timeout could be set to 0 which disabled timer).
  • Changes introduced in the previous version discarded.
  • Setting up a statically configured (i.e. non-DHCP) network interface so that it does not have a valid gateway address is prohibited. (the gateway address (IPv4/IPv6) containing all zeroes is considered to be invalid).

6.24 (2017-10-27, 10:51):

  • Route handle requested using ip_route_get_hdl() will now be the route through the default gateway even when the network interface is declared to be the Default Gateway Interface but does not have a gateway configured. This is the case when, for example, an Ethernet interface is initialized as ip_eth_ifc_init( drv_init, 0u, IP_IFC_OPT_DEF_GATEWAY, &ifc_hdl ) and then configured as ip_set_config( ifc_hdl, &eth_config, IP_CONFIGURE_IP_V4 ) where eth_config.ipc_gateway == {0,0,0,0}.

6.23 (2017-10-10, 15:30):

  • MLD: corrected decrementing of removed/added addresses. (Previous entry index was not updated in case where entry retransmit counter was not 0.)
  • ICMPv6: corrected calculation of delay time between sending of error messages.

6.22 (2017-10-05, 11:52):

  • Implemented sending of error message "ICMP destination unreachable" for IPv4.

6.21 (2017-09-11, 14:00):

  • ip_v4_str_to_addr()/ip_v6_str_to_addr() corrected to handle invalid IPv4/IPv6 addresses.
  • Corrected timeout mechanism for IPv4 fragmented packets.
  • Corrected source address for IPv6 ping to FF02::1.
  • Corrected generation of multicast address in ARP.
  • MLD:

        -  corrected behavior in MLDv1 compatibility mode.

        - Corrected buffer overrun in mld_get_mc_addr().

        - Corrected behavior of list mode change from INCLUDE to EXCLUDE.

        - Corrected packet retransmit control.

6.20 (2017-08-22, 14:15):

  • IP header's version field is checked when frame received.
  • IP header's identification field is filled when frame sent.
  • ICMP packet is not accepted when source address is broadcast or multicast.

6.19 (2017-08-15, 12:05):

  • Routes added with ip_route_add() did not work.

6.18 (2017-06-19, 12:00):

  • IPv4 config is not set to 'unconfigured' when link is down and it was previously configured. When the link is up, the interface tries to work with an old IPv4 configuration.


  • Broadcast packet is now sent to MAC FF:FF:FF:FF:FF:FF if gateway IPv4 address is configured., (Previously after gateway was set it was sent to gateway MAC address.)
  • ip_v6_get_host_addr() made public function.


  • IFC: corrected releasing of IP buffer in ip_ifc_release_buf() in case of invalid route handle.
  • IFC: corrected copy of multicast addresses list in ip_ifc_update_mc().


  • Added changes to MLD that fix infinite loop because mdma_rec_list was not set to MLD_SRC_INVALID_INDEX after clearing the list.


  • Corrected timeout mechanism in IPv6 fragmented packets.
  • Corrected Link state check in ip_route_check_hdl().
  • Corrected adding/removing sources in MLD protocol.


  • Corrected releasing of dropped IPv6 fragmented packets.
  • Corrected IPv6 reading of preferred and valid lifetime to be endianness-independent.
  • Corrected compilation warnings (VC++) about potentially uninitialized variables.


  • Sequential packet sending to non-existing IP address could lead to freeze of sending due to endless retries of ARP requests.


  • Corrected ip_pool_release_ipbuf() when releasing multiple buffers.


  • Corrected sending of NS messages in case of multiple requests.
  • Corrected ip_route_get_hdl_fqdn() to take into account IPv6 gateway setting.
  • Corrected sending of ICMP error in ipv6 when option header is invalid.
  • Corrected use of IP_ROUTE_ENABLE in  IPv6 that caused an error when disabled.


  • Corrected typo in MLD configuration.
  • Corrected routing mechanisms between interfaces in IPv6.


  • IP buffers are added to the tail of queue in ARP (adding to top caused sending of IP Buffers in reverse order).
  • Corrected Configuration parameters for ND (previous values caused often timed out for IPv6 connections).
  • Corrected ip_v6_str_to_addr() function to accept 39 byte strings


  • Corrected router advertisement handler (nd_router_advert_hdlr) and determination of next hop (nd_determine_next_hop).
  • Added IPsec support.
  • Fixup to the IPv6 stack: nd_determine_next_hop could cause hangup when IP_DHCP_V6_ENABLE was enabled.
  • Corrected compilation warnings.
  • Checked and corrected compilation warnings.
  • Corrected releasing of IGMP entry in igmp_add_membership() when failed to set multicast table.
  • Corrected sending of packets by IFC when there are previous packets on the wait queue.
  • Added starting of MLD module when IPv6 is enabled.
  • Added starting of MLD on a specific interface when this interface gets Link Up.


  • warnings removed.


  • added support for OFFLINE interface state.
  • warnings removed.


  • Corrected incorrect address size in psp_memcmp() in igmp.c.


  • Corrected typo in MACRO for defining IPv6 max interface number.


  • corrected size of g_ip_route_table (did not include IP6 gateway entry).
  • corrected call for arp_add_entry_priv() not to pass NULL pointer as IP address.


  • Added IPv6 support.
  • API functions were modified to use new t_ip_addr structure to pass and hold IP addresses.


  • ip_set_def_fqdn() and ip_get_def_fqdn() functions introduced to be able to set/get the default FQDN name, which is used by DHCP.
  • ip_set_fqdn() function was removed from public API.


  • Introduced IP_PORT_AUTO_ASSIGN to indicate that the local port is assigned automatically by the IP stack.
  • arp_find_first_entry() and arp_find_next_entry() functions were added to ARP API to be able to get the currently valid ARP table entries.
  • arp_get_hwaddr_from_ipaddr() and arp_get_ipaddr_from_hwaddr() functions were added to ARP API.    


  • MAC address is always updated when link is connected to be able to use USB-ethernet adapters.
  • Checksum calculation and verification can be switched separately for protocols.


  • ip_ifc_entry_start() modified to start network driver before getting the driver's hardware address. This way initial network address (if any) can be read from network controllers where the controller has to be started before any access to it (like e.g. external Ethernet chips).


  • If icmp_ping_cb() was called with a valid callback pointer and then icmp_ping() or icmp_ping_cb() with no callback was executed callback registered at the first icmp_ping_cb() call was called.


  • ip_nwd_release_buf() and ip_nwd_release_buf_ext() functions restored to conform to systems where reception may fail to a buffer allocated with ip_nwd_get_buf() or ip_nwd_get_buf() earlier.
  • Disabled the drop of UDP and TCP (after processing control flags) packets for NW drivers with RX packet feed option disabled. This modification is only important for NW driver developers.


  • icmp_ping_cb() timeout parameter type changed to uint16_t to avoid warning.


  • configuration notification changed: now only IP_NTF_CONFIG_CHANGE can be set as a notification.
  • warnings removed on 16 bit platforms.
  • Ping didn't work for IP addresses on remote network when IP_ROUTE_ENABLE option was disabled.
  • Support for PPP interfaces added (static configuration is allowed to change on a started interface).


  • icmp_ping_cb() function added, which can be used to request for a callback when ping completes and set ping timeout.


  • Network broadcast packets are sent correctly (broadcast address of an interface is now added to the ARP table).
  • arp_del_entry() added.


  • Routing didn't work correctly if the source and destination network was using different IP pools.


  • release IP buffer in case an invalid packet arrived from a NW driver that allocates its own receive buffers (feeding is off).


  • event receive reorganized to avoid unexpected event reception from the caller task with some RTOS-es.


  • incoming IGMP packets were not released, slowly consuming all free buffers.


  • ip_nwd_release_buf() function removed, the system will automatically release of NWD buffers.
  • interface stop returned with IP_ERR_POOL_BUSY error.
  • checksum calculation fixed to work correctly with IP address.
  • required package version checks added.


  • ip_set_fqdn() accepts only FQDN of valid length (<IP_MAX_FQDN_SIZE)
  • Set not configured state in case the IP address is changed and the interface is configured with DHCP.


 - New pool handling mechanism introduced, where buffer pools are independent of the NW drivers.

 - Recalculate checksum for a forwarded packet because of changed TTL (need to decrease by one).

 - Accept packets from a different network even if the source route is unknown.

 - Allow the possibility to perform memory copy free forwarding in case the source and destination interfaces are using the same pool.


 - return code of the NW driver set filter function was ignored when the interface was started.


 - in some cases default gateway route handle couldn't be returned by ip_route_get_hdl() correctly.


 - added multicast group membership count, this way drop membership will only take place if all subscribers were unsubscribed. This change was required to support socket layer ADD_MEMBERSHIP and DROP_MEMBERSHIP correctly.

 - ip_addr_to_str() and ip_str_to_addr() functions introduced.

 - Default TTL value moved to config_ip.h and default TOS value added.

 - IP send packet changed to accept IP options structure.

 - ip_route_get_hdl() function returned the wrong handle in case of a multicast IP address (causing udp_send to fail when sending multicast datagrams) and could sometimes return wrong handle if the interface(s) didn't get the DHCP assigned address.

 - IP_ERR_NO_BUFFER error code introduced and returned instead of IP_ERROR when requesting for a buffer and it's not available (affects udp_get_buf() and tcp_get_buf() functions).

 - fixed get buffer request with IP_MTU_SIZE size.

 - corrected IP buffer request in IGMP module if used without OS.


 - In certain situations incorrect operation could happen if an interface was stopped for an interface with DHCP enabled. An IP buffer could get stuck in the ARP queue after an interface stop was followed by an interface start.

 - ARP requests made independent of the configuration state.

 - Ping failed to work correctly if IP_MULTICAST was enabled.


 - Multicasting support added.

 - Incorrect handling of sent packets when NW driver reported queue full was fixed, in this situation the system was unstable.

 - Decrement and check TTL before forwarding a packet directed to another interface.


 - IP buffer configuration changed, three set of buffers available: MTU size, minimum size and user size.

 - ip_ifc_buf_config() and ip_ifc_get_mtu() functions added.

 - Interface start will succeed if NW driver can't accept more IP buffers with add_buf (half of MTU size buffers is more than the NW driver can handle).

 - packet forwarding will be rejected if destination interface MTU size is smaller than the size of the packet to forward.


 - introduced routing (the IP stack can forward packets from one interface to another and can accept packets from another network).

 - handles NW driver buffer alignment option.

 - possibility to enable/disable RX/TX checksum globally.

 - returns error from get/set config, get/set fqdn, interface start, stop, and delete functions when called from an invalid state.

 - introduced new error codes: IP_ERR_NOT_CONFIGURED, IP_ERR_INVALID_STATE and IP_ERR_LINK_DOWN.

 - configuration notification changed: now only IP_NTF_STATE_CHANGE and IP_NTF_CONFIG_CHANGE can be set as a notification.


 - comments fixed.


 - ARP module will skip request from the timer function and retry it next time to avoid the timer task (in the timer utility) to be suspended in case there is no free buffer in the IP stack. This could also lead to a failure as the task was not registered.


 - changed to support NW driver unit size in order to provide unit size aligned and multiple of unit size packets to add_buf and send.


 - removed mutex lock/unlock from ip_stack_start(), ip_stack_stop() and ip_stack_delete() to avoid possible deadlocks caused by timers.

 - dhcp stop/delete moved before udp stop/delete.


 - Removed the possibility to call interface start, stop delete in invalid states. Removed the possibility of deadlock in case network driver start/stop routine suspended execution for some time.

 - IP configuration pointer and FQDN pointer passed to ip_config notification.

 - An interface could run out of buffers if they were released when the connection was invalid (ETH cable was unplugged).

 - release buffer could crash if called with NULL pointer.


 - FQDN handling added.


 - added multi-interface capability.

 - fragmented ICMP response removed.


 - fragmented ICMP request fixed (could cause infinite loop).


 - release IP buffer sends an event in OS mode and allows IP buffer notification in non-OS mode. get IP buffer will always be non-blocking and an IP buffer notification can be requested. Originally get IP buffer was polling drv_if_task if it had to wait forever for a free buffer, this could lead to recursion and lockup in worst case.

 - Changed the way of waiting for an IP buffer to become free. It caused problems if a task was waiting for it with timeout other than WAIT_FOREVER and WAIT_NONE.

 - Incorrect event could arrive more than one function with timeout was called from the same task.


 - introduced the possibility to ignore packets in the transmit wait/pending queue. This was required to be able to indicate by a higher layer if the packet has already been released, as a lockup could occur if TX buffer was released from multiple places (TCP and drv_if_task).


 - start, stop, delete added to all modules.

 - driver interface reorganized.

 - minor fixes.

 - comments fixed.

 - ip_get_config() added.


 - start, stop and delete functions added.

 - drop all connections when the ETH driver is stopped.


 - comments changed, beautified.

 - t_ping_status renamed to t_ping_state.


 - Initial release.