Index: uspace/lib/net/include/tl_common.h
===================================================================
--- uspace/lib/net/include/tl_common.h	(revision e526f08e005a95740d8b5d3b30f7cdf1db353104)
+++ uspace/lib/net/include/tl_common.h	(revision dfda6a10a37b0db78ce8f81abb949377ac4fee74)
@@ -27,14 +27,16 @@
  */
 
-/** @addtogroup net_tl
- *  @{
+/** @addtogroup libnet 
+ * @{
  */
 
 /** @file
- *  Transport layer common functions.
+ * Transport layer common functions.
  */
 
-#ifndef __NET_TL_COMMON_H__
-#define __NET_TL_COMMON_H__
+#ifndef LIBNET_TL_COMMON_H_
+#define LIBNET_TL_COMMON_H_
+
+#include <ipc/services.h>
 
 #include <net/socket_codes.h>
@@ -44,6 +46,6 @@
 
 /** Device packet dimensions.
- *  Maps devices to the packet dimensions.
- *  @see device.h
+ * Maps devices to the packet dimensions.
+ * @see device.h
  */
 DEVICE_MAP_DECLARE(packet_dimensions, packet_dimension_t);
@@ -51,61 +53,11 @@
 extern int tl_get_ip_packet_dimension(int, packet_dimensions_ref,
     device_id_t, packet_dimension_ref *);
-
-/** Gets the address port.
- *  Supports AF_INET and AF_INET6 address families.
- *  @param[in,out] addr The address to be updated.
- *  @param[in] addrlen The address length.
- *  @param[out] port The set port.
- *  @returns EOK on success.
- *  @returns EINVAL if the address length does not match the address family.
- *  @returns EAFNOSUPPORT if the address family is not supported.
- */
-extern int tl_get_address_port(const struct sockaddr * addr, int addrlen, uint16_t * port);
-
-/** Updates IP device packet dimensions cache.
- *  @param[in,out] packet_dimensions The packet dimensions cache.
- *  @param[in] device_id The device identifier.
- *  @param[in] content The new maximum content size.
- *  @returns EOK on success.
- *  @returns ENOENT if the packet dimension is not cached.
- */
-extern int tl_update_ip_packet_dimension(packet_dimensions_ref packet_dimensions, device_id_t device_id, size_t content);
-
-/** Sets the address port.
- *  Supports AF_INET and AF_INET6 address families.
- *  @param[in,out] addr The address to be updated.
- *  @param[in] addrlen The address length.
- *  @param[in] port The port to be set.
- *  @returns EOK on success.
- *  @returns EINVAL if the address length does not match the address family.
- *  @returns EAFNOSUPPORT if the address family is not supported.
- */
-extern int tl_set_address_port(struct sockaddr * addr, int addrlen, uint16_t port);
-
-/** Prepares the packet for ICMP error notification.
- *  Keeps the first packet and releases all the others.
- *  Releases all the packets on error.
- *  @param[in] packet_phone The packet server module phone.
- *  @param[in] icmp_phone The ICMP module phone.
- *  @param[in] packet The packet to be send.
- *  @param[in] error The packet error reporting service. Prefixes the received packet.
- *  @returns EOK on success.
- *  @returns ENOENT if no packet may be sent.
- */
-extern int tl_prepare_icmp_packet(int packet_phone, int icmp_phone, packet_t packet, services_t error);
-
-/** Receives data from the socket into a packet.
- *  @param[in] packet_phone The packet server module phone.
- *  @param[out] packet The new created packet.
- *  @param[in] prefix Reserved packet data prefix length.
- *  @param[in] dimension The packet dimension.
- *  @param[in] addr The destination address.
- *  @param[in] addrlen The address length.
- *  @returns Number of bytes received.
- *  @returns EINVAL if the client does not send data.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns Other error codes as defined for the async_data_read_finalize() function.
- */
-extern int tl_socket_read_packet_data(int packet_phone, packet_ref packet, size_t prefix, const packet_dimension_ref dimension, const struct sockaddr * addr, socklen_t addrlen);
+extern int tl_get_address_port(const struct sockaddr *, int, uint16_t *);
+extern int tl_update_ip_packet_dimension(packet_dimensions_ref, device_id_t,
+    size_t);
+extern int tl_set_address_port(struct sockaddr *, int, uint16_t);
+extern int tl_prepare_icmp_packet(int, int, packet_t, services_t);
+extern int tl_socket_read_packet_data(int, packet_ref, size_t,
+    const packet_dimension_ref, const struct sockaddr *, socklen_t);
 
 #endif
