Index: uspace/srv/ethip/Makefile
===================================================================
--- uspace/srv/ethip/Makefile	(revision e767dbf7fef8812a5f05b9f22c38adfb40680b98)
+++ uspace/srv/ethip/Makefile	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -32,5 +32,6 @@
 SOURCES = \
 	ethip.c \
-	ethip_nic.c
+	ethip_nic.c \
+	pdu.c
 
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/ethip/ethip.c
===================================================================
--- uspace/srv/ethip/ethip.c	(revision e767dbf7fef8812a5f05b9f22c38adfb40680b98)
+++ uspace/srv/ethip/ethip.c	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup inet
+/** @addtogroup ethip
  * @{
  */
@@ -33,4 +33,6 @@
  * @file
  * @brief IP link provider for Ethernet
+ *
+ * Based on the IETF RFC 894 standard.
  */
 
@@ -45,4 +47,6 @@
 #include "ethip.h"
 #include "ethip_nic.h"
+#include "pdu.h"
+#include "std.h"
 
 #define NAME "eth"
@@ -158,6 +162,45 @@
 static int ethip_send(iplink_conn_t *conn, iplink_srv_sdu_t *sdu)
 {
+	ethip_nic_t *nic = (ethip_nic_t *)conn->srv->arg;
+	eth_frame_t frame;
+	void *data;
+	size_t size;
+	int rc;
+
 	log_msg(LVL_DEBUG, "ethip_send()");
-	return EOK;
+
+	frame.dest.addr = 0xdeeedeeedeee;
+	frame.src.addr =  0xaafeedfaceee;
+	frame.etype_len = ETYPE_IP;
+	frame.data = sdu->data;
+	frame.size = sdu->size;
+
+	rc = eth_pdu_encode(&frame, &data, &size);
+	if (rc != EOK)
+		return rc;
+
+	rc = ethip_nic_send(nic, data, size);
+	free(data);
+
+	return rc;
+}
+
+int ethip_received(iplink_srv_t *srv, void *data, size_t size)
+{
+	eth_frame_t frame;
+	iplink_srv_sdu_t sdu;
+	int rc;
+
+	rc = eth_pdu_decode(data, size, &frame);
+	if (rc != EOK)
+		return rc;
+
+	sdu.data = frame.data;
+	sdu.size = frame.size;
+	(void) sdu;
+	//rc = iplink_ev_recv(conn, &sdu);
+
+	free(frame.data);
+	return rc;
 }
 
Index: uspace/srv/ethip/ethip.h
===================================================================
--- uspace/srv/ethip/ethip.h	(revision e767dbf7fef8812a5f05b9f22c38adfb40680b98)
+++ uspace/srv/ethip/ethip.h	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup inet
+/** @addtogroup ethip
  * @{
  */
@@ -37,4 +37,10 @@
 #ifndef ETHIP_H_
 #define ETHIP_H_
+
+#include <adt/list.h>
+#include <async.h>
+#include <inet/iplink_srv.h>
+#include <loc.h>
+#include <sys/types.h>
 
 typedef struct ethip_nic {
@@ -48,5 +54,27 @@
 } ethip_nic_t;
 
+/** IEEE MAC-48 identifier */
+typedef struct {
+	/** MAC Address (in lowest 48 bits) */
+	uint64_t addr;
+} mac48_addr_t;
+
+/** Ethernet frame */
+typedef struct {
+	/** Destination Address */
+	mac48_addr_t dest;
+	/** Source Address */
+	mac48_addr_t src;
+	/** Ethertype or Length */
+	uint16_t etype_len;
+	/** Payload */
+	void *data;
+	/** Payload size */
+	size_t size;
+} eth_frame_t;
+
 extern int ethip_iplink_init(ethip_nic_t *);
+extern int ethip_received(iplink_srv_t *, void *, size_t);
+
 
 #endif
Index: uspace/srv/ethip/ethip_nic.c
===================================================================
--- uspace/srv/ethip/ethip_nic.c	(revision e767dbf7fef8812a5f05b9f22c38adfb40680b98)
+++ uspace/srv/ethip/ethip_nic.c	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup inet
+/** @addtogroup ethip
  * @{
  */
@@ -201,6 +201,20 @@
     ipc_call_t *call)
 {
+	int rc;
+	void *data;
+	size_t size;
+
 	log_msg(LVL_DEBUG, "ethip_nic_received()");
-	async_answer_0(callid, ENOTSUP);
+
+	rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
+	if (rc != EOK) {
+		log_msg(LVL_DEBUG, "data_write_accept() failed");
+		return;
+	}
+
+	rc = ethip_received(&nic->iplink, data, size);
+	free(data);
+
+	async_answer_0(callid, rc);
 }
 
@@ -277,4 +291,9 @@
 }
 
+int ethip_nic_send(ethip_nic_t *nic, void *data, size_t size)
+{
+	return nic_send_frame(nic->sess, data, size);
+}
+
 /** @}
  */
Index: uspace/srv/ethip/ethip_nic.h
===================================================================
--- uspace/srv/ethip/ethip_nic.h	(revision e767dbf7fef8812a5f05b9f22c38adfb40680b98)
+++ uspace/srv/ethip/ethip_nic.h	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup inet
+/** @addtogroup ethip
  * @{
  */
@@ -42,4 +42,6 @@
 extern int ethip_nic_discovery_start(void);
 extern ethip_nic_t *ethip_nic_find_by_iplink_sid(service_id_t);
+extern int ethip_nic_send(ethip_nic_t *, void *, size_t);
+
 
 #endif
Index: uspace/srv/ethip/pdu.c
===================================================================
--- uspace/srv/ethip/pdu.c	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
+++ uspace/srv/ethip/pdu.c	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2012 Jiri Svoboda
+ * 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 inet
+ * @{
+ */
+/**
+ * @file
+ * @brief
+ */
+
+#include <byteorder.h>
+#include <errno.h>
+#include <io/log.h>
+#include <mem.h>
+#include <stdlib.h>
+
+#include "ethip.h"
+#include "std.h"
+#include "pdu.h"
+
+static void mac48_encode(mac48_addr_t *addr, void *buf);
+static void mac48_decode(void *data, mac48_addr_t *addr);
+
+#define MAC48_BYTES 6
+
+/** Encode Ethernet PDU. */
+int eth_pdu_encode(eth_frame_t *frame, void **rdata, size_t *rsize)
+{
+	void *data;
+	size_t size;
+	eth_header_t *hdr;
+
+	size = sizeof(eth_header_t) + frame->size;
+
+	data = calloc(size, 1);
+	if (data == NULL)
+		return ENOMEM;
+
+	hdr = (eth_header_t *)data;
+	mac48_encode(&frame->src, hdr->src);
+	mac48_encode(&frame->dest, hdr->dest);
+	hdr->etype_len = host2uint16_t_be(frame->etype_len);
+
+	memcpy((uint8_t *)data + sizeof(eth_header_t), frame->data,
+	    frame->size);
+
+	*rdata = data;
+	*rsize = size;
+	return EOK;
+}
+
+/** Decode Ethernet PDU. */
+int eth_pdu_decode(void *data, size_t size, eth_frame_t *frame)
+{
+	eth_header_t *hdr;
+
+	log_msg(LVL_DEBUG, "eth_pdu_decode()");
+
+	if (size < sizeof(eth_header_t)) {
+		log_msg(LVL_DEBUG, "PDU too short (%zu)", size);
+		return EINVAL;
+	}
+
+	hdr = (eth_header_t *)data;
+
+	frame->size = size - sizeof(eth_header_t);
+	frame->data = calloc(frame->size, 1);
+	if (frame->data == NULL)
+		return ENOMEM;
+
+	mac48_decode(hdr->src, &frame->src);
+	mac48_decode(hdr->dest, &frame->dest);
+	frame->etype_len = uint16_t_be2host(hdr->etype_len);
+
+	memcpy(frame->data, (uint8_t *)data + sizeof(eth_header_t),
+	    frame->size);
+
+	return EOK;
+}
+
+static void mac48_encode(mac48_addr_t *addr, void *buf)
+{
+	uint64_t val;
+	uint8_t *bbuf = (uint8_t *)buf;
+	int i;
+
+	val = addr->addr;
+	for (i = 0; i < MAC48_BYTES; i++) {
+		bbuf[i] = (val >> 8*(MAC48_BYTES - i - 1)) & 0xff;
+		val = val >> 8;
+	}
+}
+
+static void mac48_decode(void *data, mac48_addr_t *addr)
+{
+	uint64_t val;
+	uint8_t *bdata = (uint8_t *)data;
+	int i;
+
+	val = 0;
+	for (i = 0; i < MAC48_BYTES; i++)
+		val |= ((uint64_t)bdata[i]) << (MAC48_BYTES - i - 1);
+
+	addr->addr = val;
+}
+
+/** @}
+ */
Index: uspace/srv/ethip/pdu.h
===================================================================
--- uspace/srv/ethip/pdu.h	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
+++ uspace/srv/ethip/pdu.h	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2012 Jiri Svoboda
+ * 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 inet
+ * @{
+ */
+/**
+ * @file
+ * @brief
+ */
+
+#ifndef ETH_PDU_H_
+#define ETH_PDU_H_
+
+#include "ethip.h"
+
+int eth_pdu_encode(eth_frame_t *frame, void **rdata, size_t *rsize);
+int eth_pdu_decode(void *data, size_t size, eth_frame_t *frame);
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/ethip/std.h
===================================================================
--- uspace/srv/ethip/std.h	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
+++ uspace/srv/ethip/std.h	(revision 14938114d2ec7a3b3548c8acfc893a7313130ea1)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2012 Jiri Svoboda
+ * 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 ethip
+ * @{
+ */
+/**
+ * @file Ethernet, IP/Ethernet standard definitions
+ *
+ */
+
+#ifndef ETHIP_STD_H_
+#define ETHIP_STD_H_
+
+#include <sys/types.h>
+
+/** Ethernet frame header */
+typedef struct {
+	/** Destination Address */
+	uint8_t dest[6];
+	/** Source Address */
+	uint8_t src[6];
+	/** Ethertype or Length */
+	uint16_t etype_len;
+} eth_header_t;
+
+/** IP Ethertype */
+#define ETYPE_IP	0x0800
+
+#endif
+
+/** @}
+ */
