Index: uspace/lib/net/include/adt/module_map.h
===================================================================
--- uspace/lib/net/include/adt/module_map.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Character string to module map.
- */
-
-#ifndef LIBNET_MODULES_MAP_H_
-#define LIBNET_MODULES_MAP_H_
-
-#include <task.h>
-#include <async.h>
-#include <net/modules.h>
-#include <adt/generic_char_map.h>
-
-/** Type definition of the module structure.
- * @see module_struct
- */
-typedef struct module_struct module_t;
-
-/** Module map.
- * Sorted by module names.
- * @see generic_char_map.h
- */
-GENERIC_CHAR_MAP_DECLARE(modules, module_t)
-
-/** Module structure. */
-struct module_struct {
-	/** Module task identifier if running. */
-	task_id_t task_id;
-	/** Module service identifier. */
-	services_t service;
-	/** Module session if running and connected. */
-	async_sess_t *sess;
-	/** Usage counter. */
-	int usage;
-	/** Module name. */
-	const uint8_t *name;
-	/** Module full path filename. */
-	const uint8_t *filename;
-	/** Connecting function. */
-	connect_module_t *connect_module;
-};
-
-extern int add_module(module_t **, modules_t *, const uint8_t *,
-    const uint8_t *, services_t, task_id_t, connect_module_t *);
-extern module_t *get_running_module(modules_t *, uint8_t *);
-extern task_id_t net_spawn(const uint8_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/arp_interface.h
===================================================================
--- uspace/lib/net/include/arp_interface.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,63 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-#ifndef LIBNET_ARP_INTERFACE_H_
-#define LIBNET_ARP_INTERFACE_H_
-
-#include <adt/measured_strings.h>
-#include <task.h>
-#include <ipc/services.h>
-#include <net/device.h>
-#include <net/socket.h>
-#include <async.h>
-
-/** @name ARP module interface
- * This interface is used by other modules.
- */
-/*@{*/
-
-extern int arp_device_req(async_sess_t *, nic_device_id_t, services_t, services_t,
-    measured_string_t *);
-extern int arp_translate_req(async_sess_t *, nic_device_id_t, services_t,
-    measured_string_t *, measured_string_t **, uint8_t **);
-extern int arp_clear_device_req(async_sess_t *, nic_device_id_t);
-extern int arp_clear_address_req(async_sess_t *, nic_device_id_t, services_t,
-    measured_string_t *);
-extern int arp_clean_cache_req(async_sess_t *);
-extern async_sess_t *arp_connect_module(services_t);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/ethernet_lsap.h
===================================================================
--- uspace/lib/net/include/ethernet_lsap.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Link service access point identifiers.
- */
-
-#ifndef LIBNET_ETHERNET_LSAP_H_
-#define LIBNET_ETHERNET_LSAP_H_
-
-#include <sys/types.h>
-
-/** Ethernet LSAP type definition. */
-typedef uint8_t eth_lsap_t;
-
-/** @name Ethernet LSAP values definitions */
-/*@{*/
-
-/** Null LSAP LSAP identifier. */
-#define ETH_LSAP_NULL	0x00
-/** ARPANET Internet Protocol (IP) LSAP identifier. */
-#define ETH_LSAP_IP	0x06
-/** ARPANET Address Resolution Protocol (ARP) LSAP identifier. */
-#define ETH_LSAP_ARP	0x98
-/** SubNetwork Access Protocol (SNAP) LSAP identifier. */
-#define ETH_LSAP_SNAP	0xAA
-/** Global LSAP LSAP identifier. */
-#define ETH_LSAP_GLSAP	0xFF
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/ethernet_protocols.h
===================================================================
--- uspace/lib/net/include/ethernet_protocols.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Ethernet protocol numbers according to the on-line IANA - Ethernet numbers
- * http://www.iana.org/assignments/ethernet-numbers
- * cited January 17 2009.
- */
-
-#ifndef LIBNET_ETHERNET_PROTOCOLS_H_
-#define LIBNET_ETHERNET_PROTOCOLS_H_
-
-#include <sys/types.h>
-
-/** Ethernet protocol type definition. */
-typedef uint16_t eth_type_t;
-
-/** @name Ethernet protocols definitions */
-/*@{*/
-
-/** Ethernet minimal protocol number.
- * According to the IEEE 802.3 specification.
- */
-#define ETH_MIN_PROTO		0x0600 /* 1536 */
-
-/** Internet IP (IPv4) ethernet protocol type. */
-#define ETH_P_IP		0x0800
-
-/** ARP ethernet protocol type. */
-#define ETH_P_ARP		0x0806
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/generic.h
===================================================================
--- uspace/lib/net/include/generic.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Generic communication interfaces for networking.
- */
-
-#ifndef LIBNET_GENERIC_H_
-#define LIBNET_GENERIC_H_
-
-#include <ipc/services.h>
-#include <net/device.h>
-#include <adt/measured_strings.h>
-#include <net/packet.h>
-#include <async.h>
-
-extern int generic_device_state_msg_remote(async_sess_t *, sysarg_t,
-    nic_device_id_t, sysarg_t, services_t);
-extern int generic_device_req_remote(async_sess_t *, sysarg_t, nic_device_id_t,
-    services_t);
-extern int generic_get_addr_req(async_sess_t *, sysarg_t, nic_device_id_t,
-    uint8_t *address, size_t max_length);
-extern int generic_packet_size_req_remote(async_sess_t *, sysarg_t,
-    nic_device_id_t, packet_dimension_t *);
-extern int generic_received_msg_remote(async_sess_t *, sysarg_t,
-    nic_device_id_t, packet_id_t, services_t, services_t);
-extern int generic_send_msg_remote(async_sess_t *, sysarg_t, nic_device_id_t,
-    packet_id_t, services_t, services_t);
-extern int generic_translate_req(async_sess_t *, sysarg_t, nic_device_id_t,
-    services_t, measured_string_t *, size_t, measured_string_t **, uint8_t **);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/icmp_client.h
===================================================================
--- uspace/lib/net/include/icmp_client.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * ICMP client interface.
- */
-
-#ifndef LIBNET_ICMP_CLIENT_H_
-#define LIBNET_ICMP_CLIENT_H_
-
-#include <net/icmp_codes.h>
-#include <net/packet.h>
-
-extern int icmp_client_process_packet(packet_t *, icmp_type_t *, icmp_code_t *,
-    icmp_param_t *, icmp_param_t *);
-extern size_t icmp_client_header_length(packet_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/icmp_header.h
===================================================================
--- uspace/lib/net/include/icmp_header.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- *  @{
- */
-
-/** @file
- * ICMP header definition.
- * Based on the RFC 792.
- */
-
-#ifndef LIBNET_ICMP_HEADER_H_
-#define LIBNET_ICMP_HEADER_H_
-
-#include <sys/types.h>
-
-#include <net/in.h>
-#include <net/icmp_codes.h>
-
-/** ICMP header size in bytes. */
-#define ICMP_HEADER_SIZE  sizeof(icmp_header_t)
-
-/** Echo specific data. */
-typedef struct icmp_echo {
-	/** Message idintifier. */
-	icmp_param_t identifier;
-	/** Message sequence number. */
-	icmp_param_t sequence_number;
-} __attribute__((packed)) icmp_echo_t;
-
-/** Internet control message header. */
-typedef struct icmp_header {
-	/** The type of the message. */
-	uint8_t type;
-	
-	/**
-	 * The error code for the datagram reported by the ICMP message.
-	 * The interpretation is dependent on the message type.
-	 */
-	uint8_t code;
-	
-	/**
-	 * The checksum is the 16-bit ones's complement of the one's complement
-	 * sum of the ICMP message starting with the ICMP Type. For computing
-	 * the checksum, the checksum field should be zero. If the checksum does
-	 * not match the contents, the datagram is discarded.
-	 */
-	uint16_t checksum;
-	
-	/** Message specific data. */
-	union {
-		/** Echo specific data. */
-		icmp_echo_t echo;
-		/** Proposed gateway value. */
-		in_addr_t gateway;
-		
-		/** Fragmentation needed specific data. */
-		struct {
-			/** Reserved field. Must be zero. */
-			icmp_param_t reserved;
-			/** Proposed MTU. */
-			icmp_param_t mtu;
-		} frag;
-		
-		/** Parameter problem specific data. */
-		struct {
-			/** Problem pointer. */
-			icmp_param_t pointer;
-			/** Reserved field. Must be zero. */
-			icmp_param_t reserved;
-		} param;
-	} un;
-} __attribute__((packed)) icmp_header_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/icmp_remote.h
===================================================================
--- uspace/lib/net/include/icmp_remote.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- *  @{
- */
-
-#ifndef LIBNET_ICMP_REMOTE_H_
-#define LIBNET_ICMP_REMOTE_H_
-
-#include <net/socket_codes.h>
-#include <sys/types.h>
-#include <net/device.h>
-#include <adt/measured_strings.h>
-#include <net/packet.h>
-#include <net/inet.h>
-#include <net/ip_codes.h>
-#include <net/icmp_codes.h>
-#include <net/icmp_common.h>
-#include <async.h>
-
-/** @name ICMP module interface
- * This interface is used by other modules.
- */
-/*@{*/
-
-extern int icmp_destination_unreachable_msg(async_sess_t *, icmp_code_t,
-    icmp_param_t, packet_t *);
-extern int icmp_source_quench_msg(async_sess_t *, packet_t *);
-extern int icmp_time_exceeded_msg(async_sess_t *, icmp_code_t, packet_t *);
-extern int icmp_parameter_problem_msg(async_sess_t *, icmp_code_t, icmp_param_t,
-    packet_t *);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/il_remote.h
===================================================================
--- uspace/lib/net/include/il_remote.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Internetwork layer module interface for the underlying network interface
- * layer. This interface is always called by the remote modules.
- */
-
-#ifndef LIBNET_IL_REMOTE_H_
-#define LIBNET_IL_REMOTE_H_
-
-#include <ipc/services.h>
-#include <sys/types.h>
-#include <net/device.h>
-#include <net/packet.h>
-#include <async.h>
-
-/** @name Internetwork layer module interface
- * This interface is used by other modules.
- */
-/*@{*/
-
-extern int il_device_state_msg(async_sess_t *, nic_device_id_t,
-    nic_device_state_t, services_t);
-extern int il_received_msg(async_sess_t *, nic_device_id_t, packet_t *,
-    services_t);
-extern int il_mtu_changed_msg(async_sess_t *, nic_device_id_t, size_t,
-    services_t);
-extern int il_addr_changed_msg(async_sess_t *, nic_device_id_t, size_t,
-    const uint8_t *);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/il_skel.h
===================================================================
--- uspace/lib/net/include/il_skel.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
- * Copyright (c) 2010 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-#ifndef LIBNET_IL_SKEL_H_
-#define LIBNET_IL_SKEL_H_
-
-/** @file
- * Internetwork layer module skeleton.
- * The skeleton has to be part of each internetwork layer module.
- */
-
-#include <ipc/services.h>
-#include <adt/measured_strings.h>
-#include <net/device.h>
-#include <net/packet.h>
-#include <async.h>
-
-/** Module initialization.
- *
- * This has to be implemented in user code.
- *
- * @param[in] sess Networking module session.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module
- *         initialize function.
- *
- */
-extern int il_initialize(async_sess_t *sess);
-
-/** Process the internetwork layer module message.
- *
- * This has to be implemented in user code.
- *
- * @param[in]  callid Message identifier.
- * @param[in]  call   Message parameters.
- * @param[out] answer Answer.
- * @param[out] count  Number of arguments of the answer.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module.
- *
- */
-extern int il_module_message(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, size_t *answer_count);
-
-extern int il_module_start(sysarg_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/ip_client.h
===================================================================
--- uspace/lib/net/include/ip_client.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * IP client interface.
- */
-
-#ifndef LIBNET_IP_CLIENT_H_
-#define LIBNET_IP_CLIENT_H_
-
-#include <net/socket_codes.h>
-#include <sys/types.h>
-
-#include <net/packet.h>
-#include <net/ip_codes.h>
-#include <ip_interface.h>
-
-extern int ip_client_prepare_packet(packet_t *, ip_protocol_t, ip_ttl_t,
-    ip_tos_t, int, size_t);
-extern int ip_client_process_packet(packet_t *, ip_protocol_t *, ip_ttl_t *,
-    ip_tos_t *, int *, size_t *);
-extern size_t ip_client_header_length(packet_t *);
-extern int ip_client_set_pseudo_header_data_length(void *, size_t, size_t);
-extern int ip_client_get_pseudo_header(ip_protocol_t, struct sockaddr *,
-    socklen_t, struct sockaddr *, socklen_t, size_t, void **, size_t *);
-
-// TODO ipopt manipulation
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/ip_header.h
===================================================================
--- uspace/lib/net/include/ip_header.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,223 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet 
- * @{
- */
-
-/** @file
- * IP header and options definitions.
- * Based on the RFC 791.
- */
-
-#ifndef LIBNET_IP_HEADER_H_
-#define LIBNET_IP_HEADER_H_
-
-#include <byteorder.h>
-#include <sys/types.h>
-
-/** Returns the fragment offest high bits.
- * @param[in] length The prefixed data total length.
- */
-#define IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length) \
-	((((length) / 8U) & 0x1f00) >> 8)
-
-/** Returns the fragment offest low bits.
- * @param[in] length The prefixed data total length.
- */
-#define IP_COMPUTE_FRAGMENT_OFFSET_LOW(length) \
-	(((length) / 8U) & 0xff)
-
-/** Returns the IP header length.
- * @param[in] length The IP header length in bytes.
- */
-#define IP_COMPUTE_HEADER_LENGTH(length) \
-	((uint8_t) ((length) / 4U))
-
-/** Returns the fragment offest.
- * @param[in] header The IP packet header.
- */
-#define IP_FRAGMENT_OFFSET(header) \
-	(((GET_IP_HEADER_FRAGMENT_OFFSET_HIGH(header) << 8) + \
-	    (header)->fragment_offset_low) * 8U)
-
-/** Returns the IP packet header checksum.
- *  @param[in] header The IP packet header.
- */
-#define IP_HEADER_CHECKSUM(header) \
-	(htons(ip_checksum((uint8_t *) (header), IP_HEADER_LENGTH(header))))
-
-/** Returns the actual IP packet data length.
- * @param[in] header The IP packet header.
- */
-#define IP_HEADER_DATA_LENGTH(header) \
-	(IP_TOTAL_LENGTH(header) - IP_HEADER_LENGTH(header))
-
-/** Returns the actual IP header length in bytes.
- * @param[in] header The IP packet header.
- */
-#define IP_HEADER_LENGTH(header) \
-	(GET_IP_HEADER_LENGTH(header) * 4U)
-
-/** Returns the actual IP packet total length.
- * @param[in] header The IP packet header.
- */
-#define IP_TOTAL_LENGTH(header) \
-	ntohs((header)->total_length)
-
-/** @name IP flags definitions */
-/*@{*/
-
-/** Fragment flag field shift. */
-#define IPFLAG_FRAGMENT_SHIFT	1
-
-/** Fragmented flag field shift. */
-#define IPFLAG_FRAGMENTED_SHIFT	0
-
-/** Don't fragment flag value.
- * Permits the packet fragmentation.
- */
-#define IPFLAG_DONT_FRAGMENT	(0x1 << IPFLAG_FRAGMENT_SHIFT)
-
-/** Last fragment flag value.
- * Indicates the last packet fragment.
- */
-#define IPFLAG_LAST_FRAGMENT	(0x0 << IPFLAG_FRAGMENTED_SHIFT)
-
-/** May fragment flag value.
- * Allows the packet fragmentation.
- */
-#define IPFLAG_MAY_FRAGMENT	(0x0 << IPFLAG_FRAGMENT_SHIFT)
-
-/** More fragments flag value.
- * Indicates that more packet fragments follow.
- */
-#define IPFLAG_MORE_FRAGMENTS	(0x1 << IPFLAG_FRAGMENTED_SHIFT)
-
-/*@}*/
-
-/** Type definition of the internet header.
- * @see ip_header
- */
-typedef struct ip_header ip_header_t;
-
-/** Type definition of the internet option header.
- * @see ip_header
- */
-typedef struct ip_option ip_option_t;
-
-/** Type definition of the internet version 4 pseudo header.
- * @see ipv4_pseudo_header
- */
-typedef struct ipv4_pseudo_header ipv4_pseudo_header_t;
-
-/** Internet header.
- *
- * The variable options should be included after the header itself and
- * indicated by the increased header length value.
- */
-struct ip_header {
-	uint8_t vhl; /* version, header_length */
-
-#define GET_IP_HEADER_VERSION(header) \
-	(((header)->vhl & 0xf0) >> 4)
-#define SET_IP_HEADER_VERSION(header, version) \
-	((header)->vhl = \
-	 ((version & 0x0f) << 4) | ((header)->vhl & 0x0f))
-
-#define GET_IP_HEADER_LENGTH(header) \
-	((header)->vhl & 0x0f)
-#define SET_IP_HEADER_LENGTH(header, length) \
-	((header)->vhl = \
-	 (length & 0x0f) | ((header)->vhl & 0xf0))
-
-	uint8_t tos;
-	uint16_t total_length;
-	uint16_t identification;
-
-	uint8_t ffoh; /* flags, fragment_offset_high */
-
-#define GET_IP_HEADER_FLAGS(header) \
-	(((header)->ffoh & 0xe0) >> 5)
-#define SET_IP_HEADER_FLAGS(header, flags) \
-	((header)->ffoh = \
-	 ((flags & 0x07) << 5) | ((header)->ffoh & 0x1f))
-
-#define GET_IP_HEADER_FRAGMENT_OFFSET_HIGH(header) \
-	((header)->ffoh & 0x1f)
-#define SET_IP_HEADER_FRAGMENT_OFFSET_HIGH(header, fragment_offset_high) \
-	((header)->ffoh = \
-	 (fragment_offset_high & 0x1f) | ((header)->ffoh & 0xe0))
-
-	uint8_t fragment_offset_low;
-	uint8_t ttl;
-	uint8_t protocol;
-	uint16_t header_checksum;
-	uint32_t source_address;
-	uint32_t destination_address;
-} __attribute__ ((packed));
-
-/** Internet option header.
- *
- * Only type field is always valid.
- * Other fields' validity depends on the option type.
- */
-struct ip_option {
-	uint8_t type;
-	uint8_t length;
-	uint8_t pointer;
-
-	uint8_t of; /* overflow, flags */
-
-#define GET_IP_OPTION_OVERFLOW(option) \
-	(((option)->of & 0xf0) >> 4)
-#define SET_IP_OPTION_OVERFLOW(option, overflow) \
-	((option)->of = \
-	 ((overflow & 0x0f) << 4) | ((option)->of & 0x0f))
-
-#define GET_IP_OPTION_FLAGS(option) \
-	((option)->of & 0x0f)
-#define SET_IP_OPTION_FLAGS(option, flags) \
-	((option)->of = \
-	 (flags & 0x0f) | ((option)->of & 0xf0))
-
-} __attribute__ ((packed));
-
-/** Internet version 4 pseudo header. */
-struct ipv4_pseudo_header {
-	uint32_t source_address;
-	uint32_t destination_address;
-	uint8_t reserved;
-	uint8_t protocol;
-	uint16_t data_length;
-} __attribute__ ((packed));
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/ip_interface.h
===================================================================
--- uspace/lib/net/include/ip_interface.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet 
- * @{
- */
-
-#ifndef LIBNET_IP_INTERFACE_H_
-#define LIBNET_IP_INTERFACE_H_
-
-#include <net/socket_codes.h>
-#include <ipc/services.h>
-#include <net/device.h>
-#include <net/packet.h>
-#include <net/in.h>
-#include <net/ip_codes.h>
-#include <ip_remote.h>
-#include <async.h>
-
-#define ip_received_error_msg  ip_received_error_msg_remote
-#define ip_set_gateway_req     ip_set_gateway_req_remote
-#define ip_packet_size_req     ip_packet_size_req_remote
-#define ip_add_route_req       ip_add_route_req_remote
-#define ip_send_msg            ip_send_msg_remote
-#define ip_get_route_req       ip_get_route_req_remote
-
-/** @name IP module interface
- * This interface is used by other modules.
- */
-/*@{*/
-
-/** The transport layer notification function type definition.
- *
- * Notify the transport layer modules about the received packet/s.
- *
- * @param[in] device_id Device identifier.
- * @param[in] packet    Received packet or the received packet queue.
- * @param[in] receiver  Receiving module service.
- * @param[in] error     Packet error reporting service. Prefixes the
- *                      received packet.
- *
- * @return EOK on success.
- *
- */
-typedef int (*tl_received_msg_t)(nic_device_id_t device_id, packet_t *packet,
-    services_t receiver, services_t error);
-
-extern async_sess_t *ip_bind_service(services_t, int, services_t, async_client_conn_t);
-extern async_sess_t *ip_connect_module(services_t);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/ip_remote.h
===================================================================
--- uspace/lib/net/include/ip_remote.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-#ifndef LIBNET_IP_REMOTE_H_
-#define LIBNET_IP_REMOTE_H_
-
-#include <ipc/services.h>
-#include <net/ip_codes.h>
-#include <net/inet.h>
-#include <net/in.h>
-#include <net/packet.h>
-#include <net/device.h>
-#include <net/socket.h>
-#include <async.h>
-
-extern int ip_set_gateway_req_remote(async_sess_t *, nic_device_id_t, in_addr_t);
-extern int ip_packet_size_req_remote(async_sess_t *, nic_device_id_t,
-    packet_dimension_t *);
-extern int ip_received_error_msg_remote(async_sess_t *, nic_device_id_t, packet_t *,
-    services_t, services_t);
-extern int ip_device_req(async_sess_t *, nic_device_id_t, services_t);
-extern int ip_add_route_req_remote(async_sess_t *, nic_device_id_t, in_addr_t,
-    in_addr_t, in_addr_t);
-extern int ip_send_msg_remote(async_sess_t *, nic_device_id_t, packet_t *,
-    services_t, services_t);
-extern int ip_get_route_req_remote(async_sess_t *, ip_protocol_t,
-    const struct sockaddr *, socklen_t, nic_device_id_t *, void **, size_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/net_checksum.h
===================================================================
--- uspace/lib/net/include/net_checksum.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-/** @file
- * General CRC and checksum computation.
- */
-
-#ifndef LIBNET_CHECKSUM_H_
-#define LIBNET_CHECKSUM_H_
-
-#include <byteorder.h>
-#include <sys/types.h>
-
-/** IP checksum value for computed zero checksum.
- *
- * Zero is returned as 0xFFFF (not flipped)
- *
- */
-#define IP_CHECKSUM_ZERO  0xffffU
-
-#ifdef __BE__
-
-#define compute_crc32(seed, data, length) \
-	compute_crc32_be(seed, (uint8_t *) data, length)
-
-#endif
-
-#ifdef __LE__
-
-#define compute_crc32(seed, data, length) \
-	compute_crc32_le(seed, (uint8_t *) data, length)
-
-#endif
-
-extern uint32_t compute_crc32_le(uint32_t, uint8_t *, size_t);
-extern uint32_t compute_crc32_be(uint32_t, uint8_t *, size_t);
-extern uint32_t compute_checksum(uint32_t, uint8_t *, size_t);
-extern uint16_t compact_checksum(uint32_t);
-extern uint16_t flip_checksum(uint16_t);
-extern uint16_t ip_checksum(uint8_t *, size_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/net_hardware.h
===================================================================
--- uspace/lib/net/include/net_hardware.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Hardware types according to the on-line IANA - Address Resolution Protocol
- * (ARP) Parameters
- * http://www.iana.org/assignments/arp-parameters/arp-parameters.xml,
- * cited January 14 2009.
- */
-
-#ifndef LIBNET_NET_HARDWARE_H_
-#define LIBNET_NET_HARDWARE_H_
-
-#include <sys/types.h>
-
-/** Network interface layer type type definition. */
-typedef uint8_t hw_type_t;
-
-/** @name Network interface layer types definitions */
-/*@{*/
-
-/** Ethernet (10Mb) hardware type. */
-#define HW_ETHER		1
-
-/*@}*/
-
-#endif
-
-/** @}
- */
-
Index: uspace/lib/net/include/net_interface.h
===================================================================
--- uspace/lib/net/include/net_interface.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- *  @{
- */
-
-#ifndef LIBNET_NET_INTERFACE_H_
-#define LIBNET_NET_INTERFACE_H_
-
-#include <ipc/services.h>
-#include <net/device.h>
-#include <adt/measured_strings.h>
-#include <async.h>
-#include <devman.h>
-
-/** @name Networking module interface
- * This interface is used by other modules.
- */
-/*@{*/
-
-extern int net_get_device_conf_req(async_sess_t *, nic_device_id_t,
-    measured_string_t **, size_t, uint8_t **);
-extern int net_get_conf_req(async_sess_t *, measured_string_t **, size_t,
-    uint8_t **);
-extern void net_free_settings(measured_string_t *, uint8_t *);
-extern int net_get_devices_req(async_sess_t *, measured_string_t **, size_t *,
-    uint8_t **);
-extern async_sess_t *net_connect_module(void);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/nil_remote.h
===================================================================
--- uspace/lib/net/include/nil_remote.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup netif
- * @{
- */
-
-#ifndef __NET_NIL_REMOTE_H__
-#define __NET_NIL_REMOTE_H__
-
-#include <ipc/loc.h>
-#include <net/device.h>
-#include <net/packet.h>
-#include <devman.h>
-#include <generic.h>
-#include <async.h>
-#include <sys/types.h>
-
-#define nil_bind_service(service, device_id, me, receiver) \
-	bind_service(service, device_id, me, 0, receiver)
-
-#define nil_packet_size_req(sess, device_id, packet_dimension) \
-	generic_packet_size_req_remote(sess, NET_NIL_PACKET_SPACE, \
-	    device_id, packet_dimension)
-
-#define nil_get_addr_req(sess, device_id, address, data) \
-	generic_get_addr_req(sess, NET_NIL_ADDR, device_id, address, data)
-
-#define nil_get_broadcast_addr_req(sess, device_id, address, data) \
-	generic_get_addr_req(sess, NET_NIL_BROADCAST_ADDR, device_id, \
-	    address, data)
-
-#define nil_send_msg(sess, device_id, packet, sender) \
-	generic_send_msg_remote(sess, NET_NIL_SEND, device_id, \
-	    packet_get_id(packet), sender, 0)
-
-extern int nil_device_req(async_sess_t *, nic_device_id_t, devman_handle_t,
-    size_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/nil_skel.h
===================================================================
--- uspace/lib/net/include/nil_skel.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,116 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Network interface layer modules common skeleton.
- * All network interface layer modules have to implement this interface.
- */
-
-#ifndef LIBNET_NIL_SKEL_H_
-#define LIBNET_NIL_SKEL_H_
-
-#include <ipc/services.h>
-#include <adt/measured_strings.h>
-#include <net/device.h>
-#include <net/packet.h>
-#include <async.h>
-
-/** Module initialization.
- *
- * This has to be implemented in user code.
- *
- * @param[in] sess Networking module session.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module
- *         initialize function.
- *
- */
-extern int nil_initialize(async_sess_t *sess);
-
-/** Notify the network interface layer about the device state change.
- *
- * This has to be implemented in user code.
- *
- * @param[in] device_id Device identifier.
- * @param[in] state     New device state.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module
- *         device state function.
- *
- */
-extern int nil_device_state_msg_local(nic_device_id_t device_id, sysarg_t state);
-
-/** Pass the packet queue to the network interface layer.
- *
- * Process and redistribute the received packet queue to the registered
- * upper layers.
- *
- * This has to be implemented in user code.
- *
- * @param[in] device_id Source device identifier.
- * @param[in] packet    Received packet or the received packet queue.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module
- *         received function.
- *
- */
-extern int nil_received_msg_local(nic_device_id_t device_id, packet_t *packet);
-
-/** Message processing function.
- *
- * This has to be implemented in user code.
- *
- * @param[in]  callid Message identifier.
- * @param[in]  call   Message parameters.
- * @param[out] answer Message answer parameters.
- * @param[out] count  Message answer arguments.
- *
- * @return EOK on success.
- * @return ENOTSUP if the message is not known.
- * @return Other error codes as defined for each specific module
- *         message function.
- *
- * @see IS_NET_NIL_MESSAGE()
- *
- */
-extern int nil_module_message(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, size_t *count);
-
-extern int nil_module_start(sysarg_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/packet_client.h
===================================================================
--- uspace/lib/net/include/packet_client.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,118 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- *  @{
- */
-
-/** @file
- * Packet client.
- *
- * To function correctly, initialization of the packet map by the pm_init()
- * function has to happen at the first place. The module should not send the
- * packet messages to the packet server but use the functions provided. The
- * packet map should be released by the pm_destroy() function during the module
- * termination. The packets and the packet queues can't be locked at all. The
- * processing modules should process them sequentially - by passing the packets
- * to the next module and stopping using the passed ones.
- *
- * @see packet.h
- */
-
-#ifndef LIBNET_PACKET_CLIENT_H_
-#define LIBNET_PACKET_CLIENT_H_
-
-#include <net/packet.h>
-#include <async.h>
-
-/** @name Packet client interface */
-/*@{*/
-
-/** Allocates the specified type right before the actual packet content and
- * returns its pointer.
- *
- * The wrapper of the packet_prepend() function.
- *
- * @param[in] packet	The packet to be used.
- * @param[in] type	The type to be allocated at the beginning of the packet
- *			content.
- * @return		The typed pointer to the allocated memory.
- * @return		NULL if the packet is not valid.
- * @return		NULL if there is not enough memory left.
- */
-#define PACKET_PREFIX(packet, type) \
-	(type *) packet_prefix((packet), sizeof(type))
-
-/** Allocates the specified type right after the actual packet content and
- * returns its pointer.
- *
- * The wrapper of the packet_append() function.
- *
- * @param[in] packet	The packet to be used.
- * @param[in] type	The type to be allocated at the end of the packet
- *			content.
- * @return		The typed pointer to the allocated memory.
- * @return		NULL if the packet is not valid.
- * @return		NULL if there is not enough memory left.
- */
-#define PACKET_SUFFIX(packet, type) \
-	(type *) packet_suffix((packet), sizeof(type))
-
-/** Trims the actual packet content by the specified prefix and suffix types.
- *
- * The wrapper of the packet_trim() function.
- *
- * @param[in] packet	The packet to be trimmed.
- * @param[in] prefix	The type of the prefix to be removed from the beginning
- *			of the packet content.
- * @param[in] suffix	The type of the suffix to be removed from the end of
- *			the packet content.
- * @return		EOK on success.
- * @return		EINVAL if the packet is not valid.
- * @return		ENOMEM if there is not enough memory left.
- */
-#define PACKET_TRIM(packet, prefix, suffix) \
-	packet_trim((packet), sizeof(prefix), sizeof(suffix))
-
-extern void *packet_prefix(packet_t *, size_t);
-extern void *packet_suffix(packet_t *, size_t);
-extern int packet_trim(packet_t *, size_t, size_t);
-extern int packet_copy_data(packet_t *, const void *, size_t);
-extern packet_id_t packet_get_id(const packet_t *);
-extern size_t packet_get_data_length(const packet_t *);
-extern void *packet_get_data(const packet_t *);
-extern int packet_get_addr(const packet_t *, uint8_t **, uint8_t **);
-extern int packet_set_addr(packet_t *, const uint8_t *, const uint8_t *, size_t);
-extern packet_t *packet_get_copy(async_sess_t *, packet_t *);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/packet_remote.h
===================================================================
--- uspace/lib/net/include/packet_remote.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-#ifndef LIBNET_PACKET_REMOTE_H_
-#define LIBNET_PACKET_REMOTE_H_
-
-#include <net/packet.h>
-#include <sys/types.h>
-#include <async.h>
-
-extern int packet_translate_remote(async_sess_t *, packet_t **, packet_id_t);
-extern packet_t *packet_get_4_remote(async_sess_t *, size_t, size_t, size_t,
-    size_t);
-extern packet_t *packet_get_1_remote(async_sess_t *, size_t);
-extern void pq_release_remote(async_sess_t *, packet_id_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/protocol_map.h
===================================================================
--- uspace/lib/net/include/protocol_map.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Internetwork layer services - network interface layer service type
- * translation.
- */
-
-#ifndef LIBNET_PROTOCOL_MAP_H_
-#define LIBNET_PROTOCOL_MAP_H_
-
-#include <ethernet_lsap.h>
-#include <ethernet_protocols.h>
-#include <net_hardware.h>
-
-#include <ipc/services.h>
-
-extern eth_type_t protocol_map(services_t, services_t);
-extern services_t protocol_unmap(services_t, int);
-extern eth_type_t lsap_map(eth_lsap_t);
-extern eth_lsap_t lsap_unmap(eth_type_t);
-extern hw_type_t hardware_map(services_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/socket_core.h
===================================================================
--- uspace/lib/net/include/socket_core.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ uspace/lib/net/include/socket_core.h	(revision c6533a794620411b83c209fe9e2c6bb24cedc08c)
@@ -44,5 +44,4 @@
 #include <net/in.h>
 #include <net/device.h>
-#include <net/packet.h>
 #include <async.h>
 
@@ -80,6 +79,4 @@
 	/** Bound port. */
 	int port;
-	/** Received packets queue. */
-	dyn_fifo_t received;
 	/** Sockets for acceptance queue. */
 	dyn_fifo_t accepted;
@@ -118,5 +115,4 @@
 extern int socket_destroy(async_sess_t *, int, socket_cores_t *,
     socket_ports_t *, void (*)(socket_core_t *));
-extern int socket_reply_packets(packet_t *, size_t *);
 extern socket_core_t *socket_port_find(socket_ports_t *, int, const uint8_t *,
     size_t);
Index: uspace/lib/net/include/tl_common.h
===================================================================
--- uspace/lib/net/include/tl_common.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2008 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Transport layer common functions.
- */
-
-#ifndef LIBNET_TL_COMMON_H_
-#define LIBNET_TL_COMMON_H_
-
-#include <ipc/services.h>
-#include <net/socket_codes.h>
-#include <net/packet.h>
-#include <net/device.h>
-#include <net/inet.h>
-#include <async.h>
-
-/** Device packet dimensions.
- * Maps devices to the packet dimensions.
- * @see device.h
- */
-DEVICE_MAP_DECLARE(packet_dimensions, packet_dimension_t);
-
-extern int tl_get_ip_packet_dimension(async_sess_t *, packet_dimensions_t *,
-    nic_device_id_t, packet_dimension_t **);
-extern int tl_get_address_port(const struct sockaddr *, int, uint16_t *);
-extern int tl_update_ip_packet_dimension(packet_dimensions_t *, nic_device_id_t,
-    size_t);
-extern int tl_set_address_port(struct sockaddr *, int, uint16_t);
-extern int tl_prepare_icmp_packet(async_sess_t *, async_sess_t *, packet_t *,
-    services_t);
-extern int tl_socket_read_packet_data(async_sess_t *, packet_t **, size_t,
-    const packet_dimension_t *, const struct sockaddr *, socklen_t);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/tl_remote.h
===================================================================
--- uspace/lib/net/include/tl_remote.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * Copyright (c) 2009 Lukas Mejdrech
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-/** @file
- * Transport layer module interface for the underlying internetwork layer.
- */
-
-#ifndef LIBNET_TL_REMOTE_H_
-#define LIBNET_TL_REMOTE_H_
-
-#include <ipc/services.h>
-#include <ipc/tl.h>
-#include <generic.h>
-#include <net/device.h>
-#include <net/packet.h>
-#include <packet_client.h>
-#include <async.h>
-
-/** @name Transport layer module interface
- * This interface is used by other modules.
- */
-/*@{*/
-
-extern int tl_received_msg(async_sess_t *, nic_device_id_t, packet_t *,
-    services_t, services_t);
-
-/*@}*/
-
-#endif
-
-/** @}
- */
Index: uspace/lib/net/include/tl_skel.h
===================================================================
--- uspace/lib/net/include/tl_skel.h	(revision cf9cb36f0ca62c70ee2bfb4b1c4cce6ed794d7bb)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/*
- * Copyright (c) 2010 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libnet
- * @{
- */
-
-#ifndef LIBNET_TL_SKEL_H_
-#define LIBNET_TL_SKEL_H_
-
-/** @file
- * Transport layer module skeleton.
- * The skeleton has to be part of each transport layer module.
- */
-
-#include <fibril_synch.h>
-#include <ipc/services.h>
-#include <adt/measured_strings.h>
-#include <net/device.h>
-#include <net/packet.h>
-#include <async.h>
-
-/** Module initialization.
- *
- * This has to be implemented in user code.
- *
- * @param[in] sess Networking module session.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module
- *         initialize function.
- *
- */
-extern int tl_initialize(async_sess_t *sess);
-
-/** Per-connection module initialization.
- *
- * This has to be implemented in user code.
- *
- */
-extern void tl_connection(void);
-
-/** Process the transport layer module message.
- *
- * This has to be implemented in user code.
- *
- * @param[in]  callid Message identifier.
- * @param[in]  call   Message parameters.
- * @param[out] answer Answer.
- * @param[out] count  Number of arguments of the answer.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module.
- *
- */
-extern int tl_message(ipc_callid_t, ipc_call_t *,
-    ipc_call_t *, size_t *);
-
-extern int tl_module_start(sysarg_t);
-
-#endif
-
-/** @}
- */
