[riot-commits] [RIOT-OS/RIOT] 710c7e: transport_layer: Splitting UDP and TCP

Oleg Hahm oleg at hobbykeller.org
Thu Sep 11 20:49:35 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 710c7e6cf684f28aed15c024a613a19015f015df
      https://github.com/RIOT-OS/RIOT/commit/710c7e6cf684f28aed15c024a613a19015f015df
  Author: Cenk Gündoğan <cnkgndgn at gmail.com>
  Date:   2014-09-11 (Thu, 11 Sep 2014)

  Changed paths:
    M Makefile.dep
    M Makefile.pseudomodules
    M examples/rpl_udp/Makefile
    M examples/rpl_udp/main.c
    M examples/rpl_udp/rpl.c
    M examples/rpl_udp/udp.c
    M pkg/libcoap/0001-Add-RIOT-Makefile.patch
    M pkg/oonf_api/0001-add-RIOT-support.patch
    M sys/Makefile
    M sys/Makefile.include
    M sys/auto_init/auto_init.c
    R sys/net/include/destiny.h
    R sys/net/include/destiny/in.h
    R sys/net/include/destiny/socket.h
    R sys/net/include/destiny/types.h
    A sys/net/include/socket_base.h
    A sys/net/include/socket_base/in.h
    A sys/net/include/socket_base/socket.h
    A sys/net/include/socket_base/types.h
    A sys/net/include/tcp.h
    A sys/net/include/udp.h
    M sys/net/network_layer/sixlowpan/lowpan.c
    A sys/net/transport_layer/Makefile
    R sys/net/transport_layer/destiny/Makefile
    R sys/net/transport_layer/destiny/destiny.c
    R sys/net/transport_layer/destiny/msg_help.c
    R sys/net/transport_layer/destiny/msg_help.h
    R sys/net/transport_layer/destiny/socket.c
    R sys/net/transport_layer/destiny/socket.h
    R sys/net/transport_layer/destiny/tcp.c
    R sys/net/transport_layer/destiny/tcp.h
    R sys/net/transport_layer/destiny/tcp_hc.c
    R sys/net/transport_layer/destiny/tcp_hc.h
    R sys/net/transport_layer/destiny/tcp_timer.c
    R sys/net/transport_layer/destiny/tcp_timer.h
    R sys/net/transport_layer/destiny/udp.c
    R sys/net/transport_layer/destiny/udp.h
    A sys/net/transport_layer/socket_base/Makefile
    A sys/net/transport_layer/socket_base/msg_help.c
    A sys/net/transport_layer/socket_base/msg_help.h
    A sys/net/transport_layer/socket_base/socket.c
    A sys/net/transport_layer/socket_base/socket.h
    A sys/net/transport_layer/tcp/Makefile
    A sys/net/transport_layer/tcp/tcp.c
    A sys/net/transport_layer/tcp/tcp.h
    A sys/net/transport_layer/tcp/tcp_hc.c
    A sys/net/transport_layer/tcp/tcp_hc.h
    A sys/net/transport_layer/tcp/tcp_timer.c
    A sys/net/transport_layer/tcp/tcp_timer.h
    A sys/net/transport_layer/udp/Makefile
    A sys/net/transport_layer/udp/udp.c
    A sys/net/transport_layer/udp/udp.h
    M sys/posix/pnet/include/netinet/in.h
    M sys/posix/pnet/include/sys/socket.h
    M sys/posix/pnet/sys_socket.c

  Log Message:
  -----------
  transport_layer: Splitting UDP and TCP

Currently, the tcp and udp implementations are bound to each other in a
module called *destiny*. Thus, when using only one of them then the
other one gets also compiled into the binary and initialized,
which results in unnecessary RAM usage and workload for the CPU.

The approach in this PR defines a common module named *socket_base*,
which contains functions used by the posix layer. Compiled by it's own,
those functions return negative error codes, to symbolize upper layers
that they are not supported. When also including the modules *udp* or
*tcp* respectively, functions from *socket_base* get overwritten with the
correct functionality.

Defining *udp* or *tcp* in a Makefile also includes *socket_base*.
Defining *pnet* in a Makefile also includes *socket_base*.


  Commit: 218635027c715efe5d5ae4a98b6033508ba52858
      https://github.com/RIOT-OS/RIOT/commit/218635027c715efe5d5ae4a98b6033508ba52858
  Author: Oleg Hahm <oleg at hobbykeller.org>
  Date:   2014-09-11 (Thu, 11 Sep 2014)

  Changed paths:
    M Makefile.dep
    M Makefile.pseudomodules
    M examples/rpl_udp/Makefile
    M examples/rpl_udp/main.c
    M examples/rpl_udp/rpl.c
    M examples/rpl_udp/udp.c
    M pkg/libcoap/0001-Add-RIOT-Makefile.patch
    M pkg/oonf_api/0001-add-RIOT-support.patch
    M sys/Makefile
    M sys/Makefile.include
    M sys/auto_init/auto_init.c
    R sys/net/include/destiny.h
    R sys/net/include/destiny/in.h
    R sys/net/include/destiny/socket.h
    R sys/net/include/destiny/types.h
    A sys/net/include/socket_base.h
    A sys/net/include/socket_base/in.h
    A sys/net/include/socket_base/socket.h
    A sys/net/include/socket_base/types.h
    A sys/net/include/tcp.h
    A sys/net/include/udp.h
    M sys/net/network_layer/sixlowpan/lowpan.c
    A sys/net/transport_layer/Makefile
    R sys/net/transport_layer/destiny/Makefile
    R sys/net/transport_layer/destiny/destiny.c
    R sys/net/transport_layer/destiny/msg_help.c
    R sys/net/transport_layer/destiny/msg_help.h
    R sys/net/transport_layer/destiny/socket.c
    R sys/net/transport_layer/destiny/socket.h
    R sys/net/transport_layer/destiny/tcp.c
    R sys/net/transport_layer/destiny/tcp.h
    R sys/net/transport_layer/destiny/tcp_hc.c
    R sys/net/transport_layer/destiny/tcp_hc.h
    R sys/net/transport_layer/destiny/tcp_timer.c
    R sys/net/transport_layer/destiny/tcp_timer.h
    R sys/net/transport_layer/destiny/udp.c
    R sys/net/transport_layer/destiny/udp.h
    A sys/net/transport_layer/socket_base/Makefile
    A sys/net/transport_layer/socket_base/msg_help.c
    A sys/net/transport_layer/socket_base/msg_help.h
    A sys/net/transport_layer/socket_base/socket.c
    A sys/net/transport_layer/socket_base/socket.h
    A sys/net/transport_layer/tcp/Makefile
    A sys/net/transport_layer/tcp/tcp.c
    A sys/net/transport_layer/tcp/tcp.h
    A sys/net/transport_layer/tcp/tcp_hc.c
    A sys/net/transport_layer/tcp/tcp_hc.h
    A sys/net/transport_layer/tcp/tcp_timer.c
    A sys/net/transport_layer/tcp/tcp_timer.h
    A sys/net/transport_layer/udp/Makefile
    A sys/net/transport_layer/udp/udp.c
    A sys/net/transport_layer/udp/udp.h
    M sys/posix/pnet/include/netinet/in.h
    M sys/posix/pnet/include/sys/socket.h
    M sys/posix/pnet/sys_socket.c

  Log Message:
  -----------
  Merge pull request #1508 from cgundogan/transport_layer_refactoring

transport_layer: Splitting UDP and TCP


Compare: https://github.com/RIOT-OS/RIOT/compare/70ec73b03898...218635027c71


More information about the commits mailing list