The friendly Operating System for the Internet of Things
Application connection API

Provides a minimal common API for applications to connect to the different network stacks. More...

Detailed Description

deprecated 4.About

| Application |
| Network Stack |

This module provides a minimal set of functions to establish a connection using different types of connections. Together, they serve as a common API that connects application- and network stack code.

Currently the following connection types are defined:

Each network stack must implement at least one connection type.

Note that there might be no relation between the different connection types. For simplicity and modularity this API doesn't put any restriction of the actual implementation of the type. For example, one implementation might choose to have all connection types have a common base class or use the raw IPv6 connection type to send e.g. UDP packets, while others will keep them completely separate from each other.

How To Use

A RIOT application uses the functions provided by one or more of the connection types headers (for example conn_udp_t), regardless of the network stack it uses. The network stack used under the bonnet is specified by including the appropriate module (for example USEMODULE += gnrc_conn_udp)

This allows for network stack agnostic code on the application layer. The application code to establish a connection is always the same, allowing the network stack underneath to be switched simply by changing the USEMODULE definition in the application's Makefile.


 Raw IPv4/IPv6 connections
 Connection submodule for raw IPv4/IPv6 connections.
 TCP connections
 Connection submodule for TCP connections.
 UDP connections
 Connection submodule for UDP connections.


file  conn.h
 Application connection API definitions.


ipv6_addr_tconn_find_best_source (const ipv6_addr_t *dst)
 Find the best matching source address for a given prefix. More...

Function Documentation

ipv6_addr_t* conn_find_best_source ( const ipv6_addr_t dst)
[in]dstPointer to the IPv6 address to find a match for Must not be NULL
NULL if no matching address on any interface could be found
pointer to an IPv6 address configured on an interface with the best match to dst