diff --git a/include/if.h b/include/if.h
new file mode 100644
index 000000000..77af27f9b
--- /dev/null
+++ b/include/if.h
@@ -0,0 +1,32 @@
+/** Interface related functions
+ *
+ * @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
+ * @copyright 2014, Institute for Automation of Complex Power Systems, EONERC
+ * @file if.h
+ */
+
+#ifndef _IF_H_
+#define _IF_H_
+
+#include <net/if.h>
+
+/** Get the name of first interface which listens on addr.
+ *
+ * @param addr The address whose related interface is searched
+ * @return
+ *  - A pointer to the interface name (has to be freed by caller)
+ *  - NULL if the address is not used on the system
+ */
+char* if_addrtoname(struct sockaddr *addr);
+
+/** Change the SMP affinity of NIC interrupts.
+ *
+ * @param ifname The interface whose IRQs should be pinned
+ * @param affinity A mask specifying which cores should handle this interrupt.
+ * @return
+ *  - 0 on success
+ *  - otherwise an error occured
+ */
+int if_setaffinity(const char *ifname, int affinity);
+
+#endif /* _IF_H_ */
diff --git a/src/if.c b/src/if.c
new file mode 100644
index 000000000..ff8c125f5
--- /dev/null
+++ b/src/if.c
@@ -0,0 +1,77 @@
+/**
+ * Interface related functions
+ *
+ * @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
+ * @copyright 2014, Institute for Automation of Complex Power Systems, EONERC
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <dirent.h>
+#include <ifaddrs.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/ip.h>
+
+#include "utils.h"
+
+char* if_addrtoname(struct sockaddr *addr)
+{
+	char *ifname = NULL;
+	struct ifaddrs *ifas, *ifa;
+
+	if(getifaddrs(&ifas))
+		return NULL;
+
+	for(ifa = ifas; ifa; ifa = ifa->ifa_next) {
+		if (ifa->ifa_addr && !sockaddr_cmp(ifa->ifa_addr, addr)) {
+			ifname = malloc(strlen(ifa->ifa_name) + 1);
+			if (!ifname)
+				goto out;
+
+			strcpy(ifname, ifa->ifa_name);
+			goto out;
+		}
+	}
+
+out:
+	freeifaddrs(ifas);
+
+	return ifname;
+}
+
+int if_setaffinity(const char *ifname, int affinity)
+{
+	char *dirname[NAME_MAX];
+	char *filename[NAME_MAX];
+
+	DIR *dir;
+	FILE *file;
+
+	/* Determine IRQs numbers */
+	snprintf(dirname, sizeof(dirname), "/sys/class/net/%s/device/msi_irqs/", ifname);
+	dir = opendir(dirname);
+	if (!dir)
+		return -1;
+
+	struct dirent *entry;
+	while (entry = readdir(dir)) {
+		/* Set SMP affinity */
+		snprintf(filename, sizeof(filename), "/proc/irq/%s/smp_affinity");
+		file = fopen(filename, "w");
+		if (!file)
+			continue;
+
+		debug(3, "Setting SMP affinity of IRQ %s (%s) to %8x\n", entry->d_name, ifname, affinity);
+
+		fprintf("%8x", affinity);
+		fclose(file);
+	}
+
+	closedir(dir);
+
+	return 0;
+}
diff --git a/src/node.c b/src/node.c
index 360f5a3f8..68c57e3c3 100644
--- a/src/node.c
+++ b/src/node.c
@@ -95,4 +95,3 @@ struct node* node_lookup_name(const char *str, struct node *nodes, int len)
 
 	return NULL;
 }
-