Index: boot/Makefile
===================================================================
--- boot/Makefile	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ boot/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -61,5 +61,13 @@
 		cp "$$file" "$(DIST_PATH)/cfg/net/" ; \
 	done
-
+	for drv in $(RD_DRVS) ; do \
+		mkdir -p "$(DIST_PATH)/$(DRVS_PATH)/$$drv" ; \
+		cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv/$$drv" "$(DIST_PATH)/$(DRVS_PATH)/$$drv/$$drv" ; \
+		cp "$(USPACE_PATH)/$(DRVS_PATH)/$$drv/$$drv.ma" "$(DIST_PATH)/$(DRVS_PATH)/$$drv/$$drv.ma" ; \
+	done
+	for file in $(RD_DRV_CFG) ; do \
+		cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file" "$(DIST_PATH)/$(DRVS_PATH)/$$file" ; \
+	done
+	
 clean: clean_dist
 	$(MAKE) -f $(BUILD) clean PRECHECK=$(PRECHECK)
@@ -74,4 +82,5 @@
 	rm -f $(INITRD).fs $(INITRD).img $(COMPS_H) $(COMPS_C) $(LINK) $(LINK).comp *.co
 	rm -f $(USPACE_PATH)/dist/srv/*
+	rm -rf $(USPACE_PATH)/dist/drv/*
 	rm -f $(USPACE_PATH)/dist/app/*
 	rm -f $(USPACE_PATH)/dist/cfg/net/*
Index: boot/Makefile.common
===================================================================
--- boot/Makefile.common	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ boot/Makefile.common	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -49,4 +49,5 @@
 DIST_PATH = $(USPACE_PATH)/dist
 TOOLS_PATH = $(ROOT_PATH)/tools
+DRVS_PATH = drv
 
 SANDBOX = pack
@@ -105,5 +106,10 @@
 	$(USPACE_PATH)/srv/net/tl/tcp/tcp \
 	$(USPACE_PATH)/srv/net/net/net \
-	$(USPACE_PATH)/srv/net/netstart/netstart \
+	$(USPACE_PATH)/srv/devman/devman
+	
+RD_DRVS = \
+	root
+
+RD_DRV_CFG = 
 
 ifneq ($(CONFIG_NETIF_NIL_BUNDLE),y)
@@ -125,6 +131,8 @@
 	$(USPACE_PATH)/app/taskdump/taskdump \
 	$(USPACE_PATH)/app/tester/tester \
+	$(USPACE_PATH)/app/test_serial/test_serial \
 	$(USPACE_PATH)/app/tetris/tetris \
 	$(USPACE_PATH)/app/trace/trace \
+	$(USPACE_PATH)/app/netstart/netstart \
 	$(USPACE_PATH)/app/nettest1/nettest1 \
 	$(USPACE_PATH)/app/nettest2/nettest2 \
Index: boot/arch/amd64/Makefile.inc
===================================================================
--- boot/arch/amd64/Makefile.inc	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ boot/arch/amd64/Makefile.inc	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -34,6 +34,14 @@
 RD_SRVS_NON_ESSENTIAL += \
 	$(USPACE_PATH)/srv/bd/ata_bd/ata_bd \
-	$(USPACE_PATH)/srv/hw/bus/pci/pci \
 	$(USPACE_PATH)/srv/hid/char_mouse/char_ms
+
+RD_DRVS += \
+	rootia32 \
+	pciintel \
+	isa \
+	ns8250
+	
+RD_DRV_CFG += \
+	isa/isa.dev
 
 BOOT_OUTPUT = $(ROOT_PATH)/image.iso
Index: contrib/arch/hadlbppp.py
===================================================================
--- contrib/arch/hadlbppp.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ contrib/arch/hadlbppp.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -42,12 +42,12 @@
 	"Print usage syntax"
 	
-	print "%s <--bp|--ebp|--adl|--dot|--nop>+ <OUTPUT>" % prname
-	print
-	print "--bp   Dump original Behavior Protocols (dChecker, BPSlicer)"
-	print "--ebp  Dump Extended Behavior Protocols (bp2promela)"
-	print "--adl  Dump Architecture Description Language (modified SOFA ADL/CDL)"
-	print "--dot  Dump Dot architecture diagram (GraphViz)"
-	print "--nop  Do not dump anything (just input files syntax check)"
-	print
+	print("%s <--bp|--ebp|--adl|--dot|--nop>+ <OUTPUT>" % prname)
+	print()
+	print("--bp   Dump original Behavior Protocols (dChecker, BPSlicer)")
+	print("--ebp  Dump Extended Behavior Protocols (bp2promela)")
+	print("--adl  Dump Architecture Description Language (modified SOFA ADL/CDL)")
+	print("--dot  Dump Dot architecture diagram (GraphViz)")
+	print("--nop  Do not dump anything (just input files syntax check)")
+	print()
 
 def tabs(cnt):
@@ -163,7 +163,7 @@
 						result.append(tokens[i])
 				else:
-					print "%s: Syntax error in tentative statement" % name
+					print("%s: Syntax error in tentative statement" % name)
 			else:
-				print "%s: Expected '{' for tentative statement" % name
+				print("%s: Expected '{' for tentative statement" % name)
 		else:
 			result.append(tokens[i])
@@ -231,11 +231,11 @@
 								result.append(tokens[i])
 						else:
-							print "%s: Syntax error in alternative statement" % name
+							print("%s: Syntax error in alternative statement" % name)
 					else:
-						print "%s: Expected '{' for alternative statement body" % name
+						print("%s: Expected '{' for alternative statement body" % name)
 				else:
-					print "%s: At least one pattern and one replacement required for alternative statement" % name
+					print("%s: At least one pattern and one replacement required for alternative statement" % name)
 			else:
-				print "%s: Expected '(' for alternative statement head" % name
+				print("%s: Expected '(' for alternative statement head" % name)
 		else:
 			result.append(tokens[i])
@@ -269,5 +269,5 @@
 					result.append(tokens[i])
 			else:
-				print "%s: Unexpected end of protocol" % name
+				print("%s: Unexpected end of protocol" % name)
 		
 		i += 1
@@ -349,5 +349,5 @@
 		elif (token == ")"):
 			if (indent < base_indent):
-				print "%s: Too many parentheses" % name
+				print("%s: Too many parentheses" % name)
 			
 			indent -= 1
@@ -358,5 +358,5 @@
 		elif (token == "}"):
 			if (indent < base_indent):
-				print "%s: Too many parentheses" % name
+				print("%s: Too many parentheses" % name)
 			
 			indent -= 1
@@ -370,5 +370,5 @@
 	
 	if (indent > base_indent):
-		print "%s: Missing parentheses" % name
+		print("%s: Missing parentheses" % name)
 	
 	output = output.strip()
@@ -405,5 +405,5 @@
 			result.extend(inherited_protocols(supiface))
 		else:
-			print "%s: Extends unknown interface '%s'" % (iface['name'], iface['extends'])
+			print("%s: Extends unknown interface '%s'" % (iface['name'], iface['extends']))
 	
 	return result
@@ -459,13 +459,13 @@
 						protocols.append(proto)
 			else:
-				print "%s: Provided interface '%s' is undefined" % (frame['name'], provides['iface'])
+				print("%s: Provided interface '%s' is undefined" % (frame['name'], provides['iface']))
 	
 	if (opt_bp):
-		outf = file(outname, "w")
+		outf = open(outname, "w")
 		outf.write(parse_bp(outname, merge_bp(initialization, finalization, protocols), 0))
 		outf.close()
 	
 	if (opt_ebp):
-		outf = file(outname, "w")
+		outf = open(outname, "w")
 		outf.write(parse_ebp(frame['name'], outname, merge_bp(initialization, finalization, protocols), 0))
 		outf.close()
@@ -514,10 +514,10 @@
 	
 	if (opt_bp):
-		outf = file(outname, "w")
+		outf = open(outname, "w")
 		outf.write("NULL")
 		outf.close()
 	
 	if (opt_ebp):
-		outf = file(outname, "w")
+		outf = open(outname, "w")
 		outf.write("component null {\n\tbehavior {\n\t\tNULL\n\t}\n}")
 		outf.close()
@@ -587,5 +587,5 @@
 					insts.append({'var': "%s_%s" % (prefix, inst['var']), 'frame': subframe})
 				else:
-					print "%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type'])
+					print("%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type']))
 	
 	if ('bind' in arch):
@@ -612,5 +612,5 @@
 	
 	if (arch is None):
-		print "Unable to find system architecture"
+		print("Unable to find system architecture")
 		return
 	
@@ -634,5 +634,5 @@
 					insts.append({'var': inst['var'], 'frame': subframe})
 				else:
-					print "%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type'])
+					print("%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type']))
 	
 	if ('bind' in arch):
@@ -642,10 +642,10 @@
 	if ('delegate' in arch):
 		for delegate in arch['delegate']:
-			print "Unable to delegate interface in system architecture"
+			print("Unable to delegate interface in system architecture")
 			break
 	
 	if ('subsume' in arch):
 		for subsume in arch['subsume']:
-			print "Unable to subsume interface in system architecture"
+			print("Unable to subsume interface in system architecture")
 			break
 	
@@ -654,5 +654,5 @@
 	outname = os.path.join(outdir, "%s.archbp" % arch['name'])
 	if ((opt_bp) or (opt_ebp)):
-		outf = file(outname, "w")
+		outf = open(outname, "w")
 	else:
 		outf = None
@@ -709,5 +709,5 @@
 		
 		if (not os.path.isfile(path)):
-			print "%s: Unable to include file %s" % (inname, path)
+			print("%s: Unable to include file %s" % (inname, path))
 			return ""
 	else:
@@ -716,5 +716,5 @@
 		nested_root = root
 	
-	inf = file(path, "r")
+	inf = open(path, "r")
 	
 	raw = preproc_adl(inf.read(), inarg)
@@ -733,5 +733,5 @@
 		if (POST_INC in context):
 			if (token != "]"):
-				print "%s: Expected ]" % inname
+				print("%s: Expected ]" % inname)
 			
 			context.remove(POST_INC)
@@ -774,5 +774,5 @@
 			if (NULL in context):
 				if (token != ";"):
-					print "%s: Expected ';' in frame '%s'" % (inname, frame)
+					print("%s: Expected ';' in frame '%s'" % (inname, frame))
 				else:
 					output += "%s\n" % token
@@ -798,5 +798,5 @@
 						
 						if ('finalization' in frame_properties[frame]):
-							print "%s: Finalization protocol for frame '%s' already defined" % (inname, frame)
+							print("%s: Finalization protocol for frame '%s' already defined" % (inname, frame))
 						else:
 							frame_properties[frame]['finalization'] = bp
@@ -832,5 +832,5 @@
 						
 						if ('initialization' in frame_properties[frame]):
-							print "%s: Initialization protocol for frame '%s' already defined" % (inname, frame)
+							print("%s: Initialization protocol for frame '%s' already defined" % (inname, frame))
 						else:
 							frame_properties[frame]['initialization'] = bp
@@ -866,5 +866,5 @@
 						
 						if ('protocol' in frame_properties[frame]):
-							print "%s: Protocol for frame '%s' already defined" % (inname, frame)
+							print("%s: Protocol for frame '%s' already defined" % (inname, frame))
 						else:
 							frame_properties[frame]['protocol'] = bp
@@ -889,5 +889,5 @@
 					if (FIN in context):
 						if (token != ";"):
-							print "%s: Expected ';' in frame '%s'" % (inname, frame)
+							print("%s: Expected ';' in frame '%s'" % (inname, frame))
 						else:
 							output += "%s" % token
@@ -898,5 +898,5 @@
 					if (VAR in context):
 						if (not identifier(token)):
-							print "%s: Variable name expected in frame '%s'" % (inname, frame)
+							print("%s: Variable name expected in frame '%s'" % (inname, frame))
 						else:
 							if (not frame in frame_properties):
@@ -919,5 +919,5 @@
 					else:
 						if (not identifier(token)):
-							print "%s: Interface name expected in frame '%s'" % (inname, frame)
+							print("%s: Interface name expected in frame '%s'" % (inname, frame))
 						else:
 							arg0 = token
@@ -930,5 +930,5 @@
 					if (FIN in context):
 						if (token != ";"):
-							print "%s: Expected ';' in frame '%s'" % (inname, frame)
+							print("%s: Expected ';' in frame '%s'" % (inname, frame))
 						else:
 							output += "%s" % token
@@ -939,5 +939,5 @@
 					if (VAR in context):
 						if (not identifier(token)):
-							print "%s: Variable name expected in frame '%s'" % (inname, frame)
+							print("%s: Variable name expected in frame '%s'" % (inname, frame))
 						else:
 							if (not frame in frame_properties):
@@ -960,5 +960,5 @@
 					else:
 						if (not identifier(token)):
-							print "%s: Interface name expected in frame '%s'" % (inname, frame)
+							print("%s: Interface name expected in frame '%s'" % (inname, frame))
 						else:
 							arg0 = token
@@ -970,5 +970,5 @@
 				if (token == "}"):
 					if (indent != 2):
-						print "%s: Wrong number of parentheses in frame '%s'" % (inname, frame)
+						print("%s: Wrong number of parentheses in frame '%s'" % (inname, frame))
 					else:
 						indent = 0
@@ -1010,5 +1010,5 @@
 					continue
 				
-				print "%s: Unknown token '%s' in frame '%s'" % (inname, token, frame)
+				print("%s: Unknown token '%s' in frame '%s'" % (inname, token, frame))
 				continue
 			
@@ -1027,10 +1027,10 @@
 					continue
 				
-				print "%s: Unknown token '%s' in frame head '%s'" % (inname, token, frame)
+				print("%s: Unknown token '%s' in frame head '%s'" % (inname, token, frame))
 				
 				continue
 			
 			if (not identifier(token)):
-				print "%s: Expected frame name" % inname
+				print("%s: Expected frame name" % inname)
 			else:
 				frame = token
@@ -1050,5 +1050,5 @@
 			if (NULL in context):
 				if (token != ";"):
-					print "%s: Expected ';' in interface '%s'" % (inname, interface)
+					print("%s: Expected ';' in interface '%s'" % (inname, interface))
 				else:
 					output += "%s\n" % token
@@ -1074,5 +1074,5 @@
 						
 						if ('protocol' in iface_properties[interface]):
-							print "%s: Protocol for interface '%s' already defined" % (inname, interface)
+							print("%s: Protocol for interface '%s' already defined" % (inname, interface))
 						else:
 							iface_properties[interface]['protocol'] = bp
@@ -1094,5 +1094,5 @@
 					if (FIN in context):
 						if (token != ";"):
-							print "%s: Expected ';' in interface '%s'" % (inname, interface)
+							print("%s: Expected ';' in interface '%s'" % (inname, interface))
 						else:
 							output += "%s" % token
@@ -1124,5 +1124,5 @@
 					if (PAR_LEFT in context):
 						if (token != "("):
-							print "%s: Expected '(' in interface '%s'" % (inname, interface)
+							print("%s: Expected '(' in interface '%s'" % (inname, interface))
 						else:
 							output += "%s" % token
@@ -1133,5 +1133,5 @@
 					
 					if (not identifier(token)):
-						print "%s: Method identifier expected in interface '%s'" % (inname, interface)
+						print("%s: Method identifier expected in interface '%s'" % (inname, interface))
 					else:
 						output += "%s" % token
@@ -1142,5 +1142,5 @@
 				if (token == "}"):
 					if (indent != 2):
-						print "%s: Wrong number of parentheses in interface '%s'" % (inname, interface)
+						print("%s: Wrong number of parentheses in interface '%s'" % (inname, interface))
 					else:
 						indent = 0
@@ -1163,5 +1163,5 @@
 					continue
 				
-				print "%s: Unknown token '%s' in interface '%s'" % (inname, token, interface)
+				print("%s: Unknown token '%s' in interface '%s'" % (inname, token, interface))
 				continue
 			
@@ -1183,10 +1183,10 @@
 						continue
 						
-					print "%s: Expected '{' or ';' in interface head '%s'" % (inname, interface)
+					print("%s: Expected '{' or ';' in interface head '%s'" % (inname, interface))
 					continue
 				
 				if (EXTENDS in context):
 					if (not identifier(token)):
-						print "%s: Expected inherited interface name in interface head '%s'" % (inname, interface)
+						print("%s: Expected inherited interface name in interface head '%s'" % (inname, interface))
 					else:
 						output += "%s " % token
@@ -1218,9 +1218,9 @@
 					continue
 				
-				print "%s: Expected 'extends', '{' or ';' in interface head '%s'" % (inname, interface)
+				print("%s: Expected 'extends', '{' or ';' in interface head '%s'" % (inname, interface))
 				continue
 			
 			if (not identifier(token)):
-				print "%s: Expected interface name" % inname
+				print("%s: Expected interface name" % inname)
 			else:
 				interface = token
@@ -1240,5 +1240,5 @@
 			if (NULL in context):
 				if (token != ";"):
-					print "%s: Expected ';' in architecture '%s'" % (inname, architecture)
+					print("%s: Expected ';' in architecture '%s'" % (inname, architecture))
 				else:
 					output += "%s\n" % token
@@ -1254,5 +1254,5 @@
 					if (FIN in context):
 						if (token != ";"):
-							print "%s: Expected ';' in architecture '%s'" % (inname, architecture)
+							print("%s: Expected ';' in architecture '%s'" % (inname, architecture))
 						else:
 							output += "%s" % token
@@ -1264,5 +1264,5 @@
 					if (VAR in context):
 						if (not descriptor(token)):
-							print "%s: Expected interface descriptor in architecture '%s'" % (inname, architecture)
+							print("%s: Expected interface descriptor in architecture '%s'" % (inname, architecture))
 						else:
 							if (not architecture in arch_properties):
@@ -1283,5 +1283,5 @@
 					if (TO in context):
 						if (token != "to"):
-							print "%s: Expected 'to' in architecture '%s'" % (inname, architecture)
+							print("%s: Expected 'to' in architecture '%s'" % (inname, architecture))
 						else:
 							output += "%s " % token
@@ -1292,5 +1292,5 @@
 					
 					if (not identifier(token)):
-						print "%s: Expected interface name in architecture '%s'" % (inname, architecture)
+						print("%s: Expected interface name in architecture '%s'" % (inname, architecture))
 					else:
 						output += "%s " % token
@@ -1303,5 +1303,5 @@
 					if (FIN in context):
 						if (token != ";"):
-							print "%s: Expected ';' in architecture '%s'" % (inname, architecture)
+							print("%s: Expected ';' in architecture '%s'" % (inname, architecture))
 						else:
 							output += "%s" % token
@@ -1313,5 +1313,5 @@
 					if (VAR in context):
 						if (not identifier(token)):
-							print "%s: Expected interface name in architecture '%s'" % (inname, architecture)
+							print("%s: Expected interface name in architecture '%s'" % (inname, architecture))
 						else:
 							if (not architecture in arch_properties):
@@ -1332,5 +1332,5 @@
 					if (TO in context):
 						if (token != "to"):
-							print "%s: Expected 'to' in architecture '%s'" % (inname, architecture)
+							print("%s: Expected 'to' in architecture '%s'" % (inname, architecture))
 						else:
 							output += "%s " % token
@@ -1341,5 +1341,5 @@
 					
 					if (not descriptor(token)):
-						print "%s: Expected interface descriptor in architecture '%s'" % (inname, architecture)
+						print("%s: Expected interface descriptor in architecture '%s'" % (inname, architecture))
 					else:
 						output += "%s " % token
@@ -1352,5 +1352,5 @@
 					if (FIN in context):
 						if (token != ";"):
-							print "%s: Expected ';' in architecture '%s'" % (inname, architecture)
+							print("%s: Expected ';' in architecture '%s'" % (inname, architecture))
 						else:
 							output += "%s" % token
@@ -1362,5 +1362,5 @@
 					if (VAR in context):
 						if (not descriptor(token)):
-							print "%s: Expected second interface descriptor in architecture '%s'" % (inname, architecture)
+							print("%s: Expected second interface descriptor in architecture '%s'" % (inname, architecture))
 						else:
 							if (not architecture in arch_properties):
@@ -1381,5 +1381,5 @@
 					if (TO in context):
 						if (token != "to"):
-							print "%s: Expected 'to' in architecture '%s'" % (inname, architecture)
+							print("%s: Expected 'to' in architecture '%s'" % (inname, architecture))
 						else:
 							output += "%s " % token
@@ -1390,5 +1390,5 @@
 					
 					if (not descriptor(token)):
-						print "%s: Expected interface descriptor in architecture '%s'" % (inname, architecture)
+						print("%s: Expected interface descriptor in architecture '%s'" % (inname, architecture))
 					else:
 						output += "%s " % token
@@ -1401,5 +1401,5 @@
 					if (FIN in context):
 						if (token != ";"):
-							print "%s: Expected ';' in architecture '%s'" % (inname, architecture)
+							print("%s: Expected ';' in architecture '%s'" % (inname, architecture))
 						else:
 							output += "%s" % token
@@ -1411,5 +1411,5 @@
 					if (VAR in context):
 						if (not identifier(token)):
-							print "%s: Expected instance name in architecture '%s'" % (inname, architecture)
+							print("%s: Expected instance name in architecture '%s'" % (inname, architecture))
 						else:
 							if (not architecture in arch_properties):
@@ -1429,5 +1429,5 @@
 					
 					if (not identifier(token)):
-						print "%s: Expected frame/architecture type in architecture '%s'" % (inname, architecture)
+						print("%s: Expected frame/architecture type in architecture '%s'" % (inname, architecture))
 					else:
 						output += "%s " % token
@@ -1439,5 +1439,5 @@
 				if (token == "}"):
 					if (indent != 1):
-						print "%s: Wrong number of parentheses in architecture '%s'" % (inname, architecture)
+						print("%s: Wrong number of parentheses in architecture '%s'" % (inname, architecture))
 					else:
 						indent -= 1
@@ -1468,5 +1468,5 @@
 					continue
 				
-				print "%s: Unknown token '%s' in architecture '%s'" % (inname, token, architecture)
+				print("%s: Unknown token '%s' in architecture '%s'" % (inname, token, architecture))
 				continue
 			
@@ -1487,5 +1487,5 @@
 				
 				if (not word(token)):
-					print "%s: Expected word in architecture head '%s'" % (inname, architecture)
+					print("%s: Expected word in architecture head '%s'" % (inname, architecture))
 				else:
 					output += "%s " % token
@@ -1494,5 +1494,5 @@
 			
 			if (not identifier(token)):
-				print "%s: Expected architecture name" % inname
+				print("%s: Expected architecture name" % inname)
 			else:
 				architecture = token
@@ -1514,5 +1514,5 @@
 		if (SYSTEM in context):
 			if (token != "architecture"):
-				print "%s: Expected 'architecture'" % inname
+				print("%s: Expected 'architecture'" % inname)
 			else:
 				output += "%s " % token
@@ -1541,5 +1541,5 @@
 			continue
 		
-		print "%s: Unknown token '%s'" % (inname, token)
+		print("%s: Unknown token '%s'" % (inname, token))
 	
 	inf.close()
@@ -1575,5 +1575,5 @@
 	
 	if ((output != "") and (opt_adl)):
-		outf = file(outname, "w")
+		outf = open(outname, "w")
 		outf.write(output)
 		outf.close()
@@ -1633,5 +1633,5 @@
 					merge_dot_frame("%s_%s" % (prefix, inst['var']), inst['var'], subframe, outf, indent + 1)
 				else:
-					print "%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type'])
+					print("%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type']))
 	
 	if ('bind' in arch):
@@ -1728,10 +1728,10 @@
 	
 	if (arch is None):
-		print "Unable to find system architecture"
+		print("Unable to find system architecture")
 		return
 	
 	if (opt_dot):
 		outname = os.path.join(outdir, "%s.dot" % arch['name'])
-		outf = file(outname, "w")
+		outf = open(outname, "w")
 		
 		outf.write("digraph {\n")
@@ -1752,5 +1752,5 @@
 						merge_dot_frame("%s" % inst['var'], inst['var'], subframe, outf, 1)
 					else:
-						print "%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type'])
+						print("%s: '%s' is neither an architecture nor a frame" % (arch['name'], inst['type']))
 		
 		if ('bind' in arch):
@@ -1784,10 +1784,10 @@
 		if ('delegate' in arch):
 			for delegate in arch['delegate']:
-				print "Unable to delegate interface in system architecture"
+				print("Unable to delegate interface in system architecture")
 				break
 		
 		if ('subsume' in arch):
 			for subsume in arch['subsume']:
-				print "Unable to subsume interface in system architecture"
+				print("Unable to subsume interface in system architecture")
 				break
 		
@@ -1826,14 +1826,14 @@
 			pass
 		else:
-			print "Error: Unknown command line option '%s'" % arg
+			print("Error: Unknown command line option '%s'" % arg)
 			return
 	
 	if ((opt_bp) and (opt_ebp)):
-		print "Error: Cannot dump both original Behavior Protocols and Extended Behavior Protocols"
+		print("Error: Cannot dump both original Behavior Protocols and Extended Behavior Protocols")
 		return
 	
 	path = os.path.abspath(sys.argv[-1])
 	if (not os.path.isdir(path)):
-		print "Error: <OUTPUT> is not a directory"
+		print("Error: <OUTPUT> is not a directory")
 		return
 	
Index: ntrib/arch/uspace/srv/pci/pci.adl
===================================================================
--- contrib/arch/uspace/srv/pci/pci.adl	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,16 +1,0 @@
-interface pci extends service {
-	protocol:
-		[pci.bp]
-};
-
-frame pci {
-	provides:
-		pci pci;
-	requires:
-		[/uspace/lib/libc/requires]
-		ns ns;
-	initialization:
-		!ns.ipc_m_connect_to_me /* pci */
-	protocol:
-		[/uspace/lib/libc/protocol]
-};
Index: ntrib/arch/uspace/srv/pci/pci.bp
===================================================================
--- contrib/arch/uspace/srv/pci/pci.bp	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,2 +1,0 @@
-?ipc_m_connect_me_to ;
-?ipc_m_phone_hungup
Index: kernel/arch/abs32le/include/interrupt.h
===================================================================
--- kernel/arch/abs32le/include/interrupt.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/abs32le/include/interrupt.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -37,6 +37,5 @@
 
 #include <typedefs.h>
-#include <verify.h>
-#include <trace.h>
+#include <arch/istate.h>
 
 #define IVT_ITEMS  0
@@ -45,48 +44,4 @@
 #define VECTOR_TLB_SHOOTDOWN_IPI  0
 
-/*
- * On real hardware this stores the registers which
- * need to be preserved during interupts.
- */
-typedef struct istate {
-	uintptr_t ip;
-	uintptr_t fp;
-	uint32_t stack[];
-} istate_t;
-
-NO_TRACE static inline int istate_from_uspace(istate_t *istate)
-    REQUIRES_EXTENT_MUTABLE(istate)
-{
-	/* On real hardware this checks whether the interrupted
-	   context originated from user space. */
-	
-	return !(istate->ip & 0x80000000);
-}
-
-NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
-    uintptr_t retaddr)
-    WRITES(&istate->ip)
-{
-	/* On real hardware this sets the instruction pointer. */
-	
-	istate->ip = retaddr;
-}
-
-NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
-    REQUIRES_EXTENT_MUTABLE(istate)
-{
-	/* On real hardware this returns the instruction pointer. */
-	
-	return istate->ip;
-}
-
-NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
-    REQUIRES_EXTENT_MUTABLE(istate)
-{
-	/* On real hardware this returns the frame pointer. */
-	
-	return istate->fp;
-}
-
 #endif
 
Index: kernel/arch/abs32le/include/istate.h
===================================================================
--- kernel/arch/abs32le/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/abs32le/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,96 @@
+/*
+ * 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 abs32leinterrupt
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_abs32le_ISTATE_H_
+#define KERN_abs32le_ISTATE_H_
+
+#ifdef KERNEL
+#include <typedefs.h>
+#include <verify.h>
+#include <trace.h>
+#else
+#include <sys/types.h>
+#define NO_TRACE
+#define REQUIRES_EXTENT_MUTABLE(arg)
+#define WRITES(arg)
+#endif
+
+/*
+ * On real hardware this stores the registers which
+ * need to be preserved during interupts.
+ */
+typedef struct istate {
+	uintptr_t ip;
+	uintptr_t fp;
+	uint32_t stack[];
+} istate_t;
+
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+    REQUIRES_EXTENT_MUTABLE(istate)
+{
+	/* On real hardware this checks whether the interrupted
+	   context originated from user space. */
+	
+	return !(istate->ip & 0x80000000);
+}
+
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+    WRITES(&istate->ip)
+{
+	/* On real hardware this sets the instruction pointer. */
+	
+	istate->ip = retaddr;
+}
+
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+    REQUIRES_EXTENT_MUTABLE(istate)
+{
+	/* On real hardware this returns the instruction pointer. */
+	
+	return istate->ip;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+    REQUIRES_EXTENT_MUTABLE(istate)
+{
+	/* On real hardware this returns the frame pointer. */
+	
+	return istate->fp;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/amd64/include/interrupt.h
===================================================================
--- kernel/arch/amd64/include/interrupt.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/amd64/include/interrupt.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -37,6 +37,6 @@
 
 #include <typedefs.h>
+#include <arch/istate.h>
 #include <arch/pm.h>
-#include <trace.h>
 
 #define IVT_ITEMS  IDT_ITEMS
@@ -71,54 +71,4 @@
 #define VECTOR_DEBUG_IPI          (IVT_FREEBASE + 2)
 
-/** This is passed to interrupt handlers */
-typedef struct istate {
-	uint64_t rax;
-	uint64_t rbx;
-	uint64_t rcx;
-	uint64_t rdx;
-	uint64_t rsi;
-	uint64_t rdi;
-	uint64_t rbp;
-	uint64_t r8;
-	uint64_t r9;
-	uint64_t r10;
-	uint64_t r11;
-	uint64_t r12;
-	uint64_t r13;
-	uint64_t r14;
-	uint64_t r15;
-	uint64_t alignment;	/* align rbp_frame on multiple of 16 */
-	uint64_t rbp_frame;	/* imitation of frame pointer linkage */
-	uint64_t rip_frame;	/* imitation of return address linkage */
-	uint64_t error_word;	/* real or fake error word */
-	uint64_t rip;
-	uint64_t cs;
-	uint64_t rflags;
-	uint64_t rsp;		/* only if istate_t is from uspace */
-	uint64_t ss;		/* only if istate_t is from uspace */
-} istate_t;
-
-/** Return true if exception happened while in userspace */
-NO_TRACE static inline int istate_from_uspace(istate_t *istate)
-{
-	return !(istate->rip & 0x8000000000000000);
-}
-
-NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
-    uintptr_t retaddr)
-{
-	istate->rip = retaddr;
-}
-
-NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
-{
-	return istate->rip;
-}
-
-NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
-{
-	return istate->rbp;
-}
-
 extern void (* disable_irqs_function)(uint16_t);
 extern void (* enable_irqs_function)(uint16_t);
Index: kernel/arch/amd64/include/istate.h
===================================================================
--- kernel/arch/amd64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/amd64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2001-2004 Jakub Jermar
+ * 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 amd64interrupt
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_amd64_ISTATE_H_
+#define KERN_amd64_ISTATE_H_
+
+#ifdef KERNEL
+#include <typedefs.h>
+#include <trace.h>
+#else
+#include <sys/types.h>
+#define NO_TRACE
+#endif
+
+/** This is passed to interrupt handlers */
+typedef struct istate {
+	uint64_t rax;
+	uint64_t rbx;
+	uint64_t rcx;
+	uint64_t rdx;
+	uint64_t rsi;
+	uint64_t rdi;
+	uint64_t rbp;
+	uint64_t r8;
+	uint64_t r9;
+	uint64_t r10;
+	uint64_t r11;
+	uint64_t r12;
+	uint64_t r13;
+	uint64_t r14;
+	uint64_t r15;
+	uint64_t alignment;	/* align rbp_frame on multiple of 16 */
+	uint64_t rbp_frame;	/* imitation of frame pointer linkage */
+	uint64_t rip_frame;	/* imitation of return address linkage */
+	uint64_t error_word;	/* real or fake error word */
+	uint64_t rip;
+	uint64_t cs;
+	uint64_t rflags;
+	uint64_t rsp;		/* only if istate_t is from uspace */
+	uint64_t ss;		/* only if istate_t is from uspace */
+} istate_t;
+
+/** Return true if exception happened while in userspace */
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+{
+	return !(istate->rip & 0x8000000000000000);
+}
+
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+{
+	istate->rip = retaddr;
+}
+
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->rip;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->rbp;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/amd64/src/asm.S
===================================================================
--- kernel/arch/amd64/src/asm.S	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/amd64/src/asm.S	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -95,5 +95,5 @@
 memcpy_from_uspace_failover_address:
 memcpy_to_uspace_failover_address:
-	xorq %rax, %rax         /* return 0, failure */
+	xorl %eax, %eax         /* return 0, failure */
 	ret
 
@@ -143,5 +143,5 @@
 
 set_efer_flag:
-	movq $0xc0000080, %rcx
+	movl $0xc0000080, %ecx
 	rdmsr
 	btsl %edi, %eax
@@ -150,5 +150,5 @@
 
 read_efer_flag:
-	movq $0xc0000080, %rcx
+	movl $0xc0000080, %ecx
 	rdmsr
 	ret
@@ -243,5 +243,5 @@
 	 * Stop stack traces here if we came from userspace.
 	 */
-	xorq %rdx, %rdx
+	xorl %edx, %edx
 	cmpq $(GDT_SELECTOR(KTEXT_DES)), ISTATE_OFFSET_CS(%rsp)
 	cmovnzq %rdx, %rbp
@@ -386,4 +386,16 @@
 	movq ISTATE_OFFSET_RSP(%rsp), %rsp
 
+	/*
+	 * Clear the rest of the scratch registers to prevent information leak.
+	 * The 32-bit XOR on the low GPRs actually clears the entire 64-bit
+	 * register and the instruction is shorter.
+	 */
+	xorl %edx, %edx
+	xorl %esi, %esi
+	xorl %edi, %edi
+	xorq %r8, %r8
+	xorq %r9, %r9
+	xorq %r10, %r10
+
 	sysretq
 
@@ -413,5 +425,5 @@
 	movq %rdi, %rsi
 	movq $(PA2KA(0xb8000)), %rdi  /* base of EGA text mode memory */
-	xorq %rax, %rax
+	xorl %eax, %eax
 	
 	/* Read bits 8 - 15 of the cursor address */
@@ -493,10 +505,10 @@
 		movq $(PA2KA(0xb80a0)), %rsi
 		movq $(PA2KA(0xb8000)), %rdi
-		movq $480, %rcx
+		movl $480, %ecx
 		rep movsq
 		
 		/* Clear the 24th row */
-		xorq %rax, %rax
-		movq $20, %rcx
+		xorl %eax, %eax
+		movl $20, %ecx
 		rep stosq
 		
Index: kernel/arch/amd64/src/boot/boot.S
===================================================================
--- kernel/arch/amd64/src/boot/boot.S	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/amd64/src/boot/boot.S	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -516,10 +516,10 @@
 		movq $(PA2KA(0xb80a0)), %rsi
 		movq $(PA2KA(0xb8000)), %rdi
-		movq $480, %rcx
+		movl $480, %ecx
 		rep movsq
 		
 		/* Clear the 24th row */
-		xorq %rax, %rax
-		movq $20, %rcx
+		xorl %eax, %eax
+		movl $20, %ecx
 		rep stosq
 		
Index: kernel/arch/amd64/src/context.S
===================================================================
--- kernel/arch/amd64/src/context.S	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/amd64/src/context.S	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -45,6 +45,6 @@
 	CONTEXT_SAVE_ARCH_CORE %rdi %rdx
 	
-	xorq %rax, %rax       # context_save returns 1
-	incq %rax
+	xorl %eax, %eax       # context_save returns 1
+	incl %eax
 	ret
 
@@ -60,4 +60,4 @@
 	movq %rdx, (%rsp)
 	
-	xorq %rax, %rax       # context_restore returns 0
+	xorl %eax, %eax       # context_restore returns 0
 	ret
Index: kernel/arch/arm32/include/exception.h
===================================================================
--- kernel/arch/arm32/include/exception.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/arm32/include/exception.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -39,6 +39,5 @@
 
 #include <typedefs.h>
-#include <arch/regutils.h>
-#include <trace.h>
+#include <arch/istate.h>
 
 /** If defined, forces using of high exception vectors. */
@@ -85,56 +84,4 @@
 extern uintptr_t exc_stack;
 
-/** Struct representing CPU state saved when an exception occurs. */
-typedef struct istate {
-	uint32_t spsr;
-	uint32_t sp;
-	uint32_t lr;
-	
-	uint32_t r0;
-	uint32_t r1;
-	uint32_t r2;
-	uint32_t r3;
-	uint32_t r4;
-	uint32_t r5;
-	uint32_t r6;
-	uint32_t r7;
-	uint32_t r8;
-	uint32_t r9;
-	uint32_t r10;
-	uint32_t fp;
-	uint32_t r12;
-	
-	uint32_t pc;
-} istate_t;
-
-/** Set Program Counter member of given istate structure.
- *
- * @param istate  istate structure
- * @param retaddr new value of istate's PC member
- *
- */
-NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
-    uintptr_t retaddr)
-{
-	istate->pc = retaddr;
-}
-
-/** Return true if exception happened while in userspace. */
-NO_TRACE static inline int istate_from_uspace(istate_t *istate)
-{
-	return (istate->spsr & STATUS_REG_MODE_MASK) == USER_MODE;
-}
-
-/** Return Program Counter member of given istate structure. */
-NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
-{
-	return istate->pc;
-}
-
-NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
-{
-	return istate->fp;
-}
-
 extern void install_exception_handlers(void);
 extern void exception_init(void);
Index: kernel/arch/arm32/include/istate.h
===================================================================
--- kernel/arch/arm32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/arm32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2007 Michal Kebrt, Petr Stepan
+ *
+ * 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 arm32interrupt
+ * @{
+ */
+
+#ifndef KERN_arm32_ISTATE_H_
+#define KERN_arm32_ISTATE_H_
+
+#include <arch/regutils.h>
+
+#ifdef KERNEL
+#include <typedefs.h>
+#include <trace.h>
+#else
+#include <sys/types.h>
+#define NO_TRACE
+#endif
+
+/** Struct representing CPU state saved when an exception occurs. */
+typedef struct istate {
+	uint32_t spsr;
+	uint32_t sp;
+	uint32_t lr;
+	
+	uint32_t r0;
+	uint32_t r1;
+	uint32_t r2;
+	uint32_t r3;
+	uint32_t r4;
+	uint32_t r5;
+	uint32_t r6;
+	uint32_t r7;
+	uint32_t r8;
+	uint32_t r9;
+	uint32_t r10;
+	uint32_t fp;
+	uint32_t r12;
+	
+	uint32_t pc;
+} istate_t;
+
+/** Set Program Counter member of given istate structure.
+ *
+ * @param istate  istate structure
+ * @param retaddr new value of istate's PC member
+ *
+ */
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+{
+	istate->pc = retaddr;
+}
+
+/** Return true if exception happened while in userspace. */
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+{
+	return (istate->spsr & STATUS_REG_MODE_MASK) == USER_MODE;
+}
+
+/** Return Program Counter member of given istate structure. */
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->pc;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->fp;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/ia32/include/interrupt.h
===================================================================
--- kernel/arch/ia32/include/interrupt.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/ia32/include/interrupt.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -37,6 +37,6 @@
 
 #include <typedefs.h>
+#include <arch/istate.h>
 #include <arch/pm.h>
-#include <trace.h>
 
 #define IVT_ITEMS  IDT_ITEMS
@@ -71,56 +71,4 @@
 #define VECTOR_DEBUG_IPI          (IVT_FREEBASE + 2)
 
-typedef struct istate {
-	/*
-	 * The strange order of the GPRs is given by the requirement to use the
-	 * istate structure for both regular interrupts and exceptions as well
-	 * as for syscall handlers which use this order as an optimization.
-	 */
-	uint32_t edx;
-	uint32_t ecx;
-	uint32_t ebx;
-	uint32_t esi;
-	uint32_t edi;
-	uint32_t ebp;
-	uint32_t eax;
-	
-	uint32_t ebp_frame;  /* imitation of frame pointer linkage */
-	uint32_t eip_frame;  /* imitation of return address linkage */
-	
-	uint32_t gs;
-	uint32_t fs;
-	uint32_t es;
-	uint32_t ds;
-	
-	uint32_t error_word;  /* real or fake error word */
-	uint32_t eip;
-	uint32_t cs;
-	uint32_t eflags;
-	uint32_t esp;         /* only if istate_t is from uspace */
-	uint32_t ss;          /* only if istate_t is from uspace */
-} istate_t;
-
-/** Return true if exception happened while in userspace */
-NO_TRACE static inline int istate_from_uspace(istate_t *istate)
-{
-	return !(istate->eip & 0x80000000);
-}
-
-NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
-    uintptr_t retaddr)
-{
-	istate->eip = retaddr;
-}
-
-NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
-{
-	return istate->eip;
-}
-
-NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
-{
-	return istate->ebp;
-}
-
 extern void (* disable_irqs_function)(uint16_t);
 extern void (* enable_irqs_function)(uint16_t);
Index: kernel/arch/ia32/include/istate.h
===================================================================
--- kernel/arch/ia32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/ia32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2001-2004 Jakub Jermar
+ * 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 ia32interrupt
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_ia32_ISTATE_H_
+#define KERN_ia32_ISTATE_H_
+
+#ifdef KERNEL
+#include <typedefs.h>
+#include <trace.h>
+#else
+#include <sys/types.h>
+#define NO_TRACE
+#endif
+
+typedef struct istate {
+	/*
+	 * The strange order of the GPRs is given by the requirement to use the
+	 * istate structure for both regular interrupts and exceptions as well
+	 * as for syscall handlers which use this order as an optimization.
+	 */
+	uint32_t edx;
+	uint32_t ecx;
+	uint32_t ebx;
+	uint32_t esi;
+	uint32_t edi;
+	uint32_t ebp;
+	uint32_t eax;
+	
+	uint32_t ebp_frame;  /* imitation of frame pointer linkage */
+	uint32_t eip_frame;  /* imitation of return address linkage */
+	
+	uint32_t gs;
+	uint32_t fs;
+	uint32_t es;
+	uint32_t ds;
+	
+	uint32_t error_word;  /* real or fake error word */
+	uint32_t eip;
+	uint32_t cs;
+	uint32_t eflags;
+	uint32_t esp;         /* only if istate_t is from uspace */
+	uint32_t ss;          /* only if istate_t is from uspace */
+} istate_t;
+
+/** Return true if exception happened while in userspace */
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+{
+	return !(istate->eip & 0x80000000);
+}
+
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+{
+	istate->eip = retaddr;
+}
+
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->eip;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->ebp;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/ia64/include/interrupt.h
===================================================================
--- kernel/arch/ia64/include/interrupt.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/ia64/include/interrupt.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -37,6 +37,5 @@
 
 #include <typedefs.h>
-#include <arch/register.h>
-#include <trace.h>
+#include <arch/istate.h>
 
 /** ia64 has 256 INRs. */
@@ -74,89 +73,5 @@
 #define EOI  0  /**< The actual value doesn't matter. */
 
-typedef struct istate {
-	uint128_t f2;
-	uint128_t f3;
-	uint128_t f4;
-	uint128_t f5;
-	uint128_t f6;
-	uint128_t f7;
-	uint128_t f8;
-	uint128_t f9;
-	uint128_t f10;
-	uint128_t f11;
-	uint128_t f12;
-	uint128_t f13;
-	uint128_t f14;
-	uint128_t f15;
-	uint128_t f16;
-	uint128_t f17;
-	uint128_t f18;
-	uint128_t f19;
-	uint128_t f20;
-	uint128_t f21;
-	uint128_t f22;
-	uint128_t f23;
-	uint128_t f24;
-	uint128_t f25;
-	uint128_t f26;
-	uint128_t f27;
-	uint128_t f28;
-	uint128_t f29;
-	uint128_t f30;
-	uint128_t f31;
-	
-	uintptr_t ar_bsp;
-	uintptr_t ar_bspstore;
-	uintptr_t ar_bspstore_new;
-	uint64_t ar_rnat;
-	uint64_t ar_ifs;
-	uint64_t ar_pfs;
-	uint64_t ar_rsc;
-	uintptr_t cr_ifa;
-	cr_isr_t cr_isr;
-	uintptr_t cr_iipa;
-	psr_t cr_ipsr;
-	uintptr_t cr_iip;
-	uint64_t pr;
-	uintptr_t sp;
-	
-	/*
-	 * The following variables are defined only for break_instruction
-	 * handler.
-	 */
-	uint64_t in0;
-	uint64_t in1;
-	uint64_t in2;
-	uint64_t in3;
-	uint64_t in4;
-	uint64_t in5;
-	uint64_t in6;
-} istate_t;
-
 extern void *ivt;
-
-NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
-    uintptr_t retaddr)
-{
-	istate->cr_iip = retaddr;
-	istate->cr_ipsr.ri = 0;    /* return to instruction slot #0 */
-}
-
-NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
-{
-	return istate->cr_iip;
-}
-
-NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
-{
-	/* FIXME */
-	
-	return 0;
-}
-
-NO_TRACE static inline int istate_from_uspace(istate_t *istate)
-{
-	return (istate->cr_iip) < 0xe000000000000000ULL;
-}
 
 extern void general_exception(uint64_t, istate_t *);
Index: kernel/arch/ia64/include/istate.h
===================================================================
--- kernel/arch/ia64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/ia64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2005 Jakub Jermar
+ * 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 ia64interrupt
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_ia64_ISTATE_H_
+#define KERN_ia64_ISTATE_H_
+
+#include <arch/register.h>
+
+#ifdef KERNEL
+#include <typedefs.h>
+#include <trace.h>
+#else
+#include <sys/types.h>
+#define NO_TRACE
+#endif
+
+typedef struct istate {
+	uint128_t f2;
+	uint128_t f3;
+	uint128_t f4;
+	uint128_t f5;
+	uint128_t f6;
+	uint128_t f7;
+	uint128_t f8;
+	uint128_t f9;
+	uint128_t f10;
+	uint128_t f11;
+	uint128_t f12;
+	uint128_t f13;
+	uint128_t f14;
+	uint128_t f15;
+	uint128_t f16;
+	uint128_t f17;
+	uint128_t f18;
+	uint128_t f19;
+	uint128_t f20;
+	uint128_t f21;
+	uint128_t f22;
+	uint128_t f23;
+	uint128_t f24;
+	uint128_t f25;
+	uint128_t f26;
+	uint128_t f27;
+	uint128_t f28;
+	uint128_t f29;
+	uint128_t f30;
+	uint128_t f31;
+	
+	uintptr_t ar_bsp;
+	uintptr_t ar_bspstore;
+	uintptr_t ar_bspstore_new;
+	uint64_t ar_rnat;
+	uint64_t ar_ifs;
+	uint64_t ar_pfs;
+	uint64_t ar_rsc;
+	uintptr_t cr_ifa;
+	cr_isr_t cr_isr;
+	uintptr_t cr_iipa;
+	psr_t cr_ipsr;
+	uintptr_t cr_iip;
+	uint64_t pr;
+	uintptr_t sp;
+	
+	/*
+	 * The following variables are defined only for break_instruction
+	 * handler.
+	 */
+	uint64_t in0;
+	uint64_t in1;
+	uint64_t in2;
+	uint64_t in3;
+	uint64_t in4;
+	uint64_t in5;
+	uint64_t in6;
+} istate_t;
+
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+{
+	istate->cr_iip = retaddr;
+	istate->cr_ipsr.ri = 0;    /* return to instruction slot #0 */
+}
+
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->cr_iip;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	/* FIXME */
+	
+	return 0;
+}
+
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+{
+	return (istate->cr_iip) < 0xe000000000000000ULL;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/ia64/include/register.h
===================================================================
--- kernel/arch/ia64/include/register.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/ia64/include/register.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -142,5 +142,9 @@
 #ifndef __ASM__
 
+#ifdef KERNEL
 #include <typedefs.h>
+#else
+#include <sys/types.h>
+#endif
 
 /** Processor Status Register. */
Index: kernel/arch/mips32/include/cp0.h
===================================================================
--- kernel/arch/mips32/include/cp0.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/mips32/include/cp0.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,5 +36,9 @@
 #define KERN_mips32_CP0_H_
 
+#ifdef KERNEL
 #include <typedefs.h>
+#else
+#include <sys/types.h>
+#endif
 
 #define cp0_status_ie_enabled_bit     (1 << 0)
Index: kernel/arch/mips32/include/exception.h
===================================================================
--- kernel/arch/mips32/include/exception.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/mips32/include/exception.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -37,6 +37,5 @@
 
 #include <typedefs.h>
-#include <arch/cp0.h>
-#include <trace.h>
+#include <arch/istate.h>
 
 #define EXC_Int    0
@@ -59,72 +58,4 @@
 #define EXC_VCED   31
 
-typedef struct istate {
-	/*
-	 * The first seven registers are arranged so that the istate structure
-	 * can be used both for exception handlers and for the syscall handler.
-	 */
-	uint32_t a0;	/* arg1 */
-	uint32_t a1;	/* arg2 */
-	uint32_t a2;	/* arg3 */
-	uint32_t a3;	/* arg4 */
-	uint32_t t0;	/* arg5 */
-	uint32_t t1;	/* arg6 */
-	uint32_t v0;	/* arg7 */
-	uint32_t v1;
-	uint32_t at;
-	uint32_t t2;
-	uint32_t t3;
-	uint32_t t4;
-	uint32_t t5;
-	uint32_t t6;
-	uint32_t t7;
-	uint32_t s0;
-	uint32_t s1;
-	uint32_t s2;
-	uint32_t s3;
-	uint32_t s4;
-	uint32_t s5;
-	uint32_t s6;
-	uint32_t s7;
-	uint32_t t8;
-	uint32_t t9;
-	uint32_t kt0;
-	uint32_t kt1;	/* We use it as thread-local pointer */
-	uint32_t gp;
-	uint32_t sp;
-	uint32_t s8;
-	uint32_t ra;
-	
-	uint32_t lo;
-	uint32_t hi;
-	
-	uint32_t status;	/* cp0_status */
-	uint32_t epc;		/* cp0_epc */
-
-	uint32_t alignment;	/* to make sizeof(istate_t) a multiple of 8 */
-} istate_t;
-
-NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
-    uintptr_t retaddr)
-{
-	istate->epc = retaddr;
-}
-
-/** Return true if exception happened while in userspace */
-NO_TRACE static inline int istate_from_uspace(istate_t *istate)
-{
-	return istate->status & cp0_status_um_bit;
-}
-
-NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
-{
-	return istate->epc;
-}
-
-NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
-{
-	return istate->sp;
-}
-
 extern void exception(istate_t *istate);
 extern void tlb_refill_entry(void);
Index: kernel/arch/mips32/include/istate.h
===================================================================
--- kernel/arch/mips32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/mips32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2003-2004 Jakub Jermar
+ * 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 mips32interrupt
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_mips32_ISTATE_H_
+#define KERN_mips32_ISTATE_H_
+
+#include <arch/cp0.h>
+
+#ifdef KERNEL
+#include <typedefs.h>
+#include <trace.h>
+#else
+#include <sys/types.h>
+#define NO_TRACE
+#endif
+
+typedef struct istate {
+	/*
+	 * The first seven registers are arranged so that the istate structure
+	 * can be used both for exception handlers and for the syscall handler.
+	 */
+	uint32_t a0;	/* arg1 */
+	uint32_t a1;	/* arg2 */
+	uint32_t a2;	/* arg3 */
+	uint32_t a3;	/* arg4 */
+	uint32_t t0;	/* arg5 */
+	uint32_t t1;	/* arg6 */
+	uint32_t v0;	/* arg7 */
+	uint32_t v1;
+	uint32_t at;
+	uint32_t t2;
+	uint32_t t3;
+	uint32_t t4;
+	uint32_t t5;
+	uint32_t t6;
+	uint32_t t7;
+	uint32_t s0;
+	uint32_t s1;
+	uint32_t s2;
+	uint32_t s3;
+	uint32_t s4;
+	uint32_t s5;
+	uint32_t s6;
+	uint32_t s7;
+	uint32_t t8;
+	uint32_t t9;
+	uint32_t kt0;
+	uint32_t kt1;	/* We use it as thread-local pointer */
+	uint32_t gp;
+	uint32_t sp;
+	uint32_t s8;
+	uint32_t ra;
+	
+	uint32_t lo;
+	uint32_t hi;
+	
+	uint32_t status;	/* cp0_status */
+	uint32_t epc;		/* cp0_epc */
+
+	uint32_t alignment;	/* to make sizeof(istate_t) a multiple of 8 */
+} istate_t;
+
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+{
+	istate->epc = retaddr;
+}
+
+/** Return true if exception happened while in userspace */
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+{
+	return istate->status & cp0_status_um_bit;
+}
+
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->epc;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->sp;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/ppc32/include/istate.h
===================================================================
--- kernel/arch/ppc32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/ppc32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2006 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 ppc32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_ppc32_EXCEPTION_H_
+#define KERN_ppc32_EXCEPTION_H_
+
+#include <typedefs.h>
+#include <arch/cpu.h>
+#include <trace.h>
+
+typedef struct istate {
+	uint32_t r0;
+	uint32_t r2;
+	uint32_t r3;
+	uint32_t r4;
+	uint32_t r5;
+	uint32_t r6;
+	uint32_t r7;
+	uint32_t r8;
+	uint32_t r9;
+	uint32_t r10;
+	uint32_t r11;
+	uint32_t r13;
+	uint32_t r14;
+	uint32_t r15;
+	uint32_t r16;
+	uint32_t r17;
+	uint32_t r18;
+	uint32_t r19;
+	uint32_t r20;
+	uint32_t r21;
+	uint32_t r22;
+	uint32_t r23;
+	uint32_t r24;
+	uint32_t r25;
+	uint32_t r26;
+	uint32_t r27;
+	uint32_t r28;
+	uint32_t r29;
+	uint32_t r30;
+	uint32_t r31;
+	uint32_t cr;
+	uint32_t pc;
+	uint32_t srr1;
+	uint32_t lr;
+	uint32_t ctr;
+	uint32_t xer;
+	uint32_t dar;
+	uint32_t r12;
+	uint32_t sp;
+} istate_t;
+
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+{
+	istate->pc = retaddr;
+}
+
+/** Return true if exception happened while in userspace
+ *
+ * The contexts of MSR register was stored in SRR1.
+ *
+ */
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+{
+	return (istate->srr1 & MSR_PR) != 0;
+}
+
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->pc;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->sp;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/sparc64/include/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/interrupt.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/arch/sparc64/include/interrupt.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -38,6 +38,5 @@
 
 #include <typedefs.h>
-#include <arch/regdef.h>
-#include <trace.h>
+#include <arch/istate.h>
 
 #define IVT_ITEMS  15
@@ -51,33 +50,4 @@
 };
 
-typedef struct istate {
-	uint64_t tnpc;
-	uint64_t tpc;
-	uint64_t tstate;
-} istate_t;
-
-NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
-    uintptr_t retaddr)
-{
-	istate->tpc = retaddr;
-}
-
-NO_TRACE static inline int istate_from_uspace(istate_t *istate)
-{
-	return !(istate->tstate & TSTATE_PRIV_BIT);
-}
-
-NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)
-{
-	return istate->tpc;
-}
-
-NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)
-{
-	/* TODO */
-	
-	return 0;
-}
-
 #endif
 
Index: kernel/arch/sparc64/include/istate.h
===================================================================
--- kernel/arch/sparc64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ kernel/arch/sparc64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2005 Jakub Jermar
+ * 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 sparc64interrupt sparc64
+ * @ingroup interrupt
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_sparc64_ISTATE_H_
+#define KERN_sparc64_ISTATE_H_
+
+#include <arch/regdef.h>
+
+#ifdef KERNEL
+#include <typedefs.h>
+#include <trace.h>
+#else
+#include <sys/types.h>
+#define NO_TRACE
+#endif
+
+typedef struct istate {
+	uint64_t tnpc;
+	uint64_t tpc;
+	uint64_t tstate;
+} istate_t;
+
+NO_TRACE static inline void istate_set_retaddr(istate_t *istate,
+    uintptr_t retaddr)
+{
+	istate->tpc = retaddr;
+}
+
+NO_TRACE static inline int istate_from_uspace(istate_t *istate)
+{
+	return !(istate->tstate & TSTATE_PRIV_BIT);
+}
+
+NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->tpc;
+}
+
+NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	/* TODO */
+	return 0;
+}
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/ddi/ddi.h
===================================================================
--- kernel/generic/include/ddi/ddi.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/generic/include/ddi/ddi.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -54,4 +54,5 @@
 extern unative_t sys_physmem_map(unative_t, unative_t, unative_t, unative_t);
 extern unative_t sys_iospace_enable(ddi_ioarg_t *);
+extern unative_t sys_interrupt_enable(int irq, int enable);
 
 /*
@@ -60,4 +61,5 @@
 extern int ddi_iospace_enable_arch(task_t *, uintptr_t, size_t);
 
+
 #endif
 
Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/generic/include/syscall/syscall.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -80,4 +80,5 @@
 	SYS_PHYSMEM_MAP,
 	SYS_IOSPACE_ENABLE,
+	SYS_INTERRUPT_ENABLE,
 	
 	SYS_SYSINFO_GET_TAG,
Index: kernel/generic/src/ddi/ddi.c
===================================================================
--- kernel/generic/src/ddi/ddi.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/generic/src/ddi/ddi.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -258,4 +258,34 @@
 }
 
+/** Disable or enable specified interrupts.
+ * 
+ * @param irq the interrupt to be enabled/disabled.
+ * @param enable if true enable the interrupt, disable otherwise.
+ * 
+ * @retutn Zero on success, error code otherwise.
+ */
+unative_t sys_interrupt_enable(int irq, int enable)
+{
+/* FIXME: this needs to be generic code, or better not be in kernel at all. */
+#if 0
+	cap_t task_cap = cap_get(TASK);
+	if (!(task_cap & CAP_IRQ_REG))
+		return EPERM;
+		
+	if (irq < 0 || irq > 16) {
+		return EINVAL;
+	}
+	
+	uint16_t irq_mask = (uint16_t)(1 << irq);
+	if (enable) {
+		trap_virtual_enable_irqs(irq_mask);
+	} else {
+		trap_virtual_disable_irqs(irq_mask);
+	}
+	
+#endif
+	return 0;
+}
+
 /** @}
  */
Index: kernel/generic/src/ipc/kbox.c
===================================================================
--- kernel/generic/src/ipc/kbox.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/generic/src/ipc/kbox.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -107,7 +107,7 @@
 		/* Terminate debugging session (if any). */
 		LOG("Terminate debugging session.");
-		irq_spinlock_lock(&TASK->lock, true);
+		mutex_lock(&TASK->udebug.lock);
 		udebug_task_cleanup(TASK);
-		irq_spinlock_unlock(&TASK->lock, true);
+		mutex_unlock(&TASK->udebug.lock);
 	} else {
 		LOG("Was not debugger.");
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/generic/src/syscall/syscall.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -159,4 +159,5 @@
 	(syshandler_t) sys_physmem_map,
 	(syshandler_t) sys_iospace_enable,
+	(syshandler_t) sys_interrupt_enable,
 	
 	/* Sysinfo syscalls */
Index: kernel/tools/amd64/decpt.py
===================================================================
--- kernel/tools/amd64/decpt.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/tools/amd64/decpt.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -7,5 +7,5 @@
 def main():
     if len(sys.argv) != 2 or not sys.argv[1].startswith('0x'):
-        print "%s 0x..." % sys.argv[0]
+        print("%s 0x..." % sys.argv[0])
         sys.exit(1)
     
@@ -16,9 +16,9 @@
     ptl1 = (address >> 30) & 0x1ff
     ptl0 = (address >> 39) & 0x1ff
-    print "Ptl0:   %3d" % ptl0
-    print "Ptl1:   %3d" % ptl1
-    print "Ptl2:   %3d" % ptl2
-    print "Ptl3:   %3d" % ptl3
-    print "Offset: 0x%x" % offset
+    print("Ptl0:   %3d" % ptl0)
+    print("Ptl1:   %3d" % ptl1)
+    print("Ptl2:   %3d" % ptl2)
+    print("Ptl3:   %3d" % ptl3)
+    print("Offset: 0x%x" % offset)
 
 if __name__ == '__main__':
Index: kernel/tools/genmap.py
===================================================================
--- kernel/tools/genmap.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/tools/genmap.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -86,6 +86,6 @@
 	obdump = read_obdump(obmapf)
 	
-	def sorter(x,y):
-		return cmp(x[0],y[0])
+	def key_sorter(x):
+		return x[0]
 	
 	for line in kmapf:
@@ -93,9 +93,9 @@
 		res = startfile.match(line)
 		
-		if ((res) and (obdump[res.group(1)].has_key(res.group(3)))):
+		if ((res) and (res.group(3) in obdump[res.group(1)])):
 			offset = int(res.group(2), 16)
 			fname = res.group(3)
 			symbols = obdump[res.group(1)][fname]
-			symbols.sort(sorter)
+			symbols.sort(key = key_sorter)
 			for addr, symbol in symbols:
 				value = fname + ':' + symbol
@@ -107,10 +107,10 @@
 def main():
 	if (len(sys.argv) != 4):
-		print "Usage: %s <kernel.map> <nm dump> <output.bin>" % sys.argv[0]
+		print("Usage: %s <kernel.map> <nm dump> <output.bin>" % sys.argv[0])
 		return 1
 	
 	kmapf = open(sys.argv[1], 'r')
 	obmapf = open(sys.argv[2], 'r')
-	out = open(sys.argv[3], 'w')
+	out = open(sys.argv[3], 'wb')
 	
 	generate(kmapf, obmapf, out)
Index: kernel/tools/ia32/decpt.py
===================================================================
--- kernel/tools/ia32/decpt.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ kernel/tools/ia32/decpt.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -7,5 +7,5 @@
 def main():
     if len(sys.argv) != 2 or not sys.argv[1].startswith('0x'):
-        print "%s 0x..." % sys.argv[0]
+        print("%s 0x..." % sys.argv[0])
         sys.exit(1)
     
@@ -14,7 +14,7 @@
     ptl1 = (address >> 12) & 0x3ff
     ptl0 = (address >> 22) & 0x3ff
-    print "Ptl0:   %3d" % ptl0
-    print "Ptl1:   %3d" % ptl1
-    print "Offset: 0x%x" % offset
+    print("Ptl0:   %3d" % ptl0)
+    print("Ptl1:   %3d" % ptl1)
+    print("Offset: 0x%x" % offset)
 
 if __name__ == '__main__':
Index: tools/autotool.py
===================================================================
--- tools/autotool.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/autotool.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -75,5 +75,5 @@
 	"Read HelenOS build configuration"
 	
-	inf = file(fname, 'r')
+	inf = open(fname, 'r')
 	
 	for line in inf:
@@ -191,5 +191,5 @@
 	check_common(common, "CC")
 	
-	outf = file(PROBE_SOURCE, 'w')
+	outf = open(PROBE_SOURCE, 'w')
 	outf.write(PROBE_HEAD)
 	
@@ -212,5 +212,5 @@
 	if (not os.path.isfile(PROBE_OUTPUT)):
 		sys.stderr.write("failed\n")
-		print output[1]
+		print(output[1])
 		print_error(["Error executing \"%s\"." % " ".join(args),
 		             "The compiler did not produce the output file \"%s\"." % PROBE_OUTPUT,
@@ -221,5 +221,5 @@
 	sys.stderr.write("ok\n")
 	
-	inf = file(PROBE_OUTPUT, 'r')
+	inf = open(PROBE_OUTPUT, 'r')
 	lines = inf.readlines()
 	inf.close()
@@ -343,5 +343,5 @@
 	"Create makefile output"
 	
-	outmk = file(mkname, 'w')
+	outmk = open(mkname, 'w')
 	
 	outmk.write('#########################################\n')
@@ -357,5 +357,5 @@
 	"Create header output"
 	
-	outhd = file(hdname, 'w')
+	outhd = open(hdname, 'w')
 	
 	outhd.write('/***************************************\n')
Index: tools/checkers/clang.py
===================================================================
--- tools/checkers/clang.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/checkers/clang.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -42,5 +42,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ROOT>"
+	print(prname + " <ROOT>")
 
 def clang(root, job):
@@ -50,9 +50,9 @@
 	
 	if (not os.path.isfile(inname)):
-		print "Unable to open %s" % inname
-		print "Did you run \"make precheck\" on the source tree?"
+		print("Unable to open %s" % inname)
+		print("Did you run \"make precheck\" on the source tree?")
 		return False
 	
-	inf = file(inname, "r")
+	inf = open(inname, "r")
 	records = inf.read().splitlines()
 	inf.close()
@@ -64,5 +64,5 @@
 		
 		if (len(arg) < 6):
-			print "Not enought jobfile record arguments"
+			print("Not enough jobfile record arguments")
 			return False
 		
@@ -76,5 +76,5 @@
 		srcfqname = os.path.join(base, srcfname)
 		if (not os.path.isfile(srcfqname)):
-			print "Source %s not found" % srcfqname
+			print("Source %s not found" % srcfqname)
 			return False
 		
@@ -108,6 +108,6 @@
 	
 	if (not os.path.isfile(config)):
-		print "%s not found." % config
-		print "Please specify the path to HelenOS build tree root as the first argument."
+		print("%s not found." % config)
+		print("Please specify the path to HelenOS build tree root as the first argument.")
 		return
 	
@@ -115,9 +115,9 @@
 		if (not clang(rootdir, job)):
 			print
-			print "Failed job: %s" % job
+			print("Failed job: %s" % job)
 			return
 	
 	print
-	print "All jobs passed"
+	print("All jobs passed")
 
 if __name__ == '__main__':
Index: tools/checkers/jobfile.py
===================================================================
--- tools/checkers/jobfile.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/checkers/jobfile.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -54,5 +54,5 @@
 				nil = True
 			else:
-				print "Unexpected '%s'" % record[i]
+				print("Unexpected '%s'" % record[i])
 				return False
 		
Index: tools/checkers/stanse.py
===================================================================
--- tools/checkers/stanse.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/checkers/stanse.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -43,5 +43,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ROOT>"
+	print(prname + " <ROOT>")
 
 def stanse(root, job):
@@ -54,9 +54,9 @@
 	
 	if (not os.path.isfile(inname)):
-		print "Unable to open %s" % inname
-		print "Did you run \"make precheck\" on the source tree?"
+		print("Unable to open %s" % inname)
+		print("Did you run \"make precheck\" on the source tree?")
 		return False
 	
-	inf = file(inname, "r")
+	inf = open(inname, "r")
 	records = inf.read().splitlines()
 	inf.close()
@@ -69,5 +69,5 @@
 		
 		if (len(arg) < 6):
-			print "Not enought jobfile record arguments"
+			print("Not enough jobfile record arguments")
 			return False
 		
@@ -81,5 +81,5 @@
 		srcfqname = os.path.join(base, srcfname)
 		if (not os.path.isfile(srcfqname)):
-			print "Source %s not found" % srcfqname
+			print("Source %s not found" % srcfqname)
 			return False
 		
@@ -90,5 +90,5 @@
 		output.append([srcfname, tgtfname, base, options])
 	
-	outf = file(outname, "w")
+	outf = open(outname, "w")
 	for record in output:
 		outf.write("{%s},{%s},{%s},{%s}\n" % (record[0], record[1], record[2], record[3]))
@@ -121,6 +121,6 @@
 	
 	if (not os.path.isfile(config)):
-		print "%s not found." % config
-		print "Please specify the path to HelenOS build tree root as the first argument."
+		print("%s not found." % config)
+		print("Please specify the path to HelenOS build tree root as the first argument.")
 		return
 	
@@ -128,9 +128,9 @@
 		if (not stanse(rootdir, job)):
 			print
-			print "Failed job: %s" % job
+			print("Failed job: %s" % job)
 			return
 	
 	print
-	print "All jobs passed"
+	print("All jobs passed")
 
 if __name__ == '__main__':
Index: tools/checkers/vcc.py
===================================================================
--- tools/checkers/vcc.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/checkers/vcc.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -49,5 +49,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ROOT> [VCC_PATH]"
+	print(prname + " <ROOT> [VCC_PATH]")
 
 def cygpath(upath):
@@ -72,5 +72,5 @@
 	preproc = subprocess.Popen(args, stdout = subprocess.PIPE).communicate()[0]
 	
-	tmpf = file(tmpfname, "w")
+	tmpf = open(tmpfname, "w")
 	tmpf.write(specification)
 	
@@ -108,9 +108,9 @@
 	
 	if (not os.path.isfile(inname)):
-		print "Unable to open %s" % inname
-		print "Did you run \"make precheck\" on the source tree?"
+		print("Unable to open %s" % inname)
+		print("Did you run \"make precheck\" on the source tree?")
 		return False
 	
-	inf = file(inname, "r")
+	inf = open(inname, "r")
 	records = inf.read().splitlines()
 	inf.close()
@@ -122,5 +122,5 @@
 		
 		if (len(arg) < 6):
-			print "Not enought jobfile record arguments"
+			print("Not enough jobfile record arguments")
 			return False
 		
@@ -134,5 +134,5 @@
 		srcfqname = os.path.join(base, srcfname)
 		if (not os.path.isfile(srcfqname)):
-			print "Source %s not found" % srcfqname
+			print("Source %s not found" % srcfqname)
 			return False
 		
@@ -153,5 +153,5 @@
 		
 		# Run Vcc
-		print " -- %s --" % srcfname		
+		print(" -- %s --" % srcfname)
 		retval = subprocess.Popen([vcc_path, '/pointersize:32', '/newsyntax', cygpath(tmpfqname)]).wait()
 		
@@ -182,6 +182,6 @@
 	
 	if (not os.path.isfile(vcc_path)):
-		print "%s is not a binary." % vcc_path
-		print "Please supply the full Cygwin path to Vcc as the second argument."
+		print("%s is not a binary." % vcc_path)
+		print("Please supply the full Cygwin path to Vcc as the second argument.")
 		return
 	
@@ -189,11 +189,11 @@
 	
 	if (not os.path.isfile(config)):
-		print "%s not found." % config
-		print "Please specify the path to HelenOS build tree root as the first argument."
+		print("%s not found." % config)
+		print("Please specify the path to HelenOS build tree root as the first argument.")
 		return
 	
 	specpath = os.path.join(rootdir, "tools/checkers/vcc.h")
 	if (not os.path.isfile(specpath)):
-		print "%s not found." % config
+		print("%s not found." % config)
 		return
 	
@@ -205,9 +205,9 @@
 		if (not vcc(vcc_path, rootdir, job)):
 			print
-			print "Failed job: %s" % job
+			print("Failed job: %s" % job)
 			return
 	
 	print
-	print "All jobs passed"
+	print("All jobs passed")
 
 if __name__ == '__main__':
Index: tools/config.py
===================================================================
--- tools/config.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/config.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -48,5 +48,5 @@
 	"Read saved values from last configuration run"
 	
-	inf = file(fname, 'r')
+	inf = open(fname, 'r')
 	
 	for line in inf:
@@ -103,5 +103,5 @@
 		condval = res.group(3)
 		
-		if (not defaults.has_key(condname)):
+		if (not condname in defaults):
 			varval = ''
 		else:
@@ -131,5 +131,5 @@
 	"Parse configuration file"
 	
-	inf = file(fname, 'r')
+	inf = open(fname, 'r')
 	
 	name = ''
@@ -219,5 +219,5 @@
 			continue
 		
-		if (not defaults.has_key(varname)):
+		if (not varname in defaults):
 			return False
 	
@@ -232,5 +232,5 @@
 	
 	try:
-		version = subprocess.Popen(['bzr', 'version-info', '--custom', '--template={clean}:{revno}:{revision_id}'], stdout = subprocess.PIPE).communicate()[0].split(':')
+		version = subprocess.Popen(['bzr', 'version-info', '--custom', '--template={clean}:{revno}:{revision_id}'], stdout = subprocess.PIPE).communicate()[0].decode().split(':')
 		sys.stderr.write("ok\n")
 	except:
@@ -246,6 +246,6 @@
 		revision = None
 	
-	outmk = file(mkname, 'w')
-	outmc = file(mcname, 'w')
+	outmk = open(mkname, 'w')
+	outmc = open(mcname, 'w')
 	
 	outmk.write('#########################################\n')
@@ -263,5 +263,5 @@
 			continue
 		
-		if (not defaults.has_key(varname)):
+		if (not varname in defaults):
 			default = ''
 		else:
@@ -368,5 +368,5 @@
 			# Cancel out all defaults which have to be deduced
 			for varname, vartype, name, choices, cond in ask_names:
-				if ((vartype == 'y') and (defaults.has_key(varname)) and (defaults[varname] == '*')):
+				if ((vartype == 'y') and (varname in defaults) and (defaults[varname] == '*')):
 					defaults[varname] = None
 			
@@ -385,5 +385,5 @@
 					position = cnt
 				
-				if (not defaults.has_key(varname)):
+				if (not varname in defaults):
 					default = None
 				else:
@@ -428,5 +428,5 @@
 				cnt += 1
 			
-			if (position >= options):
+			if (position != None) and (position >= len(options)):
 				position = None
 			
@@ -449,10 +449,10 @@
 			
 			position = None
-			if (not opt2row.has_key(value)):
+			if (not value in opt2row):
 				raise RuntimeError("Error selecting value: %s" % value)
 			
 			(selname, seltype, name, choices) = opt2row[value]
 			
-			if (not defaults.has_key(selname)):
+			if (not selname in defaults):
 					default = None
 			else:
Index: tools/jobfile.py
===================================================================
--- tools/jobfile.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/jobfile.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -38,5 +38,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]"
+	print(prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]")
 
 def main():
@@ -53,5 +53,5 @@
 	options = " ".join(sys.argv[6:])
 	
-	jobfile = file(jobfname, "a")
+	jobfile = open(jobfname, "a")
 	fcntl.lockf(jobfile, fcntl.LOCK_EX)
 	jobfile.write("{%s},{%s},{%s},{%s},{%s},{%s}\n" % (srcfname, tgtfname, toolname, category, cwd, options))
Index: tools/mkfat.py
===================================================================
--- tools/mkfat.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/mkfat.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -46,5 +46,5 @@
 		return size
 	
-	return (((size / alignment) + 1) * alignment)
+	return ((size // alignment) + 1) * alignment
 
 def subtree_size(root, cluster_size, dirent_size):
@@ -79,5 +79,5 @@
 	first = 0
 	
-	inf = file(path, "r")
+	inf = open(path, "rb")
 	rd = 0;
 	while (rd < size):
@@ -92,5 +92,5 @@
 		prev = empty_cluster
 		
-		data = inf.read(cluster_size);
+		data = bytes(inf.read(cluster_size));
 		outf.seek(data_start + (empty_cluster - reserved_clusters) * cluster_size)
 		outf.write(data)
@@ -120,5 +120,5 @@
 		prev = empty_cluster
 		
-		data = ''
+		data = bytes()
 		data_len = 0
 		while ((i < length) and (data_len < cluster_size)):
@@ -343,5 +343,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <EXTRA_BYTES> <PATH> <IMAGE>"
+	print(prname + " <EXTRA_BYTES> <PATH> <IMAGE>")
 
 def main():
@@ -351,5 +351,5 @@
 	
 	if (not sys.argv[1].isdigit()):
-		print "<EXTRA_BYTES> must be a number"
+		print("<EXTRA_BYTES> must be a number")
 		return
 	
@@ -358,5 +358,5 @@
 	path = os.path.abspath(sys.argv[2])
 	if (not os.path.isdir(path)):
-		print "<PATH> must be a directory"
+		print("<PATH> must be a directory")
 		return
 	
@@ -370,9 +370,9 @@
 	reserved_clusters = 2
 	
-	# Make sure the filesystem is large enought for FAT16
+	# Make sure the filesystem is large enough for FAT16
 	size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size + extra_bytes
-	while (size / cluster_size < fat16_clusters):
+	while (size // cluster_size < fat16_clusters):
 		if (cluster_size > sector_size):
-			cluster_size /= 2
+			cluster_size = cluster_size // 2
 			size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size + extra_bytes
 		else:
@@ -381,20 +381,20 @@
 	root_size = align_up(root_entries(path) * dirent_size, cluster_size)
 	
-	fat_size = align_up(align_up(size, cluster_size) / cluster_size * fatent_size, sector_size)
-	
-	sectors = (cluster_size + fat_count * fat_size + root_size + size) / sector_size
+	fat_size = align_up(align_up(size, cluster_size) // cluster_size * fatent_size, sector_size)
+	
+	sectors = (cluster_size + fat_count * fat_size + root_size + size) // sector_size
 	root_start = cluster_size + fat_count * fat_size
 	data_start = root_start + root_size
 	
-	outf = file(sys.argv[3], "w")
+	outf = open(sys.argv[3], "wb")
 	
 	boot_sector = xstruct.create(BOOT_SECTOR)
 	boot_sector.jmp = [0xEB, 0x3C, 0x90]
-	boot_sector.oem = "MSDOS5.0"
+	boot_sector.oem = b'MSDOS5.0'
 	boot_sector.sector = sector_size
-	boot_sector.cluster = cluster_size / sector_size
-	boot_sector.reserved = cluster_size / sector_size
+	boot_sector.cluster = cluster_size // sector_size
+	boot_sector.reserved = cluster_size // sector_size
 	boot_sector.fats = fat_count
-	boot_sector.rootdir = root_size / dirent_size
+	boot_sector.rootdir = root_size // dirent_size
 	if (sectors <= 65535):
 		boot_sector.sectors = sectors
@@ -402,5 +402,5 @@
 		boot_sector.sectors = 0
 	boot_sector.descriptor = 0xF8
-	boot_sector.fat_sectors = fat_size / sector_size
+	boot_sector.fat_sectors = fat_size // sector_size
 	boot_sector.track_sectors = 63
 	boot_sector.heads = 6
@@ -414,6 +414,6 @@
 	boot_sector.extboot_signature = 0x29
 	boot_sector.serial = random.randint(0, 0x7fffffff)
-	boot_sector.label = "HELENOS"
-	boot_sector.fstype = "FAT16   "
+	boot_sector.label = b'HELENOS'
+	boot_sector.fstype = b'FAT16   '
 	boot_sector.boot_signature = [0x55, 0xAA]
 	
@@ -423,21 +423,21 @@
 	
 	# Reserved sectors
-	for i in range(1, cluster_size / sector_size):
+	for i in range(1, cluster_size // sector_size):
 		outf.write(empty_sector.pack())
 	
 	# FAT tables
 	for i in range(0, fat_count):
-		for j in range(0, fat_size / sector_size):
+		for j in range(0, fat_size // sector_size):
 			outf.write(empty_sector.pack())
 	
 	# Root directory
-	for i in range(0, root_size / sector_size):
+	for i in range(0, root_size // sector_size):
 		outf.write(empty_sector.pack())
 	
 	# Data
-	for i in range(0, size / sector_size):
+	for i in range(0, size // sector_size):
 		outf.write(empty_sector.pack())
 	
-	fat = array.array('L', [0] * (fat_size / fatent_size))
+	fat = array.array('L', [0] * (fat_size // fatent_size))
 	fat[0] = 0xfff8
 	fat[1] = 0xffff
@@ -449,5 +449,5 @@
 	for i in range(0, fat_count):
 		outf.seek(cluster_size + i * fat_size)
-		for j in range(0, fat_size / fatent_size):
+		for j in range(0, fat_size // fatent_size):
 			fat_entry.next = fat[j]
 			outf.write(fat_entry.pack())
Index: tools/mkhord.py
===================================================================
--- tools/mkhord.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/mkhord.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -52,5 +52,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>" 
+	print(prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>")
 
 def main():
@@ -60,19 +60,19 @@
 	
 	if (not sys.argv[1].isdigit()):
-		print "<ALIGNMENT> must be a number"
+		print("<ALIGNMENT> must be a number")
 		return
 	
 	align = int(sys.argv[1], 0)
 	if (align <= 0):
-		print "<ALIGNMENT> must be positive"
+		print("<ALIGNMENT> must be positive")
 		return
 	
 	fs_image = os.path.abspath(sys.argv[2])
 	if (not os.path.isfile(fs_image)):
-		print "<FS_IMAGE> must be a file"
+		print("<FS_IMAGE> must be a file")
 		return
 	
-	inf = file(fs_image, "rb")
-	outf = file(sys.argv[3], "wb")
+	inf = open(fs_image, "rb")
+	outf = open(sys.argv[3], "wb")
 	
 	header = xstruct.create(HEADER)
Index: tools/mktmpfs.py
===================================================================
--- tools/mktmpfs.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/mktmpfs.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -66,5 +66,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <PATH> <IMAGE>"
+	print(prname + " <PATH> <IMAGE>")
 
 def recursion(root, outf):
@@ -85,5 +85,5 @@
 			outf.write(dentry.pack())
 			
-			inf = file(canon, "r")
+			inf = open(canon, "rb")
 			rd = 0;
 			while (rd < size):
@@ -116,8 +116,8 @@
 	path = os.path.abspath(sys.argv[1])
 	if (not os.path.isdir(path)):
-		print "<PATH> must be a directory"
+		print("<PATH> must be a directory")
 		return
 	
-	outf = file(sys.argv[2], "w")
+	outf = open(sys.argv[2], "wb")
 	
 	header = xstruct.create(HEADER)
Index: tools/mkuimage.py
===================================================================
--- tools/mkuimage.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/mkuimage.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -72,10 +72,10 @@
 			start_addr = (int)(optarg, 0)
 		else:
-			print base_name + ": Unrecognized option."
+			print(base_name + ": Unrecognized option.")
 			print_syntax(cmd_name)
 			return
 
 	if len(args) < 2:
-		print base_name + ": Argument missing."
+		print(base_name + ": Argument missing.")
 		print_syntax(cmd_name)
 		return
@@ -91,6 +91,6 @@
 
 def mkuimage(inf_name, outf_name, image_name, load_addr, start_addr):
-	inf = file(inf_name, 'rb')
-	outf = file(outf_name, 'wb')
+	inf = open(inf_name, 'rb')
+	outf = open(outf_name, 'wb')
 
 	header = xstruct.create(UIMAGE_HEADER)
@@ -140,5 +140,5 @@
 	signed_crc = zlib.crc32(byteseq, 0)
 	if signed_crc < 0:
-		return (long(signed_crc) + 4294967296L) # 2^32L
+		return (long(signed_crc) + (long(2) ** long(32))) # 2^32L
 	else:
 		return signed_crc
@@ -147,13 +147,13 @@
 #
 def print_syntax(cmd):
-	print "syntax: " + cmd + " [<options>] <raw_image> <uImage>"
+	print("syntax: " + cmd + " [<options>] <raw_image> <uImage>")
 	print
-	print "\traw_image\tInput image name (raw binary data)"
-	print "\tuImage\t\tOutput uImage name (U-Boot image)"
+	print("\traw_image\tInput image name (raw binary data)")
+	print("\tuImage\t\tOutput uImage name (U-Boot image)")
 	print
-	print "options:"
-	print "\t-name <name>\tImage name (default: 'Noname')"
-	print "\t-laddr <name>\tLoad address (default: 0x00000000)"
-	print "\t-saddr <name>\tStart address (default: 0x00000000)"
+	print("options:")
+	print("\t-name <name>\tImage name (default: 'Noname')")
+	print("\t-laddr <name>\tLoad address (default: 0x00000000)")
+	print("\t-saddr <name>\tStart address (default: 0x00000000)")
 
 if __name__ == '__main__':
Index: tools/pack.py
===================================================================
--- tools/pack.py	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ tools/pack.py	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -43,5 +43,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print "%s <OBJCOPY> <FORMAT> <ARCH> <ARCH_PATH> [COMPONENTS ...]" % prname
+	print("%s <OBJCOPY> <FORMAT> <ARCH> <ARCH_PATH> [COMPONENTS ...]" % prname)
 
 def deflate(data):
@@ -110,8 +110,8 @@
 		symbol = "_binary_%s" % basename.replace(".", "_")
 		
-		print "%s -> %s" % (component, obj)
+		print("%s -> %s" % (component, obj))
 		
-		comp_in = file(component, "rb")
-		comp_data = comp_in.read();
+		comp_in = open(component, "rb")
+		comp_data = comp_in.read()
 		comp_in.close()
 		
@@ -121,5 +121,5 @@
 		
 		try:
-			comp_out = file(basename, "wb")
+			comp_out = open(basename, "wb")
 			comp_out.write(comp_deflate)
 			comp_out.close()
@@ -151,5 +151,5 @@
 		cnt += 1
 	
-	header = file(os.path.join(arch_path, "include", "%s.h" % COMPONENTS), "w")
+	header = open(os.path.join(arch_path, "include", "%s.h" % COMPONENTS), "w")
 	
 	header.write('/***************************************\n')
@@ -173,5 +173,5 @@
 	header.close()
 	
-	data = file(os.path.join(arch_path, "src", "%s.c" % COMPONENTS), "w")
+	data = open(os.path.join(arch_path, "src", "%s.c" % COMPONENTS), "w")
 	
 	data.write('/***************************************\n')
@@ -187,9 +187,9 @@
 	data.close()
 	
-	link_in = file(os.path.join(arch_path, "%s.in" % LINK), "r")
+	link_in = open(os.path.join(arch_path, "%s.in" % LINK), "r")
 	template = link_in.read()
 	link_in.close()
 	
-	link_out = file(os.path.join(arch_path, "%s.comp" % LINK), "w")
+	link_out = open(os.path.join(arch_path, "%s.comp" % LINK), "w")
 	link_out.write(template.replace("[[COMPONENTS]]", "\n".join(link_ctx)))
 	link_out.close()
Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -46,9 +46,16 @@
 	app/tasks \
 	app/tester \
+	app/test_serial \
 	app/tetris \
 	app/trace \
 	app/top \
+	app/netstart \
+	app/netecho \
+	app/nettest1 \
+	app/nettest2 \
+	app/ping \
 	srv/clip \
 	srv/devmap \
+	srv/devman \
 	srv/loader \
 	srv/ns \
@@ -80,9 +87,5 @@
 	srv/net/tl/tcp \
 	srv/net/net \
-	srv/net/netstart \
-	app/netecho \
-	app/nettest1 \
-	app/nettest2 \
-	app/ping
+	drv/root
 
 ## Networking
@@ -107,9 +110,11 @@
 
 ifeq ($(UARCH),amd64)
-	DIRS += srv/hw/bus/pci
 endif
 
 ifeq ($(UARCH),ia32)
-	DIRS += srv/hw/bus/pci
+	DIRS += drv/rootia32
+	DIRS += drv/pciintel
+	DIRS += drv/isa
+	DIRS += drv/ns8250
 endif
 
@@ -134,15 +139,7 @@
 	lib/softint \
 	lib/softfloat \
+	lib/drv \
 	lib/packet \
 	lib/net
-
-ifeq ($(UARCH),amd64)
-	LIBS += lib/pci
-endif
-
-ifeq ($(UARCH),ia32)
-	LIBS += lib/pci
-endif
-
 
 LIBC_BUILD = $(addsuffix .build,$(LIBC))
Index: uspace/Makefile.common
===================================================================
--- uspace/Makefile.common	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/Makefile.common	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -86,6 +86,5 @@
 LIBCLUI_PREFIX = $(LIB_PREFIX)/clui
 
-LIBPCI_PREFIX = $(LIB_PREFIX)/pci
-
+LIBDRV_PREFIX = $(LIB_PREFIX)/drv
 LIBPACKET_PREFIX = $(LIB_PREFIX)/packet
 LIBNET_PREFIX = $(LIB_PREFIX)/net
Index: uspace/app/netecho/netecho.c
===================================================================
--- uspace/app/netecho/netecho.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/netecho/netecho.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,10 +28,10 @@
 
 /** @addtogroup netecho
- *  @{
+ * @{
  */
 
 /** @file
- *  Network echo application.
- *  Answers received packets.
+ * Network echo application.
+ * Answers received packets.
  */
 
@@ -51,21 +51,9 @@
 #include "print_error.h"
 
-/** Network echo module name.
- */
+/** Network echo module name. */
 #define NAME	"Network Echo"
 
-/** Prints the application help.
- */
-void echo_print_help(void);
-
-/** Module entry point.
- *  Reads command line parameters and starts listenning.
- *  @param[in] argc The number of command line parameters.
- *  @param[in] argv The command line parameters.
- *  @returns EOK on success.
- */
-int main(int argc, char * argv[]);
-
-void echo_print_help(void){
+static void echo_print_help(void)
+{
 	printf(
 		"Network Echo aplication\n" \
@@ -101,27 +89,28 @@
 }
 
-int main(int argc, char * argv[]){
+int main(int argc, char *argv[])
+{
 	ERROR_DECLARE;
 
-	size_t size			= 1024;
-	int verbose			= 0;
-	char * reply		= NULL;
-	sock_type_t type	= SOCK_DGRAM;
-	int count			= -1;
-	int family			= PF_INET;
-	uint16_t port		= 7;
-	int backlog			= 3;
-
-	socklen_t max_length				= sizeof(struct sockaddr_in6);
+	size_t size = 1024;
+	int verbose = 0;
+	char *reply = NULL;
+	sock_type_t type = SOCK_DGRAM;
+	int count = -1;
+	int family = PF_INET;
+	uint16_t port = 7;
+	int backlog = 3;
+
+	socklen_t max_length = sizeof(struct sockaddr_in6);
 	uint8_t address_data[max_length];
-	struct sockaddr * address			= (struct sockaddr *) address_data;
-	struct sockaddr_in * address_in		= (struct sockaddr_in *) address;
-	struct sockaddr_in6 * address_in6	= (struct sockaddr_in6 *) address;
+	struct sockaddr *address = (struct sockaddr *) address_data;
+	struct sockaddr_in *address_in = (struct sockaddr_in *) address;
+	struct sockaddr_in6 *address_in6 = (struct sockaddr_in6 *) address;
 	socklen_t addrlen;
 	char address_string[INET6_ADDRSTRLEN];
-	uint8_t * address_start;
+	uint8_t *address_start;
 	int socket_id;
 	int listening_id;
-	char * data;
+	char *data;
 	size_t length;
 	int index;
@@ -130,72 +119,72 @@
 
 	// parse the command line arguments
-	for(index = 1; index < argc; ++ index){
-		if(argv[index][0] == '-'){
-			switch(argv[index][1]){
-				case 'b':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &backlog, 0));
-					break;
-				case 'c':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &count, 0));
-					break;
-				case 'f':
-					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 0, socket_parse_protocol_family));
-					break;
-				case 'h':
+	for (index = 1; index < argc; ++ index) {
+		if (argv[index][0] == '-') {
+			switch (argv[index][1]) {
+			case 'b':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &backlog, 0));
+				break;
+			case 'c':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &count, 0));
+				break;
+			case 'f':
+				ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 0, socket_parse_protocol_family));
+				break;
+			case 'h':
+				echo_print_help();
+				return EOK;
+				break;
+			case 'p':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				port = (uint16_t) value;
+				break;
+			case 'r':
+				ERROR_PROPAGATE(arg_parse_string(argc, argv, &index, &reply, 0));
+				break;
+			case 's':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				size = (value >= 0) ? (size_t) value : 0;
+				break;
+			case 't':
+				ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 0, socket_parse_socket_type));
+				type = (sock_type_t) value;
+				break;
+			case 'v':
+				verbose = 1;
+				break;
+			// long options with the double minus sign ('-')
+			case '-':
+				if (str_lcmp(argv[index] + 2, "backlog=", 6) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &backlog, 8));
+				} else if (str_lcmp(argv[index] + 2, "count=", 6) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &count, 8));
+				} else if (str_lcmp(argv[index] + 2, "family=", 7) == 0) {
+						ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 9, socket_parse_protocol_family));
+				} else if (str_lcmp(argv[index] + 2, "help", 5) == 0) {
 					echo_print_help();
 					return EOK;
-					break;
-				case 'p':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				} else if (str_lcmp(argv[index] + 2, "port=", 5) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
 					port = (uint16_t) value;
-					break;
-				case 'r':
-					ERROR_PROPAGATE(arg_parse_string(argc, argv, &index, &reply, 0));
-					break;
-				case 's':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				} else if (str_lcmp(argv[index] + 2, "reply=", 6) == 0) {
+					ERROR_PROPAGATE(arg_parse_string(argc, argv, &index, &reply, 8));
+				} else if (str_lcmp(argv[index] + 2, "size=", 5) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
 					size = (value >= 0) ? (size_t) value : 0;
-					break;
-				case 't':
-					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 0, socket_parse_socket_type));
+				} else if (str_lcmp(argv[index] + 2, "type=", 5) == 0) {
+					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 7, socket_parse_socket_type));
 					type = (sock_type_t) value;
-					break;
-				case 'v':
+				} else if (str_lcmp(argv[index] + 2, "verbose", 8) == 0) {
 					verbose = 1;
-					break;
-				// long options with the double minus sign ('-')
-				case '-':
-					if(str_lcmp(argv[index] + 2, "backlog=", 6) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &backlog, 8));
-					}else if(str_lcmp(argv[index] + 2, "count=", 6) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &count, 8));
-					}else if(str_lcmp(argv[index] + 2, "family=", 7) == 0){
-						ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 9, socket_parse_protocol_family));
-					}else if(str_lcmp(argv[index] + 2, "help", 5) == 0){
-						echo_print_help();
-						return EOK;
-					}else if(str_lcmp(argv[index] + 2, "port=", 5) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
-						port = (uint16_t) value;
-					}else if(str_lcmp(argv[index] + 2, "reply=", 6) == 0){
-						ERROR_PROPAGATE(arg_parse_string(argc, argv, &index, &reply, 8));
-					}else if(str_lcmp(argv[index] + 2, "size=", 5) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
-						size = (value >= 0) ? (size_t) value : 0;
-					}else if(str_lcmp(argv[index] + 2, "type=", 5) == 0){
-						ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 7, socket_parse_socket_type));
-						type = (sock_type_t) value;
-					}else if(str_lcmp(argv[index] + 2, "verbose", 8) == 0){
-						verbose = 1;
-					}else{
-						echo_print_help();
-						return EINVAL;
-					}
-					break;
-				default:
+				} else {
 					echo_print_help();
 					return EINVAL;
+				}
+				break;
+			default:
+				echo_print_help();
+				return EINVAL;
 			}
-		}else{
+		} else {
 			echo_print_help();
 			return EINVAL;
@@ -204,5 +193,5 @@
 
 	// check the buffer size
-	if(size <= 0){
+	if (size <= 0) {
 		fprintf(stderr, "Receive size too small (%d). Using 1024 bytes instead.\n", size);
 		size = 1024;
@@ -210,5 +199,5 @@
 	// size plus the terminating null (\0)
 	data = (char *) malloc(size + 1);
-	if(! data){
+	if (!data) {
 		fprintf(stderr, "Failed to allocate receive buffer.\n");
 		return ENOMEM;
@@ -220,23 +209,23 @@
 	// prepare the address buffer
 	bzero(address_data, max_length);
-	switch(family){
-		case PF_INET:
-			address_in->sin_family = AF_INET;
-			address_in->sin_port = htons(port);
-			addrlen = sizeof(struct sockaddr_in);
-			break;
-		case PF_INET6:
-			address_in6->sin6_family = AF_INET6;
-			address_in6->sin6_port = htons(port);
-			addrlen = sizeof(struct sockaddr_in6);
-			break;
-		default:
-			fprintf(stderr, "Protocol family is not supported\n");
-			return EAFNOSUPPORT;
+	switch (family) {
+	case PF_INET:
+		address_in->sin_family = AF_INET;
+		address_in->sin_port = htons(port);
+		addrlen = sizeof(struct sockaddr_in);
+		break;
+	case PF_INET6:
+		address_in6->sin6_family = AF_INET6;
+		address_in6->sin6_port = htons(port);
+		addrlen = sizeof(struct sockaddr_in6);
+		break;
+	default:
+		fprintf(stderr, "Protocol family is not supported\n");
+		return EAFNOSUPPORT;
 	}
 
 	// get a listening socket
 	listening_id = socket(family, type, 0);
-	if(listening_id < 0){
+	if (listening_id < 0) {
 		socket_print_error(stderr, listening_id, "Socket create: ", "\n");
 		return listening_id;
@@ -244,12 +233,12 @@
 
 	// if the stream socket is used
-	if(type == SOCK_STREAM){
+	if (type == SOCK_STREAM) {
 		// check the backlog
-		if(backlog <= 0){
+		if (backlog <= 0) {
 			fprintf(stderr, "Accepted sockets queue size too small (%d). Using 3 instead.\n", size);
 			backlog = 3;
 		}
 		// set the backlog
-		if(ERROR_OCCURRED(listen(listening_id, backlog))){
+		if (ERROR_OCCURRED(listen(listening_id, backlog))) {
 			socket_print_error(stderr, ERROR_CODE, "Socket listen: ", "\n");
 			return ERROR_CODE;
@@ -258,12 +247,11 @@
 
 	// bind the listenning socket
-	if(ERROR_OCCURRED(bind(listening_id, address, addrlen))){
+	if (ERROR_OCCURRED(bind(listening_id, address, addrlen))) {
 		socket_print_error(stderr, ERROR_CODE, "Socket bind: ", "\n");
 		return ERROR_CODE;
 	}
 
-	if(verbose){
+	if (verbose)
 		printf("Socket %d listenning at %d\n", listening_id, port);
-	}
 
 	socket_id = listening_id;
@@ -271,50 +259,49 @@
 	// do count times
 	// or indefinitely if set to a negative value
-	while(count){
+	while (count) {
 
 		addrlen = max_length;
-		if(type == SOCK_STREAM){
+		if (type == SOCK_STREAM) {
 			// acceept a socket if the stream socket is used
 			socket_id = accept(listening_id, address, &addrlen);
-			if(socket_id <= 0){
+			if (socket_id <= 0) {
 				socket_print_error(stderr, socket_id, "Socket accept: ", "\n");
-			}else{
-				if(verbose){
+			} else {
+				if (verbose)
 					printf("Socket %d accepted\n", socket_id);
-				}
 			}
 		}
 
 		// if the datagram socket is used or the stream socked was accepted
-		if(socket_id > 0){
+		if (socket_id > 0) {
 
 			// receive an echo request
 			value = recvfrom(socket_id, data, size, 0, address, &addrlen);
-			if(value < 0){
+			if (value < 0) {
 				socket_print_error(stderr, value, "Socket receive: ", "\n");
-			}else{
+			} else {
 				length = (size_t) value;
-				if(verbose){
+				if (verbose) {
 					// print the header
 
 					// get the source port and prepare the address buffer
 					address_start = NULL;
-					switch(address->sa_family){
-						case AF_INET:
-							port = ntohs(address_in->sin_port);
-							address_start = (uint8_t *) &address_in->sin_addr.s_addr;
-							break;
-						case AF_INET6:
-							port = ntohs(address_in6->sin6_port);
-							address_start = (uint8_t *) &address_in6->sin6_addr.s6_addr;
-							break;
-						default:
-							fprintf(stderr, "Address family %d (0x%X) is not supported.\n", address->sa_family);
+					switch (address->sa_family) {
+					case AF_INET:
+						port = ntohs(address_in->sin_port);
+						address_start = (uint8_t *) &address_in->sin_addr.s_addr;
+						break;
+					case AF_INET6:
+						port = ntohs(address_in6->sin6_port);
+						address_start = (uint8_t *) &address_in6->sin6_addr.s6_addr;
+						break;
+					default:
+						fprintf(stderr, "Address family %d (0x%X) is not supported.\n", address->sa_family);
 					}
 					// parse the source address
-					if(address_start){
-						if(ERROR_OCCURRED(inet_ntop(address->sa_family, address_start, address_string, sizeof(address_string)))){
+					if (address_start) {
+						if (ERROR_OCCURRED(inet_ntop(address->sa_family, address_start, address_string, sizeof(address_string)))) {
 							fprintf(stderr, "Received address error %d\n", ERROR_CODE);
-						}else{
+						} else {
 							data[length] = '\0';
 							printf("Socket %d received %d bytes from %s:%d\n%s\n", socket_id, length, address_string, port, data);
@@ -324,15 +311,12 @@
 
 				// answer the request either with the static reply or the original data
-				if(ERROR_OCCURRED(sendto(socket_id, reply ? reply : data, reply ? reply_length : length, 0, address, addrlen))){
+				if (ERROR_OCCURRED(sendto(socket_id, reply ? reply : data, reply ? reply_length : length, 0, address, addrlen)))
 					socket_print_error(stderr, ERROR_CODE, "Socket send: ", "\n");
-				}
-
 			}
 
 			// close the accepted stream socket
-			if(type == SOCK_STREAM){
-				if(ERROR_OCCURRED(closesocket(socket_id))){
+			if (type == SOCK_STREAM) {
+				if (ERROR_OCCURRED(closesocket(socket_id)))
 					socket_print_error(stderr, ERROR_CODE, "Close socket: ", "\n");
-				}
 			}
 
@@ -340,25 +324,22 @@
 
 		// decrease the count if positive
-		if(count > 0){
-			-- count;
-			if(verbose){
+		if (count > 0) {
+			count--;
+			if (verbose)
 				printf("Waiting for next %d packet(s)\n", count);
-			}
-		}
-	}
-
-	if(verbose){
+		}
+	}
+
+	if (verbose)
 		printf("Closing the socket\n");
-	}
 
 	// close the listenning socket
-	if(ERROR_OCCURRED(closesocket(listening_id))){
+	if (ERROR_OCCURRED(closesocket(listening_id))) {
 		socket_print_error(stderr, ERROR_CODE, "Close socket: ", "\n");
 		return ERROR_CODE;
 	}
 
-	if(verbose){
+	if (verbose)
 		printf("Exiting\n");
-	}
 
 	return EOK;
Index: uspace/app/netecho/print_error.c
===================================================================
--- uspace/app/netecho/print_error.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/netecho/print_error.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,10 +28,12 @@
 
 /** @addtogroup net_app
- *  @{
+ * @{
  */
 
 /** @file
- *  Generic application error printing functions implementation.
+ * Generic application error printing functions implementation.
  */
+
+#include "print_error.h"
 
 #include <stdio.h>
@@ -40,111 +42,137 @@
 #include <net/icmp_codes.h>
 
-#include "print_error.h"
+/** Prints the specific ICMP error description.
+ *
+ * @param[in] output The description output stream. May be NULL.
+ * @param[in] error_code The ICMP error code.
+ * @param[in] prefix The error description prefix. May be NULL.
+ * @param[in] suffix The error description suffix. May be NULL.
+ */
+void icmp_print_error(FILE *output, int error_code, const char *prefix, const char *suffix)
+{
+	if (!output)
+		return;
+	
+	if (prefix)
+		fprintf(output, "%s", prefix);
+		
+	switch (error_code) {
+	case ICMP_DEST_UNREACH:
+		fprintf(output, "ICMP Destination Unreachable (%d) error", error_code);
+		break;
+	case ICMP_SOURCE_QUENCH:
+		fprintf(output, "ICMP Source Quench (%d) error", error_code);
+		break;
+	case ICMP_REDIRECT:
+		fprintf(output, "ICMP Redirect (%d) error", error_code);
+		break;
+	case ICMP_ALTERNATE_ADDR:
+		fprintf(output, "ICMP Alternate Host Address (%d) error", error_code);
+		break;
+	case ICMP_ROUTER_ADV:
+		fprintf(output, "ICMP Router Advertisement (%d) error", error_code);
+		break;
+	case ICMP_ROUTER_SOL:
+		fprintf(output, "ICMP Router Solicitation (%d) error", error_code);
+		break;
+	case ICMP_TIME_EXCEEDED:
+		fprintf(output, "ICMP Time Exceeded (%d) error", error_code);
+		break;
+	case ICMP_PARAMETERPROB:
+		fprintf(output, "ICMP Paramenter Problem (%d) error", error_code);
+		break;
+	case ICMP_CONVERSION_ERROR:
+		fprintf(output, "ICMP Datagram Conversion Error (%d) error", error_code);
+		break;
+	case ICMP_REDIRECT_MOBILE:
+		fprintf(output, "ICMP Mobile Host Redirect (%d) error", error_code);
+		break;
+	case ICMP_SKIP:
+		fprintf(output, "ICMP SKIP (%d) error", error_code);
+		break;
+	case ICMP_PHOTURIS:
+		fprintf(output, "ICMP Photuris (%d) error", error_code);
+		break;
+	default:
+		fprintf(output, "Other (%d) error", error_code);
+	}
 
-void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix){
-	if(output){
-		if(prefix){
-			fprintf(output, "%s", prefix);
-		}
-		switch(error_code){
-			case ICMP_DEST_UNREACH:
-				fprintf(output, "ICMP Destination Unreachable (%d) error", error_code);
-				break;
-			case ICMP_SOURCE_QUENCH:
-				fprintf(output, "ICMP Source Quench (%d) error", error_code);
-				break;
-			case ICMP_REDIRECT:
-				fprintf(output, "ICMP Redirect (%d) error", error_code);
-				break;
-			case ICMP_ALTERNATE_ADDR:
-				fprintf(output, "ICMP Alternate Host Address (%d) error", error_code);
-				break;
-			case ICMP_ROUTER_ADV:
-				fprintf(output, "ICMP Router Advertisement (%d) error", error_code);
-				break;
-			case ICMP_ROUTER_SOL:
-				fprintf(output, "ICMP Router Solicitation (%d) error", error_code);
-				break;
-			case ICMP_TIME_EXCEEDED:
-				fprintf(output, "ICMP Time Exceeded (%d) error", error_code);
-				break;
-			case ICMP_PARAMETERPROB:
-				fprintf(output, "ICMP Paramenter Problem (%d) error", error_code);
-				break;
-			case ICMP_CONVERSION_ERROR:
-				fprintf(output, "ICMP Datagram Conversion Error (%d) error", error_code);
-				break;
-			case ICMP_REDIRECT_MOBILE:
-				fprintf(output, "ICMP Mobile Host Redirect (%d) error", error_code);
-				break;
-			case ICMP_SKIP:
-				fprintf(output, "ICMP SKIP (%d) error", error_code);
-				break;
-			case ICMP_PHOTURIS:
-				fprintf(output, "ICMP Photuris (%d) error", error_code);
-				break;
-			default:
-				fprintf(output, "Other (%d) error", error_code);
-		}
-		if(suffix){
-			fprintf(output, "%s", suffix);
-		}
-	}
+	if (suffix)
+		fprintf(output, "%s", suffix);
 }
 
-void print_error(FILE * output, int error_code, const char * prefix, const char * suffix){
-	if(IS_ICMP_ERROR(error_code)){
+/** Prints the error description.
+ *
+ * Supports ICMP and socket error codes.
+ *
+ * @param[in] output The description output stream. May be NULL.
+ * @param[in] error_code The error code.
+ * @param[in] prefix The error description prefix. May be NULL.
+ * @param[in] suffix The error description suffix. May be NULL.
+ */
+void print_error(FILE *output, int error_code, const char *prefix, const char *suffix)
+{
+	if (IS_ICMP_ERROR(error_code))
 		icmp_print_error(output, error_code, prefix, suffix);
-	}else if(IS_SOCKET_ERROR(error_code)){
+	else if(IS_SOCKET_ERROR(error_code))
 		socket_print_error(output, error_code, prefix, suffix);
-	}
 }
 
-void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix){
-	if(output){
-		if(prefix){
-			fprintf(output, "%s", prefix);
-		}
-		switch(error_code){
-			case ENOTSOCK:
-				fprintf(output, "Not a socket (%d) error", error_code);
-				break;
-			case EPROTONOSUPPORT:
-				fprintf(output, "Protocol not supported (%d) error", error_code);
-				break;
-			case ESOCKTNOSUPPORT:
-				fprintf(output, "Socket type not supported (%d) error", error_code);
-				break;
-			case EPFNOSUPPORT:
-				fprintf(output, "Protocol family not supported (%d) error", error_code);
-				break;
-			case EAFNOSUPPORT:
-				fprintf(output, "Address family not supported (%d) error", error_code);
-				break;
-			case EADDRINUSE:
-				fprintf(output, "Address already in use (%d) error", error_code);
-				break;
-			case ENOTCONN:
-				fprintf(output, "Socket not connected (%d) error", error_code);
-				break;
-			case NO_DATA:
-				fprintf(output, "No data (%d) error", error_code);
-				break;
-			case EINPROGRESS:
-				fprintf(output, "Another operation in progress (%d) error", error_code);
-				break;
-			case EDESTADDRREQ:
-				fprintf(output, "Destination address required (%d) error", error_code);
-			case TRY_AGAIN:
-				fprintf(output, "Try again (%d) error", error_code);
-			default:
-				fprintf(output, "Other (%d) error", error_code);
-		}
-		if(suffix){
-			fprintf(output, "%s", suffix);
-		}
+/** Prints the specific socket error description.
+ *
+ * @param[in] output The description output stream. May be NULL.
+ * @param[in] error_code The socket error code.
+ * @param[in] prefix The error description prefix. May be NULL.
+ * @param[in] suffix The error description suffix. May be NULL.
+ */
+void socket_print_error(FILE *output, int error_code, const char *prefix, const char *suffix)
+{
+	if (!output)
+		return;
+
+	if (prefix)
+		fprintf(output, "%s", prefix);
+
+	switch (error_code) {
+	case ENOTSOCK:
+		fprintf(output, "Not a socket (%d) error", error_code);
+		break;
+	case EPROTONOSUPPORT:
+		fprintf(output, "Protocol not supported (%d) error", error_code);
+		break;
+	case ESOCKTNOSUPPORT:
+		fprintf(output, "Socket type not supported (%d) error", error_code);
+		break;
+	case EPFNOSUPPORT:
+		fprintf(output, "Protocol family not supported (%d) error", error_code);
+		break;
+	case EAFNOSUPPORT:
+		fprintf(output, "Address family not supported (%d) error", error_code);
+		break;
+	case EADDRINUSE:
+		fprintf(output, "Address already in use (%d) error", error_code);
+		break;
+	case ENOTCONN:
+		fprintf(output, "Socket not connected (%d) error", error_code);
+		break;
+	case NO_DATA:
+		fprintf(output, "No data (%d) error", error_code);
+		break;
+	case EINPROGRESS:
+		fprintf(output, "Another operation in progress (%d) error", error_code);
+		break;
+	case EDESTADDRREQ:
+		fprintf(output, "Destination address required (%d) error", error_code);
+	case TRY_AGAIN:
+		fprintf(output, "Try again (%d) error", error_code);
+	default:
+		fprintf(output, "Other (%d) error", error_code);
 	}
+
+	if (suffix)
+		fprintf(output, "%s", suffix);
 }
 
 /** @}
  */
+
Index: uspace/app/netecho/print_error.h
===================================================================
--- uspace/app/netecho/print_error.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/netecho/print_error.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,50 +28,33 @@
 
 /** @addtogroup net_app
- *  @{
+ * @{
  */
 
 /** @file
- *  Generic application error printing functions.
+ * Generic application error printing functions.
  */
 
-#ifndef __NET_APP_PRINT__
-#define __NET_APP_PRINT__
+#ifndef NET_APP_PRINT_
+#define NET_APP_PRINT_
+
+#include <stdio.h>
 
 /** Returns whether the error code may be an ICMP error code.
- *  @param[in] error_code The error code.
- *  @returns A value indicating whether the error code may be an ICMP error code.
+ *
+ * @param[in] error_code The error code.
+ * @returns A value indicating whether the error code may be an ICMP error code.
  */
-#define IS_ICMP_ERROR(error_code)		((error_code) > 0)
+#define IS_ICMP_ERROR(error_code)	((error_code) > 0)
 
 /** Returns whether the error code may be socket error code.
- *  @param[in] error_code The error code.
- *  @returns A value indicating whether the error code may be a socket error code.
+ *
+ * @param[in] error_code The error code.
+ * @returns A value indicating whether the error code may be a socket error code.
  */
 #define IS_SOCKET_ERROR(error_code)	((error_code) < 0)
 
-/** Prints the specific ICMP error description.
- *  @param[in] output The description output stream. May be NULL.
- *  @param[in] error_code The ICMP error code.
- *  @param[in] prefix The error description prefix. May be NULL.
- *  @param[in] suffix The error description suffix. May be NULL.
- */
-extern void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
-
-/** Prints the error description.
- *  Supports ICMP and socket error codes.
- *  @param[in] output The description output stream. May be NULL.
- *  @param[in] error_code The error code.
- *  @param[in] prefix The error description prefix. May be NULL.
- *  @param[in] suffix The error description suffix. May be NULL.
- */
-extern void print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
-
-/** Prints the specific socket error description.
- *  @param[in] output The description output stream. May be NULL.
- *  @param[in] error_code The socket error code.
- *  @param[in] prefix The error description prefix. May be NULL.
- *  @param[in] suffix The error description suffix. May be NULL.
- */
-extern void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
+extern void icmp_print_error(FILE *, int, const char *, const char *);
+extern void print_error(FILE *, int, const char *, const char *);
+extern void socket_print_error(FILE *, int, const char *, const char *);
 
 #endif
Index: uspace/app/netstart/Makefile
===================================================================
--- uspace/app/netstart/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/app/netstart/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
+# 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.
+#
+
+USPACE_PREFIX = ../..
+LIBS = $(LIBNET_PREFIX)/libnet.a
+EXTRA_CFLAGS = -I$(LIBNET_PREFIX)/include
+
+BINARY = netstart
+
+SOURCES = \
+	netstart.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/netstart/netstart.c
===================================================================
--- uspace/app/netstart/netstart.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/app/netstart/netstart.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,95 @@
+/*
+ * 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 net
+ * @{
+ */
+
+/** @file
+ * Start the networking subsystem.
+ */
+
+#define NAME  "netstart"
+
+#include <async.h>
+#include <stdio.h>
+#include <task.h>
+#include <str_error.h>
+#include <err.h>
+#include <ipc/ipc.h>
+#include <ipc/services.h>
+#include <ipc/net_net.h>
+
+#include <net/modules.h>
+
+/** Start a module.
+ *
+ * @param[in] desc	The module description
+ * @param[in] path	The module absolute path.
+ * @returns		True on succesful spanwning.
+ * @returns		False on failure
+ */
+static bool spawn(const char *desc, const char *path)
+{
+	printf("%s: Spawning %s (%s)\n", NAME, desc, path);
+	
+	const char *argv[2];
+	
+	argv[0] = path;
+	argv[1] = NULL;
+	
+	int err;
+	if (task_spawn(path, argv, &err) == 0) {
+		fprintf(stderr, "%s: Error spawning %s (%s)\n", NAME, path,
+		    str_error(err));
+		return false;
+	}
+	
+	return true;
+}
+
+int main(int argc, char *argv[])
+{
+	ERROR_DECLARE;
+	
+	if (!spawn("networking service", "/srv/net"))
+		return EINVAL;
+	
+	printf("%s: Initializing networking\n", NAME);
+	
+	int net_phone = connect_to_service(SERVICE_NETWORKING);
+	if (ERROR_OCCURRED(ipc_call_sync_0_0(net_phone, NET_NET_STARTUP))) {
+		fprintf(stderr, "%s: Startup error %d\n", NAME, ERROR_CODE);
+		return ERROR_CODE;
+	}
+	
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/app/nettest1/nettest.c
===================================================================
--- uspace/app/nettest1/nettest.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/nettest1/nettest.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,9 +28,9 @@
 
 /** @addtogroup nettest
- *  @{
+ * @{
  */
 
 /** @file
- *  Networking test support functions implementation.
+ * Networking test support functions implementation.
  */
 
@@ -43,69 +43,118 @@
 #include "print_error.h"
 
-int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type){
-	int index;
-
-	if(verbose){
+
+/** Creates new sockets.
+ *
+ * @param[in] verbose A value indicating whether to print out verbose information.
+ * @param[out] socket_ids A field to store the socket identifiers.
+ * @param[in] sockets The number of sockets to create. Should be at most the size of the field.
+ * @param[in] family The socket address family.
+ * @param[in] type The socket type.
+ * @returns EOK on success.
+ * @returns Other error codes as defined for the socket() function.
+ */
+int sockets_create(int verbose, int *socket_ids, int sockets, int family, sock_type_t type)
+{
+	int index;
+
+	if (verbose)
 		printf("Create\t");
-	}
-	fflush(stdout);
-	for(index = 0; index < sockets; ++ index){
+		
+	fflush(stdout);
+	
+	for (index = 0; index < sockets; index++) {
 		socket_ids[index] = socket(family, type, 0);
-		if(socket_ids[index] < 0){
+		if (socket_ids[index] < 0) {
 			printf("Socket %d (%d) error:\n", index, socket_ids[index]);
 			socket_print_error(stderr, socket_ids[index], "Socket create: ", "\n");
 			return socket_ids[index];
 		}
-		if(verbose){
-			print_mark(index);
-		}
-	}
-	return EOK;
-}
-
-int sockets_close(int verbose, int * socket_ids, int sockets){
-	ERROR_DECLARE;
-
-	int index;
-
-	if(verbose){
+		if (verbose)
+			print_mark(index);
+	}
+	
+	return EOK;
+}
+
+/** Closes sockets.
+ *
+ * @param[in] verbose A value indicating whether to print out verbose information.
+ * @param[in] socket_ids A field of stored socket identifiers.
+ * @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
+ * @returns EOK on success.
+ * @returns Other error codes as defined for the closesocket() function.
+ */
+int sockets_close(int verbose, int *socket_ids, int sockets)
+{
+	ERROR_DECLARE;
+
+	int index;
+
+	if (verbose)
 		printf("\tClose\t");
-	}
-	fflush(stdout);
-	for(index = 0; index < sockets; ++ index){
-		if(ERROR_OCCURRED(closesocket(socket_ids[index]))){
+
+	fflush(stdout);
+	
+	for (index = 0; index < sockets; index++) {
+		if (ERROR_OCCURRED(closesocket(socket_ids[index]))) {
 			printf("Socket %d (%d) error:\n", index, socket_ids[index]);
 			socket_print_error(stderr, ERROR_CODE, "Socket close: ", "\n");
 			return ERROR_CODE;
 		}
-		if(verbose){
-			print_mark(index);
-		}
-	}
-	return EOK;
-}
-
-int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen){
-	ERROR_DECLARE;
-
-	int index;
-
-	if(verbose){
+		if (verbose)
+			print_mark(index);
+	}
+	
+	return EOK;
+}
+
+/** Connects sockets.
+ *
+ * @param[in] verbose A value indicating whether to print out verbose information.
+ * @param[in] socket_ids A field of stored socket identifiers.
+ * @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
+ * @param[in] address The destination host address to connect to.
+ * @param[in] addrlen The length of the destination address in bytes.
+ * @returns EOK on success.
+ * @returns Other error codes as defined for the connect() function.
+ */
+int sockets_connect(int verbose, int *socket_ids, int sockets, struct sockaddr *address, socklen_t addrlen)
+{
+	ERROR_DECLARE;
+
+	int index;
+
+	if (verbose)
 		printf("\tConnect\t");
-	}
-	fflush(stdout);
-	for(index = 0; index < sockets; ++ index){
-		if(ERROR_OCCURRED(connect(socket_ids[index], address, addrlen))){
+	
+	fflush(stdout);
+	
+	for (index = 0; index < sockets; index++) {
+		if (ERROR_OCCURRED(connect(socket_ids[index], address, addrlen))) {
 			socket_print_error(stderr, ERROR_CODE, "Socket connect: ", "\n");
 			return ERROR_CODE;
 		}
-		if(verbose){
-			print_mark(index);
-		}
-	}
-	return EOK;
-}
-
-int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages){
+		if (verbose)
+			print_mark(index);
+	}
+	
+	return EOK;
+}
+
+/** Sends data via sockets.
+ *
+ * @param[in] verbose A value indicating whether to print out verbose information.
+ * @param[in] socket_ids A field of stored socket identifiers.
+ * @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
+ * @param[in] address The destination host address to send data to.
+ * @param[in] addrlen The length of the destination address in bytes.
+ * @param[in] data The data to be sent.
+ * @param[in] size The data size in bytes.
+ * @param[in] messages The number of datagrams per socket to be sent.
+ * @returns EOK on success.
+ * @returns Other error codes as defined for the sendto() function.
+ */
+int sockets_sendto(int verbose, int *socket_ids, int sockets, struct sockaddr *address, socklen_t addrlen, char *data, int size, int messages)
+{
 	ERROR_DECLARE;
 
@@ -113,11 +162,12 @@
 	int message;
 
-	if(verbose){
+	if (verbose)
 		printf("\tSendto\t");
-	}
-	fflush(stdout);
-	for(index = 0; index < sockets; ++ index){
-		for(message = 0; message < messages; ++ message){
-			if(ERROR_OCCURRED(sendto(socket_ids[index], data, size, 0, address, addrlen))){
+
+	fflush(stdout);
+	
+	for (index = 0; index < sockets; index++) {
+		for (message = 0; message < messages; message++) {
+			if (ERROR_OCCURRED(sendto(socket_ids[index], data, size, 0, address, addrlen))) {
 				printf("Socket %d (%d), message %d error:\n", index, socket_ids[index], message);
 				socket_print_error(stderr, ERROR_CODE, "Socket send: ", "\n");
@@ -125,24 +175,39 @@
 			}
 		}
-		if(verbose){
-			print_mark(index);
-		}
-	}
-	return EOK;
-}
-
-int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages){
+		if (verbose)
+			print_mark(index);
+	}
+	
+	return EOK;
+}
+
+/** Receives data via sockets.
+ *
+ * @param[in] verbose A value indicating whether to print out verbose information.
+ * @param[in] socket_ids A field of stored socket identifiers.
+ * @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
+ * @param[in] address The source host address of received datagrams.
+ * @param[in,out] addrlen The maximum length of the source address in bytes. The actual size of the source address is set instead.
+ * @param[out] data The received data.
+ * @param[in] size The maximum data size in bytes.
+ * @param[in] messages The number of datagrams per socket to be received.
+ * @returns EOK on success.
+ * @returns Other error codes as defined for the recvfrom() function.
+ */
+int sockets_recvfrom(int verbose, int *socket_ids, int sockets, struct sockaddr *address, socklen_t *addrlen, char *data, int size, int messages)
+{
 	int value;
 	int index;
 	int message;
 
-	if(verbose){
+	if (verbose)
 		printf("\tRecvfrom\t");
-	}
-	fflush(stdout);
-	for(index = 0; index < sockets; ++ index){
-		for(message = 0; message < messages; ++ message){
+	
+	fflush(stdout);
+	
+	for (index = 0; index < sockets; index++) {
+		for (message = 0; message < messages; message++) {
 			value = recvfrom(socket_ids[index], data, size, 0, address, addrlen);
-			if(value < 0){
+			if (value < 0) {
 				printf("Socket %d (%d), message %d error:\n", index, socket_ids[index], message);
 				socket_print_error(stderr, value, "Socket receive: ", "\n");
@@ -150,12 +215,28 @@
 			}
 		}
-		if(verbose){
-			print_mark(index);
-		}
-	}
-	return EOK;
-}
-
-int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages){
+		if (verbose)
+			print_mark(index);
+	}
+	return EOK;
+}
+
+/** Sends and receives data via sockets.
+ *
+ * Each datagram is sent and a reply read consequently.
+ * The next datagram is sent after the reply is received.
+ *
+ * @param[in] verbose A value indicating whether to print out verbose information.
+ * @param[in] socket_ids A field of stored socket identifiers.
+ * @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
+ * @param[in,out] address The destination host address to send data to. The source host address of received datagrams is set instead.
+ * @param[in] addrlen The length of the destination address in bytes.
+ * @param[in,out] data The data to be sent. The received data are set instead.
+ * @param[in] size The data size in bytes.
+ * @param[in] messages The number of datagrams per socket to be received.
+ * @returns EOK on success.
+ * @returns Other error codes as defined for the recvfrom() function.
+ */
+int sockets_sendto_recvfrom(int verbose, int *socket_ids, int sockets, struct sockaddr *address, socklen_t *addrlen, char *data, int size, int messages)
+{
 	ERROR_DECLARE;
 
@@ -164,11 +245,12 @@
 	int message;
 
-	if(verbose){
+	if (verbose)
 		printf("\tSendto and recvfrom\t");
-	}
-	fflush(stdout);
-	for(index = 0; index < sockets; ++ index){
-		for(message = 0; message < messages; ++ message){
-			if(ERROR_OCCURRED(sendto(socket_ids[index], data, size, 0, address, * addrlen))){
+
+	fflush(stdout);
+	
+	for (index = 0; index < sockets; index++) {
+		for (message = 0; message < messages; message++) {
+			if (ERROR_OCCURRED(sendto(socket_ids[index], data, size, 0, address, *addrlen))) {
 				printf("Socket %d (%d), message %d error:\n", index, socket_ids[index], message);
 				socket_print_error(stderr, ERROR_CODE, "Socket send: ", "\n");
@@ -176,5 +258,5 @@
 			}
 			value = recvfrom(socket_ids[index], data, size, 0, address, addrlen);
-			if(value < 0){
+			if (value < 0) {
 				printf("Socket %d (%d), message %d error:\n", index, socket_ids[index], message);
 				socket_print_error(stderr, value, "Socket receive: ", "\n");
@@ -182,17 +264,23 @@
 			}
 		}
-		if(verbose){
-			print_mark(index);
-		}
-	}
-	return EOK;
-}
-
-void print_mark(int index){
-	if((index + 1) % 10){
+		if (verbose)
+			print_mark(index);
+	}
+	
+	return EOK;
+}
+
+/** Prints a mark.
+ *
+ * If the index is a multiple of ten, a different mark is printed.
+ *
+ * @param[in] index The index of the mark to be printed.
+ */
+void print_mark(int index)
+{
+	if ((index + 1) % 10)
 		printf("*");
-	}else{
+	else
 		printf("|");
-	}
 	fflush(stdout);
 }
Index: uspace/app/nettest1/nettest.h
===================================================================
--- uspace/app/nettest1/nettest.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/nettest1/nettest.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,96 +28,23 @@
 
 /** @addtogroup nettest
- *  @{
+ * @{
  */
 
 /** @file
- *  Networking test support functions.
+ * Networking test support functions.
  */
 
-#ifndef __NET_TEST__
-#define __NET_TEST__
+#ifndef NET_TEST_
+#define NET_TEST_
 
 #include <net/socket.h>
 
-/** Prints a mark.
- *  If the index is a multiple of ten, a different mark is printed.
- *  @param[in] index The index of the mark to be printed.
- */
-extern void print_mark(int index);
-
-/** Creates new sockets.
- *  @param[in] verbose A value indicating whether to print out verbose information.
- *  @param[out] socket_ids A field to store the socket identifiers.
- *  @param[in] sockets The number of sockets to create. Should be at most the size of the field.
- *  @param[in] family The socket address family.
- *  @param[in] type The socket type.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the socket() function.
- */
-extern int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type);
-
-/** Closes sockets.
- *  @param[in] verbose A value indicating whether to print out verbose information.
- *  @param[in] socket_ids A field of stored socket identifiers.
- *  @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the closesocket() function.
- */
-extern int sockets_close(int verbose, int * socket_ids, int sockets);
-
-/** Connects sockets.
- *  @param[in] verbose A value indicating whether to print out verbose information.
- *  @param[in] socket_ids A field of stored socket identifiers.
- *  @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
- *  @param[in] address The destination host address to connect to.
- *  @param[in] addrlen The length of the destination address in bytes.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the connect() function.
- */
-extern int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen);
-
-/** Sends data via sockets.
- *  @param[in] verbose A value indicating whether to print out verbose information.
- *  @param[in] socket_ids A field of stored socket identifiers.
- *  @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
- *  @param[in] address The destination host address to send data to.
- *  @param[in] addrlen The length of the destination address in bytes.
- *  @param[in] data The data to be sent.
- *  @param[in] size The data size in bytes.
- *  @param[in] messages The number of datagrams per socket to be sent.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the sendto() function.
- */
-extern int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages);
-
-/** Receives data via sockets.
- *  @param[in] verbose A value indicating whether to print out verbose information.
- *  @param[in] socket_ids A field of stored socket identifiers.
- *  @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
- *  @param[in] address The source host address of received datagrams.
- *  @param[in,out] addrlen The maximum length of the source address in bytes. The actual size of the source address is set instead.
- *  @param[out] data The received data.
- *  @param[in] size The maximum data size in bytes.
- *  @param[in] messages The number of datagrams per socket to be received.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the recvfrom() function.
- */
-extern int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);
-
-/** Sends and receives data via sockets.
- *  Each datagram is sent and a reply read consequently.
- *  The next datagram is sent after the reply is received.
- *  @param[in] verbose A value indicating whether to print out verbose information.
- *  @param[in] socket_ids A field of stored socket identifiers.
- *  @param[in] sockets The number of sockets in the field. Should be at most the size of the field.
- *  @param[in,out] address The destination host address to send data to. The source host address of received datagrams is set instead.
- *  @param[in] addrlen The length of the destination address in bytes.
- *  @param[in,out] data The data to be sent. The received data are set instead.
- *  @param[in] size The data size in bytes.
- *  @param[in] messages The number of datagrams per socket to be received.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the recvfrom() function.
- */
-extern int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);
+extern void print_mark(int);
+extern int sockets_create(int, int *, int, int, sock_type_t);
+extern int sockets_close(int, int *, int);
+extern int sockets_connect(int, int *, int, struct sockaddr *, socklen_t);
+extern int sockets_sendto(int, int *, int, struct sockaddr *, socklen_t, char *, int, int);
+extern int sockets_recvfrom(int, int *, int, struct sockaddr *, socklen_t *, char *, int, int);
+extern int sockets_sendto_recvfrom(int, int *, int, struct sockaddr *, socklen_t *, char *, int, int);
 
 #endif
@@ -125,2 +52,3 @@
 /** @}
  */
+
Index: uspace/app/nettest1/nettest1.c
===================================================================
--- uspace/app/nettest1/nettest1.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/nettest1/nettest1.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,10 +28,13 @@
 
 /** @addtogroup nettest
- *  @{
+ * @{
  */
 
 /** @file
- *  Networking test 1 application - sockets.
- */
+ * Networking test 1 application - sockets.
+ */
+
+#include "nettest.h"
+#include "print_error.h"
 
 #include <malloc.h>
@@ -49,330 +52,12 @@
 #include <net/socket_parse.h>
 
-#include "nettest.h"
-#include "print_error.h"
-
-/** Echo module name.
- */
+/** Echo module name. */
 #define NAME	"Nettest1"
 
-/** Packet data pattern.
- */
+/** Packet data pattern. */
 #define NETTEST1_TEXT	"Networking test 1 - sockets"
 
-/** Module entry point.
- *  Starts testing.
- *  @param[in] argc The number of command line parameters.
- *  @param[in] argv The command line parameters.
- *  @returns EOK on success.
- */
-int main(int argc, char * argv[]);
-
-/** Prints the application help.
- */
-void nettest1_print_help(void);
-
-/** Refreshes the data.
- *  Fills the data block with the NETTEST1_TEXT pattern.
- *  @param[out] data The data block.
- *  @param[in] size The data block size in bytes.
- */
-void nettest1_refresh_data(char * data, size_t size);
-
-int main(int argc, char * argv[]){
-	ERROR_DECLARE;
-
-	size_t size			= 27;
-	int verbose			= 0;
-	sock_type_t type	= SOCK_DGRAM;
-	int sockets			= 10;
-	int messages		= 10;
-	int family			= PF_INET;
-	uint16_t port		= 7;
-
-	socklen_t max_length				= sizeof(struct sockaddr_in6);
-	uint8_t address_data[max_length];
-	struct sockaddr * address			= (struct sockaddr *) address_data;
-	struct sockaddr_in * address_in		= (struct sockaddr_in *) address;
-	struct sockaddr_in6 * address_in6	= (struct sockaddr_in6 *) address;
-	socklen_t addrlen;
-//	char address_string[INET6_ADDRSTRLEN];
-	uint8_t * address_start;
-
-	int * socket_ids;
-	char * data;
-	int value;
-	int index;
-	struct timeval time_before;
-	struct timeval time_after;
-
-	// parse the command line arguments
-	// stop before the last argument if it does not start with the minus sign ('-')
-	for(index = 1; (index < argc - 1) || ((index == argc - 1) && (argv[index][0] == '-')); ++ index){
-		// options should start with the minus sign ('-')
-		if(argv[index][0] == '-'){
-			switch(argv[index][1]){
-				// short options with only one letter
-				case 'f':
-					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 0, socket_parse_protocol_family));
-					break;
-				case 'h':
-					nettest1_print_help();
-					return EOK;
-					break;
-				case 'm':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 0));
-					break;
-				case 'n':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 0));
-					break;
-				case 'p':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
-					port = (uint16_t) value;
-					break;
-				case 's':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
-					size = (value >= 0) ? (size_t) value : 0;
-					break;
-				case 't':
-					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 0, socket_parse_socket_type));
-					type = (sock_type_t) value;
-					break;
-				case 'v':
-					verbose = 1;
-					break;
-				// long options with the double minus sign ('-')
-				case '-':
-					if(str_lcmp(argv[index] + 2, "family=", 7) == 0){
-						ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 9, socket_parse_protocol_family));
-					}else if(str_lcmp(argv[index] + 2, "help", 5) == 0){
-						nettest1_print_help();
-						return EOK;
-					}else if(str_lcmp(argv[index] + 2, "messages=", 6) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 8));
-					}else if(str_lcmp(argv[index] + 2, "sockets=", 6) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 8));
-					}else if(str_lcmp(argv[index] + 2, "port=", 5) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
-						port = (uint16_t) value;
-					}else if(str_lcmp(argv[index] + 2, "type=", 5) == 0){
-						ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 7, socket_parse_socket_type));
-						type = (sock_type_t) value;
-					}else if(str_lcmp(argv[index] + 2, "verbose", 8) == 0){
-						verbose = 1;
-					}else{
-						nettest1_print_help();
-						return EINVAL;
-					}
-					break;
-				default:
-					nettest1_print_help();
-					return EINVAL;
-			}
-		}else{
-			nettest1_print_help();
-			return EINVAL;
-		}
-	}
-
-	// if not before the last argument containing the address
-	if(index >= argc){
-		printf("Command line error: missing address\n");
-		nettest1_print_help();
-		return EINVAL;
-	}
-
-	// prepare the address buffer
-	bzero(address_data, max_length);
-	switch(family){
-		case PF_INET:
-			address_in->sin_family = AF_INET;
-			address_in->sin_port = htons(port);
-			address_start = (uint8_t *) &address_in->sin_addr.s_addr;
-			addrlen = sizeof(struct sockaddr_in);
-			break;
-		case PF_INET6:
-			address_in6->sin6_family = AF_INET6;
-			address_in6->sin6_port = htons(port);
-			address_start = (uint8_t *) &address_in6->sin6_addr.s6_addr;
-			addrlen = sizeof(struct sockaddr_in6);
-			break;
-		default:
-			fprintf(stderr, "Address family is not supported\n");
-			return EAFNOSUPPORT;
-	}
-
-	// parse the last argument which should contain the address
-	if(ERROR_OCCURRED(inet_pton(family, argv[argc - 1], address_start))){
-		fprintf(stderr, "Address parse error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	// check the buffer size
-	if(size <= 0){
-		fprintf(stderr, "Data buffer size too small (%d). Using 1024 bytes instead.\n", size);
-		size = 1024;
-	}
-
-	// prepare the buffer
-	// size plus the terminating null (\0)
-	data = (char *) malloc(size + 1);
-	if(! data){
-		fprintf(stderr, "Failed to allocate data buffer.\n");
-		return ENOMEM;
-	}
-	nettest1_refresh_data(data, size);
-
-	// check the socket count
-	if(sockets <= 0){
-		fprintf(stderr, "Socket count too small (%d). Using 2 instead.\n", sockets);
-		sockets = 2;
-	}
-
-	// prepare the socket buffer
-	// count plus the terminating null (\0)
-	socket_ids = (int *) malloc(sizeof(int) * (sockets + 1));
-	if(! socket_ids){
-		fprintf(stderr, "Failed to allocate receive buffer.\n");
-		return ENOMEM;
-	}
-	socket_ids[sockets] = NULL;
-
-	if(verbose){
-		printf("Starting tests\n");
-	}
-
-	if(verbose){
-		printf("1 socket, 1 message\n");
-	}
-
-	if(ERROR_OCCURRED(gettimeofday(&time_before, NULL))){
-		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, 1));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, 1, address, addrlen, data, size, 1));
-	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, 1));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	if(verbose){
-		printf("1 socket, %d messages\n", messages);
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, messages));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, 1, address, addrlen, data, size, messages));
-	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, messages));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	if(verbose){
-		printf("%d sockets, 1 message\n", sockets);
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, 1));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, sockets, address, addrlen, data, size, 1));
-	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, 1));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	if(verbose){
-		printf("%d sockets, %d messages\n", sockets, messages);
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
-	}
-	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, sockets, address, addrlen, data, size, messages));
-	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
-
-	if(ERROR_OCCURRED(gettimeofday(&time_after, NULL))){
-		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	printf("Tested in %d microseconds\n", tv_sub(&time_after, &time_before));
-
-	if(verbose){
-		printf("Exiting\n");
-	}
-
-	return EOK;
-}
-
-void nettest1_print_help(void){
+static void nettest1_print_help(void)
+{
 	printf(
 		"Network Networking test 1 aplication - sockets\n" \
@@ -402,10 +87,18 @@
 }
 
-void nettest1_refresh_data(char * data, size_t size){
+/** Refreshes the data.
+ *
+ * Fills the data block with the NETTEST1_TEXT pattern.
+ *
+ * @param[out] data The data block.
+ * @param[in] size The data block size in bytes.
+ */
+static void nettest1_refresh_data(char *data, size_t size)
+{
 	size_t length;
 
 	// fill the data
 	length = 0;
-	while(size > length + sizeof(NETTEST1_TEXT) - 1){
+	while (size > length + sizeof(NETTEST1_TEXT) - 1) {
 		memcpy(data + length, NETTEST1_TEXT, sizeof(NETTEST1_TEXT) - 1);
 		length += sizeof(NETTEST1_TEXT) - 1;
@@ -415,4 +108,277 @@
 }
 
+
+int main(int argc, char *argv[])
+{
+	ERROR_DECLARE;
+
+	size_t size = 27;
+	int verbose = 0;
+	sock_type_t type = SOCK_DGRAM;
+	int sockets = 10;
+	int messages = 10;
+	int family = PF_INET;
+	uint16_t port = 7;
+
+	socklen_t max_length = sizeof(struct sockaddr_in6);
+	uint8_t address_data[max_length];
+	struct sockaddr *address = (struct sockaddr *) address_data;
+	struct sockaddr_in *address_in = (struct sockaddr_in *) address;
+	struct sockaddr_in6 *address_in6 = (struct sockaddr_in6 *) address;
+	socklen_t addrlen;
+	uint8_t *address_start;
+
+	int *socket_ids;
+	char *data;
+	int value;
+	int index;
+	struct timeval time_before;
+	struct timeval time_after;
+
+	// parse the command line arguments
+	// stop before the last argument if it does not start with the minus sign ('-')
+	for (index = 1; (index < argc - 1) || ((index == argc - 1) && (argv[index][0] == '-')); index++) {
+		// options should start with the minus sign ('-')
+		if (argv[index][0] == '-') {
+			switch (argv[index][1]) {
+			// short options with only one letter
+			case 'f':
+				ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 0, socket_parse_protocol_family));
+				break;
+			case 'h':
+				nettest1_print_help();
+				return EOK;
+				break;
+			case 'm':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 0));
+				break;
+			case 'n':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 0));
+				break;
+			case 'p':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				port = (uint16_t) value;
+				break;
+			case 's':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				size = (value >= 0) ? (size_t) value : 0;
+				break;
+			case 't':
+				ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 0, socket_parse_socket_type));
+				type = (sock_type_t) value;
+				break;
+			case 'v':
+				verbose = 1;
+				break;
+			// long options with the double minus sign ('-')
+			case '-':
+				if (str_lcmp(argv[index] + 2, "family=", 7) == 0) {
+					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 9, socket_parse_protocol_family));
+				} else if (str_lcmp(argv[index] + 2, "help", 5) == 0) {
+					nettest1_print_help();
+					return EOK;
+				} else if (str_lcmp(argv[index] + 2, "messages=", 6) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 8));
+				} else if (str_lcmp(argv[index] + 2, "sockets=", 6) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 8));
+				} else if (str_lcmp(argv[index] + 2, "port=", 5) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
+					port = (uint16_t) value;
+				} else if (str_lcmp(argv[index] + 2, "type=", 5) == 0) {
+					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 7, socket_parse_socket_type));
+					type = (sock_type_t) value;
+				} else if (str_lcmp(argv[index] + 2, "verbose", 8) == 0) {
+					verbose = 1;
+				} else {
+					nettest1_print_help();
+					return EINVAL;
+				}
+				break;
+			default:
+				nettest1_print_help();
+				return EINVAL;
+			}
+		} else {
+			nettest1_print_help();
+			return EINVAL;
+		}
+	}
+
+	// if not before the last argument containing the address
+	if (index >= argc) {
+		printf("Command line error: missing address\n");
+		nettest1_print_help();
+		return EINVAL;
+	}
+
+	// prepare the address buffer
+	bzero(address_data, max_length);
+	switch (family) {
+	case PF_INET:
+		address_in->sin_family = AF_INET;
+		address_in->sin_port = htons(port);
+		address_start = (uint8_t *) &address_in->sin_addr.s_addr;
+		addrlen = sizeof(struct sockaddr_in);
+		break;
+	case PF_INET6:
+		address_in6->sin6_family = AF_INET6;
+		address_in6->sin6_port = htons(port);
+		address_start = (uint8_t *) &address_in6->sin6_addr.s6_addr;
+		addrlen = sizeof(struct sockaddr_in6);
+		break;
+	default:
+		fprintf(stderr, "Address family is not supported\n");
+		return EAFNOSUPPORT;
+	}
+
+	// parse the last argument which should contain the address
+	if (ERROR_OCCURRED(inet_pton(family, argv[argc - 1], address_start))) {
+		fprintf(stderr, "Address parse error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	// check the buffer size
+	if (size <= 0) {
+		fprintf(stderr, "Data buffer size too small (%d). Using 1024 bytes instead.\n", size);
+		size = 1024;
+	}
+
+	// prepare the buffer
+	// size plus the terminating null (\0)
+	data = (char *) malloc(size + 1);
+	if (!data) {
+		fprintf(stderr, "Failed to allocate data buffer.\n");
+		return ENOMEM;
+	}
+	nettest1_refresh_data(data, size);
+
+	// check the socket count
+	if (sockets <= 0) {
+		fprintf(stderr, "Socket count too small (%d). Using 2 instead.\n", sockets);
+		sockets = 2;
+	}
+
+	// prepare the socket buffer
+	// count plus the terminating null (\0)
+	socket_ids = (int *) malloc(sizeof(int) * (sockets + 1));
+	if (!socket_ids) {
+		fprintf(stderr, "Failed to allocate receive buffer.\n");
+		return ENOMEM;
+	}
+	socket_ids[sockets] = NULL;
+
+	if (verbose)
+		printf("Starting tests\n");
+
+	if (verbose)
+		printf("1 socket, 1 message\n");
+
+	if (ERROR_OCCURRED(gettimeofday(&time_before, NULL))) {
+		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
+	if (verbose)
+		printf("\tOK\n");
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, 1));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
+	if (verbose)
+		printf("\tOK\n");
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, 1, address, addrlen, data, size, 1));
+	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, 1));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
+	if (verbose)
+		printf("\tOK\n");
+
+	if (verbose)
+		printf("1 socket, %d messages\n", messages);
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, messages));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
+	if (verbose)
+		printf("\tOK\n");
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, 1, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, 1, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, 1, address, addrlen, data, size, messages));
+	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, 1, address, &addrlen, data, size, messages));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, 1));
+	if (verbose)
+		printf("\tOK\n");
+
+	if (verbose)
+		printf("%d sockets, 1 message\n", sockets);
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
+	if (verbose)
+		printf("\tOK\n");
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, 1));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
+	if (verbose)
+		printf("\tOK\n");
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, sockets, address, addrlen, data, size, 1));
+	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, 1));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
+	if (verbose)
+		printf("\tOK\n");
+
+	if (verbose)
+		printf("%d sockets, %d messages\n", sockets, messages);
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
+	if (verbose)
+		printf("\tOK\n");
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
+	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, sockets, address, addrlen, data, size, messages));
+	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
+
+	if (ERROR_OCCURRED(gettimeofday(&time_after, NULL))) {
+		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	if (verbose)
+		printf("\tOK\n");
+
+	printf("Tested in %d microseconds\n", tv_sub(&time_after, &time_before));
+
+	if (verbose)
+		printf("Exiting\n");
+
+	return EOK;
+}
+
+
 /** @}
  */
Index: uspace/app/nettest2/nettest2.c
===================================================================
--- uspace/app/nettest2/nettest2.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/nettest2/nettest2.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,10 +28,13 @@
 
 /** @addtogroup nettest
- *  @{
+ * @{
  */
 
 /** @file
- *  Networking test 2 application - transfer.
- */
+ * Networking test 2 application - transfer.
+ */
+
+#include "nettest.h"
+#include "print_error.h"
 
 #include <malloc.h>
@@ -49,254 +52,12 @@
 #include <net/socket_parse.h>
 
-#include "nettest.h"
-#include "print_error.h"
-
-/** Echo module name.
- */
+/** Echo module name. */
 #define NAME	"Nettest2"
 
-/** Packet data pattern.
- */
+/** Packet data pattern. */
 #define NETTEST2_TEXT	"Networking test 2 - transfer"
 
-/** Module entry point.
- *  Starts testing.
- *  @param[in] argc The number of command line parameters.
- *  @param[in] argv The command line parameters.
- *  @returns EOK on success.
- */
-int main(int argc, char * argv[]);
-
-/** Prints the application help.
- */
-void nettest2_print_help(void);
-
-/** Refreshes the data.
- *  Fills the data block with the NETTEST1_TEXT pattern.
- *  @param[out] data The data block.
- *  @param[in] size The data block size in bytes.
- */
-void nettest2_refresh_data(char * data, size_t size);
-
-int main(int argc, char * argv[]){
-	ERROR_DECLARE;
-
-	size_t size			= 28;
-	int verbose			= 0;
-	sock_type_t type	= SOCK_DGRAM;
-	int sockets			= 10;
-	int messages		= 10;
-	int family			= PF_INET;
-	uint16_t port		= 7;
-
-	socklen_t max_length				= sizeof(struct sockaddr_in6);
-	uint8_t address_data[max_length];
-	struct sockaddr * address			= (struct sockaddr *) address_data;
-	struct sockaddr_in * address_in		= (struct sockaddr_in *) address;
-	struct sockaddr_in6 * address_in6	= (struct sockaddr_in6 *) address;
-	socklen_t addrlen;
-//	char address_string[INET6_ADDRSTRLEN];
-	uint8_t * address_start;
-
-	int * socket_ids;
-	char * data;
-	int value;
-	int index;
-	struct timeval time_before;
-	struct timeval time_after;
-
-	// parse the command line arguments
-	// stop before the last argument if it does not start with the minus sign ('-')
-	for(index = 1; (index < argc - 1) || ((index == argc - 1) && (argv[index][0] == '-')); ++ index){
-		// options should start with the minus sign ('-')
-		if(argv[index][0] == '-'){
-			switch(argv[index][1]){
-				// short options with only one letter
-				case 'f':
-					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 0, socket_parse_protocol_family));
-					break;
-				case 'h':
-					nettest2_print_help();
-					return EOK;
-					break;
-				case 'm':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 0));
-					break;
-				case 'n':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 0));
-					break;
-				case 'p':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
-					port = (uint16_t) value;
-					break;
-				case 's':
-					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
-					size = (value >= 0) ? (size_t) value : 0;
-					break;
-				case 't':
-					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 0, socket_parse_socket_type));
-					type = (sock_type_t) value;
-					break;
-				case 'v':
-					verbose = 1;
-					break;
-				// long options with the double minus sign ('-')
-				case '-':
-					if(str_lcmp(argv[index] + 2, "family=", 7) == 0){
-						ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 9, socket_parse_protocol_family));
-					}else if(str_lcmp(argv[index] + 2, "help", 5) == 0){
-						nettest2_print_help();
-						return EOK;
-					}else if(str_lcmp(argv[index] + 2, "messages=", 6) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 8));
-					}else if(str_lcmp(argv[index] + 2, "sockets=", 6) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 8));
-					}else if(str_lcmp(argv[index] + 2, "port=", 5) == 0){
-						ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
-						port = (uint16_t) value;
-					}else if(str_lcmp(argv[index] + 2, "type=", 5) == 0){
-						ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 7, socket_parse_socket_type));
-						type = (sock_type_t) value;
-					}else if(str_lcmp(argv[index] + 2, "verbose", 8) == 0){
-						verbose = 1;
-					}else{
-						nettest2_print_help();
-						return EINVAL;
-					}
-					break;
-				default:
-					nettest2_print_help();
-					return EINVAL;
-			}
-		}else{
-			nettest2_print_help();
-			return EINVAL;
-		}
-	}
-
-	// if not before the last argument containing the address
-	if(index >= argc){
-		printf("Command line error: missing address\n");
-		nettest2_print_help();
-		return EINVAL;
-	}
-
-	// prepare the address buffer
-	bzero(address_data, max_length);
-	switch(family){
-		case PF_INET:
-			address_in->sin_family = AF_INET;
-			address_in->sin_port = htons(port);
-			address_start = (uint8_t *) &address_in->sin_addr.s_addr;
-			addrlen = sizeof(struct sockaddr_in);
-			break;
-		case PF_INET6:
-			address_in6->sin6_family = AF_INET6;
-			address_in6->sin6_port = htons(port);
-			address_start = (uint8_t *) &address_in6->sin6_addr.s6_addr;
-			addrlen = sizeof(struct sockaddr_in6);
-			break;
-		default:
-			fprintf(stderr, "Address family is not supported\n");
-			return EAFNOSUPPORT;
-	}
-
-	// parse the last argument which should contain the address
-	if(ERROR_OCCURRED(inet_pton(family, argv[argc - 1], address_start))){
-		fprintf(stderr, "Address parse error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	// check the buffer size
-	if(size <= 0){
-		fprintf(stderr, "Data buffer size too small (%d). Using 1024 bytes instead.\n", size);
-		size = 1024;
-	}
-
-	// prepare the buffer
-	// size plus terminating null (\0)
-	data = (char *) malloc(size + 1);
-	if(! data){
-		fprintf(stderr, "Failed to allocate data buffer.\n");
-		return ENOMEM;
-	}
-	nettest2_refresh_data(data, size);
-
-	// check the socket count
-	if(sockets <= 0){
-		fprintf(stderr, "Socket count too small (%d). Using 2 instead.\n", sockets);
-		sockets = 2;
-	}
-
-	// prepare the socket buffer
-	// count plus the terminating null (\0)
-	socket_ids = (int *) malloc(sizeof(int) * (sockets + 1));
-	if(! socket_ids){
-		fprintf(stderr, "Failed to allocate receive buffer.\n");
-		return ENOMEM;
-	}
-	socket_ids[sockets] = NULL;
-
-	if(verbose){
-		printf("Starting tests\n");
-	}
-
-	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
-
-	if(type == SOCK_STREAM){
-		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
-	}
-
-	if(verbose){
-		printf("\n");
-	}
-
-	if(ERROR_OCCURRED(gettimeofday(&time_before, NULL))){
-		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
-
-	if(ERROR_OCCURRED(gettimeofday(&time_after, NULL))){
-		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	printf("sendto + recvfrom tested in %d microseconds\n", tv_sub(&time_after, &time_before));
-
-	if(ERROR_OCCURRED(gettimeofday(&time_before, NULL))){
-		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, sockets, address, addrlen, data, size, messages));
-	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
-
-	if(ERROR_OCCURRED(gettimeofday(&time_after, NULL))){
-		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
-		return ERROR_CODE;
-	}
-
-	if(verbose){
-		printf("\tOK\n");
-	}
-
-	printf("sendto, recvfrom tested in %d microseconds\n", tv_sub(&time_after, &time_before));
-
-	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
-
-	if(verbose){
-		printf("\nExiting\n");
-	}
-
-	return EOK;
-}
-
-void nettest2_print_help(void){
+static void nettest2_print_help(void)
+{
 	printf(
 		"Network Networking test 2 aplication - UDP transfer\n" \
@@ -326,10 +87,18 @@
 }
 
-void nettest2_refresh_data(char * data, size_t size){
+/** Refreshes the data.
+ *
+ * Fills the data block with the NETTEST1_TEXT pattern.
+ *
+ * @param[out] data The data block.
+ * @param[in] size The data block size in bytes.
+ */
+static void nettest2_refresh_data(char *data, size_t size)
+{
 	size_t length;
 
 	// fill the data
 	length = 0;
-	while(size > length + sizeof(NETTEST2_TEXT) - 1){
+	while (size > length + sizeof(NETTEST2_TEXT) - 1) {
 		memcpy(data + length, NETTEST2_TEXT, sizeof(NETTEST2_TEXT) - 1);
 		length += sizeof(NETTEST2_TEXT) - 1;
@@ -339,4 +108,218 @@
 }
 
+
+int main(int argc, char *argv[])
+{
+	ERROR_DECLARE;
+
+	size_t size = 28;
+	int verbose = 0;
+	sock_type_t type = SOCK_DGRAM;
+	int sockets = 10;
+	int messages = 10;
+	int family = PF_INET;
+	uint16_t port = 7;
+
+	socklen_t max_length = sizeof(struct sockaddr_in6);
+	uint8_t address_data[max_length];
+	struct sockaddr *address = (struct sockaddr *) address_data;
+	struct sockaddr_in *address_in = (struct sockaddr_in *) address;
+	struct sockaddr_in6 *address_in6 = (struct sockaddr_in6 *) address;
+	socklen_t addrlen;
+	uint8_t *address_start;
+
+	int *socket_ids;
+	char *data;
+	int value;
+	int index;
+	struct timeval time_before;
+	struct timeval time_after;
+
+	// parse the command line arguments
+	// stop before the last argument if it does not start with the minus sign ('-')
+	for (index = 1; (index < argc - 1) || ((index == argc - 1) && (argv[index][0] == '-')); ++ index) {
+		// options should start with the minus sign ('-')
+		if (argv[index][0] == '-') {
+			switch(argv[index][1]){
+			// short options with only one letter
+			case 'f':
+				ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 0, socket_parse_protocol_family));
+				break;
+			case 'h':
+				nettest2_print_help();
+				return EOK;
+				break;
+			case 'm':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 0));
+				break;
+			case 'n':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 0));
+				break;
+			case 'p':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				port = (uint16_t) value;
+				break;
+			case 's':
+				ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 0));
+				size = (value >= 0) ? (size_t) value : 0;
+				break;
+			case 't':
+				ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 0, socket_parse_socket_type));
+				type = (sock_type_t) value;
+				break;
+			case 'v':
+				verbose = 1;
+				break;
+			// long options with the double minus sign ('-')
+			case '-':
+				if (str_lcmp(argv[index] + 2, "family=", 7) == 0) {
+					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &family, 9, socket_parse_protocol_family));
+				} else if (str_lcmp(argv[index] + 2, "help", 5) == 0) {
+					nettest2_print_help();
+					return EOK;
+				} else if (str_lcmp(argv[index] + 2, "messages=", 6) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &messages, 8));
+				} else if (str_lcmp(argv[index] + 2, "sockets=", 6) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &sockets, 8));
+				} else if (str_lcmp(argv[index] + 2, "port=", 5) == 0) {
+					ERROR_PROPAGATE(arg_parse_int(argc, argv, &index, &value, 7));
+					port = (uint16_t) value;
+				} else if (str_lcmp(argv[index] + 2, "type=", 5) == 0) {
+					ERROR_PROPAGATE(arg_parse_name_int(argc, argv, &index, &value, 7, socket_parse_socket_type));
+					type = (sock_type_t) value;
+				} else if (str_lcmp(argv[index] + 2, "verbose", 8) == 0) {
+					verbose = 1;
+				} else {
+					nettest2_print_help();
+					return EINVAL;
+				}
+				break;
+			default:
+				nettest2_print_help();
+				return EINVAL;
+			}
+		} else {
+			nettest2_print_help();
+			return EINVAL;
+		}
+	}
+
+	// if not before the last argument containing the address
+	if (index >= argc) {
+		printf("Command line error: missing address\n");
+		nettest2_print_help();
+		return EINVAL;
+	}
+
+	// prepare the address buffer
+	bzero(address_data, max_length);
+	switch (family) {
+	case PF_INET:
+		address_in->sin_family = AF_INET;
+		address_in->sin_port = htons(port);
+		address_start = (uint8_t *) &address_in->sin_addr.s_addr;
+		addrlen = sizeof(struct sockaddr_in);
+		break;
+	case PF_INET6:
+		address_in6->sin6_family = AF_INET6;
+		address_in6->sin6_port = htons(port);
+		address_start = (uint8_t *) &address_in6->sin6_addr.s6_addr;
+		addrlen = sizeof(struct sockaddr_in6);
+		break;
+	default:
+		fprintf(stderr, "Address family is not supported\n");
+		return EAFNOSUPPORT;
+	}
+
+	// parse the last argument which should contain the address
+	if (ERROR_OCCURRED(inet_pton(family, argv[argc - 1], address_start))) {
+		fprintf(stderr, "Address parse error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	// check the buffer size
+	if (size <= 0) {
+		fprintf(stderr, "Data buffer size too small (%d). Using 1024 bytes instead.\n", size);
+		size = 1024;
+	}
+
+	// prepare the buffer
+	// size plus terminating null (\0)
+	data = (char *) malloc(size + 1);
+	if (!data) {
+		fprintf(stderr, "Failed to allocate data buffer.\n");
+		return ENOMEM;
+	}
+	nettest2_refresh_data(data, size);
+
+	// check the socket count
+	if (sockets <= 0) {
+		fprintf(stderr, "Socket count too small (%d). Using 2 instead.\n", sockets);
+		sockets = 2;
+	}
+
+	// prepare the socket buffer
+	// count plus the terminating null (\0)
+	socket_ids = (int *) malloc(sizeof(int) * (sockets + 1));
+	if (!socket_ids) {
+		fprintf(stderr, "Failed to allocate receive buffer.\n");
+		return ENOMEM;
+	}
+	socket_ids[sockets] = NULL;
+
+	if (verbose)
+		printf("Starting tests\n");
+
+	ERROR_PROPAGATE(sockets_create(verbose, socket_ids, sockets, family, type));
+
+	if (type == SOCK_STREAM)
+		ERROR_PROPAGATE(sockets_connect(verbose, socket_ids, sockets, address, addrlen));
+
+	if (verbose)
+		printf("\n");
+
+	if (ERROR_OCCURRED(gettimeofday(&time_before, NULL))) {
+		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	ERROR_PROPAGATE(sockets_sendto_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
+
+	if (ERROR_OCCURRED(gettimeofday(&time_after, NULL))) {
+		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	if (verbose)
+		printf("\tOK\n");
+
+	printf("sendto + recvfrom tested in %d microseconds\n", tv_sub(&time_after, &time_before));
+
+	if (ERROR_OCCURRED(gettimeofday(&time_before, NULL))) {
+		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	ERROR_PROPAGATE(sockets_sendto(verbose, socket_ids, sockets, address, addrlen, data, size, messages));
+	ERROR_PROPAGATE(sockets_recvfrom(verbose, socket_ids, sockets, address, &addrlen, data, size, messages));
+
+	if (ERROR_OCCURRED(gettimeofday(&time_after, NULL))) {
+		fprintf(stderr, "Get time of day error %d\n", ERROR_CODE);
+		return ERROR_CODE;
+	}
+
+	if (verbose)
+		printf("\tOK\n");
+
+	printf("sendto, recvfrom tested in %d microseconds\n", tv_sub(&time_after, &time_before));
+
+	ERROR_PROPAGATE(sockets_close(verbose, socket_ids, sockets));
+
+	if (verbose)
+		printf("\nExiting\n");
+
+	return EOK;
+}
+
 /** @}
  */
Index: uspace/app/test_serial/Makefile
===================================================================
--- uspace/app/test_serial/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/app/test_serial/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
+# 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.
+#
+
+USPACE_PREFIX = ../..
+BINARY = test_serial
+
+SOURCES = \
+	test_serial.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/test_serial/test_serial.c
===================================================================
--- uspace/app/test_serial/test_serial.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/app/test_serial/test_serial.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2009 Lenka Trochtova
+ * 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 test_serial
+ * @brief	test the serial port driver - read from the serial port
+ * @{
+ */
+/**
+ * @file
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ipc/ipc.h>
+#include <sys/types.h>
+#include <async.h>
+#include <ipc/services.h>
+#include <ipc/devman.h>
+#include <devman.h>
+#include <device/char.h>
+#include <str.h>
+#include <ipc/serial_ctl.h>
+
+#define NAME 		"test serial"
+
+
+static void print_usage(void)
+{
+	printf("Usage: \n test_serial count \n where count is the number of "
+	    "characters to be read\n");
+}
+
+int main(int argc, char *argv[])
+{
+	if (argc != 2) {
+		printf(NAME ": incorrect number of arguments.\n");
+		print_usage();
+		return 0;
+	}
+	
+	long int cnt = strtol(argv[1], NULL, 10);
+	
+	int res;
+	res = devman_get_phone(DEVMAN_CLIENT, IPC_FLAG_BLOCKING);
+	device_handle_t handle;
+	
+	res = devman_device_get_handle("/hw/pci0/00:01.0/com1", &handle,
+	    IPC_FLAG_BLOCKING);
+	if (EOK != res) {
+		printf(NAME ": could not get the device handle, errno = %d.\n",
+		    -res);
+		return 1;
+	}
+	
+	printf(NAME ": trying to read %d characters from device with handle "
+	    "%d.\n", cnt, handle);
+	
+	int phone = devman_device_connect(handle, IPC_FLAG_BLOCKING);
+	if (0 > phone) {
+		printf(NAME ": could not connect to the device, errno = %d.\n",
+		    -res);
+		devman_hangup_phone(DEVMAN_CLIENT);
+		return 2;
+	}
+	
+	char *buf = (char *) malloc(cnt + 1);
+	if (NULL == buf) {
+		printf(NAME ": failed to allocate the input buffer\n");
+		ipc_hangup(phone);
+		devman_hangup_phone(DEVMAN_CLIENT);
+		return 3;
+	}
+	
+	ipcarg_t old_baud, old_par, old_stop, old_word_size;
+	
+	res = ipc_call_sync_0_4(phone, SERIAL_GET_COM_PROPS, &old_baud,
+	    &old_par, &old_word_size, &old_stop);
+	if (EOK != res) {
+		printf(NAME ": failed to get old communication parameters, "
+		    "errno = %d.\n", -res);
+		devman_hangup_phone(DEVMAN_CLIENT);
+		ipc_hangup(phone);
+		free(buf);
+		return 4;
+	}
+	
+	res = ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, 1200,
+	    SERIAL_NO_PARITY, 8, 1);
+	if (EOK != res) {
+		printf(NAME ": failed to set communication parameters, errno = "
+		    "%d.\n", -res);
+		devman_hangup_phone(DEVMAN_CLIENT);
+		ipc_hangup(phone);
+		free(buf);
+		return 4;
+	}
+	
+	int total = 0;
+	int read = 0;
+	while (total < cnt) {
+		read = read_dev(phone, buf, cnt - total);
+		if (0 > read) {
+			printf(NAME ": failed read from device, errno = %d.\n",
+			    -read);
+			ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud,
+			    old_par, old_word_size, old_stop);
+			ipc_hangup(phone);
+			devman_hangup_phone(DEVMAN_CLIENT);
+			free(buf);
+			return 5;
+		}
+		total += read;
+		if (read > 0) {
+			buf[read] = 0;
+			printf(buf);
+			/*
+			 * Write data back to the device to test the opposite
+			 * direction of data transfer.
+			 */
+			write_dev(phone, buf, read);
+		} else {
+			usleep(100000);
+		}	
+	}
+	
+	const char *the_end = "\n---------\nTHE END\n---------\n";
+	write_dev(phone, (void *)the_end, str_size(the_end));
+	
+	/* restore original communication settings */
+	ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, old_par,
+	    old_word_size, old_stop);
+	devman_hangup_phone(DEVMAN_CLIENT);
+	ipc_hangup(phone);
+	free(buf);
+	
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/app/trace/syscalls.c
===================================================================
--- uspace/app/trace/syscalls.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/app/trace/syscalls.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -73,4 +73,5 @@
     [SYS_PHYSMEM_MAP] = { "physmem_map",		4,	V_ERRNO },
     [SYS_IOSPACE_ENABLE] = { "iospace_enable",		1,	V_ERRNO },
+    [SYS_INTERRUPT_ENABLE] = { "interrupt_enable",	2,	V_ERRNO },
 
     [SYS_SYSINFO_GET_TAG] = { "sysinfo_get_tag",		2,	V_INTEGER },
Index: uspace/drv/isa/Makefile
===================================================================
--- uspace/drv/isa/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/isa/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2010 Lenka Trochtova
+# 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.
+#
+
+USPACE_PREFIX = ../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include
+BINARY = isa
+
+SOURCES = \
+	isa.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/isa/isa.c
===================================================================
--- uspace/drv/isa/isa.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/isa/isa.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,516 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup isa ISA bus driver.
+ * @brief HelenOS ISA bus driver.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <str.h>
+#include <ctype.h>
+#include <macros.h>
+#include <malloc.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include <driver.h>
+#include <resource.h>
+
+#include <devman.h>
+#include <ipc/devman.h>
+#include <device/hw_res.h>
+
+#define NAME "isa"
+#define CHILD_DEV_CONF_PATH "/drv/isa/isa.dev"
+
+#define ISA_MAX_HW_RES 4
+
+typedef struct isa_child_data {
+	hw_resource_list_t hw_resources;
+} isa_child_data_t;
+
+static hw_resource_list_t *isa_get_child_resources(device_t *dev)
+{
+	isa_child_data_t *dev_data;
+
+	dev_data = (isa_child_data_t *)dev->driver_data;
+	if (dev_data == NULL)
+		return NULL;
+
+	return &dev_data->hw_resources;
+}
+
+static bool isa_enable_child_interrupt(device_t *dev)
+{
+	// TODO
+
+	return false;
+}
+
+static resource_iface_t isa_child_res_iface = {
+	&isa_get_child_resources,
+	&isa_enable_child_interrupt
+};
+
+static device_ops_t isa_child_dev_ops;
+
+static int isa_add_device(device_t *dev);
+
+/** The isa device driver's standard operations */
+static driver_ops_t isa_ops = {
+	.add_device = &isa_add_device
+};
+
+/** The isa device driver structure. */
+static driver_t isa_driver = {
+	.name = NAME,
+	.driver_ops = &isa_ops
+};
+
+
+static isa_child_data_t *create_isa_child_data() 
+{
+	isa_child_data_t *data;
+
+	data = (isa_child_data_t *) malloc(sizeof(isa_child_data_t));
+	if (data != NULL)
+		memset(data, 0, sizeof(isa_child_data_t));
+
+	return data;
+}
+
+static device_t *create_isa_child_dev()
+{
+	device_t *dev = create_device();
+	if (dev == NULL)
+		return NULL;
+
+	isa_child_data_t *data = create_isa_child_data();
+	if (data == NULL) {
+		delete_device(dev);
+		return NULL;
+	}
+
+	dev->driver_data = data;
+	return dev;
+}
+
+static char *read_dev_conf(const char *conf_path)
+{
+	bool suc = false;
+	char *buf = NULL;
+	bool opened = false;
+	int fd;
+	size_t len = 0;
+
+	fd = open(conf_path, O_RDONLY);
+	if (fd < 0) {
+		printf(NAME ": unable to open %s\n", conf_path);
+		goto cleanup;
+	}
+
+	opened = true;
+
+	len = lseek(fd, 0, SEEK_END);
+	lseek(fd, 0, SEEK_SET);	
+	if (len == 0) {
+		printf(NAME ": read_dev_conf error: configuration file '%s' "
+		    "is empty.\n", conf_path);
+		goto cleanup;
+	}
+
+	buf = malloc(len + 1);
+	if (buf == NULL) {
+		printf(NAME ": read_dev_conf error: memory allocation failed.\n");
+		goto cleanup;
+	}
+
+	if (0 >= read(fd, buf, len)) {
+		printf(NAME ": read_dev_conf error: unable to read file '%s'.\n",
+		    conf_path);
+		goto cleanup;
+	}
+
+	buf[len] = 0;
+
+	suc = true;
+
+cleanup:
+	if (!suc && buf != NULL) {
+		free(buf);
+		buf = NULL;
+	}
+
+	if (opened)
+		close(fd);
+
+	return buf;
+}
+
+static char *str_get_line(char *str, char **next)
+{
+	char *line = str;
+
+	if (str == NULL) {
+		*next = NULL;
+		return NULL;
+	}
+
+	while (*str != '\0' && *str != '\n') {
+		str++;
+	}
+
+	if (*str != '\0') {
+		*next = str + 1;
+	} else {
+		*next = NULL;
+	}
+
+	*str = '\0';
+	return line;
+}
+
+static bool line_empty(const char *line)
+{
+	while (line != NULL && *line != 0) {
+		if (!isspace(*line))
+			return false;
+		line++;
+	}
+
+	return true;
+}
+
+static char *get_device_name(char *line)
+{
+	/* Skip leading spaces. */
+	while (*line != '\0' && isspace(*line)) {
+		line++;
+	}
+
+	/* Get the name part of the rest of the line. */
+	strtok(line, ":");
+
+	/* Allocate output buffer. */
+	size_t size = str_size(line) + 1;
+	char *name = malloc(size);
+
+	if (name != NULL) {
+		/* Copy the result to the output buffer. */
+		str_cpy(name, size, line);
+	}
+
+	return name;
+}
+
+static inline char *skip_spaces(char *line)
+{
+	/* Skip leading spaces. */
+	while (*line != '\0' && isspace(*line))
+		line++;
+
+	return line;
+}
+
+static void isa_child_set_irq(device_t *dev, int irq)
+{
+	isa_child_data_t *data = (isa_child_data_t *)dev->driver_data;
+
+	size_t count = data->hw_resources.count;
+	hw_resource_t *resources = data->hw_resources.resources;
+
+	if (count < ISA_MAX_HW_RES) {
+		resources[count].type = INTERRUPT;
+		resources[count].res.interrupt.irq = irq;
+
+		data->hw_resources.count++;
+
+		printf(NAME ": added irq 0x%x to device %s\n", irq, dev->name);
+	}
+}
+
+static void isa_child_set_io_range(device_t *dev, size_t addr, size_t len)
+{
+	isa_child_data_t *data = (isa_child_data_t *)dev->driver_data;
+
+	size_t count = data->hw_resources.count;
+	hw_resource_t *resources = data->hw_resources.resources;
+
+	if (count < ISA_MAX_HW_RES) {
+		resources[count].type = IO_RANGE;
+		resources[count].res.io_range.address = addr;
+		resources[count].res.io_range.size = len;
+		resources[count].res.io_range.endianness = LITTLE_ENDIAN;
+
+		data->hw_resources.count++;
+
+		printf(NAME ": added io range (addr=0x%x, size=0x%x) to "
+		    "device %s\n", addr, len, dev->name);
+	}
+}
+
+static void get_dev_irq(device_t *dev, char *val)
+{
+	int irq = 0;
+	char *end = NULL;
+
+	val = skip_spaces(val);	
+	irq = (int)strtol(val, &end, 0x10);
+
+	if (val != end)
+		isa_child_set_irq(dev, irq);
+}
+
+static void get_dev_io_range(device_t *dev, char *val)
+{
+	size_t addr, len;
+	char *end = NULL;
+
+	val = skip_spaces(val);	
+	addr = strtol(val, &end, 0x10);
+
+	if (val == end)
+		return;
+
+	val = skip_spaces(end);	
+	len = strtol(val, &end, 0x10);
+
+	if (val == end)
+		return;
+
+	isa_child_set_io_range(dev, addr, len);
+}
+
+static void get_match_id(char **id, char *val)
+{
+	char *end = val;
+
+	while (!isspace(*end))
+		end++;
+
+	size_t size = end - val + 1;
+	*id = (char *)malloc(size);
+	str_cpy(*id, size, val);
+}
+
+static void get_dev_match_id(device_t *dev, char *val)
+{
+	char *id = NULL;
+	int score = 0;
+	char *end = NULL;
+
+	val = skip_spaces(val);	
+
+	score = (int)strtol(val, &end, 10);
+	if (val == end) {
+		printf(NAME " : error - could not read match score for "
+		    "device %s.\n", dev->name);
+		return;
+	}
+
+	match_id_t *match_id = create_match_id();
+	if (match_id == NULL) {
+		printf(NAME " : failed to allocate match id for device %s.\n",
+		    dev->name);
+		return;
+	}
+
+	val = skip_spaces(end);	
+	get_match_id(&id, val);
+	if (id == NULL) {
+		printf(NAME " : error - could not read match id for "
+		    "device %s.\n", dev->name);
+		delete_match_id(match_id);
+		return;
+	}
+
+	match_id->id = id;
+	match_id->score = score;
+
+	printf(NAME ": adding match id '%s' with score %d to device %s\n", id,
+	    score, dev->name);
+	add_match_id(&dev->match_ids, match_id);
+}
+
+static bool read_dev_prop(device_t *dev, char *line, const char *prop,
+    void (*read_fn)(device_t *, char *))
+{
+	size_t proplen = str_size(prop);
+
+	if (str_lcmp(line, prop, proplen) == 0) {
+		line += proplen;
+		line = skip_spaces(line);
+		(*read_fn)(dev, line);
+
+		return true;
+	}
+
+	return false;
+}
+
+static void get_dev_prop(device_t *dev, char *line)
+{
+	/* Skip leading spaces. */
+	line = skip_spaces(line);
+
+	if (!read_dev_prop(dev, line, "io_range", &get_dev_io_range) &&
+	    !read_dev_prop(dev, line, "irq", &get_dev_irq) &&
+	    !read_dev_prop(dev, line, "match", &get_dev_match_id))
+	{
+	    printf(NAME " error undefined device property at line '%s'\n",
+		line);
+	}
+}
+
+static void child_alloc_hw_res(device_t *dev)
+{
+	isa_child_data_t *data = (isa_child_data_t *)dev->driver_data;
+	data->hw_resources.resources = 
+	    (hw_resource_t *)malloc(sizeof(hw_resource_t) * ISA_MAX_HW_RES);
+}
+
+static char *read_isa_dev_info(char *dev_conf, device_t *parent)
+{
+	char *line;
+	char *dev_name = NULL;
+
+	/* Skip empty lines. */
+	while (true) {
+		line = str_get_line(dev_conf, &dev_conf);
+
+		if (line == NULL) {
+			/* no more lines */
+			return NULL;
+		}
+
+		if (!line_empty(line))
+			break;
+	}
+
+	/* Get device name. */
+	dev_name = get_device_name(line);
+	if (dev_name == NULL)
+		return NULL;
+
+	device_t *dev = create_isa_child_dev();
+	if (dev == NULL) {
+		free(dev_name);
+		return NULL;
+	}
+
+	dev->name = dev_name;
+
+	/* Allocate buffer for the list of hardware resources of the device. */
+	child_alloc_hw_res(dev);
+
+	/* Get properties of the device (match ids, irq and io range). */
+	while (true) {
+		line = str_get_line(dev_conf, &dev_conf);
+
+		if (line_empty(line)) {
+			/* no more device properties */
+			break;
+		}
+
+		/*
+		 * Get the device's property from the configuration line
+		 * and store it in the device structure.
+		 */
+		get_dev_prop(dev, line);
+
+		//printf(NAME ": next line ='%s'\n", dev_conf);
+		//printf(NAME ": current line ='%s'\n", line);
+	}
+
+	/* Set device operations to the device. */
+	dev->ops = &isa_child_dev_ops;
+
+	printf(NAME ": child_device_register(dev, parent); device is %s.\n",
+	    dev->name);
+	child_device_register(dev, parent);
+
+	return dev_conf;
+}
+
+static void parse_dev_conf(char *conf, device_t *parent)
+{
+	while (conf != NULL && *conf != '\0') {
+		conf = read_isa_dev_info(conf, parent);
+	}
+}
+
+static void add_legacy_children(device_t *parent)
+{
+	char *dev_conf;
+
+	dev_conf = read_dev_conf(CHILD_DEV_CONF_PATH);
+	if (dev_conf != NULL) {
+		parse_dev_conf(dev_conf, parent);
+		free(dev_conf);
+	}
+}
+
+static int isa_add_device(device_t *dev)
+{
+	printf(NAME ": isa_add_device, device handle = %d\n", dev->handle);
+
+	/* Add child devices. */
+	add_legacy_children(dev);
+	printf(NAME ": finished the enumeration of legacy devices\n",
+	    dev->handle);
+
+	return EOK;
+}
+
+static void isa_init() 
+{
+	isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_res_iface;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS ISA bus driver\n");
+	isa_init();
+	return driver_main(&isa_driver);
+}
+
+/**
+ * @}
+ */
+ 
Index: uspace/drv/isa/isa.dev
===================================================================
--- uspace/drv/isa/isa.dev	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/isa/isa.dev	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,15 @@
+com1:
+	match 100 isa/ns8250
+	irq 4
+	io_range 3f8 8
+
+com2:
+	match 100 isa/ns8250
+	irq 3
+	io_range 2f8 8
+
+keyboard:
+	match 100 isa/keyboard
+	irq 1
+	io_range 060 10
+	
Index: uspace/drv/isa/isa.ma
===================================================================
--- uspace/drv/isa/isa.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/isa/isa.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,1 @@
+9 	pci/ven=8086&dev=7000
Index: uspace/drv/ns8250/Makefile
===================================================================
--- uspace/drv/ns8250/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/ns8250/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2010 Lenka Trochtova
+# 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.
+#
+
+USPACE_PREFIX = ../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include
+BINARY = ns8250
+
+SOURCES = \
+	ns8250.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/ns8250/cyclic_buffer.h
===================================================================
--- uspace/drv/ns8250/cyclic_buffer.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/ns8250/cyclic_buffer.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 ns8250
+ * @{
+ */
+/** @file
+ */
+
+#ifndef CYCLIC_BUFFER_H_
+#define CYCLIC_BUFFER_H_
+
+#define BUF_LEN 256
+
+typedef struct cyclic_buffer {
+	uint8_t buf[BUF_LEN];
+	int start;
+	int cnt;
+}  cyclic_buffer_t;
+
+/*
+ * @returns		False if the buffer is full.
+ */
+static inline bool buf_push_back(cyclic_buffer_t *buf, uint8_t item)
+{
+	if (buf->cnt >= BUF_LEN)
+		return false;
+	int pos = (buf->start + buf->cnt) % BUF_LEN;
+	buf->buf[pos] = item;
+	buf->cnt++;
+	return true;
+}
+
+static inline bool buf_is_empty(cyclic_buffer_t *buf)
+{
+	return buf->cnt == 0;
+}
+
+static inline uint8_t buf_pop_front(cyclic_buffer_t *buf)
+{
+	assert(!buf_is_empty(buf));
+	
+	uint8_t res = buf->buf[buf->start];
+	buf->start = (buf->start + 1) % BUF_LEN;
+	buf->cnt--;
+	return res;
+}
+
+static inline void buf_clear(cyclic_buffer_t *buf)
+{
+	buf->cnt = 0;
+}
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/drv/ns8250/ns8250.c
===================================================================
--- uspace/drv/ns8250/ns8250.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/ns8250/ns8250.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,939 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup ns8250 Serial port driver.
+ * @brief HelenOS serial port driver.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <str.h>
+#include <ctype.h>
+#include <macros.h>
+#include <malloc.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <ddi.h>
+#include <libarch/ddi.h>
+
+#include <driver.h>
+#include <char.h>
+#include <resource.h>
+
+#include <devman.h>
+#include <ipc/devman.h>
+#include <device/hw_res.h>
+#include <ipc/serial_ctl.h>
+
+#include "cyclic_buffer.h"
+
+#define NAME "ns8250"
+
+#define REG_COUNT 7
+#define MAX_BAUD_RATE 115200
+#define DLAB_MASK (1 << 7)
+
+/** The number of bits of one data unit send by the serial port. */
+typedef enum {
+	WORD_LENGTH_5,
+	WORD_LENGTH_6,
+	WORD_LENGTH_7,
+	WORD_LENGTH_8
+} word_length_t;
+
+/** The number of stop bits used by the serial port. */
+typedef enum {
+	/** Use one stop bit. */
+	ONE_STOP_BIT,
+	/** 1.5 stop bits for word length 5, 2 stop bits otherwise. */
+	TWO_STOP_BITS
+} stop_bit_t;
+
+/** The driver data for the serial port devices. */
+typedef struct ns8250_dev_data {
+	/** Is there any client conntected to the device? */
+	bool client_connected;
+	/** The irq assigned to this device. */
+	int irq;
+	/** The base i/o address of the devices registers. */
+	uint32_t io_addr;
+	/** The i/o port used to access the serial ports registers. */
+	ioport8_t *port;
+	/** The buffer for incomming data. */
+	cyclic_buffer_t input_buffer;
+	/** The fibril mutex for synchronizing the access to the device. */
+	fibril_mutex_t mutex;
+} ns8250_dev_data_t;
+
+/** Create driver data for a device.
+ *
+ * @return		The driver data.
+ */
+static ns8250_dev_data_t *create_ns8250_dev_data(void)
+{
+	ns8250_dev_data_t *data;
+	
+	data = (ns8250_dev_data_t *) malloc(sizeof(ns8250_dev_data_t));
+	if (NULL != data) {
+		memset(data, 0, sizeof(ns8250_dev_data_t));
+		fibril_mutex_initialize(&data->mutex);
+	}
+	return data;
+}
+
+/** Delete driver data.
+ *
+ * @param data		The driver data structure.
+ */
+static void delete_ns8250_dev_data(ns8250_dev_data_t *data)
+{
+	if (data != NULL)
+		free(data);
+}
+
+/** Find out if there is some incomming data available on the serial port.
+ *
+ * @param port		The base address of the serial port device's ports.
+ * @return		True if there are data waiting to be read, false
+ *			otherwise.
+ */
+static bool ns8250_received(ioport8_t *port)
+{
+	return (pio_read_8(port + 5) & 1) != 0;
+}
+
+/** Read one byte from the serial port.
+ *
+ * @param port		The base address of the serial port device's ports.
+ * @return		The data read.
+ */
+static uint8_t ns8250_read_8(ioport8_t *port)
+{
+	return pio_read_8(port);
+}
+
+/** Find out wheter it is possible to send data.
+ *
+ * @param port		The base address of the serial port device's ports.
+ */
+static bool is_transmit_empty(ioport8_t *port)
+{
+	return (pio_read_8(port + 5) & 0x20) != 0;
+}
+
+/** Write one character on the serial port.
+ *
+ * @param port		The base address of the serial port device's ports.
+ * @param c		The character to be written to the serial port device.
+ */
+static void ns8250_write_8(ioport8_t *port, uint8_t c)
+{
+	while (!is_transmit_empty(port))
+		;
+	
+	pio_write_8(port, c);
+}
+
+/** Read data from the serial port device.
+ *
+ * @param dev		The serial port device.
+ * @param buf		The ouput buffer for read data.
+ * @param count		The number of bytes to be read.
+ *
+ * @return		The number of bytes actually read on success, negative
+ *			error number otherwise.
+ */
+static int ns8250_read(device_t *dev, char *buf, size_t count)
+{
+	int ret = EOK;
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	
+	fibril_mutex_lock(&data->mutex);
+	while (!buf_is_empty(&data->input_buffer) && (size_t)ret < count) {
+		buf[ret] = (char)buf_pop_front(&data->input_buffer);
+		ret++;
+	}
+	fibril_mutex_unlock(&data->mutex);
+	
+	return ret;
+}
+
+/** Write a character to the serial port.
+ *
+ * @param data		The serial port device's driver data.
+ * @param c		The character to be written.
+ */
+static inline void ns8250_putchar(ns8250_dev_data_t *data, uint8_t c)
+{
+	fibril_mutex_lock(&data->mutex);
+	ns8250_write_8(data->port, c);
+	fibril_mutex_unlock(&data->mutex);
+}
+
+/** Write data to the serial port.
+ *
+ * @param dev		The serial port device.
+ * @param buf		The data to be written.
+ * @param count		The number of bytes to be written.
+ * @return		Zero on success.
+ */
+static int ns8250_write(device_t *dev, char *buf, size_t count) 
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	size_t idx;
+	
+	for (idx = 0; idx < count; idx++)
+		ns8250_putchar(data, (uint8_t) buf[idx]);
+	
+	return 0;
+}
+
+static device_ops_t ns8250_dev_ops;
+
+/** The character interface's callbacks. */
+static char_iface_t ns8250_char_iface = {
+	.read = &ns8250_read,
+	.write = &ns8250_write
+};
+
+static int ns8250_add_device(device_t *dev);
+
+/** The serial port device driver's standard operations. */
+static driver_ops_t ns8250_ops = {
+	.add_device = &ns8250_add_device
+};
+
+/** The serial port device driver structure. */
+static driver_t ns8250_driver = {
+	.name = NAME,
+	.driver_ops = &ns8250_ops
+};
+
+/** Clean up the serial port device structure.
+ *
+ * @param dev		The device structure.
+ */
+static void ns8250_dev_cleanup(device_t *dev)
+{
+	if (dev->driver_data != NULL) {
+		delete_ns8250_dev_data((ns8250_dev_data_t*) dev->driver_data);
+		dev->driver_data = NULL;
+	}
+	
+	if (dev->parent_phone > 0) {
+		ipc_hangup(dev->parent_phone);
+		dev->parent_phone = 0;
+	}
+}
+
+/** Enable the i/o ports of the device.
+ *
+ * @param dev		The serial port device.
+ * @return		True on success, false otherwise.
+ */
+static bool ns8250_pio_enable(device_t *dev)
+{
+	printf(NAME ": ns8250_pio_enable %s\n", dev->name);
+	
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *)dev->driver_data;
+	
+	/* Gain control over port's registers. */
+	if (pio_enable((void *) data->io_addr, REG_COUNT,
+	    (void **) &data->port)) {
+		printf(NAME ": error - cannot gain the port %lx for device "
+		    "%s.\n", data->io_addr, dev->name);
+		return false;
+	}
+	
+	return true;
+}
+
+/** Probe the serial port device for its presence.
+ *
+ * @param dev		The serial port device.
+ * @return		True if the device is present, false otherwise.
+ */
+static bool ns8250_dev_probe(device_t *dev)
+{
+	printf(NAME ": ns8250_dev_probe %s\n", dev->name);
+	
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	ioport8_t *port_addr = data->port;
+	bool res = true;
+	uint8_t olddata;
+	
+	olddata = pio_read_8(port_addr + 4);
+	
+	pio_write_8(port_addr + 4, 0x10);
+	if (pio_read_8(port_addr + 6) & 0xf0)
+		res = false;
+	
+	pio_write_8(port_addr + 4, 0x1f);
+	if ((pio_read_8(port_addr + 6) & 0xf0) != 0xf0)
+		res = false;
+	
+	pio_write_8(port_addr + 4, olddata);
+	
+	if (!res)
+		printf(NAME ": device %s is not present.\n", dev->name);
+	
+	return res;
+}
+
+/** Initialize serial port device.
+ *
+ * @param dev		The serial port device.
+ * @return		Zero on success, negative error number otherwise.
+ */
+static int ns8250_dev_initialize(device_t *dev)
+{
+	printf(NAME ": ns8250_dev_initialize %s\n", dev->name);
+	
+	int ret = EOK;
+	
+	hw_resource_list_t hw_resources;
+	memset(&hw_resources, 0, sizeof(hw_resource_list_t));
+	
+	/* Allocate driver data for the device. */
+	ns8250_dev_data_t *data = create_ns8250_dev_data();
+	if (data == NULL)
+		return ENOMEM;
+	dev->driver_data = data;
+	
+	/* Connect to the parent's driver. */
+	dev->parent_phone = devman_parent_device_connect(dev->handle,
+	    IPC_FLAG_BLOCKING);
+	if (dev->parent_phone < 0) {
+		printf(NAME ": failed to connect to the parent driver of the "
+		    "device %s.\n", dev->name);
+		ret = EPARTY;	/* FIXME: use another EC */
+		goto failed;
+	}
+	
+	/* Get hw resources. */
+	if (!get_hw_resources(dev->parent_phone, &hw_resources)) {
+		printf(NAME ": failed to get hw resources for the device "
+		    "%s.\n", dev->name);
+		ret = EPARTY;	/* FIXME: use another EC */
+		goto failed;
+	}
+	
+	size_t i;
+	hw_resource_t *res;
+	bool irq = false;
+	bool ioport = false;
+	
+	for (i = 0; i < hw_resources.count; i++) {
+		res = &hw_resources.resources[i];
+		switch (res->type) {
+		case INTERRUPT:
+			data->irq = res->res.interrupt.irq;
+			irq = true;
+			printf(NAME ": the %s device was asigned irq = 0x%x.\n",
+			    dev->name, data->irq);
+			break;
+			
+		case IO_RANGE:
+			data->io_addr = res->res.io_range.address;
+			if (res->res.io_range.size < REG_COUNT) {
+				printf(NAME ": i/o range assigned to the device "
+				    "%s is too small.\n", dev->name);
+				ret = EPARTY;	/* FIXME: use another EC */
+				goto failed;
+			}
+			ioport = true;
+			printf(NAME ": the %s device was asigned i/o address = "
+			    "0x%x.\n", dev->name, data->io_addr);
+			break;
+			
+		default:
+			break;
+		}
+	}
+	
+	if (!irq || !ioport) {
+		printf(NAME ": missing hw resource(s) for the device %s.\n",
+		    dev->name);
+		ret = EPARTY;	/* FIXME: use another EC */
+		goto failed;
+	}
+	
+	clean_hw_resource_list(&hw_resources);
+	return ret;
+	
+failed:
+	ns8250_dev_cleanup(dev);
+	clean_hw_resource_list(&hw_resources);
+	return ret;
+}
+
+/** Enable interrupts on the serial port device.
+ *
+ * Interrupt when data is received.
+ *
+ * @param port		The base address of the serial port device's ports.
+ */
+static inline void ns8250_port_interrupts_enable(ioport8_t *port)
+{	
+	pio_write_8(port + 1, 0x1);	/* Interrupt when data received. */
+	pio_write_8(port + 4, 0xB);
+}
+
+/** Disable interrupts on the serial port device.
+ *
+ * @param port		The base address of the serial port device's ports.
+ */
+static inline void ns8250_port_interrupts_disable(ioport8_t *port)
+{
+	pio_write_8(port + 1, 0x0);	/* Disable all interrupts. */
+}
+
+/** Enable interrupts for the serial port device.
+ *
+ * @param dev		The device.
+ * @return		Zero on success, negative error number otherwise.
+ */
+static int ns8250_interrupt_enable(device_t *dev)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	int res;
+	
+	/* Enable interrupt globally. */
+	res = interrupt_enable(data->irq);
+	if (res != EOK)
+		return res;
+	
+	/* Enable interrupt on the serial port. */
+	ns8250_port_interrupts_enable(data->port);
+	
+	return EOK;
+}
+
+/** Set Divisor Latch Access Bit.
+ *
+ * When the Divisor Latch Access Bit is set, it is possible to set baud rate of
+ * the serial port device.
+ *
+ * @param port		The base address of the serial port device's ports.
+ */
+static inline void enable_dlab(ioport8_t *port)
+{
+	uint8_t val = pio_read_8(port + 3);
+	pio_write_8(port + 3, val | DLAB_MASK);
+}
+
+/** Clear Divisor Latch Access Bit.
+ *
+ * @param port		The base address of the serial port device's ports.
+ */
+static inline void clear_dlab(ioport8_t *port)
+{
+	uint8_t val = pio_read_8(port + 3);
+	pio_write_8(port + 3, val & (~DLAB_MASK));
+}
+
+/** Set baud rate of the serial communication on the serial device.
+ *
+ * @param port		The base address of the serial port device's ports.
+ * @param baud_rate	The baud rate to be used by the device.
+ * @return		Zero on success, negative error number otherwise (EINVAL
+ *			if the specified baud_rate is not valid).
+ */
+static int ns8250_port_set_baud_rate(ioport8_t *port, unsigned int baud_rate)
+{
+	uint16_t divisor;
+	uint8_t div_low, div_high;
+	
+	if (baud_rate < 50 || MAX_BAUD_RATE % baud_rate != 0) {
+		printf(NAME ": error - somebody tried to set invalid baud rate "
+		    "%d\n", baud_rate);
+		return EINVAL;
+	}
+	
+	divisor = MAX_BAUD_RATE / baud_rate;
+	div_low = (uint8_t)divisor;
+	div_high = (uint8_t)(divisor >> 8);
+	
+	/* Enable DLAB to be able to access baud rate divisor. */
+	enable_dlab(port);
+	
+	/* Set divisor low byte. */
+	pio_write_8(port + 0, div_low);
+	/* Set divisor high byte. */
+	pio_write_8(port + 1, div_high);
+	
+	clear_dlab(port);
+	
+	return EOK;
+}
+
+/** Get baud rate used by the serial port device.
+ *
+ * @param port		The base address of the serial port device's ports.
+ * @param baud_rate	The ouput parameter to which the baud rate is stored.
+ */
+static unsigned int ns8250_port_get_baud_rate(ioport8_t *port)
+{
+	uint16_t divisor;
+	uint8_t div_low, div_high;
+	
+	/* Enable DLAB to be able to access baud rate divisor. */
+	enable_dlab(port);
+	
+	/* Get divisor low byte. */
+	div_low = pio_read_8(port + 0);
+	/* Get divisor high byte. */
+	div_high = pio_read_8(port + 1);
+	
+	clear_dlab(port);
+	
+	divisor = (div_high << 8) | div_low;
+	return MAX_BAUD_RATE / divisor;
+}
+
+/** Get the parameters of the serial communication set on the serial port
+ * device.
+ *
+ * @param parity	The parity used.
+ * @param word_length	The length of one data unit in bits.
+ * @param stop_bits	The number of stop bits used (one or two).
+ */
+static void ns8250_port_get_com_props(ioport8_t *port, unsigned int *parity,
+    unsigned int *word_length, unsigned int *stop_bits)
+{
+	uint8_t val;
+	
+	val = pio_read_8(port + 3);
+	*parity = ((val >> 3) & 7);
+	
+	switch (val & 3) {
+	case WORD_LENGTH_5:
+		*word_length = 5;
+		break;
+	case WORD_LENGTH_6:
+		*word_length = 6;
+		break;
+	case WORD_LENGTH_7:
+		*word_length = 7;
+		break;
+	case WORD_LENGTH_8:
+		*word_length = 8;
+		break;
+	}
+	
+	if ((val >> 2) & 1)
+		*stop_bits = 2;
+	else
+		*stop_bits = 1;
+}
+
+/** Set the parameters of the serial communication on the serial port device.
+ *
+ * @param parity	The parity to be used.
+ * @param word_length	The length of one data unit in bits.
+ * @param stop_bits	The number of stop bits used (one or two).
+ * @return		Zero on success, EINVAL if some of the specified values
+ *			is invalid.
+ */
+static int ns8250_port_set_com_props(ioport8_t *port, unsigned int parity,
+    unsigned int word_length, unsigned int stop_bits)
+{
+	uint8_t val;
+	
+	switch (word_length) {
+	case 5:
+		val = WORD_LENGTH_5;
+		break;
+	case 6:
+		val = WORD_LENGTH_6;
+		break;
+	case 7:
+		val = WORD_LENGTH_7;
+		break;
+	case 8:
+		val = WORD_LENGTH_8;
+		break;
+	default:
+		return EINVAL;
+	}
+	
+	switch (stop_bits) {
+	case 1:
+		val |= ONE_STOP_BIT << 2;
+		break;
+	case 2:
+		val |= TWO_STOP_BITS << 2;
+		break;
+	default:
+		return EINVAL;
+	}
+	
+	switch (parity) {
+	case SERIAL_NO_PARITY:
+	case SERIAL_ODD_PARITY:
+	case SERIAL_EVEN_PARITY:
+	case SERIAL_MARK_PARITY:
+	case SERIAL_SPACE_PARITY:
+		val |= parity << 3;
+		break;
+	default:
+		return EINVAL;
+	}
+	
+	pio_write_8(port + 3, val);
+	
+	return EOK;
+}
+
+/** Initialize the serial port device.
+ *
+ * Set the default parameters of the serial communication.
+ *
+ * @param dev		The serial port device.
+ */
+static void ns8250_initialize_port(device_t *dev)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *)dev->driver_data;
+	ioport8_t *port = data->port;
+	
+	/* Disable interrupts. */
+	ns8250_port_interrupts_disable(port);
+	/* Set baud rate. */
+	ns8250_port_set_baud_rate(port, 38400);
+	/* 8 bits, no parity, two stop bits. */
+	ns8250_port_set_com_props(port, SERIAL_NO_PARITY, 8, 2);
+	/* Enable FIFO, clear them, with 14-byte threshold. */
+	pio_write_8(port + 2, 0xC7);
+	/*
+	 * RTS/DSR set (Request to Send and Data Terminal Ready lines enabled),
+	 * Aux Output2 set - needed for interrupts.
+	 */
+	pio_write_8(port + 4, 0x0B);
+}
+
+/** Read the data from the serial port device and store them to the input
+ * buffer.
+ *
+ * @param dev		The serial port device.
+ */
+static void ns8250_read_from_device(device_t *dev)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	ioport8_t *port = data->port;
+	bool cont = true;
+	
+	while (cont) {
+		fibril_mutex_lock(&data->mutex);
+		
+		cont = ns8250_received(port);
+		if (cont) {
+			uint8_t val = ns8250_read_8(port);
+			
+			if (data->client_connected) {
+				if (!buf_push_back(&data->input_buffer, val)) {
+					printf(NAME ": buffer overflow on "
+					    "%s.\n", dev->name);
+				} else {
+					printf(NAME ": the character %c saved "
+					    "to the buffer of %s.\n",
+					    val, dev->name);
+				}
+			}
+		}
+		
+		fibril_mutex_unlock(&data->mutex);
+		fibril_yield();
+	}
+}
+
+/** The interrupt handler.
+ *
+ * The serial port is initialized to interrupt when some data come, so the
+ * interrupt is handled by reading the incomming data.
+ *
+ * @param dev		The serial port device.
+ */
+static inline void ns8250_interrupt_handler(device_t *dev, ipc_callid_t iid,
+    ipc_call_t *icall)
+{
+	ns8250_read_from_device(dev);
+}
+
+/** Register the interrupt handler for the device.
+ *
+ * @param dev		The serial port device.
+ */
+static inline int ns8250_register_interrupt_handler(device_t *dev)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	
+	return register_interrupt_handler(dev, data->irq,
+	    ns8250_interrupt_handler, NULL);
+}
+
+/** Unregister the interrupt handler for the device.
+ *
+ * @param dev		The serial port device.
+ */
+static inline int ns8250_unregister_interrupt_handler(device_t *dev)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	
+	return unregister_interrupt_handler(dev, data->irq);
+}
+
+/** The add_device callback method of the serial port driver.
+ *
+ * Probe and initialize the newly added device.
+ *
+ * @param dev		The serial port device.
+ */
+static int ns8250_add_device(device_t *dev)
+{
+	printf(NAME ": ns8250_add_device %s (handle = %d)\n",
+	    dev->name, dev->handle);
+	
+	int res = ns8250_dev_initialize(dev);
+	if (res != EOK)
+		return res;
+	
+	if (!ns8250_pio_enable(dev)) {
+		ns8250_dev_cleanup(dev);
+		return EADDRNOTAVAIL;
+	}
+	
+	/* Find out whether the device is present. */
+	if (!ns8250_dev_probe(dev)) {
+		ns8250_dev_cleanup(dev);
+		return ENOENT;
+	}
+	
+	/* Serial port initialization (baud rate etc.). */
+	ns8250_initialize_port(dev);
+	
+	/* Register interrupt handler. */
+	if (ns8250_register_interrupt_handler(dev) != EOK) {
+		printf(NAME ": failed to register interrupt handler.\n");
+		ns8250_dev_cleanup(dev);
+		return res;
+	}
+	
+	/* Enable interrupt. */
+	res = ns8250_interrupt_enable(dev);
+	if (res != EOK) {
+		printf(NAME ": failed to enable the interrupt. Error code = "
+		    "%d.\n", res);
+		ns8250_dev_cleanup(dev);
+		ns8250_unregister_interrupt_handler(dev);
+		return res;
+	}
+	
+	/* Set device operations. */
+	dev->ops = &ns8250_dev_ops;
+	
+	add_device_to_class(dev, "serial");
+	
+	printf(NAME ": the %s device has been successfully initialized.\n",
+	    dev->name);
+	
+	return EOK;
+}
+
+/** Open the device.
+ *
+ * This is a callback function called when a client tries to connect to the
+ * device.
+ *
+ * @param dev		The device.
+ */
+static int ns8250_open(device_t *dev)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	int res;
+	
+	fibril_mutex_lock(&data->mutex);
+	if (data->client_connected) {
+		res = ELIMIT;
+	} else {
+		res = EOK;
+		data->client_connected = true;
+	}
+	fibril_mutex_unlock(&data->mutex);
+
+	return res;
+}
+
+/** Close the device.
+ *
+ * This is a callback function called when a client tries to disconnect from
+ * the device.
+ *
+ * @param dev		The device.
+ */
+static void ns8250_close(device_t *dev)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	
+	fibril_mutex_lock(&data->mutex);
+	
+	assert(data->client_connected);
+	
+	data->client_connected = false;
+	buf_clear(&data->input_buffer);
+	
+	fibril_mutex_unlock(&data->mutex);
+}
+
+/** Get parameters of the serial communication which are set to the specified
+ * device.
+ *
+ * @param dev		The serial port device.
+ * @param baud_rate	The baud rate used by the device.
+ * @param parity	The type of parity used by the device.
+ * @param word_length	The size of one data unit in bits.
+ * @param stop_bits	The number of stop bits used.
+ */
+static void
+ns8250_get_props(device_t *dev, unsigned int *baud_rate, unsigned int *parity,
+    unsigned int *word_length, unsigned int* stop_bits)
+{
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	ioport8_t *port = data->port;
+	
+	fibril_mutex_lock(&data->mutex);
+	ns8250_port_interrupts_disable(port);
+	*baud_rate = ns8250_port_get_baud_rate(port);
+	ns8250_port_get_com_props(port, parity, word_length, stop_bits);
+	ns8250_port_interrupts_enable(port);
+	fibril_mutex_unlock(&data->mutex);
+	
+	printf(NAME ": ns8250_get_props: baud rate %d, parity 0x%x, word "
+	    "length %d, stop bits %d\n", *baud_rate, *parity, *word_length,
+	    *stop_bits);
+}
+
+/** Set parameters of the serial communication to the specified serial port
+ * device.
+ *
+ * @param dev		The serial port device.
+ * @param baud_rate	The baud rate to be used by the device.
+ * @param parity	The type of parity to be used by the device.
+ * @param word_length	The size of one data unit in bits.
+ * @param stop_bits	The number of stop bits to be used.
+ */
+static int ns8250_set_props(device_t *dev, unsigned int baud_rate,
+    unsigned int parity, unsigned int word_length, unsigned int stop_bits)
+{
+	printf(NAME ": ns8250_set_props: baud rate %d, parity 0x%x, word "
+	    "length %d, stop bits %d\n", baud_rate, parity, word_length,
+	    stop_bits);
+	
+	ns8250_dev_data_t *data = (ns8250_dev_data_t *) dev->driver_data;
+	ioport8_t *port = data->port;
+	int ret;
+	
+	fibril_mutex_lock(&data->mutex);
+	ns8250_port_interrupts_disable(port);
+	ret = ns8250_port_set_baud_rate(port, baud_rate);
+	if (ret == EOK)
+		ret = ns8250_port_set_com_props(port, parity, word_length, stop_bits);
+	ns8250_port_interrupts_enable(port);
+	fibril_mutex_unlock(&data->mutex);
+	
+	return ret;
+}
+
+/** Default handler for client requests which are not handled by the standard
+ * interfaces.
+ *
+ * Configure the parameters of the serial communication.
+ */
+static void ns8250_default_handler(device_t *dev, ipc_callid_t callid,
+    ipc_call_t *call)
+{
+	ipcarg_t method = IPC_GET_METHOD(*call);
+	int ret;
+	unsigned int baud_rate, parity, word_length, stop_bits;
+	
+	switch (method) {
+	case SERIAL_GET_COM_PROPS:
+		ns8250_get_props(dev, &baud_rate, &parity, &word_length,
+		    &stop_bits);
+		ipc_answer_4(callid, EOK, baud_rate, parity, word_length,
+		    stop_bits);
+		break;
+		
+	case SERIAL_SET_COM_PROPS:
+ 		baud_rate = IPC_GET_ARG1(*call);
+		parity = IPC_GET_ARG2(*call);
+		word_length = IPC_GET_ARG3(*call);
+		stop_bits = IPC_GET_ARG4(*call);
+		ret = ns8250_set_props(dev, baud_rate, parity, word_length,
+		    stop_bits);
+		ipc_answer_0(callid, ret);
+		break;
+		
+	default:
+		ipc_answer_0(callid, ENOTSUP);
+	}
+}
+
+/** Initialize the serial port driver.
+ *
+ * Initialize device operations structures with callback methods for handling
+ * client requests to the serial port devices.
+ */
+static void ns8250_init(void)
+{
+	ns8250_dev_ops.open = &ns8250_open;
+	ns8250_dev_ops.close = &ns8250_close;
+	
+	ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_iface;
+	ns8250_dev_ops.default_handler = &ns8250_default_handler;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS serial port driver\n");
+	ns8250_init();
+	return driver_main(&ns8250_driver);
+}
+
+/**
+ * @}
+ */
Index: uspace/drv/ns8250/ns8250.ma
===================================================================
--- uspace/drv/ns8250/ns8250.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/ns8250/ns8250.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,1 @@
+10 isa/ns8250
Index: uspace/drv/pciintel/Makefile
===================================================================
--- uspace/drv/pciintel/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/pciintel/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2010 Lenka Trochtova
+# 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.
+#
+
+USPACE_PREFIX = ../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include
+BINARY = pciintel
+
+SOURCES = \
+	pci.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/pciintel/pci.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,601 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup pciintel pci bus driver for intel method 1.
+ * @brief HelenOS root pci bus driver for intel method 1.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <str.h>
+#include <ctype.h>
+#include <macros.h>
+
+#include <driver.h>
+#include <devman.h>
+#include <ipc/devman.h>
+#include <ipc/dev_iface.h>
+#include <resource.h>
+#include <device/hw_res.h>
+#include <ddi.h>
+#include <libarch/ddi.h>
+
+#include "pci.h"
+
+#define NAME "pciintel"
+
+#define CONF_ADDR(bus, dev, fn, reg) \
+	((1 << 31) | (bus << 16) | (dev << 11) | (fn << 8) | (reg & ~3))
+
+static hw_resource_list_t *pciintel_get_child_resources(device_t *dev)
+{
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	
+	if (dev_data == NULL)
+		return NULL;
+	return &dev_data->hw_resources;
+}
+
+static bool pciintel_enable_child_interrupt(device_t *dev)
+{
+	/* TODO */
+	
+	return false;
+}
+
+static resource_iface_t pciintel_child_res_iface = {
+	&pciintel_get_child_resources,
+	&pciintel_enable_child_interrupt
+};
+
+static device_ops_t pci_child_ops;
+
+static int pci_add_device(device_t *);
+
+/** The pci bus driver's standard operations. */
+static driver_ops_t pci_ops = {
+	.add_device = &pci_add_device
+};
+
+/** The pci bus driver structure. */
+static driver_t pci_driver = {
+	.name = NAME,
+	.driver_ops = &pci_ops
+};
+
+typedef struct pciintel_bus_data {
+	uint32_t conf_io_addr;
+	void *conf_data_port;
+	void *conf_addr_port;
+	fibril_mutex_t conf_mutex;
+} pci_bus_data_t;
+
+static pci_bus_data_t *create_pci_bus_data(void)
+{
+	pci_bus_data_t *bus_data;
+	
+	bus_data = (pci_bus_data_t *) malloc(sizeof(pci_bus_data_t));
+	if (bus_data != NULL) {
+		memset(bus_data, 0, sizeof(pci_bus_data_t));
+		fibril_mutex_initialize(&bus_data->conf_mutex);
+	}
+
+	return bus_data;
+}
+
+static void delete_pci_bus_data(pci_bus_data_t *bus_data)
+{
+	free(bus_data);
+}
+
+static void pci_conf_read(device_t *dev, int reg, uint8_t *buf, size_t len)
+{
+	assert(dev->parent != NULL);
+	
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	pci_bus_data_t *bus_data = (pci_bus_data_t *) dev->parent->driver_data;
+	
+	fibril_mutex_lock(&bus_data->conf_mutex);
+	
+	uint32_t conf_addr;
+	conf_addr = CONF_ADDR(dev_data->bus, dev_data->dev, dev_data->fn, reg);
+	void *addr = bus_data->conf_data_port + (reg & 3);
+	
+	pio_write_32(bus_data->conf_addr_port, conf_addr);
+	
+	switch (len) {
+	case 1:
+		buf[0] = pio_read_8(addr);
+		break;
+	case 2:
+		((uint16_t *) buf)[0] = pio_read_16(addr);
+		break;
+	case 4:
+		((uint32_t *) buf)[0] = pio_read_32(addr);
+		break;
+	}
+	
+	fibril_mutex_unlock(&bus_data->conf_mutex);
+}
+
+static void pci_conf_write(device_t *dev, int reg, uint8_t *buf, size_t len)
+{
+	assert(dev->parent != NULL);
+	
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	pci_bus_data_t *bus_data = (pci_bus_data_t *) dev->parent->driver_data;
+	
+	fibril_mutex_lock(&bus_data->conf_mutex);
+	
+	uint32_t conf_addr;
+	conf_addr = CONF_ADDR(dev_data->bus, dev_data->dev, dev_data->fn, reg);
+	void *addr = bus_data->conf_data_port + (reg & 3);
+	
+	pio_write_32(bus_data->conf_addr_port, conf_addr);
+	
+	switch (len) {
+	case 1:
+		pio_write_8(addr, buf[0]);
+		break;
+	case 2:
+		pio_write_16(addr, ((uint16_t *) buf)[0]);
+		break;
+	case 4:
+		pio_write_32(addr, ((uint32_t *) buf)[0]);
+		break;
+	}
+	
+	fibril_mutex_unlock(&bus_data->conf_mutex);
+}
+
+uint8_t pci_conf_read_8(device_t *dev, int reg)
+{
+	uint8_t res;
+	pci_conf_read(dev, reg, &res, 1);
+	return res;
+}
+
+uint16_t pci_conf_read_16(device_t *dev, int reg)
+{
+	uint16_t res;
+	pci_conf_read(dev, reg, (uint8_t *) &res, 2);
+	return res;
+}
+
+uint32_t pci_conf_read_32(device_t *dev, int reg)
+{
+	uint32_t res;
+	pci_conf_read(dev, reg, (uint8_t *) &res, 4);
+	return res;
+}
+
+void pci_conf_write_8(device_t *dev, int reg, uint8_t val)
+{
+	pci_conf_write(dev, reg, (uint8_t *) &val, 1);
+}
+
+void pci_conf_write_16(device_t *dev, int reg, uint16_t val)
+{
+	pci_conf_write(dev, reg, (uint8_t *) &val, 2);
+}
+
+void pci_conf_write_32(device_t *dev, int reg, uint32_t val)
+{
+	pci_conf_write(dev, reg, (uint8_t *) &val, 4);
+}
+
+void create_pci_match_ids(device_t *dev)
+{
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	match_id_t *match_id = NULL;
+	char *match_id_str;
+	
+	match_id = create_match_id();
+	if (match_id != NULL) {
+		asprintf(&match_id_str, "pci/ven=%04x&dev=%04x",
+		    dev_data->vendor_id, dev_data->device_id);
+		match_id->id = match_id_str;
+		match_id->score = 90;
+		add_match_id(&dev->match_ids, match_id);
+	}
+
+	/* TODO add more ids (with subsys ids, using class id etc.) */
+}
+
+void
+pci_add_range(device_t *dev, uint64_t range_addr, size_t range_size, bool io)
+{
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	hw_resource_list_t *hw_res_list = &dev_data->hw_resources;
+	hw_resource_t *hw_resources =  hw_res_list->resources;
+	size_t count = hw_res_list->count;
+	
+	assert(hw_resources != NULL);
+	assert(count < PCI_MAX_HW_RES);
+	
+	if (io) {
+		hw_resources[count].type = IO_RANGE;
+		hw_resources[count].res.io_range.address = range_addr;
+		hw_resources[count].res.io_range.size = range_size;
+		hw_resources[count].res.io_range.endianness = LITTLE_ENDIAN;
+	} else {
+		hw_resources[count].type = MEM_RANGE;
+		hw_resources[count].res.mem_range.address = range_addr;
+		hw_resources[count].res.mem_range.size = range_size;
+		hw_resources[count].res.mem_range.endianness = LITTLE_ENDIAN;
+	}
+	
+	hw_res_list->count++;
+}
+
+/** Read the base address register (BAR) of the device and if it contains valid
+ * address add it to the devices hw resource list.
+ *
+ * @param dev	The pci device.
+ * @param addr	The address of the BAR in the PCI configuration address space of
+ *		the device.
+ * @return	The addr the address of the BAR which should be read next.
+ */
+int pci_read_bar(device_t *dev, int addr)
+{	
+	/* Value of the BAR */
+	uint32_t val, mask;
+	/* IO space address */
+	bool io;
+	/* 64-bit wide address */
+	bool addrw64;
+	
+	/* Size of the io or memory range specified by the BAR */
+	size_t range_size;
+	/* Beginning of the io or memory range specified by the BAR */
+	uint64_t range_addr;
+	
+	/* Get the value of the BAR. */
+	val = pci_conf_read_32(dev, addr);
+	
+	io = (bool) (val & 1);
+	if (io) {
+		addrw64 = false;
+	} else {
+		switch ((val >> 1) & 3) {
+		case 0:
+			addrw64 = false;
+			break;
+		case 2:
+			addrw64 = true;
+			break;
+		default:
+			/* reserved, go to the next BAR */
+			return addr + 4;
+		}
+	}
+	
+	/* Get the address mask. */
+	pci_conf_write_32(dev, addr, 0xffffffff);
+	mask = pci_conf_read_32(dev, addr);
+	
+	/* Restore the original value. */
+	pci_conf_write_32(dev, addr, val);
+	val = pci_conf_read_32(dev, addr);
+	
+	range_size = pci_bar_mask_to_size(mask);
+	
+	if (addrw64) {
+		range_addr = ((uint64_t)pci_conf_read_32(dev, addr + 4) << 32) |
+		    (val & 0xfffffff0);
+	} else {
+		range_addr = (val & 0xfffffff0);
+	}
+	
+	if (range_addr != 0) {
+		printf(NAME ": device %s : ", dev->name);
+		printf("address = %x", range_addr);
+		printf(", size = %x\n", range_size);
+	}
+	
+	pci_add_range(dev, range_addr, range_size, io);
+	
+	if (addrw64)
+		return addr + 8;
+	
+	return addr + 4;
+}
+
+void pci_add_interrupt(device_t *dev, int irq)
+{
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	hw_resource_list_t *hw_res_list = &dev_data->hw_resources;
+	hw_resource_t *hw_resources = hw_res_list->resources;
+	size_t count = hw_res_list->count;
+	
+	assert(NULL != hw_resources);
+	assert(count < PCI_MAX_HW_RES);
+	
+	hw_resources[count].type = INTERRUPT;
+	hw_resources[count].res.interrupt.irq = irq;
+	
+	hw_res_list->count++;
+	
+	printf(NAME ": device %s uses irq %x.\n", dev->name, irq);
+}
+
+void pci_read_interrupt(device_t *dev)
+{
+	uint8_t irq = pci_conf_read_8(dev, PCI_BRIDGE_INT_LINE);
+	if (irq != 0xff)
+		pci_add_interrupt(dev, irq);
+}
+
+/** Enumerate (recursively) and register the devices connected to a pci bus.
+ *
+ * @param parent	The host-to-pci bridge device.
+ * @param bus_num	The bus number.
+ */
+void pci_bus_scan(device_t *parent, int bus_num) 
+{
+	device_t *dev = create_device();
+	pci_dev_data_t *dev_data = create_pci_dev_data();
+	dev->driver_data = dev_data;
+	dev->parent = parent;
+	
+	int child_bus = 0;
+	int dnum, fnum;
+	bool multi;
+	uint8_t header_type; 
+	
+	for (dnum = 0; dnum < 32; dnum++) {
+		multi = true;
+		for (fnum = 0; multi && fnum < 8; fnum++) {
+			init_pci_dev_data(dev_data, bus_num, dnum, fnum);
+			dev_data->vendor_id = pci_conf_read_16(dev,
+			    PCI_VENDOR_ID);
+			dev_data->device_id = pci_conf_read_16(dev,
+			    PCI_DEVICE_ID);
+			if (dev_data->vendor_id == 0xffff) {
+				/*
+				 * The device is not present, go on scanning the
+				 * bus.
+				 */
+				if (fnum == 0)
+					break;
+				else
+					continue;
+			}
+			
+			header_type = pci_conf_read_8(dev, PCI_HEADER_TYPE);
+			if (fnum == 0) {
+				/* Is the device multifunction? */
+				multi = header_type >> 7;
+			}
+			/* Clear the multifunction bit. */
+			header_type = header_type & 0x7F;
+			
+			create_pci_dev_name(dev);
+			
+			pci_alloc_resource_list(dev);
+			pci_read_bars(dev);
+			pci_read_interrupt(dev);
+			
+			dev->ops = &pci_child_ops;
+			
+			printf(NAME ": adding new child device %s.\n",
+			    dev->name);
+			
+			create_pci_match_ids(dev);
+			
+			if (child_device_register(dev, parent) != EOK) {
+				pci_clean_resource_list(dev);
+				clean_match_ids(&dev->match_ids);
+				free((char *) dev->name);
+				dev->name = NULL;
+				continue;
+			}
+			
+			if (header_type == PCI_HEADER_TYPE_BRIDGE ||
+			    header_type == PCI_HEADER_TYPE_CARDBUS) {
+				child_bus = pci_conf_read_8(dev,
+				    PCI_BRIDGE_SEC_BUS_NUM);
+				printf(NAME ": device is pci-to-pci bridge, "
+				    "secondary bus number = %d.\n", bus_num);
+				if (child_bus > bus_num)
+					pci_bus_scan(parent, child_bus);
+			}
+			
+			/* Alloc new aux. dev. structure. */
+			dev = create_device();
+			dev_data = create_pci_dev_data();
+			dev->driver_data = dev_data;
+			dev->parent = parent;
+		}
+	}
+	
+	if (dev_data->vendor_id == 0xffff) {
+		delete_device(dev);
+		/* Free the auxiliary device structure. */
+		delete_pci_dev_data(dev_data);
+	}
+}
+
+static int pci_add_device(device_t *dev)
+{
+	printf(NAME ": pci_add_device\n");
+	
+	pci_bus_data_t *bus_data = create_pci_bus_data();
+	if (bus_data == NULL) {
+		printf(NAME ": pci_add_device allocation failed.\n");
+		return ENOMEM;
+	}
+	
+	dev->parent_phone = devman_parent_device_connect(dev->handle,
+	    IPC_FLAG_BLOCKING);
+	if (dev->parent_phone < 0) {
+		printf(NAME ": pci_add_device failed to connect to the "
+		    "parent's driver.\n");
+		delete_pci_bus_data(bus_data);
+		return EPARTY;	/* FIXME: use another EC */
+	}
+	
+	hw_resource_list_t hw_resources;
+	
+	if (!get_hw_resources(dev->parent_phone, &hw_resources)) {
+		printf(NAME ": pci_add_device failed to get hw resources for "
+		    "the device.\n");
+		delete_pci_bus_data(bus_data);
+		ipc_hangup(dev->parent_phone);
+		return EPARTY;	/* FIXME: use another EC */
+	}	
+	
+	printf(NAME ": conf_addr = %x.\n",
+	    hw_resources.resources[0].res.io_range.address);
+	
+	assert(hw_resources.count > 0);
+	assert(hw_resources.resources[0].type == IO_RANGE);
+	assert(hw_resources.resources[0].res.io_range.size == 8);
+	
+	bus_data->conf_io_addr =
+	    (uint32_t) hw_resources.resources[0].res.io_range.address;
+	
+	if (pio_enable((void *)bus_data->conf_io_addr, 8,
+	    &bus_data->conf_addr_port)) {
+		printf(NAME ": failed to enable configuration ports.\n");
+		delete_pci_bus_data(bus_data);
+		ipc_hangup(dev->parent_phone);
+		clean_hw_resource_list(&hw_resources);
+		return EADDRNOTAVAIL;
+	}
+	bus_data->conf_data_port = (char *) bus_data->conf_addr_port + 4;
+	
+	dev->driver_data = bus_data;
+	
+	/* Enumerate child devices. */
+	printf(NAME ": scanning the bus\n");
+	pci_bus_scan(dev, 0);
+	
+	clean_hw_resource_list(&hw_resources);
+	
+	return EOK;
+}
+
+static void pciintel_init(void)
+{
+	pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_res_iface;
+}
+
+pci_dev_data_t *create_pci_dev_data(void)
+{
+	pci_dev_data_t *res = (pci_dev_data_t *) malloc(sizeof(pci_dev_data_t));
+	
+	if (res != NULL)
+		memset(res, 0, sizeof(pci_dev_data_t));
+	return res;
+}
+
+void init_pci_dev_data(pci_dev_data_t *dev_data, int bus, int dev, int fn)
+{
+	dev_data->bus = bus;
+	dev_data->dev = dev;
+	dev_data->fn = fn;
+}
+
+void delete_pci_dev_data(pci_dev_data_t *dev_data)
+{
+	if (dev_data != NULL) {
+		clean_hw_resource_list(&dev_data->hw_resources);
+		free(dev_data);
+	}
+}
+
+void create_pci_dev_name(device_t *dev)
+{
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	char *name = NULL;
+	
+	asprintf(&name, "%02x:%02x.%01x", dev_data->bus, dev_data->dev,
+	    dev_data->fn);
+	dev->name = name;
+}
+
+bool pci_alloc_resource_list(device_t *dev)
+{
+	pci_dev_data_t *dev_data = (pci_dev_data_t *)dev->driver_data;
+	
+	dev_data->hw_resources.resources =
+	    (hw_resource_t *) malloc(PCI_MAX_HW_RES * sizeof(hw_resource_t));
+	return dev_data->hw_resources.resources != NULL;
+}
+
+void pci_clean_resource_list(device_t *dev)
+{
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	
+	if (dev_data->hw_resources.resources != NULL) {
+		free(dev_data->hw_resources.resources);
+		dev_data->hw_resources.resources = NULL;
+	}
+}
+
+/** Read the base address registers (BARs) of the device and adds the addresses
+ * to its hw resource list.
+ *
+ * @param dev the pci device.
+ */
+void pci_read_bars(device_t *dev)
+{
+	/*
+	 * Position of the BAR in the PCI configuration address space of the
+	 * device.
+	 */
+	int addr = PCI_BASE_ADDR_0;
+	
+	while (addr <= PCI_BASE_ADDR_5)
+		addr = pci_read_bar(dev, addr);
+}
+
+size_t pci_bar_mask_to_size(uint32_t mask)
+{
+	return ((mask & 0xfffffff0) ^ 0xffffffff) + 1;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS pci bus driver (intel method 1).\n");
+	pciintel_init();
+	return driver_main(&pci_driver);
+}
+
+/**
+ * @}
+ */
Index: uspace/drv/pciintel/pci.h
===================================================================
--- uspace/drv/pciintel/pci.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/pciintel/pci.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 pciintel
+ * @{
+ */
+/** @file
+ */
+
+#ifndef PCI_H_
+#define PCI_H_
+
+#include <stdlib.h>
+#include <driver.h>
+#include <malloc.h>
+
+#include "pci_regs.h"
+
+#define PCI_MAX_HW_RES 8
+
+typedef struct pci_dev_data {
+	int bus;
+	int dev;
+	int fn;
+	int vendor_id;
+	int device_id;
+	hw_resource_list_t hw_resources;
+} pci_dev_data_t;
+
+extern void create_pci_match_ids(device_t *);
+
+extern uint8_t pci_conf_read_8(device_t *, int);
+extern uint16_t pci_conf_read_16(device_t *, int);
+extern uint32_t pci_conf_read_32(device_t *, int);
+extern void pci_conf_write_8(device_t *, int, uint8_t);
+extern void pci_conf_write_16(device_t *, int, uint16_t);
+extern void pci_conf_write_32(device_t *, int, uint32_t);
+
+extern void pci_add_range(device_t *, uint64_t, size_t, bool);
+extern int pci_read_bar(device_t *, int);
+extern void pci_read_interrupt(device_t *);
+extern void pci_add_interrupt(device_t *, int);
+
+extern void pci_bus_scan(device_t *, int);
+
+extern pci_dev_data_t *create_pci_dev_data(void);
+extern void init_pci_dev_data(pci_dev_data_t *, int, int, int);
+extern void delete_pci_dev_data(pci_dev_data_t *);
+extern void create_pci_dev_name(device_t *);
+
+extern bool pci_alloc_resource_list(device_t *);
+extern void pci_clean_resource_list(device_t *);
+
+extern void pci_read_bars(device_t *);
+extern size_t pci_bar_mask_to_size(uint32_t);
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/drv/pciintel/pci_regs.h
===================================================================
--- uspace/drv/pciintel/pci_regs.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/pciintel/pci_regs.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 pciintel
+ * @{
+ */
+/** @file
+ */
+
+#ifndef PCI_REGS_H_
+#define PCI_REGS_H_
+
+/* Header types */
+#define PCI_HEADER_TYPE_DEV	0
+#define PCI_HEADER_TYPE_BRIDGE	1
+#define PCI_HEADER_TYPE_CARDBUS	2
+
+/* Header type 0 and 1 */
+#define PCI_VENDOR_ID		0x00
+#define PCI_DEVICE_ID		0x02
+#define PCI_COMMAND		0x04
+#define PCI_STATUS		0x06
+#define PCI_REVISION_ID		0x08
+#define PCI_PROG_IF		0x09
+#define PCI_SUB_CLASS		0x0A
+#define PCI_BASE_CLASS		0x0B
+#define PCI_CACHE_LINE_SIZE	0x0C
+#define PCI_LATENCY_TIMER	0x0D
+#define PCI_HEADER_TYPE		0x0E
+#define PCI_BIST		0x0F
+
+#define PCI_BASE_ADDR_0		0x10
+#define PCI_BASE_ADDR_1		0x14
+
+/* Header type 0 */
+#define PCI_BASE_ADDR_2			0x18
+#define PCI_BASE_ADDR_3			0x1B
+#define PCI_BASE_ADDR_4			0x20
+#define PCI_BASE_ADDR_5			0x24
+
+#define PCI_CARDBUS_CIS_PTR		0x28
+#define PCI_SUBSYSTEM_VENDOR_ID		0x2C
+#define PCI_SUBSYSTEM_ID		0x2E
+#define PCI_EXP_ROM_BASE		0x30
+#define PCI_CAP_PTR			0x34
+#define PCI_INT_LINE			0x3C
+#define PCI_INT_PIN			0x3D
+#define PCI_MIN_GNT			0x3E
+#define PCI_MAX_LAT			0x3F
+
+/* Header type 1 */
+#define PCI_BRIDGE_PRIM_BUS_NUM		0x18
+#define PCI_BRIDGE_SEC_BUS_NUM		0x19
+#define PCI_BRIDGE_SUBORD_BUS_NUM	0x1A
+#define PCI_BRIDGE_SEC_LATENCY_TIMER	0x1B
+#define PCI_BRIDGE_IO_BASE		0x1C
+#define PCI_BRIDGE_IO_LIMIT		0x1D
+#define PCI_BRIDGE_SEC_STATUS		0x1E
+#define PCI_BRIDGE_MEMORY_BASE		0x20
+#define PCI_BRIDGE_MEMORY_LIMIT		0x22
+#define PCI_BRIDGE_PREF_MEMORY_BASE	0x24
+#define PCI_BRIDGE_PREF_MEMORY_LIMIT	0x26
+#define PCI_BRIDGE_PREF_MEMORY_BASE_UP	0x28
+#define PCI_BRIDGE_PREF_MEMORY_LIMIT_UP	0x2C
+#define PCI_BRIDGE_IO_BASE_UP		0x30
+#define PCI_BRIDGE_IO_LIMIT_UP		0x32
+#define PCI_BRIDGE_EXP_ROM_BASE		0x38
+#define PCI_BRIDGE_INT_LINE		0x3C
+#define PCI_BRIDGE_INT_PIN		0x3D
+#define PCI_BRIDGE_CTL			0x3E
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/drv/pciintel/pciintel.ma
===================================================================
--- uspace/drv/pciintel/pciintel.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/pciintel/pciintel.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,1 @@
+10 intel_pci
Index: uspace/drv/root/Makefile
===================================================================
--- uspace/drv/root/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/root/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2010 Lenka Trochtova
+# 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.
+#
+
+USPACE_PREFIX = ../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include
+BINARY = root
+
+SOURCES = \
+	root.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/root/root.c
===================================================================
--- uspace/drv/root/root.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/root/root.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup root Root device driver.
+ * @brief HelenOS root device driver.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <str.h>
+#include <ctype.h>
+#include <macros.h>
+
+#include <driver.h>
+#include <devman.h>
+#include <ipc/devman.h>
+
+#define NAME "root"
+
+static int root_add_device(device_t *dev);
+
+/** The root device driver's standard operations. */
+static driver_ops_t root_ops = {
+	.add_device = &root_add_device
+};
+
+/** The root device driver structure. */
+static driver_t root_driver = {
+	.name = NAME,
+	.driver_ops = &root_ops
+};
+
+/** Create the device which represents the root of HW device tree.
+ *
+ * @param parent	Parent of the newly created device.
+ * @return 0 on success, negative error number otherwise.
+ */
+static int add_platform_child(device_t *parent)
+{
+	printf(NAME ": adding new child for platform device.\n");
+	
+	int res = EOK;
+	device_t *platform = NULL;
+	match_id_t *match_id = NULL;
+	
+	/* Create new device. */
+	platform = create_device();
+	if (NULL == platform) {
+		res = ENOMEM;
+		goto failure;
+	}	
+	
+	platform->name = "hw";
+	printf(NAME ": the new device's name is %s.\n", platform->name);
+	
+	/* Initialize match id list. */
+	match_id = create_match_id();
+	if (NULL == match_id) {
+		res = ENOMEM;
+		goto failure;
+	}
+	
+	/* TODO - replace this with some better solution (sysinfo ?) */
+	match_id->id = STRING(UARCH);
+	match_id->score = 100;
+	add_match_id(&platform->match_ids, match_id);
+	
+	/* Register child device. */
+	res = child_device_register(platform, parent);
+	if (EOK != res)
+		goto failure;
+	
+	return res;
+	
+failure:
+	if (NULL != match_id)
+		match_id->id = NULL;
+	
+	if (NULL != platform) {
+		platform->name = NULL;
+		delete_device(platform);
+	}
+	
+	return res;
+}
+
+/** Get the root device.
+ *
+ * @param dev		The device which is root of the whole device tree (both
+ *			of HW and pseudo devices).
+ */
+static int root_add_device(device_t *dev)
+{
+	printf(NAME ": root_add_device, device handle = %d\n", dev->handle);
+	
+	/* Register root device's children. */
+	int res = add_platform_child(dev);
+	if (EOK != res)
+		printf(NAME ": failed to add child device for platform.\n");
+	
+	return res;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS root device driver\n");
+	return driver_main(&root_driver);
+}
+
+/**
+ * @}
+ */
+
Index: uspace/drv/root/root.ma
===================================================================
--- uspace/drv/root/root.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/root/root.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,1 @@
+10 root
Index: uspace/drv/rootia32/Makefile
===================================================================
--- uspace/drv/rootia32/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/rootia32/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2010 Lenka Trochtova
+# 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.
+#
+
+USPACE_PREFIX = ../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include
+BINARY = rootia32
+
+SOURCES = \
+	rootia32.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/rootia32/rootia32.c
===================================================================
--- uspace/drv/rootia32/rootia32.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/rootia32/rootia32.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup root_ia32 Root HW device driver for ia32 platform.
+ * @brief HelenOS root HW device driver for ia32 platform.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <str.h>
+#include <ctype.h>
+#include <macros.h>
+
+#include <driver.h>
+#include <devman.h>
+#include <ipc/devman.h>
+#include <ipc/dev_iface.h>
+#include <resource.h>
+#include <device/hw_res.h>
+
+#define NAME "rootia32"
+
+typedef struct rootia32_child_dev_data {
+	hw_resource_list_t hw_resources;
+} rootia32_child_dev_data_t;
+
+static int rootia32_add_device(device_t *dev);
+static void root_ia32_init(void);
+
+/** The root device driver's standard operations. */
+static driver_ops_t rootia32_ops = {
+	.add_device = &rootia32_add_device
+};
+
+/** The root device driver structure. */
+static driver_t rootia32_driver = {
+	.name = NAME,
+	.driver_ops = &rootia32_ops
+};
+
+static hw_resource_t pci_conf_regs = {
+	.type = IO_RANGE,
+	.res.io_range = {
+		.address = 0xCF8,
+		.size = 8,
+		.endianness = LITTLE_ENDIAN
+	}
+};
+
+static rootia32_child_dev_data_t pci_data = {
+	.hw_resources = {
+		1,
+		&pci_conf_regs
+	}
+};
+
+static hw_resource_list_t *rootia32_get_child_resources(device_t *dev)
+{
+	rootia32_child_dev_data_t *data;
+	
+	data = (rootia32_child_dev_data_t *) dev->driver_data;
+	if (NULL == data)
+		return NULL;
+	
+	return &data->hw_resources;
+}
+
+static bool rootia32_enable_child_interrupt(device_t *dev)
+{
+	/* TODO */
+	
+	return false;
+}
+
+static resource_iface_t child_res_iface = {
+	&rootia32_get_child_resources,
+	&rootia32_enable_child_interrupt
+};
+
+/* Initialized in root_ia32_init() function. */
+static device_ops_t rootia32_child_ops;
+
+static bool
+rootia32_add_child(device_t *parent, const char *name, const char *str_match_id,
+    rootia32_child_dev_data_t *drv_data)
+{
+	printf(NAME ": adding new child device '%s'.\n", name);
+	
+	device_t *child = NULL;
+	match_id_t *match_id = NULL;
+	
+	/* Create new device. */
+	child = create_device();
+	if (NULL == child)
+		goto failure;
+	
+	child->name = name;
+	child->driver_data = drv_data;
+	
+	/* Initialize match id list */
+	match_id = create_match_id();
+	if (NULL == match_id)
+		goto failure;
+	
+	match_id->id = str_match_id;
+	match_id->score = 100;
+	add_match_id(&child->match_ids, match_id);
+	
+	/* Set provided operations to the device. */
+	child->ops = &rootia32_child_ops;
+	
+	/* Register child device. */
+	if (EOK != child_device_register(child, parent))
+		goto failure;
+	
+	return true;
+	
+failure:
+	if (NULL != match_id)
+		match_id->id = NULL;
+	
+	if (NULL != child) {
+		child->name = NULL;
+		delete_device(child);
+	}
+	
+	printf(NAME ": failed to add child device '%s'.\n", name);
+	
+	return false;
+}
+
+static bool rootia32_add_children(device_t *dev)
+{
+	return rootia32_add_child(dev, "pci0", "intel_pci", &pci_data);
+}
+
+/** Get the root device.
+ *
+ * @param dev		The device which is root of the whole device tree (both
+ *			of HW and pseudo devices).
+ * @return		Zero on success, negative error number otherwise.
+ */
+static int rootia32_add_device(device_t *dev)
+{
+	printf(NAME ": rootia32_add_device, device handle = %d\n", dev->handle);
+	
+	/* Register child devices. */
+	if (!rootia32_add_children(dev)) {
+		printf(NAME ": failed to add child devices for platform "
+		    "ia32.\n");
+	}
+	
+	return EOK;
+}
+
+static void root_ia32_init(void)
+{
+	rootia32_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_res_iface;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS rootia32 device driver\n");
+	root_ia32_init();
+	return driver_main(&rootia32_driver);
+}
+
+/**
+ * @}
+ */
Index: uspace/drv/rootia32/rootia32.ma
===================================================================
--- uspace/drv/rootia32/rootia32.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/drv/rootia32/rootia32.ma	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,1 @@
+10 ia32
Index: uspace/lib/c/Makefile
===================================================================
--- uspace/lib/c/Makefile	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -57,4 +57,7 @@
 	generic/clipboard.c \
 	generic/devmap.c \
+	generic/devman.c \
+	generic/device/hw_res.c \
+	generic/device/char.c \
 	generic/event.c \
 	generic/errno.c \
Index: uspace/lib/c/arch/abs32le/include/istate.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/istate.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/abs32le/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,26 +36,5 @@
 #define LIBC_abs32le__ISTATE_H_
 
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * On real hardware this stores the registers which
- * need to be preserved during interupts.
- */
-typedef struct istate {
-	uintptr_t ip;
-	uintptr_t fp;
-	uint32_t stack[];
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->ip;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->fp;
-}
+#include <arch/istate.h>
 
 #endif
Index: uspace/lib/c/arch/amd64/include/istate.h
===================================================================
--- uspace/lib/c/arch/amd64/include/istate.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/amd64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,37 +36,5 @@
 #define LIBC_amd64_ISTATE_H_
 
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint64_t rax;
-	uint64_t rcx;
-	uint64_t rdx;
-	uint64_t rsi;
-	uint64_t rdi;
-	uint64_t r8;
-	uint64_t r9;
-	uint64_t r10;
-	uint64_t r11;
-	uint64_t rbp;
-	uint64_t error_word;
-	uint64_t rip;
-	uint64_t cs;
-	uint64_t rflags;
-	uint64_t stack[]; /* Additional data on stack */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->rip;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->rbp;
-}
+#include <arch/istate.h>
 
 #endif
Index: uspace/lib/c/arch/amd64/src/entry.s
===================================================================
--- uspace/lib/c/arch/amd64/src/entry.s	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/amd64/src/entry.s	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -42,5 +42,5 @@
 	#
 	pushq $0
-	mov %rsp, %rbp
+	movq %rsp, %rbp
 	
 	# %rdi was deliberately chosen as the first argument is also in %rdi
Index: uspace/lib/c/arch/amd64/src/fibril.S
===================================================================
--- uspace/lib/c/arch/amd64/src/fibril.S	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/amd64/src/fibril.S	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -49,6 +49,6 @@
 	movq %rax, OFFSET_TLS(%rdi)
 		
-	xorq %rax,%rax		# context_save returns 1
-	incq %rax
+	xorl %eax, %eax		# context_save returns 1
+	incl %eax
 	ret
 
@@ -67,7 +67,7 @@
 	# Set thread local storage
 	movq OFFSET_TLS(%rdi), %rdi   # Set arg1 to TLS addr
-	movq $1, %rax		# SYS_TLS_SET
+	movl $1, %eax		# SYS_TLS_SET
 	syscall
 
-	xorq %rax,%rax		# context_restore returns 0
+	xorl %eax, %eax		# context_restore returns 0
 	ret
Index: uspace/lib/c/arch/arm32/include/istate.h
===================================================================
--- uspace/lib/c/arch/arm32/include/istate.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/arm32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,41 +36,5 @@
 #define LIBC_arm32__ISTATE_H_
 
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint32_t spsr;
-	uint32_t sp;
-	uint32_t lr;
-
-	uint32_t r0;
-	uint32_t r1;
-	uint32_t r2;
-	uint32_t r3;
-	uint32_t r4;
-	uint32_t r5;
-	uint32_t r6;
-	uint32_t r7;
-	uint32_t r8;
-	uint32_t r9;
-	uint32_t r10;
-	uint32_t fp;
-	uint32_t r12;
-
-	uint32_t pc;
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->pc;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->fp;
-}
+#include <arch/istate.h>
 
 #endif
Index: uspace/lib/c/arch/ia32/include/istate.h
===================================================================
--- uspace/lib/c/arch/ia32/include/istate.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/ia32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,37 +36,5 @@
 #define LIBC_ia32__ISTATE_H_
 
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint32_t eax;
-	uint32_t ecx;
-	uint32_t edx;
-	uint32_t ebp;
-
-	uint32_t gs;
-	uint32_t fs;
-	uint32_t es;
-	uint32_t ds;
-
-	uint32_t error_word;
-	uint32_t eip;
-	uint32_t cs;
-	uint32_t eflags;
-	uint32_t stack[];
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->eip;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->ebp;
-}
+#include <arch/istate.h>
 
 #endif
Index: uspace/lib/c/arch/ia64/include/istate.h
===================================================================
--- uspace/lib/c/arch/ia64/include/istate.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/ia64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,25 +36,5 @@
 #define LIBC_ia64_ISTATE_H_
 
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	/* TODO */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
+#include <arch/istate.h>
 
 #endif
Index: uspace/lib/c/arch/mips32/include/istate.h
===================================================================
--- uspace/lib/c/arch/mips32/include/istate.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/mips32/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,50 +36,5 @@
 #define LIBC_mips32__ISTATE_H_
 
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint32_t at;
-	uint32_t v0;
-	uint32_t v1;
-	uint32_t a0;
-	uint32_t a1;
-	uint32_t a2;
-	uint32_t a3;
-	uint32_t t0;
-	uint32_t t1;
-	uint32_t t2;
-	uint32_t t3;
-	uint32_t t4;
-	uint32_t t5;
-	uint32_t t6;
-	uint32_t t7;
-	uint32_t t8;
-	uint32_t t9;
-	uint32_t gp;
-	uint32_t sp;
-	uint32_t ra;
-
-	uint32_t lo;
-	uint32_t hi;
-
-	uint32_t status; /* cp0_status */
-	uint32_t epc; /* cp0_epc */
-	uint32_t k1; /* We use it as thread-local pointer */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->epc;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
+#include <arch/istate.h>
 
 #endif
Index: uspace/lib/c/arch/sparc64/include/istate.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/istate.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/arch/sparc64/include/istate.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,25 +36,5 @@
 #define LIBC_sparc64_ISTATE_H_
 
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	/* TODO */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
+#include <arch/istate.h>
 
 #endif
Index: uspace/lib/c/generic/adt/dynamic_fifo.c
===================================================================
--- uspace/lib/c/generic/adt/dynamic_fifo.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/generic/adt/dynamic_fifo.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,5 +28,5 @@
 
 /** @addtogroup libc
- *  @{
+ * @{
  */
 
@@ -34,10 +34,10 @@
  * Dynamic first in first out positive integer queue implementation.
  */
+
+#include <adt/dynamic_fifo.h>
 
 #include <errno.h>
 #include <malloc.h>
 #include <mem.h>
-
-#include <adt/dynamic_fifo.h>
 
 /** Internal magic value for a consistency check. */
@@ -106,5 +106,5 @@
 int dyn_fifo_push(dyn_fifo_ref fifo, int value, int max_size)
 {
-	int * new_items;
+	int *new_items;
 
 	if (!dyn_fifo_is_valid(fifo))
@@ -149,5 +149,5 @@
 /** Returns and excludes the first item in the queue.
  *
- * @param[in,out] fifoi	The dynamic queue.
+ * @param[in,out] fifo	The dynamic queue.
  * @returns		Value of the first item in the queue.
  * @returns		EINVAL if the queue is not valid.
@@ -189,7 +189,7 @@
 /** Clears and destroys the queue.
  *
- *  @param[in,out] fifo		The dynamic queue.
- *  @returns			EOK on success.
- *  @returns			EINVAL if the queue is not valid.
+ * @param[in,out] fifo	The dynamic queue.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the queue is not valid.
  */
 int dyn_fifo_destroy(dyn_fifo_ref fifo)
Index: uspace/lib/c/generic/adt/measured_strings.c
===================================================================
--- uspace/lib/c/generic/adt/measured_strings.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/generic/adt/measured_strings.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -52,7 +52,7 @@
  * @param[in] string	The initial character string to be stored.
  * @param[in] length	The length of the given string without the terminating
- *			zero ('/0') character. If the length is zero (0), the
- *			actual length is computed. The given length is used and
- *			appended with the terminating zero ('\\0') character
+ *			zero ('\0') character. If the length is zero, the actual
+ *			length is computed. The given length is used and
+ *			appended with the terminating zero ('\0') character
  *			otherwise.
  * @returns		The new bundled character string with measured length.
@@ -60,5 +60,5 @@
  */
 measured_string_ref
-measured_string_create_bulk(const char * string, size_t length)
+measured_string_create_bulk(const char *string, size_t length)
 {
 	measured_string_ref new;
@@ -66,5 +66,5 @@
 	if (length == 0) {
 		while (string[length])
-			++length;
+			length++;
 	}
 	new = (measured_string_ref) malloc(sizeof(measured_string_t) +
@@ -104,7 +104,6 @@
 			new->value[new->length] = '\0';
 			return new;
-		} else {
-			free(new);
 		}
+		free(new);
 	}
 
@@ -156,6 +155,6 @@
 		return EINVAL;
 	}
-	if(ERROR_OCCURRED(async_data_write_finalize(callid, lengths,
-	    sizeof(size_t) * (count + 1)))) {
+	if (ERROR_OCCURRED(async_data_write_finalize(callid, lengths,
+	    length))) {
 		free(lengths);
 		return ERROR_CODE;
@@ -163,5 +162,5 @@
 
 	*data = malloc(lengths[count]);
-	if (!(*data)) {
+	if (!*data) {
 		free(lengths);
 		return ENOMEM;
@@ -171,5 +170,5 @@
 	*strings = (measured_string_ref) malloc(sizeof(measured_string_t) *
 	    count);
-	if (!(*strings)) {
+	if (!*strings) {
 		free(lengths);
 		free(*data);
@@ -178,8 +177,8 @@
 
 	next = *data;
-	for (index = 0; index < count; ++index) {
+	for (index = 0; index < count; index++) {
 		(*strings)[index].length = lengths[index];
 		if (lengths[index] > 0) {
-			if ((!async_data_write_receive(&callid, &length)) ||
+			if (!async_data_write_receive(&callid, &length) ||
 			    (length != lengths[index])) {
 				free(*data);
@@ -188,10 +187,14 @@
 				return EINVAL;
 			}
-			ERROR_PROPAGATE(async_data_write_finalize(callid, next,
-			    lengths[index]));
+			if (ERROR_OCCURRED(async_data_write_finalize(callid,
+			    next, lengths[index]))) {
+				free(*data);
+				free(*strings);
+				free(lengths);
+				return ERROR_CODE;
+			}
 			(*strings)[index].value = next;
 			next += lengths[index];
-			*next = '\0';
-			++next;
+			*next++ = '\0';
 		} else {
 			(*strings)[index].value = NULL;
@@ -221,5 +224,5 @@
 
 	length = 0;
-	for (index = 0; index < count; ++ index) {
+	for (index = 0; index < count; index++) {
 		lengths[index] = strings[index].length;
 		length += lengths[index] + 1;
@@ -262,11 +265,10 @@
 		return ENOMEM;
 
-	if ((!async_data_read_receive(&callid, &length)) ||
+	if (!async_data_read_receive(&callid, &length) ||
 	    (length != sizeof(size_t) * (count + 1))) {
 		free(lengths);
 		return EINVAL;
 	}
-	if (ERROR_OCCURRED(async_data_read_finalize(callid, lengths,
-	    sizeof(size_t) * (count + 1)))) {
+	if (ERROR_OCCURRED(async_data_read_finalize(callid, lengths, length))) {
 		free(lengths);
 		return ERROR_CODE;
@@ -274,7 +276,7 @@
 	free(lengths);
 
-	for (index = 0; index < count; ++ index) {
+	for (index = 0; index < count; index++) {
 		if (strings[index].length > 0) {
-			if((!async_data_read_receive(&callid, &length))	||
+			if (!async_data_read_receive(&callid, &length) ||
 			    (length != strings[index].length)) {
 				return EINVAL;
@@ -317,5 +319,5 @@
 	char *next;
 
-	if ((phone <= 0) || (!strings) || (!data) || (count <= 0))
+	if ((phone < 0) || (!strings) || (!data) || (count <= 0))
 		return EINVAL;
 
@@ -331,5 +333,5 @@
 
 	*data = malloc(lengths[count]);
-	if (!(*data)) {
+	if (!*data) {
 		free(lengths);
 		return ENOMEM;
@@ -338,5 +340,5 @@
 	*strings = (measured_string_ref) malloc(sizeof(measured_string_t) *
 	    count);
-	if (!(*strings)) {
+	if (!*strings) {
 		free(lengths);
 		free(*data);
@@ -345,13 +347,17 @@
 
 	next = *data;
-	for (index = 0; index < count; ++ index) {
+	for (index = 0; index < count; index++) {
 		(*strings)[index].length = lengths[index];
 		if (lengths[index] > 0) {
-			ERROR_PROPAGATE(async_data_read_start(phone, next,
-			    lengths[index]));
+			if (ERROR_OCCURRED(async_data_read_start(phone, next,
+			    lengths[index]))) {
+			    	free(lengths);
+				free(data);
+				free(strings);
+				return ERROR_CODE;
+			}
 			(*strings)[index].value = next;
 			next += lengths[index];
-			*next = '\0';
-			++ next;
+			*next++ = '\0';
 		} else {
 			(*strings)[index].value = NULL;
@@ -386,5 +392,5 @@
 	size_t index;
 
-	if ((phone <= 0) || (!strings) || (count <= 0))
+	if ((phone < 0) || (!strings) || (count <= 0))
 		return EINVAL;
 
@@ -401,5 +407,5 @@
 	free(lengths);
 
-	for (index = 0; index < count; ++index) {
+	for (index = 0; index < count; index++) {
 		if (strings[index].length > 0) {
 			ERROR_PROPAGATE(async_data_write_start(phone,
Index: uspace/lib/c/generic/ddi.c
===================================================================
--- uspace/lib/c/generic/ddi.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/generic/ddi.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -96,4 +96,26 @@
 }
 
+/** Enable an interrupt.
+ * 
+ * @param irq the interrupt.
+ * 
+ * @return Zero on success, negative error code otherwise. 
+ */
+int interrupt_enable(int irq) 
+{
+	return __SYSCALL2(SYS_INTERRUPT_ENABLE, (sysarg_t) irq, 1);
+}
+
+/** Disable an interrupt.
+ * 
+ * @param irq the interrupt.
+ * 
+ * @return Zero on success, negative error code otherwise. 
+ */
+int interrupt_disable(int irq) 
+{
+	return __SYSCALL2(SYS_INTERRUPT_ENABLE, (sysarg_t) irq, 0);
+}
+
 /** Enable PIO for specified I/O range.
  *
Index: uspace/lib/c/generic/device/char.c
===================================================================
--- uspace/lib/c/generic/device/char.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/generic/device/char.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <ipc/dev_iface.h>
+#include <device/char.h>
+#include <errno.h>
+#include <async.h>
+#include <malloc.h>
+#include <stdio.h>
+
+/** Read to or write from the device using its character interface.
+ * 
+ * Helper function.
+ * 
+ * @param dev_phone phone to the device.
+ * @param buf the buffer for the data read from or written to the device.
+ * @param len the maximum length of the data to be read or written.
+ * @param read read from the device if true, write to it otherwise.
+ * 
+ * @return non-negative number of bytes actually read from or written to the device on success,
+ * negative error number otherwise.
+ * 
+ */
+static int rw_dev(int dev_phone, void *buf, size_t len, bool read) 
+{
+	ipc_call_t answer;
+	
+	async_serialize_start();
+	
+	aid_t req;
+	int ret;
+	
+	if (read) {
+		req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE), CHAR_READ_DEV, &answer);
+		ret = async_data_read_start(dev_phone, buf, len);		
+	} else {
+		req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE), CHAR_WRITE_DEV, &answer);
+		ret = async_data_write_start(dev_phone, buf, len);
+	}
+	
+	ipcarg_t rc;
+	if (ret != EOK) {		
+		async_wait_for(req, &rc);
+		async_serialize_end();
+		if (rc == EOK) {
+			return ret;
+		}
+		else {
+			return (int) rc;
+		}
+	}
+	
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	
+	ret = (int)rc;
+	if (EOK != ret) {
+		return ret;
+	}
+	
+	return IPC_GET_ARG1(answer);	
+}
+
+/** Read from the device using its character interface.
+ * 
+ * @param dev_phone phone to the device.
+ * @param buf the output buffer for the data read from the device.
+ * @param len the maximum length of the data to be read.
+ * 
+ * @return non-negative number of bytes actually read from the device on success, negative error number otherwise.
+ */
+int read_dev(int dev_phone, void *buf, size_t len)
+{	
+	return rw_dev(dev_phone, buf, len, true);
+}
+
+/** Write to the device using its character interface.
+ * 
+ * @param dev_phone phone to the device.
+ * @param buf the input buffer containg the data to be written to the device.
+ * @param len the maximum length of the data to be written.
+ * 
+ * @return non-negative number of bytes actually written to the device on success, negative error number otherwise.
+ */
+int write_dev(int dev_phone, void *buf, size_t len)
+{
+	return rw_dev(dev_phone, buf, len, false);
+}
+
+  
+ /** @}
+ */
Index: uspace/lib/c/generic/device/hw_res.c
===================================================================
--- uspace/lib/c/generic/device/hw_res.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/generic/device/hw_res.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+ 
+#include <device/hw_res.h>
+#include <errno.h>
+#include <async.h>
+#include <malloc.h>
+
+bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources)
+{
+	ipcarg_t count = 0;
+	int rc = async_req_1_1(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), GET_RESOURCE_LIST, &count);
+	hw_resources->count = count;
+	if (EOK != rc) {
+		return false;
+	}
+	
+	size_t size = count * sizeof(hw_resource_t);
+	hw_resources->resources = (hw_resource_t *)malloc(size);
+	if (NULL == hw_resources->resources) {
+		return false;
+	}
+	
+	rc = async_data_read_start(dev_phone, hw_resources->resources, size);
+	if (EOK != rc) {
+		free(hw_resources->resources);
+		hw_resources->resources = NULL;
+		return false;
+	}
+	 	 
+	return true;	 
+}
+
+bool enable_interrupt(int dev_phone)
+{
+	int rc = async_req_1_0(dev_phone, DEV_IFACE_ID(HW_RES_DEV_IFACE), ENABLE_INTERRUPT);
+	return rc == EOK;
+}
+ 
+ 
+ 
+ /** @}
+ */
Index: uspace/lib/c/generic/devman.c
===================================================================
--- uspace/lib/c/generic/devman.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/generic/devman.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,294 @@
+/*
+ * Copyright (c) 2007 Josef Cejka
+ * Copyright (c) 2009 Jiri Svoboda
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <str.h>
+#include <stdio.h>
+#include <ipc/ipc.h>
+#include <ipc/services.h>
+#include <ipc/devman.h>
+#include <devman.h>
+#include <async.h>
+#include <errno.h>
+#include <malloc.h>
+#include <bool.h>
+#include <adt/list.h>
+
+static int devman_phone_driver = -1;
+static int devman_phone_client = -1;
+
+int devman_get_phone(devman_interface_t iface, unsigned int flags)
+{
+	switch (iface) {
+	case DEVMAN_DRIVER:
+		if (devman_phone_driver >= 0)
+			return devman_phone_driver;
+		
+		if (flags & IPC_FLAG_BLOCKING)
+			devman_phone_driver = ipc_connect_me_to_blocking(PHONE_NS,
+			    SERVICE_DEVMAN, DEVMAN_DRIVER, 0);
+		else
+			devman_phone_driver = ipc_connect_me_to(PHONE_NS,
+			    SERVICE_DEVMAN, DEVMAN_DRIVER, 0);
+		
+		return devman_phone_driver;
+	case DEVMAN_CLIENT:
+		if (devman_phone_client >= 0)
+			return devman_phone_client;
+		
+		if (flags & IPC_FLAG_BLOCKING)
+			devman_phone_client = ipc_connect_me_to_blocking(PHONE_NS,
+			    SERVICE_DEVMAN, DEVMAN_CLIENT, 0);
+		else
+			devman_phone_client = ipc_connect_me_to(PHONE_NS,
+			    SERVICE_DEVMAN, DEVMAN_CLIENT, 0);
+		
+		return devman_phone_client;
+	default:
+		return -1;
+	}
+}
+
+/** Register running driver with device manager. */
+int devman_driver_register(const char *name, async_client_conn_t conn)
+{
+	int phone = devman_get_phone(DEVMAN_DRIVER, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_2(phone, DEVMAN_DRIVER_REGISTER, 0, 0, &answer);
+	
+	ipcarg_t retval = async_data_write_start(phone, name, str_size(name));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return -1;
+	}
+	
+	async_set_client_connection(conn);
+	
+	ipcarg_t callback_phonehash;
+	ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
+	async_wait_for(req, &retval);
+	
+	async_serialize_end();
+	
+	return retval;
+}
+
+static int devman_send_match_id(int phone, match_id_t *match_id) \
+{
+	ipc_call_t answer;
+	async_send_1(phone, DEVMAN_ADD_MATCH_ID, match_id->score, &answer);
+	int retval = async_data_write_start(phone, match_id->id, str_size(match_id->id));
+	return retval;	
+}
+
+
+static int devman_send_match_ids(int phone, match_id_list_t *match_ids) 
+{
+	link_t *link = match_ids->ids.next;
+	match_id_t *match_id = NULL;
+	int ret = EOK;
+	
+	while (link != &match_ids->ids) {
+		match_id = list_get_instance(link, match_id_t, link); 
+		if (EOK != (ret = devman_send_match_id(phone, match_id))) 
+		{
+			printf("Driver failed to send match id, error number = %d\n", ret);
+			return ret;			
+		}
+		link = link->next;
+	}
+	return ret;	
+}
+
+int devman_child_device_register(
+	const char *name, match_id_list_t *match_ids, device_handle_t parent_handle, device_handle_t *handle)
+{		
+	int phone = devman_get_phone(DEVMAN_DRIVER, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	
+	int match_count = list_count(&match_ids->ids);	
+	ipc_call_t answer;
+	aid_t req = async_send_2(phone, DEVMAN_ADD_CHILD_DEVICE, parent_handle, match_count, &answer);
+
+	ipcarg_t retval = async_data_write_start(phone, name, str_size(name));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return retval;
+	}
+	
+	devman_send_match_ids(phone, match_ids);
+	
+	async_wait_for(req, &retval);
+	
+	async_serialize_end();
+	
+	if (retval != EOK) {
+		if (handle != NULL) {
+			*handle = -1;
+		}
+		return retval;
+	}	
+	
+	if (handle != NULL)
+		*handle = (int) IPC_GET_ARG1(answer);	
+		
+	return retval;
+}
+
+int devman_add_device_to_class(device_handle_t dev_handle, const char *class_name)
+{
+	int phone = devman_get_phone(DEVMAN_DRIVER, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	ipc_call_t answer;
+	aid_t req = async_send_1(phone, DEVMAN_ADD_DEVICE_TO_CLASS, dev_handle, &answer);
+	
+	ipcarg_t retval = async_data_write_start(phone, class_name, str_size(class_name));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return retval;
+	}
+	
+	async_wait_for(req, &retval);
+	async_serialize_end();
+	
+	return retval;	
+}
+
+void devman_hangup_phone(devman_interface_t iface)
+{
+	switch (iface) {
+	case DEVMAN_DRIVER:
+		if (devman_phone_driver >= 0) {
+			ipc_hangup(devman_phone_driver);
+			devman_phone_driver = -1;
+		}
+		break;
+	case DEVMAN_CLIENT:
+		if (devman_phone_client >= 0) {
+			ipc_hangup(devman_phone_client);
+			devman_phone_client = -1;
+		}
+		break;
+	default:
+		break;
+	}
+}
+
+int devman_device_connect(device_handle_t handle, unsigned int flags)
+{
+	int phone;
+	
+	if (flags & IPC_FLAG_BLOCKING) {
+		phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
+		    DEVMAN_CONNECT_TO_DEVICE, handle);
+	} else {
+		phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
+		    DEVMAN_CONNECT_TO_DEVICE, handle);
+	}
+	
+	return phone;
+}
+
+int devman_parent_device_connect(device_handle_t handle, unsigned int flags)
+{
+	int phone;
+	
+	if (flags & IPC_FLAG_BLOCKING) {
+		phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAN,
+		    DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle);
+	} else {
+		phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAN,
+		    DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle);
+	}
+	
+	return phone;
+}
+
+int devman_device_get_handle(const char *pathname, device_handle_t *handle, unsigned int flags)
+{
+	int phone = devman_get_phone(DEVMAN_CLIENT, flags);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_2(phone, DEVMAN_DEVICE_GET_HANDLE, flags, 0,
+	    &answer);
+	
+	ipcarg_t retval = async_data_write_start(phone, pathname, str_size(pathname));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return retval;
+	}
+	
+	async_wait_for(req, &retval);
+	
+	async_serialize_end();
+	
+	if (retval != EOK) {
+		if (handle != NULL)
+			*handle = (device_handle_t) -1;
+		return retval;
+	}
+	
+	if (handle != NULL)
+		*handle = (device_handle_t) IPC_GET_ARG1(answer);
+	
+	return retval;
+}
+
+
+/** @}
+ */
Index: uspace/lib/c/include/adt/measured_strings.h
===================================================================
--- uspace/lib/c/include/adt/measured_strings.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/include/adt/measured_strings.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -43,10 +43,10 @@
 
 /** Type definition of the character string with measured length.
- *  @see measured_string
+ * @see measured_string
  */
 typedef struct measured_string measured_string_t;
 
 /** Type definition of the character string with measured length pointer.
- *  @see measured_string
+ * @see measured_string
  */
 typedef measured_string_t *measured_string_ref;
@@ -59,5 +59,5 @@
 struct measured_string {
 	/** Character string data. */
-	char * value;
+	char *value;
 	/** Character string length. */
 	size_t length;
Index: uspace/lib/c/include/ddi.h
===================================================================
--- uspace/lib/c/include/ddi.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/include/ddi.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -42,4 +42,6 @@
 extern int iospace_enable(task_id_t, void *, unsigned long);
 extern int pio_enable(void *, size_t, void **);
+extern int interrupt_enable(int);
+extern int interrupt_disable(int);
 
 #endif
Index: uspace/lib/c/include/device/char.h
===================================================================
--- uspace/lib/c/include/device/char.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/device/char.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+ 
+#ifndef LIBC_DEVICE_HW_RES_H_
+#define LIBC_DEVICE_HW_RES_H_
+
+typedef enum {
+	CHAR_READ_DEV = 0,
+	CHAR_WRITE_DEV	
+} hw_res_funcs_t;
+
+int read_dev(int dev_phone, void *buf, size_t len);
+int write_dev(int dev_phone, void *buf, size_t len);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/device/hw_res.h
===================================================================
--- uspace/lib/c/include/device/hw_res.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/device/hw_res.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+ 
+#ifndef LIBC_DEVICE_HW_RES_H_
+#define LIBC_DEVICE_HW_RES_H_
+
+#include <ipc/dev_iface.h>
+#include <bool.h>
+
+// HW resource provider interface
+
+typedef enum {
+	GET_RESOURCE_LIST = 0,
+	ENABLE_INTERRUPT	
+} hw_res_funcs_t;
+
+/** HW resource types. */
+typedef enum {
+	INTERRUPT,
+	IO_RANGE, 
+	MEM_RANGE
+} hw_res_type_t;
+
+typedef enum {
+	LITTLE_ENDIAN = 0,
+	BIG_ENDIAN
+} endianness_t;
+
+
+/** HW resource (e.g. interrupt, memory register, i/o register etc.). */
+typedef struct hw_resource {
+	hw_res_type_t type;
+	union {
+		struct {
+			uint64_t address;
+			endianness_t endianness;			
+			size_t size;			
+		} mem_range;
+		struct {
+			uint64_t address;
+			endianness_t endianness;			
+			size_t size;			
+		} io_range;
+		struct {
+			int irq;			
+		} interrupt;		
+	} res;	
+} hw_resource_t;
+
+typedef struct hw_resource_list {
+	size_t count;
+	hw_resource_t *resources;	
+} hw_resource_list_t;
+
+static inline void clean_hw_resource_list(hw_resource_list_t *hw_res)
+{
+	if(NULL != hw_res->resources) {
+		free(hw_res->resources);
+		hw_res->resources = NULL;
+	}
+	hw_res->count = 0;	
+}
+
+
+
+bool get_hw_resources(int dev_phone, hw_resource_list_t *hw_resources);
+
+bool enable_interrupt(int dev_phone);
+
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/devman.h
===================================================================
--- uspace/lib/c/include/devman.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/devman.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2009 Jiri Svoboda
+ * Copyright (c) 2010 Lenka Trochtova 
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_DEVMAN_H_
+#define LIBC_DEVMAN_H_
+
+#include <ipc/devman.h>
+#include <async.h>
+#include <bool.h>
+
+
+int devman_get_phone(devman_interface_t, unsigned int);
+void devman_hangup_phone(devman_interface_t iface);
+
+int devman_driver_register(const char *, async_client_conn_t);
+int devman_child_device_register(const char *, match_id_list_t *, device_handle_t, device_handle_t *);
+
+int devman_device_connect(device_handle_t handle, unsigned int flags);
+int devman_parent_device_connect(device_handle_t handle, unsigned int flags);
+
+int devman_device_get_handle(const char *pathname, device_handle_t *handle, unsigned int flags);
+
+int devman_add_device_to_class(device_handle_t dev_handle, const char *class_name);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/dev_iface.h
===================================================================
--- uspace/lib/c/include/ipc/dev_iface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/ipc/dev_iface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+#ifndef LIBC_IPC_DEV_IFACE_H_
+#define LIBC_IPC_DEV_IFACE_H_
+
+#include <ipc/ipc.h>
+#include <malloc.h>
+#include <unistd.h>
+#include <libarch/types.h>
+
+typedef enum {	
+	HW_RES_DEV_IFACE = 0,	
+	CHAR_DEV_IFACE,
+	// TODO add more interfaces
+	DEV_IFACE_MAX
+} dev_inferface_idx_t;
+
+#define DEV_IFACE_ID(idx)	((idx) + IPC_FIRST_USER_METHOD)
+#define DEV_IFACE_IDX(id)	((id) - IPC_FIRST_USER_METHOD)
+
+#define DEV_IFACE_COUNT			DEV_IFACE_MAX
+#define DEV_FIRST_CUSTOM_METHOD_IDX	DEV_IFACE_MAX
+#define DEV_FIRST_CUSTOM_METHOD \
+	DEV_IFACE_ID(DEV_FIRST_CUSTOM_METHOD_IDX)
+
+
+#endif
Index: uspace/lib/c/include/ipc/devman.h
===================================================================
--- uspace/lib/c/include/ipc/devman.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/ipc/devman.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 devman
+ * @{
+ */
+ 
+#ifndef LIBC_IPC_DEVMAN_H_
+#define LIBC_IPC_DEVMAN_H_
+
+#include <adt/list.h>
+#include <ipc/ipc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <str.h>
+
+#define DEVMAN_NAME_MAXLEN 256
+
+typedef ipcarg_t device_handle_t;
+
+/** Ids of device models used for device-to-driver matching.
+ */
+typedef struct match_id {
+	/** Pointers to next and previous ids.
+	 */
+	link_t link;
+	/** Id of device model.
+	 */
+	const char *id;
+	/** Relevancy of device-to-driver match.
+	 * The higher is the product of scores specified for the device by the bus driver and by the leaf driver,
+	 * the more suitable is the leaf driver for handling the device.
+	 */
+	unsigned int score;
+} match_id_t;
+
+/** List of ids for matching devices to drivers sorted
+ * according to match scores in descending order.
+ */
+typedef struct match_id_list {
+	link_t ids;
+} match_id_list_t;
+
+
+static inline match_id_t * create_match_id()
+{
+	match_id_t *id = malloc(sizeof(match_id_t));
+	memset(id, 0, sizeof(match_id_t));
+	return id;
+}
+
+static inline void delete_match_id(match_id_t *id)
+{
+	if (id) {
+		if (NULL != id->id) {
+			free(id->id);
+		}
+		free(id);
+	}
+}
+
+static inline void add_match_id(match_id_list_t *ids, match_id_t *id) 
+{
+	match_id_t *mid = NULL;
+	link_t *link = ids->ids.next;	
+	
+	while (link != &ids->ids) {
+		mid = list_get_instance(link, match_id_t,link);
+		if (mid->score < id->score) {
+			break;
+		}	
+		link = link->next;
+	}
+	
+	list_insert_before(&id->link, link);	
+}
+
+static inline void init_match_ids(match_id_list_t *id_list)
+{
+	list_initialize(&id_list->ids);
+}
+
+static inline void clean_match_ids(match_id_list_t *ids)
+{
+	link_t *link = NULL;
+	match_id_t *id;
+	
+	while(!list_empty(&ids->ids)) {
+		link = ids->ids.next;
+		list_remove(link);		
+		id = list_get_instance(link, match_id_t, link);
+		delete_match_id(id);		
+	}	
+}
+
+typedef enum {
+	DEVMAN_DRIVER = 1,
+	DEVMAN_CLIENT,
+	DEVMAN_CONNECT_TO_DEVICE,
+	DEVMAN_CONNECT_TO_PARENTS_DEVICE
+} devman_interface_t;
+
+typedef enum {
+	DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
+	DEVMAN_ADD_CHILD_DEVICE,
+	DEVMAN_ADD_MATCH_ID,
+	DEVMAN_ADD_DEVICE_TO_CLASS
+
+} driver_to_devman_t;
+
+typedef enum {
+	DRIVER_ADD_DEVICE = IPC_FIRST_USER_METHOD
+
+} devman_to_driver_t;
+
+typedef enum {
+	DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD
+} client_to_devman_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/driver.h
===================================================================
--- uspace/lib/c/include/ipc/driver.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/ipc/driver.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova 
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#ifndef IPC_DRIVER_H_
+#define IPC_DRIVER_H_
+
+typedef enum {
+	DRIVER_DEVMAN = 1,
+	DRIVER_CLIENT,
+	DRIVER_DRIVER
+} driver_interface_t;
+
+
+#endif
+
+
+/**
+ * @}
+ */
Index: uspace/lib/c/include/ipc/serial.h
===================================================================
--- uspace/lib/c/include/ipc/serial.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/ipc/serial.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,14 @@
+#ifndef LIBC_FB_H_
+#define LIBC_FB_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	SERIAL_PUTCHAR = IPC_FIRST_USER_METHOD,
+	SERIAL_GETCHAR,
+	SERIAL_READ,
+	SERIAL_WRITE,
+} serial_request_t;
+
+
+#endif
Index: uspace/lib/c/include/ipc/serial_ctl.h
===================================================================
--- uspace/lib/c/include/ipc/serial_ctl.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/c/include/ipc/serial_ctl.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+#ifndef LIBC_IPC_SERIAL_CTL_H_
+#define LIBC_IPC_SERIAL_CTL_H_
+
+#include <ipc/dev_iface.h>
+
+/** ipc methods for getting/setting serial communication properties
+ * 	1st ipc arg: baud rate
+ * 	2nd ipc arg: parity
+ *	3rd ipc arg: number of bits in one word
+ *	4th ipc arg: number of stop bits
+ */
+typedef enum {	
+	SERIAL_GET_COM_PROPS = DEV_FIRST_CUSTOM_METHOD,
+	SERIAL_SET_COM_PROPS
+} serial_ctl_t;
+
+typedef enum {
+	SERIAL_NO_PARITY = 0,
+	SERIAL_ODD_PARITY = 1,
+	SERIAL_EVEN_PARITY = 3,
+	SERIAL_MARK_PARITY = 5,
+	SERIAL_SPACE_PARITY = 7	
+} serial_parity_t;
+
+#endif
Index: uspace/lib/c/include/ipc/services.h
===================================================================
--- uspace/lib/c/include/ipc/services.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/include/ipc/services.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -39,5 +39,6 @@
 
 typedef enum {
-	SERVICE_LOAD = 1,
+	SERVICE_NONE = 0,
+	SERVICE_LOAD,
 	SERVICE_PCI,
 	SERVICE_VIDEO,
@@ -45,4 +46,5 @@
 	SERVICE_VFS,
 	SERVICE_DEVMAP,
+	SERVICE_DEVMAN,
 	SERVICE_FHC,
 	SERVICE_OBIO,
Index: uspace/lib/c/include/net/icmp_codes.h
===================================================================
--- uspace/lib/c/include/net/icmp_codes.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/c/include/net/icmp_codes.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -42,4 +42,6 @@
 #define LIBC_ICMP_CODES_H_
 
+#include <sys/types.h>
+
 /** ICMP type type definition. */
 typedef uint8_t icmp_type_t;
Index: uspace/lib/drv/Makefile
===================================================================
--- uspace/lib/drv/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
+# 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.
+#
+
+USPACE_PREFIX = ../..
+EXTRA_CFLAGS = -Iinclude
+LIBRARY = libdrv
+
+SOURCES = \
+	generic/driver.c \
+	generic/dev_iface.c \
+	generic/remote_res.c \
+	generic/remote_char.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/lib/drv/generic/dev_iface.c
===================================================================
--- uspace/lib/drv/generic/dev_iface.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/generic/dev_iface.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup libdrv generic device driver support.
+ * @brief HelenOS generic device driver support.
+ * @{
+ */
+
+/** @file
+ */
+
+#include "dev_iface.h"
+#include "remote_res.h"
+#include "remote_char.h"
+
+static iface_dipatch_table_t remote_ifaces = {
+	.ifaces = {
+		&remote_res_iface,
+		&remote_char_iface
+	}
+};
+
+remote_iface_t* get_remote_iface(int idx)
+{	
+	assert(is_valid_iface_idx(idx));
+	return remote_ifaces.ifaces[idx];
+}
+
+remote_iface_func_ptr_t
+get_remote_method(remote_iface_t *rem_iface, ipcarg_t iface_method_idx)
+{
+	if (iface_method_idx >= rem_iface->method_count) {
+		return NULL;
+	}
+	return rem_iface->methods[iface_method_idx];
+}
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/generic/driver.c
===================================================================
--- uspace/lib/drv/generic/driver.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/generic/driver.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,407 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup libdrv generic device driver support.
+ * @brief HelenOS generic device driver support.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <ipc/services.h>
+#include <ipc/ns.h>
+#include <async.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <str.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include <ipc/driver.h>
+
+#include "driver.h"
+
+/* driver structure */
+
+static driver_t *driver;
+
+/* devices */
+
+LIST_INITIALIZE(devices);
+FIBRIL_MUTEX_INITIALIZE(devices_mutex);
+
+/* interrupts */
+
+static interrupt_context_list_t interrupt_contexts;
+
+static irq_cmd_t default_cmds[] = {
+	{
+		.cmd = CMD_ACCEPT
+	}
+};
+
+static irq_code_t default_pseudocode = {
+	sizeof(default_cmds) / sizeof(irq_cmd_t),
+	default_cmds
+};
+
+
+static void driver_irq_handler(ipc_callid_t iid, ipc_call_t *icall)
+{
+	int id = (int)IPC_GET_METHOD(*icall);
+	interrupt_context_t *ctx;
+	
+	ctx = find_interrupt_context_by_id(&interrupt_contexts, id);
+	if (NULL != ctx && NULL != ctx->handler)
+		(*ctx->handler)(ctx->dev, iid, icall);
+}
+
+int
+register_interrupt_handler(device_t *dev, int irq, interrupt_handler_t *handler,
+    irq_code_t *pseudocode)
+{
+	interrupt_context_t *ctx = create_interrupt_context();
+	
+	ctx->dev = dev;
+	ctx->irq = irq;
+	ctx->handler = handler;
+	
+	add_interrupt_context(&interrupt_contexts, ctx);
+	
+	if (NULL == pseudocode)
+		pseudocode = &default_pseudocode;
+	
+	int res = ipc_register_irq(irq, dev->handle, ctx->id, pseudocode);
+	if (0 != res) {
+		remove_interrupt_context(&interrupt_contexts, ctx);
+		delete_interrupt_context(ctx);
+	}
+
+	return res;
+}
+
+int unregister_interrupt_handler(device_t *dev, int irq)
+{
+	interrupt_context_t *ctx = find_interrupt_context(&interrupt_contexts,
+	    dev, irq);
+	int res = ipc_unregister_irq(irq, dev->handle);
+
+	if (NULL != ctx) {
+		remove_interrupt_context(&interrupt_contexts, ctx);
+		delete_interrupt_context(ctx);
+	}
+	return res;
+}
+
+static void add_to_devices_list(device_t *dev)
+{
+	fibril_mutex_lock(&devices_mutex);
+	list_append(&dev->link, &devices);
+	fibril_mutex_unlock(&devices_mutex);
+}
+
+static void remove_from_devices_list(device_t *dev)
+{
+	fibril_mutex_lock(&devices_mutex);
+	list_remove(&dev->link);
+	fibril_mutex_unlock(&devices_mutex);
+}
+
+static device_t * driver_get_device(link_t *devices, device_handle_t handle)
+{
+	device_t *dev = NULL;
+	
+	fibril_mutex_lock(&devices_mutex);
+	link_t *link = devices->next;
+	while (link != devices) {
+		dev = list_get_instance(link, device_t, link);
+		if (handle == dev->handle) {
+			fibril_mutex_unlock(&devices_mutex);
+			return dev;
+		}
+		link = link->next;
+	}
+	fibril_mutex_unlock(&devices_mutex);
+
+	return NULL;
+}
+
+static void driver_add_device(ipc_callid_t iid, ipc_call_t *icall)
+{
+	char *dev_name = NULL;
+	int res = EOK;
+	
+	device_handle_t dev_handle =  IPC_GET_ARG1(*icall);
+	device_t *dev = create_device();
+	dev->handle = dev_handle;
+	
+	async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0);
+	dev->name = dev_name;
+	
+	add_to_devices_list(dev);
+	res = driver->driver_ops->add_device(dev);
+	if (0 == res) {
+		printf("%s: new device with handle = %x was added.\n",
+		    driver->name, dev_handle);
+	} else {
+		printf("%s: failed to add a new device with handle = %d.\n",
+		    driver->name, dev_handle);
+		remove_from_devices_list(dev);
+		delete_device(dev);
+	}
+	
+	ipc_answer_0(iid, res);
+}
+
+static void driver_connection_devman(ipc_callid_t iid, ipc_call_t *icall)
+{
+	/* Accept connection */
+	ipc_answer_0(iid, EOK);
+
+	bool cont = true;
+	while (cont) {
+		ipc_call_t call;
+		ipc_callid_t callid = async_get_call(&call);
+
+		switch (IPC_GET_METHOD(call)) {
+		case IPC_M_PHONE_HUNGUP:
+			cont = false;
+			continue;
+		case DRIVER_ADD_DEVICE:
+			driver_add_device(callid, &call);
+			break;
+		default:
+			if (!(callid & IPC_CALLID_NOTIFICATION))
+				ipc_answer_0(callid, ENOENT);
+		}
+	}
+}
+
+/**
+ * Generic client connection handler both for applications and drivers.
+ *
+ * @param drv		True for driver client, false for other clients
+ *			(applications, services etc.).
+ */
+static void driver_connection_gen(ipc_callid_t iid, ipc_call_t *icall, bool drv)
+{
+	/*
+	 * Answer the first IPC_M_CONNECT_ME_TO call and remember the handle of
+	 * the device to which the client connected.
+	 */
+	device_handle_t handle = IPC_GET_ARG2(*icall);
+	device_t *dev = driver_get_device(&devices, handle);
+
+	if (dev == NULL) {
+		printf("%s: driver_connection_gen error - no device with handle"
+		    " %x was found.\n", driver->name, handle);
+		ipc_answer_0(iid, ENOENT);
+		return;
+	}
+	
+	
+	/*
+	 * TODO - if the client is not a driver, check whether it is allowed to
+	 * use the device.
+	 */
+
+	int ret = EOK;
+	/* open the device */
+	if (NULL != dev->ops && NULL != dev->ops->open)
+		ret = (*dev->ops->open)(dev);
+	
+	ipc_answer_0(iid, ret);	
+	if (EOK != ret)
+		return;
+
+	while (1) {
+		ipc_callid_t callid;
+		ipc_call_t call;
+		callid = async_get_call(&call);
+		ipcarg_t method = IPC_GET_METHOD(call);
+		int iface_idx;
+		
+		switch  (method) {
+		case IPC_M_PHONE_HUNGUP:		
+			/* close the device */
+			if (NULL != dev->ops && NULL != dev->ops->close)
+				(*dev->ops->close)(dev);
+			ipc_answer_0(callid, EOK);
+			return;
+		default:		
+			/* convert ipc interface id to interface index */
+			
+			iface_idx = DEV_IFACE_IDX(method);
+			
+			if (!is_valid_iface_idx(iface_idx)) {
+				remote_handler_t *default_handler =
+				    device_get_default_handler(dev);
+				if (NULL != default_handler) {
+					(*default_handler)(dev, callid, &call);
+					break;
+				}
+				/*
+				 * This is not device's interface and the
+				 * default handler is not provided.
+				 */
+				printf("%s: driver_connection_gen error - "
+				    "invalid interface id %d.",
+				    driver->name, iface_idx);
+				ipc_answer_0(callid, ENOTSUP);
+				break;
+			}
+
+			/* calling one of the device's interfaces */
+			
+			/* get the device interface structure */
+			void *iface = device_get_iface(dev, iface_idx);
+			if (NULL == iface) {
+				printf("%s: driver_connection_gen error - ",
+				    driver->name);
+				printf("device with handle %d has no interface "
+				    "with id %d.\n", handle, iface_idx);
+				ipc_answer_0(callid, ENOTSUP);
+				break;
+			}
+
+			/*
+			 * Get the corresponding interface for remote request
+			 * handling ("remote interface").
+			 */
+			remote_iface_t* rem_iface = get_remote_iface(iface_idx);
+			assert(NULL != rem_iface);
+
+			/* get the method of the remote interface */
+			ipcarg_t iface_method_idx = IPC_GET_ARG1(call);
+			remote_iface_func_ptr_t iface_method_ptr =
+			    get_remote_method(rem_iface, iface_method_idx);
+			if (NULL == iface_method_ptr) {
+				// the interface has not such method
+				printf("%s: driver_connection_gen error - "
+				    "invalid interface method.", driver->name);
+				ipc_answer_0(callid, ENOTSUP);
+				break;
+			}
+			
+			/*
+			 * Call the remote interface's method, which will
+			 * receive parameters from the remote client and it will
+			 * pass it to the corresponding local interface method
+			 * associated with the device by its driver.
+			 */
+			(*iface_method_ptr)(dev, iface, callid, &call);
+			break;
+		}
+	}
+}
+
+static void driver_connection_driver(ipc_callid_t iid, ipc_call_t *icall)
+{
+	driver_connection_gen(iid, icall, true);
+}
+
+static void driver_connection_client(ipc_callid_t iid, ipc_call_t *icall)
+{
+	driver_connection_gen(iid, icall, false);
+}
+
+
+/** Function for handling connections to device driver. */
+static void driver_connection(ipc_callid_t iid, ipc_call_t *icall)
+{
+	/* Select interface */
+	switch ((ipcarg_t) (IPC_GET_ARG1(*icall))) {
+	case DRIVER_DEVMAN:
+		/* handle PnP events from device manager */
+		driver_connection_devman(iid, icall);
+		break;
+	case DRIVER_DRIVER:
+		/* handle request from drivers of child devices */
+		driver_connection_driver(iid, icall);
+		break;
+	case DRIVER_CLIENT:
+		/* handle requests from client applications */
+		driver_connection_client(iid, icall);
+		break;
+
+	default:
+		/* No such interface */
+		ipc_answer_0(iid, ENOENT);
+	}
+}
+
+int child_device_register(device_t *child, device_t *parent)
+{
+	assert(NULL != child->name);
+
+	int res;
+	
+	add_to_devices_list(child);
+	res = devman_child_device_register(child->name, &child->match_ids,
+	    parent->handle, &child->handle);
+	if (EOK == res)
+		return res;
+	remove_from_devices_list(child);	
+	return res;
+}
+
+int driver_main(driver_t *drv)
+{
+	/*
+	 * Remember the driver structure - driver_ops will be called by generic
+	 * handler for incoming connections.
+	 */
+	driver = drv;
+
+	/* Initialize the list of interrupt contexts. */
+	init_interrupt_context_list(&interrupt_contexts);
+	
+	/* Set generic interrupt handler. */
+	async_set_interrupt_received(driver_irq_handler);
+	
+	/*
+	 * Register driver by device manager with generic handler for incoming
+	 * connections.
+	 */
+	devman_driver_register(driver->name, driver_connection);
+
+	async_manager();
+
+	/* Never reached. */
+	return 0;
+}
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/generic/remote_char.c
===================================================================
--- uspace/lib/drv/generic/remote_char.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/generic/remote_char.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#include <ipc/ipc.h>
+#include <async.h>
+#include <errno.h>
+
+#include "char.h"
+#include "driver.h"
+
+#define MAX_CHAR_RW_COUNT 256
+
+static void remote_char_read(device_t *, void *, ipc_callid_t, ipc_call_t *);
+static void remote_char_write(device_t *, void *, ipc_callid_t, ipc_call_t *);
+
+/** Remote character interface operations. */
+static remote_iface_func_ptr_t remote_char_iface_ops [] = {
+	&remote_char_read,
+	&remote_char_write
+};
+
+/** Remote character interface structure.
+ *
+ * Interface for processing request from remote clients addressed to the
+ * character interface.
+ */
+remote_iface_t remote_char_iface = {
+	.method_count = sizeof(remote_char_iface_ops) /
+	    sizeof(remote_iface_func_ptr_t),
+	.methods = remote_char_iface_ops
+};
+
+/** Process the read request from the remote client.
+ *
+ * Receive the read request's parameters from the remote client and pass them
+ * to the local interface. Return the result of the operation processed by the
+ * local interface to the remote client.
+ *
+ * @param dev		The device from which the data are read.
+ * @param iface		The local interface structure.
+ */
+static void
+remote_char_read(device_t *dev, void *iface, ipc_callid_t callid,
+    ipc_call_t *call)
+{	
+	char_iface_t *char_iface = (char_iface_t *) iface;
+	ipc_callid_t cid;
+	
+	size_t len;
+	if (!async_data_read_receive(&cid, &len)) {
+		/* TODO handle protocol error. */
+		ipc_answer_0(callid, EINVAL);
+		return;
+	}
+	
+	if (!char_iface->read) {
+		async_data_read_finalize(cid, NULL, 0);
+		ipc_answer_0(callid, ENOTSUP);
+		return;
+	}
+	
+	if (len > MAX_CHAR_RW_COUNT)
+		len = MAX_CHAR_RW_COUNT;
+	
+	char buf[MAX_CHAR_RW_COUNT];
+	int ret = (*char_iface->read)(dev, buf, len);
+	
+	if (ret < 0) {
+		/* Some error occured. */
+		async_data_read_finalize(cid, buf, 0);
+		ipc_answer_0(callid, ret);
+		return;
+	}
+	
+	/* The operation was successful, return the number of data read. */
+	async_data_read_finalize(cid, buf, ret);
+	ipc_answer_1(callid, EOK, ret);
+}
+
+/** Process the write request from the remote client.
+ *
+ * Receive the write request's parameters from the remote client and pass them
+ * to the local interface. Return the result of the operation processed by the
+ * local interface to the remote client.
+ *
+ * @param dev		The device to which the data are written.
+ * @param iface		The local interface structure.
+ */
+static void
+remote_char_write(device_t *dev, void *iface, ipc_callid_t callid,
+    ipc_call_t *call)
+{
+	char_iface_t *char_iface = (char_iface_t *) iface;
+	ipc_callid_t cid;
+	size_t len;
+	
+	if (!async_data_write_receive(&cid, &len)) {
+		/* TODO handle protocol error. */
+		ipc_answer_0(callid, EINVAL);
+		return;
+	}
+	
+	if (!char_iface->write) {
+		async_data_write_finalize(cid, NULL, 0);
+		ipc_answer_0(callid, ENOTSUP);
+		return;
+	}	
+	
+	if (len > MAX_CHAR_RW_COUNT)
+		len = MAX_CHAR_RW_COUNT;
+	
+	char buf[MAX_CHAR_RW_COUNT];
+	
+	async_data_write_finalize(cid, buf, len);
+	
+	int ret = (*char_iface->write)(dev, buf, len);
+	if (ret < 0) {
+		/* Some error occured. */
+		ipc_answer_0(callid, ret);
+	} else {
+		/*
+		 * The operation was successful, return the number of data
+		 * written.
+		 */
+		ipc_answer_1(callid, EOK, ret);
+	}
+}
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/generic/remote_res.c
===================================================================
--- uspace/lib/drv/generic/remote_res.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/generic/remote_res.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#include <ipc/ipc.h>
+#include <async.h>
+#include <errno.h>
+
+#include "driver.h"
+#include "resource.h"
+
+static void remote_res_get_resources(device_t *, void *, ipc_callid_t,
+    ipc_call_t *);
+static void remote_res_enable_interrupt(device_t *, void *, ipc_callid_t,
+    ipc_call_t *);
+
+static remote_iface_func_ptr_t remote_res_iface_ops [] = {
+	&remote_res_get_resources,
+	&remote_res_enable_interrupt
+};
+
+remote_iface_t remote_res_iface = {
+	.method_count = sizeof(remote_res_iface_ops) /
+	    sizeof(remote_iface_func_ptr_t),
+	.methods = remote_res_iface_ops
+};
+
+static void remote_res_enable_interrupt(device_t *dev, void *iface,
+    ipc_callid_t callid, ipc_call_t *call)
+{
+	resource_iface_t *ires = (resource_iface_t *) iface;
+	
+	if (NULL == ires->enable_interrupt)
+		ipc_answer_0(callid, ENOTSUP);
+	else if (ires->enable_interrupt(dev))
+		ipc_answer_0(callid, EOK);
+	else
+		ipc_answer_0(callid, EREFUSED);
+}
+
+static void remote_res_get_resources(device_t *dev, void *iface,
+    ipc_callid_t callid, ipc_call_t *call)
+{
+	resource_iface_t *ires = (resource_iface_t *) iface;
+	if (NULL == ires->get_resources) {
+		ipc_answer_0(callid, ENOTSUP);
+		return;
+	}
+	
+	hw_resource_list_t *hw_resources = ires->get_resources(dev);
+	if (NULL == hw_resources){
+		ipc_answer_0(callid, ENOENT);
+		return;
+	}	
+	
+	ipc_answer_1(callid, EOK, hw_resources->count);	
+
+	size_t len;
+	if (!async_data_read_receive(&callid, &len)) {
+		/* protocol error - the recipient is not accepting data */
+		return;
+	}
+	async_data_read_finalize(callid, hw_resources->resources, len);
+}
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/include/char.h
===================================================================
--- uspace/lib/drv/include/char.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/include/char.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBDRV_CHAR_H_
+#define LIBDRV_CHAR_H_
+
+#include "driver.h"
+
+typedef struct char_iface {
+	int (*read)(device_t *, char *, size_t);
+	int (*write)(device_t *, char *, size_t);
+} char_iface_t;
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/include/dev_iface.h
===================================================================
--- uspace/lib/drv/include/dev_iface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/include/dev_iface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBDRV_DEV_IFACE_H_
+#define LIBDRV_DEV_IFACE_H_
+
+#include "driver.h"
+
+/* TODO declare device interface structures here */
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/include/driver.h
===================================================================
--- uspace/lib/drv/include/driver.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/include/driver.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,328 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBDRV_DRIVER_H_
+#define LIBDRV_DRIVER_H_
+
+#include <adt/list.h>
+#include <ipc/ipc.h>
+#include <devman.h>
+#include <ipc/devman.h>
+#include <ipc/dev_iface.h>
+#include <device/hw_res.h>
+#include <device/char.h>
+#include <assert.h>
+#include <ddi.h>
+#include <libarch/ddi.h>
+#include <fibril_synch.h>
+#include <malloc.h>
+
+struct device;
+typedef struct device device_t;
+
+/* device interface */
+
+/*
+ * First two parameters: device and interface structure registered by the
+ * devices driver.
+ */
+typedef void remote_iface_func_t(device_t *, void *, ipc_callid_t,
+    ipc_call_t *);
+typedef remote_iface_func_t *remote_iface_func_ptr_t;
+typedef void remote_handler_t(device_t *, ipc_callid_t, ipc_call_t *);
+
+typedef struct {
+	size_t method_count;
+	remote_iface_func_ptr_t *methods;
+} remote_iface_t;
+
+typedef struct {
+	remote_iface_t *ifaces[DEV_IFACE_COUNT];
+} iface_dipatch_table_t;
+
+
+static inline bool is_valid_iface_idx(int idx)
+{
+	return 0 <= idx && idx < DEV_IFACE_MAX;
+}
+
+remote_iface_t *get_remote_iface(int);
+remote_iface_func_ptr_t get_remote_method(remote_iface_t *, ipcarg_t);
+
+
+/* device class */
+
+/** Devices operations. */
+typedef struct device_ops {
+	/**
+	 * Optional callback function called when a client is connecting to the
+	 * device.
+	 */
+	int (*open)(device_t *);
+	
+	/**
+	 * Optional callback function called when a client is disconnecting from
+	 * the device.
+	 */
+	void (*close)(device_t *);
+	
+	/** The table of standard interfaces implemented by the device. */
+	void *interfaces[DEV_IFACE_COUNT];
+	
+	/**
+	 * The default handler of remote client requests. If the client's remote
+	 * request cannot be handled by any of the standard interfaces, the
+	 * default handler is used.
+	 */
+	remote_handler_t *default_handler;
+} device_ops_t;
+
+
+/* device */
+
+/** The device. */
+struct device {
+	/**
+	 * Globally unique device identifier (assigned to the device by the
+	 * device manager).
+	 */
+	device_handle_t handle;
+	
+	/**
+	 * The phone to the parent device driver (if it is different from this
+	 * driver).
+	 */
+	int parent_phone;
+	
+	/** Parent device if handled by this driver, NULL otherwise. */
+	device_t *parent;
+	/** The device's name. */
+	const char *name;
+	/** The list of device ids for device-to-driver matching. */
+	match_id_list_t match_ids;
+	/** The device driver's data associated with this device. */
+	void *driver_data;
+	/** The implementation of operations provided by this device. */
+	device_ops_t *ops;
+	
+	/**
+	 * Pointer to the previous and next device in the list of devices
+	 * handled by the driver.
+	 */
+	link_t link;
+};
+
+
+/* driver */
+
+/** Generic device driver operations. */
+typedef struct driver_ops {
+	/** Callback method for passing a new device to the device driver.*/
+	int (*add_device)(device_t *dev);
+	/* TODO add other generic driver operations */
+} driver_ops_t;
+
+/** The driver structure.*/
+typedef struct driver {
+	/** The name of the device driver. */
+	const char *name;
+	/** Generic device driver operations. */
+	driver_ops_t *driver_ops;
+} driver_t;
+
+int driver_main(driver_t *);
+
+/** Create new device structure.
+ *
+ * @return		The device structure.
+ */
+static inline device_t *create_device(void)
+{
+	device_t *dev = malloc(sizeof(device_t));
+	if (NULL != dev) {
+		memset(dev, 0, sizeof(device_t));
+		init_match_ids(&dev->match_ids);
+	}	
+	return dev;
+}
+
+/** Delete device structure.
+ *
+ * @param dev		The device structure.
+ */
+static inline void delete_device(device_t *dev)
+{
+	clean_match_ids(&dev->match_ids);
+	if (NULL != dev->name)
+		free(dev->name);
+	free(dev);
+}
+
+static inline void *device_get_iface(device_t *dev, dev_inferface_idx_t idx)
+{
+	assert(is_valid_iface_idx(idx));
+	if (NULL == dev->ops)
+		return NULL;
+	return dev->ops->interfaces[idx];
+}
+
+int child_device_register(device_t *, device_t *);
+
+
+/* interrupts */
+
+typedef void interrupt_handler_t(device_t *, ipc_callid_t, ipc_call_t *);
+
+typedef struct interrupt_context {
+	int id;
+	device_t *dev;
+	int irq;
+	interrupt_handler_t *handler;
+	link_t link;
+} interrupt_context_t;
+
+typedef struct interrupt_context_list {
+	int curr_id;
+	link_t contexts;
+	fibril_mutex_t mutex;
+} interrupt_context_list_t;
+
+static inline interrupt_context_t *create_interrupt_context(void)
+{
+	interrupt_context_t *ctx;
+	
+	ctx = (interrupt_context_t *) malloc(sizeof(interrupt_context_t));
+	if (NULL != ctx)
+		memset(ctx, 0, sizeof(interrupt_context_t));
+	
+	return ctx;
+}
+
+static inline void delete_interrupt_context(interrupt_context_t *ctx)
+{
+	if (NULL != ctx)
+		free(ctx);
+}
+
+static inline void init_interrupt_context_list(interrupt_context_list_t *list)
+{
+	memset(list, 0, sizeof(interrupt_context_list_t));
+	fibril_mutex_initialize(&list->mutex);
+	list_initialize(&list->contexts);
+}
+
+static inline void
+add_interrupt_context(interrupt_context_list_t *list, interrupt_context_t *ctx)
+{
+	fibril_mutex_lock(&list->mutex);
+	ctx->id = list->curr_id++;
+	list_append(&ctx->link, &list->contexts);
+	fibril_mutex_unlock(&list->mutex);
+}
+
+static inline void
+remove_interrupt_context(interrupt_context_list_t *list,
+    interrupt_context_t *ctx)
+{
+	fibril_mutex_lock(&list->mutex);
+	list_remove(&ctx->link);
+	fibril_mutex_unlock(&list->mutex);
+}
+
+static inline interrupt_context_t *
+find_interrupt_context_by_id(interrupt_context_list_t *list, int id)
+{
+	fibril_mutex_lock(&list->mutex);
+	
+	link_t *link = list->contexts.next;
+	interrupt_context_t *ctx;
+	
+	while (link != &list->contexts) {
+		ctx = list_get_instance(link, interrupt_context_t, link);
+		if (id == ctx->id) {
+			fibril_mutex_unlock(&list->mutex);
+			return ctx;
+		}
+		link = link->next;
+	}
+	
+	fibril_mutex_unlock(&list->mutex);
+	return NULL;
+}
+
+static inline interrupt_context_t *
+find_interrupt_context(interrupt_context_list_t *list, device_t *dev, int irq)
+{
+	fibril_mutex_lock(&list->mutex);
+	
+	link_t *link = list->contexts.next;
+	interrupt_context_t *ctx;
+	
+	while (link != &list->contexts) {
+		ctx = list_get_instance(link, interrupt_context_t, link);
+		if (irq == ctx->irq && dev == ctx->dev) {
+			fibril_mutex_unlock(&list->mutex);
+			return ctx;
+		}
+		link = link->next;
+	}
+	
+	fibril_mutex_unlock(&list->mutex);
+	return NULL;
+}
+
+int register_interrupt_handler(device_t *, int, interrupt_handler_t *,
+    irq_code_t *);
+int unregister_interrupt_handler(device_t *, int);
+
+
+/* default handler for client requests */
+
+static inline remote_handler_t *device_get_default_handler(device_t *dev)
+{
+	if (NULL == dev->ops)
+		return NULL;
+	return dev->ops->default_handler;
+}
+
+static inline int add_device_to_class(device_t *dev, const char *class_name)
+{
+	return devman_add_device_to_class(dev->handle, class_name);
+}
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/include/remote_char.h
===================================================================
--- uspace/lib/drv/include/remote_char.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/include/remote_char.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBDRV_REMOTE_CHAR_H_
+#define LIBDRV_REMOTE_CHAR_H_
+
+remote_iface_t remote_char_iface;
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/include/remote_res.h
===================================================================
--- uspace/lib/drv/include/remote_res.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/include/remote_res.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBDRV_REMOTE_RES_H_
+#define LIBDRV_REMOTE_RES_H_
+
+remote_iface_t remote_res_iface;
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/drv/include/resource.h
===================================================================
--- uspace/lib/drv/include/resource.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/drv/include/resource.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova 
+ * 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 libdrv
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBDRV_RESOURCE_H_
+#define LIBDRV_RESOURCE_H_
+
+#include "driver.h"
+
+typedef struct resource_iface {
+	 hw_resource_list_t *(* get_resources)(device_t *);
+	 bool (*enable_interrupt)(device_t *);
+} resource_iface_t;
+
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/net/Makefile
===================================================================
--- uspace/lib/net/Makefile	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -38,9 +38,10 @@
 	generic/packet_client.c \
 	generic/packet_remote.c \
-	generic/socket_core.c \
+	generic/protocol_map.c \
 	adt/module_map.c \
 	netif/netif_local.c \
 	netif/netif_remote.c \
 	nil/nil_remote.c \
+	il/il_interface.c \
 	il/ip_remote.c \
 	il/ip_client.c \
@@ -48,4 +49,6 @@
 	tl/icmp_remote.c \
 	tl/icmp_client.c \
+	tl/socket_core.c \
+	tl/tl_interface.c \
 	tl/tl_common.c
 
Index: uspace/lib/net/generic/protocol_map.c
===================================================================
--- uspace/lib/net/generic/protocol_map.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/net/generic/protocol_map.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,149 @@
+/*
+ * 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
+ * @{
+ */
+
+#include <protocol_map.h>
+#include <ethernet_lsap.h>
+#include <ethernet_protocols.h>
+#include <net_hardware.h>
+
+#include <ipc/services.h>
+
+/** Maps the internetwork layer service to the network interface layer type.
+ *
+ * @param[in] nil	Network interface layer service.
+ * @param[in] il	Internetwork layer service.
+ * @returns		Network interface layer type of the internetworking
+ *			layer service.
+ * @returns		Zero if mapping is not found.
+ */
+eth_type_t protocol_map(services_t nil, services_t il)
+{
+	switch (nil) {
+	case SERVICE_ETHERNET:
+	case SERVICE_DP8390:
+		switch (il) {
+		case SERVICE_IP:
+			return ETH_P_IP;
+		case SERVICE_ARP:
+			return ETH_P_ARP;
+		default:
+			return 0;
+		}
+	default:
+		return 0;
+	}
+}
+
+/** Maps the network interface layer type to the internetwork layer service.
+ *
+ * @param[in] nil	Network interface layer service.
+ * @param[in] protocol	Network interface layer type.
+ * @returns		Internetwork layer service of the network interface
+ *			layer type.
+ * @returns		Zero if mapping is not found.
+ */
+services_t protocol_unmap(services_t nil, int protocol)
+{
+	switch (nil) {
+	case SERVICE_ETHERNET:
+	case SERVICE_DP8390:
+		switch (protocol) {
+		case ETH_P_IP:
+			return SERVICE_IP;
+		case ETH_P_ARP:
+			return SERVICE_ARP;
+		default:
+			return 0;
+		}
+	default:
+		return 0;
+	}
+}
+
+/** Maps the link service access point identifier to the Ethernet protocol
+ * identifier.
+ *
+ * @param[in] lsap	Link service access point identifier.
+ * @returns		Ethernet protocol identifier of the link service access
+ *			point identifier.
+ * @returns		ETH_LSAP_NULL if mapping is not found.
+ */
+eth_type_t lsap_map(eth_lsap_t lsap)
+{
+	switch (lsap) {
+	case ETH_LSAP_IP:
+		return ETH_P_IP;
+	case ETH_LSAP_ARP:
+		return ETH_P_ARP;
+	default:
+		return ETH_LSAP_NULL;
+	}
+}
+
+/** Maps the Ethernet protocol identifier to the link service access point
+ * identifier.
+ *
+ * @param[in] ethertype	Ethernet protocol identifier.
+ * @returns		Link service access point identifier.
+ * @returns		Zero if mapping is not found.
+ */
+eth_lsap_t lsap_unmap(eth_type_t ethertype)
+{
+	switch (ethertype) {
+	case ETH_P_IP:
+		return ETH_LSAP_IP;
+	case ETH_P_ARP:
+		return ETH_LSAP_ARP;
+	default:
+		return 0;
+	}
+}
+
+/** Maps the network interface layer services to the hardware types.
+ *
+ * @param[in] nil	The network interface service.
+ * @returns		The hardware type of the network interface service.
+ * @returns		Zero if mapping is not found.
+ */
+hw_type_t hardware_map(services_t nil)
+{
+	switch (nil) {
+	case SERVICE_ETHERNET:
+	case SERVICE_DP8390:
+		return HW_ETHER;
+	default:
+		return 0;
+	}
+}
+
+/** @}
+ */
Index: pace/lib/net/generic/socket_core.c
===================================================================
--- uspace/lib/net/generic/socket_core.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,700 +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
- * Socket common core implementation.
- */
-
-#include <socket_core.h>
-#include <packet_client.h>
-#include <packet_remote.h>
-
-#include <net/socket_codes.h>
-#include <net/in.h>
-#include <net/inet.h>
-#include <net/packet.h>
-#include <net/modules.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <err.h>
-
-#include <adt/dynamic_fifo.h>
-#include <adt/int_map.h>
-
-/**
- * Maximum number of random attempts to find a new socket identifier before
- * switching to the sequence.
- */
-#define SOCKET_ID_TRIES	100
-
-/** Bound port sockets.*/
-struct socket_port {
-	/** The bound sockets map. */
-	socket_port_map_t map;
-	/** The bound sockets count. */
-	int count;
-};
-
-INT_MAP_IMPLEMENT(socket_cores, socket_core_t);
-
-GENERIC_CHAR_MAP_IMPLEMENT(socket_port_map, socket_core_ref);
-
-INT_MAP_IMPLEMENT(socket_ports, socket_port_t);
-
-/** Destroys the socket.
- *
- * If the socket is bound, the port is released.
- * Releases all buffered packets, calls the release function and removes the
- * socket from the local sockets.
- *
- * @param[in] packet_phone The packet server phone to release buffered packets.
- * @param[in] socket	The socket to be destroyed.
- * @param[in,out] local_sockets The local sockets to be updated.
- * @param[in,out] global_sockets The global sockets to be updated.
- * @param[in] socket_release The client release callback function.
- */
-static void
-socket_destroy_core(int packet_phone, socket_core_ref socket,
-    socket_cores_ref local_sockets, socket_ports_ref global_sockets,
-    void (* socket_release)(socket_core_ref socket))
-{
-	int packet_id;
-
-	// if bound
-	if (socket->port) {
-		// release the port
-		socket_port_release(global_sockets, socket);
-	}
-	
-	// release all received packets
-	while ((packet_id = dyn_fifo_pop(&socket->received)) >= 0)
-		pq_release_remote(packet_phone, packet_id);
-
-	dyn_fifo_destroy(&socket->received);
-	dyn_fifo_destroy(&socket->accepted);
-
-	if (socket_release)
-		socket_release(socket);
-
-	socket_cores_exclude(local_sockets, socket->socket_id);
-}
-
-/** Destroys local sockets.
- *
- * Releases all buffered packets and calls the release function for each of the
- * sockets.
- *
- * @param[in] packet_phone The packet server phone to release buffered packets.
- * @param[in] local_sockets The local sockets to be destroyed.
- * @param[in,out] global_sockets The global sockets to be updated.
- * @param[in] socket_release The client release callback function.
- */
-void
-socket_cores_release(int packet_phone, socket_cores_ref local_sockets,
-    socket_ports_ref global_sockets,
-    void (* socket_release)(socket_core_ref socket))
-{
-	int index;
-
-	if (!socket_cores_is_valid(local_sockets))
-		return;
-
-	local_sockets->magic = 0;
-
-	for (index = 0; index < local_sockets->next; ++index) {
-		if (socket_cores_item_is_valid(&local_sockets->items[index])) {
-			local_sockets->items[index].magic = 0;
-
-			if (local_sockets->items[index].value) {
-				socket_destroy_core(packet_phone,
-				    local_sockets->items[index].value,
-				    local_sockets, global_sockets,
-				    socket_release);
-				free(local_sockets->items[index].value);
-				local_sockets->items[index].value = NULL;
-			}
-		}
-	}
-
-	free(local_sockets->items);
-}
-
-/** Adds the socket to a socket port.
- *
- * @param[in,out] socket_port The socket port structure.
- * @param[in] socket	The socket to be added.
- * @param[in] key	The socket key identifier.
- * @param[in] key_length The socket key length.
- * @returns		EOK on success.
- * @returns		ENOMEM if there is not enough memory left.
- */
-static int
-socket_port_add_core(socket_port_ref socket_port, socket_core_ref socket,
-    const char *key, size_t key_length)
-{
-	ERROR_DECLARE;
-
-	socket_core_ref *socket_ref;
-
-	// create a wrapper
-	socket_ref = malloc(sizeof(*socket_ref));
-	if (!socket_ref)
-		return ENOMEM;
-
-	*socket_ref = socket;
-	// add the wrapper
-	if (ERROR_OCCURRED(socket_port_map_add(&socket_port->map, key,
-	    key_length, socket_ref))) {
-		free(socket_ref);
-		return ERROR_CODE;
-	}
-	
-	++socket_port->count;
-	socket->key = key;
-	socket->key_length = key_length;
-	
-	return EOK;
-}
-
-/** Binds the socket to the port.
- *
- * The SOCKET_MAP_KEY_LISTENING key identifier is used.
- *
- * @param[in] global_sockets The global sockets to be updated.
- * @param[in] socket	The socket to be added.
- * @param[in] port	The port number to be bound to.
- * @returns		EOK on success.
- * @returns		ENOMEM if there is not enough memory left.
- * @returns		Other error codes as defined for the
- *			 socket_ports_add() function.
- */
-static int
-socket_bind_insert(socket_ports_ref global_sockets, socket_core_ref socket,
-    int port)
-{
-	ERROR_DECLARE;
-
-	socket_port_ref socket_port;
-
-	// create a wrapper
-	socket_port = malloc(sizeof(*socket_port));
-	if (!socket_port)
-		return ENOMEM;
-
-	socket_port->count = 0;
-	if (ERROR_OCCURRED(socket_port_map_initialize(&socket_port->map)) ||
-	    ERROR_OCCURRED(socket_port_add_core(socket_port, socket,
-	    SOCKET_MAP_KEY_LISTENING, 0))) {
-		socket_port_map_destroy(&socket_port->map);
-		free(socket_port);
-		return ERROR_CODE;
-	}
-	
-	// register the incomming port
-	ERROR_CODE = socket_ports_add(global_sockets, port, socket_port);
-	if (ERROR_CODE < 0) {
-		socket_port_map_destroy(&socket_port->map);
-		free(socket_port);
-		return ERROR_CODE;
-	}
-	
-	socket->port = port;
-	return EOK;
-}
-
-/** Binds the socket to the port.
- *
- * The address port is used if set, a free port is used if not.
- *
- * @param[in] local_sockets The local sockets to be searched.
- * @param[in,out] global_sockets The global sockets to be updated.
- * @param[in] socket_id	The new socket identifier.
- * @param[in] addr	The address to be bound to.
- * @param[in] addrlen	The address length.
- * @param[in] free_ports_start The minimum free port.
- * @param[in] free_ports_end The maximum free port.
- * @param[in] last_used_port The last used free port.
- * @returns		EOK on success.
- * @returns		ENOTSOCK if the socket was not found.
- * @returns		EAFNOSUPPORT if the address family is not supported.
- * @returns		EADDRINUSE if the port is already in use.
- * @returns		Other error codes as defined for the
- *			socket_bind_free_port() function.
- * @returns		Other error codes as defined for the
- *			socket_bind_insert() function.
- */
-int
-socket_bind(socket_cores_ref local_sockets, socket_ports_ref global_sockets,
-    int socket_id, void *addr, size_t addrlen, int free_ports_start,
-    int free_ports_end, int last_used_port)
-{
-	socket_core_ref socket;
-	socket_port_ref socket_port;
-	struct sockaddr *address;
-	struct sockaddr_in *address_in;
-
-	if (addrlen < sizeof(struct sockaddr))
-		return EINVAL;
-
-	address = (struct sockaddr *) addr;
-	switch (address->sa_family) {
-	case AF_INET:
-		if (addrlen != sizeof(struct sockaddr_in))
-			return EINVAL;
-		
-		address_in = (struct sockaddr_in *) addr;
-		// find the socket
-		socket = socket_cores_find(local_sockets, socket_id);
-		if (!socket)
-			return ENOTSOCK;
-		
-		// bind a free port?
-		if (address_in->sin_port <= 0)
-			return socket_bind_free_port(global_sockets, socket,
-			     free_ports_start, free_ports_end, last_used_port);
-		
-		// try to find the port
-		socket_port = socket_ports_find(global_sockets,
-		    ntohs(address_in->sin_port));
-		if (socket_port) {
-			// already used
-			return EADDRINUSE;
-		}
-		
-		// if bound
-		if (socket->port) {
-			// release the port
-			socket_port_release(global_sockets, socket);
-		}
-		socket->port = -1;
-		
-		return socket_bind_insert(global_sockets, socket,
-		    ntohs(address_in->sin_port));
-		
-	case AF_INET6:
-		// TODO IPv6
-		break;
-	}
-	
-	return EAFNOSUPPORT;
-}
-
-/** Binds the socket to a free port.
- *
- * The first free port is used.
- *
- * @param[in,out] global_sockets The global sockets to be updated.
- * @param[in,out] socket The socket to be bound.
- * @param[in] free_ports_start The minimum free port.
- * @param[in] free_ports_end The maximum free port.
- * @param[in] last_used_port The last used free port.
- * @returns		EOK on success.
- * @returns		ENOTCONN if no free port was found.
- * @returns		Other error codes as defined for the
- *			socket_bind_insert() function.
- */
-int
-socket_bind_free_port(socket_ports_ref global_sockets, socket_core_ref socket,
-    int free_ports_start, int free_ports_end, int last_used_port)
-{
-	int index;
-
-	// from the last used one
-	index = last_used_port;
-	
-	do {
-		++index;
-		
-		// til the range end
-		if (index >= free_ports_end) {
-			// start from the range beginning
-			index = free_ports_start - 1;
-			do {
-				++index;
-				// til the last used one
-				if (index >= last_used_port) {
-					// none found
-					return ENOTCONN;
-				}
-			} while (socket_ports_find(global_sockets, index));
-			
-			// found, break immediately
-			break;
-		}
-		
-	} while (socket_ports_find(global_sockets, index));
-	
-	return socket_bind_insert(global_sockets, socket, index);
-}
-
-/** Tries to find a new free socket identifier.
- *
- * @param[in] local_sockets The local sockets to be searched.
- * @param[in] positive	A value indicating whether a positive identifier is
- *			requested. A negative identifier is requested if set to
- *			false.
- * @returns		The new socket identifier.
- * @returns		ELIMIT if there is no socket identifier available.
- */
-static int socket_generate_new_id(socket_cores_ref local_sockets, int positive)
-{
-	int socket_id;
-	int count;
-
-	count = 0;
-//	socket_id = socket_globals.last_id;
-	do {
-		if (count < SOCKET_ID_TRIES) {
-			socket_id = rand() % INT_MAX;
-			++count;
-		} else if (count == SOCKET_ID_TRIES) {
-			socket_id = 1;
-			++count;
-		// only this branch for last_id
-		} else {
-			if (socket_id < INT_MAX) {
-				++ socket_id;
-/*			} else if(socket_globals.last_id) {
-*				socket_globals.last_id = 0;
-*				socket_id = 1;
-*/			} else {
-				return ELIMIT;
-			}
-		}
-	} while (socket_cores_find(local_sockets,
-	    ((positive ? 1 : -1) * socket_id)));
-	
-//	last_id = socket_id
-	return socket_id;
-}
-
-/** Creates a new socket.
- *
- * @param[in,out] local_sockets The local sockets to be updated.
- * @param[in] app_phone	The application phone.
- * @param[in] specific_data The socket specific data.
- * @param[in,out] socket_id The new socket identifier. A new identifier is
- *			chosen if set to zero or negative. A negative identifier
- *			is chosen if set to negative.
- * @returns		EOK on success.
- * @returns		EINVAL if the socket_id parameter is NULL.
- * @returns		ENOMEM if there is not enough memory left.
- */
-int
-socket_create(socket_cores_ref local_sockets, int app_phone,
-    void *specific_data, int *socket_id)
-{
-	ERROR_DECLARE;
-
-	socket_core_ref socket;
-	int res;
-	int positive;
-
-	if (!socket_id)
-		return EINVAL;
-	
-	// store the socket
-	if (*socket_id <= 0) {
-		positive = (*socket_id == 0);
-		*socket_id = socket_generate_new_id(local_sockets, positive);
-		if (*socket_id <= 0)
-			return *socket_id;
-		if (!positive)
-			*socket_id *= -1;
-	} else if(socket_cores_find(local_sockets, *socket_id)) {
-		return EEXIST;
-	}
-	
-	socket = (socket_core_ref) malloc(sizeof(*socket));
-	if (!socket)
-		return ENOMEM;
-	
-	// initialize
-	socket->phone = app_phone;
-	socket->port = -1;
-	socket->key = NULL;
-	socket->key_length = 0;
-	socket->specific_data = specific_data;
-	if (ERROR_OCCURRED(dyn_fifo_initialize(&socket->received,
-	    SOCKET_INITIAL_RECEIVED_SIZE))) {
-		free(socket);
-		return ERROR_CODE;
-	}
-	if (ERROR_OCCURRED(dyn_fifo_initialize(&socket->accepted,
-	    SOCKET_INITIAL_ACCEPTED_SIZE))) {
-		dyn_fifo_destroy(&socket->received);
-		free(socket);
-		return ERROR_CODE;
-	}
-	socket->socket_id = *socket_id;
-	res = socket_cores_add(local_sockets, socket->socket_id, socket);
-	if (res < 0) {
-		dyn_fifo_destroy(&socket->received);
-		dyn_fifo_destroy(&socket->accepted);
-		free(socket);
-		return res;
-	}
-	
-	return EOK;
-}
-
-/** Destroys the socket.
- *
- * If the socket is bound, the port is released.
- * Releases all buffered packets, calls the release function and removes the
- * socket from the local sockets.
- *
- * @param[in] packet_phone The packet server phone to release buffered packets.
- * @param[in] socket_id	The socket identifier.
- * @param[in,out] local_sockets The local sockets to be updated.
- * @param[in,out] global_sockets The global sockets to be updated.
- * @param[in] socket_release The client release callback function.
- * @returns		EOK on success.
- * @returns		ENOTSOCK if the socket is not found.
- */
-int
-socket_destroy(int packet_phone, int socket_id, socket_cores_ref local_sockets,
-    socket_ports_ref global_sockets,
-    void (*socket_release)(socket_core_ref socket))
-{
-	socket_core_ref socket;
-	int accepted_id;
-
-	// find the socket
-	socket = socket_cores_find(local_sockets, socket_id);
-	if (!socket)
-		return ENOTSOCK;
-	
-	// destroy all accepted sockets
-	while ((accepted_id = dyn_fifo_pop(&socket->accepted)) >= 0)
-		socket_destroy(packet_phone, accepted_id, local_sockets,
-		    global_sockets, socket_release);
-	
-	socket_destroy_core(packet_phone, socket, local_sockets, global_sockets,
-	    socket_release);
-	
-	return EOK;
-}
-
-/** Replies the packet or the packet queue data to the application via the
- * socket.
- *
- * Uses the current message processing fibril.
- *
- * @param[in] packet	The packet to be transfered.
- * @param[out] length	The total data length.
- * @returns		EOK on success.
- * @returns		EBADMEM if the length parameter is NULL.
- * @returns		ENOMEM if there is not enough memory left.
- * @returns		Other error codes as defined for the data_reply()
- *			function.
- */
-int socket_reply_packets(packet_t packet, size_t *length)
-{
-	ERROR_DECLARE;
-
-	packet_t next_packet;
-	size_t fragments;
-	size_t *lengths;
-	size_t index;
-
-	if (!length)
-		return EBADMEM;
-
-	next_packet = pq_next(packet);
-	if (!next_packet) {
-		// write all if only one fragment
-		ERROR_PROPAGATE(data_reply(packet_get_data(packet),
-		    packet_get_data_length(packet)));
-		// store the total length
-		*length = packet_get_data_length(packet);
-	} else {
-		// count the packet fragments
-		fragments = 1;
-		next_packet = pq_next(packet);
-		while ((next_packet = pq_next(next_packet)))
-			++fragments;
-		
-		// compute and store the fragment lengths
-		lengths = (size_t *) malloc(sizeof(size_t) * fragments +
-		    sizeof(size_t));
-		if (!lengths)
-			return ENOMEM;
-		
-		lengths[0] = packet_get_data_length(packet);
-		lengths[fragments] = lengths[0];
-		next_packet = pq_next(packet);
-		
-		for (index = 1; index < fragments; ++index) {
-			lengths[index] = packet_get_data_length(next_packet);
-			lengths[fragments] += lengths[index];
-			next_packet = pq_next(packet);
-		}
-		
-		// write the fragment lengths
-		if (ERROR_OCCURRED(data_reply(lengths,
-		    sizeof(int) * (fragments + 1)))) {
-			free(lengths);
-			return ERROR_CODE;
-		}
-		next_packet = packet;
-		
-		// write the fragments
-		for (index = 0; index < fragments; ++index) {
-			ERROR_CODE = data_reply(packet_get_data(next_packet),
-			    lengths[index]);
-			if (ERROR_OCCURRED(ERROR_CODE)) {
-				free(lengths);
-				return ERROR_CODE;
-			}
-			next_packet = pq_next(next_packet);
-		}
-		
-		// store the total length
-		*length = lengths[fragments];
-		free(lengths);
-	}
-	
-	return EOK;
-}
-
-/** Finds the bound port socket.
- *
- * @param[in] global_sockets The global sockets to be searched.
- * @param[in] port	The port number.
- * @param[in] key	The socket key identifier.
- * @param[in] key_length The socket key length.
- * @returns		The found socket.
- * @returns		NULL if no socket was found.
- */
-socket_core_ref
-socket_port_find(socket_ports_ref global_sockets, int port, const char *key,
-    size_t key_length)
-{
-	socket_port_ref socket_port;
-	socket_core_ref *socket_ref;
-
-	socket_port = socket_ports_find(global_sockets, port);
-	if (socket_port && (socket_port->count > 0)) {
-		socket_ref = socket_port_map_find(&socket_port->map, key,
-		    key_length);
-		if (socket_ref)
-			return *socket_ref;
-	}
-	
-	return NULL;
-}
-
-/** Releases the socket port.
- *
- * If the socket is bound the port entry is released.
- * If there are no more port entries the port is release.
- *
- * @param[in] global_sockets The global sockets to be updated.
- * @param[in] socket	The socket to be unbound.
- */
-void
-socket_port_release(socket_ports_ref global_sockets, socket_core_ref socket)
-{
-	socket_port_ref socket_port;
-	socket_core_ref *socket_ref;
-
-	if (!socket->port)
-		return;
-	
-	// find ports
-	socket_port = socket_ports_find(global_sockets, socket->port);
-	if (socket_port) {
-		// find the socket
-		socket_ref = socket_port_map_find(&socket_port->map,
-		    socket->key, socket->key_length);
-		
-		if (socket_ref) {
-			--socket_port->count;
-			
-			// release if empty
-			if (socket_port->count <= 0) {
-				// destroy the map
-				socket_port_map_destroy(&socket_port->map);
-				// release the port
-				socket_ports_exclude(global_sockets,
-				    socket->port);
-			} else {
-				// remove
-				socket_port_map_exclude(&socket_port->map,
-				    socket->key, socket->key_length);
-			}
-		}
-	}
-	
-	socket->port = 0;
-	socket->key = NULL;
-	socket->key_length = 0;
-}
-
-/** Adds the socket to an already bound port.
- *
- * @param[in] global_sockets The global sockets to be updated.
- * @param[in] port	The port number to be bound to.
- * @param[in] socket	The socket to be added.
- * @param[in] key	The socket key identifier.
- * @param[in] key_length The socket key length.
- * @returns		EOK on success.
- * @returns		ENOENT if the port is not already used.
- * @returns		Other error codes as defined for the
- *			socket_port_add_core() function.
- */
-int
-socket_port_add(socket_ports_ref global_sockets, int port,
-    socket_core_ref socket, const char *key, size_t key_length)
-{
-	ERROR_DECLARE;
-
-	socket_port_ref socket_port;
-
-	// find ports
-	socket_port = socket_ports_find(global_sockets, port);
-	if (!socket_port)
-		return ENOENT;
-	
-	// add the socket
-	ERROR_PROPAGATE(socket_port_add_core(socket_port, socket, key,
-	    key_length));
-	
-	socket->port = port;
-	return EOK;
-}
-
-/** @}
- */
Index: uspace/lib/net/il/il_interface.c
===================================================================
--- uspace/lib/net/il/il_interface.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/net/il/il_interface.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+#include <il_interface.h>
+#include <generic.h>
+#include <packet_client.h>
+
+#include <ipc/services.h>
+#include <ipc/il.h>
+
+#include <net/device.h>
+#include <net/packet.h>
+
+/** Notify the internetwork layer modules about the device state change.
+ *
+ * @param[in] il_phone  The internetwork layer module phone used for
+ *                      (semi)remote calls.
+ * @param[in] device_id The device identifier.
+ * @param[in] state     The new device state.
+ * @param[in] target    The target internetwork module service to be
+ *                      delivered to.
+ *
+ * @return EOK on success.
+ *
+ */
+int il_device_state_msg(int il_phone, device_id_t device_id,
+    device_state_t state, services_t target)
+{
+	return generic_device_state_msg_remote(il_phone, NET_IL_DEVICE_STATE,
+	    device_id, state, target);
+}
+
+/** Notify the internetwork layer modules about the received packet/s.
+ *
+ * @param[in] il_phone  The internetwork layer module phone used for
+ *                      (semi)remote calls.
+ * @param[in] device_id The device identifier.
+ * @param[in] packet    The received packet or the received packet queue.
+ * @param[in] target    The target internetwork module service to be
+ *                      delivered to.
+ *
+ * @return EOK on success.
+ *
+ */
+int il_received_msg(int il_phone, device_id_t device_id, packet_t packet,
+    services_t target)
+{
+	return generic_received_msg_remote(il_phone, NET_IL_RECEIVED, device_id,
+	    packet_get_id(packet), target, 0);
+}
+
+/** Notify the internetwork layer modules about the mtu change.
+ *
+ * @param[in] il_phone  The internetwork layer module phone used for
+ *                      (semi)remote calls.
+ * @param[in] device_id The device identifier.
+ * @param[in] mtu       The new mtu value.
+ * @param[in] target    The target internetwork module service to be
+ *                      delivered to.
+ *
+ * @return EOK on success.
+ *
+ */
+int il_mtu_changed_msg(int il_phone, device_id_t device_id, size_t mtu,
+    services_t target)
+{
+	return generic_device_state_msg_remote(il_phone, NET_IL_MTU_CHANGED,
+	    device_id, (int) mtu, target);
+}
+
+/** @}
+ */
Index: uspace/lib/net/il/ip_remote.c
===================================================================
--- uspace/lib/net/il/ip_remote.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/il/ip_remote.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ip
+/** @addtogroup libnet
  * @{
  */
@@ -57,10 +57,9 @@
  * The target network is routed using this device.
  *
- * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] address   The target network address.
- * @param[in] netmask   The target network mask.
- * @param[in] gateway   The target network gateway. Not used if zero.
- *
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] device_id	The device identifier.
+ * @param[in] address	The target network address.
+ * @param[in] netmask	The target network mask.
+ * @param[in] gateway	The target network gateway. Not used if zero.
  */
 int ip_add_route_req_remote(int ip_phone, device_id_t device_id,
@@ -72,4 +71,16 @@
 }
 
+/** Creates bidirectional connection with the ip module service and registers
+ * the message receiver.
+ *
+ * @param[in] service	The IP module service.
+ * @param[in] protocol	The transport layer protocol.
+ * @param[in] me	The requesting module service.
+ * @param[in] receiver	The message receiver. Used for remote connection.
+ * @returns		The phone of the needed service.
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for the bind_service()
+ *			function.
+ */
 int ip_bind_service(services_t service, int protocol, services_t me,
     async_client_conn_t receiver)
@@ -79,4 +90,9 @@
 }
 
+/** Connects to the IP module.
+ *
+ * @param service	The IP module service. Ignored parameter.
+ * @returns		The IP module phone on success.
+ */
 int ip_connect_module(services_t service)
 {
@@ -89,17 +105,16 @@
  * If the device uses ARP registers also the new ARP device.
  *
- * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
- * @param[in] device_id The new device identifier.
- * @param[in] netif     The underlying device network interface layer service.
- *
- * @return EOK on success.
- * @return ENOMEM if there is not enough memory left.
- * @return EINVAL if the device configuration is invalid.
- * @return ENOTSUP if the device uses IPv6.
- * @return ENOTSUP if the device uses DHCP.
- * @return Other error codes as defined for the net_get_device_conf_req()
- *         function.
- * @return Other error codes as defined for the arp_device_req() function.
- *
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] device_id	The new device identifier.
+ * @param[in] netif	The underlying device network interface layer service.
+ * @return		EOK on success.
+ * @return		ENOMEM if there is not enough memory left.
+ * @return		EINVAL if the device configuration is invalid.
+ * @return		ENOTSUP if the device uses IPv6.
+ * @return		ENOTSUP if the device uses DHCP.
+ * @return		Other error codes as defined for the
+ *			net_get_device_conf_req() function.
+ * @return		Other error codes as defined for the arp_device_req()
+ *			function.
  */
 int ip_device_req_remote(int ip_phone, device_id_t device_id,
@@ -110,13 +125,14 @@
 }
 
-/** Return the device identifier and the IP pseudo header based on the destination address.
- *
- * @param[in]  ip_phone    The IP module phone used for (semi)remote calls.
- * @param[in]  protocol    The transport protocol.
- * @param[in]  destination The destination address.
- * @param[in]  addrlen     The destination address length.
- * @param[out] device_id   The device identifier.
- * @param[out] header      The constructed IP pseudo header.
- * @param[out] headerlen   The IP pseudo header length.
+/** Return the device identifier and the IP pseudo header based on the
+ * destination address.
+ *
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] protocol	The transport protocol.
+ * @param[in] destination The destination address.
+ * @param[in] addrlen	The destination address length.
+ * @param[out] device_id The device identifier.
+ * @param[out] header	The constructed IP pseudo header.
+ * @param[out] headerlen The IP pseudo header length.
  *
  */
@@ -125,8 +141,8 @@
     device_id_t *device_id, void **header, size_t *headerlen)
 {
-	if ((!destination) || (addrlen == 0))
+	if (!destination || (addrlen == 0))
 		return EINVAL;
 	
-	if ((!device_id) || (!header) || (!headerlen))
+	if (!device_id || !header || !headerlen)
 		return EBADMEM;
 	
@@ -137,10 +153,11 @@
 	    (ipcarg_t) protocol, &answer);
 	
-	if ((async_data_write_start(ip_phone, destination, addrlen) == EOK)
-	    && (async_data_read_start(ip_phone, headerlen, sizeof(*headerlen)) == EOK)
-	    && (*headerlen > 0)) {
+	if ((async_data_write_start(ip_phone, destination, addrlen) == EOK) &&
+	    (async_data_read_start(ip_phone, headerlen,
+	    sizeof(*headerlen)) == EOK) && (*headerlen > 0)) {
 		*header = malloc(*headerlen);
 		if (*header) {
-			if (async_data_read_start(ip_phone, *header, *headerlen) != EOK)
+			if (async_data_read_start(ip_phone, *header,
+			    *headerlen) != EOK)
 				free(*header);
 		}
@@ -150,5 +167,5 @@
 	async_wait_for(message_id, &result);
 	
-	if ((result != EOK) && (*header))
+	if ((result != EOK) && *header)
 		free(*header);
 	else
@@ -160,33 +177,29 @@
 /** Return the device packet dimension for sending.
  *
- * @param[in]  ip_phone         The IP module phone used for (semi)remote calls.
- * @param[in]  device_id        The device identifier.
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] device_id	The device identifier.
  * @param[out] packet_dimension The packet dimension.
- *
- * @return EOK on success.
- * @return ENOENT if there is no such device.
- * @return Other error codes as defined for the
- *         generic_packet_size_req_remote() function.
- *
+ * @return		EOK on success.
+ * @return		ENOENT if there is no such device.
+ * @return		Other error codes as defined for the
+ *			generic_packet_size_req_remote() function.
  */
 int ip_packet_size_req_remote(int ip_phone, device_id_t device_id,
     packet_dimension_ref packet_dimension)
 {
-	return generic_packet_size_req_remote(ip_phone, NET_IL_PACKET_SPACE, device_id,
-	    packet_dimension);
+	return generic_packet_size_req_remote(ip_phone, NET_IL_PACKET_SPACE,
+	    device_id, packet_dimension);
 }
 
 /** Notify the IP module about the received error notification packet.
  *
- * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] packet    The received packet or the received packet queue.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- * @param[in] error     The packet error reporting service. Prefixes the
- *                      received packet.
- *
- * @return EOK on success.
- *
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The received packet or the received packet queue.
+ * @param[in] target	The target internetwork module service to be
+ *			delivered to.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @return		EOK on success.
  */
 int ip_received_error_msg_remote(int ip_phone, device_id_t device_id,
@@ -201,15 +214,14 @@
  * The packets may get fragmented if needed.
  *
- * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] packet    The packet fragments as a packet queue. All the
- *                      packets have to have the same destination address.
- * @param[in] sender    The sending module service.
- * @param[in] error     The packet error reporting service. Prefixes the
- *                      received packet.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the generic_send_msg() function.
- *
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The packet fragments as a packet queue. All the
+ *			packets have to have the same destination address.
+ * @param[in] sender	The sending module service.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the generic_send_msg()
+ *			function.
  */
 int ip_send_msg_remote(int ip_phone, device_id_t device_id, packet_t packet,
@@ -224,8 +236,7 @@
  * This gateway is used if no other route is found.
  *
- * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] gateway   The default gateway.
- *
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] device_id	The device identifier.
+ * @param[in] gateway	The default gateway.
  */
 int ip_set_gateway_req_remote(int ip_phone, device_id_t device_id,
Index: uspace/lib/net/include/ethernet_lsap.h
===================================================================
--- uspace/lib/net/include/ethernet_lsap.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/ethernet_lsap.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,105 +27,32 @@
  */
 
-/** @addtogroup eth
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
 /** @file
- *  Link service access point identifiers.
+ * Link service access point identifiers.
  */
 
-#ifndef __NET_ETHERNET_LSAP_H__
-#define __NET_ETHERNET_LSAP_H__
+#ifndef LIBNET_ETHERNET_LSAP_H_
+#define LIBNET_ETHERNET_LSAP_H_
 
 #include <sys/types.h>
 
-/** Ethernet LSAP type definition.
- */
-typedef uint8_t	eth_lsap_t;
+/** Ethernet LSAP type definition. */
+typedef uint8_t eth_lsap_t;
 
-/** @name Ethernet LSAP values definitions
- */
+/** @name Ethernet LSAP values definitions */
 /*@{*/
 
-/** Null LSAP LSAP identifier.
- */
+/** Null LSAP LSAP identifier. */
 #define ETH_LSAP_NULL	0x00
-/** Individual LLC Sublayer Management Function LSAP identifier.
- */
-#define ETH_LSAP_ISLMF	0x02
-/** Group LLC Sublayer Management Function LSAP identifier.
- */
-#define ETH_LSAP_GSLMI	0x03
-/** IBM SNA Path Control (individual) LSAP identifier.
- */
-#define ETH_LSAP_ISNA	0x04
-/** IBM SNA Path Control (group) LSAP identifier.
- */
-#define ETH_LSAP_GSNA	0x05
-/** ARPANET Internet Protocol (IP) LSAP identifier.
- */
+/** ARPANET Internet Protocol (IP) LSAP identifier. */
 #define ETH_LSAP_IP	0x06
-/** SNA LSAP identifier.
- */
-#define ETH_LSAP_SNA	0x08
-/** SNA LSAP identifier.
- */
-#define ETH_LSAP_SNA2	0x0C
-/** PROWAY (IEC955) Network Management &Initialization LSAP identifier.
- */
-#define ETH_LSAP_PROWAY_NMI	0x0E
-/** Texas Instruments LSAP identifier.
- */
-#define ETH_LSAP_TI	0x18
-/** IEEE 802.1 Bridge Spanning Tree Protocol LSAP identifier.
- */
-#define ETH_LSAP_BRIDGE	0x42
-/** EIA RS-511 Manufacturing Message Service LSAP identifier.
- */
-#define ETH_LSAP_EIS	0x4E
-/** ISO 8208 (X.25 over IEEE 802.2 Type 2 LLC) LSAP identifier.
- */
-#define ETH_LSAP_ISO8208	0x7E
-/** Xerox Network Systems (XNS) LSAP identifier.
- */
-#define ETH_LSAP_XNS	0x80
-/** Nestar LSAP identifier.
- */
-#define ETH_LSAP_NESTAR	0x86
-/** PROWAY (IEC 955) Active Station List Maintenance LSAP identifier.
- */
-#define ETH_LSAP_PROWAY_ASLM	0x8E
-/** ARPANET Address Resolution Protocol (ARP) LSAP identifier.
- */
+/** ARPANET Address Resolution Protocol (ARP) LSAP identifier. */
 #define ETH_LSAP_ARP	0x98
-/** Banyan VINES LSAP identifier.
- */
-#define ETH_LSAP_VINES	0xBC
-/** SubNetwork Access Protocol (SNAP) LSAP identifier.
- */
+/** SubNetwork Access Protocol (SNAP) LSAP identifier. */
 #define ETH_LSAP_SNAP	0xAA
-/** Novell NetWare LSAP identifier.
- */
-#define ETH_LSAP_NETWARE	0xE0
-/** IBM NetBIOS LSAP identifier.
- */
-#define ETH_LSAP_NETBIOS	0xF0
-/** IBM LAN Management (individual) LSAP identifier.
- */
-#define ETH_LSAP_ILAN	0xF4
-/** IBM LAN Management (group) LSAP identifier.
- */
-#define ETH_LSAP_GLAN	0xF5
-/** IBM Remote Program Load (RPL) LSAP identifier.
- */
-#define ETH_LSAP_RPL	0xF8
-/** Ungermann-Bass LSAP identifier.
- */
-#define ETH_LSAP_UB	0xFA
-/** ISO Network Layer Protocol LSAP identifier.
- */
-#define ETH_LSAP_ISONLP	0xFE
-/** Global LSAP LSAP identifier.
- */
+/** Global LSAP LSAP identifier. */
 #define ETH_LSAP_GLSAP	0xFF
 
Index: uspace/lib/net/include/ethernet_protocols.h
===================================================================
--- uspace/lib/net/include/ethernet_protocols.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/ethernet_protocols.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,981 +27,35 @@
  */
 
-/** @addtogroup eth
- *  @{
+/** @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.
+ * Ethernet protocol numbers according to the on-line IANA - Ethernet numbers
+ * http://www.iana.org/assignments/ethernet-numbers
+ * cited January 17 2009.
  */
 
-#ifndef __NET_ETHERNET_PROTOCOLS_H__
-#define __NET_ETHERNET_PROTOCOLS_H__
+#ifndef LIBNET_ETHERNET_PROTOCOLS_H_
+#define LIBNET_ETHERNET_PROTOCOLS_H_
 
 #include <sys/types.h>
 
-/** Ethernet protocol type definition.
- */
-typedef uint16_t	eth_type_t;
+/** Ethernet protocol type definition. */
+typedef uint16_t eth_type_t;
 
-/** @name Ethernet protocols definitions
- */
+/** @name Ethernet protocols definitions */
 /*@{*/
 
 /** Ethernet minimal protocol number.
- *  According to the IEEE 802.3 specification.
+ * According to the IEEE 802.3 specification.
  */
-#define ETH_MIN_PROTO	0x0600 /*1536*/
+#define ETH_MIN_PROTO		0x0600 /* 1536 */
 
-/** Ethernet loopback packet protocol type.
- */
-#define ETH_P_LOOP		0x0060
-
-/** XEROX PUP (see 0A00) ethernet protocol type.
- */
-#define ETH_P_PUP		0x0200
-
-/** PUP Addr Trans (see 0A01) ethernet protocol type.
- */
-#define ETH_P_PUPAT		0x0201
-
-/** Nixdorf ethernet protocol type.
- */
-#define ETH_P_Nixdorf		0x0400
-
-/** XEROX NS IDP ethernet protocol type.
- */
-#define ETH_P_XEROX_NS_IDP		0x0600
-
-/** DLOG ethernet protocol type.
- */
-#define ETH_P_DLOG		0x0660
-
-/** DLOG ethernet protocol type.
- */
-#define ETH_P_DLOG2		0x0661
-
-/** Internet IP (IPv4) ethernet protocol type.
- */
+/** Internet IP (IPv4) ethernet protocol type. */
 #define ETH_P_IP		0x0800
 
-/** X.75 Internet ethernet protocol type.
- */
-#define ETH_P_X_75		0x0801
-
-/** NBS Internet ethernet protocol type.
- */
-#define ETH_P_NBS		0x0802
-
-/** ECMA Internet ethernet protocol type.
- */
-#define ETH_P_ECMA		0x0803
-
-/** Chaosnet ethernet protocol type.
- */
-#define ETH_P_Chaosnet		0x0804
-
-/** X.25 Level 3 ethernet protocol type.
- */
-#define ETH_P_X25		0x0805
-
-/** ARP ethernet protocol type.
- */
+/** ARP ethernet protocol type. */
 #define ETH_P_ARP		0x0806
-
-/** XNS Compatability ethernet protocol type.
- */
-#define ETH_P_XNS_Compatability		0x0807
-
-/** Frame Relay ARP ethernet protocol type.
- */
-#define ETH_P_Frame_Relay_ARP		0x0808
-
-/** Symbolics Private ethernet protocol type.
- */
-#define ETH_P_Symbolics_Private		0x081C
-
-/** Xyplex ethernet protocol type.
- */
-#define ETH_P_Xyplex_MIN		0x0888
-
-/** Xyplex ethernet protocol type.
- */
-#define ETH_P_Xyplex_MAX		0x088A
-
-/** Ungermann-Bass net debugr ethernet protocol type.
- */
-#define ETH_P_Ungermann_Bass_net_debugr		0x0900
-
-/** Xerox IEEE802.3 PUP ethernet protocol type.
- */
-#define ETH_P_IEEEPUP		0x0A00
-
-/** PUP Addr Trans ethernet protocol type.
- */
-#define ETH_P_IEEEPUPAT		0x0A01
-
-/** Banyan VINES ethernet protocol type.
- */
-#define ETH_P_Banyan_VINES		0x0BAD
-
-/** VINES Loopback ethernet protocol type.
- */
-#define ETH_P_VINES_Loopback		0x0BAE
-
-/** VINES Echo ethernet protocol type.
- */
-#define ETH_P_VINES_Echo		0x0BAF
-
-/** Berkeley Trailer nego ethernet protocol type.
- */
-#define ETH_P_Berkeley_Trailer_nego		0x1000
-
-/** Berkeley Trailer encap/IP ethernet protocol type.
- */
-#define ETH_P_Berkeley_Trailer_encapIP_MIN		0x1001
-
-/** Berkeley Trailer encap/IP ethernet protocol type.
- */
-#define ETH_P_Berkeley_Trailer_encapIP_MAX		0x100F
-
-/** Valid Systems ethernet protocol type.
- */
-#define ETH_P_Valid_Systems		0x1600
-
-/** PCS Basic Block Protocol ethernet protocol type.
- */
-#define ETH_P_PCS_Basic_Block_Protocol		0x4242
-
-/** BBN Simnet ethernet protocol type.
- */
-#define ETH_P_BBN_Simnet		0x5208
-
-/** DEC Unassigned (Exp.) ethernet protocol type.
- */
-#define ETH_P_DEC		0x6000
-
-/** DEC MOP Dump/Load ethernet protocol type.
- */
-#define ETH_P_DNA_DL		0x6001
-
-/** DEC MOP Remote Console ethernet protocol type.
- */
-#define ETH_P_DNA_RC		0x6002
-
-/** DEC DECNET Phase IV Route ethernet protocol type.
- */
-#define ETH_P_DNA_RT		0x6003
-
-/** DEC LAT ethernet protocol type.
- */
-#define ETH_P_LAT		0x6004
-
-/** DEC Diagnostic Protocol ethernet protocol type.
- */
-#define ETH_P_DIAG		0x6005
-
-/** DEC Customer Protocol ethernet protocol type.
- */
-#define ETH_P_CUST		0x6006
-
-/** DEC LAVC, SCA ethernet protocol type.
- */
-#define ETH_P_SCA		0x6007
-
-/** DEC Unassigned ethernet protocol type.
- */
-#define ETH_P_DEC_Unassigned_MIN		0x6008
-
-/** DEC Unassigned ethernet protocol type.
- */
-#define ETH_P_DEC_Unassigned_MAX		0x6009
-
-/** Com Corporation ethernet protocol type.
- */
-#define ETH_P_Com_Corporation_MIN		0x6010
-
-/** Com Corporation ethernet protocol type.
- */
-#define ETH_P_Com_Corporation_MAX		0x6014
-
-/** Trans Ether Bridging ethernet protocol type.
- */
-#define ETH_P_Trans_Ether_Bridging		0x6558
-
-/** Raw Frame Relay ethernet protocol type.
- */
-#define ETH_P_Raw_Frame_Relay		0x6559
-
-/** Ungermann-Bass download ethernet protocol type.
- */
-#define ETH_P_Ungermann_Bass_download		0x7000
-
-/** Ungermann-Bass dia/loop ethernet protocol type.
- */
-#define ETH_P_Ungermann_Bass_dialoop		0x7002
-
-/** LRT ethernet protocol type.
- */
-#define ETH_P_LRT_MIN		0x7020
-
-/** LRT ethernet protocol type.
- */
-#define ETH_P_LRT_MAX		0x7029
-
-/** Proteon ethernet protocol type.
- */
-#define ETH_P_Proteon		0x7030
-
-/** Cabletron ethernet protocol type.
- */
-#define ETH_P_Cabletron		0x7034
-
-/** Cronus VLN ethernet protocol type.
- */
-#define ETH_P_Cronus_VLN		0x8003
-
-/** Cronus Direct ethernet protocol type.
- */
-#define ETH_P_Cronus_Direct		0x8004
-
-/** HP Probe ethernet protocol type.
- */
-#define ETH_P_HP_Probe		0x8005
-
-/** Nestar ethernet protocol type.
- */
-#define ETH_P_Nestar		0x8006
-
-/** AT&T ethernet protocol type.
- */
-#define ETH_P_AT_T		0x8008
-
-/** Excelan ethernet protocol type.
- */
-#define ETH_P_Excelan		0x8010
-
-/** SGI diagnostics ethernet protocol type.
- */
-#define ETH_P_SGI_diagnostics		0x8013
-
-/** SGI network games ethernet protocol type.
- */
-#define ETH_P_SGI_network_games		0x8014
-
-/** SGI reserved ethernet protocol type.
- */
-#define ETH_P_SGI_reserved		0x8015
-
-/** SGI bounce server ethernet protocol type.
- */
-#define ETH_P_SGI_bounce_server		0x8016
-
-/** Apollo Domain ethernet protocol type.
- */
-#define ETH_P_Apollo_Domain		0x8019
-
-/** Tymshare ethernet protocol type.
- */
-#define ETH_P_Tymshare		0x802E
-
-/** Tigan, Inc. ethernet protocol type.
- */
-#define ETH_P_Tigan		0x802F
-
-/** Reverse ARP ethernet protocol type.
- */
-#define ETH_P_RARP		0x8035
-
-/** Aeonic Systems ethernet protocol type.
- */
-#define ETH_P_Aeonic_Systems		0x8036
-
-/** DEC LANBridge ethernet protocol type.
- */
-#define ETH_P_DEC_LANBridge		0x8038
-
-/** DEC Unassigned ethernet protocol type.
- */
-#define ETH_P_DEC_Unassigned_MIN1		0x8039
-
-/** DEC Unassigned ethernet protocol type.
- */
-#define ETH_P_DEC_Unassigned_MAX2		0x803C
-
-/** DEC Ethernet Encryption ethernet protocol type.
- */
-#define ETH_P_DEC_Ethernet_Encryption		0x803D
-
-/** DEC Unassigned ethernet protocol type.
- */
-#define ETH_P_DEC_Unassigned		0x803E
-
-/** DEC LAN Traffic Monitor ethernet protocol type.
- */
-#define ETH_P_DEC_LAN_Traffic_Monitor		0x803F
-
-/** DEC Unassigned ethernet protocol type.
- */
-#define ETH_P_DEC_Unassigned_MIN3		0x8040
-
-/** DEC Unassigned ethernet protocol type.
- */
-#define ETH_P_DEC_Unassigned_MAX3		0x8042
-
-/** Planning Research Corp. ethernet protocol type.
- */
-#define ETH_P_Planning_Research_Corp		0x8044
-
-/** AT&T ethernet protocol type.
- */
-#define ETH_P_AT_T2		0x8046
-
-/** AT&T ethernet protocol type.
- */
-#define ETH_P_AT_T3		0x8047
-
-/** ExperData ethernet protocol type.
- */
-#define ETH_P_ExperData		0x8049
-
-/** Stanford V Kernel exp. ethernet protocol type.
- */
-#define ETH_P_Stanford_V_Kernel_exp		0x805B
-
-/** Stanford V Kernel prod. ethernet protocol type.
- */
-#define ETH_P_Stanford_V_Kernel_prod		0x805C
-
-/** Evans &Sutherland ethernet protocol type.
- */
-#define ETH_P_Evans_Sutherland		0x805D
-
-/** Little Machines ethernet protocol type.
- */
-#define ETH_P_Little_Machines		0x8060
-
-/** Counterpoint Computers ethernet protocol type.
- */
-#define ETH_P_Counterpoint_Computers		0x8062
-
-/** Univ. of Mass. @ Amherst ethernet protocol type.
- */
-#define ETH_P_Univ_of_Mass		0x8065
-
-/** Univ. of Mass. @ Amherst ethernet protocol type.
- */
-#define ETH_P_Univ_of_Mass2		0x8066
-
-/** Veeco Integrated Auto. ethernet protocol type.
- */
-#define ETH_P_Veeco_Integrated_Auto		0x8067
-
-/** General Dynamics ethernet protocol type.
- */
-#define ETH_P_General_Dynamics		0x8068
-
-/** AT&T ethernet protocol type.
- */
-#define ETH_P_AT_T4		0x8069
-
-/** Autophon ethernet protocol type.
- */
-#define ETH_P_Autophon		0x806A
-
-/** ComDesign ethernet protocol type.
- */
-#define ETH_P_ComDesign		0x806C
-
-/** Computgraphic Corp. ethernet protocol type.
- */
-#define ETH_P_Computgraphic_Corp		0x806D
-
-/** Landmark Graphics Corp. ethernet protocol type.
- */
-#define ETH_P_Landmark_Graphics_Corp_MIN		0x806E
-
-/** Landmark Graphics Corp. ethernet protocol type.
- */
-#define ETH_P_Landmark_Graphics_Corp_MAX		0x8077
-
-/** Matra ethernet protocol type.
- */
-#define ETH_P_Matra		0x807A
-
-/** Dansk Data Elektronik ethernet protocol type.
- */
-#define ETH_P_Dansk_Data_Elektronik		0x807B
-
-/** Merit Internodal ethernet protocol type.
- */
-#define ETH_P_Merit_Internodal		0x807C
-
-/** Vitalink Communications ethernet protocol type.
- */
-#define ETH_P_Vitalink_Communications_MIN		0x807D
-
-/** Vitalink Communications ethernet protocol type.
- */
-#define ETH_P_Vitalink_Communications_MAX		0x807F
-
-/** Vitalink TransLAN III ethernet protocol type.
- */
-#define ETH_P_Vitalink_TransLAN_III		0x8080
-
-/** Counterpoint Computers ethernet protocol type.
- */
-#define ETH_P_Counterpoint_Computers_MIN		0x8081
-
-/** Counterpoint Computers ethernet protocol type.
- */
-#define ETH_P_Counterpoint_Computers_MAX		0x8083
-
-/** Appletalk ethernet protocol type.
- */
-#define ETH_P_ATALK		0x809B
-
-/** Datability ethernet protocol type.
- */
-#define ETH_P_Datability_MIN		0x809C
-
-/** Datability ethernet protocol type.
- */
-#define ETH_P_Datability_MAX		0x809E
-
-/** Spider Systems Ltd. ethernet protocol type.
- */
-#define ETH_P_Spider_Systems_Ltd		0x809F
-
-/** Nixdorf Computers ethernet protocol type.
- */
-#define ETH_P_Nixdorf_Computers		0x80A3
-
-/** Siemens Gammasonics Inc. ethernet protocol type.
- */
-#define ETH_P_Siemens_Gammasonics_Inc_MIN		0x80A4
-
-/** Siemens Gammasonics Inc. ethernet protocol type.
- */
-#define ETH_P_Siemens_Gammasonics_Inc_MAX		0x80B3
-
-/** DCA Data Exchange Cluster ethernet protocol type.
- */
-#define ETH_P_DCA_Data_Exchange_Cluster_MIN		0x80C0
-
-/** DCA Data Exchange Cluster ethernet protocol type.
- */
-#define ETH_P_DCA_Data_Exchange_Cluster_MAX		0x80C3
-
-/** Banyan Systems ethernet protocol type.
- */
-#define ETH_P_Banyan_Systems		0x80C4
-
-/** Banyan Systems ethernet protocol type.
- */
-#define ETH_P_Banyan_Systems2		0x80C5
-
-/** Pacer Software ethernet protocol type.
- */
-#define ETH_P_Pacer_Software		0x80C6
-
-/** Applitek Corporation ethernet protocol type.
- */
-#define ETH_P_Applitek_Corporation		0x80C7
-
-/** Intergraph Corporation ethernet protocol type.
- */
-#define ETH_P_Intergraph_Corporation_MIN		0x80C8
-
-/** Intergraph Corporation ethernet protocol type.
- */
-#define ETH_P_Intergraph_Corporation_MAX		0x80CC
-
-/** Harris Corporation ethernet protocol type.
- */
-#define ETH_P_Harris_Corporation_MIN		0x80CD
-
-/** Harris Corporation ethernet protocol type.
- */
-#define ETH_P_Harris_Corporation_MAX		0x80CE
-
-/** Taylor Instrument ethernet protocol type.
- */
-#define ETH_P_Taylor_Instrument_MIN		0x80CF
-
-/** Taylor Instrument ethernet protocol type.
- */
-#define ETH_P_Taylor_Instrument_MAX		0x80D2
-
-/** Rosemount Corporation ethernet protocol type.
- */
-#define ETH_P_Rosemount_Corporation_MIN		0x80D3
-
-/** Rosemount Corporation ethernet protocol type.
- */
-#define ETH_P_Rosemount_Corporation_MAX		0x80D4
-
-/** IBM SNA Service on Ether ethernet protocol type.
- */
-#define ETH_P_IBM_SNA_Service_on_Ether		0x80D5
-
-/** Varian Associates ethernet protocol type.
- */
-#define ETH_P_Varian_Associates		0x80DD
-
-/** Integrated Solutions TRFS ethernet protocol type.
- */
-#define ETH_P_Integrated_Solutions_TRFS_MIN		0x80DE
-
-/** Integrated Solutions TRFS ethernet protocol type.
- */
-#define ETH_P_Integrated_Solutions_TRFS_MAX		0x80DF
-
-/** Allen-Bradley ethernet protocol type.
- */
-#define ETH_P_Allen_Bradley_MIN		0x80E0
-
-/** Allen-Bradley ethernet protocol type.
- */
-#define ETH_P_Allen_Bradley_MAX		0x80E3
-
-/** Datability ethernet protocol type.
- */
-#define ETH_P_Datability_MIN2		0x80E4
-
-/** Datability ethernet protocol type.
- */
-#define ETH_P_Datability_MAX2		0x80F0
-
-/** Retix ethernet protocol type.
- */
-#define ETH_P_Retix		0x80F2
-
-/** AppleTalk AARP (Kinetics) ethernet protocol type.
- */
-#define ETH_P_AARP		0x80F3
-
-/** Kinetics ethernet protocol type.
- */
-#define ETH_P_Kinetics_MIN		0x80F4
-
-/** Kinetics ethernet protocol type.
- */
-#define ETH_P_Kinetics_MAX		0x80F5
-
-/** Apollo Computer ethernet protocol type.
- */
-#define ETH_P_Apollo_Computer		0x80F7
-
-/** Wellfleet Communications ethernet protocol type.
- */
-#define ETH_P_Wellfleet_Communications		0x80FF
-
-/** IEEE 802.1Q VLAN-tagged frames (initially Wellfleet) ethernet protocol type.
- */
-#define ETH_P_8021Q		0x8100
-
-/** Wellfleet Communications ethernet protocol type.
- */
-#define ETH_P_Wellfleet_Communications_MIN		0x8101
-
-/** Wellfleet Communications ethernet protocol type.
- */
-#define ETH_P_Wellfleet_Communications_MAX		0x8103
-
-/** Symbolics Private ethernet protocol type.
- */
-#define ETH_P_Symbolics_Private_MIN		0x8107
-
-/** Symbolics Private ethernet protocol type.
- */
-#define ETH_P_Symbolics_Private_MAX		0x8109
-
-/** Hayes Microcomputers ethernet protocol type.
- */
-#define ETH_P_Hayes_Microcomputers		0x8130
-
-/** VG Laboratory Systems ethernet protocol type.
- */
-#define ETH_P_VG_Laboratory_Systems		0x8131
-
-/** Bridge Communications ethernet protocol type.
- */
-#define ETH_P_Bridge_Communications_MIN		0x8132
-
-/** Bridge Communications ethernet protocol type.
- */
-#define ETH_P_Bridge_Communications_MAX		0x8136
-
-/** Novell, Inc. ethernet protocol type.
- */
-#define ETH_P_Novell_Inc_MIN		0x8137
-
-/** Novell, Inc. ethernet protocol type.
- */
-#define ETH_P_Novell_Inc_MAX		0x8138
-
-/** KTI ethernet protocol type.
- */
-#define ETH_P_KTI_MIN		0x8139
-
-/** KTI ethernet protocol type.
- */
-#define ETH_P_KTI_MAX		0x813D
-
-/** Logicraft ethernet protocol type.
- */
-#define ETH_P_Logicraft		0x8148
-
-/** Network Computing Devices ethernet protocol type.
- */
-#define ETH_P_Network_Computing_Devices		0x8149
-
-/** Alpha Micro ethernet protocol type.
- */
-#define ETH_P_Alpha_Micro		0x814A
-
-/** SNMP ethernet protocol type.
- */
-#define ETH_P_SNMP		0x814C
-
-/** BIIN ethernet protocol type.
- */
-#define ETH_P_BIIN		0x814D
-
-/** BIIN ethernet protocol type.
- */
-#define ETH_P_BIIN2		0x814E
-
-/** Technically Elite Concept ethernet protocol type.
- */
-#define ETH_P_Technically_Elite_Concept		0x814F
-
-/** Rational Corp ethernet protocol type.
- */
-#define ETH_P_Rational_Corp		0x8150
-
-/** Qualcomm ethernet protocol type.
- */
-#define ETH_P_Qualcomm_MIN		0x8151
-
-/** Qualcomm ethernet protocol type.
- */
-#define ETH_P_Qualcomm_MAX		0x8153
-
-/** Computer Protocol Pty Ltd ethernet protocol type.
- */
-#define ETH_P_Computer_Protocol_Pty_Ltd_MIN		0x815C
-
-/** Computer Protocol Pty Ltd ethernet protocol type.
- */
-#define ETH_P_Computer_Protocol_Pty_Ltd_MAX		0x815E
-
-/** Charles River Data System ethernet protocol type.
- */
-#define ETH_P_Charles_River_Data_System_MIN		0x8164
-
-/** Charles River Data System ethernet protocol type.
- */
-#define ETH_P_Charles_River_Data_System_MAX		0x8166
-
-/** XTP ethernet protocol type.
- */
-#define ETH_P_XTP		0x817D
-
-/** SGI/Time Warner prop. ethernet protocol type.
- */
-#define ETH_P_SGITime_Warner_prop		0x817E
-
-/** HIPPI-FP encapsulation ethernet protocol type.
- */
-#define ETH_P_HIPPI_FP_encapsulation		0x8180
-
-/** STP, HIPPI-ST ethernet protocol type.
- */
-#define ETH_P_STP_HIPPI_ST		0x8181
-
-/** Reserved for HIPPI-6400 ethernet protocol type.
- */
-#define ETH_P_Reserved_for_HIPPI_6400		0x8182
-
-/** Reserved for HIPPI-6400 ethernet protocol type.
- */
-#define ETH_P_Reserved_for_HIPPI_64002		0x8183
-
-/** Silicon Graphics prop. ethernet protocol type.
- */
-#define ETH_P_Silicon_Graphics_prop_MIN		0x8184
-
-/** Silicon Graphics prop. ethernet protocol type.
- */
-#define ETH_P_Silicon_Graphics_prop_MAX		0x818C
-
-/** Motorola Computer ethernet protocol type.
- */
-#define ETH_P_Motorola_Computer		0x818D
-
-/** Qualcomm ethernet protocol type.
- */
-#define ETH_P_Qualcomm_MIN2		0x819A
-
-/** Qualcomm ethernet protocol type.
- */
-#define ETH_P_Qualcomm_MAX2		0x81A3
-
-/** ARAI Bunkichi ethernet protocol type.
- */
-#define ETH_P_ARAI_Bunkichi		0x81A4
-
-/** RAD Network Devices ethernet protocol type.
- */
-#define ETH_P_RAD_Network_Devices_MIN		0x81A5
-
-/** RAD Network Devices ethernet protocol type.
- */
-#define ETH_P_RAD_Network_Devices_MAX		0x81AE
-
-/** Xyplex ethernet protocol type.
- */
-#define ETH_P_Xyplex_MIN2		0x81B7
-
-/** Xyplex ethernet protocol type.
- */
-#define ETH_P_Xyplex_MAX2		0x81B9
-
-/** Apricot Computers ethernet protocol type.
- */
-#define ETH_P_Apricot_Computers_MIN		0x81CC
-
-/** Apricot Computers ethernet protocol type.
- */
-#define ETH_P_Apricot_Computers_MAX		0x81D5
-
-/** Artisoft ethernet protocol type.
- */
-#define ETH_P_Artisoft_MIN		0x81D6
-
-/** Artisoft ethernet protocol type.
- */
-#define ETH_P_Artisoft_MAX		0x81DD
-
-/** Polygon ethernet protocol type.
- */
-#define ETH_P_Polygon_MIN		0x81E6
-
-/** Polygon ethernet protocol type.
- */
-#define ETH_P_Polygon_MAX		0x81EF
-
-/** Comsat Labs ethernet protocol type.
- */
-#define ETH_P_Comsat_Labs_MIN		0x81F0
-
-/** Comsat Labs ethernet protocol type.
- */
-#define ETH_P_Comsat_Labs_MAX		0x81F2
-
-/** SAIC ethernet protocol type.
- */
-#define ETH_P_SAIC_MIN		0x81F3
-
-/** SAIC ethernet protocol type.
- */
-#define ETH_P_SAIC_MAX		0x81F5
-
-/** VG Analytical ethernet protocol type.
- */
-#define ETH_P_VG_Analytical_MIN		0x81F6
-
-/** VG Analytical ethernet protocol type.
- */
-#define ETH_P_VG_Analytical_MAX		0x81F8
-
-/** Quantum Software ethernet protocol type.
- */
-#define ETH_P_Quantum_Software_MIN		0x8203
-
-/** Quantum Software ethernet protocol type.
- */
-#define ETH_P_Quantum_Software_MAX		0x8205
-
-/** Ascom Banking Systems ethernet protocol type.
- */
-#define ETH_P_Ascom_Banking_Systems_MIN		0x8221
-
-/** Ascom Banking Systems ethernet protocol type.
- */
-#define ETH_P_Ascom_Banking_Systems_MAX		0x8222
-
-/** Advanced Encryption Syste ethernet protocol type.
- */
-#define ETH_P_Advanced_Encryption_Syste_MIN		0x823E
-
-/** Advanced Encryption Syste ethernet protocol type.
- */
-#define ETH_P_Advanced_Encryption_Syste_MAX		0x8240
-
-/** Athena Programming ethernet protocol type.
- */
-#define ETH_P_Athena_Programming_MIN		0x827F
-
-/** Athena Programming ethernet protocol type.
- */
-#define ETH_P_Athena_Programming_MAX		0x8282
-
-/** Charles River Data System ethernet protocol type.
- */
-#define ETH_P_Charles_River_Data_System_MIN2		0x8263
-
-/** Charles River Data System ethernet protocol type.
- */
-#define ETH_P_Charles_River_Data_System_MAX2		0x826A
-
-/** Inst Ind Info Tech ethernet protocol type.
- */
-#define ETH_P_Inst_Ind_Info_Tech_MIN		0x829A
-
-/** Inst Ind Info Tech ethernet protocol type.
- */
-#define ETH_P_Inst_Ind_Info_Tech_MAX		0x829B
-
-/** Taurus Controls ethernet protocol type.
- */
-#define ETH_P_Taurus_Controls_MIN		0x829C
-
-/** Taurus Controls ethernet protocol type.
- */
-#define ETH_P_Taurus_Controls_MAX		0x82AB
-
-/** Walker Richer &Quinn ethernet protocol type.
- */
-#define ETH_P_Walker_Richer_Quinn_MIN		0x82AC
-
-/** Walker Richer &Quinn ethernet protocol type.
- */
-#define ETH_P_Walker_Richer_Quinn_MAX		0x8693
-
-/** Idea Courier ethernet protocol type.
- */
-#define ETH_P_Idea_Courier_MIN		0x8694
-
-/** Idea Courier ethernet protocol type.
- */
-#define ETH_P_Idea_Courier_MAX		0x869D
-
-/** Computer Network Tech ethernet protocol type.
- */
-#define ETH_P_Computer_Network_Tech_MIN		0x869E
-
-/** Computer Network Tech ethernet protocol type.
- */
-#define ETH_P_Computer_Network_Tech_MAX		0x86A1
-
-/** Gateway Communications ethernet protocol type.
- */
-#define ETH_P_Gateway_Communications_MIN		0x86A3
-
-/** Gateway Communications ethernet protocol type.
- */
-#define ETH_P_Gateway_Communications_MAX		0x86AC
-
-/** SECTRA ethernet protocol type.
- */
-#define ETH_P_SECTRA		0x86DB
-
-/** Delta Controls ethernet protocol type.
- */
-#define ETH_P_Delta_Controls		0x86DE
-
-/** IPv6 ethernet protocol type.
- */
-#define ETH_P_IPV6		0x86DD
-
-/** ATOMIC ethernet protocol type.
- */
-#define ETH_P_ATOMIC		0x86DF
-
-/** Landis &Gyr Powers ethernet protocol type.
- */
-#define ETH_P_Landis_Gyr_Powers_MIN		0x86E0
-
-/** Landis &Gyr Powers ethernet protocol type.
- */
-#define ETH_P_Landis_Gyr_Powers_MAX		0x86EF
-
-/** Motorola ethernet protocol type.
- */
-#define ETH_P_Motorola_MIN		0x8700
-
-/** Motorola ethernet protocol type.
- */
-#define ETH_P_Motorola_MAX		0x8710
-
-/** TCP/IP Compression ethernet protocol type.
- */
-#define ETH_P_TCPIP_Compression		0x876B
-
-/** IP Autonomous Systems ethernet protocol type.
- */
-#define ETH_P_IP_Autonomous_Systems		0x876C
-
-/** Secure Data ethernet protocol type.
- */
-#define ETH_P_Secure_Data		0x876D
-
-/** PPP ethernet protocol type.
- */
-#define ETH_P_PPP		0x880B
-
-/** MPLS ethernet protocol type.
- */
-#define ETH_P_MPLS_UC		0x8847
-
-/** MPLS with upstream-assigned label ethernet protocol type.
- */
-#define ETH_P_MPLS_MC		0x8848
-
-/** Invisible Software ethernet protocol type.
- */
-#define ETH_P_Invisible_Software_MIN		0x8A96
-
-/** Invisible Software ethernet protocol type.
- */
-#define ETH_P_Invisible_Software_MAX		0x8A97
-
-/** PPPoE Discovery Stage ethernet protocol type.
- */
-#define ETH_P_PPP_DISC		0x8863
-
-/** PPPoE Session Stage ethernet protocol type.
- */
-#define ETH_P_PPP_SES		0x8864
-
-/** Loopback ethernet protocol type.
- */
-#define ETH_P_Loopback		0x9000
-
-/** Com(Bridge) XNS Sys Mgmt ethernet protocol type.
- */
-#define ETH_P_Com_XNS_Sys_Mgmt		0x9001
-
-/** Com(Bridge) TCP-IP Sys ethernet protocol type.
- */
-#define ETH_P_Com_TCP_IP_Sys		0x9002
-
-/** Com(Bridge) loop detect ethernet protocol type.
- */
-#define ETH_P_Com_loop_detect		0x9003
-
-/** BBN VITAL-LanBridge cache ethernet protocol type.
- */
-#define ETH_P_BBN_VITAL_LanBridge_cache		0xFF00
-
-/** ISC Bunker Ramo ethernet protocol type.
- */
-#define ETH_P_ISC_Bunker_Ramo_MIN		0xFF00
-
-/** ISC Bunker Ramo ethernet protocol type.
- */
-#define ETH_P_ISC_Bunker_Ramo_MAX		0xFF0F
 
 /*@}*/
Index: uspace/lib/net/include/icmp_client.h
===================================================================
--- uspace/lib/net/include/icmp_client.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/icmp_client.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,34 +27,21 @@
  */
 
-/** @addtogroup icmp
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
 /** @file
- *  ICMP client interface.
+ * ICMP client interface.
  */
 
-#ifndef __NET_ICMP_CLIENT_H__
-#define __NET_ICMP_CLIENT_H__
+#ifndef LIBNET_ICMP_CLIENT_H_
+#define LIBNET_ICMP_CLIENT_H_
 
 #include <net/icmp_codes.h>
 #include <net/packet.h>
 
-/** Processes the received packet prefixed with an ICMP header.
- *  @param[in] packet The received packet.
- *  @param[out] type The ICMP header type.
- *  @param[out] code The ICMP header code.
- *  @param[out] pointer The ICMP header pointer.
- *  @param[out] mtu The ICMP header MTU.
- *  @returns The ICMP header length.
- *  @returns Zero (0) if the packet contains no data.
- */
-extern int icmp_client_process_packet(packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu);
-
-/** Returns the ICMP header length.
- *  @param[in] packet The packet.
- *  @returns The ICMP header length in bytes.
- */
-extern size_t icmp_client_header_length(packet_t packet);
+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 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/icmp_header.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,15 +27,15 @@
  */
 
-/** @addtogroup icmp
+/** @addtogroup libnet
  *  @{
  */
 
 /** @file
- *  ICMP header definition.
- *  Based on the RFC~792.
+ * ICMP header definition.
+ * Based on the RFC 792.
  */
 
-#ifndef __NET_ICMP_HEADER_H__
-#define __NET_ICMP_HEADER_H__
+#ifndef LIBNET_ICMP_HEADER_H_
+#define LIBNET_ICMP_HEADER_H_
 
 #include <sys/types.h>
@@ -44,83 +44,74 @@
 #include <net/icmp_codes.h>
 
-/** ICMP header size in bytes.
- */
-#define ICMP_HEADER_SIZE			sizeof(icmp_header_t)
+/** ICMP header size in bytes. */
+#define ICMP_HEADER_SIZE	sizeof(icmp_header_t)
 
 /** Type definition of the echo specific data.
- *  @see icmp_echo
+ * @see icmp_echo
  */
-typedef struct icmp_echo	icmp_echo_t;
+typedef struct icmp_echo icmp_echo_t;
 
 /** Type definition of the echo specific data pointer.
- *  @see icmp_echo
+ * @see icmp_echo
  */
-typedef icmp_echo_t *		icmp_echo_ref;
+typedef icmp_echo_t *icmp_echo_ref;
 
-/** Echo specific data.
- */
-struct icmp_echo{
-	/** Message idintifier.
-	 */
+/** Echo specific data. */
+struct icmp_echo {
+	/** Message idintifier. */
 	icmp_param_t identifier;
-	/** Message sequence number.
-	 */
+	/** Message sequence number. */
 	icmp_param_t sequence_number;
 } __attribute__ ((packed));
 
 /** Type definition of the internet control message header.
- *  @see icmp_header
+ * @see icmp_header
  */
-typedef struct icmp_header	icmp_header_t;
+typedef struct icmp_header icmp_header_t;
 
 /** Type definition of the internet control message header pointer.
- *  @see icmp_header
+ * @see icmp_header
  */
-typedef icmp_header_t *		icmp_header_ref;
+typedef icmp_header_t *icmp_header_ref;
 
-/** Internet control message header.
- */
-struct icmp_header{
-	/** The type of the message.
-	 */
+/** Internet control message header. */
+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.
+	
+	/**
+	 * 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.
+	
+	/**
+	 * 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.
-		 */
+
+	/** Message specific data. */
+	union {
+		/** Echo specific data. */
 		icmp_echo_t  echo;
-		/** Proposed gateway value.
-		 */
+		/** Proposed gateway value. */
 		in_addr_t gateway;
-		/** Fragmentation needed specific data.
-		 */
-		struct{
-			/** Reserved field.
-			 *  Must be zero.
-			 */
+		
+		/** Fragmentation needed specific data. */
+		struct {
+			/** Reserved field. Must be zero. */
 			icmp_param_t reserved;
-			/** Proposed MTU.
-			 */
+			/** Proposed MTU. */
 			icmp_param_t mtu;
 		} frag;
-		/** Parameter problem specific data.
-		 */
-		struct{
-			/** Problem pointer.
-			 */
+		
+		/** Parameter problem specific data. */
+		struct {
+			/** Problem pointer. */
 			icmp_param_t pointer;
-			/** Reserved field.
-			 *  Must be zero.
-			 */
+			/** Reserved field. Must be zero. */
 			icmp_param_t reserved;
 		} param;
Index: uspace/lib/net/include/icmp_interface.h
===================================================================
--- uspace/lib/net/include/icmp_interface.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/icmp_interface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,10 +27,10 @@
  */
 
-/** @addtogroup icmp
+/** @addtogroup libnet 
  *  @{
  */
 
-#ifndef __NET_ICMP_INTERFACE_H__
-#define __NET_ICMP_INTERFACE_H__
+#ifndef LIBNET_ICMP_INTERFACE_H_
+#define LIBNET_ICMP_INTERFACE_H_
 
 #include <net/socket_codes.h>
@@ -46,56 +46,13 @@
 
 /** @name ICMP module interface
- *  This interface is used by other modules.
+ * This interface is used by other modules.
  */
 /*@{*/
 
-/** Sends the Destination Unreachable error notification packet.
- *  Beginning of the packet is sent as the notification packet data.
- *  The source and the destination addresses should be set in the original packet.
- *  @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
- *  @param[in] code The error specific code.
- *  @param[in] mtu The error MTU value.
- *  @param[in] packet The original packet.
- *  @returns EOK on success.
- *  @returns EPERM if the ICMP error notifications are disabled.
- *  @returns ENOMEM if there is not enough memory left.
- */
-extern int icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet);
-
-/** Sends the Source Quench error notification packet.
- *  Beginning of the packet is sent as the notification packet data.
- *  The source and the destination addresses should be set in the original packet.
- *  @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
- *  @param[in] packet The original packet.
- *  @returns EOK on success.
- *  @returns EPERM if the ICMP error notifications are disabled.
- *  @returns ENOMEM if there is not enough memory left.
- */
-extern int icmp_source_quench_msg(int icmp_phone, packet_t packet);
-
-/** Sends the Time Exceeded error notification packet.
- *  Beginning of the packet is sent as the notification packet data.
- *  The source and the destination addresses should be set in the original packet.
- *  @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
- *  @param[in] code The error specific code.
- *  @param[in] packet The original packet.
- *  @returns EOK on success.
- *  @returns EPERM if the ICMP error notifications are disabled.
- *  @returns ENOMEM if there is not enough memory left.
- */
-extern int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet);
-
-/** Sends the Parameter Problem error notification packet.
- *  Beginning of the packet is sent as the notification packet data.
- *  The source and the destination addresses should be set in the original packet.
- *  @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
- *  @param[in] code The error specific code.
- *  @param[in] pointer The problematic parameter offset.
- *  @param[in] packet The original packet.
- *  @returns EOK on success.
- *  @returns EPERM if the ICMP error notifications are disabled.
- *  @returns ENOMEM if there is not enough memory left.
- */
-extern int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet);
+extern int icmp_destination_unreachable_msg(int, icmp_code_t, icmp_param_t,
+    packet_t);
+extern int icmp_source_quench_msg(int, packet_t);
+extern int icmp_time_exceeded_msg(int, icmp_code_t, packet_t);
+extern int icmp_parameter_problem_msg(int, icmp_code_t, icmp_param_t, packet_t);
 
 /*@}*/
Index: uspace/lib/net/include/il_interface.h
===================================================================
--- uspace/lib/net/include/il_interface.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/il_interface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,25 +27,21 @@
  */
 
-/** @addtogroup net_il
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
 /** @file
- * Internetwork layer module interface for the underlying network interface layer.
- * This interface is always called by the remote modules.
+ * Internetwork layer module interface for the underlying network interface
+ * layer. This interface is always called by the remote modules.
  */
 
-#ifndef __NET_IL_INTERFACE_H__
-#define __NET_IL_INTERFACE_H__
-
-#include <generic.h>
+#ifndef LIBNET_IL_INTERFACE_H_
+#define LIBNET_IL_INTERFACE_H_
 
 #include <ipc/services.h>
-#include <ipc/il.h>
+#include <sys/types.h>
 
 #include <net/device.h>
 #include <net/packet.h>
-
-#include <packet_client.h>
 
 /** @name Internetwork layer module interface
@@ -54,60 +50,7 @@
 /*@{*/
 
-/** Notify the internetwork layer modules about the device state change.
- *
- * @param[in] il_phone  The internetwork layer module phone used for
- *                      (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] state     The new device state.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- *
- * @return EOK on success.
- *
- */
-static inline int il_device_state_msg(int il_phone, device_id_t device_id,
-    device_state_t state, services_t target)
-{
-	return generic_device_state_msg_remote(il_phone, NET_IL_DEVICE_STATE,
-	    device_id, state, target);
-}
-
-/** Notify the internetwork layer modules about the received packet/s.
- *
- * @param[in] il_phone  The internetwork layer module phone used for
- *                      (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] packet    The received packet or the received packet queue.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- *
- * @return EOK on success.
- *
- */
-inline static int il_received_msg(int il_phone, device_id_t device_id,
-    packet_t packet, services_t target)
-{
-	return generic_received_msg_remote(il_phone, NET_IL_RECEIVED, device_id,
-	    packet_get_id(packet), target, 0);
-}
-
-/** Notify the internetwork layer modules about the mtu change.
- *
- * @param[in] il_phone  The internetwork layer module phone used for
- *                      (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] mtu       The new mtu value.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- *
- * @return EOK on success.
- *
- */
-inline static int il_mtu_changed_msg(int il_phone, device_id_t device_id,
-    size_t mtu, services_t target)
-{
-	return generic_device_state_msg_remote(il_phone, NET_IL_MTU_CHANGED,
-	    device_id, (int) mtu, target);
-}
+extern int il_device_state_msg(int, device_id_t, device_state_t, services_t);
+extern int il_received_msg(int, device_id_t, packet_t, services_t);
+extern int il_mtu_changed_msg(int, device_id_t, size_t, services_t);
 
 /*@}*/
Index: uspace/lib/net/include/il_local.h
===================================================================
--- uspace/lib/net/include/il_local.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/il_local.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,16 +27,42 @@
  */
 
-/** @addtogroup il_local
- *  @{
+/** @addtogroup libnet 
+ * @{
  */
 
-#ifndef __IL_LOCAL_H__
-#define __IL_LOCAL_H__
+#ifndef LIBNET_IL_LOCAL_H_
+#define LIBNET_IL_LOCAL_H_
 
 #include <ipc/ipc.h>
 #include <async.h>
 
+/** Processes the Internet layer module message.
+ *
+ * @param[in]		callid The message identifier.
+ * @param[in]		call The message parameters.
+ * @param[out]		answer The message answer parameters.
+ * @param[out]		answer_count The last parameter for the actual answer in
+ *			the answer parameter.
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for the arp_message()
+ *			function.
+ */
 extern int il_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
     ipc_call_t *answer, int *answer_count);
+
+/** Starts the Internet layer module.
+ *
+ * Initializes the client connection servicing function, initializes the module,
+ * registers the module service and starts the async manager, processing IPC
+ * messages in an infinite loop.
+ *
+ * @param[in] client_connection The client connection processing function. The
+ *			module skeleton propagates its own one.
+ * @returns		EOK on successful module termination.
+ * @returns		Other error codes as defined for the arp_initialize()
+ *			function.
+ * @returns		Other error codes as defined for the REGISTER_ME() macro
+ *			function.
+ */
 extern int il_module_start_standalone(async_client_conn_t client_connection);
 
Index: uspace/lib/net/include/ip_header.h
===================================================================
--- uspace/lib/net/include/ip_header.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/ip_header.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,15 +27,15 @@
  */
 
-/** @addtogroup ip
- *  @{
+/** @addtogroup libnet 
+ * @{
  */
 
 /** @file
- *  IP header and options definitions.
- *  Based on the RFC~791.
- */
-
-#ifndef __NET_IP_HEADER_H__
-#define __NET_IP_HEADER_H__
+ * IP header and options definitions.
+ * Based on the RFC 791.
+ */
+
+#ifndef LIBNET_IP_HEADER_H_
+#define LIBNET_IP_HEADER_H_
 
 #include <byteorder.h>
@@ -43,235 +43,172 @@
 
 /** 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)
+ * @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)
+ * @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))
+ * @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) ((((header)->fragment_offset_high << 8) + (header)->fragment_offset_low) * 8u)
+ * @param[in] header The IP packet header.
+ */
+#define IP_FRAGMENT_OFFSET(header) \
+	((((header)->fragment_offset_high << 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))))
+#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))
+ * @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)		((header)->header_length * 4u)
+ * @param[in] header The IP packet header.
+ */
+#define IP_HEADER_LENGTH(header) \
+	((header)->header_length * 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
- */
+ * @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
+/** 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)
+ * 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)
+ * 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)
+ * 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)
+ * 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;
+ * @see ip_header
+ */
+typedef struct ip_header ip_header_t;
 
 /** Type definition of the internet header pointer.
- *  @see ip_header
- */
-typedef ip_header_t *		ip_header_ref;
+ * @see ip_header
+ */
+typedef ip_header_t *ip_header_ref;
 
 /** Type definition of the internet option header.
- *  @see ip_header
- */
-typedef struct ip_option	ip_option_t;
+ * @see ip_header
+ */
+typedef struct ip_option ip_option_t;
 
 /** Type definition of the internet option header pointer.
- *  @see ip_header
- */
-typedef ip_option_t *		ip_option_ref;
+ * @see ip_header
+ */
+typedef ip_option_t *ip_option_ref;
 
 /** Type definition of the internet version 4 pseudo header.
- *  @see ipv4_pseudo_header
- */
-typedef struct ipv4_pseudo_header	ipv4_pseudo_header_t;
+ * @see ipv4_pseudo_header
+ */
+typedef struct ipv4_pseudo_header ipv4_pseudo_header_t;
 
 /** Type definition of the internet version 4 pseudo header pointer.
- *  @see ipv4_pseudo_header
- */
-typedef ipv4_pseudo_header_t *		ipv4_pseudo_header_ref;
+ * @see ipv4_pseudo_header
+ */
+typedef ipv4_pseudo_header_t *ipv4_pseudo_header_ref;
 
 /** Internet header.
- *  The variable options should be included after the header itself and indicated by the increased header length value.
- */
-struct ip_header{
+ *
+ * The variable options should be included after the header itself and
+ * indicated by the increased header length value.
+ */
+struct ip_header {
 #ifdef ARCH_IS_BIG_ENDIAN
-	/** The Version field indicates the format of the internet header.
-	 */
-	uint8_t version:4;
-	/** Internet Header Length is the length of the internet header in 32~bit words, and thus points to the beginning of the data.
-	 *  Note that the minimum value for a~correct header is~5.
-	 */
-	uint8_t header_length:4;
+	uint8_t version : 4;
+	uint8_t header_length : 4;
 #else
-	/** Internet Header Length is the length of the internet header in 32~bit words, and thus points to the beginning of the data.
-	 *  Note that the minimum value for a~correct header is~5.
-	 */
-	uint8_t header_length:4;
-	/** The Version field indicates the format of the internet header.
-	 */
-	uint8_t version:4;
-#endif
-	/** The Type of Service provides an indication of the abstract parameters of the quality of service desired.
-	 *  These parameters are to be used to guide the selection of the actual service parameters when transmitting a~datagram through a~particular network.
-	 *  Several networks offer service precedence, which somehow treats high precedence traffic as more important than other traffic (generally by accepting only traffic above a~certain precedence at time of high load).
-	 *  The major choice is a~three way tradeoff between low-delay, high-reliability, and high-throughput.
-	 */
+	uint8_t header_length : 4;
+	uint8_t version : 4;
+#endif
+
 	uint8_t tos;
-	/** Total Length is the length of the datagram, measured in octets, including internet header and data.
-	 *  This field allows the length of a~datagram to be up to 65,535~octets.
-	 */
 	uint16_t total_length;
-	/** An identifying value assigned by the sender to aid in assembling the fragments of a~datagram.
-	 */
 	uint16_t identification;
+
 #ifdef ARCH_IS_BIG_ENDIAN
-	/** Various control flags.
-	 */
-	uint8_t flags:3;
-	/** This field indicates where in the datagram this fragment belongs.
-	 *  High bits.
-	 */
-	uint8_t fragment_offset_high:5;
+	uint8_t flags : 3;
+	uint8_t fragment_offset_high : 5;
 #else
-	/** This field indicates where in the datagram this fragment belongs.
-	 *  High bits.
-	 */
-	uint8_t fragment_offset_high:5;
-	/** Various control flags.
-	 */
-	uint8_t flags:3;
-#endif
-	/** This field indicates where in the datagram this fragment belongs.
-	 *  Low bits.
-	 */
+	uint8_t fragment_offset_high : 5;
+	uint8_t flags : 3;
+#endif
+
 	uint8_t fragment_offset_low;
-	/** This field indicates the maximum time the datagram is allowed to remain in the internet system.
-	 *  If this field contains the value zero, then the datagram must be destroyed.
-	 *  This field is modified in internet header processing.
-	 *  The time is measured in units of seconds, but since every module that processes a~datagram must decrease the TTL by at least one even if it process the datagram in less than a~second, the TTL must be thought of only as an upper bound on the time a~datagram may exist.
-	 *  The intention is to cause undeliverable datagrams to be discarded, and to bound the maximum datagram lifetime.
-	 */
 	uint8_t ttl;
-	/** This field indicates the next level protocol used in the data portion of the internet datagram.
-	 */
 	uint8_t protocol;
-	/** A checksum of the header only.
-	 *  Since some header fields change (e.g., time to live), this is recomputed and verified at each point that the internet header is processed.
-	 *  The checksum algorithm is: The checksum field is the 16~bit one's complement of the one's complement sum of all 16~bit words in the header.
-	 *  For purposes of computing the checksum, the value of the checksum field is zero.
-	 */
 	uint16_t header_checksum;
-	/** The source address.
-	 */
 	uint32_t source_address;
-	/** The destination 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{
-	/** A single octet of option-type.
-	 */
+ *
+ * Only type field is always valid.
+ * Other fields' validity depends on the option type.
+ */
+struct ip_option {
 	uint8_t type;
-	/** An option length octet.
-	 */
 	uint8_t length;
-	/** A~pointer.
-	 */
 	uint8_t pointer;
+
 #ifdef ARCH_IS_BIG_ENDIAN
-	/** The number of IP modules that cannot register timestamps due to lack of space.
-	 */
-	uint8_t overflow:4;
-	/** Various internet timestamp control flags.
-	 */
-	uint8_t flags:4;
+	uint8_t overflow : 4;
+	uint8_t flags : 4;
 #else
-	/** Various internet timestamp control flags.
-	 */
-	uint8_t flags:4;
-	/** The number of IP modules that cannot register timestamps due to lack of space.
-	 */
-	uint8_t overflow:4;
+	uint8_t flags : 4;
+	uint8_t overflow : 4;
 #endif
 } __attribute__ ((packed));
 
-/** Internet version 4 pseudo header.
- */
-struct ipv4_pseudo_header{
-	/** The source address.
-	 */
+/** Internet version 4 pseudo header. */
+struct ipv4_pseudo_header {
 	uint32_t source_address;
-	/** The destination address.
-	 */
 	uint32_t destination_address;
-	/** Reserved byte.
-	 *  Must be zero.
-	 */
 	uint8_t reserved;
-	/** This field indicates the next level protocol used in the data portion of the internet datagram.
-	 */
 	uint8_t protocol;
-	/** Data length is the length of the datagram, measured in octets.
-	 */
 	uint16_t data_length;
 } __attribute__ ((packed));
Index: uspace/lib/net/include/ip_interface.h
===================================================================
--- uspace/lib/net/include/ip_interface.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/ip_interface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,10 +27,10 @@
  */
 
-/** @addtogroup ip
- *  @{
+/** @addtogroup libnet 
+ * @{
  */
 
-#ifndef __NET_IP_INTERFACE_H__
-#define __NET_IP_INTERFACE_H__
+#ifndef LIBNET_IP_INTERFACE_H_
+#define LIBNET_IP_INTERFACE_H_
 
 #include <net/socket_codes.h>
@@ -55,34 +55,24 @@
 
 /** @name IP module interface
- *  This interface is used by other modules.
+ * This interface is used by other modules.
  */
 /*@{*/
 
 /** The transport layer notification function type definition.
- *  Notifies the transport layer modules about the received packet/s.
- *  @param[in] device_id The device identifier.
- *  @param[in] packet The received packet or the received packet queue.
- *  @param[in] receiver The receiving module service.
- *  @param[in] error The packet error reporting service. Prefixes the received packet.
- *  @returns EOK on success.
+ *
+ * Notifies the transport layer modules about the received packet/s.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The received packet or the received packet queue.
+ * @param[in] receiver	The receiving module service.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @returns		EOK on success.
  */
-typedef int	(*tl_received_msg_t)(device_id_t device_id, packet_t packet, services_t receiver, services_t error);
+typedef int (*tl_received_msg_t)(device_id_t device_id, packet_t packet,
+    services_t receiver, services_t error);
 
-/** Creates bidirectional connection with the ip module service and registers the message receiver.
- *  @param[in] service The IP module service.
- *  @param[in] protocol The transport layer protocol.
- *  @param[in] me The requesting module service.
- *  @param[in] receiver The message receiver. Used for remote connection.
- *  @returns The phone of the needed service.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the bind_service() function.
- */
-extern int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver);
-
-/** Connects to the IP module.
- *  @param service The IP module service. Ignored parameter.
- *  @returns The IP module phone on success.
- */
-extern int ip_connect_module(services_t service);
+extern int ip_bind_service(services_t, int, services_t, async_client_conn_t);
+extern int ip_connect_module(services_t);
 
 /*@}*/
Index: uspace/lib/net/include/ip_remote.h
===================================================================
--- uspace/lib/net/include/ip_remote.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/ip_remote.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,10 +27,10 @@
  */
 
-/** @addtogroup ip
+/** @addtogroup libnet
  * @{
  */
 
-#ifndef __NET_IP_REMOTE_H__
-#define __NET_IP_REMOTE_H__
+#ifndef LIBNET_IP_REMOTE_H_
+#define LIBNET_IP_REMOTE_H_
 
 #include <ipc/services.h>
Index: uspace/lib/net/include/net_hardware.h
===================================================================
--- uspace/lib/net/include/net_hardware.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/net_hardware.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,164 +27,28 @@
  */
 
-/** @addtogroup net_nil
- *  @{
+/** @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.
+ * 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 __NET_HW_TYPES_H__
-#define __NET_HW_TYPES_H__
+#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;
+/** Network interface layer type type definition. */
+typedef uint8_t hw_type_t;
 
-/** @name Network interface layer types definitions
- */
+/** @name Network interface layer types definitions */
 /*@{*/
 
-/** Ethernet (10Mb) hardware type.
- */
+/** Ethernet (10Mb) hardware type. */
 #define HW_ETHER		1
-
-/** Experimental Ethernet (3Mb) hardware type.
- */
-#define HW_EETHER		2
-
-/** Amateur Radio AX.25 hardware type.
- */
-#define HW_AX25		3
-
-/** Proteon ProNET Token Ring hardware type.
- */
-#define HW_PRONET		4
-
-/** Chaos hardware type.
- */
-#define HW_CHAOS		5
-
-/** IEEE 802 Networks hardware type.
- */
-#define HW_IEEE802		6
-
-/** ARCNET hardware type.
- */
-#define HW_ARCNET		7
-
-/** Hyperchannel hardware type.
- */
-#define HW_Hyperchannel		8
-
-/** Lanstar hardware type.
- */
-#define HW_Lanstar		9
-
-/** Autonet Short Address hardware type.
- */
-#define HW_ASA		10
-
-/** LocalTalk hardware type.
- */
-#define HW_LocalTalk		11
-
-/** LocalNet (IBM PCNet or SYTEK LocalNET) hardware type.
- */
-#define HW_LocalNet		12
-
-/** Ultra link hardware type.
- */
-#define HW_Ultra_link		13
-
-/** SMDS hardware type.
- */
-#define HW_SMDS		14
-
-/** Frame Relay DLCI hardware type.
- */
-#define HW_DLCI		15
-
-/** Asynchronous Transmission Mode (ATM) hardware type.
- */
-#define HW_ATM		16
-
-/** HDLC hardware type.
- */
-#define HW_HDLC		17
-
-/** Fibre Channel hardware type.
- */
-#define HW_Fibre_Channel		18
-
-/** Asynchronous Transmission Mode (ATM) hardware type.
- */
-#define HW_ATM2		19
-
-/** Serial Line hardware type.
- */
-#define HW_Serial_Line		20
-
-/** Asynchronous Transmission Mode (ATM) hardware type.
- */
-#define HW_ATM3		21
-
-/** MIL-STD-188-220 hardware type.
- */
-#define HW_MIL_STD_188_220		22
-
-/** Metricom hardware type.
- */
-#define HW_METRICOM		23
-
-/** IEEE 1394.1995 hardware type.
- */
-#define HW_IEEE1394		24
-
-/** MAPOS hardware type.
- */
-#define HW_MAPOS		25
-
-/** Twinaxial hardware type.
- */
-#define HW_Twinaxial		26
-
-/** EUI-64 hardware type.
- */
-#define HW_EUI64		27
-
-/** HIPARP hardware type.
- */
-#define HW_HIPARP		28
-
-/** IP and ARP over ISO 7816-3 hardware type.
- */
-#define HW_ISO_7816_3		29
-
-/** ARPSec hardware type.
- */
-#define HW_ARPSec		30
-
-/** IPsec tunnel hardware type.
- */
-#define HW_IPsec_tunnel		31
-
-/** InfiniBand (TM) hardware type.
- */
-#define HW_INFINIBAND		32
-
-/** TIA-102 Project 25 Common Air Interface (CAI) hardware type.
- */
-#define HW_CAI		33
-
-/** Wiegand Interface hardware type.
- */
-#define HW_Wiegand		34
-
-/** Pure IP hardware type.
- */
-#define HW_Pure_IP		35
 
 /*@}*/
@@ -194,2 +58,3 @@
 /** @}
  */
+
Index: uspace/lib/net/include/netif_interface.h
===================================================================
--- uspace/lib/net/include/netif_interface.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/netif_interface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,10 +27,10 @@
  */
 
-/** @addtogroup netif
+/** @addtogroup libnet
  * @{
  */
 
-#ifndef __NET_NETIF_INTERFACE_H__
-#define __NET_NETIF_INTERFACE_H__
+#ifndef LIBNET_NETIF_INTERFACE_H_
+#define LIBNET_NETIF_INTERFACE_H_
 
 #include <netif_remote.h>
Index: uspace/lib/net/include/netif_local.h
===================================================================
--- uspace/lib/net/include/netif_local.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/netif_local.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup netif
+/** @addtogroup libnet
  * @{
  */
@@ -36,6 +36,6 @@
  */
 
-#ifndef __NET_NETIF_LOCAL_H__
-#define __NET_NETIF_LOCAL_H__
+#ifndef NET_NETIF_LOCAL_H_
+#define NET_NETIF_LOCAL_H_
 
 #include <async.h>
@@ -43,5 +43,4 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
-#include <err.h>
 
 #include <adt/measured_strings.h>
@@ -49,7 +48,5 @@
 #include <net/packet.h>
 
-/** Network interface device specific data.
- *
- */
+/** Network interface device specific data. */
 typedef struct {
 	device_id_t device_id;  /**< Device identifier. */
@@ -67,7 +64,5 @@
 DEVICE_MAP_DECLARE(netif_device_map, netif_device_t);
 
-/** Network interface module skeleton global data.
- *
- */
+/** Network interface module skeleton global data. */
 typedef struct {
 	int net_phone;                  /**< Networking module phone. */
@@ -81,5 +76,4 @@
  *
  * This function has to be implemented in user code.
- *
  */
 extern int netif_initialize(void);
@@ -89,13 +83,13 @@
  * This has to be implemented in user code.
  *
- * @param[in] device_id The device identifier.
- * @param[in] irq       The device interrupt number.
- * @param[in] io        The device input/output address.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the specific module message
- *         implementation.
- *
+ * @param[in] device_id	The device identifier.
+ * @param[in] irq	The device interrupt number.
+ * @param[in] io	The device input/output address.
+ *
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the specific module
+ *			message implementation.
  */
 extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io);
@@ -105,14 +99,15 @@
  * This has to be implemented in user code.
  *
- * @param[in] device_id The device identifier.
- * @param[in] packet    The packet queue.
- * @param[in] sender    The sending module service.
- *
- * @return EOK on success.
- * @return EFORWARD if the device is not active (in the NETIF_ACTIVE state).
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the specific module message
- *         implementation.
- *
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The packet queue.
+ * @param[in] sender	The sending module service.
+ *
+ * @return		EOK on success.
+ * @return		EFORWARD if the device is not active (in the
+ *			NETIF_ACTIVE state).
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the specific module
+ *			message implementation.
  */
 extern int netif_send_message(device_id_t device_id, packet_t packet,
@@ -123,11 +118,11 @@
  * This has to be implemented in user code.
  *
- * @param[in] device The device structure.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the specific module message
- *         implementation.
- *
+ * @param[in] device	The device structure.
+ *
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the specific module
+ *			message implementation.
  */
 extern int netif_start_message(netif_device_t *device);
@@ -137,11 +132,11 @@
  * This has to be implemented in user code.
  *
- * @param[in] device The device structure.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the specific module message
- *         implementation.
- *
+ * @param[in] device	The device structure.
+ *
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the specific module
+ *			message implementation.
  */
 extern int netif_stop_message(netif_device_t *device);
@@ -151,14 +146,14 @@
  * This has to be implemented in user code.
  *
- * @param[in]  device_id The device identifier.
- * @param[out] address   The device local hardware address.
- *
- * @return EOK on success.
- * @return EBADMEM if the address parameter is NULL.
- * @return ENOENT if there no such device.
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the specific module message
- *         implementation.
- *
+ * @param[in] device_id	The device identifier.
+ * @param[out] address	The device local hardware address.
+ *
+ * @return		EOK on success.
+ * @return		EBADMEM if the address parameter is NULL.
+ * @return		ENOENT if there no such device.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the specific module
+ *			message implementation.
  */
 extern int netif_get_addr_message(device_id_t device_id,
@@ -170,15 +165,14 @@
  * skeleton. This has to be implemented in user code.
  *
- * @param[in]  callid       The message identifier.
- * @param[in]  call         The message parameters.
- * @param[out] answer       The message answer parameters.
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
  * @param[out] answer_count The last parameter for the actual answer in
- *                          the answer parameter.
- *
- * @return EOK on success.
- * @return ENOTSUP if the message is not known.
- * @return Other error codes as defined for the specific module message
- *         implementation.
- *
+ *			the answer parameter.
+ *
+ * @return		EOK on success.
+ * @return		ENOTSUP if the message is not known.
+ * @return		Other error codes as defined for the specific module
+ *			message implementation.
  */
 extern int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
@@ -189,12 +183,12 @@
  * This has to be implemented in user code.
  *
- * @param[in]  device_id The device identifier.
- * @param[out] stats     The device usage statistics.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the specific module message
- *         implementation.
- *
+ * @param[in] device_id	The device identifier.
+ * @param[out] stats	The device usage statistics.
+ *
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the specific module
+ *			message implementation.
  */
 extern int netif_get_device_stats(device_id_t device_id,
Index: uspace/lib/net/include/netif_remote.h
===================================================================
--- uspace/lib/net/include/netif_remote.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/netif_remote.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,14 +27,17 @@
  */
 
-/** @addtogroup netif
+/** @addtogroup libnet
  * @{
  */
 
-#ifndef __NET_NETIF_REMOTE_H__
-#define __NET_NETIF_REMOTE_H__
+#ifndef LIBNET_NETIF_REMOTE_H_
+#define LIBNET_NETIF_REMOTE_H_
 
+#include <async.h>
 #include <ipc/services.h>
 #include <adt/measured_strings.h>
+
 #include <net/device.h>
+#include <net/packet.h>
 
 extern int netif_get_addr_req_remote(int, device_id_t, measured_string_ref *,
Index: uspace/lib/net/include/nil_interface.h
===================================================================
--- uspace/lib/net/include/nil_interface.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/nil_interface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,10 +27,10 @@
  */
 
-/** @addtogroup net_nil
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
-#ifndef __NET_NIL_INTERFACE_H__
-#define __NET_NIL_INTERFACE_H__
+#ifndef LIBNET_NIL_INTERFACE_H_
+#define LIBNET_NIL_INTERFACE_H_
 
 #include <async.h>
@@ -47,6 +47,6 @@
 
 #define nil_packet_size_req(nil_phone, device_id, packet_dimension) \
-	generic_packet_size_req_remote(nil_phone, NET_NIL_PACKET_SPACE, device_id, \
-	    packet_dimension)
+	generic_packet_size_req_remote(nil_phone, NET_NIL_PACKET_SPACE, \
+	    device_id, packet_dimension)
 
 #define nil_get_addr_req(nil_phone, device_id, address, data) \
Index: uspace/lib/net/include/nil_local.h
===================================================================
--- uspace/lib/net/include/nil_local.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/nil_local.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,6 +27,6 @@
  */
 
-/** @addtogroup net_nil
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
@@ -36,6 +36,6 @@
  */
 
-#ifndef __NET_NIL_LOCAL_H__
-#define __NET_NIL_LOCAL_H__
+#ifndef LIBNET_NIL_LOCAL_H_
+#define LIBNET_NIL_LOCAL_H_
 
 #include <ipc/ipc.h>
@@ -45,38 +45,88 @@
  * Is called by the module_start() function.
  *
- * @param[in] net_phone The networking moduel phone.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module initialize function.
- *
+ * @param[in] net_phone	The networking moduel phone.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for each specific module
+ *			initialize function.
  */
 extern int nil_initialize(int);
 
+/** Notify the network interface layer about the device state change.
+ *
+ * @param[in] nil_phone	The network interface layer phone.
+ * @param[in] device_id	The device identifier.
+ * @param[in] state	The 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(int, device_id_t, int);
+
+
+/** Pass the packet queue to the network interface layer.
+ *
+ * Process and redistribute the received packet queue to the registered
+ * upper layers.
+ *
+ * @param[in] nil_phone	The network interface layer phone.
+ * @param[in] device_id	The source device identifier.
+ * @param[in] packet	The received packet or the received packet queue.
+ * @param target	The target service. Ignored parameter.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for each specific module
+ * 			received function.
+ */
 extern int nil_received_msg_local(int, device_id_t, packet_t, services_t);
 
 /** Message processing function.
  *
- * @param[in]  name         Module name.
- * @param[in]  callid       The message identifier.
- * @param[in]  call         The message parameters.
- * @param[out] answer       The message answer parameters.
- * @param[out] answer_count The last parameter for the actual answer
- *                          in the answer parameter.
- *
- * @return EOK on success.
- * @return ENOTSUP if the message is not known.
- * @return Other error codes as defined for each specific
- *         module message function.
+ * @param[in] name	Module name.
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @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 nil_interface.h
  * @see IS_NET_NIL_MESSAGE()
+ */
+extern int nil_message_standalone(const char *, ipc_callid_t, ipc_call_t *,
+    ipc_call_t *, int *);
+
+/** Pass the parameters to the module specific nil_message() function.
  *
+ * @param[in] name	Module name.
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @return		EOK on success.
+ * @return		ENOTSUP if the message is not known.
+ * @return		Other error codes as defined for each specific module
+ *			message function.
  */
-extern int nil_message_standalone(const char *, ipc_callid_t, ipc_call_t *, ipc_call_t *,
-    int *);
-
 extern int nil_module_message_standalone(const char *, ipc_callid_t,
     ipc_call_t *, ipc_call_t *, int *);
+
+/** Start the standalone nil layer module.
+ *
+ * Initialize the client connection serving function, initialize
+ * the module, register the module service and start the async
+ * manager, processing IPC messages in an infinite loop.
+ *
+ * @param[in] client_connection The client connection processing function.
+ *			The module skeleton propagates its own one.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the pm_init() function.
+ * @return		Other error codes as defined for the nil_initialize()
+ *			function.
+ * @return		Other error codes as defined for the REGISTER_ME() macro
+ *			function.
+ */
 extern int nil_module_start_standalone(async_client_conn_t);
 
Index: uspace/lib/net/include/protocol_map.h
===================================================================
--- uspace/lib/net/include/protocol_map.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/protocol_map.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,16 +27,15 @@
  */
 
-/** @addtogroup net_nil
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
 /** @file
- *  Internetwork layer services - network interface layer service type translation.
+ * Internetwork layer services - network interface layer service type
+ * translation.
  */
 
-#ifndef __NET_PROTOCOL_MAP_H__
-#define __NET_PROTOCOL_MAP_H__
-
-#include <ipc/services.h>
+#ifndef LIBNET_PROTOCOL_MAP_H_
+#define LIBNET_PROTOCOL_MAP_H_
 
 #include <ethernet_lsap.h>
@@ -44,96 +43,11 @@
 #include <net_hardware.h>
 
-/** Maps the internetwork layer service to the network interface layer type.
- *  @param[in] nil Network interface layer service.
- *  @param[in] il Internetwork layer service.
- *  @returns Network interface layer type of the internetworking layer service.
- *  @returns 0 if mapping is not found.
- */
-static inline eth_type_t protocol_map(services_t nil, services_t il){
-	switch(nil){
-		case SERVICE_ETHERNET:
-		case SERVICE_DP8390:
-			switch(il){
-				case SERVICE_IP:
-					return ETH_P_IP;
-				case SERVICE_ARP:
-					return ETH_P_ARP;
-				default:
-					return 0;
-			}
-		default:
-			return 0;
-	}
-}
+#include <ipc/services.h>
 
-/** Maps the network interface layer type to the internetwork layer service.
- *  @param[in] nil Network interface layer service.
- *  @param[in] protocol Network interface layer type.
- *  @returns Internetwork layer service of the network interface layer type.
- *  @returns 0 if mapping is not found.
- */
-static inline services_t protocol_unmap(services_t nil, int protocol){
-	switch(nil){
-		case SERVICE_ETHERNET:
-		case SERVICE_DP8390:
-			switch(protocol){
-				case ETH_P_IP:
-					return SERVICE_IP;
-				case ETH_P_ARP:
-					return SERVICE_ARP;
-				default:
-					return 0;
-			}
-		default:
-			return 0;
-	}
-}
-
-/** Maps the link service access point identifier to the Ethernet protocol identifier.
- *  @param[in] lsap Link service access point identifier.
- *  @returns Ethernet protocol identifier of the link service access point identifier.
- *  @returns ETH_LSAP_NULL if mapping is not found.
- */
-static inline eth_type_t lsap_map(eth_lsap_t lsap){
-	switch(lsap){
-		case ETH_LSAP_IP:
-			return ETH_P_IP;
-		case ETH_LSAP_ARP:
-			return ETH_P_ARP;
-		default:
-			return ETH_LSAP_NULL;
-	}
-}
-
-/** Maps the Ethernet protocol identifier to the link service access point identifier.
- *  @param[in] ethertype Ethernet protocol identifier.
- *  @returns Link service access point identifier.
- *  @returns 0 if mapping is not found.
- */
-static inline eth_lsap_t lsap_unmap(eth_type_t ethertype){
-	switch(ethertype){
-		case ETH_P_IP:
-			return ETH_LSAP_IP;
-		case ETH_P_ARP:
-			return ETH_LSAP_ARP;
-		default:
-			return 0;
-	}
-}
-
-/** Maps the network interface layer services to the hardware types.
- *  @param[in] nil The network interface service.
- *  @returns The hardware type of the network interface service.
- *  @returns 0 if mapping is not found.
- */
-static inline hw_type_t hardware_map(services_t nil){
-	switch(nil){
-		case SERVICE_ETHERNET:
-		case SERVICE_DP8390:
-			return HW_ETHER;
-		default:
-			return 0;
-	}
-}
+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/tl_common.h
===================================================================
--- uspace/lib/net/include/tl_common.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/tl_common.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -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
Index: uspace/lib/net/include/tl_interface.h
===================================================================
--- uspace/lib/net/include/tl_interface.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/tl_interface.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,6 +27,6 @@
  */
 
-/** @addtogroup net_tl
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
@@ -35,6 +35,6 @@
  */
 
-#ifndef __NET_TL_INTERFACE_H__
-#define __NET_TL_INTERFACE_H__
+#ifndef LIBNET_TL_INTERFACE_H_
+#define LIBNET_TL_INTERFACE_H_
 
 #include <async.h>
@@ -52,26 +52,5 @@
 /*@{*/
 
-/** Notify the remote transport layer modules about the received packet/s.
- *
- * @param[in] tl_phone  The transport layer module phone used for remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] packet    The received packet or the received packet queue.
- *                      The packet queue is used to carry a fragmented
- *                      datagram. The first packet contains the headers,
- *                      the others contain only data.
- * @param[in] target    The target transport layer module service to be
- *                      delivered to.
- * @param[in] error     The packet error reporting service. Prefixes the
- *                      received packet.
- *
- * @return EOK on success.
- *
- */
-inline static int tl_received_msg(int tl_phone, device_id_t device_id,
-    packet_t packet, services_t target, services_t error)
-{
-	return generic_received_msg_remote(tl_phone, NET_TL_RECEIVED, device_id,
-	    packet_get_id(packet), target, error);
-}
+extern int tl_received_msg(int, device_id_t, packet_t, services_t, services_t);
 
 /*@}*/
Index: uspace/lib/net/include/tl_local.h
===================================================================
--- uspace/lib/net/include/tl_local.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/include/tl_local.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,16 +27,43 @@
  */
 
-/** @addtogroup tl_local
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
-#ifndef __TL_LOCAL_H__
-#define __TL_LOCAL_H__
+#ifndef LIBNET_TL_LOCAL_H_
+#define LIBNET_TL_LOCAL_H_
 
 #include <ipc/ipc.h>
 #include <async.h>
 
+/** Starts the TL module.
+ *
+ * Initializes the client connection serving function, initializes the module,
+ * registers the module service and starts the async manager, processing IPC
+ * messages in an infinite loop.
+ *
+ * @param[in] client_connection The client connection processing function. The
+ *			module skeleton propagates its own one.
+ * @returns		EOK on successful module termination.
+ * @returns		Other error codes as defined for the module initialize
+ *			function.
+ * @returns		Other error codes as defined for the REGISTER_ME() macro
+ *			function.
+ */
 extern int tl_module_message_standalone(ipc_callid_t, ipc_call_t *,
     ipc_call_t *, int *);
+
+
+/** Processes the TL module message.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for the module's message
+ *			standalone function.
+ */
 extern int tl_module_start_standalone(async_client_conn_t);
 
Index: uspace/lib/net/netif/netif_local.c
===================================================================
--- uspace/lib/net/netif/netif_local.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/netif/netif_local.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup netif
+/** @addtogroup libnet 
  * @{
  */
@@ -58,6 +58,5 @@
 DEVICE_MAP_IMPLEMENT(netif_device_map, netif_device_t);
 
-/** Network interface global data.
- */
+/** Network interface global data. */
 netif_globals_t netif_globals;
 
@@ -65,13 +64,13 @@
  *
  * @param[in] netif_phone The network interface phone.
- * @param[in] device_id   The device identifier.
- * @param[in] irq         The device interrupt number.
- * @param[in] io          The device input/output address.
- *
- * @return EOK on success.
- * @return Other errro codes as defined for the netif_probe_message().
- *
- */
-int netif_probe_req_local(int netif_phone, device_id_t device_id, int irq, int io)
+ * @param[in] device_id	The device identifier.
+ * @param[in] irq	The device interrupt number.
+ * @param[in] io	The device input/output address.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the
+ *			netif_probe_message().
+ */
+int
+netif_probe_req_local(int netif_phone, device_id_t device_id, int irq, int io)
 {
 	fibril_rwlock_write_lock(&netif_globals.lock);
@@ -85,11 +84,10 @@
  *
  * @param[in] netif_phone The network interface phone.
- * @param[in] device_id   The device identifier.
- * @param[in] packet      The packet queue.
- * @param[in] sender      The sending module service.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the generic_send_msg() function.
- *
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The packet queue.
+ * @param[in] sender	The sending module service.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the generic_send_msg()
+ *			function.
  */
 int netif_send_msg_local(int netif_phone, device_id_t device_id,
@@ -106,10 +104,10 @@
  *
  * @param[in] netif_phone The network interface phone.
- * @param[in] device_id   The device identifier.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the netif_start_message() function.
- *
+ * @param[in] device_id	The device identifier.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the
+ *			netif_start_message() function.
  */
 int netif_start_req_local(int netif_phone, device_id_t device_id)
@@ -141,10 +139,10 @@
  *
  * @param[in] netif_phone The network interface phone.
- * @param[in] device_id   The device identifier.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the find_device() function.
- * @return Other error codes as defined for the netif_stop_message() function.
- *
+ * @param[in] device_id	The device identifier.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the
+ *			netif_stop_message() function.
  */
 int netif_stop_req_local(int netif_phone, device_id_t device_id)
@@ -175,10 +173,8 @@
 /** Return the device usage statistics.
  *
- * @param[in]  netif_phone The network interface phone.
- * @param[in]  device_id   The device identifier.
- * @param[out] stats       The device usage statistics.
- *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @param[out] stats	The device usage statistics.
  * @return EOK on success.
- *
  */
 int netif_stats_req_local(int netif_phone, device_id_t device_id,
@@ -194,15 +190,13 @@
 /** Return the device local hardware address.
  *
- * @param[in]  netif_phone The network interface phone.
- * @param[in]  device_id   The device identifier.
- * @param[out] address     The device local hardware address.
- * @param[out] data        The address data.
- *
- * @return EOK on success.
- * @return EBADMEM if the address parameter is NULL.
- * @return ENOENT if there no such device.
- * @return Other error codes as defined for the netif_get_addr_message()
- *         function.
- *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @param[out] address	The device local hardware address.
+ * @param[out] data	The address data.
+ * @return		EOK on success.
+ * @return		EBADMEM if the address parameter is NULL.
+ * @return		ENOENT if there no such device.
+ * @return		Other error codes as defined for the
+ *			netif_get_addr_message() function.
  */
 int netif_get_addr_req_local(int netif_phone, device_id_t device_id,
@@ -211,5 +205,5 @@
 	ERROR_DECLARE;
 	
-	if ((!address) || (!data))
+	if (!address || !data)
 		return EBADMEM;
 	
@@ -231,11 +225,9 @@
 /** Find the device specific data.
  *
- * @param[in]  device_id The device identifier.
- * @param[out] device    The device specific data.
- *
- * @return EOK on success.
- * @return ENOENT if device is not found.
- * @return EPERM if the device is not initialized.
- *
+ * @param[in] device_id	The device identifier.
+ * @param[out] device	The device specific data.
+ * @return		EOK on success.
+ * @return		ENOENT if device is not found.
+ * @return		EPERM if the device is not initialized.
  */
 int find_device(device_id_t device_id, netif_device_t **device)
@@ -256,6 +248,5 @@
 /** Clear the usage statistics.
  *
- * @param[in] stats The usage statistics.
- *
+ * @param[in] stats	The usage statistics.
  */
 void null_device_stats(device_stats_ref stats)
@@ -266,11 +257,8 @@
 /** Initialize the netif module.
  *
- *  @param[in] client_connection The client connection functio to be
- *                               registered.
- *
- *  @return EOK on success.
- *  @return Other error codes as defined for each specific module
- *          message function.
- *
+ * @param[in] client_connection The client connection functio to be registered.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for each specific module
+ *			message function.
  */
 int netif_init_module(async_client_conn_t client_connection)
@@ -298,6 +286,5 @@
  * Prepared for future optimization.
  *
- * @param[in] packet_id The packet identifier.
- *
+ * @param[in] packet_id	The packet identifier.
  */
 void netif_pq_release(packet_id_t packet_id)
@@ -308,8 +295,7 @@
 /** Allocate new packet to handle the given content size.
  *
- * @param[in] content The minimum content size.
- *
- * @return The allocated packet.
- * @return NULL if there is an error.
+ * @param[in] content	The minimum content size.
+ * @return		The allocated packet.
+ * @return		NULL if there is an error.
  *
  */
@@ -319,14 +305,13 @@
 }
 
-/** Register the device notification receiver, the network interface layer module.
- *
- * @param[in] name      Module name.
- * @param[in] device_id The device identifier.
- * @param[in] phone     The network interface layer module phone.
- *
- * @return EOK on success.
- * @return ENOENT if there is no such device.
- * @return ELIMIT if there is another module registered.
- *
+/** Register the device notification receiver, the network interface layer
+ * module.
+ *
+ * @param[in] name	Module name.
+ * @param[in] device_id	The device identifier.
+ * @param[in] phone	The network interface layer module phone.
+ * @return		EOK on success.
+ * @return		ENOENT if there is no such device.
+ * @return		ELIMIT if there is another module registered.
  */
 static int register_message(const char *name, device_id_t device_id, int phone)
@@ -347,14 +332,14 @@
 /** Process the netif module messages.
  *
- * @param[in]  name         Module name.
- * @param[in]  callid       The message identifier.
- * @param[in]  call         The message parameters.
- * @param[out] answer       The message answer parameters.
- * @param[out] answer_count The last parameter for the actual answer
- *                          in the answer parameter.
- *
- * @return EOK on success.
- * @return ENOTSUP if the message is not known.
- * @return Other error codes as defined for each specific module message function.
+ * @param[in] name 	Module name.
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @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_NETIF_MESSAGE()
@@ -373,45 +358,58 @@
 	*answer_count = 0;
 	switch (IPC_GET_METHOD(*call)) {
-		case IPC_M_PHONE_HUNGUP:
-			return EOK;
-		case NET_NETIF_PROBE:
-			return netif_probe_req_local(0, IPC_GET_DEVICE(call),
-			    NETIF_GET_IRQ(call), NETIF_GET_IO(call));
-		case IPC_M_CONNECT_TO_ME:
-			fibril_rwlock_write_lock(&netif_globals.lock);
-			ERROR_CODE = register_message(name, IPC_GET_DEVICE(call),
-			    IPC_GET_PHONE(call));
-			fibril_rwlock_write_unlock(&netif_globals.lock);
-			return ERROR_CODE;
-		case NET_NETIF_SEND:
-			ERROR_PROPAGATE(packet_translate_remote(netif_globals.net_phone,
-			    &packet, IPC_GET_PACKET(call)));
-			return netif_send_msg_local(0, IPC_GET_DEVICE(call), packet,
-			    IPC_GET_SENDER(call));
-		case NET_NETIF_START:
-			return netif_start_req_local(0, IPC_GET_DEVICE(call));
-		case NET_NETIF_STATS:
-			fibril_rwlock_read_lock(&netif_globals.lock);
-			if (!ERROR_OCCURRED(async_data_read_receive(&callid, &length))) {
-				if (length < sizeof(device_stats_t))
-					ERROR_CODE = EOVERFLOW;
-				else {
-					if (!ERROR_OCCURRED(netif_get_device_stats(
-					    IPC_GET_DEVICE(call), &stats)))
-						ERROR_CODE = async_data_read_finalize(callid, &stats,
-						    sizeof(device_stats_t));
-				}
-			}
+	case IPC_M_PHONE_HUNGUP:
+		return EOK;
+	
+	case NET_NETIF_PROBE:
+		return netif_probe_req_local(0, IPC_GET_DEVICE(call),
+		    NETIF_GET_IRQ(call), NETIF_GET_IO(call));
+		    
+	case IPC_M_CONNECT_TO_ME:
+		fibril_rwlock_write_lock(&netif_globals.lock);
+		ERROR_CODE = register_message(name, IPC_GET_DEVICE(call),
+		    IPC_GET_PHONE(call));
+		fibril_rwlock_write_unlock(&netif_globals.lock);
+		return ERROR_CODE;
+		
+	case NET_NETIF_SEND:
+		ERROR_PROPAGATE(packet_translate_remote(netif_globals.net_phone,
+		    &packet, IPC_GET_PACKET(call)));
+		return netif_send_msg_local(0, IPC_GET_DEVICE(call), packet,
+		    IPC_GET_SENDER(call));
+		    
+	case NET_NETIF_START:
+		return netif_start_req_local(0, IPC_GET_DEVICE(call));
+		
+	case NET_NETIF_STATS:
+		fibril_rwlock_read_lock(&netif_globals.lock);
+
+		if (ERROR_OCCURRED(async_data_read_receive(&callid, &length))) {
 			fibril_rwlock_read_unlock(&netif_globals.lock);
 			return ERROR_CODE;
-		case NET_NETIF_STOP:
-			return netif_stop_req_local(0, IPC_GET_DEVICE(call));
-		case NET_NETIF_GET_ADDR:
-			fibril_rwlock_read_lock(&netif_globals.lock);
-			if (!ERROR_OCCURRED(netif_get_addr_message(IPC_GET_DEVICE(call),
-			    &address)))
-				ERROR_CODE = measured_strings_reply(&address, 1);
+		}
+		if (length < sizeof(device_stats_t)) {
 			fibril_rwlock_read_unlock(&netif_globals.lock);
-			return ERROR_CODE;
+			return EOVERFLOW;
+		}
+
+		if (ERROR_NONE(netif_get_device_stats(IPC_GET_DEVICE(call),
+		    &stats))) {
+			ERROR_CODE = async_data_read_finalize(callid, &stats,
+			    sizeof(device_stats_t));
+		}
+
+		fibril_rwlock_read_unlock(&netif_globals.lock);
+		return ERROR_CODE;
+
+	case NET_NETIF_STOP:
+		return netif_stop_req_local(0, IPC_GET_DEVICE(call));
+		
+	case NET_NETIF_GET_ADDR:
+		fibril_rwlock_read_lock(&netif_globals.lock);
+		if (ERROR_NONE(netif_get_addr_message(IPC_GET_DEVICE(call),
+		    &address)))
+			ERROR_CODE = measured_strings_reply(&address, 1);
+		fibril_rwlock_read_unlock(&netif_globals.lock);
+		return ERROR_CODE;
 	}
 	
@@ -421,16 +419,13 @@
 /** Start the network interface module.
  *
- * Initialize the client connection serving function, initialize
- * the module, registers the module service and start the async
- * manager, processing IPC messages in an infinite loop.
- *
- * @param[in] client_connection The client connection processing
- *                              function. The module skeleton propagates
- *                              its own one.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module message
- *         function.
- *
+ * Initialize the client connection serving function, initialize the module,
+ * registers the module service and start the async manager, processing IPC
+ * messages in an infinite loop.
+ *
+ * @param[in] client_connection The client connection processing function.
+ *			The module skeleton propagates its own one.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for each specific module
+ *			message function.
  */
 int netif_module_start_standalone(async_client_conn_t client_connection)
Index: uspace/lib/net/netif/netif_remote.c
===================================================================
--- uspace/lib/net/netif/netif_remote.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/netif/netif_remote.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup netif
+/** @addtogroup libnet 
  * @{
  */
@@ -35,4 +35,8 @@
  */
 
+#include <netif_remote.h>
+#include <packet_client.h>
+#include <generic.h>
+
 #include <ipc/services.h>
 #include <ipc/netif.h>
@@ -41,9 +45,18 @@
 #include <adt/measured_strings.h>
 #include <net/packet.h>
-#include <packet_client.h>
 #include <net/device.h>
-#include <netif_remote.h>
-#include <generic.h>
 
+/** Return the device local hardware address.
+ *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @param[out] address	The device local hardware address.
+ * @param[out] data	The address data.
+ * @return		EOK on success.
+ * @return		EBADMEM if the address parameter is NULL.
+ * @return		ENOENT if there no such device.
+ * @return		Other error codes as defined for the
+ *			netif_get_addr_message() function.
+ */
 int netif_get_addr_req_remote(int netif_phone, device_id_t device_id,
     measured_string_ref *address, char **data)
@@ -53,10 +66,32 @@
 }
 
-int netif_probe_req_remote(int netif_phone, device_id_t device_id, int irq, int io)
+/** Probe the existence of the device.
+ *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @param[in] irq	The device interrupt number.
+ * @param[in] io	The device input/output address.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the
+ *			netif_probe_message().
+ */
+int
+netif_probe_req_remote(int netif_phone, device_id_t device_id, int irq, int io)
 {
 	return async_req_3_0(netif_phone, NET_NETIF_PROBE, device_id, irq, io);
 }
 
-int netif_send_msg_remote(int netif_phone, device_id_t device_id, packet_t packet,
+/** Send the packet queue.
+ *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The packet queue.
+ * @param[in] sender	The sending module service.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the generic_send_msg()
+ *			function.
+ */
+int
+netif_send_msg_remote(int netif_phone, device_id_t device_id, packet_t packet,
     services_t sender)
 {
@@ -65,4 +100,14 @@
 }
 
+/** Start the device.
+ *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the
+ *			netif_start_message() function.
+ */
 int netif_start_req_remote(int netif_phone, device_id_t device_id)
 {
@@ -70,4 +115,14 @@
 }
 
+/** Stop the device.
+ *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the find_device()
+ *			function.
+ * @return		Other error codes as defined for the
+ *			netif_stop_message() function.
+ */
 int netif_stop_req_remote(int netif_phone, device_id_t device_id)
 {
@@ -75,4 +130,11 @@
 }
 
+/** Return the device usage statistics.
+ *
+ * @param[in] netif_phone The network interface phone.
+ * @param[in] device_id	The device identifier.
+ * @param[out] stats	The device usage statistics.
+ * @return EOK on success.
+ */
 int netif_stats_req_remote(int netif_phone, device_id_t device_id,
     device_stats_ref stats)
@@ -99,11 +161,12 @@
  * @param[in] receiver  The message receiver.
  *
- * @return The phone of the needed service.
- * @return EOK on success.
- * @return Other error codes as defined for the bind_service() function.
- *
+ * @return		The phone of the needed service.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for the bind_service()
+ *			function.
  */
-int netif_bind_service_remote(services_t service, device_id_t device_id, services_t me,
-    async_client_conn_t receiver)
+int
+netif_bind_service_remote(services_t service, device_id_t device_id,
+    services_t me, async_client_conn_t receiver)
 {
 	return bind_service(service, device_id, me, 0, receiver);
Index: uspace/lib/net/nil/nil_remote.c
===================================================================
--- uspace/lib/net/nil/nil_remote.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/nil/nil_remote.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup net_nil
+/** @addtogroup libnet
  * @{
  */
@@ -47,12 +47,10 @@
 /** Notify the network interface layer about the device state change.
  *
- * @param[in] nil_phone The network interface layer phone.
- * @param[in] device_id The device identifier.
- * @param[in] state     The new device state.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module device
- *         state function.
- *
+ * @param[in] nil_phone	The network interface layer phone.
+ * @param[in] device_id	The device identifier.
+ * @param[in] state	The new device state.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for each specific module
+ *			device state function.
  */
 int nil_device_state_msg_remote(int nil_phone, device_id_t device_id, int state)
@@ -67,19 +65,17 @@
  * upper layers.
  *
- * @param[in] nil_phone The network interface layer phone.
- * @param[in] device_id The source device identifier.
- * @param[in] packet    The received packet or the received packet queue.
- * @param     target    The target service. Ignored parameter.
- *
- * @return EOK on success.
- * @return Other error codes as defined for each specific module
- *         received function.
- *
+ * @param[in] nil_phone	The network interface layer phone.
+ * @param[in] device_id	The source device identifier.
+ * @param[in] packet	The received packet or the received packet queue.
+ * @param target	The target service. Ignored parameter.
+ * @return		EOK on success.
+ * @return		Other error codes as defined for each specific module
+ * 			received function.
  */
 int nil_received_msg_remote(int nil_phone, device_id_t device_id,
     packet_t packet, services_t target)
 {
-	return generic_received_msg_remote(nil_phone, NET_NIL_RECEIVED, device_id,
-	    packet_get_id(packet), target, 0);
+	return generic_received_msg_remote(nil_phone, NET_NIL_RECEIVED,
+	    device_id, packet_get_id(packet), target, 0);
 }
 
Index: uspace/lib/net/tl/icmp_client.c
===================================================================
--- uspace/lib/net/tl/icmp_client.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/tl/icmp_client.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,15 +27,19 @@
  */
 
-/** @addtogroup icmp
- *  @{
+/** @addtogroup libnet
+ * @{
  */
 
 /** @file
- *  ICMP client interface implementation.
- *  @see icmp_client.h
+ * ICMP client interface implementation.
+ * @see icmp_client.h
  */
 
+#include <icmp_client.h>
+#include <icmp_header.h>
+#include <packet_client.h>
+
 #ifdef CONFIG_DEBUG
-	#include <stdio.h>
+#include <stdio.h>
 #endif
 
@@ -44,40 +48,55 @@
 
 #include <net/icmp_codes.h>
-#include <icmp_client.h>
 #include <net/packet.h>
-#include <packet_client.h>
-#include <icmp_header.h>
 
-int icmp_client_process_packet(packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu){
+/** Processes the received packet prefixed with an ICMP header.
+ *
+ * @param[in] packet	The received packet.
+ * @param[out] type	The ICMP header type.
+ * @param[out] code	The ICMP header code.
+ * @param[out] pointer	The ICMP header pointer.
+ * @param[out] mtu	The ICMP header MTU.
+ * @returns		The ICMP header length.
+ * @returns		Zero if the packet contains no data.
+ */
+int
+icmp_client_process_packet(packet_t packet, icmp_type_t *type,
+    icmp_code_t *code, icmp_param_t *pointer, icmp_param_t *mtu)
+{
 	icmp_header_ref header;
 
 	header = (icmp_header_ref) packet_get_data(packet);
-	if((! header)
-		|| (packet_get_data_length(packet) < sizeof(icmp_header_t))){
+	if (!header ||
+	    (packet_get_data_length(packet) < sizeof(icmp_header_t))) {
 		return 0;
 	}
-	if(type){
+
+	if (type)
 		*type = header->type;
-	}
-	if(code){
+	if (code)
 		*code = header->code;
-	}
-	if(pointer){
+	if (pointer)
 		*pointer = header->un.param.pointer;
-	}
-	if(mtu){
+	if (mtu)
 		*mtu = header->un.frag.mtu;
-	}
+
 	// remove debug dump
 #ifdef CONFIG_DEBUG
-	printf("ICMP error %d (%d) in packet %d\n", header->type, header->code, packet_get_id(packet));
+	printf("ICMP error %d (%d) in packet %d\n", header->type, header->code,
+	    packet_get_id(packet));
 #endif
 	return sizeof(icmp_header_t);
 }
 
-size_t icmp_client_header_length(packet_t packet){
-	if(packet_get_data_length(packet) < sizeof(icmp_header_t)){
+/** Returns the ICMP header length.
+ *
+ * @param[in] packet	The packet.
+ * @returns		The ICMP header length in bytes.
+ */
+size_t icmp_client_header_length(packet_t packet)
+{
+	if (packet_get_data_length(packet) < sizeof(icmp_header_t))
 		return 0;
-	}
+
 	return sizeof(icmp_header_t);
 }
Index: uspace/lib/net/tl/icmp_remote.c
===================================================================
--- uspace/lib/net/tl/icmp_remote.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/tl/icmp_remote.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,12 +27,16 @@
  */
 
-/** @addtogroup icmp
+/** @addtogroup libnet
  *  @{
  */
 
 /** @file
- *  ICMP interface implementation for remote modules.
- *  @see icmp_interface.h
+ * ICMP interface implementation for remote modules.
+ * @see icmp_interface.h
  */
+
+#include <icmp_interface.h>
+#include <net/modules.h>
+#include <packet_client.h>
 
 #include <async.h>
@@ -43,25 +47,85 @@
 #include <sys/types.h>
 
-#include <net/modules.h>
-#include <icmp_interface.h>
-#include <packet_client.h>
-
-int icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet){
-	async_msg_3(icmp_phone, NET_ICMP_DEST_UNREACH, (ipcarg_t) code, (ipcarg_t) packet_get_id(packet), (ipcarg_t) mtu);
+/** Sends the Destination Unreachable error notification packet.
+ *
+ * Beginning of the packet is sent as the notification packet data.
+ * The source and the destination addresses should be set in the original
+ * packet.
+ *
+ * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
+ * @param[in] code	The error specific code.
+ * @param[in] mtu	The error MTU value.
+ * @param[in] packet	The original packet.
+ * @returns		EOK on success.
+ * @returns		EPERM if the ICMP error notifications are disabled.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int
+icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code,
+    icmp_param_t mtu, packet_t packet)
+{
+	async_msg_3(icmp_phone, NET_ICMP_DEST_UNREACH, (ipcarg_t) code,
+	    (ipcarg_t) packet_get_id(packet), (ipcarg_t) mtu);
 	return EOK;
 }
 
-int icmp_source_quench_msg(int icmp_phone, packet_t packet){
-	async_msg_2(icmp_phone, NET_ICMP_SOURCE_QUENCH, 0, (ipcarg_t) packet_get_id(packet));
+/** Sends the Source Quench error notification packet.
+ *
+ * Beginning of the packet is sent as the notification packet data.
+ * The source and the destination addresses should be set in the original
+ * packet.
+ *
+ * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
+ * @param[in] packet	The original packet.
+ * @returns		EOK on success.
+ * @returns		EPERM if the ICMP error notifications are disabled.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int icmp_source_quench_msg(int icmp_phone, packet_t packet)
+{
+	async_msg_2(icmp_phone, NET_ICMP_SOURCE_QUENCH, 0,
+	    (ipcarg_t) packet_get_id(packet));
 	return EOK;
 }
 
-int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet){
-	async_msg_2(icmp_phone, NET_ICMP_TIME_EXCEEDED, (ipcarg_t) code, (ipcarg_t) packet_get_id(packet));
+/** Sends the Time Exceeded error notification packet.
+ *
+ * Beginning of the packet is sent as the notification packet data.
+ * The source and the destination addresses should be set in the original
+ * packet.
+ *
+ * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
+ * @param[in] code	The error specific code.
+ * @param[in] packet	The original packet.
+ * @returns		EOK on success.
+ * @returns		EPERM if the ICMP error notifications are disabled.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet)
+{
+	async_msg_2(icmp_phone, NET_ICMP_TIME_EXCEEDED, (ipcarg_t) code,
+	    (ipcarg_t) packet_get_id(packet));
 	return EOK;
 }
 
-int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet){
-	async_msg_3(icmp_phone, NET_ICMP_PARAMETERPROB, (ipcarg_t) code, (ipcarg_t) packet_get_id(packet), (ipcarg_t) pointer);
+/** Sends the Parameter Problem error notification packet.
+ *
+ * Beginning of the packet is sent as the notification packet data.
+ * The source and the destination addresses should be set in the original
+ * packet.
+ *
+ * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
+ * @param[in] code	The error specific code.
+ * @param[in] pointer	The problematic parameter offset.
+ * @param[in] packet	The original packet.
+ * @returns		EOK on success.
+ * @returns		EPERM if the ICMP error notifications are disabled.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code,
+    icmp_param_t pointer, packet_t packet)
+{
+	async_msg_3(icmp_phone, NET_ICMP_PARAMETERPROB, (ipcarg_t) code,
+	    (ipcarg_t) packet_get_id(packet), (ipcarg_t) pointer);
 	return EOK;
 }
@@ -69,2 +133,3 @@
 /** @}
  */
+
Index: uspace/lib/net/tl/socket_core.c
===================================================================
--- uspace/lib/net/tl/socket_core.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/net/tl/socket_core.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,700 @@
+/*
+ * 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
+ * Socket common core implementation.
+ */
+
+#include <socket_core.h>
+#include <packet_client.h>
+#include <packet_remote.h>
+
+#include <net/socket_codes.h>
+#include <net/in.h>
+#include <net/inet.h>
+#include <net/packet.h>
+#include <net/modules.h>
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <err.h>
+
+#include <adt/dynamic_fifo.h>
+#include <adt/int_map.h>
+
+/**
+ * Maximum number of random attempts to find a new socket identifier before
+ * switching to the sequence.
+ */
+#define SOCKET_ID_TRIES	100
+
+/** Bound port sockets.*/
+struct socket_port {
+	/** The bound sockets map. */
+	socket_port_map_t map;
+	/** The bound sockets count. */
+	int count;
+};
+
+INT_MAP_IMPLEMENT(socket_cores, socket_core_t);
+
+GENERIC_CHAR_MAP_IMPLEMENT(socket_port_map, socket_core_ref);
+
+INT_MAP_IMPLEMENT(socket_ports, socket_port_t);
+
+/** Destroys the socket.
+ *
+ * If the socket is bound, the port is released.
+ * Releases all buffered packets, calls the release function and removes the
+ * socket from the local sockets.
+ *
+ * @param[in] packet_phone The packet server phone to release buffered packets.
+ * @param[in] socket	The socket to be destroyed.
+ * @param[in,out] local_sockets The local sockets to be updated.
+ * @param[in,out] global_sockets The global sockets to be updated.
+ * @param[in] socket_release The client release callback function.
+ */
+static void
+socket_destroy_core(int packet_phone, socket_core_ref socket,
+    socket_cores_ref local_sockets, socket_ports_ref global_sockets,
+    void (* socket_release)(socket_core_ref socket))
+{
+	int packet_id;
+
+	// if bound
+	if (socket->port) {
+		// release the port
+		socket_port_release(global_sockets, socket);
+	}
+	
+	// release all received packets
+	while ((packet_id = dyn_fifo_pop(&socket->received)) >= 0)
+		pq_release_remote(packet_phone, packet_id);
+
+	dyn_fifo_destroy(&socket->received);
+	dyn_fifo_destroy(&socket->accepted);
+
+	if (socket_release)
+		socket_release(socket);
+
+	socket_cores_exclude(local_sockets, socket->socket_id);
+}
+
+/** Destroys local sockets.
+ *
+ * Releases all buffered packets and calls the release function for each of the
+ * sockets.
+ *
+ * @param[in] packet_phone The packet server phone to release buffered packets.
+ * @param[in] local_sockets The local sockets to be destroyed.
+ * @param[in,out] global_sockets The global sockets to be updated.
+ * @param[in] socket_release The client release callback function.
+ */
+void
+socket_cores_release(int packet_phone, socket_cores_ref local_sockets,
+    socket_ports_ref global_sockets,
+    void (* socket_release)(socket_core_ref socket))
+{
+	int index;
+
+	if (!socket_cores_is_valid(local_sockets))
+		return;
+
+	local_sockets->magic = 0;
+
+	for (index = 0; index < local_sockets->next; ++index) {
+		if (socket_cores_item_is_valid(&local_sockets->items[index])) {
+			local_sockets->items[index].magic = 0;
+
+			if (local_sockets->items[index].value) {
+				socket_destroy_core(packet_phone,
+				    local_sockets->items[index].value,
+				    local_sockets, global_sockets,
+				    socket_release);
+				free(local_sockets->items[index].value);
+				local_sockets->items[index].value = NULL;
+			}
+		}
+	}
+
+	free(local_sockets->items);
+}
+
+/** Adds the socket to a socket port.
+ *
+ * @param[in,out] socket_port The socket port structure.
+ * @param[in] socket	The socket to be added.
+ * @param[in] key	The socket key identifier.
+ * @param[in] key_length The socket key length.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+static int
+socket_port_add_core(socket_port_ref socket_port, socket_core_ref socket,
+    const char *key, size_t key_length)
+{
+	ERROR_DECLARE;
+
+	socket_core_ref *socket_ref;
+
+	// create a wrapper
+	socket_ref = malloc(sizeof(*socket_ref));
+	if (!socket_ref)
+		return ENOMEM;
+
+	*socket_ref = socket;
+	// add the wrapper
+	if (ERROR_OCCURRED(socket_port_map_add(&socket_port->map, key,
+	    key_length, socket_ref))) {
+		free(socket_ref);
+		return ERROR_CODE;
+	}
+	
+	++socket_port->count;
+	socket->key = key;
+	socket->key_length = key_length;
+	
+	return EOK;
+}
+
+/** Binds the socket to the port.
+ *
+ * The SOCKET_MAP_KEY_LISTENING key identifier is used.
+ *
+ * @param[in] global_sockets The global sockets to be updated.
+ * @param[in] socket	The socket to be added.
+ * @param[in] port	The port number to be bound to.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the
+ *			 socket_ports_add() function.
+ */
+static int
+socket_bind_insert(socket_ports_ref global_sockets, socket_core_ref socket,
+    int port)
+{
+	ERROR_DECLARE;
+
+	socket_port_ref socket_port;
+
+	// create a wrapper
+	socket_port = malloc(sizeof(*socket_port));
+	if (!socket_port)
+		return ENOMEM;
+
+	socket_port->count = 0;
+	if (ERROR_OCCURRED(socket_port_map_initialize(&socket_port->map)) ||
+	    ERROR_OCCURRED(socket_port_add_core(socket_port, socket,
+	    SOCKET_MAP_KEY_LISTENING, 0))) {
+		socket_port_map_destroy(&socket_port->map);
+		free(socket_port);
+		return ERROR_CODE;
+	}
+	
+	// register the incomming port
+	ERROR_CODE = socket_ports_add(global_sockets, port, socket_port);
+	if (ERROR_CODE < 0) {
+		socket_port_map_destroy(&socket_port->map);
+		free(socket_port);
+		return ERROR_CODE;
+	}
+	
+	socket->port = port;
+	return EOK;
+}
+
+/** Binds the socket to the port.
+ *
+ * The address port is used if set, a free port is used if not.
+ *
+ * @param[in] local_sockets The local sockets to be searched.
+ * @param[in,out] global_sockets The global sockets to be updated.
+ * @param[in] socket_id	The new socket identifier.
+ * @param[in] addr	The address to be bound to.
+ * @param[in] addrlen	The address length.
+ * @param[in] free_ports_start The minimum free port.
+ * @param[in] free_ports_end The maximum free port.
+ * @param[in] last_used_port The last used free port.
+ * @returns		EOK on success.
+ * @returns		ENOTSOCK if the socket was not found.
+ * @returns		EAFNOSUPPORT if the address family is not supported.
+ * @returns		EADDRINUSE if the port is already in use.
+ * @returns		Other error codes as defined for the
+ *			socket_bind_free_port() function.
+ * @returns		Other error codes as defined for the
+ *			socket_bind_insert() function.
+ */
+int
+socket_bind(socket_cores_ref local_sockets, socket_ports_ref global_sockets,
+    int socket_id, void *addr, size_t addrlen, int free_ports_start,
+    int free_ports_end, int last_used_port)
+{
+	socket_core_ref socket;
+	socket_port_ref socket_port;
+	struct sockaddr *address;
+	struct sockaddr_in *address_in;
+
+	if (addrlen < sizeof(struct sockaddr))
+		return EINVAL;
+
+	address = (struct sockaddr *) addr;
+	switch (address->sa_family) {
+	case AF_INET:
+		if (addrlen != sizeof(struct sockaddr_in))
+			return EINVAL;
+		
+		address_in = (struct sockaddr_in *) addr;
+		// find the socket
+		socket = socket_cores_find(local_sockets, socket_id);
+		if (!socket)
+			return ENOTSOCK;
+		
+		// bind a free port?
+		if (address_in->sin_port <= 0)
+			return socket_bind_free_port(global_sockets, socket,
+			     free_ports_start, free_ports_end, last_used_port);
+		
+		// try to find the port
+		socket_port = socket_ports_find(global_sockets,
+		    ntohs(address_in->sin_port));
+		if (socket_port) {
+			// already used
+			return EADDRINUSE;
+		}
+		
+		// if bound
+		if (socket->port) {
+			// release the port
+			socket_port_release(global_sockets, socket);
+		}
+		socket->port = -1;
+		
+		return socket_bind_insert(global_sockets, socket,
+		    ntohs(address_in->sin_port));
+		
+	case AF_INET6:
+		// TODO IPv6
+		break;
+	}
+	
+	return EAFNOSUPPORT;
+}
+
+/** Binds the socket to a free port.
+ *
+ * The first free port is used.
+ *
+ * @param[in,out] global_sockets The global sockets to be updated.
+ * @param[in,out] socket The socket to be bound.
+ * @param[in] free_ports_start The minimum free port.
+ * @param[in] free_ports_end The maximum free port.
+ * @param[in] last_used_port The last used free port.
+ * @returns		EOK on success.
+ * @returns		ENOTCONN if no free port was found.
+ * @returns		Other error codes as defined for the
+ *			socket_bind_insert() function.
+ */
+int
+socket_bind_free_port(socket_ports_ref global_sockets, socket_core_ref socket,
+    int free_ports_start, int free_ports_end, int last_used_port)
+{
+	int index;
+
+	// from the last used one
+	index = last_used_port;
+	
+	do {
+		++index;
+		
+		// til the range end
+		if (index >= free_ports_end) {
+			// start from the range beginning
+			index = free_ports_start - 1;
+			do {
+				++index;
+				// til the last used one
+				if (index >= last_used_port) {
+					// none found
+					return ENOTCONN;
+				}
+			} while (socket_ports_find(global_sockets, index));
+			
+			// found, break immediately
+			break;
+		}
+		
+	} while (socket_ports_find(global_sockets, index));
+	
+	return socket_bind_insert(global_sockets, socket, index);
+}
+
+/** Tries to find a new free socket identifier.
+ *
+ * @param[in] local_sockets The local sockets to be searched.
+ * @param[in] positive	A value indicating whether a positive identifier is
+ *			requested. A negative identifier is requested if set to
+ *			false.
+ * @returns		The new socket identifier.
+ * @returns		ELIMIT if there is no socket identifier available.
+ */
+static int socket_generate_new_id(socket_cores_ref local_sockets, int positive)
+{
+	int socket_id;
+	int count;
+
+	count = 0;
+//	socket_id = socket_globals.last_id;
+	do {
+		if (count < SOCKET_ID_TRIES) {
+			socket_id = rand() % INT_MAX;
+			++count;
+		} else if (count == SOCKET_ID_TRIES) {
+			socket_id = 1;
+			++count;
+		// only this branch for last_id
+		} else {
+			if (socket_id < INT_MAX) {
+				++ socket_id;
+/*			} else if(socket_globals.last_id) {
+*				socket_globals.last_id = 0;
+*				socket_id = 1;
+*/			} else {
+				return ELIMIT;
+			}
+		}
+	} while (socket_cores_find(local_sockets,
+	    ((positive ? 1 : -1) * socket_id)));
+	
+//	last_id = socket_id
+	return socket_id;
+}
+
+/** Creates a new socket.
+ *
+ * @param[in,out] local_sockets The local sockets to be updated.
+ * @param[in] app_phone	The application phone.
+ * @param[in] specific_data The socket specific data.
+ * @param[in,out] socket_id The new socket identifier. A new identifier is
+ *			chosen if set to zero or negative. A negative identifier
+ *			is chosen if set to negative.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the socket_id parameter is NULL.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int
+socket_create(socket_cores_ref local_sockets, int app_phone,
+    void *specific_data, int *socket_id)
+{
+	ERROR_DECLARE;
+
+	socket_core_ref socket;
+	int res;
+	int positive;
+
+	if (!socket_id)
+		return EINVAL;
+	
+	// store the socket
+	if (*socket_id <= 0) {
+		positive = (*socket_id == 0);
+		*socket_id = socket_generate_new_id(local_sockets, positive);
+		if (*socket_id <= 0)
+			return *socket_id;
+		if (!positive)
+			*socket_id *= -1;
+	} else if(socket_cores_find(local_sockets, *socket_id)) {
+		return EEXIST;
+	}
+	
+	socket = (socket_core_ref) malloc(sizeof(*socket));
+	if (!socket)
+		return ENOMEM;
+	
+	// initialize
+	socket->phone = app_phone;
+	socket->port = -1;
+	socket->key = NULL;
+	socket->key_length = 0;
+	socket->specific_data = specific_data;
+	if (ERROR_OCCURRED(dyn_fifo_initialize(&socket->received,
+	    SOCKET_INITIAL_RECEIVED_SIZE))) {
+		free(socket);
+		return ERROR_CODE;
+	}
+	if (ERROR_OCCURRED(dyn_fifo_initialize(&socket->accepted,
+	    SOCKET_INITIAL_ACCEPTED_SIZE))) {
+		dyn_fifo_destroy(&socket->received);
+		free(socket);
+		return ERROR_CODE;
+	}
+	socket->socket_id = *socket_id;
+	res = socket_cores_add(local_sockets, socket->socket_id, socket);
+	if (res < 0) {
+		dyn_fifo_destroy(&socket->received);
+		dyn_fifo_destroy(&socket->accepted);
+		free(socket);
+		return res;
+	}
+	
+	return EOK;
+}
+
+/** Destroys the socket.
+ *
+ * If the socket is bound, the port is released.
+ * Releases all buffered packets, calls the release function and removes the
+ * socket from the local sockets.
+ *
+ * @param[in] packet_phone The packet server phone to release buffered packets.
+ * @param[in] socket_id	The socket identifier.
+ * @param[in,out] local_sockets The local sockets to be updated.
+ * @param[in,out] global_sockets The global sockets to be updated.
+ * @param[in] socket_release The client release callback function.
+ * @returns		EOK on success.
+ * @returns		ENOTSOCK if the socket is not found.
+ */
+int
+socket_destroy(int packet_phone, int socket_id, socket_cores_ref local_sockets,
+    socket_ports_ref global_sockets,
+    void (*socket_release)(socket_core_ref socket))
+{
+	socket_core_ref socket;
+	int accepted_id;
+
+	// find the socket
+	socket = socket_cores_find(local_sockets, socket_id);
+	if (!socket)
+		return ENOTSOCK;
+	
+	// destroy all accepted sockets
+	while ((accepted_id = dyn_fifo_pop(&socket->accepted)) >= 0)
+		socket_destroy(packet_phone, accepted_id, local_sockets,
+		    global_sockets, socket_release);
+	
+	socket_destroy_core(packet_phone, socket, local_sockets, global_sockets,
+	    socket_release);
+	
+	return EOK;
+}
+
+/** Replies the packet or the packet queue data to the application via the
+ * socket.
+ *
+ * Uses the current message processing fibril.
+ *
+ * @param[in] packet	The packet to be transfered.
+ * @param[out] length	The total data length.
+ * @returns		EOK on success.
+ * @returns		EBADMEM if the length parameter is NULL.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the data_reply()
+ *			function.
+ */
+int socket_reply_packets(packet_t packet, size_t *length)
+{
+	ERROR_DECLARE;
+
+	packet_t next_packet;
+	size_t fragments;
+	size_t *lengths;
+	size_t index;
+
+	if (!length)
+		return EBADMEM;
+
+	next_packet = pq_next(packet);
+	if (!next_packet) {
+		// write all if only one fragment
+		ERROR_PROPAGATE(data_reply(packet_get_data(packet),
+		    packet_get_data_length(packet)));
+		// store the total length
+		*length = packet_get_data_length(packet);
+	} else {
+		// count the packet fragments
+		fragments = 1;
+		next_packet = pq_next(packet);
+		while ((next_packet = pq_next(next_packet)))
+			++fragments;
+		
+		// compute and store the fragment lengths
+		lengths = (size_t *) malloc(sizeof(size_t) * fragments +
+		    sizeof(size_t));
+		if (!lengths)
+			return ENOMEM;
+		
+		lengths[0] = packet_get_data_length(packet);
+		lengths[fragments] = lengths[0];
+		next_packet = pq_next(packet);
+		
+		for (index = 1; index < fragments; ++index) {
+			lengths[index] = packet_get_data_length(next_packet);
+			lengths[fragments] += lengths[index];
+			next_packet = pq_next(packet);
+		}
+		
+		// write the fragment lengths
+		if (ERROR_OCCURRED(data_reply(lengths,
+		    sizeof(int) * (fragments + 1)))) {
+			free(lengths);
+			return ERROR_CODE;
+		}
+		next_packet = packet;
+		
+		// write the fragments
+		for (index = 0; index < fragments; ++index) {
+			ERROR_CODE = data_reply(packet_get_data(next_packet),
+			    lengths[index]);
+			if (ERROR_OCCURRED(ERROR_CODE)) {
+				free(lengths);
+				return ERROR_CODE;
+			}
+			next_packet = pq_next(next_packet);
+		}
+		
+		// store the total length
+		*length = lengths[fragments];
+		free(lengths);
+	}
+	
+	return EOK;
+}
+
+/** Finds the bound port socket.
+ *
+ * @param[in] global_sockets The global sockets to be searched.
+ * @param[in] port	The port number.
+ * @param[in] key	The socket key identifier.
+ * @param[in] key_length The socket key length.
+ * @returns		The found socket.
+ * @returns		NULL if no socket was found.
+ */
+socket_core_ref
+socket_port_find(socket_ports_ref global_sockets, int port, const char *key,
+    size_t key_length)
+{
+	socket_port_ref socket_port;
+	socket_core_ref *socket_ref;
+
+	socket_port = socket_ports_find(global_sockets, port);
+	if (socket_port && (socket_port->count > 0)) {
+		socket_ref = socket_port_map_find(&socket_port->map, key,
+		    key_length);
+		if (socket_ref)
+			return *socket_ref;
+	}
+	
+	return NULL;
+}
+
+/** Releases the socket port.
+ *
+ * If the socket is bound the port entry is released.
+ * If there are no more port entries the port is release.
+ *
+ * @param[in] global_sockets The global sockets to be updated.
+ * @param[in] socket	The socket to be unbound.
+ */
+void
+socket_port_release(socket_ports_ref global_sockets, socket_core_ref socket)
+{
+	socket_port_ref socket_port;
+	socket_core_ref *socket_ref;
+
+	if (!socket->port)
+		return;
+	
+	// find ports
+	socket_port = socket_ports_find(global_sockets, socket->port);
+	if (socket_port) {
+		// find the socket
+		socket_ref = socket_port_map_find(&socket_port->map,
+		    socket->key, socket->key_length);
+		
+		if (socket_ref) {
+			--socket_port->count;
+			
+			// release if empty
+			if (socket_port->count <= 0) {
+				// destroy the map
+				socket_port_map_destroy(&socket_port->map);
+				// release the port
+				socket_ports_exclude(global_sockets,
+				    socket->port);
+			} else {
+				// remove
+				socket_port_map_exclude(&socket_port->map,
+				    socket->key, socket->key_length);
+			}
+		}
+	}
+	
+	socket->port = 0;
+	socket->key = NULL;
+	socket->key_length = 0;
+}
+
+/** Adds the socket to an already bound port.
+ *
+ * @param[in] global_sockets The global sockets to be updated.
+ * @param[in] port	The port number to be bound to.
+ * @param[in] socket	The socket to be added.
+ * @param[in] key	The socket key identifier.
+ * @param[in] key_length The socket key length.
+ * @returns		EOK on success.
+ * @returns		ENOENT if the port is not already used.
+ * @returns		Other error codes as defined for the
+ *			socket_port_add_core() function.
+ */
+int
+socket_port_add(socket_ports_ref global_sockets, int port,
+    socket_core_ref socket, const char *key, size_t key_length)
+{
+	ERROR_DECLARE;
+
+	socket_port_ref socket_port;
+
+	// find ports
+	socket_port = socket_ports_find(global_sockets, port);
+	if (!socket_port)
+		return ENOENT;
+	
+	// add the socket
+	ERROR_PROPAGATE(socket_port_add_core(socket_port, socket, key,
+	    key_length));
+	
+	socket->port = port;
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/lib/net/tl/tl_common.c
===================================================================
--- uspace/lib/net/tl/tl_common.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/net/tl/tl_common.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,12 +27,20 @@
  */
 
-/** @addtogroup net_tl
- *  @{
+/** @addtogroup libnet 
+ * @{
  */
 
 /** @file
- *  Transport layer common functions implementation.
- *  @see tl_common.h
- */
+ * Transport layer common functions implementation.
+ * @see tl_common.h
+ */
+
+#include <tl_common.h>
+#include <packet_client.h>
+#include <packet_remote.h>
+#include <icmp_interface.h>
+#include <ip_remote.h>
+#include <ip_interface.h>
+#include <tl_interface.h>
 
 #include <net/socket_codes.h>
@@ -40,4 +48,7 @@
 #include <net/in6.h>
 #include <net/inet.h>
+#include <net/device.h>
+#include <net/packet.h>
+
 #include <async.h>
 #include <ipc/services.h>
@@ -45,16 +56,18 @@
 #include <err.h>
 
-#include <net/packet.h>
-#include <packet_client.h>
-#include <packet_remote.h>
-#include <net/device.h>
-#include <icmp_interface.h>
-#include <ip_remote.h>
-#include <ip_interface.h>
-#include <tl_interface.h>
-#include <tl_common.h>
-
 DEVICE_MAP_IMPLEMENT(packet_dimensions, packet_dimension_t);
 
+/** 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.
+ */
 int
 tl_get_address_port(const struct sockaddr *addr, int addrlen, uint16_t *port)
@@ -74,11 +87,13 @@
 		*port = ntohs(address_in->sin_port);
 		break;
+	
 	case AF_INET6:
 		if (addrlen != sizeof(struct sockaddr_in6))
-				return EINVAL;
+			return EINVAL;
 
 		address_in6 = (struct sockaddr_in6 *) addr;
 		*port = ntohs(address_in6->sin6_port);
 		break;
+	
 	default:
 		return EAFNOSUPPORT;
@@ -93,17 +108,17 @@
  * The reply is cached then.
  *
- * @param[in]  ip_phone          The IP moduel phone for (semi)remote calls.
- * @param[in]  packet_dimensions The packet dimensions cache.
- * @param[in]  device_id         The device identifier.
- * @param[out] packet_dimension  The IP packet dimensions.
- *
- * @return EOK on success.
- * @return EBADMEM if the packet_dimension parameter is NULL.
- * @return ENOMEM if there is not enough memory left.
- * @return EINVAL if the packet_dimensions cache is not valid.
- * @return Other codes as defined for the ip_packet_size_req() function.
- *
- */
-int tl_get_ip_packet_dimension(int ip_phone,
+ * @param[in] ip_phone	The IP moduel phone for (semi)remote calls.
+ * @param[in] packet_dimensions The packet dimensions cache.
+ * @param[in] device_id	The device identifier.
+ * @param[out] packet_dimension The IP packet dimensions.
+ * @return		EOK on success.
+ * @return		EBADMEM if the packet_dimension parameter is NULL.
+ * @return		ENOMEM if there is not enough memory left.
+ * @return		EINVAL if the packet_dimensions cache is not valid.
+ * @return		Other codes as defined for the ip_packet_size_req()
+ *			function.
+ */
+int
+tl_get_ip_packet_dimension(int ip_phone,
     packet_dimensions_ref packet_dimensions, device_id_t device_id,
     packet_dimension_ref *packet_dimension)
@@ -139,4 +154,12 @@
 }
 
+/** 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.
+ * @return		ENOENT if the packet dimension is not cached.
+ */
 int
 tl_update_ip_packet_dimension(packet_dimensions_ref packet_dimensions,
@@ -148,4 +171,5 @@
 	if (!packet_dimension)
 		return ENOENT;
+
 	packet_dimension->content = content;
 
@@ -160,5 +184,4 @@
 				packet_dimensions_exclude(packet_dimensions,
 				    DEVICE_INVALID_ID);
-
 		}
 	}
@@ -167,4 +190,16 @@
 }
 
+/** 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.
+ */
 int tl_set_address_port(struct sockaddr * addr, int addrlen, uint16_t port)
 {
@@ -187,4 +222,5 @@
 		address_in->sin_port = htons(port);
 		return EOK;
+	
 	case AF_INET6:
 		if (length != sizeof(struct sockaddr_in6))
@@ -193,4 +229,5 @@
 		address_in6->sin6_port = htons(port);
 		return EOK;
+	
 	default:
 		return EAFNOSUPPORT;
@@ -198,4 +235,17 @@
 }
 
+/** 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.
+ */
 int
 tl_prepare_icmp_packet(int packet_phone, int icmp_phone, packet_t packet,
@@ -223,4 +273,18 @@
 }
 
+/** 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.
+ */
 int
 tl_socket_read_packet_data(int packet_phone, packet_ref packet, size_t prefix,
Index: uspace/lib/net/tl/tl_interface.c
===================================================================
--- uspace/lib/net/tl/tl_interface.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/lib/net/tl/tl_interface.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,68 @@
+/*
+ * 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
+ * @{
+ */
+
+#include <tl_interface.h>
+#include <generic.h>
+#include <packet_client.h>
+
+#include <ipc/services.h>
+#include <ipc/tl.h>
+
+#include <net/device.h>
+#include <net/packet.h>
+
+/** Notify the remote transport layer modules about the received packet/s.
+ *
+ * @param[in] tl_phone  The transport layer module phone used for remote calls.
+ * @param[in] device_id The device identifier.
+ * @param[in] packet    The received packet or the received packet queue.
+ *                      The packet queue is used to carry a fragmented
+ *                      datagram. The first packet contains the headers,
+ *                      the others contain only data.
+ * @param[in] target    The target transport layer module service to be
+ *                      delivered to.
+ * @param[in] error     The packet error reporting service. Prefixes the
+ *                      received packet.
+ *
+ * @return EOK on success.
+ *
+ */
+int
+tl_received_msg(int tl_phone, device_id_t device_id, packet_t packet,
+    services_t target, services_t error)
+{
+	return generic_received_msg_remote(tl_phone, NET_TL_RECEIVED, device_id,
+	    packet_get_id(packet), target, error);
+}
+
+/** @}
+ */
Index: uspace/lib/packet/generic/packet_server.c
===================================================================
--- uspace/lib/packet/generic/packet_server.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/packet/generic/packet_server.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,11 +27,14 @@
  */
 
-/** @addtogroup packet
+/** @addtogroup libpacket
  *  @{
  */
 
 /** @file
- *  Packet server implementation.
- */
+ * Packet server implementation.
+ */
+
+#include <packet_server.h>
+#include <packet_local.h>
 
 #include <align.h>
@@ -51,42 +54,51 @@
 #include <net/packet_header.h>
 
-#include <packet_server.h>
-#include <packet_local.h>
-
 #define FREE_QUEUES_COUNT	7
 
-/** The default address length reserved for new packets.
- */
+/** The default address length reserved for new packets. */
 #define DEFAULT_ADDR_LEN	32
 
-/** The default prefix reserved for new packets.
- */
+/** The default prefix reserved for new packets. */
 #define DEFAULT_PREFIX		64
 
-/** The default suffix reserved for new packets.
- */
+/** The default suffix reserved for new packets. */
 #define DEFAULT_SUFFIX		64
 
-/** Packet server global data.
- */
-static struct{
-	/** Safety lock.
-	 */
+/** Packet server global data. */
+static struct {
+	/** Safety lock. */
 	fibril_mutex_t lock;
-	/** Free packet queues.
-	 */
+	/** Free packet queues. */
 	packet_t free[FREE_QUEUES_COUNT];
-	/** Packet length upper bounds of the free packet queues.
-	 *  The maximal lengths of packets in each queue in the ascending order.
-	 *  The last queue is not limited.
+	
+	/**
+	 * Packet length upper bounds of the free packet queues. The maximal
+	 * lengths of packets in each queue in the ascending order. The last
+	 * queue is not limited.
 	 */
 	size_t sizes[FREE_QUEUES_COUNT];
-	/** Total packets allocated.
-	 */
+	
+	/** Total packets allocated. */
 	unsigned int count;
 } ps_globals = {
 	.lock = FIBRIL_MUTEX_INITIALIZER(ps_globals.lock),
-	.free = {NULL, NULL, NULL, NULL, NULL, NULL, NULL},
-	.sizes = {PAGE_SIZE, PAGE_SIZE * 2, PAGE_SIZE * 4, PAGE_SIZE * 8, PAGE_SIZE * 16, PAGE_SIZE * 32, PAGE_SIZE * 64},
+	.free = {
+		NULL,
+		NULL,
+		NULL,
+		NULL,
+		NULL,
+		NULL,
+		NULL
+	},
+	.sizes = {
+		PAGE_SIZE,
+		PAGE_SIZE * 2,
+		PAGE_SIZE * 4,
+		PAGE_SIZE * 8,
+		PAGE_SIZE * 16,
+		PAGE_SIZE * 32,
+		PAGE_SIZE * 64
+	},
 	.count = 0
 };
@@ -102,13 +114,20 @@
 
 /** Clears and initializes the packet according to the given dimensions.
- *  @param[in] packet The packet to be initialized.
- *  @param[in] addr_len The source and destination addresses maximal length in bytes.
- *  @param[in] max_prefix The maximal prefix length in bytes.
- *  @param[in] max_content The maximal content length in bytes.
- *  @param[in] max_suffix The maximal suffix length in bytes.
- */
-static void packet_init(packet_t packet, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix){
+ *
+ * @param[in] packet	The packet to be initialized.
+ * @param[in] addr_len	The source and destination addresses maximal length in
+ *			bytes.
+ * @param[in] max_prefix The maximal prefix length in bytes.
+ * @param[in] max_content The maximal content length in bytes.
+ * @param[in] max_suffix The maximal suffix length in bytes.
+ */
+static void
+packet_init(packet_t packet, size_t addr_len, size_t max_prefix,
+    size_t max_content, size_t max_suffix)
+{
 	// clear the packet content
-	bzero(((void *) packet) + sizeof(struct packet), packet->length - sizeof(struct packet));
+	bzero(((void *) packet) + sizeof(struct packet),
+	    packet->length - sizeof(struct packet));
+	
 	// clear the packet header
 	packet->order = 0;
@@ -125,15 +144,22 @@
 }
 
-/** Creates a&nbsp;new packet of dimensions at least as given.
- *  Should be used only when the global data are locked.
- *  @param[in] length The total length of the packet, including the header, the addresses and the data of the packet.
- *  @param[in] addr_len The source and destination addresses maximal length in bytes.
- *  @param[in] max_prefix The maximal prefix length in bytes.
- *  @param[in] max_content The maximal content length in bytes.
- *  @param[in] max_suffix The maximal suffix length in bytes.
- *  @returns The packet of dimensions at least as given.
- *  @returns NULL if there is not enough memory left.
- */
-static packet_t packet_create(size_t length, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix){
+/** Creates a new packet of dimensions at least as given.
+ *
+ * Should be used only when the global data are locked.
+ *
+ * @param[in] length	The total length of the packet, including the header,
+ *			the addresses and the data of the packet.
+ * @param[in] addr_len	The source and destination addresses maximal length in
+ *			bytes.
+ * @param[in] max_prefix The maximal prefix length in bytes.
+ * @param[in] max_content The maximal content length in bytes.
+ * @param[in] max_suffix The maximal suffix length in bytes.
+ * @returns		The packet of dimensions at least as given.
+ * @returns		NULL if there is not enough memory left.
+ */
+static packet_t
+packet_create(size_t length, size_t addr_len, size_t max_prefix,
+    size_t max_content, size_t max_suffix)
+{
 	ERROR_DECLARE;
 
@@ -141,17 +167,19 @@
 
 	// already locked
-	packet = (packet_t) mmap(NULL, length, PROTO_READ | PROTO_WRITE, MAP_SHARED | MAP_ANONYMOUS, 0, 0);
-	if(packet == MAP_FAILED){
+	packet = (packet_t) mmap(NULL, length, PROTO_READ | PROTO_WRITE,
+	    MAP_SHARED | MAP_ANONYMOUS, 0, 0);
+	if (packet == MAP_FAILED)
 		return NULL;
-	}
-	++ ps_globals.count;
+
+	ps_globals.count++;
 	packet->packet_id = ps_globals.count;
 	packet->length = length;
 	packet_init(packet, addr_len, max_prefix, max_content, max_suffix);
 	packet->magic_value = PACKET_MAGIC_VALUE;
-	if(ERROR_OCCURRED(pm_add(packet))){
+	if (ERROR_OCCURRED(pm_add(packet))) {
 		munmap(packet, packet->length);
 		return NULL;
 	}
+	
 	return packet;
 }
@@ -163,19 +191,18 @@
  * Lock the global data during its processing.
  *
- * @param[in] addr_len    The source and destination addresses
- *                        maximal length in bytes.
- * @param[in] max_prefix  The maximal prefix length in bytes.
+ * @param[in] addr_len	The source and destination addresses maximal length in
+ *			bytes.
+ * @param[in] max_prefix The maximal prefix length in bytes.
  * @param[in] max_content The maximal content length in bytes.
- * @param[in] max_suffix  The maximal suffix length in bytes.
- *
- * @return The packet of dimensions at least as given.
- * @return NULL if there is not enough memory left.
- *
- */
-static packet_t packet_get_local(size_t addr_len, size_t max_prefix,
-    size_t max_content, size_t max_suffix)
-{
-	size_t length = ALIGN_UP(sizeof(struct packet) + 2 * addr_len + max_prefix
-	    + max_content + max_suffix, PAGE_SIZE);
+ * @param[in] max_suffix The maximal suffix length in bytes.
+ * @return		The packet of dimensions at least as given.
+ * @return		NULL if there is not enough memory left.
+ */
+static packet_t
+packet_get_local(size_t addr_len, size_t max_prefix, size_t max_content,
+    size_t max_suffix)
+{
+	size_t length = ALIGN_UP(sizeof(struct packet) + 2 * addr_len +
+	    max_prefix + max_content + max_suffix, PAGE_SIZE);
 	
 	fibril_mutex_lock(&ps_globals.lock);
@@ -184,23 +211,24 @@
 	unsigned int index;
 	
-	for (index = 0; index < FREE_QUEUES_COUNT - 1; index++) {
-		if (length <= ps_globals.sizes[index]) {
-			packet = ps_globals.free[index];
+	for (index = 0; index < FREE_QUEUES_COUNT; index++) {
+		if ((length > ps_globals.sizes[index]) &&
+		    (index < FREE_QUEUES_COUNT - 1))
+			continue;
+		
+		packet = ps_globals.free[index];
+		while (packet_is_valid(packet) && (packet->length < length))
+			packet = pm_find(packet->next);
+		
+		if (packet_is_valid(packet)) {
+			if (packet == ps_globals.free[index])
+				ps_globals.free[index] = pq_detach(packet);
+			else
+				pq_detach(packet);
 			
-			while (packet_is_valid(packet) && (packet->length < length))
-				packet = pm_find(packet->next);
+			packet_init(packet, addr_len, max_prefix, max_content,
+			    max_suffix);
+			fibril_mutex_unlock(&ps_globals.lock);
 			
-			if (packet_is_valid(packet)) {
-				if (packet == ps_globals.free[index])
-					ps_globals.free[index] = pq_detach(packet);
-				else
-					pq_detach(packet);
-				
-				packet_init(packet, addr_len, max_prefix, max_content,
-				    max_suffix);
-				fibril_mutex_unlock(&ps_globals.lock);
-				
-				return packet;
-			}
+			return packet;
 		}
 	}
@@ -228,35 +256,42 @@
 /** Release the packet and returns it to the appropriate free packet queue.
  *
- *  Should be used only when the global data are locked.
- *
- *  @param[in] packet The packet to be released.
- *
- */
-static void packet_release(packet_t packet){
+ * Should be used only when the global data are locked.
+ *
+ * @param[in] packet	The packet to be released.
+ *
+ */
+static void packet_release(packet_t packet)
+{
 	int index;
 	int result;
 
-	// remove debug dump
-//	printf("packet %d released\n", packet->packet_id);
-	for(index = 0; (index < FREE_QUEUES_COUNT - 1) && (packet->length > ps_globals.sizes[index]); ++ index);
-	result = pq_add(&ps_globals.free[index], packet, packet->length, packet->length);
+	for (index = 0; (index < FREE_QUEUES_COUNT - 1) &&
+	    (packet->length > ps_globals.sizes[index]); index++) {
+		;
+	}
+	
+	result = pq_add(&ps_globals.free[index], packet, packet->length,
+	    packet->length);
 	assert(result == EOK);
 }
 
 /** Releases the packet queue.
- *  @param[in] packet_id The first packet identifier.
- *  @returns EOK on success.
- *  @returns ENOENT if there is no such packet.
- */
-static int packet_release_wrapper(packet_id_t packet_id){
+ *
+ * @param[in] packet_id	The first packet identifier.
+ * @returns		EOK on success.
+ * @returns		ENOENT if there is no such packet.
+ */
+static int packet_release_wrapper(packet_id_t packet_id)
+{
 	packet_t packet;
 
 	packet = pm_find(packet_id);
-	if(! packet_is_valid(packet)){
+	if (!packet_is_valid(packet))
 		return ENOENT;
-	}
+
 	fibril_mutex_lock(&ps_globals.lock);
 	pq_destroy(packet, packet_release);
 	fibril_mutex_unlock(&ps_globals.lock);
+
 	return EOK;
 }
@@ -268,67 +303,102 @@
 
 /** Shares the packet memory block.
- *  @param[in] packet The packet to be shared.
- *  @returns EOK on success.
- *  @returns EINVAL if the packet is not valid.
- *  @returns EINVAL if the calling module does not accept the memory.
- *  @returns ENOMEM if the desired and actual sizes differ.
- *  @returns Other error codes as defined for the async_share_in_finalize() function.
- */
-static int packet_reply(const packet_t packet){
+ * @param[in] packet	The packet to be shared.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet is not valid.
+ * @returns		EINVAL if the calling module does not accept the memory.
+ * @returns		ENOMEM if the desired and actual sizes differ.
+ * @returns		Other error codes as defined for the
+ *			async_share_in_finalize() function.
+ */
+static int packet_reply(const packet_t packet)
+{
 	ipc_callid_t callid;
 	size_t size;
 
-	if(! packet_is_valid(packet)){
+	if (!packet_is_valid(packet))
 		return EINVAL;
-	}
-	if(async_share_in_receive(&callid, &size) <= 0) return EINVAL;
-	if(size != packet->length){
+
+	if (!async_share_in_receive(&callid, &size)) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+
+	if (size != packet->length) {
+		ipc_answer_0(callid, ENOMEM);
 		return ENOMEM;
 	}
-	return async_share_in_finalize(callid, packet, PROTO_READ | PROTO_WRITE);
-}
-
-int packet_server_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+	
+	return async_share_in_finalize(callid, packet,
+	    PROTO_READ | PROTO_WRITE);
+}
+
+/** Processes the packet server message.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		ENOENT if there is no such packet as in the packet
+ *			message parameter.
+ * @returns		ENOTSUP if the message is not known.
+ * @returns		Other error codes as defined for the
+ *			packet_release_wrapper() function.
+ */
+int
+packet_server_message(ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer,
+    int *answer_count)
+{
 	packet_t packet;
 
 	*answer_count = 0;
-	switch(IPC_GET_METHOD(*call)){
-		case IPC_M_PHONE_HUNGUP:
-			return EOK;
-		case NET_PACKET_CREATE_1:
-			packet = packet_get_local(DEFAULT_ADDR_LEN, DEFAULT_PREFIX, IPC_GET_CONTENT(call), DEFAULT_SUFFIX);
-			if(! packet){
-				return ENOMEM;
-			}
-			*answer_count = 2;
-			IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
-			IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
-			return EOK;
-		case NET_PACKET_CREATE_4:
-			packet = packet_get_local(((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN(call)) ? IPC_GET_ADDR_LEN(call) : DEFAULT_ADDR_LEN), DEFAULT_PREFIX + IPC_GET_PREFIX(call), IPC_GET_CONTENT(call), DEFAULT_SUFFIX + IPC_GET_SUFFIX(call));
-			if(! packet){
-				return ENOMEM;
-			}
-			*answer_count = 2;
-			IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
-			IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
-			return EOK;
-		case NET_PACKET_GET:
-			packet = pm_find(IPC_GET_ID(call));
-			if(! packet_is_valid(packet)){
-				return ENOENT;
-			}
-			return packet_reply(packet);
-		case NET_PACKET_GET_SIZE:
-			packet = pm_find(IPC_GET_ID(call));
-			if(! packet_is_valid(packet)){
-				return ENOENT;
-			}
-			IPC_SET_ARG1(*answer, (ipcarg_t) packet->length);
-			*answer_count = 1;
-			return EOK;
-		case NET_PACKET_RELEASE:
-			return packet_release_wrapper(IPC_GET_ID(call));
-	}
+	switch (IPC_GET_METHOD(*call)) {
+	case IPC_M_PHONE_HUNGUP:
+		return EOK;
+	
+	case NET_PACKET_CREATE_1:
+		packet = packet_get_local(DEFAULT_ADDR_LEN, DEFAULT_PREFIX,
+		    IPC_GET_CONTENT(call), DEFAULT_SUFFIX);
+		if (!packet)
+			return ENOMEM;
+		*answer_count = 2;
+		IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
+		IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
+		return EOK;
+	
+	case NET_PACKET_CREATE_4:
+		packet = packet_get_local(
+		    ((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN(call)) ?
+		    IPC_GET_ADDR_LEN(call) : DEFAULT_ADDR_LEN),
+		    DEFAULT_PREFIX + IPC_GET_PREFIX(call),
+		    IPC_GET_CONTENT(call),
+		    DEFAULT_SUFFIX + IPC_GET_SUFFIX(call));
+		if (!packet)
+			return ENOMEM;
+		*answer_count = 2;
+		IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
+		IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
+		return EOK;
+	
+	case NET_PACKET_GET:
+		packet = pm_find(IPC_GET_ID(call));
+		if (!packet_is_valid(packet))
+			return ENOENT;
+		return packet_reply(packet);
+	
+	case NET_PACKET_GET_SIZE:
+		packet = pm_find(IPC_GET_ID(call));
+		if (!packet_is_valid(packet))
+			return ENOENT;
+		IPC_SET_ARG1(*answer, (ipcarg_t) packet->length);
+		*answer_count = 1;
+		return EOK;
+	
+	case NET_PACKET_RELEASE:
+		return packet_release_wrapper(IPC_GET_ID(call));
+	}
+	
 	return ENOTSUP;
 }
Index: pace/lib/packet/include/netdb.h
===================================================================
--- uspace/lib/packet/include/netdb.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,109 +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 netdb
- *  @{
- */
-
-/** @file
- *  Structures and interfaces according to the BSD netdb.h file.
- */
-
-#ifndef __NET_NETDB_H__
-#define __NET_NETDB_H__
-
-#include <sys/types.h>
-
-/** Structure returned by network data base library.
- *  All addresses are supplied in host order, and returned in network order (suitable for use in system calls).
- */
-struct	hostent {
-	/** Official host name.
-	 */
-	char * h_name;
-	/** Alias list.
-	 */
-	char **	h_aliases;
-	/** Host address type.
-	 */
-	int h_addrtype;
-	/** Address length.
-	 */
-	int h_length;
-	/** List of addresses from name server.
-	 */
-	char **	h_addr_list;
-	/** Address, for backward compatiblity.
-	 */
-#define	h_addr	h_addr_list[0]
-};
-
-/** @name Host entry address types definitions.
- */
-/*@{*/
-
-/** Authoritative Answer Host not found address type.
- */
-#define	HOST_NOT_FOUND	1
-
-/** Non-Authoritive Host not found, or SERVERFAIL address type.
- */
-#define	TRY_AGAIN	2
-
-/** Non recoverable errors, FORMERR, REFUSED, NOTIMP address type.
- */
-#define	NO_RECOVERY	3
-
-/** Valid name, no data record of requested type address type.
- */
-#define	NO_DATA		4
-
-/** No address, look for MX record address type.
- */
-#define	NO_ADDRESS	NO_DATA
-
-/*@}*/
-
-/** Returns host entry by the host address.
- *  @param[in] address The host address.
- *  @param[in] len The address length.
- *  @param[in] type The address type.
- *  @returns Host entry information.
- */
-//struct hostent *	gethostbyaddr(const void * address, int len, int type);
-
-/** Returns host entry by the host name.
- *  @param[in] name The host name.
- *  @returns Host entry information.
- */
-//struct hostent *	gethostbyname(const char * name);
-
-#endif
-
-/** @}
- */
Index: uspace/lib/packet/include/packet_local.h
===================================================================
--- uspace/lib/packet/include/packet_local.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/packet/include/packet_local.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,6 +27,6 @@
  */
 
-/** @addtogroup packet
- *  @{
+/** @addtogroup libpacket
+ * @{
  */
 
@@ -34,6 +34,6 @@
  */
 
-#ifndef __NET_PACKET_LOCAL_H__
-#define __NET_PACKET_LOCAL_H__
+#ifndef LIBPACKET_PACKET_LOCAL_H_
+#define LIBPACKET_PACKET_LOCAL_H_
 
 #include <net/packet.h>
Index: uspace/lib/packet/include/packet_server.h
===================================================================
--- uspace/lib/packet/include/packet_server.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/lib/packet/include/packet_server.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -27,34 +27,26 @@
  */
 
-/** @addtogroup packet
- *  @{
+/** @addtogroup libpacket
+ * @{
  */
 
 /** @file
- *  Packet server.
- *  The hosting module has to be compiled with both the packet.c and the packet_server.c source files.
- *  To function correctly, initialization of the packet map by the pm_init() function has to happen at the first place.
- *  Then the packet messages have to be processed by the packet_server_message() function.
- *  The packet map should be released by the pm_destroy() function during the module termination.
- *  @see IS_NET_PACKET_MESSAGE()
+ * Packet server.
+ * The hosting module has to be compiled with both the packet.c and the
+ * packet_server.c source files. To function correctly, initialization of the
+ * packet map by the pm_init() function has to happen at the first place. Then
+ * the packet messages have to be processed by the packet_server_message()
+ * function. The packet map should be released by the pm_destroy() function
+ * during the module termination.
+ * @see IS_NET_PACKET_MESSAGE()
  */
 
-#ifndef __NET_PACKET_SERVER_H__
-#define __NET_PACKET_SERVER_H__
+#ifndef LIBPACKET_PACKET_SERVER_H_
+#define LIBPACKET_PACKET_SERVER_H_
 
 #include <ipc/ipc.h>
 
-/** Processes the packet server message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns ENOENT if there is no such packet as in the packet message parameter..
- *  @returns ENOTSUP if the message is not known.
- *  @returns Other error codes as defined for the packet_release_wrapper() function.
- */
-extern int packet_server_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
+extern int packet_server_message(ipc_callid_t, ipc_call_t *, ipc_call_t *,
+    int *);
 
 #endif
Index: pace/lib/packet/include/tcp_codes.h
===================================================================
--- uspace/lib/packet/include/tcp_codes.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,88 +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 tcp
- *  @{
- */
-
-/** @file
- *  TCP options definitions.
- */
-
-#ifndef __NET_TCP_CODES_H__
-#define __NET_TCP_CODES_H__
-
-/** End of list TCP option.
- */
-#define TCPOPT_END_OF_LIST				0x0
-
-/** No operation TCP option.
- */
-#define TCPOPT_NO_OPERATION				0x1
-
-/** Maximum segment size TCP option.
- */
-#define TCPOPT_MAX_SEGMENT_SIZE			0x2
-
-/** Maximum segment size TCP option length.
- */
-#define TCPOPT_MAX_SEGMENT_SIZE_LENGTH	4
-
-/** Window scale TCP option.
- */
-#define TCPOPT_WINDOW_SCALE				0x3
-
-/** Window scale TCP option length.
- */
-#define TCPOPT_WINDOW_SCALE_LENGTH		3
-
-/** Selective acknowledgement permitted TCP option.
- */
-#define TCPOPT_SACK_PERMITTED			0x4
-
-/** Selective acknowledgement permitted TCP option length.
- */
-#define TCPOPT_SACK_PERMITTED_LENGTH	2
-
-/** Selective acknowledgement TCP option.
- *  Has variable length.
- */
-#define TCPOPT_SACK						0x5
-
-/** Timestamp TCP option.
- */
-#define TCPOPT_TIMESTAMP				0x8
-
-/** Timestamp TCP option length.
- */
-#define TCPOPT_TIMESTAMP_LENGTH			10
-
-#endif
-
-/** @}
- */
Index: pace/lib/pci/COPYING
===================================================================
--- uspace/lib/pci/COPYING	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,345 +1,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
Index: pace/lib/pci/Makefile
===================================================================
--- uspace/lib/pci/Makefile	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 Jakub Jermar
-# 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.
-#
-
-USPACE_PREFIX = ../..
-LIBRARY = libpci
-
-SOURCES = \
-	access.c \
-	generic.c \
-	names.c \
-	i386-ports.c
-
-include $(USPACE_PREFIX)/Makefile.common
Index: pace/lib/pci/VERSION
===================================================================
--- uspace/lib/pci/VERSION	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,2 +1,0 @@
-This libpci has been ported from pciutils-2.2.3
-on May 8, 2006 by Jakub Jermar.
Index: pace/lib/pci/access.c
===================================================================
--- uspace/lib/pci/access.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,270 +1,0 @@
-/*
- *	The PCI Library -- User Access
- *
- *	Copyright (c) 1997--2003 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <str.h>
-
-#include "internal.h"
-
-static struct pci_methods *pci_methods[PCI_ACCESS_MAX] = {
-	&pm_intel_conf1,
-	&pm_intel_conf2,
-};
-
-struct pci_access *pci_alloc(void)
-{
-	struct pci_access *a = malloc(sizeof(struct pci_access));
-	int i;
-
-	if (!a)
-		return NULL;
-		
-	bzero(a, sizeof(*a));
-	for (i = 0; i < PCI_ACCESS_MAX; i++)
-		if (pci_methods[i] && pci_methods[i]->config)
-			pci_methods[i]->config(a);
-	return a;
-}
-
-void *pci_malloc(struct pci_access *a, int size)
-{
-	void *x = malloc(size);
-
-	if (!x)
-		a->error("Out of memory (allocation of %d bytes failed)", size);
-	return x;
-}
-
-void pci_mfree(void *x)
-{
-	if (x)
-		free(x);
-}
-
-static void pci_generic_error(const char *msg, ...)
-{
-	va_list args;
-
-	va_start(args, msg);
-	puts("pcilib: ");
-	vprintf(msg, args);
-	putchar('\n');
-	exit(1);
-}
-
-static void pci_generic_warn(const char *msg, ...)
-{
-	va_list args;
-
-	va_start(args, msg);
-	puts("pcilib: ");
-	vprintf(msg, args);
-	putchar('\n');
-}
-
-static void pci_generic_debug(const char *msg, ...)
-{
-	va_list args;
-
-	va_start(args, msg);
-	vprintf(msg, args);
-	va_end(args);
-}
-
-static void pci_null_debug(const char *msg UNUSED, ...)
-{
-}
-
-void pci_init(struct pci_access *a)
-{
-	if (!a->error)
-		a->error = pci_generic_error;
-	if (!a->warning)
-		a->warning = pci_generic_warn;
-	if (!a->debug)
-		a->debug = pci_generic_debug;
-	if (!a->debugging)
-		a->debug = pci_null_debug;
-
-	if (a->method) {
-		if (a->method >= PCI_ACCESS_MAX || !pci_methods[a->method])
-			a->error("This access method is not supported.");
-		a->methods = pci_methods[a->method];
-	} else {
-		unsigned int i;
-		for (i = 0; i < PCI_ACCESS_MAX; i++)
-			if (pci_methods[i]) {
-				a->debug("Trying method %d...", i);
-				if (pci_methods[i]->detect(a)) {
-					a->debug("...OK\n");
-					a->methods = pci_methods[i];
-					a->method = i;
-					break;
-				}
-				a->debug("...No.\n");
-			}
-		if (!a->methods)
-			a->error("Cannot find any working access method.");
-	}
-	a->debug("Decided to use %s\n", a->methods->name);
-	a->methods->init(a);
-}
-
-void pci_cleanup(struct pci_access *a)
-{
-	struct pci_dev *d, *e;
-
-	for (d = a->devices; d; d = e) {
-		e = d->next;
-		pci_free_dev(d);
-	}
-	if (a->methods)
-		a->methods->cleanup(a);
-	pci_free_name_list(a);
-	pci_mfree(a);
-}
-
-void pci_scan_bus(struct pci_access *a)
-{
-	a->methods->scan(a);
-}
-
-struct pci_dev *pci_alloc_dev(struct pci_access *a)
-{
-	struct pci_dev *d = pci_malloc(a, sizeof(struct pci_dev));
-
-	bzero(d, sizeof(*d));
-	d->access = a;
-	d->methods = a->methods;
-	d->hdrtype = -1;
-	if (d->methods->init_dev)
-		d->methods->init_dev(d);
-	return d;
-}
-
-int pci_link_dev(struct pci_access *a, struct pci_dev *d)
-{
-	d->next = a->devices;
-	a->devices = d;
-
-	return 1;
-}
-
-struct pci_dev *pci_get_dev(struct pci_access *a, int domain, int bus,
-			    int dev, int func)
-{
-	struct pci_dev *d = pci_alloc_dev(a);
-
-	d->domain = domain;
-	d->bus = bus;
-	d->dev = dev;
-	d->func = func;
-	return d;
-}
-
-void pci_free_dev(struct pci_dev *d)
-{
-	if (d->methods->cleanup_dev)
-		d->methods->cleanup_dev(d);
-	pci_mfree(d);
-}
-
-static inline void
-pci_read_data(struct pci_dev *d, void *buf, int pos, int len)
-{
-	if (pos & (len - 1))
-		d->access->error("Unaligned read: pos=%02x, len=%d", pos,
-				 len);
-	if (pos + len <= d->cache_len)
-		memcpy(buf, d->cache + pos, len);
-	else if (!d->methods->read(d, pos, buf, len))
-		memset(buf, 0xff, len);
-}
-
-byte pci_read_byte(struct pci_dev *d, int pos)
-{
-	byte buf;
-	pci_read_data(d, &buf, pos, 1);
-	return buf;
-}
-
-word pci_read_word(struct pci_dev * d, int pos)
-{
-	word buf;
-	pci_read_data(d, &buf, pos, 2);
-	return le16_to_cpu(buf);
-}
-
-u32 pci_read_long(struct pci_dev * d, int pos)
-{
-	u32 buf;
-	pci_read_data(d, &buf, pos, 4);
-	return le32_to_cpu(buf);
-}
-
-int pci_read_block(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	return d->methods->read(d, pos, buf, len);
-}
-
-static inline int
-pci_write_data(struct pci_dev *d, void *buf, int pos, int len)
-{
-	if (pos & (len - 1))
-		d->access->error("Unaligned write: pos=%02x,len=%d", pos, len);
-	if (pos + len <= d->cache_len)
-		memcpy(d->cache + pos, buf, len);
-	return d->methods->write(d, pos, buf, len);
-}
-
-int pci_write_byte(struct pci_dev *d, int pos, byte data)
-{
-	return pci_write_data(d, &data, pos, 1);
-}
-
-int pci_write_word(struct pci_dev *d, int pos, word data)
-{
-	word buf = cpu_to_le16(data);
-	return pci_write_data(d, &buf, pos, 2);
-}
-
-int pci_write_long(struct pci_dev *d, int pos, u32 data)
-{
-	u32 buf = cpu_to_le32(data);
-	return pci_write_data(d, &buf, pos, 4);
-}
-
-int pci_write_block(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	if (pos < d->cache_len) {
-		int l = (pos + len >= d->cache_len) ? (d->cache_len - pos) : len;
-		memcpy(d->cache + pos, buf, l);
-	}
-	return d->methods->write(d, pos, buf, len);
-}
-
-int pci_fill_info(struct pci_dev *d, int flags)
-{
-	if (flags & PCI_FILL_RESCAN) {
-		flags &= ~PCI_FILL_RESCAN;
-		d->known_fields = 0;
-	}
-	if (flags & ~d->known_fields)
-		d->known_fields |= d->methods->fill_info(d, flags & ~d->known_fields);
-	return d->known_fields;
-}
-
-void pci_setup_cache(struct pci_dev *d, byte * cache, int len)
-{
-	d->cache = cache;
-	d->cache_len = len;
-}
Index: pace/lib/pci/generic.c
===================================================================
--- uspace/lib/pci/generic.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,206 +1,0 @@
-/*
- *	The PCI Library -- Generic Direct Access Functions
- *
- *	Copyright (c) 1997--2000 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <str.h>
-
-#include "internal.h"
-
-void pci_generic_scan_bus(struct pci_access *a, byte * busmap, int bus)
-{
-	int dev, multi, ht;
-	struct pci_dev *t;
-
-	a->debug("Scanning bus %02x for devices...\n", bus);
-	if (busmap[bus]) {
-		a->warning("Bus %02x seen twice (firmware bug). Ignored.",
-			   bus);
-		return;
-	}
-	busmap[bus] = 1;
-	t = pci_alloc_dev(a);
-	t->bus = bus;
-	for (dev = 0; dev < 32; dev++) {
-		t->dev = dev;
-		multi = 0;
-		for (t->func = 0; !t->func || (multi && t->func < 8);
-		     t->func++) {
-			u32 vd = pci_read_long(t, PCI_VENDOR_ID);
-			struct pci_dev *d;
-
-			if (!vd || vd == 0xffffffff)
-				continue;
-			ht = pci_read_byte(t, PCI_HEADER_TYPE);
-			if (!t->func)
-				multi = ht & 0x80;
-			ht &= 0x7f;
-			d = pci_alloc_dev(a);
-			d->bus = t->bus;
-			d->dev = t->dev;
-			d->func = t->func;
-			d->vendor_id = vd & 0xffff;
-			d->device_id = vd >> 16U;
-			d->known_fields = PCI_FILL_IDENT;
-			d->hdrtype = ht;
-			pci_link_dev(a, d);
-			switch (ht) {
-			case PCI_HEADER_TYPE_NORMAL:
-				break;
-			case PCI_HEADER_TYPE_BRIDGE:
-			case PCI_HEADER_TYPE_CARDBUS:
-				pci_generic_scan_bus(a, busmap,
-						     pci_read_byte(t,
-								   PCI_SECONDARY_BUS));
-				break;
-			default:
-				a->debug
-				    ("Device %04x:%02x:%02x.%d has unknown header type %02x.\n",
-				     d->domain, d->bus, d->dev, d->func,
-				     ht);
-			}
-		}
-	}
-	pci_free_dev(t);
-}
-
-void pci_generic_scan(struct pci_access *a)
-{
-	byte busmap[256];
-
-	bzero(busmap, sizeof(busmap));
-	pci_generic_scan_bus(a, busmap, 0);
-}
-
-int pci_generic_fill_info(struct pci_dev *d, int flags)
-{
-	struct pci_access *a = d->access;
-
-	if ((flags & (PCI_FILL_BASES | PCI_FILL_ROM_BASE))
-	    && d->hdrtype < 0)
-		d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE) & 0x7f;
-	if (flags & PCI_FILL_IDENT) {
-		d->vendor_id = pci_read_word(d, PCI_VENDOR_ID);
-		d->device_id = pci_read_word(d, PCI_DEVICE_ID);
-	}
-	if (flags & PCI_FILL_IRQ)
-		d->irq = pci_read_byte(d, PCI_INTERRUPT_LINE);
-	if (flags & PCI_FILL_BASES) {
-		int cnt = 0, i;
-		bzero(d->base_addr, sizeof(d->base_addr));
-		switch (d->hdrtype) {
-		case PCI_HEADER_TYPE_NORMAL:
-			cnt = 6;
-			break;
-		case PCI_HEADER_TYPE_BRIDGE:
-			cnt = 2;
-			break;
-		case PCI_HEADER_TYPE_CARDBUS:
-			cnt = 1;
-			break;
-		}
-		if (cnt) {
-			for (i = 0; i < cnt; i++) {
-				u32 x = pci_read_long(d, PCI_BASE_ADDRESS_0 + i * 4);
-				if (!x || x == (u32) ~ 0)
-					continue;
-				if ((x & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO)
-					d->base_addr[i] = x;
-				else {
-					if ((x & PCI_BASE_ADDRESS_MEM_TYPE_MASK) != PCI_BASE_ADDRESS_MEM_TYPE_64)
-						d->base_addr[i] = x;
-					else if (i >= cnt - 1)
-						a->warning("%04x:%02x:%02x.%d: Invalid 64-bit address seen for BAR %d.",
-						     d->domain, d->bus,
-						     d->dev, d->func, i);
-					else {
-						u32 y = pci_read_long(d, PCI_BASE_ADDRESS_0 + (++i) * 4);
-#ifdef PCI_HAVE_64BIT_ADDRESS
-						d->base_addr[i - 1] = x | (((pciaddr_t) y) << 32);
-#else
-						if (y)
-							a->warning("%04x:%02x:%02x.%d 64-bit device address ignored.",
-							     d->domain,
-							     d->bus,
-							     d->dev,
-							     d->func);
-						else
-							d->base_addr[i - 1] = x;
-#endif
-					}
-				}
-			}
-		}
-	}
-	if (flags & PCI_FILL_ROM_BASE) {
-		int reg = 0;
-		d->rom_base_addr = 0;
-		switch (d->hdrtype) {
-		case PCI_HEADER_TYPE_NORMAL:
-			reg = PCI_ROM_ADDRESS;
-			break;
-		case PCI_HEADER_TYPE_BRIDGE:
-			reg = PCI_ROM_ADDRESS1;
-			break;
-		}
-		if (reg) {
-			u32 u = pci_read_long(d, reg);
-			if (u != 0xffffffff)
-				d->rom_base_addr = u;
-		}
-	}
-	return flags & ~PCI_FILL_SIZES;
-}
-
-static int
-pci_generic_block_op(struct pci_dev *d, int pos, byte * buf, int len,
-		     int (*r) (struct pci_dev * d, int pos, byte * buf,
-			       int len))
-{
-	if ((pos & 1) && len >= 1) {
-		if (!r(d, pos, buf, 1))
-			return 0;
-		pos++;
-		buf++;
-		len--;
-	}
-	if ((pos & 3) && len >= 2) {
-		if (!r(d, pos, buf, 2))
-			return 0;
-		pos += 2;
-		buf += 2;
-		len -= 2;
-	}
-	while (len >= 4) {
-		if (!r(d, pos, buf, 4))
-			return 0;
-		pos += 4;
-		buf += 4;
-		len -= 4;
-	}
-	if (len >= 2) {
-		if (!r(d, pos, buf, 2))
-			return 0;
-		pos += 2;
-		buf += 2;
-		len -= 2;
-	}
-	if (len && !r(d, pos, buf, 1))
-		return 0;
-	return 1;
-}
-
-int pci_generic_block_read(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	return pci_generic_block_op(d, pos, buf, len, d->access->methods->read);
-}
-
-int pci_generic_block_write(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	return pci_generic_block_op(d, pos, buf, len, d->access->methods->write);
-}
Index: pace/lib/pci/header.h
===================================================================
--- uspace/lib/pci/header.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,937 +1,0 @@
-/*
- *	The PCI Library -- PCI Header Structure (based on <linux/pci.h>)
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-/*
- * Under PCI, each device has 256 bytes of configuration address space,
- * of which the first 64 bytes are standardized as follows:
- */
-#define PCI_VENDOR_ID		0x00	/* 16 bits */
-#define PCI_DEVICE_ID		0x02	/* 16 bits */
-#define PCI_COMMAND		0x04	/* 16 bits */
-#define  PCI_COMMAND_IO		0x1	/* Enable response in I/O space */
-#define  PCI_COMMAND_MEMORY	0x2	/* Enable response in Memory space */
-#define  PCI_COMMAND_MASTER	0x4	/* Enable bus mastering */
-#define  PCI_COMMAND_SPECIAL	0x8	/* Enable response to special cycles */
-#define  PCI_COMMAND_INVALIDATE	0x10	/* Use memory write and invalidate */
-#define  PCI_COMMAND_VGA_PALETTE 0x20	/* Enable palette snooping */
-#define  PCI_COMMAND_PARITY	0x40	/* Enable parity checking */
-#define  PCI_COMMAND_WAIT 	0x80	/* Enable address/data stepping */
-#define  PCI_COMMAND_SERR	0x100	/* Enable SERR */
-#define  PCI_COMMAND_FAST_BACK	0x200	/* Enable back-to-back writes */
-
-#define PCI_STATUS		0x06	/* 16 bits */
-#define  PCI_STATUS_CAP_LIST	0x10	/* Support Capability List */
-#define  PCI_STATUS_66MHZ	0x20	/* Support 66 Mhz PCI 2.1 bus */
-#define  PCI_STATUS_UDF		0x40	/* Support User Definable Features [obsolete] */
-#define  PCI_STATUS_FAST_BACK	0x80	/* Accept fast-back to back */
-#define  PCI_STATUS_PARITY	0x100	/* Detected parity error */
-#define  PCI_STATUS_DEVSEL_MASK	0x600	/* DEVSEL timing */
-#define  PCI_STATUS_DEVSEL_FAST	0x000
-#define  PCI_STATUS_DEVSEL_MEDIUM 0x200
-#define  PCI_STATUS_DEVSEL_SLOW 0x400
-#define  PCI_STATUS_SIG_TARGET_ABORT 0x800	/* Set on target abort */
-#define  PCI_STATUS_REC_TARGET_ABORT 0x1000	/* Master ack of " */
-#define  PCI_STATUS_REC_MASTER_ABORT 0x2000	/* Set on master abort */
-#define  PCI_STATUS_SIG_SYSTEM_ERROR 0x4000	/* Set when we drive SERR */
-#define  PCI_STATUS_DETECTED_PARITY 0x8000	/* Set on parity error */
-
-#define PCI_CLASS_REVISION	0x08	/* High 24 bits are class, low 8
-					   revision */
-#define PCI_REVISION_ID         0x08	/* Revision ID */
-#define PCI_CLASS_PROG          0x09	/* Reg. Level Programming Interface */
-#define PCI_CLASS_DEVICE        0x0a	/* Device class */
-
-#define PCI_CACHE_LINE_SIZE	0x0c	/* 8 bits */
-#define PCI_LATENCY_TIMER	0x0d	/* 8 bits */
-#define PCI_HEADER_TYPE		0x0e	/* 8 bits */
-#define  PCI_HEADER_TYPE_NORMAL	0
-#define  PCI_HEADER_TYPE_BRIDGE 1
-#define  PCI_HEADER_TYPE_CARDBUS 2
-
-#define PCI_BIST		0x0f	/* 8 bits */
-#define PCI_BIST_CODE_MASK	0x0f	/* Return result */
-#define PCI_BIST_START		0x40	/* 1 to start BIST, 2 secs or less */
-#define PCI_BIST_CAPABLE	0x80	/* 1 if BIST capable */
-
-/*
- * Base addresses specify locations in memory or I/O space.
- * Decoded size can be determined by writing a value of 
- * 0xffffffff to the register, and reading it back.  Only 
- * 1 bits are decoded.
- */
-#define PCI_BASE_ADDRESS_0	0x10	/* 32 bits */
-#define PCI_BASE_ADDRESS_1	0x14	/* 32 bits [htype 0,1 only] */
-#define PCI_BASE_ADDRESS_2	0x18	/* 32 bits [htype 0 only] */
-#define PCI_BASE_ADDRESS_3	0x1c	/* 32 bits */
-#define PCI_BASE_ADDRESS_4	0x20	/* 32 bits */
-#define PCI_BASE_ADDRESS_5	0x24	/* 32 bits */
-#define  PCI_BASE_ADDRESS_SPACE	0x01	/* 0 = memory, 1 = I/O */
-#define  PCI_BASE_ADDRESS_SPACE_IO 0x01
-#define  PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
-#define  PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
-#define  PCI_BASE_ADDRESS_MEM_TYPE_32	0x00	/* 32 bit address */
-#define  PCI_BASE_ADDRESS_MEM_TYPE_1M	0x02	/* Below 1M [obsolete] */
-#define  PCI_BASE_ADDRESS_MEM_TYPE_64	0x04	/* 64 bit address */
-#define  PCI_BASE_ADDRESS_MEM_PREFETCH	0x08	/* prefetchable? */
-#define  PCI_BASE_ADDRESS_MEM_MASK	(~(pciaddr_t)0x0f)
-#define  PCI_BASE_ADDRESS_IO_MASK	(~(pciaddr_t)0x03)
-/* bit 1 is reserved if address_space = 1 */
-
-/* Header type 0 (normal devices) */
-#define PCI_CARDBUS_CIS		0x28
-#define PCI_SUBSYSTEM_VENDOR_ID	0x2c
-#define PCI_SUBSYSTEM_ID	0x2e
-#define PCI_ROM_ADDRESS		0x30	/* Bits 31..11 are address, 10..1 reserved */
-#define  PCI_ROM_ADDRESS_ENABLE	0x01
-#define PCI_ROM_ADDRESS_MASK	(~(pciaddr_t)0x7ff)
-
-#define PCI_CAPABILITY_LIST	0x34	/* Offset of first capability list entry */
-
-/* 0x35-0x3b are reserved */
-#define PCI_INTERRUPT_LINE	0x3c	/* 8 bits */
-#define PCI_INTERRUPT_PIN	0x3d	/* 8 bits */
-#define PCI_MIN_GNT		0x3e	/* 8 bits */
-#define PCI_MAX_LAT		0x3f	/* 8 bits */
-
-/* Header type 1 (PCI-to-PCI bridges) */
-#define PCI_PRIMARY_BUS		0x18	/* Primary bus number */
-#define PCI_SECONDARY_BUS	0x19	/* Secondary bus number */
-#define PCI_SUBORDINATE_BUS	0x1a	/* Highest bus number behind the bridge */
-#define PCI_SEC_LATENCY_TIMER	0x1b	/* Latency timer for secondary interface */
-#define PCI_IO_BASE		0x1c	/* I/O range behind the bridge */
-#define PCI_IO_LIMIT		0x1d
-#define  PCI_IO_RANGE_TYPE_MASK	0x0f	/* I/O bridging type */
-#define  PCI_IO_RANGE_TYPE_16	0x00
-#define  PCI_IO_RANGE_TYPE_32	0x01
-#define  PCI_IO_RANGE_MASK	~0x0f
-#define PCI_SEC_STATUS		0x1e	/* Secondary status register */
-#define PCI_MEMORY_BASE		0x20	/* Memory range behind */
-#define PCI_MEMORY_LIMIT	0x22
-#define  PCI_MEMORY_RANGE_TYPE_MASK 0x0f
-#define  PCI_MEMORY_RANGE_MASK	~0x0f
-#define PCI_PREF_MEMORY_BASE	0x24	/* Prefetchable memory range behind */
-#define PCI_PREF_MEMORY_LIMIT	0x26
-#define  PCI_PREF_RANGE_TYPE_MASK 0x0f
-#define  PCI_PREF_RANGE_TYPE_32	0x00
-#define  PCI_PREF_RANGE_TYPE_64	0x01
-#define  PCI_PREF_RANGE_MASK	~0x0f
-#define PCI_PREF_BASE_UPPER32	0x28	/* Upper half of prefetchable memory range */
-#define PCI_PREF_LIMIT_UPPER32	0x2c
-#define PCI_IO_BASE_UPPER16	0x30	/* Upper half of I/O addresses */
-#define PCI_IO_LIMIT_UPPER16	0x32
-/* 0x34 same as for htype 0 */
-/* 0x35-0x3b is reserved */
-#define PCI_ROM_ADDRESS1	0x38	/* Same as PCI_ROM_ADDRESS, but for htype 1 */
-/* 0x3c-0x3d are same as for htype 0 */
-#define PCI_BRIDGE_CONTROL	0x3e
-#define  PCI_BRIDGE_CTL_PARITY	0x01	/* Enable parity detection on secondary interface */
-#define  PCI_BRIDGE_CTL_SERR	0x02	/* The same for SERR forwarding */
-#define  PCI_BRIDGE_CTL_NO_ISA	0x04	/* Disable bridging of ISA ports */
-#define  PCI_BRIDGE_CTL_VGA	0x08	/* Forward VGA addresses */
-#define  PCI_BRIDGE_CTL_MASTER_ABORT 0x20	/* Report master aborts */
-#define  PCI_BRIDGE_CTL_BUS_RESET 0x40	/* Secondary bus reset */
-#define  PCI_BRIDGE_CTL_FAST_BACK 0x80	/* Fast Back2Back enabled on secondary interface */
-
-/* Header type 2 (CardBus bridges) */
-/* 0x14-0x15 reserved */
-#define PCI_CB_SEC_STATUS	0x16	/* Secondary status */
-#define PCI_CB_PRIMARY_BUS	0x18	/* PCI bus number */
-#define PCI_CB_CARD_BUS		0x19	/* CardBus bus number */
-#define PCI_CB_SUBORDINATE_BUS	0x1a	/* Subordinate bus number */
-#define PCI_CB_LATENCY_TIMER	0x1b	/* CardBus latency timer */
-#define PCI_CB_MEMORY_BASE_0	0x1c
-#define PCI_CB_MEMORY_LIMIT_0	0x20
-#define PCI_CB_MEMORY_BASE_1	0x24
-#define PCI_CB_MEMORY_LIMIT_1	0x28
-#define PCI_CB_IO_BASE_0	0x2c
-#define PCI_CB_IO_BASE_0_HI	0x2e
-#define PCI_CB_IO_LIMIT_0	0x30
-#define PCI_CB_IO_LIMIT_0_HI	0x32
-#define PCI_CB_IO_BASE_1	0x34
-#define PCI_CB_IO_BASE_1_HI	0x36
-#define PCI_CB_IO_LIMIT_1	0x38
-#define PCI_CB_IO_LIMIT_1_HI	0x3a
-#define  PCI_CB_IO_RANGE_MASK	~0x03
-/* 0x3c-0x3d are same as for htype 0 */
-#define PCI_CB_BRIDGE_CONTROL	0x3e
-#define  PCI_CB_BRIDGE_CTL_PARITY	0x01	/* Similar to standard bridge control register */
-#define  PCI_CB_BRIDGE_CTL_SERR		0x02
-#define  PCI_CB_BRIDGE_CTL_ISA		0x04
-#define  PCI_CB_BRIDGE_CTL_VGA		0x08
-#define  PCI_CB_BRIDGE_CTL_MASTER_ABORT	0x20
-#define  PCI_CB_BRIDGE_CTL_CB_RESET	0x40	/* CardBus reset */
-#define  PCI_CB_BRIDGE_CTL_16BIT_INT	0x80	/* Enable interrupt for 16-bit cards */
-#define  PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100	/* Prefetch enable for both memory regions */
-#define  PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200
-#define  PCI_CB_BRIDGE_CTL_POST_WRITES	0x400
-#define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40
-#define PCI_CB_SUBSYSTEM_ID	0x42
-#define PCI_CB_LEGACY_MODE_BASE	0x44	/* 16-bit PC Card legacy mode base address (ExCa) */
-/* 0x48-0x7f reserved */
-
-/* Capability lists */
-
-#define PCI_CAP_LIST_ID		0	/* Capability ID */
-#define  PCI_CAP_ID_PM		0x01	/* Power Management */
-#define  PCI_CAP_ID_AGP		0x02	/* Accelerated Graphics Port */
-#define  PCI_CAP_ID_VPD		0x03	/* Vital Product Data */
-#define  PCI_CAP_ID_SLOTID	0x04	/* Slot Identification */
-#define  PCI_CAP_ID_MSI		0x05	/* Message Signalled Interrupts */
-#define  PCI_CAP_ID_CHSWP	0x06	/* CompactPCI HotSwap */
-#define  PCI_CAP_ID_PCIX        0x07	/* PCI-X */
-#define  PCI_CAP_ID_HT          0x08	/* HyperTransport */
-#define  PCI_CAP_ID_VNDR	0x09	/* Vendor specific */
-#define  PCI_CAP_ID_DBG		0x0A	/* Debug port */
-#define  PCI_CAP_ID_CCRC	0x0B	/* CompactPCI Central Resource Control */
-#define  PCI_CAP_ID_AGP3	0x0E	/* AGP 8x */
-#define  PCI_CAP_ID_EXP		0x10	/* PCI Express */
-#define  PCI_CAP_ID_MSIX	0x11	/* MSI-X */
-#define PCI_CAP_LIST_NEXT	1	/* Next capability in the list */
-#define PCI_CAP_FLAGS		2	/* Capability defined flags (16 bits) */
-#define PCI_CAP_SIZEOF		4
-
-/* Capabilities residing in the PCI Express extended configuration space */
-
-#define PCI_EXT_CAP_ID_AER	0x01	/* Advanced Error Reporting */
-#define PCI_EXT_CAP_ID_VC	0x02	/* Virtual Channel */
-#define PCI_EXT_CAP_ID_DSN	0x03	/* Device Serial Number */
-#define PCI_EXT_CAP_ID_PB	0x04	/* Power Budgeting */
-
-/* Power Management Registers */
-
-#define  PCI_PM_CAP_VER_MASK	0x0007	/* Version (2=PM1.1) */
-#define  PCI_PM_CAP_PME_CLOCK	0x0008	/* Clock required for PME generation */
-#define  PCI_PM_CAP_DSI		0x0020	/* Device specific initialization required */
-#define  PCI_PM_CAP_AUX_C_MASK	0x01c0	/* Maximum aux current required in D3cold */
-#define  PCI_PM_CAP_D1		0x0200	/* D1 power state support */
-#define  PCI_PM_CAP_D2		0x0400	/* D2 power state support */
-#define  PCI_PM_CAP_PME_D0	0x0800	/* PME can be asserted from D0 */
-#define  PCI_PM_CAP_PME_D1	0x1000	/* PME can be asserted from D1 */
-#define  PCI_PM_CAP_PME_D2	0x2000	/* PME can be asserted from D2 */
-#define  PCI_PM_CAP_PME_D3_HOT	0x4000	/* PME can be asserted from D3hot */
-#define  PCI_PM_CAP_PME_D3_COLD	0x8000	/* PME can be asserted from D3cold */
-#define PCI_PM_CTRL		4	/* PM control and status register */
-#define  PCI_PM_CTRL_STATE_MASK	0x0003	/* Current power state (D0 to D3) */
-#define  PCI_PM_CTRL_PME_ENABLE	0x0100	/* PME pin enable */
-#define  PCI_PM_CTRL_DATA_SEL_MASK	0x1e00	/* PM table data index */
-#define  PCI_PM_CTRL_DATA_SCALE_MASK	0x6000	/* PM table data scaling factor */
-#define  PCI_PM_CTRL_PME_STATUS	0x8000	/* PME pin status */
-#define PCI_PM_PPB_EXTENSIONS	6	/* PPB support extensions */
-#define  PCI_PM_PPB_B2_B3	0x40	/* If bridge enters D3hot, bus enters: 0=B3, 1=B2 */
-#define  PCI_PM_BPCC_ENABLE	0x80	/* Secondary bus is power managed */
-#define PCI_PM_DATA_REGISTER	7	/* PM table contents read here */
-#define PCI_PM_SIZEOF		8
-
-/* AGP registers */
-
-#define PCI_AGP_VERSION		2	/* BCD version number */
-#define PCI_AGP_RFU		3	/* Rest of capability flags */
-#define PCI_AGP_STATUS		4	/* Status register */
-#define  PCI_AGP_STATUS_RQ_MASK	0xff000000	/* Maximum number of requests - 1 */
-#define  PCI_AGP_STATUS_ISOCH	0x10000	/* Isochronous transactions supported */
-#define  PCI_AGP_STATUS_ARQSZ_MASK	0xe000	/* log2(optimum async req size in bytes) - 4 */
-#define  PCI_AGP_STATUS_CAL_MASK	0x1c00	/* Calibration cycle timing */
-#define  PCI_AGP_STATUS_SBA	0x0200	/* Sideband addressing supported */
-#define  PCI_AGP_STATUS_ITA_COH	0x0100	/* In-aperture accesses always coherent */
-#define  PCI_AGP_STATUS_GART64	0x0080	/* 64-bit GART entries supported */
-#define  PCI_AGP_STATUS_HTRANS	0x0040	/* If 0, core logic can xlate host CPU accesses thru aperture */
-#define  PCI_AGP_STATUS_64BIT	0x0020	/* 64-bit addressing cycles supported */
-#define  PCI_AGP_STATUS_FW	0x0010	/* Fast write transfers supported */
-#define  PCI_AGP_STATUS_AGP3	0x0008	/* AGP3 mode supported */
-#define  PCI_AGP_STATUS_RATE4	0x0004	/* 4x transfer rate supported (RFU in AGP3 mode) */
-#define  PCI_AGP_STATUS_RATE2	0x0002	/* 2x transfer rate supported (8x in AGP3 mode) */
-#define  PCI_AGP_STATUS_RATE1	0x0001	/* 1x transfer rate supported (4x in AGP3 mode) */
-#define PCI_AGP_COMMAND		8	/* Control register */
-#define  PCI_AGP_COMMAND_RQ_MASK 0xff000000	/* Master: Maximum number of requests */
-#define  PCI_AGP_COMMAND_ARQSZ_MASK	0xe000	/* log2(optimum async req size in bytes) - 4 */
-#define  PCI_AGP_COMMAND_CAL_MASK	0x1c00	/* Calibration cycle timing */
-#define  PCI_AGP_COMMAND_SBA	0x0200	/* Sideband addressing enabled */
-#define  PCI_AGP_COMMAND_AGP	0x0100	/* Allow processing of AGP transactions */
-#define  PCI_AGP_COMMAND_GART64	0x0080	/* 64-bit GART entries enabled */
-#define  PCI_AGP_COMMAND_64BIT	0x0020	/* Allow generation of 64-bit addr cycles */
-#define  PCI_AGP_COMMAND_FW	0x0010	/* Enable FW transfers */
-#define  PCI_AGP_COMMAND_RATE4	0x0004	/* Use 4x rate (RFU in AGP3 mode) */
-#define  PCI_AGP_COMMAND_RATE2	0x0002	/* Use 2x rate (8x in AGP3 mode) */
-#define  PCI_AGP_COMMAND_RATE1	0x0001	/* Use 1x rate (4x in AGP3 mode) */
-#define PCI_AGP_SIZEOF		12
-
-/* Slot Identification */
-
-#define PCI_SID_ESR		2	/* Expansion Slot Register */
-#define  PCI_SID_ESR_NSLOTS	0x1f	/* Number of expansion slots available */
-#define  PCI_SID_ESR_FIC	0x20	/* First In Chassis Flag */
-#define PCI_SID_CHASSIS_NR	3	/* Chassis Number */
-
-/* Message Signalled Interrupts registers */
-
-#define PCI_MSI_FLAGS		2	/* Various flags */
-#define  PCI_MSI_FLAGS_64BIT	0x80	/* 64-bit addresses allowed */
-#define  PCI_MSI_FLAGS_QSIZE	0x70	/* Message queue size configured */
-#define  PCI_MSI_FLAGS_QMASK	0x0e	/* Maximum queue size available */
-#define  PCI_MSI_FLAGS_ENABLE	0x01	/* MSI feature enabled */
-#define PCI_MSI_RFU		3	/* Rest of capability flags */
-#define PCI_MSI_ADDRESS_LO	4	/* Lower 32 bits */
-#define PCI_MSI_ADDRESS_HI	8	/* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
-#define PCI_MSI_DATA_32		8	/* 16 bits of data for 32-bit devices */
-#define PCI_MSI_DATA_64		12	/* 16 bits of data for 64-bit devices */
-
-/* PCI-X */
-#define PCI_PCIX_COMMAND                                                2	/* Command register offset */
-#define PCI_PCIX_COMMAND_DPERE                                     0x0001	/* Data Parity Error Recover Enable */
-#define PCI_PCIX_COMMAND_ERO                                       0x0002	/* Enable Relaxed Ordering */
-#define PCI_PCIX_COMMAND_MAX_MEM_READ_BYTE_COUNT                   0x000c	/* Maximum Memory Read Byte Count */
-#define PCI_PCIX_COMMAND_MAX_OUTSTANDING_SPLIT_TRANS               0x0070
-#define PCI_PCIX_COMMAND_RESERVED                                   0xf80
-#define PCI_PCIX_STATUS                                                 4	/* Status register offset */
-#define PCI_PCIX_STATUS_FUNCTION                               0x00000007
-#define PCI_PCIX_STATUS_DEVICE                                 0x000000f8
-#define PCI_PCIX_STATUS_BUS                                    0x0000ff00
-#define PCI_PCIX_STATUS_64BIT                                  0x00010000
-#define PCI_PCIX_STATUS_133MHZ                                 0x00020000
-#define PCI_PCIX_STATUS_SC_DISCARDED                           0x00040000	/* Split Completion Discarded */
-#define PCI_PCIX_STATUS_UNEXPECTED_SC                          0x00080000	/* Unexpected Split Completion */
-#define PCI_PCIX_STATUS_DEVICE_COMPLEXITY                      0x00100000	/* 0 = simple device, 1 = bridge device */
-#define PCI_PCIX_STATUS_DESIGNED_MAX_MEM_READ_BYTE_COUNT       0x00600000	/* 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */
-#define PCI_PCIX_STATUS_DESIGNED_MAX_OUTSTANDING_SPLIT_TRANS   0x03800000
-#define PCI_PCIX_STATUS_DESIGNED_MAX_CUMULATIVE_READ_SIZE      0x1c000000
-#define PCI_PCIX_STATUS_RCVD_SC_ERR_MESS                       0x20000000	/* Received Split Completion Error Message */
-#define PCI_PCIX_STATUS_266MHZ				       0x40000000	/* 266 MHz capable */
-#define PCI_PCIX_STATUS_533MHZ				       0x80000000	/* 533 MHz capable */
-#define PCI_PCIX_SIZEOF		4
-
-/* PCI-X Bridges */
-#define PCI_PCIX_BRIDGE_SEC_STATUS                                      2	/* Secondary bus status register offset */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_64BIT                           0x0001
-#define PCI_PCIX_BRIDGE_SEC_STATUS_133MHZ                          0x0002
-#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_DISCARDED                    0x0004	/* Split Completion Discarded on secondary bus */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_UNEXPECTED_SC                   0x0008	/* Unexpected Split Completion on secondary bus */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_OVERRUN                      0x0010	/* Split Completion Overrun on secondary bus */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED           0x0020
-#define PCI_PCIX_BRIDGE_SEC_STATUS_CLOCK_FREQ                      0x01c0
-#define PCI_PCIX_BRIDGE_SEC_STATUS_RESERVED                        0xfe00
-#define PCI_PCIX_BRIDGE_STATUS                                          4	/* Primary bus status register offset */
-#define PCI_PCIX_BRIDGE_STATUS_FUNCTION                        0x00000007
-#define PCI_PCIX_BRIDGE_STATUS_DEVICE                          0x000000f8
-#define PCI_PCIX_BRIDGE_STATUS_BUS                             0x0000ff00
-#define PCI_PCIX_BRIDGE_STATUS_64BIT                           0x00010000
-#define PCI_PCIX_BRIDGE_STATUS_133MHZ                          0x00020000
-#define PCI_PCIX_BRIDGE_STATUS_SC_DISCARDED                    0x00040000	/* Split Completion Discarded */
-#define PCI_PCIX_BRIDGE_STATUS_UNEXPECTED_SC                   0x00080000	/* Unexpected Split Completion */
-#define PCI_PCIX_BRIDGE_STATUS_SC_OVERRUN                      0x00100000	/* Split Completion Overrun */
-#define PCI_PCIX_BRIDGE_STATUS_SPLIT_REQUEST_DELAYED           0x00200000
-#define PCI_PCIX_BRIDGE_STATUS_RESERVED                        0xffc00000
-#define PCI_PCIX_BRIDGE_UPSTREAM_SPLIT_TRANS_CTRL                       8	/* Upstream Split Transaction Register offset */
-#define PCI_PCIX_BRIDGE_DOWNSTREAM_SPLIT_TRANS_CTRL                    12	/* Downstream Split Transaction Register offset */
-#define PCI_PCIX_BRIDGE_STR_CAPACITY                           0x0000ffff
-#define PCI_PCIX_BRIDGE_STR_COMMITMENT_LIMIT                   0xffff0000
-#define PCI_PCIX_BRIDGE_SIZEOF 12
-
-/* HyperTransport (as of spec rev. 2.00) */
-#define PCI_HT_CMD		2	/* Command Register */
-#define  PCI_HT_CMD_TYP_HI	0xe000	/* Capability Type high part */
-#define  PCI_HT_CMD_TYP_HI_PRI	0x0000	/* Slave or Primary Interface */
-#define  PCI_HT_CMD_TYP_HI_SEC	0x2000	/* Host or Secondary Interface */
-#define  PCI_HT_CMD_TYP		0xf800	/* Capability Type */
-#define  PCI_HT_CMD_TYP_SW	0x4000	/* Switch */
-#define  PCI_HT_CMD_TYP_IDC	0x8000	/* Interrupt Discovery and Configuration */
-#define  PCI_HT_CMD_TYP_RID	0x8800	/* Revision ID */
-#define  PCI_HT_CMD_TYP_UIDC	0x9000	/* UnitID Clumping */
-#define  PCI_HT_CMD_TYP_ECSA	0x9800	/* Extended Configuration Space Access */
-#define  PCI_HT_CMD_TYP_AM	0xa000	/* Address Mapping */
-#define  PCI_HT_CMD_TYP_MSIM	0xa800	/* MSI Mapping */
-#define  PCI_HT_CMD_TYP_DR	0xb000	/* DirectRoute */
-#define  PCI_HT_CMD_TYP_VCS	0xb800	/* VCSet */
-#define  PCI_HT_CMD_TYP_RM	0xc000	/* Retry Mode */
-#define  PCI_HT_CMD_TYP_X86	0xc800	/* X86 (reserved) */
-
-					/* Link Control Register */
-#define  PCI_HT_LCTR_CFLE	0x0002	/* CRC Flood Enable */
-#define  PCI_HT_LCTR_CST	0x0004	/* CRC Start Test */
-#define  PCI_HT_LCTR_CFE	0x0008	/* CRC Force Error */
-#define  PCI_HT_LCTR_LKFAIL	0x0010	/* Link Failure */
-#define  PCI_HT_LCTR_INIT	0x0020	/* Initialization Complete */
-#define  PCI_HT_LCTR_EOC	0x0040	/* End of Chain */
-#define  PCI_HT_LCTR_TXO	0x0080	/* Transmitter Off */
-#define  PCI_HT_LCTR_CRCERR	0x0f00	/* CRC Error */
-#define  PCI_HT_LCTR_ISOCEN	0x1000	/* Isochronous Flow Control Enable */
-#define  PCI_HT_LCTR_LSEN	0x2000	/* LDTSTOP# Tristate Enable */
-#define  PCI_HT_LCTR_EXTCTL	0x4000	/* Extended CTL Time */
-#define  PCI_HT_LCTR_64B	0x8000	/* 64-bit Addressing Enable */
-
-					/* Link Configuration Register */
-#define  PCI_HT_LCNF_MLWI	0x0007	/* Max Link Width In */
-#define  PCI_HT_LCNF_LW_8B	0x0	/* Link Width 8 bits */
-#define  PCI_HT_LCNF_LW_16B	0x1	/* Link Width 16 bits */
-#define  PCI_HT_LCNF_LW_32B	0x3	/* Link Width 32 bits */
-#define  PCI_HT_LCNF_LW_2B	0x4	/* Link Width 2 bits */
-#define  PCI_HT_LCNF_LW_4B	0x5	/* Link Width 4 bits */
-#define  PCI_HT_LCNF_LW_NC	0x7	/* Link physically not connected */
-#define  PCI_HT_LCNF_DFI	0x0008	/* Doubleword Flow Control In */
-#define  PCI_HT_LCNF_MLWO	0x0070	/* Max Link Width Out */
-#define  PCI_HT_LCNF_DFO	0x0080	/* Doubleword Flow Control Out */
-#define  PCI_HT_LCNF_LWI	0x0700	/* Link Width In */
-#define  PCI_HT_LCNF_DFIE	0x0800	/* Doubleword Flow Control In Enable */
-#define  PCI_HT_LCNF_LWO	0x7000	/* Link Width Out */
-#define  PCI_HT_LCNF_DFOE	0x8000	/* Doubleword Flow Control Out Enable */
-
-					/* Revision ID Register */
-#define  PCI_HT_RID_MIN		0x1f	/* Minor Revision */
-#define  PCI_HT_RID_MAJ		0xe0	/* Major Revision */
-
-					/* Link Frequency/Error Register */
-#define  PCI_HT_LFRER_FREQ	0x0f	/* Transmitter Clock Frequency */
-#define  PCI_HT_LFRER_200	0x00	/* 200MHz */
-#define  PCI_HT_LFRER_300	0x01	/* 300MHz */
-#define  PCI_HT_LFRER_400	0x02	/* 400MHz */
-#define  PCI_HT_LFRER_500	0x03	/* 500MHz */
-#define  PCI_HT_LFRER_600	0x04	/* 600MHz */
-#define  PCI_HT_LFRER_800	0x05	/* 800MHz */
-#define  PCI_HT_LFRER_1000	0x06	/* 1.0GHz */
-#define  PCI_HT_LFRER_1200	0x07	/* 1.2GHz */
-#define  PCI_HT_LFRER_1400	0x08	/* 1.4GHz */
-#define  PCI_HT_LFRER_1600	0x09	/* 1.6GHz */
-#define  PCI_HT_LFRER_VEND	0x0f	/* Vendor-Specific */
-#define  PCI_HT_LFRER_ERR	0xf0	/* Link Error */
-#define  PCI_HT_LFRER_PROT	0x10	/* Protocol Error */
-#define  PCI_HT_LFRER_OV	0x20	/* Overflow Error */
-#define  PCI_HT_LFRER_EOC	0x40	/* End of Chain Error */
-#define  PCI_HT_LFRER_CTLT	0x80	/* CTL Timeout */
-
-					/* Link Frequency Capability Register */
-#define  PCI_HT_LFCAP_200	0x0001	/* 200MHz */
-#define  PCI_HT_LFCAP_300	0x0002	/* 300MHz */
-#define  PCI_HT_LFCAP_400	0x0004	/* 400MHz */
-#define  PCI_HT_LFCAP_500	0x0008	/* 500MHz */
-#define  PCI_HT_LFCAP_600	0x0010	/* 600MHz */
-#define  PCI_HT_LFCAP_800	0x0020	/* 800MHz */
-#define  PCI_HT_LFCAP_1000	0x0040	/* 1.0GHz */
-#define  PCI_HT_LFCAP_1200	0x0080	/* 1.2GHz */
-#define  PCI_HT_LFCAP_1400	0x0100	/* 1.4GHz */
-#define  PCI_HT_LFCAP_1600	0x0200	/* 1.6GHz */
-#define  PCI_HT_LFCAP_VEND	0x8000	/* Vendor-Specific */
-
-					/* Feature Register */
-#define  PCI_HT_FTR_ISOCFC	0x0001	/* Isochronous Flow Control Mode */
-#define  PCI_HT_FTR_LDTSTOP	0x0002	/* LDTSTOP# Supported */
-#define  PCI_HT_FTR_CRCTM	0x0004	/* CRC Test Mode */
-#define  PCI_HT_FTR_ECTLT	0x0008	/* Extended CTL Time Required */
-#define  PCI_HT_FTR_64BA	0x0010	/* 64-bit Addressing */
-#define  PCI_HT_FTR_UIDRD	0x0020	/* UnitID Reorder Disable */
-
-					/* Error Handling Register */
-#define  PCI_HT_EH_PFLE		0x0001	/* Protocol Error Flood Enable */
-#define  PCI_HT_EH_OFLE		0x0002	/* Overflow Error Flood Enable */
-#define  PCI_HT_EH_PFE		0x0004	/* Protocol Error Fatal Enable */
-#define  PCI_HT_EH_OFE		0x0008	/* Overflow Error Fatal Enable */
-#define  PCI_HT_EH_EOCFE	0x0010	/* End of Chain Error Fatal Enable */
-#define  PCI_HT_EH_RFE		0x0020	/* Response Error Fatal Enable */
-#define  PCI_HT_EH_CRCFE	0x0040	/* CRC Error Fatal Enable */
-#define  PCI_HT_EH_SERRFE	0x0080	/* System Error Fatal Enable (B */
-#define  PCI_HT_EH_CF		0x0100	/* Chain Fail */
-#define  PCI_HT_EH_RE		0x0200	/* Response Error */
-#define  PCI_HT_EH_PNFE		0x0400	/* Protocol Error Nonfatal Enable */
-#define  PCI_HT_EH_ONFE		0x0800	/* Overflow Error Nonfatal Enable */
-#define  PCI_HT_EH_EOCNFE	0x1000	/* End of Chain Error Nonfatal Enable */
-#define  PCI_HT_EH_RNFE		0x2000	/* Response Error Nonfatal Enable */
-#define  PCI_HT_EH_CRCNFE	0x4000	/* CRC Error Nonfatal Enable */
-#define  PCI_HT_EH_SERRNFE	0x8000	/* System Error Nonfatal Enable */
-
-/* HyperTransport: Slave or Primary Interface */
-#define PCI_HT_PRI_CMD		2	/* Command Register */
-#define  PCI_HT_PRI_CMD_BUID	0x001f	/* Base UnitID */
-#define  PCI_HT_PRI_CMD_UC	0x03e0	/* Unit Count */
-#define  PCI_HT_PRI_CMD_MH	0x0400	/* Master Host */
-#define  PCI_HT_PRI_CMD_DD	0x0800	/* Default Direction */
-#define  PCI_HT_PRI_CMD_DUL	0x1000	/* Drop on Uninitialized Link */
-
-#define PCI_HT_PRI_LCTR0	4	/* Link Control 0 Register */
-#define PCI_HT_PRI_LCNF0	6	/* Link Config 0 Register */
-#define PCI_HT_PRI_LCTR1	8	/* Link Control 1 Register */
-#define PCI_HT_PRI_LCNF1	10	/* Link Config 1 Register */
-#define PCI_HT_PRI_RID		12	/* Revision ID Register */
-#define PCI_HT_PRI_LFRER0	13	/* Link Frequency/Error 0 Register */
-#define PCI_HT_PRI_LFCAP0	14	/* Link Frequency Capability 0 Register */
-#define PCI_HT_PRI_FTR		16	/* Feature Register */
-#define PCI_HT_PRI_LFRER1	17	/* Link Frequency/Error 1 Register */
-#define PCI_HT_PRI_LFCAP1	18	/* Link Frequency Capability 1 Register */
-#define PCI_HT_PRI_ES		20	/* Enumeration Scratchpad Register */
-#define PCI_HT_PRI_EH		22	/* Error Handling Register */
-#define PCI_HT_PRI_MBU		24	/* Memory Base Upper Register */
-#define PCI_HT_PRI_MLU		25	/* Memory Limit Upper Register */
-#define PCI_HT_PRI_BN		26	/* Bus Number Register */
-#define PCI_HT_PRI_SIZEOF	28
-
-/* HyperTransport: Host or Secondary Interface */
-#define PCI_HT_SEC_CMD		2	/* Command Register */
-#define  PCI_HT_SEC_CMD_WR	0x0001	/* Warm Reset */
-#define  PCI_HT_SEC_CMD_DE	0x0002	/* Double-Ended */
-#define  PCI_HT_SEC_CMD_DN	0x0076	/* Device Number */
-#define  PCI_HT_SEC_CMD_CS	0x0080	/* Chain Side */
-#define  PCI_HT_SEC_CMD_HH	0x0100	/* Host Hide */
-#define  PCI_HT_SEC_CMD_AS	0x0400	/* Act as Slave */
-#define  PCI_HT_SEC_CMD_HIECE	0x0800	/* Host Inbound End of Chain Error */
-#define  PCI_HT_SEC_CMD_DUL	0x1000	/* Drop on Uninitialized Link */
-
-#define PCI_HT_SEC_LCTR		4	/* Link Control Register */
-#define PCI_HT_SEC_LCNF		6	/* Link Config Register */
-#define PCI_HT_SEC_RID		8	/* Revision ID Register */
-#define PCI_HT_SEC_LFRER	9	/* Link Frequency/Error Register */
-#define PCI_HT_SEC_LFCAP	10	/* Link Frequency Capability Register */
-#define PCI_HT_SEC_FTR		12	/* Feature Register */
-#define  PCI_HT_SEC_FTR_EXTRS	0x0100	/* Extended Register Set */
-#define  PCI_HT_SEC_FTR_UCNFE	0x0200	/* Upstream Configuration Enable */
-#define PCI_HT_SEC_ES		16	/* Enumeration Scratchpad Register */
-#define PCI_HT_SEC_EH		18	/* Error Handling Register */
-#define PCI_HT_SEC_MBU		20	/* Memory Base Upper Register */
-#define PCI_HT_SEC_MLU		21	/* Memory Limit Upper Register */
-#define PCI_HT_SEC_SIZEOF	24
-
-/* HyperTransport: Switch */
-#define PCI_HT_SW_CMD		2	/* Switch Command Register */
-#define  PCI_HT_SW_CMD_VIBERR	0x0080	/* VIB Error */
-#define  PCI_HT_SW_CMD_VIBFL	0x0100	/* VIB Flood */
-#define  PCI_HT_SW_CMD_VIBFT	0x0200	/* VIB Fatal */
-#define  PCI_HT_SW_CMD_VIBNFT	0x0400	/* VIB Nonfatal */
-#define PCI_HT_SW_PMASK		4	/* Partition Mask Register */
-#define PCI_HT_SW_SWINF		8	/* Switch Info Register */
-#define  PCI_HT_SW_SWINF_DP	0x0000001f	/* Default Port */
-#define  PCI_HT_SW_SWINF_EN	0x00000020	/* Enable Decode */
-#define  PCI_HT_SW_SWINF_CR	0x00000040	/* Cold Reset */
-#define  PCI_HT_SW_SWINF_PCIDX	0x00000f00	/* Performance Counter Index */
-#define  PCI_HT_SW_SWINF_BLRIDX	0x0003f000	/* Base/Limit Range Index */
-#define  PCI_HT_SW_SWINF_SBIDX	0x00002000	/* Secondary Base Range Index */
-#define  PCI_HT_SW_SWINF_HP	0x00040000	/* Hot Plug */
-#define  PCI_HT_SW_SWINF_HIDE	0x00080000	/* Hide Port */
-#define PCI_HT_SW_PCD		12	/* Performance Counter Data Register */
-#define PCI_HT_SW_BLRD		16	/* Base/Limit Range Data Register */
-#define PCI_HT_SW_SBD		20	/* Secondary Base Data Register */
-#define PCI_HT_SW_SIZEOF	24
-
-					/* Counter indices */
-#define  PCI_HT_SW_PC_PCR	0x0	/* Posted Command Receive */
-#define  PCI_HT_SW_PC_NPCR	0x1	/* Nonposted Command Receive */
-#define  PCI_HT_SW_PC_RCR	0x2	/* Response Command Receive */
-#define  PCI_HT_SW_PC_PDWR	0x3	/* Posted DW Receive */
-#define  PCI_HT_SW_PC_NPDWR	0x4	/* Nonposted DW Receive */
-#define  PCI_HT_SW_PC_RDWR	0x5	/* Response DW Receive */
-#define  PCI_HT_SW_PC_PCT	0x6	/* Posted Command Transmit */
-#define  PCI_HT_SW_PC_NPCT	0x7	/* Nonposted Command Transmit */
-#define  PCI_HT_SW_PC_RCT	0x8	/* Response Command Transmit */
-#define  PCI_HT_SW_PC_PDWT	0x9	/* Posted DW Transmit */
-#define  PCI_HT_SW_PC_NPDWT	0xa	/* Nonposted DW Transmit */
-#define  PCI_HT_SW_PC_RDWT	0xb	/* Response DW Transmit */
-
-					/* Base/Limit Range indices */
-#define  PCI_HT_SW_BLR_BASE0_LO	0x0	/* Base 0[31:1], Enable */
-#define  PCI_HT_SW_BLR_BASE0_HI	0x1	/* Base 0 Upper */
-#define  PCI_HT_SW_BLR_LIM0_LO	0x2	/* Limit 0 Lower */
-#define  PCI_HT_SW_BLR_LIM0_HI	0x3	/* Limit 0 Upper */
-
-					/* Secondary Base indices */
-#define  PCI_HT_SW_SB_LO	0x0	/* Secondary Base[31:1], Enable */
-#define  PCI_HT_SW_S0_HI	0x1	/* Secondary Base Upper */
-
-/* HyperTransport: Interrupt Discovery and Configuration */
-#define PCI_HT_IDC_IDX		2	/* Index Register */
-#define PCI_HT_IDC_DATA		4	/* Data Register */
-#define PCI_HT_IDC_SIZEOF	8
-
-					/* Register indices */
-#define  PCI_HT_IDC_IDX_LINT	0x01	/* Last Interrupt Register */
-#define   PCI_HT_IDC_LINT	0x00ff0000	/* Last interrupt definition */
-#define  PCI_HT_IDC_IDX_IDR	0x10	/* Interrupt Definition Registers */
-					/* Low part (at index) */
-#define   PCI_HT_IDC_IDR_MASK	0x10000001	/* Mask */
-#define   PCI_HT_IDC_IDR_POL	0x10000002	/* Polarity */
-#define   PCI_HT_IDC_IDR_II_2	0x1000001c	/* IntrInfo[4:2]: Message Type */
-#define   PCI_HT_IDC_IDR_II_5	0x10000020	/* IntrInfo[5]: Request EOI */
-#define   PCI_HT_IDC_IDR_II_6	0x00ffffc0	/* IntrInfo[23:6] */
-#define   PCI_HT_IDC_IDR_II_24	0xff000000	/* IntrInfo[31:24] */
-					/* High part (at index + 1) */
-#define   PCI_HT_IDC_IDR_II_32	0x00ffffff	/* IntrInfo[55:32] */
-#define   PCI_HT_IDC_IDR_PASSPW	0x40000000	/* PassPW setting for messages */
-#define   PCI_HT_IDC_IDR_WEOI	0x80000000	/* Waiting for EOI */
-
-/* HyperTransport: Revision ID */
-#define PCI_HT_RID_RID		2	/* Revision Register */
-#define PCI_HT_RID_SIZEOF	4
-
-/* HyperTransport: UnitID Clumping */
-#define PCI_HT_UIDC_CS		4	/* Clumping Support Register */
-#define PCI_HT_UIDC_CE		8	/* Clumping Enable Register */
-#define PCI_HT_UIDC_SIZEOF	12
-
-/* HyperTransport: Extended Configuration Space Access */
-#define PCI_HT_ECSA_ADDR	4	/* Configuration Address Register */
-#define  PCI_HT_ECSA_ADDR_REG	0x00000ffc	/* Register */
-#define  PCI_HT_ECSA_ADDR_FUN	0x00007000	/* Function */
-#define  PCI_HT_ECSA_ADDR_DEV	0x000f1000	/* Device */
-#define  PCI_HT_ECSA_ADDR_BUS	0x0ff00000	/* Bus Number */
-#define  PCI_HT_ECSA_ADDR_TYPE	0x10000000	/* Access Type */
-#define PCI_HT_ECSA_DATA	8	/* Configuration Data Register */
-#define PCI_HT_ECSA_SIZEOF	12
-
-/* HyperTransport: Address Mapping */
-#define PCI_HT_AM_CMD		2	/* Command Register */
-#define  PCI_HT_AM_CMD_NDMA	0x000f	/* Number of DMA Mappings */
-#define  PCI_HT_AM_CMD_IOSIZ	0x01f0	/* I/O Size */
-#define  PCI_HT_AM_CMD_MT	0x0600	/* Map Type */
-#define  PCI_HT_AM_CMD_MT_40B	0x0000	/* 40-bit */
-#define  PCI_HT_AM_CMD_MT_64B	0x0200	/* 64-bit */
-
-					/* Window Control Register bits */
-#define  PCI_HT_AM_SBW_CTR_COMP	0x1	/* Compat */
-#define  PCI_HT_AM_SBW_CTR_NCOH	0x2	/* NonCoherent */
-#define  PCI_HT_AM_SBW_CTR_ISOC	0x4	/* Isochronous */
-#define  PCI_HT_AM_SBW_CTR_EN	0x8	/* Enable */
-
-/* HyperTransport: 40-bit Address Mapping */
-#define PCI_HT_AM40_SBNPW	4	/* Secondary Bus Non-Prefetchable Window Register */
-#define  PCI_HT_AM40_SBW_BASE	0x000fffff	/* Window Base */
-#define  PCI_HT_AM40_SBW_CTR	0xf0000000	/* Window Control */
-#define PCI_HT_AM40_SBPW	8	/* Secondary Bus Prefetchable Window Register */
-#define PCI_HT_AM40_DMA_PBASE0	12	/* DMA Window Primary Base 0 Register */
-#define PCI_HT_AM40_DMA_CTR0	15	/* DMA Window Control 0 Register */
-#define  PCI_HT_AM40_DMA_CTR_CTR 0xf0	/* Window Control */
-#define PCI_HT_AM40_DMA_SLIM0	16	/* DMA Window Secondary Limit 0 Register */
-#define PCI_HT_AM40_DMA_SBASE0	18	/* DMA Window Secondary Base 0 Register */
-#define PCI_HT_AM40_SIZEOF	12	/* size is variable: 12 + 8 * NDMA */
-
-/* HyperTransport: 64-bit Address Mapping */
-#define PCI_HT_AM64_IDX		4	/* Index Register */
-#define PCI_HT_AM64_DATA_LO	8	/* Data Lower Register */
-#define PCI_HT_AM64_DATA_HI	12	/* Data Upper Register */
-#define PCI_HT_AM64_SIZEOF	16
-
-					/* Register indices */
-#define  PCI_HT_AM64_IDX_SBNPW	0x00	/* Secondary Bus Non-Prefetchable Window Register */
-#define   PCI_HT_AM64_W_BASE_LO	0xfff00000	/* Window Base Lower */
-#define   PCI_HT_AM64_W_CTR	0x0000000f	/* Window Control */
-#define  PCI_HT_AM64_IDX_SBPW	0x01	/* Secondary Bus Prefetchable Window Register */
-#define   PCI_HT_AM64_IDX_PBNPW	0x02	/* Primary Bus Non-Prefetchable Window Register */
-#define   PCI_HT_AM64_IDX_DMAPB0 0x04	/* DMA Window Primary Base 0 Register */
-#define   PCI_HT_AM64_IDX_DMASB0 0x05	/* DMA Window Secondary Base 0 Register */
-#define   PCI_HT_AM64_IDX_DMASL0 0x06	/* DMA Window Secondary Limit 0 Register */
-
-/* HyperTransport: MSI Mapping */
-#define PCI_HT_MSIM_CMD		2	/* Command Register */
-#define  PCI_HT_MSIM_CMD_EN	0x0001	/* Mapping Active */
-#define  PCI_HT_MSIM_CMD_FIXD	0x0002	/* MSI Mapping Address Fixed */
-#define PCI_HT_MSIM_ADDR_LO	4	/* MSI Mapping Address Lower Register */
-#define PCI_HT_MSIM_ADDR_HI	8	/* MSI Mapping Address Upper Register */
-#define PCI_HT_MSIM_SIZEOF	12
-
-/* HyperTransport: DirectRoute */
-#define PCI_HT_DR_CMD		2	/* Command Register */
-#define  PCI_HT_DR_CMD_NDRS	0x000f	/* Number of DirectRoute Spaces */
-#define  PCI_HT_DR_CMD_IDX	0x01f0	/* Index */
-#define PCI_HT_DR_EN		4	/* Enable Vector Register */
-#define PCI_HT_DR_DATA		8	/* Data Register */
-#define PCI_HT_DR_SIZEOF	12
-
-					/* Register indices */
-#define  PCI_HT_DR_IDX_BASE_LO	0x00	/* DirectRoute Base Lower Register */
-#define   PCI_HT_DR_OTNRD	0x00000001	/* Opposite to Normal Request Direction */
-#define   PCI_HT_DR_BL_LO	0xffffff00	/* Base/Limit Lower */
-#define  PCI_HT_DR_IDX_BASE_HI	0x01	/* DirectRoute Base Upper Register */
-#define  PCI_HT_DR_IDX_LIMIT_LO	0x02	/* DirectRoute Limit Lower Register */
-#define  PCI_HT_DR_IDX_LIMIT_HI	0x03	/* DirectRoute Limit Upper Register */
-
-/* HyperTransport: VCSet */
-#define PCI_HT_VCS_SUP		4	/* VCSets Supported Register */
-#define PCI_HT_VCS_L1EN		5	/* Link 1 VCSets Enabled Register */
-#define PCI_HT_VCS_L0EN		6	/* Link 0 VCSets Enabled Register */
-#define PCI_HT_VCS_SBD		8	/* Stream Bucket Depth Register */
-#define PCI_HT_VCS_SINT		9	/* Stream Interval Register */
-#define PCI_HT_VCS_SSUP		10	/* Number of Streaming VCs Supported Register */
-#define  PCI_HT_VCS_SSUP_0	0x00	/* Streaming VC 0 */
-#define  PCI_HT_VCS_SSUP_3	0x01	/* Streaming VCs 0-3 */
-#define  PCI_HT_VCS_SSUP_15	0x02	/* Streaming VCs 0-15 */
-#define PCI_HT_VCS_NFCBD	12	/* Non-FC Bucket Depth Register */
-#define PCI_HT_VCS_NFCINT	13	/* Non-FC Bucket Interval Register */
-#define PCI_HT_VCS_SIZEOF	16
-
-/* HyperTransport: Retry Mode */
-#define PCI_HT_RM_CTR0		4	/* Control 0 Register */
-#define  PCI_HT_RM_CTR_LRETEN	0x01	/* Link Retry Enable */
-#define  PCI_HT_RM_CTR_FSER	0x02	/* Force Single Error */
-#define  PCI_HT_RM_CTR_ROLNEN	0x04	/* Rollover Nonfatal Enable */
-#define  PCI_HT_RM_CTR_FSS	0x08	/* Force Single Stomp */
-#define  PCI_HT_RM_CTR_RETNEN	0x10	/* Retry Nonfatal Enable */
-#define  PCI_HT_RM_CTR_RETFEN	0x20	/* Retry Fatal Enable */
-#define  PCI_HT_RM_CTR_AA	0xc0	/* Allowed Attempts */
-#define PCI_HT_RM_STS0		5	/* Status 0 Register */
-#define  PCI_HT_RM_STS_RETSNT	0x01	/* Retry Sent */
-#define  PCI_HT_RM_STS_CNTROL	0x02	/* Count Rollover */
-#define  PCI_HT_RM_STS_SRCV	0x04	/* Stomp Received */
-#define PCI_HT_RM_CTR1		6	/* Control 1 Register */
-#define PCI_HT_RM_STS1		7	/* Status 1 Register */
-#define PCI_HT_RM_CNT0		8	/* Retry Count 0 Register */
-#define PCI_HT_RM_CNT1		10	/* Retry Count 1 Register */
-#define PCI_HT_RM_SIZEOF	12
-
-/* PCI Express */
-#define PCI_EXP_FLAGS		0x2	/* Capabilities register */
-#define PCI_EXP_FLAGS_VERS	0x000f	/* Capability version */
-#define PCI_EXP_FLAGS_TYPE	0x00f0	/* Device/Port type */
-#define  PCI_EXP_TYPE_ENDPOINT	0x0	/* Express Endpoint */
-#define  PCI_EXP_TYPE_LEG_END	0x1	/* Legacy Endpoint */
-#define  PCI_EXP_TYPE_ROOT_PORT 0x4	/* Root Port */
-#define  PCI_EXP_TYPE_UPSTREAM	0x5	/* Upstream Port */
-#define  PCI_EXP_TYPE_DOWNSTREAM 0x6	/* Downstream Port */
-#define  PCI_EXP_TYPE_PCI_BRIDGE 0x7	/* PCI/PCI-X Bridge */
-#define PCI_EXP_FLAGS_SLOT	0x0100	/* Slot implemented */
-#define PCI_EXP_FLAGS_IRQ	0x3e00	/* Interrupt message number */
-#define PCI_EXP_DEVCAP		0x4	/* Device capabilities */
-#define  PCI_EXP_DEVCAP_PAYLOAD	0x07	/* Max_Payload_Size */
-#define  PCI_EXP_DEVCAP_PHANTOM	0x18	/* Phantom functions */
-#define  PCI_EXP_DEVCAP_EXT_TAG	0x20	/* Extended tags */
-#define  PCI_EXP_DEVCAP_L0S	0x1c0	/* L0s Acceptable Latency */
-#define  PCI_EXP_DEVCAP_L1	0xe00	/* L1 Acceptable Latency */
-#define  PCI_EXP_DEVCAP_ATN_BUT	0x1000	/* Attention Button Present */
-#define  PCI_EXP_DEVCAP_ATN_IND	0x2000	/* Attention Indicator Present */
-#define  PCI_EXP_DEVCAP_PWR_IND	0x4000	/* Power Indicator Present */
-#define  PCI_EXP_DEVCAP_PWR_VAL	0x3fc0000	/* Slot Power Limit Value */
-#define  PCI_EXP_DEVCAP_PWR_SCL	0xc000000	/* Slot Power Limit Scale */
-#define PCI_EXP_DEVCTL		0x8	/* Device Control */
-#define  PCI_EXP_DEVCTL_CERE	0x0001	/* Correctable Error Reporting En. */
-#define  PCI_EXP_DEVCTL_NFERE	0x0002	/* Non-Fatal Error Reporting Enable */
-#define  PCI_EXP_DEVCTL_FERE	0x0004	/* Fatal Error Reporting Enable */
-#define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
-#define  PCI_EXP_DEVCTL_RELAXED	0x0010	/* Enable Relaxed Ordering */
-#define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
-#define  PCI_EXP_DEVCTL_EXT_TAG	0x0100	/* Extended Tag Field Enable */
-#define  PCI_EXP_DEVCTL_PHANTOM	0x0200	/* Phantom Functions Enable */
-#define  PCI_EXP_DEVCTL_AUX_PME	0x0400	/* Auxiliary Power PM Enable */
-#define  PCI_EXP_DEVCTL_NOSNOOP	0x0800	/* Enable No Snoop */
-#define  PCI_EXP_DEVCTL_READRQ	0x7000	/* Max_Read_Request_Size */
-#define PCI_EXP_DEVSTA		0xa	/* Device Status */
-#define  PCI_EXP_DEVSTA_CED	0x01	/* Correctable Error Detected */
-#define  PCI_EXP_DEVSTA_NFED	0x02	/* Non-Fatal Error Detected */
-#define  PCI_EXP_DEVSTA_FED	0x04	/* Fatal Error Detected */
-#define  PCI_EXP_DEVSTA_URD	0x08	/* Unsupported Request Detected */
-#define  PCI_EXP_DEVSTA_AUXPD	0x10	/* AUX Power Detected */
-#define  PCI_EXP_DEVSTA_TRPND	0x20	/* Transactions Pending */
-#define PCI_EXP_LNKCAP		0xc	/* Link Capabilities */
-#define  PCI_EXP_LNKCAP_SPEED	0x0000f	/* Maximum Link Speed */
-#define  PCI_EXP_LNKCAP_WIDTH	0x003f0	/* Maximum Link Width */
-#define  PCI_EXP_LNKCAP_ASPM	0x00c00	/* Active State Power Management */
-#define  PCI_EXP_LNKCAP_L0S	0x07000	/* L0s Acceptable Latency */
-#define  PCI_EXP_LNKCAP_L1	0x38000	/* L1 Acceptable Latency */
-#define  PCI_EXP_LNKCAP_PORT	0xff000000	/* Port Number */
-#define PCI_EXP_LNKCTL		0x10	/* Link Control */
-#define  PCI_EXP_LNKCTL_ASPM	0x0003	/* ASPM Control */
-#define  PCI_EXP_LNKCTL_RCB	0x0008	/* Read Completion Boundary */
-#define  PCI_EXP_LNKCTL_DISABLE	0x0010	/* Link Disable */
-#define  PCI_EXP_LNKCTL_RETRAIN	0x0020	/* Retrain Link */
-#define  PCI_EXP_LNKCTL_CLOCK	0x0040	/* Common Clock Configuration */
-#define  PCI_EXP_LNKCTL_XSYNCH	0x0080	/* Extended Synch */
-#define PCI_EXP_LNKSTA		0x12	/* Link Status */
-#define  PCI_EXP_LNKSTA_SPEED	0x000f	/* Negotiated Link Speed */
-#define  PCI_EXP_LNKSTA_WIDTH	0x03f0	/* Negotiated Link Width */
-#define  PCI_EXP_LNKSTA_TR_ERR	0x0400	/* Training Error */
-#define  PCI_EXP_LNKSTA_TRAIN	0x0800	/* Link Training */
-#define  PCI_EXP_LNKSTA_SL_CLK	0x1000	/* Slot Clock Configuration */
-#define PCI_EXP_SLTCAP		0x14	/* Slot Capabilities */
-#define  PCI_EXP_SLTCAP_ATNB	0x0001	/* Attention Button Present */
-#define  PCI_EXP_SLTCAP_PWRC	0x0002	/* Power Controller Present */
-#define  PCI_EXP_SLTCAP_MRL	0x0004	/* MRL Sensor Present */
-#define  PCI_EXP_SLTCAP_ATNI	0x0008	/* Attention Indicator Present */
-#define  PCI_EXP_SLTCAP_PWRI	0x0010	/* Power Indicator Present */
-#define  PCI_EXP_SLTCAP_HPS	0x0020	/* Hot-Plug Surprise */
-#define  PCI_EXP_SLTCAP_HPC	0x0040	/* Hot-Plug Capable */
-#define  PCI_EXP_SLTCAP_PWR_VAL	0x00007f80	/* Slot Power Limit Value */
-#define  PCI_EXP_SLTCAP_PWR_SCL	0x00018000	/* Slot Power Limit Scale */
-#define  PCI_EXP_SLTCAP_PSN	0xfff80000	/* Physical Slot Number */
-#define PCI_EXP_SLTCTL		0x18	/* Slot Control */
-#define  PCI_EXP_SLTCTL_ATNB	0x0001	/* Attention Button Pressed Enable */
-#define  PCI_EXP_SLTCTL_PWRF	0x0002	/* Power Fault Detected Enable */
-#define  PCI_EXP_SLTCTL_MRLS	0x0004	/* MRL Sensor Changed Enable */
-#define  PCI_EXP_SLTCTL_PRSD	0x0008	/* Presence Detect Changed Enable */
-#define  PCI_EXP_SLTCTL_CMDC	0x0010	/* Command Completed Interrupt Enable */
-#define  PCI_EXP_SLTCTL_HPIE	0x0020	/* Hot-Plug Interrupt Enable */
-#define  PCI_EXP_SLTCTL_ATNI	0x00C0	/* Attention Indicator Control */
-#define  PCI_EXP_SLTCTL_PWRI	0x0300	/* Power Indicator Control */
-#define  PCI_EXP_SLTCTL_PWRC	0x0400	/* Power Controller Control */
-#define PCI_EXP_SLTSTA		0x1a	/* Slot Status */
-#define PCI_EXP_RTCTL		0x1c	/* Root Control */
-#define  PCI_EXP_RTCTL_SECEE	0x1	/* System Error on Correctable Error */
-#define  PCI_EXP_RTCTL_SENFEE	0x1	/* System Error on Non-Fatal Error */
-#define  PCI_EXP_RTCTL_SEFEE	0x1	/* System Error on Fatal Error */
-#define  PCI_EXP_RTCTL_PMEIE	0x1	/* PME Interrupt Enable */
-#define PCI_EXP_RTSTA		0x20	/* Root Status */
-
-/* MSI-X */
-#define  PCI_MSIX_ENABLE	0x8000
-#define  PCI_MSIX_MASK		0x4000
-#define  PCI_MSIX_TABSIZE	0x03ff
-#define PCI_MSIX_TABLE		4
-#define PCI_MSIX_PBA		8
-#define  PCI_MSIX_BIR		0x7
-
-/* Advanced Error Reporting */
-#define PCI_ERR_UNCOR_STATUS	4	/* Uncorrectable Error Status */
-#define  PCI_ERR_UNC_TRAIN	0x00000001	/* Training */
-#define  PCI_ERR_UNC_DLP	0x00000010	/* Data Link Protocol */
-#define  PCI_ERR_UNC_POISON_TLP	0x00001000	/* Poisoned TLP */
-#define  PCI_ERR_UNC_FCP	0x00002000	/* Flow Control Protocol */
-#define  PCI_ERR_UNC_COMP_TIME	0x00004000	/* Completion Timeout */
-#define  PCI_ERR_UNC_COMP_ABORT	0x00008000	/* Completer Abort */
-#define  PCI_ERR_UNC_UNX_COMP	0x00010000	/* Unexpected Completion */
-#define  PCI_ERR_UNC_RX_OVER	0x00020000	/* Receiver Overflow */
-#define  PCI_ERR_UNC_MALF_TLP	0x00040000	/* Malformed TLP */
-#define  PCI_ERR_UNC_ECRC	0x00080000	/* ECRC Error Status */
-#define  PCI_ERR_UNC_UNSUP	0x00100000	/* Unsupported Request */
-#define PCI_ERR_UNCOR_MASK	8	/* Uncorrectable Error Mask */
-	/* Same bits as above */
-#define PCI_ERR_UNCOR_SEVER	12	/* Uncorrectable Error Severity */
-	/* Same bits as above */
-#define PCI_ERR_COR_STATUS	16	/* Correctable Error Status */
-#define  PCI_ERR_COR_RCVR	0x00000001	/* Receiver Error Status */
-#define  PCI_ERR_COR_BAD_TLP	0x00000040	/* Bad TLP Status */
-#define  PCI_ERR_COR_BAD_DLLP	0x00000080	/* Bad DLLP Status */
-#define  PCI_ERR_COR_REP_ROLL	0x00000100	/* REPLAY_NUM Rollover */
-#define  PCI_ERR_COR_REP_TIMER	0x00001000	/* Replay Timer Timeout */
-#define PCI_ERR_COR_MASK	20	/* Correctable Error Mask */
-	/* Same bits as above */
-#define PCI_ERR_CAP		24	/* Advanced Error Capabilities */
-#define  PCI_ERR_CAP_FEP(x)	((x) & 31)	/* First Error Pointer */
-#define  PCI_ERR_CAP_ECRC_GENC	0x00000020	/* ECRC Generation Capable */
-#define  PCI_ERR_CAP_ECRC_GENE	0x00000040	/* ECRC Generation Enable */
-#define  PCI_ERR_CAP_ECRC_CHKC	0x00000080	/* ECRC Check Capable */
-#define  PCI_ERR_CAP_ECRC_CHKE	0x00000100	/* ECRC Check Enable */
-#define PCI_ERR_HEADER_LOG	28	/* Header Log Register (16 bytes) */
-#define PCI_ERR_ROOT_COMMAND	44	/* Root Error Command */
-#define PCI_ERR_ROOT_STATUS	48
-#define PCI_ERR_ROOT_COR_SRC	52
-#define PCI_ERR_ROOT_SRC	54
-
-/* Virtual Channel */
-#define PCI_VC_PORT_REG1	4
-#define PCI_VC_PORT_REG2	8
-#define PCI_VC_PORT_CTRL	12
-#define PCI_VC_PORT_STATUS	14
-#define PCI_VC_RES_CAP		16
-#define PCI_VC_RES_CTRL		20
-#define PCI_VC_RES_STATUS	26
-
-/* Power Budgeting */
-#define PCI_PWR_DSR		4	/* Data Select Register */
-#define PCI_PWR_DATA		8	/* Data Register */
-#define  PCI_PWR_DATA_BASE(x)	((x) & 0xff)	/* Base Power */
-#define  PCI_PWR_DATA_SCALE(x)	(((x) >> 8) & 3)	/* Data Scale */
-#define  PCI_PWR_DATA_PM_SUB(x)	(((x) >> 10) & 7)	/* PM Sub State */
-#define  PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3)	/* PM State */
-#define  PCI_PWR_DATA_TYPE(x)	(((x) >> 15) & 7)	/* Type */
-#define  PCI_PWR_DATA_RAIL(x)	(((x) >> 18) & 7)	/* Power Rail */
-#define PCI_PWR_CAP		12	/* Capability */
-#define  PCI_PWR_CAP_BUDGET(x)	((x) & 1)	/* Included in system budget */
-
-/*
- * The PCI interface treats multi-function devices as independent
- * devices.  The slot/function address of each device is encoded
- * in a single byte as follows:
- *
- *	7:3 = slot
- *	2:0 = function
- */
-#define PCI_DEVFN(slot,func)	((((slot) & 0x1f) << 3) | ((func) & 0x07))
-#define PCI_SLOT(devfn)		(((devfn) >> 3) & 0x1f)
-#define PCI_FUNC(devfn)		((devfn) & 0x07)
-
-/* Device classes and subclasses */
-
-#define PCI_CLASS_NOT_DEFINED		0x0000
-#define PCI_CLASS_NOT_DEFINED_VGA	0x0001
-
-#define PCI_BASE_CLASS_STORAGE		0x01
-#define PCI_CLASS_STORAGE_SCSI		0x0100
-#define PCI_CLASS_STORAGE_IDE		0x0101
-#define PCI_CLASS_STORAGE_FLOPPY	0x0102
-#define PCI_CLASS_STORAGE_IPI		0x0103
-#define PCI_CLASS_STORAGE_RAID		0x0104
-#define PCI_CLASS_STORAGE_OTHER		0x0180
-
-#define PCI_BASE_CLASS_NETWORK		0x02
-#define PCI_CLASS_NETWORK_ETHERNET	0x0200
-#define PCI_CLASS_NETWORK_TOKEN_RING	0x0201
-#define PCI_CLASS_NETWORK_FDDI		0x0202
-#define PCI_CLASS_NETWORK_ATM		0x0203
-#define PCI_CLASS_NETWORK_OTHER		0x0280
-
-#define PCI_BASE_CLASS_DISPLAY		0x03
-#define PCI_CLASS_DISPLAY_VGA		0x0300
-#define PCI_CLASS_DISPLAY_XGA		0x0301
-#define PCI_CLASS_DISPLAY_OTHER		0x0380
-
-#define PCI_BASE_CLASS_MULTIMEDIA	0x04
-#define PCI_CLASS_MULTIMEDIA_VIDEO	0x0400
-#define PCI_CLASS_MULTIMEDIA_AUDIO	0x0401
-#define PCI_CLASS_MULTIMEDIA_OTHER	0x0480
-
-#define PCI_BASE_CLASS_MEMORY		0x05
-#define  PCI_CLASS_MEMORY_RAM		0x0500
-#define  PCI_CLASS_MEMORY_FLASH		0x0501
-#define  PCI_CLASS_MEMORY_OTHER		0x0580
-
-#define PCI_BASE_CLASS_BRIDGE		0x06
-#define  PCI_CLASS_BRIDGE_HOST		0x0600
-#define  PCI_CLASS_BRIDGE_ISA		0x0601
-#define  PCI_CLASS_BRIDGE_EISA		0x0602
-#define  PCI_CLASS_BRIDGE_MC		0x0603
-#define  PCI_CLASS_BRIDGE_PCI		0x0604
-#define  PCI_CLASS_BRIDGE_PCMCIA	0x0605
-#define  PCI_CLASS_BRIDGE_NUBUS		0x0606
-#define  PCI_CLASS_BRIDGE_CARDBUS	0x0607
-#define  PCI_CLASS_BRIDGE_OTHER		0x0680
-
-#define PCI_BASE_CLASS_COMMUNICATION	0x07
-#define PCI_CLASS_COMMUNICATION_SERIAL	0x0700
-#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701
-#define PCI_CLASS_COMMUNICATION_OTHER	0x0780
-
-#define PCI_BASE_CLASS_SYSTEM		0x08
-#define PCI_CLASS_SYSTEM_PIC		0x0800
-#define PCI_CLASS_SYSTEM_DMA		0x0801
-#define PCI_CLASS_SYSTEM_TIMER		0x0802
-#define PCI_CLASS_SYSTEM_RTC		0x0803
-#define PCI_CLASS_SYSTEM_OTHER		0x0880
-
-#define PCI_BASE_CLASS_INPUT		0x09
-#define PCI_CLASS_INPUT_KEYBOARD	0x0900
-#define PCI_CLASS_INPUT_PEN		0x0901
-#define PCI_CLASS_INPUT_MOUSE		0x0902
-#define PCI_CLASS_INPUT_OTHER		0x0980
-
-#define PCI_BASE_CLASS_DOCKING		0x0a
-#define PCI_CLASS_DOCKING_GENERIC	0x0a00
-#define PCI_CLASS_DOCKING_OTHER		0x0a01
-
-#define PCI_BASE_CLASS_PROCESSOR	0x0b
-#define PCI_CLASS_PROCESSOR_386		0x0b00
-#define PCI_CLASS_PROCESSOR_486		0x0b01
-#define PCI_CLASS_PROCESSOR_PENTIUM	0x0b02
-#define PCI_CLASS_PROCESSOR_ALPHA	0x0b10
-#define PCI_CLASS_PROCESSOR_POWERPC	0x0b20
-#define PCI_CLASS_PROCESSOR_CO		0x0b40
-
-#define PCI_BASE_CLASS_SERIAL		0x0c
-#define PCI_CLASS_SERIAL_FIREWIRE	0x0c00
-#define PCI_CLASS_SERIAL_ACCESS		0x0c01
-#define PCI_CLASS_SERIAL_SSA		0x0c02
-#define PCI_CLASS_SERIAL_USB		0x0c03
-#define PCI_CLASS_SERIAL_FIBER		0x0c04
-
-#define PCI_CLASS_OTHERS		0xff
-
-/* Several ID's we need in the library */
-
-#define PCI_VENDOR_ID_INTEL		0x8086
-#define PCI_VENDOR_ID_COMPAQ		0x0e11
Index: pace/lib/pci/i386-ports.c
===================================================================
--- uspace/lib/pci/i386-ports.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,274 +1,0 @@
-/*
- *	The PCI Library -- Direct Configuration access via i386 Ports
- *
- *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <unistd.h>
-
-#include "internal.h"
-
-static inline void outb(u8 b, u16 port)
-{
-	asm volatile ("outb %0, %1\n" :: "a" (b), "d" (port));
-}
-
-static inline void outw(u16 w, u16 port)
-{
-	asm volatile ("outw %0, %1\n" :: "a" (w), "d" (port));
-}
-
-static inline void outl(u32 l, u16 port)
-{
-	asm volatile ("outl %0, %1\n" :: "a" (l), "d" (port));
-}
-
-static inline u8 inb(u16 port)
-{
-	u8 val;
-
-	asm volatile ("inb %1, %0 \n" : "=a" (val) : "d"(port));
-	return val;
-}
-
-static inline u16 inw(u16 port)
-{
-	u16 val;
-
-	asm volatile ("inw %1, %0 \n" : "=a" (val) : "d"(port));
-	return val;
-}
-
-static inline u32 inl(u16 port)
-{
-	u32 val;
-
-	asm volatile ("inl %1, %0 \n" : "=a" (val) : "d"(port));
-	return val;
-}
-
-static void conf12_init(struct pci_access *a)
-{
-}
-
-static void conf12_cleanup(struct pci_access *a UNUSED)
-{
-}
-
-/*
- * Before we decide to use direct hardware access mechanisms, we try to do some
- * trivial checks to ensure it at least _seems_ to be working -- we just test
- * whether bus 00 contains a host bridge (this is similar to checking
- * techniques used in XFree86, but ours should be more reliable since we
- * attempt to make use of direct access hints provided by the PCI BIOS).
- *
- * This should be close to trivial, but it isn't, because there are buggy
- * chipsets (yes, you guessed it, by Intel and Compaq) that have no class ID.
- */
-
-static int intel_sanity_check(struct pci_access *a, struct pci_methods *m)
-{
-	struct pci_dev d;
-
-	a->debug("...sanity check");
-	d.bus = 0;
-	d.func = 0;
-	for (d.dev = 0; d.dev < 32; d.dev++) {
-		u16 class, vendor;
-		if ((m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
-			 sizeof(class))
-		    && (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST)
-			|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)))
-		    || (m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
-			       sizeof(vendor))
-		    && (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL)
-			|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))) {
-			a->debug("...outside the Asylum at 0/%02x/0",
-				 d.dev);
-			return 1;
-		}
-	}
-	a->debug("...insane");
-	return 0;
-}
-
-/*
- *	Configuration type 1
- */
-
-#define CONFIG_CMD(bus, device_fn, where)   (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3))
-
-static int conf1_detect(struct pci_access *a)
-{
-	unsigned int tmp;
-	int res = 0;
-
-	outb(0x01, 0xCFB);
-	tmp = inl(0xCF8);
-	outl(0x80000000, 0xCF8);
-	if (inl(0xCF8) == 0x80000000)
-		res = 1;
-	outl(tmp, 0xCF8);
-	if (res)
-		res = intel_sanity_check(a, &pm_intel_conf1);
-	return res;
-}
-
-static int conf1_read(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xcfc + (pos & 3);
-
-	if (pos >= 256)
-		return 0;
-
-	outl(0x80000000 | ((d->bus & 0xff) << 16) |
-	     (PCI_DEVFN(d->dev, d->func) << 8) | (pos & ~3), 0xcf8);
-
-	switch (len) {
-	case 1:
-		buf[0] = inb(addr);
-		break;
-	case 2:
-		((u16 *) buf)[0] = cpu_to_le16(inw(addr));
-		break;
-	case 4:
-		((u32 *) buf)[0] = cpu_to_le32(inl(addr));
-		break;
-	default:
-		return pci_generic_block_read(d, pos, buf, len);
-	}
-	return 1;
-}
-
-static int conf1_write(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xcfc + (pos & 3);
-
-	if (pos >= 256)
-		return 0;
-
-	outl(0x80000000 | ((d->bus & 0xff) << 16) |
-	     (PCI_DEVFN(d->dev, d->func) << 8) | (pos & ~3), 0xcf8);
-
-	switch (len) {
-	case 1:
-		outb(buf[0], addr);
-		break;
-	case 2:
-		outw(le16_to_cpu(((u16 *) buf)[0]), addr);
-		break;
-	case 4:
-		outl(le32_to_cpu(((u32 *) buf)[0]), addr);
-		break;
-	default:
-		return pci_generic_block_write(d, pos, buf, len);
-	}
-	return 1;
-}
-
-/*
- *	Configuration type 2. Obsolete and brain-damaged, but existing.
- */
-
-static int conf2_detect(struct pci_access *a)
-{
-	/* This is ugly and tends to produce false positives. Beware. */
-	outb(0x00, 0xCFB);
-	outb(0x00, 0xCF8);
-	outb(0x00, 0xCFA);
-	if (inb(0xCF8) == 0x00 && inb(0xCFA) == 0x00)
-		return intel_sanity_check(a, &pm_intel_conf2);
-	else
-		return 0;
-}
-
-static int conf2_read(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xc000 | (d->dev << 8) | pos;
-
-	if (pos >= 256)
-		return 0;
-
-	if (d->dev >= 16)
-		/* conf2 supports only 16 devices per bus */
-		return 0;
-	outb((d->func << 1) | 0xf0, 0xcf8);
-	outb(d->bus, 0xcfa);
-	switch (len) {
-	case 1:
-		buf[0] = inb(addr);
-		break;
-	case 2:
-		((u16 *) buf)[0] = cpu_to_le16(inw(addr));
-		break;
-	case 4:
-		((u32 *) buf)[0] = cpu_to_le32(inl(addr));
-		break;
-	default:
-		outb(0, 0xcf8);
-		return pci_generic_block_read(d, pos, buf, len);
-	}
-	outb(0, 0xcf8);
-	return 1;
-}
-
-static int conf2_write(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xc000 | (d->dev << 8) | pos;
-
-	if (pos >= 256)
-		return 0;
-
-	if (d->dev >= 16)
-		d->access->error("conf2_write: only first 16 devices exist.");
-	outb((d->func << 1) | 0xf0, 0xcf8);
-	outb(d->bus, 0xcfa);
-	switch (len) {
-	case 1:
-		outb(buf[0], addr);
-		break;
-	case 2:
-		outw(le16_to_cpu(*(u16 *) buf), addr);
-		break;
-	case 4:
-		outl(le32_to_cpu(*(u32 *) buf), addr);
-		break;
-	default:
-		outb(0, 0xcf8);
-		return pci_generic_block_write(d, pos, buf, len);
-	}
-	outb(0, 0xcf8);
-	return 1;
-}
-
-struct pci_methods pm_intel_conf1 = {
-	"Intel-conf1",
-	NULL,			/* config */
-	conf1_detect,
-	conf12_init,
-	conf12_cleanup,
-	pci_generic_scan,
-	pci_generic_fill_info,
-	conf1_read,
-	conf1_write,
-	NULL,			/* init_dev */
-	NULL			/* cleanup_dev */
-};
-
-struct pci_methods pm_intel_conf2 = {
-	"Intel-conf2",
-	NULL,			/* config */
-	conf2_detect,
-	conf12_init,
-	conf12_cleanup,
-	pci_generic_scan,
-	pci_generic_fill_info,
-	conf2_read,
-	conf2_write,
-	NULL,			/* init_dev */
-	NULL			/* cleanup_dev */
-};
Index: pace/lib/pci/internal.h
===================================================================
--- uspace/lib/pci/internal.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- *	The PCI Library -- Internal Stuff
- *
- *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include "pci.h"
-#include "sysdep.h"
-
-struct pci_methods {
-	const char *name;
-	void (*config) (struct pci_access *);
-	int (*detect) (struct pci_access *);
-	void (*init) (struct pci_access *);
-	void (*cleanup) (struct pci_access *);
-	void (*scan) (struct pci_access *);
-	int (*fill_info) (struct pci_dev *, int flags);
-	int (*read) (struct pci_dev *, int pos, byte * buf, int len);
-	int (*write) (struct pci_dev *, int pos, byte * buf, int len);
-	void (*init_dev) (struct pci_dev *);
-	void (*cleanup_dev) (struct pci_dev *);
-};
-
-void pci_generic_scan_bus(struct pci_access *, byte * busmap, int bus);
-void pci_generic_scan(struct pci_access *);
-int pci_generic_fill_info(struct pci_dev *, int flags);
-int pci_generic_block_read(struct pci_dev *, int pos, byte * buf, int len);
-int pci_generic_block_write(struct pci_dev *, int pos, byte * buf,
-			    int len);
-
-void *pci_malloc(struct pci_access *, int);
-void pci_mfree(void *);
-
-struct pci_dev *pci_alloc_dev(struct pci_access *);
-int pci_link_dev(struct pci_access *, struct pci_dev *);
-
-extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc,
-    pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device,
-    pm_dump, pm_linux_sysfs;
Index: pace/lib/pci/names.c
===================================================================
--- uspace/lib/pci/names.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,456 +1,0 @@
-/*
- *	The PCI Library -- ID to Name Translation
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <str.h>
-#include <errno.h>
-
-#include "internal.h"
-#include "pci_ids.h"
-
-struct id_entry {
-	struct id_entry *next;
-	u32 id12, id34;
-	byte cat;
-	byte name[1];
-};
-
-enum id_entry_type {
-	ID_UNKNOWN,
-	ID_VENDOR,
-	ID_DEVICE,
-	ID_SUBSYSTEM,
-	ID_GEN_SUBSYSTEM,
-	ID_CLASS,
-	ID_SUBCLASS,
-	ID_PROGIF
-};
-
-struct id_bucket {
-	struct id_bucket *next;
-	unsigned int full;
-};
-
-#define MAX_LINE 1024
-#define BUCKET_SIZE 8192
-#define HASH_SIZE 4099
-
-#ifdef __GNUC__
-#define BUCKET_ALIGNMENT __alignof__(struct id_bucket)
-#else
-union id_align {
-	struct id_bucket *next;
-	unsigned int full;
-};
-#define BUCKET_ALIGNMENT sizeof(union id_align)
-#endif
-#define BUCKET_ALIGN(n) ((n)+BUCKET_ALIGNMENT-(n)%BUCKET_ALIGNMENT)
-
-static void *id_alloc(struct pci_access *a, unsigned int size)
-{
-	struct id_bucket *buck = a->current_id_bucket;
-	unsigned int pos;
-	if (!buck || buck->full + size > BUCKET_SIZE) {
-		buck = pci_malloc(a, BUCKET_SIZE);
-		buck->next = a->current_id_bucket;
-		a->current_id_bucket = buck;
-		buck->full = BUCKET_ALIGN(sizeof(struct id_bucket));
-	}
-	pos = buck->full;
-	buck->full = BUCKET_ALIGN(buck->full + size);
-	return (byte *) buck + pos;
-}
-
-static inline u32 id_pair(unsigned int x, unsigned int y)
-{
-	return ((x << 16) | y);
-}
-
-static inline unsigned int id_hash(int cat, u32 id12, u32 id34)
-{
-	unsigned int h;
-
-	h = id12 ^ (id34 << 3) ^ (cat << 5);
-	return h % HASH_SIZE;
-}
-
-static struct id_entry *id_lookup(struct pci_access *a, int cat, int id1,
-				  int id2, int id3, int id4)
-{
-	struct id_entry *n;
-	u32 id12 = id_pair(id1, id2);
-	u32 id34 = id_pair(id3, id4);
-
-	n = a->id_hash[id_hash(cat, id12, id34)];
-	while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
-		n = n->next;
-	return n;
-}
-
-static int id_insert(struct pci_access *a, int cat, int id1, int id2,
-		     int id3, int id4, byte * text)
-{
-	u32 id12 = id_pair(id1, id2);
-	u32 id34 = id_pair(id3, id4);
-	unsigned int h = id_hash(cat, id12, id34);
-	struct id_entry *n = a->id_hash[h];
-	int len = str_size((char *) text);
-
-	while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
-		n = n->next;
-	if (n)
-		return 1;
-	n = id_alloc(a, sizeof(struct id_entry) + len);
-	n->id12 = id12;
-	n->id34 = id34;
-	n->cat = cat;
-	memcpy(n->name, text, len + 1);
-	n->next = a->id_hash[h];
-	a->id_hash[h] = n;
-	return 0;
-}
-
-static int id_hex(byte * p, int cnt)
-{
-	int x = 0;
-	while (cnt--) {
-		x <<= 4;
-		if (*p >= '0' && *p <= '9')
-			x += (*p - '0');
-		else if (*p >= 'a' && *p <= 'f')
-			x += (*p - 'a' + 10);
-		else if (*p >= 'A' && *p <= 'F')
-			x += (*p - 'A' + 10);
-		else
-			return -1;
-		p++;
-	}
-	return x;
-}
-
-static inline int id_white_p(int c)
-{
-	return (c == ' ') || (c == '\t');
-}
-
-static const char *id_parse_list(struct pci_access *a, int *lino)
-{
-	byte *line;
-	byte *p;
-	int id1 = 0, id2 = 0, id3 = 0, id4 = 0;
-	int cat = -1;
-	int nest;
-	static const char parse_error[] = "Parse error";
-	size_t i;
-
-	*lino = 0;
-	for (i = 0; i < sizeof(pci_ids) / sizeof(char *); i++) {
-		line = (byte *) pci_ids[i];
-		(*lino)++;
-		p = line;
-		while (*p)
-			p++;
-		if (p > line && (p[-1] == ' ' || p[-1] == '\t'))
-			*--p = 0;
-
-		p = line;
-		while (id_white_p(*p))
-			p++;
-		if (!*p || *p == '#')
-			continue;
-
-		p = line;
-		while (*p == '\t')
-			p++;
-		nest = p - line;
-
-		if (!nest) {	/* Top-level entries */
-			if (p[0] == 'C' && p[1] == ' ') {	/* Class block */
-				if ((id1 = id_hex(p + 2, 2)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				cat = ID_CLASS;
-				p += 5;
-			} else if (p[0] == 'S' && p[1] == ' ') {	/* Generic subsystem block */
-				if ((id1 = id_hex(p + 2, 4)) < 0 || p[6])
-					return parse_error;
-				if (!id_lookup(a, ID_VENDOR, id1, 0, 0, 0))
-					return "Vendor does not exist";
-				cat = ID_GEN_SUBSYSTEM;
-				continue;
-			} else if (p[0] >= 'A' && p[0] <= 'Z' && p[1] == ' ') {	/* Unrecognized block (RFU) */
-				cat = ID_UNKNOWN;
-				continue;
-			} else {	/* Vendor ID */
-
-				if ((id1 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				cat = ID_VENDOR;
-				p += 5;
-			}
-			id2 = id3 = id4 = 0;
-		} else if (cat == ID_UNKNOWN)	/* Nested entries in RFU blocks are skipped */
-			continue;
-		else if (nest == 1)	/* Nesting level 1 */
-			switch (cat) {
-			case ID_VENDOR:
-			case ID_DEVICE:
-			case ID_SUBSYSTEM:
-				if ((id2 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				p += 5;
-				cat = ID_DEVICE;
-				id3 = id4 = 0;
-				break;
-			case ID_GEN_SUBSYSTEM:
-				if ((id2 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				p += 5;
-				id3 = id4 = 0;
-				break;
-			case ID_CLASS:
-			case ID_SUBCLASS:
-			case ID_PROGIF:
-				if ((id2 = id_hex(p, 2)) < 0 || !id_white_p(p[2]))
-					return parse_error;
-				p += 3;
-				cat = ID_SUBCLASS;
-				id3 = id4 = 0;
-				break;
-			default:
-				return parse_error;
-		} else if (nest == 2)	/* Nesting level 2 */
-			switch (cat) {
-			case ID_DEVICE:
-			case ID_SUBSYSTEM:
-				if ((id3 = id_hex(p, 4)) < 0 || !id_white_p(p[4])
-				    || (id4 = id_hex(p + 5, 4)) < 0 || !id_white_p(p[9]))
-					return parse_error;
-				p += 10;
-				cat = ID_SUBSYSTEM;
-				break;
-			case ID_CLASS:
-			case ID_SUBCLASS:
-			case ID_PROGIF:
-				if ((id3 = id_hex(p, 2)) < 0 || !id_white_p(p[2]))
-					return parse_error;
-				p += 3;
-				cat = ID_PROGIF;
-				id4 = 0;
-				break;
-			default:
-				return parse_error;
-		} else		/* Nesting level 3 or more */
-			return parse_error;
-		while (id_white_p(*p))
-			p++;
-		if (!*p)
-			return parse_error;
-		if (id_insert(a, cat, id1, id2, id3, id4, p))
-			return "Duplicate entry";
-	}
-	return NULL;
-}
-
-int pci_load_name_list(struct pci_access *a)
-{
-	int lino;
-	const char *err;
-
-	pci_free_name_list(a);
-	a->id_hash = pci_malloc(a, sizeof(struct id_entry *) * HASH_SIZE);
-	bzero(a->id_hash, sizeof(struct id_entry *) * HASH_SIZE);
-	err = id_parse_list(a, &lino);
-	if (err)
-		a->error("%s at %s, element %d\n", err, "pci_ids.h", lino);
-	return 1;
-}
-
-void pci_free_name_list(struct pci_access *a)
-{
-	pci_mfree(a->id_hash);
-	a->id_hash = NULL;
-	while (a->current_id_bucket) {
-		struct id_bucket *buck = a->current_id_bucket;
-		a->current_id_bucket = buck->next;
-		pci_mfree(buck);
-	}
-}
-
-static struct id_entry *id_lookup_subsys(struct pci_access *a, int iv,
-					 int id, int isv, int isd)
-{
-	struct id_entry *d = NULL;
-	if (iv > 0 && id > 0)	/* Per-device lookup */
-		d = id_lookup(a, ID_SUBSYSTEM, iv, id, isv, isd);
-	if (!d)			/* Generic lookup */
-		d = id_lookup(a, ID_GEN_SUBSYSTEM, isv, isd, 0, 0);
-	if (!d && iv == isv && id == isd)	/* Check for subsystem == device */
-		d = id_lookup(a, ID_DEVICE, iv, id, 0, 0);
-	return d;
-}
-
-const char *pci_lookup_name(struct pci_access *a, char *buf, int size, int flags,
-		      ...)
-{
-	va_list args;
-	int num, res, synth;
-	struct id_entry *v, *d, *cls, *pif;
-	int iv, id, isv, isd, icls, ipif;
-
-	va_start(args, flags);
-
-	num = 0;
-	if ((flags & PCI_LOOKUP_NUMERIC) || a->numeric_ids) {
-		flags &= ~PCI_LOOKUP_NUMERIC;
-		num = 1;
-	} else if (!a->id_hash) {
-		if (!pci_load_name_list(a))
-			num = a->numeric_ids = 1;
-	}
-
-	if (flags & PCI_LOOKUP_NO_NUMBERS) {
-		flags &= ~PCI_LOOKUP_NO_NUMBERS;
-		synth = 0;
-		if (num)
-			return NULL;
-	} else
-		synth = 1;
-
-	switch (flags) {
-	case PCI_LOOKUP_VENDOR:
-		iv = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", iv);
-		else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0)
-			return (char *) v->name;
-		else
-			res = snprintf(buf, size, "Unknown vendor %04x", iv);
-		break;
-	case PCI_LOOKUP_DEVICE:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", id);
-		else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0)
-			return (char *) d->name;
-		else if (synth)
-			res = snprintf(buf, size, "Unknown device %04x", id);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x:%04x", iv, id);
-		else {
-			v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0);
-			d = id_lookup(a, ID_DEVICE, iv, id, 0, 0);
-			if (v && d)
-				res = snprintf(buf, size, "%s %s", v->name,
-					     d->name);
-			else if (!synth)
-				return NULL;
-			else if (!v)
-				res = snprintf(buf, size, "Unknown device %04x:%04x", iv, id);
-			else	/* !d */
-				res = snprintf(buf, size, "%s Unknown device %04x", v->name, id);
-		}
-		break;
-	case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_VENDOR:
-		isv = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", isv);
-		else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0)
-			return (char *) v->name;
-		else if (synth)
-			res = snprintf(buf, size, "Unknown vendor %04x", isv);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_DEVICE:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		isv = va_arg(args, int);
-		isd = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", isd);
-		else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0)
-			return (char *) d->name;
-		else if (synth)
-			res = snprintf(buf, size, "Unknown device %04x", isd);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE | PCI_LOOKUP_SUBSYSTEM:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		isv = va_arg(args, int);
-		isd = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x:%04x", isv, isd);
-		else {
-			v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0);
-			d = id_lookup_subsys(a, iv, id, isv, isd);
-			if (v && d)
-				res = snprintf(buf, size, "%s %s", v->name, d->name);
-			else if (!synth)
-				return NULL;
-			else if (!v)
-				res = snprintf(buf, size, "Unknown device %04x:%04x", isv, isd);
-			else	/* !d */
-				res = snprintf(buf, size, "%s Unknown device %04x", v->name, isd);
-		}
-		break;
-	case PCI_LOOKUP_CLASS:
-		icls = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", icls);
-		else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0)
-			return (char *) cls->name;
-		else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0)
-			res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
-		else if (synth)
-			res = snprintf(buf, size, "Class %04x", icls);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_PROGIF:
-		icls = va_arg(args, int);
-		ipif = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%02x", ipif);
-		else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0)
-			return (char *) pif->name;
-		else if (icls == 0x0101 && !(ipif & 0x70)) {
-			/* IDE controllers have complex prog-if semantics */
-			res = snprintf(buf, size, "%s%s%s%s%s",
-				       (ipif & 0x80) ? "Master " : "",
-				       (ipif & 0x08) ? "SecP " : "",
-				       (ipif & 0x04) ? "SecO " : "",
-				       (ipif & 0x02) ? "PriP " : "",
-				       (ipif & 0x01) ? "PriO " : "");
-			if (res > 0 && res < size)
-				buf[--res] = 0;
-		} else if (synth)
-			res = snprintf(buf, size, "ProgIf %02x", ipif);
-		else
-			return NULL;
-		break;
-	default:
-		return "<pci_lookup_name: invalid request>";
-	}
-	if (res < 0 || res >= size)
-		return "<pci_lookup_name: buffer too small>";
-	else
-		return buf;
-}
Index: pace/lib/pci/pci.h
===================================================================
--- uspace/lib/pci/pci.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/*
- *	The PCI Library
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#ifndef _PCI_LIB_H
-#define _PCI_LIB_H
-
-#include "header.h"
-#include "types.h"
-
-#define PCI_LIB_VERSION 0x020200
-
-/*
- *	PCI Access Structure
- */
-
-struct pci_methods;
-
-enum pci_access_type {
-	/* Known access methods, remember to update access.c as well */
-	PCI_ACCESS_I386_TYPE1,	/* i386 ports, type 1 (params: none) */
-	PCI_ACCESS_I386_TYPE2,	/* i386 ports, type 2 (params: none) */
-	PCI_ACCESS_MAX
-};
-
-struct pci_access {
-	/* Options you can change: */
-	unsigned int method;	/* Access method */
-	char *method_params[PCI_ACCESS_MAX];	/* Parameters for the methods */
-	int writeable;		/* Open in read/write mode */
-	int buscentric;		/* Bus-centric view of the world */
-	int numeric_ids;	/* Don't resolve device IDs to names */
-	int debugging;		/* Turn on debugging messages */
-
-	/* Functions you can override: */
-	void (*error) (const char *msg, ...);	/* Write error message and quit */
-	void (*warning) (const char *msg, ...);	/* Write a warning message */
-	void (*debug) (const char *msg, ...);	/* Write a debugging message */
-
-	struct pci_dev *devices;	/* Devices found on this bus */
-
-	/* Fields used internally: */
-	struct pci_methods *methods;
-	struct id_entry **id_hash;	/* names.c */
-	struct id_bucket *current_id_bucket;
-};
-
-/* Initialize PCI access */
-struct pci_access *pci_alloc(void);
-void pci_init(struct pci_access *);
-void pci_cleanup(struct pci_access *);
-
-/* Scanning of devices */
-void pci_scan_bus(struct pci_access *acc);
-struct pci_dev *pci_get_dev(struct pci_access *acc, int domain, int bus, int dev, int func);	/* Raw access to specified device */
-void pci_free_dev(struct pci_dev *);
-
-/*
- *	Devices
- */
-
-struct pci_dev {
-	struct pci_dev *next;	/* Next device in the chain */
-	u16 domain;		/* PCI domain (host bridge) */
-	u8 bus, dev, func;	/* Bus inside domain, device and function */
-
-	/* These fields are set by pci_fill_info() */
-	int known_fields;	/* Set of info fields already known */
-	u16 vendor_id, device_id;	/* Identity of the device */
-	int irq;		/* IRQ number */
-	pciaddr_t base_addr[6];	/* Base addresses */
-	pciaddr_t size[6];	/* Region sizes */
-	pciaddr_t rom_base_addr;	/* Expansion ROM base address */
-	pciaddr_t rom_size;	/* Expansion ROM size */
-
-	/* Fields used internally: */
-	struct pci_access *access;
-	struct pci_methods *methods;
-	u8 *cache;		/* Cached config registers */
-	int cache_len;
-	int hdrtype;		/* Cached low 7 bits of header type, -1 if unknown */
-	void *aux;		/* Auxillary data */
-};
-
-#define PCI_ADDR_IO_MASK (~(pciaddr_t) 0x3)
-#define PCI_ADDR_MEM_MASK (~(pciaddr_t) 0xf)
-
-u8 pci_read_byte(struct pci_dev *, int pos);	/* Access to configuration space */
-u16 pci_read_word(struct pci_dev *, int pos);
-u32 pci_read_long(struct pci_dev *, int pos);
-int pci_read_block(struct pci_dev *, int pos, u8 * buf, int len);
-int pci_write_byte(struct pci_dev *, int pos, u8 data);
-int pci_write_word(struct pci_dev *, int pos, u16 data);
-int pci_write_long(struct pci_dev *, int pos, u32 data);
-int pci_write_block(struct pci_dev *, int pos, u8 * buf, int len);
-
-int pci_fill_info(struct pci_dev *, int flags);	/* Fill in device information */
-
-#define PCI_FILL_IDENT		1
-#define PCI_FILL_IRQ		2
-#define PCI_FILL_BASES		4
-#define PCI_FILL_ROM_BASE	8
-#define PCI_FILL_SIZES		16
-#define PCI_FILL_RESCAN		0x10000
-
-void pci_setup_cache(struct pci_dev *, u8 * cache, int len);
-
-/*
- *	Conversion of PCI ID's to names (according to the pci.ids file)
- *
- *	Call pci_lookup_name() to identify different types of ID's:
- *
- *	VENDOR				(vendorID) -> vendor
- *	DEVICE				(vendorID, deviceID) -> device
- *	VENDOR | DEVICE			(vendorID, deviceID) -> combined vendor and device
- *	SUBSYSTEM | VENDOR		(subvendorID) -> subsystem vendor
- *	SUBSYSTEM | DEVICE		(vendorID, deviceID, subvendorID, subdevID) -> subsystem device
- *	SUBSYSTEM | VENDOR | DEVICE	(vendorID, deviceID, subvendorID, subdevID) -> combined subsystem v+d
- *	SUBSYSTEM | ...			(-1, -1, subvendorID, subdevID) -> generic subsystem
- *	CLASS				(classID) -> class
- *	PROGIF				(classID, progif) -> programming interface
- */
-
-const char *pci_lookup_name(struct pci_access *a, char *buf, int size,
-    int flags, ...);
-
-int pci_load_name_list(struct pci_access *a);	/* Called automatically by pci_lookup_*() when needed; returns success */
-void pci_free_name_list(struct pci_access *a);	/* Called automatically by pci_cleanup() */
-
-enum pci_lookup_mode {
-	PCI_LOOKUP_VENDOR = 1,	/* Vendor name (args: vendorID) */
-	PCI_LOOKUP_DEVICE = 2,	/* Device name (args: vendorID, deviceID) */
-	PCI_LOOKUP_CLASS = 4,	/* Device class (args: classID) */
-	PCI_LOOKUP_SUBSYSTEM = 8,
-	PCI_LOOKUP_PROGIF = 16,	/* Programming interface (args: classID, prog_if) */
-	PCI_LOOKUP_NUMERIC = 0x10000,	/* Want only formatted numbers; default if access->numeric_ids is set */
-	PCI_LOOKUP_NO_NUMBERS = 0x20000	/* Return NULL if not found in the database; default is to print numerically */
-};
-
-#endif
Index: pace/lib/pci/pci_ids.h
===================================================================
--- uspace/lib/pci/pci_ids.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,11934 +1,0 @@
-/* DO NOT EDIT, THIS FILE IS AUTOMATICALLY GENERATED */
-const char *pci_ids[] = {
-"0000  Gammagraphx, Inc.",
-"001a  Ascend Communications, Inc.",
-"0033  Paradyne corp.",
-"003d  Lockheed Martin-Marietta Corp",
-"0059  Tiger Jet Network Inc. (Wrong ID)",
-"0070  Hauppauge computer works Inc.",
-"0071  Nebula Electronics Ltd.",
-"0095  Silicon Image, Inc. (Wrong ID)",
-"	0680  Ultra ATA/133 IDE RAID CONTROLLER CARD",
-"00a7  Teles AG (Wrong ID)",
-"00f5  BFG Technologies, Inc.",
-"0100  Ncipher Corp Ltd",
-"0123  General Dynamics",
-"018a  LevelOne",
-"	0106  FPC-0106TX misprogrammed [RTL81xx]",
-"021b  Compaq Computer Corporation",
-"	8139  HNE-300 (RealTek RTL8139c) [iPaq Networking]",
-"0270  Hauppauge computer works Inc. (Wrong ID)",
-"0291  Davicom Semiconductor, Inc.",
-"	8212  DM9102A(DM9102AE, SM9102AF) Ethernet 100/10 MBit(Rev 40)",
-"02ac  SpeedStream",
-"	1012  1012 PCMCIA 10/100 Ethernet Card [RTL81xx]",
-"0315  SK-Electronics Co., Ltd.",
-"0357  TTTech AG",
-"	000a  TTP-Monitoring Card V2.0",
-"0432  SCM Microsystems, Inc.",
-"	0001  Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet]",
-"045e  Microsoft",
-"	006e  MN-510 802.11b wireless USB paddle",
-"	00c2  MN-710 wireless USB paddle",
-"04cf  Myson Century, Inc",
-"	8818  CS8818 USB2.0-to-ATAPI Bridge Controller with Embedded PHY",
-"050d  Belkin",
-"	0109  F5U409-CU USB/Serial Portable Adapter",
-"	7050  F5D7050 802.11g Wireless USB Adapter",
-"05e3  CyberDoor",
-"	0701  CBD516",
-"066f  Sigmatel Inc.",
-"	3410  SMTP3410",
-"	3500  SMTP3500",
-"0675  Dynalink",
-"	1700  IS64PH ISDN Adapter",
-"	1702  IS64PH ISDN Adapter",
-"	1703  ISDN Adapter (PCI Bus, DV, W)",
-"	1704  ISDN Adapter (PCI Bus, D, C)",
-"067b  Prolific Technology, Inc.",
-"	3507  PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller",
-"0721  Sapphire, Inc.",
-"07e2  ELMEG Communication Systems GmbH",
-"0925  VIA Technologies, Inc. (Wrong ID)",
-"09c1  Arris",
-"	0704  CM 200E Cable Modem",
-"0a89  BREA Technologies Inc",
-"0b0b  Rhino Equiment Corp.",
-"	0105  Rhino R1T1",
-"	0205  Rhino R4FXO",
-"	0305  Rhino R4T1",
-"	0405  Rhino R8FXX",
-"	0505  Rhino R24FXX",
-"	0506  Rhino R2T1",
-"0b49  ASCII Corporation",
-"	064f  Trance Vibrator",
-"0e11  Compaq Computer Corporation",
-"	0001  PCI to EISA Bridge",
-"	0002  PCI to ISA Bridge",
-"	0046  Smart Array 64xx",
-"		0e11 409a  Smart Array 641",
-"		0e11 409b  Smart Array 642",
-"		0e11 409c  Smart Array 6400",
-"		0e11 409d  Smart Array 6400 EM",
-"	0049  NC7132 Gigabit Upgrade Module",
-"	004a  NC6136 Gigabit Server Adapter",
-"	005a  Remote Insight II board - Lights-Out",
-"	007c  NC7770 1000BaseTX",
-"	007d  NC6770 1000BaseTX",
-"	0085  NC7780 1000BaseTX",
-"	00b1  Remote Insight II board - PCI device",
-"	00bb  NC7760",
-"	00ca  NC7771",
-"	00cb  NC7781",
-"	00cf  NC7772",
-"	00d0  NC7782",
-"	00d1  NC7783",
-"	00e3  NC7761",
-"	0508  Netelligent 4/16 Token Ring",
-"	1000  Triflex/Pentium Bridge, Model 1000",
-"	2000  Triflex/Pentium Bridge, Model 2000",
-"	3032  QVision 1280/p",
-"	3033  QVision 1280/p",
-"	3034  QVision 1280/p",
-"	4000  4000 [Triflex]",
-"	4030  SMART-2/P",
-"	4031  SMART-2SL",
-"	4032  Smart Array 3200",
-"	4033  Smart Array 3100ES",
-"	4034  Smart Array 221",
-"	4040  Integrated Array",
-"	4048  Compaq Raid LC2",
-"	4050  Smart Array 4200",
-"	4051  Smart Array 4250ES",
-"	4058  Smart Array 431",
-"	4070  Smart Array 5300",
-"	4080  Smart Array 5i",
-"	4082  Smart Array 532",
-"	4083  Smart Array 5312",
-"	4091  Smart Array 6i",
-"	409a  Smart Array 641",
-"	409b  Smart Array 642",
-"	409c  Smart Array 6400",
-"	409d  Smart Array 6400 EM",
-"	6010  HotPlug PCI Bridge 6010",
-"	7020  USB Controller",
-"	a0ec  Fibre Channel Host Controller",
-"	a0f0  Advanced System Management Controller",
-"	a0f3  Triflex PCI to ISA Bridge",
-"	a0f7  PCI Hotplug Controller",
-"		8086 002a  PCI Hotplug Controller A",
-"		8086 002b  PCI Hotplug Controller B",
-"	a0f8  ZFMicro Chipset USB",
-"	a0fc  FibreChannel HBA Tachyon",
-"	ae10  Smart-2/P RAID Controller",
-"		0e11 4030  Smart-2/P Array Controller",
-"		0e11 4031  Smart-2SL Array Controller",
-"		0e11 4032  Smart Array Controller",
-"		0e11 4033  Smart 3100ES Array Controller",
-"	ae29  MIS-L",
-"	ae2a  MPC",
-"	ae2b  MIS-E",
-"	ae31  System Management Controller",
-"	ae32  Netelligent 10/100 TX PCI UTP",
-"	ae33  Triflex Dual EIDE Controller",
-"	ae34  Netelligent 10 T PCI UTP",
-"	ae35  Integrated NetFlex-3/P",
-"	ae40  Netelligent Dual 10/100 TX PCI UTP",
-"	ae43  Netelligent Integrated 10/100 TX UTP",
-"	ae69  CETUS-L",
-"	ae6c  Northstar",
-"	ae6d  NorthStar CPU to PCI Bridge",
-"	b011  Netelligent 10/100 TX Embedded UTP",
-"	b012  Netelligent 10 T/2 PCI UTP/Coax",
-"	b01e  NC3120 Fast Ethernet NIC",
-"	b01f  NC3122 Fast Ethernet NIC",
-"	b02f  NC1120 Ethernet NIC",
-"	b030  Netelligent 10/100 TX UTP",
-"	b04a  10/100 TX PCI Intel WOL UTP Controller",
-"	b060  Smart Array 5300 Controller",
-"	b0c6  NC3161 Fast Ethernet NIC",
-"	b0c7  NC3160 Fast Ethernet NIC",
-"	b0d7  NC3121 Fast Ethernet NIC",
-"	b0dd  NC3131 Fast Ethernet NIC",
-"	b0de  NC3132 Fast Ethernet Module",
-"	b0df  NC6132 Gigabit Module",
-"	b0e0  NC6133 Gigabit Module",
-"	b0e1  NC3133 Fast Ethernet Module",
-"	b123  NC6134 Gigabit NIC",
-"	b134  NC3163 Fast Ethernet NIC",
-"	b13c  NC3162 Fast Ethernet NIC",
-"	b144  NC3123 Fast Ethernet NIC",
-"	b163  NC3134 Fast Ethernet NIC",
-"	b164  NC3165 Fast Ethernet Upgrade Module",
-"	b178  Smart Array 5i/532",
-"		0e11 4080  Smart Array 5i",
-"		0e11 4082  Smart Array 532",
-"		0e11 4083  Smart Array 5312",
-"	b1a4  NC7131 Gigabit Server Adapter",
-"	b200  Memory Hot-Plug Controller",
-"	b203  Integrated Lights Out Controller",
-"	b204  Integrated Lights Out  Processor",
-"	f130  NetFlex-3/P ThunderLAN 1.0",
-"	f150  NetFlex-3/P ThunderLAN 2.3",
-"0e21  Cowon Systems, Inc.",
-"0e55  HaSoTec GmbH",
-"1000  LSI Logic / Symbios Logic",
-"	0001  53c810",
-"		1000 1000  LSI53C810AE PCI to SCSI I/O Processor",
-"	0002  53c820",
-"	0003  53c825",
-"		1000 1000  LSI53C825AE PCI to SCSI I/O Processor (Ultra Wide)",
-"	0004  53c815",
-"	0005  53c810AP",
-"	0006  53c860",
-"		1000 1000  LSI53C860E PCI to Ultra SCSI I/O Processor",
-"	000a  53c1510",
-"		1000 1000  LSI53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Nonintelligent mode)",
-"	000b  53C896/897",
-"		0e11 6004  EOB003 Series SCSI host adapter",
-"		1000 1000  LSI53C896/7 PCI to Dual Channel Ultra2 SCSI Multifunction Controller",
-"		1000 1010  LSI22910 PCI to Dual Channel Ultra2 SCSI host adapter",
-"		1000 1020  LSI21002 PCI to Dual Channel Ultra2 SCSI host adapter",
-"		13e9 1000  6221L-4U",
-"	000c  53c895",
-"		1000 1010  LSI8951U PCI to Ultra2 SCSI host adapter",
-"		1000 1020  LSI8952U PCI to Ultra2 SCSI host adapter",
-"		1de1 3906  DC-390U2B SCSI adapter",
-"		1de1 3907  DC-390U2W",
-"	000d  53c885",
-"	000f  53c875",
-"		0e11 7004  Embedded Ultra Wide SCSI Controller",
-"		1000 1000  LSI53C876/E PCI to Dual Channel SCSI Controller",
-"		1000 1010  LSI22801 PCI to Dual Channel Ultra SCSI host adapter",
-"		1000 1020  LSI22802 PCI to Dual Channel Ultra SCSI host adapter",
-"		1092 8760  FirePort 40 Dual SCSI Controller",
-"		1de1 3904  DC390F/U Ultra Wide SCSI Adapter",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1050  CT7 mainboard",
-"	0010  53C1510",
-"		0e11 4040  Integrated Array Controller",
-"		0e11 4048  RAID LC2 Controller",
-"		1000 1000  53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Intelligent mode)",
-"	0012  53c895a",
-"		1000 1000  LSI53C895A PCI to Ultra2 SCSI Controller",
-"	0013  53c875a",
-"		1000 1000  LSI53C875A PCI to Ultra SCSI Controller",
-"	0020  53c1010 Ultra3 SCSI Adapter",
-"		1000 1000  LSI53C1010-33 PCI to Dual Channel Ultra160 SCSI Controller",
-"		1de1 1020  DC-390U3W",
-"	0021  53c1010 66MHz  Ultra3 SCSI Adapter",
-"		1000 1000  LSI53C1000/1000R/1010R/1010-66 PCI to Ultra160 SCSI Controller",
-"		1000 1010  Asus TR-DLS onboard 53C1010-66",
-"		124b 1070  PMC-USCSI3",
-"		4c53 1080  CT8 mainboard",
-"		4c53 1300  P017 mezzanine (32-bit PMC)",
-"		4c53 1310  P017 mezzanine (64-bit PMC)",
-"	0030  53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"		0e11 00da  ProLiant ML 350",
-"		1028 0123  PowerEdge 2600",
-"		1028 014a  PowerEdge 1750",
-"		1028 016c  PowerEdge 1850 MPT Fusion SCSI/RAID (Perc 4)",
-"		1028 0183  PowerEdge 1800",
-"		1028 1010  LSI U320 SCSI Controller",
-"		124b 1170  PMC-USCSI320",
-"		1734 1052  Primergy RX300 S2",
-"	0031  53c1030ZC PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"	0032  53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"		1000 1000  LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller",
-"	0033  1030ZC_53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"	0040  53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"		1000 0033  MegaRAID SCSI 320-2XR",
-"		1000 0066  MegaRAID SCSI 320-2XRWS",
-"	0041  53C1035ZC PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"	0050  SAS1064 PCI-X Fusion-MPT SAS",
-"	0054  SAS1068 PCI-X Fusion-MPT SAS",
-"	0056  SAS1064E PCI-Express Fusion-MPT SAS",
-"	0058  SAS1068E PCI-Express Fusion-MPT SAS",
-"	005a  SAS1066E PCI-Express Fusion-MPT SAS",
-"	005c  SAS1064A PCI-X Fusion-MPT SAS",
-"	005e  SAS1066 PCI-X Fusion-MPT SAS",
-"	0060  SAS1078 PCI-X Fusion-MPT SAS",
-"	0062  SAS1078 PCI-Express Fusion-MPT SAS",
-"		1000 0062  SAS1078 PCI-Express Fusion-MPT SAS",
-"	008f  53c875J",
-"		1092 8000  FirePort 40 SCSI Controller",
-"		1092 8760  FirePort 40 Dual SCSI Host Adapter",
-"	0407  MegaRAID",
-"		1000 0530  MegaRAID 530 SCSI 320-0X RAID Controller",
-"		1000 0531  MegaRAID 531 SCSI 320-4X RAID Controller",
-"		1000 0532  MegaRAID 532 SCSI 320-2X RAID Controller",
-"		1028 0531  PowerEdge Expandable RAID Controller 4/QC",
-"		1028 0533  PowerEdge Expandable RAID Controller 4/QC",
-"		8086 0530  MegaRAID Intel RAID Controller SRCZCRX",
-"		8086 0532  MegaRAID Intel RAID Controller SRCU42X",
-"	0408  MegaRAID",
-"		1000 0001  MegaRAID SCSI 320-1E RAID Controller",
-"		1000 0002  MegaRAID SCSI 320-2E RAID Controller",
-"		1025 004d  MegaRAID ACER ROMB-2E RAID Controller",
-"		1028 0001  PowerEdge RAID Controller PERC4e/SC",
-"		1028 0002  PowerEdge RAID Controller PERC4e/DC",
-"		1734 1065  FSC MegaRAID PCI Express ROMB",
-"		8086 0002  MegaRAID Intel RAID Controller SRCU42E",
-"	0409  MegaRAID",
-"		1000 3004  MegaRAID SATA 300-4X RAID Controller",
-"		1000 3008  MegaRAID SATA 300-8X RAID Controller",
-"		8086 3008  MegaRAID RAID Controller SRCS28X",
-"		8086 3431  MegaRAID RAID Controller Alief SROMBU42E",
-"		8086 3499  MegaRAID RAID Controller Harwich SROMBU42E",
-"	0621  FC909 Fibre Channel Adapter",
-"	0622  FC929 Fibre Channel Adapter",
-"		1000 1020  44929 O Dual Fibre Channel card",
-"	0623  FC929 LAN",
-"	0624  FC919 Fibre Channel Adapter",
-"	0625  FC919 LAN",
-"	0626  FC929X Fibre Channel Adapter",
-"		1000 1010  7202-XP-LC Dual Fibre Channel card",
-"	0627  FC929X LAN",
-"	0628  FC919X Fibre Channel Adapter",
-"	0629  FC919X LAN",
-"	0640  FC949X Fibre Channel Adapter",
-"	0642  FC939X Fibre Channel Adapter",
-"	0646  FC949ES Fibre Channel Adapter",
-"	0701  83C885 NT50 DigitalScape Fast Ethernet",
-"	0702  Yellowfin G-NIC gigabit ethernet",
-"		1318 0000  PEI100X",
-"	0804  SA2010",
-"	0805  SA2010ZC",
-"	0806  SA2020",
-"	0807  SA2020ZC",
-"	0901  61C102",
-"	1000  63C815",
-"	1960  MegaRAID",
-"		1000 0518  MegaRAID 518 SCSI 320-2 Controller",
-"		1000 0520  MegaRAID 520 SCSI 320-1 Controller",
-"		1000 0522  MegaRAID 522 i4 133 RAID Controller",
-"		1000 0523  MegaRAID SATA 150-6 RAID Controller",
-"		1000 4523  MegaRAID SATA 150-4 RAID Controller",
-"		1000 a520  MegaRAID ZCR SCSI 320-0 Controller",
-"		1028 0518  MegaRAID 518 DELL PERC 4/DC RAID Controller",
-"		1028 0520  MegaRAID 520 DELL PERC 4/SC RAID Controller",
-"		1028 0531  PowerEdge Expandable RAID Controller 4/QC",
-"		1028 0533  PowerEdge Expandable RAID Controller 4/QC",
-"		8086 0520  MegaRAIDRAID Controller SRCU41L",
-"		8086 0523  MegaRAID RAID Controller SRCS16",
-"1001  Kolter Electronic",
-"	0010  PCI 1616 Measurement card with 32 digital I/O lines",
-"	0011  OPTO-PCI Opto-Isolated digital I/O board",
-"	0012  PCI-AD/DA Analogue I/O board",
-"	0013  PCI-OPTO-RELAIS Digital I/O board with relay outputs",
-"	0014  PCI-Counter/Timer Counter Timer board",
-"	0015  PCI-DAC416 Analogue output board",
-"	0016  PCI-MFB Analogue I/O board",
-"	0017  PROTO-3 PCI Prototyping board",
-"	9100  INI-9100/9100W SCSI Host",
-"1002  ATI Technologies Inc",
-"	3150  M24 1P [Radeon Mobility X600]",
-"	3152  M22 [Radeon Mobility X300]",
-"	3154  M24 1T [FireGL M24 GL]",
-"	3e50  RV380 0x3e50 [Radeon X600]",
-"	3e54  RV380 0x3e54 [FireGL V3200]",
-"	3e70  RV380 [Radeon X600] Secondary",
-"	4136  Radeon IGP 320 M",
-"	4137  Radeon IGP330/340/350",
-"	4144  R300 AD [Radeon 9500 Pro]",
-"	4145  R300 AE [Radeon 9700 Pro]",
-"	4146  R300 AF [Radeon 9700 Pro]",
-"	4147  R300 AG [FireGL Z1/X1]",
-"	4148  R350 AH [Radeon 9800]",
-"	4149  R350 AI [Radeon 9800]",
-"	414a  R350 AJ [Radeon 9800]",
-"	414b  R350 AK [Fire GL X2]",
-"	4150  RV350 AP [Radeon 9600]",
-"		1002 0002  R9600 Pro primary (Asus OEM for HP)",
-"		1002 0003  R9600 Pro secondary (Asus OEM for HP)",
-"		1002 4722  All-in-Wonder 2006 AGP Edition",
-"		1458 4024  Giga-Byte GV-R96128D Primary",
-"		148c 2064  PowerColor R96A-C3N",
-"		148c 2066  PowerColor R96A-C3N",
-"		174b 7c19  Sapphire Atlantis Radeon 9600 Pro",
-"		174b 7c29  GC-R9600PRO Primary [Sapphire]",
-"		17ee 2002  Radeon 9600 256Mb Primary",
-"		18bc 0101  GC-R9600PRO Primary",
-"	4151  RV350 AQ [Radeon 9600]",
-"		1043 c004  A9600SE",
-"	4152  RV350 AR [Radeon 9600]",
-"		1002 0002  Radeon 9600XT",
-"		1002 4772  All-in-Wonder 9600 XT",
-"		1043 c002  Radeon 9600 XT TVD",
-"		1043 c01a  A9600XT/TD",
-"		174b 7c29  Sapphire Radeon 9600XT",
-"		1787 4002  Radeon 9600 XT",
-"	4153  RV350 AS [Radeon 9550]",
-"		1462 932c  865PE Neo2-V (MS-6788) mainboard",
-"	4154  RV350 AT [Fire GL T2]",
-"	4155  RV350 AU [Fire GL T2]",
-"	4156  RV350 AV [Fire GL T2]",
-"	4157  RV350 AW [Fire GL T2]",
-"	4158  68800AX [Mach32]",
-"	4164  R300 AD [Radeon 9500 Pro] (Secondary)",
-"	4165  R300 AE [Radeon 9700 Pro] (Secondary)",
-"	4166  R300 AF [Radeon 9700 Pro] (Secondary)",
-"	4168  Radeon R350 [Radeon 9800] (Secondary)",
-"	4170  RV350 AP [Radeon 9600] (Secondary)",
-"		1002 0003  R9600 Pro secondary (Asus OEM for HP)",
-"		1002 4723  All-in-Wonder 2006 AGP Edition (Secondary)",
-"		1458 4025  Giga-Byte GV-R96128D Secondary",
-"		148c 2067  PowerColor R96A-C3N (Secondary)",
-"		174b 7c28  GC-R9600PRO Secondary [Sapphire]",
-"		17ee 2003  Radeon 9600 256Mb Secondary",
-"		18bc 0100  GC-R9600PRO Secondary",
-"	4171  RV350 AQ [Radeon 9600] (Secondary)",
-"		1043 c005  A9600SE (Secondary)",
-"	4172  RV350 AR [Radeon 9600] (Secondary)",
-"		1002 0003  Radeon 9600XT (Secondary)",
-"		1002 4773  All-in-Wonder 9600 XT (Secondary)",
-"		1043 c003  A9600XT (Secondary)",
-"		1043 c01b  A9600XT/TD (Secondary)",
-"		174b 7c28  Sapphire Radeon 9600XT (Secondary)",
-"		1787 4003  Radeon 9600 XT (Secondary)",
-"	4173  RV350 \?\? [Radeon 9550] (Secondary)",
-"	4237  Radeon 7000 IGP",
-"	4242  R200 BB [Radeon All in Wonder 8500DV]",
-"		1002 02aa  Radeon 8500 AIW DV Edition",
-"	4243  R200 BC [Radeon All in Wonder 8500]",
-"	4336  Radeon Mobility U1",
-"		1002 4336  Pavilion ze4300 ATI Radeon Mobility U1 (IGP 320 M)",
-"		103c 0024  Pavilion ze4400 builtin Video",
-"		161f 2029  eMachines M5312 builtin Video",
-"	4337  Radeon IGP 330M/340M/350M",
-"		1014 053a  ThinkPad R40e (2684-HVG) builtin VGA controller",
-"		103c 0850  Radeon IGP 345M",
-"	4341  IXP150 AC'97 Audio Controller",
-"	4345  EHCI USB Controller",
-"	4347  OHCI USB Controller #1",
-"	4348  OHCI USB Controller #2",
-"	4349  ATI Dual Channel Bus Master PCI IDE Controller",
-"	434d  IXP AC'97 Modem",
-"	4353  ATI SMBus",
-"	4354  215CT [Mach64 CT]",
-"	4358  210888CX [Mach64 CX]",
-"	4363  ATI SMBus",
-"	436e  ATI 436E Serial ATA Controller",
-"	4370  IXP SB400 AC'97 Audio Controller",
-"		1025 0079  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"		107b 0300  MX6421",
-"	4371  IXP SB400 PCI-PCI Bridge",
-"		103c 308b  MX6125",
-"	4372  IXP SB400 SMBus Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4373  IXP SB400 USB2 Host Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4374  IXP SB400 USB Host Controller",
-"		103c 308b  MX6125",
-"	4375  IXP SB400 USB Host Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4376  Standard Dual Channel PCI IDE Controller ATI",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4377  IXP SB400 PCI-ISA Bridge",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 308b  MX6125",
-"	4378  ATI SB400 - AC'97 Modem Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4379  ATI 4379 Serial ATA Controller",
-"	437a  ATI 437A Serial ATA Controller",
-"	437b  SB450 HDA Audio",
-"	4380  SB600 Non-Raid-5 SATA",
-"	4381  SB600 Raid-5 SATA",
-"	4382  SB600 AC97 Audio",
-"	4383  SB600 Azalia",
-"	4384  SB600 PCI to PCI Bridge",
-"	4385  SB600 SMBus",
-"	4386  SB600 USB Controller (EHCI)",
-"	4387  SB600 USB (OHCI0)",
-"	4388  SB600 USB (OHCI1)",
-"	4389  SB600 USB (OHCI2)",
-"	438a  SB600 USB (OHCI3)",
-"	438b  SB600 USB (OHCI4)",
-"	438c  SB600 IDE",
-"	438d  SB600 PCI to LPC Bridge",
-"	438e  SB600 AC97 Modem",
-"	4437  Radeon Mobility 7000 IGP",
-"	4554  210888ET [Mach64 ET]",
-"	4654  Mach64 VT",
-"	4742  3D Rage Pro AGP 1X/2X",
-"		1002 0040  Rage Pro Turbo AGP 2X",
-"		1002 0044  Rage Pro Turbo AGP 2X",
-"		1002 0061  Rage Pro AIW AGP 2X",
-"		1002 0062  Rage Pro AIW AGP 2X",
-"		1002 0063  Rage Pro AIW AGP 2X",
-"		1002 0080  Rage Pro Turbo AGP 2X",
-"		1002 0084  Rage Pro Turbo AGP 2X",
-"		1002 4742  Rage Pro Turbo AGP 2X",
-"		1002 8001  Rage Pro Turbo AGP 2X",
-"		1028 0082  Rage Pro Turbo AGP 2X",
-"		1028 4082  Optiplex GX1 Onboard Display Adapter",
-"		1028 8082  Rage Pro Turbo AGP 2X",
-"		1028 c082  Rage Pro Turbo AGP 2X",
-"		8086 4152  Xpert 98D AGP 2X",
-"		8086 464a  Rage Pro Turbo AGP 2X",
-"	4744  3D Rage Pro AGP 1X",
-"		1002 4744  Rage Pro Turbo AGP",
-"	4747  3D Rage Pro",
-"	4749  3D Rage Pro",
-"		1002 0061  Rage Pro AIW",
-"		1002 0062  Rage Pro AIW",
-"	474c  Rage XC",
-"	474d  Rage XL AGP 2X",
-"		1002 0004  Xpert 98 RXL AGP 2X",
-"		1002 0008  Xpert 98 RXL AGP 2X",
-"		1002 0080  Rage XL AGP 2X",
-"		1002 0084  Xpert 98 AGP 2X",
-"		1002 474d  Rage XL AGP",
-"		1033 806a  Rage XL AGP",
-"	474e  Rage XC AGP",
-"		1002 474e  Rage XC AGP",
-"	474f  Rage XL",
-"		1002 0008  Rage XL",
-"		1002 474f  Rage XL",
-"	4750  3D Rage Pro 215GP",
-"		1002 0040  Rage Pro Turbo",
-"		1002 0044  Rage Pro Turbo",
-"		1002 0080  Rage Pro Turbo",
-"		1002 0084  Rage Pro Turbo",
-"		1002 4750  Rage Pro Turbo",
-"	4751  3D Rage Pro 215GQ",
-"	4752  Rage XL",
-"		0e11 001e  Proliant Rage XL",
-"		1002 0008  Rage XL",
-"		1002 4752  Proliant Rage XL",
-"		1002 8008  Rage XL",
-"		1028 00ce  PowerEdge 1400",
-"		1028 00d1  PowerEdge 2550",
-"		1028 00d9  PowerEdge 2500",
-"		1028 0134  Poweredge SC600",
-"		103c 10e1  NetServer Rage XL",
-"		1734 007a  Primergy RX300",
-"		8086 3411  SDS2 Mainboard",
-"		8086 3427  S875WP1-E mainboard",
-"	4753  Rage XC",
-"		1002 4753  Rage XC",
-"	4754  3D Rage I/II 215GT [Mach64 GT]",
-"	4755  3D Rage II+ 215GTB [Mach64 GTB]",
-"	4756  3D Rage IIC 215IIC [Mach64 GT IIC]",
-"		1002 4756  Rage IIC",
-"	4757  3D Rage IIC AGP",
-"		1002 4757  Rage IIC AGP",
-"		1028 0089  Rage 3D IIC",
-"		1028 008e  PowerEdge 1300 onboard video",
-"		1028 4082  Rage 3D IIC",
-"		1028 8082  Rage 3D IIC",
-"		1028 c082  Rage 3D IIC",
-"	4758  210888GX [Mach64 GX]",
-"	4759  3D Rage IIC",
-"	475a  3D Rage IIC AGP",
-"		1002 0084  Rage 3D Pro AGP 2x XPERT 98",
-"		1002 0087  Rage 3D IIC",
-"		1002 475a  Rage IIC AGP",
-"	4964  Radeon RV250 Id [Radeon 9000]",
-"	4965  Radeon RV250 Ie [Radeon 9000]",
-"	4966  Radeon RV250 If [Radeon 9000]",
-"		10f1 0002  RV250 If [Tachyon G9000 PRO]",
-"		148c 2039  RV250 If [Radeon 9000 Pro 'Evil Commando']",
-"		1509 9a00  RV250 If [Radeon 9000 'AT009']",
-"		1681 0040  RV250 If [3D prophet 9000]",
-"		174b 7176  RV250 If [Sapphire Radeon 9000 Pro]",
-"		174b 7192  RV250 If [Radeon 9000 'Atlantis']",
-"		17af 2005  RV250 If [Excalibur Radeon 9000 Pro]",
-"		17af 2006  RV250 If [Excalibur Radeon 9000]",
-"	4967  Radeon RV250 Ig [Radeon 9000]",
-"	496e  Radeon RV250 [Radeon 9000] (Secondary)",
-"	4a48  R420 JH [Radeon X800]",
-"	4a49  R420 JI [Radeon X800PRO]",
-"	4a4a  R420 JJ [Radeon X800SE]",
-"	4a4b  R420 JK [Radeon X800]",
-"	4a4c  R420 JL [Radeon X800]",
-"	4a4d  R420 JM [FireGL X3]",
-"	4a4e  M18 JN [Radeon Mobility 9800]",
-"	4a50  R420 JP [Radeon X800XT]",
-"	4a70  R420 [X800XT-PE] (Secondary)",
-"	4b49  R480 [Radeon X850XT]",
-"	4b4b  R480 [Radeon X850Pro]",
-"	4b4c  R481 [Radeon X850XT-PE]",
-"	4b69  R480 [Radeon X850XT] (Secondary)",
-"	4b6b  R480 [Radeon X850Pro] (Secondary)",
-"	4b6c  R481 [Radeon X850XT-PE] (Secondary)",
-"	4c42  3D Rage LT Pro AGP-133",
-"		0e11 b0e7  Rage LT Pro (Compaq Presario 5240)",
-"		0e11 b0e8  Rage 3D LT Pro",
-"		0e11 b10e  3D Rage LT Pro (Compaq Armada 1750)",
-"		1002 0040  Rage LT Pro AGP 2X",
-"		1002 0044  Rage LT Pro AGP 2X",
-"		1002 4c42  Rage LT Pro AGP 2X",
-"		1002 8001  Rage LT Pro AGP 2X",
-"		1028 0085  Rage 3D LT Pro",
-"	4c44  3D Rage LT Pro AGP-66",
-"	4c45  Rage Mobility M3 AGP",
-"	4c46  Rage Mobility M3 AGP 2x",
-"		1028 00b1  Latitude C600",
-"	4c47  3D Rage LT-G 215LG",
-"	4c49  3D Rage LT Pro",
-"		1002 0004  Rage LT Pro",
-"		1002 0040  Rage LT Pro",
-"		1002 0044  Rage LT Pro",
-"		1002 4c49  Rage LT Pro",
-"	4c4d  Rage Mobility P/M AGP 2x",
-"		0e11 b111  Armada M700",
-"		0e11 b160  Armada E500",
-"		1002 0084  Xpert 98 AGP 2X (Mobility)",
-"		1014 0154  ThinkPad A20m/A21m",
-"		1028 00aa  Latitude CPt",
-"		1028 00bb  Latitude CPx",
-"		10e1 10cf  Fujitsu Siemens LifeBook C Series",
-"		1179 ff00  Satellite 1715XCDS laptop",
-"		13bd 1019  PC-AR10",
-"	4c4e  Rage Mobility L AGP 2x",
-"	4c50  3D Rage LT Pro",
-"		1002 4c50  Rage LT Pro",
-"	4c51  3D Rage LT Pro",
-"	4c52  Rage Mobility P/M",
-"		1033 8112  Versa Note VXi",
-"	4c53  Rage Mobility L",
-"	4c54  264LT [Mach64 LT]",
-"	4c57  Radeon Mobility M7 LW [Radeon Mobility 7500]",
-"		1014 0517  ThinkPad T30",
-"		1028 00e6  Radeon Mobility M7 LW (Dell Inspiron 8100)",
-"		1028 012a  Latitude C640",
-"		144d c006  Radeon Mobility M7 LW in vpr Matrix 170B4",
-"	4c58  Radeon RV200 LX [Mobility FireGL 7800 M7]",
-"	4c59  Radeon Mobility M6 LY",
-"		0e11 b111  Evo N600c",
-"		1014 0235  ThinkPad A30/A30p (2652/2653)",
-"		1014 0239  ThinkPad X22/X23/X24",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		104d 8140  PCG-Z1SP laptop",
-"		1509 1930  Medion MD9703",
-"	4c5a  Radeon Mobility M6 LZ",
-"	4c64  Radeon R250 Ld [Radeon Mobility 9000 M9]",
-"	4c65  Radeon R250 Le [Radeon Mobility 9000 M9]",
-"	4c66  Radeon R250 [Radeon Mobility 9200]",
-"	4c67  Radeon R250 Lg [Radeon Mobility 9000 M9]",
-"	4c6e  Radeon R250 Ln [Radeon Mobility 9000 M9] [Secondary]",
-"	4d46  Rage Mobility M4 AGP",
-"	4d4c  Rage Mobility M4 AGP",
-"	4e44  Radeon R300 ND [Radeon 9700 Pro]",
-"		1002 515e  Radeon ES1000",
-"		1002 5965  Radeon ES1000",
-"	4e45  Radeon R300 NE [Radeon 9500 Pro]",
-"		1002 0002  Radeon R300 NE [Radeon 9500 Pro]",
-"		1681 0002  Hercules 3D Prophet 9500 PRO [Radeon 9500 Pro]",
-"	4e46  RV350 NF [Radeon 9600]",
-"	4e47  Radeon R300 NG [FireGL X1]",
-"	4e48  Radeon R350 [Radeon 9800 Pro]",
-"	4e49  Radeon R350 [Radeon 9800]",
-"	4e4a  RV350 NJ [Radeon 9800 XT]",
-"	4e4b  R350 NK [Fire GL X2]",
-"	4e50  RV350 [Mobility Radeon 9600 M10]",
-"		1025 005a  TravelMate 290",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1462 0311  MSI M510A",
-"		1734 1055  Amilo M1420W",
-"	4e51  M10 NQ [Radeon Mobility 9600]",
-"	4e52  RV350 [Mobility Radeon 9600 M10]",
-"	4e53  M10 NS [Radeon Mobility 9600]",
-"	4e54  M10 NT [FireGL Mobility T2]",
-"	4e56  M11 NV [FireGL Mobility T2e]",
-"	4e64  Radeon R300 [Radeon 9700 Pro] (Secondary)",
-"	4e65  Radeon R300 [Radeon 9500 Pro] (Secondary)",
-"		1002 0003  Radeon R300 NE [Radeon 9500 Pro]",
-"		1681 0003  Hercules 3D Prophet 9500 PRO [Radeon 9500 Pro] (Secondary)",
-"	4e66  RV350 NF [Radeon 9600] (Secondary)",
-"	4e67  Radeon R300 [FireGL X1] (Secondary)",
-"	4e68  Radeon R350 [Radeon 9800 Pro] (Secondary)",
-"	4e69  Radeon R350 [Radeon 9800] (Secondary)",
-"	4e6a  RV350 NJ [Radeon 9800 XT] (Secondary)",
-"		1002 4e71  ATI Technologies Inc M10 NQ [Radeon Mobility 9600]",
-"	4e71  M10 NQ [Radeon Mobility 9600] (Secondary)",
-"	4f72  RV250 [Radeon 9000 Series]",
-"	4f73  Radeon RV250 [Radeon 9000 Series] (Secondary)",
-"	5041  Rage 128 PA/PRO",
-"	5042  Rage 128 PB/PRO AGP 2x",
-"	5043  Rage 128 PC/PRO AGP 4x",
-"	5044  Rage 128 PD/PRO TMDS",
-"		1002 0028  Rage 128 AIW",
-"		1002 0029  Rage 128 AIW",
-"	5045  Rage 128 PE/PRO AGP 2x TMDS",
-"	5046  Rage 128 PF/PRO AGP 4x TMDS",
-"		1002 0004  Rage Fury Pro",
-"		1002 0008  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0014  Rage Fury Pro",
-"		1002 0018  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0028  Rage 128 Pro AIW AGP",
-"		1002 002a  Rage 128 Pro AIW AGP",
-"		1002 0048  Rage Fury Pro",
-"		1002 2000  Rage Fury MAXX AGP 4x (TMDS) (VGA device)",
-"		1002 2001  Rage Fury MAXX AGP 4x (TMDS) (Extra device\?!)",
-"	5047  Rage 128 PG/PRO",
-"	5048  Rage 128 PH/PRO AGP 2x",
-"	5049  Rage 128 PI/PRO AGP 4x",
-"	504a  Rage 128 PJ/PRO TMDS",
-"	504b  Rage 128 PK/PRO AGP 2x TMDS",
-"	504c  Rage 128 PL/PRO AGP 4x TMDS",
-"	504d  Rage 128 PM/PRO",
-"	504e  Rage 128 PN/PRO AGP 2x",
-"	504f  Rage 128 PO/PRO AGP 4x",
-"	5050  Rage 128 PP/PRO TMDS [Xpert 128]",
-"		1002 0008  Xpert 128",
-"	5051  Rage 128 PQ/PRO AGP 2x TMDS",
-"	5052  Rage 128 PR/PRO AGP 4x TMDS",
-"	5053  Rage 128 PS/PRO",
-"	5054  Rage 128 PT/PRO AGP 2x",
-"	5055  Rage 128 PU/PRO AGP 4x",
-"	5056  Rage 128 PV/PRO TMDS",
-"	5057  Rage 128 PW/PRO AGP 2x TMDS",
-"	5058  Rage 128 PX/PRO AGP 4x TMDS",
-"	5144  Radeon R100 QD [Radeon 7200]",
-"		1002 0008  Radeon 7000/Radeon VE",
-"		1002 0009  Radeon 7000/Radeon",
-"		1002 000a  Radeon 7000/Radeon",
-"		1002 001a  Radeon 7000/Radeon",
-"		1002 0029  Radeon AIW",
-"		1002 0038  Radeon 7000/Radeon",
-"		1002 0039  Radeon 7000/Radeon",
-"		1002 008a  Radeon 7000/Radeon",
-"		1002 00ba  Radeon 7000/Radeon",
-"		1002 0139  Radeon 7000/Radeon",
-"		1002 028a  Radeon 7000/Radeon",
-"		1002 02aa  Radeon AIW",
-"		1002 053a  Radeon 7000/Radeon",
-"	5145  Radeon R100 QE",
-"	5146  Radeon R100 QF",
-"	5147  Radeon R100 QG",
-"	5148  Radeon R200 QH [Radeon 8500]",
-"		1002 010a  FireGL 8800 64Mb",
-"		1002 0152  FireGL 8800 128Mb",
-"		1002 0162  FireGL 8700 32Mb",
-"		1002 0172  FireGL 8700 64Mb",
-"	5149  Radeon R200 QI",
-"	514a  Radeon R200 QJ",
-"	514b  Radeon R200 QK",
-"	514c  Radeon R200 QL [Radeon 8500 LE]",
-"		1002 003a  Radeon R200 QL [Radeon 8500 LE]",
-"		1002 013a  Radeon 8500",
-"		148c 2026  R200 QL [Radeon 8500 Evil Master II Multi Display Edition]",
-"		1681 0010  Radeon 8500 [3D Prophet 8500 128Mb]",
-"		174b 7149  Radeon R200 QL [Sapphire Radeon 8500 LE]",
-"	514d  Radeon R200 QM [Radeon 9100]",
-"	514e  Radeon R200 QN [Radeon 8500LE]",
-"	514f  Radeon R200 QO [Radeon 8500LE]",
-"	5154  R200 QT [Radeon 8500]",
-"	5155  R200 QU [Radeon 9100]",
-"	5157  Radeon RV200 QW [Radeon 7500]",
-"		1002 013a  Radeon 7500",
-"		1002 103a  Dell Optiplex GX260",
-"		1458 4000  RV200 QW [RADEON 7500 PRO MAYA AR]",
-"		148c 2024  RV200 QW [Radeon 7500LE Dual Display]",
-"		148c 2025  RV200 QW [Radeon 7500 Evil Master Multi Display Edition]",
-"		148c 2036  RV200 QW [Radeon 7500 PCI Dual Display]",
-"		174b 7146  RV200 QW [Radeon 7500 LE]",
-"		174b 7147  RV200 QW [Sapphire Radeon 7500LE]",
-"		174b 7161  Radeon RV200 QW [Radeon 7500 LE]",
-"		17af 0202  RV200 QW [Excalibur Radeon 7500LE]",
-"	5158  Radeon RV200 QX [Radeon 7500]",
-"	5159  Radeon RV100 QY [Radeon 7000/VE]",
-"		1002 000a  Radeon 7000/Radeon VE",
-"		1002 000b  Radeon 7000",
-"		1002 0038  Radeon 7000/Radeon VE",
-"		1002 003a  Radeon 7000/Radeon VE",
-"		1002 00ba  Radeon 7000/Radeon VE",
-"		1002 013a  Radeon 7000/Radeon VE",
-"		1002 0908  XVR-100 (supplied by Sun)",
-"		1014 029a  Remote Supervisor Adapter II (RSA2)",
-"		1014 02c8  IBM eServer xSeries server mainboard",
-"		1028 019a  PowerEdge SC1425",
-"		1458 4002  RV100 QY [RADEON 7000 PRO MAYA AV Series]",
-"		148c 2003  RV100 QY [Radeon 7000 Multi-Display Edition]",
-"		148c 2023  RV100 QY [Radeon 7000 Evil Master Multi-Display]",
-"		174b 7112  RV100 QY [Sapphire Radeon VE 7000]",
-"		174b 7c28  Sapphire Radeon VE 7000 DDR",
-"		1787 0202  RV100 QY [Excalibur Radeon 7000]",
-"	515a  Radeon RV100 QZ [Radeon 7000/VE]",
-"	515e  ES1000",
-"	515f  ES1000",
-"	5168  Radeon R200 Qh",
-"	5169  Radeon R200 Qi",
-"	516a  Radeon R200 Qj",
-"	516b  Radeon R200 Qk",
-"	516c  Radeon R200 Ql",
-"	5245  Rage 128 RE/SG",
-"		1002 0008  Xpert 128",
-"		1002 0028  Rage 128 AIW",
-"		1002 0029  Rage 128 AIW",
-"		1002 0068  Rage 128 AIW",
-"	5246  Rage 128 RF/SG AGP",
-"		1002 0004  Magnum/Xpert 128/Xpert 99",
-"		1002 0008  Magnum/Xpert128/X99/Xpert2000",
-"		1002 0028  Rage 128 AIW AGP",
-"		1002 0044  Rage Fury/Xpert 128/Xpert 2000",
-"		1002 0068  Rage 128 AIW AGP",
-"		1002 0448  Rage Fury",
-"	5247  Rage 128 RG",
-"	524b  Rage 128 RK/VR",
-"	524c  Rage 128 RL/VR AGP",
-"		1002 0008  Xpert 99/Xpert 2000",
-"		1002 0088  Xpert 99",
-"	5345  Rage 128 SE/4x",
-"	5346  Rage 128 SF/4x AGP 2x",
-"		1002 0048  RAGE 128 16MB VGA TVOUT AMC PAL",
-"	5347  Rage 128 SG/4x AGP 4x",
-"	5348  Rage 128 SH",
-"	534b  Rage 128 SK/4x",
-"	534c  Rage 128 SL/4x AGP 2x",
-"	534d  Rage 128 SM/4x AGP 4x",
-"		1002 0008  Xpert 99/Xpert 2000",
-"		1002 0018  Xpert 2000",
-"	534e  Rage 128 4x",
-"	5354  Mach 64 VT",
-"		1002 5654  Mach 64 reference",
-"	5446  Rage 128 Pro Ultra TF",
-"		1002 0004  Rage Fury Pro",
-"		1002 0008  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0018  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0028  Rage 128 AIW Pro AGP",
-"		1002 0029  Rage 128 AIW",
-"		1002 002a  Rage 128 AIW Pro AGP",
-"		1002 002b  Rage 128 AIW",
-"		1002 0048  Xpert 2000 Pro",
-"	544c  Rage 128 Pro Ultra TL",
-"	5452  Rage 128 Pro Ultra TR",
-"		1002 001c  Rage 128 Pro 4XL",
-"		103c 1279  Rage 128 Pro 4XL",
-"	5453  Rage 128 Pro Ultra TS",
-"	5454  Rage 128 Pro Ultra TT",
-"	5455  Rage 128 Pro Ultra TU",
-"	5460  M22 [Radeon Mobility M300]",
-"	5462  M24 [Radeon Mobility X600]",
-"	5464  M22 [FireGL GL]",
-"	5548  R423 UH [Radeon X800 (PCIE)]",
-"	5549  R423 UI [Radeon X800PRO (PCIE)]",
-"	554a  R423 UJ [Radeon X800LE (PCIE)]",
-"	554b  R423 UK [Radeon X800SE (PCIE)]",
-"	554d  R430 [Radeon X800 XL] (PCIe)",
-"	554f  R430 [Radeon X800 (PCIE)]",
-"	5550  R423 [Fire GL V7100]",
-"	5551  R423 UQ [FireGL V7200 (PCIE)]",
-"	5552  R423 UR [FireGL V5100 (PCIE)]",
-"	5554  R423 UT [FireGL V7100 (PCIE)]",
-"	556b  Radeon R423 UK (PCIE) [X800 SE] (Secondary)",
-"	556d  R430 [Radeon X800 XL] (PCIe) Secondary",
-"	556f  R430 [Radeon X800 (PCIE) Secondary]",
-"	564a  M26 [Mobility FireGL V5000]",
-"	564b  M26 [Mobility FireGL V5000]",
-"	564f  M26 [Radeon Mobility X700 XL] (PCIE)",
-"	5652  M26 [Radeon Mobility X700]",
-"	5653  Radeon Mobility X700 (PCIE)",
-"		1025 0080  Aspire 5024WLMi",
-"	5654  264VT [Mach64 VT]",
-"		1002 5654  Mach64VT Reference",
-"	5655  264VT3 [Mach64 VT3]",
-"	5656  264VT4 [Mach64 VT4]",
-"	5830  RS300 Host Bridge",
-"	5831  RS300 Host Bridge",
-"	5832  RS300 Host Bridge",
-"	5833  Radeon 9100 IGP Host Bridge",
-"	5834  Radeon 9100 IGP",
-"	5835  RS300M AGP [Radeon Mobility 9100IGP]",
-"	5838  Radeon 9100 IGP AGP Bridge",
-"	5940  RV280 [Radeon 9200 PRO] (Secondary)",
-"	5941  RV280 [Radeon 9200] (Secondary)",
-"		1458 4019  Gigabyte Radeon 9200",
-"		174b 7c12  Sapphire Radeon 9200",
-"		17af 200d  Excalibur Radeon 9200",
-"		18bc 0050  GeXcube GC-R9200-C3 (Secondary)",
-"	5944  RV280 [Radeon 9200 SE (PCI)]",
-"	5950  RS480 Host Bridge",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	5951  ATI Radeon Xpress 200 (RS480/RS482/RX480/RX482) Chipset - Host bridge",
-"	5954  RS480 [Radeon Xpress 200G Series]",
-"		1002 5954  RV370 [Radeon Xpress 200G Series]",
-"	5955  ATI Radeon XPRESS 200M 5955 (PCIE)",
-"		1002 5955  RS480 0x5955 [ATI Radeon XPRESS 200M 5955 (PCIE)]",
-"		103c 308b  MX6125",
-"	5960  RV280 [Radeon 9200 PRO]",
-"	5961  RV280 [Radeon 9200]",
-"		1002 2f72  All-in-Wonder 9200 Series",
-"		1019 4c30  Radeon 9200 VIVO",
-"		12ab 5961  YUAN SMARTVGA Radeon 9200",
-"		1458 4018  Gigabyte Radeon 9200",
-"		174b 7c13  Sapphire Radeon 9200",
-"		17af 200c  Excalibur Radeon 9200",
-"		18bc 0050  Radeon 9200 Game Buster",
-"		18bc 0051  GeXcube GC-R9200-C3",
-"		18bc 0053  Radeon 9200 Game Buster VIVO",
-"	5962  RV280 [Radeon 9200]",
-"	5964  RV280 [Radeon 9200 SE]",
-"		1043 c006  ASUS Radeon 9200 SE / TD / 128M",
-"		1458 4018  Radeon 9200 SE",
-"		1458 4032  Radeon 9200 SE 128MB",
-"		147b 6191  R9200SE-DT",
-"		148c 2073  CN-AG92E",
-"		174b 7c13  Sapphire Radeon 9200 SE",
-"		1787 5964  Excalibur 9200SE VIVO 128M",
-"		17af 2012  Radeon 9200 SE Excalibur",
-"		18bc 0170  Sapphire Radeon 9200 SE 128MB Game Buster",
-"		18bc 0173  GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]",
-"	5969  ES1000",
-"	5974  RS482 [Radeon Xpress 200]",
-"	5975  RS482 [Radeon Xpress 200M]",
-"	5a34  RS480 PCI-X Root Port",
-"	5a36  RS480 PCI Bridge",
-"	5a38  RS480 PCI Bridge",
-"	5a39  RS480 PCI Bridge",
-"	5a3f  RS480 PCI Bridge",
-"	5a41  RS400 [Radeon Xpress 200]",
-"	5a42  RS400 [Radeon Xpress 200M]",
-"	5a61  RC410 [Radeon Xpress 200]",
-"	5a62  RC410 [Radeon Xpress 200M]",
-"	5b60  RV370 5B60 [Radeon X300 (PCIE)]",
-"		1043 002a  Extreme AX300SE-X",
-"		1043 032e  Extreme AX300/TD",
-"		1462 0400  RX300SE-TD128E (MS-8940 REV:200)",
-"		1462 0402  RX300SE-TD128E (MS-8940)",
-"	5b62  RV370 5B62 [Radeon X600 (PCIE)]",
-"	5b63  RV370 [Sapphire X550 Silent]",
-"	5b64  RV370 5B64 [FireGL V3100 (PCIE)]",
-"	5b65  RV370 5B65 [FireGL D1100 (PCIE)]",
-"	5b70  RV370 [Radeon X300SE]",
-"		1462 0403  RX300SE-TD128E (MS-8940) (secondary display)",
-"	5b72  Radeon X600(RV380)",
-"	5b73  RV370 secondary [Sapphire X550 Silent]",
-"	5b74  RV370 5B64 [FireGL V3100 (PCIE)] (Secondary)",
-"	5c61  M9+ 5C61 [Radeon Mobility 9200 (AGP)]",
-"	5c63  M9+ 5C63 [Radeon Mobility 9200 (AGP)]",
-"		1002 5c63  Apple iBook G4 2004",
-"	5d44  RV280 [Radeon 9200 SE] (Secondary)",
-"		1458 4019  Radeon 9200 SE (Secondary)",
-"		1458 4032  Radeon 9200 SE 128MB",
-"		174b 7c12  Sapphire Radeon 9200 SE (Secondary)",
-"		1787 5965  Excalibur 9200SE VIVO 128M (Secondary)",
-"		17af 2013  Radeon 9200 SE Excalibur (Secondary)",
-"		18bc 0171  Radeon 9200 SE 128MB Game Buster (Secondary)",
-"		18bc 0172  GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]",
-"	5d48  M28 [Radeon Mobility X800XT]",
-"	5d49  M28 [Mobility FireGL V5100]",
-"	5d4a  Mobility Radeon X800",
-"	5d4d  R480 [Radeon X850XT Platinum (PCIE)]",
-"	5d4f  R480 [Radeon X800 GTO (PCIE)]",
-"	5d52  R480 [Radeon X850XT (PCIE)] (Primary)",
-"		1002 0b12  PowerColor X850XT PCIe Primary",
-"		1002 0b13  PowerColor X850XT PCIe Secondary",
-"	5d57  R423 5F57 [Radeon X800XT (PCIE)]",
-"	5d6d  R480 [Radeon X850XT Platinum (PCIE)] (Secondary)",
-"	5d6f  R480 [Radeon X800 GTO (PCIE)] (Secondary)",
-"	5d72  R480 [Radeon X850XT (PCIE)] (Secondary)",
-"	5d77  R423 5F57 [Radeon X800XT (PCIE)] (Secondary)",
-"	5e48  RV410 [FireGL V5000]",
-"	5e49  RV410 [FireGL V3300]",
-"	5e4a  RV410 [Radeon X700XT]",
-"	5e4b  RV410 [Radeon X700 Pro (PCIE)]",
-"	5e4c  RV410 [Radeon X700SE]",
-"	5e4d  RV410 [Radeon X700 (PCIE)]",
-"		148c 2116  PowerColor Bravo X700",
-"	5e4f  RV410 [Radeon X700]",
-"	5e6b  RV410 [Radeon X700 Pro (PCIE)] Secondary",
-"	5e6d  RV410 [Radeon X700 (PCIE)] (Secondary)",
-"		148c 2117  PowerColor Bravo X700",
-"	5f57  R423 [Radeon X800XT (PCIE)]",
-"	700f  PCI Bridge [IGP 320M]",
-"	7010  PCI Bridge [IGP 340M]",
-"	7100  R520 [Radeon X1800]",
-"	7105  R520 [FireGL]",
-"	7109  R520 [Radeon X1800]",
-"		1002 0322  All-in-Wonder X1800XL",
-"		1002 0d02  Radeon X1800 CrossFire Edition",
-"	7120  R520 [Radeon X1800] (Secondary)",
-"	7129  R520 [Radeon X1800] (Secondary)",
-"		1002 0323  All-in-Wonder X1800XL (Secondary)",
-"		1002 0d03  Radeon X1800 CrossFire Edition (Secondary)",
-"	7142  RV515 [Radeon X1300]",
-"		1002 0322  All-in-Wonder 2006 PCI-E Edition",
-"	7145  Radeon Mobility X1400",
-"	7146  RV515 [Radeon X1300]",
-"		1002 0322  All-in-Wonder 2006 PCI-E Edition",
-"	7149  M52 [ATI Mobility Radeon X1300]",
-"	714a  M52 [ATI Mobility Radeon X1300]",
-"	714b  M52 [ATI Mobility Radeon X1300]",
-"	714c  M52 [ATI Mobility Radeon X1300]",
-"	7162  RV515 [Radeon X1300] (Secondary)",
-"		1002 0323  All-in-Wonder 2006 PCI-E Edition (Secondary)",
-"	7166  RV515 [Radeon X1300] (Secondary)",
-"		1002 0323  All-in-Wonder 2006 PCI-E Edition (Secondary)",
-"	71c0  RV530 [Radeon X1600]",
-"	71c2  RV530 [Radeon X1600]",
-"	71c4  M56GL [ATI Mobility FireGL V5200]",
-"	71c5  M56P [Radeon Mobility X1600]",
-"	71e0  RV530 [Radeon X1600] (Secondary)",
-"	71e2  RV530 [Radeon X1600] (Secondary)",
-"	7833  Radeon 9100 IGP Host Bridge",
-"	7834  Radeon 9100 PRO IGP",
-"	7835  Radeon Mobility 9200 IGP",
-"	7838  Radeon 9100 IGP PCI/AGP Bridge",
-"	7c37  RV350 AQ [Radeon 9600 SE]",
-"	cab0  AGP Bridge [IGP 320M]",
-"	cab2  RS200/RS200M AGP Bridge [IGP 340M]",
-"	cab3  R200 AGP Bridge [Mobility Radeon 7000 IGP]",
-"	cbb2  RS200/RS200M AGP Bridge [IGP 340M]",
-"1003  ULSI Systems",
-"	0201  US201",
-"1004  VLSI Technology Inc",
-"	0005  82C592-FC1",
-"	0006  82C593-FC1",
-"	0007  82C594-AFC2",
-"	0008  82C596/7 [Wildcat]",
-"	0009  82C597-AFC2",
-"	000c  82C541 [Lynx]",
-"	000d  82C543 [Lynx]",
-"	0101  82C532",
-"	0102  82C534 [Eagle]",
-"	0103  82C538",
-"	0104  82C535",
-"	0105  82C147",
-"	0200  82C975",
-"	0280  82C925",
-"	0304  QSound ThunderBird PCI Audio",
-"		1004 0304  QSound ThunderBird PCI Audio",
-"		122d 1206  DSP368 Audio",
-"		1483 5020  XWave Thunder 3D Audio",
-"	0305  QSound ThunderBird PCI Audio Gameport",
-"		1004 0305  QSound ThunderBird PCI Audio Gameport",
-"		122d 1207  DSP368 Audio Gameport",
-"		1483 5021  XWave Thunder 3D Audio Gameport",
-"	0306  QSound ThunderBird PCI Audio Support Registers",
-"		1004 0306  QSound ThunderBird PCI Audio Support Registers",
-"		122d 1208  DSP368 Audio Support Registers",
-"		1483 5022  XWave Thunder 3D Audio Support Registers",
-"	0307  Thunderbird",
-"	0308  Thunderbird",
-"	0702  VAS96011 [Golden Gate II]",
-"	0703  Tollgate",
-"1005  Avance Logic Inc. [ALI]",
-"	2064  ALG2032/2064",
-"	2128  ALG2364A",
-"	2301  ALG2301",
-"	2302  ALG2302",
-"	2364  ALG2364",
-"	2464  ALG2364A",
-"	2501  ALG2564A/25128A",
-"1006  Reply Group",
-"1007  NetFrame Systems Inc",
-"1008  Epson",
-"100a  Phoenix Technologies",
-"100b  National Semiconductor Corporation",
-"	0001  DP83810",
-"	0002  87415/87560 IDE",
-"	000e  87560 Legacy I/O",
-"	000f  FireWire Controller",
-"	0011  NS87560 National PCI System I/O",
-"	0012  USB Controller",
-"	0020  DP83815 (MacPhyter) Ethernet Controller",
-"		103c 0024  Pavilion ze4400 builtin Network",
-"		12d9 000c  Aculab E1/T1 PMXc cPCI carrier card",
-"		1385 f311  FA311 / FA312 (FA311 with WoL HW)",
-"	0021  PC87200 PCI to ISA Bridge",
-"	0022  DP83820 10/100/1000 Ethernet Controller",
-"	0028  Geode GX2 Host Bridge",
-"	002a  CS5535 South Bridge",
-"	002b  CS5535 ISA bridge",
-"	002d  CS5535 IDE",
-"	002e  CS5535 Audio",
-"	002f  CS5535 USB",
-"	0030  Geode GX2 Graphics Processor",
-"	0035  DP83065 [Saturn] 10/100/1000 Ethernet Controller",
-"	0500  SCx200 Bridge",
-"	0501  SCx200 SMI",
-"	0502  SCx200 IDE",
-"	0503  SCx200 Audio",
-"	0504  SCx200 Video",
-"	0505  SCx200 XBus",
-"	0510  SC1100 Bridge",
-"	0511  SC1100 SMI",
-"	0515  SC1100 XBus",
-"	d001  87410 IDE",
-"100c  Tseng Labs Inc",
-"	3202  ET4000/W32p rev A",
-"	3205  ET4000/W32p rev B",
-"	3206  ET4000/W32p rev C",
-"	3207  ET4000/W32p rev D",
-"	3208  ET6000",
-"	4702  ET6300",
-"100d  AST Research Inc",
-"100e  Weitek",
-"	9000  P9000 Viper",
-"	9001  P9000 Viper",
-"	9002  P9000 Viper",
-"	9100  P9100 Viper Pro/SE",
-"1010  Video Logic, Ltd.",
-"1011  Digital Equipment Corporation",
-"	0001  DECchip 21050",
-"	0002  DECchip 21040 [Tulip]",
-"	0004  DECchip 21030 [TGA]",
-"	0007  NVRAM [Zephyr NVRAM]",
-"	0008  KZPSA [KZPSA]",
-"	0009  DECchip 21140 [FasterNet]",
-"		1025 0310  21140 Fast Ethernet",
-"		10b8 2001  SMC9332BDT EtherPower 10/100",
-"		10b8 2002  SMC9332BVT EtherPower T4 10/100",
-"		10b8 2003  SMC9334BDT EtherPower 10/100 (1-port)",
-"		1109 2400  ANA-6944A/TX Fast Ethernet",
-"		1112 2300  RNS2300 Fast Ethernet",
-"		1112 2320  RNS2320 Fast Ethernet",
-"		1112 2340  RNS2340 Fast Ethernet",
-"		1113 1207  EN-1207-TX Fast Ethernet",
-"		1186 1100  DFE-500TX Fast Ethernet",
-"		1186 1112  DFE-570TX Fast Ethernet",
-"		1186 1140  DFE-660 Cardbus Ethernet 10/100",
-"		1186 1142  DFE-660 Cardbus Ethernet 10/100",
-"		11f6 0503  Freedomline Fast Ethernet",
-"		1282 9100  AEF-380TXD Fast Ethernet",
-"		1385 1100  FA310TX Fast Ethernet",
-"		2646 0001  KNE100TX Fast Ethernet",
-"	000a  21230 Video Codec",
-"	000d  PBXGB [TGA2]",
-"	000f  PCI-to-PDQ Interface Chip [PFI]",
-"		1011 def1  FDDI controller (DEFPA)",
-"		103c def1  FDDI controller (3X-DEFPA)",
-"	0014  DECchip 21041 [Tulip Pass 3]",
-"		1186 0100  DE-530+",
-"	0016  DGLPB [OPPO]",
-"	0017  PV-PCI Graphics Controller (ZLXp-L)",
-"	0019  DECchip 21142/43",
-"		1011 500a  DE500A Fast Ethernet",
-"		1011 500b  DE500B Fast Ethernet",
-"		1014 0001  10/100 EtherJet Cardbus",
-"		1025 0315  ALN315 Fast Ethernet",
-"		1033 800c  PC-9821-CS01 100BASE-TX Interface Card",
-"		1033 800d  PC-9821NR-B06 100BASE-TX Interface Card",
-"		108d 0016  Rapidfire 2327 10/100 Ethernet",
-"		108d 0017  GoCard 2250 Ethernet 10/100 Cardbus",
-"		10b8 2005  SMC8032DT Extreme Ethernet 10/100",
-"		10b8 8034  SMC8034 Extreme Ethernet 10/100",
-"		10ef 8169  Cardbus Fast Ethernet",
-"		1109 2a00  ANA-6911A/TX Fast Ethernet",
-"		1109 2b00  ANA-6911A/TXC Fast Ethernet",
-"		1109 3000  ANA-6922/TX Fast Ethernet",
-"		1113 1207  Cheetah Fast Ethernet",
-"		1113 2220  Cardbus Fast Ethernet",
-"		115d 0002  Cardbus Ethernet 10/100",
-"		1179 0203  Fast Ethernet",
-"		1179 0204  Cardbus Fast Ethernet",
-"		1186 1100  DFE-500TX Fast Ethernet",
-"		1186 1101  DFE-500TX Fast Ethernet",
-"		1186 1102  DFE-500TX Fast Ethernet",
-"		1186 1112  DFE-570TX Quad Fast Ethernet",
-"		1259 2800  AT-2800Tx Fast Ethernet",
-"		1266 0004  Eagle Fast EtherMAX",
-"		12af 0019  NetFlyer Cardbus Fast Ethernet",
-"		1374 0001  Cardbus Ethernet Card 10/100",
-"		1374 0002  Cardbus Ethernet Card 10/100",
-"		1374 0007  Cardbus Ethernet Card 10/100",
-"		1374 0008  Cardbus Ethernet Card 10/100",
-"		1385 2100  FA510",
-"		1395 0001  10/100 Ethernet CardBus PC Card",
-"		13d1 ab01  EtherFast 10/100 Cardbus (PCMPC200)",
-"		14cb 0100  LNDL-100N 100Base-TX Ethernet PC Card",
-"		8086 0001  EtherExpress PRO/100 Mobile CardBus 32",
-"	001a  Farallon PN9000SX Gigabit Ethernet",
-"	0021  DECchip 21052",
-"	0022  DECchip 21150",
-"	0023  DECchip 21150",
-"	0024  DECchip 21152",
-"	0025  DECchip 21153",
-"	0026  DECchip 21154",
-"	0034  56k Modem Cardbus",
-"		1374 0003  56k Modem Cardbus",
-"	0045  DECchip 21553",
-"	0046  DECchip 21554",
-"		0e11 4050  Integrated Smart Array",
-"		0e11 4051  Integrated Smart Array",
-"		0e11 4058  Integrated Smart Array",
-"		103c 10c2  Hewlett-Packard NetRAID-4M",
-"		12d9 000a  IP Telephony card",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		9005 0364  5400S (Mustang)",
-"		9005 0365  5400S (Mustang)",
-"		9005 1364  Dell PowerEdge RAID Controller 2",
-"		9005 1365  Dell PowerEdge RAID Controller 2",
-"		e4bf 1000  CC8-1-BLUES",
-"	1065  StrongARM DC21285",
-"		1069 0020  DAC960P / DAC1164P",
-"1012  Micronics Computers Inc",
-"1013  Cirrus Logic",
-"	0038  GD 7548",
-"	0040  GD 7555 Flat Panel GUI Accelerator",
-"	004c  GD 7556 Video/Graphics LCD/CRT Ctrlr",
-"	00a0  GD 5430/40 [Alpine]",
-"	00a2  GD 5432 [Alpine]",
-"	00a4  GD 5434-4 [Alpine]",
-"	00a8  GD 5434-8 [Alpine]",
-"	00ac  GD 5436 [Alpine]",
-"	00b0  GD 5440",
-"	00b8  GD 5446",
-"	00bc  GD 5480",
-"		1013 00bc  CL-GD5480",
-"	00d0  GD 5462",
-"	00d2  GD 5462 [Laguna I]",
-"	00d4  GD 5464 [Laguna]",
-"	00d5  GD 5464 BD [Laguna]",
-"	00d6  GD 5465 [Laguna]",
-"		13ce 8031  Barco Metheus 2 Megapixel, Dual Head",
-"		13cf 8031  Barco Metheus 2 Megapixel, Dual Head",
-"	00e8  GD 5436U",
-"	1100  CL 6729",
-"	1110  PD 6832 PCMCIA/CardBus Ctrlr",
-"	1112  PD 6834 PCMCIA/CardBus Ctrlr",
-"	1113  PD 6833 PCMCIA/CardBus Ctrlr",
-"	1200  GD 7542 [Nordic]",
-"	1202  GD 7543 [Viking]",
-"	1204  GD 7541 [Nordic Light]",
-"	4000  MD 5620 [CLM Data Fax Voice]",
-"	4400  CD 4400",
-"	6001  CS 4610/11 [CrystalClear SoundFusion Audio Accelerator]",
-"		1014 1010  CS4610 SoundFusion Audio Accelerator",
-"	6003  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]",
-"		1013 4280  Crystal SoundFusion PCI Audio Accelerator",
-"		1014 0153  ThinkPad A20m",
-"		153b 1136  SiXPack 5.1+",
-"		1681 0050  Game Theater XP",
-"		1681 a011  Fortissimo III 7.1",
-"	6004  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]",
-"	6005  Crystal CS4281 PCI Audio",
-"		1013 4281  Crystal CS4281 PCI Audio",
-"		10cf 10a8  Crystal CS4281 PCI Audio",
-"		10cf 10a9  Crystal CS4281 PCI Audio",
-"		10cf 10aa  Crystal CS4281 PCI Audio",
-"		10cf 10ab  Crystal CS4281 PCI Audio",
-"		10cf 10ac  Crystal CS4281 PCI Audio",
-"		10cf 10ad  Crystal CS4281 PCI Audio",
-"		10cf 10b4  Crystal CS4281 PCI Audio",
-"		1179 0001  Crystal CS4281 PCI Audio",
-"		14c0 000c  Crystal CS4281 PCI Audio",
-"1014  IBM",
-"	0002  PCI to MCA Bridge",
-"	0005  Alta Lite",
-"	0007  Alta MP",
-"	000a  Fire Coral",
-"	0017  CPU to PCI Bridge",
-"	0018  TR Auto LANstreamer",
-"	001b  GXT-150P",
-"	001c  Carrera",
-"	001d  82G2675",
-"	0020  GXT1000 Graphics Adapter",
-"	0022  IBM27-82351",
-"	002d  Python",
-"	002e  SCSI RAID Adapter [ServeRAID]",
-"		1014 002e  ServeRAID-3x",
-"		1014 022e  ServeRAID-4H",
-"	0031  2 Port Serial Adapter",
-"		1014 0031  2721 WAN IOA - 2 Port Sync Serial Adapter",
-"	0036  Miami",
-"	0037  82660 CPU to PCI Bridge",
-"	003a  CPU to PCI Bridge",
-"	003c  GXT250P/GXT255P Graphics Adapter",
-"	003e  16/4 Token ring UTP/STP controller",
-"		1014 003e  Token-Ring Adapter",
-"		1014 00cd  Token-Ring Adapter + Wake-On-LAN",
-"		1014 00ce  16/4 Token-Ring Adapter 2",
-"		1014 00cf  16/4 Token-Ring Adapter Special",
-"		1014 00e4  High-Speed 100/16/4 Token-Ring Adapter",
-"		1014 00e5  16/4 Token-Ring Adapter 2 + Wake-On-LAN",
-"		1014 016d  iSeries 2744 Card",
-"	0045  SSA Adapter",
-"	0046  MPIC interrupt controller",
-"	0047  PCI to PCI Bridge",
-"	0048  PCI to PCI Bridge",
-"	0049  Warhead SCSI Controller",
-"	004e  ATM Controller (14104e00)",
-"	004f  ATM Controller (14104f00)",
-"	0050  ATM Controller (14105000)",
-"	0053  25 MBit ATM Controller",
-"	0054  GXT500P/GXT550P Graphics Adapter",
-"	0057  MPEG PCI Bridge",
-"	005c  i82557B 10/100",
-"	005e  GXT800P Graphics Adapter",
-"	007c  ATM Controller (14107c00)",
-"	007d  3780IDSP [MWave]",
-"	008b  EADS PCI to PCI Bridge",
-"	008e  GXT3000P Graphics Adapter",
-"	0090  GXT 3000P",
-"		1014 008e  GXT-3000P",
-"	0091  SSA Adapter",
-"	0095  20H2999 PCI Docking Bridge",
-"	0096  Chukar chipset SCSI controller",
-"		1014 0097  iSeries 2778 DASD IOA",
-"		1014 0098  iSeries 2763 DASD IOA",
-"		1014 0099  iSeries 2748 DASD IOA",
-"	009f  PCI 4758 Cryptographic Accelerator",
-"	00a5  ATM Controller (1410a500)",
-"	00a6  ATM 155MBPS MM Controller (1410a600)",
-"	00b7  256-bit Graphics Rasterizer [Fire GL1]",
-"		1092 00b8  FireGL1 AGP 32Mb",
-"	00b8  GXT2000P Graphics Adapter",
-"	00be  ATM 622MBPS Controller (1410be00)",
-"	00dc  Advanced Systems Management Adapter (ASMA)",
-"	00fc  CPC710 Dual Bridge and Memory Controller (PCI-64)",
-"	0104  Gigabit Ethernet-SX Adapter",
-"	0105  CPC710 Dual Bridge and Memory Controller (PCI-32)",
-"	010f  Remote Supervisor Adapter (RSA)",
-"	0142  Yotta Video Compositor Input",
-"		1014 0143  Yotta Input Controller (ytin)",
-"	0144  Yotta Video Compositor Output",
-"		1014 0145  Yotta Output Controller (ytout)",
-"	0156  405GP PLB to PCI Bridge",
-"	015e  622Mbps ATM PCI Adapter",
-"	0160  64bit/66MHz PCI ATM 155 MMF",
-"	016e  GXT4000P Graphics Adapter",
-"	0170  GXT6000P Graphics Adapter",
-"	017d  GXT300P Graphics Adapter",
-"	0180  Snipe chipset SCSI controller",
-"		1014 0241  iSeries 2757 DASD IOA",
-"		1014 0264  Quad Channel PCI-X U320 SCSI RAID Adapter (2780)",
-"	0188  EADS-X PCI-X to PCI-X Bridge",
-"	01a7  PCI-X to PCI-X Bridge",
-"	01bd  ServeRAID Controller",
-"		1014 01be  ServeRAID-4M",
-"		1014 01bf  ServeRAID-4L",
-"		1014 0208  ServeRAID-4Mx",
-"		1014 020e  ServeRAID-4Lx",
-"		1014 022e  ServeRAID-4H",
-"		1014 0258  ServeRAID-5i",
-"		1014 0259  ServeRAID-5i",
-"	01c1  64bit/66MHz PCI ATM 155 UTP",
-"	01e6  Cryptographic Accelerator",
-"	01ff  10/100 Mbps Ethernet",
-"	0219  Multiport Serial Adapter",
-"		1014 021a  Dual RVX",
-"		1014 0251  Internal Modem/RVX",
-"		1014 0252  Quad Internal Modem",
-"	021b  GXT6500P Graphics Adapter",
-"	021c  GXT4500P Graphics Adapter",
-"	0233  GXT135P Graphics Adapter",
-"	0266  PCI-X Dual Channel SCSI",
-"	0268  Gigabit Ethernet-SX Adapter (PCI-X)",
-"	0269  10/100/1000 Base-TX Ethernet Adapter (PCI-X)",
-"	028c  Citrine chipset SCSI controller",
-"		1014 028d  Dual Channel PCI-X DDR SAS RAID Adapter (572E)",
-"		1014 02be  Dual Channel PCI-X DDR U320 SCSI RAID Adapter (571B)",
-"		1014 02c0  Dual Channel PCI-X DDR U320 SCSI Adapter (571A)",
-"		1014 030d  PCI-X DDR Auxiliary Cache Adapter (575B)",
-"	02a1  Calgary PCI-X Host Bridge",
-"	02bd  Obsidian chipset SCSI controller",
-"		1014 02c1  PCI-X DDR 3Gb SAS Adapter (572A/572C)",
-"		1014 02c2  PCI-X DDR 3Gb SAS RAID Adapter (572B/571D)",
-"	0302  Winnipeg PCI-X Host Bridge",
-"	0314  ZISC 036 Neural accelerator card",
-"	3022  QLA3022 Network Adapter",
-"	4022  QLA3022 Network Adapter",
-"	ffff  MPIC-2 interrupt controller",
-"1015  LSI Logic Corp of Canada",
-"1016  ICL Personal Systems",
-"1017  SPEA Software AG",
-"	5343  SPEA 3D Accelerator",
-"1018  Unisys Systems",
-"1019  Elitegroup Computer Systems",
-"101a  AT&T GIS (NCR)",
-"	0005  100VG ethernet",
-"101b  Vitesse Semiconductor",
-"101c  Western Digital",
-"	0193  33C193A",
-"	0196  33C196A",
-"	0197  33C197A",
-"	0296  33C296A",
-"	3193  7193",
-"	3197  7197",
-"	3296  33C296A",
-"	4296  34C296",
-"	9710  Pipeline 9710",
-"	9712  Pipeline 9712",
-"	c24a  90C",
-"101e  American Megatrends Inc.",
-"	0009  MegaRAID 428 Ultra RAID Controller (rev 03)",
-"	1960  MegaRAID",
-"		101e 0471  MegaRAID 471 Enterprise 1600 RAID Controller",
-"		101e 0475  MegaRAID 475 Express 500/500LC RAID Controller",
-"		101e 0477  MegaRAID 477 Elite 3100 RAID Controller",
-"		101e 0493  MegaRAID 493 Elite 1600 RAID Controller",
-"		101e 0494  MegaRAID 494 Elite 1650 RAID Controller",
-"		101e 0503  MegaRAID 503 Enterprise 1650 RAID Controller",
-"		101e 0511  MegaRAID 511 i4 IDE RAID Controller",
-"		101e 0522  MegaRAID 522 i4133 RAID Controller",
-"		1028 0471  PowerEdge RAID Controller 3/QC",
-"		1028 0475  PowerEdge RAID Controller 3/SC",
-"		1028 0493  PowerEdge RAID Controller 3/DC",
-"		1028 0511  PowerEdge Cost Effective RAID Controller ATA100/4Ch",
-"		103c 60e7  NetRAID-1M",
-"	9010  MegaRAID 428 Ultra RAID Controller",
-"	9030  EIDE Controller",
-"	9031  EIDE Controller",
-"	9032  EIDE & SCSI Controller",
-"	9033  SCSI Controller",
-"	9040  Multimedia card",
-"	9060  MegaRAID 434 Ultra GT RAID Controller",
-"	9063  MegaRAC",
-"		101e 0767  Dell Remote Assistant Card 2",
-"101f  PictureTel",
-"1020  Hitachi Computer Products",
-"1021  OKI Electric Industry Co. Ltd.",
-"1022  Advanced Micro Devices [AMD]",
-"	1100  K8 [Athlon64/Opteron] HyperTransport Technology Configuration",
-"	1101  K8 [Athlon64/Opteron] Address Map",
-"	1102  K8 [Athlon64/Opteron] DRAM Controller",
-"	1103  K8 [Athlon64/Opteron] Miscellaneous Control",
-"	2000  79c970 [PCnet32 LANCE]",
-"		1014 2000  NetFinity 10/100 Fast Ethernet",
-"		1022 2000  PCnet - Fast 79C971",
-"		103c 104c  Ethernet with LAN remote power Adapter",
-"		103c 1064  Ethernet with LAN remote power Adapter",
-"		103c 1065  Ethernet with LAN remote power Adapter",
-"		103c 106c  Ethernet with LAN remote power Adapter",
-"		103c 106e  Ethernet with LAN remote power Adapter",
-"		103c 10ea  Ethernet with LAN remote power Adapter",
-"		1113 1220  EN1220 10/100 Fast Ethernet",
-"		1259 2450  AT-2450 10/100 Fast Ethernet",
-"		1259 2454  AT-2450v4 10Mb Ethernet Adapter",
-"		1259 2700  AT-2700TX 10/100 Fast Ethernet",
-"		1259 2701  AT-2700FX 100Mb Ethernet",
-"		1259 2702  AT-2700FTX 10/100 Mb Fiber/Copper Fast Ethernet",
-"		1259 2703  AT-2701FX",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1010  CP5/CR6 mainboard",
-"		4c53 1020  VR6 mainboard",
-"		4c53 1030  PC5 mainboard",
-"		4c53 1040  CL7 mainboard",
-"		4c53 1060  PC7 mainboard",
-"	2001  79c978 [HomePNA]",
-"		1092 0a78  Multimedia Home Network Adapter",
-"		1668 0299  ActionLink Home Network Adapter",
-"	2003  Am 1771 MBW [Alchemy]",
-"	2020  53c974 [PCscsi]",
-"	2040  79c974",
-"	2081  Geode LX Video",
-"	2082  Geode LX AES Security Block",
-"	208f  CS5536 GeodeLink PCI South Bridge",
-"	2090  CS5536 [Geode companion] ISA",
-"	2091  CS5536 [Geode companion] FLASH",
-"	2093  CS5536 [Geode companion] Audio",
-"	2094  CS5536 [Geode companion] OHC",
-"	2095  CS5536 [Geode companion] EHC",
-"	2096  CS5536 [Geode companion] UDC",
-"	2097  CS5536 [Geode companion] UOC",
-"	209a  CS5536 [Geode companion] IDE",
-"	3000  ELanSC520 Microcontroller",
-"	7006  AMD-751 [Irongate] System Controller",
-"	7007  AMD-751 [Irongate] AGP Bridge",
-"	700a  AMD-IGR4 AGP Host to PCI Bridge",
-"	700b  AMD-IGR4 PCI to PCI Bridge",
-"	700c  AMD-760 MP [IGD4-2P] System Controller",
-"	700d  AMD-760 MP [IGD4-2P] AGP Bridge",
-"	700e  AMD-760 [IGD4-1P] System Controller",
-"	700f  AMD-760 [IGD4-1P] AGP Bridge",
-"	7400  AMD-755 [Cobra] ISA",
-"	7401  AMD-755 [Cobra] IDE",
-"	7403  AMD-755 [Cobra] ACPI",
-"	7404  AMD-755 [Cobra] USB",
-"	7408  AMD-756 [Viper] ISA",
-"	7409  AMD-756 [Viper] IDE",
-"	740b  AMD-756 [Viper] ACPI",
-"	740c  AMD-756 [Viper] USB",
-"	7410  AMD-766 [ViperPlus] ISA",
-"	7411  AMD-766 [ViperPlus] IDE",
-"	7413  AMD-766 [ViperPlus] ACPI",
-"	7414  AMD-766 [ViperPlus] USB",
-"	7440  AMD-768 [Opus] ISA",
-"		1043 8044  A7M-D Mainboard",
-"	7441  AMD-768 [Opus] IDE",
-"	7443  AMD-768 [Opus] ACPI",
-"		1043 8044  A7M-D Mainboard",
-"	7445  AMD-768 [Opus] Audio",
-"	7446  AMD-768 [Opus] MC97 Modem (Smart Link HAMR5600 compatible)",
-"	7448  AMD-768 [Opus] PCI",
-"	7449  AMD-768 [Opus] USB",
-"	7450  AMD-8131 PCI-X Bridge",
-"	7451  AMD-8131 PCI-X IOAPIC",
-"	7454  AMD-8151 System Controller",
-"	7455  AMD-8151 AGP Bridge",
-"	7458  AMD-8132 PCI-X Bridge",
-"	7459  AMD-8132 PCI-X IOAPIC",
-"	7460  AMD-8111 PCI",
-"		161f 3017  HDAMB",
-"	7461  AMD-8111 USB",
-"	7462  AMD-8111 Ethernet",
-"	7464  AMD-8111 USB",
-"		161f 3017  HDAMB",
-"	7468  AMD-8111 LPC",
-"		161f 3017  HDAMB",
-"	7469  AMD-8111 IDE",
-"		1022 2b80  AMD-8111 IDE [Quartet]",
-"		161f 3017  HDAMB",
-"	746a  AMD-8111 SMBus 2.0",
-"	746b  AMD-8111 ACPI",
-"		161f 3017  HDAMB",
-"	746d  AMD-8111 AC97 Audio",
-"		161f 3017  HDAMB",
-"	746e  AMD-8111 MC97 Modem",
-"	756b  AMD-8111 ACPI",
-"1023  Trident Microsystems",
-"	0194  82C194",
-"	2000  4DWave DX",
-"	2001  4DWave NX",
-"		122d 1400  Trident PCI288-Q3DII (NX)",
-"	2100  CyberBlade XP4m32",
-"	2200  XGI Volari XP5",
-"	8400  CyberBlade/i7",
-"		1023 8400  CyberBlade i7 AGP",
-"	8420  CyberBlade/i7d",
-"		0e11 b15a  CyberBlade i7 AGP",
-"	8500  CyberBlade/i1",
-"	8520  CyberBlade i1",
-"		0e11 b16e  CyberBlade i1 AGP",
-"		1023 8520  CyberBlade i1 AGP",
-"	8620  CyberBlade/i1",
-"		1014 0502  ThinkPad R30/T30",
-"		1014 1025  Travelmate 352TE",
-"	8820  CyberBlade XPAi1",
-"	9320  TGUI 9320",
-"	9350  GUI Accelerator",
-"	9360  Flat panel GUI Accelerator",
-"	9382  Cyber 9382 [Reference design]",
-"	9383  Cyber 9383 [Reference design]",
-"	9385  Cyber 9385 [Reference design]",
-"	9386  Cyber 9386",
-"	9388  Cyber 9388",
-"	9397  Cyber 9397",
-"	939a  Cyber 9397DVD",
-"	9420  TGUI 9420",
-"	9430  TGUI 9430",
-"	9440  TGUI 9440",
-"	9460  TGUI 9460",
-"	9470  TGUI 9470",
-"	9520  Cyber 9520",
-"	9525  Cyber 9525",
-"		10cf 1094  Lifebook C6155",
-"	9540  Cyber 9540",
-"	9660  TGUI 9660/938x/968x",
-"	9680  TGUI 9680",
-"	9682  TGUI 9682",
-"	9683  TGUI 9683",
-"	9685  ProVIDIA 9685",
-"	9750  3DImage 9750",
-"		1014 9750  3DImage 9750",
-"		1023 9750  3DImage 9750",
-"	9753  TGUI 9753",
-"	9754  TGUI 9754",
-"	9759  TGUI 975",
-"	9783  TGUI 9783",
-"	9785  TGUI 9785",
-"	9850  3DImage 9850",
-"	9880  Blade 3D PCI/AGP",
-"		1023 9880  Blade 3D",
-"	9910  CyberBlade/XP",
-"	9930  CyberBlade/XPm",
-"1024  Zenith Data Systems",
-"1025  Acer Incorporated [ALI]",
-"	1435  M1435",
-"	1445  M1445",
-"	1449  M1449",
-"	1451  M1451",
-"	1461  M1461",
-"	1489  M1489",
-"	1511  M1511",
-"	1512  ALI M1512 Aladdin",
-"	1513  M1513",
-"	1521  ALI M1521 Aladdin III CPU Bridge",
-"		10b9 1521  ALI M1521 Aladdin III CPU Bridge",
-"	1523  ALI M1523 ISA Bridge",
-"		10b9 1523  ALI M1523 ISA Bridge",
-"	1531  M1531 Northbridge [Aladdin IV/IV+]",
-"	1533  M1533 PCI-to-ISA Bridge",
-"		10b9 1533  ALI M1533 Aladdin IV/V ISA South Bridge",
-"	1535  M1535 PCI Bridge + Super I/O + FIR",
-"	1541  M1541 Northbridge [Aladdin V]",
-"		10b9 1541  ALI M1541 Aladdin V/V+ AGP+PCI North Bridge",
-"	1542  M1542 Northbridge [Aladdin V]",
-"	1543  M1543 PCI-to-ISA Bridge + Super I/O + FIR",
-"	1561  M1561 Northbridge [Aladdin 7]",
-"	1621  M1621 Northbridge [Aladdin-Pro II]",
-"	1631  M1631 Northbridge+3D Graphics [Aladdin TNT2]",
-"	1641  M1641 Northbridge [Aladdin-Pro IV]",
-"	1647  M1647 [MaGiK1] PCI North Bridge",
-"	1671  M1671 Northbridge [ALADDiN-P4]",
-"	1672  Northbridge [CyberALADDiN-P4]",
-"	3141  M3141",
-"	3143  M3143",
-"	3145  M3145",
-"	3147  M3147",
-"	3149  M3149",
-"	3151  M3151",
-"	3307  M3307 MPEG-I Video Controller",
-"	3309  M3309 MPEG-II Video w/ Software Audio Decoder",
-"	3321  M3321 MPEG-II Audio/Video Decoder",
-"	5212  M4803",
-"	5215  ALI PCI EIDE Controller",
-"	5217  M5217H",
-"	5219  M5219",
-"	5225  M5225",
-"	5229  M5229",
-"	5235  M5235",
-"	5237  M5237 PCI USB Host Controller",
-"	5240  EIDE Controller",
-"	5241  PCMCIA Bridge",
-"	5242  General Purpose Controller",
-"	5243  PCI to PCI Bridge Controller",
-"	5244  Floppy Disk Controller",
-"	5247  M1541 PCI to PCI Bridge",
-"	5251  M5251 P1394 Controller",
-"	5427  PCI to AGP Bridge",
-"	5451  M5451 PCI AC-Link Controller Audio Device",
-"	5453  M5453 PCI AC-Link Controller Modem Device",
-"	7101  M7101 PCI PMU Power Management Controller",
-"		10b9 7101  M7101 PCI PMU Power Management Controller",
-"1028  Dell",
-"	0001  PowerEdge Expandable RAID Controller 2/Si",
-"		1028 0001  PowerEdge 2400",
-"	0002  PowerEdge Expandable RAID Controller 3/Di",
-"		1028 0002  PowerEdge 4400",
-"	0003  PowerEdge Expandable RAID Controller 3/Si",
-"		1028 0003  PowerEdge 2450",
-"	0006  PowerEdge Expandable RAID Controller 3/Di",
-"	0007  Remote Access Card III",
-"	0008  Remote Access Card III",
-"	0009  Remote Access Card III: BMC/SMIC device not present",
-"	000a  PowerEdge Expandable RAID Controller 3/Di",
-"	000c  Embedded Remote Access or ERA/O",
-"	000d  Embedded Remote Access: BMC/SMIC device",
-"	000e  PowerEdge Expandable RAID controller 4/Di",
-"	000f  PowerEdge Expandable RAID controller 4/Di",
-"	0010  Remote Access Card 4",
-"	0011  Remote Access Card 4 Daughter Card",
-"	0012  Remote Access Card 4 Daughter Card Virtual UART",
-"	0013  PowerEdge Expandable RAID controller 4",
-"		1028 016c  PowerEdge Expandable RAID Controller 4e/Si",
-"		1028 016d  PowerEdge Expandable RAID Controller 4e/Di",
-"		1028 016e  PowerEdge Expandable RAID Controller 4e/Di",
-"		1028 016f  PowerEdge Expandable RAID Controller 4e/Di",
-"		1028 0170  PowerEdge Expandable RAID Controller 4e/Di",
-"	0014  Remote Access Card 4 Daughter Card SMIC interface",
-"	0015  PowerEdge Expandable RAID controller 5",
-"1029  Siemens Nixdorf IS",
-"102a  LSI Logic",
-"	0000  HYDRA",
-"	0010  ASPEN",
-"	001f  AHA-2940U2/U2W /7890/7891 SCSI Controllers",
-"		9005 000f  2940U2W SCSI Controller",
-"		9005 0106  2940U2W SCSI Controller",
-"		9005 a180  2940U2W SCSI Controller",
-"	00c5  AIC-7899 U160/m SCSI Controller",
-"		1028 00c5  PowerEdge 2550/2650/4600",
-"	00cf  AIC-7899P U160/m",
-"		1028 0106  PowerEdge 4600",
-"		1028 0121  PowerEdge 2650",
-"102b  Matrox Graphics, Inc.",
-"	0010  MGA-I [Impression\?]",
-"	0100  MGA 1064SG [Mystique]",
-"	0518  MGA-II [Athena]",
-"	0519  MGA 2064W [Millennium]",
-"	051a  MGA 1064SG [Mystique]",
-"		102b 0100  MGA-1064SG Mystique",
-"		102b 1100  MGA-1084SG Mystique",
-"		102b 1200  MGA-1084SG Mystique",
-"		1100 102b  MGA-1084SG Mystique",
-"		110a 0018  Scenic Pro C5 (D1025)",
-"	051b  MGA 2164W [Millennium II]",
-"		102b 051b  MGA-2164W Millennium II",
-"		102b 1100  MGA-2164W Millennium II",
-"		102b 1200  MGA-2164W Millennium II",
-"	051e  MGA 1064SG [Mystique] AGP",
-"	051f  MGA 2164W [Millennium II] AGP",
-"	0520  MGA G200",
-"		102b dbc2  G200 Multi-Monitor",
-"		102b dbc8  G200 Multi-Monitor",
-"		102b dbe2  G200 Multi-Monitor",
-"		102b dbe8  G200 Multi-Monitor",
-"		102b ff03  Millennium G200 SD",
-"		102b ff04  Marvel G200",
-"	0521  MGA G200 AGP",
-"		1014 ff03  Millennium G200 AGP",
-"		102b 48e9  Mystique G200 AGP",
-"		102b 48f8  Millennium G200 SD AGP",
-"		102b 4a60  Millennium G200 LE AGP",
-"		102b 4a64  Millennium G200 AGP",
-"		102b c93c  Millennium G200 AGP",
-"		102b c9b0  Millennium G200 AGP",
-"		102b c9bc  Millennium G200 AGP",
-"		102b ca60  Millennium G250 LE AGP",
-"		102b ca6c  Millennium G250 AGP",
-"		102b dbbc  Millennium G200 AGP",
-"		102b dbc2  Millennium G200 MMS (Dual G200)",
-"		102b dbc3  G200 Multi-Monitor",
-"		102b dbc8  Millennium G200 MMS (Dual G200)",
-"		102b dbd2  G200 Multi-Monitor",
-"		102b dbd3  G200 Multi-Monitor",
-"		102b dbd4  G200 Multi-Monitor",
-"		102b dbd5  G200 Multi-Monitor",
-"		102b dbd8  G200 Multi-Monitor",
-"		102b dbd9  G200 Multi-Monitor",
-"		102b dbe2  Millennium G200 MMS (Quad G200)",
-"		102b dbe3  G200 Multi-Monitor",
-"		102b dbe8  Millennium G200 MMS (Quad G200)",
-"		102b dbf2  G200 Multi-Monitor",
-"		102b dbf3  G200 Multi-Monitor",
-"		102b dbf4  G200 Multi-Monitor",
-"		102b dbf5  G200 Multi-Monitor",
-"		102b dbf8  G200 Multi-Monitor",
-"		102b dbf9  G200 Multi-Monitor",
-"		102b f806  Mystique G200 Video AGP",
-"		102b ff00  MGA-G200 AGP",
-"		102b ff02  Mystique G200 AGP",
-"		102b ff03  Millennium G200 AGP",
-"		102b ff04  Marvel G200 AGP",
-"		110a 0032  MGA-G200 AGP",
-"	0522  MGA G200e [Pilot] ServerEngines (SEP1)",
-"	0525  MGA G400/G450",
-"		0e11 b16f  MGA-G400 AGP",
-"		102b 0328  Millennium G400 16Mb SDRAM",
-"		102b 0338  Millennium G400 16Mb SDRAM",
-"		102b 0378  Millennium G400 32Mb SDRAM",
-"		102b 0541  Millennium G450 Dual Head",
-"		102b 0542  Millennium G450 Dual Head LX",
-"		102b 0543  Millennium G450 Single Head LX",
-"		102b 0641  Millennium G450 32Mb SDRAM Dual Head",
-"		102b 0642  Millennium G450 32Mb SDRAM Dual Head LX",
-"		102b 0643  Millennium G450 32Mb SDRAM Single Head LX",
-"		102b 07c0  Millennium G450 Dual Head LE",
-"		102b 07c1  Millennium G450 SDR Dual Head LE",
-"		102b 0d41  Millennium G450 Dual Head PCI",
-"		102b 0d42  Millennium G450 Dual Head LX PCI",
-"		102b 0d43  Millennium G450 32Mb Dual Head PCI",
-"		102b 0e00  Marvel G450 eTV",
-"		102b 0e01  Marvel G450 eTV",
-"		102b 0e02  Marvel G450 eTV",
-"		102b 0e03  Marvel G450 eTV",
-"		102b 0f80  Millennium G450 Low Profile",
-"		102b 0f81  Millennium G450 Low Profile",
-"		102b 0f82  Millennium G450 Low Profile DVI",
-"		102b 0f83  Millennium G450 Low Profile DVI",
-"		102b 19d8  Millennium G400 16Mb SGRAM",
-"		102b 19f8  Millennium G400 32Mb SGRAM",
-"		102b 2159  Millennium G400 Dual Head 16Mb",
-"		102b 2179  Millennium G400 MAX/Dual Head 32Mb",
-"		102b 217d  Millennium G400 Dual Head Max",
-"		102b 23c0  Millennium G450",
-"		102b 23c1  Millennium G450",
-"		102b 23c2  Millennium G450 DVI",
-"		102b 23c3  Millennium G450 DVI",
-"		102b 2f58  Millennium G400",
-"		102b 2f78  Millennium G400",
-"		102b 3693  Marvel G400 AGP",
-"		102b 5dd0  4Sight II",
-"		102b 5f50  4Sight II",
-"		102b 5f51  4Sight II",
-"		102b 5f52  4Sight II",
-"		102b 9010  Millennium G400 Dual Head",
-"		1458 0400  GA-G400",
-"		1705 0001  Millennium G450 32MB SGRAM",
-"		1705 0002  Millennium G450 16MB SGRAM",
-"		1705 0003  Millennium G450 32MB",
-"		1705 0004  Millennium G450 16MB",
-"	0527  MGA Parhelia AGP",
-"		102b 0840  Parhelia 128Mb",
-"		102b 0850  Parhelia 256MB AGP 4X",
-"	0528  Parhelia 8X",
-"		102b 1020  Parhelia 128MB",
-"		102b 1030  Parhelia 256 MB Dual DVI",
-"		102b 14e1  Parhelia PCI 256MB",
-"		102b 2021  QID Pro",
-"	0d10  MGA Ultima/Impression",
-"	1000  MGA G100 [Productiva]",
-"		102b ff01  Productiva G100",
-"		102b ff05  Productiva G100 Multi-Monitor",
-"	1001  MGA G100 [Productiva] AGP",
-"		102b 1001  MGA-G100 AGP",
-"		102b ff00  MGA-G100 AGP",
-"		102b ff01  MGA-G100 Productiva AGP",
-"		102b ff03  Millennium G100 AGP",
-"		102b ff04  MGA-G100 AGP",
-"		102b ff05  MGA-G100 Productiva AGP Multi-Monitor",
-"		110a 001e  MGA-G100 AGP",
-"	2007  MGA Mistral",
-"	2527  MGA G550 AGP",
-"		102b 0f83  Millennium G550",
-"		102b 0f84  Millennium G550 Dual Head DDR 32Mb",
-"		102b 1e41  Millennium G550",
-"	2537  Millenium P650/P750",
-"		102b 1820  Millennium P750 64MB",
-"		102b 1830  Millennium P650 64MB",
-"		102b 1c10  QID 128MB",
-"		102b 2811  Millennium P650 Low-profile PCI 64MB",
-"		102b 2c11  QID Low-profile PCI",
-"	2538  Millenium P650 PCIe",
-"		102b 08c7  Millennium P650 PCIe 128MB",
-"		102b 0907  Millennium P650 PCIe 64MB",
-"		102b 1047  Millennium P650 LP PCIe 128MB",
-"		102b 1087  Millennium P650 LP PCIe 64MB",
-"		102b 2538  Parhelia APVe",
-"		102b 3007  QID Low-profile PCIe",
-"	4536  VIA Framegrabber",
-"	6573  Shark 10/100 Multiport SwitchNIC",
-"102c  Chips and Technologies",
-"	00b8  F64310",
-"	00c0  F69000 HiQVideo",
-"		102c 00c0  F69000 HiQVideo",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1010  CP5/CR6 mainboard",
-"		4c53 1020  VR6 mainboard",
-"		4c53 1030  PC5 mainboard",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"	00d0  F65545",
-"	00d8  F65545",
-"	00dc  F65548",
-"	00e0  F65550",
-"	00e4  F65554",
-"	00e5  F65555 HiQVPro",
-"		0e11 b049  Armada 1700 Laptop Display Controller",
-"		1179 0001  Satellite Pro",
-"	00f0  F68554",
-"	00f4  F68554 HiQVision",
-"	00f5  F68555",
-"	0c30  F69030",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		4c53 1080  CT8 mainboard",
-"102d  Wyse Technology Inc.",
-"	50dc  3328 Audio",
-"102e  Olivetti Advanced Technology",
-"102f  Toshiba America",
-"	0009  r4x00",
-"	000a  TX3927 MIPS RISC PCI Controller",
-"	0020  ATM Meteor 155",
-"		102f 00f8  ATM Meteor 155",
-"	0030  TC35815CF PCI 10/100 Mbit Ethernet Controller",
-"	0031  TC35815CF PCI 10/100 Mbit Ethernet Controller with WOL",
-"	0105  TC86C001 [goku-s] IDE",
-"	0106  TC86C001 [goku-s] USB 1.1 Host",
-"	0107  TC86C001 [goku-s] USB Device Controller",
-"	0108  TC86C001 [goku-s] I2C/SIO/GPIO Controller",
-"	0180  TX4927/38 MIPS RISC PCI Controller",
-"	0181  TX4925 MIPS RISC PCI Controller",
-"	0182  TX4937 MIPS RISC PCI Controller",
-"1030  TMC Research",
-"1031  Miro Computer Products AG",
-"	5601  DC20 ASIC",
-"	5607  Video I/O & motion JPEG compressor",
-"	5631  Media 3D",
-"	6057  MiroVideo DC10/DC30+",
-"1032  Compaq",
-"1033  NEC Corporation",
-"	0000  Vr4181A USB Host or Function Control Unit",
-"	0001  PCI to 486-like bus Bridge",
-"	0002  PCI to VL98 Bridge",
-"	0003  ATM Controller",
-"	0004  R4000 PCI Bridge",
-"	0005  PCI to 486-like bus Bridge",
-"	0006  PC-9800 Graphic Accelerator",
-"	0007  PCI to UX-Bus Bridge",
-"	0008  PC-9800 Graphic Accelerator",
-"	0009  PCI to PC9800 Core-Graph Bridge",
-"	0016  PCI to VL Bridge",
-"	001a  [Nile II]",
-"	0021  Vrc4373 [Nile I]",
-"	0029  PowerVR PCX1",
-"	002a  PowerVR 3D",
-"	002c  Star Alpha 2",
-"	002d  PCI to C-bus Bridge",
-"	0035  USB",
-"		1033 0035  Hama USB 2.0 CardBus",
-"		1179 0001  USB",
-"		12ee 7000  Root Hub",
-"		14c2 0105  PTI-205N USB 2.0 Host Controller",
-"		1799 0001  Root Hub",
-"		1931 000a  GlobeTrotter Fusion Quad Lite (PPP data)",
-"		1931 000b  GlobeTrotter Fusion Quad Lite (GSM data)",
-"		807d 0035  PCI-USB2 (OHCI subsystem)",
-"	003b  PCI to C-bus Bridge",
-"	003e  NAPCCARD Cardbus Controller",
-"	0046  PowerVR PCX2 [midas]",
-"	005a  Vrc5074 [Nile 4]",
-"	0063  Firewarden",
-"	0067  PowerVR Neon 250 Chipset",
-"		1010 0020  PowerVR Neon 250 AGP 32Mb",
-"		1010 0080  PowerVR Neon 250 AGP 16Mb",
-"		1010 0088  PowerVR Neon 250 16Mb",
-"		1010 0090  PowerVR Neon 250 AGP 16Mb",
-"		1010 0098  PowerVR Neon 250 16Mb",
-"		1010 00a0  PowerVR Neon 250 AGP 32Mb",
-"		1010 00a8  PowerVR Neon 250 32Mb",
-"		1010 0120  PowerVR Neon 250 AGP 32Mb",
-"	0072  uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr",
-"	0074  56k Voice Modem",
-"		1033 8014  RCV56ACF 56k Voice Modem",
-"	009b  Vrc5476",
-"	00a5  VRC4173",
-"	00a6  VRC5477 AC97",
-"	00cd  IEEE 1394 [OrangeLink] Host Controller",
-"		12ee 8011  Root hub",
-"	00ce  IEEE 1394 Host Controller",
-"	00df  Vr4131",
-"	00e0  USB 2.0",
-"		12ee 7001  Root hub",
-"		14c2 0205  PTI-205N USB 2.0 Host Controller",
-"		1799 0002  Root Hub",
-"		807d 1043  PCI-USB2 (EHCI subsystem)",
-"	00e7  IEEE 1394 Host Controller",
-"	00f2  uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr",
-"	00f3  uPD6113x Multimedia Decoder/Processor [EMMA2]",
-"	010c  VR7701",
-"	0125  uPD720400 PCI Express - PCI/PCI-X Bridge",
-"1034  Framatome Connectors USA Inc.",
-"1035  Comp. & Comm. Research Lab",
-"1036  Future Domain Corp.",
-"	0000  TMC-18C30 [36C70]",
-"1037  Hitachi Micro Systems",
-"1038  AMP, Inc",
-"1039  Silicon Integrated Systems [SiS]",
-"	0001  Virtual PCI-to-PCI bridge (AGP)",
-"	0002  SG86C202",
-"	0003  SiS AGP Port (virtual PCI-to-PCI bridge)",
-"	0004  PCI-to-PCI bridge",
-"	0006  85C501/2/3",
-"	0008  SiS85C503/5513 (LPC Bridge)",
-"	0009  ACPI",
-"	000a  PCI-to-PCI bridge",
-"	0016  SiS961/2 SMBus Controller",
-"	0018  SiS85C503/5513 (LPC Bridge)",
-"	0180  RAID bus controller 180 SATA/PATA  [SiS]",
-"	0181  SATA",
-"	0182  182 SATA/RAID Controller",
-"	0190  190 Gigabit Ethernet Adapter",
-"	0191  191 Gigabit Ethernet Adapter",
-"	0200  5597/5598/6326 VGA",
-"		1039 0000  SiS5597 SVGA (Shared RAM)",
-"	0204  82C204",
-"	0205  SG86C205",
-"	0300  300/305 PCI/AGP VGA Display Adapter",
-"		107d 2720  Leadtek WinFast VR300",
-"	0310  315H PCI/AGP VGA Display Adapter",
-"	0315  315 PCI/AGP VGA Display Adapter",
-"	0325  315PRO PCI/AGP VGA Display Adapter",
-"	0330  330 [Xabre] PCI/AGP VGA Display Adapter",
-"	0406  85C501/2",
-"	0496  85C496",
-"	0530  530 Host",
-"	0540  540 Host",
-"	0550  550 Host",
-"	0597  5513C",
-"	0601  85C601",
-"	0620  620 Host",
-"	0630  630 Host",
-"	0633  633 Host",
-"	0635  635 Host",
-"	0645  SiS645 Host & Memory & AGP Controller",
-"	0646  SiS645DX Host & Memory & AGP Controller",
-"	0648  645xx",
-"	0650  650/M650 Host",
-"	0651  651 Host",
-"	0655  655 Host",
-"	0660  660 Host",
-"	0661  661FX/M661FX/M661MX Host",
-"	0730  730 Host",
-"	0733  733 Host",
-"	0735  735 Host",
-"	0740  740 Host",
-"	0741  741/741GX/M741 Host",
-"	0745  745 Host",
-"	0746  746 Host",
-"	0755  755 Host",
-"	0760  760/M760 Host",
-"	0761  761/M761 Host",
-"	0900  SiS900 PCI Fast Ethernet",
-"		1019 0a14  K7S5A motherboard",
-"		1039 0900  SiS900 10/100 Ethernet Adapter",
-"		1043 8035  CUSI-FX motherboard",
-"	0961  SiS961 [MuTIOL Media IO]",
-"	0962  SiS962 [MuTIOL Media IO]",
-"	0963  SiS963 [MuTIOL Media IO]",
-"	0964  SiS964 [MuTIOL Media IO]",
-"	0965  SiS965 [MuTIOL Media IO]",
-"	3602  83C602",
-"	5107  5107",
-"	5300  SiS540 PCI Display Adapter",
-"	5315  550 PCI/AGP VGA Display Adapter",
-"	5401  486 PCI Chipset",
-"	5511  5511/5512",
-"	5513  5513 [IDE]",
-"		1019 0970  P6STP-FL motherboard",
-"		1039 5513  SiS5513 EIDE Controller (A,B step)",
-"		1043 8035  CUSI-FX motherboard",
-"	5517  5517",
-"	5571  5571",
-"	5581  5581 Pentium Chipset",
-"	5582  5582",
-"	5591  5591/5592 Host",
-"	5596  5596 Pentium Chipset",
-"	5597  5597 [SiS5582]",
-"	5600  5600 Host",
-"	6204  Video decoder & MPEG interface",
-"	6205  VGA Controller",
-"	6236  6236 3D-AGP",
-"	6300  630/730 PCI/AGP VGA Display Adapter",
-"		1019 0970  P6STP-FL motherboard",
-"		1043 8035  CUSI-FX motherboard",
-"	6306  530/620 PCI/AGP VGA Display Adapter",
-"		1039 6306  SiS530,620 GUI Accelerator+3D",
-"	6325  65x/M650/740 PCI/AGP VGA Display Adapter",
-"	6326  86C326 5598/6326",
-"		1039 6326  SiS6326 GUI Accelerator",
-"		1092 0a50  SpeedStar A50",
-"		1092 0a70  SpeedStar A70",
-"		1092 4910  SpeedStar A70",
-"		1092 4920  SpeedStar A70",
-"		1569 6326  SiS6326 GUI Accelerator",
-"	6330  661/741/760/761 PCI/AGP VGA Display Adapter",
-"		1039 6330  [M]661xX/[M]741[GX]/[M]760 PCI/AGP VGA Adapter",
-"	7001  USB 1.0 Controller",
-"		1019 0a14  K7S5A motherboard",
-"		1039 7000  Onboard USB Controller",
-"		1462 5470  K7SOM+ 5.2C Motherboard",
-"	7002  USB 2.0 Controller",
-"		1509 7002  Onboard USB Controller",
-"	7007  FireWire Controller",
-"	7012  AC'97 Sound Controller",
-"		15bd 1001  DFI 661FX motherboard",
-"	7013  AC'97 Modem Controller",
-"	7016  SiS7016 PCI Fast Ethernet Adapter",
-"		1039 7016  SiS7016 10/100 Ethernet Adapter",
-"	7018  SiS PCI Audio Accelerator",
-"		1014 01b6  SiS PCI Audio Accelerator",
-"		1014 01b7  SiS PCI Audio Accelerator",
-"		1019 7018  SiS PCI Audio Accelerator",
-"		1025 000e  SiS PCI Audio Accelerator",
-"		1025 0018  SiS PCI Audio Accelerator",
-"		1039 7018  SiS PCI Audio Accelerator",
-"		1043 800b  SiS PCI Audio Accelerator",
-"		1054 7018  SiS PCI Audio Accelerator",
-"		107d 5330  SiS PCI Audio Accelerator",
-"		107d 5350  SiS PCI Audio Accelerator",
-"		1170 3209  SiS PCI Audio Accelerator",
-"		1462 400a  SiS PCI Audio Accelerator",
-"		14a4 2089  SiS PCI Audio Accelerator",
-"		14cd 2194  SiS PCI Audio Accelerator",
-"		14ff 1100  SiS PCI Audio Accelerator",
-"		152d 8808  SiS PCI Audio Accelerator",
-"		1558 1103  SiS PCI Audio Accelerator",
-"		1558 2200  SiS PCI Audio Accelerator",
-"		1563 7018  SiS PCI Audio Accelerator",
-"		15c5 0111  SiS PCI Audio Accelerator",
-"		270f a171  SiS PCI Audio Accelerator",
-"		a0a0 0022  SiS PCI Audio Accelerator",
-"	7019  SiS7019 Audio Accelerator",
-"103a  Seiko Epson Corporation",
-"103b  Tatung Co. of America",
-"103c  Hewlett-Packard Company",
-"	002a  NX9000 Notebook",
-"	1005  A4977A Visualize EG",
-"	1008  Visualize FX",
-"	1028  Tach TL Fibre Channel Host Adapter",
-"	1029  Tach XL2 Fibre Channel Host Adapter",
-"		107e 000f  Interphase 5560 Fibre Channel Adapter",
-"		9004 9210  1Gb/2Gb Family Fibre Channel Controller",
-"		9004 9211  1Gb/2Gb Family Fibre Channel Controller",
-"	102a  Tach TS Fibre Channel Host Adapter",
-"		107e 000e  Interphase 5540/5541 Fibre Channel Adapter",
-"		9004 9110  1Gb/2Gb Family Fibre Channel Controller",
-"		9004 9111  1Gb/2Gb Family Fibre Channel Controller",
-"	1030  J2585A DeskDirect 10/100VG NIC",
-"	1031  J2585B HP 10/100VG PCI LAN Adapter",
-"		103c 1040  J2973A DeskDirect 10BaseT NIC",
-"		103c 1041  J2585B DeskDirect 10/100VG NIC",
-"		103c 1042  J2970A DeskDirect 10BaseT/2 NIC",
-"	1040  J2973A DeskDirect 10BaseT NIC",
-"	1041  J2585B DeskDirect 10/100 NIC",
-"	1042  J2970A DeskDirect 10BaseT/2 NIC",
-"	1048  Diva Serial [GSP] Multiport UART",
-"		103c 1049  Tosca Console",
-"		103c 104a  Tosca Secondary",
-"		103c 104b  Maestro SP2",
-"		103c 1223  Superdome Console",
-"		103c 1226  Keystone SP2",
-"		103c 1227  Powerbar SP2",
-"		103c 1282  Everest SP2",
-"		103c 1301  Diva RMP3",
-"	1054  PCI Local Bus Adapter",
-"	1064  79C970 PCnet Ethernet Controller",
-"	108b  Visualize FXe",
-"	10c1  NetServer Smart IRQ Router",
-"	10ed  TopTools Remote Control",
-"	10f0  rio System Bus Adapter",
-"	10f1  rio I/O Controller",
-"	1200  82557B 10/100 NIC",
-"	1219  NetServer PCI Hot-Plug Controller",
-"	121a  NetServer SMIC Controller",
-"	121b  NetServer Legacy COM Port Decoder",
-"	121c  NetServer PCI COM Port Decoder",
-"	1229  zx1 System Bus Adapter",
-"	122a  zx1 I/O Controller",
-"	122e  zx1 Local Bus Adapter",
-"	127c  sx1000 I/O Controller",
-"	1290  Auxiliary Diva Serial Port",
-"	1291  Auxiliary Diva Serial Port",
-"	12b4  zx1 QuickSilver AGP8x Local Bus Adapter",
-"	12f8  Broadcom BCM4306 802.11b/g Wireless LAN",
-"	12fa  BCM4306 802.11b/g Wireless LAN Controller",
-"	2910  E2910A PCIBus Exerciser",
-"	2925  E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer",
-"	3080  Pavilion ze2028ea",
-"	3085  Realtek RTL8139/8139C/8139C+",
-"	3220  Hewlett-Packard Smart Array P600",
-"	3230  Hewlett-Packard Smart Array Controller",
-"103e  Solliday Engineering",
-"103f  Synopsys/Logic Modeling Group",
-"1040  Accelgraphics Inc.",
-"1041  Computrend",
-"1042  Micron",
-"	1000  PC Tech RZ1000",
-"	1001  PC Tech RZ1001",
-"	3000  Samurai_0",
-"	3010  Samurai_1",
-"	3020  Samurai_IDE",
-"1043  ASUSTeK Computer Inc.",
-"	0675  ISDNLink P-IN100-ST-D",
-"		0675 1704  ISDN Adapter (PCI Bus, D, C)",
-"		0675 1707  ISDN Adapter (PCI Bus, DV, W)",
-"		10cf 105e  ISDN Adapter (PCI Bus, DV, W)",
-"	0c11  A7N8X Motherboard nForce2 IDE/USB/SMBus",
-"	4015  v7100 SDRAM [GeForce2 MX]",
-"	4021  v7100 Combo Deluxe [GeForce2 MX + TV tuner]",
-"	4057  v8200 GeForce 3",
-"	8043  v8240 PAL 128M [P4T] Motherboard",
-"	807b  v9280/TD [Geforce4 TI4200 8X With TV-Out and DVI]",
-"	8095  A7N8X Motherboard nForce2 AC97 Audio",
-"	80ac  A7N8X Motherboard nForce2 AGP/Memory",
-"	80bb  v9180 Magic/T [GeForce4 MX440 AGP 8x 64MB TV-out]",
-"	80c5  nForce3 chipset motherboard [SK8N]",
-"	80df  v9520 Magic/T",
-"	8187  802.11a/b/g Wireless LAN Card",
-"	8188  Tiger Hybrid TV Capture Device",
-"1044  Adaptec (formerly DPT)",
-"	1012  Domino RAID Engine",
-"	a400  SmartCache/Raid I-IV Controller",
-"	a500  PCI Bridge",
-"	a501  SmartRAID V Controller",
-"		1044 c001  PM1554U2 Ultra2 Single Channel",
-"		1044 c002  PM1654U2 Ultra2 Single Channel",
-"		1044 c003  PM1564U3 Ultra3 Single Channel",
-"		1044 c004  PM1564U3 Ultra3 Dual Channel",
-"		1044 c005  PM1554U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c00a  PM2554U2 Ultra2 Single Channel",
-"		1044 c00b  PM2654U2 Ultra2 Single Channel",
-"		1044 c00c  PM2664U3 Ultra3 Single Channel",
-"		1044 c00d  PM2664U3 Ultra3 Dual Channel",
-"		1044 c00e  PM2554U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c00f  PM2654U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c014  PM3754U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c015  PM3755U2B Ultra2 Single Channel (NON ACPI)",
-"		1044 c016  PM3755F Fibre Channel (NON ACPI)",
-"		1044 c01e  PM3757U2 Ultra2 Single Channel",
-"		1044 c01f  PM3757U2 Ultra2 Dual Channel",
-"		1044 c020  PM3767U3 Ultra3 Dual Channel",
-"		1044 c021  PM3767U3 Ultra3 Quad Channel",
-"		1044 c028  PM2865U3 Ultra3 Single Channel",
-"		1044 c029  PM2865U3 Ultra3 Dual Channel",
-"		1044 c02a  PM2865F Fibre Channel",
-"		1044 c03c  2000S Ultra3 Single Channel",
-"		1044 c03d  2000S Ultra3 Dual Channel",
-"		1044 c03e  2000F Fibre Channel",
-"		1044 c046  3000S Ultra3 Single Channel",
-"		1044 c047  3000S Ultra3 Dual Channel",
-"		1044 c048  3000F Fibre Channel",
-"		1044 c050  5000S Ultra3 Single Channel",
-"		1044 c051  5000S Ultra3 Dual Channel",
-"		1044 c052  5000F Fibre Channel",
-"		1044 c05a  2400A UDMA Four Channel",
-"		1044 c05b  2400A UDMA Four Channel DAC",
-"		1044 c064  3010S Ultra3 Dual Channel",
-"		1044 c065  3410S Ultra160 Four Channel",
-"		1044 c066  3010S Fibre Channel",
-"	a511  SmartRAID V Controller",
-"		1044 c032  ASR-2005S I2O Zero Channel",
-"		1044 c035  ASR-2010S I2O Zero Channel",
-"1045  OPTi Inc.",
-"	a0f8  82C750 [Vendetta] USB Controller",
-"	c101  92C264",
-"	c178  92C178",
-"	c556  82X556 [Viper]",
-"	c557  82C557 [Viper-M]",
-"	c558  82C558 [Viper-M ISA+IDE]",
-"	c567  82C750 [Vendetta], device 0",
-"	c568  82C750 [Vendetta], device 1",
-"	c569  82C579 [Viper XPress+ Chipset]",
-"	c621  82C621 [Viper-M/N+]",
-"	c700  82C700 [FireStar]",
-"	c701  82C701 [FireStar Plus]",
-"	c814  82C814 [Firebridge 1]",
-"	c822  82C822",
-"	c824  82C824",
-"	c825  82C825 [Firebridge 2]",
-"	c832  82C832",
-"	c861  82C861",
-"	c895  82C895",
-"	c935  EV1935 ECTIVA MachOne PCIAudio",
-"	d568  82C825 [Firebridge 2]",
-"	d721  IDE [FireStar]",
-"1046  IPC Corporation, Ltd.",
-"1047  Genoa Systems Corp",
-"1048  Elsa AG",
-"	0c60  Gladiac MX",
-"	0d22  Quadro4 900XGL [ELSA GLoria4 900XGL]",
-"	1000  QuickStep 1000",
-"	3000  QuickStep 3000",
-"	8901  Gloria XL",
-"		1048 0935  GLoria XL (Virge)",
-"1049  Fountain Technologies, Inc.",
-"104a  STMicroelectronics",
-"	0008  STG 2000X",
-"	0009  STG 1764X",
-"	0010  STG4000 [3D Prophet Kyro Series]",
-"	0209  STPC Consumer/Industrial North- and Southbridge",
-"	020a  STPC Atlas/ConsumerS/Consumer IIA Northbridge",
-"	0210  STPC Atlas ISA Bridge",
-"	021a  STPC Consumer S Southbridge",
-"	021b  STPC Consumer IIA Southbridge",
-"	0500  ST70137 [Unicorn] ADSL DMT Transceiver",
-"	0564  STPC Client Northbridge",
-"	0981  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	1746  STG 1764X",
-"	2774  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	3520  MPEG-II decoder card",
-"	55cc  STPC Client Southbridge",
-"104b  BusLogic",
-"	0140  BT-946C (old) [multimaster  01]",
-"	1040  BT-946C (BA80C30) [MultiMaster 10]",
-"	8130  Flashpoint LT",
-"104c  Texas Instruments",
-"	0500  100 MBit LAN Controller",
-"	0508  TMS380C2X Compressor Interface",
-"	1000  Eagle i/f AS",
-"	104c  PCI1510 PC card Cardbus Controller",
-"	3d04  TVP4010 [Permedia]",
-"	3d07  TVP4020 [Permedia 2]",
-"		1011 4d10  Comet",
-"		1040 000f  AccelStar II",
-"		1040 0011  AccelStar II",
-"		1048 0a31  WINNER 2000",
-"		1048 0a32  GLoria Synergy",
-"		1048 0a34  GLoria Synergy",
-"		1048 0a35  GLoria Synergy",
-"		1048 0a36  GLoria Synergy",
-"		1048 0a43  GLoria Synergy",
-"		1048 0a44  GLoria Synergy",
-"		107d 2633  WinFast 3D L2300",
-"		1092 0127  FIRE GL 1000 PRO",
-"		1092 0136  FIRE GL 1000 PRO",
-"		1092 0141  FIRE GL 1000 PRO",
-"		1092 0146  FIRE GL 1000 PRO",
-"		1092 0148  FIRE GL 1000 PRO",
-"		1092 0149  FIRE GL 1000 PRO",
-"		1092 0152  FIRE GL 1000 PRO",
-"		1092 0154  FIRE GL 1000 PRO",
-"		1092 0155  FIRE GL 1000 PRO",
-"		1092 0156  FIRE GL 1000 PRO",
-"		1092 0157  FIRE GL 1000 PRO",
-"		1097 3d01  Jeronimo Pro",
-"		1102 100f  Graphics Blaster Extreme",
-"		3d3d 0100  Reference Permedia 2 3D",
-"	8000  PCILynx/PCILynx2 IEEE 1394 Link Layer Controller",
-"		e4bf 1010  CF1-1-SNARE",
-"		e4bf 1020  CF1-2-SNARE",
-"	8009  FireWire Controller",
-"		104d 8032  8032 OHCI i.LINK (IEEE 1394) Controller",
-"	8017  PCI4410 FireWire Controller",
-"	8019  TSB12LV23 IEEE-1394 Controller",
-"		11bd 000a  Studio DV500-1394",
-"		11bd 000e  Studio DV",
-"		e4bf 1010  CF2-1-CYMBAL",
-"	8020  TSB12LV26 IEEE-1394 Controller (Link)",
-"		11bd 000f  Studio DV500-1394",
-"	8021  TSB43AA22 IEEE-1394 Controller (PHY/Link Integrated)",
-"		104d 80df  Vaio PCG-FX403",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"	8022  TSB43AB22 IEEE-1394a-2000 Controller (PHY/Link)",
-"	8023  TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)",
-"		103c 088c  NC8000 laptop",
-"		1043 808b  K8N4-E Mainboard",
-"	8024  TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)",
-"	8025  TSB82AA2 IEEE-1394b Link Layer Controller",
-"		1458 1000  GA-K8N Ultra-9 Mainboard",
-"	8026  TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)",
-"		1025 003c  Aspire 2001WLCi (Compaq CL50 motherboard)",
-"		103c 006a  NX9500",
-"		1043 808d  A7V333 mainboard.",
-"	8027  PCI4451 IEEE-1394 Controller",
-"		1028 00e6  PCI4451 IEEE-1394 Controller (Dell Inspiron 8100)",
-"	8029  PCI4510 IEEE-1394 Controller",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1071 8160  MIM2900",
-"	802b  PCI7410,7510,7610 OHCI-Lynx Controller",
-"		1028 0139  Latitude D400",
-"		1028 014e  PCI7410,7510,7610 OHCI-Lynx Controller (Dell Latitude D800)",
-"	802e  PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller",
-"	8031  PCIxx21/x515 Cardbus Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8032  OHCI Compliant IEEE 1394 Host Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8033  PCIxx21 Integrated FlashMedia Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8034  PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8035  PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Smart Card Controller (SMC)",
-"		103c 099c  NX6110/NC6120",
-"	8036  PCI6515 Cardbus Controller",
-"	8038  PCI6515 SmartCard Controller",
-"	803b  5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)",
-"	8201  PCI1620 Firmware Loading Function",
-"	8204  PCI7410,7510,7610 PCI Firmware Loading Function",
-"		1028 0139  Latitude D400",
-"		1028 014e  Latitude D800",
-"	8231  XIO2000(A)/XIO2200 PCI Express-to-PCI Bridge",
-"	8235  XIO2200 IEEE-1394a-2000 Controller (PHY/Link)",
-"	8400  ACX 100 22Mbps Wireless Interface",
-"		1186 3b00  DWL-650+ PC Card cardbus 22Mbs Wireless Adapter [AirPlus]",
-"		1186 3b01  DWL-520+ 22Mbps PCI Wireless Adapter",
-"		16ab 8501  WL-8305 IEEE802.11b+ Wireless LAN PCI Adapter",
-"	8401  ACX 100 22Mbps Wireless Interface",
-"	9000  Wireless Interface (of unknown type)",
-"	9065  TMS320DM642",
-"	9066  ACX 111 54Mbps Wireless Interface",
-"		104c 9066  Trendnet TEW-421PC Wireless PCI Adapter",
-"		1186 3b04  DWL-G520+ Wireless PCI Adapter",
-"		1186 3b05  DWL-G650+ AirPlusG+ CardBus Wireless LAN",
-"		13d1 aba0  SWLMP-54108 108Mbps Wireless mini PCI card 802.11g+",
-"		1737 0033  WPC54G Ver.2 802.11G PC Card",
-"	a001  TDC1570",
-"	a100  TDC1561",
-"	a102  TNETA1575 HyperSAR Plus w/PCI Host i/f & UTOPIA i/f",
-"	a106  TMS320C6414 TMS320C6415 TMS320C6416",
-"		175c 5000  ASI50xx Audio Adapter",
-"		175c 6400  ASI6400 Cobranet series",
-"		175c 8700  ASI87xx Radio Tuner card",
-"	ac10  PCI1050",
-"	ac11  PCI1053",
-"	ac12  PCI1130",
-"	ac13  PCI1031",
-"	ac15  PCI1131",
-"	ac16  PCI1250",
-"		1014 0092  ThinkPad 600",
-"	ac17  PCI1220",
-"	ac18  PCI1260",
-"	ac19  PCI1221",
-"	ac1a  PCI1210",
-"	ac1b  PCI1450",
-"		0e11 b113  Armada M700",
-"		1014 0130  Thinkpad T20/T22/A21m",
-"	ac1c  PCI1225",
-"		0e11 b121  Armada E500",
-"		1028 0088  Latitude CPi A400XT",
-"	ac1d  PCI1251A",
-"	ac1e  PCI1211",
-"	ac1f  PCI1251B",
-"	ac20  TI 2030",
-"	ac21  PCI2031",
-"	ac22  PCI2032 PCI Docking Bridge",
-"	ac23  PCI2250 PCI-to-PCI Bridge",
-"	ac28  PCI2050 PCI-to-PCI Bridge",
-"	ac30  PCI1260 PC card Cardbus Controller",
-"	ac40  PCI4450 PC card Cardbus Controller",
-"	ac41  PCI4410 PC card Cardbus Controller",
-"	ac42  PCI4451 PC card Cardbus Controller",
-"		1028 00e6  PCI4451 PC card CardBus Controller (Dell Inspiron 8100)",
-"	ac44  PCI4510 PC card Cardbus Controller",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1071 8160  MIM2000",
-"	ac46  PCI4520 PC card Cardbus Controller",
-"	ac47  PCI7510 PC card Cardbus Controller",
-"		1028 0139  Latitude D400",
-"		1028 013f  Precision M60",
-"		1028 014e  Latitude D800",
-"	ac4a  PCI7510,7610 PC card Cardbus Controller",
-"		1028 0139  Latitude D400",
-"		1028 014e  Latitude D800",
-"	ac50  PCI1410 PC card Cardbus Controller",
-"	ac51  PCI1420",
-"		0e11 004e  Evo N600c",
-"		1014 0148  ThinkPad A20m",
-"		1014 023b  ThinkPad T23 (2647-4MG)",
-"		1028 00b1  Latitude C600",
-"		1028 012a  Latitude C640",
-"		1033 80cd  Versa Note VXi",
-"		1095 10cf  Fujitsu-Siemens LifeBook C Series",
-"		10cf 1095  Lifebook S-4510/C6155",
-"		e4bf 1000  CP2-2-HIPHOP",
-"	ac52  PCI1451 PC card Cardbus Controller",
-"	ac53  PCI1421 PC card Cardbus Controller",
-"	ac54  PCI1620 PC Card Controller",
-"	ac55  PCI1520 PC card Cardbus Controller",
-"		1014 0512  ThinkPad T30/T40",
-"	ac56  PCI1510 PC card Cardbus Controller",
-"		1014 0528  ThinkPad R40e (2684-HVG) Cardbus Controller",
-"	ac60  PCI2040 PCI to DSP Bridge Controller",
-"		175c 5100  ASI51xx Audio Adapter",
-"		175c 6100  ASI61xx Audio Adapter",
-"		175c 6200  ASI62xx Audio Adapter",
-"		175c 8800  ASI88xx Audio Adapter",
-"	ac8d  PCI 7620",
-"	ac8e  PCI7420 CardBus Controller",
-"	ac8f  PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont. w/ 1394a-2000 OHCI Two-Port  PHY/Link-Layer Cont. and SD/MS-Pro Sockets",
-"	fe00  FireWire Host Controller",
-"	fe03  12C01A FireWire Host Controller",
-"104d  Sony Corporation",
-"	8004  DTL-H2500 [Playstation development board]",
-"	8009  CXD1947Q i.LINK Controller",
-"	8039  CXD3222 i.LINK Controller",
-"	8056  Rockwell HCF 56K modem",
-"	808a  Memory Stick Controller",
-"104e  Oak Technology, Inc",
-"	0017  OTI-64017",
-"	0107  OTI-107 [Spitfire]",
-"	0109  Video Adapter",
-"	0111  OTI-64111 [Spitfire]",
-"	0217  OTI-64217",
-"	0317  OTI-64317",
-"104f  Co-time Computer Ltd",
-"1050  Winbond Electronics Corp",
-"	0000  NE2000",
-"	0001  W83769F",
-"	0033  W89C33D 802.11 a/b/g BB/MAC",
-"	0105  W82C105",
-"	0840  W89C840",
-"		1050 0001  W89C840 Ethernet Adapter",
-"		1050 0840  W89C840 Ethernet Adapter",
-"	0940  W89C940",
-"	5a5a  W89C940F",
-"	6692  W6692",
-"		1043 1702  ISDN Adapter (PCI Bus, D, W)",
-"		1043 1703  ISDN Adapter (PCI Bus, DV, W)",
-"		1043 1707  ISDN Adapter (PCI Bus, DV, W)",
-"		144f 1702  ISDN Adapter (PCI Bus, D, W)",
-"		144f 1703  ISDN Adapter (PCI Bus, DV, W)",
-"		144f 1707  ISDN Adapter (PCI Bus, DV, W)",
-"	9921  W99200F MPEG-1 Video Encoder",
-"	9922  W99200F/W9922PF MPEG-1/2 Video Encoder",
-"	9970  W9970CF",
-"1051  Anigma, Inc.",
-"1052  \?Young Micro Systems",
-"1053  Young Micro Systems",
-"1054  Hitachi, Ltd",
-"1055  Efar Microsystems",
-"	9130  SLC90E66 [Victory66] IDE",
-"	9460  SLC90E66 [Victory66] ISA",
-"	9462  SLC90E66 [Victory66] USB",
-"	9463  SLC90E66 [Victory66] ACPI",
-"1056  ICL",
-"1057  Motorola",
-"	0001  MPC105 [Eagle]",
-"	0002  MPC106 [Grackle]",
-"	0003  MPC8240 [Kahlua]",
-"	0004  MPC107",
-"	0006  MPC8245 [Unity]",
-"	0008  MPC8540",
-"	0009  MPC8560",
-"	0100  MC145575 [HFC-PCI]",
-"	0431  KTI829c 100VG",
-"	1801  DSP56301 Digital Signal Processor",
-"		14fb 0101  Transas Radar Imitator Board [RIM]",
-"		14fb 0102  Transas Radar Imitator Board [RIM-2]",
-"		14fb 0202  Transas Radar Integrator Board [RIB-2]",
-"		14fb 0611  1 channel CAN bus Controller [CanPci-1]",
-"		14fb 0612  2 channels CAN bus Controller [CanPci-2]",
-"		14fb 0613  3 channels CAN bus Controller [CanPci-3]",
-"		14fb 0614  4 channels CAN bus Controller [CanPci-4]",
-"		14fb 0621  1 channel CAN bus Controller [CanPci2-1]",
-"		14fb 0622  2 channels CAN bus Controller [CanPci2-2]",
-"		14fb 0810  Transas VTS Radar Integrator Board [RIB-4]",
-"		175c 4200  ASI4215 Audio Adapter",
-"		175c 4300  ASI43xx Audio Adapter",
-"		175c 4400  ASI4401 Audio Adapter",
-"		ecc0 0010  Darla",
-"		ecc0 0020  Gina",
-"		ecc0 0030  Layla rev.0",
-"		ecc0 0031  Layla rev.1",
-"		ecc0 0040  Darla24 rev.0",
-"		ecc0 0041  Darla24 rev.1",
-"		ecc0 0050  Gina24 rev.0",
-"		ecc0 0051  Gina24 rev.1",
-"		ecc0 0070  Mona rev.0",
-"		ecc0 0071  Mona rev.1",
-"		ecc0 0072  Mona rev.2",
-"	18c0  MPC8265A/8266/8272",
-"	18c1  MPC8271/MPC8272",
-"	3410  DSP56361 Digital Signal Processor",
-"		ecc0 0050  Gina24 rev.0",
-"		ecc0 0051  Gina24 rev.1",
-"		ecc0 0060  Layla24",
-"		ecc0 0070  Mona rev.0",
-"		ecc0 0071  Mona rev.1",
-"		ecc0 0072  Mona rev.2",
-"		ecc0 0080  Mia rev.0",
-"		ecc0 0081  Mia rev.1",
-"		ecc0 0090  Indigo",
-"		ecc0 00a0  Indigo IO",
-"		ecc0 00b0  Indigo DJ",
-"		ecc0 0100  3G",
-"	4801  Raven",
-"	4802  Falcon",
-"	4803  Hawk",
-"	4806  CPX8216",
-"	4d68  20268",
-"	5600  SM56 PCI Modem",
-"		1057 0300  SM56 PCI Speakerphone Modem",
-"		1057 0301  SM56 PCI Voice Modem",
-"		1057 0302  SM56 PCI Fax Modem",
-"		1057 5600  SM56 PCI Voice modem",
-"		13d2 0300  SM56 PCI Speakerphone Modem",
-"		13d2 0301  SM56 PCI Voice modem",
-"		13d2 0302  SM56 PCI Fax Modem",
-"		1436 0300  SM56 PCI Speakerphone Modem",
-"		1436 0301  SM56 PCI Voice modem",
-"		1436 0302  SM56 PCI Fax Modem",
-"		144f 100c  SM56 PCI Fax Modem",
-"		1494 0300  SM56 PCI Speakerphone Modem",
-"		1494 0301  SM56 PCI Voice modem",
-"		14c8 0300  SM56 PCI Speakerphone Modem",
-"		14c8 0302  SM56 PCI Fax Modem",
-"		1668 0300  SM56 PCI Speakerphone Modem",
-"		1668 0302  SM56 PCI Fax Modem",
-"	5608  Wildcard X100P",
-"	5803  MPC5200",
-"	5806  MCF54 Coldfire",
-"	5808  MPC8220",
-"	5809  MPC5200B",
-"	6400  MPC190 Security Processor (S1 family, encryption)",
-"	6405  MPC184 Security Processor (S1 family)",
-"1058  Electronics & Telecommunications RSH",
-"1059  Teknor Industrial Computers Inc",
-"105a  Promise Technology, Inc.",
-"	0d30  PDC20265 (FastTrak100 Lite/Ultra100)",
-"		105a 4d33  Ultra100",
-"	0d38  20263",
-"		105a 4d39  Fasttrak66",
-"	1275  20275",
-"	3318  PDC20318 (SATA150 TX4)",
-"	3319  PDC20319 (FastTrak S150 TX4)",
-"		8086 3427  S875WP1-E mainboard",
-"	3371  PDC20371 (FastTrak S150 TX2plus)",
-"	3373  PDC20378 (FastTrak 378/SATA 378)",
-"		1043 80f5  K8V Deluxe/PC-DL Deluxe motherboard",
-"		1462 702e  K8T NEO FIS2R motherboard",
-"	3375  PDC20375 (SATA150 TX2plus)",
-"	3376  PDC20376 (FastTrak 376)",
-"		1043 809e  A7V8X motherboard",
-"	3515  PDC40719 [FastTrak TX4300/TX4310]",
-"	3519  PDC40519 (FastTrak TX4200)",
-"	3570  20771 (FastTrak TX2300)",
-"	3571  PDC20571 (FastTrak TX2200)",
-"	3574  PDC20579 SATAII 150 IDE Controller",
-"	3577  PDC40779 (SATA 300 779)",
-"	3d17  PDC40718 (SATA 300 TX4)",
-"	3d18  PDC20518/PDC40518 (SATAII 150 TX4)",
-"	3d73  PDC40775 (SATA 300 TX2plus)",
-"	3d75  PDC20575 (SATAII150 TX2plus)",
-"	4d30  PDC20267 (FastTrak100/Ultra100)",
-"		105a 4d33  Ultra100",
-"		105a 4d39  FastTrak100",
-"	4d33  20246",
-"		105a 4d33  20246 IDE Controller",
-"	4d38  PDC20262 (FastTrak66/Ultra66)",
-"		105a 4d30  Ultra Device on SuperTrak",
-"		105a 4d33  Ultra66",
-"		105a 4d39  FastTrak66",
-"	4d68  PDC20268 (Ultra100 TX2)",
-"		105a 4d68  Ultra100TX2",
-"	4d69  20269",
-"		105a 4d68  Ultra133TX2",
-"	5275  PDC20276 (MBFastTrak133 Lite)",
-"		1043 807e  A7V333 motherboard.",
-"		105a 0275  SuperTrak SX6000 IDE",
-"		105a 1275  MBFastTrak133 Lite (tm) Controller (RAID mode)",
-"		1458 b001  MBUltra 133",
-"	5300  DC5300",
-"	6268  PDC20270 (FastTrak100 LP/TX2/TX4)",
-"		105a 4d68  FastTrak100 TX2",
-"	6269  PDC20271 (FastTrak TX2000)",
-"		105a 6269  FastTrak TX2/TX2000",
-"	6621  PDC20621 (FastTrak S150 SX4/FastTrak SX4000 lite)",
-"	6622  PDC20621 [SATA150 SX4] 4 Channel IDE RAID Controller",
-"	6624  PDC20621 [FastTrak SX4100]",
-"	6626  PDC20618 (Ultra 618)",
-"	6629  PDC20619 (FastTrak TX4000)",
-"	7275  PDC20277 (SBFastTrak133 Lite)",
-"	8002  SATAII150 SX8",
-"105b  Foxconn International, Inc.",
-"105c  Wipro Infotech Limited",
-"105d  Number 9 Computer Company",
-"	2309  Imagine 128",
-"	2339  Imagine 128-II",
-"		105d 0000  Imagine 128 series 2 4Mb VRAM",
-"		105d 0001  Imagine 128 series 2 4Mb VRAM",
-"		105d 0002  Imagine 128 series 2 4Mb VRAM",
-"		105d 0003  Imagine 128 series 2 4Mb VRAM",
-"		105d 0004  Imagine 128 series 2 4Mb VRAM",
-"		105d 0005  Imagine 128 series 2 4Mb VRAM",
-"		105d 0006  Imagine 128 series 2 4Mb VRAM",
-"		105d 0007  Imagine 128 series 2 4Mb VRAM",
-"		105d 0008  Imagine 128 series 2e 4Mb DRAM",
-"		105d 0009  Imagine 128 series 2e 4Mb DRAM",
-"		105d 000a  Imagine 128 series 2 8Mb VRAM",
-"		105d 000b  Imagine 128 series 2 8Mb H-VRAM",
-"		11a4 000a  Barco Metheus 5 Megapixel",
-"		13cc 0000  Barco Metheus 5 Megapixel",
-"		13cc 0004  Barco Metheus 5 Megapixel",
-"		13cc 0005  Barco Metheus 5 Megapixel",
-"		13cc 0006  Barco Metheus 5 Megapixel",
-"		13cc 0008  Barco Metheus 5 Megapixel",
-"		13cc 0009  Barco Metheus 5 Megapixel",
-"		13cc 000a  Barco Metheus 5 Megapixel",
-"		13cc 000c  Barco Metheus 5 Megapixel",
-"	493d  Imagine 128 T2R [Ticket to Ride]",
-"		11a4 000a  Barco Metheus 5 Megapixel, Dual Head",
-"		11a4 000b  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0002  Barco Metheus 4 Megapixel, Dual Head",
-"		13cc 0003  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0007  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0008  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0009  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 000a  Barco Metheus 5 Megapixel, Dual Head",
-"	5348  Revolution 4",
-"		105d 0037  Revolution IV-FP AGP (For SGI 1600SW)",
-"		11a4 0028  PVS5600M",
-"		11a4 0038  PVS5600D",
-"105e  Vtech Computers Ltd",
-"105f  Infotronic America Inc",
-"1060  United Microelectronics [UMC]",
-"	0001  UM82C881",
-"	0002  UM82C886",
-"	0101  UM8673F",
-"	0881  UM8881",
-"	0886  UM8886F",
-"	0891  UM8891A",
-"	1001  UM886A",
-"	673a  UM8886BF",
-"	673b  EIDE Master/DMA",
-"	8710  UM8710",
-"	886a  UM8886A",
-"	8881  UM8881F",
-"	8886  UM8886F",
-"	888a  UM8886A",
-"	8891  UM8891A",
-"	9017  UM9017F",
-"	9018  UM9018",
-"	9026  UM9026",
-"	e881  UM8881N",
-"	e886  UM8886N",
-"	e88a  UM8886N",
-"	e891  UM8891N",
-"1061  I.I.T.",
-"	0001  AGX016",
-"	0002  IIT3204/3501",
-"1062  Maspar Computer Corp",
-"1063  Ocean Office Automation",
-"1064  Alcatel",
-"1065  Texas Microsystems",
-"1066  PicoPower Technology",
-"	0000  PT80C826",
-"	0001  PT86C521 [Vesuvius v1] Host Bridge",
-"	0002  PT86C523 [Vesuvius v3] PCI-ISA Bridge Master",
-"	0003  PT86C524 [Nile] PCI-to-PCI Bridge",
-"	0004  PT86C525 [Nile-II] PCI-to-PCI Bridge",
-"	0005  National PC87550 System Controller",
-"	8002  PT86C523 [Vesuvius v3] PCI-ISA Bridge Slave",
-"1067  Mitsubishi Electric",
-"	0301  AccelGraphics AccelECLIPSE",
-"	0304  AccelGALAXY A2100 [OEM Evans & Sutherland]",
-"	0308  Tornado 3000 [OEM Evans & Sutherland]",
-"	1002  VG500 [VolumePro Volume Rendering Accelerator]",
-"1068  Diversified Technology",
-"1069  Mylex Corporation",
-"	0001  DAC960P",
-"	0002  DAC960PD",
-"	0010  DAC960PG",
-"	0020  DAC960LA",
-"	0050  AcceleRAID 352/170/160 support Device",
-"		1069 0050  AcceleRAID 352 support Device",
-"		1069 0052  AcceleRAID 170 support Device",
-"		1069 0054  AcceleRAID 160 support Device",
-"	b166  AcceleRAID 600/500/400/Sapphire support Device",
-"		1014 0242  iSeries 2872 DASD IOA",
-"		1014 0266  Dual Channel PCI-X U320 SCSI Adapter",
-"		1014 0278  Dual Channel PCI-X U320 SCSI RAID Adapter",
-"		1014 02d3  Dual Channel PCI-X U320 SCSI Adapter",
-"		1014 02d4  Dual Channel PCI-X U320 SCSI RAID Adapter",
-"		1069 0200  AcceleRAID 400, Single Channel, PCI-X, U320, SCSI RAID",
-"		1069 0202  AcceleRAID Sapphire, Dual Channel, PCI-X, U320, SCSI RAID",
-"		1069 0204  AcceleRAID 500, Dual Channel, Low-Profile, PCI-X, U320, SCSI RAID",
-"		1069 0206  AcceleRAID 600, Dual Channel, PCI-X, U320, SCSI RAID",
-"	ba55  eXtremeRAID 1100 support Device",
-"	ba56  eXtremeRAID 2000/3000 support Device",
-"		1069 0030  eXtremeRAID 3000 support Device",
-"		1069 0040  eXtremeRAID 2000 support Device",
-"	ba57  eXtremeRAID 4000/5000 support Device",
-"		1069 0072  eXtremeRAID 5000 support Device",
-"106a  Aten Research Inc",
-"106b  Apple Computer Inc.",
-"	0001  Bandit PowerPC host bridge",
-"	0002  Grand Central I/O",
-"	0003  Control Video",
-"	0004  PlanB Video-In",
-"	0007  O'Hare I/O",
-"	000c  DOS on Mac",
-"	000e  Hydra Mac I/O",
-"	0010  Heathrow Mac I/O",
-"	0017  Paddington Mac I/O",
-"	0018  UniNorth FireWire",
-"	0019  KeyLargo USB",
-"	001e  UniNorth Internal PCI",
-"	001f  UniNorth PCI",
-"	0020  UniNorth AGP",
-"	0021  UniNorth GMAC (Sun GEM)",
-"	0022  KeyLargo Mac I/O",
-"	0024  UniNorth/Pangea GMAC (Sun GEM)",
-"	0025  KeyLargo/Pangea Mac I/O",
-"	0026  KeyLargo/Pangea USB",
-"	0027  UniNorth/Pangea AGP",
-"	0028  UniNorth/Pangea PCI",
-"	0029  UniNorth/Pangea Internal PCI",
-"	002d  UniNorth 1.5 AGP",
-"	002e  UniNorth 1.5 PCI",
-"	002f  UniNorth 1.5 Internal PCI",
-"	0030  UniNorth/Pangea FireWire",
-"	0031  UniNorth 2 FireWire",
-"		106b 5811  iBook G4 2004",
-"	0032  UniNorth 2 GMAC (Sun GEM)",
-"	0033  UniNorth 2 ATA/100",
-"	0034  UniNorth 2 AGP",
-"	0035  UniNorth 2 PCI",
-"	0036  UniNorth 2 Internal PCI",
-"	003b  UniNorth/Intrepid ATA/100",
-"	003e  KeyLargo/Intrepid Mac I/O",
-"	003f  KeyLargo/Intrepid USB",
-"	0040  K2 KeyLargo USB",
-"	0041  K2 KeyLargo Mac/IO",
-"	0042  K2 FireWire",
-"	0043  K2 ATA/100",
-"	0045  K2 HT-PCI Bridge",
-"	0046  K2 HT-PCI Bridge",
-"	0047  K2 HT-PCI Bridge",
-"	0048  K2 HT-PCI Bridge",
-"	0049  K2 HT-PCI Bridge",
-"	004b  U3 AGP",
-"	004c  K2 GMAC (Sun GEM)",
-"	004f  Shasta Mac I/O",
-"	0050  Shasta IDE",
-"	0051  Shasta (Sun GEM)",
-"	0052  Shasta Firewire",
-"	0053  Shasta PCI Bridge",
-"	0054  Shasta PCI Bridge",
-"	0055  Shasta PCI Bridge",
-"	0058  U3L AGP Bridge",
-"	0059  U3H AGP Bridge",
-"	0066  Intrepid2 AGP Bridge",
-"	0067  Intrepid2 PCI Bridge",
-"	0068  Intrepid2 PCI Bridge",
-"	0069  Intrepid2 ATA/100",
-"	006a  Intrepid2 Firewire",
-"	006b  Intrepid2 GMAC (Sun GEM)",
-"	1645  Tigon3 Gigabit Ethernet NIC (BCM5701)",
-"106c  Hynix Semiconductor",
-"	8801  Dual Pentium ISA/PCI Motherboard",
-"	8802  PowerPC ISA/PCI Motherboard",
-"	8803  Dual Window Graphics Accelerator",
-"	8804  LAN Controller",
-"	8805  100-BaseT LAN",
-"106d  Sequent Computer Systems",
-"106e  DFI, Inc",
-"106f  City Gate Development Ltd",
-"1070  Daewoo Telecom Ltd",
-"1071  Mitac",
-"	8160  Mitac 8060B Mobile Platform",
-"1072  GIT Co Ltd",
-"1073  Yamaha Corporation",
-"	0001  3D GUI Accelerator",
-"	0002  YGV615 [RPA3 3D-Graphics Controller]",
-"	0003  YMF-740",
-"	0004  YMF-724",
-"		1073 0004  YMF724-Based PCI Audio Adapter",
-"	0005  DS1 Audio",
-"		1073 0005  DS-XG PCI Audio CODEC",
-"	0006  DS1 Audio",
-"	0008  DS1 Audio",
-"		1073 0008  DS-XG PCI Audio CODEC",
-"	000a  DS1L Audio",
-"		1073 0004  DS-XG PCI Audio CODEC",
-"		1073 000a  DS-XG PCI Audio CODEC",
-"	000c  YMF-740C [DS-1L Audio Controller]",
-"		107a 000c  DS-XG PCI Audio CODEC",
-"	000d  YMF-724F [DS-1 Audio Controller]",
-"		1073 000d  DS-XG PCI Audio CODEC",
-"	0010  YMF-744B [DS-1S Audio Controller]",
-"		1073 0006  DS-XG PCI Audio CODEC",
-"		1073 0010  DS-XG PCI Audio CODEC",
-"	0012  YMF-754 [DS-1E Audio Controller]",
-"		1073 0012  DS-XG PCI Audio Codec",
-"	0020  DS-1 Audio",
-"	2000  DS2416 Digital Mixing Card",
-"		1073 2000  DS2416 Digital Mixing Card",
-"1074  NexGen Microsystems",
-"	4e78  82c500/1",
-"1075  Advanced Integrations Research",
-"1076  Chaintech Computer Co. Ltd",
-"1077  QLogic Corp.",
-"	1016  ISP10160 Single Channel Ultra3 SCSI Processor",
-"	1020  ISP1020 Fast-wide SCSI",
-"	1022  ISP1022 Fast-wide SCSI",
-"	1080  ISP1080 SCSI Host Adapter",
-"	1216  ISP12160 Dual Channel Ultra3 SCSI Processor",
-"		101e 8471  QLA12160 on AMI MegaRAID",
-"		101e 8493  QLA12160 on AMI MegaRAID",
-"	1240  ISP1240 SCSI Host Adapter",
-"	1280  ISP1280 SCSI Host Adapter",
-"	2020  ISP2020A Fast!SCSI Basic Adapter",
-"	2100  QLA2100 64-bit Fibre Channel Adapter",
-"		1077 0001  QLA2100 64-bit Fibre Channel Adapter",
-"	2200  QLA2200 64-bit Fibre Channel Adapter",
-"		1077 0002  QLA2200",
-"	2300  QLA2300 64-bit Fibre Channel Adapter",
-"	2312  QLA2312 Fibre Channel Adapter",
-"	2322  QLA2322 Fibre Channel Adapter",
-"	2422  QLA2422 Fibre Channel Adapter",
-"	2432  QLA2432 Fibre Channel Adapter",
-"	3010  QLA3010 Network Adapter",
-"	3022  QLA3022 Network Adapter",
-"	4010  QLA4010 iSCSI TOE Adapter",
-"	4022  QLA4022 iSCSI TOE Adapter",
-"	6312  QLA6312 Fibre Channel Adapter",
-"	6322  QLA6322 Fibre Channel Adapter",
-"1078  Cyrix Corporation",
-"	0000  5510 [Grappa]",
-"	0001  PCI Master",
-"	0002  5520 [Cognac]",
-"	0100  5530 Legacy [Kahlua]",
-"	0101  5530 SMI [Kahlua]",
-"	0102  5530 IDE [Kahlua]",
-"	0103  5530 Audio [Kahlua]",
-"	0104  5530 Video [Kahlua]",
-"	0400  ZFMicro PCI Bridge",
-"	0401  ZFMicro Chipset SMI",
-"	0402  ZFMicro Chipset IDE",
-"	0403  ZFMicro Expansion Bus",
-"1079  I-Bus",
-"107a  NetWorth",
-"107b  Gateway 2000",
-"107c  LG Electronics [Lucky Goldstar Co. Ltd]",
-"107d  LeadTek Research Inc.",
-"	0000  P86C850",
-"	204d  [GeForce 7800 GTX] Winfast PX7800 GTX TDH",
-"	2134  WinFast 3D S320 II",
-"	2971  [GeForce FX 5900] WinFast A350 TDH MyViVo",
-"107e  Interphase Corporation",
-"	0001  5515 ATM Adapter [Flipper]",
-"	0002  100 VG AnyLan Controller",
-"	0004  5526 Fibre Channel Host Adapter",
-"	0005  x526 Fibre Channel Host Adapter",
-"	0008  5525/5575 ATM Adapter (155 Mbit) [Atlantic]",
-"	9003  5535-4P-BRI-ST",
-"	9007  5535-4P-BRI-U",
-"	9008  5535-1P-SR",
-"	900c  5535-1P-SR-ST",
-"	900e  5535-1P-SR-U",
-"	9011  5535-1P-PRI",
-"	9013  5535-2P-PRI",
-"	9023  5536-4P-BRI-ST",
-"	9027  5536-4P-BRI-U",
-"	9031  5536-1P-PRI",
-"	9033  5536-2P-PRI",
-"107f  Data Technology Corporation",
-"	0802  SL82C105",
-"1080  Contaq Microsystems",
-"	0600  82C599",
-"	c691  Cypress CY82C691",
-"	c693  82c693",
-"1081  Supermac Technology",
-"	0d47  Radius PCI to NuBUS Bridge",
-"1082  EFA Corporation of America",
-"1083  Forex Computer Corporation",
-"	0001  FR710",
-"1084  Parador",
-"1085  Tulip Computers Int.B.V.",
-"1086  J. Bond Computer Systems",
-"1087  Cache Computer",
-"1088  Microcomputer Systems (M) Son",
-"1089  Data General Corporation",
-"108a  SBS Technologies",
-"	0001  VME Bridge Model 617",
-"	0010  VME Bridge Model 618",
-"	0040  dataBLIZZARD",
-"	3000  VME Bridge Model 2706",
-"108c  Oakleigh Systems Inc.",
-"108d  Olicom",
-"	0001  Token-Ring 16/4 PCI Adapter (3136/3137)",
-"	0002  16/4 Token Ring",
-"	0004  RapidFire 3139 Token-Ring 16/4 PCI Adapter",
-"		108d 0004  OC-3139/3140 RapidFire Token-Ring 16/4 Adapter",
-"	0005  GoCard 3250 Token-Ring 16/4 CardBus PC Card",
-"	0006  OC-3530 RapidFire Token-Ring 100",
-"	0007  RapidFire 3141 Token-Ring 16/4 PCI Fiber Adapter",
-"		108d 0007  OC-3141 RapidFire Token-Ring 16/4 Adapter",
-"	0008  RapidFire 3540 HSTR 100/16/4 PCI Adapter",
-"		108d 0008  OC-3540 RapidFire HSTR 100/16/4 Adapter",
-"	0011  OC-2315",
-"	0012  OC-2325",
-"	0013  OC-2183/2185",
-"	0014  OC-2326",
-"	0019  OC-2327/2250 10/100 Ethernet Adapter",
-"		108d 0016  OC-2327 Rapidfire 10/100 Ethernet Adapter",
-"		108d 0017  OC-2250 GoCard 10/100 Ethernet Adapter",
-"	0021  OC-6151/6152 [RapidFire ATM 155]",
-"	0022  ATM Adapter",
-"108e  Sun Microsystems Computer Corp.",
-"	0001  EBUS",
-"	1000  EBUS",
-"	1001  Happy Meal",
-"	1100  RIO EBUS",
-"	1101  RIO GEM",
-"	1102  RIO 1394",
-"	1103  RIO USB",
-"	1648  [bge] Gigabit Ethernet",
-"	2bad  GEM",
-"	5000  Simba Advanced PCI Bridge",
-"	5043  SunPCI Co-processor",
-"	8000  Psycho PCI Bus Module",
-"	8001  Schizo PCI Bus Module",
-"	8002  Schizo+ PCI Bus Module",
-"	a000  Ultra IIi",
-"	a001  Ultra IIe",
-"	a801  Tomatillo PCI Bus Module",
-"	abba  Cassini 10/100/1000",
-"108f  Systemsoft",
-"1090  Compro Computer Services, Inc.",
-"1091  Intergraph Corporation",
-"	0020  3D graphics processor",
-"	0021  3D graphics processor w/Texturing",
-"	0040  3D graphics frame buffer",
-"	0041  3D graphics frame buffer",
-"	0060  Proprietary bus bridge",
-"	00e4  Powerstorm 4D50T",
-"	0720  Motion JPEG codec",
-"	07a0  Sun Expert3D-Lite Graphics Accelerator",
-"	1091  Sun Expert3D Graphics Accelerator",
-"1092  Diamond Multimedia Systems",
-"	00a0  Speedstar Pro SE",
-"	00a8  Speedstar 64",
-"	0550  Viper V550",
-"	08d4  Supra 2260 Modem",
-"	094c  SupraExpress 56i Pro",
-"	1092  Viper V330",
-"	6120  Maximum DVD",
-"	8810  Stealth SE",
-"	8811  Stealth 64/SE",
-"	8880  Stealth",
-"	8881  Stealth",
-"	88b0  Stealth 64",
-"	88b1  Stealth 64",
-"	88c0  Stealth 64",
-"	88c1  Stealth 64",
-"	88d0  Stealth 64",
-"	88d1  Stealth 64",
-"	88f0  Stealth 64",
-"	88f1  Stealth 64",
-"	9999  DMD-I0928-1 'Monster sound' sound chip",
-"1093  National Instruments",
-"	0160  PCI-DIO-96",
-"	0162  PCI-MIO-16XE-50",
-"	1150  PCI-DIO-32HS High Speed Digital I/O Board",
-"	1170  PCI-MIO-16XE-10",
-"	1180  PCI-MIO-16E-1",
-"	1190  PCI-MIO-16E-4",
-"	1310  PCI-6602",
-"	1330  PCI-6031E",
-"	1350  PCI-6071E",
-"	14e0  PCI-6110",
-"	14f0  PCI-6111",
-"	17d0  PCI-6503",
-"	1870  PCI-6713",
-"	1880  PCI-6711",
-"	18b0  PCI-6052E",
-"	2410  PCI-6733",
-"	2890  PCI-6036E",
-"	2a60  PCI-6023E",
-"	2a70  PCI-6024E",
-"	2a80  PCI-6025E",
-"	2c80  PCI-6035E",
-"	2ca0  PCI-6034E",
-"	70a9  PCI-6528 (Digital I/O at 60V)",
-"	70b8  PCI-6251 [M Series - High Speed Multifunction DAQ]",
-"	b001  IMAQ-PCI-1408",
-"	b011  IMAQ-PXI-1408",
-"	b021  IMAQ-PCI-1424",
-"	b031  IMAQ-PCI-1413",
-"	b041  IMAQ-PCI-1407",
-"	b051  IMAQ-PXI-1407",
-"	b061  IMAQ-PCI-1411",
-"	b071  IMAQ-PCI-1422",
-"	b081  IMAQ-PXI-1422",
-"	b091  IMAQ-PXI-1411",
-"	c801  PCI-GPIB",
-"	c831  PCI-GPIB bridge",
-"1094  First International Computers [FIC]",
-"1095  Silicon Image, Inc.",
-"	0240  Adaptec AAR-1210SA SATA HostRAID Controller",
-"	0640  PCI0640",
-"	0643  PCI0643",
-"	0646  PCI0646",
-"	0647  PCI0647",
-"	0648  PCI0648",
-"		1043 8025  CUBX motherboard",
-"	0649  SiI 0649 Ultra ATA/100 PCI to ATA Host Controller",
-"		0e11 005d  Integrated Ultra ATA-100 Dual Channel Controller",
-"		0e11 007e  Integrated Ultra ATA-100 IDE RAID Controller",
-"		101e 0649  AMI MegaRAID IDE 100 Controller",
-"	0650  PBC0650A",
-"	0670  USB0670",
-"		1095 0670  USB0670",
-"	0673  USB0673",
-"	0680  PCI0680 Ultra ATA-133 Host Controller",
-"		1095 3680  Winic W-680 (Silicon Image 680 based)",
-"	3112  SiI 3112 [SATALink/SATARaid] Serial ATA Controller",
-"		1095 3112  SiI 3112 SATALink Controller",
-"		1095 6112  SiI 3112 SATARaid Controller",
-"		9005 0250  SATAConnect 1205SA Host Controller",
-"	3114  SiI 3114 [SATALink/SATARaid] Serial ATA Controller",
-"		1095 3114  SiI 3114 SATALink Controller",
-"		1095 6114  SiI 3114 SATARaid Controller",
-"	3124  SiI 3124 PCI-X Serial ATA Controller",
-"		1095 3124  SiI 3124 PCI-X Serial ATA Controller",
-"	3132  SiI 3132 Serial ATA Raid II Controller",
-"	3512  SiI 3512 [SATALink/SATARaid] Serial ATA Controller",
-"		1095 3512  SiI 3512 SATALink Controller",
-"		1095 6512  SiI 3512 SATARaid Controller",
-"1096  Alacron",
-"1097  Appian Technology",
-"1098  Quantum Designs (H.K.) Ltd",
-"	0001  QD-8500",
-"	0002  QD-8580",
-"1099  Samsung Electronics Co., Ltd",
-"109a  Packard Bell",
-"109b  Gemlight Computer Ltd.",
-"109c  Megachips Corporation",
-"109d  Zida Technologies Ltd.",
-"109e  Brooktree Corporation",
-"	032e  Bt878 Video Capture",
-"	0350  Bt848 Video Capture",
-"	0351  Bt849A Video capture",
-"	0369  Bt878 Video Capture",
-"		1002 0001  TV-Wonder",
-"		1002 0003  TV-Wonder/VE",
-"	036c  Bt879(\?\?) Video Capture",
-"		13e9 0070  Win/TV (Video Section)",
-"	036e  Bt878 Video Capture",
-"		0070 13eb  WinTV Series",
-"		0070 ff01  Viewcast Osprey 200",
-"		0071 0101  DigiTV PCI",
-"		107d 6606  WinFast TV 2000",
-"		11bd 0012  PCTV pro (TV + FM stereo receiver)",
-"		11bd 001c  PCTV Sat (DBC receiver)",
-"		127a 0001  Bt878 Mediastream Controller NTSC",
-"		127a 0002  Bt878 Mediastream Controller PAL BG",
-"		127a 0003  Bt878a Mediastream Controller PAL BG",
-"		127a 0048  Bt878/832 Mediastream Controller",
-"		144f 3000  MagicTView CPH060 - Video",
-"		1461 0002  TV98 Series (TV/No FM/Remote)",
-"		1461 0003  AverMedia UltraTV PCI 350",
-"		1461 0004  AVerTV WDM Video Capture",
-"		1461 0761  AverTV DVB-T",
-"		14f1 0001  Bt878 Mediastream Controller NTSC",
-"		14f1 0002  Bt878 Mediastream Controller PAL BG",
-"		14f1 0003  Bt878a Mediastream Controller PAL BG",
-"		14f1 0048  Bt878/832 Mediastream Controller",
-"		1822 0001  VisionPlus DVB card",
-"		1851 1850  FlyVideo'98 - Video",
-"		1851 1851  FlyVideo II",
-"		1852 1852  FlyVideo'98 - Video (with FM Tuner)",
-"		18ac d500  DViCO FusionHDTV5 Lite",
-"		270f fc00  Digitop DTT-1000",
-"		bd11 1200  PCTV pro (TV + FM stereo receiver)",
-"	036f  Bt879 Video Capture",
-"		127a 0044  Bt879 Video Capture NTSC",
-"		127a 0122  Bt879 Video Capture PAL I",
-"		127a 0144  Bt879 Video Capture NTSC",
-"		127a 0222  Bt879 Video Capture PAL BG",
-"		127a 0244  Bt879a Video Capture NTSC",
-"		127a 0322  Bt879 Video Capture NTSC",
-"		127a 0422  Bt879 Video Capture NTSC",
-"		127a 1122  Bt879 Video Capture PAL I",
-"		127a 1222  Bt879 Video Capture PAL BG",
-"		127a 1322  Bt879 Video Capture NTSC",
-"		127a 1522  Bt879a Video Capture PAL I",
-"		127a 1622  Bt879a Video Capture PAL BG",
-"		127a 1722  Bt879a Video Capture NTSC",
-"		14f1 0044  Bt879 Video Capture NTSC",
-"		14f1 0122  Bt879 Video Capture PAL I",
-"		14f1 0144  Bt879 Video Capture NTSC",
-"		14f1 0222  Bt879 Video Capture PAL BG",
-"		14f1 0244  Bt879a Video Capture NTSC",
-"		14f1 0322  Bt879 Video Capture NTSC",
-"		14f1 0422  Bt879 Video Capture NTSC",
-"		14f1 1122  Bt879 Video Capture PAL I",
-"		14f1 1222  Bt879 Video Capture PAL BG",
-"		14f1 1322  Bt879 Video Capture NTSC",
-"		14f1 1522  Bt879a Video Capture PAL I",
-"		14f1 1622  Bt879a Video Capture PAL BG",
-"		14f1 1722  Bt879a Video Capture NTSC",
-"		1851 1850  FlyVideo'98 - Video",
-"		1851 1851  FlyVideo II",
-"		1852 1852  FlyVideo'98 - Video (with FM Tuner)",
-"	0370  Bt880 Video Capture",
-"		1851 1850  FlyVideo'98",
-"		1851 1851  FlyVideo'98 EZ - video",
-"		1852 1852  FlyVideo'98 (with FM Tuner)",
-"	0878  Bt878 Audio Capture",
-"		0070 13eb  WinTV Series",
-"		0070 ff01  Viewcast Osprey 200",
-"		0071 0101  DigiTV PCI",
-"		1002 0001  TV-Wonder",
-"		1002 0003  TV-Wonder/VE",
-"		11bd 0012  PCTV pro (TV + FM stereo receiver, audio section)",
-"		11bd 001c  PCTV Sat (DBC receiver)",
-"		127a 0001  Bt878 Video Capture (Audio Section)",
-"		127a 0002  Bt878 Video Capture (Audio Section)",
-"		127a 0003  Bt878 Video Capture (Audio Section)",
-"		127a 0048  Bt878 Video Capture (Audio Section)",
-"		13e9 0070  Win/TV (Audio Section)",
-"		144f 3000  MagicTView CPH060 - Audio",
-"		1461 0002  Avermedia PCTV98 Audio Capture",
-"		1461 0004  AVerTV WDM Audio Capture",
-"		1461 0761  AVerTV DVB-T",
-"		14f1 0001  Bt878 Video Capture (Audio Section)",
-"		14f1 0002  Bt878 Video Capture (Audio Section)",
-"		14f1 0003  Bt878 Video Capture (Audio Section)",
-"		14f1 0048  Bt878 Video Capture (Audio Section)",
-"		1822 0001  VisionPlus DVB Card",
-"		18ac d500  DViCO FusionHDTV5 Lite",
-"		270f fc00  Digitop DTT-1000",
-"		bd11 1200  PCTV pro (TV + FM stereo receiver, audio section)",
-"	0879  Bt879 Audio Capture",
-"		127a 0044  Bt879 Video Capture (Audio Section)",
-"		127a 0122  Bt879 Video Capture (Audio Section)",
-"		127a 0144  Bt879 Video Capture (Audio Section)",
-"		127a 0222  Bt879 Video Capture (Audio Section)",
-"		127a 0244  Bt879 Video Capture (Audio Section)",
-"		127a 0322  Bt879 Video Capture (Audio Section)",
-"		127a 0422  Bt879 Video Capture (Audio Section)",
-"		127a 1122  Bt879 Video Capture (Audio Section)",
-"		127a 1222  Bt879 Video Capture (Audio Section)",
-"		127a 1322  Bt879 Video Capture (Audio Section)",
-"		127a 1522  Bt879 Video Capture (Audio Section)",
-"		127a 1622  Bt879 Video Capture (Audio Section)",
-"		127a 1722  Bt879 Video Capture (Audio Section)",
-"		14f1 0044  Bt879 Video Capture (Audio Section)",
-"		14f1 0122  Bt879 Video Capture (Audio Section)",
-"		14f1 0144  Bt879 Video Capture (Audio Section)",
-"		14f1 0222  Bt879 Video Capture (Audio Section)",
-"		14f1 0244  Bt879 Video Capture (Audio Section)",
-"		14f1 0322  Bt879 Video Capture (Audio Section)",
-"		14f1 0422  Bt879 Video Capture (Audio Section)",
-"		14f1 1122  Bt879 Video Capture (Audio Section)",
-"		14f1 1222  Bt879 Video Capture (Audio Section)",
-"		14f1 1322  Bt879 Video Capture (Audio Section)",
-"		14f1 1522  Bt879 Video Capture (Audio Section)",
-"		14f1 1622  Bt879 Video Capture (Audio Section)",
-"		14f1 1722  Bt879 Video Capture (Audio Section)",
-"	0880  Bt880 Audio Capture",
-"	2115  BtV 2115 Mediastream controller",
-"	2125  BtV 2125 Mediastream controller",
-"	2164  BtV 2164",
-"	2165  BtV 2165",
-"	8230  Bt8230 ATM Segment/Reassembly Ctrlr (SRC)",
-"	8472  Bt8472",
-"	8474  Bt8474",
-"109f  Trigem Computer Inc.",
-"10a0  Meidensha Corporation",
-"10a1  Juko Electronics Ind. Co. Ltd",
-"10a2  Quantum Corporation",
-"10a3  Everex Systems Inc",
-"10a4  Globe Manufacturing Sales",
-"10a5  Smart Link Ltd.",
-"	3052  SmartPCI562 56K Modem",
-"	5449  SmartPCI561 modem",
-"10a6  Informtech Industrial Ltd.",
-"10a7  Benchmarq Microelectronics",
-"10a8  Sierra Semiconductor",
-"	0000  STB Horizon 64",
-"10a9  Silicon Graphics, Inc.",
-"	0001  Crosstalk to PCI Bridge",
-"	0002  Linc I/O controller",
-"	0003  IOC3 I/O controller",
-"	0004  O2 MACE",
-"	0005  RAD Audio",
-"	0006  HPCEX",
-"	0007  RPCEX",
-"	0008  DiVO VIP",
-"	0009  AceNIC Gigabit Ethernet",
-"		10a9 8002  AceNIC Gigabit Ethernet",
-"	0010  AMP Video I/O",
-"	0011  GRIP",
-"	0012  SGH PSHAC GSN",
-"	1001  Magic Carpet",
-"	1002  Lithium",
-"	1003  Dual JPEG 1",
-"	1004  Dual JPEG 2",
-"	1005  Dual JPEG 3",
-"	1006  Dual JPEG 4",
-"	1007  Dual JPEG 5",
-"	1008  Cesium",
-"	100a  IOC4 I/O controller",
-"	2001  Fibre Channel",
-"	2002  ASDE",
-"	4001  TIO-CE PCI Express Bridge",
-"	4002  TIO-CE PCI Express Port",
-"	8001  O2 1394",
-"	8002  G-net NT",
-"	8010  Broadcom e-net [SGI IO9/IO10 BaseIO]",
-"	8018  Broadcom e-net [SGI A330 Server BaseIO]",
-"10aa  ACC Microelectronics",
-"	0000  ACCM 2188",
-"10ab  Digicom",
-"10ac  Honeywell IAC",
-"10ad  Symphony Labs",
-"	0001  W83769F",
-"	0003  SL82C103",
-"	0005  SL82C105",
-"	0103  SL82c103",
-"	0105  SL82c105",
-"	0565  W83C553",
-"10ae  Cornerstone Technology",
-"10af  Micro Computer Systems Inc",
-"10b0  CardExpert Technology",
-"10b1  Cabletron Systems Inc",
-"10b2  Raytheon Company",
-"10b3  Databook Inc",
-"	3106  DB87144",
-"	b106  DB87144",
-"10b4  STB Systems Inc",
-"	1b1d  Velocity 128 3D",
-"		10b4 237e  Velocity 4400",
-"10b5  PLX Technology, Inc.",
-"	0001  i960 PCI bus interface",
-"	1042  Brandywine / jxi2, Inc. - PMC-SyncClock32, IRIG A & B, Nasa 36",
-"	1076  VScom 800 8 port serial adaptor",
-"	1077  VScom 400 4 port serial adaptor",
-"	1078  VScom 210 2 port serial and 1 port parallel adaptor",
-"	1103  VScom 200 2 port serial adaptor",
-"	1146  VScom 010 1 port parallel adaptor",
-"	1147  VScom 020 2 port parallel adaptor",
-"	2540  IXXAT CAN-Interface PC-I 04/PCI",
-"	2724  Thales PCSM Security Card",
-"	6540  PCI6540/6466 PCI-PCI bridge (transparent mode)",
-"		4c53 10e0  PSL09 PrPMC",
-"	6541  PCI6540/6466 PCI-PCI bridge (non-transparent mode, primary side)",
-"		4c53 10e0  PSL09 PrPMC",
-"	6542  PCI6540/6466 PCI-PCI bridge (non-transparent mode, secondary side)",
-"		4c53 10e0  PSL09 PrPMC",
-"	8111  PEX 8111 PCI Express-to-PCI Bridge",
-"	8114  PEX 8114 PCI Express-to-PCI/PCI-X Bridge",
-"	8516  PEX 8516  Versatile PCI Express Switch",
-"	8532  PEX 8532  Versatile PCI Express Switch",
-"	9030  PCI <-> IOBus Bridge Hot Swap",
-"		10b5 2862  Alpermann+Velte PCL PCI LV (3V/5V): Timecode Reader Board",
-"		10b5 2906  Alpermann+Velte PCI TS (3V/5V): Time Synchronisation Board",
-"		10b5 2940  Alpermann+Velte PCL PCI D (3V/5V): Timecode Reader Board",
-"		10b5 2977  IXXAT iPC-I XC16/PCI CAN Board",
-"		10b5 2978  SH ARC-PCIu SOHARD ARCNET card",
-"		10b5 3025  Alpermann+Velte PCL PCI L (3V/5V): Timecode Reader Board",
-"		10b5 3068  Alpermann+Velte PCL PCI HD (3V/5V): Timecode Reader Board",
-"		1397 3136  4xS0-ISDN PCI Adapter",
-"		1397 3137  S2M-E1-ISDN PCI Adapter",
-"		1518 0200  Kontron ThinkIO-C",
-"		15ed 1002  MCCS 8-port Serial Hot Swap",
-"		15ed 1003  MCCS 16-port Serial Hot Swap",
-"	9036  9036",
-"	9050  PCI <-> IOBus Bridge",
-"		10b5 1067  IXXAT CAN i165",
-"		10b5 1172  IK220 (Heidenhain)",
-"		10b5 2036  SatPak GPS",
-"		10b5 2221  Alpermann+Velte PCL PCI LV: Timecode Reader Board",
-"		10b5 2273  SH ARC-PCI SOHARD ARCNET card",
-"		10b5 2431  Alpermann+Velte PCL PCI D: Timecode Reader Board",
-"		10b5 2905  Alpermann+Velte PCI TS: Time Synchronisation Board",
-"		10b5 9050  MP9050",
-"		1498 0362  TPMC866 8 Channel Serial Card",
-"		1522 0001  RockForce 4 Port V.90 Data/Fax/Voice Modem",
-"		1522 0002  RockForce 2 Port V.90 Data/Fax/Voice Modem",
-"		1522 0003  RockForce 6 Port V.90 Data/Fax/Voice Modem",
-"		1522 0004  RockForce 8 Port V.90 Data/Fax/Voice Modem",
-"		1522 0010  RockForce2000 4 Port V.90 Data/Fax/Voice Modem",
-"		1522 0020  RockForce2000 2 Port V.90 Data/Fax/Voice Modem",
-"		15ed 1000  Macrolink MCCS 8-port Serial",
-"		15ed 1001  Macrolink MCCS 16-port Serial",
-"		15ed 1002  Macrolink MCCS 8-port Serial Hot Swap",
-"		15ed 1003  Macrolink MCCS 16-port Serial Hot Swap",
-"		5654 2036  OpenSwitch 6 Telephony card",
-"		5654 3132  OpenSwitch 12 Telephony card",
-"		5654 5634  OpenLine4 Telephony Card",
-"		d531 c002  PCIntelliCAN 2xSJA1000 CAN bus",
-"		d84d 4006  EX-4006 1P",
-"		d84d 4008  EX-4008 1P EPP/ECP",
-"		d84d 4014  EX-4014 2P",
-"		d84d 4018  EX-4018 3P EPP/ECP",
-"		d84d 4025  EX-4025 1S(16C550) RS-232",
-"		d84d 4027  EX-4027 1S(16C650) RS-232",
-"		d84d 4028  EX-4028 1S(16C850) RS-232",
-"		d84d 4036  EX-4036 2S(16C650) RS-232",
-"		d84d 4037  EX-4037 2S(16C650) RS-232",
-"		d84d 4038  EX-4038 2S(16C850) RS-232",
-"		d84d 4052  EX-4052 1S(16C550) RS-422/485",
-"		d84d 4053  EX-4053 2S(16C550) RS-422/485",
-"		d84d 4055  EX-4055 4S(16C550) RS-232",
-"		d84d 4058  EX-4055 4S(16C650) RS-232",
-"		d84d 4065  EX-4065 8S(16C550) RS-232",
-"		d84d 4068  EX-4068 8S(16C650) RS-232",
-"		d84d 4078  EX-4078 2S(16C552) RS-232+1P",
-"	9054  PCI <-> IOBus Bridge",
-"		10b5 2455  Wessex Techology PHIL-PCI",
-"		10b5 2696  Innes Corp AM Radcap card",
-"		10b5 2717  Innes Corp Auricon card",
-"		10b5 2844  Innes Corp TVS Encoder card",
-"		12c7 4001  Intel Dialogic DM/V960-4T1 PCI",
-"		12d9 0002  PCI Prosody Card rev 1.5",
-"		16df 0011  PIKA PrimeNet MM PCI",
-"		16df 0012  PIKA PrimeNet MM cPCI 8",
-"		16df 0013  PIKA PrimeNet MM cPCI 8 (without CAS Signaling)",
-"		16df 0014  PIKA PrimeNet MM cPCI 4",
-"		16df 0015  PIKA Daytona MM",
-"		16df 0016  PIKA InLine MM",
-"	9056  Francois",
-"		10b5 2979  CellinkBlade 11 - CPCI board VoATM AAL1",
-"	9060  9060",
-"	906d  9060SD",
-"		125c 0640  Aries 16000P",
-"	906e  9060ES",
-"	9080  9080",
-"		103c 10eb  (Agilent) E2777B 83K Series Optical Communication Interface",
-"		103c 10ec  (Agilent) E6978-66442 PCI CIC",
-"		10b5 9080  9080 [real subsystem ID not set]",
-"		129d 0002  Aculab PCI Prosidy card",
-"		12d9 0002  PCI Prosody Card",
-"		12df 4422  4422PCI ['Do-All' Telemetry Data Aquisition System]",
-"	bb04  B&B 3PCIOSD1A Isolated PCI Serial",
-"10b6  Madge Networks",
-"	0001  Smart 16/4 PCI Ringnode",
-"	0002  Smart 16/4 PCI Ringnode Mk2",
-"		10b6 0002  Smart 16/4 PCI Ringnode Mk2",
-"		10b6 0006  16/4 CardBus Adapter",
-"	0003  Smart 16/4 PCI Ringnode Mk3",
-"		0e11 b0fd  Compaq NC4621 PCI, 4/16, WOL",
-"		10b6 0003  Smart 16/4 PCI Ringnode Mk3",
-"		10b6 0007  Presto PCI Plus Adapter",
-"	0004  Smart 16/4 PCI Ringnode Mk1",
-"	0006  16/4 Cardbus Adapter",
-"		10b6 0006  16/4 CardBus Adapter",
-"	0007  Presto PCI Adapter",
-"		10b6 0007  Presto PCI",
-"	0009  Smart 100/16/4 PCI-HS Ringnode",
-"		10b6 0009  Smart 100/16/4 PCI-HS Ringnode",
-"	000a  Smart 100/16/4 PCI Ringnode",
-"		10b6 000a  Smart 100/16/4 PCI Ringnode",
-"	000b  16/4 CardBus Adapter Mk2",
-"		10b6 0008  16/4 CardBus Adapter Mk2",
-"		10b6 000b  16/4 Cardbus Adapter Mk2",
-"	000c  RapidFire 3140V2 16/4 TR Adapter",
-"		10b6 000c  RapidFire 3140V2 16/4 TR Adapter",
-"	1000  Collage 25/155 ATM Client Adapter",
-"	1001  Collage 155 ATM Server Adapter",
-"10b7  3Com Corporation",
-"	0001  3c985 1000BaseSX (SX/TX)",
-"	0013  AR5212 802.11abg NIC (3CRDAG675)",
-"		10b7 2031  3CRDAG675 11a/b/g Wireless PCI Adapter",
-"	0910  3C910-A01",
-"	1006  MINI PCI type 3B Data Fax Modem",
-"	1007  Mini PCI 56k Winmodem",
-"		10b7 615c  Mini PCI 56K Modem",
-"	1201  3c982-TXM 10/100baseTX Dual Port A [Hydra]",
-"	1202  3c982-TXM 10/100baseTX Dual Port B [Hydra]",
-"	1700  3c940 10/100/1000Base-T [Marvell]",
-"		1043 80eb  A7V600/P4P800/K8V motherboard",
-"		10b7 0010  3C940 Gigabit LOM Ethernet Adapter",
-"		10b7 0020  3C941 Gigabit LOM Ethernet Adapter",
-"		147b 1407  KV8-MAX3 motherboard",
-"	3390  3c339 TokenLink Velocity",
-"	3590  3c359 TokenLink Velocity XL",
-"		10b7 3590  TokenLink Velocity XL Adapter (3C359/359B)",
-"	4500  3c450 HomePNA [Tornado]",
-"	5055  3c555 Laptop Hurricane",
-"	5057  3c575 Megahertz 10/100 LAN CardBus [Boomerang]",
-"		10b7 5a57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
-"	5157  3cCFE575BT Megahertz 10/100 LAN CardBus [Cyclone]",
-"		10b7 5b57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
-"	5257  3cCFE575CT CardBus [Cyclone]",
-"		10b7 5c57  FE575C-3Com 10/100 LAN CardBus-Fast Ethernet",
-"	5900  3c590 10BaseT [Vortex]",
-"	5920  3c592 EISA 10mbps Demon/Vortex",
-"	5950  3c595 100BaseTX [Vortex]",
-"	5951  3c595 100BaseT4 [Vortex]",
-"	5952  3c595 100Base-MII [Vortex]",
-"	5970  3c597 EISA Fast Demon/Vortex",
-"	5b57  3c595 Megahertz 10/100 LAN CardBus [Boomerang]",
-"		10b7 5b57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
-"	6000  3CRSHPW796 [OfficeConnect Wireless CardBus]",
-"	6001  3com 3CRWE154G72 [Office Connect Wireless LAN Adapter]",
-"	6055  3c556 Hurricane CardBus [Cyclone]",
-"	6056  3c556B CardBus [Tornado]",
-"		10b7 6556  10/100 Mini PCI Ethernet Adapter",
-"	6560  3cCFE656 CardBus [Cyclone]",
-"		10b7 656a  3CCFEM656 10/100 LAN+56K Modem CardBus",
-"	6561  3cCFEM656 10/100 LAN+56K Modem CardBus",
-"		10b7 656b  3CCFEM656 10/100 LAN+56K Modem CardBus",
-"	6562  3cCFEM656B 10/100 LAN+Winmodem CardBus [Cyclone]",
-"		10b7 656b  3CCFEM656B 10/100 LAN+56K Modem CardBus",
-"	6563  3cCFEM656B 10/100 LAN+56K Modem CardBus",
-"		10b7 656b  3CCFEM656 10/100 LAN+56K Modem CardBus",
-"	6564  3cXFEM656C 10/100 LAN+Winmodem CardBus [Tornado]",
-"	7646  3cSOHO100-TX Hurricane",
-"	7770  3CRWE777 PCI(PLX) Wireless Adaptor [Airconnect]",
-"	7940  3c803 FDDILink UTP Controller",
-"	7980  3c804 FDDILink SAS Controller",
-"	7990  3c805 FDDILink DAS Controller",
-"	80eb  3c940B 10/100/1000Base-T",
-"	8811  Token ring",
-"	9000  3c900 10BaseT [Boomerang]",
-"	9001  3c900 10Mbps Combo [Boomerang]",
-"	9004  3c900B-TPO Etherlink XL [Cyclone]",
-"		10b7 9004  3C900B-TPO Etherlink XL TPO 10Mb",
-"	9005  3c900B-Combo Etherlink XL [Cyclone]",
-"		10b7 9005  3C900B-Combo Etherlink XL Combo",
-"	9006  3c900B-TPC Etherlink XL [Cyclone]",
-"	900a  3c900B-FL 10base-FL [Cyclone]",
-"	9050  3c905 100BaseTX [Boomerang]",
-"	9051  3c905 100BaseT4 [Boomerang]",
-"	9055  3c905B 100BaseTX [Cyclone]",
-"		1028 0080  3C905B Fast Etherlink XL 10/100",
-"		1028 0081  3C905B Fast Etherlink XL 10/100",
-"		1028 0082  3C905B Fast Etherlink XL 10/100",
-"		1028 0083  3C905B Fast Etherlink XL 10/100",
-"		1028 0084  3C905B Fast Etherlink XL 10/100",
-"		1028 0085  3C905B Fast Etherlink XL 10/100",
-"		1028 0086  3C905B Fast Etherlink XL 10/100",
-"		1028 0087  3C905B Fast Etherlink XL 10/100",
-"		1028 0088  3C905B Fast Etherlink XL 10/100",
-"		1028 0089  3C905B Fast Etherlink XL 10/100",
-"		1028 0090  3C905B Fast Etherlink XL 10/100",
-"		1028 0091  3C905B Fast Etherlink XL 10/100",
-"		1028 0092  3C905B Fast Etherlink XL 10/100",
-"		1028 0093  3C905B Fast Etherlink XL 10/100",
-"		1028 0094  3C905B Fast Etherlink XL 10/100",
-"		1028 0095  3C905B Fast Etherlink XL 10/100",
-"		1028 0096  3C905B Fast Etherlink XL 10/100",
-"		1028 0097  3C905B Fast Etherlink XL 10/100",
-"		1028 0098  3C905B Fast Etherlink XL 10/100",
-"		1028 0099  3C905B Fast Etherlink XL 10/100",
-"		10b7 9055  3C905B Fast Etherlink XL 10/100",
-"	9056  3c905B-T4 Fast EtherLink XL [Cyclone]",
-"	9058  3c905B Deluxe Etherlink 10/100/BNC [Cyclone]",
-"	905a  3c905B-FX Fast Etherlink XL FX 100baseFx [Cyclone]",
-"	9200  3c905C-TX/TX-M [Tornado]",
-"		1028 0095  3C920 Integrated Fast Ethernet Controller",
-"		1028 0097  3C920 Integrated Fast Ethernet Controller",
-"		1028 00fe  Optiplex GX240",
-"		1028 012a  3C920 Integrated Fast Ethernet Controller [Latitude C640]",
-"		10b7 1000  3C905C-TX Fast Etherlink for PC Management NIC",
-"		10b7 7000  10/100 Mini PCI Ethernet Adapter",
-"		10f1 2466  Tiger MPX S2466 (3C920 Integrated Fast Ethernet Controller)",
-"	9201  3C920B-EMB Integrated Fast Ethernet Controller [Tornado]",
-"		1043 80ab  A7N8X Deluxe onboard 3C920B-EMB Integrated Fast Ethernet Controller",
-"	9202  3Com 3C920B-EMB-WNM Integrated Fast Ethernet Controller",
-"	9210  3C920B-EMB-WNM Integrated Fast Ethernet Controller",
-"	9300  3CSOHO100B-TX 910-A01 [tulip]",
-"	9800  3c980-TX Fast Etherlink XL Server Adapter [Cyclone]",
-"		10b7 9800  3c980-TX Fast Etherlink XL Server Adapter",
-"	9805  3c980-C 10/100baseTX NIC [Python-T]",
-"		10b7 1201  EtherLink Server 10/100 Dual Port A",
-"		10b7 1202  EtherLink Server 10/100 Dual Port B",
-"		10b7 9805  3c980 10/100baseTX NIC [Python-T]",
-"		10f1 2462  Thunder K7 S2462",
-"	9900  3C990-TX [Typhoon]",
-"	9902  3CR990-TX-95 [Typhoon 56-bit]",
-"	9903  3CR990-TX-97 [Typhoon 168-bit]",
-"	9904  3C990B-TX-M/3C990BSVR [Typhoon2]",
-"		10b7 1000  3CR990B-TX-M [Typhoon2]",
-"		10b7 2000  3CR990BSVR [Typhoon2 Server]",
-"	9905  3CR990-FX-95/97/95 [Typhon Fiber]",
-"		10b7 1101  3CR990-FX-95 [Typhoon Fiber 56-bit]",
-"		10b7 1102  3CR990-FX-97 [Typhoon Fiber 168-bit]",
-"		10b7 2101  3CR990-FX-95 Server [Typhoon Fiber 56-bit]",
-"		10b7 2102  3CR990-FX-97 Server [Typhoon Fiber 168-bit]",
-"	9908  3CR990SVR95 [Typhoon Server 56-bit]",
-"	9909  3CR990SVR97 [Typhoon Server 168-bit]",
-"	990a  3C990SVR [Typhoon Server]",
-"	990b  3C990SVR [Typhoon Server]",
-"10b8  Standard Microsystems Corp [SMC]",
-"	0005  83c170 EPIC/100 Fast Ethernet Adapter",
-"		1055 e000  LANEPIC 10/100 [EVB171Q-PCI]",
-"		1055 e002  LANEPIC 10/100 [EVB171G-PCI]",
-"		10b8 a011  EtherPower II 10/100",
-"		10b8 a014  EtherPower II 10/100",
-"		10b8 a015  EtherPower II 10/100",
-"		10b8 a016  EtherPower II 10/100",
-"		10b8 a017  EtherPower II 10/100",
-"	0006  83c175 EPIC/100 Fast Ethernet Adapter",
-"		1055 e100  LANEPIC Cardbus Fast Ethernet Adapter",
-"		1055 e102  LANEPIC Cardbus Fast Ethernet Adapter",
-"		1055 e300  LANEPIC Cardbus Fast Ethernet Adapter",
-"		1055 e302  LANEPIC Cardbus Fast Ethernet Adapter",
-"		10b8 a012  LANEPIC Cardbus Fast Ethernet Adapter",
-"		13a2 8002  LANEPIC Cardbus Fast Ethernet Adapter",
-"		13a2 8006  LANEPIC Cardbus Fast Ethernet Adapter",
-"	1000  FDC 37c665",
-"	1001  FDC 37C922",
-"	2802  SMC2802W [EZ Connect g]",
-"	a011  83C170QF",
-"	b106  SMC34C90",
-"10b9  ALi Corporation",
-"	0101  CMI8338/C3DX PCI Audio Device",
-"	0111  C-Media CMI8738/C3DX Audio Device (OEM)",
-"		10b9 0111  C-Media CMI8738/C3DX Audio Device (OEM)",
-"	0780  Multi-IO Card",
-"	0782  Multi-IO Card",
-"	1435  M1435",
-"	1445  M1445",
-"	1449  M1449",
-"	1451  M1451",
-"	1461  M1461",
-"	1489  M1489",
-"	1511  M1511 [Aladdin]",
-"	1512  M1512 [Aladdin]",
-"	1513  M1513 [Aladdin]",
-"	1521  M1521 [Aladdin III]",
-"		10b9 1521  ALI M1521 Aladdin III CPU Bridge",
-"	1523  M1523",
-"		10b9 1523  ALI M1523 ISA Bridge",
-"	1531  M1531 [Aladdin IV]",
-"	1533  M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+]",
-"		1014 053b  ThinkPad R40e (2684-HVG) PCI to ISA Bridge",
-"		10b9 1533  ALi M1533 Aladdin IV/V ISA Bridge",
-"	1541  M1541",
-"		10b9 1541  ALI M1541 Aladdin V/V+ AGP System Controller",
-"	1543  M1543",
-"	1563  M1563 HyperTransport South Bridge",
-"	1573  PCI to LPC Controller",
-"	1621  M1621",
-"	1631  ALI M1631 PCI North Bridge Aladdin Pro III",
-"	1632  M1632M Northbridge+Trident",
-"	1641  ALI M1641 PCI North Bridge Aladdin Pro IV",
-"	1644  M1644/M1644T Northbridge+Trident",
-"	1646  M1646 Northbridge+Trident",
-"	1647  M1647 Northbridge [MAGiK 1 / MobileMAGiK 1]",
-"	1651  M1651/M1651T Northbridge [Aladdin-Pro 5/5M,Aladdin-Pro 5T/5TM]",
-"	1671  M1671 Super P4 Northbridge [AGP4X,PCI and SDR/DDR]",
-"	1672  M1672 Northbridge [CyberALADDiN-P4]",
-"	1681  M1681 P4 Northbridge [AGP8X,HyperTransport and SDR/DDR]",
-"	1687  M1687 K8 Northbridge [AGP8X and HyperTransport]",
-"	1689  M1689 K8 Northbridge [Super K8 Single Chip]",
-"	1695  M1695 K8 Northbridge [PCI Express and HyperTransport]",
-"	1697  M1697 HTT Host Bridge",
-"	3141  M3141",
-"	3143  M3143",
-"	3145  M3145",
-"	3147  M3147",
-"	3149  M3149",
-"	3151  M3151",
-"	3307  M3307",
-"	3309  M3309",
-"	3323  M3325 Video/Audio Decoder",
-"	5212  M4803",
-"	5215  MS4803",
-"	5217  M5217H",
-"	5219  M5219",
-"	5225  M5225",
-"	5228  M5228 ALi ATA/RAID Controller",
-"	5229  M5229 IDE",
-"		1014 050f  ThinkPad R30",
-"		1014 053d  ThinkPad R40e (2684-HVG) builtin IDE",
-"		103c 0024  Pavilion ze4400 builtin IDE",
-"		1043 8053  A7A266 Motherboard IDE",
-"	5235  M5225",
-"	5237  USB 1.1 Controller",
-"		1014 0540  ThinkPad R40e (2684-HVG) builtin USB",
-"		103c 0024  Pavilion ze4400 builtin USB",
-"		104d 810f  VAIO PCG-U1 USB/OHCI Revision 1.0",
-"	5239  USB 2.0 Controller",
-"	5243  M1541 PCI to AGP Controller",
-"	5246  AGP8X Controller",
-"	5247  PCI to AGP Controller",
-"	5249  M5249 HTT to PCI Bridge",
-"	524b  PCI Express Root Port",
-"	524c  PCI Express Root Port",
-"	524d  PCI Express Root Port",
-"	524e  PCI Express Root Port",
-"	5251  M5251 P1394 OHCI 1.0 Controller",
-"	5253  M5253 P1394 OHCI 1.1 Controller",
-"	5261  M5261 Ethernet Controller",
-"	5263  M5263 Ethernet Controller",
-"	5281  ALi M5281 Serial ATA / RAID Host Controller",
-"	5287  ULi 5287 SATA",
-"	5288  ULi M5288 SATA",
-"	5289  ULi 5289 SATA",
-"	5450  Lucent Technologies Soft Modem AMR",
-"	5451  M5451 PCI AC-Link Controller Audio Device",
-"		1014 0506  ThinkPad R30",
-"		1014 053e  ThinkPad R40e (2684-HVG) builtin Audio",
-"		103c 0024  Pavilion ze4400 builtin Audio",
-"		10b9 5451  HP Compaq nc4010 (DY885AA#ABN)",
-"	5453  M5453 PCI AC-Link Controller Modem Device",
-"	5455  M5455 PCI AC-Link Controller Audio Device",
-"	5457  M5457 AC'97 Modem Controller",
-"		1014 0535  ThinkPad R40e (2684-HVG) builtin modem",
-"		103c 0024  Pavilion ze4400 builtin Modem Device",
-"	5459  SmartLink SmartPCI561 56K Modem",
-"	545a  SmartLink SmartPCI563 56K Modem",
-"	5461  High Definition Audio/AC'97 Host Controller",
-"	5471  M5471 Memory Stick Controller",
-"	5473  M5473 SD-MMC Controller",
-"	7101  M7101 Power Management Controller [PMU]",
-"		1014 0510  ThinkPad R30",
-"		1014 053c  ThinkPad R40e (2684-HVG) Power Management Controller",
-"		103c 0024  Pavilion ze4400",
-"10ba  Mitsubishi Electric Corp.",
-"	0301  AccelGraphics AccelECLIPSE",
-"	0304  AccelGALAXY A2100 [OEM Evans & Sutherland]",
-"	0308  Tornado 3000 [OEM Evans & Sutherland]",
-"	1002  VG500 [VolumePro Volume Rendering Accelerator]",
-"10bb  Dapha Electronics Corporation",
-"10bc  Advanced Logic Research",
-"10bd  Surecom Technology",
-"	0e34  NE-34",
-"10be  Tseng Labs International Co.",
-"10bf  Most Inc",
-"10c0  Boca Research Inc.",
-"10c1  ICM Co., Ltd.",
-"10c2  Auspex Systems Inc.",
-"10c3  Samsung Semiconductors, Inc.",
-"	1100  Smartether100 SC1100 LAN Adapter (i82557B)",
-"10c4  Award Software International Inc.",
-"10c5  Xerox Corporation",
-"10c6  Rambus Inc.",
-"10c7  Media Vision",
-"10c8  Neomagic Corporation",
-"	0001  NM2070 [MagicGraph 128]",
-"	0002  NM2090 [MagicGraph 128V]",
-"	0003  NM2093 [MagicGraph 128ZV]",
-"	0004  NM2160 [MagicGraph 128XD]",
-"		1014 00ba  MagicGraph 128XD",
-"		1025 1007  MagicGraph 128XD",
-"		1028 0074  MagicGraph 128XD",
-"		1028 0075  MagicGraph 128XD",
-"		1028 007d  MagicGraph 128XD",
-"		1028 007e  MagicGraph 128XD",
-"		1033 802f  MagicGraph 128XD",
-"		104d 801b  MagicGraph 128XD",
-"		104d 802f  MagicGraph 128XD",
-"		104d 830b  MagicGraph 128XD",
-"		10ba 0e00  MagicGraph 128XD",
-"		10c8 0004  MagicGraph 128XD",
-"		10cf 1029  MagicGraph 128XD",
-"		10f7 8308  MagicGraph 128XD",
-"		10f7 8309  MagicGraph 128XD",
-"		10f7 830b  MagicGraph 128XD",
-"		10f7 830d  MagicGraph 128XD",
-"		10f7 8312  MagicGraph 128XD",
-"	0005  NM2200 [MagicGraph 256AV]",
-"		1014 00dd  ThinkPad 570",
-"		1028 0088  Latitude CPi A",
-"	0006  NM2360 [MagicMedia 256ZX]",
-"	0016  NM2380 [MagicMedia 256XL+]",
-"		10c8 0016  MagicMedia 256XL+",
-"	0025  NM2230 [MagicGraph 256AV+]",
-"	0083  NM2093 [MagicGraph 128ZV+]",
-"	8005  NM2200 [MagicMedia 256AV Audio]",
-"		0e11 b0d1  MagicMedia 256AV Audio Device on Discovery",
-"		0e11 b126  MagicMedia 256AV Audio Device on Durango",
-"		1014 00dd  MagicMedia 256AV Audio Device on BlackTip Thinkpad",
-"		1025 1003  MagicMedia 256AV Audio Device on TravelMate 720",
-"		1028 0088  Latitude CPi A",
-"		1028 008f  MagicMedia 256AV Audio Device on Colorado Inspiron",
-"		103c 0007  MagicMedia 256AV Audio Device on Voyager II",
-"		103c 0008  MagicMedia 256AV Audio Device on Voyager III",
-"		103c 000d  MagicMedia 256AV Audio Device on Omnibook 900",
-"		10c8 8005  MagicMedia 256AV Audio Device on FireAnt",
-"		110a 8005  MagicMedia 256AV Audio Device",
-"		14c0 0004  MagicMedia 256AV Audio Device",
-"	8006  NM2360 [MagicMedia 256ZX Audio]",
-"	8016  NM2380 [MagicMedia 256XL+ Audio]",
-"10c9  Dataexpert Corporation",
-"10ca  Fujitsu Microelectr., Inc.",
-"10cb  Omron Corporation",
-"10cc  Mai Logic Incorporated",
-"	0660  Articia S Host Bridge",
-"	0661  Articia S PCI Bridge",
-"10cd  Advanced System Products, Inc",
-"	1100  ASC1100",
-"	1200  ASC1200 [(abp940) Fast SCSI-II]",
-"	1300  ABP940-U / ABP960-U",
-"		10cd 1310  ASC1300 SCSI Adapter",
-"	2300  ABP940-UW",
-"	2500  ABP940-U2W",
-"10ce  Radius",
-"10cf  Fujitsu Limited.",
-"	2001  mb86605",
-"10d1  FuturePlus Systems Corp.",
-"10d2  Molex Incorporated",
-"10d3  Jabil Circuit Inc",
-"10d4  Hualon Microelectronics",
-"10d5  Autologic Inc.",
-"10d6  Cetia",
-"10d7  BCM Advanced Research",
-"10d8  Advanced Peripherals Labs",
-"10d9  Macronix, Inc. [MXIC]",
-"	0431  MX98715",
-"	0512  MX98713",
-"	0531  MX987x5",
-"		1186 1200  DFE-540TX ProFAST 10/100 Adapter",
-"	8625  MX86250",
-"	8626  Macronix MX86251 + 3Dfx Voodoo Rush",
-"	8888  MX86200",
-"10da  Compaq IPG-Austin",
-"	0508  TC4048 Token Ring 4/16",
-"	3390  Tl3c3x9",
-"10db  Rohm LSI Systems, Inc.",
-"10dc  CERN/ECP/EDU",
-"	0001  STAR/RD24 SCI-PCI (PMC)",
-"	0002  TAR/RD24 SCI-PCI (PMC)",
-"	0021  HIPPI destination",
-"	0022  HIPPI source",
-"	10dc  ATT2C15-3 FPGA",
-"10dd  Evans & Sutherland",
-"	0100  Lightning 1200",
-"10de  nVidia Corporation",
-"	0008  NV1 [EDGE 3D]",
-"	0009  NV1 [EDGE 3D]",
-"	0010  NV2 [Mutara V08]",
-"	0020  NV4 [RIVA TNT]",
-"		1043 0200  V3400 TNT",
-"		1048 0c18  Erazor II SGRAM",
-"		1048 0c19  Erazor II",
-"		1048 0c1b  Erazor II",
-"		1048 0c1c  Erazor II",
-"		1092 0550  Viper V550",
-"		1092 0552  Viper V550",
-"		1092 4804  Viper V550",
-"		1092 4808  Viper V550",
-"		1092 4810  Viper V550",
-"		1092 4812  Viper V550",
-"		1092 4815  Viper V550",
-"		1092 4820  Viper V550 with TV out",
-"		1092 4822  Viper V550",
-"		1092 4904  Viper V550",
-"		1092 4914  Viper V550",
-"		1092 8225  Viper V550",
-"		10b4 273d  Velocity 4400",
-"		10b4 273e  Velocity 4400",
-"		10b4 2740  Velocity 4400",
-"		10de 0020  Riva TNT",
-"		1102 1015  Graphics Blaster CT6710",
-"		1102 1016  Graphics Blaster RIVA TNT",
-"	0028  NV5 [RIVA TNT2/TNT2 Pro]",
-"		1043 0200  AGP-V3800 SGRAM",
-"		1043 0201  AGP-V3800 SDRAM",
-"		1043 0205  PCI-V3800",
-"		1043 4000  AGP-V3800PRO",
-"		1048 0c21  Synergy II",
-"		1048 0c28  Erazor III",
-"		1048 0c29  Erazor III",
-"		1048 0c2a  Erazor III",
-"		1048 0c2b  Erazor III",
-"		1048 0c31  Erazor III Pro",
-"		1048 0c32  Erazor III Pro",
-"		1048 0c33  Erazor III Pro",
-"		1048 0c34  Erazor III Pro",
-"		107d 2134  WinFast 3D S320 II + TV-Out",
-"		1092 4804  Viper V770",
-"		1092 4a00  Viper V770",
-"		1092 4a02  Viper V770 Ultra",
-"		1092 5a00  RIVA TNT2/TNT2 Pro",
-"		1092 6a02  Viper V770 Ultra",
-"		1092 7a02  Viper V770 Ultra",
-"		10de 0005  RIVA TNT2 Pro",
-"		10de 000f  Compaq NVIDIA TNT2 Pro",
-"		1102 1020  3D Blaster RIVA TNT2",
-"		1102 1026  3D Blaster RIVA TNT2 Digital",
-"		14af 5810  Maxi Gamer Xentor",
-"	0029  NV5 [RIVA TNT2 Ultra]",
-"		1043 0200  AGP-V3800 Deluxe",
-"		1043 0201  AGP-V3800 Ultra SDRAM",
-"		1043 0205  PCI-V3800 Ultra",
-"		1048 0c2e  Erazor III Ultra",
-"		1048 0c2f  Erazor III Ultra",
-"		1048 0c30  Erazor III Ultra",
-"		1102 1021  3D Blaster RIVA TNT2 Ultra",
-"		1102 1029  3D Blaster RIVA TNT2 Ultra",
-"		1102 102f  3D Blaster RIVA TNT2 Ultra",
-"		14af 5820  Maxi Gamer Xentor 32",
-"	002a  NV5 [Riva TnT2]",
-"	002b  NV5 [Riva TnT2]",
-"	002c  NV6 [Vanta/Vanta LT]",
-"		1043 0200  AGP-V3800 Combat SDRAM",
-"		1043 0201  AGP-V3800 Combat",
-"		1048 0c20  TNT2 Vanta",
-"		1048 0c21  TNT2 Vanta",
-"		1092 6820  Viper V730",
-"		1102 1031  CT6938 VANTA 8MB",
-"		1102 1034  CT6894 VANTA 16MB",
-"		14af 5008  Maxi Gamer Phoenix 2",
-"	002d  NV5M64 [RIVA TNT2 Model 64/Model 64 Pro]",
-"		1043 0200  AGP-V3800M",
-"		1043 0201  AGP-V3800M",
-"		1048 0c3a  Erazor III LT",
-"		1048 0c3b  Erazor III LT",
-"		10de 001e  M64 AGP4x",
-"		1102 1023  CT6892 RIVA TNT2 Value",
-"		1102 1024  CT6932 RIVA TNT2 Value 32Mb",
-"		1102 102c  CT6931 RIVA TNT2 Value [Jumper]",
-"		1462 8808  MSI-8808",
-"		1554 1041  Pixelview RIVA TNT2 M64",
-"		1569 002d  Palit Microsystems Daytona TNT2 M64",
-"	002e  NV6 [Vanta]",
-"	002f  NV6 [Vanta]",
-"	0034  MCP04 SMBus",
-"	0035  MCP04 IDE",
-"	0036  MCP04 Serial ATA Controller",
-"	0037  MCP04 Ethernet Controller",
-"	0038  MCP04 Ethernet Controller",
-"	003a  MCP04 AC'97 Audio Controller",
-"	003b  MCP04 USB Controller",
-"	003c  MCP04 USB Controller",
-"	003d  MCP04 PCI Bridge",
-"	003e  MCP04 Serial ATA Controller",
-"	0040  NV40 [GeForce 6800 Ultra]",
-"	0041  NV40 [GeForce 6800]",
-"		1043 817b  V9999 Gamer Edition",
-"	0042  NV40.2 [GeForce 6800 LE]",
-"	0043  NV40.3",
-"	0044  NV40 [GeForce 6800 XT]",
-"	0045  NV40 [GeForce 6800 GT]",
-"	0047  NV40 [GeForce 6800 GS]",
-"		1682 2109  GeForce 6800 GS",
-"	0049  NV40GL",
-"	004e  NV40GL [Quadro FX 4000]",
-"	0050  CK804 ISA Bridge",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 0c11  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0051  CK804 ISA Bridge",
-"	0052  CK804 SMBus",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 0c11  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0053  CK804 IDE",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 5002  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0054  CK804 Serial ATA Controller",
-"		1458 b003  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0055  CK804 Serial ATA Controller",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 b003  GA-K8N Ultra-9 Mainboard",
-"	0056  CK804 Ethernet Controller",
-"	0057  CK804 Ethernet Controller",
-"		1043 8141  K8N4-E Mainboard",
-"		1458 e000  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0058  CK804 AC'97 Modem",
-"	0059  CK804 AC'97 Audio Controller",
-"		1043 812a  K8N4-E Mainboard",
-"	005a  CK804 USB Controller",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 5004  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	005b  CK804 USB Controller",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 5004  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	005c  CK804 PCI Bridge",
-"	005d  CK804 PCIE Bridge",
-"	005e  CK804 Memory Controller",
-"		10f1 2891  Thunder K8SRE Mainboard",
-"		1458 5000  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	005f  CK804 Memory Controller",
-"	0060  nForce2 ISA Bridge",
-"		1043 80ad  A7N8X Mainboard",
-"		a0a0 03ba  UK79G-1394 motherboard",
-"	0064  nForce2 SMBus (MCP)",
-"		a0a0 03bb  UK79G-1394 motherboard",
-"	0065  nForce2 IDE",
-"		a0a0 03b2  UK79G-1394 motherboard",
-"	0066  nForce2 Ethernet Controller",
-"		1043 80a7  A7N8X Mainboard onboard nForce2 Ethernet",
-"	0067  nForce2 USB Controller",
-"		1043 0c11  A7N8X Mainboard",
-"	0068  nForce2 USB Controller",
-"		1043 0c11  A7N8X Mainboard",
-"		a0a0 03b4  UK79G-1394 motherboard",
-"	006a  nForce2 AC97 Audio Controler (MCP)",
-"		a0a0 0304  UK79G-1394 motherboard",
-"	006b  nForce Audio Processing Unit",
-"		10de 006b  nForce2 MCP Audio Processing Unit",
-"	006c  nForce2 External PCI Bridge",
-"	006d  nForce2 PCI Bridge",
-"	006e  nForce2 FireWire (IEEE 1394) Controller",
-"		a0a0 0306  UK79G-1394 motherboard",
-"	0080  MCP2A ISA bridge",
-"		147b 1c09  NV7 Motherboard",
-"	0084  MCP2A SMBus",
-"		147b 1c09  NV7 Motherboard",
-"	0085  MCP2A IDE",
-"		147b 1c09  NV7 Motherboard",
-"	0086  MCP2A Ethernet Controller",
-"	0087  MCP2A USB Controller",
-"		147b 1c09  NV7 Motherboard",
-"	0088  MCP2A USB Controller",
-"		147b 1c09  NV7 Motherboard",
-"	008a  MCP2S AC'97 Audio Controller",
-"		147b 1c09  NV7 Motherboard",
-"	008b  MCP2A PCI Bridge",
-"	008c  MCP2A Ethernet Controller",
-"	008e  nForce2 Serial ATA Controller",
-"	0090  G70 [GeForce 7800 GTX]",
-"	0091  G70 [GeForce 7800 GTX]",
-"	0092  G70 [GeForce 7800 GT]",
-"	0093  G70 [GeForce 7800 GS]",
-"	0098  GeForce Go 7800",
-"	0099  GE Force Go 7800 GTX",
-"	009d  G70GL [Quadro FX4500]",
-"	00a0  NV5 [Aladdin TNT2]",
-"		14af 5810  Maxi Gamer Xentor",
-"	00c0  NV41 [GeForce 6800 GS]",
-"	00c1  NV41.1 [GeForce 6800]",
-"	00c2  NV41.2 [GeForce 6800 LE]",
-"	00c3  NV42 [Geforce 6800 XT]",
-"	00c8  NV41.8 [GeForce Go 6800]",
-"	00c9  NV41.9 [GeForce Go 6800 Ultra]",
-"	00cc  NV41 [Quadro FX Go1400]",
-"	00cd  NV41 [Quadro FX 3450/4000 SDI]",
-"	00ce  NV41GL [Quadro FX 1400]",
-"	00d0  nForce3 LPC Bridge",
-"	00d1  nForce3 Host Bridge",
-"	00d2  nForce3 AGP Bridge",
-"	00d3  CK804 Memory Controller",
-"	00d4  nForce3 SMBus",
-"	00d5  nForce3 IDE",
-"	00d6  nForce3 Ethernet",
-"	00d7  nForce3 USB 1.1",
-"	00d8  nForce3 USB 2.0",
-"	00d9  nForce3 Audio",
-"	00da  nForce3 Audio",
-"	00dd  nForce3 PCI Bridge",
-"	00df  CK8S Ethernet Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00e0  nForce3 250Gb LPC Bridge",
-"		147b 1c0b  NF8 Mainboard",
-"	00e1  nForce3 250Gb Host Bridge",
-"		147b 1c0b  NF8 Mainboard",
-"	00e2  nForce3 250Gb AGP Host to PCI Bridge",
-"	00e3  CK8S Serial ATA Controller (v2.5)",
-"		147b 1c0b  NF8 Mainboard",
-"	00e4  nForce 250Gb PCI System Management",
-"		147b 1c0b  NF8 Mainboard",
-"	00e5  CK8S Parallel ATA Controller (v2.5)",
-"		147b 1c0b  NF8 Mainboard",
-"	00e6  CK8S Ethernet Controller",
-"	00e7  CK8S USB Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00e8  nForce3 EHCI USB 2.0 Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00ea  nForce3 250Gb AC'97 Audio Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00ed  nForce3 250Gb PCI-to-PCI Bridge",
-"	00ee  CK8S Serial ATA Controller (v2.5)",
-"	00f0  NV40 [GeForce 6800/GeForce 6800 Ultra]",
-"	00f1  NV43 [GeForce 6600/GeForce 6600 GT]",
-"		1043 81a6  N6600GT TD 128M AGP",
-"		1682 2119  GeForce 6600 GT AGP 128MB DDR3 DUAL DVI TV",
-"	00f2  NV43 [GeForce 6600/GeForce 6600 GT]",
-"		1682 211c  GeForce 6600 256MB DDR DUAL DVI TV",
-"	00f3  NV43 [GeForce 6200]",
-"	00f4  NV43 [GeForce 6600 LE]",
-"	00f5  G70 [GeForce 7800 GS]",
-"	00f6  NV43 [GeForce 6600 GS]",
-"	00f8  NV45GL [Quadro FX 3400/4400]",
-"	00f9  NV40 [GeForce 6800 Ultra/GeForce 6800 GT]",
-"		1682 2120  GEFORCE 6800 GT PCI-E",
-"	00fa  NV36 [GeForce PCX 5750]",
-"	00fb  NV35 [GeForce PCX 5900]",
-"	00fc  NV37GL [Quadro FX 330/GeForce PCX 5300]",
-"	00fd  NV37GL [Quadro FX 330/Quadro NVS280]",
-"	00fe  NV38GL [Quadro FX 1300]",
-"	00ff  NV18 [GeForce PCX 4300]",
-"	0100  NV10 [GeForce 256 SDR]",
-"		1043 0200  AGP-V6600 SGRAM",
-"		1043 0201  AGP-V6600 SDRAM",
-"		1043 4008  AGP-V6600 SGRAM",
-"		1043 4009  AGP-V6600 SDRAM",
-"		1048 0c41  Erazor X",
-"		1048 0c43  ERAZOR X PCI",
-"		1048 0c48  Synergy Force",
-"		1102 102d  CT6941 GeForce 256",
-"		14af 5022  3D Prophet SE",
-"	0101  NV10DDR [GeForce 256 DDR]",
-"		1043 0202  AGP-V6800 DDR",
-"		1043 400a  AGP-V6800 DDR SGRAM",
-"		1043 400b  AGP-V6800 DDR SDRAM",
-"		1048 0c42  Erazor X",
-"		107d 2822  WinFast GeForce 256",
-"		1102 102e  CT6971 GeForce 256 DDR",
-"		14af 5021  3D Prophet DDR-DVI",
-"	0103  NV10GL [Quadro]",
-"		1048 0c40  GLoria II-64",
-"		1048 0c44  GLoria II",
-"		1048 0c45  GLoria II",
-"		1048 0c4a  GLoria II-64 Pro",
-"		1048 0c4b  GLoria II-64 Pro DVII",
-"	0110  NV11 [GeForce2 MX/MX 400]",
-"		1043 4015  AGP-V7100 Pro",
-"		1043 4031  V7100 Pro with TV output",
-"		1048 0c60  Gladiac MX",
-"		1048 0c61  Gladiac 511PCI",
-"		1048 0c63  Gladiac 511TV-OUT 32MB",
-"		1048 0c64  Gladiac 511TV-OUT 64MB",
-"		1048 0c65  Gladiac 511TWIN",
-"		1048 0c66  Gladiac 311",
-"		10de 0091  Dell OEM GeForce 2 MX 400",
-"		10de 00a1  Apple OEM GeForce2 MX",
-"		1462 8817  MSI GeForce2 MX400 Pro32S [MS-8817]",
-"		14af 7102  3D Prophet II MX",
-"		14af 7103  3D Prophet II MX Dual-Display",
-"	0111  NV11DDR [GeForce2 MX 100 DDR/200 DDR]",
-"	0112  NV11 [GeForce2 Go]",
-"	0113  NV11GL [Quadro2 MXR/EX/Go]",
-"	0140  NV43 [GeForce 6600 GT]",
-"	0141  NV43 [GeForce 6600]",
-"		1458 3124  GV-NX66128DP Turbo Force Edition",
-"	0142  NV43 [GeForce 6600 PCIe]",
-"	0144  NV43 [GeForce Go 6600]",
-"	0145  NV43 [GeForce 6610 XL]",
-"	0146  NV43 [Geforce Go 6600TE/6200TE]",
-"	0148  NV43 [GeForce Go 6600]",
-"	0149  NV43 [GeForce Go 6600 GT]",
-"	014a  Quadro NVS 440",
-"	014c  Quadro FX 550",
-"	014e  NV43GL [Quadro FX 540]",
-"	014f  NV43 [GeForce 6200]",
-"	0150  NV15 [GeForce2 GTS/Pro]",
-"		1043 4016  V7700 AGP Video Card",
-"		1048 0c50  Gladiac",
-"		1048 0c52  Gladiac-64",
-"		107d 2840  WinFast GeForce2 GTS with TV output",
-"		107d 2842  WinFast GeForce 2 Pro",
-"		1462 8831  Creative GeForce2 Pro",
-"	0151  NV15DDR [GeForce2 Ti]",
-"		1043 405f  V7700Ti",
-"		1462 5506  Creative 3D Blaster Geforce2 Titanium",
-"	0152  NV15BR [GeForce2 Ultra, Bladerunner]",
-"		1048 0c56  GLADIAC Ultra",
-"	0153  NV15GL [Quadro2 Pro]",
-"	0161  GeForce 6200 TurboCache(TM)",
-"	0162  NV43 [GeForce 6200 SE]",
-"	0164  NV44 [GeForce Go 6200]",
-"	0165  NV44 [Quadro NVS 285]",
-"	0166  NV43 [GeForce Go 6400]",
-"	0167  GeForce Go 6200 TurboCache",
-"	0168  NV43 [GeForce Go 6200 TurboCache]",
-"	0170  NV17 [GeForce4 MX 460]",
-"	0171  NV17 [GeForce4 MX 440]",
-"		10b0 0002  Gainward Pro/600 TV",
-"		10de 0008  Apple OEM GeForce4 MX 440",
-"		1462 8661  G4MX440-VTP",
-"		1462 8730  MX440SES-T (MS-8873)",
-"		1462 8852  GeForce4 MX440 PCI",
-"		147b 8f00  Abit Siluro GeForce4MX440",
-"	0172  NV17 [GeForce4 MX 420]",
-"	0173  NV17 [GeForce4 MX 440-SE]",
-"	0174  NV17 [GeForce4 440 Go]",
-"	0175  NV17 [GeForce4 420 Go]",
-"	0176  NV17 [GeForce4 420 Go 32M]",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	0177  NV17 [GeForce4 460 Go]",
-"	0178  NV17GL [Quadro4 550 XGL]",
-"	0179  NV17 [GeForce4 420 Go 32M]",
-"		10de 0179  GeForce4 MX (Mac)",
-"	017a  NV17GL [Quadro4 200/400 NVS]",
-"	017b  NV17GL [Quadro4 550 XGL]",
-"	017c  NV17GL [Quadro4 500 GoGL]",
-"	017d  NV17 [GeForce4 410 Go 16M]",
-"	0181  NV18 [GeForce4 MX 440 AGP 8x]",
-"		1043 806f  V9180 Magic",
-"		1462 8880  MS-StarForce GeForce4 MX 440 with AGP8X",
-"		1462 8900  MS-8890 GeForce 4 MX440 AGP8X",
-"		1462 9350  MSI Geforce4 MX T8X with AGP8X",
-"		147b 8f0d  Siluro GF4 MX-8X",
-"	0182  NV18 [GeForce4 MX 440SE AGP 8x]",
-"	0183  NV18 [GeForce4 MX 420 AGP 8x]",
-"	0185  NV18 [GeForce4 MX 4000 AGP 8x]",
-"	0186  NV18M [GeForce4 448 Go]",
-"	0187  NV18M [GeForce4 488 Go]",
-"	0188  NV18GL [Quadro4 580 XGL]",
-"	018a  NV18GL [Quadro4 NVS AGP 8x]",
-"	018b  NV18GL [Quadro4 380 XGL]",
-"	018c  Quadro NVS 50 PCI",
-"	018d  NV18M [GeForce4 448 Go]",
-"	01a0  NVCrush11 [GeForce2 MX Integrated Graphics]",
-"	01a4  nForce CPU bridge",
-"	01ab  nForce 420 Memory Controller (DDR)",
-"	01ac  nForce 220/420 Memory Controller",
-"	01ad  nForce 220/420 Memory Controller",
-"	01b0  nForce Audio",
-"	01b1  nForce Audio",
-"	01b2  nForce ISA Bridge",
-"	01b4  nForce PCI System Management",
-"	01b7  nForce AGP to PCI Bridge",
-"	01b8  nForce PCI-to-PCI bridge",
-"	01bc  nForce IDE",
-"	01c1  nForce AC'97 Modem Controller",
-"	01c2  nForce USB Controller",
-"	01c3  nForce Ethernet Controller",
-"	01d1  GeForce 7300 LE",
-"	01d7  Quadro NVS 110M / GeForce Go 7300",
-"	01d8  GeForce Go 7400",
-"	01da  Quadro NVS 110M",
-"	01de  Quadro FX 350",
-"		10de 01dc  Quadro  FX Go350M",
-"	01df  GeForce 7300 GS",
-"	01e0  nForce2 AGP (different version\?)",
-"		147b 1c09  NV7 Motherboard",
-"	01e8  nForce2 AGP",
-"	01ea  nForce2 Memory Controller 0",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01eb  nForce2 Memory Controller 1",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ec  nForce2 Memory Controller 2",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ed  nForce2 Memory Controller 3",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ee  nForce2 Memory Controller 4",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ef  nForce2 Memory Controller 5",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01f0  NV18 [GeForce4 MX - nForce GPU]",
-"		a0a0 03b5  UK79G-1394 motherboard",
-"	0200  NV20 [GeForce3]",
-"		1043 402f  AGP-V8200 DDR",
-"		1048 0c70  GLADIAC 920",
-"	0201  NV20 [GeForce3 Ti 200]",
-"	0202  NV20 [GeForce3 Ti 500]",
-"		1043 405b  V8200 T5",
-"		1545 002f  Xtasy 6964",
-"	0203  NV20DCC [Quadro DCC]",
-"	0211  NV40 [GeForce 6800]",
-"	0212  NV40 [GeForce 6800 LE]",
-"	0215  NV40 [GeForce 6800 GT]",
-"	0218  NV40 [GeForce 6800 XT]",
-"	0221  NV43 [GeForce 6200]",
-"	0240  C51PV [GeForce 6150]",
-"		1462 7207  K8NGM2 series",
-"	0241  C51 PCI Express Bridge",
-"	0242  C51G [GeForce 6100]",
-"	0243  C51 PCI Express Bridge",
-"	0244  C51 PCI Express Bridge",
-"	0245  C51 PCI Express Bridge",
-"	0246  C51 PCI Express Bridge",
-"	0247  C51 PCI Express Bridge",
-"	0248  C51 PCI Express Bridge",
-"	0249  C51 PCI Express Bridge",
-"	024a  C51 PCI Express Bridge",
-"	024b  C51 PCI Express Bridge",
-"	024c  C51 PCI Express Bridge",
-"	024d  C51 PCI Express Bridge",
-"	024e  C51 PCI Express Bridge",
-"	024f  C51 PCI Express Bridge",
-"	0250  NV25 [GeForce4 Ti 4600]",
-"	0251  NV25 [GeForce4 Ti 4400]",
-"		1043 8023  v8440 GeForce 4 Ti4400",
-"	0252  NV25 [GeForce4 Ti]",
-"	0253  NV25 [GeForce4 Ti 4200]",
-"		107d 2896  WinFast A250 LE TD (Dual VGA/TV-out/DVI)",
-"		147b 8f09  Siluro (Dual VGA/TV-out/DVI)",
-"	0258  NV25GL [Quadro4 900 XGL]",
-"	0259  NV25GL [Quadro4 750 XGL]",
-"	025b  NV25GL [Quadro4 700 XGL]",
-"	0260  MCP51 LPC Bridge",
-"		1462 7207  K8NGM2 series",
-"	0261  MCP51 LPC Bridge",
-"	0262  MCP51 LPC Bridge",
-"	0263  MCP51 LPC Bridge",
-"	0264  MCP51 SMBus",
-"		1462 7207  K8NGM2 series",
-"	0265  MCP51 IDE",
-"		1462 7207  K8NGM2 series",
-"	0266  MCP51 Serial ATA Controller",
-"		1462 7207  K8NGM2 series",
-"	0267  MCP51 Serial ATA Controller",
-"		1462 7207  K8NGM2 series",
-"	0268  MCP51 Ethernet Controller",
-"	0269  MCP51 Ethernet Controller",
-"		1462 7207  K8NGM2 series",
-"	026a  MCP51 MCI",
-"	026b  MCP51 AC97 Audio Controller",
-"	026c  MCP51 High Definition Audio",
-"		1462 7207  K8NGM2 series",
-"	026d  MCP51 USB Controller",
-"		1462 7207  K8NGM2 series",
-"	026e  MCP51 USB Controller",
-"		1462 7207  K8NGM2 series",
-"	026f  MCP51 PCI Bridge",
-"	0270  MCP51 Host Bridge",
-"		1462 7207  K8NGM2 series",
-"	0271  MCP51 PMU",
-"	0272  MCP51 Memory Controller 0",
-"	027e  C51 Memory Controller 2",
-"		1462 7207  K8NGM2 series",
-"	027f  C51 Memory Controller 3",
-"		1462 7207  K8NGM2 series",
-"	0280  NV28 [GeForce4 Ti 4800]",
-"	0281  NV28 [GeForce4 Ti 4200 AGP 8x]",
-"	0282  NV28 [GeForce4 Ti 4800 SE]",
-"	0286  NV28 [GeForce4 Ti 4200 Go AGP 8x]",
-"	0288  NV28GL [Quadro4 980 XGL]",
-"	0289  NV28GL [Quadro4 780 XGL]",
-"	028c  NV28GLM [Quadro4 700 GoGL]",
-"	0290  GeForce 7900 GTX",
-"	0291  GeForce 7900 GT",
-"	029a  G71 [Quadro FX 2500M]",
-"	029b  G71 [Quadro FX 1500M]",
-"	029c  Quadro FX 5500",
-"	029d  Quadro FX 3500",
-"	029e  Quadro FX 1500",
-"	02a0  NV2A [XGPU]",
-"	02e1  GeForce 7600 GS",
-"	02f0  C51 Host Bridge",
-"		1462 7207  K8NGM2 series",
-"	02f1  C51 Host Bridge",
-"	02f2  C51 Host Bridge",
-"	02f3  C51 Host Bridge",
-"	02f4  C51 Host Bridge",
-"	02f5  C51 Host Bridge",
-"	02f6  C51 Host Bridge",
-"	02f7  C51 Host Bridge",
-"	02f8  C51 Memory Controller 5",
-"		1462 7207  K8NGM2 series",
-"	02f9  C51 Memory Controller 4",
-"		1462 7207  K8NGM2 series",
-"	02fa  C51 Memory Controller 0",
-"		1462 7207  K8NGM2 series",
-"	02fb  C51 PCI Express Bridge",
-"	02fc  C51 PCI Express Bridge",
-"	02fd  C51 PCI Express Bridge",
-"	02fe  C51 Memory Controller 1",
-"		1462 7207  K8NGM2 series",
-"	02ff  C51 Host Bridge",
-"		1462 7207  K8NGM2 series",
-"	0300  NV30 [GeForce FX]",
-"	0301  NV30 [GeForce FX 5800 Ultra]",
-"	0302  NV30 [GeForce FX 5800]",
-"	0308  NV30GL [Quadro FX 2000]",
-"	0309  NV30GL [Quadro FX 1000]",
-"	0311  NV31 [GeForce FX 5600 Ultra]",
-"	0312  NV31 [GeForce FX 5600]",
-"	0313  NV31",
-"	0314  NV31 [GeForce FX 5600XT]",
-"		1043 814a  V9560XT/TD",
-"	0316  NV31M",
-"	0317  NV31M Pro",
-"	031a  NV31M [GeForce FX Go5600]",
-"	031b  NV31M [GeForce FX Go5650]",
-"	031c  NVIDIA Quadro FX Go700",
-"	031d  NV31GLM",
-"	031e  NV31GLM Pro",
-"	031f  NV31GLM Pro",
-"	0320  NV34 [GeForce FX 5200]",
-"	0321  NV34 [GeForce FX 5200 Ultra]",
-"	0322  NV34 [GeForce FX 5200]",
-"		1462 9171  MS-8917 (FX5200-T128)",
-"		1462 9360  MS-8936 (FX5200-T128)",
-"	0323  NV34 [GeForce FX 5200LE]",
-"	0324  NV34M [GeForce FX Go5200]",
-"		1028 0196  Inspiron 5160",
-"		1071 8160  MIM2000",
-"	0325  NV34M [GeForce FX Go5250]",
-"	0326  NV34 [GeForce FX 5500]",
-"	0327  NV34 [GeForce FX 5100]",
-"	0328  NV34M [GeForce FX Go5200 32M/64M]",
-"	0329  NV34M [GeForce FX Go5200]",
-"	032a  NV34GL [Quadro NVS 280 PCI]",
-"	032b  NV34GL [Quadro FX 500/600 PCI]",
-"	032c  NV34GLM [GeForce FX Go 5300]",
-"	032d  NV34 [GeForce FX Go5100]",
-"	032f  NV34GL",
-"	0330  NV35 [GeForce FX 5900 Ultra]",
-"	0331  NV35 [GeForce FX 5900]",
-"		1043 8145  V9950GE",
-"	0332  NV35 [GeForce FX 5900XT]",
-"	0333  NV38 [GeForce FX 5950 Ultra]",
-"	0334  NV35 [GeForce FX 5900ZT]",
-"	0338  NV35GL [Quadro FX 3000]",
-"	033f  NV35GL [Quadro FX 700]",
-"	0341  NV36.1 [GeForce FX 5700 Ultra]",
-"	0342  NV36.2 [GeForce FX 5700]",
-"	0343  NV36 [GeForce FX 5700LE]",
-"	0344  NV36.4 [GeForce FX 5700VE]",
-"	0345  NV36.5",
-"	0347  NV36 [GeForce FX Go5700]",
-"		103c 006a  NX9500",
-"	0348  NV36 [GeForce FX Go5700]",
-"	0349  NV36M Pro",
-"	034b  NV36MAP",
-"	034c  NV36 [Quadro FX Go1000]",
-"	034e  NV36GL [Quadro FX 1100]",
-"	034f  NV36GL",
-"	0360  MCP55 LPC Bridge",
-"	0361  MCP55 LPC Bridge",
-"	0362  MCP55 LPC Bridge",
-"	0363  MCP55 LPC Bridge",
-"	0364  MCP55 LPC Bridge",
-"	0365  MCP55 LPC Bridge",
-"	0366  MCP55 LPC Bridge",
-"	0367  MCP55 LPC Bridge",
-"	0368  MCP55 SMBus",
-"	0369  MCP55 Memory Controller",
-"	036a  MCP55 Memory Controller",
-"	036c  MCP55 USB Controller",
-"	036d  MCP55 USB Controller",
-"	036e  MCP55 IDE",
-"	0371  MCP55 High Definition Audio",
-"	0372  MCP55 Ethernet",
-"	0373  MCP55 Ethernet",
-"	037a  MCP55 Memory Controller",
-"	037e  MCP55 SATA Controller",
-"	037f  MCP55 SATA Controller",
-"	0391  G70 [GeForce 7600 GT]",
-"	0392  G70 [GeForce 7600 GS]",
-"	0398  G70 [GeForce Go 7600]",
-"	039e  Quadro FX 560",
-"	03e0  MCP61 LPC Bridge",
-"	03e1  MCP61 LPC Bridge",
-"	03e2  MCP61 LPC Bridge",
-"	03e3  MCP61 LPC Bridge",
-"	03e4  MCP61 High Definition Audio",
-"	03e5  MCP61 Ethernet",
-"	03e6  MCP61 Ethernet",
-"	03e7  MCP61 SATA Controller",
-"	03ea  MCP61 Memory Controller",
-"	03eb  MCP61 SMBus",
-"	03ec  MCP61 IDE",
-"	03ee  MCP61 Ethernet",
-"	03ef  MCP61 Ethernet",
-"	03f0  MCP61 High Definition Audio",
-"	03f1  MCP61 USB Controller",
-"	03f2  MCP61 USB Controller",
-"	03f5  MCP61 Memory Controller",
-"	03f6  MCP61 SATA Controller",
-"	03f7  MCP61 SATA Controller",
-"10df  Emulex Corporation",
-"	1ae5  LP6000 Fibre Channel Host Adapter",
-"	f085  LP850 Fibre Channel Host Adapter",
-"	f095  LP952 Fibre Channel Host Adapter",
-"	f098  LP982 Fibre Channel Host Adapter",
-"	f0a1  Thor LightPulse Fibre Channel Host Adapter",
-"	f0a5  Thor LightPulse Fibre Channel Host Adapter",
-"	f0b5  Viper LightPulse Fibre Channel Host Adapter",
-"	f0d1  Helios LightPulse Fibre Channel Host Adapter",
-"	f0d5  Helios LightPulse Fibre Channel Host Adapter",
-"	f0e1  Zephyr LightPulse Fibre Channel Host Adapter",
-"	f0e5  Zephyr LightPulse Fibre Channel Host Adapter",
-"	f0f5  Neptune LightPulse Fibre Channel Host Adapter",
-"	f700  LP7000 Fibre Channel Host Adapter",
-"	f701  LP7000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
-"	f800  LP8000 Fibre Channel Host Adapter",
-"	f801  LP8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
-"	f900  LP9000 Fibre Channel Host Adapter",
-"	f901  LP9000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
-"	f980  LP9802 Fibre Channel Host Adapter",
-"	f981  LP9802 Fibre Channel Host Adapter Alternate ID",
-"	f982  LP9802 Fibre Channel Host Adapter Alternate ID",
-"	fa00  Thor-X LightPulse Fibre Channel Host Adapter",
-"	fb00  Viper LightPulse Fibre Channel Host Adapter",
-"	fc00  Thor-X LightPulse Fibre Channel Host Adapter",
-"	fc10  Helios-X LightPulse Fibre Channel Host Adapter",
-"	fc20  Zephyr-X LightPulse Fibre Channel Host Adapter",
-"	fd00  Helios-X LightPulse Fibre Channel Host Adapter",
-"	fe00  Zephyr-X LightPulse Fibre Channel Host Adapter",
-"	ff00  Neptune LightPulse Fibre Channel Host Adapter",
-"10e0  Integrated Micro Solutions Inc.",
-"	5026  IMS5026/27/28",
-"	5027  IMS5027",
-"	5028  IMS5028",
-"	8849  IMS8849",
-"	8853  IMS8853",
-"	9128  IMS9128 [Twin turbo 128]",
-"10e1  Tekram Technology Co.,Ltd.",
-"	0391  TRM-S1040",
-"		10e1 0391  DC-315U SCSI-3 Host Adapter",
-"	690c  DC-690c",
-"	dc29  DC-290",
-"10e2  Aptix Corporation",
-"10e3  Tundra Semiconductor Corp.",
-"	0000  CA91C042 [Universe]",
-"	0148  Tsi148 [Tempe]",
-"	0860  CA91C860 [QSpan]",
-"	0862  CA91C862A [QSpan-II]",
-"	8260  CA91L8200B [Dual PCI PowerSpan II]",
-"	8261  CA91L8260B [Single PCI PowerSpan II]",
-"10e4  Tandem Computers",
-"	8029  Realtek 8029 Network Card",
-"10e5  Micro Industries Corporation",
-"10e6  Gainbery Computer Products Inc.",
-"10e7  Vadem",
-"10e8  Applied Micro Circuits Corp.",
-"	1072  INES GPIB-PCI (AMCC5920 based)",
-"	2011  Q-Motion Video Capture/Edit board",
-"	4750  S5930 [Matchmaker]",
-"	5920  S5920",
-"	8043  LANai4.x [Myrinet LANai interface chip]",
-"	8062  S5933_PARASTATION",
-"	807d  S5933 [Matchmaker]",
-"	8088  Kongsberg Spacetec Format Synchronizer",
-"	8089  Kongsberg Spacetec Serial Output Board",
-"	809c  S5933_HEPC3",
-"	80d7  PCI-9112",
-"	80d9  PCI-9118",
-"	80da  PCI-9812",
-"	811a  PCI-IEEE1355-DS-DE Interface",
-"	814c  Fastcom ESCC-PCI (Commtech, Inc.)",
-"	8170  S5933 [Matchmaker] (Chipset Development Tool)",
-"	81e6  Multimedia video controller",
-"	8291  Fastcom 232/8-PCI (Commtech, Inc.)",
-"	82c4  Fastcom 422/4-PCI (Commtech, Inc.)",
-"	82c5  Fastcom 422/2-PCI (Commtech, Inc.)",
-"	82c6  Fastcom IG422/1-PCI (Commtech, Inc.)",
-"	82c7  Fastcom IG232/2-PCI (Commtech, Inc.)",
-"	82ca  Fastcom 232/4-PCI (Commtech, Inc.)",
-"	82db  AJA HDNTV HD SDI Framestore",
-"	82e2  Fastcom DIO24H-PCI (Commtech, Inc.)",
-"	8851  S5933 on Innes Corp FM Radio Capture card",
-"10e9  Alps Electric Co., Ltd.",
-"10ea  Intergraphics Systems",
-"	1680  IGA-1680",
-"	1682  IGA-1682",
-"	1683  IGA-1683",
-"	2000  CyberPro 2000",
-"	2010  CyberPro 2000A",
-"	5000  CyberPro 5000",
-"	5050  CyberPro 5050",
-"	5202  CyberPro 5202",
-"	5252  CyberPro5252",
-"10eb  Artists Graphics",
-"	0101  3GA",
-"	8111  Twist3 Frame Grabber",
-"10ec  Realtek Semiconductor Co., Ltd.",
-"	0139  Zonet Zen3200",
-"	8029  RTL-8029(AS)",
-"		10b8 2011  EZ-Card (SMC1208)",
-"		10ec 8029  RTL-8029(AS)",
-"		1113 1208  EN1208",
-"		1186 0300  DE-528",
-"		1259 2400  AT-2400",
-"	8129  RTL-8129",
-"		10ec 8129  RT8129 Fast Ethernet Adapter",
-"	8138  RT8139 (B/C) Cardbus Fast Ethernet Adapter",
-"		10ec 8138  RT8139 (B/C) Fast Ethernet Adapter",
-"	8139  RTL-8139/8139C/8139C+",
-"		0357 000a  TTP-Monitoring Card V2.0",
-"		1025 005a  TravelMate 290",
-"		1025 8920  ALN-325",
-"		1025 8921  ALN-325",
-"		103c 006a  NX9500",
-"		1043 8109  P5P800-MX Mainboard",
-"		1071 8160  MIM2000",
-"		10bd 0320  EP-320X-R",
-"		10ec 8139  RT8139",
-"		1113 ec01  FNC-0107TX",
-"		1186 1300  DFE-538TX",
-"		1186 1320  SN5200",
-"		1186 8139  DRN-32TX",
-"		11f6 8139  FN22-3(A) LinxPRO Ethernet Adapter",
-"		1259 2500  AT-2500TX",
-"		1259 2503  AT-2500TX/ACPI",
-"		1429 d010  ND010",
-"		1432 9130  EN-9130TX",
-"		1436 8139  RT8139",
-"		1458 e000  GA-7VM400M/7VT600 Motherboard",
-"		1462 788c  865PE Neo2-V Mainboard",
-"		146c 1439  FE-1439TX",
-"		1489 6001  GF100TXRII",
-"		1489 6002  GF100TXRA",
-"		149c 139a  LFE-8139ATX",
-"		149c 8139  LFE-8139TX",
-"		14cb 0200  LNR-100 Family 10/100 Base-TX Ethernet",
-"		1695 9001  Onboard RTL8101L 10/100 MBit",
-"		1799 5000  F5D5000 PCI Card/Desktop Network PCI Card",
-"		1904 8139  RTL8139D Fast Ethernet Adapter",
-"		2646 0001  EtheRx",
-"		8e2e 7000  KF-230TX",
-"		8e2e 7100  KF-230TX/2",
-"		a0a0 0007  ALN-325C",
-"	8169  RTL-8169 Gigabit Ethernet",
-"		1025 0079  Aspire 5024WLMi",
-"		1259 c107  CG-LAPCIGT",
-"		1371 434e  ProG-2000L",
-"		1458 e000  GA-8I915ME-G Mainboard",
-"		1462 702c  K8T NEO 2 motherboard",
-"	8180  RTL8180L 802.11b MAC",
-"	8185  RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller",
-"	8197  SmartLAN56 56K Modem",
-"10ed  Ascii Corporation",
-"	7310  V7310",
-"10ee  Xilinx Corporation",
-"	0205  Wildcard TE205P",
-"	0210  Wildcard TE210P",
-"	0314  Wildcard TE405P/TE410P (1st Gen)",
-"	0405  Wildcard TE405P (2nd Gen)",
-"	0410  Wildcard TE410P (2nd Gen)",
-"	3fc0  RME Digi96",
-"	3fc1  RME Digi96/8",
-"	3fc2  RME Digi96/8 Pro",
-"	3fc3  RME Digi96/8 Pad",
-"	3fc4  RME Digi9652 (Hammerfall)",
-"	3fc5  RME Hammerfall DSP",
-"	3fc6  RME Hammerfall DSP MADI",
-"	8381  Ellips Santos Frame Grabber",
-"	d154  Copley Controls CAN card (PCI-CAN-02)",
-"10ef  Racore Computer Products, Inc.",
-"	8154  M815x Token Ring Adapter",
-"10f0  Peritek Corporation",
-"10f1  Tyan Computer",
-"	2865  Tyan Thunder K8E S2865",
-"10f2  Achme Computer, Inc.",
-"10f3  Alaris, Inc.",
-"10f4  S-MOS Systems, Inc.",
-"10f5  NKK Corporation",
-"	a001  NDR4000 [NR4600 Bridge]",
-"10f6  Creative Electronic Systems SA",
-"10f7  Matsushita Electric Industrial Co., Ltd.",
-"10f8  Altos India Ltd",
-"10f9  PC Direct",
-"10fa  Truevision",
-"	000c  TARGA 1000",
-"10fb  Thesys Gesellschaft fuer Mikroelektronik mbH",
-"	186f  TH 6255",
-"10fc  I-O Data Device, Inc.",
-"	0003  Cardbus IDE Controller",
-"	0005  Cardbus SCSI CBSC II",
-"10fd  Soyo Computer, Inc",
-"10fe  Fast Multimedia AG",
-"10ff  NCube",
-"1100  Jazz Multimedia",
-"1101  Initio Corporation",
-"	1060  INI-A100U2W",
-"	9100  INI-9100/9100W",
-"	9400  INI-940",
-"	9401  INI-950",
-"	9500  360P",
-"	9502  Initio INI-9100UW Ultra Wide SCSI Controller INIC-950P chip",
-"1102  Creative Labs",
-"	0002  SB Live! EMU10k1",
-"		1102 0020  CT4850 SBLive! Value",
-"		1102 0021  CT4620 SBLive!",
-"		1102 002f  SBLive! mainboard implementation",
-"		1102 100a  SB Live! 5.1 Digital OEM [SB0220]",
-"		1102 4001  E-mu APS",
-"		1102 8022  CT4780 SBLive! Value",
-"		1102 8023  CT4790 SoundBlaster PCI512",
-"		1102 8024  CT4760 SBLive!",
-"		1102 8025  SBLive! Mainboard Implementation",
-"		1102 8026  CT4830 SBLive! Value",
-"		1102 8027  CT4832 SBLive! Value",
-"		1102 8028  CT4760 SBLive! OEM version",
-"		1102 8031  CT4831 SBLive! Value",
-"		1102 8040  CT4760 SBLive!",
-"		1102 8051  CT4850 SBLive! Value",
-"		1102 8061  SBLive! Player 5.1",
-"		1102 8064  SBLive! 5.1 Model SB0100",
-"		1102 8065  SBLive! 5.1 Digital Model SB0220",
-"		1102 8067  SBLive! 5.1 eMicro 28028",
-"	0004  SB Audigy",
-"		1102 0051  SB0090 Audigy Player",
-"		1102 0053  SB0090 Audigy Player/OEM",
-"		1102 0058  SB0090 Audigy Player/OEM",
-"		1102 1007  SB0240 Audigy 2 Platinum 6.1",
-"		1102 2002  SB Audigy 2 ZS (SB0350)",
-"	0006  [SB Live! Value] EMU10k1X",
-"	0007  SB Audigy LS",
-"		1102 0007  SBLive! 24bit",
-"		1102 1001  SB0310 Audigy LS",
-"		1102 1002  SB0312 Audigy LS",
-"		1102 1006  SB0410 SBLive! 24-bit",
-"		1462 1009  K8N Diamond",
-"	0008  SB0400 Audigy2 Value",
-"		1102 0008  EMU0404 Digital Audio System",
-"	4001  SB Audigy FireWire Port",
-"		1102 0010  SB Audigy FireWire Port",
-"	7002  SB Live! Game Port",
-"		1102 0020  Gameport Joystick",
-"	7003  SB Audigy Game Port",
-"		1102 0040  SB Audigy MIDI/Game Port",
-"	7004  [SB Live! Value] Input device controller",
-"	7005  SB Audigy LS Game Port",
-"		1102 1001  SB0310 Audigy LS MIDI/Game port",
-"		1102 1002  SB0312 Audigy LS MIDI/Game port",
-"	8064  SB0100 [SBLive! 5.1 OEM]",
-"	8938  Ectiva EV1938",
-"		1033 80e5  SlimTower-Jim (NEC)",
-"		1071 7150  Mitac 7150",
-"		110a 5938  Siemens Scenic Mobile 510PIII",
-"		13bd 100c  Ceres-C (Sharp, Intel BX)",
-"		13bd 100d  Sharp, Intel Banister",
-"		13bd 100e  TwinHead P09S/P09S3 (Sharp)",
-"		13bd f6f1  Marlin (Sharp)",
-"		14ff 0e70  P88TE (TWINHEAD INTERNATIONAL Corp)",
-"		14ff c401  Notebook 9100/9200/2000 (TWINHEAD INTERNATIONAL Corp)",
-"		156d b400  G400 - Geo (AlphaTop (Taiwan))",
-"		156d b550  G560  (AlphaTop (Taiwan))",
-"		156d b560  G560  (AlphaTop (Taiwan))",
-"		156d b700  G700/U700  (AlphaTop (Taiwan))",
-"		156d b795  G795  (AlphaTop (Taiwan))",
-"		156d b797  G797  (AlphaTop (Taiwan))",
-"1103  Triones Technologies, Inc.",
-"	0003  HPT343/345/346/363",
-"	0004  HPT366/368/370/370A/372/372N",
-"		1103 0001  HPT370A",
-"		1103 0004  HPT366 UDMA66 (r1) / HPT368 UDMA66 (r2) / HPT370 UDMA100 (r3) / HPT370 UDMA100 RAID (r4)",
-"		1103 0005  HPT370 UDMA100",
-"	0005  HPT372A/372N",
-"	0006  HPT302/302N",
-"	0007  HPT371/371N",
-"	0008  HPT374",
-"	0009  HPT372N",
-"1104  RasterOps Corp.",
-"1105  Sigma Designs, Inc.",
-"	1105  REALmagic Xcard MPEG 1/2/3/4 DVD Decoder",
-"	8300  REALmagic Hollywood Plus DVD Decoder",
-"	8400  EM840x REALmagic DVD/MPEG-2 Audio/Video Decoder",
-"	8401  EM8401 REALmagic DVD/MPEG-2 A/V Decoder",
-"	8470  EM8470 REALmagic DVD/MPEG-4 A/V Decoder",
-"	8471  EM8471 REALmagic DVD/MPEG-4 A/V Decoder",
-"	8475  EM8475 REALmagic DVD/MPEG-4 A/V Decoder",
-"		1105 0001  REALmagic X-Card",
-"	8476  EM8476 REALmagic DVD/MPEG-4 A/V Decoder",
-"		127d 0000  CineView II",
-"	8485  EM8485 REALmagic DVD/MPEG-4 A/V Decoder",
-"	8486  EM8486 REALmagic DVD/MPEG-4 A/V Decoder",
-"1106  VIA Technologies, Inc.",
-"	0102  Embedded VIA Ethernet Controller",
-"	0130  VT6305 1394.A Controller",
-"	0204  K8M800 Host Bridge",
-"	0208  PT890 Host Bridge",
-"	0238  K8T890 Host Bridge",
-"	0258  PT880 Host Bridge",
-"	0259  CN400/PM880 Host Bridge",
-"	0269  KT880 Host Bridge",
-"	0282  K8T800Pro Host Bridge",
-"		1043 80a3  A8V Deluxe",
-"	0290  K8M890 Host Bridge",
-"	0293  PM896 Host Bridge",
-"	0296  P4M800 Host Bridge",
-"	0305  VT8363/8365 [KT133/KM133]",
-"		1019 0987  K7VZA Mainboard",
-"		1043 8033  A7V Mainboard",
-"		1043 803e  A7V-E Mainboard",
-"		1043 8042  A7V133/A7V133-C Mainboard",
-"		147b a401  KT7/KT7-RAID/KT7A/KT7A-RAID Mainboard",
-"	0308  PT894 Host Bridge",
-"	0314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	0324  CX700 Host Bridge",
-"	0327  P4M890 Host Bridge",
-"	0336  K8M890CE Host Bridge",
-"	0340  PT900 Host Bridge",
-"	0351  VT3351 Host Bridge",
-"	0364  P4M900 Host Bridge",
-"	0391  VT8371 [KX133]",
-"	0501  VT8501 [Apollo MVP4]",
-"	0505  VT82C505",
-"	0561  VT82C576MV",
-"	0571  VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 8052  VT8233A Bus Master ATA100/66/33 IDE",
-"		1043 808c  A7V8X / A7V333 motherboard",
-"		1043 80a1  A7V8X-X motherboard rev. 1.01",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1106 0571  VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE",
-"		1179 0001  Magnia Z310",
-"		1297 f641  FX41 motherboard",
-"		1458 5002  GA-7VAX Mainboard",
-"		1462 7020  K8T NEO 2 motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		1849 0571  K7VT2/K7VT6 motherboard",
-"	0576  VT82C576 3V [Apollo Master]",
-"	0585  VT82C585VP [Apollo VP1/VPX]",
-"	0586  VT82C586/A/B PCI-to-ISA [Apollo VP]",
-"		1106 0000  MVP3 ISA Bridge",
-"	0591  VT8237A SATA 2-Port Controller",
-"	0595  VT82C595 [Apollo VP2]",
-"	0596  VT82C596 ISA [Mobile South]",
-"		1106 0000  VT82C596/A/B PCI to ISA Bridge",
-"		1458 0596  VT82C596/A/B PCI to ISA Bridge",
-"	0597  VT82C597 [Apollo VP3]",
-"	0598  VT82C598 [Apollo MVP3]",
-"	0601  VT8601 [Apollo ProMedia]",
-"	0605  VT8605 [ProSavage PM133]",
-"		1043 802c  CUV4X mainboard",
-"	0680  VT82C680 [Apollo P6]",
-"	0686  VT82C686 [Apollo Super South]",
-"		1019 0985  P6VXA Motherboard",
-"		1043 802c  CUV4X mainboard",
-"		1043 8033  A7V Mainboard",
-"		1043 803e  A7V-E Mainboard",
-"		1043 8040  A7M266 Mainboard",
-"		1043 8042  A7V133/A7V133-C Mainboard",
-"		1106 0000  VT82C686/A PCI to ISA Bridge",
-"		1106 0686  VT82C686/A PCI to ISA Bridge",
-"		1179 0001  Magnia Z310",
-"		147b a702  KG7-Lite Mainboard",
-"	0691  VT82C693A/694x [Apollo PRO133x]",
-"		1019 0985  P6VXA Motherboard",
-"		1179 0001  Magnia Z310",
-"		1458 0691  VT82C691 Apollo Pro System Controller",
-"	0693  VT82C693 [Apollo Pro Plus]",
-"	0698  VT82C693A [Apollo Pro133 AGP]",
-"	0926  VT82C926 [Amazon]",
-"	1000  VT82C570MV",
-"	1106  VT82C570MV",
-"	1204  K8M800 Host Bridge",
-"	1208  PT890 Host Bridge",
-"	1238  K8T890 Host Bridge",
-"	1258  PT880 Host Bridge",
-"	1259  CN400/PM880 Host Bridge",
-"	1269  KT880 Host Bridge",
-"	1282  K8T800Pro Host Bridge",
-"	1290  K8M890 Host Bridge",
-"	1293  PM896 Host Bridge",
-"	1296  P4M800 Host Bridge",
-"	1308  PT894 Host Bridge",
-"	1314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	1324  CX700 Host Bridge",
-"	1327  P4M890 Host Bridge",
-"	1336  K8M890CE Host Bridge",
-"	1340  PT900 Host Bridge",
-"	1351  VT3351 Host Bridge",
-"	1364  P4M900 Host Bridge",
-"	1571  VT82C576M/VT82C586",
-"	1595  VT82C595/97 [Apollo VP2/97]",
-"	2204  K8M800 Host Bridge",
-"	2208  PT890 Host Bridge",
-"	2238  K8T890 Host Bridge",
-"	2258  PT880 Host Bridge",
-"	2259  CN400/PM880 Host Bridge",
-"	2269  KT880 Host Bridge",
-"	2282  K8T800Pro Host Bridge",
-"	2290  K8M890 Host Bridge",
-"	2293  PM896 Host Bridge",
-"	2296  P4M800 Host Bridge",
-"	2308  PT894 Host Bridge",
-"	2314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	2324  CX700 Host Bridge",
-"	2327  P4M890 Host Bridge",
-"	2336  K8M890CE Host Bridge",
-"	2340  PT900 Host Bridge",
-"	2351  VT3351 Host Bridge",
-"	2364  P4M900 Host Bridge",
-"	287a  VT8251 PCI to PCI Bridge",
-"	287b  VT8251 Host Bridge",
-"	287c  VT8251 PCIE Root Port",
-"	287d  VT8251 PCIE Root Port",
-"	287e  VT8251 Ultra VLINK Controller",
-"	3022  CLE266",
-"	3038  VT82xxxxx UHCI USB 1.1 Controller",
-"		0925 1234  USB Controller",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 8080  A7V333 motherboard",
-"		1043 808c  VT6202 USB2.0 4 port controller",
-"		1043 80a1  A7V8X-X motherboard",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1179 0001  Magnia Z310",
-"		1458 5004  GA-7VAX Mainboard",
-"		1462 7020  K8T NEO 2 motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		182d 201d  CN-029 USB2.0 4 port PCI Card",
-"		1849 3038  K7VT6",
-"	3040  VT82C586B ACPI",
-"	3043  VT86C100A [Rhine]",
-"		10bd 0000  VT86C100A Fast Ethernet Adapter",
-"		1106 0100  VT86C100A Fast Ethernet Adapter",
-"		1186 1400  DFE-530TX rev A",
-"	3044  IEEE 1394 Host Controller",
-"		1025 005a  TravelMate 290",
-"		1043 808a  A8V Deluxe",
-"		1458 1000  GA-7VT600-1394 Motherboard",
-"		1462 207d  K8NGM2 series motherboard",
-"		1462 702d  K8T NEO 2 motherboard",
-"		1462 971d  MS-6917",
-"	3050  VT82C596 Power Management",
-"	3051  VT82C596 Power Management",
-"	3053  VT6105M [Rhine-III]",
-"	3057  VT82C686 [Apollo Super ACPI]",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0987  K7VZA Motherboard",
-"		1043 8033  A7V Mainboard",
-"		1043 803e  A7V-E Mainboard",
-"		1043 8040  A7M266 Mainboard",
-"		1043 8042  A7V133/A7V133-C Mainboard",
-"		1179 0001  Magnia Z310",
-"	3058  VT82C686 AC97 Audio Controller",
-"		0e11 0097  SoundMax Digital Integrated Audio",
-"		0e11 b194  Soundmax integrated digital audio",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0987  K7VZA Motherboard",
-"		1043 1106  A7V133/A7V133-C Mainboard",
-"		1106 4511  Onboard Audio on EP7KXA",
-"		1458 7600  Onboard Audio",
-"		1462 3091  MS-6309 Onboard Audio",
-"		1462 3300  MS-6330 Onboard Audio",
-"		15dd 7609  Onboard Audio",
-"	3059  VT8233/A/8235/8237 AC97 Audio Controller",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 8095  A7V8X Motherboard (Realtek ALC650 codec)",
-"		1043 80a1  A7V8X-X Motherboard",
-"		1043 80b0  A7V600/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX])",
-"		1043 812a  A8V Deluxe motherboard (Realtek ALC850 codec)",
-"		1106 3059  L7VMM2 Motherboard",
-"		1106 4161  K7VT2 motherboard",
-"		1106 4170  PCPartner P4M800-8237R Motherboard",
-"		1106 4552  Soyo KT-600 Dragon Plus (Realtek ALC 650)",
-"		1297 c160  FX41 motherboard (Realtek ALC650 codec)",
-"		1458 a002  GA-7VAX Onboard Audio (Realtek ALC650)",
-"		1462 0080  K8T NEO 2 motherboard",
-"		1462 3800  KT266 onboard audio",
-"		147b 1407  KV8-MAX3 motherboard",
-"		1849 9761  K7VT6 motherboard",
-"		4005 4710  MSI K7T266 Pro2-RU (MSI-6380 v2) onboard audio (Realtek/ALC 200/200P)",
-"		a0a0 01b6  AK77-8XN onboard audio",
-"	3065  VT6102 [Rhine-II]",
-"		1043 80a1  A7V8X-X Motherboard",
-"		1106 0102  VT6102 [Rhine II] Embeded Ethernet Controller on VT8235",
-"		1186 1400  DFE-530TX rev A",
-"		1186 1401  DFE-530TX rev B",
-"		13b9 1421  LD-10/100AL PCI Fast Ethernet Adapter (rev.B)",
-"		147b 1c09  NV7 Motherboard",
-"		1695 3005  VT6103",
-"		1695 300c  Realtek ALC655 sound chip",
-"		1849 3065  K7VT6 motherboard",
-"	3068  AC'97 Modem Controller",
-"		1462 309e  MS-6309 Saturn Motherboard",
-"	3074  VT8233 PCI to ISA Bridge",
-"		1043 8052  VT8233A",
-"	3091  VT8633 [Apollo Pro266]",
-"	3099  VT8366/A/7 [Apollo KT266/A/333]",
-"		1043 8064  A7V266-E Mainboard",
-"		1043 807f  A7V333 Mainboard",
-"		1849 3099  K7VT2 motherboard",
-"	3101  VT8653 Host Bridge",
-"	3102  VT8662 Host Bridge",
-"	3103  VT8615 Host Bridge",
-"	3104  USB 2.0",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 808c  A7V8X motherboard",
-"		1043 80a1  A7V8X-X motherboard rev 1.01",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1297 f641  FX41 motherboard",
-"		1458 5004  GA-7VAX Mainboard",
-"		1462 7020  K8T NEO 2 motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		182d 201d  CN-029 USB 2.0 4 port PCI Card",
-"		1849 3104  K7VT6 motherboard",
-"	3106  VT6105 [Rhine-III]",
-"		1186 1403  DFE-530TX rev C",
-"	3108  S3 Unichrome Pro VGA Adapter",
-"	3109  VT8233C PCI to ISA Bridge",
-"	3112  VT8361 [KLE133] Host Bridge",
-"	3113  VPX/VPX2 PCI to PCI Bridge Controller",
-"	3116  VT8375 [KM266/KL266] Host Bridge",
-"		1297 f641  FX41 motherboard",
-"	3118  S3 Unichrome Pro VGA Adapter",
-"	3119  VT6120/VT6121/VT6122 Gigabit Ethernet Adapter",
-"	3122  VT8623 [Apollo CLE266] integrated CastleRock graphics",
-"	3123  VT8623 [Apollo CLE266]",
-"	3128  VT8753 [P4X266 AGP]",
-"	3133  VT3133 Host Bridge",
-"	3147  VT8233A ISA Bridge",
-"		1043 808c  A7V333 motherboard",
-"	3148  P4M266 Host Bridge",
-"	3149  VIA VT6420 SATA RAID Controller",
-"		1043 80ed  A7V600/K8V Deluxe/K8V-X/A8V Deluxe motherboard",
-"		1458 b003  GA-7VM400AM(F) Motherboard",
-"		1462 7020  K8T Neo 2 Motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		147b 1408  KV7",
-"		1849 3149  K7VT6 motherboard",
-"	3156  P/KN266 Host Bridge",
-"	3164  VT6410 ATA133 RAID controller",
-"		1043 80f4  P4P800 Mainboard Deluxe ATX",
-"		1462 7028  915P/G Neo2",
-"	3168  VT8374 P4X400 Host Controller/AGP Bridge",
-"	3177  VT8235 ISA Bridge",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 808c  A7V8X motherboard",
-"		1043 80a1  A7V8X-X motherboard",
-"		1297 f641  FX41 motherboard",
-"		1458 5001  GA-7VAX Mainboard",
-"		1849 3177  K7VT2 motherboard",
-"	3178  ProSavageDDR P4N333 Host Bridge",
-"	3188  VT8385 [K8T800 AGP] Host Bridge",
-"		1043 80a3  K8V Deluxe/K8V-X motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"	3189  VT8377 [KT400/KT600 AGP] Host Bridge",
-"		1043 807f  A7V8X motherboard",
-"		1458 5000  GA-7VAX Mainboard",
-"		1849 3189  K7VT6 motherboard",
-"	3204  K8M800 Host Bridge",
-"	3205  VT8378 [KM400/A] Chipset Host Bridge",
-"		1458 5000  GA-7VM400M Motherboard",
-"	3208  PT890 Host Bridge",
-"	3213  VPX/VPX2 PCI to PCI Bridge Controller",
-"	3218  K8T800M Host Bridge",
-"	3227  VT8237 ISA bridge [KT600/K8T800/K8T890 South]",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1106 3227  DFI KT600-AL Motherboard",
-"		1458 5001  GA-7VT600 Motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		1849 3227  K7VT4 motherboard",
-"	3238  K8T890 Host Bridge",
-"	3249  VT6421 IDE RAID Controller",
-"	324a  CX700 PCI to PCI Bridge",
-"	324b  CX700 Host Bridge",
-"	324e  CX700 Internal Module Bus",
-"	3258  PT880 Host Bridge",
-"	3259  CN400/PM880 Host Bridge",
-"	3269  KT880 Host Bridge",
-"	3282  K8T800Pro Host Bridge",
-"	3287  VT8251 PCI to ISA Bridge",
-"	3288  VIA High Definition Audio Controller",
-"	3290  K8M890 Host Bridge",
-"	3296  P4M800 Host Bridge",
-"	3324  CX700 Host Bridge",
-"	3327  P4M890 Host Bridge",
-"	3336  K8M890CE Host Bridge",
-"	3337  VT8237A PCI to ISA Bridge",
-"	3340  PT900 Host Bridge",
-"	3344  UniChrome Pro IGP",
-"	3349  VT8251 AHCI/SATA 4-Port Controller",
-"	3351  VT3351 Host Bridge",
-"	3364  P4M900 Host Bridge",
-"	337a  VT8237A PCI to PCI Bridge",
-"	337b  VT8237A Host Bridge",
-"	4149  VIA VT6420 (ATA133) Controller",
-"	4204  K8M800 Host Bridge",
-"	4208  PT890 Host Bridge",
-"	4238  K8T890 Host Bridge",
-"	4258  PT880 Host Bridge",
-"	4259  CN400/PM880 Host Bridge",
-"	4269  KT880 Host Bridge",
-"	4282  K8T800Pro Host Bridge",
-"	4290  K8M890 Host Bridge",
-"	4293  PM896 Host Bridge",
-"	4296  P4M800 Host Bridge",
-"	4308  PT894 Host Bridge",
-"	4314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	4324  CX700 Host Bridge",
-"	4327  P4M890 Host Bridge",
-"	4336  K8M890CE Host Bridge",
-"	4340  PT900 Host Bridge",
-"	4351  VT3351 Host Bridge",
-"	4364  P4M900 Host Bridge",
-"	5030  VT82C596 ACPI [Apollo PRO]",
-"	5208  PT890 I/O APIC Interrupt Controller",
-"	5238  K8T890 I/O APIC Interrupt Controller",
-"	5290  K8M890 I/O APIC Interrupt Controller",
-"	5308  PT894 I/O APIC Interrupt Controller",
-"	5327  P4M890 I/O APIC Interrupt Controller",
-"	5336  K8M890CE I/O APIC Interrupt Controller",
-"	5340  PT900 I/O APIC Interrupt Controller",
-"	5351  VT3351 I/O APIC Interrupt Controller",
-"	5364  P4M900 I/O APIC Interrupt Controller",
-"	6100  VT85C100A [Rhine II]",
-"	6327  P4M890 Security Device",
-"	7204  K8M800 Host Bridge",
-"	7205  VT8378 [S3 UniChrome] Integrated Video",
-"		1458 d000  Gigabyte GA-7VM400(A)M(F) Motherboard",
-"	7208  PT890 Host Bridge",
-"	7238  K8T890 Host Bridge",
-"	7258  PT880 Host Bridge",
-"	7259  CN400/PM880 Host Bridge",
-"	7269  KT880 Host Bridge",
-"	7282  K8T800Pro Host Bridge",
-"	7290  K8M890 Host Bridge",
-"	7293  PM896 Host Bridge",
-"	7296  P4M800 Host Bridge",
-"	7308  PT894 Host Bridge",
-"	7314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	7324  CX700 Host Bridge",
-"	7327  P4M890 Host Bridge",
-"	7336  K8M890CE Host Bridge",
-"	7340  PT900 Host Bridge",
-"	7351  VT3351 Host Bridge",
-"	7364  P4M900 Host Bridge",
-"	8231  VT8231 [PCI-to-ISA Bridge]",
-"	8235  VT8235 ACPI",
-"	8305  VT8363/8365 [KT133/KM133 AGP]",
-"	8324  CX700 PCI to ISA Bridge",
-"	8391  VT8371 [KX133 AGP]",
-"	8501  VT8501 [Apollo MVP4 AGP]",
-"	8596  VT82C596 [Apollo PRO AGP]",
-"	8597  VT82C597 [Apollo VP3 AGP]",
-"	8598  VT82C598/694x [Apollo MVP3/Pro133x AGP]",
-"		1019 0985  P6VXA Motherboard",
-"	8601  VT8601 [Apollo ProMedia AGP]",
-"	8605  VT8605 [PM133 AGP]",
-"	8691  VT82C691 [Apollo Pro]",
-"	8693  VT82C693 [Apollo Pro Plus] PCI Bridge",
-"	a208  PT890 PCI to PCI Bridge Controller",
-"	a238  K8T890 PCI to PCI Bridge Controller",
-"	a327  P4M890 PCI to PCI Bridge Controller",
-"	a364  P4M900 PCI to PCI Bridge Controller",
-"	b091  VT8633 [Apollo Pro266 AGP]",
-"	b099  VT8366/A/7 [Apollo KT266/A/333 AGP]",
-"	b101  VT8653 AGP Bridge",
-"	b102  VT8362 AGP Bridge",
-"	b103  VT8615 AGP Bridge",
-"	b112  VT8361 [KLE133] AGP Bridge",
-"	b113  VPX/VPX2 I/O APIC Interrupt Controller",
-"	b115  VT8363/8365 [KT133/KM133] PCI Bridge",
-"	b168  VT8235 PCI Bridge",
-"	b188  VT8237 PCI bridge [K8T800/K8T890 South]",
-"		147b 1407  KV8-MAX3 motherboard",
-"	b198  VT8237 PCI Bridge",
-"	b213  VPX/VPX2 I/O APIC Interrupt Controller",
-"	b999  [K8T890 North / VT8237 South] PCI Bridge",
-"	c208  PT890 PCI to PCI Bridge Controller",
-"	c238  K8T890 PCI to PCI Bridge Controller",
-"	c327  P4M890 PCI to PCI Bridge Controller",
-"	c340  PT900 PCI to PCI Bridge Controller",
-"	c364  P4M900 PCI to PCI Bridge Controller",
-"	d104  VT8237 Integrated Fast Ethernet Controller",
-"	d208  PT890 PCI to PCI Bridge Controller",
-"	d213  VPX/VPX2 PCI to PCI Bridge Controller",
-"	d238  K8T890 PCI to PCI Bridge Controller",
-"	d340  PT900 PCI to PCI Bridge Controller",
-"	e208  PT890 PCI to PCI Bridge Controller",
-"	e238  K8T890 PCI to PCI Bridge Controller",
-"	e340  PT900 PCI to PCI Bridge Controller",
-"	f208  PT890 PCI to PCI Bridge Controller",
-"	f238  K8T890 PCI to PCI Bridge Controller",
-"	f340  PT900 PCI to PCI Bridge Controller",
-"1107  Stratus Computers",
-"	0576  VIA VT82C570MV [Apollo] (Wrong vendor ID!)",
-"1108  Proteon, Inc.",
-"	0100  p1690plus_AA",
-"	0101  p1690plus_AB",
-"	0105  P1690Plus",
-"	0108  P1690Plus",
-"	0138  P1690Plus",
-"	0139  P1690Plus",
-"	013c  P1690Plus",
-"	013d  P1690Plus",
-"1109  Cogent Data Technologies, Inc.",
-"	1400  EM110TX [EX110TX]",
-"110a  Siemens Nixdorf AG",
-"	0002  Pirahna 2-port",
-"	0005  Tulip controller, power management, switch extender",
-"	0006  FSC PINC (I/O-APIC)",
-"	0015  FSC Multiprocessor Interrupt Controller",
-"	001d  FSC Copernicus Management Controller",
-"	007b  FSC Remote Service Controller, mailbox device",
-"	007c  FSC Remote Service Controller, shared memory device",
-"	007d  FSC Remote Service Controller, SMIC device",
-"	2101  HST SAPHIR V Primary PCI (ISDN/PMx)",
-"	2102  DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Controller with 4 Channels",
-"	2104  Eicon Diva 2.02 compatible passive ISDN card",
-"	3142  SIMATIC NET CP 5613A1 (Profibus Adapter)",
-"	4021  SIMATIC NET CP 5512 (Profibus and MPI Cardbus Adapter)",
-"	4029  SIMATIC NET CP 5613A2 (Profibus Adapter)",
-"	4942  FPGA I-Bus Tracer for MBD",
-"	6120  SZB6120",
-"110b  Chromatic Research Inc.",
-"	0001  Mpact Media Processor",
-"	0004  Mpact 2",
-"110c  Mini-Max Technology, Inc.",
-"110d  Znyx Advanced Systems",
-"110e  CPU Technology",
-"110f  Ross Technology",
-"1110  Powerhouse Systems",
-"	6037  Firepower Powerized SMP I/O ASIC",
-"	6073  Firepower Powerized SMP I/O ASIC",
-"1111  Santa Cruz Operation",
-"1112  Osicom Technologies Inc",
-"	2200  FDDI Adapter",
-"	2300  Fast Ethernet Adapter",
-"	2340  4 Port Fast Ethernet Adapter",
-"	2400  ATM Adapter",
-"1113  Accton Technology Corporation",
-"	1211  SMC2-1211TX",
-"		103c 1207  EN-1207D Fast Ethernet Adapter",
-"		1113 1211  EN-1207D Fast Ethernet Adapter",
-"	1216  EN-1216 Ethernet Adapter",
-"		1113 2242  EN2242 10/100 Ethernet Mini-PCI Card",
-"		111a 1020  SpeedStream 1020 PCI 10/100 Ethernet Adaptor [EN-1207F-TX \?]",
-"	1217  EN-1217 Ethernet Adapter",
-"	5105  10Mbps Network card",
-"	9211  EN-1207D Fast Ethernet Adapter",
-"		1113 9211  EN-1207D Fast Ethernet Adapter",
-"	9511  21x4x DEC-Tulip compatible Fast Ethernet",
-"	d301  CPWNA100 (Philips wireless PCMCIA)",
-"	ec02  SMC 1244TX v3",
-"1114  Atmel Corporation",
-"	0506  at76c506 802.11b Wireless Network Adaptor",
-"1115  3D Labs",
-"1116  Data Translation",
-"	0022  DT3001",
-"	0023  DT3002",
-"	0024  DT3003",
-"	0025  DT3004",
-"	0026  DT3005",
-"	0027  DT3001-PGL",
-"	0028  DT3003-PGL",
-"1117  Datacube, Inc",
-"	9500  Max-1C SVGA card",
-"	9501  Max-1C image processing",
-"1118  Berg Electronics",
-"1119  ICP Vortex Computersysteme GmbH",
-"	0000  GDT 6000/6020/6050",
-"	0001  GDT 6000B/6010",
-"	0002  GDT 6110/6510",
-"	0003  GDT 6120/6520",
-"	0004  GDT 6530",
-"	0005  GDT 6550",
-"	0006  GDT 6117/6517",
-"	0007  GDT 6127/6527",
-"	0008  GDT 6537",
-"	0009  GDT 6557/6557-ECC",
-"	000a  GDT 6115/6515",
-"	000b  GDT 6125/6525",
-"	000c  GDT 6535",
-"	000d  GDT 6555",
-"	0010  GDT 6115/6515",
-"	0011  GDT 6125/6525",
-"	0012  GDT 6535",
-"	0013  GDT 6555/6555-ECC",
-"	0100  GDT 6117RP/6517RP",
-"	0101  GDT 6127RP/6527RP",
-"	0102  GDT 6537RP",
-"	0103  GDT 6557RP",
-"	0104  GDT 6111RP/6511RP",
-"	0105  GDT 6121RP/6521RP",
-"	0110  GDT 6117RD/6517RD",
-"	0111  GDT 6127RD/6527RD",
-"	0112  GDT 6537RD",
-"	0113  GDT 6557RD",
-"	0114  GDT 6111RD/6511RD",
-"	0115  GDT 6121RD/6521RD",
-"	0118  GDT 6118RD/6518RD/6618RD",
-"	0119  GDT 6128RD/6528RD/6628RD",
-"	011a  GDT 6538RD/6638RD",
-"	011b  GDT 6558RD/6658RD",
-"	0120  GDT 6117RP2/6517RP2",
-"	0121  GDT 6127RP2/6527RP2",
-"	0122  GDT 6537RP2",
-"	0123  GDT 6557RP2",
-"	0124  GDT 6111RP2/6511RP2",
-"	0125  GDT 6121RP2/6521RP2",
-"	0136  GDT 6113RS/6513RS",
-"	0137  GDT 6123RS/6523RS",
-"	0138  GDT 6118RS/6518RS/6618RS",
-"	0139  GDT 6128RS/6528RS/6628RS",
-"	013a  GDT 6538RS/6638RS",
-"	013b  GDT 6558RS/6658RS",
-"	013c  GDT 6533RS/6633RS",
-"	013d  GDT 6543RS/6643RS",
-"	013e  GDT 6553RS/6653RS",
-"	013f  GDT 6563RS/6663RS",
-"	0166  GDT 7113RN/7513RN/7613RN",
-"	0167  GDT 7123RN/7523RN/7623RN",
-"	0168  GDT 7118RN/7518RN/7518RN",
-"	0169  GDT 7128RN/7528RN/7628RN",
-"	016a  GDT 7538RN/7638RN",
-"	016b  GDT 7558RN/7658RN",
-"	016c  GDT 7533RN/7633RN",
-"	016d  GDT 7543RN/7643RN",
-"	016e  GDT 7553RN/7653RN",
-"	016f  GDT 7563RN/7663RN",
-"	01d6  GDT 4x13RZ",
-"	01d7  GDT 4x23RZ",
-"	01f6  GDT 8x13RZ",
-"	01f7  GDT 8x23RZ",
-"	01fc  GDT 8x33RZ",
-"	01fd  GDT 8x43RZ",
-"	01fe  GDT 8x53RZ",
-"	01ff  GDT 8x63RZ",
-"	0210  GDT 6519RD/6619RD",
-"	0211  GDT 6529RD/6629RD",
-"	0260  GDT 7519RN/7619RN",
-"	0261  GDT 7529RN/7629RN",
-"	02ff  GDT MAXRP",
-"	0300  GDT NEWRX",
-"111a  Efficient Networks, Inc",
-"	0000  155P-MF1 (FPGA)",
-"	0002  155P-MF1 (ASIC)",
-"	0003  ENI-25P ATM",
-"		111a 0000  ENI-25p Miniport ATM Adapter",
-"	0005  SpeedStream (LANAI)",
-"		111a 0001  ENI-3010 ATM",
-"		111a 0009  ENI-3060 ADSL (VPI=0)",
-"		111a 0101  ENI-3010 ATM",
-"		111a 0109  ENI-3060CO ADSL (VPI=0)",
-"		111a 0809  ENI-3060 ADSL (VPI=0 or 8)",
-"		111a 0909  ENI-3060CO ADSL (VPI=0 or 8)",
-"		111a 0a09  ENI-3060 ADSL (VPI=<0..15>)",
-"	0007  SpeedStream ADSL",
-"		111a 1001  ENI-3061 ADSL [ASIC]",
-"	1203  SpeedStream 1023 Wireless PCI Adapter",
-"111b  Teledyne Electronic Systems",
-"111c  Tricord Systems Inc.",
-"	0001  Powerbis Bridge",
-"111d  Integrated Device Technology, Inc.",
-"	0001  IDT77201/77211 155Mbps ATM SAR Controller [NICStAR]",
-"	0003  IDT77222/77252 155Mbps ATM MICRO ABR SAR Controller",
-"	0004  IDT77V252 155Mbps ATM MICRO ABR SAR Controller",
-"	0005  IDT77V222 155Mbps ATM MICRO ABR SAR Controller",
-"111e  Eldec",
-"111f  Precision Digital Images",
-"	4a47  Precision MX Video engine interface",
-"	5243  Frame capture bus interface",
-"1120  EMC Corporation",
-"1121  Zilog",
-"1122  Multi-tech Systems, Inc.",
-"1123  Excellent Design, Inc.",
-"1124  Leutron Vision AG",
-"	2581  Picport Monochrome",
-"1125  Eurocore",
-"1126  Vigra",
-"1127  FORE Systems Inc",
-"	0200  ForeRunner PCA-200 ATM",
-"	0210  PCA-200PC",
-"	0250  ATM",
-"	0300  ForeRunner PCA-200EPC ATM",
-"	0310  ATM",
-"	0400  ForeRunnerHE ATM Adapter",
-"		1127 0400  ForeRunnerHE ATM",
-"1129  Firmworks",
-"112a  Hermes Electronics Company, Ltd.",
-"112b  Linotype - Hell AG",
-"112c  Zenith Data Systems",
-"112d  Ravicad",
-"112e  Infomedia Microelectronics Inc.",
-"112f  Imaging Technology Inc",
-"	0000  MVC IC-PCI",
-"	0001  MVC IM-PCI Video frame grabber/processor",
-"	0008  PC-CamLink PCI framegrabber",
-"1130  Computervision",
-"1131  Philips Semiconductors",
-"	1561  USB 1.1 Host Controller",
-"	1562  USB 2.0 Host Controller",
-"	3400  SmartPCI56(UCB1500) 56K Modem",
-"	5400  TriMedia TM1000/1100",
-"	5402  TriMedia TM-1300",
-"		1244 0f00  Fritz!Card DSL",
-"	5405  TriMedia TM1500",
-"	5406  TriMedia TM1700",
-"	7130  SAA7130 Video Broadcast Decoder",
-"		102b 48d0  Matrox CronosPlus",
-"		1048 226b  ELSA EX-VISION 300TV",
-"		1131 2001  10MOONS PCI TV CAPTURE CARD",
-"		1131 2005  Techcom (India) TV Tuner Card (SSD-TV-670)",
-"		1461 050c  Nagase Sangyo TransGear 3000TV",
-"		1461 10ff  AVerMedia DVD EZMaker",
-"		1461 2108  AverMedia AverTV/305",
-"		1461 2115  AverMedia AverTV Studio 305",
-"		153b 1152  Terratec Cinergy 200 TV",
-"		185b c100  Compro VideoMate TV PVR/FM",
-"		185b c901  Videomate DVB-T200",
-"		5168 0138  LifeView FlyVIDEO2000",
-"	7133  SAA7133/SAA7135 Video Broadcast Decoder",
-"		0000 4091  Beholder BeholdTV 409 FM",
-"		1019 4cb5  Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM)",
-"		1043 0210  FlyTV mini Asus Digimatrix",
-"		1043 4843  ASUS TV-FM 7133",
-"		1043 4845  TV-FM 7135",
-"		1043 4862  P7131 Dual",
-"		1131 2001  Proteus Pro [philips reference design]",
-"		1131 2018  Tiger reference design",
-"		1131 4ee9  MonsterTV Mobile",
-"		11bd 002b  PCTV Stereo",
-"		11bd 002e  PCTV 110i (saa7133)",
-"		12ab 0800  PURPLE TV",
-"		1421 0335  Instant TV DVB-T Cardbus",
-"		1421 1370  Instant TV (saa7135)",
-"		1435 7330  VFG7330",
-"		1435 7350  VFG7350",
-"		1461 1044  AVerTVHD MCE A180",
-"		1461 f31f  Avermedia AVerTV GO 007 FM",
-"		1462 6231  TV@Anywhere plus",
-"		1489 0214  LifeView FlyTV Platinum FM",
-"		14c0 1212  LifeView FlyTV Platinum Mini2",
-"		153b 1160  Cinergy 250 PCI TV",
-"		153b 1162  Terratec Cinergy 400 mobile",
-"		185b c100  VideoMate TV",
-"		5168 0306  LifeView FlyDVB-T DUO",
-"		5168 0319  LifeView FlyDVB Trio",
-"	7134  SAA7134/SAA7135HL Video Broadcast Decoder",
-"		1019 4cb4  Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM)",
-"		1043 0210  Digimatrix TV",
-"		1043 4840  ASUS TV-FM 7134",
-"		1131 2004  EUROPA V3 reference design",
-"		1131 4e85  SKNet Monster TV",
-"		1131 6752  EMPRESS",
-"		11bd 002b  PCTV Stereo",
-"		11bd 002d  PCTV 300i DVB-T + PAL",
-"		1461 2c00  AverTV Hybrid+FM PCI",
-"		1461 9715  AVerTV Studio 307",
-"		1461 a70a  Avermedia AVerTV 307",
-"		1461 a70b  AverMedia M156 / Medion 2819",
-"		1461 d6ee  Cardbus TV/Radio (E500)",
-"		1471 b7e9  AVerTV Cardbus plus",
-"		153b 1142  Terratec Cinergy 400 TV",
-"		153b 1143  Terratec Cinergy 600 TV",
-"		153b 1158  Terratec Cinergy 600 TV MK3",
-"		1540 9524  ProVideo PV952",
-"		16be 0003  Medion 7134",
-"		185b c200  Compro VideoMate Gold+ Pal",
-"		185b c900  Videomate DVB-T300",
-"		1894 a006  KNC One TV-Station DVR",
-"		1894 fe01  KNC One TV-Station RDS / Typhoon TV Tuner RDS",
-"	7145  SAA7145",
-"	7146  SAA7146",
-"		110a 0000  Fujitsu/Siemens DVB-C card rev1.5",
-"		110a ffff  Fujitsu/Siemens DVB-C card rev1.5",
-"		1131 4f56  KNC1 DVB-S Budget",
-"		1131 4f60  Fujitsu-Siemens Activy DVB-S Budget Rev AL",
-"		1131 4f61  Activy DVB-S Budget Rev GR",
-"		1131 5f61  Activy DVB-T Budget",
-"		114b 2003  DVRaptor Video Edit/Capture Card",
-"		11bd 0006  DV500 Overlay",
-"		11bd 000a  DV500 Overlay",
-"		11bd 000f  DV500 Overlay",
-"		13c2 0000  Siemens/Technotrend/Hauppauge DVB card rev1.3 or rev1.5",
-"		13c2 0001  Technotrend/Hauppauge DVB card rev1.3 or rev1.6",
-"		13c2 0002  Technotrend/Hauppauge DVB card rev2.1",
-"		13c2 0003  Technotrend/Hauppauge DVB card rev2.1",
-"		13c2 0004  Technotrend/Hauppauge DVB card rev2.1",
-"		13c2 0006  Technotrend/Hauppauge DVB card rev1.3 or rev1.6",
-"		13c2 0008  Technotrend/Hauppauge DVB-T",
-"		13c2 000a  Octal/Technotrend DVB-C for iTV",
-"		13c2 1003  Technotrend-Budget/Hauppauge WinTV-NOVA-S DVB card",
-"		13c2 1004  Technotrend-Budget/Hauppauge WinTV-NOVA-C DVB card",
-"		13c2 1005  Technotrend-Budget/Hauppauge WinTV-NOVA-T DVB card",
-"		13c2 100c  Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card",
-"		13c2 100f  Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card",
-"		13c2 1011  Technotrend-Budget/Hauppauge WinTV-NOVA-T DVB card",
-"		13c2 1013  SATELCO Multimedia DVB",
-"		13c2 1016  WinTV-NOVA-SE DVB card",
-"		13c2 1102  Technotrend/Hauppauge DVB card rev2.1",
-"		153b 1156  Terratec Cynergy 1200C",
-"	9730  SAA9730 Integrated Multimedia and Peripheral Controller",
-"1132  Mitel Corp.",
-"1133  Eicon Networks Corporation",
-"	7901  EiconCard S90",
-"	7902  EiconCard S90",
-"	7911  EiconCard S91",
-"	7912  EiconCard S91",
-"	7941  EiconCard S94",
-"	7942  EiconCard S94",
-"	7943  EiconCard S94",
-"	7944  EiconCard S94",
-"	b921  EiconCard P92",
-"	b922  EiconCard P92",
-"	b923  EiconCard P92",
-"	e001  Diva Pro 2.0 S/T",
-"	e002  Diva 2.0 S/T PCI",
-"	e003  Diva Pro 2.0 U",
-"	e004  Diva 2.0 U PCI",
-"	e005  Diva 2.01 S/T PCI",
-"	e006  Diva CT S/T PCI",
-"	e007  Diva CT U PCI",
-"	e008  Diva CT Lite S/T PCI",
-"	e009  Diva CT Lite U PCI",
-"	e00a  Diva ISDN+V.90 PCI",
-"	e00b  Diva 2.02 PCI S/T",
-"	e00c  Diva 2.02 PCI U",
-"	e00d  Diva ISDN Pro 3.0 PCI",
-"	e00e  Diva ISDN+CT S/T PCI Rev 2",
-"	e010  Diva Server BRI-2M PCI",
-"		110a 0021  Fujitsu Siemens ISDN S0",
-"	e011  Diva Server BRI S/T Rev 2",
-"	e012  Diva Server 4BRI-8M PCI",
-"	e013  Diva Server 4BRI Rev 2",
-"		1133 1300  Diva Server V-4BRI-8",
-"		1133 e013  Diva Server 4BRI-8M 2.0 PCI",
-"	e014  Diva Server PRI-30M PCI",
-"	e015  DIVA Server PRI Rev 2",
-"		1133 e015  Diva Server PRI 2.0 PCI",
-"	e016  Diva Server Voice 4BRI PCI",
-"	e017  Diva Server Voice 4BRI Rev 2",
-"		1133 e017  Diva Server Voice 4BRI-8M 2.0 PCI",
-"	e018  Diva Server BRI-2M 2.0 PCI",
-"		1133 1800  Diva Server V-BRI-2",
-"		1133 e018  Diva Server BRI-2M 2.0 PCI",
-"	e019  Diva Server Voice PRI Rev 2",
-"		1133 e019  Diva Server Voice PRI 2.0 PCI",
-"	e01a  Diva Server 2FX",
-"	e01b  Diva Server Voice BRI-2M 2.0 PCI",
-"		1133 e01b  Diva Server Voice BRI-2M 2.0 PCI",
-"	e01c  Diva Server PRI Rev 3",
-"		1133 1c01  Diva Server PRI/E1/T1-8",
-"		1133 1c02  Diva Server PRI/T1-24",
-"		1133 1c03  Diva Server PRI/E1-30",
-"		1133 1c04  Diva Server PRI/E1/T1",
-"		1133 1c05  Diva Server V-PRI/T1-24",
-"		1133 1c06  Diva Server V-PRI/E1-30",
-"		1133 1c07  Diva Server PRI/E1/T1-8 Cornet NQ",
-"		1133 1c08  Diva Server PRI/T1-24 Cornet NQ",
-"		1133 1c09  Diva Server PRI/E1-30 Cornet NQ",
-"		1133 1c0a  Diva Server PRI/E1/T1 Cornet NQ",
-"		1133 1c0b  Diva Server V-PRI/T1-24 Cornet NQ",
-"		1133 1c0c  Diva Server V-PRI/E1-30 Cornet NQ",
-"	e01e  Diva Server 2PRI",
-"	e020  Diva Server 4PRI",
-"	e022  Diva Server Analog-2P",
-"	e024  Diva Server Analog-4P",
-"		1133 2400  Diva Server V-Analog-4P",
-"		1133 e024  Diva Server Analog-4P",
-"	e028  Diva Server Analog-8P",
-"		1133 2800  Diva Server V-Analog-8P",
-"		1133 e028  Diva Server Analog-8P",
-"	e02a  Diva Server IPM-300",
-"	e02c  Diva Server IPM-600",
-"1134  Mercury Computer Systems",
-"	0001  Raceway Bridge",
-"	0002  Dual PCI to RapidIO Bridge",
-"1135  Fuji Xerox Co Ltd",
-"	0001  Printer controller",
-"1136  Momentum Data Systems",
-"1137  Cisco Systems Inc",
-"1138  Ziatech Corporation",
-"	8905  8905 [STD 32 Bridge]",
-"1139  Dynamic Pictures, Inc",
-"	0001  VGA Compatable 3D Graphics",
-"113a  FWB Inc",
-"113b  Network Computing Devices",
-"113c  Cyclone Microsystems, Inc.",
-"	0000  PCI-9060 i960 Bridge",
-"	0001  PCI-SDK [PCI i960 Evaluation Platform]",
-"	0911  PCI-911 [i960Jx-based Intelligent I/O Controller]",
-"	0912  PCI-912 [i960CF-based Intelligent I/O Controller]",
-"	0913  PCI-913",
-"	0914  PCI-914 [I/O Controller w/ secondary PCI bus]",
-"113d  Leading Edge Products Inc",
-"113e  Sanyo Electric Co - Computer Engineering Dept",
-"113f  Equinox Systems, Inc.",
-"	0808  SST-64P Adapter",
-"	1010  SST-128P Adapter",
-"	80c0  SST-16P DB Adapter",
-"	80c4  SST-16P RJ Adapter",
-"	80c8  SST-16P Adapter",
-"	8888  SST-4P Adapter",
-"	9090  SST-8P Adapter",
-"1140  Intervoice Inc",
-"1141  Crest Microsystem Inc",
-"1142  Alliance Semiconductor Corporation",
-"	3210  AP6410",
-"	6422  ProVideo 6422",
-"	6424  ProVideo 6424",
-"	6425  ProMotion AT25",
-"	643d  ProMotion AT3D",
-"1143  NetPower, Inc",
-"1144  Cincinnati Milacron",
-"	0001  Noservo controller",
-"1145  Workbit Corporation",
-"	8007  NinjaSCSI-32 Workbit",
-"	f007  NinjaSCSI-32 KME",
-"	f010  NinjaSCSI-32 Workbit",
-"	f012  NinjaSCSI-32 Logitec",
-"	f013  NinjaSCSI-32 Logitec",
-"	f015  NinjaSCSI-32 Melco",
-"	f020  NinjaSCSI-32 Sony PCGA-DVD51",
-"1146  Force Computers",
-"1147  Interface Corp",
-"1148  SysKonnect",
-"	4000  FDDI Adapter",
-"		0e11 b03b  Netelligent 100 FDDI DAS Fibre SC",
-"		0e11 b03c  Netelligent 100 FDDI SAS Fibre SC",
-"		0e11 b03d  Netelligent 100 FDDI DAS UTP",
-"		0e11 b03e  Netelligent 100 FDDI SAS UTP",
-"		0e11 b03f  Netelligent 100 FDDI SAS Fibre MIC",
-"		1148 5521  FDDI SK-5521 (SK-NET FDDI-UP)",
-"		1148 5522  FDDI SK-5522 (SK-NET FDDI-UP DAS)",
-"		1148 5541  FDDI SK-5541 (SK-NET FDDI-FP)",
-"		1148 5543  FDDI SK-5543 (SK-NET FDDI-LP)",
-"		1148 5544  FDDI SK-5544 (SK-NET FDDI-LP DAS)",
-"		1148 5821  FDDI SK-5821 (SK-NET FDDI-UP64)",
-"		1148 5822  FDDI SK-5822 (SK-NET FDDI-UP64 DAS)",
-"		1148 5841  FDDI SK-5841 (SK-NET FDDI-FP64)",
-"		1148 5843  FDDI SK-5843 (SK-NET FDDI-LP64)",
-"		1148 5844  FDDI SK-5844 (SK-NET FDDI-LP64 DAS)",
-"	4200  Token Ring adapter",
-"	4300  SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)",
-"		1148 9821  SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T)",
-"		1148 9822  SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link)",
-"		1148 9841  SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX)",
-"		1148 9842  SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link)",
-"		1148 9843  SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX)",
-"		1148 9844  SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link)",
-"		1148 9861  SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition)",
-"		1148 9862  SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link)",
-"		1148 9871  SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX)",
-"		1148 9872  SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)",
-"		1259 2970  AT-2970SX Gigabit Ethernet Adapter",
-"		1259 2971  AT-2970LX Gigabit Ethernet Adapter",
-"		1259 2972  AT-2970TX Gigabit Ethernet Adapter",
-"		1259 2973  AT-2971SX Gigabit Ethernet Adapter",
-"		1259 2974  AT-2971T Gigabit Ethernet Adapter",
-"		1259 2975  AT-2970SX/2SC Gigabit Ethernet Adapter",
-"		1259 2976  AT-2970LX/2SC Gigabit Ethernet Adapter",
-"		1259 2977  AT-2970TX/2TX Gigabit Ethernet Adapter",
-"	4320  SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter, PCI64, Fiber ZX/SC",
-"		1148 0121  Marvell RDK-8001 Adapter",
-"		1148 0221  Marvell RDK-8002 Adapter",
-"		1148 0321  Marvell RDK-8003 Adapter",
-"		1148 0421  Marvell RDK-8004 Adapter",
-"		1148 0621  Marvell RDK-8006 Adapter",
-"		1148 0721  Marvell RDK-8007 Adapter",
-"		1148 0821  Marvell RDK-8008 Adapter",
-"		1148 0921  Marvell RDK-8009 Adapter",
-"		1148 1121  Marvell RDK-8011 Adapter",
-"		1148 1221  Marvell RDK-8012 Adapter",
-"		1148 3221  SK-9521 V2.0 10/100/1000Base-T Adapter",
-"		1148 5021  SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter",
-"		1148 5041  SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter",
-"		1148 5043  SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
-"		1148 5051  SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
-"		1148 5061  SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
-"		1148 5071  SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter",
-"		1148 9521  SK-9521 10/100/1000Base-T Adapter",
-"	4400  SK-9Dxx Gigabit Ethernet Adapter",
-"	4500  SK-9Mxx Gigabit Ethernet Adapter",
-"	9000  SK-9S21 10/100/1000Base-T Server Adapter, PCI-X, Copper RJ-45",
-"	9843  [Fujitsu] Gigabit Ethernet",
-"	9e00  SK-9E21D 10/100/1000Base-T Adapter, Copper RJ-45",
-"		1148 2100  SK-9E21 Server Adapter",
-"		1148 21d0  SK-9E21D 10/100/1000Base-T Adapter",
-"		1148 2200  SK-9E22 Server Adapter",
-"		1148 8100  SK-9E81 Server Adapter",
-"		1148 8200  SK-9E82 Server Adapter",
-"		1148 9100  SK-9E91 Server Adapter",
-"		1148 9200  SK-9E92 Server Adapter",
-"1149  Win System Corporation",
-"114a  VMIC",
-"	5579  VMIPCI-5579 (Reflective Memory Card)",
-"	5587  VMIPCI-5587 (Reflective Memory Card)",
-"	6504  VMIC PCI 7755 FPGA",
-"	7587  VMIVME-7587",
-"114b  Canopus Co., Ltd",
-"114c  Annabooks",
-"114d  IC Corporation",
-"114e  Nikon Systems Inc",
-"114f  Digi International",
-"	0002  AccelePort EPC",
-"	0003  RightSwitch SE-6",
-"	0004  AccelePort Xem",
-"	0005  AccelePort Xr",
-"	0006  AccelePort Xr,C/X",
-"	0009  AccelePort Xr/J",
-"	000a  AccelePort EPC/J",
-"	000c  DataFirePRIme T1 (1-port)",
-"	000d  SyncPort 2-Port (x.25/FR)",
-"	0011  AccelePort 8r EIA-232 (IBM)",
-"	0012  AccelePort 8r EIA-422",
-"	0014  AccelePort 8r EIA-422",
-"	0015  AccelePort Xem",
-"	0016  AccelePort EPC/X",
-"	0017  AccelePort C/X",
-"	001a  DataFirePRIme E1 (1-port)",
-"	001b  AccelePort C/X (IBM)",
-"	001d  DataFire RAS T1/E1/PRI",
-"		114f 0050  DataFire RAS E1 Adapter",
-"		114f 0051  DataFire RAS Dual E1 Adapter",
-"		114f 0052  DataFire RAS T1 Adapter",
-"		114f 0053  DataFire RAS Dual T1 Adapter",
-"	0023  AccelePort RAS",
-"	0024  DataFire RAS B4 ST/U",
-"		114f 0030  DataFire RAS BRI U Adapter",
-"		114f 0031  DataFire RAS BRI S/T Adapter",
-"	0026  AccelePort 4r 920",
-"	0027  AccelePort Xr 920",
-"	0028  ClassicBoard 4",
-"	0029  ClassicBoard 8",
-"	0034  AccelePort 2r 920",
-"	0035  DataFire DSP T1/E1/PRI cPCI",
-"	0040  AccelePort Xp",
-"	0042  AccelePort 2p",
-"	0043  AccelePort 4p",
-"	0044  AccelePort 8p",
-"	0045  AccelePort 16p",
-"	004e  AccelePort 32p",
-"	0070  Datafire Micro V IOM2 (Europe)",
-"	0071  Datafire Micro V (Europe)",
-"	0072  Datafire Micro V IOM2 (North America)",
-"	0073  Datafire Micro V (North America)",
-"	00b0  Digi Neo 4",
-"	00b1  Digi Neo 8",
-"	00c8  Digi Neo 2 DB9",
-"	00c9  Digi Neo 2 DB9 PRI",
-"	00ca  Digi Neo 2 RJ45",
-"	00cb  Digi Neo 2 RJ45 PRI",
-"	00d0  ClassicBoard 4 422",
-"	00d1  ClassicBoard 8 422",
-"	6001  Avanstar",
-"1150  Thinking Machines Corp",
-"1151  JAE Electronics Inc.",
-"1152  Megatek",
-"1153  Land Win Electronic Corp",
-"1154  Melco Inc",
-"1155  Pine Technology Ltd",
-"1156  Periscope Engineering",
-"1157  Avsys Corporation",
-"1158  Voarx R & D Inc",
-"	3011  Tokenet/vg 1001/10m anylan",
-"	9050  Lanfleet/Truevalue",
-"	9051  Lanfleet/Truevalue",
-"1159  Mutech Corp",
-"	0001  MV-1000",
-"115a  Harlequin Ltd",
-"115b  Parallax Graphics",
-"115c  Photron Ltd.",
-"115d  Xircom",
-"	0003  Cardbus Ethernet 10/100",
-"		1014 0181  10/100 EtherJet Cardbus Adapter",
-"		1014 1181  10/100 EtherJet Cardbus Adapter",
-"		1014 8181  10/100 EtherJet Cardbus Adapter",
-"		1014 9181  10/100 EtherJet Cardbus Adapter",
-"		115d 0181  Cardbus Ethernet 10/100",
-"		115d 0182  RealPort2 CardBus Ethernet 10/100 (R2BE-100)",
-"		115d 1181  Cardbus Ethernet 10/100",
-"		1179 0181  Cardbus Ethernet 10/100",
-"		8086 8181  EtherExpress PRO/100 Mobile CardBus 32 Adapter",
-"		8086 9181  EtherExpress PRO/100 Mobile CardBus 32 Adapter",
-"	0005  Cardbus Ethernet 10/100",
-"		1014 0182  10/100 EtherJet Cardbus Adapter",
-"		1014 1182  10/100 EtherJet Cardbus Adapter",
-"		115d 0182  Cardbus Ethernet 10/100",
-"		115d 1182  Cardbus Ethernet 10/100",
-"	0007  Cardbus Ethernet 10/100",
-"		1014 0182  10/100 EtherJet Cardbus Adapter",
-"		1014 1182  10/100 EtherJet Cardbus Adapter",
-"		115d 0182  Cardbus Ethernet 10/100",
-"		115d 1182  Cardbus Ethernet 10/100",
-"	000b  Cardbus Ethernet 10/100",
-"		1014 0183  10/100 EtherJet Cardbus Adapter",
-"		115d 0183  Cardbus Ethernet 10/100",
-"	000c  Mini-PCI V.90 56k Modem",
-"	000f  Cardbus Ethernet 10/100",
-"		1014 0183  10/100 EtherJet Cardbus Adapter",
-"		115d 0183  Cardbus Ethernet 10/100",
-"	00d4  Mini-PCI K56Flex Modem",
-"	0101  Cardbus 56k modem",
-"		115d 1081  Cardbus 56k Modem",
-"	0103  Cardbus Ethernet + 56k Modem",
-"		1014 9181  Cardbus 56k Modem",
-"		1115 1181  Cardbus Ethernet 100 + 56k Modem",
-"		115d 1181  CBEM56G-100 Ethernet + 56k Modem",
-"		8086 9181  PRO/100 LAN + Modem56 CardBus",
-"115e  Peer Protocols Inc",
-"115f  Maxtor Corporation",
-"1160  Megasoft Inc",
-"1161  PFU Limited",
-"1162  OA Laboratory Co Ltd",
-"1163  Rendition",
-"	0001  Verite 1000",
-"	2000  Verite V2000/V2100/V2200",
-"		1092 2000  Stealth II S220",
-"1164  Advanced Peripherals Technologies",
-"1165  Imagraph Corporation",
-"	0001  Motion TPEG Recorder/Player with audio",
-"1166  Broadcom",
-"	0000  CMIC-LE",
-"	0005  CNB20-LE Host Bridge",
-"	0006  CNB20HE Host Bridge",
-"	0007  CNB20-LE Host Bridge",
-"	0008  CNB20HE Host Bridge",
-"	0009  CNB20LE Host Bridge",
-"	0010  CIOB30",
-"	0011  CMIC-HE",
-"	0012  CMIC-WS Host Bridge (GC-LE chipset)",
-"	0013  CNB20-HE Host Bridge",
-"	0014  CMIC-LE Host Bridge (GC-LE chipset)",
-"	0015  CMIC-GC Host Bridge",
-"	0016  CMIC-GC Host Bridge",
-"	0017  GCNB-LE Host Bridge",
-"	0036  HT1000 PCI/PCI-X bridge",
-"	0101  CIOB-X2 PCI-X I/O Bridge",
-"	0104  HT1000 PCI/PCI-X bridge",
-"	0110  CIOB-E I/O Bridge with Gigabit Ethernet",
-"	0130  HT1000 PCI-X bridge",
-"	0132  HT1000 PCI-Express bridge",
-"	0200  OSB4 South Bridge",
-"	0201  CSB5 South Bridge",
-"		4c53 1080  CT8 mainboard",
-"	0203  CSB6 South Bridge",
-"		1734 1012  Primergy RX300",
-"	0205  HT1000 Legacy South Bridge",
-"	0211  OSB4 IDE Controller",
-"	0212  CSB5 IDE Controller",
-"		4c53 1080  CT8 mainboard",
-"	0213  CSB6 RAID/IDE Controller",
-"		1028 c134  Poweredge SC600",
-"		1734 1012  Primergy RX300",
-"	0214  HT1000 Legacy IDE controller",
-"	0217  CSB6 IDE Controller",
-"		1028 4134  Poweredge SC600",
-"	0220  OSB4/CSB5 OHCI USB Controller",
-"		4c53 1080  CT8 mainboard",
-"	0221  CSB6 OHCI USB Controller",
-"		1734 1012  Primergy RX300",
-"	0223  HT1000 USB Controller",
-"	0225  CSB5 LPC bridge",
-"	0227  GCLE-2 Host Bridge",
-"		1734 1012  Primergy RX300",
-"	0230  CSB5 LPC bridge",
-"		4c53 1080  CT8 mainboard",
-"	0234  HT1000 LPC Bridge",
-"	0240  K2 SATA",
-"	0241  RAIDCore RC4000",
-"	0242  RAIDCore BC4000",
-"	024a  BCM5785 (HT1000) SATA Native SATA Mode",
-"	024b  BCM5785 (HT1000) PATA/IDE Mode",
-"1167  Mutoh Industries Inc",
-"1168  Thine Electronics Inc",
-"1169  Centre for Development of Advanced Computing",
-"116a  Polaris Communications",
-"	6100  Bus/Tag Channel",
-"	6800  Escon Channel",
-"	7100  Bus/Tag Channel",
-"	7800  Escon Channel",
-"116b  Connectware Inc",
-"116c  Intelligent Resources Integrated Systems",
-"116d  Martin-Marietta",
-"116e  Electronics for Imaging",
-"116f  Workstation Technology",
-"1170  Inventec Corporation",
-"1171  Loughborough Sound Images Plc",
-"1172  Altera Corporation",
-"1173  Adobe Systems, Inc",
-"1174  Bridgeport Machines",
-"1175  Mitron Computer Inc.",
-"1176  SBE Incorporated",
-"1177  Silicon Engineering",
-"1178  Alfa, Inc.",
-"	afa1  Fast Ethernet Adapter",
-"1179  Toshiba America Info Systems",
-"	0102  Extended IDE Controller",
-"	0103  EX-IDE Type-B",
-"	0404  DVD Decoder card",
-"	0406  Tecra Video Capture device",
-"	0407  DVD Decoder card (Version 2)",
-"	0601  CPU to PCI bridge",
-"		1179 0001  Satellite Pro",
-"	0603  ToPIC95 PCI to CardBus Bridge for Notebooks",
-"	060a  ToPIC95",
-"		1179 0001  Satellite Pro",
-"	060f  ToPIC97",
-"	0617  ToPIC100 PCI to Cardbus Bridge with ZV Support",
-"	0618  CPU to PCI and PCI to ISA bridge",
-"	0701  FIR Port",
-"	0804  TC6371AF SmartMedia Controller",
-"	0805  SD TypA Controller",
-"	0d01  FIR Port Type-DO",
-"		1179 0001  FIR Port Type-DO",
-"117a  A-Trend Technology",
-"117b  L G Electronics, Inc.",
-"117c  Atto Technology",
-"	0030  Ultra320 SCSI Host Adapter",
-"		117c 8013  ExpressPCI UL4D",
-"		117c 8014  ExpressPCI UL4S",
-"117d  Becton & Dickinson",
-"117e  T/R Systems",
-"117f  Integrated Circuit Systems",
-"1180  Ricoh Co Ltd",
-"	0465  RL5c465",
-"	0466  RL5c466",
-"	0475  RL5c475",
-"		144d c006  vpr Matrix 170B4 CardBus bridge",
-"	0476  RL5c476 II",
-"		1014 0185  ThinkPad A/T/X Series",
-"		1028 0188  Inspiron 6000 laptop",
-"		1043 1967  V6800V",
-"		1043 1987  Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines )",
-"		104d 80df  Vaio PCG-FX403",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		144d c00c  P35 notebook",
-"		14ef 0220  PCD-RP-220S",
-"		17aa 201c  Thinkpad X60s",
-"	0477  RL5c477",
-"	0478  RL5c478",
-"		1014 0184  ThinkPad A30p (2653-64G)",
-"	0511  R5C511",
-"	0522  R5C522 IEEE 1394 Controller",
-"		1014 01cf  ThinkPad A30p (2653-64G)",
-"		1043 1967  V6800V",
-"	0551  R5C551 IEEE 1394 Controller",
-"		144d c006  vpr Matrix 170B4",
-"	0552  R5C552 IEEE 1394 Controller",
-"		1014 0511  ThinkPad A/T/X Series",
-"		1028 0188  Inspiron 6000 laptop",
-"		144d c00c  P35 notebook",
-"		17aa 201e  Thinkpad X60s",
-"	0554  R5C554",
-"	0575  R5C575 SD Bus Host Adapter",
-"	0576  R5C576 SD Bus Host Adapter",
-"	0592  R5C592 Memory Stick Bus Host Adapter",
-"		1043 1967  V6800V",
-"		144d c018  X20 IV",
-"	0811  R5C811",
-"	0822  R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter",
-"		1014 0556  Thinkpad X40",
-"		1014 0598  Thinkpad Z60m",
-"		1028 0188  Inspiron 6000 laptop",
-"		1028 01a2  Inspiron 9200",
-"		1043 1967  ASUS V6800V",
-"		144d c018  X20 IV",
-"		17aa 201d  Thinkpad X60s",
-"	0841  R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394",
-"	0852  xD-Picture Card Controller",
-"		1043 1967  V6800V",
-"1181  Telmatics International",
-"1183  Fujikura Ltd",
-"1184  Forks Inc",
-"1185  Dataworld International Ltd",
-"1186  D-Link System Inc",
-"	0100  DC21041",
-"	1002  DL10050 Sundance Ethernet",
-"		1186 1002  DFE-550TX",
-"		1186 1012  DFE-580TX",
-"	1025  AirPlus Xtreme G DWL-G650 Adapter",
-"	1026  AirXpert DWL-AG650 Wireless Cardbus Adapter",
-"	1043  AirXpert DWL-AG650 Wireless Cardbus Adapter",
-"	1300  RTL8139 Ethernet",
-"		1186 1300  DFE-538TX 10/100 Ethernet Adapter",
-"		1186 1301  DFE-530TX+ 10/100 Ethernet Adapter",
-"		1186 1303  DFE-528TX 10/100 Fast Ethernet PCI Adapter",
-"	1340  DFE-690TXD CardBus PC Card",
-"	1541  DFE-680TXD CardBus PC Card",
-"	1561  DRP-32TXD Cardbus PC Card",
-"	2027  AirPlus Xtreme G DWL-G520 Adapter",
-"	3203  AirPlus Xtreme G DWL-G520 Adapter",
-"	3300  DWL-510 2.4GHz Wireless PCI Adapter",
-"	3a03  AirPro DWL-A650 Wireless Cardbus Adapter(rev.B)",
-"	3a04  AirPro DWL-AB650 Multimode Wireless Cardbus Adapter",
-"	3a05  AirPro DWL-AB520 Multimode Wireless PCI Adapter",
-"	3a07  AirXpert DWL-AG650 Wireless Cardbus Adapter",
-"	3a08  AirXpert DWL-AG520 Wireless PCI Adapter",
-"	3a10  AirXpert DWL-AG650 Wireless Cardbus Adapter(rev.B)",
-"	3a11  AirXpert DWL-AG520 Wireless PCI Adapter(rev.B)",
-"	3a12  AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C)",
-"	3a13  AirPlus DWL-G520 Wireless PCI Adapter(rev.B)",
-"	3a14  AirPremier DWL-AG530 Wireless PCI Adapter",
-"	3a63  AirXpert DWL-AG660 Wireless Cardbus Adapter",
-"	4000  DL2000-based Gigabit Ethernet",
-"	4300  DGE-528T Gigabit Ethernet Adapter",
-"	4b01  DGE-530T Gigabit Ethernet Adapter (rev 11)",
-"	4c00  Gigabit Ethernet Adapter",
-"		1186 4c00  DGE-530T Gigabit Ethernet Adapter",
-"	8400  D-Link DWL-650+ CardBus PC Card",
-"1187  Advanced Technology Laboratories, Inc.",
-"1188  Shima Seiki Manufacturing Ltd.",
-"1189  Matsushita Electronics Co Ltd",
-"118a  Hilevel Technology",
-"118b  Hypertec Pty Limited",
-"118c  Corollary, Inc",
-"	0014  PCIB [C-bus II to PCI bus host bridge chip]",
-"	1117  Intel 8-way XEON Profusion Chipset [Cache Coherency Filter]",
-"118d  BitFlow Inc",
-"	0001  Raptor-PCI framegrabber",
-"	0012  Model 12 Road Runner Frame Grabber",
-"	0014  Model 14 Road Runner Frame Grabber",
-"	0024  Model 24 Road Runner Frame Grabber",
-"	0044  Model 44 Road Runner Frame Grabber",
-"	0112  Model 12 Road Runner Frame Grabber",
-"	0114  Model 14 Road Runner Frame Grabber",
-"	0124  Model 24 Road Runner Frame Grabber",
-"	0144  Model 44 Road Runner Frame Grabber",
-"	0212  Model 12 Road Runner Frame Grabber",
-"	0214  Model 14 Road Runner Frame Grabber",
-"	0224  Model 24 Road Runner Frame Grabber",
-"	0244  Model 44 Road Runner Frame Grabber",
-"	0312  Model 12 Road Runner Frame Grabber",
-"	0314  Model 14 Road Runner Frame Grabber",
-"	0324  Model 24 Road Runner Frame Grabber",
-"	0344  Model 44 Road Runner Frame Grabber",
-"118e  Hermstedt GmbH",
-"118f  Green Logic",
-"1190  Tripace",
-"	c731  TP-910/920/940 PCI Ultra(Wide) SCSI Adapter",
-"1191  Artop Electronic Corp",
-"	0003  SCSI Cache Host Adapter",
-"	0004  ATP8400",
-"	0005  ATP850UF",
-"	0006  ATP860 NO-BIOS",
-"	0007  ATP860",
-"	0008  ATP865 NO-ROM",
-"	0009  ATP865",
-"	8002  AEC6710 SCSI-2 Host Adapter",
-"	8010  AEC6712UW SCSI",
-"	8020  AEC6712U SCSI",
-"	8030  AEC6712S SCSI",
-"	8040  AEC6712D SCSI",
-"	8050  AEC6712SUW SCSI",
-"	8060  AEC6712 SCSI",
-"	8080  AEC67160 SCSI",
-"	8081  AEC67160S SCSI",
-"	808a  AEC67162 2-ch. LVD SCSI",
-"1192  Densan Company Ltd",
-"1193  Zeitnet Inc.",
-"	0001  1221",
-"	0002  1225",
-"1194  Toucan Technology",
-"1195  Ratoc System Inc",
-"1196  Hytec Electronics Ltd",
-"1197  Gage Applied Sciences, Inc.",
-"	010c  CompuScope 82G 8bit 2GS/s Analog Input Card",
-"1198  Lambda Systems Inc",
-"1199  Attachmate Corporation",
-"119a  Mind Share, Inc.",
-"119b  Omega Micro Inc.",
-"	1221  82C092G",
-"119c  Information Technology Inst.",
-"119d  Bug, Inc. Sapporo Japan",
-"119e  Fujitsu Microelectronics Ltd.",
-"	0001  FireStream 155",
-"	0003  FireStream 50",
-"119f  Bull HN Information Systems",
-"11a0  Convex Computer Corporation",
-"11a1  Hamamatsu Photonics K.K.",
-"11a2  Sierra Research and Technology",
-"11a3  Deuretzbacher GmbH & Co. Eng. KG",
-"11a4  Barco Graphics NV",
-"11a5  Microunity Systems Eng. Inc",
-"11a6  Pure Data Ltd.",
-"11a7  Power Computing Corp.",
-"11a8  Systech Corp.",
-"11a9  InnoSys Inc.",
-"	4240  AMCC S933Q Intelligent Serial Card",
-"11aa  Actel",
-"11ab  Marvell Technology Group Ltd.",
-"	0146  GT-64010/64010A System Controller",
-"	138f  W8300 802.11 Adapter (rev 07)",
-"	1fa6  Marvell W8300 802.11 Adapter",
-"	1fa7  88W8310 and 88W8000G [Libertas] 802.11g client chipset",
-"	1faa  88w8335 [Libertas] 802.11b/g Wireless",
-"		1385 4e00  WG511 v2 54MBit/ Wireless PC-Card",
-"	4320  88E8001 Gigabit Ethernet Controller",
-"		1019 0f38  Marvell 88E8001 Gigabit Ethernet Controller (ECS)",
-"		1019 8001  Marvell 88E8001 Gigabit Ethernet Controller (ECS)",
-"		1043 173c  Marvell 88E8001 Gigabit Ethernet Controller (Asus)",
-"		1043 811a  Marvell 88E8001 Gigabit Ethernet Controller (Asus)",
-"		105b 0c19  Marvell 88E8001 Gigabit Ethernet Controller (Foxconn)",
-"		10b8 b452  EZ Card 1000 (SMC9452TXV.2)",
-"		11ab 0121  Marvell RDK-8001",
-"		11ab 0321  Marvell RDK-8003",
-"		11ab 1021  Marvell RDK-8010",
-"		11ab 4320  Marvell Yukon Gigabit Ethernet 10/100/1000Baset-T Constroller (Asus)",
-"		11ab 5021  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (64 bit)",
-"		11ab 9521  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (32 bit)",
-"		1458 e000  Marvell 88E8001 Gigabit Ethernet Controller (Gigabyte)",
-"		147b 1406  Marvell 88E8001 Gigabit Ethernet Controller (Abit)",
-"		15d4 0047  Marvell 88E8001 Gigabit Ethernet Controller (Iwill)",
-"		1695 9025  Marvell 88E8001 Gigabit Ethernet Controller (Epox)",
-"		17f2 1c03  Marvell 88E8001 Gigabit Ethernet Controller (Albatron)",
-"		270f 2803  Marvell 88E8001 Gigabit Ethernet Controller (Chaintech)",
-"	4340  88E8021 PCI-X IPMI Gigabit Ethernet Controller",
-"	4341  88E8022 PCI-X IPMI Gigabit Ethernet Controller",
-"	4342  88E8061 PCI-E IPMI Gigabit Ethernet Controller",
-"	4343  88E8062 PCI-E IPMI Gigabit Ethernet Controller",
-"	4344  88E8021 PCI-X IPMI Gigabit Ethernet Controller",
-"	4345  88E8022 PCI-X IPMI Gigabit Ethernet Controller",
-"	4346  88E8061 PCI-E IPMI Gigabit Ethernet Controller",
-"	4347  88E8062 PCI-E IPMI Gigabit Ethernet Controller",
-"	4350  88E8035 PCI-E Fast Ethernet Controller",
-"		1179 0001  Marvell 88E8035 Fast Ethernet Controller (Toshiba)",
-"		11ab 3521  Marvell RDK-8035",
-"		1854 000d  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 000e  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 000f  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0011  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0012  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0016  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0017  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0018  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0019  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 001c  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 001e  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0020  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"	4351  88E8036 PCI-E Fast Ethernet Controller",
-"		107b 4009  Marvell 88E8036 Fast Ethernet Controller (Wistron)",
-"		10f7 8338  Marvell 88E8036 Fast Ethernet Controller (Panasonic)",
-"		1179 0001  Marvell 88E8036 Fast Ethernet Controller (Toshiba)",
-"		1179 ff00  Marvell 88E8036 Fast Ethernet Controller (Compal)",
-"		1179 ff10  Marvell 88E8036 Fast Ethernet Controller (Inventec)",
-"		11ab 3621  Marvell RDK-8036",
-"		13d1 ac12  Abocom EFE3K - 10/100 Ethernet Expresscard",
-"		161f 203d  Marvell 88E8036 Fast Ethernet Controller (Arima)",
-"		1854 000d  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 000e  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 000f  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0011  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0012  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0016  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0017  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0018  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0019  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 001c  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 001e  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0020  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"	4352  88E8038 PCI-E Fast Ethernet Controller",
-"	4360  88E8052 PCI-E ASF Gigabit Ethernet Controller",
-"		1043 8134  Marvell 88E8052 Gigabit Ethernet Controller (Asus)",
-"		107b 4009  Marvell 88E8052 Gigabit Ethernet Controller (Wistron)",
-"		11ab 5221  Marvell RDK-8052",
-"		1458 e000  Marvell 88E8052 Gigabit Ethernet Controller (Gigabyte)",
-"		1462 052c  Marvell 88E8052 Gigabit Ethernet Controller (MSI)",
-"		1849 8052  Marvell 88E8052 Gigabit Ethernet Controller (ASRock)",
-"		a0a0 0509  Marvell 88E8052 Gigabit Ethernet Controller (Aopen)",
-"	4361  88E8050 PCI-E ASF Gigabit Ethernet Controller",
-"		107b 3015  Marvell 88E8050 Gigabit Ethernet Controller (Gateway)",
-"		11ab 5021  Marvell 88E8050 Gigabit Ethernet Controller (Intel)",
-"		8086 3063  D925XCVLK mainboard",
-"		8086 3439  Marvell 88E8050 Gigabit Ethernet Controller (Intel)",
-"	4362  88E8053 PCI-E Gigabit Ethernet Controller",
-"		103c 2a0d  Marvell 88E8053 Gigabit Ethernet Controller (Asus)",
-"		1043 8142  Marvell 88E8053 Gigabit Ethernet controller PCIe (Asus)",
-"		109f 3197  Marvell 88E8053 Gigabit Ethernet Controller (Trigem)",
-"		10f7 8338  Marvell 88E8053 Gigabit Ethernet Controller (Panasonic)",
-"		10fd a430  Marvell 88E8053 Gigabit Ethernet Controller (SOYO)",
-"		1179 0001  Marvell 88E8053 Gigabit Ethernet Controller (Toshiba)",
-"		1179 ff00  Marvell 88E8053 Gigabit Ethernet Controller (Compal)",
-"		1179 ff10  Marvell 88E8053 Gigabit Ethernet Controller (Inventec)",
-"		11ab 5321  Marvell RDK-8053",
-"		1297 c240  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c241  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c242  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c243  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c244  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		13d1 ac11  EGE5K - Giga Ethernet Expresscard",
-"		1458 e000  Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte)",
-"		1462 058c  Marvell 88E8053 Gigabit Ethernet Controller (MSI)",
-"		14c0 0012  Marvell 88E8053 Gigabit Ethernet Controller (Compal)",
-"		1558 04a0  Marvell 88E8053 Gigabit Ethernet Controller (Clevo)",
-"		15bd 1003  Marvell 88E8053 Gigabit Ethernet Controller (DFI)",
-"		161f 203c  Marvell 88E8053 Gigabit Ethernet Controller (Arima)",
-"		161f 203d  Marvell 88E8053 Gigabit Ethernet Controller (Arima)",
-"		1695 9029  Marvell 88E8053 Gigabit Ethernet Controller (Epox)",
-"		17f2 2c08  Marvell 88E8053 Gigabit Ethernet Controller (Albatron)",
-"		17ff 0585  Marvell 88E8053 Gigabit Ethernet Controller (Quanta)",
-"		1849 8053  Marvell 88E8053 Gigabit Ethernet Controller (ASRock)",
-"		1854 000b  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 000c  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0010  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0013  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0014  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0015  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001a  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001b  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001d  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001f  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0021  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0022  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		270f 2801  Marvell 88E8053 Gigabit Ethernet Controller (Chaintech)",
-"		a0a0 0506  Marvell 88E8053 Gigabit Ethernet Controller (Aopen)",
-"	4363  88E8055 PCI-E Gigabit Ethernet Controller",
-"	4611  GT-64115 System Controller",
-"	4620  GT-64120/64120A/64121A System Controller",
-"	4801  GT-48001",
-"	5005  Belkin F5D5005 Gigabit Desktop Network PCI Card",
-"	5040  MV88SX5040 4-port SATA I PCI-X Controller",
-"	5041  MV88SX5041 4-port SATA I PCI-X Controller",
-"	5080  MV88SX5080 8-port SATA I PCI-X Controller",
-"	5081  MV88SX5081 8-port SATA I PCI-X Controller",
-"	6041  MV88SX6041 4-port SATA II PCI-X Controller",
-"	6081  MV88SX6081 8-port SATA II PCI-X Controller",
-"	6460  MV64360/64361/64362 System Controller",
-"	6480  MV64460/64461/64462 System Controller",
-"	f003  GT-64010 Primary Image Piranha Image Generator",
-"11ac  Canon Information Systems Research Aust.",
-"11ad  Lite-On Communications Inc",
-"	0002  LNE100TX",
-"		11ad 0002  LNE100TX",
-"		11ad 0003  LNE100TX",
-"		11ad f003  LNE100TX",
-"		11ad ffff  LNE100TX",
-"		1385 f004  FA310TX",
-"	c115  LNE100TX [Linksys EtherFast 10/100]",
-"		11ad c001  LNE100TX [ver 2.0]",
-"11ae  Aztech System Ltd",
-"11af  Avid Technology Inc.",
-"	0001  Cinema",
-"	ee40  Digidesign Audiomedia III",
-"11b0  V3 Semiconductor Inc.",
-"	0002  V300PSC",
-"	0292  V292PBC [Am29030/40 Bridge]",
-"	0960  V96xPBC",
-"	c960  V96DPC",
-"11b1  Apricot Computers",
-"11b2  Eastman Kodak",
-"11b3  Barr Systems Inc.",
-"11b4  Leitch Technology International",
-"11b5  Radstone Technology Plc",
-"11b6  United Video Corp",
-"11b7  Motorola",
-"11b8  XPoint Technologies, Inc",
-"	0001  Quad PeerMaster",
-"11b9  Pathlight Technology Inc.",
-"	c0ed  SSA Controller",
-"11ba  Videotron Corp",
-"11bb  Pyramid Technology",
-"11bc  Network Peripherals Inc",
-"	0001  NP-PCI",
-"11bd  Pinnacle Systems Inc.",
-"	002e  PCTV 40i",
-"	bede  AV/DV Studio Capture Card",
-"11be  International Microcircuits Inc",
-"11bf  Astrodesign, Inc.",
-"11c0  Hewlett Packard",
-"11c1  Agere Systems",
-"	0440  56k WinModem",
-"		1033 8015  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		1033 8047  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		1033 804f  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		10cf 102c  LB LT Modem V.90 56k",
-"		10cf 104a  BIBLO LT Modem 56k",
-"		10cf 105f  LB2 LT Modem V.90 56k",
-"		1179 0001  Internal V.90 Modem",
-"		11c1 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		122d 4101  MDP7800-U Modem",
-"		122d 4102  MDP7800SP-U Modem",
-"		13e0 0040  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0441  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0450  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 f100  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 f101  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		144d 2101  LT56PV Modem",
-"		149f 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"	0441  56k WinModem",
-"		1033 804d  LT WinModem 56k Data+Fax",
-"		1033 8065  LT WinModem 56k Data+Fax",
-"		1092 0440  Supra 56i",
-"		1179 0001  Internal V.90 Modem",
-"		11c1 0440  LT WinModem 56k Data+Fax",
-"		11c1 0441  LT WinModem 56k Data+Fax",
-"		122d 4100  MDP7800-U Modem",
-"		13e0 0040  LT WinModem 56k Data+Fax",
-"		13e0 0100  LT WinModem 56k Data+Fax",
-"		13e0 0410  LT WinModem 56k Data+Fax",
-"		13e0 0420  TelePath Internet 56k WinModem",
-"		13e0 0440  LT WinModem 56k Data+Fax",
-"		13e0 0443  LT WinModem 56k Data+Fax",
-"		13e0 f102  LT WinModem 56k Data+Fax",
-"		1416 9804  CommWave 56k Modem",
-"		141d 0440  LT WinModem 56k Data+Fax",
-"		144f 0441  Lucent 56k V.90 DF Modem",
-"		144f 0449  Lucent 56k V.90 DF Modem",
-"		144f 110d  Lucent Win Modem",
-"		1468 0441  Presario 56k V.90 DF Modem",
-"		1668 0440  Lucent Win Modem",
-"	0442  56k WinModem",
-"		11c1 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		11c1 0442  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13e0 0412  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13e0 0442  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13fc 2471  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		144d 2104  LT56PT Modem",
-"		144f 1104  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		149f 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		1668 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"	0443  LT WinModem",
-"	0444  LT WinModem",
-"	0445  LT WinModem",
-"		8086 2203  PRO/100+ MiniPCI (probably an Ambit U98.003.C.00 combo card)",
-"		8086 2204  PRO/100+ MiniPCI on Armada E500",
-"	0446  LT WinModem",
-"	0447  LT WinModem",
-"	0448  WinModem 56k",
-"		1014 0131  Lucent Win Modem",
-"		1033 8066  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0030  56k Voice Modem",
-"		13e0 0040  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		1668 2400  LT WinModem 56k (MiniPCI Ethernet+Modem)",
-"	0449  WinModem 56k",
-"		0e11 b14d  56k V.90 Modem",
-"		13e0 0020  LT WinModem 56k Data+Fax",
-"		13e0 0041  TelePath Internet 56k WinModem",
-"		1436 0440  Lucent Win Modem",
-"		144f 0449  Lucent 56k V.90 DFi Modem",
-"		1468 0410  IBM ThinkPad T23 (2647-4MG)",
-"		1468 0440  Lucent Win Modem",
-"		1468 0449  Presario 56k V.90 DFi Modem",
-"	044a  F-1156IV WinModem (V90, 56KFlex)",
-"		10cf 1072  LB Global LT Modem",
-"		13e0 0012  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13e0 0042  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		144f 1005  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"	044b  LT WinModem",
-"	044c  LT WinModem",
-"	044d  LT WinModem",
-"	044e  LT WinModem",
-"	044f  V90 WildWire Modem",
-"	0450  LT WinModem",
-"		1033 80a8  Versa Note Vxi",
-"		144f 4005  Magnia SG20",
-"		1468 0450  Evo N600c",
-"		4005 144f  LifeBook C Series",
-"	0451  LT WinModem",
-"	0452  LT WinModem",
-"	0453  LT WinModem",
-"	0454  LT WinModem",
-"	0455  LT WinModem",
-"	0456  LT WinModem",
-"	0457  LT WinModem",
-"	0458  LT WinModem",
-"	0459  LT WinModem",
-"	045a  LT WinModem",
-"	045c  LT WinModem",
-"	0461  V90 WildWire Modem",
-"	0462  V90 WildWire Modem",
-"	0480  Venus Modem (V90, 56KFlex)",
-"	048c  V.92 56K WinModem",
-"	048f  V.92 56k WinModem",
-"	5801  USB",
-"	5802  USS-312 USB Controller",
-"	5803  USS-344S USB Controller",
-"	5811  FW323",
-"		8086 524c  D865PERL mainboard",
-"		dead 0800  FireWire Host Bus Adapter",
-"	8110  T8110 H.100/H.110 TDM switch",
-"		12d9 000c  E1/T1 PMXc cPCI carrier card",
-"	ab10  WL60010 Wireless LAN MAC",
-"	ab11  WL60040 Multimode Wireles LAN MAC",
-"		11c1 ab12  WaveLAN 11abg Cardbus card (Model 1102)",
-"		11c1 ab13  WaveLAN 11abg MiniPCI card (Model 0512)",
-"		11c1 ab15  WaveLAN 11abg Cardbus card (Model 1106)",
-"		11c1 ab16  WaveLAN 11abg MiniPCI card (Model 0516)",
-"	ab20  ORiNOCO PCI Adapter",
-"	ab21  Agere Wireless PCI Adapter",
-"	ab30  Hermes2 Mini-PCI WaveLAN a/b/g",
-"		14cd 2012  Hermes2 Mini-PCI WaveLAN a/b/g",
-"	ed00  ET-131x PCI-E Ethernet Controller",
-"11c2  Sand Microelectronics",
-"11c3  NEC Corporation",
-"11c4  Document Technologies, Inc",
-"11c5  Shiva Corporation",
-"11c6  Dainippon Screen Mfg. Co. Ltd",
-"11c7  D.C.M. Data Systems",
-"11c8  Dolphin Interconnect Solutions AS",
-"	0658  PSB32 SCI-Adapter D31x",
-"	d665  PSB64 SCI-Adapter D32x",
-"	d667  PSB66 SCI-Adapter D33x",
-"11c9  Magma",
-"	0010  16-line serial port w/- DMA",
-"	0011  4-line serial port w/- DMA",
-"11ca  LSI Systems, Inc",
-"11cb  Specialix Research Ltd.",
-"	2000  PCI_9050",
-"		11cb 0200  SX",
-"		11cb b008  I/O8+",
-"	4000  SUPI_1",
-"	8000  T225",
-"11cc  Michels & Kleberhoff Computer GmbH",
-"11cd  HAL Computer Systems, Inc.",
-"11ce  Netaccess",
-"11cf  Pioneer Electronic Corporation",
-"11d0  Lockheed Martin Federal Systems-Manassas",
-"11d1  Auravision",
-"	01f7  VxP524",
-"11d2  Intercom Inc.",
-"11d3  Trancell Systems Inc",
-"11d4  Analog Devices",
-"	1535  Blackfin BF535 processor",
-"	1805  SM56 PCI modem",
-"	1889  AD1889 sound chip",
-"	1986  AD1986A sound chip",
-"	5340  AD1881 sound chip",
-"11d5  Ikon Corporation",
-"	0115  10115",
-"	0117  10117",
-"11d6  Tekelec Telecom",
-"11d7  Trenton Technology, Inc.",
-"11d8  Image Technologies Development",
-"11d9  TEC Corporation",
-"11da  Novell",
-"11db  Sega Enterprises Ltd",
-"11dc  Questra Corporation",
-"11dd  Crosfield Electronics Limited",
-"11de  Zoran Corporation",
-"	6057  ZR36057PQC Video cutting chipset",
-"		1031 7efe  DC10 Plus",
-"		1031 fc00  MiroVIDEO DC50, Motion JPEG Capture/CODEC Board",
-"		12f8 8a02  Tekram Video Kit",
-"		13ca 4231  JPEG/TV Card",
-"	6120  ZR36120",
-"		1328 f001  Cinemaster C DVD Decoder",
-"		13c2 0000  MediaFocus Satellite TV Card",
-"		1de1 9fff  Video Kit C210",
-"11df  New Wave PDG",
-"11e0  Cray Communications A/S",
-"11e1  GEC Plessey Semi Inc.",
-"11e2  Samsung Information Systems America",
-"11e3  Quicklogic Corporation",
-"	0001  COM-ON-AIR Dosch&Amand DECT",
-"	5030  PC Watchdog",
-"11e4  Second Wave Inc",
-"11e5  IIX Consulting",
-"11e6  Mitsui-Zosen System Research",
-"11e7  Toshiba America, Elec. Company",
-"11e8  Digital Processing Systems Inc.",
-"11e9  Highwater Designs Ltd.",
-"11ea  Elsag Bailey",
-"11eb  Formation Inc.",
-"11ec  Coreco Inc",
-"11ed  Mediamatics",
-"11ee  Dome Imaging Systems Inc",
-"11ef  Nicolet Technologies B.V.",
-"11f0  Compu-Shack",
-"	4231  FDDI",
-"	4232  FASTline UTP Quattro",
-"	4233  FASTline FO",
-"	4234  FASTline UTP",
-"	4235  FASTline-II UTP",
-"	4236  FASTline-II FO",
-"	4731  GIGAline",
-"11f1  Symbios Logic Inc",
-"11f2  Picture Tel Japan K.K.",
-"11f3  Keithley Metrabyte",
-"11f4  Kinetic Systems Corporation",
-"	2915  CAMAC controller",
-"11f5  Computing Devices International",
-"11f6  Compex",
-"	0112  ENet100VG4",
-"	0113  FreedomLine 100",
-"	1401  ReadyLink 2000",
-"	2011  RL100-ATX 10/100",
-"		11f6 2011  RL100-ATX",
-"	2201  ReadyLink 100TX (Winbond W89C840)",
-"		11f6 2011  ReadyLink 100TX",
-"	9881  RL100TX Fast Ethernet",
-"11f7  Scientific Atlanta",
-"11f8  PMC-Sierra Inc.",
-"	7375  PM7375 [LASAR-155 ATM SAR]",
-"11f9  I-Cube Inc",
-"11fa  Kasan Electronics Company, Ltd.",
-"11fb  Datel Inc",
-"11fc  Silicon Magic",
-"11fd  High Street Consultants",
-"11fe  Comtrol Corporation",
-"	0001  RocketPort 32 port w/external I/F",
-"	0002  RocketPort 8 port w/external I/F",
-"	0003  RocketPort 16 port w/external I/F",
-"	0004  RocketPort 4 port w/quad cable",
-"	0005  RocketPort 8 port w/octa cable",
-"	0006  RocketPort 8 port w/RJ11 connectors",
-"	0007  RocketPort 4 port w/RJ11 connectors",
-"	0008  RocketPort 8 port w/ DB78 SNI (Siemens) connector",
-"	0009  RocketPort 16 port w/ DB78 SNI (Siemens) connector",
-"	000a  RocketPort Plus 4 port",
-"	000b  RocketPort Plus 8 port",
-"	000c  RocketModem 6 port",
-"	000d  RocketModem 4-port",
-"	000e  RocketPort Plus 2 port RS232",
-"	000f  RocketPort Plus 2 port RS422",
-"	0801  RocketPort UPCI 32 port w/external I/F",
-"	0802  RocketPort UPCI 8 port w/external I/F",
-"	0803  RocketPort UPCI 16 port w/external I/F",
-"	0805  RocketPort UPCI 8 port w/octa cable",
-"	080c  RocketModem III 8 port",
-"	080d  RocketModem III 4 port",
-"	0812  RocketPort UPCI Plus 8 port RS422",
-"	0903  RocketPort Compact PCI 16 port w/external I/F",
-"	8015  RocketPort 4-port UART 16954",
-"11ff  Scion Corporation",
-"	0003  AG-5",
-"1200  CSS Corporation",
-"1201  Vista Controls Corp",
-"1202  Network General Corp.",
-"	4300  Gigabit Ethernet Adapter",
-"		1202 9841  SK-9841 LX",
-"		1202 9842  SK-9841 LX dual link",
-"		1202 9843  SK-9843 SX",
-"		1202 9844  SK-9843 SX dual link",
-"1203  Bayer Corporation, Agfa Division",
-"1204  Lattice Semiconductor Corporation",
-"1205  Array Corporation",
-"1206  Amdahl Corporation",
-"1208  Parsytec GmbH",
-"	4853  HS-Link Device",
-"1209  SCI Systems Inc",
-"120a  Synaptel",
-"120b  Adaptive Solutions",
-"120c  Technical Corp.",
-"120d  Compression Labs, Inc.",
-"120e  Cyclades Corporation",
-"	0100  Cyclom-Y below first megabyte",
-"	0101  Cyclom-Y above first megabyte",
-"	0102  Cyclom-4Y below first megabyte",
-"	0103  Cyclom-4Y above first megabyte",
-"	0104  Cyclom-8Y below first megabyte",
-"	0105  Cyclom-8Y above first megabyte",
-"	0200  Cyclades-Z below first megabyte",
-"	0201  Cyclades-Z above first megabyte",
-"	0300  PC300/RSV or /X21 (2 ports)",
-"	0301  PC300/RSV or /X21 (1 port)",
-"	0310  PC300/TE (2 ports)",
-"	0311  PC300/TE (1 port)",
-"	0320  PC300/TE-M (2 ports)",
-"	0321  PC300/TE-M (1 port)",
-"	0400  PC400",
-"120f  Essential Communications",
-"	0001  Roadrunner serial HIPPI",
-"1210  Hyperparallel Technologies",
-"1211  Braintech Inc",
-"1212  Kingston Technology Corp.",
-"1213  Applied Intelligent Systems, Inc.",
-"1214  Performance Technologies, Inc.",
-"1215  Interware Co., Ltd",
-"1216  Purup Prepress A/S",
-"1217  O2 Micro, Inc.",
-"	6729  OZ6729",
-"	673a  OZ6730",
-"	6832  OZ6832/6833 CardBus Controller",
-"	6836  OZ6836/6860 CardBus Controller",
-"	6872  OZ6812 CardBus Controller",
-"	6925  OZ6922 CardBus Controller",
-"	6933  OZ6933/711E1 CardBus/SmartCardBus Controller",
-"		1025 1016  Travelmate 612 TX",
-"	6972  OZ601/6912/711E0 CardBus/SmartCardBus Controller",
-"		1014 020c  ThinkPad R30",
-"		1179 0001  Magnia Z310",
-"	7110  OZ711Mx 4-in-1 MemoryCardBus Accelerator",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1734 106c  Amilo A1645",
-"	7112  OZ711EC1/M1 SmartCardBus/MemoryCardBus Controller",
-"	7113  OZ711EC1 SmartCardBus Controller",
-"	7114  OZ711M1/MC1 4-in-1 MemoryCardBus Controller",
-"	7134  OZ711MP1/MS1 MemoryCardBus Controller",
-"	71e2  OZ711E2 SmartCardBus Controller",
-"	7212  OZ711M2 4-in-1 MemoryCardBus Controller",
-"	7213  OZ6933E CardBus Controller",
-"	7223  OZ711M3/MC3 4-in-1 MemoryCardBus Controller",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"	7233  OZ711MP3/MS3 4-in-1 MemoryCardBus Controller",
-"1218  Hybricon Corp.",
-"1219  First Virtual Corporation",
-"121a  3Dfx Interactive, Inc.",
-"	0001  Voodoo",
-"	0002  Voodoo 2",
-"	0003  Voodoo Banshee",
-"		1092 0003  Monster Fusion",
-"		1092 4000  Monster Fusion",
-"		1092 4002  Monster Fusion",
-"		1092 4801  Monster Fusion AGP",
-"		1092 4803  Monster Fusion AGP",
-"		1092 8030  Monster Fusion",
-"		1092 8035  Monster Fusion AGP",
-"		10b0 0001  Dragon 4000",
-"		1102 1018  3D Blaster Banshee VE",
-"		121a 0001  Voodoo Banshee AGP",
-"		121a 0003  Voodoo Banshee AGP SGRAM",
-"		121a 0004  Voodoo Banshee",
-"		139c 0016  Raven",
-"		139c 0017  Raven",
-"		14af 0002  Maxi Gamer Phoenix",
-"	0004  Voodoo Banshee [Velocity 100]",
-"	0005  Voodoo 3",
-"		121a 0004  Voodoo3 AGP",
-"		121a 0030  Voodoo3 AGP",
-"		121a 0031  Voodoo3 AGP",
-"		121a 0034  Voodoo3 AGP",
-"		121a 0036  Voodoo3 2000 PCI",
-"		121a 0037  Voodoo3 AGP",
-"		121a 0038  Voodoo3 AGP",
-"		121a 003a  Voodoo3 AGP",
-"		121a 0044  Voodoo3",
-"		121a 004b  Velocity 100",
-"		121a 004c  Velocity 200",
-"		121a 004d  Voodoo3 AGP",
-"		121a 004e  Voodoo3 AGP",
-"		121a 0051  Voodoo3 AGP",
-"		121a 0052  Voodoo3 AGP",
-"		121a 0057  Voodoo3 3000 PCI",
-"		121a 0060  Voodoo3 3500 TV (NTSC)",
-"		121a 0061  Voodoo3 3500 TV (PAL)",
-"		121a 0062  Voodoo3 3500 TV (SECAM)",
-"	0009  Voodoo 4 / Voodoo 5",
-"		121a 0003  Voodoo5 PCI 5500",
-"		121a 0009  Voodoo5 AGP 5500/6000",
-"	0057  Voodoo 3/3000 [Avenger]",
-"121b  Advanced Telecommunications Modules",
-"121c  Nippon Texaco., Ltd",
-"121d  Lippert Automationstechnik GmbH",
-"121e  CSPI",
-"	0201  Myrinet 2000 Scalable Cluster Interconnect",
-"121f  Arcus Technology, Inc.",
-"1220  Ariel Corporation",
-"	1220  AMCC 5933 TMS320C80 DSP/Imaging board",
-"1221  Contec Co., Ltd",
-"1222  Ancor Communications, Inc.",
-"1223  Artesyn Communication Products",
-"	0003  PM/Link",
-"	0004  PM/T1",
-"	0005  PM/E1",
-"	0008  PM/SLS",
-"	0009  BajaSpan Resource Target",
-"	000a  BajaSpan Section 0",
-"	000b  BajaSpan Section 1",
-"	000c  BajaSpan Section 2",
-"	000d  BajaSpan Section 3",
-"	000e  PM/PPC",
-"1224  Interactive Images",
-"1225  Power I/O, Inc.",
-"1227  Tech-Source",
-"	0006  Raptor GFX 8P",
-"	0023  Raptor GFX [1100T]",
-"1228  Norsk Elektro Optikk A/S",
-"1229  Data Kinesis Inc.",
-"122a  Integrated Telecom",
-"122b  LG Industrial Systems Co., Ltd",
-"122c  Sican GmbH",
-"122d  Aztech System Ltd",
-"	1206  368DSP",
-"	1400  Trident PCI288-Q3DII (NX)",
-"	50dc  3328 Audio",
-"		122d 0001  3328 Audio",
-"	80da  3328 Audio",
-"		122d 0001  3328 Audio",
-"122e  Xyratex",
-"122f  Andrew Corporation",
-"1230  Fishcamp Engineering",
-"1231  Woodward McCoach, Inc.",
-"1232  GPT Limited",
-"1233  Bus-Tech, Inc.",
-"1234  Technical Corp.",
-"1235  Risq Modular Systems, Inc.",
-"1236  Sigma Designs Corporation",
-"	0000  RealMagic64/GX",
-"	6401  REALmagic 64/GX (SD 6425)",
-"1237  Alta Technology Corporation",
-"1238  Adtran",
-"1239  3DO Company",
-"123a  Visicom Laboratories, Inc.",
-"123b  Seeq Technology, Inc.",
-"123c  Century Systems, Inc.",
-"123d  Engineering Design Team, Inc.",
-"	0000  EasyConnect 8/32",
-"	0002  EasyConnect 8/64",
-"	0003  EasyIO",
-"123e  Simutech, Inc.",
-"123f  C-Cube Microsystems",
-"	00e4  MPEG",
-"	8120  E4\?",
-"		11bd 0006  DV500 E4",
-"		11bd 000a  DV500 E4",
-"		11bd 000f  DV500 E4",
-"		1809 0016  Emuzed MAUI-III PCI PVR FM TV",
-"	8888  Cinemaster C 3.0 DVD Decoder",
-"		1002 0001  Cinemaster C 3.0 DVD Decoder",
-"		1002 0002  Cinemaster C 3.0 DVD Decoder",
-"		1328 0001  Cinemaster C 3.0 DVD Decoder",
-"1240  Marathon Technologies Corp.",
-"1241  DSC Communications",
-"1242  JNI Corporation",
-"	1560  JNIC-1560 PCI-X Fibre Channel Controller",
-"		1242 6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter",
-"		1242 656a  FCX-6562 PCI-X Fibre Channel Adapter",
-"	4643  FCI-1063 Fibre Channel Adapter",
-"	6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter",
-"	656a  FCX-6562 PCI-X Fibre Channel Adapter",
-"1243  Delphax",
-"1244  AVM Audiovisuelles MKTG & Computer System GmbH",
-"	0700  B1 ISDN",
-"	0800  C4 ISDN",
-"	0a00  A1 ISDN [Fritz]",
-"		1244 0a00  FRITZ!Card ISDN Controller",
-"	0e00  Fritz!PCI v2.0 ISDN",
-"	1100  C2 ISDN",
-"	1200  T1 ISDN",
-"	2700  Fritz!Card DSL SL",
-"	2900  Fritz!Card DSL v2.0",
-"1245  A.P.D., S.A.",
-"1246  Dipix Technologies, Inc.",
-"1247  Xylon Research, Inc.",
-"1248  Central Data Corporation",
-"1249  Samsung Electronics Co., Ltd.",
-"124a  AEG Electrocom GmbH",
-"124b  SBS/Greenspring Modular I/O",
-"	0040  PCI-40A or cPCI-200 Quad IndustryPack carrier",
-"		124b 9080  PCI9080 Bridge",
-"124c  Solitron Technologies, Inc.",
-"124d  Stallion Technologies, Inc.",
-"	0000  EasyConnection 8/32",
-"	0002  EasyConnection 8/64",
-"	0003  EasyIO",
-"	0004  EasyConnection/RA",
-"124e  Cylink",
-"124f  Infortrend Technology, Inc.",
-"	0041  IFT-2000 Series RAID Controller",
-"1250  Hitachi Microcomputer System Ltd",
-"1251  VLSI Solutions Oy",
-"1253  Guzik Technical Enterprises",
-"1254  Linear Systems Ltd.",
-"1255  Optibase Ltd",
-"	1110  MPEG Forge",
-"	1210  MPEG Fusion",
-"	2110  VideoPlex",
-"	2120  VideoPlex CC",
-"	2130  VideoQuest",
-"1256  Perceptive Solutions, Inc.",
-"	4201  PCI-2220I",
-"	4401  PCI-2240I",
-"	5201  PCI-2000",
-"1257  Vertex Networks, Inc.",
-"1258  Gilbarco, Inc.",
-"1259  Allied Telesyn International",
-"	2560  AT-2560 Fast Ethernet Adapter (i82557B)",
-"	a117  RTL81xx Fast Ethernet",
-"	a120  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"125a  ABB Power Systems",
-"125b  Asix Electronics Corporation",
-"	1400  ALFA GFC2204 Fast Ethernet",
-"		1186 1100  AX8814X Based PCI Fast Ethernet Adapter",
-"125c  Aurora Technologies, Inc.",
-"	0101  Saturn 4520P",
-"	0640  Aries 16000P",
-"125d  ESS Technology",
-"	0000  ES336H Fax Modem (Early Model)",
-"	1948  Solo\?",
-"	1968  ES1968 Maestro 2",
-"		1028 0085  ES1968 Maestro-2 PCI",
-"		1033 8051  ES1968 Maestro-2 Audiodrive",
-"	1969  ES1969 Solo-1 Audiodrive",
-"		1014 0166  ES1969 SOLO-1 AudioDrive on IBM Aptiva Mainboard",
-"		125d 8888  Solo-1 Audio Adapter",
-"		153b 111b  Terratec 128i PCI",
-"	1978  ES1978 Maestro 2E",
-"		0e11 b112  Armada M700/E500",
-"		1033 803c  ES1978 Maestro-2E Audiodrive",
-"		1033 8058  ES1978 Maestro-2E Audiodrive",
-"		1092 4000  Monster Sound MX400",
-"		1179 0001  ES1978 Maestro-2E Audiodrive",
-"	1988  ES1988 Allegro-1",
-"		0e11 0098  Evo N600c",
-"		1092 4100  Sonic Impact S100",
-"		125d 1988  ESS Allegro-1 Audiodrive",
-"	1989  ESS Modem",
-"		125d 1989  ESS Modem",
-"	1998  ES1983S Maestro-3i PCI Audio Accelerator",
-"		1028 00b1  Latitude C600",
-"		1028 00e6  ES1983S Maestro-3i (Dell Inspiron 8100)",
-"	1999  ES1983S Maestro-3i PCI Modem Accelerator",
-"	199a  ES1983S Maestro-3i PCI Audio Accelerator",
-"	199b  ES1983S Maestro-3i PCI Modem Accelerator",
-"	2808  ES336H Fax Modem (Later Model)",
-"	2838  ES2838/2839 SuperLink Modem",
-"	2898  ES2898 Modem",
-"		125d 0424  ES56-PI Data Fax Modem",
-"		125d 0425  ES56T-PI Data Fax Modem",
-"		125d 0426  ES56V-PI Data Fax Modem",
-"		125d 0427  VW-PI Data Fax Modem",
-"		125d 0428  ES56ST-PI Data Fax Modem",
-"		125d 0429  ES56SV-PI Data Fax Modem",
-"		147a c001  ES56-PI Data Fax Modem",
-"		14fe 0428  ES56-PI Data Fax Modem",
-"		14fe 0429  ES56-PI Data Fax Modem",
-"125e  Specialvideo Engineering SRL",
-"125f  Concurrent Technologies, Inc.",
-"1260  Intersil Corporation",
-"	3872  Prism 2.5 Wavelan chipset",
-"		1468 0202  LAN-Express IEEE 802.11b Wireless LAN",
-"	3873  Prism 2.5 Wavelan chipset",
-"		1186 3501  DWL-520 Wireless PCI Adapter",
-"		1186 3700  DWL-520 Wireless PCI Adapter, Rev E1",
-"		1385 4105  MA311 802.11b wireless adapter",
-"		1668 0414  HWP01170-01 802.11b PCI Wireless Adapter",
-"		16a5 1601  AIR.mate PC-400 PCI Wireless LAN Adapter",
-"		1737 3874  WMP11 Wireless 802.11b PCI Adapter",
-"		8086 2513  Wireless 802.11b MiniPCI Adapter",
-"	3886  ISL3886 [Prism Javelin/Prism Xbow]",
-"		17cf 0037  XG-901 and clones Wireless Adapter",
-"	3890  ISL3890 [Prism GT/Prism Duette]/ISL3886 [Prism Javelin/Prism Xbow]",
-"		10b8 2802  SMC2802W Wireless PCI Adapter",
-"		10b8 2835  SMC2835W Wireless Cardbus Adapter",
-"		10b8 a835  SMC2835W V2 Wireless Cardbus Adapter",
-"		1113 4203  WN4201B",
-"		1113 ee03  SMC2802W V2 Wireless PCI Adapter [ISL3886]",
-"		1113 ee08  SMC2835W V3 EU Wireless Cardbus Adapter",
-"		1186 3202  DWL-G650 A1 Wireless Adapter",
-"		1259 c104  CG-WLCB54GT Wireless Adapter",
-"		1385 4800  WG511 Wireless Adapter",
-"		16a5 1605  ALLNET ALL0271 Wireless PCI Adapter",
-"		17cf 0014  XG-600 and clones Wireless Adapter",
-"		17cf 0020  XG-900 and clones Wireless Adapter",
-"	8130  HMP8130 NTSC/PAL Video Decoder",
-"	8131  HMP8131 NTSC/PAL Video Decoder",
-"	ffff  ISL3886IK",
-"		1260 0000  Senao 3054MP+ (J) mini-PCI WLAN 802.11g adapter",
-"1261  Matsushita-Kotobuki Electronics Industries, Ltd.",
-"1262  ES Computer Company, Ltd.",
-"1263  Sonic Solutions",
-"1264  Aval Nagasaki Corporation",
-"1265  Casio Computer Co., Ltd.",
-"1266  Microdyne Corporation",
-"	0001  NE10/100 Adapter (i82557B)",
-"	1910  NE2000Plus (RT8029) Ethernet Adapter",
-"		1266 1910  NE2000Plus Ethernet Adapter",
-"1267  S. A. Telecommunications",
-"	5352  PCR2101",
-"	5a4b  Telsat Turbo",
-"1268  Tektronix",
-"1269  Thomson-CSF/TTM",
-"126a  Lexmark International, Inc.",
-"126b  Adax, Inc.",
-"126c  Northern Telecom",
-"	1211  10/100BaseTX [RTL81xx]",
-"	126c  802.11b Wireless Ethernet Adapter",
-"126d  Splash Technology, Inc.",
-"126e  Sumitomo Metal Industries, Ltd.",
-"126f  Silicon Motion, Inc.",
-"	0501  SM501 VoyagerGX Rev. AA",
-"	0510  SM501 VoyagerGX Rev. B",
-"	0710  SM710 LynxEM",
-"	0712  SM712 LynxEM+",
-"	0720  SM720 Lynx3DM",
-"	0730  SM731 Cougar3DR",
-"	0810  SM810 LynxE",
-"	0811  SM811 LynxE",
-"	0820  SM820 Lynx3D",
-"	0910  SM910",
-"1270  Olympus Optical Co., Ltd.",
-"1271  GW Instruments",
-"1272  Telematics International",
-"1273  Hughes Network Systems",
-"	0002  DirecPC",
-"1274  Ensoniq",
-"	1171  ES1373 [AudioPCI] (also Creative Labs CT5803)",
-"	1371  ES1371 [AudioPCI-97]",
-"		0e11 0024  AudioPCI on Motherboard Compaq Deskpro",
-"		0e11 b1a7  ES1371, ES1373 AudioPCI",
-"		1033 80ac  ES1371, ES1373 AudioPCI",
-"		1042 1854  Tazer",
-"		107b 8054  Tabor2",
-"		1274 1371  Creative Sound Blaster AudioPCI64V, AudioPCI128",
-"		1274 8001  CT4751 board",
-"		1462 6470  ES1371, ES1373 AudioPCI On Motherboard MS-6147 1.1A",
-"		1462 6560  ES1371, ES1373 AudioPCI On Motherboard MS-6156 1.10",
-"		1462 6630  ES1371, ES1373 AudioPCI On Motherboard MS-6163BX 1.0A",
-"		1462 6631  ES1371, ES1373 AudioPCI On Motherboard MS-6163VIA 1.0A",
-"		1462 6632  ES1371, ES1373 AudioPCI On Motherboard MS-6163BX 2.0A",
-"		1462 6633  ES1371, ES1373 AudioPCI On Motherboard MS-6163VIA 2.0A",
-"		1462 6820  ES1371, ES1373 AudioPCI On Motherboard MS-6182 1.00",
-"		1462 6822  ES1371, ES1373 AudioPCI On Motherboard MS-6182 1.00A",
-"		1462 6830  ES1371, ES1373 AudioPCI On Motherboard MS-6183 1.00",
-"		1462 6880  ES1371, ES1373 AudioPCI On Motherboard MS-6188 1.00",
-"		1462 6900  ES1371, ES1373 AudioPCI On Motherboard MS-6190 1.00",
-"		1462 6910  ES1371, ES1373 AudioPCI On Motherboard MS-6191",
-"		1462 6930  ES1371, ES1373 AudioPCI On Motherboard MS-6193",
-"		1462 6990  ES1371, ES1373 AudioPCI On Motherboard MS-6199BX 2.0A",
-"		1462 6991  ES1371, ES1373 AudioPCI On Motherboard MS-6199VIA 2.0A",
-"		14a4 2077  ES1371, ES1373 AudioPCI On Motherboard KR639",
-"		14a4 2105  ES1371, ES1373 AudioPCI On Motherboard MR800",
-"		14a4 2107  ES1371, ES1373 AudioPCI On Motherboard MR801",
-"		14a4 2172  ES1371, ES1373 AudioPCI On Motherboard DR739",
-"		1509 9902  ES1371, ES1373 AudioPCI On Motherboard KW11",
-"		1509 9903  ES1371, ES1373 AudioPCI On Motherboard KW31",
-"		1509 9904  ES1371, ES1373 AudioPCI On Motherboard KA11",
-"		1509 9905  ES1371, ES1373 AudioPCI On Motherboard KC13",
-"		152d 8801  ES1371, ES1373 AudioPCI On Motherboard CP810E",
-"		152d 8802  ES1371, ES1373 AudioPCI On Motherboard CP810",
-"		152d 8803  ES1371, ES1373 AudioPCI On Motherboard P3810E",
-"		152d 8804  ES1371, ES1373 AudioPCI On Motherboard P3810-S",
-"		152d 8805  ES1371, ES1373 AudioPCI On Motherboard P3820-S",
-"		270f 2001  ES1371, ES1373 AudioPCI On Motherboard 6CTR",
-"		270f 2200  ES1371, ES1373 AudioPCI On Motherboard 6WTX",
-"		270f 3000  ES1371, ES1373 AudioPCI On Motherboard 6WSV",
-"		270f 3100  ES1371, ES1373 AudioPCI On Motherboard 6WIV2",
-"		270f 3102  ES1371, ES1373 AudioPCI On Motherboard 6WIV",
-"		270f 7060  ES1371, ES1373 AudioPCI On Motherboard 6ASA2",
-"		8086 4249  ES1371, ES1373 AudioPCI On Motherboard BI440ZX",
-"		8086 424c  ES1371, ES1373 AudioPCI On Motherboard BL440ZX",
-"		8086 425a  ES1371, ES1373 AudioPCI On Motherboard BZ440ZX",
-"		8086 4341  ES1371, ES1373 AudioPCI On Motherboard Cayman",
-"		8086 4343  ES1371, ES1373 AudioPCI On Motherboard Cape Cod",
-"		8086 4541  D815EEA Motherboard",
-"		8086 4649  ES1371, ES1373 AudioPCI On Motherboard Fire Island",
-"		8086 464a  ES1371, ES1373 AudioPCI On Motherboard FJ440ZX",
-"		8086 4d4f  ES1371, ES1373 AudioPCI On Motherboard Montreal",
-"		8086 4f43  ES1371, ES1373 AudioPCI On Motherboard OC440LX",
-"		8086 5243  ES1371, ES1373 AudioPCI On Motherboard RC440BX",
-"		8086 5352  ES1371, ES1373 AudioPCI On Motherboard SunRiver",
-"		8086 5643  ES1371, ES1373 AudioPCI On Motherboard Vancouver",
-"		8086 5753  ES1371, ES1373 AudioPCI On Motherboard WS440BX",
-"	5000  ES1370 [AudioPCI]",
-"	5880  5880 AudioPCI",
-"		1274 2000  Creative Sound Blaster AudioPCI128",
-"		1274 2003  Creative SoundBlaster AudioPCI 128",
-"		1274 5880  Creative Sound Blaster AudioPCI128",
-"		1274 8001  Sound Blaster 16PCI 4.1ch",
-"		1458 a000  5880 AudioPCI On Motherboard 6OXET",
-"		1462 6880  5880 AudioPCI On Motherboard MS-6188 1.00",
-"		270f 2001  5880 AudioPCI On Motherboard 6CTR",
-"		270f 2200  5880 AudioPCI On Motherboard 6WTX",
-"		270f 7040  5880 AudioPCI On Motherboard 6ATA4",
-"1275  Network Appliance Corporation",
-"1276  Switched Network Technologies, Inc.",
-"1277  Comstream",
-"1278  Transtech Parallel Systems Ltd.",
-"	0701  TPE3/TM3 PowerPC Node",
-"	0710  TPE5 PowerPC PCI board",
-"1279  Transmeta Corporation",
-"	0060  TM8000 Northbridge",
-"	0061  TM8000 AGP bridge",
-"	0295  Northbridge",
-"	0395  LongRun Northbridge",
-"	0396  SDRAM controller",
-"	0397  BIOS scratchpad",
-"127a  Rockwell International",
-"	1002  HCF 56k Data/Fax Modem",
-"		1092 094c  SupraExpress 56i PRO [Diamond SUP2380]",
-"		122d 4002  HPG / MDP3858-U",
-"		122d 4005  MDP3858-E",
-"		122d 4007  MDP3858-A/-NZ",
-"		122d 4012  MDP3858-SA",
-"		122d 4017  MDP3858-W",
-"		122d 4018  MDP3858-W",
-"		127a 1002  Rockwell 56K D/F HCF Modem",
-"	1003  HCF 56k Data/Fax Modem",
-"		0e11 b0bc  229-DF Zephyr",
-"		0e11 b114  229-DF Cheetah",
-"		1033 802b  229-DF",
-"		13df 1003  PCI56RX Modem",
-"		13e0 0117  IBM",
-"		13e0 0147  IBM F-1156IV+/R3 Spain V.90 Modem",
-"		13e0 0197  IBM",
-"		13e0 01c7  IBM F-1156IV+/R3 WW V.90 Modem",
-"		13e0 01f7  IBM",
-"		1436 1003  IBM",
-"		1436 1103  IBM 5614PM3G V.90 Modem",
-"		1436 1602  Compaq 229-DF Ducati",
-"	1004  HCF 56k Data/Fax/Voice Modem",
-"		1048 1500  MicroLink 56k Modem",
-"		10cf 1059  Fujitsu 229-DFRT",
-"	1005  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		1005 127a  AOpen FM56-P",
-"		1033 8029  229-DFSV",
-"		1033 8054  Modem",
-"		10cf 103c  Fujitsu",
-"		10cf 1055  Fujitsu 229-DFSV",
-"		10cf 1056  Fujitsu 229-DFSV",
-"		122d 4003  MDP3858SP-U",
-"		122d 4006  Packard Bell MDP3858V-E",
-"		122d 4008  MDP3858SP-A/SP-NZ",
-"		122d 4009  MDP3858SP-E",
-"		122d 4010  MDP3858V-U",
-"		122d 4011  MDP3858SP-SA",
-"		122d 4013  MDP3858V-A/V-NZ",
-"		122d 4015  MDP3858SP-W",
-"		122d 4016  MDP3858V-W",
-"		122d 4019  MDP3858V-SA",
-"		13df 1005  PCI56RVP Modem",
-"		13e0 0187  IBM",
-"		13e0 01a7  IBM",
-"		13e0 01b7  IBM DF-1156IV+/R3 Spain V.90 Modem",
-"		13e0 01d7  IBM DF-1156IV+/R3 WW V.90 Modem",
-"		1436 1005  IBM",
-"		1436 1105  IBM",
-"		1437 1105  IBM 5614PS3G V.90 Modem",
-"	1022  HCF 56k Modem",
-"		1436 1303  M3-5614PM3G V.90 Modem",
-"	1023  HCF 56k Data/Fax Modem",
-"		122d 4020  Packard Bell MDP3858-WE",
-"		122d 4023  MDP3858-UE",
-"		13e0 0247  IBM F-1156IV+/R6 Spain V.90 Modem",
-"		13e0 0297  IBM",
-"		13e0 02c7  IBM F-1156IV+/R6 WW V.90 Modem",
-"		1436 1203  IBM",
-"		1436 1303  IBM",
-"	1024  HCF 56k Data/Fax/Voice Modem",
-"	1025  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		10cf 106a  Fujitsu 235-DFSV",
-"		122d 4021  Packard Bell MDP3858V-WE",
-"		122d 4022  MDP3858SP-WE",
-"		122d 4024  MDP3858V-UE",
-"		122d 4025  MDP3858SP-UE",
-"	1026  HCF 56k PCI Speakerphone Modem",
-"	1032  HCF 56k Modem",
-"	1033  HCF 56k Modem",
-"	1034  HCF 56k Modem",
-"	1035  HCF 56k PCI Speakerphone Modem",
-"	1036  HCF 56k Modem",
-"	1085  HCF 56k Volcano PCI Modem",
-"	2005  HCF 56k Data/Fax Modem",
-"		104d 8044  229-DFSV",
-"		104d 8045  229-DFSV",
-"		104d 8055  PBE/Aztech 235W-DFSV",
-"		104d 8056  235-DFSV",
-"		104d 805a  Modem",
-"		104d 805f  Modem",
-"		104d 8074  Modem",
-"	2013  HSF 56k Data/Fax Modem",
-"		1179 0001  Modem",
-"		1179 ff00  Modem",
-"	2014  HSF 56k Data/Fax/Voice Modem",
-"		10cf 1057  Fujitsu Citicorp III",
-"		122d 4050  MSP3880-U",
-"		122d 4055  MSP3880-W",
-"	2015  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		10cf 1063  Fujitsu",
-"		10cf 1064  Fujitsu",
-"		1468 2015  Fujitsu",
-"	2016  HSF 56k Data/Fax/Voice/Spkp Modem",
-"		122d 4051  MSP3880V-W",
-"		122d 4052  MSP3880SP-W",
-"		122d 4054  MSP3880V-U",
-"		122d 4056  MSP3880SP-U",
-"		122d 4057  MSP3880SP-A",
-"	4311  Riptide HSF 56k PCI Modem",
-"		127a 4311  Ring Modular\? Riptide HSF RT HP Dom",
-"		13e0 0210  HP-GVC",
-"	4320  Riptide PCI Audio Controller",
-"		1235 4320  Riptide PCI Audio Controller",
-"	4321  Riptide HCF 56k PCI Modem",
-"		1235 4321  Hewlett Packard DF",
-"		1235 4324  Hewlett Packard DF",
-"		13e0 0210  Hewlett Packard DF",
-"		144d 2321  Riptide",
-"	4322  Riptide PCI Game Controller",
-"		1235 4322  Riptide PCI Game Controller",
-"	8234  RapidFire 616X ATM155 Adapter",
-"		108d 0022  RapidFire 616X ATM155 Adapter",
-"		108d 0027  RapidFire 616X ATM155 Adapter",
-"127b  Pixera Corporation",
-"127c  Crosspoint Solutions, Inc.",
-"127d  Vela Research",
-"127e  Winnov, L.P.",
-"127f  Fujifilm",
-"1280  Photoscript Group Ltd.",
-"1281  Yokogawa Electric Corporation",
-"1282  Davicom Semiconductor, Inc.",
-"	9009  Ethernet 100/10 MBit",
-"	9100  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	9102  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	9132  Ethernet 100/10 MBit",
-"1283  Integrated Technology Express, Inc.",
-"	673a  IT8330G",
-"	8211  ITE 8211F Single Channel UDMA 133 (ASUS 8211 (ITE IT8212 ATA RAID Controller))",
-"		1043 8138  P5GD1-VW Mainboard",
-"	8212  IT/ITE8212 Dual channel ATA RAID controller (PCI version seems to be IT8212, embedded seems to be ITE8212)",
-"		1283 0001  IT/ITE8212 Dual channel ATA RAID controller",
-"	8330  IT8330G",
-"	8872  IT8874F PCI Dual Serial Port Controller",
-"	8888  IT8888F PCI to ISA Bridge with SMB",
-"	8889  IT8889F PCI to ISA Bridge",
-"	e886  IT8330G",
-"1284  Sahara Networks, Inc.",
-"1285  Platform Technologies, Inc.",
-"	0100  AGOGO sound chip (aka ESS Maestro 1)",
-"1286  Mazet GmbH",
-"1287  M-Pact, Inc.",
-"	001e  LS220D DVD Decoder",
-"	001f  LS220C DVD Decoder",
-"1288  Timestep Corporation",
-"1289  AVC Technology, Inc.",
-"128a  Asante Technologies, Inc.",
-"128b  Transwitch Corporation",
-"128c  Retix Corporation",
-"128d  G2 Networks, Inc.",
-"	0021  ATM155 Adapter",
-"128e  Hoontech Corporation/Samho Multi Tech Ltd.",
-"	0008  ST128 WSS/SB",
-"	0009  ST128 SAM9407",
-"	000a  ST128 Game Port",
-"	000b  ST128 MPU Port",
-"	000c  ST128 Ctrl Port",
-"128f  Tateno Dennou, Inc.",
-"1290  Sord Computer Corporation",
-"1291  NCS Computer Italia",
-"1292  Tritech Microelectronics Inc",
-"1293  Media Reality Technology",
-"1294  Rhetorex, Inc.",
-"1295  Imagenation Corporation",
-"1296  Kofax Image Products",
-"1297  Holco Enterprise Co, Ltd/Shuttle Computer",
-"1298  Spellcaster Telecommunications Inc.",
-"1299  Knowledge Technology Lab.",
-"129a  VMetro, inc.",
-"	0615  PBT-615 PCI-X Bus Analyzer",
-"129b  Image Access",
-"129c  Jaycor",
-"129d  Compcore Multimedia, Inc.",
-"129e  Victor Company of Japan, Ltd.",
-"129f  OEC Medical Systems, Inc.",
-"12a0  Allen-Bradley Company",
-"12a1  Simpact Associates, Inc.",
-"12a2  Newgen Systems Corporation",
-"12a3  Lucent Technologies",
-"	8105  T8105 H100 Digital Switch",
-"12a4  NTT Electronics Technology Company",
-"12a5  Vision Dynamics Ltd.",
-"12a6  Scalable Networks, Inc.",
-"12a7  AMO GmbH",
-"12a8  News Datacom",
-"12a9  Xiotech Corporation",
-"12aa  SDL Communications, Inc.",
-"12ab  Yuan Yuan Enterprise Co., Ltd.",
-"	0002  AU8830 [Vortex2] Based Sound Card With A3D Support",
-"	3000  MPG-200C PCI DVD Decoder Card",
-"12ac  Measurex Corporation",
-"12ad  Multidata GmbH",
-"12ae  Alteon Networks Inc.",
-"	0001  AceNIC Gigabit Ethernet",
-"		1014 0104  Gigabit Ethernet-SX PCI Adapter",
-"		12ae 0001  Gigabit Ethernet-SX (Universal)",
-"		1410 0104  Gigabit Ethernet-SX PCI Adapter",
-"	0002  AceNIC Gigabit Ethernet (Copper)",
-"		10a9 8002  Acenic Gigabit Ethernet",
-"		12ae 0002  Gigabit Ethernet-T (3C986-T)",
-"	00fa  Farallon PN9100-T Gigabit Ethernet",
-"12af  TDK USA Corp",
-"12b0  Jorge Scientific Corp",
-"12b1  GammaLink",
-"12b2  General Signal Networks",
-"12b3  Inter-Face Co Ltd",
-"12b4  FutureTel Inc",
-"12b5  Granite Systems Inc.",
-"12b6  Natural Microsystems",
-"12b7  Cognex Modular Vision Systems Div. - Acumen Inc.",
-"12b8  Korg",
-"12b9  3Com Corp, Modem Division",
-"	1006  WinModem",
-"		12b9 005c  USR 56k Internal Voice WinModem (Model 3472)",
-"		12b9 005e  USR 56k Internal WinModem (Models 662975)",
-"		12b9 0062  USR 56k Internal Voice WinModem (Model 662978)",
-"		12b9 0068  USR 56k Internal Voice WinModem (Model 5690)",
-"		12b9 007a  USR 56k Internal Voice WinModem (Model 662974)",
-"		12b9 007f  USR 56k Internal WinModem (Models 5698, 5699)",
-"		12b9 0080  USR 56k Internal WinModem (Models 2975, 3528)",
-"		12b9 0081  USR 56k Internal Voice WinModem (Models 2974, 3529)",
-"		12b9 0091  USR 56k Internal Voice WinModem (Model 2978)",
-"	1007  USR 56k Internal WinModem",
-"		12b9 00a3  USR 56k Internal WinModem (Model 3595)",
-"	1008  56K FaxModem Model 5610",
-"		12b9 00a2  USR 56k Internal FAX Modem (Model 2977)",
-"		12b9 00aa  USR 56k Internal Voice Modem (Model 2976)",
-"		12b9 00ab  USR 56k Internal Voice Modem (Model 5609)",
-"		12b9 00ac  USR 56k Internal Voice Modem (Model 3298)",
-"		12b9 00ad  USR 56k Internal FAX Modem (Model 5610)",
-"12ba  BittWare, Inc.",
-"12bb  Nippon Unisoft Corporation",
-"12bc  Array Microsystems",
-"12bd  Computerm Corp.",
-"12be  Anchor Chips Inc.",
-"	3041  AN3041Q CO-MEM",
-"	3042  AN3042Q CO-MEM Lite",
-"		12be 3042  Anchor Chips Lite Evaluation Board",
-"12bf  Fujifilm Microdevices",
-"12c0  Infimed",
-"12c1  GMM Research Corp",
-"12c2  Mentec Limited",
-"12c3  Holtek Microelectronics Inc",
-"	0058  PCI NE2K Ethernet",
-"	5598  PCI NE2K Ethernet",
-"12c4  Connect Tech Inc",
-"	0001  Blue HEAT/PCI 8 (RS232/CL/RJ11)",
-"	0002  Blue HEAT/PCI 4 (RS232)",
-"	0003  Blue HEAT/PCI 2 (RS232)",
-"	0004  Blue HEAT/PCI 8 (UNIV, RS485)",
-"	0005  Blue HEAT/PCI 4+4/6+2 (UNIV, RS232/485)",
-"	0006  Blue HEAT/PCI 4 (OPTO, RS485)",
-"	0007  Blue HEAT/PCI 2+2 (RS232/485)",
-"	0008  Blue HEAT/PCI 2 (OPTO, Tx, RS485)",
-"	0009  Blue HEAT/PCI 2+6 (RS232/485)",
-"	000a  Blue HEAT/PCI 8 (Tx, RS485)",
-"	000b  Blue HEAT/PCI 4 (Tx, RS485)",
-"	000c  Blue HEAT/PCI 2 (20 MHz, RS485)",
-"	000d  Blue HEAT/PCI 2 PTM",
-"	0100  NT960/PCI",
-"	0201  cPCI Titan - 2 Port",
-"	0202  cPCI Titan - 4 Port",
-"	0300  CTI PCI UART 2 (RS232)",
-"	0301  CTI PCI UART 4 (RS232)",
-"	0302  CTI PCI UART 8 (RS232)",
-"	0310  CTI PCI UART 1+1 (RS232/485)",
-"	0311  CTI PCI UART 2+2 (RS232/485)",
-"	0312  CTI PCI UART 4+4 (RS232/485)",
-"	0320  CTI PCI UART 2",
-"	0321  CTI PCI UART 4",
-"	0322  CTI PCI UART 8",
-"	0330  CTI PCI UART 2 (RS485)",
-"	0331  CTI PCI UART 4 (RS485)",
-"	0332  CTI PCI UART 8 (RS485)",
-"12c5  Picture Elements Incorporated",
-"	007e  Imaging/Scanning Subsystem Engine",
-"	007f  Imaging/Scanning Subsystem Engine",
-"	0081  PCIVST [Grayscale Thresholding Engine]",
-"	0085  Video Simulator/Sender",
-"	0086  THR2 Multi-scale Thresholder",
-"12c6  Mitani Corporation",
-"12c7  Dialogic Corp",
-"12c8  G Force Co, Ltd",
-"12c9  Gigi Operations",
-"12ca  Integrated Computing Engines",
-"12cb  Antex Electronics Corporation",
-"12cc  Pluto Technologies International",
-"12cd  Aims Lab",
-"12ce  Netspeed Inc.",
-"12cf  Prophet Systems, Inc.",
-"12d0  GDE Systems, Inc.",
-"12d1  PSITech",
-"12d2  NVidia / SGS Thomson (Joint Venture)",
-"	0008  NV1",
-"	0009  DAC64",
-"	0018  Riva128",
-"		1048 0c10  VICTORY Erazor",
-"		107b 8030  STB Velocity 128",
-"		1092 0350  Viper V330",
-"		1092 1092  Viper V330",
-"		10b4 1b1b  STB Velocity 128",
-"		10b4 1b1d  STB Velocity 128",
-"		10b4 1b1e  STB Velocity 128, PAL TV-Out",
-"		10b4 1b20  STB Velocity 128 Sapphire",
-"		10b4 1b21  STB Velocity 128",
-"		10b4 1b22  STB Velocity 128 AGP, NTSC TV-Out",
-"		10b4 1b23  STB Velocity 128 AGP, PAL TV-Out",
-"		10b4 1b27  STB Velocity 128 DVD",
-"		10b4 1b88  MVP Pro 128",
-"		10b4 222a  STB Velocity 128 AGP",
-"		10b4 2230  STB Velocity 128",
-"		10b4 2232  STB Velocity 128",
-"		10b4 2235  STB Velocity 128 AGP",
-"		2a15 54a3  3DVision-SAGP / 3DexPlorer 3000",
-"	0019  Riva128ZX",
-"	0020  TNT",
-"	0028  TNT2",
-"	0029  UTNT2",
-"	002c  VTNT2",
-"	00a0  ITNT2",
-"12d3  Vingmed Sound A/S",
-"12d4  Ulticom (Formerly DGM&S)",
-"	0200  T1 Card",
-"12d5  Equator Technologies Inc",
-"	0003  BSP16",
-"	1000  BSP15",
-"12d6  Analogic Corp",
-"12d7  Biotronic SRL",
-"12d8  Pericom Semiconductor",
-"	8150  PCI to PCI Bridge",
-"12d9  Aculab PLC",
-"	0002  PCI Prosody",
-"	0004  cPCI Prosody",
-"	0005  Aculab E1/T1 PCI card",
-"	1078  Prosody X class e1000 device",
-"		12d9 000d  Prosody X PCI",
-"12da  True Time Inc.",
-"12db  Annapolis Micro Systems, Inc",
-"12dc  Symicron Computer Communication Ltd.",
-"12dd  Management Graphics",
-"12de  Rainbow Technologies",
-"	0200  CryptoSwift CS200",
-"12df  SBS Technologies Inc",
-"12e0  Chase Research",
-"	0010  ST16C654 Quad UART",
-"	0020  ST16C654 Quad UART",
-"	0030  ST16C654 Quad UART",
-"12e1  Nintendo Co, Ltd",
-"12e2  Datum Inc. Bancomm-Timing Division",
-"12e3  Imation Corp - Medical Imaging Systems",
-"12e4  Brooktrout Technology Inc",
-"12e5  Apex Semiconductor Inc",
-"12e6  Cirel Systems",
-"12e7  Sunsgroup Corporation",
-"12e8  Crisc Corp",
-"12e9  GE Spacenet",
-"12ea  Zuken",
-"12eb  Aureal Semiconductor",
-"	0001  Vortex 1",
-"		104d 8036  AU8820 Vortex Digital Audio Processor",
-"		1092 2000  Sonic Impact A3D",
-"		1092 2100  Sonic Impact A3D",
-"		1092 2110  Sonic Impact A3D",
-"		1092 2200  Sonic Impact A3D",
-"		122d 1002  AU8820 Vortex Digital Audio Processor",
-"		12eb 0001  AU8820 Vortex Digital Audio Processor",
-"		5053 3355  Montego",
-"	0002  Vortex 2",
-"		104d 8049  AU8830 Vortex 3D Digital Audio Processor",
-"		104d 807b  AU8830 Vortex 3D Digital Audio Processor",
-"		1092 3000  Monster Sound II",
-"		1092 3001  Monster Sound II",
-"		1092 3002  Monster Sound II",
-"		1092 3003  Monster Sound II",
-"		1092 3004  Monster Sound II",
-"		12eb 0002  AU8830 Vortex 3D Digital Audio Processor",
-"		12eb 0088  AU8830 Vortex 3D Digital Audio Processor",
-"		144d 3510  AU8830 Vortex 3D Digital Audio Processor",
-"		5053 3356  Montego II",
-"	0003  AU8810 Vortex Digital Audio Processor",
-"		104d 8049  AU8810 Vortex Digital Audio Processor",
-"		104d 8077  AU8810 Vortex Digital Audio Processor",
-"		109f 1000  AU8810 Vortex Digital Audio Processor",
-"		12eb 0003  AU8810 Vortex Digital Audio Processor",
-"		1462 6780  AU8810 Vortex Digital Audio Processor",
-"		14a4 2073  AU8810 Vortex Digital Audio Processor",
-"		14a4 2091  AU8810 Vortex Digital Audio Processor",
-"		14a4 2104  AU8810 Vortex Digital Audio Processor",
-"		14a4 2106  AU8810 Vortex Digital Audio Processor",
-"	8803  Vortex 56k Software Modem",
-"		12eb 8803  Vortex 56k Software Modem",
-"12ec  3A International, Inc.",
-"12ed  Optivision Inc.",
-"12ee  Orange Micro",
-"12ef  Vienna Systems",
-"12f0  Pentek",
-"12f1  Sorenson Vision Inc",
-"12f2  Gammagraphx, Inc.",
-"12f3  Radstone Technology",
-"12f4  Megatel",
-"12f5  Forks",
-"12f6  Dawson France",
-"12f7  Cognex",
-"12f8  Electronic Design GmbH",
-"	0002  VideoMaker",
-"12f9  Four Fold Ltd",
-"12fb  Spectrum Signal Processing",
-"	0001  PMC-MAI",
-"	00f5  F5 Dakar",
-"	02ad  PMC-2MAI",
-"	2adc  ePMC-2ADC",
-"	3100  PRO-3100",
-"	3500  PRO-3500",
-"	4d4f  Modena",
-"	8120  ePMC-8120",
-"	da62  Daytona C6201 PCI (Hurricane)",
-"	db62  Ingliston XBIF",
-"	dc62  Ingliston PLX9054",
-"	dd62  Ingliston JTAG/ISP",
-"	eddc  ePMC-MSDDC",
-"	fa01  ePMC-FPGA",
-"12fc  Capital Equipment Corp",
-"12fd  I2S",
-"12fe  ESD Electronic System Design GmbH",
-"12ff  Lexicon",
-"1300  Harman International Industries Inc",
-"1302  Computer Sciences Corp",
-"1303  Innovative Integration",
-"1304  Juniper Networks",
-"1305  Netphone, Inc",
-"1306  Duet Technologies",
-"1307  Measurement Computing",
-"	0001  PCI-DAS1602/16",
-"	000b  PCI-DIO48H",
-"	000c  PCI-PDISO8",
-"	000d  PCI-PDISO16",
-"	000f  PCI-DAS1200",
-"	0010  PCI-DAS1602/12",
-"	0014  PCI-DIO24H",
-"	0015  PCI-DIO24H/CTR3",
-"	0016  PCI-DIO48H/CTR15",
-"	0017  PCI-DIO96H",
-"	0018  PCI-CTR05",
-"	0019  PCI-DAS1200/JR",
-"	001a  PCI-DAS1001",
-"	001b  PCI-DAS1002",
-"	001c  PCI-DAS1602JR/16",
-"	001d  PCI-DAS6402/16",
-"	001e  PCI-DAS6402/12",
-"	001f  PCI-DAS16/M1",
-"	0020  PCI-DDA02/12",
-"	0021  PCI-DDA04/12",
-"	0022  PCI-DDA08/12",
-"	0023  PCI-DDA02/16",
-"	0024  PCI-DDA04/16",
-"	0025  PCI-DDA08/16",
-"	0026  PCI-DAC04/12-HS",
-"	0027  PCI-DAC04/16-HS",
-"	0028  PCI-DIO24",
-"	0029  PCI-DAS08",
-"	002c  PCI-INT32",
-"	0033  PCI-DUAL-AC5",
-"	0034  PCI-DAS-TC",
-"	0035  PCI-DAS64/M1/16",
-"	0036  PCI-DAS64/M2/16",
-"	0037  PCI-DAS64/M3/16",
-"	004c  PCI-DAS1000",
-"	004d  PCI-QUAD04",
-"	0052  PCI-DAS4020/12",
-"	0054  PCI-DIO96",
-"	005e  PCI-DAS6025",
-"1308  Jato Technologies Inc.",
-"	0001  NetCelerator Adapter",
-"		1308 0001  NetCelerator Adapter",
-"1309  AB Semiconductor Ltd",
-"130a  Mitsubishi Electric Microcomputer",
-"130b  Colorgraphic Communications Corp",
-"130c  Ambex Technologies, Inc",
-"130d  Accelerix Inc",
-"130e  Yamatake-Honeywell Co. Ltd",
-"130f  Advanet Inc",
-"1310  Gespac",
-"1311  Videoserver, Inc",
-"1312  Acuity Imaging, Inc",
-"1313  Yaskawa Electric Co.",
-"1316  Teradyne Inc",
-"1317  Linksys",
-"	0981  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	0985  NC100 Network Everywhere Fast Ethernet 10/100",
-"		1734 100c  Scenic N300 ADMtek AN983 10/100 Mbps PCI Adapter",
-"	1985  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	2850  HSP MicroModem 56",
-"	5120  ADMtek ADM5120 OpenGate System-on-Chip",
-"	8201  ADMtek ADM8211 802.11b Wireless Interface",
-"		10b8 2635  SMC2635W 802.11b (11Mbps) wireless lan pcmcia (cardbus) card",
-"		1317 8201  SMC2635W 802.11b (11mbps) wireless lan pcmcia (cardbus) card",
-"	8211  ADMtek ADM8211 802.11b Wireless Interface",
-"	9511  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"1318  Packet Engines Inc.",
-"	0911  GNIC-II PCI Gigabit Ethernet [Hamachi]",
-"1319  Fortemedia, Inc",
-"	0801  Xwave QS3000A [FM801]",
-"		1319 1319  FM801 PCI Audio",
-"	0802  Xwave QS3000A [FM801 game port]",
-"		1319 1319  FM801 PCI Joystick",
-"	1000  FM801 PCI Audio",
-"	1001  FM801 PCI Joystick",
-"131a  Finisar Corp.",
-"131c  Nippon Electro-Sensory Devices Corp",
-"131d  Sysmic, Inc.",
-"131e  Xinex Networks Inc",
-"131f  Siig Inc",
-"	1000  CyberSerial (1-port) 16550",
-"	1001  CyberSerial (1-port) 16650",
-"	1002  CyberSerial (1-port) 16850",
-"	1010  Duet 1S(16550)+1P",
-"	1011  Duet 1S(16650)+1P",
-"	1012  Duet 1S(16850)+1P",
-"	1020  CyberParallel (1-port)",
-"	1021  CyberParallel (2-port)",
-"	1030  CyberSerial (2-port) 16550",
-"	1031  CyberSerial (2-port) 16650",
-"	1032  CyberSerial (2-port) 16850",
-"	1034  Trio 2S(16550)+1P",
-"	1035  Trio 2S(16650)+1P",
-"	1036  Trio 2S(16850)+1P",
-"	1050  CyberSerial (4-port) 16550",
-"	1051  CyberSerial (4-port) 16650",
-"	1052  CyberSerial (4-port) 16850",
-"	2000  CyberSerial (1-port) 16550",
-"	2001  CyberSerial (1-port) 16650",
-"	2002  CyberSerial (1-port) 16850",
-"	2010  Duet 1S(16550)+1P",
-"	2011  Duet 1S(16650)+1P",
-"	2012  Duet 1S(16850)+1P",
-"	2020  CyberParallel (1-port)",
-"	2021  CyberParallel (2-port)",
-"	2030  CyberSerial (2-port) 16550",
-"		131f 2030  PCI Serial Card",
-"	2031  CyberSerial (2-port) 16650",
-"	2032  CyberSerial (2-port) 16850",
-"	2040  Trio 1S(16550)+2P",
-"	2041  Trio 1S(16650)+2P",
-"	2042  Trio 1S(16850)+2P",
-"	2050  CyberSerial (4-port) 16550",
-"	2051  CyberSerial (4-port) 16650",
-"	2052  CyberSerial (4-port) 16850",
-"	2060  Trio 2S(16550)+1P",
-"	2061  Trio 2S(16650)+1P",
-"	2062  Trio 2S(16850)+1P",
-"	2081  CyberSerial (8-port) ST16654",
-"1320  Crypto AG",
-"1321  Arcobel Graphics BV",
-"1322  MTT Co., Ltd",
-"1323  Dome Inc",
-"1324  Sphere Communications",
-"1325  Salix Technologies, Inc",
-"1326  Seachange international",
-"1327  Voss scientific",
-"1328  quadrant international",
-"1329  Productivity Enhancement",
-"132a  Microcom Inc.",
-"132b  Broadband Technologies",
-"132c  Micrel Inc",
-"132d  Integrated Silicon Solution, Inc.",
-"1330  MMC Networks",
-"1331  Radisys Corp.",
-"	0030  ENP-2611",
-"	8200  82600 Host Bridge",
-"	8201  82600 IDE",
-"	8202  82600 USB",
-"	8210  82600 PCI Bridge",
-"1332  Micro Memory",
-"	5415  MM-5415CN PCI Memory Module with Battery Backup",
-"	5425  MM-5425CN PCI 64/66 Memory Module with Battery Backup",
-"	6140  MM-6140D",
-"1334  Redcreek Communications, Inc",
-"1335  Videomail, Inc",
-"1337  Third Planet Publishing",
-"1338  BT Electronics",
-"133a  Vtel Corp",
-"133b  Softcom Microsystems",
-"133c  Holontech Corp",
-"133d  SS Technologies",
-"133e  Virtual Computer Corp",
-"133f  SCM Microsystems",
-"1340  Atalla Corp",
-"1341  Kyoto Microcomputer Co",
-"1342  Promax Systems Inc",
-"1343  Phylon Communications Inc",
-"1344  Crucial Technology",
-"1345  Arescom Inc",
-"1347  Odetics",
-"1349  Sumitomo Electric Industries, Ltd.",
-"134a  DTC Technology Corp.",
-"	0001  Domex 536",
-"	0002  Domex DMX3194UP SCSI Adapter",
-"134b  ARK Research Corp.",
-"134c  Chori Joho System Co. Ltd",
-"134d  PCTel Inc",
-"	2189  HSP56 MicroModem",
-"	2486  2304WT V.92 MDC Modem",
-"	7890  HSP MicroModem 56",
-"		134d 0001  PCT789 adapter",
-"	7891  HSP MicroModem 56",
-"		134d 0001  HSP MicroModem 56",
-"	7892  HSP MicroModem 56",
-"	7893  HSP MicroModem 56",
-"	7894  HSP MicroModem 56",
-"	7895  HSP MicroModem 56",
-"	7896  HSP MicroModem 56",
-"	7897  HSP MicroModem 56",
-"134e  CSTI",
-"134f  Algo System Co Ltd",
-"1350  Systec Co. Ltd",
-"1351  Sonix Inc",
-"1353  Thales Idatys",
-"	0002  Proserver",
-"	0003  PCI-FUT",
-"	0004  PCI-S0",
-"	0005  PCI-FUT-S0",
-"1354  Dwave System Inc",
-"1355  Kratos Analytical Ltd",
-"1356  The Logical Co",
-"1359  Prisa Networks",
-"135a  Brain Boxes",
-"135b  Giganet Inc",
-"135c  Quatech Inc",
-"	0010  QSC-100",
-"	0020  DSC-100",
-"	0030  DSC-200/300",
-"	0040  QSC-200/300",
-"	0050  ESC-100D",
-"	0060  ESC-100M",
-"	00f0  MPAC-100 Syncronous Serial Card (Zilog 85230)",
-"	0170  QSCLP-100",
-"	0180  DSCLP-100",
-"	0190  SSCLP-100",
-"	01a0  QSCLP-200/300",
-"	01b0  DSCLP-200/300",
-"	01c0  SSCLP-200/300",
-"135d  ABB Network Partner AB",
-"135e  Sealevel Systems Inc",
-"	5101  Route 56.PCI - Multi-Protocol Serial Interface (Zilog Z16C32)",
-"	7101  Single Port RS-232/422/485/530",
-"	7201  Dual Port RS-232/422/485 Interface",
-"	7202  Dual Port RS-232 Interface",
-"	7401  Four Port RS-232 Interface",
-"	7402  Four Port RS-422/485 Interface",
-"	7801  Eight Port RS-232 Interface",
-"	7804  Eight Port RS-232/422/485 Interface",
-"	8001  8001 Digital I/O Adapter",
-"135f  I-Data International A-S",
-"1360  Meinberg Funkuhren",
-"	0101  PCI32 DCF77 Radio Clock",
-"	0102  PCI509 DCF77 Radio Clock",
-"	0103  PCI510 DCF77 Radio Clock",
-"	0104  PCI511 DCF77 Radio Clock",
-"	0201  GPS167PCI GPS Receiver",
-"	0202  GPS168PCI GPS Receiver",
-"	0203  GPS169PCI GPS Receiver",
-"	0204  GPS170PCI GPS Receiver",
-"	0301  TCR510PCI IRIG Timecode Reader",
-"	0302  TCR167PCI IRIG Timecode Reader",
-"1361  Soliton Systems K.K.",
-"1362  Fujifacom Corporation",
-"1363  Phoenix Technology Ltd",
-"1364  ATM Communications Inc",
-"1365  Hypercope GmbH",
-"1366  Teijin Seiki Co. Ltd",
-"1367  Hitachi Zosen Corporation",
-"1368  Skyware Corporation",
-"1369  Digigram",
-"136a  High Soft Tech",
-"136b  Kawasaki Steel Corporation",
-"	ff01  KL5A72002 Motion JPEG",
-"136c  Adtek System Science Co Ltd",
-"136d  Gigalabs Inc",
-"136f  Applied Magic Inc",
-"1370  ATL Products",
-"1371  CNet Technology Inc",
-"	434e  GigaCard Network Adapter",
-"		1371 434e  N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)",
-"1373  Silicon Vision Inc",
-"1374  Silicom Ltd.",
-"	0024  Silicom Dual port Giga Ethernet BGE Bypass Server Adapter",
-"	0025  Silicom Quad port Giga Ethernet BGE Bypass Server Adapter",
-"	0026  Silicom Dual port Fiber Giga Ethernet 546 Bypass Server Adapter",
-"	0027  Silicom Dual port Fiber LX Giga Ethernet 546 Bypass Server Adapter",
-"	0029  Silicom Dual port Copper Giga Ethernet 546GB Bypass Server Adapter",
-"	002a  Silicom Dual port Fiber Giga Ethernet 546 TAP/Bypass Server Adapter",
-"	002b  Silicom Dual port Copper Fast Ethernet 546 TAP/Bypass Server Adapter (PXE2TBI)",
-"	002c  Silicom Quad port Copper Giga Ethernet 546GB Bypass Server Adapter (PXG4BPI)",
-"	002d  Silicom Quad port Fiber-SX Giga Ethernet 546GB Bypass Server Adapter (PXG4BPFI)",
-"	002e  Silicom Quad port Fiber-LX Giga Ethernet 546GB Bypass Server Adapter (PXG4BPFI-LX)",
-"	002f  Silicom Dual port Fiber-SX Giga Ethernet 546GB Low profile Bypass Server Adapter (PXG2BPFIL)",
-"	0030  Silicom Dual port Fiber-LX Giga Ethernet 546GB Low profile Bypass Server Adapter",
-"	0031  Silicom Quad port Copper Giga Ethernet PCI-E Bypass Server Adapter",
-"	0032  Silicom Dual port Copper Fast Ethernet 546 TAP/Bypass Server Adapter",
-"	0034  Silicom Dual port Copper Giga Ethernet PCI-E BGE Bypass Server Adapter",
-"	0035  Silicom Quad port Copper Giga Ethernet PCI-E BGE Bypass Server Adapter",
-"	0036  Silicom Dual port Fiber Giga Ethernet PCI-E BGE Bypass Server Adapter",
-"	0037  Silicom Quad port Copper Ethernet PCI-E Intel based Bypass Server Adapter",
-"	0038  Silicom Quad port Copper Ethernet PCI-E Intel based Bypass Server Adapter",
-"	0039  Silicom Dual port Fiber-SX Ethernet PCI-E Intel based Bypass Server Adapter",
-"	003a  Silicom Dual port Fiber-LX Ethernet PCI-E Intel based Bypass Server Adapter",
-"1375  Argosystems Inc",
-"1376  LMC",
-"1377  Electronic Equipment Production & Distribution GmbH",
-"1378  Telemann Co. Ltd",
-"1379  Asahi Kasei Microsystems Co Ltd",
-"137a  Mark of the Unicorn Inc",
-"	0001  PCI-324 Audiowire Interface",
-"137b  PPT Vision",
-"137c  Iwatsu Electric Co Ltd",
-"137d  Dynachip Corporation",
-"137e  Patriot Scientific Corporation",
-"137f  Japan Satellite Systems Inc",
-"1380  Sanritz Automation Co Ltd",
-"1381  Brains Co. Ltd",
-"1382  Marian - Electronic & Software",
-"	0001  ARC88 audio recording card",
-"	2008  Prodif 96 Pro sound system",
-"	2048  Prodif Plus sound system",
-"	2088  Marc 8 Midi sound system",
-"	20c8  Marc A sound system",
-"	4008  Marc 2 sound system",
-"	4010  Marc 2 Pro sound system",
-"	4048  Marc 4 MIDI sound system",
-"	4088  Marc 4 Digi sound system",
-"	4248  Marc X sound system",
-"	4424  TRACE D4 Sound System",
-"1383  Controlnet Inc",
-"1384  Reality Simulation Systems Inc",
-"1385  Netgear",
-"	0013  WG311T 108 Mbps Wireless PCI Adapter",
-"	311a  GA511 Gigabit Ethernet",
-"	4100  802.11b Wireless Adapter (MA301)",
-"	4105  MA311 802.11b wireless adapter",
-"	4251  WG111T 108 Mbps Wireless USB 2.0 Adapter",
-"	4400  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4600  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4601  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4610  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4800  WG511(v1) 54 Mbps Wireless PC Card",
-"	4900  WG311v1 54 Mbps Wireless PCI Adapter",
-"	4a00  WAG311 802.11a/g Wireless PCI Adapter",
-"	4b00  WG511T 108 Mbps Wireless PC Card",
-"	4c00  WG311v2 54 Mbps Wireless PCI Adapter",
-"	4d00  WG311T 108 Mbps Wireless PCI Adapter",
-"	4e00  WG511v2 54 Mbps Wireless PC Card",
-"	4f00  WG511U Double 108 Mbps  Wireless PC Card",
-"	5200  GA511 Gigabit PC Card",
-"	620a  GA620 Gigabit Ethernet",
-"	622a  GA622",
-"	630a  GA630 Gigabit Ethernet",
-"	6b00  WG311v3 54 Mbps Wireless PCI Adapter",
-"	6d00  WPNT511 RangeMax 240 Mbps Wireless PC Card",
-"	f004  FA310TX",
-"1386  Video Domain Technologies",
-"1387  Systran Corp",
-"1388  Hitachi Information Technology Co Ltd",
-"1389  Applicom International",
-"	0001  PCI1500PFB [Intelligent fieldbus adaptor]",
-"138a  Fusion Micromedia Corp",
-"138b  Tokimec Inc",
-"138c  Silicon Reality",
-"138d  Future Techno Designs pte Ltd",
-"138e  Basler GmbH",
-"138f  Patapsco Designs Inc",
-"1390  Concept Development Inc",
-"1391  Development Concepts Inc",
-"1392  Medialight Inc",
-"1393  Moxa Technologies Co Ltd",
-"	1040  Smartio C104H/PCI",
-"	1141  Industrio CP-114",
-"	1680  Smartio C168H/PCI",
-"	2040  Intellio CP-204J",
-"	2180  Intellio C218 Turbo PCI",
-"	3200  Intellio C320 Turbo PCI",
-"1394  Level One Communications",
-"	0001  LXT1001 Gigabit Ethernet",
-"		1394 0001  NetCelerator Adapter",
-"1395  Ambicom Inc",
-"1396  Cipher Systems Inc",
-"1397  Cologne Chip Designs GmbH",
-"	08b4  ISDN network Controller [HFC-4S]",
-"		1397 b520  HFC-4S [IOB4ST]",
-"		1397 b540  HFC-4S [Swyx 4xS0 SX2 QuadBri]",
-"	16b8  ISDN network Controller [HFC-8S]",
-"	2bd0  ISDN network controller [HFC-PCI]",
-"		0675 1704  ISDN Adapter (PCI Bus, D, C)",
-"		0675 1708  ISDN Adapter (PCI Bus, D, C, ACPI)",
-"		1397 2bd0  ISDN Board",
-"		e4bf 1000  CI1-1-Harp",
-"1398  Clarion co. Ltd",
-"1399  Rios systems Co Ltd",
-"139a  Alacritech Inc",
-"	0001  Quad Port 10/100 Server Accelerator",
-"	0003  Single Port 10/100 Server Accelerator",
-"	0005  Single Port Gigabit Server Accelerator",
-"139b  Mediasonic Multimedia Systems Ltd",
-"139c  Quantum 3d Inc",
-"139d  EPL limited",
-"139e  Media4",
-"139f  Aethra s.r.l.",
-"13a0  Crystal Group Inc",
-"13a1  Kawasaki Heavy Industries Ltd",
-"13a2  Ositech Communications Inc",
-"13a3  Hifn Inc.",
-"	0005  7751 Security Processor",
-"	0006  6500 Public Key Processor",
-"	0007  7811 Security Processor",
-"	0012  7951 Security Processor",
-"	0014  78XX Security Processor",
-"	0016  8065 Security Processor",
-"	0017  8165 Security Processor",
-"	0018  8154 Security Processor",
-"	001d  7956 Security Processor",
-"	0020  7955 Security Processor",
-"	0026  8155 Security Processor",
-"13a4  Rascom Inc",
-"13a5  Audio Digital Imaging Inc",
-"13a6  Videonics Inc",
-"13a7  Teles AG",
-"13a8  Exar Corp.",
-"	0152  XR17C/D152 Dual PCI UART",
-"	0154  XR17C154 Quad UART",
-"	0158  XR17C158 Octal UART",
-"13a9  Siemens Medical Systems, Ultrasound Group",
-"13aa  Broadband Networks Inc",
-"13ab  Arcom Control Systems Ltd",
-"13ac  Motion Media Technology Ltd",
-"13ad  Nexus Inc",
-"13ae  ALD Technology Ltd",
-"13af  T.Sqware",
-"13b0  Maxspeed Corp",
-"13b1  Tamura corporation",
-"13b2  Techno Chips Co. Ltd",
-"13b3  Lanart Corporation",
-"13b4  Wellbean Co Inc",
-"13b5  ARM",
-"13b6  Dlog GmbH",
-"13b7  Logic Devices Inc",
-"13b8  Nokia Telecommunications oy",
-"13b9  Elecom Co Ltd",
-"13ba  Oxford Instruments",
-"13bb  Sanyo Technosound Co Ltd",
-"13bc  Bitran Corporation",
-"13bd  Sharp corporation",
-"13be  Miroku Jyoho Service Co. Ltd",
-"13bf  Sharewave Inc",
-"13c0  Microgate Corporation",
-"	0010  SyncLink Adapter v1",
-"	0020  SyncLink SCC Adapter",
-"	0030  SyncLink Multiport Adapter",
-"	0210  SyncLink Adapter v2",
-"13c1  3ware Inc",
-"	1000  5xxx/6xxx-series PATA-RAID",
-"	1001  7xxx/8xxx-series PATA/SATA-RAID",
-"		13c1 1001  7xxx/8xxx-series PATA/SATA-RAID",
-"	1002  9xxx-series SATA-RAID",
-"	1003  9550SX SATA-RAID",
-"13c2  Technotrend Systemtechnik GmbH",
-"	000e  Technotrend/Hauppauge DVB card rev2.3",
-"13c3  Janz Computer AG",
-"13c4  Phase Metrics",
-"13c5  Alphi Technology Corp",
-"13c6  Condor Engineering Inc",
-"	0520  CEI-520 A429 Card",
-"	0620  CEI-620 A429 Card",
-"	0820  CEI-820 A429 Card",
-"13c7  Blue Chip Technology Ltd",
-"13c8  Apptech Inc",
-"13c9  Eaton Corporation",
-"13ca  Iomega Corporation",
-"13cb  Yano Electric Co Ltd",
-"13cc  Metheus Corporation",
-"13cd  Compatible Systems Corporation",
-"13ce  Cocom A/S",
-"13cf  Studio Audio & Video Ltd",
-"13d0  Techsan Electronics Co Ltd",
-"	2103  B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card",
-"	2200  B2C2 FlexCopIII DVB chip / Technisat SkyStar2 DVB card",
-"13d1  Abocom Systems Inc",
-"	ab02  ADMtek Centaur-C rev 17 [D-Link DFE-680TX] CardBus Fast Ethernet Adapter",
-"	ab03  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	ab06  RTL8139 [FE2000VX] CardBus Fast Ethernet Attached Port Adapter",
-"	ab08  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"13d2  Shark Multimedia Inc",
-"13d3  IMC Networks",
-"13d4  Graphics Microsystems Inc",
-"13d5  Media 100 Inc",
-"13d6  K.I. Technology Co Ltd",
-"13d7  Toshiba Engineering Corporation",
-"13d8  Phobos corporation",
-"13d9  Apex PC Solutions Inc",
-"13da  Intresource Systems pte Ltd",
-"13db  Janich & Klass Computertechnik GmbH",
-"13dc  Netboost Corporation",
-"13dd  Multimedia Bundle Inc",
-"13de  ABB Robotics Products AB",
-"13df  E-Tech Inc",
-"	0001  PCI56RVP Modem",
-"		13df 0001  PCI56RVP Modem",
-"13e0  GVC Corporation",
-"13e1  Silicom Multimedia Systems Inc",
-"13e2  Dynamics Research Corporation",
-"13e3  Nest Inc",
-"13e4  Calculex Inc",
-"13e5  Telesoft Design Ltd",
-"13e6  Argosy research Inc",
-"13e7  NAC Incorporated",
-"13e8  Chip Express Corporation",
-"13e9  Intraserver Technology Inc",
-"13ea  Dallas Semiconductor",
-"13eb  Hauppauge Computer Works Inc",
-"13ec  Zydacron Inc",
-"	000a  NPC-RC01 Remote control receiver",
-"13ed  Raytheion E-Systems",
-"13ee  Hayes Microcomputer Products Inc",
-"13ef  Coppercom Inc",
-"13f0  Sundance Technology Inc / IC Plus Corp",
-"	0200  IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY",
-"	0201  ST201 Sundance Ethernet",
-"	1023  IC Plus IP1000 Family Gigabit Ethernet",
-"13f1  Oce' - Technologies B.V.",
-"13f2  Ford Microelectronics Inc",
-"13f3  Mcdata Corporation",
-"13f4  Troika Networks, Inc.",
-"	1401  Zentai Fibre Channel Adapter",
-"13f5  Kansai Electric Co. Ltd",
-"13f6  C-Media Electronics Inc",
-"	0011  CMI8738",
-"	0100  CM8338A",
-"		13f6 ffff  CMI8338/C3DX PCI Audio Device",
-"	0101  CM8338B",
-"		13f6 0101  CMI8338-031 PCI Audio Device",
-"	0111  CM8738",
-"		1019 0970  P6STP-FL motherboard",
-"		1043 8035  CUSI-FX motherboard",
-"		1043 8077  CMI8738 6-channel audio controller",
-"		1043 80e2  CMI8738 6ch-MX",
-"		13f6 0111  CMI8738/C3DX PCI Audio Device",
-"		1681 a000  Gamesurround MUSE XL",
-"	0211  CM8738",
-"13f7  Wildfire Communications",
-"13f8  Ad Lib Multimedia Inc",
-"13f9  NTT Advanced Technology Corp.",
-"13fa  Pentland Systems Ltd",
-"13fb  Aydin Corp",
-"13fc  Computer Peripherals International",
-"13fd  Micro Science Inc",
-"13fe  Advantech Co. Ltd",
-"	1240  PCI-1240 4-channel stepper motor controller card",
-"	1600  PCI-1612 4-port RS-232/422/485 PCI communication card",
-"	1733  PCI-1733 32-channel isolated digital input card",
-"	1752  PCI-1752",
-"	1754  PCI-1754",
-"	1756  PCI-1756",
-"13ff  Silicon Spice Inc",
-"1400  Artx Inc",
-"	1401  9432 TX",
-"1401  CR-Systems A/S",
-"1402  Meilhaus Electronic GmbH",
-"1403  Ascor Inc",
-"1404  Fundamental Software Inc",
-"1405  Excalibur Systems Inc",
-"1406  Oce' Printing Systems GmbH",
-"1407  Lava Computer mfg Inc",
-"	0100  Lava Dual Serial",
-"	0101  Lava Quatro A",
-"	0102  Lava Quatro B",
-"	0110  Lava DSerial-PCI Port A",
-"	0111  Lava DSerial-PCI Port B",
-"	0120  Quattro-PCI A",
-"	0121  Quattro-PCI B",
-"	0180  Lava Octo A",
-"	0181  Lava Octo B",
-"	0200  Lava Port Plus",
-"	0201  Lava Quad A",
-"	0202  Lava Quad B",
-"	0220  Lava Quattro PCI Ports A/B",
-"	0221  Lava Quattro PCI Ports C/D",
-"	0500  Lava Single Serial",
-"	0600  Lava Port 650",
-"	8000  Lava Parallel",
-"	8001  Dual parallel port controller A",
-"	8002  Lava Dual Parallel port A",
-"	8003  Lava Dual Parallel port B",
-"	8800  BOCA Research IOPPAR",
-"1408  Aloka Co. Ltd",
-"1409  Timedia Technology Co Ltd",
-"	7168  PCI2S550 (Dual 16550 UART)",
-"140a  DSP Research Inc",
-"140b  Ramix Inc",
-"140c  Elmic Systems Inc",
-"140d  Matsushita Electric Works Ltd",
-"140e  Goepel Electronic GmbH",
-"140f  Salient Systems Corp",
-"1410  Midas lab Inc",
-"1411  Ikos Systems Inc",
-"1412  VIA Technologies Inc.",
-"	1712  ICE1712 [Envy24] PCI Multi-Channel I/O Controller",
-"		1412 1712  Hoontech ST Audio DSP 24",
-"		1412 d630  M-Audio Delta 1010",
-"		1412 d631  M-Audio Delta DiO",
-"		1412 d632  M-Audio Delta 66",
-"		1412 d633  M-Audio Delta 44",
-"		1412 d634  M-Audio Delta Audiophile",
-"		1412 d635  M-Audio Delta TDIF",
-"		1412 d637  M-Audio Delta RBUS",
-"		1412 d638  M-Audio Delta 410",
-"		1412 d63b  M-Audio Delta 1010LT",
-"		1412 d63c  Digigram VX442",
-"		1416 1712  Hoontech ST Audio DSP 24 Media 7.1",
-"		153b 1115  EWS88 MT",
-"		153b 1125  EWS88 MT (Master)",
-"		153b 112b  EWS88 D",
-"		153b 112c  EWS88 D (Master)",
-"		153b 1130  EWX 24/96",
-"		153b 1138  DMX 6fire 24/96",
-"		153b 1151  PHASE88",
-"		16ce 1040  Edirol DA-2496",
-"	1724  VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller",
-"		1412 1724  Albatron PX865PE 7.1",
-"		1412 3630  M-Audio Revolution 7.1",
-"		1412 3631  M-Audio Revolution 5.1",
-"		153b 1145  Aureon 7.1 Space",
-"		153b 1147  Aureon 5.1 Sky",
-"		153b 1153  Aureon 7.1 Universe",
-"		270f f641  ZNF3-150",
-"		270f f645  ZNF3-250",
-"1413  Addonics",
-"1414  Microsoft Corporation",
-"1415  Oxford Semiconductor Ltd",
-"	8403  VScom 011H-EP1 1 port parallel adaptor",
-"	9501  OX16PCI954 (Quad 16950 UART) function 0",
-"		131f 2050  CyberPro (4-port)",
-"		131f 2051  CyberSerial 4S Plus",
-"		15ed 2000  MCCR Serial p0-3 of 8",
-"		15ed 2001  MCCR Serial p0-3 of 16",
-"	950a  EXSYS EX-41092 Dual 16950 Serial adapter",
-"	950b  OXCB950 Cardbus 16950 UART",
-"	9510  OX16PCI954 (Quad 16950 UART) function 1 (Disabled)",
-"	9511  OX16PCI954 (Quad 16950 UART) function 1",
-"		15ed 2000  MCCR Serial p4-7 of 8",
-"		15ed 2001  MCCR Serial p4-15 of 16",
-"	9521  OX16PCI952 (Dual 16950 UART)",
-"	9523  OX16PCI952 Integrated Parallel Port",
-"1416  Multiwave Innovation pte Ltd",
-"1417  Convergenet Technologies Inc",
-"1418  Kyushu electronics systems Inc",
-"1419  Excel Switching Corp",
-"141a  Apache Micro Peripherals Inc",
-"141b  Zoom Telephonics Inc",
-"141d  Digitan Systems Inc",
-"141e  Fanuc Ltd",
-"141f  Visiontech Ltd",
-"1420  Psion Dacom plc",
-"	8002  Gold Card NetGlobal 56k+10/100Mb CardBus (Ethernet part)",
-"	8003  Gold Card NetGlobal 56k+10/100Mb CardBus (Modem part)",
-"1421  Ads Technologies Inc",
-"1422  Ygrec Systems Co Ltd",
-"1423  Custom Technology Corp.",
-"1424  Videoserver Connections",
-"1425  Chelsio Communications Inc",
-"	000b  T210 Protocol Engine",
-"1426  Storage Technology Corp.",
-"1427  Better On-Line Solutions",
-"1428  Edec Co Ltd",
-"1429  Unex Technology Corp.",
-"142a  Kingmax Technology Inc",
-"142b  Radiolan",
-"142c  Minton Optic Industry Co Ltd",
-"142d  Pix stream Inc",
-"142e  Vitec Multimedia",
-"	4020  VM2-2 [Video Maker 2] MPEG1/2 Encoder",
-"	4337  VM2-2-C7 [Video Maker 2 rev. C7] MPEG1/2 Encoder",
-"142f  Radicom Research Inc",
-"1430  ITT Aerospace/Communications Division",
-"1431  Gilat Satellite Networks",
-"1432  Edimax Computer Co.",
-"	9130  RTL81xx Fast Ethernet",
-"1433  Eltec Elektronik GmbH",
-"1435  RTD Embedded Technologies, Inc.",
-"1436  CIS Technology Inc",
-"1437  Nissin Inc Co",
-"1438  Atmel-dream",
-"1439  Outsource Engineering & Mfg. Inc",
-"143a  Stargate Solutions Inc",
-"143b  Canon Research Center, America",
-"143c  Amlogic Inc",
-"143d  Tamarack Microelectronics Inc",
-"143e  Jones Futurex Inc",
-"143f  Lightwell Co Ltd - Zax Division",
-"1440  ALGOL Corp.",
-"1441  AGIE Ltd",
-"1442  Phoenix Contact GmbH & Co.",
-"1443  Unibrain S.A.",
-"1444  TRW",
-"1445  Logical DO Ltd",
-"1446  Graphin Co Ltd",
-"1447  AIM GmBH",
-"1448  Alesis Studio Electronics",
-"1449  TUT Systems Inc",
-"144a  Adlink Technology",
-"	7296  PCI-7296",
-"	7432  PCI-7432",
-"	7433  PCI-7433",
-"	7434  PCI-7434",
-"	7841  PCI-7841",
-"	8133  PCI-8133",
-"	8164  PCI-8164",
-"	8554  PCI-8554",
-"	9111  PCI-9111",
-"	9113  PCI-9113",
-"	9114  PCI-9114",
-"144b  Loronix Information Systems Inc",
-"144c  Catalina Research Inc",
-"144d  Samsung Electronics Co Ltd",
-"	c00c  P35 laptop",
-"144e  OLITEC",
-"144f  Askey Computer Corp.",
-"1450  Octave Communications Ind.",
-"1451  SP3D Chip Design GmBH",
-"1453  MYCOM Inc",
-"1454  Altiga Networks",
-"1455  Logic Plus Plus Inc",
-"1456  Advanced Hardware Architectures",
-"1457  Nuera Communications Inc",
-"1458  Giga-byte Technology",
-"	0c11  K8NS Pro Mainboard",
-"	e911  GN-WIAG02",
-"1459  DOOIN Electronics",
-"145a  Escalate Networks Inc",
-"145b  PRAIM SRL",
-"145c  Cryptek",
-"145d  Gallant Computer Inc",
-"145e  Aashima Technology B.V.",
-"145f  Baldor Electric Company",
-"	0001  NextMove PCI",
-"1460  DYNARC INC",
-"1461  Avermedia Technologies Inc",
-"	f436  AVerTV Hybrid+FM",
-"1462  Micro-Star International Co., Ltd.",
-"	5501  nVidia NV15DDR [GeForce2 Ti]",
-"	6819  Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [MSI CB54G]",
-"	6825  PCI Card wireless 11g [PC54G]",
-"	6834  RaLink RT2500 802.11g [PC54G2]",
-"	7125  K8N motherboard",
-"	8725  NVIDIA NV25 [GeForce4 Ti 4600] VGA Adapter",
-"	9000  NVIDIA NV28 [GeForce4 Ti 4800] VGA Adapter",
-"	9110  GeFORCE FX5200",
-"	9119  NVIDIA NV31 [GeForce FX 5600XT] VGA Adapter",
-"	9123  NVIDIA NV31 [GeForce FX 5600] FX5600-VTDR128 [MS-8912]",
-"	9591  nVidia Corporation NV36 [GeForce FX 5700LE]",
-"1463  Fast Corporation",
-"1464  Interactive Circuits & Systems Ltd",
-"1465  GN NETTEST Telecom DIV.",
-"1466  Designpro Inc.",
-"1467  DIGICOM SPA",
-"1468  AMBIT Microsystem Corp.",
-"1469  Cleveland Motion Controls",
-"146a  IFR",
-"146b  Parascan Technologies Ltd",
-"146c  Ruby Tech Corp.",
-"	1430  FE-1430TX Fast Ethernet PCI Adapter",
-"146d  Tachyon, INC.",
-"146e  Williams Electronics Games, Inc.",
-"146f  Multi Dimensional Consulting Inc",
-"1470  Bay Networks",
-"1471  Integrated Telecom Express Inc",
-"1472  DAIKIN Industries, Ltd",
-"1473  ZAPEX Technologies Inc",
-"1474  Doug Carson & Associates",
-"1475  PICAZO Communications",
-"1476  MORTARA Instrument Inc",
-"1477  Net Insight",
-"1478  DIATREND Corporation",
-"1479  TORAY Industries Inc",
-"147a  FORMOSA Industrial Computing",
-"147b  ABIT Computer Corp.",
-"147c  AWARE, Inc.",
-"147d  Interworks Computer Products",
-"147e  Matsushita Graphic Communication Systems, Inc.",
-"147f  NIHON UNISYS, Ltd.",
-"1480  SCII Telecom",
-"1481  BIOPAC Systems Inc",
-"1482  ISYTEC - Integrierte Systemtechnik GmBH",
-"1483  LABWAY Corporation",
-"1484  Logic Corporation",
-"1485  ERMA - Electronic GmBH",
-"1486  L3 Communications Telemetry & Instrumentation",
-"1487  MARQUETTE Medical Systems",
-"1488  KONTRON Electronik GmBH",
-"1489  KYE Systems Corporation",
-"148a  OPTO",
-"148b  INNOMEDIALOGIC Inc.",
-"148c  C.P. Technology Co. Ltd",
-"148d  DIGICOM Systems, Inc.",
-"	1003  HCF 56k Data/Fax Modem",
-"148e  OSI Plus Corporation",
-"148f  Plant Equipment, Inc.",
-"1490  Stone Microsystems PTY Ltd.",
-"1491  ZEAL Corporation",
-"1492  Time Logic Corporation",
-"1493  MAKER Communications",
-"1494  WINTOP Technology, Inc.",
-"1495  TOKAI Communications Industry Co. Ltd",
-"1496  JOYTECH Computer Co., Ltd.",
-"1497  SMA Regelsysteme GmBH",
-"	1497  SMA Technologie AG",
-"1498  TEWS Datentechnik GmBH",
-"	0330  TPMC816 2 Channel CAN bus controller.",
-"	0385  TPMC901 Extended CAN bus with 2/4/6 CAN controller",
-"	21cd  TCP461 CompactPCI 8 Channel Serial Interface RS232/RS422",
-"	30c8  TPCI200",
-"1499  EMTEC CO., Ltd",
-"149a  ANDOR Technology Ltd",
-"149b  SEIKO Instruments Inc",
-"149c  OVISLINK Corp.",
-"149d  NEWTEK Inc",
-"	0001  Video Toaster for PC",
-"149e  Mapletree Networks Inc.",
-"149f  LECTRON Co Ltd",
-"14a0  SOFTING GmBH",
-"14a1  Systembase Co Ltd",
-"14a2  Millennium Engineering Inc",
-"14a3  Maverick Networks",
-"14a4  GVC/BCM Advanced Research",
-"14a5  XIONICS Document Technologies Inc",
-"14a6  INOVA Computers GmBH & Co KG",
-"14a7  MYTHOS Systems Inc",
-"14a8  FEATRON Technologies Corporation",
-"14a9  HIVERTEC Inc",
-"14aa  Advanced MOS Technology Inc",
-"14ab  Mentor Graphics Corp.",
-"14ac  Novaweb Technologies Inc",
-"14ad  Time Space Radio AB",
-"14ae  CTI, Inc",
-"14af  Guillemot Corporation",
-"	7102  3D Prophet II MX",
-"14b0  BST Communication Technology Ltd",
-"14b1  Nextcom K.K.",
-"14b2  ENNOVATE Networks Inc",
-"14b3  XPEED Inc",
-"	0000  DSL NIC",
-"14b4  PHILIPS Business Electronics B.V.",
-"14b5  Creamware GmBH",
-"	0200  Scope",
-"	0300  Pulsar",
-"	0400  PulsarSRB",
-"	0600  Pulsar2",
-"	0800  DSP-Board",
-"	0900  DSP-Board",
-"	0a00  DSP-Board",
-"	0b00  DSP-Board",
-"14b6  Quantum Data Corp.",
-"14b7  PROXIM Inc",
-"	0001  Symphony 4110",
-"14b8  Techsoft Technology Co Ltd",
-"14b9  AIRONET Wireless Communications",
-"	0001  PC4800",
-"	0340  PC4800",
-"	0350  PC4800",
-"	4500  PC4500",
-"	4800  Cisco Aironet 340 802.11b Wireless LAN Adapter/Aironet PC4800",
-"	a504  Cisco Aironet Wireless 802.11b",
-"	a505  Cisco Aironet CB20a 802.11a Wireless LAN Adapter",
-"	a506  Cisco Aironet Mini PCI b/g",
-"14ba  INTERNIX Inc.",
-"14bb  SEMTECH Corporation",
-"14bc  Globespan Semiconductor Inc.",
-"14bd  CARDIO Control N.V.",
-"14be  L3 Communications",
-"14bf  SPIDER Communications Inc.",
-"14c0  COMPAL Electronics Inc",
-"14c1  MYRICOM Inc.",
-"	0008  Myri-10G Dual-Protocol Interconnect",
-"	8043  Myrinet 2000 Scalable Cluster Interconnect",
-"14c2  DTK Computer",
-"14c3  MEDIATEK Corp.",
-"14c4  IWASAKI Information Systems Co Ltd",
-"14c5  Automation Products AB",
-"14c6  Data Race Inc",
-"14c7  Modular Technology Holdings Ltd",
-"14c8  Turbocomm Tech. Inc.",
-"14c9  ODIN Telesystems Inc",
-"14ca  PE Logic Corp.",
-"14cb  Billionton Systems Inc",
-"14cc  NAKAYO Telecommunications Inc",
-"14cd  Universal Scientific Ind.",
-"14ce  Whistle Communications",
-"14cf  TEK Microsystems Inc.",
-"14d0  Ericsson Axe R & D",
-"14d1  Computer Hi-Tech Co Ltd",
-"14d2  Titan Electronics Inc",
-"	8001  VScom 010L 1 port parallel adaptor",
-"	8002  VScom 020L 2 port parallel adaptor",
-"	8010  VScom 100L 1 port serial adaptor",
-"	8011  VScom 110L 1 port serial and 1 port parallel adaptor",
-"	8020  VScom 200L 1 port serial adaptor",
-"	8021  VScom 210L 2 port serial and 1 port parallel adaptor",
-"	8040  VScom 400L 4 port serial adaptor",
-"	8080  VScom 800L 8 port serial adaptor",
-"	a000  VScom 010H 1 port parallel adaptor",
-"	a001  VScom 100H 1 port serial adaptor",
-"	a003  VScom 400H 4 port serial adaptor",
-"	a004  VScom 400HF1 4 port serial adaptor",
-"	a005  VScom 200H 2 port serial adaptor",
-"	e001  VScom 010HV2 1 port parallel adaptor",
-"	e010  VScom 100HV2 1 port serial adaptor",
-"	e020  VScom 200HV2 2 port serial adaptor",
-"14d3  CIRTECH (UK) Ltd",
-"14d4  Panacom Technology Corp",
-"14d5  Nitsuko Corporation",
-"14d6  Accusys Inc",
-"14d7  Hirakawa Hewtech Corp",
-"14d8  HOPF Elektronik GmBH",
-"14d9  Alliance Semiconductor Corporation",
-"	0010  AP1011/SP1011 HyperTransport-PCI Bridge [Sturgeon]",
-"	9000  AS90L10204/10208 HyperTransport to PCI-X Bridge",
-"14da  National Aerospace Laboratories",
-"14db  AFAVLAB Technology Inc",
-"	2120  TK9902",
-"	2182  AFAVLAB Technology Inc. 8-port serial card",
-"14dc  Amplicon Liveline Ltd",
-"	0000  PCI230",
-"	0001  PCI242",
-"	0002  PCI244",
-"	0003  PCI247",
-"	0004  PCI248",
-"	0005  PCI249",
-"	0006  PCI260",
-"	0007  PCI224",
-"	0008  PCI234",
-"	0009  PCI236",
-"	000a  PCI272",
-"	000b  PCI215",
-"14dd  Boulder Design Labs Inc",
-"14de  Applied Integration Corporation",
-"14df  ASIC Communications Corp",
-"14e1  INVERTEX",
-"14e2  INFOLIBRIA",
-"14e3  AMTELCO",
-"14e4  Broadcom Corporation",
-"	0800  Sentry5 Chipcommon I/O Controller",
-"	0804  Sentry5 PCI Bridge",
-"	0805  Sentry5 MIPS32 CPU",
-"	0806  Sentry5 Ethernet Controller",
-"	080b  Sentry5 Crypto Accelerator",
-"	080f  Sentry5 DDR/SDR RAM Controller",
-"	0811  Sentry5 External Interface Core",
-"	0816  BCM3302 Sentry5 MIPS32 CPU",
-"	1600  NetXtreme BCM5752 Gigabit Ethernet PCI Express",
-"	1601  NetXtreme BCM5752M Gigabit Ethernet PCI Express",
-"	1644  NetXtreme BCM5700 Gigabit Ethernet",
-"		1014 0277  Broadcom Vigil B5700 1000Base-T",
-"		1028 00d1  Broadcom BCM5700",
-"		1028 0106  Broadcom BCM5700",
-"		1028 0109  Broadcom BCM5700 1000Base-T",
-"		1028 010a  Broadcom BCM5700 1000BaseTX",
-"		10b7 1000  3C996-T 1000Base-T",
-"		10b7 1001  3C996B-T 1000Base-T",
-"		10b7 1002  3C996C-T 1000Base-T",
-"		10b7 1003  3C997-T 1000Base-T Dual Port",
-"		10b7 1004  3C996-SX 1000Base-SX",
-"		10b7 1005  3C997-SX 1000Base-SX Dual Port",
-"		10b7 1008  3C942 Gigabit LOM (31X31)",
-"		14e4 0002  NetXtreme 1000Base-SX",
-"		14e4 0003  NetXtreme 1000Base-SX",
-"		14e4 0004  NetXtreme 1000Base-T",
-"		14e4 1028  NetXtreme 1000BaseTX",
-"		14e4 1644  BCM5700 1000Base-T",
-"	1645  NetXtreme BCM5701 Gigabit Ethernet",
-"		0e11 007c  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
-"		0e11 007d  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)",
-"		0e11 0085  NC7780 Gigabit Server Adapter (embedded, WOL)",
-"		0e11 0099  NC7780 Gigabit Server Adapter (embedded, WOL)",
-"		0e11 009a  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
-"		0e11 00c1  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)",
-"		1028 0121  Broadcom BCM5701 1000Base-T",
-"		103c 128a  1000Base-T (PCI) [A7061A]",
-"		103c 128b  1000Base-SX (PCI) [A7073A]",
-"		103c 12a4  Core Lan 1000Base-T",
-"		103c 12c1  IOX Core Lan 1000Base-T [A7109AX]",
-"		103c 1300  Core LAN/SCSI Combo [A6794A]",
-"		10a9 8010  IO9/IO10 Gigabit Ethernet (Copper)",
-"		10a9 8011  Gigabit Ethernet (Copper)",
-"		10a9 8012  Gigabit Ethernet (Fiber)",
-"		10b7 1004  3C996-SX 1000Base-SX",
-"		10b7 1006  3C996B-T 1000Base-T",
-"		10b7 1007  3C1000-T 1000Base-T",
-"		10b7 1008  3C940-BR01 1000Base-T",
-"		14e4 0001  BCM5701 1000Base-T",
-"		14e4 0005  BCM5701 1000Base-T",
-"		14e4 0006  BCM5701 1000Base-T",
-"		14e4 0007  BCM5701 1000Base-SX",
-"		14e4 0008  BCM5701 1000Base-T",
-"		14e4 8008  BCM5701 1000Base-T",
-"	1646  NetXtreme BCM5702 Gigabit Ethernet",
-"		0e11 00bb  NC7760 1000BaseTX",
-"		1028 0126  Broadcom BCM5702 1000BaseTX",
-"		14e4 8009  BCM5702 1000BaseTX",
-"	1647  NetXtreme BCM5703 Gigabit Ethernet",
-"		0e11 0099  NC7780 1000BaseTX",
-"		0e11 009a  NC7770 1000BaseTX",
-"		10a9 8010  SGI IO9 Gigabit Ethernet (Copper)",
-"		14e4 0009  BCM5703 1000BaseTX",
-"		14e4 000a  BCM5703 1000BaseSX",
-"		14e4 000b  BCM5703 1000BaseTX",
-"		14e4 8009  BCM5703 1000BaseTX",
-"		14e4 800a  BCM5703 1000BaseTX",
-"	1648  NetXtreme BCM5704 Gigabit Ethernet",
-"		0e11 00cf  NC7772 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00d0  NC7782 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00d1  NC7783 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		10b7 2000  3C998-T Dual Port 10/100/1000 PCI-X",
-"		10b7 3000  3C999-T Quad Port 10/100/1000 PCI-X",
-"		1166 1648  NetXtreme CIOB-E 1000Base-T",
-"		1734 100b  Primergy RX300",
-"	164a  NetXtreme II BCM5706 Gigabit Ethernet",
-"		103c 3101  NC370T MultifuNCtion Gigabit Server Adapter",
-"	164c  NetXtreme II BCM5708 Gigabit Ethernet",
-"	164d  NetXtreme BCM5702FE Gigabit Ethernet",
-"	1653  NetXtreme BCM5705 Gigabit Ethernet",
-"		0e11 00e3  NC7761 Gigabit Server Adapter",
-"	1654  NetXtreme BCM5705_2 Gigabit Ethernet",
-"		0e11 00e3  NC7761 Gigabit Server Adapter",
-"		103c 3100  NC1020 HP ProLiant Gigabit Server Adapter 32 PCI",
-"		103c 3226  NC150T 4-port Gigabit Combo Switch & Adapter",
-"	1659  NetXtreme BCM5721 Gigabit Ethernet PCI Express",
-"		1014 02c6  eServer xSeries server mainboard",
-"		103c 7031  NC320T PCIe Gigabit Server Adapter",
-"		103c 7032  NC320i PCIe Gigabit Server Adapter",
-"		1734 1061  Primergy RX300 S2",
-"	165d  NetXtreme BCM5705M Gigabit Ethernet",
-"		1028 865d  Latitude D400",
-"	165e  NetXtreme BCM5705M_2 Gigabit Ethernet",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		103c 099c  NX6110/NC6120",
-"	1668  NetXtreme BCM5714 Gigabit Ethernet",
-"		103c 7039  NC324i PCIe Dual Port Gigabit Server Adapter",
-"	1669  NetXtreme 5714S Gigabit Ethernet",
-"	166a  NetXtreme BCM5780 Gigabit Ethernet",
-"	166b  NetXtreme BCM5780S Gigabit Ethernet",
-"	166e  570x 10/100 Integrated Controller",
-"	1672  NetXtreme BCM5754M Gigabit Ethernet PCI Express",
-"	1673  NetXtreme BCM5755M Gigabit Ethernet PCI Express",
-"	1677  NetXtreme BCM5751 Gigabit Ethernet PCI Express",
-"		1028 0179  Optiplex GX280",
-"		1028 0182  Latitude D610",
-"		1028 0187  Precision M70",
-"		1028 01ad  Optiplex GX620",
-"		103c 3006  DC7100 SFF(DX878AV)",
-"		1734 105d  Scenic W620",
-"	1678  NetXtreme BCM5715 Gigabit Ethernet",
-"	1679  NetXtreme 5715S Gigabit Ethernet",
-"		103c 703c  NC326i PCIe Dual Port Gigabit Server Adapter",
-"	167a  NetXtreme BCM5754 Gigabit Ethernet PCI Express",
-"	167b  NetXtreme BCM5755 Gigabit Ethernet PCI Express",
-"	167d  NetXtreme BCM5751M Gigabit Ethernet PCI Express",
-"	167e  NetXtreme BCM5751F Fast Ethernet PCI Express",
-"	1693  NetLink BCM5787M Gigabit Ethernet PCI Express",
-"	1696  NetXtreme BCM5782 Gigabit Ethernet",
-"		103c 12bc  HP d530 CMT (DG746A)",
-"		14e4 000d  NetXtreme BCM5782 1000Base-T",
-"	169b  NetLink BCM5787 Gigabit Ethernet PCI Express",
-"	169c  NetXtreme BCM5788 Gigabit Ethernet",
-"		103c 308b  MX6125",
-"	169d  NetLink BCM5789 Gigabit Ethernet PCI Express",
-"	16a6  NetXtreme BCM5702X Gigabit Ethernet",
-"		0e11 00bb  NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
-"		1028 0126  BCM5702 1000Base-T",
-"		14e4 000c  BCM5702 1000Base-T",
-"		14e4 8009  BCM5702 1000Base-T",
-"	16a7  NetXtreme BCM5703X Gigabit Ethernet",
-"		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		14e4 0009  NetXtreme BCM5703 1000Base-T",
-"		14e4 000a  NetXtreme BCM5703 1000Base-SX",
-"		14e4 000b  NetXtreme BCM5703 1000Base-T",
-"		14e4 800a  NetXtreme BCM5703 1000Base-T",
-"	16a8  NetXtreme BCM5704S Gigabit Ethernet",
-"		10b7 2001  3C998-SX Dual Port 1000-SX PCI-X",
-"	16aa  NetXtreme II BCM5706S Gigabit Ethernet",
-"		103c 3102  NC370F MultifuNCtion Gigabit Server Adapter",
-"	16ac  NetXtreme II BCM5708S Gigabit Ethernet",
-"	16c6  NetXtreme BCM5702A3 Gigabit Ethernet",
-"		10b7 1100  3C1000B-T 10/100/1000 PCI",
-"		14e4 000c  BCM5702 1000Base-T",
-"		14e4 8009  BCM5702 1000Base-T",
-"	16c7  NetXtreme BCM5703 Gigabit Ethernet",
-"		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		103c 12c3  Combo FC/GigE-SX [A9782A]",
-"		103c 12ca  Combo FC/GigE-T [A9784A]",
-"		14e4 0009  NetXtreme BCM5703 1000Base-T",
-"		14e4 000a  NetXtreme BCM5703 1000Base-SX",
-"	16dd  NetLink BCM5781 Gigabit Ethernet PCI Express",
-"	16f7  NetXtreme BCM5753 Gigabit Ethernet PCI Express",
-"	16fd  NetXtreme BCM5753M Gigabit Ethernet PCI Express",
-"	16fe  NetXtreme BCM5753F Fast Ethernet PCI Express",
-"	170c  BCM4401-B0 100Base-TX",
-"		1028 0188  Inspiron 6000 laptop",
-"		1028 0196  Inspiron 5160",
-"		103c 099c  NX6110/NC6120",
-"	170d  NetXtreme BCM5901 100Base-TX",
-"		1014 0545  ThinkPad R40e (2684-HVG) builtin ethernet controller",
-"	170e  NetXtreme BCM5901 100Base-TX",
-"	3352  BCM3352",
-"	3360  BCM3360",
-"	4210  BCM4210 iLine10 HomePNA 2.0",
-"	4211  BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem",
-"	4212  BCM4212 v.90 56k modem",
-"	4301  BCM4303 802.11b Wireless LAN Controller",
-"		1028 0407  TrueMobile 1180 Onboard WLAN",
-"		1043 0120  WL-103b Wireless LAN PC Card",
-"	4305  BCM4307 V.90 56k Modem",
-"	4306  BCM4307 Ethernet Controller",
-"	4307  BCM4307 802.11b Wireless LAN Controller",
-"	4310  BCM4310 Chipcommon I/OController",
-"	4312  BCM4310 UART",
-"	4313  BCM4310 Ethernet Controller",
-"	4315  BCM4310 USB Controller",
-"	4318  BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller",
-"		103c 1356  MX6125",
-"		1043 120f  A6U notebook embedded card",
-"		1468 0311  Aspire 3022WLMi, 5024WLMi",
-"		1468 0312  TravelMate 2410",
-"		14e4 0449  Gateway 7510GX",
-"		14e4 4318  WPC54G version 3 [Wireless-G Notebook Adapter] 802.11g Wireless Lan Controller",
-"		16ec 0119  U.S.Robotics Wireless MAXg PC Card",
-"		1737 0048  WPC54G-EU version 3 [Wireless-G Notebook Adapter]",
-"	4319  Dell Wireless 1470 DualBand WLAN",
-"	4320  BCM4306 802.11b/g Wireless LAN Controller",
-"		1028 0001  TrueMobile 1300 WLAN Mini-PCI Card",
-"		1028 0003  Wireless 1350 WLAN Mini-PCI Card",
-"		103c 12f4  NX9500 Built-in Wireless",
-"		103c 12fa  Presario R3000 802.11b/g",
-"		1043 100f  WL-100G",
-"		1057 7025  WN825G",
-"		106b 004e  AirPort Extreme",
-"		1154 0330  Buffalo WLI2-PCI-G54S High Speed Mode Wireless Desktop Adapter",
-"		144f 7050  eMachines M6805 802.11g Built-in Wireless",
-"		14e4 4320  Linksys WMP54G PCI",
-"		1737 4320  WPC54G",
-"		1799 7001  Belkin F5D7001 High-Speed Mode Wireless G Network Card",
-"		1799 7010  Belkin F5D7010 54g Wireless Network card",
-"		185f 1220  TravelMate 290E WLAN Mini-PCI Card",
-"	4321  BCM4306 802.11a Wireless LAN Controller",
-"	4322  BCM4306 UART",
-"	4324  BCM4309 802.11a/b/g",
-"		1028 0001  Truemobile 1400",
-"		1028 0003  Truemobile 1450 MiniPCI",
-"	4325  BCM43xG 802.11b/g",
-"		1414 0003  Wireless Notebook Adapter MN-720",
-"		1414 0004  Wireless PCI Adapter MN-730",
-"	4326  BCM4307 Chipcommon I/O Controller\?",
-"	4401  BCM4401 100Base-T",
-"		1043 80a8  A7V8X motherboard",
-"	4402  BCM4402 Integrated 10/100BaseT",
-"	4403  BCM4402 V.90 56k Modem",
-"	4410  BCM4413 iLine32 HomePNA 2.0",
-"	4411  BCM4413 V.90 56k modem",
-"	4412  BCM4412 10/100BaseT",
-"	4430  BCM44xx CardBus iLine32 HomePNA 2.0",
-"	4432  BCM4432 CardBus 10/100BaseT",
-"	4610  BCM4610 Sentry5 PCI to SB Bridge",
-"	4611  BCM4610 Sentry5 iLine32 HomePNA 1.0",
-"	4612  BCM4610 Sentry5 V.90 56k Modem",
-"	4613  BCM4610 Sentry5 Ethernet Controller",
-"	4614  BCM4610 Sentry5 External Interface",
-"	4615  BCM4610 Sentry5 USB Controller",
-"	4704  BCM4704 PCI to SB Bridge",
-"	4705  BCM4704 Sentry5 802.11b Wireless LAN Controller",
-"	4706  BCM4704 Sentry5 Ethernet Controller",
-"	4707  BCM4704 Sentry5 USB Controller",
-"	4708  BCM4704 Crypto Accelerator",
-"	4710  BCM4710 Sentry5 PCI to SB Bridge",
-"	4711  BCM47xx Sentry5 iLine32 HomePNA 2.0",
-"	4712  BCM47xx V.92 56k modem",
-"	4713  Sentry5 Ethernet Controller",
-"	4714  BCM47xx Sentry5 External Interface",
-"	4715  Sentry5 USB Controller",
-"	4716  BCM47xx Sentry5 USB Host Controller",
-"	4717  BCM47xx Sentry5 USB Device Controller",
-"	4718  Sentry5 Crypto Accelerator",
-"	4719  BCM47xx/53xx RoboSwitch Core",
-"	4720  BCM4712 MIPS CPU",
-"	5365  BCM5365P Sentry5 Host Bridge",
-"	5600  BCM5600 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5605  BCM5605 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5615  BCM5615 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5625  BCM5625 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5645  BCM5645 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5670  BCM5670 8-Port 10GE Ethernet Switch Fabric",
-"	5680  BCM5680 G-Switch 8 Port Gigabit Ethernet Switch Controller",
-"	5690  BCM5690 12-port Multi-Layer Gigabit Ethernet Switch",
-"	5691  BCM5691 GE/10GE 8+2 Gigabit Ethernet Switch Controller",
-"	5692  BCM5692 12-port Multi-Layer Gigabit Ethernet Switch",
-"	5820  BCM5820 Crypto Accelerator",
-"	5821  BCM5821 Crypto Accelerator",
-"	5822  BCM5822 Crypto Accelerator",
-"	5823  BCM5823 Crypto Accelerator",
-"	5824  BCM5824 Crypto Accelerator",
-"	5840  BCM5840 Crypto Accelerator",
-"	5841  BCM5841 Crypto Accelerator",
-"	5850  BCM5850 Crypto Accelerator",
-"14e5  Pixelfusion Ltd",
-"14e6  SHINING Technology Inc",
-"14e7  3CX",
-"14e8  RAYCER Inc",
-"14e9  GARNETS System CO Ltd",
-"14ea  Planex Communications, Inc",
-"	ab06  FNW-3603-TX CardBus Fast Ethernet",
-"	ab07  RTL81xx RealTek Ethernet",
-"	ab08  FNW-3602-TX CardBus Fast Ethernet",
-"14eb  SEIKO EPSON Corp",
-"14ec  ACQIRIS",
-"14ed  DATAKINETICS Ltd",
-"14ee  MASPRO KENKOH Corp",
-"14ef  CARRY Computer ENG. CO Ltd",
-"14f0  CANON RESEACH CENTRE FRANCE",
-"14f1  Conexant",
-"	1002  HCF 56k Modem",
-"	1003  HCF 56k Modem",
-"	1004  HCF 56k Modem",
-"	1005  HCF 56k Modem",
-"	1006  HCF 56k Modem",
-"	1022  HCF 56k Modem",
-"	1023  HCF 56k Modem",
-"	1024  HCF 56k Modem",
-"	1025  HCF 56k Modem",
-"	1026  HCF 56k Modem",
-"	1032  HCF 56k Modem",
-"	1033  HCF 56k Data/Fax Modem",
-"		1033 8077  NEC",
-"		122d 4027  Dell Zeus - MDP3880-W(B) Data Fax Modem",
-"		122d 4030  Dell Mercury - MDP3880-U(B) Data Fax Modem",
-"		122d 4034  Dell Thor - MDP3880-W(U) Data Fax Modem",
-"		13e0 020d  Dell Copper",
-"		13e0 020e  Dell Silver",
-"		13e0 0261  IBM",
-"		13e0 0290  Compaq Goldwing",
-"		13e0 02a0  IBM",
-"		13e0 02b0  IBM",
-"		13e0 02c0  Compaq Scooter",
-"		13e0 02d0  IBM",
-"		144f 1500  IBM P85-DF (1)",
-"		144f 1501  IBM P85-DF (2)",
-"		144f 150a  IBM P85-DF (3)",
-"		144f 150b  IBM P85-DF Low Profile (1)",
-"		144f 1510  IBM P85-DF Low Profile (2)",
-"	1034  HCF 56k Data/Fax/Voice Modem",
-"	1035  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		10cf 1098  Fujitsu P85-DFSV",
-"	1036  HCF 56k Data/Fax/Voice/Spkp Modem",
-"		104d 8067  HCF 56k Modem",
-"		122d 4029  MDP3880SP-W",
-"		122d 4031  MDP3880SP-U",
-"		13e0 0209  Dell Titanium",
-"		13e0 020a  Dell Graphite",
-"		13e0 0260  Gateway Red Owl",
-"		13e0 0270  Gateway White Horse",
-"	1052  HCF 56k Data/Fax Modem (Worldwide)",
-"	1053  HCF 56k Data/Fax Modem (Worldwide)",
-"	1054  HCF 56k Data/Fax/Voice Modem (Worldwide)",
-"	1055  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (Worldwide)",
-"	1056  HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide)",
-"	1057  HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide)",
-"	1059  HCF 56k Data/Fax/Voice Modem (Worldwide)",
-"	1063  HCF 56k Data/Fax Modem",
-"	1064  HCF 56k Data/Fax/Voice Modem",
-"	1065  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	1066  HCF 56k Data/Fax/Voice/Spkp Modem",
-"		122d 4033  Dell Athena - MDP3900V-U",
-"	1085  HCF V90 56k Data/Fax/Voice/Spkp PCI Modem",
-"	1433  HCF 56k Data/Fax Modem",
-"	1434  HCF 56k Data/Fax/Voice Modem",
-"	1435  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	1436  HCF 56k Data/Fax Modem",
-"	1453  HCF 56k Data/Fax Modem",
-"		13e0 0240  IBM",
-"		13e0 0250  IBM",
-"		144f 1502  IBM P95-DF (1)",
-"		144f 1503  IBM P95-DF (2)",
-"	1454  HCF 56k Data/Fax/Voice Modem",
-"	1455  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	1456  HCF 56k Data/Fax/Voice/Spkp Modem",
-"		122d 4035  Dell Europa - MDP3900V-W",
-"		122d 4302  Dell MP3930V-W(C) MiniPCI",
-"	1610  ADSL AccessRunner PCI Arbitration Device",
-"	1611  AccessRunner PCI ADSL Interface Device",
-"	1620  AccessRunner V2 PCI ADSL Arbitration Device",
-"	1621  AccessRunner V2 PCI ADSL Interface Device",
-"	1622  AccessRunner V2 PCI ADSL Yukon WAN Adapter",
-"	1803  HCF 56k Modem",
-"		0e11 0023  623-LAN Grizzly",
-"		0e11 0043  623-LAN Yogi",
-"	1811  Conextant MiniPCI Network Adapter",
-"	1815  HCF 56k Modem",
-"		0e11 0022  Grizzly",
-"		0e11 0042  Yogi",
-"	2003  HSF 56k Data/Fax Modem",
-"	2004  HSF 56k Data/Fax/Voice Modem",
-"	2005  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	2006  HSF 56k Data/Fax/Voice/Spkp Modem",
-"	2013  HSF 56k Data/Fax Modem",
-"		0e11 b195  Bear",
-"		0e11 b196  Seminole 1",
-"		0e11 b1be  Seminole 2",
-"		1025 8013  Acer",
-"		1033 809d  NEC",
-"		1033 80bc  NEC",
-"		155d 6793  HP",
-"		155d 8850  E Machines",
-"	2014  HSF 56k Data/Fax/Voice Modem",
-"	2015  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	2016  HSF 56k Data/Fax/Voice/Spkp Modem",
-"	2043  HSF 56k Data/Fax Modem (WorldW SmartDAA)",
-"	2044  HSF 56k Data/Fax/Voice Modem (WorldW SmartDAA)",
-"	2045  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (WorldW SmartDAA)",
-"		14f1 2045  Generic SoftK56",
-"	2046  HSF 56k Data/Fax/Voice/Spkp Modem (WorldW SmartDAA)",
-"	2063  HSF 56k Data/Fax Modem (SmartDAA)",
-"	2064  HSF 56k Data/Fax/Voice Modem (SmartDAA)",
-"	2065  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (SmartDAA)",
-"	2066  HSF 56k Data/Fax/Voice/Spkp Modem (SmartDAA)",
-"	2093  HSF 56k Modem",
-"		155d 2f07  Legend",
-"	2143  HSF 56k Data/Fax/Cell Modem (Mob WorldW SmartDAA)",
-"	2144  HSF 56k Data/Fax/Voice/Cell Modem (Mob WorldW SmartDAA)",
-"	2145  HSF 56k Data/Fax/Voice/Spkp (w/HS)/Cell Modem (Mob WorldW SmartDAA)",
-"	2146  HSF 56k Data/Fax/Voice/Spkp/Cell Modem (Mob WorldW SmartDAA)",
-"	2163  HSF 56k Data/Fax/Cell Modem (Mob SmartDAA)",
-"	2164  HSF 56k Data/Fax/Voice/Cell Modem (Mob SmartDAA)",
-"	2165  HSF 56k Data/Fax/Voice/Spkp (w/HS)/Cell Modem (Mob SmartDAA)",
-"	2166  HSF 56k Data/Fax/Voice/Spkp/Cell Modem (Mob SmartDAA)",
-"	2343  HSF 56k Data/Fax CardBus Modem (Mob WorldW SmartDAA)",
-"	2344  HSF 56k Data/Fax/Voice CardBus Modem (Mob WorldW SmartDAA)",
-"	2345  HSF 56k Data/Fax/Voice/Spkp (w/HS) CardBus Modem (Mob WorldW SmartDAA)",
-"	2346  HSF 56k Data/Fax/Voice/Spkp CardBus Modem (Mob WorldW SmartDAA)",
-"	2363  HSF 56k Data/Fax CardBus Modem (Mob SmartDAA)",
-"	2364  HSF 56k Data/Fax/Voice CardBus Modem (Mob SmartDAA)",
-"	2365  HSF 56k Data/Fax/Voice/Spkp (w/HS) CardBus Modem (Mob SmartDAA)",
-"	2366  HSF 56k Data/Fax/Voice/Spkp CardBus Modem (Mob SmartDAA)",
-"	2443  HSF 56k Data/Fax Modem (Mob WorldW SmartDAA)",
-"		104d 8075  Modem",
-"		104d 8083  Modem",
-"		104d 8097  Modem",
-"	2444  HSF 56k Data/Fax/Voice Modem (Mob WorldW SmartDAA)",
-"	2445  HSF 56k Data/Fax/Voice/Spkp (w/HS) Modem (Mob WorldW SmartDAA)",
-"	2446  HSF 56k Data/Fax/Voice/Spkp Modem (Mob WorldW SmartDAA)",
-"	2463  HSF 56k Data/Fax Modem (Mob SmartDAA)",
-"	2464  HSF 56k Data/Fax/Voice Modem (Mob SmartDAA)",
-"	2465  HSF 56k Data/Fax/Voice/Spkp (w/HS) Modem (Mob SmartDAA)",
-"	2466  HSF 56k Data/Fax/Voice/Spkp Modem (Mob SmartDAA)",
-"	2bfa  HDAudio Soft Data Fax Modem with SmartCP",
-"	2f00  HSF 56k HSFi Modem",
-"		13e0 8d84  IBM HSFi V.90",
-"		13e0 8d85  Compaq Stinger",
-"		14f1 2004  Dynalink 56PMi",
-"	2f02  HSF 56k HSFi Data/Fax",
-"	2f11  HSF 56k HSFi Modem",
-"	2f20  HSF 56k Data/Fax Modem",
-"	8234  RS8234 ATM SAR Controller [ServiceSAR Plus]",
-"	8800  CX23880/1/2/3 PCI Video and Audio Decoder",
-"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
-"		0070 3401  Hauppauge WinTV 34xxx models",
-"		0070 9001  Nova-T DVB-T",
-"		0070 9200  Nova-SE2 DVB-S",
-"		0070 9202  Nova-S-Plus DVB-S",
-"		0070 9402  WinTV-HVR1100 DVB-T/Hybrid",
-"		0070 9802  WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
-"		1002 00f8  ATI TV Wonder Pro",
-"		1002 a101  HDTV Wonder",
-"		1043 4823  ASUS PVR-416",
-"		107d 6613  Leadtek Winfast 2000XP Expert",
-"		107d 6620  Leadtek Winfast DV2000",
-"		107d 663c  Leadtek PVR 2000",
-"		107d 665f  WinFast DTV1000-T",
-"		10fc d003  IODATA GV-VCP3/PCI",
-"		10fc d035  IODATA GV/BCTV7E",
-"		1421 0334  Instant TV DVB-T PCI",
-"		1461 000a  AVerTV 303 (M126)",
-"		1461 000b  AverTV Studio 303 (M126)",
-"		1461 8011  UltraTV Media Center PCI 550",
-"		1462 8606  MSI TV-@nywhere Master",
-"		14c7 0107  GDI Black Gold",
-"		14f1 0187  Conexant DVB-T reference design",
-"		14f1 0342  Digital-Logic MICROSPACE Entertainment Center (MEC)",
-"		153b 1166  Cinergy 1400 DVB-T",
-"		1540 2580  Provideo PV259",
-"		1554 4811  PixelView",
-"		1554 4813  Club 3D  ZAP1000 MCE Edition",
-"		17de 08a1  KWorld/VStream XPert DVB-T with cx22702",
-"		17de 08a6  KWorld/VStream XPert DVB-T",
-"		17de 08b2  KWorld DVB-S 100",
-"		17de a8a6  digitalnow DNTV Live! DVB-T",
-"		1822 0025  digitalnow DNTV Live! DVB-T Pro",
-"		18ac d500  FusionHDTV 5 Gold",
-"		18ac d810  FusionHDTV 3 Gold-Q",
-"		18ac d820  FusionHDTV 3 Gold-T",
-"		18ac db00  FusionHDTV DVB-T1",
-"		18ac db11  FusionHDTV DVB-T Plus",
-"		18ac db50  FusionHDTV DVB-T Dual Digital",
-"		7063 3000  pcHDTV HD3000 HDTV",
-"	8801  CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port]",
-"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
-"	8802  CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port]",
-"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
-"		0070 9002  Nova-T DVB-T Model 909",
-"		1043 4823  ASUS PVR-416",
-"		107d 663c  Leadtek PVR 2000",
-"		14f1 0187  Conexant DVB-T reference design",
-"		17de 08a1  XPert DVB-T PCI BDA DVBT 23880 Transport Stream Capture",
-"		17de 08a6  KWorld/VStream XPert DVB-T",
-"		18ac d500  DViCO FusionHDTV5 Gold",
-"		18ac d810  DViCO FusionHDTV3 Gold-Q",
-"		18ac d820  DViCO FusionHDTV3 Gold-T",
-"		18ac db00  DVICO FusionHDTV DVB-T1",
-"		18ac db10  DVICO FusionHDTV DVB-T Plus",
-"		7063 3000  pcHDTV HD3000 HDTV",
-"	8804  CX23880/1/2/3 PCI Video and Audio Decoder [IR Port]",
-"		0070 9002  Nova-T DVB-T Model 909",
-"	8811  CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port]",
-"		0070 3401  Hauppauge WinTV 34xxx models",
-"		1462 8606  MSI TV-@nywhere Master",
-"		18ac d500  DViCO FusionHDTV5 Gold",
-"		18ac d810  DViCO FusionHDTV3 Gold-Q",
-"		18ac d820  DViCO FusionHDTV3 Gold-T",
-"		18ac db00  DVICO FusionHDTV DVB-T1",
-"14f2  MOBILITY Electronics",
-"	0120  EV1000 bridge",
-"	0121  EV1000 Parallel port",
-"	0122  EV1000 Serial port",
-"	0123  EV1000 Keyboard controller",
-"	0124  EV1000 Mouse controller",
-"14f3  BroadLogic",
-"	2030  2030 DVB-S Satellite Reciever",
-"	2050  2050 DVB-T Terrestrial (Cable) Reciever",
-"	2060  2060 ATSC Terrestrial (Cable) Reciever",
-"14f4  TOKYO Electronic Industry CO Ltd",
-"14f5  SOPAC Ltd",
-"14f6  COYOTE Technologies LLC",
-"14f7  WOLF Technology Inc",
-"14f8  AUDIOCODES Inc",
-"	2077  TP-240 dual span E1 VoIP PCI card",
-"14f9  AG COMMUNICATIONS",
-"14fa  WANDEL & GOLTERMANN",
-"14fb  TRANSAS MARINE (UK) Ltd",
-"14fc  Quadrics Ltd",
-"	0000  QsNet Elan3 Network Adapter",
-"	0001  QsNetII Elan4 Network Adapter",
-"	0002  QsNetIII Elan5 Network Adapter",
-"14fd  JAPAN Computer Industry Inc",
-"14fe  ARCHTEK TELECOM Corp",
-"14ff  TWINHEAD INTERNATIONAL Corp",
-"1500  DELTA Electronics, Inc",
-"	1360  RTL81xx RealTek Ethernet",
-"1501  BANKSOFT CANADA Ltd",
-"1502  MITSUBISHI ELECTRIC LOGISTICS SUPPORT Co Ltd",
-"1503  KAWASAKI LSI USA Inc",
-"1504  KAISER Electronics",
-"1505  ITA INGENIEURBURO FUR TESTAUFGABEN GmbH",
-"1506  CHAMELEON Systems Inc",
-"1507  Motorola \?\? / HTEC",
-"	0001  MPC105 [Eagle]",
-"	0002  MPC106 [Grackle]",
-"	0003  MPC8240 [Kahlua]",
-"	0100  MC145575 [HFC-PCI]",
-"	0431  KTI829c 100VG",
-"	4801  Raven",
-"	4802  Falcon",
-"	4803  Hawk",
-"	4806  CPX8216",
-"1508  HONDA CONNECTORS/MHOTRONICS Inc",
-"1509  FIRST INTERNATIONAL Computer Inc",
-"150a  FORVUS RESEARCH Inc",
-"150b  YAMASHITA Systems Corp",
-"150c  KYOPAL CO Ltd",
-"150d  WARPSPPED Inc",
-"150e  C-PORT Corp",
-"150f  INTEC GmbH",
-"1510  BEHAVIOR TECH Computer Corp",
-"1511  CENTILLIUM Technology Corp",
-"1512  ROSUN Technologies Inc",
-"1513  Raychem",
-"1514  TFL LAN Inc",
-"1515  Advent design",
-"1516  MYSON Technology Inc",
-"	0800  MTD-8xx 100/10M Ethernet PCI Adapter",
-"	0803  SURECOM EP-320X-S 100/10M Ethernet PCI Adapter",
-"		1320 10bd  SURECOM EP-320X-S 100/10M Ethernet PCI Adapter",
-"	0891  MTD-8xx 100/10M Ethernet PCI Adapter",
-"1517  ECHOTEK Corp",
-"1518  PEP MODULAR Computers GmbH",
-"1519  TELEFON AKTIEBOLAGET LM Ericsson",
-"151a  Globetek",
-"	1002  PCI-1002",
-"	1004  PCI-1004",
-"	1008  PCI-1008",
-"151b  COMBOX Ltd",
-"151c  DIGITAL AUDIO LABS Inc",
-"	0003  Prodif T 2496",
-"	4000  Prodif 88",
-"151d  Fujitsu Computer Products Of America",
-"151e  MATRIX Corp",
-"151f  TOPIC SEMICONDUCTOR Corp",
-"	0000  TP560 Data/Fax/Voice 56k modem",
-"1520  CHAPLET System Inc",
-"1521  BELL Corp",
-"1522  MainPine Ltd",
-"	0100  PCI <-> IOBus Bridge",
-"		1522 0200  RockForceDUO 2 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0300  RockForceQUATRO 4 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0400  RockForceDUO+ 2 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0500  RockForceQUATRO+ 4 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0600  RockForce+ 2 Port V.90 Data/Fax/Voice Modem",
-"		1522 0700  RockForce+ 4 Port V.90 Data/Fax/Voice Modem",
-"		1522 0800  RockForceOCTO+ 8 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0c00  RockForceDUO+ 2 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
-"		1522 0d00  RockForceQUATRO+ 4 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
-"		1522 1d00  RockForceOCTO+ 8 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
-"		1522 2000  RockForceD1 1 Port V.90 Data Modem",
-"		1522 2100  RockForceF1 1 Port V.34 Super-G3 Fax Modem",
-"		1522 2200  RockForceD2 2 Port V.90 Data Modem",
-"		1522 2300  RockForceF2 2 Port V.34 Super-G3 Fax Modem",
-"		1522 2400  RockForceD4 4 Port V.90 Data Modem",
-"		1522 2500  RockForceF4 4 Port V.34 Super-G3 Fax Modem",
-"		1522 2600  RockForceD8 8 Port V.90 Data Modem",
-"		1522 2700  RockForceF8 8 Port V.34 Super-G3 Fax Modem",
-"1523  MUSIC Semiconductors",
-"1524  ENE Technology Inc",
-"	0510  CB710 Memory Card Reader Controller",
-"		103c 006a  NX9500",
-"	0520  FLASH memory: ENE Technology Inc:",
-"	0530  ENE PCI Memory Stick Card Reader Controller",
-"	0550  ENE PCI Secure Digital Card Reader Controller",
-"	0610  PCI Smart Card Reader Controller",
-"	1211  CB1211 Cardbus Controller",
-"	1225  CB1225 Cardbus Controller",
-"	1410  CB1410 Cardbus Controller",
-"		1025 003c  CL50 motherboard",
-"		1025 005a  TravelMate 290",
-"	1411  CB-710/2/4 Cardbus Controller",
-"		103c 006a  NX9500",
-"	1412  CB-712/4 Cardbus Controller",
-"	1420  CB1420 Cardbus Controller",
-"	1421  CB-720/2/4 Cardbus Controller",
-"	1422  CB-722/4 Cardbus Controller",
-"1525  IMPACT Technologies",
-"1526  ISS, Inc",
-"1527  SOLECTRON",
-"1528  ACKSYS",
-"1529  AMERICAN MICROSystems Inc",
-"152a  QUICKTURN DESIGN Systems",
-"152b  FLYTECH Technology CO Ltd",
-"152c  MACRAIGOR Systems LLC",
-"152d  QUANTA Computer Inc",
-"152e  MELEC Inc",
-"152f  PHILIPS - CRYPTO",
-"1530  ACQIS Technology Inc",
-"1531  CHRYON Corp",
-"1532  ECHELON Corp",
-"	0020  LonWorks PCLTA-20 PCI LonTalk Adapter",
-"1533  BALTIMORE",
-"1534  ROAD Corp",
-"1535  EVERGREEN Technologies Inc",
-"1537  DATALEX COMMUNCATIONS",
-"1538  ARALION Inc",
-"	0303  ARS106S Ultra ATA 133/100/66 Host Controller",
-"1539  ATELIER INFORMATIQUES et ELECTRONIQUE ETUDES S.A.",
-"153a  ONO SOKKI",
-"153b  TERRATEC Electronic GmbH",
-"	1144  Aureon 5.1",
-"	1147  Aureon 5.1 Sky",
-"	1158  Philips Semiconductors SAA7134 (rev 01) [Terratec Cinergy 600 TV]",
-"153c  ANTAL Electronic",
-"153d  FILANET Corp",
-"153e  TECHWELL Inc",
-"153f  MIPS Technologies, Inc.",
-"	0001  SOC-it 101 System Controller",
-"1540  PROVIDEO MULTIMEDIA Co Ltd",
-"1541  MACHONE Communications",
-"1542  Concurrent Computer Corporation",
-"1543  SILICON Laboratories",
-"	3052  Intel 537 [Winmodem]",
-"	4c22  Si3036 MC'97 DAA",
-"1544  DCM DATA Systems",
-"1545  VISIONTEK",
-"1546  IOI Technology Corp",
-"1547  MITUTOYO Corp",
-"1548  JET PROPULSION Laboratory",
-"1549  INTERCONNECT Systems Solutions",
-"154a  MAX Technologies Inc",
-"154b  COMPUTEX Co Ltd",
-"154c  VISUAL Technology Inc",
-"154d  PAN INTERNATIONAL Industrial Corp",
-"154e  SERVOTEST Ltd",
-"154f  STRATABEAM Technology",
-"1550  OPEN NETWORK Co Ltd",
-"1551  SMART Electronic DEVELOPMENT GmBH",
-"1552  RACAL AIRTECH Ltd",
-"1553  CHICONY Electronics Co Ltd",
-"1554  PROLINK Microsystems Corp",
-"1555  GESYTEC GmBH",
-"1556  PLD APPLICATIONS",
-"1557  MEDIASTAR Co Ltd",
-"1558  CLEVO/KAPOK Computer",
-"1559  SI LOGIC Ltd",
-"155a  INNOMEDIA Inc",
-"155b  PROTAC INTERNATIONAL Corp",
-"155c  Cemax-Icon Inc",
-"155d  Mac System Co Ltd",
-"155e  LP Elektronik GmbH",
-"155f  Perle Systems Ltd",
-"1560  Terayon Communications Systems",
-"1561  Viewgraphics Inc",
-"1562  Symbol Technologies",
-"1563  A-Trend Technology Co Ltd",
-"1564  Yamakatsu Electronics Industry Co Ltd",
-"1565  Biostar Microtech Int'l Corp",
-"1566  Ardent Technologies Inc",
-"1567  Jungsoft",
-"1568  DDK Electronics Inc",
-"1569  Palit Microsystems Inc.",
-"156a  Avtec Systems",
-"156b  2wire Inc",
-"156c  Vidac Electronics GmbH",
-"156d  Alpha-Top Corp",
-"156e  Alfa Inc",
-"156f  M-Systems Flash Disk Pioneers Ltd",
-"1570  Lecroy Corp",
-"1571  Contemporary Controls",
-"	a001  CCSI PCI20-485 ARCnet",
-"	a002  CCSI PCI20-485D ARCnet",
-"	a003  CCSI PCI20-485X ARCnet",
-"	a004  CCSI PCI20-CXB ARCnet",
-"	a005  CCSI PCI20-CXS ARCnet",
-"	a006  CCSI PCI20-FOG-SMA ARCnet",
-"	a007  CCSI PCI20-FOG-ST ARCnet",
-"	a008  CCSI PCI20-TB5 ARCnet",
-"	a009  CCSI PCI20-5-485 5Mbit ARCnet",
-"	a00a  CCSI PCI20-5-485D 5Mbit ARCnet",
-"	a00b  CCSI PCI20-5-485X 5Mbit ARCnet",
-"	a00c  CCSI PCI20-5-FOG-ST 5Mbit ARCnet",
-"	a00d  CCSI PCI20-5-FOG-SMA 5Mbit ARCnet",
-"	a201  CCSI PCI22-485 10Mbit ARCnet",
-"	a202  CCSI PCI22-485D 10Mbit ARCnet",
-"	a203  CCSI PCI22-485X 10Mbit ARCnet",
-"	a204  CCSI PCI22-CHB 10Mbit ARCnet",
-"	a205  CCSI PCI22-FOG_ST 10Mbit ARCnet",
-"	a206  CCSI PCI22-THB 10Mbit ARCnet",
-"1572  Otis Elevator Company",
-"1573  Lattice - Vantis",
-"1574  Fairchild Semiconductor",
-"1575  Voltaire Advanced Data Security Ltd",
-"1576  Viewcast COM",
-"1578  HITT",
-"	5615  VPMK3 [Video Processor Mk III]",
-"1579  Dual Technology Corp",
-"157a  Japan Elecronics Ind Inc",
-"157b  Star Multimedia Corp",
-"157c  Eurosoft (UK)",
-"	8001  Fix2000 PCI Y2K Compliance Card",
-"157d  Gemflex Networks",
-"157e  Transition Networks",
-"157f  PX Instruments Technology Ltd",
-"1580  Primex Aerospace Co",
-"1581  SEH Computertechnik GmbH",
-"1582  Cytec Corp",
-"1583  Inet Technologies Inc",
-"1584  Uniwill Computer Corp",
-"1585  Logitron",
-"1586  Lancast Inc",
-"1587  Konica Corp",
-"1588  Solidum Systems Corp",
-"1589  Atlantek Microsystems Pty Ltd",
-"158a  Digalog Systems Inc",
-"158b  Allied Data Technologies",
-"158c  Hitachi Semiconductor & Devices Sales Co Ltd",
-"158d  Point Multimedia Systems",
-"158e  Lara Technology Inc",
-"158f  Ditect Coop",
-"1590  3pardata Inc",
-"1591  ARN",
-"1592  Syba Tech Ltd",
-"	0781  Multi-IO Card",
-"	0782  Parallel Port Card 2xEPP",
-"	0783  Multi-IO Card",
-"	0785  Multi-IO Card",
-"	0786  Multi-IO Card",
-"	0787  Multi-IO Card",
-"	0788  Multi-IO Card",
-"	078a  Multi-IO Card",
-"1593  Bops Inc",
-"1594  Netgame Ltd",
-"1595  Diva Systems Corp",
-"1596  Folsom Research Inc",
-"1597  Memec Design Services",
-"1598  Granite Microsystems",
-"1599  Delta Electronics Inc",
-"159a  General Instrument",
-"159b  Faraday Technology Corp",
-"159c  Stratus Computer Systems",
-"159d  Ningbo Harrison Electronics Co Ltd",
-"159e  A-Max Technology Co Ltd",
-"159f  Galea Network Security",
-"15a0  Compumaster SRL",
-"15a1  Geocast Network Systems",
-"15a2  Catalyst Enterprises Inc",
-"	0001  TA700 PCI Bus Analyzer/Exerciser",
-"15a3  Italtel",
-"15a4  X-Net OY",
-"15a5  Toyota Macs Inc",
-"15a6  Sunlight Ultrasound Technologies Ltd",
-"15a7  SSE Telecom Inc",
-"15a8  Shanghai Communications Technologies Center",
-"15aa  Moreton Bay",
-"15ab  Bluesteel Networks Inc",
-"15ac  North Atlantic Instruments",
-"15ad  VMware Inc",
-"	0405  [VMware SVGA II] PCI Display Adapter",
-"	0710  Virtual SVGA",
-"	0720  VMware High-Speed Virtual NIC [vmxnet]",
-"15ae  Amersham Pharmacia Biotech",
-"15b0  Zoltrix International Ltd",
-"15b1  Source Technology Inc",
-"15b2  Mosaid Technologies Inc",
-"15b3  Mellanox Technologies",
-"	5274  MT21108 InfiniBridge",
-"	5a44  MT23108 InfiniHost",
-"	5a45  MT23108 [Infinihost HCA Flash Recovery]",
-"	5a46  MT23108 PCI Bridge",
-"	5e8d  MT25204 [InfiniHost III Lx HCA Flash Recovery]",
-"	6274  MT25204 [InfiniHost III Lx HCA]",
-"	6278  MT25208 InfiniHost III Ex (Tavor compatibility mode)",
-"	6279  MT25208 [InfiniHost III Ex HCA Flash Recovery]",
-"	6282  MT25208 InfiniHost III Ex",
-"15b4  CCI/TRIAD",
-"15b5  Cimetrics Inc",
-"15b6  Texas Memory Systems Inc",
-"15b7  Sandisk Corp",
-"15b8  ADDI-DATA GmbH",
-"15b9  Maestro Digital Communications",
-"15ba  Impacct Technology Corp",
-"15bb  Portwell Inc",
-"15bc  Agilent Technologies",
-"	1100  E8001-66442 PCI Express CIC",
-"	2922  64 Bit, 133MHz PCI-X Exerciser & Protocol Checker",
-"	2928  64 Bit, 66MHz PCI Exerciser & Analyzer",
-"	2929  64 Bit, 133MHz PCI-X Analyzer & Exerciser",
-"15bd  DFI Inc",
-"15be  Sola Electronics",
-"15bf  High Tech Computer Corp (HTC)",
-"15c0  BVM Ltd",
-"15c1  Quantel",
-"15c2  Newer Technology Inc",
-"15c3  Taiwan Mycomp Co Ltd",
-"15c4  EVSX Inc",
-"15c5  Procomp Informatics Ltd",
-"	8010  1394b - 1394 Firewire 3-Port Host Adapter Card",
-"15c6  Technical University of Budapest",
-"15c7  Tateyama System Laboratory Co Ltd",
-"	0349  Tateyama C-PCI PLC/NC card Rev.01A",
-"15c8  Penta Media Co Ltd",
-"15c9  Serome Technology Inc",
-"15ca  Bitboys OY",
-"15cb  AG Electronics Ltd",
-"15cc  Hotrail Inc",
-"15cd  Dreamtech Co Ltd",
-"15ce  Genrad Inc",
-"15cf  Hilscher GmbH",
-"15d1  Infineon Technologies AG",
-"15d2  FIC (First International Computer Inc)",
-"15d3  NDS Technologies Israel Ltd",
-"15d4  Iwill Corp",
-"15d5  Tatung Co",
-"15d6  Entridia Corp",
-"15d7  Rockwell-Collins Inc",
-"15d8  Cybernetics Technology Co Ltd",
-"15d9  Super Micro Computer Inc",
-"15da  Cyberfirm Inc",
-"15db  Applied Computing Systems Inc",
-"15dc  Litronic Inc",
-"	0001  Argus 300 PCI Cryptography Module",
-"15dd  Sigmatel Inc",
-"15de  Malleable Technologies Inc",
-"15df  Infinilink Corp",
-"15e0  Cacheflow Inc",
-"15e1  Voice Technologies Group Inc",
-"15e2  Quicknet Technologies Inc",
-"15e3  Networth Technologies Inc",
-"15e4  VSN Systemen BV",
-"15e5  Valley technologies Inc",
-"15e6  Agere Inc",
-"15e7  Get Engineering Corp",
-"15e8  National Datacomm Corp",
-"	0130  Wireless PCI Card",
-"15e9  Pacific Digital Corp",
-"	1841  ADMA-100 DiscStaQ ATA Controller",
-"15ea  Tokyo Denshi Sekei K.K.",
-"15eb  Drsearch GmbH",
-"15ec  Beckhoff GmbH",
-"	3101  FC3101 Profibus DP 1 Channel PCI",
-"	5102  FC5102",
-"15ed  Macrolink Inc",
-"15ee  In Win Development Inc",
-"15ef  Intelligent Paradigm Inc",
-"15f0  B-Tree Systems Inc",
-"15f1  Times N Systems Inc",
-"15f2  Diagnostic Instruments Inc",
-"15f3  Digitmedia Corp",
-"15f4  Valuesoft",
-"15f5  Power Micro Research",
-"15f6  Extreme Packet Device Inc",
-"15f7  Banctec",
-"15f8  Koga Electronics Co",
-"15f9  Zenith Electronics Corp",
-"15fa  J.P. Axzam Corp",
-"15fb  Zilog Inc",
-"15fc  Techsan Electronics Co Ltd",
-"15fd  N-CUBED.NET",
-"15fe  Kinpo Electronics Inc",
-"15ff  Fastpoint Technologies Inc",
-"1600  Northrop Grumman - Canada Ltd",
-"1601  Tenta Technology",
-"1602  Prosys-tec Inc",
-"1603  Nokia Wireless Communications",
-"1604  Central System Research Co Ltd",
-"1605  Pairgain Technologies",
-"1606  Europop AG",
-"1607  Lava Semiconductor Manufacturing Inc",
-"1608  Automated Wagering International",
-"1609  Scimetric Instruments Inc",
-"1612  Telesynergy Research Inc.",
-"1619  FarSite Communications Ltd",
-"	0400  FarSync T2P (2 port X.21/V.35/V.24)",
-"	0440  FarSync T4P (4 port X.21/V.35/V.24)",
-"	0610  FarSync T1U (1 port X.21/V.35/V.24)",
-"	0620  FarSync T2U (2 port X.21/V.35/V.24)",
-"	0640  FarSync T4U (4 port X.21/V.35/V.24)",
-"	1610  FarSync TE1 (T1,E1)",
-"	2610  FarSync DSL-S1 (SHDSL)",
-"161f  Rioworks",
-"1626  TDK Semiconductor Corp.",
-"	8410  RTL81xx Fast Ethernet",
-"1629  Kongsberg Spacetec AS",
-"	1003  Format synchronizer v3.0",
-"	2002  Fast Universal Data Output",
-"1637  Linksys",
-"	3874  Linksys 802.11b WMP11 PCI Wireless card",
-"1638  Standard Microsystems Corp [SMC]",
-"	1100  SMC2602W EZConnect / Addtron AWA-100 / Eumitcom PCI WL11000",
-"163c  Smart Link Ltd.",
-"	3052  SmartLink SmartPCI562 56K Modem",
-"	5449  SmartPCI561 Modem",
-"1657  Brocade Communications Systems, Inc.",
-"165a  Epix Inc",
-"	c100  PIXCI(R) CL1 Camera Link Video Capture Board [custom QL5232]",
-"	d200  PIXCI(R) D2X Digital Video Capture Board [custom QL5232]",
-"	d300  PIXCI(R) D3X Digital Video Capture Board [custom QL5232]",
-"165d  Hsing Tech. Enterprise Co., Ltd.",
-"165f  Linux Media Labs, LLC",
-"	1020  LMLM4 MPEG-4 encoder",
-"1661  Worldspace Corp.",
-"1668  Actiontec Electronics Inc",
-"	0100  Mini-PCI bridge",
-"166d  Broadcom Corporation",
-"	0001  SiByte BCM1125/1125H/1250 System-on-a-Chip PCI",
-"	0002  SiByte BCM1125H/1250 System-on-a-Chip HyperTransport",
-"1677  Bernecker + Rainer",
-"	104e  5LS172.6 B&R Dual CAN Interface Card",
-"	12d7  5LS172.61 B&R Dual CAN Interface Card",
-"167b  ZyDAS Technology Corp.",
-"	2102  ZyDAS ZD1202",
-"		187e 3406  ZyAIR B-122 CardBus 11Mbs Wireless LAN Card",
-"1681  Hercules",
-"	0010  Hercules 3d Prophet II Ultra 64MB (350 MHz NV15BR core)",
-"1682  XFX Pine Group Inc.",
-"1688  CastleNet Technology Inc.",
-"	1170  WLAN 802.11b card",
-"168c  Atheros Communications, Inc.",
-"	0007  AR5000 802.11a Wireless Adapter",
-"	0011  AR5210 802.11a NIC",
-"	0012  AR5211 802.11ab NIC",
-"	0013  AR5212 802.11abg NIC",
-"		1113 d301  Philips CPWNA100 Wireless CardBus adapter",
-"		1186 3202  D-link DWL-G650 (Rev B3,B5) Wireless cardbus adapter",
-"		1186 3203  DWL-G520 Wireless PCI Adapter",
-"		1186 3a12  D-Link AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C)",
-"		1186 3a13  D-Link AirPlus DWL-G520 Wireless PCI Adapter(rev.B)",
-"		1186 3a14  D-Link AirPremier DWL-AG530 Wireless PCI Adapter",
-"		1186 3a17  D-Link AirPremier DWL-G680 Wireless Cardbus Adapter",
-"		1186 3a18  D-Link AirPremier DWL-G550 Wireless PCI Adapter",
-"		1186 3a63  D-Link AirPremier DWL-AG660 Wireless Cardbus Adapter",
-"		1186 3a94  C54C Wireless 801.11g cardbus",
-"		1186 3ab0  Allnet ALL0281 Wireless PCI Card",
-"		1385 4d00  Netgear WG311T Wireless PCI Adapter",
-"		1458 e911  Gigabyte GN-WIAG02",
-"		14b7 0a60  8482-WD ORiNOCO 11a/b/g Wireless PCI Adapter",
-"		168c 0013  AirPlus XtremeG DWL-G650 Wireless PCMCIA Adapter",
-"		168c 1025  DWL-G650B2 Wireless CardBus Adapter",
-"		168c 1027  Netgate NL-3054CB ARIES b/g CardBus Adapter",
-"		168c 2026  Netgate 5354MP ARIES a(108Mb turbo)/b/g MiniPCI Adapter",
-"		168c 2041  Netgate 5354MP Plus ARIES2 b/g MiniPCI Adapter",
-"		168c 2042  Netgate 5354MP Plus ARIES2 a/b/g MiniPCI Adapter",
-"		16ab 7302  Trust Speedshare Turbo Pro Wireless PCI Adapter",
-"		185f 2012  Wistron NeWeb WLAN a+b+g model CB9",
-"	001a  AR5005G 802.11abg NIC",
-"		1113 ee20  SMC Wireless CardBus Adapter 802.11g (SMCWCB-G EU)",
-"		1113 ee24  SMC Wireless PCI Card WPCI-G",
-"		1186 3a15  D-Link AirPlus G DWL-G630 Wireless Cardbus Adapter(rev.D)",
-"		1186 3a16  D-Link AirPlus G DWL-G510 Wireless PCI Adapter(rev.B)",
-"		1186 3a23  D-Link AirPlus G DWL-G520+A Wireless PCI Adapter",
-"		1186 3a24  D-Link AirPlus G DWL-G650+A Wireless Cardbus Adapter",
-"		168c 1052  TP-Link TL-WN510G Wireless CardBus Adapter",
-"	001b  AR5006X 802.11abg NIC",
-"		1186 3a19  D-Link AirPremier AG DWL-AG660 Wireless Cardbus Adapter",
-"		1186 3a22  D-Link AirPremier AG DWL-AG530 Wireless PCI Adapter",
-"		168c 2062  EnGenius EMP-8602 (400mw)",
-"		168c 2063  EnGenius EMP-8602 (400mw)",
-"	0020  AR5005VL 802.11bg Wireless NIC",
-"	1014  AR5212 802.11abg NIC",
-"1695  EPoX Computer Co., Ltd.",
-"169c  Netcell Corporation",
-"	0044  Revolution Storage Processing Card",
-"16a5  Tekram Technology Co.,Ltd.",
-"16ab  Global Sun Technology Inc",
-"	1100  GL24110P",
-"	1101  PLX9052 PCMCIA-to-PCI Wireless LAN",
-"	1102  PCMCIA-to-PCI Wireless Network Bridge",
-"	8501  WL-8305 Wireless LAN PCI Adapter",
-"16ae  Safenet Inc",
-"	1141  SafeXcel-1141",
-"16af  SparkLAN Communications, Inc.",
-"16b4  Aspex Semiconductor Ltd",
-"16b8  Sonnet Technologies, Inc.",
-"16be  Creatix Polymedia GmbH",
-"16c6  Micrel-Kendin",
-"	8695  Centaur KS8695 ARM processor",
-"16c8  Octasic Inc.",
-"16c9  EONIC B.V. The Netherlands",
-"16ca  CENATEK Inc",
-"	0001  Rocket Drive DL",
-"16cd  Densitron Technologies",
-"16ce  Roland Corp.",
-"16d5  Acromag, Inc.",
-"	4d4e  PMC482, APC482, AcPC482 Counter Timer Board",
-"16df  PIKA Technologies Inc.",
-"16e3  European Space Agency",
-"	1e0f  LEON2FT Processor",
-"16ec  U.S. Robotics",
-"	00ff  USR997900 10/100 Mbps PCI Network Card",
-"	0116  USR997902 10/100/1000 Mbps PCI Network Card",
-"	3685  Wireless Access PCI Adapter Model 022415",
-"16ed  Sycron N. V.",
-"	1001  UMIO communication card",
-"16f3  Jetway Information Co., Ltd.",
-"16f4  Vweb Corp",
-"	8000  VW2010",
-"16f6  VideoTele.com, Inc.",
-"1702  Internet Machines Corporation (IMC)",
-"1705  Digital First, Inc.",
-"170b  NetOctave",
-"	0100  NSP2000-SSL crypto accelerator",
-"170c  YottaYotta Inc.",
-"1725  Vitesse Semiconductor",
-"	7174  VSC7174 PCI/PCI-X Serial ATA Host Bus Controller",
-"172a  Accelerated Encryption",
-"	13c8  AEP SureWare Runner 1000V3",
-"1734  Fujitsu Siemens Computer GmbH",
-"	1078  Amilo Pro v2010",
-"1737  Linksys",
-"	0013  WMP54G Wireless Pci Card",
-"	0015  WMP54GS Wireless Pci Card",
-"	1032  Gigabit Network Adapter",
-"		1737 0015  EG1032 v2 Instant Gigabit Network Adapter",
-"		1737 0024  EG1032 v3 Instant Gigabit Network Adapter",
-"	1064  Gigabit Network Adapter",
-"		1737 0016  EG1064 v2 Instant Gigabit Network Adapter",
-"	ab08  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	ab09  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"173b  Altima (nee Broadcom)",
-"	03e8  AC1000 Gigabit Ethernet",
-"	03e9  AC1001 Gigabit Ethernet",
-"	03ea  AC9100 Gigabit Ethernet",
-"		173b 0001  AC1002",
-"	03eb  AC1003 Gigabit Ethernet",
-"1743  Peppercon AG",
-"	8139  ROL/F-100 Fast Ethernet Adapter with ROL",
-"1749  RLX Technologies",
-"174b  PC Partner Limited",
-"174d  WellX Telecom SA",
-"175c  AudioScience Inc",
-"175e  Sanera Systems, Inc.",
-"1775  SBS Technologies",
-"1787  Hightech Information System Ltd.",
-"1796  Research Centre Juelich",
-"	0001  SIS1100 [Gigabit link]",
-"	0002  HOTlink",
-"	0003  Counter Timer",
-"	0004  CAMAC Controller",
-"	0005  PROFIBUS",
-"	0006  AMCC HOTlink",
-"1797  JumpTec h, GMBH",
-"1799  Belkin",
-"	6001  Wireless PCI Card - F5D6001",
-"	6020  Wireless PCMCIA Card - F5D6020",
-"	6060  Wireless PDA Card - F5D6060",
-"	7000  Wireless PCI Card - F5D7000",
-"	7010  BCM4306 802.11b/g Wireless Lan Controller F5D7010",
-"179c  Data Patterns",
-"	0557  DP-PCI-557 [PCI 1553B]",
-"	0566  DP-PCI-566 [Intelligent PCI 1553B]",
-"	5031  DP-CPCI-5031-Synchro Module",
-"	5121  DP-CPCI-5121-IP Carrier",
-"	5211  DP-CPCI-5211-IP Carrier",
-"	5679  AGE Display Module",
-"17a0  Genesys Logic, Inc",
-"	8033  GL880S USB 1.1 controller",
-"	8034  GL880S USB 2.0 controller",
-"17aa  Lenovo",
-"17af  Hightech Information System Ltd.",
-"17b3  Hawking Technologies",
-"	ab08  PN672TX 10/100 Ethernet",
-"17b4  Indra Networks, Inc.",
-"	0011  WebEnhance 100 GZIP Compression Card",
-"17c0  Wistron Corp.",
-"17c2  Newisys, Inc.",
-"17cb  Airgo Networks Inc",
-"17cc  NetChip Technology, Inc",
-"	2280  USB 2.0",
-"17cf  Z-Com, Inc.",
-"17d3  Areca Technology Corp.",
-"	1110  ARC-1110 4-Port PCI-X to SATA RAID Controller",
-"	1120  ARC-1120 8-Port PCI-X to SATA RAID Controller",
-"	1130  ARC-1130 12-Port PCI-X to SATA RAID Controller",
-"	1160  ARC-1160 16-Port PCI-X to SATA RAID Controller",
-"	1210  ARC-1210 4-Port PCI-Express to SATA RAID Controller",
-"	1220  ARC-1220 8-Port PCI-Express to SATA RAID Controller",
-"	1230  ARC-1230 12-Port PCI-Express to SATA RAID Controller",
-"	1260  ARC-1260 16-Port PCI-Express to SATA RAID Controller",
-"17d5  S2io Inc.",
-"	5831  Xframe 10 Gigabit Ethernet PCI-X",
-"		103c 12d5  HP PCI-X 133MHz 10GbE SR Fiber",
-"	5832  Xframe II 10Gbps Ethernet",
-"17de  KWorld Computer Co. Ltd.",
-"17ee  Connect Components Ltd",
-"17f2  Albatron Corp.",
-"17fe  Linksys, A Division of Cisco Systems",
-"	2120  WMP11v4 802.11b PCI card",
-"	2220  [AirConn] INPROCOMM IPN 2220 Wireless LAN Adapter (rev 01)",
-"		17fe 2220  WPC54G ver. 4",
-"17ff  Benq Corporation",
-"1809  Lumanate, Inc.",
-"1813  Ambient Technologies Inc",
-"	4000  HaM controllerless modem",
-"		16be 0001  V9x HAM Data Fax Modem",
-"	4100  HaM plus Data Fax Modem",
-"		16be 0002  V9x HAM 1394",
-"1814  RaLink",
-"	0101  Wireless PCI Adapter RT2400 / RT2460",
-"		1043 0127  WiFi-b add-on Card",
-"		1462 6828  PC11B2 (MS-6828) Wireless 11b PCI Card",
-"	0200  RT2500 802.11g PCI [PC54G2]",
-"	0201  RT2500 802.11g Cardbus/mini-PCI",
-"		1043 130f  WL-130g",
-"		1371 001e  CWC-854 Wireless-G CardBus Adapter",
-"		1371 001f  CWM-854 Wireless-G Mini PCI Adapter",
-"		1371 0020  CWP-854 Wireless-G PCI Adapter",
-"		1458 e381  GN-WMKG 802.11b/g Wireless CardBus Adapter",
-"		1458 e931  GN-WIKG 802.11b/g mini-PCI Adapter",
-"		1462 6835  Wireless 11G CardBus CB54G2",
-"		1737 0032  WMP54G 2.0 PCI Adapter",
-"		1799 700a  F5D7000 Wireless G Desktop Network Card",
-"		1799 701a  F5D7010 Wireless G Notebook Network Card",
-"		185f 22a0  CN-WF513 Wireless Cardbus Adapter",
-"	0301  RT2561/RT61 802.11g PCI",
-"		1186 3c08  DWL-G630 Rev E",
-"		1186 3c09  DWL-G510 Rev C",
-"	0302  RT2561/RT61 rev B 802.11g",
-"		1186 3c08  DWL-G630 Rev E",
-"		1186 3c09  DWL-G510 Rev C",
-"	0401  Ralink RT2600 802.11 MIMO",
-"1820  InfiniCon Systems Inc.",
-"1822  Twinhan Technology Co. Ltd",
-"	4e35  Mantis DTV PCI Bridge Controller [Ver 1.0]",
-"182d  SiteCom Europe BV",
-"	3069  ISDN PCI DC-105V2",
-"	9790  WL-121 Wireless Network Adapter 100g+ [Ver.3]",
-"1830  Credence Systems Corporation",
-"183b  MikroM GmbH",
-"	08a7  MVC100 DVI",
-"	08a8  MVC101 SDI",
-"	08a9  MVC102 DVI+Audio",
-"1849  ASRock Incorporation",
-"1851  Microtune, Inc.",
-"1852  Anritsu Corp.",
-"1853  SMSC Automotive Infotainment System Group",
-"1854  LG Electronics, Inc.",
-"185b  Compro Technology, Inc.",
-"185f  Wistron NeWeb Corp.",
-"1864  SilverBack",
-"	2110  ISNAP 2110",
-"1867  Topspin Communications",
-"	5a44  MT23108 InfiniHost HCA",
-"	5a45  MT23108 InfiniHost HCA flash recovery",
-"	5a46  MT23108 InfiniHost HCA bridge",
-"	6278  MT25208 InfiniHost III Ex (Tavor compatibility mode)",
-"	6282  MT25208 InfiniHost III Ex",
-"187e  ZyXEL Communication Corporation",
-"	3403  ZyAir G-110 802.11g",
-"	340e  M-302 802.11g XtremeMIMO",
-"1888  Varisys Ltd",
-"	0301  VMFX1 FPGA PMC module",
-"	0601  VSM2 dual PMC carrier",
-"	0710  VS14x series PowerPC PCI board",
-"	0720  VS24x series PowerPC PCI board",
-"188a  Ample Communications, Inc",
-"1890  Egenera, Inc.",
-"1894  KNC One",
-"1896  B&B Electronics Manufacturing Company, Inc.",
-"18a1  Astute Networks Inc.",
-"18ac  DViCO Corporation",
-"	d500  FusionHDTV 5",
-"	d810  FusionHDTV 3 Gold",
-"	d820  FusionHDTV 3 Gold-T",
-"18b8  Ammasso",
-"	b001  AMSO 1100 iWARP/RDMA Gigabit Ethernet Coprocessor",
-"18bc  Info-Tek Corp.",
-"18c3  Micronas Semiconductor Holding AG",
-"18c8  Cray Inc",
-"18c9  ARVOO Engineering BV",
-"18ca  XGI - Xabre Graphics Inc",
-"	0020  Volari Z7",
-"	0040  Volari V3XT/V5/V8",
-"18d2  Sitecom",
-"	3069  DC-105v2 ISDN controller",
-"18dd  Artimi Inc",
-"	4c6f  Artimi RTMI-100 UWB adapter",
-"18e6  MPL AG",
-"	0001  OSCI [Octal Serial Communication Interface]",
-"18ec  Cesnet, z.s.p.o.",
-"	c006  COMBO6",
-"		18ec d001  COMBO-4MTX",
-"		18ec d002  COMBO-4SFP",
-"		18ec d003  COMBO-4SFPRO",
-"		18ec d004  COMBO-2XFP",
-"	c045  COMBO6E",
-"	c050  COMBO-PTM",
-"	c058  COMBO6X",
-"		18ec d001  COMBO-4MTX",
-"		18ec d002  COMBO-4SFP",
-"		18ec d003  COMBO-4SFPRO",
-"		18ec d004  COMBO-2XFP",
-"18f7  Commtech, Inc.",
-"	0001  Fastcom ESCC-PCI-335",
-"	0002  Fastcom 422/4-PCI-335",
-"	0004  Fastcom 422/2-PCI-335",
-"	0005  Fastcom IGESCC-PCI-ISO/1",
-"	000a  Fastcom 232/4-PCI-335",
-"18fb  Resilience Corporation",
-"1904  Hangzhou Silan Microelectronics Co., Ltd.",
-"1923  Sangoma Technologies Corp.",
-"	0100  A104d QUAD T1/E1 AFT card",
-"	0400  A104u Quad T1/E1 AFT",
-"1924  Level 5 Networks Inc.",
-"192e  TransDimension",
-"1931  Option N.V.",
-"	000c  Qualcomm MSM6275 UMTS chip",
-"1942  ClearSpeed Technology plc",
-"	e511  CSX600 Advance Accelerator Board",
-"1957  Freescale Semiconductor Inc",
-"	0080  MPC8349E",
-"	0081  MPC8349",
-"	0082  MPC8347E TBGA",
-"	0083  MPC8347 TBGA",
-"	0084  MPC8347E PBGA",
-"	0085  MPC8347 PBGA",
-"	0086  MPC8343E",
-"	0087  MPC8343",
-"1958  Faster Technology, LLC.",
-"1966  Orad Hi-Tec Systems",
-"	1975  DVG64 family",
-"196a  Sensory Networks Inc.",
-"	0101  NodalCore C-1000 Content Classification Accelerator",
-"	0102  NodalCore C-2000 Content Classification Accelerator",
-"197b  JMicron Technologies, Inc.",
-"	2360  JMicron 20360/20363 AHCI Controller",
-"	2361  JMB361 AHCI/IDE",
-"	2363  JMicron 20360/20363 AHCI Controller",
-"	2365  JMB365 AHCI/IDE",
-"	2366  JMB366 AHCI/IDE",
-"1989  Montilio Inc.",
-"	0001  RapidFile Bridge",
-"	8001  RapidFile",
-"1993  Innominate Security Technologies AG",
-"199a  Pulse-LINK, Inc.",
-"19a8  DAQDATA GmbH",
-"19ac  Kasten Chase Applied Research",
-"	0001  ACA2400 Crypto Accelerator",
-"19ae  Progeny Systems Corporation",
-"	0520  4135 HFT Interface Controller",
-"19d4  Quixant Limited",
-"19e2  Vector Informatik GmbH",
-"1a03  ASPEED Technology, Inc.",
-"	2000  AST2000",
-"1a08  Sierra semiconductor",
-"	0000  SC15064",
-"1a1d  GFaI e.V.",
-"1a29  Fortinet, Inc.",
-"1b13  Jaton Corp",
-"1c1c  Symphony",
-"	0001  82C101",
-"1d44  DPT",
-"	a400  PM2x24/PM3224",
-"1de1  Tekram Technology Co.,Ltd.",
-"	0391  TRM-S1040",
-"	2020  DC-390",
-"	690c  690c",
-"	dc29  DC290",
-"1fc0  Tumsan Oy",
-"	0300  E2200 Dual E1/Rawpipe Card",
-"1fc1  PathScale, Inc",
-"	000d  InfiniPath HT-400",
-"	0010  InfiniPath PE-800",
-"1fce  Cognio Inc.",
-"	0001  Spectrum Analyzer PC Card (SAgE)",
-"2000  Smart Link Ltd.",
-"2001  Temporal Research Ltd",
-"2003  Smart Link Ltd.",
-"2004  Smart Link Ltd.",
-"21c3  21st Century Computer Corp.",
-"22b8  Motorola, Inc.",
-"2348  Racore",
-"	2010  8142 100VG/AnyLAN",
-"2646  Kingston Technologies",
-"270b  Xantel Corporation",
-"270f  Chaintech Computer Co. Ltd",
-"2711  AVID Technology Inc.",
-"2a15  3D Vision(\?\?\?)",
-"3000  Hansol Electronics Inc.",
-"3142  Post Impression Systems.",
-"3388  Hint Corp",
-"	0013  HiNT HC4 PCI to ISDN bridge, Multimedia audio controller",
-"	0014  HiNT HC4 PCI to ISDN bridge, Network controller",
-"	0020  HB6 Universal PCI-PCI bridge (transparent mode)",
-"	0021  HB6 Universal PCI-PCI bridge (non-transparent mode)",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1080  CT8 mainboard",
-"		4c53 1090  Cx9 mainboard",
-"		4c53 10a0  CA3/CR3 mainboard",
-"		4c53 3010  PPCI mezzanine (32-bit PMC)",
-"		4c53 3011  PPCI mezzanine (64-bit PMC)",
-"		4c53 4000  PMCCARR1 carrier board",
-"	0022  HiNT HB4 PCI-PCI Bridge (PCI6150)",
-"	0026  HB2 PCI-PCI Bridge",
-"	101a  E.Band [AudioTrak Inca88]",
-"	101b  E.Band [AudioTrak Inca88]",
-"	8011  VXPro II Chipset",
-"		3388 8011  VXPro II Chipset CPU to PCI Bridge",
-"	8012  VXPro II Chipset",
-"		3388 8012  VXPro II Chipset PCI to ISA Bridge",
-"	8013  VXPro II IDE",
-"		3388 8013  VXPro II Chipset EIDE Controller",
-"3411  Quantum Designs (H.K.) Inc",
-"3513  ARCOM Control Systems Ltd",
-"3842  eVga.com. Corp.",
-"	c370  e-GeFORCE 6600 256 DDR PCI-e",
-"38ef  4Links",
-"3d3d  3DLabs",
-"	0001  GLINT 300SX",
-"	0002  GLINT 500TX",
-"		0000 0000  GLoria L",
-"	0003  GLINT Delta",
-"		0000 0000  GLoria XL",
-"	0004  Permedia",
-"	0005  Permedia",
-"	0006  GLINT MX",
-"		0000 0000  GLoria XL",
-"		1048 0a42  GLoria XXL",
-"	0007  3D Extreme",
-"	0008  GLINT Gamma G1",
-"		1048 0a42  GLoria XXL",
-"	0009  Permedia II 2D+3D",
-"		1040 0011  AccelStar II",
-"		1048 0a42  GLoria XXL",
-"		13e9 1000  6221L-4U",
-"		3d3d 0100  AccelStar II 3D Accelerator",
-"		3d3d 0111  Permedia 3:16",
-"		3d3d 0114  Santa Ana",
-"		3d3d 0116  Oxygen GVX1",
-"		3d3d 0119  Scirocco",
-"		3d3d 0120  Santa Ana PCL",
-"		3d3d 0125  Oxygen VX1",
-"		3d3d 0127  Permedia3 Create!",
-"	000a  GLINT R3",
-"		3d3d 0121  Oxygen VX1",
-"	000c  GLINT R3 [Oxygen VX1]",
-"		3d3d 0144  Oxygen VX1-4X AGP [Permedia 4]",
-"	000d  GLint R4 rev A",
-"	0011  GLint R4 rev B",
-"	0012  GLint R5 rev A",
-"	0013  GLint R5 rev B",
-"	0020  VP10 visual processor",
-"	0022  VP10 visual processor",
-"	0024  VP9 visual processor",
-"	0100  Permedia II 2D+3D",
-"	07a1  Wildcat III 6210",
-"	07a2  Sun XVR-500 Graphics Accelerator",
-"	07a3  Wildcat IV 7210",
-"	1004  Permedia",
-"	3d04  Permedia",
-"	ffff  Glint VGA",
-"4005  Avance Logic Inc.",
-"	0300  ALS300 PCI Audio Device",
-"	0308  ALS300+ PCI Audio Device",
-"	0309  PCI Input Controller",
-"	1064  ALG-2064",
-"	2064  ALG-2064i",
-"	2128  ALG-2364A GUI Accelerator",
-"	2301  ALG-2301",
-"	2302  ALG-2302",
-"	2303  AVG-2302 GUI Accelerator",
-"	2364  ALG-2364A",
-"	2464  ALG-2464",
-"	2501  ALG-2564A/25128A",
-"	4000  ALS4000 Audio Chipset",
-"		4005 4000  ALS4000 Audio Chipset",
-"	4710  ALC200/200P",
-"4033  Addtron Technology Co, Inc.",
-"	1360  RTL8139 Ethernet",
-"4143  Digital Equipment Corp",
-"4144  Alpha Data",
-"	0044  ADM-XRCIIPro",
-"416c  Aladdin Knowledge Systems",
-"	0100  AladdinCARD",
-"	0200  CPC",
-"4321  Tata Power Strategic Electronics Division",
-"4444  Internext Compression Inc",
-"	0016  iTVC16 (CX23416) MPEG-2 Encoder",
-"		0070 0003  WinTV PVR 250",
-"		0070 0009  WinTV PVR 150",
-"		0070 0801  WinTV PVR 150",
-"		0070 0807  WinTV PVR 150",
-"		0070 4001  WinTV PVR 250",
-"		0070 4009  WinTV PVR 250",
-"		0070 4801  WinTV PVR 250",
-"		0070 4803  WinTV PVR 250",
-"		0070 8003  WinTV PVR 150",
-"		0070 8801  WinTV PVR 150",
-"		0070 c801  WinTV PVR 150",
-"		0070 e807  WinTV PVR 500 (1st unit)",
-"		0070 e817  WinTV PVR 500 (2nd unit)",
-"		0070 ff92  WiNTV PVR-550",
-"		0270 0801  WinTV PVR 150",
-"		12ab fff3  MPG600",
-"		12ab ffff  MPG600",
-"		9005 0092  VideOh! AVC-2010",
-"		9005 0093  VideOh! AVC-2410",
-"	0803  iTVC15 MPEG-2 Encoder",
-"		0070 4000  WinTV PVR-350",
-"		0070 4001  WinTV PVR-250",
-"		0070 4800  WinTV PVR-350 (V1)",
-"		12ab 0000  MPG160",
-"		1461 a3ce  M179",
-"		1461 a3cf  M179",
-"4468  Bridgeport machines",
-"4594  Cogetec Informatique Inc",
-"45fb  Baldor Electric Company",
-"4680  Umax Computer Corp",
-"4843  Hercules Computer Technology Inc",
-"4916  RedCreek Communications Inc",
-"	1960  RedCreek PCI adapter",
-"4943  Growth Networks",
-"494f  ACCES I/O Products, Inc.",
-"	10e8  LPCI-COM-8SM",
-"4978  Axil Computer Inc",
-"4a14  NetVin",
-"	5000  NV5000SC",
-"		4a14 5000  RT8029-Based Ethernet Adapter",
-"4b10  Buslogic Inc.",
-"4c48  LUNG HWA Electronics",
-"4c53  SBS Technologies",
-"	0000  PLUSTEST device",
-"		4c53 3000  PLUSTEST card (PC104+)",
-"		4c53 3001  PLUSTEST card (PMC)",
-"	0001  PLUSTEST-MM device",
-"		4c53 3002  PLUSTEST-MM card (PMC)",
-"4ca1  Seanix Technology Inc",
-"4d51  MediaQ Inc.",
-"	0200  MQ-200",
-"4d54  Microtechnica Co Ltd",
-"4ddc  ILC Data Device Corp",
-"	0100  DD-42924I5-300 (ARINC 429 Data Bus)",
-"	0801  BU-65570I1 MIL-STD-1553 Test and Simulation",
-"	0802  BU-65570I2 MIL-STD-1553 Test and Simulation",
-"	0811  BU-65572I1 MIL-STD-1553 Test and Simulation",
-"	0812  BU-65572I2 MIL-STD-1553 Test and Simulation",
-"	0881  BU-65570T1 MIL-STD-1553 Test and Simulation",
-"	0882  BU-65570T2 MIL-STD-1553 Test and Simulation",
-"	0891  BU-65572T1 MIL-STD-1553 Test and Simulation",
-"	0892  BU-65572T2 MIL-STD-1553 Test and Simulation",
-"	0901  BU-65565C1 MIL-STD-1553 Data Bus",
-"	0902  BU-65565C2 MIL-STD-1553 Data Bus",
-"	0903  BU-65565C3 MIL-STD-1553 Data Bus",
-"	0904  BU-65565C4 MIL-STD-1553 Data Bus",
-"	0b01  BU-65569I1 MIL-STD-1553 Data Bus",
-"	0b02  BU-65569I2 MIL-STD-1553 Data Bus",
-"	0b03  BU-65569I3 MIL-STD-1553 Data Bus",
-"	0b04  BU-65569I4 MIL-STD-1553 Data Bus",
-"5046  GemTek Technology Corporation",
-"	1001  PCI Radio",
-"5053  Voyetra Technologies",
-"	2010  Daytona Audio Adapter",
-"5136  S S Technologies",
-"5143  Qualcomm Inc",
-"5145  Ensoniq (Old)",
-"	3031  Concert AudioPCI",
-"5168  Animation Technologies Inc.",
-"	0300  FlyDVB-S",
-"	0301  FlyDVB-T",
-"5301  Alliance Semiconductor Corp.",
-"	0001  ProMotion aT3D",
-"5333  S3 Inc.",
-"	0551  Plato/PX (system)",
-"	5631  86c325 [ViRGE]",
-"	8800  86c866 [Vision 866]",
-"	8801  86c964 [Vision 964]",
-"	8810  86c764_0 [Trio 32 vers 0]",
-"	8811  86c764/765 [Trio32/64/64V+]",
-"	8812  86cM65 [Aurora64V+]",
-"	8813  86c764_3 [Trio 32/64 vers 3]",
-"	8814  86c767 [Trio 64UV+]",
-"	8815  86cM65 [Aurora 128]",
-"	883d  86c988 [ViRGE/VX]",
-"	8870  FireGL",
-"	8880  86c868 [Vision 868 VRAM] vers 0",
-"	8881  86c868 [Vision 868 VRAM] vers 1",
-"	8882  86c868 [Vision 868 VRAM] vers 2",
-"	8883  86c868 [Vision 868 VRAM] vers 3",
-"	88b0  86c928 [Vision 928 VRAM] vers 0",
-"	88b1  86c928 [Vision 928 VRAM] vers 1",
-"	88b2  86c928 [Vision 928 VRAM] vers 2",
-"	88b3  86c928 [Vision 928 VRAM] vers 3",
-"	88c0  86c864 [Vision 864 DRAM] vers 0",
-"	88c1  86c864 [Vision 864 DRAM] vers 1",
-"	88c2  86c864 [Vision 864-P DRAM] vers 2",
-"	88c3  86c864 [Vision 864-P DRAM] vers 3",
-"	88d0  86c964 [Vision 964 VRAM] vers 0",
-"	88d1  86c964 [Vision 964 VRAM] vers 1",
-"	88d2  86c964 [Vision 964-P VRAM] vers 2",
-"	88d3  86c964 [Vision 964-P VRAM] vers 3",
-"	88f0  86c968 [Vision 968 VRAM] rev 0",
-"	88f1  86c968 [Vision 968 VRAM] rev 1",
-"	88f2  86c968 [Vision 968 VRAM] rev 2",
-"	88f3  86c968 [Vision 968 VRAM] rev 3",
-"	8900  86c755 [Trio 64V2/DX]",
-"		5333 8900  86C775 Trio64V2/DX",
-"	8901  86c775/86c785 [Trio 64V2/DX or /GX]",
-"		5333 8901  86C775 Trio64V2/DX, 86C785 Trio64V2/GX",
-"	8902  Plato/PX",
-"	8903  Trio 3D business multimedia",
-"	8904  Trio 64 3D",
-"		1014 00db  Integrated Trio3D",
-"		5333 8904  86C365 Trio3D AGP",
-"	8905  Trio 64V+ family",
-"	8906  Trio 64V+ family",
-"	8907  Trio 64V+ family",
-"	8908  Trio 64V+ family",
-"	8909  Trio 64V+ family",
-"	890a  Trio 64V+ family",
-"	890b  Trio 64V+ family",
-"	890c  Trio 64V+ family",
-"	890d  Trio 64V+ family",
-"	890e  Trio 64V+ family",
-"	890f  Trio 64V+ family",
-"	8a01  ViRGE/DX or /GX",
-"		0e11 b032  ViRGE/GX",
-"		10b4 1617  Nitro 3D",
-"		10b4 1717  Nitro 3D",
-"		5333 8a01  ViRGE/DX",
-"	8a10  ViRGE/GX2",
-"		1092 8a10  Stealth 3D 4000",
-"	8a13  86c368 [Trio 3D/2X]",
-"		5333 8a13  Trio3D/2X",
-"	8a20  86c794 [Savage 3D]",
-"		5333 8a20  86C391 Savage3D",
-"	8a21  86c390 [Savage 3D/MV]",
-"		5333 8a21  86C390 Savage3D/MV",
-"	8a22  Savage 4",
-"		1033 8068  Savage 4",
-"		1033 8069  Savage 4",
-"		1033 8110  Savage 4 LT",
-"		105d 0018  SR9 8Mb SDRAM",
-"		105d 002a  SR9 Pro 16Mb SDRAM",
-"		105d 003a  SR9 Pro 32Mb SDRAM",
-"		105d 092f  SR9 Pro+ 16Mb SGRAM",
-"		1092 4207  Stealth III S540",
-"		1092 4800  Stealth III S540",
-"		1092 4807  SpeedStar A90",
-"		1092 4808  Stealth III S540",
-"		1092 4809  Stealth III S540",
-"		1092 480e  Stealth III S540",
-"		1092 4904  Stealth III S520",
-"		1092 4905  SpeedStar A200",
-"		1092 4a09  Stealth III S540",
-"		1092 4a0b  Stealth III S540 Xtreme",
-"		1092 4a0f  Stealth III S540",
-"		1092 4e01  Stealth III S540",
-"		1102 101d  3d Blaster Savage 4",
-"		1102 101e  3d Blaster Savage 4",
-"		5333 8100  86C394-397 Savage4 SDRAM 100",
-"		5333 8110  86C394-397 Savage4 SDRAM 110",
-"		5333 8125  86C394-397 Savage4 SDRAM 125",
-"		5333 8143  86C394-397 Savage4 SDRAM 143",
-"		5333 8a22  86C394-397 Savage4",
-"		5333 8a2e  86C394-397 Savage4 32bit",
-"		5333 9125  86C394-397 Savage4 SGRAM 125",
-"		5333 9143  86C394-397 Savage4 SGRAM 143",
-"	8a23  Savage 4",
-"	8a25  ProSavage PM133",
-"	8a26  ProSavage KM133",
-"	8c00  ViRGE/M3",
-"	8c01  ViRGE/MX",
-"		1179 0001  ViRGE/MX",
-"	8c02  ViRGE/MX+",
-"	8c03  ViRGE/MX+MV",
-"	8c10  86C270-294 Savage/MX-MV",
-"	8c11  82C270-294 Savage/MX",
-"	8c12  86C270-294 Savage/IX-MV",
-"		1014 017f  Thinkpad T20/T22",
-"		1179 0001  86C584 SuperSavage/IXC Toshiba",
-"	8c13  86C270-294 Savage/IX",
-"		1179 0001  Magnia Z310",
-"	8c22  SuperSavage MX/128",
-"	8c24  SuperSavage MX/64",
-"	8c26  SuperSavage MX/64C",
-"	8c2a  SuperSavage IX/128 SDR",
-"	8c2b  SuperSavage IX/128 DDR",
-"	8c2c  SuperSavage IX/64 SDR",
-"	8c2d  SuperSavage IX/64 DDR",
-"	8c2e  SuperSavage IX/C SDR",
-"		1014 01fc  ThinkPad T23 (2647-4MG)",
-"	8c2f  SuperSavage IX/C DDR",
-"	8d01  86C380 [ProSavageDDR K4M266]",
-"	8d02  VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK)",
-"	8d03  VT8751 [ProSavageDDR P4M266]",
-"	8d04  VT8375 [ProSavage8 KM266/KL266]",
-"	9102  86C410 Savage 2000",
-"		1092 5932  Viper II Z200",
-"		1092 5934  Viper II Z200",
-"		1092 5952  Viper II Z200",
-"		1092 5954  Viper II Z200",
-"		1092 5a35  Viper II Z200",
-"		1092 5a37  Viper II Z200",
-"		1092 5a55  Viper II Z200",
-"		1092 5a57  Viper II Z200",
-"	ca00  SonicVibes",
-"544c  Teralogic Inc",
-"	0350  TL880-based HDTV/ATSC tuner",
-"5455  Technische University Berlin",
-"	4458  S5933",
-"5519  Cnet Technologies, Inc.",
-"5544  Dunord Technologies",
-"	0001  I-30xx Scanner Interface",
-"5555  Genroco, Inc",
-"	0003  TURBOstor HFP-832 [HiPPI NIC]",
-"5654  VoiceTronix Pty Ltd",
-"	3132  OpenSwitch12",
-"5700  Netpower",
-"5851  Exacq Technologies",
-"6356  UltraStor",
-"6374  c't Magazin fuer Computertechnik",
-"	6773  GPPCI",
-"6409  Logitec Corp.",
-"6666  Decision Computer International Co.",
-"	0001  PCCOM4",
-"	0002  PCCOM8",
-"	0004  PCCOM2",
-"	0101  PCI 8255/8254 I/O Card",
-"7063  pcHDTV",
-"	2000  HD-2000",
-"	3000  HD-3000",
-"7604  O.N. Electronic Co Ltd.",
-"7bde  MIDAC Corporation",
-"7fed  PowerTV",
-"8008  Quancom Electronic GmbH",
-"	0010  WDOG1 [PCI-Watchdog 1]",
-"	0011  PWDOG2 [PCI-Watchdog 2]",
-"807d  Asustek Computer, Inc.",
-"8086  Intel Corporation",
-"	0007  82379AB",
-"	0008  Extended Express System Support Controller",
-"	0039  21145 Fast Ethernet",
-"	0122  82437FX",
-"	0309  80303 I/O Processor PCI-to-PCI Bridge",
-"	030d  80312 I/O Companion Chip PCI-to-PCI Bridge",
-"	0326  6700/6702PXH I/OxAPIC Interrupt Controller A",
-"	0327  6700PXH I/OxAPIC Interrupt Controller B",
-"	0329  6700PXH PCI Express-to-PCI Bridge A",
-"	032a  6700PXH PCI Express-to-PCI Bridge B",
-"	032c  6702PXH PCI Express-to-PCI Bridge A",
-"	0330  80332 [Dobson] I/O processor (A-Segment Bridge)",
-"	0331  80332 [Dobson] I/O processor (A-Segment IOAPIC)",
-"	0332  80332 [Dobson] I/O processor (B-Segment Bridge)",
-"	0333  80332 [Dobson] I/O processor (B-Segment IOAPIC)",
-"	0334  80332 [Dobson] I/O processor (ATU)",
-"	0335  80331 [Lindsay] I/O processor (PCI-X Bridge)",
-"	0336  80331 [Lindsay] I/O processor (ATU)",
-"	0340  41210 [Lanai] Serial to Parallel PCI Bridge (A-Segment Bridge)",
-"	0341  41210 [Lanai] Serial to Parallel PCI Bridge (B-Segment Bridge)",
-"	0370  80333 Segment-A PCI Express-to-PCI Express Bridge",
-"	0371  80333 A-Bus IOAPIC",
-"	0372  80333 Segment-B PCI Express-to-PCI Express Bridge",
-"	0373  80333 B-Bus IOAPIC",
-"	0374  80333 Address Translation Unit",
-"	0482  82375EB/SB PCI to EISA Bridge",
-"	0483  82424TX/ZX [Saturn] CPU to PCI bridge",
-"	0484  82378ZB/IB, 82379AB (SIO, SIO.A) PCI to ISA Bridge",
-"	0486  82425EX/ZX [Aries] PCIset with ISA bridge",
-"	04a3  82434LX/NX [Mercury/Neptune] Processor to PCI bridge",
-"	04d0  82437FX [Triton FX]",
-"	0500  E8870 Processor bus control",
-"	0501  E8870 Memory controller",
-"	0502  E8870 Scalability Port 0",
-"	0503  E8870 Scalability Port 1",
-"	0510  E8870IO Hub Interface Port 0 registers (8-bit compatibility port)",
-"	0511  E8870IO Hub Interface Port 1 registers",
-"	0512  E8870IO Hub Interface Port 2 registers",
-"	0513  E8870IO Hub Interface Port 3 registers",
-"	0514  E8870IO Hub Interface Port 4 registers",
-"	0515  E8870IO General SIOH registers",
-"	0516  E8870IO RAS registers",
-"	0530  E8870SP Scalability Port 0 registers",
-"	0531  E8870SP Scalability Port 1 registers",
-"	0532  E8870SP Scalability Port 2 registers",
-"	0533  E8870SP Scalability Port 3 registers",
-"	0534  E8870SP Scalability Port 4 registers",
-"	0535  E8870SP Scalability Port 5 registers",
-"	0536  E8870SP Interleave registers 0 and 1",
-"	0537  E8870SP Interleave registers 2 and 3",
-"	0600  RAID Controller",
-"		8086 01af  SRCZCR",
-"		8086 01c1  ICP Vortex GDT8546RZ",
-"		8086 01f7  SCRU32",
-"	061f  80303 I/O Processor",
-"	0960  80960RP [i960 RP Microprocessor/Bridge]",
-"	0962  80960RM [i960RM Bridge]",
-"	0964  80960RP [i960 RP Microprocessor/Bridge]",
-"	1000  82542 Gigabit Ethernet Controller",
-"		0e11 b0df  NC1632 Gigabit Ethernet Adapter (1000-SX)",
-"		0e11 b0e0  NC1633 Gigabit Ethernet Adapter (1000-LX)",
-"		0e11 b123  NC1634 Gigabit Ethernet Adapter (1000-SX)",
-"		1014 0119  Netfinity Gigabit Ethernet SX Adapter",
-"		8086 1000  PRO/1000 Gigabit Server Adapter",
-"	1001  82543GC Gigabit Ethernet Controller (Fiber)",
-"		0e11 004a  NC6136 Gigabit Server Adapter",
-"		1014 01ea  Netfinity Gigabit Ethernet SX Adapter",
-"		8086 1002  PRO/1000 F Server Adapter",
-"		8086 1003  PRO/1000 F Server Adapter",
-"	1002  Pro 100 LAN+Modem 56 Cardbus II",
-"		8086 200e  Pro 100 LAN+Modem 56 Cardbus II",
-"		8086 2013  Pro 100 SR Mobile Combo Adapter",
-"		8086 2017  Pro 100 S Combo Mobile Adapter",
-"	1004  82543GC Gigabit Ethernet Controller (Copper)",
-"		0e11 0049  NC7132 Gigabit Upgrade Module",
-"		0e11 b1a4  NC7131 Gigabit Server Adapter",
-"		1014 10f2  Gigabit Ethernet Server Adapter",
-"		8086 1004  PRO/1000 T Server Adapter",
-"		8086 2004  PRO/1000 T Server Adapter",
-"	1008  82544EI Gigabit Ethernet Controller (Copper)",
-"		1014 0269  iSeries 1000/100/10 Ethernet Adapter",
-"		1028 011c  PRO/1000 XT Network Connection",
-"		8086 1107  PRO/1000 XT Server Adapter",
-"		8086 2107  PRO/1000 XT Server Adapter",
-"		8086 2110  PRO/1000 XT Server Adapter",
-"		8086 3108  PRO/1000 XT Network Connection",
-"	1009  82544EI Gigabit Ethernet Controller (Fiber)",
-"		1014 0268  iSeries Gigabit Ethernet Adapter",
-"		8086 1109  PRO/1000 XF Server Adapter",
-"		8086 2109  PRO/1000 XF Server Adapter",
-"	100a  82540EM Gigabit Ethernet Controller",
-"	100c  82544GC Gigabit Ethernet Controller (Copper)",
-"		8086 1112  PRO/1000 T Desktop Adapter",
-"		8086 2112  PRO/1000 T Desktop Adapter",
-"	100d  82544GC Gigabit Ethernet Controller (LOM)",
-"		1028 0123  PRO/1000 XT Network Connection",
-"		1079 891f  82544GC Based Network Connection",
-"		4c53 1080  CT8 mainboard",
-"		8086 110d  82544GC Based Network Connection",
-"	100e  82540EM Gigabit Ethernet Controller",
-"		1014 0265  PRO/1000 MT Network Connection",
-"		1014 0267  PRO/1000 MT Network Connection",
-"		1014 026a  PRO/1000 MT Network Connection",
-"		1024 0134  Poweredge SC600",
-"		1028 002e  Optiplex GX260",
-"		1028 0151  PRO/1000 MT Network Connection",
-"		107b 8920  PRO/1000 MT Desktop Adapter",
-"		8086 001e  PRO/1000 MT Desktop Adapter",
-"		8086 002e  PRO/1000 MT Desktop Adapter",
-"		8086 1376  PRO/1000 GT Desktop Adapter",
-"		8086 1476  PRO/1000 GT Desktop Adapter",
-"	100f  82545EM Gigabit Ethernet Controller (Copper)",
-"		1014 0269  iSeries 1000/100/10 Ethernet Adapter",
-"		1014 028e  PRO/1000 MT Network Connection",
-"		8086 1000  PRO/1000 MT Network Connection",
-"		8086 1001  PRO/1000 MT Server Adapter",
-"	1010  82546EB Gigabit Ethernet Controller (Copper)",
-"		0e11 00db  NC7170 Gigabit Server Adapter",
-"		1014 027c  PRO/1000 MT Dual Port Network Adapter",
-"		18fb 7872  RESlink-X",
-"		1fc1 0026  Niagara 2260 Bypass Card",
-"		4c53 1080  CT8 mainboard",
-"		4c53 10a0  CA3/CR3 mainboard",
-"		8086 1011  PRO/1000 MT Dual Port Server Adapter",
-"		8086 1012  Primergy RX300",
-"		8086 101a  PRO/1000 MT Dual Port Network Adapter",
-"		8086 3424  SE7501HG2 Mainboard",
-"	1011  82545EM Gigabit Ethernet Controller (Fiber)",
-"		1014 0268  iSeries Gigabit Ethernet Adapter",
-"		8086 1002  PRO/1000 MF Server Adapter",
-"		8086 1003  PRO/1000 MF Server Adapter (LX)",
-"	1012  82546EB Gigabit Ethernet Controller (Fiber)",
-"		0e11 00dc  NC6170 Gigabit Server Adapter",
-"		8086 1012  PRO/1000 MF Dual Port Server Adapter",
-"	1013  82541EI Gigabit Ethernet Controller (Copper)",
-"		8086 0013  PRO/1000 MT Network Connection",
-"		8086 1013  IBM ThinkCentre Network Card",
-"		8086 1113  PRO/1000 MT Desktop Adapter",
-"	1014  82541ER Gigabit Ethernet Controller",
-"	1015  82540EM Gigabit Ethernet Controller (LOM)",
-"	1016  82540EP Gigabit Ethernet Controller (LOM)",
-"		1014 052c  PRO/1000 MT Mobile Connection",
-"		1179 0001  PRO/1000 MT Mobile Connection",
-"		8086 1016  PRO/1000 MT Mobile Connection",
-"	1017  82540EP Gigabit Ethernet Controller (LOM)",
-"		8086 1017  PR0/1000 MT Desktop Connection",
-"	1018  82541EI Gigabit Ethernet Controller",
-"		8086 1018  PRO/1000 MT Desktop Adapter",
-"	1019  82547EI Gigabit Ethernet Controller (LOM)",
-"		1458 1019  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1458 e000  Intel Gigabit Ethernet (Kenai II)",
-"		8086 1019  PRO/1000 CT Desktop Connection",
-"		8086 301f  D865PERL mainboard",
-"		8086 302c  Intel 82865G Mainboard (D865GBF)",
-"		8086 3427  S875WP1-E mainboard",
-"	101a  82547EI Gigabit Ethernet Controller (Mobile)",
-"	101d  82546EB Gigabit Ethernet Controller",
-"		8086 1000  PRO/1000 MT Quad Port Server Adapter",
-"	101e  82540EP Gigabit Ethernet Controller (Mobile)",
-"		1014 0549  PRO/1000 MT Mobile Connection",
-"		1179 0001  PRO/1000 MT Mobile Connection",
-"		8086 101e  PRO/1000 MT Mobile Connection",
-"	1026  82545GM Gigabit Ethernet Controller",
-"		1028 0169  Precision 470",
-"		8086 1000  PRO/1000 MT Server Connection",
-"		8086 1001  PRO/1000 MT Server Adapter",
-"		8086 1002  PRO/1000 MT Server Adapter",
-"		8086 1026  PRO/1000 MT Server Connection",
-"	1027  82545GM Gigabit Ethernet Controller",
-"		103c 3103  NC310F PCI-X Gigabit Server Adapter",
-"		8086 1001  PRO/1000 MF Server Adapter(LX)",
-"		8086 1002  PRO/1000 MF Server Adapter(LX)",
-"		8086 1003  PRO/1000 MF Server Adapter(LX)",
-"		8086 1027  PRO/1000 MF Server Adapter",
-"	1028  82545GM Gigabit Ethernet Controller",
-"		8086 1028  PRO/1000 MB Server Adapter",
-"	1029  82559 Ethernet Controller",
-"	1030  82559 InBusiness 10/100",
-"	1031  82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller",
-"		1014 0209  ThinkPad A/T/X Series",
-"		104d 80e7  Vaio PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		104d 813c  Vaio PCG-GRV616G",
-"		107b 5350  EtherExpress PRO/100 VE",
-"		1179 0001  EtherExpress PRO/100 VE",
-"		144d c000  EtherExpress PRO/100 VE",
-"		144d c001  EtherExpress PRO/100 VE",
-"		144d c003  EtherExpress PRO/100 VE",
-"		144d c006  vpr Matrix 170B4",
-"	1032  82801CAM (ICH3) PRO/100 VE Ethernet Controller",
-"	1033  82801CAM (ICH3) PRO/100 VM (LOM) Ethernet Controller",
-"	1034  82801CAM (ICH3) PRO/100 VM Ethernet Controller",
-"	1035  82801CAM (ICH3)/82562EH (LOM)  Ethernet Controller",
-"	1036  82801CAM (ICH3) 82562EH Ethernet Controller",
-"	1037  82801CAM (ICH3) Chipset Ethernet Controller",
-"	1038  82801CAM (ICH3) PRO/100 VM (KM) Ethernet Controller",
-"		0e11 0098  Evo N600c",
-"	1039  82801DB PRO/100 VE (LOM) Ethernet Controller",
-"		1014 0267  NetVista A30p",
-"	103a  82801DB PRO/100 VE (CNR) Ethernet Controller",
-"	103b  82801DB PRO/100 VM (LOM) Ethernet Controller",
-"	103c  82801DB PRO/100 VM (CNR) Ethernet Controller",
-"	103d  82801DB PRO/100 VE (MOB) Ethernet Controller",
-"	103e  82801DB PRO/100 VM (MOB) Ethernet Controller",
-"	1040  536EP Data Fax Modem",
-"		16be 1040  V.9X DSP Data Fax Modem",
-"	1043  PRO/Wireless LAN 2100 3B Mini PCI Adapter",
-"		8086 2527  MIM2000/Centrino",
-"	1048  PRO/10GbE LR Server Adapter",
-"		8086 a01f  PRO/10GbE LR Server Adapter",
-"		8086 a11f  PRO/10GbE LR Server Adapter",
-"	104b  Ethernet Controller",
-"	1050  82562EZ 10/100 Ethernet Controller",
-"		1462 728c  865PE Neo2 (MS-6728)",
-"		1462 758c  MS-6758 (875P Neo)",
-"		8086 3020  D865PERL mainboard",
-"		8086 302f  Desktop Board D865GBF",
-"		8086 3427  S875WP1-E mainboard",
-"	1051  82801EB/ER (ICH5/ICH5R) integrated LAN Controller",
-"	1052  PRO/100 VM Network Connection",
-"	1053  PRO/100 VM Network Connection",
-"	1059  82551QM Ethernet Controller",
-"	105e  82571EB Gigabit Ethernet Controller",
-"		1775 6003  Telum GE-QT",
-"	105f  82571EB Gigabit Ethernet Controller",
-"	1060  82571EB Gigabit Ethernet Controller",
-"	1064  82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller",
-"		1043 80f8  P5GD1-VW Mainboard",
-"	1065  82562ET/EZ/GT/GZ - PRO/100 VE Ethernet Controller",
-"	1066  82562 EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller",
-"	1067  82562 EM/EX/GX - PRO/100 VM Ethernet Controller",
-"	1068  82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile",
-"	1069  82562EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller Mobile",
-"	106a  82562G - PRO/100 VE (LOM) Ethernet Controller",
-"	106b  82562G - PRO/100 VE Ethernet Controller Mobile",
-"	1075  82547GI Gigabit Ethernet Controller",
-"		1028 0165  PowerEdge 750",
-"		8086 0075  PRO/1000 CT Network Connection",
-"		8086 1075  PRO/1000 CT Network Connection",
-"	1076  82541GI/PI Gigabit Ethernet Controller",
-"		1028 0165  PowerEdge 750",
-"		1028 019a  PowerEdge SC1425",
-"		8086 0076  PRO/1000 MT Network Connection",
-"		8086 1076  PRO/1000 MT Network Connection",
-"		8086 1176  PRO/1000 MT Desktop Adapter",
-"		8086 1276  PRO/1000 MT Desktop Adapter",
-"	1077  82541GI Gigabit Ethernet Controller",
-"		1179 0001  PRO/1000 MT Mobile Connection",
-"		8086 0077  PRO/1000 MT Mobile Connection",
-"		8086 1077  PRO/1000 MT Mobile Connection",
-"	1078  82541EI Gigabit Ethernet Controller",
-"		8086 1078  PRO/1000 MT Network Connection",
-"	1079  82546GB Gigabit Ethernet Controller",
-"		103c 12a6  HP Dual Port 1000Base-T [A9900A]",
-"		103c 12cf  HP Core Dual Port 1000Base-T [AB352A]",
-"		1fc1 0027  Niagara 2261 Failover NIC",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		4c53 10b0  CL9 mainboard",
-"		8086 0079  PRO/1000 MT Dual Port Network Connection",
-"		8086 1079  PRO/1000 MT Dual Port Network Connection",
-"		8086 1179  PRO/1000 MT Dual Port Network Connection",
-"		8086 117a  PRO/1000 MT Dual Port Server Adapter",
-"	107a  82546GB Gigabit Ethernet Controller",
-"		103c 12a8  HP Dual Port 1000base-SX [A9899A]",
-"		8086 107a  PRO/1000 MF Dual Port Server Adapter",
-"		8086 127a  PRO/1000 MF Dual Port Server Adapter",
-"	107b  82546GB Gigabit Ethernet Controller",
-"		8086 007b  PRO/1000 MB Dual Port Server Connection",
-"		8086 107b  PRO/1000 MB Dual Port Server Connection",
-"	107c  82541PI Gigabit Ethernet Controller",
-"	107d  82572EI Gigabit Ethernet Controller",
-"	107e  82572EI Gigabit Ethernet Controller",
-"	107f  82572EI Gigabit Ethernet Controller",
-"	1080  FA82537EP 56K V.92 Data/Fax Modem PCI",
-"	1081  Enterprise Southbridge LAN Copper",
-"	1082  Enterprise Southbridge LAN fiber",
-"	1083  Enterprise Southbridge LAN SERDES",
-"	1084  Enterprise Southbridge IDE Redirection",
-"	1085  Enterprise Southbridge Serial Port Redirection",
-"	1086  Enterprise Southbridge IPMI/KCS0",
-"	1087  Enterprise Southbridge UHCI Redirection",
-"	1089  Enterprise Southbridge BT",
-"	108a  82546EB Gigabit Ethernet Controller",
-"	108b  82573V Gigabit Ethernet Controller (Copper)",
-"	108c  82573E Gigabit Ethernet Controller (Copper)",
-"	108e  82573E KCS (Active Management)",
-"	108f  Intel(R) Active Management Technology - SOL",
-"	1092  Intel(R) PRO/100 VE Network Connection",
-"	1096  PRO/1000 EB Network Connection with I/O Acceleration",
-"	1097  Enterprise Southbridge DPT LAN fiber",
-"	1098  PRO/1000 EB Backplane Connection with I/O Acceleration",
-"	1099  82546GB Quad Port Server Adapter",
-"	109a  82573L Gigabit Ethernet Controller",
-"		17aa 207e  Thinkpad X60s",
-"	109b  82546GB PRO/1000 GF Quad Port Server Adapter",
-"	10a0  82571EB PRO/1000 AT Quad Port Bypass Adapter",
-"	10a1  82571EB PRO/1000 AF Quad Port Bypass Adapter",
-"	10b0  82573L PRO/1000 PL Network Connection",
-"	10b2  82573V PRO/1000 PM Network Connection",
-"	10b3  82573E PRO/1000 PM Network Connection",
-"	10b4  82573L PRO/1000 PL Network Connection",
-"	10b5  82546GB PRO/1000 GT Quad Port Server Adapter",
-"		103c 3109  NC340T PCI-X Quad-port Gigabit Server Adapter",
-"	1107  PRO/1000 MF Server Adapter (LX)",
-"	1130  82815 815 Chipset Host Bridge and Memory Controller Hub",
-"		1025 1016  Travelmate 612 TX",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	1131  82815 815 Chipset AGP Bridge",
-"	1132  82815 CGC [Chipset Graphics Controller]",
-"		1025 1016  Travelmate 612 TX",
-"		104d 80df  Vaio PCG-FX403",
-"		8086 4532  D815EEA2 Mainboard",
-"		8086 4541  D815EEA Motherboard",
-"		8086 4557  D815EGEW Mainboard",
-"	1161  82806AA PCI64 Hub Advanced Programmable Interrupt Controller",
-"		8086 1161  82806AA PCI64 Hub APIC",
-"	1162  Xscale 80200 Big Endian Companion Chip",
-"	1200  Intel IXP1200 Network Processor",
-"		172a 0000  AEP SSL Accelerator",
-"	1209  8255xER/82551IT Fast Ethernet Controller",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		4c53 1070  PC6 mainboard",
-"	1221  82092AA PCI to PCMCIA Bridge",
-"	1222  82092AA IDE Controller",
-"	1223  SAA7116",
-"	1225  82452KX/GX [Orion]",
-"	1226  82596 PRO/10 PCI",
-"	1227  82865 EtherExpress PRO/100A",
-"	1228  82556 EtherExpress PRO/100 Smart",
-"	1229  82557/8/9 [Ethernet Pro 100]",
-"		0e11 3001  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3002  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3003  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3004  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3005  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3006  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3007  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 b01e  NC3120 Fast Ethernet NIC",
-"		0e11 b01f  NC3122 Fast Ethernet NIC (dual port)",
-"		0e11 b02f  NC1120 Ethernet NIC",
-"		0e11 b04a  Netelligent 10/100TX NIC with Wake on LAN",
-"		0e11 b0c6  NC3161 Fast Ethernet NIC (embedded, WOL)",
-"		0e11 b0c7  NC3160 Fast Ethernet NIC (embedded)",
-"		0e11 b0d7  NC3121 Fast Ethernet NIC (WOL)",
-"		0e11 b0dd  NC3131 Fast Ethernet NIC (dual port)",
-"		0e11 b0de  NC3132 Fast Ethernet Module (dual port)",
-"		0e11 b0e1  NC3133 Fast Ethernet Module (100-FX)",
-"		0e11 b134  NC3163 Fast Ethernet NIC (embedded, WOL)",
-"		0e11 b13c  NC3162 Fast Ethernet NIC (embedded)",
-"		0e11 b144  NC3123 Fast Ethernet NIC (WOL)",
-"		0e11 b163  NC3134 Fast Ethernet NIC (dual port)",
-"		0e11 b164  NC3135 Fast Ethernet Upgrade Module (dual port)",
-"		0e11 b1a4  NC7131 Gigabit Server Adapter",
-"		1014 005c  82558B Ethernet Pro 10/100",
-"		1014 01bc  82559 Fast Ethernet LAN On Motherboard",
-"		1014 01f1  10/100 Ethernet Server Adapter",
-"		1014 01f2  10/100 Ethernet Server Adapter",
-"		1014 0207  Ethernet Pro/100 S",
-"		1014 0232  10/100 Dual Port Server Adapter",
-"		1014 023a  ThinkPad R30",
-"		1014 105c  Netfinity 10/100",
-"		1014 2205  ThinkPad A22p",
-"		1014 305c  10/100 EtherJet Management Adapter",
-"		1014 405c  10/100 EtherJet Adapter with Alert on LAN",
-"		1014 505c  10/100 EtherJet Secure Management Adapter",
-"		1014 605c  10/100 EtherJet Secure Management Adapter",
-"		1014 705c  10/100 Netfinity 10/100 Ethernet Security Adapter",
-"		1014 805c  10/100 Netfinity 10/100 Ethernet Security Adapter",
-"		1028 009b  PowerEdge 2500/2550",
-"		1028 00ce  PowerEdge 1400",
-"		1033 8000  PC-9821X-B06",
-"		1033 8016  PK-UG-X006",
-"		1033 801f  PK-UG-X006",
-"		1033 8026  PK-UG-X006",
-"		1033 8063  82559-based Fast Ethernet Adapter",
-"		1033 8064  82559-based Fast Ethernet Adapter",
-"		103c 10c0  NetServer 10/100TX",
-"		103c 10c3  NetServer 10/100TX",
-"		103c 10ca  NetServer 10/100TX",
-"		103c 10cb  NetServer 10/100TX",
-"		103c 10e3  NetServer 10/100TX",
-"		103c 10e4  NetServer 10/100TX",
-"		103c 1200  NetServer 10/100TX",
-"		108e 10cf  EtherExpress PRO/100(B)",
-"		10c3 1100  SmartEther100 SC1100",
-"		10cf 1115  8255x-based Ethernet Adapter (10/100)",
-"		10cf 1143  8255x-based Ethernet Adapter (10/100)",
-"		110a 008b  82551QM Fast Ethernet Multifuction PCI/CardBus Controller",
-"		1179 0001  8255x-based Ethernet Adapter (10/100)",
-"		1179 0002  PCI FastEther LAN on Docker",
-"		1179 0003  8255x-based Fast Ethernet",
-"		1259 2560  AT-2560 100",
-"		1259 2561  AT-2560 100 FX Ethernet Adapter",
-"		1266 0001  NE10/100 Adapter",
-"		13e9 1000  6221L-4U",
-"		144d 2501  SEM-2000 MiniPCI LAN Adapter",
-"		144d 2502  SEM-2100IL MiniPCI LAN Adapter",
-"		1668 1100  EtherExpress PRO/100B (TX) (MiniPCI Ethernet+Modem)",
-"		4c53 1080  CT8 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"		8086 0001  EtherExpress PRO/100B (TX)",
-"		8086 0002  EtherExpress PRO/100B (T4)",
-"		8086 0003  EtherExpress PRO/10+",
-"		8086 0004  EtherExpress PRO/100 WfM",
-"		8086 0005  82557 10/100",
-"		8086 0006  82557 10/100 with Wake on LAN",
-"		8086 0007  82558 10/100 Adapter",
-"		8086 0008  82558 10/100 with Wake on LAN",
-"		8086 000a  EtherExpress PRO/100+ Management Adapter",
-"		8086 000b  EtherExpress PRO/100+",
-"		8086 000c  EtherExpress PRO/100+ Management Adapter",
-"		8086 000d  EtherExpress PRO/100+ Alert On LAN II* Adapter",
-"		8086 000e  EtherExpress PRO/100+ Management Adapter with Alert On LAN*",
-"		8086 000f  EtherExpress PRO/100 Desktop Adapter",
-"		8086 0010  EtherExpress PRO/100 S Management Adapter",
-"		8086 0011  EtherExpress PRO/100 S Management Adapter",
-"		8086 0012  EtherExpress PRO/100 S Advanced Management Adapter (D)",
-"		8086 0013  EtherExpress PRO/100 S Advanced Management Adapter (E)",
-"		8086 0030  EtherExpress PRO/100  Management Adapter with Alert On LAN* GC",
-"		8086 0031  EtherExpress PRO/100 Desktop Adapter",
-"		8086 0040  EtherExpress PRO/100 S Desktop Adapter",
-"		8086 0041  EtherExpress PRO/100 S Desktop Adapter",
-"		8086 0042  EtherExpress PRO/100 Desktop Adapter",
-"		8086 0050  EtherExpress PRO/100 S Desktop Adapter",
-"		8086 1009  EtherExpress PRO/100+ Server Adapter",
-"		8086 100c  EtherExpress PRO/100+ Server Adapter (PILA8470B)",
-"		8086 1012  EtherExpress PRO/100 S Server Adapter (D)",
-"		8086 1013  EtherExpress PRO/100 S Server Adapter (E)",
-"		8086 1015  EtherExpress PRO/100 S Dual Port Server Adapter",
-"		8086 1017  EtherExpress PRO/100+ Dual Port Server Adapter",
-"		8086 1030  EtherExpress PRO/100+ Management Adapter with Alert On LAN* G Server",
-"		8086 1040  EtherExpress PRO/100 S Server Adapter",
-"		8086 1041  EtherExpress PRO/100 S Server Adapter",
-"		8086 1042  EtherExpress PRO/100 Server Adapter",
-"		8086 1050  EtherExpress PRO/100 S Server Adapter",
-"		8086 1051  EtherExpress PRO/100 Server Adapter",
-"		8086 1052  EtherExpress PRO/100 Server Adapter",
-"		8086 10f0  EtherExpress PRO/100+ Dual Port Adapter",
-"		8086 2009  EtherExpress PRO/100 S Mobile Adapter",
-"		8086 200d  EtherExpress PRO/100 Cardbus",
-"		8086 200e  EtherExpress PRO/100 LAN+V90 Cardbus Modem",
-"		8086 200f  EtherExpress PRO/100 SR Mobile Adapter",
-"		8086 2010  EtherExpress PRO/100 S Mobile Combo Adapter",
-"		8086 2013  EtherExpress PRO/100 SR Mobile Combo Adapter",
-"		8086 2016  EtherExpress PRO/100 S Mobile Adapter",
-"		8086 2017  EtherExpress PRO/100 S Combo Mobile Adapter",
-"		8086 2018  EtherExpress PRO/100 SR Mobile Adapter",
-"		8086 2019  EtherExpress PRO/100 SR Combo Mobile Adapter",
-"		8086 2101  EtherExpress PRO/100 P Mobile Adapter",
-"		8086 2102  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2103  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2104  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2105  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2106  EtherExpress PRO/100 P Mobile Adapter",
-"		8086 2107  EtherExpress PRO/100 Network Connection",
-"		8086 2108  EtherExpress PRO/100 Network Connection",
-"		8086 2200  EtherExpress PRO/100 P Mobile Combo Adapter",
-"		8086 2201  EtherExpress PRO/100 P Mobile Combo Adapter",
-"		8086 2202  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2203  EtherExpress PRO/100+ MiniPCI",
-"		8086 2204  EtherExpress PRO/100+ MiniPCI",
-"		8086 2205  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2206  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2207  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2208  EtherExpress PRO/100 P Mobile Combo Adapter",
-"		8086 2402  EtherExpress PRO/100+ MiniPCI",
-"		8086 2407  EtherExpress PRO/100+ MiniPCI",
-"		8086 2408  EtherExpress PRO/100+ MiniPCI",
-"		8086 2409  EtherExpress PRO/100+ MiniPCI",
-"		8086 240f  EtherExpress PRO/100+ MiniPCI",
-"		8086 2410  EtherExpress PRO/100+ MiniPCI",
-"		8086 2411  EtherExpress PRO/100+ MiniPCI",
-"		8086 2412  EtherExpress PRO/100+ MiniPCI",
-"		8086 2413  EtherExpress PRO/100+ MiniPCI",
-"		8086 3000  82559 Fast Ethernet LAN on Motherboard",
-"		8086 3001  82559 Fast Ethernet LOM with Basic Alert on LAN*",
-"		8086 3002  82559 Fast Ethernet LOM with Alert on LAN II*",
-"		8086 3006  EtherExpress PRO/100 S Network Connection",
-"		8086 3007  EtherExpress PRO/100 S Network Connection",
-"		8086 3008  EtherExpress PRO/100 Network Connection",
-"		8086 3010  EtherExpress PRO/100 S Network Connection",
-"		8086 3011  EtherExpress PRO/100 S Network Connection",
-"		8086 3012  EtherExpress PRO/100 Network Connection",
-"		8086 3411  SDS2 Mainboard",
-"	122d  430FX - 82437FX TSC [Triton I]",
-"	122e  82371FB PIIX ISA [Triton I]",
-"	1230  82371FB PIIX IDE [Triton I]",
-"	1231  DSVD Modem",
-"	1234  430MX - 82371MX Mobile PCI I/O IDE Xcelerator (MPIIX)",
-"	1235  430MX - 82437MX Mob. System Ctrlr (MTSC) & 82438MX Data Path (MTDP)",
-"	1237  440FX - 82441FX PMC [Natoma]",
-"	1239  82371FB PIIX IDE Interface",
-"	123b  82380PB PCI to PCI Docking Bridge",
-"	123c  82380AB (MISA) Mobile PCI-to-ISA Bridge",
-"	123d  683053 Programmable Interrupt Device",
-"	123e  82466GX (IHPC) Integrated Hot-Plug Controller",
-"	123f  82466GX Integrated Hot-Plug Controller (IHPC)",
-"	1240  82752 (752) AGP Graphics Accelerator",
-"	124b  82380FB (MPCI2) Mobile Docking Controller",
-"	1250  430HX - 82439HX TXC [Triton II]",
-"	1360  82806AA PCI64 Hub PCI Bridge",
-"	1361  82806AA PCI64 Hub Controller (HRes)",
-"		8086 1361  82806AA PCI64 Hub Controller (HRes)",
-"		8086 8000  82806AA PCI64 Hub Controller (HRes)",
-"	1460  82870P2 P64H2 Hub PCI Bridge",
-"	1461  82870P2 P64H2 I/OxAPIC",
-"		15d9 3480  P4DP6",
-"		4c53 1090  Cx9/Vx9 mainboard",
-"	1462  82870P2 P64H2 Hot Plug Controller",
-"	1960  80960RP [i960RP Microprocessor]",
-"		101e 0431  MegaRAID 431 RAID Controller",
-"		101e 0438  MegaRAID 438 Ultra2 LVD RAID Controller",
-"		101e 0466  MegaRAID 466 Express Plus RAID Controller",
-"		101e 0467  MegaRAID 467 Enterprise 1500 RAID Controller",
-"		101e 0490  MegaRAID 490 Express 300 RAID Controller",
-"		101e 0762  MegaRAID 762 Express RAID Controller",
-"		101e 09a0  PowerEdge Expandable RAID Controller 2/SC",
-"		1028 0467  PowerEdge Expandable RAID Controller 2/DC",
-"		1028 1111  PowerEdge Expandable RAID Controller 2/SC",
-"		103c 03a2  MegaRAID",
-"		103c 10c6  MegaRAID 438, HP NetRAID-3Si",
-"		103c 10c7  MegaRAID T5, Integrated HP NetRAID",
-"		103c 10cc  MegaRAID, Integrated HP NetRAID",
-"		103c 10cd  HP NetRAID-1Si",
-"		105a 0000  SuperTrak",
-"		105a 2168  SuperTrak Pro",
-"		105a 5168  SuperTrak66/100",
-"		1111 1111  MegaRAID 466, PowerEdge Expandable RAID Controller 2/SC",
-"		1111 1112  PowerEdge Expandable RAID Controller 2/SC",
-"		113c 03a2  MegaRAID",
-"		e4bf 1010  CG1-RADIO",
-"		e4bf 1020  CU2-QUARTET",
-"		e4bf 1040  CU1-CHORUS",
-"		e4bf 3100  CX1-BAND",
-"	1962  80960RM [i960RM Microprocessor]",
-"		105a 0000  SuperTrak SX6000 I2O CPU",
-"	1a21  82840 840 (Carmel) Chipset Host Bridge (Hub A)",
-"	1a23  82840 840 (Carmel) Chipset AGP Bridge",
-"	1a24  82840 840 (Carmel) Chipset PCI Bridge (Hub B)",
-"	1a30  82845 845 (Brookdale) Chipset Host Bridge",
-"		1028 010e  Optiplex GX240",
-"	1a31  82845 845 (Brookdale) Chipset AGP Bridge",
-"	1a38  Server DMA Engine",
-"	1a48  PRO/10GbE SR Server Adapter",
-"	2410  82801AA ISA Bridge (LPC)",
-"	2411  82801AA IDE",
-"	2412  82801AA USB",
-"	2413  82801AA SMBus",
-"	2415  82801AA AC'97 Audio",
-"		1028 0095  Precision Workstation 220 Integrated Digital Audio",
-"		110a 0051  Activy 2xx",
-"		11d4 0040  SoundMAX Integrated Digital Audio",
-"		11d4 0048  SoundMAX Integrated Digital Audio",
-"		11d4 5340  SoundMAX Integrated Digital Audio",
-"		1734 1025  Activy 3xx",
-"	2416  82801AA AC'97 Modem",
-"	2418  82801AA PCI Bridge",
-"	2420  82801AB ISA Bridge (LPC)",
-"	2421  82801AB IDE",
-"	2422  82801AB USB",
-"	2423  82801AB SMBus",
-"	2425  82801AB AC'97 Audio",
-"		11d4 0040  SoundMAX Integrated Digital Audio",
-"		11d4 0048  SoundMAX Integrated Digital Audio",
-"	2426  82801AB AC'97 Modem",
-"	2428  82801AB PCI Bridge",
-"	2440  82801BA ISA Bridge (LPC)",
-"	2442  82801BA/BAM USB (Hub #1)",
-"		1014 01c6  Netvista A40/A40p",
-"		1025 1016  Travelmate 612 TX",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	2443  82801BA/BAM SMBus",
-"		1014 01c6  Netvista A40/A40p",
-"		1025 1016  Travelmate 612 TX",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	2444  82801BA/BAM USB (Hub #2)",
-"		1025 1016  Travelmate 612 TX",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"	2445  82801BA/BAM AC'97 Audio",
-"		0e11 0088  Evo D500",
-"		1014 01c6  Netvista A40/A40p",
-"		1025 1016  Travelmate 612 TX",
-"		104d 80df  Vaio PCG-FX403",
-"		1462 3370  STAC9721 AC",
-"		147b 0507  TH7II-RAID",
-"		8086 4557  D815EGEW Mainboard",
-"	2446  82801BA/BAM AC'97 Modem",
-"		1025 1016  Travelmate 612 TX",
-"		104d 80df  Vaio PCG-FX403",
-"	2448  82801 Mobile PCI Bridge",
-"		103c 099c  NX6110/NC6120",
-"		1734 1055  Amilo M1420",
-"	2449  82801BA/BAM/CA/CAM Ethernet Controller",
-"		0e11 0012  EtherExpress PRO/100 VM",
-"		0e11 0091  EtherExpress PRO/100 VE",
-"		1014 01ce  EtherExpress PRO/100 VE",
-"		1014 01dc  EtherExpress PRO/100 VE",
-"		1014 01eb  EtherExpress PRO/100 VE",
-"		1014 01ec  EtherExpress PRO/100 VE",
-"		1014 0202  EtherExpress PRO/100 VE",
-"		1014 0205  EtherExpress PRO/100 VE",
-"		1014 0217  EtherExpress PRO/100 VE",
-"		1014 0234  EtherExpress PRO/100 VE",
-"		1014 023d  EtherExpress PRO/100 VE",
-"		1014 0244  EtherExpress PRO/100 VE",
-"		1014 0245  EtherExpress PRO/100 VE",
-"		1014 0265  PRO/100 VE Desktop Connection",
-"		1014 0267  PRO/100 VE Desktop Connection",
-"		1014 026a  PRO/100 VE Desktop Connection",
-"		109f 315d  EtherExpress PRO/100 VE",
-"		109f 3181  EtherExpress PRO/100 VE",
-"		1179 ff01  PRO/100 VE Network Connection",
-"		1186 7801  EtherExpress PRO/100 VE",
-"		144d 2602  HomePNA 1M CNR",
-"		8086 3010  EtherExpress PRO/100 VE",
-"		8086 3011  EtherExpress PRO/100 VM",
-"		8086 3012  82562EH based Phoneline",
-"		8086 3013  EtherExpress PRO/100 VE",
-"		8086 3014  EtherExpress PRO/100 VM",
-"		8086 3015  82562EH based Phoneline",
-"		8086 3016  EtherExpress PRO/100 P Mobile Combo",
-"		8086 3017  EtherExpress PRO/100 P Mobile",
-"		8086 3018  EtherExpress PRO/100",
-"	244a  82801BAM IDE U100",
-"		1025 1016  Travelmate 612TX",
-"		104d 80df  Vaio PCG-FX403",
-"	244b  82801BA IDE U100",
-"		1014 01c6  Netvista A40/A40p",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	244c  82801BAM ISA Bridge (LPC)",
-"	244e  82801 PCI Bridge",
-"		1014 0267  NetVista A30p",
-"	2450  82801E ISA Bridge (LPC)",
-"	2452  82801E USB",
-"	2453  82801E SMBus",
-"	2459  82801E Ethernet Controller 0",
-"	245b  82801E IDE U100",
-"	245d  82801E Ethernet Controller 1",
-"	245e  82801E PCI Bridge",
-"	2480  82801CA LPC Interface Controller",
-"	2482  82801CA/CAM USB (Hub #1)",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"		8086 3424  SE7501HG2 Mainboard",
-"		8086 4541  Latitude C640",
-"	2483  82801CA/CAM SMBus Controller",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"	2484  82801CA/CAM USB (Hub #2)",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"	2485  82801CA/CAM AC'97 Audio Controller",
-"		1013 5959  Crystal WMD Audio Codec",
-"		1014 0222  ThinkPad T23 (2647-4MG) or A30/A30p (2652/2653)",
-"		1014 0508  ThinkPad T30",
-"		1014 051c  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		144d c006  vpr Matrix 170B4",
-"	2486  82801CA/CAM AC'97 Modem Controller",
-"		1014 0223  ThinkPad A/T/X Series",
-"		1014 0503  ThinkPad R31 2656BBG",
-"		1014 051a  ThinkPad A/T/X Series",
-"		101f 1025  620 Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		134d 4c21  Dell Inspiron 2100 internal modem",
-"		144d 2115  vpr Matrix 170B4 internal modem",
-"		14f1 5421  MD56ORD V.92 MDC Modem",
-"	2487  82801CA/CAM USB (Hub #3)",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"	248a  82801CAM IDE U100",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		8086 1958  vpr Matrix 170B4",
-"		8086 4541  Latitude C640",
-"	248b  82801CA Ultra ATA Storage Controller",
-"		15d9 3480  P4DP6",
-"	248c  82801CAM ISA Bridge (LPC)",
-"	24c0  82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge",
-"		1014 0267  NetVista A30p",
-"		1462 5800  845PE Max (MS-6580)",
-"	24c1  82801DBL (ICH4-L) IDE Controller",
-"	24c2  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 5800  845PE Max (MS-6580)",
-"		1509 2990  Averatec 5110H laptop",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		1734 1055  Amilo M1420",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 4541  Latitude D400",
-"	24c3  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1458 24c2  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		1734 1055  Amilo M1420",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	24c4  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 5800  845PE Max (MS-6580)",
-"		1509 2990  Averatec 5110H",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 4541  Latitude D400",
-"	24c5  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller",
-"		0e11 00b8  Analog Devices Inc. codec [SoundMAX]",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1458 a002  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"		1734 1005  D1451 (SCENIC N300, i845GV) Sigmatel STAC9750T",
-"		1734 1055  Amilo M1420",
-"	24c6  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller",
-"		1025 003c  Aspire 2001WLCi (Compal CL50 motherboard) implementation",
-"		1025 005a  TravelMate 290",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"	24c7  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 5800  845PE Max (MS-6580)",
-"		1509 2990  Averatec 5110H",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 4541  Latitude D400",
-"	24ca  82801DBM (ICH4-M) IDE Controller",
-"		1025 005a  TravelMate 290",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1734 1055  Amilo M1420",
-"		8086 4541  Latitude D400",
-"	24cb  82801DB (ICH4) IDE Controller",
-"		1014 0267  NetVista A30p",
-"		1028 0126  Optiplex GX260",
-"		1458 24c2  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	24cc  82801DBM (ICH4-M) LPC Interface Bridge",
-"		1734 1055  Amilo M1420",
-"	24cd  82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 011d  Latitude D600",
-"		1028 0126  Optiplex GX260",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 3981  845PE Max (MS-6580)",
-"		1509 1968  Averatec 5110H",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		1734 1055  Amilo M1420",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	24d0  82801EB/ER (ICH5/ICH5R) LPC Interface Bridge",
-"	24d1  82801EB (ICH5) SATA Controller",
-"		1028 0169  Precision 470",
-"		1028 019a  PowerEdge SC1425",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P4P800 SE Mainboard",
-"		1458 24d1  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d2  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000/8KNXP motherboard",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d3  82801EB/ER (ICH5/ICH5R) SMBus Controller",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0156  Precision 360",
-"		1028 0169  Precision 470",
-"		1043 80a6  P4P800 Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d4  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d5  82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller",
-"		1028 0169  Precision 470",
-"		103c 006a  NX9500",
-"		103c 12bc  d330 uT",
-"		1043 80f3  P4P800 Mainboard",
-"		1043 810f  P5P800-MX Mainboard",
-"		1458 a002  GA-8IPE1000/8KNXP motherboard",
-"		1462 0080  65PE Neo2-V (MS-6788) mainboard",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		8086 a000  D865PERL mainboard",
-"		8086 e000  D865PERL mainboard",
-"		8086 e001  Desktop Board D865GBF",
-"	24d6  82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller",
-"		103c 006a  NX9500",
-"	24d7  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24db  82801EB/ER (ICH5/ICH5R) IDE Controller",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		1462 7580  MSI 875P",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 24db  P4C800 Mainboard",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24dc  82801EB (ICH5) LPC Interface Bridge",
-"	24dd  82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 5006  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24de  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24df  82801ER (ICH5R) SATA Controller",
-"	2500  82820 820 (Camino) Chipset Host Bridge (MCH)",
-"		1028 0095  Precision Workstation 220 Chipset",
-"		1043 801c  P3C-2000 system chipset",
-"	2501  82820 820 (Camino) Chipset Host Bridge (MCH)",
-"		1043 801c  P3C-2000 system chipset",
-"	250b  82820 820 (Camino) Chipset Host Bridge",
-"	250f  82820 820 (Camino) Chipset AGP Bridge",
-"	2520  82805AA MTH Memory Translator Hub",
-"	2521  82804AA MRH-S Memory Repeater Hub for SDRAM",
-"	2530  82850 850 (Tehama) Chipset Host Bridge (MCH)",
-"		147b 0507  TH7II-RAID",
-"	2531  82860 860 (Wombat) Chipset Host Bridge (MCH)",
-"	2532  82850 850 (Tehama) Chipset AGP Bridge",
-"	2533  82860 860 (Wombat) Chipset AGP Bridge",
-"	2534  82860 860 (Wombat) Chipset PCI Bridge",
-"	2540  E7500 Memory Controller Hub",
-"		15d9 3480  P4DP6",
-"	2541  E7500/E7501 Host RASUM Controller",
-"		15d9 3480  P4DP6",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 3424  SE7501HG2 Mainboard",
-"	2543  E7500/E7501 Hub Interface B PCI-to-PCI Bridge",
-"	2544  E7500/E7501 Hub Interface B RASUM Controller",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	2545  E7500/E7501 Hub Interface C PCI-to-PCI Bridge",
-"	2546  E7500/E7501 Hub Interface C RASUM Controller",
-"	2547  E7500/E7501 Hub Interface D PCI-to-PCI Bridge",
-"	2548  E7500/E7501 Hub Interface D RASUM Controller",
-"	254c  E7501 Memory Controller Hub",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 3424  SE7501HG2 Mainboard",
-"	2550  E7505 Memory Controller Hub",
-"	2551  E7505/E7205 Series RAS Controller",
-"	2552  E7505/E7205 PCI-to-AGP Bridge",
-"	2553  E7505 Hub Interface B PCI-to-PCI Bridge",
-"	2554  E7505 Hub Interface B PCI-to-PCI Bridge RAS Controller",
-"	255d  E7205 Memory Controller Hub",
-"	2560  82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface",
-"		1028 0126  Optiplex GX260",
-"		1458 2560  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"	2561  82845G/GL[Brookdale-G]/GE/PE Host-to-AGP Bridge",
-"	2562  82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device",
-"		0e11 00b9  Evo D510 SFF",
-"		1014 0267  NetVista A30p",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"	2570  82865G/PE/P DRAM Controller/Host-Hub Interface",
-"		103c 006a  NX9500",
-"		1043 80f2  P5P800-MX Mainboard",
-"		1458 2570  GA-8IPE1000 Pro2 motherboard (865PE)",
-"	2571  82865G/PE/P PCI to AGP Controller",
-"	2572  82865G Integrated Graphics Controller",
-"		1028 019d  Dimension 3000",
-"		103c 12bc  D530 sff(dc578av)",
-"		1043 80a5  P5P800-MX Mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"	2573  82865G/PE/P PCI to CSA Bridge",
-"	2576  82865G/PE/P Processor to I/O Memory Interface",
-"	2578  82875P/E7210 Memory Controller Hub",
-"		1458 2578  GA-8KNXP motherboard (875P)",
-"		1462 7580  MS-6758 (875P Neo)",
-"		15d9 4580  P4SCE Motherboard",
-"	2579  82875P Processor to AGP Controller",
-"	257b  82875P/E7210 Processor to PCI to CSA Bridge",
-"	257e  82875P/E7210 Processor to I/O Memory Interface",
-"	2580  915G/P/GV/GL/PL/910GL Express Memory Controller Hub",
-"		1458 2580  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105b  Scenic W620",
-"	2581  915G/P/GV/GL/PL/910GL Express PCI Express Root Port",
-"	2582  82915G/GV/910GL Express Chipset Family Graphics Controller",
-"		1028 1079  Optiplex GX280",
-"		103c 3006  DC7100 SFF(DX878AV)",
-"		1043 2582  P5GD1-VW Mainboard",
-"		1458 2582  GA-8I915ME-G Mainboard",
-"		1734 105b  Scenic W620",
-"	2584  925X/XE Express Memory Controller Hub",
-"	2585  925X/XE Express PCI Express Root Port",
-"	2588  E7220/E7221 Memory Controller Hub",
-"	2589  E7220/E7221 PCI Express Root Port",
-"	258a  E7221 Integrated Graphics Controller",
-"	2590  Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller",
-"		1028 0182  Dell Latidude C610",
-"		103c 099c  NX6110/NC6120",
-"		a304 81b7  Vaio VGN-S3XP",
-"	2591  Mobile 915GM/PM Express PCI Express Root Port",
-"	2592  Mobile 915GM/GMS/910GML Express Graphics Controller",
-"		103c 099c  NX6110/NC6120",
-"		103c 308a  NC6220",
-"		1043 1881  GMA 900 915GM Integrated Graphics",
-"	25a1  6300ESB LPC Interface Controller",
-"	25a2  6300ESB PATA Storage Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	25a3  6300ESB SATA Storage Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25a4  6300ESB SMBus Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25a6  6300ESB AC'97 Audio Controller",
-"		4c53 10b0  CL9 mainboard",
-"	25a7  6300ESB AC'97 Modem Controller",
-"	25a9  6300ESB USB Universal Host Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25aa  6300ESB USB Universal Host Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ab  6300ESB Watchdog Timer",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ac  6300ESB I/O Advanced Programmable Interrupt Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ad  6300ESB USB2 Enhanced Host Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ae  6300ESB 64-bit PCI-X Bridge",
-"	25b0  6300ESB SATA RAID Controller",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25c0  Workstation Memory Controller Hub",
-"	25d0  Server Memory Controller Hub",
-"	25d4  Server Memory Contoller Hub",
-"	25d8  Server Memory Controller Hub",
-"	25e2  Server PCI Express x4 Port 2",
-"	25e3  Server PCI Express x4 Port 3",
-"	25e4  Server PCI Express x4 Port 4",
-"	25e5  Server PCI Express x4 Port 5",
-"	25e6  Server PCI Express x4 Port 6",
-"	25e7  Server PCI Express x4 Port 7",
-"	25e8  Server AMB Memory Mapped Registers",
-"	25f0  Server Error Reporting Registers",
-"	25f1  Reserved Registers",
-"	25f3  Reserved Registers",
-"	25f5  Server FBD Registers",
-"	25f6  Server FBD Registers",
-"	25f7  Server PCI Express x8 Port 2-3",
-"	25f8  Server PCI Express x8 Port 4-5",
-"	25f9  Server PCI Express x8 Port 6-7",
-"	25fa  Server PCI Express x16 Port 4-7",
-"	2600  E8500/E8501 Hub Interface 1.5",
-"	2601  E8500/E8501 PCI Express x4 Port D",
-"	2602  E8500/E8501 PCI Express x4 Port C0",
-"	2603  E8500/E8501 PCI Express x4 Port C1",
-"	2604  E8500/E8501 PCI Express x4 Port B0",
-"	2605  E8500/E8501 PCI Express x4 Port B1",
-"	2606  E8500/E8501 PCI Express x4 Port A0",
-"	2607  E8500/E8501 PCI Express x4 Port A1",
-"	2608  E8500/E8501 PCI Express x8 Port C",
-"	2609  E8500/E8501 PCI Express x8 Port B",
-"	260a  E8500/E8501 PCI Express x8 Port A",
-"	260c  E8500/E8501 IMI Registers",
-"	2610  E8500/E8501 Front Side Bus, Boot, and Interrupt Registers",
-"	2611  E8500/E8501 Address Mapping Registers",
-"	2612  E8500/E8501 RAS Registers",
-"	2613  E8500/E8501 Reserved Registers",
-"	2614  E8500/E8501 Reserved Registers",
-"	2615  E8500/E8501 Miscellaneous Registers",
-"	2617  E8500/E8501 Reserved Registers",
-"	2618  E8500/E8501 Reserved Registers",
-"	2619  E8500/E8501 Reserved Registers",
-"	261a  E8500/E8501 Reserved Registers",
-"	261b  E8500/E8501 Reserved Registers",
-"	261c  E8500/E8501 Reserved Registers",
-"	261d  E8500/E8501 Reserved Registers",
-"	261e  E8500/E8501 Reserved Registers",
-"	2620  E8500/E8501 eXternal Memory Bridge",
-"	2621  E8500/E8501 XMB Miscellaneous Registers",
-"	2622  E8500/E8501 XMB Memory Interleaving Registers",
-"	2623  E8500/E8501 XMB DDR Initialization and Calibration",
-"	2624  E8500/E8501 XMB Reserved Registers",
-"	2625  E8500/E8501 XMB Reserved Registers",
-"	2626  E8500/E8501 XMB Reserved Registers",
-"	2627  E8500/E8501 XMB Reserved Registers",
-"	2640  82801FB/FR (ICH6/ICH6R) LPC Interface Bridge",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2641  82801FBM (ICH6M) LPC Interface Bridge",
-"		103c 099c  NX6110/NC6120",
-"	2642  82801FW/FRW (ICH6W/ICH6RW) LPC Interface Bridge",
-"	2651  82801FB/FW (ICH6/ICH6W) SATA Controller",
-"		1028 0179  Optiplex GX280",
-"		1043 2601  P5GD1-VW Mainboard",
-"		1734 105c  Scenic W620",
-"		8086 4147  D915GAG Motherboard",
-"	2652  82801FR/FRW (ICH6R/ICH6RW) SATA Controller",
-"		1462 7028  915P/G Neo2",
-"	2653  82801FBM (ICH6M) SATA Controller",
-"	2658  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 2558  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2659  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 2659  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	265a  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 265a  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	265b  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 265a  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	265c  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 5006  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2660  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1",
-"		103c 099c  NX6110/NC6120",
-"	2662  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2",
-"	2664  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3",
-"	2666  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 4",
-"	2668  82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller",
-"		1043 814e  P5GD1-VW Mainboard",
-"	266a  82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller",
-"		1028 0179  Optiplex GX280",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 266a  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	266c  82801FB/FBM/FR/FW/FRW (ICH6 Family) LAN Controller",
-"	266d  82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller",
-"		1025 006a  Conexant AC'97 CoDec (in Acer TravelMate 2410 serie laptop)",
-"		103c 099c  NX6110/NC6120",
-"	266e  82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller",
-"		1025 006a  Realtek ALC 655 codec (in Acer TravelMate 2410 serie laptop)",
-"		1028 0179  Optiplex GX280",
-"		1028 0182  Latitude D610 Laptop",
-"		1028 0188  Inspiron 6000 laptop",
-"		103c 0944  Compaq NC6220",
-"		103c 099c  NX6110/NC6120",
-"		103c 3006  DC7100 SFF(DX878AV)",
-"		1458 a002  GA-8I915ME-G Mainboard",
-"		152d 0745  Packard Bell A8550 Laptop",
-"		1734 105a  Scenic W620",
-"	266f  82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 266f  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2670  Enterprise Southbridge LPC",
-"	2680  Enterprise Southbridge SATA IDE",
-"	2681  Enterprise Southbridge SATA AHCI",
-"	2682  Enterprise Southbridge SATA RAID",
-"	2683  Enterprise Southbridge SATA RAID",
-"	2688  Enterprise Southbridge UHCI USB #1",
-"	2689  Enterprise Southbridge UHCI USB #2",
-"	268a  Enterprise Southbridge UHCI USB #3",
-"	268b  Enterprise Southbridge UHCI USB #4",
-"	268c  Enterprise Southbridge EHCI USB",
-"	2690  Enterprise Southbridge PCI Express Root Port 1",
-"	2692  Enterprise Southbridge PCI Express Root Port 2",
-"	2694  Enterprise Southbridge PCI Express Root Port 3",
-"	2696  Enterprise Southbridge PCI Express Root Port 4",
-"	2698  Enterprise Southbridge AC '97 Audio",
-"	2699  Enterprise Southbridge AC '97 Modem",
-"	269a  Enterprise Southbridge High Definition Audio",
-"	269b  Enterprise Southbridge SMBus",
-"	269e  Enterprise Southbridge PATA",
-"	2770  945G/GZ/P/PL Express Memory Controller Hub",
-"		8086 544e  DeskTop Board D945GTP",
-"	2771  945G/GZ/P/PL Express PCI Express Root Port",
-"	2772  945G/GZ Express Integrated Graphics Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	2774  955X Express Memory Controller Hub",
-"	2775  955X Express PCI Express Root Port",
-"	2776  945G/GZ Express Integrated Graphics Controller",
-"	2778  E7230 Memory Controller Hub",
-"	2779  E7230 PCI Express Root Port",
-"	277a  975X Express PCI Express Root Port",
-"	277c  975X Express Memory Controller Hub",
-"	277d  975X Express PCI Express Root Port",
-"	2782  82915G Express Chipset Family Graphics Controller",
-"		1043 2582  P5GD1-VW Mainboard",
-"		1734 105b  Scenic W620",
-"	2792  Mobile 915GM/GMS/910GML Express Graphics Controller",
-"		103c 099c  NX6110/NC6120",
-"		1043 1881  GMA 900 915GM Integrated Graphics",
-"	27a0  Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub",
-"	27a1  Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port",
-"	27a2  Mobile 945GM/GMS/940GML Express Integrated Graphics Controller",
-"	27a6  Mobile 945GM/GMS/940GML Express Integrated Graphics Controller",
-"	27b0  82801GH (ICH7DH) LPC Interface Bridge",
-"	27b8  82801GB/GR (ICH7 Family) LPC Interface Bridge",
-"		8086 544e  DeskTop Board D945GTP",
-"	27b9  82801GBM (ICH7-M) LPC Interface Bridge",
-"	27bd  82801GHM (ICH7-M DH) LPC Interface Bridge",
-"	27c0  82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE",
-"		8086 544e  DeskTop Board D945GTP",
-"	27c1  82801GR/GH (ICH7 Family) Serial ATA Storage Controller AHCI",
-"	27c3  82801GR/GH (ICH7 Family) Serial ATA Storage Controller RAID",
-"	27c4  82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE",
-"	27c5  82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI",
-"	27c6  82801GHM (ICH7-M DH) Serial ATA Storage Controller RAID",
-"	27c8  82801G (ICH7 Family) USB UHCI #1",
-"		8086 544e  DeskTop Board D945GTP",
-"	27c9  82801G (ICH7 Family) USB UHCI #2",
-"		8086 544e  DeskTop Board D945GTP",
-"	27ca  82801G (ICH7 Family) USB UHCI #3",
-"		8086 544e  DeskTop Board D945GTP",
-"	27cb  82801G (ICH7 Family) USB UHCI #4",
-"		8086 544e  DeskTop Board D945GTP",
-"	27cc  82801G (ICH7 Family) USB2 EHCI Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	27d0  82801G (ICH7 Family) PCI Express Port 1",
-"	27d2  82801G (ICH7 Family) PCI Express Port 2",
-"	27d4  82801G (ICH7 Family) PCI Express Port 3",
-"	27d6  82801G (ICH7 Family) PCI Express Port 4",
-"	27d8  82801G (ICH7 Family) High Definition Audio Controller",
-"	27da  82801G (ICH7 Family) SMBus Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	27dc  82801G (ICH7 Family) LAN Controller",
-"		8086 308d  DeskTop Board D945GTP",
-"	27dd  82801G (ICH7 Family) AC'97 Modem Controller",
-"	27de  82801G (ICH7 Family) AC'97 Audio Controller",
-"	27df  82801G (ICH7 Family) IDE Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	27e0  82801GR/GH/GHM (ICH7 Family) PCI Express Port 5",
-"	27e2  82801GR/GH/GHM (ICH7 Family) PCI Express Port 6",
-"	2810  LPC Interface Controller",
-"	2811  Mobile LPC Interface Controller",
-"	2812  LPC Interface Controller",
-"	2814  LPC Interface Controller",
-"	2815  Mobile LPC Interface Controller",
-"	2820  SATA Controller 1 IDE",
-"	2821  SATA Controller AHCI",
-"	2822  SATA Controller RAID",
-"	2824  SATA Controller AHCI",
-"	2825  SATA Controller 2 IDE",
-"	2828  Mobile SATA Controller IDE",
-"	2829  Mobile SATA Controller AHCI",
-"	282a  Mobile SATA Controller RAID",
-"	2830  USB UHCI Controller #1",
-"	2831  USB UHCI Controller #2",
-"	2832  USB UHCI Controller #3",
-"	2834  USB UHCI Controller #4",
-"	2835  USB UHCI Controller #5",
-"	2836  USB2 EHCI Controller #1",
-"	283a  USB2 EHCI Controller #2",
-"	283e  SMBus Controller",
-"	283f  PCI Express Port 1",
-"	2841  PCI Express Port 2",
-"	2843  PCI Express Port 3",
-"	2845  PCI Express Port 4",
-"	2847  PCI Express Port 5",
-"	2849  PCI Express Port 6",
-"	284b  HD Audio Controller",
-"	284f  Thermal Subsystem",
-"	2850  Mobile IDE Controller",
-"	2970  Memory Controller Hub",
-"	2971  PCI Express Root Port",
-"	2972  Integrated Graphics Controller",
-"	2973  Integrated Graphics Controller",
-"	2974  HECI Controller",
-"	2976  PT IDER Controller",
-"	2977  KT Controller",
-"	2990  Memory Controller Hub",
-"	2991  PCI Express Root Port",
-"	2992  Integrated Graphics Controller",
-"	2993  Integrated Graphics Controller",
-"	2994  HECI Controller",
-"	2995  HECI Controller",
-"	2996  PT IDER Controller",
-"	2997  KT Controller",
-"	29a0  Memory Controller Hub",
-"	29a1  PCI Express Root Port",
-"	29a2  Integrated Graphics Controller",
-"	29a3  Integrated Graphics Controller",
-"	29a4  HECI Controller",
-"	29a5  HECI Controller",
-"	29a6  PT IDER Controller",
-"	29a7  KT Controller",
-"	2a00  Mobile Memory Controller Hub",
-"	2a01  Mobile PCI Express Root Port",
-"	2a02  Mobile Integrated Graphics Controller",
-"	2a03  Mobile Integrated Graphics Controller",
-"	3092  Integrated RAID",
-"	3200  GD31244 PCI-X SATA HBA",
-"	3340  82855PM Processor to I/O Controller",
-"		1025 005a  TravelMate 290",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"	3341  82855PM Processor to AGP Controller",
-"	3500  Enterprise Southbridge PCI Express Upstream Port",
-"	3501  Enterprise Southbridge PCI Express Upstream Port",
-"	3504  Enterprise Southbridge IOxAPIC",
-"	3505  Enterprise Southbridge IOxAPIC",
-"	350c  Enterprise Southbridge PCI Express to PCI-X Bridge",
-"	350d  Enterprise Southbridge PCI Express to PCI-X Bridge",
-"	3510  Enterprise Southbridge PCI Express Downstream Port E1",
-"	3511  Enterprise Southbridge PCI Express Downstream Port E1",
-"	3514  Enterprise Southbridge PCI Express Downstream Port E2",
-"	3515  Enterprise Southbridge PCI Express Downstream Port E2",
-"	3518  Enterprise Southbridge PCI Express Downstream Port E3",
-"	3519  Enterprise Southbridge PCI Express Downstream Port E3",
-"	3575  82830 830 Chipset Host Bridge",
-"		0e11 0030  Evo N600c",
-"		1014 021d  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"	3576  82830 830 Chipset AGP Bridge",
-"	3577  82830 CGC [Chipset Graphics Controller]",
-"		1014 0513  ThinkPad A/T/X Series",
-"	3578  82830 830 Chipset Host Bridge",
-"	3580  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1734 1055  Amilo M1420",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3581  82852/82855 GM/GME/PM/GMV Processor to AGP Controller",
-"		1734 1055  Amilo M1420",
-"	3582  82852/855GM Integrated Graphics Device",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3584  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1734 1055  Amilo M1420",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3585  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1734 1055  Amilo M1420",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3590  E7520 Memory Controller Hub",
-"		1028 019a  PowerEdge SC1425",
-"		1734 103e  Primergy RX300 S2",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"	3591  E7525/E7520 Error Reporting Registers",
-"		1028 0169  Precision 470",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"	3592  E7320 Memory Controller Hub",
-"	3593  E7320 Error Reporting Registers",
-"	3594  E7520 DMA Controller",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"	3595  E7525/E7520/E7320 PCI Express Port A",
-"	3596  E7525/E7520/E7320 PCI Express Port A1",
-"	3597  E7525/E7520 PCI Express Port B",
-"	3598  E7520 PCI Express Port B1",
-"	3599  E7520 PCI Express Port C",
-"	359a  E7520 PCI Express Port C1",
-"	359b  E7525/E7520/E7320 Extended Configuration Registers",
-"	359e  E7525 Memory Controller Hub",
-"		1028 0169  Precision 470",
-"	4220  PRO/Wireless 2200BG Network Connection",
-"	4222  PRO/Wireless 3945ABG Network Connection",
-"		8086 1005  PRO/Wireless 3945BG Network Connection",
-"		8086 1034  PRO/Wireless 3945BG Network Connection",
-"		8086 1044  PRO/Wireless 3945BG Network Connection",
-"	4223  PRO/Wireless 2915ABG Network Connection",
-"		1351 103c  Compaq NC6220",
-"	4224  PRO/Wireless 2915ABG Network Connection",
-"	4227  PRO/Wireless 3945ABG Network Connection",
-"		8086 1011  Thinkpad X60s",
-"		8086 1014  PRO/Wireless 3945BG Network Connection",
-"	5200  EtherExpress PRO/100 Intelligent Server",
-"	5201  EtherExpress PRO/100 Intelligent Server",
-"		8086 0001  EtherExpress PRO/100 Server Ethernet Adapter",
-"	530d  80310 IOP [IO Processor]",
-"	7000  82371SB PIIX3 ISA [Natoma/Triton II]",
-"	7010  82371SB PIIX3 IDE [Natoma/Triton II]",
-"	7020  82371SB PIIX3 USB [Natoma/Triton II]",
-"	7030  430VX - 82437VX TVX [Triton VX]",
-"	7050  Intercast Video Capture Card",
-"	7051  PB 642365-003 (Business Video Conferencing Card)",
-"	7100  430TX - 82439TX MTXC",
-"	7110  82371AB/EB/MB PIIX4 ISA",
-"		15ad 1976  virtualHW v3",
-"	7111  82371AB/EB/MB PIIX4 IDE",
-"		15ad 1976  virtualHW v3",
-"	7112  82371AB/EB/MB PIIX4 USB",
-"		15ad 1976  virtualHW v3",
-"	7113  82371AB/EB/MB PIIX4 ACPI",
-"		15ad 1976  virtualHW v3",
-"	7120  82810 GMCH [Graphics Memory Controller Hub]",
-"		4c53 1040  CL7 mainboard",
-"		4c53 1060  PC7 mainboard",
-"	7121  82810 CGC [Chipset Graphics Controller]",
-"		4c53 1040  CL7 mainboard",
-"		4c53 1060  PC7 mainboard",
-"		8086 4341  Cayman (CA810) Mainboard",
-"	7122  82810 DC-100 GMCH [Graphics Memory Controller Hub]",
-"	7123  82810 DC-100 CGC [Chipset Graphics Controller]",
-"	7124  82810E DC-133 GMCH [Graphics Memory Controller Hub]",
-"	7125  82810E DC-133 CGC [Chipset Graphics Controller]",
-"	7126  82810 DC-133 System and Graphics Controller",
-"	7128  82810-M DC-100 System and Graphics Controller",
-"	712a  82810-M DC-133 System and Graphics Controller",
-"	7180  440LX/EX - 82443LX/EX Host bridge",
-"	7181  440LX/EX - 82443LX/EX AGP bridge",
-"	7190  440BX/ZX/DX - 82443BX/ZX/DX Host bridge",
-"		0e11 0500  Armada 1750 Laptop System Chipset",
-"		0e11 b110  Armada M700/E500",
-"		1028 008e  PowerEdge 1300 mainboard",
-"		1179 0001  Toshiba Tecra 8100 Laptop System Chipset",
-"		15ad 1976  virtualHW v3",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"	7191  440BX/ZX/DX - 82443BX/ZX/DX AGP bridge",
-"		1028 008e  PowerEdge 1300 mainboard",
-"	7192  440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled)",
-"		0e11 0460  Armada 1700 Laptop System Chipset",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"	7194  82440MX Host Bridge",
-"		1033 0000  Versa Note Vxi",
-"		4c53 10a0  CA3/CR3 mainboard",
-"	7195  82440MX AC'97 Audio Controller",
-"		1033 80cc  Versa Note VXi",
-"		10cf 1099  QSound_SigmaTel Stac97 PCI Audio",
-"		11d4 0040  SoundMAX Integrated Digital Audio",
-"		11d4 0048  SoundMAX Integrated Digital Audio",
-"	7196  82440MX AC'97 Modem Controller",
-"	7198  82440MX ISA Bridge",
-"	7199  82440MX EIDE Controller",
-"	719a  82440MX USB Universal Host Controller",
-"	719b  82440MX Power Management Controller",
-"	71a0  440GX - 82443GX Host bridge",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"	71a1  440GX - 82443GX AGP bridge",
-"	71a2  440GX - 82443GX Host bridge (AGP disabled)",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"	7600  82372FB PIIX5 ISA",
-"	7601  82372FB PIIX5 IDE",
-"	7602  82372FB PIIX5 USB",
-"	7603  82372FB PIIX5 SMBus",
-"	7800  82740 (i740) AGP Graphics Accelerator",
-"		003d 0008  Starfighter AGP",
-"		003d 000b  Starfighter AGP",
-"		1092 0100  Stealth II G460",
-"		10b4 201a  Lightspeed 740",
-"		10b4 202f  Lightspeed 740",
-"		8086 0000  Terminator 2x/i",
-"		8086 0100  Intel740 Graphics Accelerator",
-"	84c4  450KX/GX [Orion] - 82454KX/GX PCI bridge",
-"	84c5  450KX/GX [Orion] - 82453KX/GX Memory controller",
-"	84ca  450NX - 82451NX Memory & I/O Controller",
-"	84cb  450NX - 82454NX/84460GX PCI Expander Bridge",
-"	84e0  460GX - 84460GX System Address Controller (SAC)",
-"	84e1  460GX - 84460GX System Data Controller (SDC)",
-"	84e2  460GX - 84460GX AGP Bridge (GXB function 2)",
-"	84e3  460GX - 84460GX Memory Address Controller (MAC)",
-"	84e4  460GX - 84460GX Memory Data Controller (MDC)",
-"	84e6  460GX - 82466GX Wide and fast PCI eXpander Bridge (WXB)",
-"	84ea  460GX - 84460GX AGP Bridge (GXB function 1)",
-"	8500  IXP4XX Intel Network Processor (IXP420/421/422/425/IXC1100)",
-"		1993 0ded  mGuard-PCI AV#2",
-"		1993 0dee  mGuard-PCI AV#1",
-"		1993 0def  mGuard-PCI AV#0",
-"	9000  IXP2000 Family Network Processor",
-"	9001  IXP2400 Network Processor",
-"	9002  IXP2300 Network Processor",
-"	9004  IXP2800 Network Processor",
-"	9621  Integrated RAID",
-"	9622  Integrated RAID",
-"	9641  Integrated RAID",
-"	96a1  Integrated RAID",
-"	b152  21152 PCI-to-PCI Bridge",
-"	b154  21154 PCI-to-PCI Bridge",
-"	b555  21555 Non transparent PCI-to-PCI Bridge",
-"		12d9 000a  PCI VoIP Gateway",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		e4bf 1000  CC8-1-BLUES",
-"8401  TRENDware International Inc.",
-"8800  Trigem Computer Inc.",
-"	2008  Video assistent component",
-"8866  T-Square Design Inc.",
-"8888  Silicon Magic",
-"8912  TRX",
-"8c4a  Winbond",
-"	1980  W89C940 misprogrammed [ne2k]",
-"8e0e  Computone Corporation",
-"8e2e  KTI",
-"	3000  ET32P2",
-"9004  Adaptec",
-"	0078  AHA-2940U_CN",
-"	1078  AIC-7810",
-"	1160  AIC-1160 [Family Fibre Channel Adapter]",
-"	2178  AIC-7821",
-"	3860  AHA-2930CU",
-"	3b78  AHA-4844W/4844UW",
-"	5075  AIC-755x",
-"	5078  AHA-7850",
-"		9004 7850  AHA-2904/Integrated AIC-7850",
-"	5175  AIC-755x",
-"	5178  AIC-7851",
-"	5275  AIC-755x",
-"	5278  AIC-7852",
-"	5375  AIC-755x",
-"	5378  AIC-7850",
-"	5475  AIC-755x",
-"	5478  AIC-7850",
-"	5575  AVA-2930",
-"	5578  AIC-7855",
-"	5647  ANA-7711 TCP Offload Engine",
-"		9004 7710  ANA-7711F TCP Offload Engine - Optical",
-"		9004 7711  ANA-7711LP TCP Offload Engine - Copper",
-"	5675  AIC-755x",
-"	5678  AIC-7856",
-"	5775  AIC-755x",
-"	5778  AIC-7850",
-"	5800  AIC-5800",
-"	5900  ANA-5910/5930/5940 ATM155 & 25 LAN Adapter",
-"	5905  ANA-5910A/5930A/5940A ATM Adapter",
-"	6038  AIC-3860",
-"	6075  AIC-1480 / APA-1480",
-"		9004 7560  AIC-1480 / APA-1480 Cardbus",
-"	6078  AIC-7860",
-"	6178  AIC-7861",
-"		9004 7861  AHA-2940AU Single",
-"	6278  AIC-7860",
-"	6378  AIC-7860",
-"	6478  AIC-786x",
-"	6578  AIC-786x",
-"	6678  AIC-786x",
-"	6778  AIC-786x",
-"	6915  ANA620xx/ANA69011A",
-"		9004 0008  ANA69011A/TX 10/100",
-"		9004 0009  ANA69011A/TX 10/100",
-"		9004 0010  ANA62022 2-port 10/100",
-"		9004 0018  ANA62044 4-port 10/100",
-"		9004 0019  ANA62044 4-port 10/100",
-"		9004 0020  ANA62022 2-port 10/100",
-"		9004 0028  ANA69011A/TX 10/100",
-"		9004 8008  ANA69011A/TX 64 bit 10/100",
-"		9004 8009  ANA69011A/TX 64 bit 10/100",
-"		9004 8010  ANA62022 2-port 64 bit 10/100",
-"		9004 8018  ANA62044 4-port 64 bit 10/100",
-"		9004 8019  ANA62044 4-port 64 bit 10/100",
-"		9004 8020  ANA62022 2-port 64 bit 10/100",
-"		9004 8028  ANA69011A/TX 64 bit 10/100",
-"	7078  AHA-294x / AIC-7870",
-"	7178  AHA-2940/2940W / AIC-7871",
-"	7278  AHA-3940/3940W / AIC-7872",
-"	7378  AHA-3985 / AIC-7873",
-"	7478  AHA-2944/2944W / AIC-7874",
-"	7578  AHA-3944/3944W / AIC-7875",
-"	7678  AHA-4944W/UW / AIC-7876",
-"	7710  ANA-7711F Network Accelerator Card (NAC) - Optical",
-"	7711  ANA-7711C Network Accelerator Card (NAC) - Copper",
-"	7778  AIC-787x",
-"	7810  AIC-7810",
-"	7815  AIC-7815 RAID+Memory Controller IC",
-"		9004 7815  ARO-1130U2 RAID Controller",
-"		9004 7840  AIC-7815 RAID+Memory Controller IC",
-"	7850  AIC-7850",
-"	7855  AHA-2930",
-"	7860  AIC-7860",
-"	7870  AIC-7870",
-"	7871  AHA-2940",
-"	7872  AHA-3940",
-"	7873  AHA-3980",
-"	7874  AHA-2944",
-"	7880  AIC-7880P",
-"	7890  AIC-7890",
-"	7891  AIC-789x",
-"	7892  AIC-789x",
-"	7893  AIC-789x",
-"	7894  AIC-789x",
-"	7895  AHA-2940U/UW / AHA-39xx / AIC-7895",
-"		9004 7890  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"		9004 7891  AHA-2940U/2940UW Dual",
-"		9004 7892  AHA-3940AU/AUW/AUWD/UWD",
-"		9004 7894  AHA-3944AUWD",
-"		9004 7895  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"		9004 7896  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"		9004 7897  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"	7896  AIC-789x",
-"	7897  AIC-789x",
-"	8078  AIC-7880U",
-"		9004 7880  AIC-7880P Ultra/Ultra Wide SCSI Chipset",
-"	8178  AHA-2940U/UW/D / AIC-7881U",
-"		9004 7881  AHA-2940UW SCSI Host Adapter",
-"	8278  AHA-3940U/UW/UWD / AIC-7882U",
-"	8378  AHA-3940U/UW / AIC-7883U",
-"	8478  AHA-2944UW / AIC-7884U",
-"	8578  AHA-3944U/UWD / AIC-7885",
-"	8678  AHA-4944UW / AIC-7886",
-"	8778  AHA-2940UW Pro / AIC-788x",
-"		9004 7887  2940UW Pro Ultra-Wide SCSI Controller",
-"	8878  AHA-2930UW / AIC-7888",
-"		9004 7888  AHA-2930UW SCSI Controller",
-"	8b78  ABA-1030",
-"	ec78  AHA-4944W/UW",
-"9005  Adaptec",
-"	0010  AHA-2940U2/U2W",
-"		9005 2180  AHA-2940U2 SCSI Controller",
-"		9005 8100  AHA-2940U2B SCSI Controller",
-"		9005 a100  AHA-2940U2B SCSI Controller",
-"		9005 a180  AHA-2940U2W SCSI Controller",
-"		9005 e100  AHA-2950U2B SCSI Controller",
-"	0011  AHA-2930U2",
-"	0013  78902",
-"		9005 0003  AAA-131U2 Array1000 1 Channel RAID Controller",
-"		9005 000f  AIC7890_ARO",
-"	001f  AHA-2940U2/U2W / 7890/7891",
-"		9005 000f  2940U2W SCSI Controller",
-"		9005 a180  2940U2W SCSI Controller",
-"	0020  AIC-7890",
-"	002f  AIC-7890",
-"	0030  AIC-7890",
-"	003f  AIC-7890",
-"	0050  AHA-3940U2x/395U2x",
-"		9005 f500  AHA-3950U2B",
-"		9005 ffff  AHA-3950U2B",
-"	0051  AHA-3950U2D",
-"		9005 b500  AHA-3950U2D",
-"	0053  AIC-7896 SCSI Controller",
-"		9005 ffff  AIC-7896 SCSI Controller mainboard implementation",
-"	005f  AIC-7896U2/7897U2",
-"	0080  AIC-7892A U160/m",
-"		0e11 e2a0  Compaq 64-Bit/66MHz Wide Ultra3 SCSI Adapter",
-"		9005 6220  AHA-29160C",
-"		9005 62a0  29160N Ultra160 SCSI Controller",
-"		9005 e220  29160LP Low Profile Ultra160 SCSI Controller",
-"		9005 e2a0  29160 Ultra160 SCSI Controller",
-"	0081  AIC-7892B U160/m",
-"		9005 62a1  19160 Ultra160 SCSI Controller",
-"	0083  AIC-7892D U160/m",
-"	008f  AIC-7892P U160/m",
-"		1179 0001  Magnia Z310",
-"		15d9 9005  Onboard SCSI Host Adapter",
-"	00c0  AHA-3960D / AIC-7899A U160/m",
-"		0e11 f620  Compaq 64-Bit/66MHz Dual Channel Wide Ultra3 SCSI Adapter",
-"		9005 f620  AHA-3960D U160/m",
-"	00c1  AIC-7899B U160/m",
-"	00c3  AIC-7899D U160/m",
-"	00c5  RAID subsystem HBA",
-"		1028 00c5  PowerEdge 2400,2500,2550,4400",
-"	00cf  AIC-7899P U160/m",
-"		1028 00ce  PowerEdge 1400",
-"		1028 00d1  PowerEdge 2550",
-"		1028 00d9  PowerEdge 2500",
-"		10f1 2462  Thunder K7 S2462",
-"		15d9 9005  Onboard SCSI Host Adapter",
-"		8086 3411  SDS2 Mainboard",
-"	0241  Serial ATA II RAID 1420SA",
-"	0250  ServeRAID Controller",
-"		1014 0279  ServeRAID-xx",
-"		1014 028c  ServeRAID-xx",
-"	0279  ServeRAID 6M",
-"	0283  AAC-RAID",
-"		9005 0283  Catapult",
-"	0284  AAC-RAID",
-"		9005 0284  Tomcat",
-"	0285  AAC-RAID",
-"		0e11 0295  SATA 6Ch (Bearcat)",
-"		1014 02f2  ServeRAID 8i",
-"		1028 0287  PowerEdge Expandable RAID Controller 320/DC",
-"		1028 0291  CERC SATA RAID 2 PCI SATA 6ch (DellCorsair)",
-"		103c 3227  AAR-2610SA",
-"		17aa 0286  Legend S220 (Legend Crusader)",
-"		17aa 0287  Legend S230 (Legend Vulcan)",
-"		9005 0285  2200S (Vulcan)",
-"		9005 0286  2120S (Crusader)",
-"		9005 0287  2200S (Vulcan-2m)",
-"		9005 0288  3230S (Harrier)",
-"		9005 0289  3240S (Tornado)",
-"		9005 028a  ASR-2020ZCR",
-"		9005 028b  ASR-2025ZCR (Terminator)",
-"		9005 028e  ASR-2020SA (Skyhawk)",
-"		9005 028f  ASR-2025SA",
-"		9005 0290  AAR-2410SA PCI SATA 4ch (Jaguar II)",
-"		9005 0292  AAR-2810SA PCI SATA 8ch (Corsair-8)",
-"		9005 0293  AAR-21610SA PCI SATA 16ch (Corsair-16)",
-"		9005 0294  ESD SO-DIMM PCI-X SATA ZCR (Prowler)",
-"		9005 0296  ASR-2240S",
-"		9005 0297  ASR-4005SAS",
-"		9005 0298  ASR-4000SAS",
-"		9005 0299  ASR-4800SAS",
-"		9005 029a  4805SAS",
-"	0286  AAC-RAID (Rocket)",
-"		1014 9540  ServeRAID 8k/8k-l4",
-"		1014 9580  ServeRAID 8k/8k-l8",
-"		9005 028c  ASR-2230S + ASR-2230SLP PCI-X (Lancer)",
-"		9005 028d  ASR-2130S",
-"		9005 029b  ASR-2820SA",
-"		9005 029c  ASR-2620SA",
-"		9005 029d  ASR-2420SA",
-"		9005 029e  ICP ICP9024R0",
-"		9005 029f  ICP ICP9014R0",
-"		9005 02a0  ICP ICP9047MA",
-"		9005 02a1  ICP ICP9087MA",
-"		9005 02a2  3800SAS",
-"		9005 02a3  ICP ICP5445AU",
-"		9005 02a4  ICP ICP5085LI",
-"		9005 02a5  ICP ICP5085BR",
-"		9005 02a6  ICP9067MA",
-"		9005 02a7  AAR-2830SA",
-"		9005 02a8  AAR-2430SA",
-"		9005 02a9  ICP5087AU",
-"		9005 02aa  ICP5047AU",
-"		9005 0800  Callisto",
-"	0500  Obsidian chipset SCSI controller",
-"		1014 02c1  PCI-X DDR 3Gb SAS Adapter (572A/572C)",
-"		1014 02c2  PCI-X DDR 3Gb SAS RAID Adapter (572B/572D)",
-"	0503  Scamp chipset SCSI controller",
-"		1014 02bf  Quad Channel PCI-X DDR U320 SCSI RAID Adapter (571E)",
-"		1014 02d5  Quad Channel PCI-X DDR U320 SCSI RAID Adapter (571F)",
-"	0910  AUA-3100B",
-"	091e  AUA-3100B",
-"	8000  ASC-29320A U320",
-"	800f  AIC-7901 U320",
-"	8010  ASC-39320 U320",
-"	8011  ASC-39320D",
-"		0e11 00ac  ASC-39320D U320",
-"		9005 0041  ASC-39320D U320",
-"	8012  ASC-29320 U320",
-"	8013  ASC-29320B U320",
-"	8014  ASC-29320LP U320",
-"	8015  ASC-39320B U320",
-"	8016  ASC-39320A U320",
-"	8017  ASC-29320ALP U320",
-"	801c  ASC-39320D U320",
-"	801d  AIC-7902B U320",
-"	801e  AIC-7901A U320",
-"	801f  AIC-7902 U320",
-"		1734 1011  Primergy RX300",
-"	8080  ASC-29320A U320 w/HostRAID",
-"	808f  AIC-7901 U320 w/HostRAID",
-"	8090  ASC-39320 U320 w/HostRAID",
-"	8091  ASC-39320D U320 w/HostRAID",
-"	8092  ASC-29320 U320 w/HostRAID",
-"	8093  ASC-29320B U320 w/HostRAID",
-"	8094  ASC-29320LP U320 w/HostRAID",
-"	8095  ASC-39320(B) U320 w/HostRAID",
-"	8096  ASC-39320A U320 w/HostRAID",
-"	8097  ASC-29320ALP U320 w/HostRAID",
-"	809c  ASC-39320D(B) U320 w/HostRAID",
-"	809d  AIC-7902(B) U320 w/HostRAID",
-"	809e  AIC-7901A U320 w/HostRAID",
-"	809f  AIC-7902 U320 w/HostRAID",
-"907f  Atronics",
-"	2015  IDE-2015PL",
-"919a  Gigapixel Corp",
-"9412  Holtek",
-"	6565  6565",
-"9699  Omni Media Technology Inc",
-"	6565  6565",
-"9710  NetMos Technology",
-"	7780  USB IRDA-port",
-"	9805  PCI 1 port parallel adapter",
-"	9815  PCI 9815 Multi-I/O Controller",
-"		1000 0020  2P0S (2 port parallel adaptor)",
-"	9835  PCI 9835 Multi-I/O Controller",
-"		1000 0002  2S (16C550 UART)",
-"		1000 0012  1P2S",
-"	9845  PCI 9845 Multi-I/O Controller",
-"		1000 0004  0P4S (4 port 16550A serial card)",
-"		1000 0006  0P6S (6 port 16550a serial card)",
-"	9855  PCI 9855 Multi-I/O Controller",
-"		1000 0014  1P4S",
-"9902  Stargen Inc.",
-"	0001  SG2010 PCI over Starfabric Bridge",
-"	0002  SG2010 PCI to Starfabric Gateway",
-"	0003  SG1010 Starfabric Switch and PCI Bridge",
-"a0a0  AOPEN Inc.",
-"a0f1  UNISYS Corporation",
-"a200  NEC Corporation",
-"a259  Hewlett Packard",
-"a25b  Hewlett Packard GmbH PL24-MKT",
-"a304  Sony",
-"a727  3Com Corporation",
-"	0013  3CRPAG175 Wireless PC Card",
-"aa42  Scitex Digital Video",
-"ac1e  Digital Receiver Technology Inc",
-"ac3d  Actuality Systems",
-"aecb  Adrienne Electronics Corporation",
-"	6250  VITC/LTC Timecode Reader card [PCI-VLTC/RDR]",
-"affe  Sirrix AG security technologies",
-"	dead  Sirrix.PCI4S0 4-port ISDN S0 interface",
-"b1b3  Shiva Europe Limited",
-"bd11  Pinnacle Systems, Inc. (Wrong ID)",
-"c001  TSI Telsys",
-"c0a9  Micron/Crucial Technology",
-"c0de  Motorola",
-"c0fe  Motion Engineering, Inc.",
-"ca50  Varian Australia Pty Ltd",
-"cafe  Chrysalis-ITS",
-"	0003  Luna K3 Hardware Security Module",
-"cccc  Catapult Communications",
-"cddd  Tyzx, Inc.",
-"	0101  DeepSea 1 High Speed Stereo Vision Frame Grabber",
-"	0200  DeepSea 2 High Speed Stereo Vision Frame Grabber",
-"d161  Digium, Inc.",
-"	0205  Wildcard TE205P",
-"	0210  Wildcard TE210P",
-"	0405  Wildcard TE405P Quad-Span togglable E1/T1/J1 card 5.0v",
-"	0406  Wildcard TE406P Quad-Span togglable E1/T1/J1 echo cancellation card 5.0v",
-"	0410  Wildcard TE410P Quad-Span togglable E1/T1/J1 card 3.3v",
-"	0411  Wildcard TE411P Quad-Span togglable E1/T1/J1 echo cancellation card 3.3v",
-"	2400  Wildcard TDM2400P",
-"d4d4  Dy4 Systems Inc",
-"	0601  PCI Mezzanine Card",
-"d531  I+ME ACTIA GmbH",
-"d84d  Exsys",
-"dead  Indigita Corporation",
-"deaf  Middle Digital Inc.",
-"	9050  PC Weasel Virtual VGA",
-"	9051  PC Weasel Serial Port",
-"	9052  PC Weasel Watchdog Timer",
-"e000  Winbond",
-"	e000  W89C940",
-"e159  Tiger Jet Network Inc.",
-"	0001  Tiger3XX Modem/ISDN interface",
-"		0059 0001  128k ISDN-S/T Adapter",
-"		0059 0003  128k ISDN-U Adapter",
-"		00a7 0001  TELES.S0/PCI 2.x ISDN Adapter",
-"		8086 0003  Digium X100P/X101P analogue PSTN FXO interface",
-"	0002  Tiger100APC ISDN chipset",
-"e4bf  EKF Elektronik GmbH",
-"e55e  Essence Technology, Inc.",
-"ea01  Eagle Technology",
-"	000a  PCI-773 Temperature Card",
-"	0032  PCI-730 & PC104P-30 Card",
-"	003e  PCI-762 Opto-Isolator Card",
-"	0041  PCI-763 Reed Relay Card",
-"	0043  PCI-769 Opto-Isolator Reed Relay Combo Card",
-"	0046  PCI-766 Analog Output Card",
-"	0052  PCI-703 Analog I/O Card",
-"	0800  PCI-800 Digital I/O Card",
-"ea60  RME",
-"	9896  Digi32",
-"	9897  Digi32 Pro",
-"	9898  Digi32/8",
-"eabb  Aashima Technology B.V.",
-"eace  Endace Measurement Systems, Ltd",
-"	3100  DAG 3.10 OC-3/OC-12",
-"	3200  DAG 3.2x OC-3/OC-12",
-"	320e  DAG 3.2E Fast Ethernet",
-"	340e  DAG 3.4E Fast Ethernet",
-"	341e  DAG 3.41E Fast Ethernet",
-"	3500  DAG 3.5 OC-3/OC-12",
-"	351c  DAG 3.5ECM Fast Ethernet",
-"	4100  DAG 4.10 OC-48",
-"	4110  DAG 4.11 OC-48",
-"	4220  DAG 4.2 OC-48",
-"	422e  DAG 4.2E Dual Gigabit Ethernet",
-"ec80  Belkin Corporation",
-"	ec00  F5D6000",
-"ecc0  Echo Digital Audio Corporation",
-"edd8  ARK Logic Inc",
-"	a091  1000PV [Stingray]",
-"	a099  2000PV [Stingray]",
-"	a0a1  2000MT",
-"	a0a9  2000MI",
-"f1d0  AJA Video",
-"	c0fe  Xena HS/HD-R",
-"	c0ff  Kona/Xena 2",
-"	cafe  Kona SD",
-"	cfee  Xena LS/SD-22-DA/SD-DA",
-"	dcaf  Kona HD",
-"	dfee  Xena HD-DA",
-"	efac  Xena SD-MM/SD-22-MM",
-"	facd  Xena HD-MM",
-"fa57  Interagon AS",
-"	0001  PMC [Pattern Matching Chip]",
-"fab7  Fabric7 Systems, Inc.",
-"febd  Ultraview Corp.",
-"feda  Broadcom Inc",
-"	a0fa  BCM4210 iLine10 HomePNA 2.0",
-"	a10e  BCM4230 iLine10 HomePNA 2.0",
-"fede  Fedetec Inc.",
-"	0003  TABIC PCI v3",
-"fffd  XenSource, Inc.",
-"	0101  PCI Event Channel Controller",
-"fffe  VMWare Inc",
-"	0405  Virtual SVGA 4.0",
-"	0710  Virtual SVGA",
-"ffff  Illegal Vendor ID",
-"C 00  Unclassified device",
-"	00  Non-VGA unclassified device",
-"	01  VGA compatible unclassified device",
-"C 01  Mass storage controller",
-"	00  SCSI storage controller",
-"	01  IDE interface",
-"	02  Floppy disk controller",
-"	03  IPI bus controller",
-"	04  RAID bus controller",
-"	05  ATA controller",
-"		20  ADMA single stepping",
-"		40  ADMA continuous operation",
-"	06  SATA controller",
-"		00  Vendor specific",
-"		01  AHCI 1.0",
-"	07  Serial Attached SCSI controller",
-"	80  Mass storage controller",
-"C 02  Network controller",
-"	00  Ethernet controller",
-"	01  Token ring network controller",
-"	02  FDDI network controller",
-"	03  ATM network controller",
-"	04  ISDN controller",
-"	80  Network controller",
-"C 03  Display controller",
-"	00  VGA compatible controller",
-"		00  VGA",
-"		01  8514",
-"	01  XGA compatible controller",
-"	02  3D controller",
-"	80  Display controller",
-"C 04  Multimedia controller",
-"	00  Multimedia video controller",
-"	01  Multimedia audio controller",
-"	02  Computer telephony device",
-"	03  Audio device",
-"	80  Multimedia controller",
-"C 05  Memory controller",
-"	00  RAM memory",
-"	01  FLASH memory",
-"	80  Memory controller",
-"C 06  Bridge",
-"	00  Host bridge",
-"	01  ISA bridge",
-"	02  EISA bridge",
-"	03  MicroChannel bridge",
-"	04  PCI bridge",
-"		00  Normal decode",
-"		01  Subtractive decode",
-"	05  PCMCIA bridge",
-"	06  NuBus bridge",
-"	07  CardBus bridge",
-"	08  RACEway bridge",
-"		00  Transparent mode",
-"		01  Endpoint mode",
-"	09  Semi-transparent PCI-to-PCI bridge",
-"		40  Primary bus towards host CPU",
-"		80  Secondary bus towards host CPU",
-"	0a  InfiniBand to PCI host bridge",
-"	80  Bridge",
-"C 07  Communication controller",
-"	00  Serial controller",
-"		00  8250",
-"		01  16450",
-"		02  16550",
-"		03  16650",
-"		04  16750",
-"		05  16850",
-"		06  16950",
-"	01  Parallel controller",
-"		00  SPP",
-"		01  BiDir",
-"		02  ECP",
-"		03  IEEE1284",
-"		fe  IEEE1284 Target",
-"	02  Multiport serial controller",
-"	03  Modem",
-"		00  Generic",
-"		01  Hayes/16450",
-"		02  Hayes/16550",
-"		03  Hayes/16650",
-"		04  Hayes/16750",
-"	80  Communication controller",
-"C 08  Generic system peripheral",
-"	00  PIC",
-"		00  8259",
-"		01  ISA PIC",
-"		02  EISA PIC",
-"		10  IO-APIC",
-"		20  IO(X)-APIC",
-"	01  DMA controller",
-"		00  8237",
-"		01  ISA DMA",
-"		02  EISA DMA",
-"	02  Timer",
-"		00  8254",
-"		01  ISA Timer",
-"		02  EISA Timers",
-"	03  RTC",
-"		00  Generic",
-"		01  ISA RTC",
-"	04  PCI Hot-plug controller",
-"	80  System peripheral",
-"C 09  Input device controller",
-"	00  Keyboard controller",
-"	01  Digitizer Pen",
-"	02  Mouse controller",
-"	03  Scanner controller",
-"	04  Gameport controller",
-"		00  Generic",
-"		10  Extended",
-"	80  Input device controller",
-"C 0a  Docking station",
-"	00  Generic Docking Station",
-"	80  Docking Station",
-"C 0b  Processor",
-"	00  386",
-"	01  486",
-"	02  Pentium",
-"	10  Alpha",
-"	20  Power PC",
-"	30  MIPS",
-"	40  Co-processor",
-"C 0c  Serial bus controller",
-"	00  FireWire (IEEE 1394)",
-"		00  Generic",
-"		10  OHCI",
-"	01  ACCESS Bus",
-"	02  SSA",
-"	03  USB Controller",
-"		00  UHCI",
-"		10  OHCI",
-"		20  EHCI",
-"		80  Unspecified",
-"		fe  USB Device",
-"	04  Fibre Channel",
-"	05  SMBus",
-"	06  InfiniBand",
-"C 0d  Wireless controller",
-"	00  IRDA controller",
-"	01  Consumer IR controller",
-"	10  RF controller",
-"	80  Wireless controller",
-"C 0e  Intelligent controller",
-"	00  I2O",
-"C 0f  Satellite communications controller",
-"	00  Satellite TV controller",
-"	01  Satellite audio communication controller",
-"	03  Satellite voice communication controller",
-"	04  Satellite data communication controller",
-"C 10  Encryption controller",
-"	00  Network and computing encryption device",
-"	10  Entertainment encryption device",
-"	80  Encryption controller",
-"C 11  Signal processing controller",
-"	00  DPIO module",
-"	01  Performance counters",
-"	10  Communication synchronizer",
-"	80  Signal processing controller",
-""
-};
Index: pace/lib/pci/sysdep.h
===================================================================
--- uspace/lib/pci/sysdep.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- *	The PCI Library -- System-Dependent Stuff
- *
- *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#ifdef __GNUC__
-#define UNUSED __attribute__((unused))
-#define NONRET __attribute__((noreturn))
-#else
-#define UNUSED
-#define NONRET
-#define inline
-#endif
-
-typedef u8 byte;
-typedef u16 word;
-
-#define cpu_to_le16(x) (x)
-#define cpu_to_le32(x) (x)
-#define le16_to_cpu(x) (x)
-#define le32_to_cpu(x) (x)
Index: pace/lib/pci/types.h
===================================================================
--- uspace/lib/pci/types.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- *	The PCI Library -- Types and Format Strings
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <sys/types.h>
-
-#ifndef PCI_HAVE_Uxx_TYPES
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-
-#ifdef PCI_HAVE_64BIT_ADDRESS
-
-#include <stdint.h>
-
-#if ULONG_MAX > 0xffffffff
-
-typedef unsigned long u64;
-#define PCI_U64_FMT "l"
-
-#else /* ULONG_MAX > 0xffffffff */
-
-typedef unsigned long long u64;
-#define PCI_U64_FMT "ll"
-
-#endif /* ULONG_MAX > 0xffffffff */
-#endif /* PCI_HAVE_64BIT_ADDRESS */
-#endif /* PCI_HAVE_Uxx_TYPES */
-
-#ifdef PCI_HAVE_64BIT_ADDRESS
-
-typedef u64 pciaddr_t;
-#define PCIADDR_T_FMT "%08" PCI_U64_FMT "x"
-#define PCIADDR_PORT_FMT "%04" PCI_U64_FMT "x"
-
-#else /* PCI_HAVE_64BIT_ADDRESS */
-
-typedef u32 pciaddr_t;
-#define PCIADDR_T_FMT "%08x"
-#define PCIADDR_PORT_FMT "%04x"
-
-#endif /* PCI_HAVE_64BIT_ADDRESS */
-
-#ifdef PCI_ARCH_SPARC64
-
-/* On sparc64 Linux the kernel reports remapped port addresses and IRQ numbers */
-#undef PCIADDR_PORT_FMT
-#define PCIADDR_PORT_FMT PCIADDR_T_FMT
-#define PCIIRQ_FMT "%08x"
-
-#else /* PCI_ARCH_SPARC64 */
-
-#define PCIIRQ_FMT "%d"
-
-#endif /* PCI_ARCH_SPARC64 */
Index: uspace/srv/devman/Makefile
===================================================================
--- uspace/srv/devman/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/srv/devman/Makefile	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
+# 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.
+#
+
+USPACE_PREFIX = ../..
+BINARY = devman
+
+SOURCES = \
+	main.c \
+	devman.c \
+	match.c \
+	util.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/srv/devman/devman.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,1163 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 devman
+ * @{
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <ipc/driver.h>
+#include <ipc/devman.h>
+#include <devmap.h>
+
+#include "devman.h"
+
+/* hash table operations */
+
+static hash_index_t devices_hash(unsigned long key[])
+{
+	return key[0] % DEVICE_BUCKETS;
+}
+
+static int devman_devices_compare(unsigned long key[], hash_count_t keys,
+    link_t *item)
+{
+	node_t *dev = hash_table_get_instance(item, node_t, devman_link);
+	return (dev->handle == (device_handle_t) key[0]);
+}
+
+static int devmap_devices_compare(unsigned long key[], hash_count_t keys,
+    link_t *item)
+{
+	node_t *dev = hash_table_get_instance(item, node_t, devmap_link);
+	return (dev->devmap_handle == (dev_handle_t) key[0]);
+}
+
+static void devices_remove_callback(link_t *item)
+{
+}
+
+static hash_table_operations_t devman_devices_ops = {
+	.hash = devices_hash,
+	.compare = devman_devices_compare,
+	.remove_callback = devices_remove_callback
+};
+
+static hash_table_operations_t devmap_devices_ops = {
+	.hash = devices_hash,
+	.compare = devmap_devices_compare,
+	.remove_callback = devices_remove_callback
+};
+
+/**
+ * Initialize the list of device driver's.
+ *
+ * @param drv_list the list of device driver's.
+ *
+ */
+void init_driver_list(driver_list_t *drv_list)
+{
+	assert(drv_list != NULL);
+	
+	list_initialize(&drv_list->drivers);
+	fibril_mutex_initialize(&drv_list->drivers_mutex);
+}
+
+/** Allocate and initialize a new driver structure.
+ *
+ * @return	Driver structure.
+ */
+driver_t *create_driver(void)
+{
+	driver_t *res = malloc(sizeof(driver_t));
+	if (res != NULL)
+		init_driver(res);
+	return res;
+}
+
+/** Add a driver to the list of drivers.
+ *
+ * @param drivers_list	List of drivers.
+ * @param drv		Driver structure.
+ */
+void add_driver(driver_list_t *drivers_list, driver_t *drv)
+{
+	fibril_mutex_lock(&drivers_list->drivers_mutex);
+	list_prepend(&drv->drivers, &drivers_list->drivers);
+	fibril_mutex_unlock(&drivers_list->drivers_mutex);
+
+	printf(NAME": the '%s' driver was added to the list of available "
+	    "drivers.\n", drv->name);
+}
+
+/** Read match id at the specified position of a string and set the position in
+ * the string to the first character following the id.
+ *
+ * @param buf		The position in the input string.
+ * @return		The match id.
+ */
+char *read_match_id(char **buf)
+{
+	char *res = NULL;
+	size_t len = get_nonspace_len(*buf);
+	
+	if (len > 0) {
+		res = malloc(len + 1);
+		if (res != NULL) {
+			str_ncpy(res, len + 1, *buf, len);
+			*buf += len;
+		}
+	}
+	
+	return res;
+}
+
+/**
+ * Read match ids and associated match scores from a string.
+ *
+ * Each match score in the string is followed by its match id.
+ * The match ids and match scores are separated by whitespaces.
+ * Neither match ids nor match scores can contain whitespaces.
+ *
+ * @param buf		The string from which the match ids are read.
+ * @param ids		The list of match ids into which the match ids and
+ *			scores are added.
+ * @return		True if at least one match id and associated match score
+ *			was successfully read, false otherwise.
+ */
+bool parse_match_ids(char *buf, match_id_list_t *ids)
+{
+	int score = 0;
+	char *id = NULL;
+	int ids_read = 0;
+	
+	while (true) {
+		/* skip spaces */
+		if (!skip_spaces(&buf))
+			break;
+		
+		/* read score */
+		score = strtoul(buf, &buf, 10);
+		
+		/* skip spaces */
+		if (!skip_spaces(&buf))
+			break;
+		
+		/* read id */
+		id = read_match_id(&buf);
+		if (NULL == id)
+			break;
+		
+		/* create new match_id structure */
+		match_id_t *mid = create_match_id();
+		mid->id = id;
+		mid->score = score;
+		
+		/* add it to the list */
+		add_match_id(ids, mid);
+		
+		ids_read++;
+	}
+	
+	return ids_read > 0;
+}
+
+/**
+ * Read match ids and associated match scores from a file.
+ *
+ * Each match score in the file is followed by its match id.
+ * The match ids and match scores are separated by whitespaces.
+ * Neither match ids nor match scores can contain whitespaces.
+ *
+ * @param buf		The path to the file from which the match ids are read.
+ * @param ids		The list of match ids into which the match ids and
+ *			scores are added.
+ * @return		True if at least one match id and associated match score
+ *			was successfully read, false otherwise.
+ */
+bool read_match_ids(const char *conf_path, match_id_list_t *ids)
+{
+	printf(NAME ": read_match_ids conf_path = %s.\n", conf_path);
+	
+	bool suc = false;
+	char *buf = NULL;
+	bool opened = false;
+	int fd;
+	size_t len = 0;
+	
+	fd = open(conf_path, O_RDONLY);
+	if (fd < 0) {
+		printf(NAME ": unable to open %s\n", conf_path);
+		goto cleanup;
+	}
+	opened = true;
+	
+	len = lseek(fd, 0, SEEK_END);
+	lseek(fd, 0, SEEK_SET);
+	if (len == 0) {
+		printf(NAME ": configuration file '%s' is empty.\n", conf_path);
+		goto cleanup;
+	}
+	
+	buf = malloc(len + 1);
+	if (buf == NULL) {
+		printf(NAME ": memory allocation failed when parsing file "
+		    "'%s'.\n", conf_path);
+		goto cleanup;
+	}
+	
+	if (read(fd, buf, len) <= 0) {
+		printf(NAME ": unable to read file '%s'.\n", conf_path);
+		goto cleanup;
+	}
+	buf[len] = 0;
+	
+	suc = parse_match_ids(buf, ids);
+	
+cleanup:
+	free(buf);
+	
+	if (opened)
+		close(fd);
+	
+	return suc;
+}
+
+/**
+ * Get information about a driver.
+ *
+ * Each driver has its own directory in the base directory.
+ * The name of the driver's directory is the same as the name of the driver.
+ * The driver's directory contains driver's binary (named as the driver without
+ * extension) and the configuration file with match ids for device-to-driver
+ *  matching (named as the driver with a special extension).
+ *
+ * This function searches for the driver's directory and containing
+ * configuration files. If all the files needed are found, they are parsed and
+ * the information about the driver is stored in the driver's structure.
+ *
+ * @param base_path	The base directory, in which we look for driver's
+ *			subdirectory.
+ * @param name		The name of the driver.
+ * @param drv		The driver structure to fill information in.
+ *
+ * @return		True on success, false otherwise.
+ */
+bool get_driver_info(const char *base_path, const char *name, driver_t *drv)
+{
+	printf(NAME ": get_driver_info base_path = %s, name = %s.\n",
+	    base_path, name);
+	
+	assert(base_path != NULL && name != NULL && drv != NULL);
+	
+	bool suc = false;
+	char *match_path = NULL;
+	size_t name_size = 0;
+	
+	/* Read the list of match ids from the driver's configuration file. */
+	match_path = get_abs_path(base_path, name, MATCH_EXT);
+	if (match_path == NULL)
+		goto cleanup;
+	
+	if (!read_match_ids(match_path, &drv->match_ids))
+		goto cleanup;
+	
+	/* Allocate and fill driver's name. */
+	name_size = str_size(name) + 1;
+	drv->name = malloc(name_size);
+	if (drv->name == NULL)
+		goto cleanup;
+	str_cpy(drv->name, name_size, name);
+	
+	/* Initialize path with driver's binary. */
+	drv->binary_path = get_abs_path(base_path, name, "");
+	if (drv->binary_path == NULL)
+		goto cleanup;
+	
+	/* Check whether the driver's binary exists. */
+	struct stat s;
+	if (stat(drv->binary_path, &s) == ENOENT) { /* FIXME!! */
+		printf(NAME ": driver not found at path %s.", drv->binary_path);
+		goto cleanup;
+	}
+	
+	suc = true;
+	
+cleanup:
+	if (!suc) {
+		free(drv->binary_path);
+		free(drv->name);
+		/* Set the driver structure to the default state. */
+		init_driver(drv);
+	}
+	
+	free(match_path);
+	
+	return suc;
+}
+
+/** Lookup drivers in the directory.
+ *
+ * @param drivers_list	The list of available drivers.
+ * @param dir_path	The path to the directory where we search for drivers.
+ * @return		Number of drivers which were found.
+ */
+int lookup_available_drivers(driver_list_t *drivers_list, const char *dir_path)
+{
+	printf(NAME ": lookup_available_drivers, dir = %s \n", dir_path);
+	
+	int drv_cnt = 0;
+	DIR *dir = NULL;
+	struct dirent *diren;
+
+	dir = opendir(dir_path);
+	
+	if (dir != NULL) {
+		driver_t *drv = create_driver();
+		while ((diren = readdir(dir))) {
+			if (get_driver_info(dir_path, diren->d_name, drv)) {
+				add_driver(drivers_list, drv);
+				drv_cnt++;
+				drv = create_driver();
+			}
+		}
+		delete_driver(drv);
+		closedir(dir);
+	}
+	
+	return drv_cnt;
+}
+
+/** Create root device node in the device tree.
+ *
+ * @param tree	The device tree.
+ * @return	True on success, false otherwise.
+ */
+bool create_root_node(dev_tree_t *tree)
+{
+	node_t *node;
+
+	printf(NAME ": create_root_node\n");
+
+	node = create_dev_node();
+	if (node != NULL) {
+		insert_dev_node(tree, node, clone_string(""), NULL);
+		match_id_t *id = create_match_id();
+		id->id = clone_string("root");
+		id->score = 100;
+		add_match_id(&node->match_ids, id);
+		tree->root_node = node;
+	}
+
+	return node != NULL;
+}
+
+/** Lookup the best matching driver for the specified device in the list of
+ * drivers.
+ *
+ * A match between a device and a driver is found if one of the driver's match
+ * ids match one of the device's match ids. The score of the match is the
+ * product of the driver's and device's score associated with the matching id.
+ * The best matching driver for a device is the driver with the highest score
+ * of the match between the device and the driver.
+ *
+ * @param drivers_list	The list of drivers, where we look for the driver
+ *			suitable for handling the device.
+ * @param node		The device node structure of the device.
+ * @return		The best matching driver or NULL if no matching driver
+ *			is found.
+ */
+driver_t *find_best_match_driver(driver_list_t *drivers_list, node_t *node)
+{
+	driver_t *best_drv = NULL, *drv = NULL;
+	int best_score = 0, score = 0;
+	
+	fibril_mutex_lock(&drivers_list->drivers_mutex);
+	
+	link_t *link = drivers_list->drivers.next;
+	while (link != &drivers_list->drivers) {
+		drv = list_get_instance(link, driver_t, drivers);
+		score = get_match_score(drv, node);
+		if (score > best_score) {
+			best_score = score;
+			best_drv = drv;
+		}
+		link = link->next;
+	}
+	
+	fibril_mutex_unlock(&drivers_list->drivers_mutex);
+	
+	return best_drv;
+}
+
+/** Assign a driver to a device.
+ *
+ * @param node		The device's node in the device tree.
+ * @param drv		The driver.
+ */
+void attach_driver(node_t *node, driver_t *drv)
+{
+	printf(NAME ": attach_driver %s to device %s\n",
+	    drv->name, node->pathname);
+	
+	fibril_mutex_lock(&drv->driver_mutex);
+	
+	node->drv = drv;
+	list_append(&node->driver_devices, &drv->devices);
+	
+	fibril_mutex_unlock(&drv->driver_mutex);
+}
+
+/** Start a driver
+ *
+ * The driver's mutex is assumed to be locked.
+ *
+ * @param drv		The driver's structure.
+ * @return		True if the driver's task is successfully spawned, false
+ *			otherwise.
+ */
+bool start_driver(driver_t *drv)
+{
+	printf(NAME ": start_driver '%s'\n", drv->name);
+	
+	const char *argv[2];
+	
+	argv[0] = drv->name;
+	argv[1] = NULL;
+	
+	int err;
+	if (task_spawn(drv->binary_path, argv, &err) == 0) {
+		printf(NAME ": error spawning %s, errno = %d\n",
+		    drv->name, err);
+		return false;
+	}
+	
+	drv->state = DRIVER_STARTING;
+	return true;
+}
+
+/** Find device driver in the list of device drivers.
+ *
+ * @param drv_list	The list of device drivers.
+ * @param drv_name	The name of the device driver which is searched.
+ * @return		The device driver of the specified name, if it is in the
+ *			list, NULL otherwise.
+ */
+driver_t *find_driver(driver_list_t *drv_list, const char *drv_name)
+{
+	driver_t *res = NULL;
+	driver_t *drv = NULL;
+	link_t *link;
+	
+	fibril_mutex_lock(&drv_list->drivers_mutex);
+	
+	link = drv_list->drivers.next;
+	while (link != &drv_list->drivers) {
+		drv = list_get_instance(link, driver_t, drivers);
+		if (str_cmp(drv->name, drv_name) == 0) {
+			res = drv;
+			break;
+		}
+
+		link = link->next;
+	}
+	
+	fibril_mutex_unlock(&drv_list->drivers_mutex);
+	
+	return res;
+}
+
+/** Remember the driver's phone.
+ *
+ * @param driver	The driver.
+ * @param phone		The phone to the driver.
+ */
+void set_driver_phone(driver_t *driver, ipcarg_t phone)
+{
+	fibril_mutex_lock(&driver->driver_mutex);
+	assert(driver->state == DRIVER_STARTING);
+	driver->phone = phone;
+	fibril_mutex_unlock(&driver->driver_mutex);
+}
+
+/** Notify driver about the devices to which it was assigned.
+ *
+ * The driver's mutex must be locked.
+ *
+ * @param driver	The driver to which the devices are passed.
+ */
+static void pass_devices_to_driver(driver_t *driver, dev_tree_t *tree)
+{
+	node_t *dev;
+	link_t *link;
+	int phone;
+
+	printf(NAME ": pass_devices_to_driver\n");
+
+	phone = ipc_connect_me_to(driver->phone, DRIVER_DEVMAN, 0, 0);
+	if (phone > 0) {
+		
+		link = driver->devices.next;
+		while (link != &driver->devices) {
+			dev = list_get_instance(link, node_t, driver_devices);
+			add_device(phone, driver, dev, tree);
+			link = link->next;
+		}
+		
+		ipc_hangup(phone);
+	}
+}
+
+/** Finish the initialization of a driver after it has succesfully started
+ * and after it has registered itself by the device manager.
+ *
+ * Pass devices formerly matched to the driver to the driver and remember the
+ * driver is running and fully functional now.
+ *
+ * @param driver	The driver which registered itself as running by the
+ *			device manager.
+ */
+void initialize_running_driver(driver_t *driver, dev_tree_t *tree)
+{
+	printf(NAME ": initialize_running_driver\n");
+	fibril_mutex_lock(&driver->driver_mutex);
+	
+	/*
+	 * Pass devices which have been already assigned to the driver to the
+	 * driver.
+	 */
+	pass_devices_to_driver(driver, tree);
+	
+	/* Change driver's state to running. */
+	driver->state = DRIVER_RUNNING;
+	
+	fibril_mutex_unlock(&driver->driver_mutex);
+}
+
+/** Initialize device driver structure.
+ *
+ * @param drv		The device driver structure.
+ */
+void init_driver(driver_t *drv)
+{
+	assert(drv != NULL);
+
+	memset(drv, 0, sizeof(driver_t));
+	list_initialize(&drv->match_ids.ids);
+	list_initialize(&drv->devices);
+	fibril_mutex_initialize(&drv->driver_mutex);
+}
+
+/** Device driver structure clean-up.
+ *
+ * @param drv		The device driver structure.
+ */
+void clean_driver(driver_t *drv)
+{
+	assert(drv != NULL);
+
+	free_not_null(drv->name);
+	free_not_null(drv->binary_path);
+
+	clean_match_ids(&drv->match_ids);
+
+	init_driver(drv);
+}
+
+/** Delete device driver structure.
+ *
+ * @param drv		The device driver structure.
+ */
+void delete_driver(driver_t *drv)
+{
+	assert(drv != NULL);
+	
+	clean_driver(drv);
+	free(drv);
+}
+
+/** Create devmap path and name for the device. */
+static void devmap_register_tree_device(node_t *node, dev_tree_t *tree)
+{
+	char *devmap_pathname = NULL;
+	char *devmap_name = NULL;
+	
+	asprintf(&devmap_name, "%s", node->pathname);
+	if (devmap_name == NULL)
+		return;
+	
+	replace_char(devmap_name, '/', DEVMAP_SEPARATOR);
+	
+	asprintf(&devmap_pathname, "%s/%s", DEVMAP_DEVICE_NAMESPACE,
+	    devmap_name);
+	if (devmap_pathname == NULL) {
+		free(devmap_name);
+		return;
+	}
+	
+	devmap_device_register(devmap_pathname, &node->devmap_handle);
+	
+	tree_add_devmap_device(tree, node);
+	
+	free(devmap_name);
+	free(devmap_pathname);
+}
+
+
+/** Pass a device to running driver.
+ *
+ * @param drv		The driver's structure.
+ * @param node		The device's node in the device tree.
+ */
+void add_device(int phone, driver_t *drv, node_t *node, dev_tree_t *tree)
+{
+	printf(NAME ": add_device\n");
+	
+	ipcarg_t rc;
+	ipc_call_t answer;
+	
+	/* Send the device to the driver. */
+	aid_t req = async_send_1(phone, DRIVER_ADD_DEVICE, node->handle,
+	    &answer);
+	
+	/* Send the device's name to the driver. */
+	rc = async_data_write_start(phone, node->name,
+	    str_size(node->name) + 1);
+	if (rc != EOK) {
+		/* TODO handle error */
+	}
+	
+	/* Wait for answer from the driver. */
+	async_wait_for(req, &rc);
+	switch(rc) {
+	case EOK:
+		node->state = DEVICE_USABLE;
+		devmap_register_tree_device(node, tree);
+		break;
+	case ENOENT:
+		node->state = DEVICE_NOT_PRESENT;
+		break;
+	default:
+		node->state = DEVICE_INVALID;
+	}
+	
+	return;
+}
+
+/** Find suitable driver for a device and assign the driver to it.
+ *
+ * @param node		The device node of the device in the device tree.
+ * @param drivers_list	The list of available drivers.
+ * @return		True if the suitable driver is found and
+ *			successfully assigned to the device, false otherwise.
+ */
+bool assign_driver(node_t *node, driver_list_t *drivers_list, dev_tree_t *tree)
+{
+	/*
+	 * Find the driver which is the most suitable for handling this device.
+	 */
+	driver_t *drv = find_best_match_driver(drivers_list, node);
+	if (drv == NULL) {
+		printf(NAME ": no driver found for device '%s'.\n",
+		    node->pathname);
+		return false;
+	}
+	
+	/* Attach the driver to the device. */
+	attach_driver(node, drv);
+	
+	if (drv->state == DRIVER_NOT_STARTED) {
+		/* Start the driver. */
+		start_driver(drv);
+	}
+	
+	if (drv->state == DRIVER_RUNNING) {
+		/* Notify the driver about the new device. */
+		int phone = ipc_connect_me_to(drv->phone, DRIVER_DEVMAN, 0, 0);
+		if (phone > 0) {
+			add_device(phone, drv, node, tree);
+			ipc_hangup(phone);
+		}
+	}
+	
+	return true;
+}
+
+/** Initialize the device tree.
+ *
+ * Create root device node of the tree and assign driver to it.
+ *
+ * @param tree		The device tree.
+ * @param drivers_list	the list of available drivers.
+ * @return		True on success, false otherwise.
+ */
+bool init_device_tree(dev_tree_t *tree, driver_list_t *drivers_list)
+{
+	printf(NAME ": init_device_tree.\n");
+	
+	tree->current_handle = 0;
+	
+	hash_table_create(&tree->devman_devices, DEVICE_BUCKETS, 1,
+	    &devman_devices_ops);
+	hash_table_create(&tree->devmap_devices, DEVICE_BUCKETS, 1,
+	    &devmap_devices_ops);
+	
+	fibril_rwlock_initialize(&tree->rwlock);
+	
+	/* Create root node and add it to the device tree. */
+	if (!create_root_node(tree))
+		return false;
+
+	/* Find suitable driver and start it. */
+	return assign_driver(tree->root_node, drivers_list, tree);
+}
+
+/* Device nodes */
+
+/** Create a new device node.
+ *
+ * @return		A device node structure.
+ */
+node_t *create_dev_node(void)
+{
+	node_t *res = malloc(sizeof(node_t));
+	
+	if (res != NULL) {
+		memset(res, 0, sizeof(node_t));
+		list_initialize(&res->children);
+		list_initialize(&res->match_ids.ids);
+		list_initialize(&res->classes);
+	}
+	
+	return res;
+}
+
+/** Delete a device node.
+ *
+ * @param node		The device node structure.
+ */
+void delete_dev_node(node_t *node)
+{
+	assert(list_empty(&node->children));
+	assert(node->parent == NULL);
+	assert(node->drv == NULL);
+	
+	clean_match_ids(&node->match_ids);
+	free_not_null(node->name);
+	free_not_null(node->pathname);
+	free(node);
+}
+
+/** Find the device node structure of the device witch has the specified handle.
+ *
+ * Device tree's rwlock should be held at least for reading.
+ *
+ * @param tree		The device tree where we look for the device node.
+ * @param handle	The handle of the device.
+ * @return		The device node.
+ */
+node_t *find_dev_node_no_lock(dev_tree_t *tree, device_handle_t handle)
+{
+	unsigned long key = handle;
+	link_t *link = hash_table_find(&tree->devman_devices, &key);
+	return hash_table_get_instance(link, node_t, devman_link);
+}
+
+/** Find the device node structure of the device witch has the specified handle.
+ *
+ * @param tree		The device tree where we look for the device node.
+ * @param handle	The handle of the device.
+ * @return		The device node.
+ */
+node_t *find_dev_node(dev_tree_t *tree, device_handle_t handle)
+{
+	node_t *node = NULL;
+	
+	fibril_rwlock_read_lock(&tree->rwlock);
+	node = find_dev_node_no_lock(tree, handle);
+	fibril_rwlock_read_unlock(&tree->rwlock);
+	
+	return node;
+}
+
+
+/** Create and set device's full path in device tree.
+ *
+ * @param node		The device's device node.
+ * @param parent	The parent device node.
+ * @return		True on success, false otherwise (insufficient
+ *			resources etc.).
+ */
+static bool set_dev_path(node_t *node, node_t *parent)
+{
+	assert(node->name != NULL);
+	
+	size_t pathsize = (str_size(node->name) + 1);
+	if (parent != NULL)
+		pathsize += str_size(parent->pathname) + 1;
+	
+	node->pathname = (char *) malloc(pathsize);
+	if (node->pathname == NULL) {
+		printf(NAME ": failed to allocate device path.\n");
+		return false;
+	}
+	
+	if (parent != NULL) {
+		str_cpy(node->pathname, pathsize, parent->pathname);
+		str_append(node->pathname, pathsize, "/");
+		str_append(node->pathname, pathsize, node->name);
+	} else {
+		str_cpy(node->pathname, pathsize, node->name);
+	}
+	
+	return true;
+}
+
+/** Insert new device into device tree.
+ *
+ * The device tree's rwlock should be already held exclusively when calling this
+ * function.
+ *
+ * @param tree		The device tree.
+ * @param node		The newly added device node. 
+ * @param dev_name	The name of the newly added device.
+ * @param parent	The parent device node.
+ *
+ * @return		True on success, false otherwise (insufficient resources
+ *			etc.).
+ */
+bool insert_dev_node(dev_tree_t *tree, node_t *node, char *dev_name,
+    node_t *parent)
+{
+	assert(node != NULL);
+	assert(tree != NULL);
+	assert(dev_name != NULL);
+	
+	node->name = dev_name;
+	if (!set_dev_path(node, parent)) {
+		fibril_rwlock_write_unlock(&tree->rwlock);
+		return false;
+	}
+	
+	/* Add the node to the handle-to-node map. */
+	node->handle = ++tree->current_handle;
+	unsigned long key = node->handle;
+	hash_table_insert(&tree->devman_devices, &key, &node->devman_link);
+
+	/* Add the node to the list of its parent's children. */
+	node->parent = parent;
+	if (parent != NULL)
+		list_append(&node->sibling, &parent->children);
+	
+	return true;
+}
+
+/** Find device node with a specified path in the device tree.
+ * 
+ * @param path		The path of the device node in the device tree.
+ * @param tree		The device tree.
+ * @return		The device node if it is present in the tree, NULL
+ *			otherwise.
+ */
+node_t *find_dev_node_by_path(dev_tree_t *tree, char *path)
+{
+	fibril_rwlock_read_lock(&tree->rwlock);
+	
+	node_t *dev = tree->root_node;
+	/*
+	 * Relative path to the device from its parent (but with '/' at the
+	 * beginning)
+	 */
+	char *rel_path = path;
+	char *next_path_elem = NULL;
+	bool cont = (rel_path[0] == '/');
+	
+	while (cont && dev != NULL) {
+		next_path_elem  = get_path_elem_end(rel_path + 1);
+		if (next_path_elem[0] == '/') {
+			cont = true;
+			next_path_elem[0] = 0;
+		} else {
+			cont = false;
+		}
+		
+		dev = find_node_child(dev, rel_path + 1);
+		
+		if (cont) {
+			/* Restore the original path. */
+			next_path_elem[0] = '/';
+		}
+		rel_path = next_path_elem;
+	}
+	
+	fibril_rwlock_read_unlock(&tree->rwlock);
+	
+	return dev;
+}
+
+/** Find child device node with a specified name.
+ *
+ * Device tree rwlock should be held at least for reading.
+ *
+ * @param parent	The parent device node.
+ * @param name		The name of the child device node.
+ * @return		The child device node.
+ */
+node_t *find_node_child(node_t *parent, const char *name)
+{
+	node_t *dev;
+	link_t *link;
+	
+	link = parent->children.next;
+	
+	while (link != &parent->children) {
+		dev = list_get_instance(link, node_t, sibling);
+		
+		if (str_cmp(name, dev->name) == 0)
+			return dev;
+		
+		link = link->next;
+	}
+	
+	return NULL;
+}
+
+/* Device classes */
+
+/** Create device class.
+ *
+ * @return	Device class.
+ */
+dev_class_t *create_dev_class(void)
+{
+	dev_class_t *cl;
+	
+	cl = (dev_class_t *) malloc(sizeof(dev_class_t));
+	if (cl != NULL) {
+		memset(cl, 0, sizeof(dev_class_t));
+		list_initialize(&cl->devices);
+		fibril_mutex_initialize(&cl->mutex);
+	}
+	
+	return cl;
+}
+
+/** Create device class info.
+ *
+ * @return		Device class info.
+ */
+dev_class_info_t *create_dev_class_info(void)
+{
+	dev_class_info_t *info;
+	
+	info = (dev_class_info_t *) malloc(sizeof(dev_class_info_t));
+	if (info != NULL)
+		memset(info, 0, sizeof(dev_class_info_t));
+	
+	return info;
+}
+
+size_t get_new_class_dev_idx(dev_class_t *cl)
+{
+	size_t dev_idx;
+	
+	fibril_mutex_lock(&cl->mutex);
+	dev_idx = ++cl->curr_dev_idx;
+	fibril_mutex_unlock(&cl->mutex);
+	
+	return dev_idx;
+}
+
+
+/** Create unique device name within the class.
+ *
+ * @param cl		The class.
+ * @param base_dev_name	Contains the base name for the device if it was
+ *			specified by the driver when it registered the device by
+ *			the class; NULL if driver specified no base name.
+ * @return		The unique name for the device within the class.
+ */
+char *create_dev_name_for_class(dev_class_t *cl, const char *base_dev_name)
+{
+	char *dev_name;
+	const char *base_name;
+	
+	if (base_dev_name != NULL)
+		base_name = base_dev_name;
+	else
+		base_name = cl->base_dev_name;
+	
+	size_t idx = get_new_class_dev_idx(cl);
+	asprintf(&dev_name, "%s%d", base_name, idx);
+	
+	return dev_name;
+}
+
+/** Add the device to the class.
+ *
+ * The device may be added to multiple classes and a class may contain multiple
+ * devices. The class and the device are associated with each other by the
+ * dev_class_info_t structure.
+ *
+ * @param dev		The device.
+ * @param class		The class.
+ * @param base_dev_name	The base name of the device within the class if
+ *			specified by the driver, NULL otherwise.
+ * @return		dev_class_info_t structure which associates the device
+ *			with the class.
+ */
+dev_class_info_t *add_device_to_class(node_t *dev, dev_class_t *cl,
+    const char *base_dev_name)
+{
+	dev_class_info_t *info = create_dev_class_info();
+	
+	if (info != NULL) {
+		info->dev_class = cl;
+		info->dev = dev;
+		
+		/* Add the device to the class. */
+		fibril_mutex_lock(&cl->mutex);
+		list_append(&info->link, &cl->devices);
+		fibril_mutex_unlock(&cl->mutex);
+		
+		/* Add the class to the device. */
+		list_append(&info->dev_classes, &dev->classes);
+		
+		/* Create unique name for the device within the class. */
+		info->dev_name = create_dev_name_for_class(cl, base_dev_name);
+	}
+	
+	return info;
+}
+
+dev_class_t *get_dev_class(class_list_t *class_list, char *class_name)
+{
+	dev_class_t *cl;
+	
+	fibril_rwlock_write_lock(&class_list->rwlock);
+	cl = find_dev_class_no_lock(class_list, class_name);
+	if (cl == NULL) {
+		cl = create_dev_class();
+		if (cl != NULL) {
+			cl->name = class_name;
+			cl->base_dev_name = "";
+			add_dev_class_no_lock(class_list, cl);
+		}
+	}
+
+	fibril_rwlock_write_unlock(&class_list->rwlock);
+	return cl;
+}
+
+dev_class_t *find_dev_class_no_lock(class_list_t *class_list,
+    const char *class_name)
+{
+	dev_class_t *cl;
+	link_t *link = class_list->classes.next;
+	
+	while (link != &class_list->classes) {
+		cl = list_get_instance(link, dev_class_t, link);
+		if (str_cmp(cl->name, class_name) == 0)
+			return cl;
+	}
+	
+	return NULL;
+}
+
+void add_dev_class_no_lock(class_list_t *class_list, dev_class_t *cl)
+{
+	list_append(&cl->link, &class_list->classes);
+}
+
+void init_class_list(class_list_t *class_list)
+{
+	list_initialize(&class_list->classes);
+	fibril_rwlock_initialize(&class_list->rwlock);
+	hash_table_create(&class_list->devmap_devices, DEVICE_BUCKETS, 1,
+	    &devmap_devices_ops);
+}
+
+
+/* Devmap devices */
+
+node_t *find_devmap_tree_device(dev_tree_t *tree, dev_handle_t devmap_handle)
+{
+	node_t *dev = NULL;
+	link_t *link;
+	unsigned long key = (unsigned long) devmap_handle;
+	
+	fibril_rwlock_read_lock(&tree->rwlock);
+	link = hash_table_find(&tree->devmap_devices, &key);
+	if (link != NULL)
+		dev = hash_table_get_instance(link, node_t, devmap_link);
+	fibril_rwlock_read_unlock(&tree->rwlock);
+	
+	return dev;
+}
+
+node_t *find_devmap_class_device(class_list_t *classes,
+    dev_handle_t devmap_handle)
+{
+	node_t *dev = NULL;
+	dev_class_info_t *cli;
+	link_t *link;
+	unsigned long key = (unsigned long)devmap_handle;
+	
+	fibril_rwlock_read_lock(&classes->rwlock);
+	link = hash_table_find(&classes->devmap_devices, &key);
+	if (link != NULL) {
+		cli = hash_table_get_instance(link, dev_class_info_t,
+		    devmap_link);
+		dev = cli->dev;
+	}
+	fibril_rwlock_read_unlock(&classes->rwlock);
+	
+	return dev;
+}
+
+void class_add_devmap_device(class_list_t *class_list, dev_class_info_t *cli)
+{
+	unsigned long key = (unsigned long) cli->devmap_handle;
+	
+	fibril_rwlock_write_lock(&class_list->rwlock);
+	hash_table_insert(&class_list->devmap_devices, &key, &cli->devmap_link);
+	fibril_rwlock_write_unlock(&class_list->rwlock);
+}
+
+void tree_add_devmap_device(dev_tree_t *tree, node_t *node)
+{
+	unsigned long key = (unsigned long) node->devmap_handle;
+	fibril_rwlock_write_lock(&tree->rwlock);
+	hash_table_insert(&tree->devmap_devices, &key, &node->devmap_link);
+	fibril_rwlock_write_unlock(&tree->rwlock);
+}
+
+/** @}
+ */
Index: uspace/srv/devman/devman.h
===================================================================
--- uspace/srv/devman/devman.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/srv/devman/devman.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,348 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 devman
+ * @{
+ */
+
+#ifndef DEVMAN_H_
+#define DEVMAN_H_
+
+#include <assert.h>
+#include <bool.h>
+#include <dirent.h>
+#include <str.h>
+#include <adt/list.h>
+#include <adt/hash_table.h>
+#include <ipc/ipc.h>
+#include <ipc/devman.h>
+#include <ipc/devmap.h>
+#include <fibril_synch.h>
+#include <atomic.h>
+
+#include "util.h"
+
+#define NAME "devman"
+
+#define MATCH_EXT ".ma"
+#define DEVICE_BUCKETS 256
+
+#define DEVMAP_CLASS_NAMESPACE "class"
+#define DEVMAP_DEVICE_NAMESPACE "devices"
+#define DEVMAP_SEPARATOR '\\'
+
+struct node;
+typedef struct node node_t;
+
+typedef enum {
+	/** Driver has not been started. */
+	DRIVER_NOT_STARTED = 0,
+	
+	/**
+	 * Driver has been started, but has not registered as running and ready
+	 * to receive requests.
+	 */
+	DRIVER_STARTING,
+	
+	/** Driver is running and prepared to serve incomming requests. */
+	DRIVER_RUNNING
+} driver_state_t;
+
+/** Representation of device driver. */
+typedef struct driver {
+	/** Pointers to previous and next drivers in a linked list. */
+	link_t drivers;
+	
+	/**
+	 * Specifies whether the driver has been started and wheter is running
+	 * and prepared to receive requests.
+	 */
+	int state;
+	
+	/** Phone asociated with this driver. */
+	ipcarg_t phone;
+	/** Name of the device driver. */
+	char *name;
+	/** Path to the driver's binary. */
+	const char *binary_path;
+	/** List of device ids for device-to-driver matching. */
+	match_id_list_t match_ids;
+	/** Pointer to the linked list of devices controlled by this driver. */
+	link_t devices;
+	
+	/**
+	 * Fibril mutex for this driver - driver state, list of devices, phone.
+	 */
+	fibril_mutex_t driver_mutex;
+} driver_t;
+
+/** The list of drivers. */
+typedef struct driver_list {
+	/** List of drivers */
+	link_t drivers;
+	/** Fibril mutex for list of drivers. */
+	fibril_mutex_t drivers_mutex;
+} driver_list_t;
+
+/** The state of the device. */
+typedef enum {
+	DEVICE_NOT_INITIALIZED = 0,
+	DEVICE_USABLE,
+	DEVICE_NOT_PRESENT,
+	DEVICE_INVALID
+} device_state_t;
+
+/** Representation of a node in the device tree. */
+struct node {
+	/** The global unique identifier of the device. */
+	device_handle_t handle;
+	/** The name of the device specified by its parent. */
+	char *name;
+	
+	/**
+	 * Full path and name of the device in device hierarchi (i. e. in full
+	 * path in device tree).
+	 */
+	char *pathname;
+	
+	/** The node of the parent device. */
+	node_t *parent;
+	
+	/**
+	 * Pointers to previous and next child devices in the linked list of
+	 * parent device's node.
+	 */
+	link_t sibling;
+	
+	/** List of child device nodes. */
+	link_t children;
+	/** List of device ids for device-to-driver matching. */
+	match_id_list_t match_ids;
+	/** Driver of this device. */
+	driver_t *drv;
+	/** The state of the device. */
+	device_state_t state;
+	/**
+	 * Pointer to the previous and next device in the list of devices
+	 * owned by one driver.
+	 */
+	link_t driver_devices;
+	
+	/** The list of device classes to which this device belongs. */
+	link_t classes;
+	/** Devmap handle if the device is registered by devmapper. */
+	dev_handle_t devmap_handle;
+	
+	/**
+	 * Used by the hash table of devices indexed by devman device handles.
+	 */
+	link_t devman_link;
+	
+	/**
+	 * Used by the hash table of devices indexed by devmap device handles.
+	 */
+	link_t devmap_link;
+};
+
+/** Represents device tree. */
+typedef struct dev_tree {
+	/** Root device node. */
+	node_t *root_node;
+	
+	/**
+	 * The next available handle - handles are assigned in a sequential
+	 * manner.
+	 */
+	device_handle_t current_handle;
+	
+	/** Synchronize access to the device tree. */
+	fibril_rwlock_t rwlock;
+	
+	/** Hash table of all devices indexed by devman handles. */
+	hash_table_t devman_devices;
+	
+	/**
+	 * Hash table of devices registered by devmapper, indexed by devmap
+	 * handles.
+	 */
+	hash_table_t devmap_devices;
+} dev_tree_t;
+
+typedef struct dev_class {
+	/** The name of the class. */
+	const char *name;
+	
+	/**
+	 * Pointer to the previous and next class in the list of registered
+	 * classes.
+	 */
+	link_t link;
+	
+	/**
+	 * List of dev_class_info structures - one for each device registered by
+	 * this class.
+	 */
+	link_t devices;
+	
+	/**
+	 * Default base name for the device within the class, might be overrided
+	 * by the driver.
+	 */
+	const char *base_dev_name;
+	
+	/** Unique numerical identifier of the newly added device. */
+	size_t curr_dev_idx;
+	/** Synchronize access to the list of devices in this class. */
+	fibril_mutex_t mutex;
+} dev_class_t;
+
+/**
+ * Provides n-to-m mapping between device nodes and classes - each device may
+ * be register to the arbitrary number of classes and each class may contain
+ * the arbitrary number of devices.
+ */
+typedef struct dev_class_info {
+	/** The class. */
+	dev_class_t *dev_class;
+	/** The device. */
+	node_t *dev;
+	
+	/**
+	 * Pointer to the previous and next class info in the list of devices
+	 * registered by the class.
+	 */
+	link_t link;
+	
+	/**
+	 * Pointer to the previous and next class info in the list of classes
+	 * by which the device is registered.
+	 */
+	link_t dev_classes;
+	
+	/** The name of the device within the class. */
+	char *dev_name;
+	/** The handle of the device by device mapper in the class namespace. */
+	dev_handle_t devmap_handle;
+	
+	/**
+	 * Link in the hash table of devices registered by the devmapper using
+	 * their class names.
+	 */
+	link_t devmap_link;
+} dev_class_info_t;
+
+/** The list of device classes. */
+typedef struct class_list {
+	/** List of classes. */
+	link_t classes;
+	
+	/**
+	 * Hash table of devices registered by devmapper using their class name,
+	 * indexed by devmap handles.
+	 */
+	hash_table_t devmap_devices;
+	
+	/** Fibril mutex for list of classes. */
+	fibril_rwlock_t rwlock;
+} class_list_t;
+
+/* Match ids and scores */
+
+extern int get_match_score(driver_t *, node_t *);
+
+extern bool parse_match_ids(char *, match_id_list_t *);
+extern bool read_match_ids(const char *, match_id_list_t *);
+extern char *read_match_id(char **);
+extern char *read_id(const char **);
+
+/* Drivers */
+
+extern void init_driver_list(driver_list_t *);
+extern driver_t *create_driver(void);
+extern bool get_driver_info(const char *, const char *, driver_t *);
+extern int lookup_available_drivers(driver_list_t *, const char *);
+
+extern driver_t *find_best_match_driver(driver_list_t *, node_t *);
+extern bool assign_driver(node_t *, driver_list_t *, dev_tree_t *);
+
+extern void add_driver(driver_list_t *, driver_t *);
+extern void attach_driver(node_t *, driver_t *);
+extern void add_device(int, driver_t *, node_t *, dev_tree_t *);
+extern bool start_driver(driver_t *);
+
+extern driver_t *find_driver(driver_list_t *, const char *);
+extern void set_driver_phone(driver_t *, ipcarg_t);
+extern void initialize_running_driver(driver_t *, dev_tree_t *);
+
+extern void init_driver(driver_t *);
+extern void clean_driver(driver_t *);
+extern void delete_driver(driver_t *);
+
+/* Device nodes */
+
+extern node_t *create_dev_node(void);
+extern void delete_dev_node(node_t *node);
+extern node_t *find_dev_node_no_lock(dev_tree_t *tree,
+    device_handle_t handle);
+extern node_t *find_dev_node(dev_tree_t *tree, device_handle_t handle);
+extern node_t *find_dev_node_by_path(dev_tree_t *, char *);
+extern node_t *find_node_child(node_t *, const char *);
+
+/* Device tree */
+
+extern bool init_device_tree(dev_tree_t *, driver_list_t *);
+extern bool create_root_node(dev_tree_t *);
+extern bool insert_dev_node(dev_tree_t *, node_t *, char *, node_t *);
+
+/* Device classes */
+
+extern dev_class_t *create_dev_class(void);
+extern dev_class_info_t *create_dev_class_info(void);
+extern size_t get_new_class_dev_idx(dev_class_t *);
+extern char *create_dev_name_for_class(dev_class_t *, const char *);
+extern dev_class_info_t *add_device_to_class(node_t *, dev_class_t *,
+    const char *);
+
+extern void init_class_list(class_list_t *);
+
+extern dev_class_t *get_dev_class(class_list_t *, char *);
+extern dev_class_t *find_dev_class_no_lock(class_list_t *, const char *);
+extern void add_dev_class_no_lock(class_list_t *, dev_class_t *);
+
+/* Devmap devices */
+
+extern node_t *find_devmap_tree_device(dev_tree_t *, dev_handle_t);
+extern node_t *find_devmap_class_device(class_list_t *, dev_handle_t);
+
+extern void class_add_devmap_device(class_list_t *, dev_class_info_t *);
+extern void tree_add_devmap_device(dev_tree_t *, node_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/srv/devman/main.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,591 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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.
+ */
+
+/**
+ * @defgroup devman Device manager.
+ * @brief HelenOS device manager.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <ipc/services.h>
+#include <ipc/ns.h>
+#include <async.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <str.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <ipc/devman.h>
+#include <ipc/driver.h>
+#include <thread.h>
+#include <devmap.h>
+
+#include "devman.h"
+
+#define DRIVER_DEFAULT_STORE  "/drv"
+
+static driver_list_t drivers_list;
+static dev_tree_t device_tree;
+static class_list_t class_list;
+
+/** Register running driver. */
+static driver_t *devman_driver_register(void)
+{
+	ipc_call_t icall;
+	ipc_callid_t iid;
+	driver_t *driver = NULL;
+
+	printf(NAME ": devman_driver_register \n");
+	
+	iid = async_get_call(&icall);
+	if (IPC_GET_METHOD(icall) != DEVMAN_DRIVER_REGISTER) {
+		ipc_answer_0(iid, EREFUSED);
+		return NULL;
+	}
+	
+	char *drv_name = NULL;
+	
+	/* Get driver name. */
+	int rc = async_data_write_accept((void **) &drv_name, true, 0, 0, 0, 0);
+	if (rc != EOK) {
+		ipc_answer_0(iid, rc);
+		return NULL;
+	}
+
+	printf(NAME ": the %s driver is trying to register by the service.\n",
+	    drv_name);
+	
+	/* Find driver structure. */
+	driver = find_driver(&drivers_list, drv_name);
+	
+	if (driver == NULL) {
+		printf(NAME ": no driver named %s was found.\n", drv_name);
+		free(drv_name);
+		drv_name = NULL;
+		ipc_answer_0(iid, ENOENT);
+		return NULL;
+	}
+	
+	free(drv_name);
+	drv_name = NULL;
+	
+	/* Create connection to the driver. */
+	printf(NAME ":  creating connection to the %s driver.\n", driver->name);
+	ipc_call_t call;
+	ipc_callid_t callid = async_get_call(&call);
+	if (IPC_GET_METHOD(call) != IPC_M_CONNECT_TO_ME) {
+		ipc_answer_0(callid, ENOTSUP);
+		ipc_answer_0(iid, ENOTSUP);
+		return NULL;
+	}
+	
+	/* Remember driver's phone. */
+	set_driver_phone(driver, IPC_GET_ARG5(call));
+	
+	printf(NAME ": the %s driver was successfully registered as running.\n",
+	    driver->name);
+	
+	ipc_answer_0(callid, EOK);
+	ipc_answer_0(iid, EOK);
+	
+	return driver;
+}
+
+/** Receive device match ID from the device's parent driver and add it to the
+ * list of devices match ids.
+ *
+ * @param match_ids	The list of the device's match ids.
+ * @return		Zero on success, negative error code otherwise.
+ */
+static int devman_receive_match_id(match_id_list_t *match_ids)
+{
+	match_id_t *match_id = create_match_id();
+	ipc_callid_t callid;
+	ipc_call_t call;
+	int rc = 0;
+	
+	callid = async_get_call(&call);
+	if (DEVMAN_ADD_MATCH_ID != IPC_GET_METHOD(call)) {
+		printf(NAME ": ERROR: devman_receive_match_id - invalid "
+		    "protocol.\n");
+		ipc_answer_0(callid, EINVAL); 
+		delete_match_id(match_id);
+		return EINVAL;
+	}
+	
+	if (match_id == NULL) {
+		printf(NAME ": ERROR: devman_receive_match_id - failed to "
+		    "allocate match id.\n");
+		ipc_answer_0(callid, ENOMEM);
+		return ENOMEM;
+	}
+	
+	ipc_answer_0(callid, EOK);
+	
+	match_id->score = IPC_GET_ARG1(call);
+	
+	char *match_id_str;
+	rc = async_data_write_accept((void **) &match_id_str, true, 0, 0, 0, 0);
+	match_id->id = match_id_str;
+	if (rc != EOK) {
+		delete_match_id(match_id);
+		printf(NAME ": devman_receive_match_id - failed to receive "
+		    "match id string.\n");
+		return rc;
+	}
+	
+	list_append(&match_id->link, &match_ids->ids);
+	
+	printf(NAME ": received match id '%s', score = %d \n",
+	    match_id->id, match_id->score);
+	return rc;
+}
+
+/** Receive device match IDs from the device's parent driver and add them to the
+ * list of devices match ids.
+ *
+ * @param match_count	The number of device's match ids to be received.
+ * @param match_ids	The list of the device's match ids.
+ * @return		Zero on success, negative error code otherwise.
+ */
+static int devman_receive_match_ids(ipcarg_t match_count,
+    match_id_list_t *match_ids)
+{
+	int ret = EOK;
+	size_t i;
+	
+	for (i = 0; i < match_count; i++) {
+		if (EOK != (ret = devman_receive_match_id(match_ids)))
+			return ret;
+	}
+	return ret;
+}
+
+/** Handle child device registration.
+ *
+ * Child devices are registered by their parent's device driver.
+ */
+static void devman_add_child(ipc_callid_t callid, ipc_call_t *call)
+{
+	device_handle_t parent_handle = IPC_GET_ARG1(*call);
+	ipcarg_t match_count = IPC_GET_ARG2(*call);
+	dev_tree_t *tree = &device_tree;
+	
+	fibril_rwlock_write_lock(&tree->rwlock);
+	node_t *parent = find_dev_node_no_lock(&device_tree, parent_handle);
+	
+	if (parent == NULL) {
+		fibril_rwlock_write_unlock(&tree->rwlock);
+		ipc_answer_0(callid, ENOENT);
+		return;
+	}
+	
+	char *dev_name = NULL;
+	int rc = async_data_write_accept((void **)&dev_name, true, 0, 0, 0, 0);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&tree->rwlock);
+		ipc_answer_0(callid, rc);
+		return;
+	}
+	
+	node_t *node = create_dev_node();
+	if (!insert_dev_node(&device_tree, node, dev_name, parent)) {
+		fibril_rwlock_write_unlock(&tree->rwlock);
+		delete_dev_node(node);
+		ipc_answer_0(callid, ENOMEM);
+		return;
+	}
+
+	fibril_rwlock_write_unlock(&tree->rwlock);
+	
+	printf(NAME ": devman_add_child %s\n", node->pathname);
+	
+	devman_receive_match_ids(match_count, &node->match_ids);
+	
+	/* Return device handle to parent's driver. */
+	ipc_answer_1(callid, EOK, node->handle);
+	
+	/* Try to find suitable driver and assign it to the device. */
+	assign_driver(node, &drivers_list, &device_tree);
+}
+
+static void devmap_register_class_dev(dev_class_info_t *cli)
+{
+	/* Create devmap path and name for the device. */
+	char *devmap_pathname = NULL;
+
+	asprintf(&devmap_pathname, "%s/%s%c%s", DEVMAP_CLASS_NAMESPACE,
+	    cli->dev_class->name, DEVMAP_SEPARATOR, cli->dev_name);
+	if (devmap_pathname == NULL)
+		return;
+	
+	/*
+	 * Register the device by the device mapper and remember its devmap
+	 * handle.
+	 */
+	devmap_device_register(devmap_pathname, &cli->devmap_handle);
+	
+	/*
+	 * Add device to the hash map of class devices registered by device
+	 * mapper.
+	 */
+	class_add_devmap_device(&class_list, cli);
+	
+	free(devmap_pathname);
+}
+
+static void devman_add_device_to_class(ipc_callid_t callid, ipc_call_t *call)
+{
+	device_handle_t handle = IPC_GET_ARG1(*call);
+	
+	/* Get class name. */
+	char *class_name;
+	int rc = async_data_write_accept((void **) &class_name, true,
+	    0, 0, 0, 0);
+	if (rc != EOK) {
+		ipc_answer_0(callid, rc);
+		return;
+	}	
+	
+	node_t *dev = find_dev_node(&device_tree, handle);
+	if (dev == NULL) {
+		ipc_answer_0(callid, ENOENT);
+		return;
+	}
+	
+	dev_class_t *cl = get_dev_class(&class_list, class_name);
+	dev_class_info_t *class_info = add_device_to_class(dev, cl, NULL);
+	
+	/* Register the device's class alias by devmapper. */
+	devmap_register_class_dev(class_info);
+	
+	printf(NAME ": device '%s' added to class '%s', class name '%s' was "
+	    "asigned to it\n", dev->pathname, class_name, class_info->dev_name);
+	
+	ipc_answer_0(callid, EOK);
+}
+
+/** Initialize driver which has registered itself as running and ready.
+ *
+ * The initialization is done in a separate fibril to avoid deadlocks (if the
+ * driver needed to be served by devman during the driver's initialization).
+ */
+static int init_running_drv(void *drv)
+{
+	driver_t *driver = (driver_t *) drv;
+	
+	initialize_running_driver(driver, &device_tree);
+	printf(NAME ": the %s driver was successfully initialized. \n",
+	    driver->name);
+	return 0;
+}
+
+/** Function for handling connections from a driver to the device manager. */
+static void devman_connection_driver(ipc_callid_t iid, ipc_call_t *icall)
+{
+	/* Accept the connection. */
+	ipc_answer_0(iid, EOK);
+	
+	driver_t *driver = devman_driver_register();
+	if (driver == NULL)
+		return;
+	
+	/*
+	 * Initialize the driver as running (e.g. pass assigned devices to it)
+	 * in a separate fibril; the separate fibril is used to enable the
+	 * driver to use devman service during the driver's initialization.
+	 */
+	fid_t fid = fibril_create(init_running_drv, driver);
+	if (fid == 0) {
+		printf(NAME ": Error creating fibril for the initialization of "
+		    "the newly registered running driver.\n");
+		return;
+	}
+	fibril_add_ready(fid);
+	
+	ipc_callid_t callid;
+	ipc_call_t call;
+	bool cont = true;
+	while (cont) {
+		callid = async_get_call(&call);
+		
+		switch (IPC_GET_METHOD(call)) {
+		case IPC_M_PHONE_HUNGUP:
+			cont = false;
+			continue;
+		case DEVMAN_ADD_CHILD_DEVICE:
+			devman_add_child(callid, &call);
+			break;
+		case DEVMAN_ADD_DEVICE_TO_CLASS:
+			devman_add_device_to_class(callid, &call);
+			break;
+		default:
+			ipc_answer_0(callid, EINVAL); 
+			break;
+		}
+	}
+}
+
+/** Find handle for the device instance identified by the device's path in the
+ * device tree. */
+static void devman_device_get_handle(ipc_callid_t iid, ipc_call_t *icall)
+{
+	char *pathname;
+	
+	int rc = async_data_write_accept((void **) &pathname, true, 0, 0, 0, 0);
+	if (rc != EOK) {
+		ipc_answer_0(iid, rc);
+		return;
+	}
+	
+	node_t * dev = find_dev_node_by_path(&device_tree, pathname);
+	
+	free(pathname);
+
+	if (dev == NULL) {
+		ipc_answer_0(iid, ENOENT);
+		return;
+	}
+	
+	ipc_answer_1(iid, EOK, dev->handle);
+}
+
+
+/** Function for handling connections from a client to the device manager. */
+static void devman_connection_client(ipc_callid_t iid, ipc_call_t *icall)
+{
+	/* Accept connection. */
+	ipc_answer_0(iid, EOK);
+	
+	bool cont = true;
+	while (cont) {
+		ipc_call_t call;
+		ipc_callid_t callid = async_get_call(&call);
+		
+		switch (IPC_GET_METHOD(call)) {
+		case IPC_M_PHONE_HUNGUP:
+			cont = false;
+			continue;
+		case DEVMAN_DEVICE_GET_HANDLE:
+			devman_device_get_handle(callid, &call);
+			break;
+		default:
+			if (!(callid & IPC_CALLID_NOTIFICATION))
+				ipc_answer_0(callid, ENOENT);
+		}
+	}
+}
+
+static void devman_forward(ipc_callid_t iid, ipc_call_t *icall,
+    bool drv_to_parent)
+{
+	device_handle_t handle = IPC_GET_ARG2(*icall);
+	
+	node_t *dev = find_dev_node(&device_tree, handle);
+	if (dev == NULL) {
+		printf(NAME ": devman_forward error - no device with handle %x "
+		    "was found.\n", handle);
+		ipc_answer_0(iid, ENOENT);
+		return;
+	}
+	
+	driver_t *driver = NULL;
+	
+	if (drv_to_parent) {
+		if (dev->parent != NULL)
+			driver = dev->parent->drv;
+	} else if (dev->state == DEVICE_USABLE) {
+		driver = dev->drv;
+		assert(driver != NULL);
+	}
+	
+	if (driver == NULL) {
+		printf(NAME ": devman_forward error - the device is not in "
+		    "usable state.\n", handle);
+		ipc_answer_0(iid, ENOENT);
+		return;
+	}
+	
+	int method;
+	if (drv_to_parent)
+		method = DRIVER_DRIVER;
+	else
+		method = DRIVER_CLIENT;
+	
+	if (driver->phone <= 0) {
+		printf(NAME ": devman_forward: cound not forward to driver %s ",
+		    driver->name);
+		printf("the driver's phone is %x).\n", driver->phone);
+		ipc_answer_0(iid, EINVAL);
+		return;
+	}
+
+	printf(NAME ": devman_forward: forward connection to device %s to "
+	    "driver %s.\n", dev->pathname, driver->name);
+	ipc_forward_fast(iid, driver->phone, method, dev->handle, 0, IPC_FF_NONE);
+}
+
+/** Function for handling connections from a client forwarded by the device
+ * mapper to the device manager. */
+static void devman_connection_devmapper(ipc_callid_t iid, ipc_call_t *icall)
+{
+	dev_handle_t devmap_handle = IPC_GET_METHOD(*icall);
+	node_t *dev;
+
+	dev = find_devmap_tree_device(&device_tree, devmap_handle);
+	if (dev == NULL)
+		dev = find_devmap_class_device(&class_list, devmap_handle);
+	
+	if (dev == NULL || dev->drv == NULL) {
+		ipc_answer_0(iid, ENOENT);
+		return;
+	}
+	
+	if (dev->state != DEVICE_USABLE || dev->drv->phone <= 0) {
+		ipc_answer_0(iid, EINVAL);
+		return;
+	}
+	
+	printf(NAME ": devman_connection_devmapper: forward connection to "
+	    "device %s to driver %s.\n", dev->pathname, dev->drv->name);
+	ipc_forward_fast(iid, dev->drv->phone, DRIVER_CLIENT, dev->handle, 0,
+	    IPC_FF_NONE);
+}
+
+/** Function for handling connections to device manager. */
+static void devman_connection(ipc_callid_t iid, ipc_call_t *icall)
+{
+	/*
+	 * Silly hack to enable the device manager to register as a driver by
+	 * the device mapper. If the ipc method is not IPC_M_CONNECT_ME_TO, this
+	 * is not the forwarded connection from naming service, so it must be a
+	 * connection from the devmapper which thinks this is a devmapper-style
+	 * driver. So pretend this is a devmapper-style driver. (This does not
+	 * work for device with handle == IPC_M_CONNECT_ME_TO, because devmapper
+	 * passes device handle to the driver as an ipc method.)
+	 */
+	if (IPC_GET_METHOD(*icall) != IPC_M_CONNECT_ME_TO)
+		devman_connection_devmapper(iid, icall);
+
+	/*
+	 * ipc method is IPC_M_CONNECT_ME_TO, so this is forwarded connection
+	 * from naming service by which we registered as device manager, so be
+	 * device manager.
+	 */
+	
+	/* Select interface. */
+	switch ((ipcarg_t) (IPC_GET_ARG1(*icall))) {
+	case DEVMAN_DRIVER:
+		devman_connection_driver(iid, icall);
+		break;
+	case DEVMAN_CLIENT:
+		devman_connection_client(iid, icall);
+		break;
+	case DEVMAN_CONNECT_TO_DEVICE:
+		/* Connect client to selected device. */
+		devman_forward(iid, icall, false);
+		break;
+	case DEVMAN_CONNECT_TO_PARENTS_DEVICE:
+		/* Connect client to selected device. */
+		devman_forward(iid, icall, true);
+		break;
+	default:
+		/* No such interface */
+		ipc_answer_0(iid, ENOENT);
+	}
+}
+
+/** Initialize device manager internal structures. */
+static bool devman_init(void)
+{
+	printf(NAME ": devman_init - looking for available drivers.\n");
+	
+	/* Initialize list of available drivers. */
+	init_driver_list(&drivers_list);
+	if (lookup_available_drivers(&drivers_list,
+	    DRIVER_DEFAULT_STORE) == 0) {
+		printf(NAME " no drivers found.");
+		return false;
+	}
+
+	printf(NAME ": devman_init  - list of drivers has been initialized.\n");
+
+	/* Create root device node. */
+	if (!init_device_tree(&device_tree, &drivers_list)) {
+		printf(NAME " failed to initialize device tree.");
+		return false;
+	}
+
+	init_class_list(&class_list);
+	
+	/*
+	 * !!! devman_connection ... as the device manager is not a real devmap
+	 * driver (it uses a completely different ipc protocol than an ordinary
+	 * devmap driver) forwarding a connection from client to the devman by
+	 * devmapper would not work.
+	 */
+	devmap_driver_register(NAME, devman_connection);
+	
+	return true;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS Device Manager\n");
+
+	if (!devman_init()) {
+		printf(NAME ": Error while initializing service\n");
+		return -1;
+	}
+	
+	/* Set a handler of incomming connections. */
+	async_set_client_connection(devman_connection);
+
+	/* Register device manager at naming service. */
+	ipcarg_t phonead;
+	if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAN, 0, 0, &phonead) != 0)
+		return -1;
+
+	printf(NAME ": Accepting connections\n");
+	async_manager();
+
+	/* Never reached. */
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/srv/devman/match.c
===================================================================
--- uspace/srv/devman/match.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/srv/devman/match.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 devman
+ * @{
+ */
+
+#include <str.h>
+
+#include "devman.h"
+
+int get_match_score(driver_t *drv, node_t *dev)
+{
+	link_t *drv_head = &drv->match_ids.ids;
+	link_t *dev_head = &dev->match_ids.ids;
+	
+	if (list_empty(drv_head) || list_empty(dev_head))
+		return 0;
+	
+	link_t *drv_link = drv->match_ids.ids.next;
+	link_t *dev_link = dev->match_ids.ids.next;
+	
+	match_id_t *drv_id = list_get_instance(drv_link, match_id_t, link);
+	match_id_t *dev_id = list_get_instance(dev_link, match_id_t, link);
+	
+	int score_next_drv = 0;
+	int score_next_dev = 0;
+	
+	do {
+		match_id_t *tmp_ma_id;
+	
+		if (str_cmp(drv_id->id, dev_id->id) == 0) {
+		 	/*
+		 	 * We found a match.
+		 	 * Return the score of the match.
+		 	 */
+			return drv_id->score * dev_id->score;
+		}
+		
+		/*
+		 * Compute the next score we get, if we advance in the driver's
+		 * list of match ids.
+		 */
+		if (drv_link->next != drv_head) {
+			tmp_ma_id = list_get_instance(drv_link->next,
+			    match_id_t, link);
+			score_next_drv = dev_id->score * tmp_ma_id->score;
+		} else {
+			score_next_drv = 0;
+		}
+		
+		/*
+		 * Compute the next score we get, if we advance in the device's
+		 * list of match ids.
+		 */
+		if (dev_link->next != dev_head) {
+			tmp_ma_id = list_get_instance(dev_link->next,
+			    match_id_t, link);
+			score_next_dev = drv_id->score * tmp_ma_id->score;
+		} else {
+			score_next_dev = 0;
+		}
+		
+		/*
+		 * Advance in one of the two lists, so we get the next highest
+		 * score.
+		 */
+		if (score_next_drv > score_next_dev) {
+			drv_link = drv_link->next;
+			drv_id = list_get_instance(drv_link, match_id_t, link);
+		} else {
+			dev_link = dev_link->next;
+			dev_id = list_get_instance(dev_link, match_id_t, link);
+		}
+		
+	} while (drv_link->next != drv_head && dev_link->next != dev_head);
+	
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/srv/devman/util.c
===================================================================
--- uspace/srv/devman/util.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/srv/devman/util.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 devman
+ * @{
+ */
+
+#include <stdlib.h>
+#include <str.h>
+
+#include "util.h"
+
+char *get_abs_path(const char *base_path, const char *name, const char *ext)
+{
+	char *res;
+	int base_len = str_size(base_path);
+	int size = base_len + 2 * str_size(name) + str_size(ext) + 3;
+	
+	res = malloc(size);
+	
+	if (res) {
+		str_cpy(res, size, base_path);
+		if (base_path[base_len - 1] != '/')
+			str_append(res, size, "/");
+		str_append(res, size, name);
+		str_append(res, size, "/");
+		str_append(res, size, name);
+		if (ext[0] != '.')
+			str_append(res, size, ".");
+		str_append(res, size, ext);
+	}
+	
+	return res;
+}
+
+char *get_path_elem_end(char *path)
+{
+	while (*path != '\0' && *path != '/')
+		path++;
+	return path;
+}
+
+bool skip_spaces(char **buf)
+{
+	while (isspace(**buf))
+		(*buf)++;
+	return *buf != 0;
+}
+
+size_t get_nonspace_len(const char *str)
+{
+	size_t len = 0;
+	
+	while(*str != '\0' && !isspace(*str)) {
+		len++;
+		str++;
+	}
+
+	return len;
+}
+
+void free_not_null(const void *ptr)
+{
+	if (ptr != NULL)
+		free(ptr);
+}
+
+char *clone_string(const char *s)
+{
+	size_t size = str_size(s) + 1;
+	char *str;
+	
+	str = (char *) malloc(size);
+	if (str != NULL)
+		str_cpy(str, size, s);
+	return str;
+}
+
+void replace_char(char *str, char orig, char repl)
+{
+	while (*str) {
+		if (*str == orig)
+			*str = repl;
+		str++;
+	}
+}
+
+/** @}
+ */
Index: uspace/srv/devman/util.h
===================================================================
--- uspace/srv/devman/util.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
+++ uspace/srv/devman/util.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * 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 devman
+ * @{
+ */
+
+#ifndef DEVMAN_UTIL_H_
+#define DEVMAN_UTIL_H_
+
+#include <ctype.h>
+#include <str.h>
+#include <malloc.h>
+
+extern char *get_abs_path(const char *, const char *, const char *);
+extern char *get_path_elem_end(char *);
+
+extern bool skip_spaces(char **);
+extern size_t get_nonspace_len(const char *);
+extern void free_not_null(const void *);
+extern char *clone_string(const char *);
+extern void replace_char(char *, char, char);
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/fs/fat/fat_ops.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -369,16 +369,18 @@
 	unsigned blocks;
 	fat_dentry_t *d;
+	dev_handle_t dev_handle;
 	block_t *b;
 	int rc;
 
 	fibril_mutex_lock(&parentp->idx->lock);
-	bs = block_bb_get(parentp->idx->dev_handle);
+	dev_handle = parentp->idx->dev_handle;
+	fibril_mutex_unlock(&parentp->idx->lock);
+
+	bs = block_bb_get(dev_handle);
 	blocks = parentp->size / BPS(bs);
 	for (i = 0; i < blocks; i++) {
 		rc = fat_block_get(&b, bs, parentp, i, BLOCK_FLAGS_NONE);
-		if (rc != EOK) {
-			fibril_mutex_unlock(&parentp->idx->lock);
+		if (rc != EOK)
 			return rc;
-		}
 		for (j = 0; j < DPS(bs); j++) { 
 			d = ((fat_dentry_t *)b->data) + j;
@@ -390,5 +392,4 @@
 				/* miss */
 				rc = block_put(b);
-				fibril_mutex_unlock(&parentp->idx->lock);
 				*rfn = NULL;
 				return rc;
@@ -401,14 +402,6 @@
 				/* hit */
 				fat_node_t *nodep;
-				/*
-				 * Assume tree hierarchy for locking.  We
-				 * already have the parent and now we are going
-				 * to lock the child.  Never lock in the oposite
-				 * order.
-				 */
-				fat_idx_t *idx = fat_idx_get_by_pos(
-				    parentp->idx->dev_handle, parentp->firstc,
-				    i * DPS(bs) + j);
-				fibril_mutex_unlock(&parentp->idx->lock);
+				fat_idx_t *idx = fat_idx_get_by_pos(dev_handle,
+				    parentp->firstc, i * DPS(bs) + j);
 				if (!idx) {
 					/*
@@ -433,11 +426,8 @@
 		}
 		rc = block_put(b);
-		if (rc != EOK) {
-			fibril_mutex_unlock(&parentp->idx->lock);
+		if (rc != EOK)
 			return rc;
-		}
-	}
-
-	fibril_mutex_unlock(&parentp->idx->lock);
+	}
+
 	*rfn = NULL;
 	return EOK;
Index: pace/srv/hw/bus/pci/Makefile
===================================================================
--- uspace/srv/hw/bus/pci/Makefile	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 Jakub Jermar
-# 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.
-#
-
-USPACE_PREFIX = ../../../..
-LIBS = $(LIBPCI_PREFIX)/libpci.a
-EXTRA_CFLAGS = -I$(LIBPCI_PREFIX)
-BINARY = pci
-
-SOURCES = \
-	pci.c
-
-include $(USPACE_PREFIX)/Makefile.common
Index: pace/srv/hw/bus/pci/pci.c
===================================================================
--- uspace/srv/hw/bus/pci/pci.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,88 +1,0 @@
-/*
- * HelenOS PCI driver.
- *
- * (Based on public domain libpci example.c written by Martin Mares.)
- * Copyright (c) 2006 Jakub Jermar
- *
- * Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-/**
- * @addtogroup pci
- * @{
- */
-
-#include <stdio.h>
-#include <ddi.h>
-#include <task.h>
-#include <stdlib.h>
-#include <ipc/ipc.h>
-#include <ipc/services.h>
-#include <errno.h>
-
-#include <pci.h>
-
-#define PCI_CONF1	0xcf8
-#define PCI_CONF1_SIZE	8
-
-#define NAME		"PCI"
-
-static struct pci_access *pacc;
-
-int main(int argc, char *argv[])
-{
-	struct pci_dev *dev;
-	unsigned int c;
-	char buf[80];
-	ipcarg_t ns_in_phone_hash;
-
-	printf("%s: HelenOS PCI driver\n", NAME);
-
-	/*
-	 * Gain control over PCI configuration ports.
-	 */
-	iospace_enable(task_get_id(), (void *) PCI_CONF1, PCI_CONF1_SIZE);
-
-	pacc = pci_alloc();           /* Get the pci_access structure */
-	pci_init(pacc);               /* Initialize the PCI library */
-	pci_scan_bus(pacc);           /* We want to get the list of devices */
-	for(dev=pacc->devices; dev; dev=dev->next) {   /* Iterate over all devices */
-		pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_IRQ);
-		c = pci_read_word(dev, PCI_CLASS_DEVICE); /* Read config register directly */
-		printf("%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d base0=%lx\n",
-			dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id,
-			c, dev->irq, dev->base_addr[0]);
-		printf("\t%s\n", pci_lookup_name(pacc, buf, sizeof(buf), PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE,
-			dev->vendor_id, dev->device_id));
-	}
-
-	printf("%s: registering at naming service.\n", NAME);
-	if (ipc_connect_to_me(PHONE_NS, SERVICE_PCI, 0, 0, &ns_in_phone_hash) != 0) {
-		printf("Failed to register %s at naming service.\n", NAME);
-		return -1;
-	}
-
-	printf("%s: accepting connections\n", NAME);
-	while (1) {		
-		ipc_call_t call;
-		ipc_callid_t callid;
-		ipcarg_t retval = ENOTSUP;
-
-		callid = ipc_wait_for_call(&call);
-		switch(IPC_GET_METHOD(call)) {
-		case IPC_M_CONNECT_ME_TO:
-			retval = EOK;
-			break;
-		}
-		ipc_answer_0(callid, retval);
-		printf("%s: received call from %lX\n", NAME,
-		    call.in_phone_hash);
-	}
-
-	pci_cleanup(pacc);
-	return 0;
-}
-
-/**
- * @}
- */
Index: pace/srv/hw/bus/pci/update-ids
===================================================================
--- uspace/srv/hw/bus/pci/update-ids	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#! /bin/bash
-
-wget -O pci.ids http://pciids.sourceforge.net/v2.2/pci.ids
-
-cat > pci_ids.h <<EOF
-/* DO NOT EDIT, THIS FILE IS AUTOMATICALLY GENERATED */
-char *pci_ids[] = {
-EOF
-
-cat pci.ids | grep -v '^#.*' | grep -v '^$' | tr \" \' | \
-    sed -n 's/\(.*\)/"\1",/p' | sed 's/?/\\?/g' >> pci_ids.h
-
-cat >> pci_ids.h <<EOF
-""
-};
-EOF
Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/arp/arp.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,11 +28,16 @@
 
 /** @addtogroup arp
- *  @{
+ * @{
  */
 
 /** @file
- *  ARP module implementation.
- *  @see arp.h
- */
+ * ARP module implementation.
+ * @see arp.h
+ */
+
+#include "arp.h"
+#include "arp_header.h"
+#include "arp_oc.h"
+#include "arp_module.h"
 
 #include <async.h>
@@ -43,4 +48,5 @@
 #include <str.h>
 #include <task.h>
+#include <adt/measured_strings.h>
 #include <ipc/ipc.h>
 #include <ipc/services.h>
@@ -49,13 +55,12 @@
 #include <ipc/il.h>
 #include <byteorder.h>
-#include <err.h>
+#include <errno.h>
 
 #include <net/modules.h>
 #include <net/device.h>
-#include <arp_interface.h>
+#include <net/packet.h>
+
 #include <nil_interface.h>
 #include <protocol_map.h>
-#include <adt/measured_strings.h>
-#include <net/packet.h>
 #include <packet_client.h>
 #include <packet_remote.h>
@@ -63,109 +68,53 @@
 #include <il_local.h>
 
-#include "arp.h"
-#include "arp_header.h"
-#include "arp_oc.h"
-#include "arp_module.h"
-
-
-/** ARP module name.
- */
+
+/** ARP module name. */
 #define NAME  "arp"
 
-/** ARP global data.
- */
-arp_globals_t	arp_globals;
+/** ARP global data. */
+arp_globals_t arp_globals;
+
+DEVICE_MAP_IMPLEMENT(arp_cache, arp_device_t);
+INT_MAP_IMPLEMENT(arp_protos, arp_proto_t);
+GENERIC_CHAR_MAP_IMPLEMENT(arp_addr, measured_string_t);
 
 /** Clears the device specific data.
- *  @param[in] device The device specific data.
- */
-void arp_clear_device(arp_device_ref device);
-
-/** Creates new protocol specific data.
- *  Allocates and returns the needed memory block as the proto parameter.
- *  @param[out] proto The allocated protocol specific data.
- *  @param[in] service The protocol module service.
- *  @param[in] address The actual protocol device address.
- *  @returns EOK on success.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int arp_proto_create(arp_proto_ref * proto, services_t service, measured_string_ref address);
-
-/** @name Message processing functions
- */
-/*@{*/
-
-/** Registers the device.
- *  Creates new device entry in the cache or updates the protocol address if the device with the device identifier and the driver service exists.
- *  @param[in] device_id The device identifier.
- *  @param[in] service The device driver service.
- *  @param[in] protocol The protocol service.
- *  @param[in] address The actual device protocol address.
- *  @returns EOK on success.
- *  @returns EEXIST if another device with the same device identifier and different driver service exists.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns Other error codes as defined for the measured_strings_return() function.
- */
-int arp_device_message(device_id_t device_id, services_t service, services_t protocol, measured_string_ref address);
-
-/** Updates the device content length according to the new MTU value.
- *  @param[in] device_id The device identifier.
- *  @param[in] mtu The new mtu value.
- *  @returns ENOENT if device is not found.
- *  @returns EOK on success.
- */
-int arp_mtu_changed_message(device_id_t device_id, size_t mtu);
-
-/** Processes the received ARP packet.
- *  Updates the source hardware address if the source entry exists or the packet is targeted to my protocol address.
- *  Responses to the ARP request if the packet is the ARP request and is targeted to my address.
- *  @param[in] device_id The source device identifier.
- *  @param[in,out] packet The received packet.
- *  @returns EOK on success and the packet is no longer needed.
- *  @returns 1 on success and the packet has been reused.
- *  @returns EINVAL if the packet is too small to carry an ARP packet.
- *  @returns EINVAL if the received address lengths differs from the registered values.
- *  @returns ENOENT if the device is not found in the cache.
- *  @returns ENOENT if the protocol for the device is not found in the cache.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int arp_receive_message(device_id_t device_id, packet_t packet);
-
-/** Returns the hardware address for the given protocol address.
- *  Sends the ARP request packet if the hardware address is not found in the cache.
- *  @param[in] device_id The device identifier.
- *  @param[in] protocol The protocol service.
- *  @param[in] target The target protocol address.
- *  @returns The hardware address of the target.
- *  @returns NULL if the target parameter is NULL.
- *  @returns NULL if the device is not found.
- *  @returns NULL if the device packet is too small to send a&nbsp;request.
- *  @returns NULL if the hardware address is not found in the cache.
- */
-measured_string_ref arp_translate_message(device_id_t device_id, services_t protocol, measured_string_ref target);
-
-/*@}*/
-
-DEVICE_MAP_IMPLEMENT(arp_cache, arp_device_t)
-
-INT_MAP_IMPLEMENT(arp_protos, arp_proto_t)
-
-GENERIC_CHAR_MAP_IMPLEMENT(arp_addr, measured_string_t)
-
-int arp_clean_cache_req(int arp_phone){
+ *
+ * @param[in] device	The device specific data.
+ */
+static void arp_clear_device(arp_device_ref device)
+{
+	int count;
+	arp_proto_ref proto;
+
+	for (count = arp_protos_count(&device->protos) - 1; count >= 0;
+	    count--) {
+		proto = arp_protos_get_index(&device->protos, count);
+		if (proto) {
+			if (proto->addr)
+				free(proto->addr);
+			if (proto->addr_data)
+				free(proto->addr_data);
+			arp_addr_destroy(&proto->addresses);
+		}
+	}
+	arp_protos_clear(&device->protos);
+}
+
+static int arp_clean_cache_req(int arp_phone)
+{
 	int count;
 	arp_device_ref device;
 
 	fibril_rwlock_write_lock(&arp_globals.lock);
-	for(count = arp_cache_count(&arp_globals.cache) - 1; count >= 0; -- count){
+	for (count = arp_cache_count(&arp_globals.cache) - 1; count >= 0;
+	    count--) {
 		device = arp_cache_get_index(&arp_globals.cache, count);
-		if(device){
+		if (device) {
 			arp_clear_device(device);
-			if(device->addr_data){
+			if (device->addr_data)
 				free(device->addr_data);
-			}
-			if(device->broadcast_data){
+			if (device->broadcast_data)
 				free(device->broadcast_data);
-			}
 		}
 	}
@@ -176,5 +125,8 @@
 }
 
-int arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address){
+static int
+arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol,
+    measured_string_ref address)
+{
 	arp_device_ref device;
 	arp_proto_ref proto;
@@ -182,10 +134,10 @@
 	fibril_rwlock_write_lock(&arp_globals.lock);
 	device = arp_cache_find(&arp_globals.cache, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
 	}
 	proto = arp_protos_find(&device->protos, protocol);
-	if(! proto){
+	if (!proto) {
 		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
@@ -196,29 +148,12 @@
 }
 
-void arp_clear_device(arp_device_ref device){
-	int count;
-	arp_proto_ref proto;
-
-	for(count = arp_protos_count(&device->protos) - 1; count >= 0; -- count){
-		proto = arp_protos_get_index(&device->protos, count);
-		if(proto){
-			if(proto->addr){
-				free(proto->addr);
-			}
-			if(proto->addr_data){
-				free(proto->addr_data);
-			}
-			arp_addr_destroy(&proto->addresses);
-		}
-	}
-	arp_protos_clear(&device->protos);
-}
-
-int arp_clear_device_req(int arp_phone, device_id_t device_id){
+
+static int arp_clear_device_req(int arp_phone, device_id_t device_id)
+{
 	arp_device_ref device;
 
 	fibril_rwlock_write_lock(&arp_globals.lock);
 	device = arp_cache_find(&arp_globals.cache, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
@@ -230,17 +165,68 @@
 }
 
-int arp_device_message(device_id_t device_id, services_t service, services_t protocol, measured_string_ref address){
-	ERROR_DECLARE;
-
+/** Creates new protocol specific data.
+ *
+ * Allocates and returns the needed memory block as the proto parameter.
+ *
+ * @param[out] proto	The allocated protocol specific data.
+ * @param[in] service	The protocol module service.
+ * @param[in] address	The actual protocol device address.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+static int
+arp_proto_create(arp_proto_ref *proto, services_t service,
+    measured_string_ref address)
+{
+	int rc;
+
+	*proto = (arp_proto_ref) malloc(sizeof(arp_proto_t));
+	if (!*proto)
+		return ENOMEM;
+	
+	(*proto)->service = service;
+	(*proto)->addr = address;
+	(*proto)->addr_data = address->value;
+	
+	rc = arp_addr_initialize(&(*proto)->addresses);
+	if (rc != EOK) {
+		free(*proto);
+		return rc;
+	}
+	
+	return EOK;
+}
+
+/** Registers the device.
+ *
+ * Creates new device entry in the cache or updates the protocol address if the
+ * device with the device identifier and the driver service exists.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] service	The device driver service.
+ * @param[in] protocol	The protocol service.
+ * @param[in] address	The actual device protocol address.
+ * @returns		EOK on success.
+ * @returns		EEXIST if another device with the same device identifier
+ *			and different driver service exists.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the
+ *			measured_strings_return() function.
+ */
+static int
+arp_device_message(device_id_t device_id, services_t service,
+    services_t protocol, measured_string_ref address)
+{
 	arp_device_ref device;
 	arp_proto_ref proto;
+	hw_type_t hardware;
 	int index;
-	hw_type_t hardware;
+	int rc;
 
 	fibril_rwlock_write_lock(&arp_globals.lock);
 	// an existing device?
 	device = arp_cache_find(&arp_globals.cache, device_id);
-	if(device){
-		if(device->service != service){
+	if (device) {
+		if (device->service != service) {
 			printf("Device %d already exists\n", device->device_id);
 			fibril_rwlock_write_unlock(&arp_globals.lock);
@@ -248,30 +234,33 @@
 		}
 		proto = arp_protos_find(&device->protos, protocol);
-		if(proto){
+		if (proto) {
 			free(proto->addr);
 			free(proto->addr_data);
 			proto->addr = address;
 			proto->addr_data = address->value;
-		}else{
-			if(ERROR_OCCURRED(arp_proto_create(&proto, protocol, address))){
+		} else {
+			rc = arp_proto_create(&proto, protocol, address);
+			if (rc != EOK) {
 				fibril_rwlock_write_unlock(&arp_globals.lock);
-				return ERROR_CODE;
+				return rc;
 			}
-			index = arp_protos_add(&device->protos, proto->service, proto);
-			if(index < 0){
+			index = arp_protos_add(&device->protos, proto->service,
+			    proto);
+			if (index < 0) {
 				fibril_rwlock_write_unlock(&arp_globals.lock);
 				free(proto);
 				return index;
 			}
-			printf("New protocol added:\n\tdevice id\t= %d\n\tproto\t= %d", device_id, protocol);
-		}
-	}else{
+			printf("New protocol added:\n\tdevice id\t= "
+			    "%d\n\tproto\t= %d", device_id, protocol);
+		}
+	} else {
 		hardware = hardware_map(service);
-		if(! hardware){
+		if (!hardware)
 			return ENOENT;
-		}
+		
 		// create a new device
 		device = (arp_device_ref) malloc(sizeof(arp_device_t));
-		if(! device){
+		if (!device) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			return ENOMEM;
@@ -279,12 +268,18 @@
 		device->hardware = hardware;
 		device->device_id = device_id;
-		if(ERROR_OCCURRED(arp_protos_initialize(&device->protos))
-			|| ERROR_OCCURRED(arp_proto_create(&proto, protocol, address))){
+		rc = arp_protos_initialize(&device->protos);
+		if (rc != EOK) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			free(device);
-			return ERROR_CODE;
+			return rc;
+		}
+		rc = arp_proto_create(&proto, protocol, address);
+		if (rc != EOK) {
+			fibril_rwlock_write_unlock(&arp_globals.lock);
+			free(device);
+			return rc;
 		}
 		index = arp_protos_add(&device->protos, proto->service, proto);
-		if(index < 0){
+		if (index < 0) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
@@ -293,7 +288,10 @@
 		}
 		device->service = service;
+		
 		// bind the new one
-		device->phone = nil_bind_service(device->service, (ipcarg_t) device->device_id, SERVICE_ARP, arp_globals.client_connection);
-		if(device->phone < 0){
+		device->phone = nil_bind_service(device->service,
+		    (ipcarg_t) device->device_id, SERVICE_ARP,
+		    arp_globals.client_connection);
+		if (device->phone < 0) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
@@ -301,20 +299,29 @@
 			return EREFUSED;
 		}
+		
 		// get packet dimensions
-		if(ERROR_OCCURRED(nil_packet_size_req(device->phone, device_id, &device->packet_dimension))){
+		rc = nil_packet_size_req(device->phone, device_id,
+		    &device->packet_dimension);
+		if (rc != EOK) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
 			free(device);
-			return ERROR_CODE;
-		}
+			return rc;
+		}
+		
 		// get hardware address
-		if(ERROR_OCCURRED(nil_get_addr_req(device->phone, device_id, &device->addr, &device->addr_data))){
+		rc = nil_get_addr_req(device->phone, device_id, &device->addr,
+		    &device->addr_data);
+		if (rc != EOK) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			arp_protos_destroy(&device->protos);
 			free(device);
-			return ERROR_CODE;
-		}
+			return rc;
+		}
+		
 		// get broadcast address
-		if(ERROR_OCCURRED(nil_get_broadcast_addr_req(device->phone, device_id, &device->broadcast_addr, &device->broadcast_data))){
+		rc = nil_get_broadcast_addr_req(device->phone, device_id,
+		    &device->broadcast_addr, &device->broadcast_data);
+		if (rc != EOK) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			free(device->addr);
@@ -322,7 +329,10 @@
 			arp_protos_destroy(&device->protos);
 			free(device);
-			return ERROR_CODE;
-		}
-		if(ERROR_OCCURRED(arp_cache_add(&arp_globals.cache, device->device_id, device))){
+			return rc;
+		}
+		
+		rc = arp_cache_add(&arp_globals.cache, device->device_id,
+		    device);
+		if (rc != EOK) {
 			fibril_rwlock_write_unlock(&arp_globals.lock);
 			free(device->addr);
@@ -332,142 +342,80 @@
 			arp_protos_destroy(&device->protos);
 			free(device);
-			return ERROR_CODE;
-		}
-		printf("%s: Device registered (id: %d, type: 0x%x, service: %d, proto: %d)\n",
-		    NAME, device->device_id, device->hardware, device->service, protocol);
+			return rc;
+		}
+		printf("%s: Device registered (id: %d, type: 0x%x, service: %d,"
+		    " proto: %d)\n", NAME, device->device_id, device->hardware,
+		    device->service, protocol);
 	}
 	fibril_rwlock_write_unlock(&arp_globals.lock);
+	
 	return EOK;
 }
 
-int arp_device_req(int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address){
-	ERROR_DECLARE;
-
-	measured_string_ref tmp;
-
-	// copy the given address for exclusive use
-	tmp = measured_string_copy(address);
-	if(ERROR_OCCURRED(arp_device_message(device_id, netif, protocol, tmp))){
-		free(tmp->value);
-		free(tmp);
-	}
-	return ERROR_CODE;
-}
-
-int arp_initialize(async_client_conn_t client_connection){
-	ERROR_DECLARE;
+/** Initializes the ARP module.
+ *
+ *  @param[in] client_connection The client connection processing function.
+ *			The module skeleton propagates its own one.
+ *  @returns		EOK on success.
+ *  @returns		ENOMEM if there is not enough memory left.
+ */
+int arp_initialize(async_client_conn_t client_connection)
+{
+	int rc;
 
 	fibril_rwlock_initialize(&arp_globals.lock);
 	fibril_rwlock_write_lock(&arp_globals.lock);
 	arp_globals.client_connection = client_connection;
-	ERROR_PROPAGATE(arp_cache_initialize(&arp_globals.cache));
+	rc = arp_cache_initialize(&arp_globals.cache);
 	fibril_rwlock_write_unlock(&arp_globals.lock);
-	return EOK;
-}
-
-int arp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
-{
-	ERROR_DECLARE;
-	
-	measured_string_ref address;
-	measured_string_ref translation;
-	char * data;
-	packet_t packet;
-	packet_t next;
-	
-	*answer_count = 0;
-	switch (IPC_GET_METHOD(*call)) {
-		case IPC_M_PHONE_HUNGUP:
-			return EOK;
-		case NET_ARP_DEVICE:
-			ERROR_PROPAGATE(measured_strings_receive(&address, &data, 1));
-			if(ERROR_OCCURRED(arp_device_message(IPC_GET_DEVICE(call), IPC_GET_SERVICE(call), ARP_GET_NETIF(call), address))){
-				free(address);
-				free(data);
-			}
-			return ERROR_CODE;
-		case NET_ARP_TRANSLATE:
-			ERROR_PROPAGATE(measured_strings_receive(&address, &data, 1));
-			fibril_rwlock_read_lock(&arp_globals.lock);
-			translation = arp_translate_message(IPC_GET_DEVICE(call), IPC_GET_SERVICE(call), address);
-			free(address);
-			free(data);
-			if(! translation){
-				fibril_rwlock_read_unlock(&arp_globals.lock);
-				return ENOENT;
-			}
-			ERROR_CODE = measured_strings_reply(translation, 1);
-			fibril_rwlock_read_unlock(&arp_globals.lock);
-			return ERROR_CODE;
-		case NET_ARP_CLEAR_DEVICE:
-			return arp_clear_device_req(0, IPC_GET_DEVICE(call));
-		case NET_ARP_CLEAR_ADDRESS:
-			ERROR_PROPAGATE(measured_strings_receive(&address, &data, 1));
-			arp_clear_address_req(0, IPC_GET_DEVICE(call), IPC_GET_SERVICE(call), address);
-			free(address);
-			free(data);
-			return EOK;
-		case NET_ARP_CLEAN_CACHE:
-			return arp_clean_cache_req(0);
-		case NET_IL_DEVICE_STATE:
-			// do nothing - keep the cache
-			return EOK;
-		case NET_IL_RECEIVED:
-			if(! ERROR_OCCURRED(packet_translate_remote(arp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){
-				fibril_rwlock_read_lock(&arp_globals.lock);
-				do{
-					next = pq_detach(packet);
-					ERROR_CODE = arp_receive_message(IPC_GET_DEVICE(call), packet);
-					if(ERROR_CODE != 1){
-						pq_release_remote(arp_globals.net_phone, packet_get_id(packet));
-					}
-					packet = next;
-				}while(packet);
-				fibril_rwlock_read_unlock(&arp_globals.lock);
-			}
-			return ERROR_CODE;
-		case NET_IL_MTU_CHANGED:
-			return arp_mtu_changed_message(IPC_GET_DEVICE(call), IPC_GET_MTU(call));
-	}
-	
-	return ENOTSUP;
-}
-
-int arp_mtu_changed_message(device_id_t device_id, size_t mtu){
+	
+	return rc;
+}
+
+/** Updates the device content length according to the new MTU value.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] mtu	The new mtu value.
+ * @returns		ENOENT if device is not found.
+ * @returns		EOK on success.
+ */
+static int arp_mtu_changed_message(device_id_t device_id, size_t mtu)
+{
 	arp_device_ref device;
 
 	fibril_rwlock_write_lock(&arp_globals.lock);
 	device = arp_cache_find(&arp_globals.cache, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_write_unlock(&arp_globals.lock);
 		return ENOENT;
 	}
 	device->packet_dimension.content = mtu;
+	fibril_rwlock_write_unlock(&arp_globals.lock);
 	printf("arp - device %d changed mtu to %d\n\n", device_id, mtu);
-	fibril_rwlock_write_unlock(&arp_globals.lock);
 	return EOK;
 }
 
-int arp_proto_create(arp_proto_ref * proto, services_t service, measured_string_ref address){
-	ERROR_DECLARE;
-
-	*proto = (arp_proto_ref) malloc(sizeof(arp_proto_t));
-	if(!(*proto)){
-		return ENOMEM;
-	}
-	(** proto).service = service;
-	(** proto).addr = address;
-	(** proto).addr_data = address->value;
-	if(ERROR_OCCURRED(arp_addr_initialize(&(** proto).addresses))){
-		free(*proto);
-		return ERROR_CODE;
-	}
-	return EOK;
-}
-
-int arp_receive_message(device_id_t device_id, packet_t packet){
-	ERROR_DECLARE;
-
+/** Processes the received ARP packet.
+ *
+ * Updates the source hardware address if the source entry exists or the packet
+ * is targeted to my protocol address.
+ * Responses to the ARP request if the packet is the ARP request and is
+ * targeted to my address.
+ *
+ * @param[in] device_id	The source device identifier.
+ * @param[in,out] packet The received packet.
+ * @returns		EOK on success and the packet is no longer needed.
+ * @returns		One on success and the packet has been reused.
+ * @returns		EINVAL if the packet is too small to carry an ARP
+ *			packet.
+ * @returns		EINVAL if the received address lengths differs from
+ *			the registered values.
+ * @returns		ENOENT if the device is not found in the cache.
+ * @returns		ENOENT if the protocol for the device is not found in
+ *			the cache.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+static int arp_receive_message(device_id_t device_id, packet_t packet)
+{
 	size_t length;
 	arp_header_ref header;
@@ -475,34 +423,40 @@
 	arp_proto_ref proto;
 	measured_string_ref hw_source;
-	uint8_t * src_hw;
-	uint8_t * src_proto;
-	uint8_t * des_hw;
-	uint8_t * des_proto;
+	uint8_t *src_hw;
+	uint8_t *src_proto;
+	uint8_t *des_hw;
+	uint8_t *des_proto;
+	int rc;
 
 	length = packet_get_data_length(packet);
-	if(length <= sizeof(arp_header_t)){
+	if (length <= sizeof(arp_header_t))
 		return EINVAL;
-	}
+
 	device = arp_cache_find(&arp_globals.cache, device_id);
-	if(! device){
+	if (!device)
 		return ENOENT;
-	}
+
 	header = (arp_header_ref) packet_get_data(packet);
-	if((ntohs(header->hardware) != device->hardware)
-		|| (length < sizeof(arp_header_t) + header->hardware_length * 2u + header->protocol_length * 2u)){
+	if ((ntohs(header->hardware) != device->hardware) ||
+	    (length < sizeof(arp_header_t) + header->hardware_length * 2U +
+	    header->protocol_length * 2U)) {
 		return EINVAL;
 	}
-	proto = arp_protos_find(&device->protos, protocol_unmap(device->service, ntohs(header->protocol)));
-	if(! proto){
+
+	proto = arp_protos_find(&device->protos,
+	    protocol_unmap(device->service, ntohs(header->protocol)));
+	if (!proto)
 		return ENOENT;
-	}
+
 	src_hw = ((uint8_t *) header) + sizeof(arp_header_t);
 	src_proto = src_hw + header->hardware_length;
 	des_hw = src_proto + header->protocol_length;
 	des_proto = des_hw + header->hardware_length;
-	hw_source = arp_addr_find(&proto->addresses, (char *) src_proto, CONVERT_SIZE(uint8_t, char, header->protocol_length));
+	hw_source = arp_addr_find(&proto->addresses, (char *) src_proto,
+	    CONVERT_SIZE(uint8_t, char, header->protocol_length));
 	// exists?
-	if(hw_source){
-		if(hw_source->length != CONVERT_SIZE(uint8_t, char, header->hardware_length)){
+	if (hw_source) {
+		if (hw_source->length != CONVERT_SIZE(uint8_t, char,
+		    header->hardware_length)) {
 			return EINVAL;
 		}
@@ -510,31 +464,68 @@
 	}
 	// is my protocol address?
-	if(proto->addr->length != CONVERT_SIZE(uint8_t, char, header->protocol_length)){
+	if (proto->addr->length != CONVERT_SIZE(uint8_t, char,
+	    header->protocol_length)) {
 		return EINVAL;
 	}
-	if(! str_lcmp(proto->addr->value, (char *) des_proto, proto->addr->length)){
+	if (!str_lcmp(proto->addr->value, (char *) des_proto,
+	    proto->addr->length)) {
 		// not already upadted?
-		if(! hw_source){
-			hw_source = measured_string_create_bulk((char *) src_hw, CONVERT_SIZE(uint8_t, char, header->hardware_length));
-			if(! hw_source){
+		if (!hw_source) {
+			hw_source = measured_string_create_bulk((char *) src_hw,
+			    CONVERT_SIZE(uint8_t, char,
+			    header->hardware_length));
+			if (!hw_source)
 				return ENOMEM;
-			}
-			ERROR_PROPAGATE(arp_addr_add(&proto->addresses, (char *) src_proto, CONVERT_SIZE(uint8_t, char, header->protocol_length), hw_source));
-		}
-		if(ntohs(header->operation) == ARPOP_REQUEST){
+
+			rc = arp_addr_add(&proto->addresses, (char *) src_proto,
+			    CONVERT_SIZE(uint8_t, char,
+			    header->protocol_length), hw_source);
+			if (rc != EOK)
+				return rc;
+		}
+		if (ntohs(header->operation) == ARPOP_REQUEST) {
 			header->operation = htons(ARPOP_REPLY);
 			memcpy(des_proto, src_proto, header->protocol_length);
-			memcpy(src_proto, proto->addr->value, header->protocol_length);
-			memcpy(src_hw, device->addr->value, device->packet_dimension.addr_len);
-			memcpy(des_hw, hw_source->value, header->hardware_length);
-			ERROR_PROPAGATE(packet_set_addr(packet, src_hw, des_hw, header->hardware_length));
-			nil_send_msg(device->phone, device_id, packet, SERVICE_ARP);
+			memcpy(src_proto, proto->addr->value,
+			    header->protocol_length);
+			memcpy(src_hw, device->addr->value,
+			    device->packet_dimension.addr_len);
+			memcpy(des_hw, hw_source->value,
+			    header->hardware_length);
+			
+			rc = packet_set_addr(packet, src_hw, des_hw,
+			    header->hardware_length);
+			if (rc != EOK)
+				return rc;
+			
+			nil_send_msg(device->phone, device_id, packet,
+			    SERVICE_ARP);
 			return 1;
 		}
 	}
+
 	return EOK;
 }
 
-measured_string_ref arp_translate_message(device_id_t device_id, services_t protocol, measured_string_ref target){
+
+/** Returns the hardware address for the given protocol address.
+ *
+ * Sends the ARP request packet if the hardware address is not found in the
+ * cache.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] protocol	The protocol service.
+ * @param[in] target	The target protocol address.
+ * @returns		The hardware address of the target.
+ * @returns		NULL if the target parameter is NULL.
+ * @returns		NULL if the device is not found.
+ * @returns		NULL if the device packet is too small to send a
+ *			request.
+ * @returns		NULL if the hardware address is not found in the cache.
+ */
+static measured_string_ref
+arp_translate_message(device_id_t device_id, services_t protocol,
+    measured_string_ref target)
+{
 	arp_device_ref device;
 	arp_proto_ref proto;
@@ -544,33 +535,37 @@
 	arp_header_ref header;
 
-	if(! target){
+	if (!target)
 		return NULL;
-	}
+
 	device = arp_cache_find(&arp_globals.cache, device_id);
-	if(! device){
+	if (!device)
 		return NULL;
-	}
+
 	proto = arp_protos_find(&device->protos, protocol);
-	if((! proto) || (proto->addr->length != target->length)){
+	if (!proto || (proto->addr->length != target->length))
 		return NULL;
-	}
+
 	addr = arp_addr_find(&proto->addresses, target->value, target->length);
-	if(addr){
+	if (addr)
 		return addr;
-	}
+
 	// ARP packet content size = header + (address + translation) * 2
-	length = 8 + (CONVERT_SIZE(char, uint8_t, proto->addr->length) + CONVERT_SIZE(char, uint8_t, device->addr->length)) * 2;
-	if(length > device->packet_dimension.content){
+	length = 8 + 2 * (CONVERT_SIZE(char, uint8_t, proto->addr->length) +
+	    CONVERT_SIZE(char, uint8_t, device->addr->length));
+	if (length > device->packet_dimension.content)
 		return NULL;
-	}
-	packet = packet_get_4_remote(arp_globals.net_phone, device->packet_dimension.addr_len, device->packet_dimension.prefix, length, device->packet_dimension.suffix);
-	if(! packet){
+
+	packet = packet_get_4_remote(arp_globals.net_phone,
+	    device->packet_dimension.addr_len, device->packet_dimension.prefix,
+	    length, device->packet_dimension.suffix);
+	if (!packet)
 		return NULL;
-	}
+
 	header = (arp_header_ref) packet_suffix(packet, length);
-	if(! header){
+	if (!header) {
 		pq_release_remote(arp_globals.net_phone, packet_get_id(packet));
 		return NULL;
 	}
+
 	header->hardware = htons(device->hardware);
 	header->hardware_length = (uint8_t) device->addr->length;
@@ -579,26 +574,141 @@
 	header->operation = htons(ARPOP_REQUEST);
 	length = sizeof(arp_header_t);
-	memcpy(((uint8_t *) header) + length, device->addr->value, device->addr->length);
+	memcpy(((uint8_t *) header) + length, device->addr->value,
+	    device->addr->length);
 	length += device->addr->length;
-	memcpy(((uint8_t *) header) + length, proto->addr->value, proto->addr->length);
+	memcpy(((uint8_t *) header) + length, proto->addr->value,
+	    proto->addr->length);
 	length += proto->addr->length;
 	bzero(((uint8_t *) header) + length, device->addr->length);
 	length += device->addr->length;
 	memcpy(((uint8_t *) header) + length, target->value, target->length);
-	if(packet_set_addr(packet, (uint8_t *) device->addr->value, (uint8_t *) device->broadcast_addr->value, CONVERT_SIZE(char, uint8_t, device->addr->length)) != EOK){
+
+	if (packet_set_addr(packet, (uint8_t *) device->addr->value,
+	    (uint8_t *) device->broadcast_addr->value,
+	    CONVERT_SIZE(char, uint8_t, device->addr->length)) != EOK) {
 		pq_release_remote(arp_globals.net_phone, packet_get_id(packet));
 		return NULL;
 	}
+
 	nil_send_msg(device->phone, device_id, packet, SERVICE_ARP);
 	return NULL;
 }
 
+
+/** Processes the ARP message.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if the message is not known.
+ *
+ * @see arp_interface.h
+ * @see IS_NET_ARP_MESSAGE()
+ */
+int
+arp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
+	measured_string_ref address;
+	measured_string_ref translation;
+	char *data;
+	packet_t packet;
+	packet_t next;
+	int rc;
+	
+	*answer_count = 0;
+	switch (IPC_GET_METHOD(*call)) {
+	case IPC_M_PHONE_HUNGUP:
+		return EOK;
+	
+	case NET_ARP_DEVICE:
+		rc = measured_strings_receive(&address, &data, 1);
+		if (rc != EOK)
+			return rc;
+		
+		rc = arp_device_message(IPC_GET_DEVICE(call),
+		    IPC_GET_SERVICE(call), ARP_GET_NETIF(call), address);
+		if (rc != EOK) {
+			free(address);
+			free(data);
+		}
+		return rc;
+	
+	case NET_ARP_TRANSLATE:
+		rc = measured_strings_receive(&address, &data, 1);
+		if (rc != EOK)
+			return rc;
+		
+		fibril_rwlock_read_lock(&arp_globals.lock);
+		translation = arp_translate_message(IPC_GET_DEVICE(call),
+		    IPC_GET_SERVICE(call), address);
+		free(address);
+		free(data);
+		if (!translation) {
+			fibril_rwlock_read_unlock(&arp_globals.lock);
+			return ENOENT;
+		}
+		rc = measured_strings_reply(translation, 1);
+		fibril_rwlock_read_unlock(&arp_globals.lock);
+		return rc;
+
+	case NET_ARP_CLEAR_DEVICE:
+		return arp_clear_device_req(0, IPC_GET_DEVICE(call));
+
+	case NET_ARP_CLEAR_ADDRESS:
+		rc = measured_strings_receive(&address, &data, 1);
+		if (rc != EOK)
+			return rc;
+		
+		arp_clear_address_req(0, IPC_GET_DEVICE(call),
+		    IPC_GET_SERVICE(call), address);
+		free(address);
+		free(data);
+		return EOK;
+	
+	case NET_ARP_CLEAN_CACHE:
+		return arp_clean_cache_req(0);
+	
+	case NET_IL_DEVICE_STATE:
+		// do nothing - keep the cache
+		return EOK;
+	
+	case NET_IL_RECEIVED:
+		rc = packet_translate_remote(arp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		
+		fibril_rwlock_read_lock(&arp_globals.lock);
+		do {
+			next = pq_detach(packet);
+			rc = arp_receive_message(IPC_GET_DEVICE(call), packet);
+			if (rc != 1) {
+				pq_release_remote(arp_globals.net_phone,
+				    packet_get_id(packet));
+			}
+			packet = next;
+		} while (packet);
+		fibril_rwlock_read_unlock(&arp_globals.lock);
+		
+		return EOK;
+	
+	case NET_IL_MTU_CHANGED:
+		return arp_mtu_changed_message(IPC_GET_DEVICE(call),
+		    IPC_GET_MTU(call));
+	}
+	
+	return ENOTSUP;
+}
+
 /** Default thread for new connections.
  *
- *  @param[in] iid The initial message identifier.
- *  @param[in] icall The initial message call structure.
- *
- */
-static void il_client_connection(ipc_callid_t iid, ipc_call_t * icall)
+ * @param[in] iid	The initial message identifier.
+ * @param[in] icall	The initial message call structure.
+ */
+static void il_client_connection(ipc_callid_t iid, ipc_call_t *icall)
 {
 	/*
@@ -608,5 +718,5 @@
 	ipc_answer_0(iid, EOK);
 	
-	while(true) {
+	while (true) {
 		ipc_call_t answer;
 		int answer_count;
@@ -623,6 +733,10 @@
 		    &answer_count);
 		
-		/* End if said to either by the message or the processing result */
-		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+		/*
+		 * End if told to either by the message or the processing
+		 * result.
+		 */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
+		    (res == EHANGUP))
 			return;
 		
@@ -634,22 +748,18 @@
 /** Starts the module.
  *
- *  @param argc The count of the command line arguments. Ignored parameter.
- *  @param argv The command line parameters. Ignored parameter.
- *
- *  @returns EOK on success.
- *  @returns Other error codes as defined for each specific module start function.
- *
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for each specific module
+ *			start function.
  */
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	if (ERROR_OCCURRED(il_module_start_standalone(il_client_connection)))
-		return ERROR_CODE;
-	
-	return EOK;
+	rc = il_module_start_standalone(il_client_connection);
+	return rc;
 }
 
 /** @}
  */
+
Index: uspace/srv/net/il/arp/arp.h
===================================================================
--- uspace/srv/net/il/arp/arp.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/arp/arp.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,13 +28,13 @@
 
 /** @addtogroup arp
- *  @{
+ * @{
  */
 
 /** @file
- *  ARP module.
+ * ARP module.
  */
 
-#ifndef __NET_ARP_H__
-#define __NET_ARP_H__
+#ifndef NET_ARP_H_
+#define NET_ARP_H_
 
 #include <fibril_synch.h>
@@ -44,4 +44,5 @@
 
 #include <net/device.h>
+#include <net/packet.h>
 #include <net_hardware.h>
 #include <adt/generic_char_map.h>
@@ -49,116 +50,105 @@
 #include <adt/measured_strings.h>
 
-
 /** Type definition of the ARP device specific data.
- *  @see arp_device
+ * @see arp_device
  */
-typedef struct arp_device	arp_device_t;
+typedef struct arp_device arp_device_t;
 
 /** Type definition of the ARP device specific data pointer.
- *  @see arp_device
+ * @see arp_device
  */
-typedef arp_device_t *		arp_device_ref;
+typedef arp_device_t *arp_device_ref;
 
 /** Type definition of the ARP global data.
- *  @see arp_globals
+ * @see arp_globals
  */
-typedef struct arp_globals	arp_globals_t;
+typedef struct arp_globals arp_globals_t;
 
 /** Type definition of the ARP protocol specific data.
- *  @see arp_proto
+ * @see arp_proto
  */
-typedef struct arp_proto	arp_proto_t;
+typedef struct arp_proto arp_proto_t;
 
 /** Type definition of the ARP protocol specific data pointer.
- *  @see arp_proto
+ * @see arp_proto
  */
-typedef arp_proto_t *		arp_proto_ref;
+typedef arp_proto_t *arp_proto_ref;
 
 /** ARP address map.
- *  Translates addresses.
- *  @see generic_char_map.h
+ *
+ * Translates addresses.
+ * @see generic_char_map.h
  */
-GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t)
+GENERIC_CHAR_MAP_DECLARE(arp_addr, measured_string_t);
 
 /** ARP address cache.
- *  Maps devices to the ARP device specific data.
- *  @see device.h
+ *
+ * Maps devices to the ARP device specific data.
+ * @see device.h
  */
-DEVICE_MAP_DECLARE(arp_cache, arp_device_t)
+DEVICE_MAP_DECLARE(arp_cache, arp_device_t);
 
 /** ARP protocol map.
- *  Maps protocol identifiers to the ARP protocol specific data.
- *  @see int_map.h
+ *
+ * Maps protocol identifiers to the ARP protocol specific data.
+ * @see int_map.h
  */
-INT_MAP_DECLARE(arp_protos, arp_proto_t)
+INT_MAP_DECLARE(arp_protos, arp_proto_t);
 
-/** ARP device specific data.
- */
-struct arp_device{
-	/** Actual device hardware address.
-	 */
+/** ARP device specific data. */
+struct arp_device {
+	/** Actual device hardware address. */
 	measured_string_ref addr;
-	/** Actual device hardware address data.
-	 */
-	char * addr_data;
-	/** Broadcast device hardware address.
-	 */
+	/** Actual device hardware address data. */
+	char *addr_data;
+	/** Broadcast device hardware address. */
 	measured_string_ref broadcast_addr;
-	/** Broadcast device hardware address data.
-	 */
-	char * broadcast_data;
-	/** Device identifier.
-	 */
+	/** Broadcast device hardware address data. */
+	char *broadcast_data;
+	/** Device identifier. */
 	device_id_t device_id;
-	/** Hardware type.
-	 */
+	/** Hardware type. */
 	hw_type_t hardware;
-	/** Packet dimension.
-	 */
+	/** Packet dimension. */
 	packet_dimension_t packet_dimension;
-	/** Device module phone.
-	 */
+	/** Device module phone. */
 	int phone;
-	/** Protocol map.
-	 *  Address map for each protocol.
+	
+	/**
+	 * Protocol map.
+	 * Address map for each protocol.
 	 */
 	arp_protos_t protos;
-	/** Device module service.
-	 */
+	
+	/** Device module service. */
 	services_t service;
 };
 
-/** ARP global data.
- */
-struct	arp_globals{
-	/** ARP address cache.
-	 */
+/** ARP global data. */
+struct arp_globals {
+	/** ARP address cache. */
 	arp_cache_t cache;
-	/** The client connection processing function.
-	 *  The module skeleton propagates its own one.
+	
+	/**
+	 * The client connection processing function.
+	 * The module skeleton propagates its own one.
 	 */
 	async_client_conn_t client_connection;
-	/** Networking module phone.
-	 */
+	
+	/** Networking module phone. */
 	int net_phone;
-	/** Safety lock.
-	 */
+	/** Safety lock. */
 	fibril_rwlock_t lock;
 };
 
-/** ARP protocol specific data.
- */
-struct arp_proto{
-	/** Actual device protocol address.
-	 */
+/** ARP protocol specific data. */
+struct arp_proto {
+	/** Actual device protocol address. */
 	measured_string_ref addr;
-	/** Actual device protocol address data.
-	 */
-	char * addr_data;
-	/** Address map.
-	 */
+	/** Actual device protocol address data. */
+	char *addr_data;
+	/** Address map. */
 	arp_addr_t addresses;
-	/** Protocol service.
-	 */
+	/** Protocol service. */
 	services_t service;
 };
Index: uspace/srv/net/il/arp/arp_header.h
===================================================================
--- uspace/srv/net/il/arp/arp_header.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/arp/arp_header.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -32,41 +32,41 @@
 
 /** @file
- *  ARP protocol header.
- *  Based on the RFC~826.
+ * ARP protocol header.
+ * Based on the RFC 826.
  */
 
-#ifndef __NET_ARP_HEADER_H__
-#define __NET_ARP_HEADER_H__
+#ifndef NET_ARP_HEADER_H_
+#define NET_ARP_HEADER_H_
 
 #include <sys/types.h>
 
 /** Type definition of an ARP protocol header.
- *  @see arp_header
+ * @see arp_header
  */
-typedef struct arp_header	arp_header_t;
+typedef struct arp_header arp_header_t;
 
 /** Type definition of an ARP protocol header pointer.
- *  @see arp_header
+ * @see arp_header
  */
-typedef arp_header_t *		arp_header_ref;
+typedef arp_header_t *arp_header_ref;
 
-/** ARP protocol header.
- */
-struct arp_header{
-	/** Hardware type identifier.
-	 *  @see hardware.h
+/** ARP protocol header. */
+struct arp_header {
+	/**
+	 * Hardware type identifier.
+	 * @see hardware.h
 	 */
 	uint16_t hardware;
-	/** Protocol identifier.
-	 */
+	
+	/** Protocol identifier. */
 	uint16_t protocol;
-	/** Hardware address length in bytes.
-	 */
+	/** Hardware address length in bytes. */
 	uint8_t hardware_length;
-	/** Protocol address length in bytes.
-	 */
+	/** Protocol address length in bytes. */
 	uint8_t protocol_length;
-	/** ARP packet type.
-	 *  @see arp_oc.h
+	
+	/**
+	 * ARP packet type.
+	 * @see arp_oc.h
 	 */
 	uint16_t operation;
Index: uspace/srv/net/il/arp/arp_module.c
===================================================================
--- uspace/srv/net/il/arp/arp_module.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/arp/arp_module.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -32,13 +32,14 @@
 
 /** @file
- *  ARP standalone module implementation.
- *  Contains skeleton module functions mapping.
- *  The functions are used by the module skeleton as module specific entry points.
- *  @see module.c
+ * ARP standalone module implementation.
+ * Contains skeleton module functions mapping.
+ * The functions are used by the module skeleton as module specific entry
+ * points.
+ * @see module.c
  */
 
 #include <async.h>
 #include <stdio.h>
-#include <err.h>
+#include <errno.h>
 
 #include <ipc/ipc.h>
@@ -53,45 +54,39 @@
 #include "arp_module.h"
 
-/** ARP module global data.
- */
-extern arp_globals_t	arp_globals;
+/** ARP module global data. */
+extern arp_globals_t arp_globals;
 
-/** Processes the ARP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the arp_message() function.
- */
-int il_module_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+int
+il_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	return arp_message_standalone(callid, call, answer, answer_count);
 }
 
-/** Starts the ARP module.
- *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on successful module termination.
- *  @returns Other error codes as defined for the arp_initialize() function.
- *  @returns Other error codes as defined for the REGISTER_ME() macro function.
- */
-int il_module_start_standalone(async_client_conn_t client_connection){
-	ERROR_DECLARE;
+int il_module_start_standalone(async_client_conn_t client_connection)
+{
+	ipcarg_t phonehash;
+	int rc;
 	
 	async_set_client_connection(client_connection);
 	arp_globals.net_phone = net_connect_module();
-	ERROR_PROPAGATE(pm_init());
 	
-	ipcarg_t phonehash;
-	if (ERROR_OCCURRED(arp_initialize(client_connection))
-	    || ERROR_OCCURRED(REGISTER_ME(SERVICE_ARP, &phonehash))) {
-		pm_destroy();
-		return ERROR_CODE;
-	}
+	rc = pm_init();
+	if (rc != EOK)
+		return rc;
+	
+	rc = arp_initialize(client_connection);
+	if (rc != EOK)
+		goto out;
+	
+	rc = REGISTER_ME(SERVICE_ARP, &phonehash);
+	if (rc != EOK)
+		goto out;
 	
 	async_manager();
-	
+
+out:
 	pm_destroy();
-	return EOK;
+	return rc;
 }
 
Index: uspace/srv/net/il/arp/arp_module.h
===================================================================
--- uspace/srv/net/il/arp/arp_module.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/arp/arp_module.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,35 +28,21 @@
 
 /** @addtogroup arp
- *  @{
+ * @{
  */
 
 /** @file
- *  ARP module functions.
- *  The functions are used as ARP module entry points.
+ * ARP module functions.
+ * The functions are used as ARP module entry points.
  */
 
-#ifndef __NET_ARP_MODULE_H__
-#define __NET_ARP_MODULE_H__
+#ifndef NET_ARP_MODULE_H_
+#define NET_ARP_MODULE_H_
 
 #include <ipc/ipc.h>
+#include <async.h>
 
-/** Initializes the ARP module.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on success.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int arp_initialize(async_client_conn_t client_connection);
-
-/** Processes the ARP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns ENOTSUP if the message is not known.
- *  @see arp_interface.h
- *  @see IS_NET_ARP_MESSAGE()
- */
-int arp_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
+extern int arp_initialize(async_client_conn_t);
+extern int arp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
+    int *);
 
 #endif
Index: uspace/srv/net/il/arp/arp_oc.h
===================================================================
--- uspace/srv/net/il/arp/arp_oc.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/arp/arp_oc.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -32,105 +32,21 @@
 
 /** @file
- *  ARP operation codes 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.
+ * ARP operation codes 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 __NET_ARP_ARPOP_H__
-#define __NET_ARP_ARPOP_H__
+#ifndef NET_ARP_ARPOP_H_
+#define NET_ARP_ARPOP_H_
 
-/** @name ARP operation codes definitions
- */
+/** @name ARP operation codes definitions */
 /*@{*/
 
-/** REQUEST operation code.
- */
-#define ARPOP_REQUEST					1
+/** REQUEST operation code. */
+#define ARPOP_REQUEST	1
 
-/** REPLY operation code.
- */
-#define ARPOP_REPLY						2
-
-/** Reverse request operation code.
- */
-#define ARPOP_RREQUEST					3
-
-/** Reverse reply operation code.
- */
-#define ARPOP_RREPLY					4
-
-/** DRARP-Request operation code.
- */
-#define ARPOP_DRARP_Request				5
-
-/** DRARP-Reply operation code.
- */
-#define ARPOP_DRARP_Reply				6
-
-/** DRARP-Error operation code.
- */
-#define ARPOP_DRARP_Error				7
-
-/** InARP-Request operation code.
- */
-#define ARPOP_InREQUEST					8
-
-/** InARP-Reply operation code.
- */
-#define ARPOP_InREPLY					9
-
-/** ARP-NAK operation code.
- */
-#define ARPOP_NAK						10
-
-/** MARS-Request operation code.
- */
-#define ARPOP_MARS_Request				11
-
-/** MARS-Multi operation code.
- */
-#define ARPOP_MARS_Multi				12
-
-/** MARS-MServ operation code.
- */
-#define ARPOP_MARS_MServ				13
-
-/** MARS-Join operation code.
- */
-#define ARPOP_MARS_Join					14
-
-/** MARS-Leave operation code.
- */
-#define ARPOP_MARS_Leave				15
-
-/** MARS-NAK operation code.
- */
-#define ARPOP_MARS_NAK					16
-
-/** MARS-Unserv operation code.
- */
-#define ARPOP_MARS_Unserv				17
-
-/** MARS-SJoin operation code.
- */
-#define ARPOP_MARS_SJoin				18
-
-/** MARS-SLeave operation code.
- */
-#define ARPOP_MARS_SLeave				19
-
-/** MARS-Grouplist-Request operation code.
- */
-#define ARPOP_MARS_Grouplist_Request	20
-
-/** MARS-Grouplist-Reply operation code.
- */
-#define ARPOP_MARS_Grouplist_Reply		21
-
-/** MARS-Redirect-Map operation code.
- */
-#define ARPOP_MARS_Redirect_Map			22
-
-/** MAPOS-UNARP operation code.
- */
-#define ARPOP_MAPOS_UNARP				23
+/** REPLY operation code. */
+#define ARPOP_REPLY	2
 
 /*@}*/
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/ip/ip.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,15 +28,17 @@
 
 /** @addtogroup ip
- *  @{
+ * @{
  */
 
 /** @file
- *  IP module implementation.
- *  @see arp.h
- */
+ * IP module implementation.
+ * @see arp.h
+ */
+
+#include "ip.h"
+#include "ip_module.h"
 
 #include <async.h>
 #include <errno.h>
-#include <err.h>
 #include <fibril_synch.h>
 #include <stdio.h>
@@ -51,4 +53,8 @@
 #include <byteorder.h>
 
+#include <adt/measured_strings.h>
+#include <adt/module_map.h>
+
+#include <packet_client.h>
 #include <net/socket_codes.h>
 #include <net/in.h>
@@ -67,346 +73,185 @@
 #include <ip_client.h>
 #include <ip_interface.h>
+#include <ip_header.h>
 #include <net_interface.h>
 #include <nil_interface.h>
 #include <tl_interface.h>
-#include <adt/measured_strings.h>
-#include <adt/module_map.h>
-#include <packet_client.h>
 #include <packet_remote.h>
 #include <il_local.h>
 
-#include "ip.h"
-#include "ip_header.h"
-#include "ip_module.h"
-#include "ip_local.h"
-
-/** IP module name.
- */
-#define NAME  "ip"
-
-/** IP version 4.
- */
-#define IPV4				4
-
-/** Default network interface IP version.
- */
+/** IP module name. */
+#define NAME			"ip"
+
+/** IP version 4. */
+#define IPV4			4
+
+/** Default network interface IP version. */
 #define NET_DEFAULT_IPV		IPV4
 
-/** Default network interface IP routing.
- */
+/** Default network interface IP routing. */
 #define NET_DEFAULT_IP_ROUTING	false
 
-/** Minimum IP packet content.
- */
-#define IP_MIN_CONTENT	576
-
-/** ARP module name.
- */
-#define ARP_NAME				"arp"
-
-/** ARP module filename.
- */
-#define ARP_FILENAME			"/srv/arp"
-
-/** IP packet address length.
- */
-#define IP_ADDR							sizeof(struct sockaddr_in6)
-
-/** IP packet prefix length.
- */
-#define IP_PREFIX						sizeof(ip_header_t)
-
-/** IP packet suffix length.
- */
-#define IP_SUFFIX						0
-
-/** IP packet maximum content length.
- */
-#define IP_MAX_CONTENT					65535
-
-/** The IP localhost address.
- */
+/** Minimum IP packet content. */
+#define IP_MIN_CONTENT		576
+
+/** ARP module name. */
+#define ARP_NAME		"arp"
+
+/** ARP module filename. */
+#define ARP_FILENAME		"/srv/arp"
+
+/** IP packet address length. */
+#define IP_ADDR			sizeof(struct sockaddr_in6)
+
+/** IP packet prefix length. */
+#define IP_PREFIX		sizeof(ip_header_t)
+
+/** IP packet suffix length. */
+#define IP_SUFFIX		0
+
+/** IP packet maximum content length. */
+#define IP_MAX_CONTENT		65535
+
+/** The IP localhost address. */
 #define IPV4_LOCALHOST_ADDRESS	htonl((127 << 24) + 1)
 
-/** IP global data.
- */
-ip_globals_t	ip_globals;
-
-DEVICE_MAP_IMPLEMENT(ip_netifs, ip_netif_t)
-
-INT_MAP_IMPLEMENT(ip_protos, ip_proto_t)
-
-GENERIC_FIELD_IMPLEMENT(ip_routes, ip_route_t)
-
-/** Updates the device content length according to the new MTU value.
- *  @param[in] device_id The device identifier.
- *  @param[in] mtu The new mtu value.
- *  @returns EOK on success.
- *  @returns ENOENT if device is not found.
- */
-int ip_mtu_changed_message(device_id_t device_id, size_t mtu);
-
-/** Updates the device state.
- *  @param[in] device_id The device identifier.
- *  @param[in] state The new state value.
- *  @returns EOK on success.
- *  @returns ENOENT if device is not found.
- */
-int ip_device_state_message(device_id_t device_id, device_state_t state);
-
-/** Returns the device packet dimensions for sending.
- *  @param[in] phone The service module phone.
- *  @param[in] message The service specific message.
- *  @param[in] device_id The device identifier.
- *  @param[out] addr_len The minimum reserved address length.
- *  @param[out] prefix The minimum reserved prefix size.
- *  @param[out] content The maximum content size.
- *  @param[out] suffix The minimum reserved suffix size.
- *  @returns EOK on success.
- */
-int ip_packet_size_message(device_id_t device_id, size_t * addr_len, size_t * prefix, size_t * content, size_t * suffix);
-
-/** Registers the transport layer protocol.
- *  The traffic of this protocol will be supplied using either the receive function or IPC message.
- *  @param[in] protocol The transport layer module protocol.
- *  @param[in] service The transport layer module service.
- *  @param[in] phone The transport layer module phone.
- *  @param[in] tl_received_msg The receiving function.
- *  @returns EOK on success.
- *  @returns EINVAL if the protocol parameter and/or the service parameter is zero (0).
- *  @returns EINVAL if the phone parameter is not a positive number and the tl_receive_msg is NULL.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int ip_register(int protocol, services_t service, int phone, tl_received_msg_t tl_received_msg);
-
-/** Initializes a new network interface specific data.
- *  Connects to the network interface layer module, reads the netif configuration, starts an ARP module if needed and sets the netif routing table.
- *  The device identifier and the nil service has to be set.
- *  @param[in,out] ip_netif Network interface specific data.
- *  @returns EOK on success.
- *  @returns ENOTSUP if DHCP is configured.
- *  @returns ENOTSUP if IPv6 is configured.
- *  @returns EINVAL if any of the addresses is invalid.
- *  @returns EINVAL if the used ARP module is not known.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns Other error codes as defined for the net_get_device_conf_req() function.
- *  @returns Other error codes as defined for the bind_service() function.
- *  @returns Other error codes as defined for the specific arp_device_req() function.
- *  @returns Other error codes as defined for the nil_packet_size_req() function.
- */
-int ip_netif_initialize(ip_netif_ref ip_netif);
-
-/** Sends the packet or the packet queue via the specified route.
- *  The ICMP_HOST_UNREACH error notification may be sent if route hardware destination address is found.
- *  @param[in,out] packet The packet to be sent.
- *  @param[in] netif The target network interface.
- *  @param[in] route The target route.
- *  @param[in] src The source address.
- *  @param[in] dest The destination address.
- *  @param[in] error The error module service.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the arp_translate_req() function.
- *  @returns Other error codes as defined for the ip_prepare_packet() function.
- */
-int ip_send_route(packet_t packet, ip_netif_ref netif, ip_route_ref route, in_addr_t * src, in_addr_t dest, services_t error);
-
-/** Prepares the outgoing packet or the packet queue.
- *  The packet queue is a fragmented packet
- *  Updates the first packet's IP header.
- *  Prefixes the additional packets with fragment headers.
- *  @param[in] source The source address.
- *  @param[in] dest The destination address.
- *  @param[in,out] packet The packet to be sent.
- *  @param[in] destination The destination hardware address.
- *  @returns EOK on success.
- *  @returns EINVAL if the packet is too small to contain the IP header.
- *  @returns EINVAL if the packet is too long than the IP allows.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns Other error codes as defined for the packet_set_addr() function.
- */
-int ip_prepare_packet(in_addr_t * source, in_addr_t dest, packet_t packet, measured_string_ref destination);
-
-/** Checks the packet queue lengths and fragments the packets if needed.
- *  The ICMP_FRAG_NEEDED error notification may be sent if the packet needs to be fragmented and the fragmentation is not allowed.
- *  @param[in,out] packet The packet or the packet queue to be checked.
- *  @param[in] prefix The minimum prefix size.
- *  @param[in] content The maximum content size.
- *  @param[in] suffix The minimum suffix size.
- *  @param[in] addr_len The minimum address length.
- *  @param[in] error The error module service.
- *  @returns The packet or the packet queue of the allowed length.
- *  @returns NULL if there are no packets left.
- */
-packet_t ip_split_packet(packet_t packet, size_t prefix, size_t content, size_t suffix, socklen_t addr_len, services_t error);
-
-/** Checks the packet length and fragments it if needed.
- *  The new fragments are queued before the original packet.
- *  @param[in,out] packet The packet to be checked.
- *  @param[in] length The maximum packet length.
- *  @param[in] prefix The minimum prefix size.
- *  @param[in] suffix The minimum suffix size.
- *  @param[in] addr_len The minimum address length.
- *  @returns EOK on success.
- *  @returns EINVAL if the packet_get_addr() function fails.
- *  @returns EINVAL if the packet does not contain the IP header.
- *  @returns EPERM if the packet needs to be fragmented and the fragmentation is not allowed.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns ENOMEM if there is no packet available.
- *  @returns ENOMEM if the packet is too small to contain the IP header.
- *  @returns Other error codes as defined for the packet_trim() function.
- *  @returns Other error codes as defined for the ip_create_middle_header() function.
- *  @returns Other error codes as defined for the ip_fragment_packet_data() function.
- */
-int ip_fragment_packet(packet_t packet, size_t length, size_t prefix, size_t suffix, socklen_t addr_len);
-
-/** Fragments the packet from the end.
- *  @param[in] packet The packet to be fragmented.
- *  @param[in,out] new_packet The new packet fragment.
- *  @param[in,out] header The original packet header.
- *  @param[in,out] new_header The new packet fragment header.
- *  @param[in] length The new fragment length.
- *  @param[in] src The source address.
- *  @param[in] dest The destiantion address.
- *  @param[in] addrlen The address length.
- *  @returns EOK on success.
- *  @returns ENOMEM if the target packet is too small.
- *  @returns Other error codes as defined for the packet_set_addr() function.
- *  @returns Other error codes as defined for the pq_insert_after() function.
- */
-int ip_fragment_packet_data(packet_t packet, packet_t new_packet, ip_header_ref header, ip_header_ref new_header, size_t length, const struct sockaddr * src, const struct sockaddr * dest, socklen_t addrlen);
-
-/** Prefixes a middle fragment header based on the last fragment header to the packet.
- *  @param[in] packet The packet to be prefixed.
- *  @param[in] last The last header to be copied.
- *  @returns The prefixed middle header.
- *  @returns NULL on error.
- */
-ip_header_ref ip_create_middle_header(packet_t packet, ip_header_ref last);
-
-/** Copies the fragment header.
- *  Copies only the header itself and relevant IP options.
- *  @param[out] last The created header.
- *  @param[in] first The original header to be copied.
- */
-void ip_create_last_header(ip_header_ref last, ip_header_ref first);
-
-/** Returns the network interface's IP address.
- *  @param[in] netif The network interface.
- *  @returns The IP address.
- *  @returns NULL if no IP address was found.
- */
-in_addr_t * ip_netif_address(ip_netif_ref netif);
-
-/** Searches all network interfaces if there is a suitable route.
- *  @param[in] destination The destination address.
- *  @returns The found route.
- *  @returns NULL if no route was found.
- */
-ip_route_ref ip_find_route(in_addr_t destination);
-
-/** Searches the network interfaces if there is a suitable route.
- *  @param[in] netif The network interface to be searched for routes. May be NULL.
- *  @param[in] destination The destination address.
- *  @returns The found route.
- *  @returns NULL if no route was found.
- */
-ip_route_ref ip_netif_find_route(ip_netif_ref netif, in_addr_t destination);
-
-/** Processes the received IP packet or the packet queue one by one.
- *  The packet is either passed to another module or released on error.
- *  @param[in] device_id The source device identifier.
- *  @param[in,out] packet The received packet.
- *  @returns EOK on success and the packet is no longer needed.
- *  @returns EINVAL if the packet is too small to carry the IP packet.
- *  @returns EINVAL if the received address lengths differs from the registered values.
- *  @returns ENOENT if the device is not found in the cache.
- *  @returns ENOENT if the protocol for the device is not found in the cache.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int ip_receive_message(device_id_t device_id, packet_t packet);
-
-/** Processes the received packet.
- *  The packet is either passed to another module or released on error.
- *  The ICMP_PARAM_POINTER error notification may be sent if the checksum is invalid.
- *  The ICMP_EXC_TTL error notification may be sent if the TTL is less than two (2).
- *  The ICMP_HOST_UNREACH error notification may be sent if no route was found.
- *  The ICMP_HOST_UNREACH error notification may be sent if the packet is for another host and the routing is disabled.
- *  @param[in] device_id The source device identifier.
- *  @param[in] packet The received packet to be processed.
- *  @returns EOK on success.
- *  @returns EINVAL if the TTL is less than two (2).
- *  @returns EINVAL if the checksum is invalid.
- *  @returns EAFNOSUPPORT if the address family is not supported.
- *  @returns ENOENT if no route was found.
- *  @returns ENOENT if the packet is for another host and the routing is disabled.
- */
-int ip_process_packet(device_id_t device_id, packet_t packet);
-
-/** Returns the packet destination address from the IP header.
- *  @param[in] header The packet IP header to be read.
- *  @returns The packet destination address.
- */
-in_addr_t ip_get_destination(ip_header_ref header);
-
-/** Delivers the packet to the local host.
- *  The packet is either passed to another module or released on error.
- *  The ICMP_PROT_UNREACH error notification may be sent if the protocol is not found.
- *  @param[in] device_id The source device identifier.
- *  @param[in] packet The packet to be delivered.
- *  @param[in] header The first packet IP header. May be NULL.
- *  @param[in] error The packet error service.
- *  @returns EOK on success.
- *  @returns ENOTSUP if the packet is a fragment.
- *  @returns EAFNOSUPPORT if the address family is not supported.
- *  @returns ENOENT if the target protocol is not found.
- *  @returns Other error codes as defined for the packet_set_addr() function.
- *  @returns Other error codes as defined for the packet_trim() function.
- *  @returns Other error codes as defined for the protocol specific tl_received_msg function.
- */
-int ip_deliver_local(device_id_t device_id, packet_t packet, ip_header_ref header, services_t error);
+/** IP global data. */
+ip_globals_t ip_globals;
+
+DEVICE_MAP_IMPLEMENT(ip_netifs, ip_netif_t);
+INT_MAP_IMPLEMENT(ip_protos, ip_proto_t);
+GENERIC_FIELD_IMPLEMENT(ip_routes, ip_route_t);
+
+/** Releases the packet and returns the result.
+ *
+ * @param[in] packet	The packet queue to be released.
+ * @param[in] result	The result to be returned.
+ * @return		The result parameter.
+ */
+static int ip_release_and_return(packet_t packet, int result)
+{
+	pq_release_remote(ip_globals.net_phone, packet_get_id(packet));
+	return result;
+}
+
+/** Returns the ICMP phone.
+ *
+ * Searches the registered protocols.
+ *
+ * @returns		The found ICMP phone.
+ * @returns		ENOENT if the ICMP is not registered.
+ */
+static int ip_get_icmp_phone(void)
+{
+	ip_proto_ref proto;
+	int phone;
+
+	fibril_rwlock_read_lock(&ip_globals.protos_lock);
+	proto = ip_protos_find(&ip_globals.protos, IPPROTO_ICMP);
+	phone = proto ? proto->phone : ENOENT;
+	fibril_rwlock_read_unlock(&ip_globals.protos_lock);
+	return phone;
+}
 
 /** Prepares the ICMP notification packet.
- *  Releases additional packets and keeps only the first one.
- *  All packets is released on error.
- *  @param[in] error The packet error service.
- *  @param[in] packet The packet or the packet queue to be reported as faulty.
- *  @param[in] header The first packet IP header. May be NULL.
- *  @returns The found ICMP phone.
- *  @returns EINVAL if the error parameter is set.
- *  @returns EINVAL if the ICMP phone is not found.
- *  @returns EINVAL if the ip_prepare_icmp() fails.
- */
-int ip_prepare_icmp_and_get_phone(services_t error, packet_t packet, ip_header_ref header);
-
-/** Returns the ICMP phone.
- *  Searches the registered protocols.
- *  @returns The found ICMP phone.
- *  @returns ENOENT if the ICMP is not registered.
- */
-int ip_get_icmp_phone(void);
+ *
+ * Releases additional packets and keeps only the first one.
+ *
+ * @param[in] packet	The packet or the packet queue to be reported as faulty.
+ * @param[in] header	The first packet IP header. May be NULL.
+ * @returns		EOK on success.
+ * @returns		EINVAL if there are no data in the packet.
+ * @returns		EINVAL if the packet is a fragment.
+ * @returns		ENOMEM if the packet is too short to contain the IP
+ *			header.
+ * @returns		EAFNOSUPPORT if the address family is not supported.
+ * @returns		EPERM if the protocol is not allowed to send ICMP
+ *			notifications. The ICMP protocol itself.
+ * @returns		Other error codes as defined for the packet_set_addr().
+ */
+static int ip_prepare_icmp(packet_t packet, ip_header_ref header)
+{
+	packet_t next;
+	struct sockaddr *dest;
+	struct sockaddr_in dest_in;
+	socklen_t addrlen;
+
+	// detach the first packet and release the others
+	next = pq_detach(packet);
+	if (next)
+		pq_release_remote(ip_globals.net_phone, packet_get_id(next));
+
+	if (!header) {
+		if (packet_get_data_length(packet) <= sizeof(ip_header_t))
+			return ENOMEM;
+
+		// get header
+		header = (ip_header_ref) packet_get_data(packet);
+		if (!header)
+			return EINVAL;
+
+	}
+
+	// only for the first fragment
+	if (IP_FRAGMENT_OFFSET(header))
+		return EINVAL;
+
+	// not for the ICMP protocol
+	if (header->protocol == IPPROTO_ICMP)
+		return EPERM;
+
+	// set the destination address
+	switch (header->version) {
+	case IPVERSION:
+		addrlen = sizeof(dest_in);
+		bzero(&dest_in, addrlen);
+		dest_in.sin_family = AF_INET;
+		memcpy(&dest_in.sin_addr.s_addr, &header->source_address,
+		    sizeof(header->source_address));
+		dest = (struct sockaddr *) &dest_in;
+		break;
+
+	default:
+		return EAFNOSUPPORT;
+	}
+
+	return packet_set_addr(packet, NULL, (uint8_t *) dest, addrlen);
+}
 
 /** Prepares the ICMP notification packet.
- *  Releases additional packets and keeps only the first one.
- *  @param[in] packet The packet or the packet queue to be reported as faulty.
- *  @param[in] header The first packet IP header. May be NULL.
- *  @returns EOK on success.
- *  @returns EINVAL if there are no data in the packet.
- *  @returns EINVAL if the packet is a fragment.
- *  @returns ENOMEM if the packet is too short to contain the IP header.
- *  @returns EAFNOSUPPORT if the address family is not supported.
- *  @returns EPERM if the protocol is not allowed to send ICMP notifications. The ICMP protocol itself.
- *  @returns Other error codes as defined for the packet_set_addr().
- */
-int ip_prepare_icmp(packet_t packet, ip_header_ref header);
-
-/** Releases the packet and returns the result.
- *  @param[in] packet The packet queue to be released.
- *  @param[in] result The result to be returned.
- *  @return The result parameter.
- */
-int ip_release_and_return(packet_t packet, int result);
-
-int ip_initialize(async_client_conn_t client_connection){
-	ERROR_DECLARE;
+ *
+ * Releases additional packets and keeps only the first one.
+ * All packets are released on error.
+ *
+ * @param[in] error	The packet error service.
+ * @param[in] packet	The packet or the packet queue to be reported as faulty.
+ * @param[in] header	The first packet IP header. May be NULL.
+ * @returns		The found ICMP phone.
+ * @returns		EINVAL if the error parameter is set.
+ * @returns		EINVAL if the ICMP phone is not found.
+ * @returns		EINVAL if the ip_prepare_icmp() fails.
+ */
+static int
+ip_prepare_icmp_and_get_phone(services_t error, packet_t packet,
+    ip_header_ref header)
+{
+	int phone;
+
+	phone = ip_get_icmp_phone();
+	if (error || (phone < 0) || ip_prepare_icmp(packet, header))
+		return ip_release_and_return(packet, EINVAL);
+	return phone;
+}
+
+/** Initializes the IP module.
+ *
+ * @param[in] client_connection The client connection processing function. The
+ *			module skeleton propagates its own one.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int ip_initialize(async_client_conn_t client_connection)
+{
+	int rc;
 
 	fibril_rwlock_initialize(&ip_globals.lock);
@@ -419,81 +264,92 @@
 	ip_globals.gateway.gateway.s_addr = 0;
 	ip_globals.gateway.netif = NULL;
-	ERROR_PROPAGATE(ip_netifs_initialize(&ip_globals.netifs));
-	ERROR_PROPAGATE(ip_protos_initialize(&ip_globals.protos));
 	ip_globals.client_connection = client_connection;
-	ERROR_PROPAGATE(modules_initialize(&ip_globals.modules));
-	ERROR_PROPAGATE(add_module(NULL, &ip_globals.modules, ARP_NAME, ARP_FILENAME, SERVICE_ARP, 0, arp_connect_module));
+	
+	rc = ip_netifs_initialize(&ip_globals.netifs);
+	if (rc != EOK)
+		goto out;
+	rc = ip_protos_initialize(&ip_globals.protos);
+	if (rc != EOK)
+		goto out;
+	rc = modules_initialize(&ip_globals.modules);
+	if (rc != EOK)
+		goto out;
+	rc = add_module(NULL, &ip_globals.modules, ARP_NAME, ARP_FILENAME,
+	    SERVICE_ARP, 0, arp_connect_module);
+
+out:
 	fibril_rwlock_write_unlock(&ip_globals.lock);
-	return EOK;
-}
-
-int ip_device_req_local(int il_phone, device_id_t device_id, services_t netif){
-	ERROR_DECLARE;
-
-	ip_netif_ref ip_netif;
-	ip_route_ref route;
-	int index;
-
-	ip_netif = (ip_netif_ref) malloc(sizeof(ip_netif_t));
-	if(! ip_netif){
-		return ENOMEM;
-	}
-	if(ERROR_OCCURRED(ip_routes_initialize(&ip_netif->routes))){
-		free(ip_netif);
-		return ERROR_CODE;
-	}
-	ip_netif->device_id = device_id;
-	ip_netif->service = netif;
-	ip_netif->state = NETIF_STOPPED;
-	fibril_rwlock_write_lock(&ip_globals.netifs_lock);
-	if(ERROR_OCCURRED(ip_netif_initialize(ip_netif))){
-		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
-		ip_routes_destroy(&ip_netif->routes);
-		free(ip_netif);
-		return ERROR_CODE;
-	}
-	if(ip_netif->arp){
-		++ ip_netif->arp->usage;
-	}
-	// print the settings
-	printf("%s: Device registered (id: %d, phone: %d, ipv: %d, conf: %s)\n",
-	    NAME, ip_netif->device_id, ip_netif->phone, ip_netif->ipv,
-	    ip_netif->dhcp ? "dhcp" : "static");
-	
-	// TODO ipv6 addresses
-	
-	char address[INET_ADDRSTRLEN];
-	char netmask[INET_ADDRSTRLEN];
-	char gateway[INET_ADDRSTRLEN];
-	
-	for (index = 0; index < ip_routes_count(&ip_netif->routes); ++ index){
-		route = ip_routes_get_index(&ip_netif->routes, index);
-		if (route) {
-			inet_ntop(AF_INET, (uint8_t *) &route->address.s_addr, address, INET_ADDRSTRLEN);
-			inet_ntop(AF_INET, (uint8_t *) &route->netmask.s_addr, netmask, INET_ADDRSTRLEN);
-			inet_ntop(AF_INET, (uint8_t *) &route->gateway.s_addr, gateway, INET_ADDRSTRLEN);
-			printf("%s: Route %d (address: %s, netmask: %s, gateway: %s)\n",
-			    NAME, index, address, netmask, gateway);
-		}
-	}
-	
-	inet_ntop(AF_INET, (uint8_t *) &ip_netif->broadcast.s_addr, address, INET_ADDRSTRLEN);
-	printf("%s: Broadcast (%s)\n", NAME, address);
-	
-	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
-	return EOK;
-}
-
-int ip_netif_initialize(ip_netif_ref ip_netif){
-	ERROR_DECLARE;
-
-	measured_string_t names[] = {{str_dup("IPV"), 3}, {str_dup("IP_CONFIG"), 9}, {str_dup("IP_ADDR"), 7}, {str_dup("IP_NETMASK"), 10}, {str_dup("IP_GATEWAY"), 10}, {str_dup("IP_BROADCAST"), 12}, {str_dup("ARP"), 3}, {str_dup("IP_ROUTING"), 10}};
+
+	return rc;
+}
+
+/** Initializes a new network interface specific data.
+ *
+ * Connects to the network interface layer module, reads the netif
+ * configuration, starts an ARP module if needed and sets the netif routing
+ * table.
+ * 
+ * The device identifier and the nil service has to be set.
+ *
+ * @param[in,out] ip_netif Network interface specific data.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if DHCP is configured.
+ * @returns		ENOTSUP if IPv6 is configured.
+ * @returns		EINVAL if any of the addresses is invalid.
+ * @returns		EINVAL if the used ARP module is not known.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the
+ *			net_get_device_conf_req() function.
+ * @returns		Other error codes as defined for the bind_service()
+ *			function.
+ * @returns		Other error codes as defined for the specific
+ *			arp_device_req() function.
+ * @returns		Other error codes as defined for the
+ *			nil_packet_size_req() function.
+ */
+static int ip_netif_initialize(ip_netif_ref ip_netif)
+{
+	measured_string_t names[] = {
+		{
+			(char *) "IPV",
+			3
+		},
+		{
+			(char *) "IP_CONFIG",
+			9
+		},
+		{
+			(char *) "IP_ADDR",
+			7
+		},
+		{
+			(char *) "IP_NETMASK",
+			10
+		},
+		{
+			(char *) "IP_GATEWAY",
+			10
+		},
+		{
+			(char *) "IP_BROADCAST",
+			12
+		},
+		{
+			(char *) "ARP",
+			3
+		},
+		{
+			(char *) "IP_ROUTING",
+			10
+		}
+	};
 	measured_string_ref configuration;
 	size_t count = sizeof(names) / sizeof(measured_string_t);
-	char * data;
+	char *data;
 	measured_string_t address;
-	int index;
 	ip_route_ref route;
 	in_addr_t gateway;
+	int index;
+	int rc;
 
 	ip_netif->arp = NULL;
@@ -503,18 +359,25 @@
 	ip_netif->routing = NET_DEFAULT_IP_ROUTING;
 	configuration = &names[0];
+
 	// get configuration
-	ERROR_PROPAGATE(net_get_device_conf_req(ip_globals.net_phone, ip_netif->device_id, &configuration, count, &data));
-	if(configuration){
-		if(configuration[0].value){
+	rc = net_get_device_conf_req(ip_globals.net_phone, ip_netif->device_id,
+	    &configuration, count, &data);
+	if (rc != EOK)
+		return rc;
+	
+	if (configuration) {
+		if (configuration[0].value)
 			ip_netif->ipv = strtol(configuration[0].value, NULL, 0);
-		}
-		ip_netif->dhcp = ! str_lcmp(configuration[1].value, "dhcp", configuration[1].length);
-		if(ip_netif->dhcp){
+
+		ip_netif->dhcp = !str_lcmp(configuration[1].value, "dhcp",
+		    configuration[1].length);
+		
+		if (ip_netif->dhcp) {
 			// TODO dhcp
 			net_free_settings(configuration, data);
 			return ENOTSUP;
-		}else if(ip_netif->ipv == IPV4){
+		} else if (ip_netif->ipv == IPV4) {
 			route = (ip_route_ref) malloc(sizeof(ip_route_t));
-			if(! route){
+			if (!route) {
 				net_free_settings(configuration, data);
 				return ENOMEM;
@@ -525,61 +388,88 @@
 			route->netif = ip_netif;
 			index = ip_routes_add(&ip_netif->routes, route);
-			if(index < 0){
+			if (index < 0) {
 				net_free_settings(configuration, data);
 				free(route);
 				return index;
 			}
-			if(ERROR_OCCURRED(inet_pton(AF_INET, configuration[2].value, (uint8_t *) &route->address.s_addr))
-				|| ERROR_OCCURRED(inet_pton(AF_INET, configuration[3].value, (uint8_t *) &route->netmask.s_addr))
-				|| (inet_pton(AF_INET, configuration[4].value, (uint8_t *) &gateway.s_addr) == EINVAL)
-				|| (inet_pton(AF_INET, configuration[5].value, (uint8_t *) &ip_netif->broadcast.s_addr) == EINVAL)){
+			
+			if ((inet_pton(AF_INET, configuration[2].value,
+			    (uint8_t *) &route->address.s_addr) != EOK) ||
+			    (inet_pton(AF_INET, configuration[3].value,
+			    (uint8_t *) &route->netmask.s_addr) != EOK) ||
+			    (inet_pton(AF_INET, configuration[4].value,
+			    (uint8_t *) &gateway.s_addr) == EINVAL) ||
+			    (inet_pton(AF_INET, configuration[5].value,
+			    (uint8_t *) &ip_netif->broadcast.s_addr) == EINVAL))
+			    {
 				net_free_settings(configuration, data);
 				return EINVAL;
 			}
-		}else{
+		} else {
 			// TODO ipv6 in separate module
 			net_free_settings(configuration, data);
 			return ENOTSUP;
 		}
-		if(configuration[6].value){
-			ip_netif->arp = get_running_module(&ip_globals.modules, configuration[6].value);
-			if(! ip_netif->arp){
-				printf("Failed to start the arp %s\n", configuration[6].value);
+
+		if (configuration[6].value) {
+			ip_netif->arp = get_running_module(&ip_globals.modules,
+			    configuration[6].value);
+			if (!ip_netif->arp) {
+				printf("Failed to start the arp %s\n",
+				    configuration[6].value);
 				net_free_settings(configuration, data);
 				return EINVAL;
 			}
 		}
-		if(configuration[7].value){
+		if (configuration[7].value)
 			ip_netif->routing = (configuration[7].value[0] == 'y');
-		}
+
 		net_free_settings(configuration, data);
 	}
+
 	// binds the netif service which also initializes the device
-	ip_netif->phone = nil_bind_service(ip_netif->service, (ipcarg_t) ip_netif->device_id, SERVICE_IP, ip_globals.client_connection);
-	if(ip_netif->phone < 0){
-		printf("Failed to contact the nil service %d\n", ip_netif->service);
+	ip_netif->phone = nil_bind_service(ip_netif->service,
+	    (ipcarg_t) ip_netif->device_id, SERVICE_IP,
+	    ip_globals.client_connection);
+	if (ip_netif->phone < 0) {
+		printf("Failed to contact the nil service %d\n",
+		    ip_netif->service);
 		return ip_netif->phone;
 	}
+
 	// has to be after the device netif module initialization
-	if(ip_netif->arp){
-		if(route){
+	if (ip_netif->arp) {
+		if (route) {
 			address.value = (char *) &route->address.s_addr;
 			address.length = CONVERT_SIZE(in_addr_t, char, 1);
-			ERROR_PROPAGATE(arp_device_req(ip_netif->arp->phone, ip_netif->device_id, SERVICE_IP, ip_netif->service, &address));
-		}else{
+			
+			rc = arp_device_req(ip_netif->arp->phone,
+			    ip_netif->device_id, SERVICE_IP, ip_netif->service,
+			    &address);
+			if (rc != EOK)
+				return rc;
+		} else {
 			ip_netif->arp = 0;
 		}
 	}
+
 	// get packet dimensions
-	ERROR_PROPAGATE(nil_packet_size_req(ip_netif->phone, ip_netif->device_id, &ip_netif->packet_dimension));
-	if(ip_netif->packet_dimension.content < IP_MIN_CONTENT){
-		printf("Maximum transmission unit %d bytes is too small, at least %d bytes are needed\n", ip_netif->packet_dimension.content, IP_MIN_CONTENT);
+	rc = nil_packet_size_req(ip_netif->phone, ip_netif->device_id,
+	    &ip_netif->packet_dimension);
+	if (rc != EOK)
+		return rc;
+	
+	if (ip_netif->packet_dimension.content < IP_MIN_CONTENT) {
+		printf("Maximum transmission unit %d bytes is too small, at "
+		    "least %d bytes are needed\n",
+		    ip_netif->packet_dimension.content, IP_MIN_CONTENT);
 		ip_netif->packet_dimension.content = IP_MIN_CONTENT;
 	}
+
 	index = ip_netifs_add(&ip_globals.netifs, ip_netif->device_id, ip_netif);
-	if(index < 0){
+	if (index < 0)
 		return index;
-	}
-	if(gateway.s_addr){
+	
+	if (gateway.s_addr) {
 		// the default gateway
 		ip_globals.gateway.address.s_addr = 0;
@@ -588,23 +478,42 @@
 		ip_globals.gateway.netif = ip_netif;
 	}
+
 	return EOK;
 }
 
-int ip_mtu_changed_message(device_id_t device_id, size_t mtu){
+/** Updates the device content length according to the new MTU value.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] mtu	The new mtu value.
+ * @returns		EOK on success.
+ * @returns		ENOENT if device is not found.
+ */
+static int ip_mtu_changed_message(device_id_t device_id, size_t mtu)
+{
 	ip_netif_ref netif;
 
 	fibril_rwlock_write_lock(&ip_globals.netifs_lock);
 	netif = ip_netifs_find(&ip_globals.netifs, device_id);
-	if(! netif){
+	if (!netif) {
 		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
 		return ENOENT;
 	}
 	netif->packet_dimension.content = mtu;
+	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+
 	printf("%s: Device %d changed MTU to %d\n", NAME, device_id, mtu);
-	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+
 	return EOK;
 }
 
-int ip_device_state_message(device_id_t device_id, device_state_t state){
+/** Updates the device state.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] state	The new state value.
+ * @returns		EOK on success.
+ * @returns		ENOENT if device is not found.
+ */
+static int ip_device_state_message(device_id_t device_id, device_state_t state)
+{
 	ip_netif_ref netif;
 
@@ -612,204 +521,108 @@
 	// find the device
 	netif = ip_netifs_find(&ip_globals.netifs, device_id);
-	if(! netif){
+	if (!netif) {
 		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
 		return ENOENT;
 	}
 	netif->state = state;
+	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+
 	printf("%s: Device %d changed state to %d\n", NAME, device_id, state);
-	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+
 	return EOK;
 }
 
-int ip_register(int protocol, services_t service, int phone, tl_received_msg_t received_msg){
-	ip_proto_ref proto;
-	int index;
-
-	if(!(protocol && service && ((phone > 0) || (received_msg)))){
-		return EINVAL;
-	}
-	proto = (ip_proto_ref) malloc(sizeof(ip_protos_t));
-	if(! proto){
-		return ENOMEM;
-	}
-	proto->protocol = protocol;
-	proto->service = service;
-	proto->phone = phone;
-	proto->received_msg = received_msg;
-	fibril_rwlock_write_lock(&ip_globals.protos_lock);
-	index = ip_protos_add(&ip_globals.protos, proto->protocol, proto);
-	if(index < 0){
-		fibril_rwlock_write_unlock(&ip_globals.protos_lock);
-		free(proto);
-		return index;
-	}
-	
-	printf("%s: Protocol registered (protocol: %d, phone: %d)\n",
-	    NAME, proto->protocol, proto->phone);
-	
-	fibril_rwlock_write_unlock(&ip_globals.protos_lock);
-	return EOK;
-}
-
-int ip_send_msg_local(int il_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error){
-	ERROR_DECLARE;
-
-	int addrlen;
-	ip_netif_ref netif;
-	ip_route_ref route;
-	struct sockaddr * addr;
-	struct sockaddr_in * address_in;
-//	struct sockaddr_in6 *	address_in6;
-	in_addr_t * dest;
-	in_addr_t * src;
-	int phone;
-
-	// addresses in the host byte order
-	// should be the next hop address or the target destination address
-	addrlen = packet_get_addr(packet, NULL, (uint8_t **) &addr);
-	if(addrlen < 0){
-		return ip_release_and_return(packet, addrlen);
-	}
-	if((size_t) addrlen < sizeof(struct sockaddr)){
-		return ip_release_and_return(packet, EINVAL);
-	}
-	switch(addr->sa_family){
-		case AF_INET:
-			if(addrlen != sizeof(struct sockaddr_in)){
-				return ip_release_and_return(packet, EINVAL);
+
+/** Prefixes a middle fragment header based on the last fragment header to the
+ * packet.
+ *
+ * @param[in] packet	The packet to be prefixed.
+ * @param[in] last	The last header to be copied.
+ * @returns		The prefixed middle header.
+ * @returns		NULL on error.
+ */
+static ip_header_ref
+ip_create_middle_header(packet_t packet, ip_header_ref last)
+{
+	ip_header_ref middle;
+
+	middle = (ip_header_ref) packet_suffix(packet, IP_HEADER_LENGTH(last));
+	if (!middle)
+		return NULL;
+	memcpy(middle, last, IP_HEADER_LENGTH(last));
+	middle->flags |= IPFLAG_MORE_FRAGMENTS;
+	return middle;
+}
+
+/** Copies the fragment header.
+ *
+ * Copies only the header itself and relevant IP options.
+ *
+ * @param[out] last	The created header.
+ * @param[in] first	The original header to be copied.
+ */
+static void ip_create_last_header(ip_header_ref last, ip_header_ref first)
+{
+	ip_option_ref option;
+	size_t next;
+	size_t length;
+
+	// copy first itself
+	memcpy(last, first, sizeof(ip_header_t));
+	length = sizeof(ip_header_t);
+	next = sizeof(ip_header_t);
+
+	// process all ip options
+	while (next < first->header_length) {
+		option = (ip_option_ref) (((uint8_t *) first) + next);
+		// skip end or noop
+		if ((option->type == IPOPT_END) ||
+		    (option->type == IPOPT_NOOP)) {
+			next++;
+		} else {
+			// copy if told so or skip
+			if (IPOPT_COPIED(option->type)) {
+				memcpy(((uint8_t *) last) + length,
+				    ((uint8_t *) first) + next, option->length);
+				length += option->length;
 			}
-			address_in = (struct sockaddr_in *) addr;
-			dest = &address_in->sin_addr;
-			if(! dest->s_addr){
-				dest->s_addr = IPV4_LOCALHOST_ADDRESS;
-			}
-			break;
-		// TODO IPv6
-/*		case AF_INET6:
-			if(addrlen != sizeof(struct sockaddr_in6)){
-				return EINVAL;
-			}
-			address_in6 = (struct sockaddr_in6 *) dest;
-			address_in6.sin6_addr.s6_addr;
-			IPV6_LOCALHOST_ADDRESS;
-*/		default:
-			return ip_release_and_return(packet, EAFNOSUPPORT);
-	}
-	netif = NULL;
-	route = NULL;
-	fibril_rwlock_read_lock(&ip_globals.netifs_lock);
-	// device specified?
-	if(device_id > 0){
-		netif = ip_netifs_find(&ip_globals.netifs, device_id);
-		route = ip_netif_find_route(netif, * dest);
-		if(netif && (! route) && (ip_globals.gateway.netif == netif)){
-			route = &ip_globals.gateway;
-		}
-	}
-	if(! route){
-		route = ip_find_route(*dest);
-		netif = route ? route->netif : NULL;
-	}
-	if(!(netif && route)){
-		fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
-		phone = ip_prepare_icmp_and_get_phone(error, packet, NULL);
-		if(phone >= 0){
-			// unreachable ICMP if no routing
-			icmp_destination_unreachable_msg(phone, ICMP_NET_UNREACH, 0, packet);
-		}
-		return ENOENT;
-	}
-	if(error){
-		// do not send for broadcast, anycast packets or network broadcast
-		if((! dest->s_addr)
-			|| (!(~ dest->s_addr))
-			|| (!(~((dest->s_addr &(~ route->netmask.s_addr)) | route->netmask.s_addr)))
-			|| (!(dest->s_addr &(~ route->netmask.s_addr)))){
-			return ip_release_and_return(packet, EINVAL);
-		}
-	}
-	// if the local host is the destination
-	if((route->address.s_addr == dest->s_addr)
-		&& (dest->s_addr != IPV4_LOCALHOST_ADDRESS)){
-		// find the loopback device to deliver
-		dest->s_addr = IPV4_LOCALHOST_ADDRESS;
-		route = ip_find_route(*dest);
-		netif = route ? route->netif : NULL;
-		if(!(netif && route)){
-			fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
-			phone = ip_prepare_icmp_and_get_phone(error, packet, NULL);
-			if(phone >= 0){
-				// unreachable ICMP if no routing
-				icmp_destination_unreachable_msg(phone, ICMP_HOST_UNREACH, 0, packet);
-			}
-			return ENOENT;
-		}
-	}
-	src = ip_netif_address(netif);
-	if(! src){
-		fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
-		return ip_release_and_return(packet, ENOENT);
-	}
-	ERROR_CODE = ip_send_route(packet, netif, route, src, * dest, error);
-	fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
-	return ERROR_CODE;
-}
-
-in_addr_t * ip_netif_address(ip_netif_ref netif){
-	ip_route_ref route;
-
-	route = ip_routes_get_index(&netif->routes, 0);
-	return route ? &route->address : NULL;
-}
-
-int ip_send_route(packet_t packet, ip_netif_ref netif, ip_route_ref route, in_addr_t * src, in_addr_t dest, services_t error){
-	ERROR_DECLARE;
-
-	measured_string_t destination;
-	measured_string_ref translation;
-	char * data;
-	int phone;
-
-	// get destination hardware address
-	if(netif->arp && (route->address.s_addr != dest.s_addr)){
-		destination.value = route->gateway.s_addr ? (char *) &route->gateway.s_addr : (char *) &dest.s_addr;
-		destination.length = CONVERT_SIZE(dest.s_addr, char, 1);
-		if(ERROR_OCCURRED(arp_translate_req(netif->arp->phone, netif->device_id, SERVICE_IP, &destination, &translation, &data))){
-//			sleep(1);
-//			ERROR_PROPAGATE(arp_translate_req(netif->arp->phone, netif->device_id, SERVICE_IP, &destination, &translation, &data));
-			pq_release_remote(ip_globals.net_phone, packet_get_id(packet));
-			return ERROR_CODE;
-		}
-		if(!(translation && translation->value)){
-			if(translation){
-				free(translation);
-				free(data);
-			}
-			phone = ip_prepare_icmp_and_get_phone(error, packet, NULL);
-			if(phone >= 0){
-				// unreachable ICMP if no routing
-				icmp_destination_unreachable_msg(phone, ICMP_HOST_UNREACH, 0, packet);
-			}
-			return EINVAL;
-		}
-	}else translation = NULL;
-	if(ERROR_OCCURRED(ip_prepare_packet(src, dest, packet, translation))){
-		pq_release_remote(ip_globals.net_phone, packet_get_id(packet));
-	}else{
-		packet = ip_split_packet(packet, netif->packet_dimension.prefix, netif->packet_dimension.content, netif->packet_dimension.suffix, netif->packet_dimension.addr_len, error);
-		if(packet){
-			nil_send_msg(netif->phone, netif->device_id, packet, SERVICE_IP);
-		}
-	}
-	if(translation){
-		free(translation);
-		free(data);
-	}
-	return ERROR_CODE;
-}
-
-int ip_prepare_packet(in_addr_t * source, in_addr_t dest, packet_t packet, measured_string_ref destination){
-	ERROR_DECLARE;
-
+			// next option
+			next += option->length;
+		}
+	}
+
+	// align 4 byte boundary
+	if (length % 4) {
+		bzero(((uint8_t *) last) + length, 4 - (length % 4));
+		last->header_length = length / 4 + 1;
+	} else {
+		last->header_length = length / 4;
+	}
+
+	last->header_checksum = 0;
+}
+
+/** Prepares the outgoing packet or the packet queue.
+ *
+ * The packet queue is a fragmented packet
+ * Updates the first packet's IP header.
+ * Prefixes the additional packets with fragment headers.
+ *
+ * @param[in] source	The source address.
+ * @param[in] dest	The destination address.
+ * @param[in,out] packet The packet to be sent.
+ * @param[in] destination The destination hardware address.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet is too small to contain the IP
+ *			header.
+ * @returns		EINVAL if the packet is too long than the IP allows.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the packet_set_addr()
+ *			function.
+ */
+static int
+ip_prepare_packet(in_addr_t *source, in_addr_t dest, packet_t packet,
+    measured_string_ref destination)
+{
 	size_t length;
 	ip_header_ref header;
@@ -817,63 +630,97 @@
 	ip_header_ref middle_header;
 	packet_t next;
+	int rc;
 
 	length = packet_get_data_length(packet);
-	if((length < sizeof(ip_header_t)) || (length > IP_MAX_CONTENT)){
+	if ((length < sizeof(ip_header_t)) || (length > IP_MAX_CONTENT))
 		return EINVAL;
-	}
+
 	header = (ip_header_ref) packet_get_data(packet);
-	if(destination){
-		ERROR_PROPAGATE(packet_set_addr(packet, NULL, (uint8_t *) destination->value, CONVERT_SIZE(char, uint8_t, destination->length)));
-	}else{
-		ERROR_PROPAGATE(packet_set_addr(packet, NULL, NULL, 0));
-	}
+	if (destination) {
+		rc = packet_set_addr(packet, NULL, (uint8_t *) destination->value,
+		    CONVERT_SIZE(char, uint8_t, destination->length));
+	} else {
+		rc = packet_set_addr(packet, NULL, NULL, 0);
+	}
+	if (rc != EOK)
+		return rc;
+	
 	header->version = IPV4;
 	header->fragment_offset_high = 0;
 	header->fragment_offset_low = 0;
 	header->header_checksum = 0;
-	if(source){
+	if (source)
 		header->source_address = source->s_addr;
-	}
 	header->destination_address = dest.s_addr;
+
 	fibril_rwlock_write_lock(&ip_globals.lock);
-	++ ip_globals.packet_counter;
+	ip_globals.packet_counter++;
 	header->identification = htons(ip_globals.packet_counter);
 	fibril_rwlock_write_unlock(&ip_globals.lock);
-//	length = packet_get_data_length(packet);
-	if(pq_next(packet)){
+
+	if (pq_next(packet)) {
 		last_header = (ip_header_ref) malloc(IP_HEADER_LENGTH(header));
-		if(! last_header){
+		if (!last_header)
 			return ENOMEM;
-		}
 		ip_create_last_header(last_header, header);
 		next = pq_next(packet);
-		while(pq_next(next)){
-			middle_header = (ip_header_ref) packet_prefix(next, IP_HEADER_LENGTH(last_header));
-			if(! middle_header){
+		while (pq_next(next)) {
+			middle_header = (ip_header_ref) packet_prefix(next,
+			    IP_HEADER_LENGTH(last_header));
+			if (!middle_header) {
+				free(last_header);
 				return ENOMEM;
 			}
-			memcpy(middle_header, last_header, IP_HEADER_LENGTH(last_header));
+
+			memcpy(middle_header, last_header,
+			    IP_HEADER_LENGTH(last_header));
 			header->flags |= IPFLAG_MORE_FRAGMENTS;
-			middle_header->total_length = htons(packet_get_data_length(next));
-			middle_header->fragment_offset_high = IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length);
-			middle_header->fragment_offset_low = IP_COMPUTE_FRAGMENT_OFFSET_LOW(length);
-			middle_header->header_checksum = IP_HEADER_CHECKSUM(middle_header);
-			if(destination){
-				ERROR_PROPAGATE(packet_set_addr(next, NULL, (uint8_t *) destination->value, CONVERT_SIZE(char, uint8_t, destination->length)));
+			middle_header->total_length =
+			    htons(packet_get_data_length(next));
+			middle_header->fragment_offset_high =
+			    IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length);
+			middle_header->fragment_offset_low =
+			    IP_COMPUTE_FRAGMENT_OFFSET_LOW(length);
+			middle_header->header_checksum =
+			    IP_HEADER_CHECKSUM(middle_header);
+			if (destination) {
+				rc = packet_set_addr(next, NULL,
+				    (uint8_t *) destination->value,
+				    CONVERT_SIZE(char, uint8_t,
+				    destination->length));
+				if (rc != EOK) {
+				    	free(last_header);
+					return rc;
+				}
 			}
 			length += packet_get_data_length(next);
 			next = pq_next(next);
 		}
-		middle_header = (ip_header_ref) packet_prefix(next, IP_HEADER_LENGTH(last_header));
-		if(! middle_header){
+
+		middle_header = (ip_header_ref) packet_prefix(next,
+		    IP_HEADER_LENGTH(last_header));
+		if (!middle_header) {
+			free(last_header);
 			return ENOMEM;
 		}
-		memcpy(middle_header, last_header, IP_HEADER_LENGTH(last_header));
-		middle_header->total_length = htons(packet_get_data_length(next));
-		middle_header->fragment_offset_high = IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length);
-		middle_header->fragment_offset_low = IP_COMPUTE_FRAGMENT_OFFSET_LOW(length);
-		middle_header->header_checksum = IP_HEADER_CHECKSUM(middle_header);
-		if(destination){
-			ERROR_PROPAGATE(packet_set_addr(next, NULL, (uint8_t *) destination->value, CONVERT_SIZE(char, uint8_t, destination->length)));
+
+		memcpy(middle_header, last_header,
+		    IP_HEADER_LENGTH(last_header));
+		middle_header->total_length =
+		    htons(packet_get_data_length(next));
+		middle_header->fragment_offset_high =
+		    IP_COMPUTE_FRAGMENT_OFFSET_HIGH(length);
+		middle_header->fragment_offset_low =
+		    IP_COMPUTE_FRAGMENT_OFFSET_LOW(length);
+		middle_header->header_checksum =
+		    IP_HEADER_CHECKSUM(middle_header);
+		if (destination) {
+			rc = packet_set_addr(next, NULL,
+			    (uint8_t *) destination->value,
+			    CONVERT_SIZE(char, uint8_t, destination->length));
+			if (rc != EOK) {
+				free(last_header);
+				return rc;
+			}
 		}
 		length += packet_get_data_length(next);
@@ -881,15 +728,1166 @@
 		header->flags |= IPFLAG_MORE_FRAGMENTS;
 	}
+
 	header->total_length = htons(length);
 	// unnecessary for all protocols
 	header->header_checksum = IP_HEADER_CHECKSUM(header);
+
 	return EOK;
 }
 
-int ip_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int * answer_count)
-{
-	ERROR_DECLARE;
-	
+/** Fragments the packet from the end.
+ *
+ * @param[in] packet	The packet to be fragmented.
+ * @param[in,out] new_packet The new packet fragment.
+ * @param[in,out] header The original packet header.
+ * @param[in,out] new_header The new packet fragment header.
+ * @param[in] length	The new fragment length.
+ * @param[in] src	The source address.
+ * @param[in] dest	The destiantion address.
+ * @param[in] addrlen	The address length.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if the target packet is too small.
+ * @returns		Other error codes as defined for the packet_set_addr()
+ *			function.
+ * @returns		Other error codes as defined for the pq_insert_after()
+ *			function.
+ */
+static int
+ip_fragment_packet_data(packet_t packet, packet_t new_packet,
+    ip_header_ref header, ip_header_ref new_header, size_t length,
+    const struct sockaddr *src, const struct sockaddr *dest, socklen_t addrlen)
+{
+	void *data;
+	size_t offset;
+	int rc;
+
+	data = packet_suffix(new_packet, length);
+	if (!data)
+		return ENOMEM;
+
+	memcpy(data, ((void *) header) + IP_TOTAL_LENGTH(header) - length,
+	    length);
+	
+	rc = packet_trim(packet, 0, length);
+	if (rc != EOK)
+		return rc;
+	
+	header->total_length = htons(IP_TOTAL_LENGTH(header) - length);
+	new_header->total_length = htons(IP_HEADER_LENGTH(new_header) + length);
+	offset = IP_FRAGMENT_OFFSET(header) + IP_HEADER_DATA_LENGTH(header);
+	new_header->fragment_offset_high =
+	    IP_COMPUTE_FRAGMENT_OFFSET_HIGH(offset);
+	new_header->fragment_offset_low =
+	    IP_COMPUTE_FRAGMENT_OFFSET_LOW(offset);
+	new_header->header_checksum = IP_HEADER_CHECKSUM(new_header);
+	
+	rc = packet_set_addr(new_packet, (const uint8_t *) src,
+	    (const uint8_t *) dest, addrlen);
+	if (rc != EOK)
+		return rc;
+
+	return pq_insert_after(packet, new_packet);
+}
+
+/** Checks the packet length and fragments it if needed.
+ *
+ * The new fragments are queued before the original packet.
+ *
+ * @param[in,out] packet The packet to be checked.
+ * @param[in] length	The maximum packet length.
+ * @param[in] prefix	The minimum prefix size.
+ * @param[in] suffix	The minimum suffix size.
+ * @param[in] addr_len	The minimum address length.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet_get_addr() function fails.
+ * @returns		EINVAL if the packet does not contain the IP header.
+ * @returns		EPERM if the packet needs to be fragmented and the
+ *			fragmentation is not allowed.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		ENOMEM if there is no packet available.
+ * @returns		ENOMEM if the packet is too small to contain the IP
+ *			header.
+ * @returns		Other error codes as defined for the packet_trim()
+ *			function.
+ * @returns		Other error codes as defined for the
+ *			ip_create_middle_header() function.
+ * @returns		Other error codes as defined for the
+ *			ip_fragment_packet_data() function.
+ */
+static int
+ip_fragment_packet(packet_t packet, size_t length, size_t prefix, size_t suffix,
+    socklen_t addr_len)
+{
+	packet_t new_packet;
+	ip_header_ref header;
+	ip_header_ref middle_header;
+	ip_header_ref last_header;
+	struct sockaddr *src;
+	struct sockaddr *dest;
+	socklen_t addrlen;
+	int result;
+	int rc;
+
+	result = packet_get_addr(packet, (uint8_t **) &src, (uint8_t **) &dest);
+	if (result <= 0)
+		return EINVAL;
+
+	addrlen = (socklen_t) result;
+	if (packet_get_data_length(packet) <= sizeof(ip_header_t))
+		return ENOMEM;
+
+	// get header
+	header = (ip_header_ref) packet_get_data(packet);
+	if (!header)
+		return EINVAL;
+
+	// fragmentation forbidden?
+	if(header->flags & IPFLAG_DONT_FRAGMENT)
+		return EPERM;
+
+	// create the last fragment
+	new_packet = packet_get_4_remote(ip_globals.net_phone, prefix, length,
+	    suffix, ((addrlen > addr_len) ? addrlen : addr_len));
+	if (!new_packet)
+		return ENOMEM;
+
+	// allocate as much as originally
+	last_header = (ip_header_ref) packet_suffix(new_packet,
+	    IP_HEADER_LENGTH(header));
+	if (!last_header)
+		return ip_release_and_return(packet, ENOMEM);
+
+	ip_create_last_header(last_header, header);
+
+	// trim the unused space
+	rc = packet_trim(new_packet, 0,
+	    IP_HEADER_LENGTH(header) - IP_HEADER_LENGTH(last_header));
+	if (rc != EOK)
+		return ip_release_and_return(packet, rc);
+
+	// biggest multiple of 8 lower than content
+	// TODO even fragmentation?
+	length = length & ~0x7;
+	
+	rc = ip_fragment_packet_data(packet, new_packet, header, last_header,
+	    ((IP_HEADER_DATA_LENGTH(header) -
+	    ((length - IP_HEADER_LENGTH(header)) & ~0x7)) %
+	    ((length - IP_HEADER_LENGTH(last_header)) & ~0x7)),
+	    src, dest, addrlen);
+	if (rc != EOK)
+		return ip_release_and_return(packet, rc);
+
+	// mark the first as fragmented
+	header->flags |= IPFLAG_MORE_FRAGMENTS;
+
+	// create middle framgents
+	while (IP_TOTAL_LENGTH(header) > length) {
+		new_packet = packet_get_4_remote(ip_globals.net_phone, prefix,
+		    length, suffix,
+		    ((addrlen >= addr_len) ? addrlen : addr_len));
+		if (!new_packet)
+			return ENOMEM;
+
+		middle_header = ip_create_middle_header(new_packet,
+		    last_header);
+		if (!middle_header)
+			return ip_release_and_return(packet, ENOMEM);
+
+		rc = ip_fragment_packet_data(packet, new_packet, header,
+		    middle_header,
+		    (length - IP_HEADER_LENGTH(middle_header)) & ~0x7,
+		    src, dest, addrlen);
+		if (rc != EOK)
+			return ip_release_and_return(packet, rc);
+	}
+
+	// finish the first fragment
+	header->header_checksum = IP_HEADER_CHECKSUM(header);
+
+	return EOK;
+}
+
+/** Checks the packet queue lengths and fragments the packets if needed.
+ *
+ * The ICMP_FRAG_NEEDED error notification may be sent if the packet needs to
+ * be fragmented and the fragmentation is not allowed.
+ *
+ * @param[in,out] packet The packet or the packet queue to be checked.
+ * @param[in] prefix	The minimum prefix size.
+ * @param[in] content	The maximum content size.
+ * @param[in] suffix	The minimum suffix size.
+ * @param[in] addr_len	The minimum address length.
+ * @param[in] error	The error module service.
+ * @returns		The packet or the packet queue of the allowed length.
+ * @returns		NULL if there are no packets left.
+ */
+static packet_t
+ip_split_packet(packet_t packet, size_t prefix, size_t content, size_t suffix,
+    socklen_t addr_len, services_t error)
+{
+	size_t length;
+	packet_t next;
+	packet_t new_packet;
+	int result;
+	int phone;
+
+	next = packet;
+	// check all packets
+	while (next) {
+		length = packet_get_data_length(next);
+		
+		if (length <= content) {
+			next = pq_next(next);
+			continue;
+		}
+
+		// too long
+		result = ip_fragment_packet(next, content, prefix,
+		    suffix, addr_len);
+		if (result != EOK) {
+			new_packet = pq_detach(next);
+			if (next == packet) {
+				// the new first packet of the queue
+				packet = new_packet;
+			}
+			// fragmentation needed?
+			if (result == EPERM) {
+				phone = ip_prepare_icmp_and_get_phone(
+				    error, next, NULL);
+				if (phone >= 0) {
+					// fragmentation necessary ICMP
+					icmp_destination_unreachable_msg(phone,
+					    ICMP_FRAG_NEEDED, content, next);
+				}
+			} else {
+				pq_release_remote(ip_globals.net_phone,
+				    packet_get_id(next));
+			}
+
+			next = new_packet;
+			continue;
+		}
+
+		next = pq_next(next);
+	}
+
+	return packet;
+}
+
+/** Sends the packet or the packet queue via the specified route.
+ *
+ * The ICMP_HOST_UNREACH error notification may be sent if route hardware
+ * destination address is found.
+ *
+ * @param[in,out] packet The packet to be sent.
+ * @param[in] netif	The target network interface.
+ * @param[in] route	The target route.
+ * @param[in] src	The source address.
+ * @param[in] dest	The destination address.
+ * @param[in] error	The error module service.
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for the arp_translate_req()
+ *			function.
+ * @returns		Other error codes as defined for the ip_prepare_packet()
+ *			function.
+ */
+static int
+ip_send_route(packet_t packet, ip_netif_ref netif, ip_route_ref route,
+    in_addr_t *src, in_addr_t dest, services_t error)
+{
+	measured_string_t destination;
+	measured_string_ref translation;
+	char *data;
+	int phone;
+	int rc;
+
+	// get destination hardware address
+	if (netif->arp && (route->address.s_addr != dest.s_addr)) {
+		destination.value = route->gateway.s_addr ?
+		    (char *) &route->gateway.s_addr : (char *) &dest.s_addr;
+		destination.length = CONVERT_SIZE(dest.s_addr, char, 1);
+
+		rc = arp_translate_req(netif->arp->phone, netif->device_id,
+		    SERVICE_IP, &destination, &translation, &data);
+		if (rc != EOK) {
+			pq_release_remote(ip_globals.net_phone,
+			    packet_get_id(packet));
+			return rc;
+		}
+
+		if (!translation || !translation->value) {
+			if (translation) {
+				free(translation);
+				free(data);
+			}
+			phone = ip_prepare_icmp_and_get_phone(error, packet,
+			    NULL);
+			if (phone >= 0) {
+				// unreachable ICMP if no routing
+				icmp_destination_unreachable_msg(phone,
+				    ICMP_HOST_UNREACH, 0, packet);
+			}
+			return EINVAL;
+		}
+
+	} else {
+		translation = NULL;
+	}
+
+	rc = ip_prepare_packet(src, dest, packet, translation);
+	if (rc != EOK) {
+		pq_release_remote(ip_globals.net_phone, packet_get_id(packet));
+	} else {
+		packet = ip_split_packet(packet, netif->packet_dimension.prefix,
+		    netif->packet_dimension.content,
+		    netif->packet_dimension.suffix,
+		    netif->packet_dimension.addr_len, error);
+		if (packet) {
+			nil_send_msg(netif->phone, netif->device_id, packet,
+			    SERVICE_IP);
+		}
+	}
+
+	if (translation) {
+		free(translation);
+		free(data);
+	}
+
+	return rc;
+}
+
+/** Searches the network interfaces if there is a suitable route.
+ *
+ * @param[in] netif	The network interface to be searched for routes. May be
+ *			NULL.
+ * @param[in] destination The destination address.
+ * @returns		The found route.
+ * @returns		NULL if no route was found.
+ */
+static ip_route_ref
+ip_netif_find_route(ip_netif_ref netif, in_addr_t destination)
+{
+	int index;
+	ip_route_ref route;
+
+	if (!netif)
+		return NULL;
+
+	// start with the first one - the direct route
+	for (index = 0; index < ip_routes_count(&netif->routes); index++) {
+		route = ip_routes_get_index(&netif->routes, index);
+		if (route &&
+		    ((route->address.s_addr & route->netmask.s_addr) ==
+		    (destination.s_addr & route->netmask.s_addr))) {
+			return route;
+		}
+	}
+
+	return NULL;
+}
+
+/** Searches all network interfaces if there is a suitable route.
+ *
+ * @param[in] destination The destination address.
+ * @returns		The found route.
+ * @returns		NULL if no route was found.
+ */
+static ip_route_ref ip_find_route(in_addr_t destination) {
+	int index;
+	ip_route_ref route;
+	ip_netif_ref netif;
+
+	// start with the last netif - the newest one
+	index = ip_netifs_count(&ip_globals.netifs) - 1;
+	while (index >= 0) {
+		netif = ip_netifs_get_index(&ip_globals.netifs, index);
+		if (netif && (netif->state == NETIF_ACTIVE)) {
+			route = ip_netif_find_route(netif, destination);
+			if (route)
+				return route;
+		}
+		index--;
+	}
+
+	return &ip_globals.gateway;
+}
+
+/** Returns the network interface's IP address.
+ *
+ * @param[in] netif	The network interface.
+ * @returns		The IP address.
+ * @returns		NULL if no IP address was found.
+ */
+static in_addr_t *ip_netif_address(ip_netif_ref netif)
+{
+	ip_route_ref route;
+
+	route = ip_routes_get_index(&netif->routes, 0);
+	return route ? &route->address : NULL;
+}
+
+/** Registers the transport layer protocol.
+ *
+ * The traffic of this protocol will be supplied using either the receive
+ * function or IPC message.
+ *
+ * @param[in] protocol	The transport layer module protocol.
+ * @param[in] service	The transport layer module service.
+ * @param[in] phone	The transport layer module phone.
+ * @param[in] received_msg The receiving function.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the protocol parameter and/or the service
+ *			parameter is zero.
+ * @returns		EINVAL if the phone parameter is not a positive number
+ *			and the tl_receive_msg is NULL.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+static int
+ip_register(int protocol, services_t service, int phone,
+    tl_received_msg_t received_msg)
+{
+	ip_proto_ref proto;
+	int index;
+
+	if (!protocol || !service || ((phone < 0) && !received_msg))
+		return EINVAL;
+
+	proto = (ip_proto_ref) malloc(sizeof(ip_protos_t));
+	if (!proto)
+		return ENOMEM;
+
+	proto->protocol = protocol;
+	proto->service = service;
+	proto->phone = phone;
+	proto->received_msg = received_msg;
+
+	fibril_rwlock_write_lock(&ip_globals.protos_lock);
+	index = ip_protos_add(&ip_globals.protos, proto->protocol, proto);
+	if (index < 0) {
+		fibril_rwlock_write_unlock(&ip_globals.protos_lock);
+		free(proto);
+		return index;
+	}
+	fibril_rwlock_write_unlock(&ip_globals.protos_lock);
+
+	printf("%s: Protocol registered (protocol: %d, phone: %d)\n",
+	    NAME, proto->protocol, proto->phone);
+
+	return EOK;
+}
+
+static int
+ip_device_req_local(int il_phone, device_id_t device_id, services_t netif)
+{
+	ip_netif_ref ip_netif;
+	ip_route_ref route;
+	int index;
+	int rc;
+
+	ip_netif = (ip_netif_ref) malloc(sizeof(ip_netif_t));
+	if (!ip_netif)
+		return ENOMEM;
+
+	rc = ip_routes_initialize(&ip_netif->routes);
+	if (rc != EOK) {
+		free(ip_netif);
+		return rc;
+	}
+
+	ip_netif->device_id = device_id;
+	ip_netif->service = netif;
+	ip_netif->state = NETIF_STOPPED;
+
+	fibril_rwlock_write_lock(&ip_globals.netifs_lock);
+
+	rc = ip_netif_initialize(ip_netif);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+		ip_routes_destroy(&ip_netif->routes);
+		free(ip_netif);
+		return rc;
+	}
+	if (ip_netif->arp)
+		ip_netif->arp->usage++;
+
+	// print the settings
+	printf("%s: Device registered (id: %d, phone: %d, ipv: %d, conf: %s)\n",
+	    NAME, ip_netif->device_id, ip_netif->phone, ip_netif->ipv,
+	    ip_netif->dhcp ? "dhcp" : "static");
+	
+	// TODO ipv6 addresses
+	
+	char address[INET_ADDRSTRLEN];
+	char netmask[INET_ADDRSTRLEN];
+	char gateway[INET_ADDRSTRLEN];
+	
+	for (index = 0; index < ip_routes_count(&ip_netif->routes); index++) {
+		route = ip_routes_get_index(&ip_netif->routes, index);
+		if (route) {
+			inet_ntop(AF_INET, (uint8_t *) &route->address.s_addr,
+			    address, INET_ADDRSTRLEN);
+			inet_ntop(AF_INET, (uint8_t *) &route->netmask.s_addr,
+			    netmask, INET_ADDRSTRLEN);
+			inet_ntop(AF_INET, (uint8_t *) &route->gateway.s_addr,
+			    gateway, INET_ADDRSTRLEN);
+			printf("%s: Route %d (address: %s, netmask: %s, "
+			    "gateway: %s)\n", NAME, index, address, netmask,
+			    gateway);
+		}
+	}
+	
+	inet_ntop(AF_INET, (uint8_t *) &ip_netif->broadcast.s_addr, address,
+	    INET_ADDRSTRLEN);
+	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+
+	printf("%s: Broadcast (%s)\n", NAME, address);
+
+	return EOK;
+}
+
+static int
+ip_send_msg_local(int il_phone, device_id_t device_id, packet_t packet,
+    services_t sender, services_t error)
+{
+	int addrlen;
+	ip_netif_ref netif;
+	ip_route_ref route;
+	struct sockaddr *addr;
+	struct sockaddr_in *address_in;
+	in_addr_t *dest;
+	in_addr_t *src;
+	int phone;
+	int rc;
+
+	// addresses in the host byte order
+	// should be the next hop address or the target destination address
+	addrlen = packet_get_addr(packet, NULL, (uint8_t **) &addr);
+	if (addrlen < 0)
+		return ip_release_and_return(packet, addrlen);
+	if ((size_t) addrlen < sizeof(struct sockaddr))
+		return ip_release_and_return(packet, EINVAL);
+
+	switch (addr->sa_family) {
+	case AF_INET:
+		if (addrlen != sizeof(struct sockaddr_in))
+			return ip_release_and_return(packet, EINVAL);
+		address_in = (struct sockaddr_in *) addr;
+		dest = &address_in->sin_addr;
+		if (!dest->s_addr)
+			dest->s_addr = IPV4_LOCALHOST_ADDRESS;
+		break;
+	case AF_INET6:
+	default:
+		return ip_release_and_return(packet, EAFNOSUPPORT);
+	}
+
+	netif = NULL;
+	route = NULL;
+	fibril_rwlock_read_lock(&ip_globals.netifs_lock);
+
+	// device specified?
+	if (device_id > 0) {
+		netif = ip_netifs_find(&ip_globals.netifs, device_id);
+		route = ip_netif_find_route(netif, * dest);
+		if (netif && !route && (ip_globals.gateway.netif == netif))
+			route = &ip_globals.gateway;
+	}
+
+	if (!route) {
+		route = ip_find_route(*dest);
+		netif = route ? route->netif : NULL;
+	}
+	if (!netif || !route) {
+		fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+		phone = ip_prepare_icmp_and_get_phone(error, packet, NULL);
+		if (phone >= 0) {
+			// unreachable ICMP if no routing
+			icmp_destination_unreachable_msg(phone,
+			    ICMP_NET_UNREACH, 0, packet);
+		}
+		return ENOENT;
+	}
+
+	if (error) {
+		// do not send for broadcast, anycast packets or network
+		// broadcast
+		if (!dest->s_addr || !(~dest->s_addr) ||
+		    !(~((dest->s_addr & ~route->netmask.s_addr) |
+		    route->netmask.s_addr)) ||
+		    (!(dest->s_addr & ~route->netmask.s_addr))) {
+			return ip_release_and_return(packet, EINVAL);
+		}
+	}
+
+	// if the local host is the destination
+	if ((route->address.s_addr == dest->s_addr) &&
+	    (dest->s_addr != IPV4_LOCALHOST_ADDRESS)) {
+		// find the loopback device to deliver
+		dest->s_addr = IPV4_LOCALHOST_ADDRESS;
+		route = ip_find_route(*dest);
+		netif = route ? route->netif : NULL;
+		if (!netif || !route) {
+			fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+			phone = ip_prepare_icmp_and_get_phone(error, packet,
+			    NULL);
+			if (phone >= 0) {
+				// unreachable ICMP if no routing
+				icmp_destination_unreachable_msg(phone,
+				    ICMP_HOST_UNREACH, 0, packet);
+			}
+			return ENOENT;
+		}
+	}
+	
+	src = ip_netif_address(netif);
+	if (!src) {
+		fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+		return ip_release_and_return(packet, ENOENT);
+	}
+
+	rc = ip_send_route(packet, netif, route, src, *dest, error);
+	fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+
+	return rc;
+}
+
+/** Returns the device packet dimensions for sending.
+ *
+ * @param[in] phone	The service module phone.
+ * @param[in] message	The service specific message.
+ * @param[in] device_id	The device identifier.
+ * @param[out] addr_len	The minimum reserved address length.
+ * @param[out] prefix	The minimum reserved prefix size.
+ * @param[out] content	The maximum content size.
+ * @param[out] suffix	The minimum reserved suffix size.
+ * @returns		EOK on success.
+ */
+static int
+ip_packet_size_message(device_id_t device_id, size_t *addr_len, size_t *prefix,
+    size_t *content, size_t *suffix)
+{
+	ip_netif_ref netif;
+	int index;
+
+	if (!addr_len || !prefix || !content || !suffix)
+		return EBADMEM;
+
+	*content = IP_MAX_CONTENT - IP_PREFIX;
+	fibril_rwlock_read_lock(&ip_globals.netifs_lock);
+	if (device_id < 0) {
+		*addr_len = IP_ADDR;
+		*prefix = 0;
+		*suffix = 0;
+
+		for (index = ip_netifs_count(&ip_globals.netifs) - 1;
+		    index >= 0; index--) {
+			netif = ip_netifs_get_index(&ip_globals.netifs, index);
+			if (!netif)
+				continue;
+			
+			if (netif->packet_dimension.addr_len > *addr_len)
+				*addr_len = netif->packet_dimension.addr_len;
+			
+			if (netif->packet_dimension.prefix > *prefix)
+				*prefix = netif->packet_dimension.prefix;
+				
+			if (netif->packet_dimension.suffix > *suffix)
+				*suffix = netif->packet_dimension.suffix;
+		}
+
+		*prefix = *prefix + IP_PREFIX;
+		*suffix = *suffix + IP_SUFFIX;
+	} else {
+		netif = ip_netifs_find(&ip_globals.netifs, device_id);
+		if (!netif) {
+			fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+			return ENOENT;
+		}
+
+		*addr_len = (netif->packet_dimension.addr_len > IP_ADDR) ?
+		    netif->packet_dimension.addr_len : IP_ADDR;
+		*prefix = netif->packet_dimension.prefix + IP_PREFIX;
+		*suffix = netif->packet_dimension.suffix + IP_SUFFIX;
+	}
+	fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+
+	return EOK;
+}
+
+/** Returns the packet destination address from the IP header.
+ *
+ * @param[in] header	The packet IP header to be read.
+ * @returns		The packet destination address.
+ */
+static in_addr_t ip_get_destination(ip_header_ref header)
+{
+	in_addr_t destination;
+
+	// TODO search set ipopt route?
+	destination.s_addr = header->destination_address;
+	return destination;
+}
+
+/** Delivers the packet to the local host.
+ *
+ * The packet is either passed to another module or released on error.
+ * The ICMP_PROT_UNREACH error notification may be sent if the protocol is not
+ * found.
+ *
+ * @param[in] device_id	The source device identifier.
+ * @param[in] packet	The packet to be delivered.
+ * @param[in] header	The first packet IP header. May be NULL.
+ * @param[in] error	The packet error service.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if the packet is a fragment.
+ * @returns		EAFNOSUPPORT if the address family is not supported.
+ * @returns		ENOENT if the target protocol is not found.
+ * @returns		Other error codes as defined for the packet_set_addr()
+ *			function.
+ * @returns		Other error codes as defined for the packet_trim()
+ *			function.
+ * @returns		Other error codes as defined for the protocol specific
+ *			tl_received_msg() function.
+ */
+static int
+ip_deliver_local(device_id_t device_id, packet_t packet, ip_header_ref header,
+    services_t error)
+{
+	ip_proto_ref proto;
+	int phone;
+	services_t service;
+	tl_received_msg_t received_msg;
+	struct sockaddr *src;
+	struct sockaddr *dest;
+	struct sockaddr_in src_in;
+	struct sockaddr_in dest_in;
+	socklen_t addrlen;
+	int rc;
+
+	if ((header->flags & IPFLAG_MORE_FRAGMENTS) ||
+	    IP_FRAGMENT_OFFSET(header)) {
+		// TODO fragmented
+		return ENOTSUP;
+	}
+	
+	switch (header->version) {
+	case IPVERSION:
+		addrlen = sizeof(src_in);
+		bzero(&src_in, addrlen);
+		src_in.sin_family = AF_INET;
+		memcpy(&dest_in, &src_in, addrlen);
+		memcpy(&src_in.sin_addr.s_addr, &header->source_address,
+		    sizeof(header->source_address));
+		memcpy(&dest_in.sin_addr.s_addr, &header->destination_address,
+		    sizeof(header->destination_address));
+		src = (struct sockaddr *) &src_in;
+		dest = (struct sockaddr *) &dest_in;
+		break;
+
+	default:
+		return ip_release_and_return(packet, EAFNOSUPPORT);
+	}
+
+	rc = packet_set_addr(packet, (uint8_t *) src, (uint8_t *) dest,
+	    addrlen);
+	if (rc != EOK)
+		return ip_release_and_return(packet, rc);
+
+	// trim padding if present
+	if (!error &&
+	    (IP_TOTAL_LENGTH(header) < packet_get_data_length(packet))) {
+		rc = packet_trim(packet, 0,
+		    packet_get_data_length(packet) - IP_TOTAL_LENGTH(header));
+		if (rc != EOK)
+			return ip_release_and_return(packet, rc);
+	}
+
+	fibril_rwlock_read_lock(&ip_globals.protos_lock);
+
+	proto = ip_protos_find(&ip_globals.protos, header->protocol);
+	if (!proto) {
+		fibril_rwlock_read_unlock(&ip_globals.protos_lock);
+		phone = ip_prepare_icmp_and_get_phone(error, packet, header);
+		if (phone >= 0) {
+			// unreachable ICMP
+			icmp_destination_unreachable_msg(phone,
+			    ICMP_PROT_UNREACH, 0, packet);
+		}
+		return ENOENT;
+	}
+
+	if (proto->received_msg) {
+		service = proto->service;
+		received_msg = proto->received_msg;
+		fibril_rwlock_read_unlock(&ip_globals.protos_lock);
+		rc = received_msg(device_id, packet, service, error);
+	} else {
+		rc = tl_received_msg(proto->phone, device_id, packet,
+		    proto->service, error);
+		fibril_rwlock_read_unlock(&ip_globals.protos_lock);
+	}
+
+	return rc;
+}
+
+/** Processes the received packet.
+ *
+ * The packet is either passed to another module or released on error.
+ *
+ * The ICMP_PARAM_POINTER error notification may be sent if the checksum is
+ * invalid.
+ * The ICMP_EXC_TTL error notification may be sent if the TTL is less than two.
+ * The ICMP_HOST_UNREACH error notification may be sent if no route was found.
+ * The ICMP_HOST_UNREACH error notification may be sent if the packet is for
+ * another host and the routing is disabled.
+ *
+ * @param[in] device_id	The source device identifier.
+ * @param[in] packet	The received packet to be processed.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the TTL is less than two.
+ * @returns		EINVAL if the checksum is invalid.
+ * @returns		EAFNOSUPPORT if the address family is not supported.
+ * @returns		ENOENT if no route was found.
+ * @returns		ENOENT if the packet is for another host and the routing
+ *			is disabled.
+ */
+static int
+ip_process_packet(device_id_t device_id, packet_t packet)
+{
+	ip_header_ref header;
+	in_addr_t dest;
+	ip_route_ref route;
+	int phone;
+	struct sockaddr *addr;
+	struct sockaddr_in addr_in;
+	socklen_t addrlen;
+	int rc;
+
+	header = (ip_header_ref) packet_get_data(packet);
+	if (!header)
+		return ip_release_and_return(packet, ENOMEM);
+
+	// checksum
+	if ((header->header_checksum) &&
+	    (IP_HEADER_CHECKSUM(header) != IP_CHECKSUM_ZERO)) {
+		phone = ip_prepare_icmp_and_get_phone(0, packet, header);
+		if (phone >= 0) {
+			// checksum error ICMP
+			icmp_parameter_problem_msg(phone, ICMP_PARAM_POINTER,
+			    ((size_t) ((void *) &header->header_checksum)) -
+			    ((size_t) ((void *) header)), packet);
+		}
+		return EINVAL;
+	}
+
+	if (header->ttl <= 1) {
+		phone = ip_prepare_icmp_and_get_phone(0, packet, header);
+		if (phone >= 0) {
+			// ttl exceeded ICMP
+			icmp_time_exceeded_msg(phone, ICMP_EXC_TTL, packet);
+		}
+		return EINVAL;
+	}
+
+	// process ipopt and get destination
+	dest = ip_get_destination(header);
+
+	// set the addrination address
+	switch (header->version) {
+	case IPVERSION:
+		addrlen = sizeof(addr_in);
+		bzero(&addr_in, addrlen);
+		addr_in.sin_family = AF_INET;
+		memcpy(&addr_in.sin_addr.s_addr, &dest, sizeof(dest));
+		addr = (struct sockaddr *) &addr_in;
+		break;
+
+	default:
+		return ip_release_and_return(packet, EAFNOSUPPORT);
+	}
+
+	rc = packet_set_addr(packet, NULL, (uint8_t *) &addr, addrlen);
+	if (rc != EOK)
+		return rc;
+
+	route = ip_find_route(dest);
+	if (!route) {
+		phone = ip_prepare_icmp_and_get_phone(0, packet, header);
+		if (phone >= 0) {
+			// unreachable ICMP
+			icmp_destination_unreachable_msg(phone,
+			    ICMP_HOST_UNREACH, 0, packet);
+		}
+		return ENOENT;
+	}
+
+	if (route->address.s_addr == dest.s_addr) {
+		// local delivery
+		return ip_deliver_local(device_id, packet, header, 0);
+	}
+
+	if (route->netif->routing) {
+		header->ttl--;
+		return ip_send_route(packet, route->netif, route, NULL, dest,
+		    0);
+	}
+
+	phone = ip_prepare_icmp_and_get_phone(0, packet, header);
+	if (phone >= 0) {
+		// unreachable ICMP if no routing
+		icmp_destination_unreachable_msg(phone, ICMP_HOST_UNREACH, 0,
+		    packet);
+	}
+	
+	return ENOENT;
+}
+
+static int
+ip_add_route_req_local(int ip_phone, device_id_t device_id, in_addr_t address,
+    in_addr_t netmask, in_addr_t gateway)
+{
+	ip_route_ref route;
+	ip_netif_ref netif;
+	int index;
+
+	fibril_rwlock_write_lock(&ip_globals.netifs_lock);
+
+	netif = ip_netifs_find(&ip_globals.netifs, device_id);
+	if (!netif) {
+		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+		return ENOENT;
+	}
+
+	route = (ip_route_ref) malloc(sizeof(ip_route_t));
+	if (!route) {
+		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+		return ENOMEM;
+	}
+
+	route->address.s_addr = address.s_addr;
+	route->netmask.s_addr = netmask.s_addr;
+	route->gateway.s_addr = gateway.s_addr;
+	route->netif = netif;
+	index = ip_routes_add(&netif->routes, route);
+	if (index < 0)
+		free(route);
+
+	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+	
+	return index;
+}
+
+static int
+ip_set_gateway_req_local(int ip_phone, device_id_t device_id, in_addr_t gateway)
+{
+	ip_netif_ref netif;
+
+	fibril_rwlock_write_lock(&ip_globals.netifs_lock);
+
+	netif = ip_netifs_find(&ip_globals.netifs, device_id);
+	if (!netif) {
+		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+		return ENOENT;
+	}
+
+	ip_globals.gateway.address.s_addr = 0;
+	ip_globals.gateway.netmask.s_addr = 0;
+	ip_globals.gateway.gateway.s_addr = gateway.s_addr;
+	ip_globals.gateway.netif = netif;
+	
+	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
+	
+	return EOK;
+}
+
+/** Notify the IP module about the received error notification packet.
+ *
+ * @param[in] ip_phone	The IP module phone used for (semi)remote calls.
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The received packet or the received packet queue.
+ * @param[in] target	The target internetwork module service to be
+ *			delivered to.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @return		EOK on success.
+ *
+ */
+static int
+ip_received_error_msg_local(int ip_phone, device_id_t device_id,
+    packet_t packet, services_t target, services_t error)
+{
+	uint8_t *data;
+	int offset;
+	icmp_type_t type;
+	icmp_code_t code;
+	ip_netif_ref netif;
+	measured_string_t address;
+	ip_route_ref route;
+	ip_header_ref header;
+
+	switch (error) {
+	case SERVICE_ICMP:
+		offset = icmp_client_process_packet(packet, &type, &code, NULL,
+		    NULL);
+		if (offset < 0)
+			return ip_release_and_return(packet, ENOMEM);
+
+		data = packet_get_data(packet);
+		header = (ip_header_ref)(data + offset);
+
+		// destination host unreachable?
+		if ((type != ICMP_DEST_UNREACH) ||
+		    (code != ICMP_HOST_UNREACH)) {
+		    	// no, something else
+			break;
+		}
+
+		fibril_rwlock_read_lock(&ip_globals.netifs_lock);
+
+		netif = ip_netifs_find(&ip_globals.netifs, device_id);
+		if (!netif || !netif->arp) {
+			fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+			break;
+		}
+
+		route = ip_routes_get_index(&netif->routes, 0);
+
+		// from the same network?
+		if (route && ((route->address.s_addr & route->netmask.s_addr) ==
+		    (header->destination_address & route->netmask.s_addr))) {
+			// clear the ARP mapping if any
+			address.value = (char *) &header->destination_address;
+			address.length = CONVERT_SIZE(uint8_t, char,
+			    sizeof(header->destination_address));
+			arp_clear_address_req(netif->arp->phone,
+			    netif->device_id, SERVICE_IP, &address);
+		}
+
+		fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
+		break;
+
+	default:
+		return ip_release_and_return(packet, ENOTSUP);
+	}
+
+	return ip_deliver_local(device_id, packet, header, error);
+}
+
+static int
+ip_get_route_req_local(int ip_phone, ip_protocol_t protocol,
+    const struct sockaddr *destination, socklen_t addrlen,
+    device_id_t *device_id, void **header, size_t *headerlen)
+{
+	struct sockaddr_in *address_in;
+	in_addr_t *dest;
+	in_addr_t *src;
+	ip_route_ref route;
+	ipv4_pseudo_header_ref header_in;
+
+	if (!destination || (addrlen <= 0))
+		return EINVAL;
+
+	if (!device_id || !header || !headerlen)
+		return EBADMEM;
+
+	if ((size_t) addrlen < sizeof(struct sockaddr))
+		return EINVAL;
+
+	switch (destination->sa_family) {
+	case AF_INET:
+		if (addrlen != sizeof(struct sockaddr_in))
+			return EINVAL;
+		address_in = (struct sockaddr_in *) destination;
+		dest = &address_in->sin_addr;
+		if (!dest->s_addr)
+			dest->s_addr = IPV4_LOCALHOST_ADDRESS;
+		break;
+
+	case AF_INET6:
+	default:
+		return EAFNOSUPPORT;
+	}
+
+	fibril_rwlock_read_lock(&ip_globals.lock);
+	route = ip_find_route(*dest);
+	// if the local host is the destination
+	if (route && (route->address.s_addr == dest->s_addr) &&
+	    (dest->s_addr != IPV4_LOCALHOST_ADDRESS)) {
+		// find the loopback device to deliver
+		dest->s_addr = IPV4_LOCALHOST_ADDRESS;
+		route = ip_find_route(*dest);
+	}
+
+	if (!route || !route->netif) {
+		fibril_rwlock_read_unlock(&ip_globals.lock);
+		return ENOENT;
+	}
+
+	*device_id = route->netif->device_id;
+	src = ip_netif_address(route->netif);
+	fibril_rwlock_read_unlock(&ip_globals.lock);
+
+	*headerlen = sizeof(*header_in);
+	header_in = (ipv4_pseudo_header_ref) malloc(*headerlen);
+	if (!header_in)
+		return ENOMEM;
+
+	bzero(header_in, *headerlen);
+	header_in->destination_address = dest->s_addr;
+	header_in->source_address = src->s_addr;
+	header_in->protocol = protocol;
+	header_in->data_length = 0;
+	*header = header_in;
+
+	return EOK;
+}
+
+/** Processes the received IP packet or the packet queue one by one.
+ *
+ * The packet is either passed to another module or released on error.
+ *
+ * @param[in] device_id	The source device identifier.
+ * @param[in,out] packet The received packet.
+ * @returns		EOK on success and the packet is no longer needed.
+ * @returns		EINVAL if the packet is too small to carry the IP
+ *			packet.
+ * @returns		EINVAL if the received address lengths differs from the
+ *			registered values.
+ * @returns		ENOENT if the device is not found in the cache.
+ * @returns		ENOENT if the protocol for the device is not found in
+ *			the cache.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+static int ip_receive_message(device_id_t device_id, packet_t packet)
+{
+	packet_t next;
+
+	do {
+		next = pq_detach(packet);
+		ip_process_packet(device_id, packet);
+		packet = next;
+	} while (packet);
+
+	return EOK;
+}
+
+/** Processes the IP message.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if the message is not known.
+ *
+ * @see ip_interface.h
+ * @see il_interface.h
+ * @see IS_NET_IP_MESSAGE()
+ */
+int
+ip_message_standalone(ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer,
+    int *answer_count)
+{
 	packet_t packet;
 	struct sockaddr *addr;
@@ -901,64 +1899,93 @@
 	size_t headerlen;
 	device_id_t device_id;
+	int rc;
 	
 	*answer_count = 0;
 	switch (IPC_GET_METHOD(*call)) {
-		case IPC_M_PHONE_HUNGUP:
-			return EOK;
-		case NET_IL_DEVICE:
-			return ip_device_req_local(0, IPC_GET_DEVICE(call),
-			    IPC_GET_SERVICE(call));
-		case IPC_M_CONNECT_TO_ME:
-			return ip_register(IL_GET_PROTO(call), IL_GET_SERVICE(call),
-			    IPC_GET_PHONE(call), NULL);
-		case NET_IL_SEND:
-			ERROR_PROPAGATE(packet_translate_remote(ip_globals.net_phone, &packet,
-			    IPC_GET_PACKET(call)));
-			return ip_send_msg_local(0, IPC_GET_DEVICE(call), packet, 0,
-			    IPC_GET_ERROR(call));
-		case NET_IL_DEVICE_STATE:
-			return ip_device_state_message(IPC_GET_DEVICE(call),
-			    IPC_GET_STATE(call));
-		case NET_IL_RECEIVED:
-			ERROR_PROPAGATE(packet_translate_remote(ip_globals.net_phone, &packet,
-			    IPC_GET_PACKET(call)));
-			return ip_receive_message(IPC_GET_DEVICE(call), packet);
-		case NET_IP_RECEIVED_ERROR:
-			ERROR_PROPAGATE(packet_translate_remote(ip_globals.net_phone, &packet,
-			    IPC_GET_PACKET(call)));
-			return ip_received_error_msg_local(0, IPC_GET_DEVICE(call), packet,
-			    IPC_GET_TARGET(call), IPC_GET_ERROR(call));
-		case NET_IP_ADD_ROUTE:
-			return ip_add_route_req_local(0, IPC_GET_DEVICE(call),
-			    IP_GET_ADDRESS(call), IP_GET_NETMASK(call), IP_GET_GATEWAY(call));
-		case NET_IP_SET_GATEWAY:
-			return ip_set_gateway_req_local(0, IPC_GET_DEVICE(call),
-			    IP_GET_GATEWAY(call));
-		case NET_IP_GET_ROUTE:
-			ERROR_PROPAGATE(data_receive((void **) &addr, &addrlen));
-			ERROR_PROPAGATE(ip_get_route_req_local(0, IP_GET_PROTOCOL(call),
-			    addr, (socklen_t) addrlen, &device_id, &header, &headerlen));
-			IPC_SET_DEVICE(answer, device_id);
-			IP_SET_HEADERLEN(answer, headerlen);
+	case IPC_M_PHONE_HUNGUP:
+		return EOK;
+	
+	case IPC_M_CONNECT_TO_ME:
+		return ip_register(IL_GET_PROTO(call), IL_GET_SERVICE(call),
+		    IPC_GET_PHONE(call), NULL);
+	
+	case NET_IL_DEVICE:
+		return ip_device_req_local(0, IPC_GET_DEVICE(call),
+		    IPC_GET_SERVICE(call));
+	
+	case NET_IL_SEND:
+		rc = packet_translate_remote(ip_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return ip_send_msg_local(0, IPC_GET_DEVICE(call), packet, 0,
+		    IPC_GET_ERROR(call));
+	
+	case NET_IL_DEVICE_STATE:
+		return ip_device_state_message(IPC_GET_DEVICE(call),
+		    IPC_GET_STATE(call));
+	
+	case NET_IL_RECEIVED:
+		rc = packet_translate_remote(ip_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return ip_receive_message(IPC_GET_DEVICE(call), packet);
+	
+	case NET_IP_RECEIVED_ERROR:
+		rc = packet_translate_remote(ip_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return ip_received_error_msg_local(0, IPC_GET_DEVICE(call),
+		    packet, IPC_GET_TARGET(call), IPC_GET_ERROR(call));
+	
+	case NET_IP_ADD_ROUTE:
+		return ip_add_route_req_local(0, IPC_GET_DEVICE(call),
+		    IP_GET_ADDRESS(call), IP_GET_NETMASK(call),
+		    IP_GET_GATEWAY(call));
+
+	case NET_IP_SET_GATEWAY:
+		return ip_set_gateway_req_local(0, IPC_GET_DEVICE(call),
+		    IP_GET_GATEWAY(call));
+
+	case NET_IP_GET_ROUTE:
+		rc = data_receive((void **) &addr, &addrlen);
+		if (rc != EOK)
+			return rc;
+		
+		rc = ip_get_route_req_local(0, IP_GET_PROTOCOL(call), addr,
+		    (socklen_t) addrlen, &device_id, &header, &headerlen);
+		if (rc != EOK)
+			return rc;
+		
+		IPC_SET_DEVICE(answer, device_id);
+		IP_SET_HEADERLEN(answer, headerlen);
+		
+		*answer_count = 2;
+		
+		rc = data_reply(&headerlen, sizeof(headerlen));
+		if (rc == EOK)
+			rc = data_reply(header, headerlen);
 			
-			*answer_count = 2;
-			
-			if (!ERROR_OCCURRED(data_reply(&headerlen, sizeof(headerlen))))
-				ERROR_CODE = data_reply(header, headerlen);
-			
-			free(header);
-			return ERROR_CODE;
-		case NET_IL_PACKET_SPACE:
-			ERROR_PROPAGATE(ip_packet_size_message(IPC_GET_DEVICE(call),
-			    &addrlen, &prefix, &content, &suffix));
-			IPC_SET_ADDR(answer, addrlen);
-			IPC_SET_PREFIX(answer, prefix);
-			IPC_SET_CONTENT(answer, content);
-			IPC_SET_SUFFIX(answer, suffix);
-			*answer_count = 4;
-			return EOK;
-		case NET_IL_MTU_CHANGED:
-			return ip_mtu_changed_message(IPC_GET_DEVICE(call),
-			    IPC_GET_MTU(call));
+		free(header);
+		return rc;
+	
+	case NET_IL_PACKET_SPACE:
+		rc = ip_packet_size_message(IPC_GET_DEVICE(call), &addrlen,
+		    &prefix, &content, &suffix);
+		if (rc != EOK)
+			return rc;
+		
+		IPC_SET_ADDR(answer, addrlen);
+		IPC_SET_PREFIX(answer, prefix);
+		IPC_SET_CONTENT(answer, content);
+		IPC_SET_SUFFIX(answer, suffix);
+		*answer_count = 4;
+		return EOK;
+	
+	case NET_IL_MTU_CHANGED:
+		return ip_mtu_changed_message(IPC_GET_DEVICE(call),
+		    IPC_GET_MTU(call));
 	}
 	
@@ -966,704 +1993,10 @@
 }
 
-int ip_packet_size_req_local(int ip_phone, device_id_t device_id,
-    packet_dimension_ref packet_dimension)
-{
-	if (!packet_dimension)
-		return EBADMEM;
-	
-	return ip_packet_size_message(device_id, &packet_dimension->addr_len,
-	    &packet_dimension->prefix, &packet_dimension->content,
-	    &packet_dimension->suffix);
-}
-
-int ip_packet_size_message(device_id_t device_id, size_t * addr_len, size_t * prefix, size_t * content, size_t * suffix){
-	ip_netif_ref netif;
-	int index;
-
-	if(!(addr_len && prefix && content && suffix)){
-		return EBADMEM;
-	}
-	*content = IP_MAX_CONTENT - IP_PREFIX;
-	fibril_rwlock_read_lock(&ip_globals.netifs_lock);
-	if(device_id < 0){
-		*addr_len = IP_ADDR;
-		*prefix = 0;
-		*suffix = 0;
-		for(index = ip_netifs_count(&ip_globals.netifs) - 1; index >= 0; -- index){
-			netif = ip_netifs_get_index(&ip_globals.netifs, index);
-			if(netif){
-				if(netif->packet_dimension.addr_len > * addr_len){
-					*addr_len = netif->packet_dimension.addr_len;
-				}
-				if(netif->packet_dimension.prefix > * prefix){
-					*prefix = netif->packet_dimension.prefix;
-				}
-				if(netif->packet_dimension.suffix > * suffix){
-					*suffix = netif->packet_dimension.suffix;
-				}
-			}
-		}
-		*prefix = * prefix + IP_PREFIX;
-		*suffix = * suffix + IP_SUFFIX;
-	}else{
-		netif = ip_netifs_find(&ip_globals.netifs, device_id);
-		if(! netif){
-			fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
-			return ENOENT;
-		}
-		*addr_len = (netif->packet_dimension.addr_len > IP_ADDR) ? netif->packet_dimension.addr_len : IP_ADDR;
-		*prefix = netif->packet_dimension.prefix + IP_PREFIX;
-		*suffix = netif->packet_dimension.suffix + IP_SUFFIX;
-	}
-	fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
-	return EOK;
-}
-
-int ip_add_route_req_local(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway){
-	ip_route_ref route;
-	ip_netif_ref netif;
-	int index;
-
-	fibril_rwlock_write_lock(&ip_globals.netifs_lock);
-	netif = ip_netifs_find(&ip_globals.netifs, device_id);
-	if(! netif){
-		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
-		return ENOENT;
-	}
-	route = (ip_route_ref) malloc(sizeof(ip_route_t));
-	if(! route){
-		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
-		return ENOMEM;
-	}
-	route->address.s_addr = address.s_addr;
-	route->netmask.s_addr = netmask.s_addr;
-	route->gateway.s_addr = gateway.s_addr;
-	route->netif = netif;
-	index = ip_routes_add(&netif->routes, route);
-	if(index < 0){
-		free(route);
-	}
-	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
-	return index;
-}
-
-ip_route_ref ip_find_route(in_addr_t destination){
-	int index;
-	ip_route_ref route;
-	ip_netif_ref netif;
-
-	// start with the last netif - the newest one
-	index = ip_netifs_count(&ip_globals.netifs) - 1;
-	while(index >= 0){
-		netif = ip_netifs_get_index(&ip_globals.netifs, index);
-		if(netif && (netif->state == NETIF_ACTIVE)){
-			route = ip_netif_find_route(netif, destination);
-			if(route){
-				return route;
-			}
-		}
-		-- index;
-	}
-	return &ip_globals.gateway;
-}
-
-ip_route_ref ip_netif_find_route(ip_netif_ref netif, in_addr_t destination){
-	int index;
-	ip_route_ref route;
-
-	if(netif){
-		// start with the first one - the direct route
-		for(index = 0; index < ip_routes_count(&netif->routes); ++ index){
-			route = ip_routes_get_index(&netif->routes, index);
-			if(route && ((route->address.s_addr &route->netmask.s_addr) == (destination.s_addr &route->netmask.s_addr))){
-				return route;
-			}
-		}
-	}
-	return NULL;
-}
-
-int ip_set_gateway_req_local(int ip_phone, device_id_t device_id, in_addr_t gateway)
-{
-	ip_netif_ref netif;
-
-	fibril_rwlock_write_lock(&ip_globals.netifs_lock);
-	netif = ip_netifs_find(&ip_globals.netifs, device_id);
-	if(! netif){
-		fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
-		return ENOENT;
-	}
-	ip_globals.gateway.address.s_addr = 0;
-	ip_globals.gateway.netmask.s_addr = 0;
-	ip_globals.gateway.gateway.s_addr = gateway.s_addr;
-	ip_globals.gateway.netif = netif;
-	fibril_rwlock_write_unlock(&ip_globals.netifs_lock);
-	return EOK;
-}
-
-packet_t ip_split_packet(packet_t packet, size_t prefix, size_t content, size_t suffix, socklen_t addr_len, services_t error){
-	size_t length;
-	packet_t next;
-	packet_t new_packet;
-	int result;
-	int phone;
-
-	next = packet;
-	// check all packets
-	while(next){
-		length = packet_get_data_length(next);
-		// too long?
-		if(length > content){
-			result = ip_fragment_packet(next, content, prefix, suffix, addr_len);
-			if(result != EOK){
-				new_packet = pq_detach(next);
-				if(next == packet){
-					// the new first packet of the queue
-					packet = new_packet;
-				}
-				// fragmentation needed?
-				if(result == EPERM){
-					phone = ip_prepare_icmp_and_get_phone(error, next, NULL);
-					if(phone >= 0){
-						// fragmentation necessary ICMP
-						icmp_destination_unreachable_msg(phone, ICMP_FRAG_NEEDED, content, next);
-					}
-				}else{
-					pq_release_remote(ip_globals.net_phone, packet_get_id(next));
-				}
-				next = new_packet;
-				continue;
-			}
-		}
-		next = pq_next(next);
-	}
-	return packet;
-}
-
-int ip_fragment_packet(packet_t packet, size_t length, size_t prefix, size_t suffix, socklen_t addr_len){
-	ERROR_DECLARE;
-
-	packet_t new_packet;
-	ip_header_ref header;
-	ip_header_ref middle_header;
-	ip_header_ref last_header;
-	struct sockaddr * src;
-	struct sockaddr * dest;
-	socklen_t addrlen;
-	int result;
-
-	result = packet_get_addr(packet, (uint8_t **) &src, (uint8_t **) &dest);
-	if(result <= 0){
-		return EINVAL;
-	}
-	addrlen = (socklen_t) result;
-	if(packet_get_data_length(packet) <= sizeof(ip_header_t)){
-		return ENOMEM;
-	}
-	// get header
-	header = (ip_header_ref) packet_get_data(packet);
-	if(! header){
-		return EINVAL;
-	}
-	// fragmentation forbidden?
-	if(header->flags &IPFLAG_DONT_FRAGMENT){
-		return EPERM;
-	}
-	// create the last fragment
-	new_packet = packet_get_4_remote(ip_globals.net_phone, prefix, length, suffix, ((addrlen > addr_len) ? addrlen : addr_len));
-	if(! new_packet){
-		return ENOMEM;
-	}
-	// allocate as much as originally
-	last_header = (ip_header_ref) packet_suffix(new_packet, IP_HEADER_LENGTH(header));
-	if(! last_header){
-		return ip_release_and_return(packet, ENOMEM);
-	}
-	ip_create_last_header(last_header, header);
-	// trim the unused space
-	if(ERROR_OCCURRED(packet_trim(new_packet, 0, IP_HEADER_LENGTH(header) - IP_HEADER_LENGTH(last_header)))){
-		return ip_release_and_return(packet, ERROR_CODE);
-	}
-	// biggest multiple of 8 lower than content
-	// TODO even fragmentation?
-	length = length &(~ 0x7);// (content / 8) * 8
-	if(ERROR_OCCURRED(ip_fragment_packet_data(packet, new_packet, header, last_header, ((IP_HEADER_DATA_LENGTH(header) - ((length - IP_HEADER_LENGTH(header)) &(~ 0x7))) % ((length - IP_HEADER_LENGTH(last_header)) &(~ 0x7))), src, dest, addrlen))){
-		return ip_release_and_return(packet, ERROR_CODE);
-	}
-	// mark the first as fragmented
-	header->flags |= IPFLAG_MORE_FRAGMENTS;
-	// create middle framgents
-	while(IP_TOTAL_LENGTH(header) > length){
-		new_packet = packet_get_4_remote(ip_globals.net_phone, prefix, length, suffix, ((addrlen >= addr_len) ? addrlen : addr_len));
-		if(! new_packet){
-			return ENOMEM;
-		}
-		middle_header = ip_create_middle_header(new_packet, last_header);
-		if(! middle_header){
-			return ip_release_and_return(packet, ENOMEM);
-		}
-		if(ERROR_OCCURRED(ip_fragment_packet_data(packet, new_packet, header, middle_header, (length - IP_HEADER_LENGTH(middle_header)) &(~ 0x7), src, dest, addrlen))){
-			return ip_release_and_return(packet, ERROR_CODE);
-		}
-	}
-	// finish the first fragment
-	header->header_checksum = IP_HEADER_CHECKSUM(header);
-	return EOK;
-}
-
-int ip_fragment_packet_data(packet_t packet, packet_t new_packet, ip_header_ref header, ip_header_ref new_header, size_t length, const struct sockaddr * src, const struct sockaddr * dest, socklen_t addrlen){
-	ERROR_DECLARE;
-
-	void * data;
-	size_t offset;
-
-	data = packet_suffix(new_packet, length);
-	if(! data){
-		return ENOMEM;
-	}
-	memcpy(data, ((void *) header) + IP_TOTAL_LENGTH(header) - length, length);
-	ERROR_PROPAGATE(packet_trim(packet, 0, length));
-	header->total_length = htons(IP_TOTAL_LENGTH(header) - length);
-	new_header->total_length = htons(IP_HEADER_LENGTH(new_header) + length);
-	offset = IP_FRAGMENT_OFFSET(header) + IP_HEADER_DATA_LENGTH(header);
-	new_header->fragment_offset_high = IP_COMPUTE_FRAGMENT_OFFSET_HIGH(offset);
-	new_header->fragment_offset_low = IP_COMPUTE_FRAGMENT_OFFSET_LOW(offset);
-	new_header->header_checksum = IP_HEADER_CHECKSUM(new_header);
-	ERROR_PROPAGATE(packet_set_addr(new_packet, (const uint8_t *) src, (const uint8_t *) dest, addrlen));
-	return pq_insert_after(packet, new_packet);
-}
-
-ip_header_ref ip_create_middle_header(packet_t packet, ip_header_ref last){
-	ip_header_ref middle;
-
-	middle = (ip_header_ref) packet_suffix(packet, IP_HEADER_LENGTH(last));
-	if(! middle){
-		return NULL;
-	}
-	memcpy(middle, last, IP_HEADER_LENGTH(last));
-	middle->flags |= IPFLAG_MORE_FRAGMENTS;
-	return middle;
-}
-
-void ip_create_last_header(ip_header_ref last, ip_header_ref first){
-	ip_option_ref option;
-	size_t next;
-	size_t length;
-
-	// copy first itself
-	memcpy(last, first, sizeof(ip_header_t));
-	length = sizeof(ip_header_t);
-	next = sizeof(ip_header_t);
-	// process all ip options
-	while(next < first->header_length){
-		option = (ip_option_ref) (((uint8_t *) first) + next);
-		// skip end or noop
-		if((option->type == IPOPT_END) || (option->type == IPOPT_NOOP)){
-			++ next;
-		}else{
-			// copy if said so or skip
-			if(IPOPT_COPIED(option->type)){
-				memcpy(((uint8_t *) last) + length, ((uint8_t *) first) + next, option->length);
-				length += option->length;
-			}
-			// next option
-			next += option->length;
-		}
-	}
-	// align 4 byte boundary
-	if(length % 4){
-		bzero(((uint8_t *) last) + length, 4 - (length % 4));
-		last->header_length = length / 4 + 1;
-	}else{
-		last->header_length = length / 4;
-	}
-	last->header_checksum = 0;
-}
-
-int ip_receive_message(device_id_t device_id, packet_t packet){
-	packet_t next;
-
-	do{
-		next = pq_detach(packet);
-		ip_process_packet(device_id, packet);
-		packet = next;
-	}while(packet);
-	return EOK;
-}
-
-int ip_process_packet(device_id_t device_id, packet_t packet){
-	ERROR_DECLARE;
-
-	ip_header_ref header;
-	in_addr_t dest;
-	ip_route_ref route;
-	int phone;
-	struct sockaddr * addr;
-	struct sockaddr_in addr_in;
-//	struct sockaddr_in	addr_in6;
-	socklen_t addrlen;
-
-	header = (ip_header_ref) packet_get_data(packet);
-	if(! header){
-		return ip_release_and_return(packet, ENOMEM);
-	}
-	// checksum
-	if((header->header_checksum) && (IP_HEADER_CHECKSUM(header) != IP_CHECKSUM_ZERO)){
-		phone = ip_prepare_icmp_and_get_phone(0, packet, header);
-		if(phone >= 0){
-			// checksum error ICMP
-			icmp_parameter_problem_msg(phone, ICMP_PARAM_POINTER, ((size_t) ((void *) &header->header_checksum)) - ((size_t) ((void *) header)), packet);
-		}
-		return EINVAL;
-	}
-	if(header->ttl <= 1){
-		phone = ip_prepare_icmp_and_get_phone(0, packet, header);
-		if(phone >= 0){
-			// ttl oxceeded ICMP
-			icmp_time_exceeded_msg(phone, ICMP_EXC_TTL, packet);
-		}
-		return EINVAL;
-	}
-	// process ipopt and get destination
-	dest = ip_get_destination(header);
-	// set the addrination address
-	switch(header->version){
-		case IPVERSION:
-			addrlen = sizeof(addr_in);
-			bzero(&addr_in, addrlen);
-			addr_in.sin_family = AF_INET;
-			memcpy(&addr_in.sin_addr.s_addr, &dest, sizeof(dest));
-			addr = (struct sockaddr *) &addr_in;
-			break;
-/*		case IPv6VERSION:
-			addrlen = sizeof(dest_in6);
-			bzero(&dest_in6, addrlen);
-			dest_in6.sin6_family = AF_INET6;
-			memcpy(&dest_in6.sin6_addr.s6_addr,);
-			dest = (struct sockaddr *) &dest_in;
-			break;
-*/		default:
-			return ip_release_and_return(packet, EAFNOSUPPORT);
-	}
-	ERROR_PROPAGATE(packet_set_addr(packet, NULL, (uint8_t *) &addr, addrlen));
-	route = ip_find_route(dest);
-	if(! route){
-		phone = ip_prepare_icmp_and_get_phone(0, packet, header);
-		if(phone >= 0){
-			// unreachable ICMP
-			icmp_destination_unreachable_msg(phone, ICMP_HOST_UNREACH, 0, packet);
-		}
-		return ENOENT;
-	}
-	if(route->address.s_addr == dest.s_addr){
-		// local delivery
-		return ip_deliver_local(device_id, packet, header, 0);
-	}else{
-		// only if routing enabled
-		if(route->netif->routing){
-			-- header->ttl;
-			return ip_send_route(packet, route->netif, route, NULL, dest, 0);
-		}else{
-			phone = ip_prepare_icmp_and_get_phone(0, packet, header);
-			if(phone >= 0){
-				// unreachable ICMP if no routing
-				icmp_destination_unreachable_msg(phone, ICMP_HOST_UNREACH, 0, packet);
-			}
-			return ENOENT;
-		}
-	}
-}
-
-/** Notify the IP module about the received error notification packet.
- *
- * @param[in] ip_phone  The IP module phone used for (semi)remote calls.
- * @param[in] device_id The device identifier.
- * @param[in] packet    The received packet or the received packet queue.
- * @param[in] target    The target internetwork module service to be
- *                      delivered to.
- * @param[in] error     The packet error reporting service. Prefixes the
- *                      received packet.
- *
- * @return EOK on success.
- *
- */
-int ip_received_error_msg_local(int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error){
-	uint8_t * data;
-	int offset;
-	icmp_type_t type;
-	icmp_code_t code;
-	ip_netif_ref netif;
-	measured_string_t address;
-	ip_route_ref route;
-	ip_header_ref header;
-
-	switch(error){
-		case SERVICE_ICMP:
-			offset = icmp_client_process_packet(packet, &type, &code, NULL, NULL);
-			if(offset < 0){
-				return ip_release_and_return(packet, ENOMEM);
-			}
-			data = packet_get_data(packet);
-			header = (ip_header_ref)(data + offset);
-			// destination host unreachable?
-			if((type == ICMP_DEST_UNREACH) && (code == ICMP_HOST_UNREACH)){
-				fibril_rwlock_read_lock(&ip_globals.netifs_lock);
-				netif = ip_netifs_find(&ip_globals.netifs, device_id);
-				if(netif && netif->arp){
-					route = ip_routes_get_index(&netif->routes, 0);
-					// from the same network?
-					if(route && ((route->address.s_addr &route->netmask.s_addr) == (header->destination_address &route->netmask.s_addr))){
-						// clear the ARP mapping if any
-						address.value = (char *) &header->destination_address;
-						address.length = CONVERT_SIZE(uint8_t, char, sizeof(header->destination_address));
-						arp_clear_address_req(netif->arp->phone, netif->device_id, SERVICE_IP, &address);
-					}
-				}
-				fibril_rwlock_read_unlock(&ip_globals.netifs_lock);
-			}
-			break;
-		default:
-			return ip_release_and_return(packet, ENOTSUP);
-	}
-	return ip_deliver_local(device_id, packet, header, error);
-}
-
-int ip_deliver_local(device_id_t device_id, packet_t packet, ip_header_ref header, services_t error){
-	ERROR_DECLARE;
-
-	ip_proto_ref proto;
-	int phone;
-	services_t service;
-	tl_received_msg_t received_msg;
-	struct sockaddr * src;
-	struct sockaddr * dest;
-	struct sockaddr_in src_in;
-	struct sockaddr_in dest_in;
-//	struct sockaddr_in	src_in6;
-//	struct sockaddr_in	dest_in6;
-	socklen_t addrlen;
-
-	if((header->flags &IPFLAG_MORE_FRAGMENTS) || IP_FRAGMENT_OFFSET(header)){
-		// TODO fragmented
-		return ENOTSUP;
-	}else{
-		switch(header->version){
-			case IPVERSION:
-				addrlen = sizeof(src_in);
-				bzero(&src_in, addrlen);
-				src_in.sin_family = AF_INET;
-				memcpy(&dest_in, &src_in, addrlen);
-				memcpy(&src_in.sin_addr.s_addr, &header->source_address, sizeof(header->source_address));
-				memcpy(&dest_in.sin_addr.s_addr, &header->destination_address, sizeof(header->destination_address));
-				src = (struct sockaddr *) &src_in;
-				dest = (struct sockaddr *) &dest_in;
-				break;
-/*			case IPv6VERSION:
-				addrlen = sizeof(src_in6);
-				bzero(&src_in6, addrlen);
-				src_in6.sin6_family = AF_INET6;
-				memcpy(&dest_in6, &src_in6, addrlen);
-				memcpy(&src_in6.sin6_addr.s6_addr,);
-				memcpy(&dest_in6.sin6_addr.s6_addr,);
-				src = (struct sockaddr *) &src_in;
-				dest = (struct sockaddr *) &dest_in;
-				break;
-*/			default:
-				return ip_release_and_return(packet, EAFNOSUPPORT);
-		}
-		if(ERROR_OCCURRED(packet_set_addr(packet, (uint8_t *) src, (uint8_t *) dest, addrlen))){
-			return ip_release_and_return(packet, ERROR_CODE);
-		}
-		// trim padding if present
-		if((! error) && (IP_TOTAL_LENGTH(header) < packet_get_data_length(packet))){
-			if(ERROR_OCCURRED(packet_trim(packet, 0, packet_get_data_length(packet) - IP_TOTAL_LENGTH(header)))){
-				return ip_release_and_return(packet, ERROR_CODE);
-			}
-		}
-		fibril_rwlock_read_lock(&ip_globals.protos_lock);
-		proto = ip_protos_find(&ip_globals.protos, header->protocol);
-		if(! proto){
-			fibril_rwlock_read_unlock(&ip_globals.protos_lock);
-			phone = ip_prepare_icmp_and_get_phone(error, packet, header);
-			if(phone >= 0){
-				// unreachable ICMP
-				icmp_destination_unreachable_msg(phone, ICMP_PROT_UNREACH, 0, packet);
-			}
-			return ENOENT;
-		}
-		if(proto->received_msg){
-			service = proto->service;
-			received_msg = proto->received_msg;
-			fibril_rwlock_read_unlock(&ip_globals.protos_lock);
-			ERROR_CODE = received_msg(device_id, packet, service, error);
-		}else{
-			ERROR_CODE = tl_received_msg(proto->phone, device_id, packet, proto->service, error);
-			fibril_rwlock_read_unlock(&ip_globals.protos_lock);
-		}
-		return ERROR_CODE;
-	}
-}
-
-in_addr_t ip_get_destination(ip_header_ref header){
-	in_addr_t destination;
-
-	// TODO search set ipopt route?
-	destination.s_addr = header->destination_address;
-	return destination;
-}
-
-int ip_prepare_icmp(packet_t packet, ip_header_ref header){
-	packet_t next;
-	struct sockaddr * dest;
-	struct sockaddr_in dest_in;
-//	struct sockaddr_in	dest_in6;
-	socklen_t addrlen;
-
-	// detach the first packet and release the others
-	next = pq_detach(packet);
-	if(next){
-		pq_release_remote(ip_globals.net_phone, packet_get_id(next));
-	}
-	if(! header){
-		if(packet_get_data_length(packet) <= sizeof(ip_header_t)){
-			return ENOMEM;
-		}
-		// get header
-		header = (ip_header_ref) packet_get_data(packet);
-		if(! header){
-			return EINVAL;
-		}
-	}
-	// only for the first fragment
-	if(IP_FRAGMENT_OFFSET(header)){
-		return EINVAL;
-	}
-	// not for the ICMP protocol
-	if(header->protocol == IPPROTO_ICMP){
-		return EPERM;
-	}
-	// set the destination address
-	switch(header->version){
-		case IPVERSION:
-			addrlen = sizeof(dest_in);
-			bzero(&dest_in, addrlen);
-			dest_in.sin_family = AF_INET;
-			memcpy(&dest_in.sin_addr.s_addr, &header->source_address, sizeof(header->source_address));
-			dest = (struct sockaddr *) &dest_in;
-			break;
-/*		case IPv6VERSION:
-			addrlen = sizeof(dest_in6);
-			bzero(&dest_in6, addrlen);
-			dest_in6.sin6_family = AF_INET6;
-			memcpy(&dest_in6.sin6_addr.s6_addr,);
-			dest = (struct sockaddr *) &dest_in;
-			break;
-*/		default:
-			return EAFNOSUPPORT;
-	}
-	return packet_set_addr(packet, NULL, (uint8_t *) dest, addrlen);
-}
-
-int ip_get_icmp_phone(void){
-	ip_proto_ref proto;
-	int phone;
-
-	fibril_rwlock_read_lock(&ip_globals.protos_lock);
-	proto = ip_protos_find(&ip_globals.protos, IPPROTO_ICMP);
-	phone = proto ? proto->phone : ENOENT;
-	fibril_rwlock_read_unlock(&ip_globals.protos_lock);
-	return phone;
-}
-
-int ip_prepare_icmp_and_get_phone(services_t error, packet_t packet, ip_header_ref header){
-	int phone;
-
-	phone = ip_get_icmp_phone();
-	if(error || (phone < 0) || ip_prepare_icmp(packet, header)){
-		return ip_release_and_return(packet, EINVAL);
-	}
-	return phone;
-}
-
-int ip_release_and_return(packet_t packet, int result){
-	pq_release_remote(ip_globals.net_phone, packet_get_id(packet));
-	return result;
-}
-
-int ip_get_route_req_local(int ip_phone, ip_protocol_t protocol, const struct sockaddr * destination, socklen_t addrlen, device_id_t * device_id, void **header, size_t * headerlen){
-	struct sockaddr_in * address_in;
-//	struct sockaddr_in6 *	address_in6;
-	in_addr_t * dest;
-	in_addr_t * src;
-	ip_route_ref route;
-	ipv4_pseudo_header_ref header_in;
-
-	if(!(destination && (addrlen > 0))){
-		return EINVAL;
-	}
-	if(!(device_id && header && headerlen)){
-		return EBADMEM;
-	}
-	if((size_t) addrlen < sizeof(struct sockaddr)){
-		return EINVAL;
-	}
-	switch(destination->sa_family){
-		case AF_INET:
-			if(addrlen != sizeof(struct sockaddr_in)){
-				return EINVAL;
-			}
-			address_in = (struct sockaddr_in *) destination;
-			dest = &address_in->sin_addr;
-			if(! dest->s_addr){
-				dest->s_addr = IPV4_LOCALHOST_ADDRESS;
-			}
-			break;
-		// TODO IPv6
-/*		case AF_INET6:
-			if(addrlen != sizeof(struct sockaddr_in6)){
-				return EINVAL;
-			}
-			address_in6 = (struct sockaddr_in6 *) dest;
-			address_in6.sin6_addr.s6_addr;
-*/		default:
-			return EAFNOSUPPORT;
-	}
-	fibril_rwlock_read_lock(&ip_globals.lock);
-	route = ip_find_route(*dest);
-	// if the local host is the destination
-	if(route && (route->address.s_addr == dest->s_addr)
-		&& (dest->s_addr != IPV4_LOCALHOST_ADDRESS)){
-		// find the loopback device to deliver
-		dest->s_addr = IPV4_LOCALHOST_ADDRESS;
-		route = ip_find_route(*dest);
-	}
-	if(!(route && route->netif)){
-		fibril_rwlock_read_unlock(&ip_globals.lock);
-		return ENOENT;
-	}
-	*device_id = route->netif->device_id;
-	src = ip_netif_address(route->netif);
-	fibril_rwlock_read_unlock(&ip_globals.lock);
-	*headerlen = sizeof(*header_in);
-	header_in = (ipv4_pseudo_header_ref) malloc(*headerlen);
-	if(! header_in){
-		return ENOMEM;
-	}
-	bzero(header_in, * headerlen);
-	header_in->destination_address = dest->s_addr;
-	header_in->source_address = src->s_addr;
-	header_in->protocol = protocol;
-	header_in->data_length = 0;
-	*header = header_in;
-	return EOK;
-}
-
 /** Default thread for new connections.
  *
- *  @param[in] iid The initial message identifier.
- *  @param[in] icall The initial message call structure.
- *
- */
-static void il_client_connection(ipc_callid_t iid, ipc_call_t * icall)
+ * @param[in] iid	The initial message identifier.
+ * @param[in] icall	The initial message call structure.
+ */
+static void il_client_connection(ipc_callid_t iid, ipc_call_t *icall)
 {
 	/*
@@ -1673,5 +2006,5 @@
 	ipc_answer_0(iid, EOK);
 	
-	while(true) {
+	while (true) {
 		ipc_call_t answer;
 		int answer_count;
@@ -1688,7 +2021,12 @@
 		    &answer_count);
 		
-		/* End if said to either by the message or the processing result */
-		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+		/*
+		 * End if told to either by the message or the processing
+		 * result.
+		 */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
+		    (res == EHANGUP)) {
 			return;
+		}
 		
 		/* Answer the message */
@@ -1699,20 +2037,14 @@
 /** Starts the module.
  *
- *  @param argc The count of the command line arguments. Ignored parameter.
- *  @param argv The command line parameters. Ignored parameter.
- *
- *  @returns EOK on success.
- *  @returns Other error codes as defined for each specific module start function.
- *
+ * @returns EOK on success.
+ * @returns Other error codes as defined for each specific module start function.
  */
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	if (ERROR_OCCURRED(il_module_start_standalone(il_client_connection)))
-		return ERROR_CODE;
-	
-	return EOK;
+	rc = il_module_start_standalone(il_client_connection);
+	return rc;
 }
 
Index: uspace/srv/net/il/ip/ip.h
===================================================================
--- uspace/srv/net/il/ip/ip.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/ip/ip.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,13 +28,13 @@
 
 /** @addtogroup ip
- *  @{
+ * @{
  */
 
 /** @file
- *  IP module.
+ * IP module.
  */
 
-#ifndef __NET_IP_H__
-#define __NET_IP_H__
+#ifndef NET_IP_H_
+#define NET_IP_H_
 
 #include <fibril_synch.h>
@@ -50,27 +50,27 @@
 
 /** Type definition of the IP global data.
- *  @see ip_globals
+ * @see ip_globals
  */
-typedef struct ip_globals	ip_globals_t;
+typedef struct ip_globals ip_globals_t;
 
 /** Type definition of the IP network interface specific data.
- *  @see ip_netif
+ * @see ip_netif
  */
-typedef struct ip_netif	ip_netif_t;
+typedef struct ip_netif ip_netif_t;
 
 /** Type definition of the IP network interface specific data pointer.
- *  @see ip_netif
+ * @see ip_netif
  */
-typedef ip_netif_t *	ip_netif_ref;
+typedef ip_netif_t *ip_netif_ref;
 
 /** Type definition of the IP protocol specific data.
- *  @see ip_proto
+ * @see ip_proto
  */
-typedef struct ip_proto	ip_proto_t;
+typedef struct ip_proto ip_proto_t;
 
 /** Type definition of the IP protocol specific data pointer.
- *  @see ip_proto
+ * @see ip_proto
  */
-typedef ip_proto_t *	ip_proto_ref;
+typedef ip_proto_t *ip_proto_ref;
 
 /** Type definition of the IP route specific data.
@@ -82,128 +82,94 @@
  *  @see ip_route
  */
-typedef ip_route_t *	ip_route_ref;
+typedef ip_route_t *ip_route_ref;
 
 /** IP network interfaces.
- *  Maps devices to the IP network interface specific data.
- *  @see device.h
+ * Maps devices to the IP network interface specific data.
+ * @see device.h
  */
-DEVICE_MAP_DECLARE(ip_netifs, ip_netif_t)
+DEVICE_MAP_DECLARE(ip_netifs, ip_netif_t);
 
 /** IP registered protocols.
- *  Maps protocols to the IP protocol specific data.
- *  @see int_map.h
+ * Maps protocols to the IP protocol specific data.
+ * @see int_map.h
  */
-INT_MAP_DECLARE(ip_protos, ip_proto_t)
+INT_MAP_DECLARE(ip_protos, ip_proto_t);
 
 /** IP routing table.
- *  @see generic_field.h
+ * @see generic_field.h
  */
-GENERIC_FIELD_DECLARE(ip_routes, ip_route_t)
+GENERIC_FIELD_DECLARE(ip_routes, ip_route_t);
 
-/** IP network interface specific data.
- */
-struct	ip_netif{
-	/** ARP module.
-	 *  Assigned if using ARP.
-	 */
+/** IP network interface specific data. */
+struct ip_netif {
+	/** ARP module. Assigned if using ARP. */
 	module_ref arp;
-	/** Broadcast address.
-	 */
+	/** Broadcast address. */
 	in_addr_t broadcast;
-	/** Device identifier.
-	 */
+	/** Device identifier. */
 	device_id_t device_id;
-	/** Indicates whether using DHCP.
-	 */
+	/** Indicates whether using DHCP. */
 	int dhcp;
-	/** IP version.
-	 */
+	/** IP version. */
 	int ipv;
-	/** Packet dimension.
-	 */
+	/** Packet dimension. */
 	packet_dimension_t packet_dimension;
-	/** Netif module phone.
-	 */
+	/** Netif module phone. */
 	int phone;
-	/** Routing table.
-	 */
+	/** Routing table. */
 	ip_routes_t routes;
-	/** Indicates whether IP routing is enabled.
-	 */
+	/** Indicates whether IP routing is enabled. */
 	int routing;
-	/** Netif module service.
-	 */
+	/** Netif module service. */
 	services_t service;
-	/** Device state.
-	 */
+	/** Device state. */
 	device_state_t state;
 };
 
-/** IP protocol specific data.
- */
-struct ip_proto{
-	/** Protocol module phone.
-	 */
+/** IP protocol specific data. */
+struct ip_proto {
+	/** Protocol module phone. */
 	int phone;
-	/** Protocol number.
-	 */
+	/** Protocol number. */
 	int protocol;
-	/** Protocol packet receiving function.
-	 */
+	/** Protocol packet receiving function. */
 	tl_received_msg_t received_msg;
-	/** Protocol module service.
-	 */
+	/** Protocol module service. */
 	services_t service;
 };
 
-/** IP route specific data.
- */
-struct ip_route{
-	/** Target address.
-	 */
+/** IP route specific data. */
+struct ip_route {
+	/** Target address. */
 	in_addr_t address;
-	/** Gateway.
-	 */
+	/** Gateway. */
 	in_addr_t gateway;
-	/** Parent netif.
-	 */
+	/** Parent netif. */
 	ip_netif_ref netif;
-	/** Target network mask.
-	 */
+	/** Target network mask. */
 	in_addr_t netmask;
 };
 
-/** IP global data.
- */
-struct	ip_globals{
-	/** Default client connection function for support modules.
-	 */
+/** IP global data. */
+struct ip_globals {
+	/** Default client connection function for support modules. */
 	async_client_conn_t client_connection;
-	/** Default gateway.
-	 */
+	/** Default gateway. */
 	ip_route_t gateway;
-	/** Safety lock.
-	 */
+	/** Safety lock. */
 	fibril_rwlock_t lock;
-	/** Known support modules.
-	 */
+	/** Known support modules. */
 	modules_t modules;
-	/** Networking module phone.
-	 */
+	/** Networking module phone. */
 	int net_phone;
-	/** Registered network interfaces.
-	 */
+	/** Registered network interfaces. */
 	ip_netifs_t netifs;
-	/** Netifs safeyt lock.
-	 */
+	/** Netifs safeyt lock. */
 	fibril_rwlock_t netifs_lock;
-	/** Packet counter.
-	 */
+	/** Packet counter. */
 	uint16_t packet_counter;
-	/** Registered protocols.
-	 */
+	/** Registered protocols. */
 	ip_protos_t protos;
-	/** Protocols safety lock.
-	 */
+	/** Protocols safety lock. */
 	fibril_rwlock_t protos_lock;
 };
Index: pace/srv/net/il/ip/ip_local.h
===================================================================
--- uspace/srv/net/il/ip/ip_local.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(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 ip
- * @{
- */
-
-#ifndef NET_IP_LOCAL_H_
-#define NET_IP_LOCAL_H_
-
-#include <async.h>
-#include <ipc/services.h>
-
-#include <net/ip_codes.h>
-#include <net/inet.h>
-#include <net/in.h>
-
-extern int ip_received_error_msg_local(int, device_id_t, packet_t, services_t,
-    services_t);
-extern int ip_set_gateway_req_local(int, device_id_t, in_addr_t);
-extern int ip_packet_size_req_local(int, device_id_t, packet_dimension_ref);
-extern int ip_received_error_msg_local(int, device_id_t, packet_t, services_t,
-    services_t);
-extern int ip_device_req_local(int, device_id_t, services_t);
-extern int ip_add_route_req_local(int, device_id_t, in_addr_t, in_addr_t,
-    in_addr_t);
-extern int ip_send_msg_local(int, device_id_t, packet_t, services_t,
-    services_t);
-extern int ip_get_route_req_local(int, ip_protocol_t, const struct sockaddr *,
-    socklen_t, device_id_t *, void **, size_t *);
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/il/ip/ip_module.c
===================================================================
--- uspace/srv/net/il/ip/ip_module.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/ip/ip_module.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -32,8 +32,10 @@
 
 /** @file
- *  IP standalone module implementation.
- *  Contains skeleton module functions mapping.
- *  The functions are used by the module skeleton as module specific entry points.
- *  @see module.c
+ * IP standalone module implementation.
+ * Contains skeleton module functions mapping.
+ * The functions are used by the module skeleton as module specific entry
+ * points.
+ *
+ * @see module.c
  */
 
@@ -42,5 +44,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
-#include <err.h>
+#include <errno.h>
 
 #include <net/modules.h>
@@ -52,45 +54,39 @@
 #include "ip_module.h"
 
-/** IP module global data.
- */
+/** IP module global data. */
 extern ip_globals_t ip_globals;
 
-/** Processes the IP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the ip_message() function.
- */
-int il_module_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+int
+il_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	return ip_message_standalone(callid, call, answer, answer_count);
 }
 
-/** Starts the IP module.
- *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on successful module termination.
- *  @returns Other error codes as defined for the ip_initialize() function.
- *  @returns Other error codes as defined for the REGISTER_ME() macro function.
- */
-int il_module_start_standalone(async_client_conn_t client_connection){
-	ERROR_DECLARE;
+int il_module_start_standalone(async_client_conn_t client_connection)
+{
+	ipcarg_t phonehash;
+	int rc;
 	
 	async_set_client_connection(client_connection);
 	ip_globals.net_phone = net_connect_module();
-	ERROR_PROPAGATE(pm_init());
+
+	rc = pm_init();
+	if (rc != EOK)
+		return rc;
 	
-	ipcarg_t phonehash;
-	if (ERROR_OCCURRED(ip_initialize(client_connection))
-	    || ERROR_OCCURRED(REGISTER_ME(SERVICE_IP, &phonehash))) {
-		pm_destroy();
-		return ERROR_CODE;
-	}
+	rc = ip_initialize(client_connection);
+	if (rc != EOK)
+		goto out;
+	
+	rc = REGISTER_ME(SERVICE_IP, &phonehash);
+	if (rc != EOK)
+		goto out;
 	
 	async_manager();
-	
+
+out:
 	pm_destroy();
-	return EOK;
+	return rc;
 }
 
Index: uspace/srv/net/il/ip/ip_module.h
===================================================================
--- uspace/srv/net/il/ip/ip_module.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/il/ip/ip_module.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,36 +28,20 @@
 
 /** @addtogroup ip
- *  @{
+ * @{
  */
 
 /** @file
- *  IP module functions.
- *  The functions are used as IP module entry points.
+ * IP module functions.
+ * The functions are used as IP module entry points.
  */
 
-#ifndef __NET_IP_MODULE_H__
-#define __NET_IP_MODULE_H__
+#ifndef NET_IP_MODULE_H_
+#define NET_IP_MODULE_H_
 
 #include <ipc/ipc.h>
 
-/** Initializes the IP module.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on success.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int ip_initialize(async_client_conn_t client_connection);
-
-/** Processes the IP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns ENOTSUP if the message is not known.
- *  @see ip_interface.h
- *  @see il_interface.h
- *  @see IS_NET_IP_MESSAGE()
- */
-int ip_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
+extern int ip_initialize(async_client_conn_t);
+extern int ip_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
+    int *);
 
 #endif
Index: uspace/srv/net/net/net.c
===================================================================
--- uspace/srv/net/net/net.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/net/net.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,4 +36,6 @@
  */
 
+#include "net.h"
+
 #include <async.h>
 #include <ctype.h>
@@ -52,30 +54,24 @@
 
 #include <net/modules.h>
+#include <net/packet.h>
+#include <net/device.h>
+
 #include <adt/char_map.h>
 #include <adt/generic_char_map.h>
 #include <adt/measured_strings.h>
 #include <adt/module_map.h>
-#include <net/packet.h>
+
 #include <netif_remote.h>
-#include <net/device.h>
 #include <nil_interface.h>
 #include <net_interface.h>
 #include <ip_interface.h>
 
-#include "net.h"
-
-/** Networking module name.
- *
- */
+/** Networking module name. */
 #define NAME  "net"
 
-/** File read buffer size.
- *
- */
+/** File read buffer size. */
 #define BUFFER_SIZE  256
 
-/** Networking module global data.
- *
- */
+/** Networking module global data. */
 net_globals_t net_globals;
 
@@ -100,5 +96,4 @@
 	measured_string_ref setting =
 	    measured_string_create_bulk(value, 0);
-	
 	if (!setting)
 		return ENOMEM;
@@ -206,5 +201,5 @@
 	unsigned int line_number = 0;
 	size_t index = 0;
-	while ((!ferror(cfg)) && (!feof(cfg))) {
+	while (!ferror(cfg) && !feof(cfg)) {
 		int read = fgetc(cfg);
 		if ((read > 0) && (read != '\n') && (read != '\r')) {
@@ -326,6 +321,6 @@
 	ipcarg_t phonehash;
 	
-	if (ERROR_OCCURRED(net_initialize(client_connection))
-	    || ERROR_OCCURRED(REGISTER_ME(SERVICE_NETWORKING, &phonehash))){
+	if (ERROR_OCCURRED(net_initialize(client_connection)) ||
+	    ERROR_OCCURRED(REGISTER_ME(SERVICE_NETWORKING, &phonehash))) {
 		pm_destroy();
 		return ERROR_CODE;
@@ -379,5 +374,5 @@
     size_t count, char **data)
 {
-	if (!(configuration && (count > 0)))
+	if (!configuration || (count <= 0))
 		return EINVAL;
 	
@@ -482,10 +477,10 @@
 	/* Inter-network layer startup */
 	switch (netif->il->service) {
-		case SERVICE_IP:
-			ERROR_PROPAGATE(ip_device_req(netif->il->phone, netif->id,
-			    internet_service));
-			break;
-		default:
-			return ENOENT;
+	case SERVICE_IP:
+		ERROR_PROPAGATE(ip_device_req(netif->il->phone, netif->id,
+		    internet_service));
+		break;
+	default:
+		return ENOENT;
 	}
 	
@@ -511,5 +506,8 @@
 	ERROR_DECLARE;
 	
-	const char *conf_files[] = {"lo", "ne2k"};
+	const char *conf_files[] = {
+		"lo",
+		"ne2k"
+	};
 	size_t count = sizeof(conf_files) / sizeof(char *);
 	
@@ -603,31 +601,31 @@
 	*answer_count = 0;
 	switch (IPC_GET_METHOD(*call)) {
-		case IPC_M_PHONE_HUNGUP:
-			return EOK;
-		case NET_NET_GET_DEVICE_CONF:
-			ERROR_PROPAGATE(measured_strings_receive(&strings, &data,
-			    IPC_GET_COUNT(call)));
-			net_get_device_conf_req(0, IPC_GET_DEVICE(call), &strings,
-			    IPC_GET_COUNT(call), NULL);
-			
-			/* Strings should not contain received data anymore */
-			free(data);
-			
-			ERROR_CODE = measured_strings_reply(strings, IPC_GET_COUNT(call));
-			free(strings);
-			return ERROR_CODE;
-		case NET_NET_GET_CONF:
-			ERROR_PROPAGATE(measured_strings_receive(&strings, &data,
-			    IPC_GET_COUNT(call)));
-			net_get_conf_req(0, &strings, IPC_GET_COUNT(call), NULL);
-			
-			/* Strings should not contain received data anymore */
-			free(data);
-			
-			ERROR_CODE = measured_strings_reply(strings, IPC_GET_COUNT(call));
-			free(strings);
-			return ERROR_CODE;
-		case NET_NET_STARTUP:
-			return startup();
+	case IPC_M_PHONE_HUNGUP:
+		return EOK;
+	case NET_NET_GET_DEVICE_CONF:
+		ERROR_PROPAGATE(measured_strings_receive(&strings, &data,
+		    IPC_GET_COUNT(call)));
+		net_get_device_conf_req(0, IPC_GET_DEVICE(call), &strings,
+		    IPC_GET_COUNT(call), NULL);
+		
+		/* Strings should not contain received data anymore */
+		free(data);
+		
+		ERROR_CODE = measured_strings_reply(strings, IPC_GET_COUNT(call));
+		free(strings);
+		return ERROR_CODE;
+	case NET_NET_GET_CONF:
+		ERROR_PROPAGATE(measured_strings_receive(&strings, &data,
+		    IPC_GET_COUNT(call)));
+		net_get_conf_req(0, &strings, IPC_GET_COUNT(call), NULL);
+		
+		/* Strings should not contain received data anymore */
+		free(data);
+		
+		ERROR_CODE = measured_strings_reply(strings, IPC_GET_COUNT(call));
+		free(strings);
+		return ERROR_CODE;
+	case NET_NET_STARTUP:
+		return startup();
 	}
 	return ENOTSUP;
@@ -661,5 +659,5 @@
 		int res = net_module_message(callid, &call, &answer, &answer_count);
 		
-		/* End if said to either by the message or the processing result */
+		/* End if told to either by the message or the processing result */
 		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
 			return;
Index: uspace/srv/net/net/net.h
===================================================================
--- uspace/srv/net/net/net.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/net/net.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,6 +36,6 @@
  */
 
-#ifndef __NET_NET_H__
-#define __NET_NET_H__
+#ifndef NET_NET_H_
+#define NET_NET_H_
 
 #include <ipc/ipc.h>
Index: uspace/srv/net/net/net_standalone.c
===================================================================
--- uspace/srv/net/net/net_standalone.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/net/net_standalone.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,25 +28,23 @@
 
 /** @addtogroup net
- *  @{
+ * @{
  */
 
 /** @file
- *  Wrapper for the standalone networking module.
+ * Wrapper for the standalone networking module.
  */
 
+#include "net.h"
+
 #include <str.h>
-
+#include <adt/measured_strings.h>
+#include <adt/module_map.h>
 #include <ipc/ipc.h>
 #include <ipc/net.h>
 
 #include <ip_interface.h>
-#include <adt/measured_strings.h>
-#include <adt/module_map.h>
 #include <packet_server.h>
 
-#include "net.h"
-
-/** Networking module global data.
- */
+/** Networking module global data. */
 extern net_globals_t net_globals;
 
@@ -60,5 +58,6 @@
  *
  */
-int net_initialize_build(async_client_conn_t client_connection){
+int net_initialize_build(async_client_conn_t client_connection)
+{
 	ERROR_DECLARE;
 	
Index: uspace/srv/net/netif/lo/lo.c
===================================================================
--- uspace/srv/net/netif/lo/lo.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/netif/lo/lo.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,14 +28,13 @@
 
 /** @addtogroup lo
- *  @{
+ * @{
  */
 
 /** @file
- *  Loopback network interface implementation.
+ * Loopback network interface implementation.
  */
 
 #include <async.h>
 #include <errno.h>
-#include <err.h>
 #include <stdio.h>
 #include <str.h>
@@ -53,45 +52,27 @@
 #include <netif_local.h>
 
-/** Default hardware address.
- */
+/** Default hardware address. */
 #define DEFAULT_ADDR		"\0\0\0\0\0\0"
 
-/** Default address length.
- */
+/** Default address length. */
 #define DEFAULT_ADDR_LEN	(sizeof(DEFAULT_ADDR) / sizeof(char))
 
-/** Loopback module name.
- */
+/** Loopback module name. */
 #define NAME  "lo"
 
-/** Network interface global data.
- */
+/** Network interface global data. */
 netif_globals_t	netif_globals;
 
-/** Changes the loopback state.
- *  @param[in] device The device structure.
- *  @param[in] state The new device state.
- *  @returns The new state if changed.
- *  @returns EOK otherwise.
- */
-int change_state_message(netif_device_t * device, device_state_t state);
-
-/** Creates and returns the loopback network interface structure.
- *  @param[in] device_id The new devce identifier.
- *  @param[out] device The device structure.
- *  @returns EOK on success.
- *  @returns EXDEV if one loopback network interface already exists.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int create(device_id_t device_id, netif_device_t * * device);
-
-int netif_specific_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+int
+netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	return ENOTSUP;
 }
 
-int netif_get_addr_message(device_id_t device_id, measured_string_ref address){
-	if(! address){
+int netif_get_addr_message(device_id_t device_id, measured_string_ref address)
+{
+	if (!address)
 		return EBADMEM;
-	}
 	address->value = str_dup(DEFAULT_ADDR);
 	address->length = DEFAULT_ADDR_LEN;
@@ -99,18 +80,27 @@
 }
 
-int netif_get_device_stats(device_id_t device_id, device_stats_ref stats){
-	ERROR_DECLARE;
-
-	netif_device_t * device;
-
-	if(! stats){
+int netif_get_device_stats(device_id_t device_id, device_stats_ref stats)
+{
+	netif_device_t *device;
+	int rc;
+
+	if (!stats)
 		return EBADMEM;
-	}
-	ERROR_PROPAGATE(find_device(device_id, &device));
-	memcpy(stats, (device_stats_ref) device->specific, sizeof(device_stats_t));
-	return EOK;
-}
-
-int change_state_message(netif_device_t * device, device_state_t state)
+	rc = find_device(device_id, &device);
+	if (rc != EOK)
+		return rc;
+	memcpy(stats, (device_stats_ref) device->specific,
+	    sizeof(device_stats_t));
+	return EOK;
+}
+
+/** Changes the loopback state.
+ *
+ * @param[in] device	The device structure.
+ * @param[in] state	The new device state.
+ * @returns		The new state if changed.
+ * @returns		EOK otherwise.
+ */
+static int change_state_message(netif_device_t *device, device_state_t state)
 {
 	if (device->state != state) {
@@ -126,35 +116,45 @@
 }
 
-int create(device_id_t device_id, netif_device_t * * device){
+/** Creates and returns the loopback network interface structure.
+ *
+ * @param[in] device_id	The new devce identifier.
+ * @param[out] device	The device structure.
+ * @returns		EOK on success.
+ * @returns		EXDEV if one loopback network interface already exists.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+static int create(device_id_t device_id, netif_device_t **device)
+{
 	int index;
 
-	if(netif_device_map_count(&netif_globals.device_map) > 0){
+	if (netif_device_map_count(&netif_globals.device_map) > 0)
 		return EXDEV;
-	}else{
-		*device = (netif_device_t *) malloc(sizeof(netif_device_t));
-		if(!(*device)){
-			return ENOMEM;
-		}
-		(** device).specific = malloc(sizeof(device_stats_t));
-		if(! (** device).specific){
-			free(*device);
-			return ENOMEM;
-		}
-		null_device_stats((device_stats_ref)(** device).specific);
-		(** device).device_id = device_id;
-		(** device).nil_phone = -1;
-		(** device).state = NETIF_STOPPED;
-		index = netif_device_map_add(&netif_globals.device_map, (** device).device_id, * device);
-		if(index < 0){
-			free(*device);
-			free((** device).specific);
-			*device = NULL;
-			return index;
-		}
-	}
-	return EOK;
-}
-
-int netif_initialize(void){
+
+	*device = (netif_device_t *) malloc(sizeof(netif_device_t));
+	if (!*device)
+		return ENOMEM;
+	(*device)->specific = (device_stats_t *) malloc(sizeof(device_stats_t));
+	if (!(*device)->specific) {
+		free(*device);
+		return ENOMEM;
+	}
+	null_device_stats((device_stats_ref) (*device)->specific);
+	(*device)->device_id = device_id;
+	(*device)->nil_phone = -1;
+	(*device)->state = NETIF_STOPPED;
+	index = netif_device_map_add(&netif_globals.device_map,
+	    (*device)->device_id, *device);
+	if (index < 0) {
+		free(*device);
+		free((*device)->specific);
+		*device = NULL;
+		return index;
+	}
+	
+	return EOK;
+}
+
+int netif_initialize(void)
+{
 	ipcarg_t phonehash;
 
@@ -162,11 +162,13 @@
 }
 
-int netif_probe_message(device_id_t device_id, int irq, uintptr_t io){
-	ERROR_DECLARE;
-
-	netif_device_t * device;
+int netif_probe_message(device_id_t device_id, int irq, uintptr_t io)
+{
+	netif_device_t *device;
+	int rc;
 
 	// create a new device
-	ERROR_PROPAGATE(create(device_id, &device));
+	rc = create(device_id, &device);
+	if (rc != EOK)
+		return rc;
 	// print the settings
 	printf("%s: Device created (id: %d)\n", NAME, device->device_id);
@@ -174,38 +176,43 @@
 }
 
-int netif_send_message(device_id_t device_id, packet_t packet, services_t sender){
-	ERROR_DECLARE;
-
-	netif_device_t * device;
+int netif_send_message(device_id_t device_id, packet_t packet, services_t sender)
+{
+	netif_device_t *device;
 	size_t length;
 	packet_t next;
 	int phone;
-
-	ERROR_PROPAGATE(find_device(device_id, &device));
-	if(device->state != NETIF_ACTIVE){
+	int rc;
+
+	rc = find_device(device_id, &device);
+	if (rc != EOK)
+		return EOK;
+	if (device->state != NETIF_ACTIVE) {
 		netif_pq_release(packet_get_id(packet));
 		return EFORWARD;
 	}
 	next = packet;
-	do{
-		++ ((device_stats_ref) device->specific)->send_packets;
-		++ ((device_stats_ref) device->specific)->receive_packets;
+	do {
+		((device_stats_ref) device->specific)->send_packets++;
+		((device_stats_ref) device->specific)->receive_packets++;
 		length = packet_get_data_length(next);
 		((device_stats_ref) device->specific)->send_bytes += length;
 		((device_stats_ref) device->specific)->receive_bytes += length;
 		next = pq_next(next);
-	}while(next);
+	} while(next);
 	phone = device->nil_phone;
 	fibril_rwlock_write_unlock(&netif_globals.lock);
 	nil_received_msg(phone, device_id, packet, sender);
 	fibril_rwlock_write_lock(&netif_globals.lock);
-	return EOK;
-}
-
-int netif_start_message(netif_device_t * device){
+	
+	return EOK;
+}
+
+int netif_start_message(netif_device_t *device)
+{
 	return change_state_message(device, NETIF_ACTIVE);
 }
 
-int netif_stop_message(netif_device_t * device){
+int netif_stop_message(netif_device_t *device)
+{
 	return change_state_message(device, NETIF_STOPPED);
 }
@@ -213,7 +220,6 @@
 /** Default thread for new connections.
  *
- * @param[in] iid The initial message identifier.
- * @param[in] icall The initial message call structure.
- *
+ * @param[in] iid	The initial message identifier.
+ * @param[in] icall	The initial message call structure.
  */
 static void netif_client_connection(ipc_callid_t iid, ipc_call_t *icall)
@@ -225,5 +231,5 @@
 	ipc_answer_0(iid, EOK);
 	
-	while(true) {
+	while (true) {
 		ipc_call_t answer;
 		int answer_count;
@@ -240,6 +246,10 @@
 		    &answer_count);
 		
-		/* End if said to either by the message or the processing result */
-		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+		/*
+		 * End if told to either by the message or the processing
+		 * result.
+		 */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
+		    (res == EHANGUP))
 			return;
 		
@@ -251,11 +261,9 @@
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	if (ERROR_OCCURRED(netif_module_start(netif_client_connection)))
-		return ERROR_CODE;
-	
-	return EOK;
+	rc = netif_module_start(netif_client_connection);
+	return rc;
 }
 
Index: pace/srv/net/netstart/Makefile
===================================================================
--- uspace/srv/net/netstart/Makefile	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 Jakub Jermar
-# 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.
-#
-
-USPACE_PREFIX = ../../..
-LIBS = $(LIBNET_PREFIX)/libnet.a
-EXTRA_CFLAGS = -I$(LIBNET_PREFIX)/include
-
-BINARY = netstart
-
-SOURCES = \
-	netstart.c \
-	self_test.c
-
-include $(USPACE_PREFIX)/Makefile.common
Index: pace/srv/net/netstart/netstart.c
===================================================================
--- uspace/srv/net/netstart/netstart.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,107 +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 net
- * @{
- */
-
-/** @file
- *
- * Start the networking subsystem.
- * Perform networking self-test if executed
- * with the -s argument.
- *
- */
-
-#define NAME  "netstart"
-
-#include <async.h>
-#include <stdio.h>
-#include <task.h>
-#include <str_error.h>
-#include <err.h>
-#include <ipc/ipc.h>
-#include <ipc/services.h>
-#include <ipc/net_net.h>
-
-#include <net/modules.h>
-
-#include "self_test.h"
-
-/** Start a module.
- *
- * @param[in] desc The module description
- * @param[in] path The module absolute path.
- *
- * @returns true on succesful spanwning
- * @returns false on failure
- *
- */
-static bool spawn(const char *desc, const char *path)
-{
-	printf("%s: Spawning %s (%s)\n", NAME, desc, path);
-	
-	const char *argv[2];
-	
-	argv[0] = path;
-	argv[1] = NULL;
-	
-	int err;
-	if (task_spawn(path, argv, &err) == 0) {
-		fprintf(stderr, "%s: Error spawning %s (%s)\n", NAME, path,
-		    str_error(err));
-		return false;
-	}
-	
-	return true;
-}
-
-int main(int argc, char *argv[])
-{
-	ERROR_DECLARE;
-	
-	/* Run self-tests */
-	if ((argc > 1) && (str_cmp(argv[1], "-s") == 0))
-		ERROR_PROPAGATE(self_test());
-	
-	if (!spawn("networking service", "/srv/net"))
-		return EINVAL;
-	
-	printf("%s: Initializing networking\n", NAME);
-	
-	int net_phone = connect_to_service(SERVICE_NETWORKING);
-	if (ERROR_OCCURRED(ipc_call_sync_0_0(net_phone, NET_NET_STARTUP))) {
-		fprintf(stderr, "%s: Startup error %d\n", NAME, ERROR_CODE);
-		return ERROR_CODE;
-	}
-	
-	return EOK;
-}
-
-/** @}
- */
Index: pace/srv/net/netstart/self_test.c
===================================================================
--- uspace/srv/net/netstart/self_test.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,334 +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 net
- * @{
- */
-
-/** @file
- * Networking self-tests implementation.
- *
- */
-
-#include <errno.h>
-#include <malloc.h>
-#include <stdio.h>
-
-#include <net_checksum.h>
-#include <adt/int_map.h>
-#include <adt/char_map.h>
-#include <adt/generic_char_map.h>
-#include <adt/measured_strings.h>
-#include <adt/dynamic_fifo.h>
-
-#include "self_test.h"
-
-/** Test the statement, compare the result and evaluate.
- *
- * @param[in] statement The statement to test.
- * @param[in] result    The expected result.
- *
- */
-#define TEST(statement, result) \
-	do { \
-		printf("\n\t%s == %s", #statement, #result); \
-		if ((statement) != (result)) { \
-			printf("\tfailed\n"); \
-			fprintf(stderr, "\nNetwork self-test failed\n"); \
-			return EINVAL; \
-		} else \
-			printf("\tOK"); \
-	} while (0)
-
-#define XMALLOC(var, type) \
-	do { \
-		(var) = (type *) malloc(sizeof(type)); \
-		if ((var) == NULL) { \
-			fprintf(stderr, "\nMemory allocation error\n"); \
-			return ENOMEM; \
-		} \
-	} while (0)
-
-GENERIC_CHAR_MAP_DECLARE(int_char_map, int);
-GENERIC_CHAR_MAP_IMPLEMENT(int_char_map, int);
-
-GENERIC_FIELD_DECLARE(int_field, int);
-GENERIC_FIELD_IMPLEMENT(int_field, int);
-
-INT_MAP_DECLARE(int_map, int);
-INT_MAP_IMPLEMENT(int_map, int);
-
-/** Self-test start function.
- *
- * Run all self-tests.
- *
- * @returns EOK on success.
- * @returns The first error occurred.
- *
- */
-int self_test(void)
-{
-	printf("Running networking self-tests\n");
-	
-	printf("\nChar map test");
-	char_map_t cm;
-	
-	TEST(char_map_update(&cm, "ucho", 0, 3), EINVAL);
-	TEST(char_map_initialize(&cm), EOK);
-	TEST(char_map_exclude(&cm, "bla", 0), CHAR_MAP_NULL);
-	TEST(char_map_find(&cm, "bla", 0), CHAR_MAP_NULL);
-	TEST(char_map_add(&cm, "bla", 0, 1), EOK);
-	TEST(char_map_find(&cm, "bla", 0), 1);
-	TEST(char_map_add(&cm, "bla", 0, 10), EEXISTS);
-	TEST(char_map_update(&cm, "bla", 0, 2), EOK);
-	TEST(char_map_find(&cm, "bla", 0), 2);
-	TEST(char_map_update(&cm, "ucho", 0, 2), EOK);
-	TEST(char_map_exclude(&cm, "bla", 0), 2);
-	TEST(char_map_exclude(&cm, "bla", 0), CHAR_MAP_NULL);
-	TEST(char_map_find(&cm, "ucho", 0), 2);
-	TEST(char_map_update(&cm, "ucho", 0, 3), EOK);
-	TEST(char_map_find(&cm, "ucho", 0), 3);
-	TEST(char_map_add(&cm, "blabla", 0, 5), EOK);
-	TEST(char_map_find(&cm, "blabla", 0), 5);
-	TEST(char_map_add(&cm, "bla", 0, 6), EOK);
-	TEST(char_map_find(&cm, "bla", 0), 6);
-	TEST(char_map_exclude(&cm, "bla", 0), 6);
-	TEST(char_map_find(&cm, "bla", 0), CHAR_MAP_NULL);
-	TEST(char_map_find(&cm, "blabla", 0), 5);
-	TEST(char_map_add(&cm, "auto", 0, 7), EOK);
-	TEST(char_map_find(&cm, "auto", 0), 7);
-	TEST(char_map_add(&cm, "kara", 0, 8), EOK);
-	TEST(char_map_find(&cm, "kara", 0), 8);
-	TEST(char_map_add(&cm, "nic", 0, 9), EOK);
-	TEST(char_map_find(&cm, "nic", 0), 9);
-	TEST(char_map_find(&cm, "blabla", 0), 5);
-	TEST(char_map_add(&cm, "micnicnic", 5, 9), EOK);
-	TEST(char_map_find(&cm, "micni", 0), 9);
-	TEST(char_map_find(&cm, "micnicn", 5), 9);
-	TEST(char_map_add(&cm, "\x10\x0\x2\x2", 4, 15), EOK);
-	TEST(char_map_find(&cm, "\x10\x0\x2\x2", 4), 15);
-	
-	TEST((char_map_destroy(&cm), EOK), EOK);
-	TEST(char_map_update(&cm, "ucho", 0, 3), EINVAL);
-	
-	printf("\nCRC computation test");
-	uint32_t value;
-	
-	TEST(value = ~compute_crc32(~0, "123456789", 8 * 9), 0xcbf43926);
-	TEST(value = ~compute_crc32(~0, "1", 8), 0x83dcefb7);
-	TEST(value = ~compute_crc32(~0, "12", 8 * 2), 0x4f5344cd);
-	TEST(value = ~compute_crc32(~0, "123", 8 * 3), 0x884863d2);
-	TEST(value = ~compute_crc32(~0, "1234", 8 * 4), 0x9be3e0a3);
-	TEST(value = ~compute_crc32(~0, "12345678", 8 * 8), 0x9ae0daaf);
-	TEST(value = ~compute_crc32(~0, "ahoj pane", 8 * 9), 0x5fc3d706);
-	
-	printf("\nDynamic fifo test");
-	dyn_fifo_t fifo;
-	
-	TEST(dyn_fifo_push(&fifo, 1, 0), EINVAL);
-	TEST(dyn_fifo_initialize(&fifo, 1), EOK);
-	TEST(dyn_fifo_push(&fifo, 1, 0), EOK);
-	TEST(dyn_fifo_pop(&fifo), 1);
-	TEST(dyn_fifo_pop(&fifo), ENOENT);
-	TEST(dyn_fifo_push(&fifo, 2, 1), EOK);
-	TEST(dyn_fifo_push(&fifo, 3, 1), ENOMEM);
-	TEST(dyn_fifo_push(&fifo, 3, 0), EOK);
-	TEST(dyn_fifo_pop(&fifo), 2);
-	TEST(dyn_fifo_pop(&fifo), 3);
-	TEST(dyn_fifo_push(&fifo, 4, 2), EOK);
-	TEST(dyn_fifo_push(&fifo, 5, 2), EOK);
-	TEST(dyn_fifo_push(&fifo, 6, 2), ENOMEM);
-	TEST(dyn_fifo_push(&fifo, 6, 5), EOK);
-	TEST(dyn_fifo_push(&fifo, 7, 5), EOK);
-	TEST(dyn_fifo_pop(&fifo), 4);
-	TEST(dyn_fifo_pop(&fifo), 5);
-	TEST(dyn_fifo_push(&fifo, 8, 5), EOK);
-	TEST(dyn_fifo_push(&fifo, 9, 5), EOK);
-	TEST(dyn_fifo_push(&fifo, 10, 6), EOK);
-	TEST(dyn_fifo_push(&fifo, 11, 6), EOK);
-	TEST(dyn_fifo_pop(&fifo), 6);
-	TEST(dyn_fifo_pop(&fifo), 7);
-	TEST(dyn_fifo_push(&fifo, 12, 6), EOK);
-	TEST(dyn_fifo_push(&fifo, 13, 6), EOK);
-	TEST(dyn_fifo_push(&fifo, 14, 6), ENOMEM);
-	TEST(dyn_fifo_push(&fifo, 14, 8), EOK);
-	TEST(dyn_fifo_pop(&fifo), 8);
-	TEST(dyn_fifo_pop(&fifo), 9);
-	TEST(dyn_fifo_pop(&fifo), 10);
-	TEST(dyn_fifo_pop(&fifo), 11);
-	TEST(dyn_fifo_pop(&fifo), 12);
-	TEST(dyn_fifo_pop(&fifo), 13);
-	TEST(dyn_fifo_pop(&fifo), 14);
-	TEST(dyn_fifo_destroy(&fifo), EOK);
-	TEST(dyn_fifo_push(&fifo, 1, 0), EINVAL);
-	
-	printf("\nGeneric char map test");
-	
-	int *x;
-	int *y;
-	int *z;
-	int *u;
-	int *v;
-	int *w;
-	
-	XMALLOC(x, int);
-	XMALLOC(y, int);
-	XMALLOC(z, int);
-	XMALLOC(u, int);
-	XMALLOC(v, int);
-	XMALLOC(w, int);
-	
-	int_char_map_t icm;
-	icm.magic = 0;
-	
-	TEST(int_char_map_add(&icm, "ucho", 0, z), EINVAL);
-	TEST(int_char_map_initialize(&icm), EOK);
-	TEST((int_char_map_exclude(&icm, "bla", 0), EOK), EOK);
-	TEST(int_char_map_find(&icm, "bla", 0), NULL);
-	TEST(int_char_map_add(&icm, "bla", 0, x), EOK);
-	TEST(int_char_map_find(&icm, "bla", 0), x);
-	TEST(int_char_map_add(&icm, "bla", 0, y), EEXISTS);
-	TEST((int_char_map_exclude(&icm, "bla", 0), EOK), EOK);
-	TEST((int_char_map_exclude(&icm, "bla", 0), EOK), EOK);
-	TEST(int_char_map_add(&icm, "blabla", 0, v), EOK);
-	TEST(int_char_map_find(&icm, "blabla", 0), v);
-	TEST(int_char_map_add(&icm, "bla", 0, w), EOK);
-	TEST(int_char_map_find(&icm, "bla", 0), w);
-	TEST((int_char_map_exclude(&icm, "bla", 0), EOK), EOK);
-	TEST(int_char_map_find(&icm, "bla", 0), NULL);
-	TEST(int_char_map_find(&icm, "blabla", 0), v);
-	TEST(int_char_map_add(&icm, "auto", 0, u), EOK);
-	TEST(int_char_map_find(&icm, "auto", 0), u);
-	TEST((int_char_map_destroy(&icm), EOK), EOK);
-	TEST(int_char_map_add(&icm, "ucho", 0, z), EINVAL);
-	
-	printf("\nGeneric field test");
-	
-	XMALLOC(x, int);
-	XMALLOC(y, int);
-	XMALLOC(z, int);
-	XMALLOC(u, int);
-	XMALLOC(v, int);
-	XMALLOC(w, int);
-	
-	int_field_t gf;
-	gf.magic = 0;
-	
-	TEST(int_field_add(&gf, x), EINVAL);
-	TEST(int_field_count(&gf), -1);
-	TEST(int_field_initialize(&gf), EOK);
-	TEST(int_field_count(&gf), 0);
-	TEST(int_field_get_index(&gf, 1), NULL);
-	TEST(int_field_add(&gf, x), 0);
-	TEST(int_field_get_index(&gf, 0), x);
-	TEST((int_field_exclude_index(&gf, 0), EOK), EOK);
-	TEST(int_field_get_index(&gf, 0), NULL);
-	TEST(int_field_add(&gf, y), 1);
-	TEST(int_field_get_index(&gf, 1), y);
-	TEST(int_field_add(&gf, z), 2);
-	TEST(int_field_get_index(&gf, 2), z);
-	TEST(int_field_get_index(&gf, 1), y);
-	TEST(int_field_count(&gf), 3);
-	TEST(int_field_add(&gf, u), 3);
-	TEST(int_field_get_index(&gf, 3), u);
-	TEST(int_field_add(&gf, v), 4);
-	TEST(int_field_get_index(&gf, 4), v);
-	TEST(int_field_add(&gf, w), 5);
-	TEST(int_field_get_index(&gf, 5), w);
-	TEST(int_field_count(&gf), 6);
-	TEST((int_field_exclude_index(&gf, 1), EOK), EOK);
-	TEST(int_field_get_index(&gf, 1), NULL);
-	TEST(int_field_get_index(&gf, 3), u);
-	TEST((int_field_exclude_index(&gf, 7), EOK), EOK);
-	TEST(int_field_get_index(&gf, 3), u);
-	TEST(int_field_get_index(&gf, 5), w);
-	TEST((int_field_exclude_index(&gf, 4), EOK), EOK);
-	TEST(int_field_get_index(&gf, 4), NULL);
-	TEST((int_field_destroy(&gf), EOK), EOK);
-	TEST(int_field_count(&gf), -1);
-	
-	printf("\nInt map test");
-	
-	XMALLOC(x, int);
-	XMALLOC(y, int);
-	XMALLOC(z, int);
-	XMALLOC(u, int);
-	XMALLOC(v, int);
-	XMALLOC(w, int);
-	
-	int_map_t im;
-	im.magic = 0;
-	
-	TEST(int_map_add(&im, 1, x), EINVAL);
-	TEST(int_map_count(&im), -1);
-	TEST(int_map_initialize(&im), EOK);
-	TEST(int_map_count(&im), 0);
-	TEST(int_map_find(&im, 1), NULL);
-	TEST(int_map_add(&im, 1, x), 0);
-	TEST(int_map_find(&im, 1), x);
-	TEST((int_map_exclude(&im, 1), EOK), EOK);
-	TEST(int_map_find(&im, 1), NULL);
-	TEST(int_map_add(&im, 1, y), 1);
-	TEST(int_map_find(&im, 1), y);
-	TEST(int_map_add(&im, 4, z), 2);
-	TEST(int_map_get_index(&im, 2), z);
-	TEST(int_map_find(&im, 4), z);
-	TEST(int_map_find(&im, 1), y);
-	TEST(int_map_count(&im), 3);
-	TEST(int_map_add(&im, 2, u), 3);
-	TEST(int_map_find(&im, 2), u);
-	TEST(int_map_add(&im, 3, v), 4);
-	TEST(int_map_find(&im, 3), v);
-	TEST(int_map_get_index(&im, 4), v);
-	TEST(int_map_add(&im, 6, w), 5);
-	TEST(int_map_find(&im, 6), w);
-	TEST(int_map_count(&im), 6);
-	TEST((int_map_exclude(&im, 1), EOK), EOK);
-	TEST(int_map_find(&im, 1), NULL);
-	TEST(int_map_find(&im, 2), u);
-	TEST((int_map_exclude(&im, 7), EOK), EOK);
-	TEST(int_map_find(&im, 2), u);
-	TEST(int_map_find(&im, 6), w);
-	TEST((int_map_exclude_index(&im, 4), EOK), EOK);
-	TEST(int_map_get_index(&im, 4), NULL);
-	TEST(int_map_find(&im, 3), NULL);
-	TEST((int_map_destroy(&im), EOK), EOK);
-	TEST(int_map_count(&im), -1);
-	
-	printf("\nMeasured strings test");
-	
-	measured_string_ref string =
-	    measured_string_create_bulk("I am a measured string!", 0);
-	printf("\n%x, %s at %x of %d\n", string, string->value, string->value,
-	    string->length);
-	
-	return EOK;
-}
-
-/** @}
- */
Index: pace/srv/net/netstart/self_test.h
===================================================================
--- uspace/srv/net/netstart/self_test.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ 	(revision )
@@ -1,41 +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 net
- * @{
- */
-
-#ifndef __SELF_TEST_H__
-#define __SELF_TEST_H__
-
-extern int self_test(void);
-
-#endif
-
-/** @}
- */
Index: uspace/srv/net/nil/eth/eth.c
===================================================================
--- uspace/srv/net/nil/eth/eth.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/nil/eth/eth.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -42,5 +42,5 @@
 #include <byteorder.h>
 #include <str.h>
-#include <err.h>
+#include <errno.h>
 
 #include <ipc/ipc.h>
@@ -66,355 +66,369 @@
 #include "eth_header.h"
 
-/** The module name.
- */
+/** The module name. */
 #define NAME  "eth"
 
-/** Reserved packet prefix length.
- */
-#define ETH_PREFIX		(sizeof(eth_header_t) + sizeof(eth_header_lsap_t) + sizeof(eth_header_snap_t))
-
-/** Reserved packet suffix length.
- */
-#define ETH_SUFFIX		sizeof(eth_fcs_t)
-
-/** Maximum packet content length.
- */
+/** Reserved packet prefix length. */
+#define ETH_PREFIX \
+	(sizeof(eth_header_t) + sizeof(eth_header_lsap_t) + \
+	sizeof(eth_header_snap_t))
+
+/** Reserved packet suffix length. */
+#define ETH_SUFFIX \
+	sizeof(eth_fcs_t)
+
+/** Maximum packet content length. */
 #define ETH_MAX_CONTENT 1500u
 
-/** Minimum packet content length.
- */
+/** Minimum packet content length. */
 #define ETH_MIN_CONTENT 46u
 
-/** Maximum tagged packet content length.
- */
-#define ETH_MAX_TAGGED_CONTENT(flags)	(ETH_MAX_CONTENT - ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? sizeof(eth_header_lsap_t) : 0) - (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
-
-/** Minimum tagged packet content length.
- */
-#define ETH_MIN_TAGGED_CONTENT(flags)	(ETH_MIN_CONTENT - ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? sizeof(eth_header_lsap_t) : 0) - (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
-
-/** Dummy flag shift value.
- */
+/** Maximum tagged packet content length. */
+#define ETH_MAX_TAGGED_CONTENT(flags) \
+	(ETH_MAX_CONTENT - \
+	((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? \
+	sizeof(eth_header_lsap_t) : 0) - \
+	(IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
+
+/** Minimum tagged packet content length. */
+#define ETH_MIN_TAGGED_CONTENT(flags) \
+	(ETH_MIN_CONTENT - \
+	((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? \
+	sizeof(eth_header_lsap_t) : 0) - \
+	(IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
+
+/** Dummy flag shift value. */
 #define ETH_DUMMY_SHIFT	0
 
-/** Mode flag shift value.
- */
+/** Mode flag shift value. */
 #define ETH_MODE_SHIFT	1
 
 /** Dummy device flag.
- *  Preamble and FCS are mandatory part of the packets.
- */
-#define ETH_DUMMY				(1 << ETH_DUMMY_SHIFT)
+ * Preamble and FCS are mandatory part of the packets.
+ */
+#define ETH_DUMMY		(1 << ETH_DUMMY_SHIFT)
 
 /** Returns the dummy flag.
- *  @see ETH_DUMMY
- */
-#define IS_DUMMY(flags)		((flags) &ETH_DUMMY)
+ * @see ETH_DUMMY
+ */
+#define IS_DUMMY(flags)		((flags) & ETH_DUMMY)
 
 /** Device mode flags.
- *  @see ETH_DIX
- *  @see ETH_8023_2_LSAP
- *  @see ETH_8023_2_SNAP
- */
-#define ETH_MODE_MASK			(3 << ETH_MODE_SHIFT)
-
-/** DIX Ethernet mode flag.
- */
-#define ETH_DIX					(1 << ETH_MODE_SHIFT)
+ * @see ETH_DIX
+ * @see ETH_8023_2_LSAP
+ * @see ETH_8023_2_SNAP
+ */
+#define ETH_MODE_MASK		(3 << ETH_MODE_SHIFT)
+
+/** DIX Ethernet mode flag. */
+#define ETH_DIX			(1 << ETH_MODE_SHIFT)
 
 /** Returns whether the DIX Ethernet mode flag is set.
- *  @param[in] flags The ethernet flags.
- *  @see ETH_DIX
- */
-#define IS_DIX(flags)			(((flags) &ETH_MODE_MASK) == ETH_DIX)
-
-/** 802.3 + 802.2 + LSAP mode flag.
- */
-#define ETH_8023_2_LSAP			(2 << ETH_MODE_SHIFT)
+ *
+ * @param[in] flags	The ethernet flags.
+ * @see ETH_DIX
+ */
+#define IS_DIX(flags)		(((flags) & ETH_MODE_MASK) == ETH_DIX)
+
+/** 802.3 + 802.2 + LSAP mode flag. */
+#define ETH_8023_2_LSAP		(2 << ETH_MODE_SHIFT)
 
 /** Returns whether the 802.3 + 802.2 + LSAP mode flag is set.
- *  @param[in] flags The ethernet flags.
- *  @see ETH_8023_2_LSAP
- */
-#define IS_8023_2_LSAP(flags)	(((flags) &ETH_MODE_MASK) == ETH_8023_2_LSAP)
-
-/** 802.3 + 802.2 + LSAP + SNAP mode flag.
- */
-#define ETH_8023_2_SNAP			(3 << ETH_MODE_SHIFT)
+ *
+ * @param[in] flags	The ethernet flags.
+ * @see ETH_8023_2_LSAP
+ */
+#define IS_8023_2_LSAP(flags)	(((flags) & ETH_MODE_MASK) == ETH_8023_2_LSAP)
+
+/** 802.3 + 802.2 + LSAP + SNAP mode flag. */
+#define ETH_8023_2_SNAP		(3 << ETH_MODE_SHIFT)
 
 /** Returns whether the 802.3 + 802.2 + LSAP + SNAP mode flag is set.
- *  @param[in] flags The ethernet flags.
- *  @see ETH_8023_2_SNAP
- */
-#define IS_8023_2_SNAP(flags)	(((flags) &ETH_MODE_MASK) == ETH_8023_2_SNAP)
+ *
+ * @param[in] flags	The ethernet flags.
+ * @see ETH_8023_2_SNAP
+ */
+#define IS_8023_2_SNAP(flags)	(((flags) & ETH_MODE_MASK) == ETH_8023_2_SNAP)
 
 /** Type definition of the ethernet address type.
- *  @see eth_addr_type
- */
-typedef enum eth_addr_type	eth_addr_type_t;
+ * @see eth_addr_type
+ */
+typedef enum eth_addr_type eth_addr_type_t;
 
 /** Type definition of the ethernet address type pointer.
- *  @see eth_addr_type
- */
-typedef eth_addr_type_t *	eth_addr_type_ref;
-
-/** Ethernet address type.
- */
-enum eth_addr_type{
-	/** Local address.
-	 */
+ * @see eth_addr_type
+ */
+typedef eth_addr_type_t *eth_addr_type_ref;
+
+/** Ethernet address type. */
+enum eth_addr_type {
+	/** Local address. */
 	ETH_LOCAL_ADDR,
-	/** Broadcast address.
-	 */
+	/** Broadcast address. */
 	ETH_BROADCAST_ADDR
 };
 
-/** Ethernet module global data.
- */
-eth_globals_t	eth_globals;
-
-/** @name Message processing functions
- */
-/*@{*/
-
-/** Processes IPC messages from the registered device driver modules in an infinite loop.
- *  @param[in] iid The message identifier.
- *  @param[in,out] icall The message parameters.
- */
-void eth_receiver(ipc_callid_t iid, ipc_call_t * icall);
-
-/** Registers new device or updates the MTU of an existing one.
- *  Determines the device local hardware address.
- *  @param[in] device_id The new device identifier.
- *  @param[in] service The device driver service.
- *  @param[in] mtu The device maximum transmission unit.
- *  @returns EOK on success.
- *  @returns EEXIST if the device with the different service exists.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns Other error codes as defined for the net_get_device_conf_req() function.
- *  @returns Other error codes as defined for the netif_bind_service() function.
- *  @returns Other error codes as defined for the netif_get_addr_req() function.
- */
-int eth_device_message(device_id_t device_id, services_t service, size_t mtu);
-
-/** Registers receiving module service.
- *  Passes received packets for this service.
- *  @param[in] service The module service.
- *  @param[in] phone The service phone.
- *  @returns EOK on success.
- *  @returns ENOENT if the service is not known.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int eth_register_message(services_t service, int phone);
-
-/** Returns the device packet dimensions for sending.
- *  @param[in] device_id The device identifier.
- *  @param[out] addr_len The minimum reserved address length.
- *  @param[out] prefix The minimum reserved prefix size.
- *  @param[out] content The maximum content size.
- *  @param[out] suffix The minimum reserved suffix size.
- *  @returns EOK on success.
- *  @returns EBADMEM if either one of the parameters is NULL.
- *  @returns ENOENT if there is no such device.
- */
-int eth_packet_space_message(device_id_t device_id, size_t * addr_len, size_t * prefix, size_t * content, size_t * suffix);
-
-/** Returns the device hardware address.
- *  @param[in] device_id The device identifier.
- *  @param[in] type Type of the desired address.
- *  @param[out] address The device hardware address.
- *  @returns EOK on success.
- *  @returns EBADMEM if the address parameter is NULL.
- *  @returns ENOENT if there no such device.
- */
-int eth_addr_message(device_id_t device_id, eth_addr_type_t type, measured_string_ref * address);
-
-/** Sends the packet queue.
- *  Sends only packet successfully processed by the eth_prepare_packet() function.
- *  @param[in] device_id The device identifier.
- *  @param[in] packet The packet queue.
- *  @param[in] sender The sending module service.
- *  @returns EOK on success.
- *  @returns ENOENT if there no such device.
- *  @returns EINVAL if the service parameter is not known.
- */
-int eth_send_message(device_id_t device_id, packet_t packet, services_t sender);
-
-/*@}*/
-
-/** Processes the received packet and chooses the target registered module.
- *  @param[in] flags The device flags.
- *  @param[in] packet The packet.
- *  @returns The target registered module.
- *  @returns NULL if the packet is not long enough.
- *  @returns NULL if the packet is too long.
- *  @returns NULL if the raw ethernet protocol is used.
- *  @returns NULL if the dummy device FCS checksum is invalid.
- *  @returns NULL if the packet address length is not big enough.
- */
-eth_proto_ref eth_process_packet(int flags, packet_t packet);
-
-/** Prepares the packet for sending.
- *  @param[in] flags The device flags.
- *  @param[in] packet The packet.
- *  @param[in] src_addr The source hardware address.
- *  @param[in] ethertype The ethernet protocol type.
- *  @param[in] mtu The device maximum transmission unit.
- *  @returns EOK on success.
- *  @returns EINVAL if the packet addresses length is not long enough.
- *  @returns EINVAL if the packet is bigger than the device MTU.
- *  @returns ENOMEM if there is not enough memory in the packet.
- */
-int eth_prepare_packet(int flags, packet_t packet, uint8_t * src_addr, int ethertype, size_t mtu);
-
-DEVICE_MAP_IMPLEMENT(eth_devices, eth_device_t)
-
-INT_MAP_IMPLEMENT(eth_protos, eth_proto_t)
-
-int nil_device_state_msg_local(int nil_phone, device_id_t device_id, int state){
+/** Ethernet module global data. */
+eth_globals_t eth_globals;
+
+DEVICE_MAP_IMPLEMENT(eth_devices, eth_device_t);
+INT_MAP_IMPLEMENT(eth_protos, eth_proto_t);
+
+int nil_device_state_msg_local(int nil_phone, device_id_t device_id, int state)
+{
 	int index;
 	eth_proto_ref proto;
 
 	fibril_rwlock_read_lock(&eth_globals.protos_lock);
-	for(index = eth_protos_count(&eth_globals.protos) - 1; index >= 0; -- index){
+	for (index = eth_protos_count(&eth_globals.protos) - 1; index >= 0;
+	    index--) {
 		proto = eth_protos_get_index(&eth_globals.protos, index);
-		if(proto && proto->phone){
-			il_device_state_msg(proto->phone, device_id, state, proto->service);
+		if (proto && proto->phone) {
+			il_device_state_msg(proto->phone, device_id, state,
+			    proto->service);
 		}
 	}
 	fibril_rwlock_read_unlock(&eth_globals.protos_lock);
+	
 	return EOK;
 }
 
-int nil_initialize(int net_phone){
-	ERROR_DECLARE;
+int nil_initialize(int net_phone)
+{
+	int rc;
 
 	fibril_rwlock_initialize(&eth_globals.devices_lock);
 	fibril_rwlock_initialize(&eth_globals.protos_lock);
+	
 	fibril_rwlock_write_lock(&eth_globals.devices_lock);
 	fibril_rwlock_write_lock(&eth_globals.protos_lock);
 	eth_globals.net_phone = net_phone;
-	eth_globals.broadcast_addr = measured_string_create_bulk("\xFF\xFF\xFF\xFF\xFF\xFF", CONVERT_SIZE(uint8_t, char, ETH_ADDR));
-	if(! eth_globals.broadcast_addr){
-		return ENOMEM;
-	}
-	ERROR_PROPAGATE(eth_devices_initialize(&eth_globals.devices));
-	if(ERROR_OCCURRED(eth_protos_initialize(&eth_globals.protos))){
+	eth_globals.broadcast_addr =
+	    measured_string_create_bulk("\xFF\xFF\xFF\xFF\xFF\xFF",
+	    CONVERT_SIZE(uint8_t, char, ETH_ADDR));
+	if (!eth_globals.broadcast_addr) {
+		rc = ENOMEM;
+		goto out;
+	}
+	rc = eth_devices_initialize(&eth_globals.devices);
+	if (rc != EOK) {
+		free(eth_globals.broadcast_addr);
+		goto out;
+	}
+	rc = eth_protos_initialize(&eth_globals.protos);
+	if (rc != EOK) {
+		free(eth_globals.broadcast_addr);
 		eth_devices_destroy(&eth_globals.devices);
-		return ERROR_CODE;
-	}
+	}
+out:
 	fibril_rwlock_write_unlock(&eth_globals.protos_lock);
 	fibril_rwlock_write_unlock(&eth_globals.devices_lock);
-	return EOK;
-}
-
-int eth_device_message(device_id_t device_id, services_t service, size_t mtu){
-	ERROR_DECLARE;
-
+	
+	return rc;
+}
+
+/** Processes IPC messages from the registered device driver modules in an
+ * infinite loop.
+ *
+ * @param[in] iid	The message identifier.
+ * @param[in,out] icall	The message parameters.
+ */
+static void eth_receiver(ipc_callid_t iid, ipc_call_t *icall)
+{
+	packet_t packet;
+	int rc;
+
+	while (true) {
+		switch (IPC_GET_METHOD(*icall)) {
+		case NET_NIL_DEVICE_STATE:
+			nil_device_state_msg_local(0, IPC_GET_DEVICE(icall),
+			    IPC_GET_STATE(icall));
+			ipc_answer_0(iid, EOK);
+			break;
+		case NET_NIL_RECEIVED:
+			rc = packet_translate_remote(eth_globals.net_phone,
+			    &packet, IPC_GET_PACKET(icall));
+			if (rc == EOK) {
+				rc = nil_received_msg_local(0,
+				    IPC_GET_DEVICE(icall), packet, 0);
+			}
+			ipc_answer_0(iid, (ipcarg_t) rc);
+			break;
+		default:
+			ipc_answer_0(iid, (ipcarg_t) ENOTSUP);
+		}
+		
+		iid = async_get_call(icall);
+	}
+}
+
+/** Registers new device or updates the MTU of an existing one.
+ *
+ * Determines the device local hardware address.
+ *
+ * @param[in] device_id	The new device identifier.
+ * @param[in] service	The device driver service.
+ * @param[in] mtu	The device maximum transmission unit.
+ * @returns		EOK on success.
+ * @returns		EEXIST if the device with the different service exists.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the
+ *			net_get_device_conf_req() function.
+ * @returns		Other error codes as defined for the
+ *			netif_bind_service() function.
+ * @returns		Other error codes as defined for the
+ *			netif_get_addr_req() function.
+ */
+static int
+eth_device_message(device_id_t device_id, services_t service, size_t mtu)
+{
 	eth_device_ref device;
 	int index;
-	measured_string_t names[2] = {{str_dup("ETH_MODE"), 8}, {str_dup("ETH_DUMMY"), 9}};
+	measured_string_t names[2] = {
+		{
+			(char *) "ETH_MODE",
+			8
+		},
+		{
+			(char *) "ETH_DUMMY",
+			9
+		}
+	};
 	measured_string_ref configuration;
 	size_t count = sizeof(names) / sizeof(measured_string_t);
-	char * data;
+	char *data;
 	eth_proto_ref proto;
+	int rc;
 
 	fibril_rwlock_write_lock(&eth_globals.devices_lock);
 	// an existing device?
 	device = eth_devices_find(&eth_globals.devices, device_id);
-	if(device){
-		if(device->service != service){
+	if (device) {
+		if (device->service != service) {
 			printf("Device %d already exists\n", device->device_id);
 			fibril_rwlock_write_unlock(&eth_globals.devices_lock);
 			return EEXIST;
-		}else{
-			// update mtu
-			if((mtu > 0) && (mtu <= ETH_MAX_TAGGED_CONTENT(device->flags))){
-				device->mtu = mtu;
-			}else{
-				 device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags);
+		}
+		
+		// update mtu
+		if ((mtu > 0) && (mtu <= ETH_MAX_TAGGED_CONTENT(device->flags)))
+			device->mtu = mtu;
+		else
+			device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags);
+		
+		printf("Device %d already exists:\tMTU\t= %d\n",
+		    device->device_id, device->mtu);
+		fibril_rwlock_write_unlock(&eth_globals.devices_lock);
+		
+		// notify all upper layer modules
+		fibril_rwlock_read_lock(&eth_globals.protos_lock);
+		for (index = 0; index < eth_protos_count(&eth_globals.protos);
+		    index++) {
+			proto = eth_protos_get_index(&eth_globals.protos,
+			    index);
+			if (proto->phone) {
+				il_mtu_changed_msg(proto->phone,
+				    device->device_id, device->mtu,
+				    proto->service);
 			}
-			printf("Device %d already exists:\tMTU\t= %d\n", device->device_id, device->mtu);
-			fibril_rwlock_write_unlock(&eth_globals.devices_lock);
-			// notify all upper layer modules
-			fibril_rwlock_read_lock(&eth_globals.protos_lock);
-			for(index = 0; index < eth_protos_count(&eth_globals.protos); ++ index){
-				proto = eth_protos_get_index(&eth_globals.protos, index);
-				if (proto->phone){
-					il_mtu_changed_msg(proto->phone, device->device_id, device->mtu, proto->service);
-				}
-			}
-			fibril_rwlock_read_unlock(&eth_globals.protos_lock);
-			return EOK;
-		}
-	}else{
-		// create a new device
-		device = (eth_device_ref) malloc(sizeof(eth_device_t));
-		if(! device){
-			return ENOMEM;
-		}
-		device->device_id = device_id;
-		device->service = service;
-		device->flags = 0;
-		if((mtu > 0) && (mtu <= ETH_MAX_TAGGED_CONTENT(device->flags))){
-			device->mtu = mtu;
-		}else{
-			 device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags);
-		}
-		configuration = &names[0];
-		if(ERROR_OCCURRED(net_get_device_conf_req(eth_globals.net_phone, device->device_id, &configuration, count, &data))){
-			fibril_rwlock_write_unlock(&eth_globals.devices_lock);
-			free(device);
-			return ERROR_CODE;
-		}
-		if(configuration){
-			if(! str_lcmp(configuration[0].value, "DIX", configuration[0].length)){
-				device->flags |= ETH_DIX;
-			}else if(! str_lcmp(configuration[0].value, "8023_2_LSAP", configuration[0].length)){
-				device->flags |= ETH_8023_2_LSAP;
-			}else device->flags |= ETH_8023_2_SNAP;
-			if((configuration[1].value) && (configuration[1].value[0] == 'y')){
-				device->flags |= ETH_DUMMY;
-			}
-			net_free_settings(configuration, data);
-		}else{
+		}
+		fibril_rwlock_read_unlock(&eth_globals.protos_lock);
+		return EOK;
+	}
+	
+	// create a new device
+	device = (eth_device_ref) malloc(sizeof(eth_device_t));
+	if (!device)
+		return ENOMEM;
+
+	device->device_id = device_id;
+	device->service = service;
+	device->flags = 0;
+	if ((mtu > 0) && (mtu <= ETH_MAX_TAGGED_CONTENT(device->flags)))
+		device->mtu = mtu;
+	else
+		device->mtu = ETH_MAX_TAGGED_CONTENT(device->flags);
+
+	configuration = &names[0];
+	rc = net_get_device_conf_req(eth_globals.net_phone, device->device_id,
+	    &configuration, count, &data);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&eth_globals.devices_lock);
+		free(device);
+		return rc;
+	}
+	if (configuration) {
+		if (!str_lcmp(configuration[0].value, "DIX",
+		    configuration[0].length)) {
+			device->flags |= ETH_DIX;
+		} else if(!str_lcmp(configuration[0].value, "8023_2_LSAP",
+		    configuration[0].length)) {
+			device->flags |= ETH_8023_2_LSAP;
+		} else {
 			device->flags |= ETH_8023_2_SNAP;
 		}
-		// bind the device driver
-		device->phone = netif_bind_service(device->service, device->device_id, SERVICE_ETHERNET, eth_receiver);
-		if(device->phone < 0){
-			fibril_rwlock_write_unlock(&eth_globals.devices_lock);
-			free(device);
-			return device->phone;
-		}
-		// get hardware address
-		if(ERROR_OCCURRED(netif_get_addr_req(device->phone, device->device_id, &device->addr, &device->addr_data))){
-			fibril_rwlock_write_unlock(&eth_globals.devices_lock);
-			free(device);
-			return ERROR_CODE;
-		}
-		// add to the cache
-		index = eth_devices_add(&eth_globals.devices, device->device_id, device);
-		if(index < 0){
-			fibril_rwlock_write_unlock(&eth_globals.devices_lock);
-			free(device->addr);
-			free(device->addr_data);
-			free(device);
-			return index;
-		}
-		printf("%s: Device registered (id: %d, service: %d: mtu: %d, "
-		    "mac: %x:%x:%x:%x:%x:%x, flags: 0x%x)\n",
-		    NAME, device->device_id, device->service, device->mtu,
-		    device->addr_data[0], device->addr_data[1],
-		    device->addr_data[2], device->addr_data[3],
-		    device->addr_data[4], device->addr_data[5], device->flags);
-	}
+		
+		if (configuration[1].value &&
+		    (configuration[1].value[0] == 'y')) {
+			device->flags |= ETH_DUMMY;
+		}
+		net_free_settings(configuration, data);
+	} else {
+		device->flags |= ETH_8023_2_SNAP;
+	}
+	
+	// bind the device driver
+	device->phone = netif_bind_service(device->service, device->device_id,
+	    SERVICE_ETHERNET, eth_receiver);
+	if (device->phone < 0) {
+		fibril_rwlock_write_unlock(&eth_globals.devices_lock);
+		free(device);
+		return device->phone;
+	}
+	
+	// get hardware address
+	rc = netif_get_addr_req(device->phone, device->device_id, &device->addr,
+	    &device->addr_data);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&eth_globals.devices_lock);
+		free(device);
+		return rc;
+	}
+	
+	// add to the cache
+	index = eth_devices_add(&eth_globals.devices, device->device_id,
+	    device);
+	if (index < 0) {
+		fibril_rwlock_write_unlock(&eth_globals.devices_lock);
+		free(device->addr);
+		free(device->addr_data);
+		free(device);
+		return index;
+	}
+	
+	printf("%s: Device registered (id: %d, service: %d: mtu: %d, "
+	    "mac: %x:%x:%x:%x:%x:%x, flags: 0x%x)\n",
+	    NAME, device->device_id, device->service, device->mtu,
+	    device->addr_data[0], device->addr_data[1],
+	    device->addr_data[2], device->addr_data[3],
+	    device->addr_data[4], device->addr_data[5], device->flags);
+
 	fibril_rwlock_write_unlock(&eth_globals.devices_lock);
 	return EOK;
 }
 
-eth_proto_ref eth_process_packet(int flags, packet_t packet){
-	ERROR_DECLARE;
-
+/** Processes the received packet and chooses the target registered module.
+ *
+ * @param[in] flags	The device flags.
+ * @param[in] packet	The packet.
+ * @returns		The target registered module.
+ * @returns		NULL if the packet is not long enough.
+ * @returns		NULL if the packet is too long.
+ * @returns		NULL if the raw ethernet protocol is used.
+ * @returns		NULL if the dummy device FCS checksum is invalid.
+ * @returns		NULL if the packet address length is not big enough.
+ */
+static eth_proto_ref eth_process_packet(int flags, packet_t packet)
+{
 	eth_header_snap_ref header;
 	size_t length;
@@ -423,15 +437,20 @@
 	size_t suffix;
 	eth_fcs_ref fcs;
-	uint8_t * data;
+	uint8_t *data;
+	int rc;
 
 	length = packet_get_data_length(packet);
-	if(IS_DUMMY(flags)){
+	
+	if (IS_DUMMY(flags))
 		packet_trim(packet, sizeof(eth_preamble_t), 0);
-	}
-	if(length < sizeof(eth_header_t) + ETH_MIN_CONTENT + (IS_DUMMY(flags) ? ETH_SUFFIX : 0)) return NULL;
+	if (length < sizeof(eth_header_t) + ETH_MIN_CONTENT +
+	    (IS_DUMMY(flags) ? ETH_SUFFIX : 0))
+		return NULL;
+	
 	data = packet_get_data(packet);
 	header = (eth_header_snap_ref) data;
 	type = ntohs(header->header.ethertype);
-	if(type >= ETH_MIN_PROTO){
+	
+	if (type >= ETH_MIN_PROTO) {
 		// DIX Ethernet
 		prefix = sizeof(eth_header_t);
@@ -439,42 +458,56 @@
 		fcs = (eth_fcs_ref) data + length - sizeof(eth_fcs_t);
 		length -= sizeof(eth_fcs_t);
-	}else if(type <= ETH_MAX_CONTENT){
+	} else if(type <= ETH_MAX_CONTENT) {
 		// translate "LSAP" values
-		if((header->lsap.dsap == ETH_LSAP_GLSAP) && (header->lsap.ssap == ETH_LSAP_GLSAP)){
+		if ((header->lsap.dsap == ETH_LSAP_GLSAP) &&
+		    (header->lsap.ssap == ETH_LSAP_GLSAP)) {
 			// raw packet
 			// discard
 			return NULL;
-		}else if((header->lsap.dsap == ETH_LSAP_SNAP) && (header->lsap.ssap == ETH_LSAP_SNAP)){
+		} else if((header->lsap.dsap == ETH_LSAP_SNAP) &&
+		    (header->lsap.ssap == ETH_LSAP_SNAP)) {
 			// IEEE 802.3 + 802.2 + LSAP + SNAP
 			// organization code not supported
 			type = ntohs(header->snap.ethertype);
-			prefix = sizeof(eth_header_t) + sizeof(eth_header_lsap_t) + sizeof(eth_header_snap_t);
-		}else{
+			prefix = sizeof(eth_header_t) +
+			    sizeof(eth_header_lsap_t) +
+			    sizeof(eth_header_snap_t);
+		} else {
 			// IEEE 802.3 + 802.2 LSAP
 			type = lsap_map(header->lsap.dsap);
-			prefix = sizeof(eth_header_t) + sizeof(eth_header_lsap_t);
-		}
-		suffix = (type < ETH_MIN_CONTENT) ? ETH_MIN_CONTENT - type : 0u;
+			prefix = sizeof(eth_header_t) +
+			    sizeof(eth_header_lsap_t);
+		}
+		suffix = (type < ETH_MIN_CONTENT) ? ETH_MIN_CONTENT - type : 0U;
 		fcs = (eth_fcs_ref) data + prefix + type + suffix;
 		suffix += length - prefix - type;
 		length = prefix + type + suffix;
-	}else{
+	} else {
 		// invalid length/type, should not occurr
 		return NULL;
 	}
-	if(IS_DUMMY(flags)){
-		if((~ compute_crc32(~ 0u, data, length * 8)) != ntohl(*fcs)){
+	
+	if (IS_DUMMY(flags)) {
+		if (~compute_crc32(~0U, data, length * 8) != ntohl(*fcs))
 			return NULL;
-		}
 		suffix += sizeof(eth_fcs_t);
 	}
-	if(ERROR_OCCURRED(packet_set_addr(packet, header->header.source_address, header->header.destination_address, ETH_ADDR))
-		|| ERROR_OCCURRED(packet_trim(packet, prefix, suffix))){
+	
+	rc = packet_set_addr(packet, header->header.source_address,
+	    header->header.destination_address, ETH_ADDR);
+	if (rc != EOK)
 		return NULL;
-	}
+
+	rc = packet_trim(packet, prefix, suffix);
+	if (rc != EOK)
+		return NULL;
+	
 	return eth_protos_find(&eth_globals.protos, type);
 }
 
-int nil_received_msg_local(int nil_phone, device_id_t device_id, packet_t packet, services_t target){
+int
+nil_received_msg_local(int nil_phone, device_id_t device_id, packet_t packet,
+    services_t target)
+{
 	eth_proto_ref proto;
 	packet_t next;
@@ -484,5 +517,5 @@
 	fibril_rwlock_read_lock(&eth_globals.devices_lock);
 	device = eth_devices_find(&eth_globals.devices, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_read_unlock(&eth_globals.devices_lock);
 		return ENOENT;
@@ -490,29 +523,47 @@
 	flags = device->flags;
 	fibril_rwlock_read_unlock(&eth_globals.devices_lock);
+	
 	fibril_rwlock_read_lock(&eth_globals.protos_lock);
-	do{
+	do {
 		next = pq_detach(packet);
 		proto = eth_process_packet(flags, packet);
-		if(proto){
-			il_received_msg(proto->phone, device_id, packet, proto->service);
-		}else{
+		if (proto) {
+			il_received_msg(proto->phone, device_id, packet,
+			    proto->service);
+		} else {
 			// drop invalid/unknown
-			pq_release_remote(eth_globals.net_phone, packet_get_id(packet));
+			pq_release_remote(eth_globals.net_phone,
+			    packet_get_id(packet));
 		}
 		packet = next;
-	}while(packet);
+	} while(packet);
 	fibril_rwlock_read_unlock(&eth_globals.protos_lock);
+	
 	return EOK;
 }
 
-int eth_packet_space_message(device_id_t device_id, size_t * addr_len, size_t * prefix, size_t * content, size_t * suffix){
+/** Returns the device packet dimensions for sending.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[out] addr_len	The minimum reserved address length.
+ * @param[out] prefix	The minimum reserved prefix size.
+ * @param[out] content	The maximum content size.
+ * @param[out] suffix	The minimum reserved suffix size.
+ * @returns		EOK on success.
+ * @returns		EBADMEM if either one of the parameters is NULL.
+ * @returns		ENOENT if there is no such device.
+ */
+static int
+eth_packet_space_message(device_id_t device_id, size_t *addr_len,
+    size_t *prefix, size_t *content, size_t *suffix)
+{
 	eth_device_ref device;
 
-	if(!(addr_len && prefix && content && suffix)){
+	if (!addr_len || !prefix || !content || !suffix)
 		return EBADMEM;
-	}
+	
 	fibril_rwlock_read_lock(&eth_globals.devices_lock);
 	device = eth_devices_find(&eth_globals.devices, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_read_unlock(&eth_globals.devices_lock);
 		return ENOENT;
@@ -520,4 +571,5 @@
 	*content = device->mtu;
 	fibril_rwlock_read_unlock(&eth_globals.devices_lock);
+	
 	*addr_len = ETH_ADDR;
 	*prefix = ETH_PREFIX;
@@ -526,16 +578,28 @@
 }
 
-int eth_addr_message(device_id_t device_id, eth_addr_type_t type, measured_string_ref * address){
+/** Returns the device hardware address.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] type	Type of the desired address.
+ * @param[out] address	The device hardware address.
+ * @returns		EOK on success.
+ * @returns		EBADMEM if the address parameter is NULL.
+ * @returns		ENOENT if there no such device.
+ */
+static int
+eth_addr_message(device_id_t device_id, eth_addr_type_t type,
+    measured_string_ref *address)
+{
 	eth_device_ref device;
 
-	if(! address){
+	if (!address)
 		return EBADMEM;
-	}
-	if(type == ETH_BROADCAST_ADDR){
+
+	if (type == ETH_BROADCAST_ADDR) {
 		*address = eth_globals.broadcast_addr;
-	}else{
+	} else {
 		fibril_rwlock_read_lock(&eth_globals.devices_lock);
 		device = eth_devices_find(&eth_globals.devices, device_id);
-		if(! device){
+		if (!device) {
 			fibril_rwlock_read_unlock(&eth_globals.devices_lock);
 			return ENOENT;
@@ -544,8 +608,20 @@
 		fibril_rwlock_read_unlock(&eth_globals.devices_lock);
 	}
+	
 	return (*address) ? EOK : ENOENT;
 }
 
-int eth_register_message(services_t service, int phone){
+/** Registers receiving module service.
+ *
+ * Passes received packets for this service.
+ *
+ * @param[in] service	The module service.
+ * @param[in] phone	The service phone.
+ * @returns		EOK on success.
+ * @returns		ENOENT if the service is not known.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+static int eth_register_message(services_t service, int phone)
+{
 	eth_proto_ref proto;
 	int protocol;
@@ -553,16 +629,16 @@
 
 	protocol = protocol_map(SERVICE_ETHERNET, service);
-	if(! protocol){
+	if (!protocol)
 		return ENOENT;
-	}
+
 	fibril_rwlock_write_lock(&eth_globals.protos_lock);
 	proto = eth_protos_find(&eth_globals.protos, protocol);
-	if(proto){
+	if (proto) {
 		proto->phone = phone;
 		fibril_rwlock_write_unlock(&eth_globals.protos_lock);
 		return EOK;
-	}else{
+	} else {
 		proto = (eth_proto_ref) malloc(sizeof(eth_proto_t));
-		if(! proto){
+		if (!proto) {
 			fibril_rwlock_write_unlock(&eth_globals.protos_lock);
 			return ENOMEM;
@@ -572,5 +648,5 @@
 		proto->phone = phone;
 		index = eth_protos_add(&eth_globals.protos, protocol, proto);
-		if(index < 0){
+		if (index < 0) {
 			fibril_rwlock_write_unlock(&eth_globals.protos_lock);
 			free(proto);
@@ -579,6 +655,6 @@
 	}
 	
-	printf("%s: Protocol registered (protocol: %d, service: %d, phone: %d)\n",
-	    NAME, proto->protocol, proto->service, proto->phone);
+	printf("%s: Protocol registered (protocol: %d, service: %d, phone: "
+	    "%d)\n", NAME, proto->protocol, proto->service, proto->phone);
 	
 	fibril_rwlock_write_unlock(&eth_globals.protos_lock);
@@ -586,49 +662,66 @@
 }
 
-int eth_prepare_packet(int flags, packet_t packet, uint8_t * src_addr, int ethertype, size_t mtu){
+/** Prepares the packet for sending.
+ *
+ * @param[in] flags	The device flags.
+ * @param[in] packet	The packet.
+ * @param[in] src_addr	The source hardware address.
+ * @param[in] ethertype	The ethernet protocol type.
+ * @param[in] mtu	The device maximum transmission unit.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet addresses length is not long
+ *			enough.
+ * @returns		EINVAL if the packet is bigger than the device MTU.
+ * @returns		ENOMEM if there is not enough memory in the packet.
+ */
+static int
+eth_prepare_packet(int flags, packet_t packet, uint8_t *src_addr, int ethertype,
+    size_t mtu)
+{
 	eth_header_snap_ref header;
 	eth_header_lsap_ref header_lsap;
 	eth_header_ref header_dix;
 	eth_fcs_ref fcs;
-	uint8_t * src;
-	uint8_t * dest;
+	uint8_t *src;
+	uint8_t *dest;
 	size_t length;
 	int i;
-	void * padding;
+	void *padding;
 	eth_preamble_ref preamble;
 
 	i = packet_get_addr(packet, &src, &dest);
-	if(i < 0){
+	if (i < 0)
 		return i;
-	}
-	if(i != ETH_ADDR){
+	if (i != ETH_ADDR)
 		return EINVAL;
-	}
+
 	length = packet_get_data_length(packet);
-	if(length > mtu){
+	if (length > mtu)
 		return EINVAL;
-	}
-	if(length < ETH_MIN_TAGGED_CONTENT(flags)){
-		padding = packet_suffix(packet, ETH_MIN_TAGGED_CONTENT(flags) - length);
-		if(! padding){
+	
+	if (length < ETH_MIN_TAGGED_CONTENT(flags)) {
+		padding = packet_suffix(packet,
+		    ETH_MIN_TAGGED_CONTENT(flags) - length);
+		if (!padding)
 			return ENOMEM;
-		}
 		bzero(padding, ETH_MIN_TAGGED_CONTENT(flags) - length);
 	}
-	if(IS_DIX(flags)){
+	
+	if (IS_DIX(flags)) {
 		header_dix = PACKET_PREFIX(packet, eth_header_t);
-		if(! header_dix){
+		if (!header_dix)
 			return ENOMEM;
-		}
+		
 		header_dix->ethertype = (uint16_t) ethertype;
 		memcpy(header_dix->source_address, src_addr, ETH_ADDR);
 		memcpy(header_dix->destination_address, dest, ETH_ADDR);
 		src = &header_dix->destination_address[0];
-	}else if(IS_8023_2_LSAP(flags)){
+	} else if(IS_8023_2_LSAP(flags)) {
 		header_lsap = PACKET_PREFIX(packet, eth_header_lsap_t);
-		if(! header_lsap){
+		if (!header_lsap)
 			return ENOMEM;
-		}
-		header_lsap->header.ethertype = htons(length + sizeof(eth_header_lsap_t));
+		
+		header_lsap->header.ethertype = htons(length +
+		    sizeof(eth_header_lsap_t));
 		header_lsap->lsap.dsap = lsap_unmap(ntohs(ethertype));
 		header_lsap->lsap.ssap = header_lsap->lsap.dsap;
@@ -637,16 +730,18 @@
 		memcpy(header_lsap->header.destination_address, dest, ETH_ADDR);
 		src = &header_lsap->header.destination_address[0];
-	}else if(IS_8023_2_SNAP(flags)){
+	} else if(IS_8023_2_SNAP(flags)) {
 		header = PACKET_PREFIX(packet, eth_header_snap_t);
-		if(! header){
+		if (!header)
 			return ENOMEM;
-		}
-		header->header.ethertype = htons(length + sizeof(eth_header_lsap_t) + sizeof(eth_header_snap_t));
+		
+		header->header.ethertype = htons(length +
+		    sizeof(eth_header_lsap_t) + sizeof(eth_header_snap_t));
 		header->lsap.dsap = (uint16_t) ETH_LSAP_SNAP;
 		header->lsap.ssap = header->lsap.dsap;
 		header->lsap.ctrl = IEEE_8023_2_UI;
-		for(i = 0; i < 3; ++ i){
+		
+		for (i = 0; i < 3; ++ i)
 			header->snap.protocol[i] = 0;
-		}
+		
 		header->snap.ethertype = (uint16_t) ethertype;
 		memcpy(header->header.source_address, src_addr, ETH_ADDR);
@@ -654,69 +749,91 @@
 		src = &header->header.destination_address[0];
 	}
-	if(IS_DUMMY(flags)){
+	
+	if (IS_DUMMY(flags)) {
 		preamble = PACKET_PREFIX(packet, eth_preamble_t);
-		if(! preamble){
+		if (!preamble)
 			return ENOMEM;
-		}
-		for(i = 0; i < 7; ++ i){
+		
+		for (i = 0; i < 7; ++ i)
 			preamble->preamble[i] = ETH_PREAMBLE;
-		}
+		
 		preamble->sfd = ETH_SFD;
+		
 		fcs = PACKET_SUFFIX(packet, eth_fcs_t);
-		if(! fcs){
+		if (!fcs)
 			return ENOMEM;
-		}
-		*fcs = htonl(~ compute_crc32(~ 0u, src, length * 8));
-	}
+
+		*fcs = htonl(~compute_crc32(~0U, src, length * 8));
+	}
+	
 	return EOK;
 }
 
-int eth_send_message(device_id_t device_id, packet_t packet, services_t sender){
-	ERROR_DECLARE;
-
+/** Sends the packet queue.
+ *
+ * Sends only packet successfully processed by the eth_prepare_packet()
+ * function.
+ *
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The packet queue.
+ * @param[in] sender	The sending module service.
+ * @returns		EOK on success.
+ * @returns		ENOENT if there no such device.
+ * @returns		EINVAL if the service parameter is not known.
+ */
+static int
+eth_send_message(device_id_t device_id, packet_t packet, services_t sender)
+{
 	eth_device_ref device;
 	packet_t next;
 	packet_t tmp;
 	int ethertype;
+	int rc;
 
 	ethertype = htons(protocol_map(SERVICE_ETHERNET, sender));
-	if(! ethertype){
+	if (!ethertype) {
 		pq_release_remote(eth_globals.net_phone, packet_get_id(packet));
 		return EINVAL;
 	}
+	
 	fibril_rwlock_read_lock(&eth_globals.devices_lock);
 	device = eth_devices_find(&eth_globals.devices, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_read_unlock(&eth_globals.devices_lock);
 		return ENOENT;
 	}
+	
 	// process packet queue
 	next = packet;
-	do{
-		if(ERROR_OCCURRED(eth_prepare_packet(device->flags, next, (uint8_t *) device->addr->value, ethertype, device->mtu))){
+	do {
+		rc = eth_prepare_packet(device->flags, next,
+		    (uint8_t *) device->addr->value, ethertype, device->mtu);
+		if (rc != EOK) {
 			// release invalid packet
 			tmp = pq_detach(next);
-			if(next == packet){
+			if (next == packet)
 				packet = tmp;
-			}
-			pq_release_remote(eth_globals.net_phone, packet_get_id(next));
+			pq_release_remote(eth_globals.net_phone,
+			    packet_get_id(next));
 			next = tmp;
-		}else{
+		} else {
 			next = pq_next(next);
 		}
-	}while(next);
+	} while(next);
+	
 	// send packet queue
-	if(packet){
-		netif_send_msg(device->phone, device_id, packet, SERVICE_ETHERNET);
+	if (packet) {
+		netif_send_msg(device->phone, device_id, packet,
+		    SERVICE_ETHERNET);
 	}
 	fibril_rwlock_read_unlock(&eth_globals.devices_lock);
+	
 	return EOK;
 }
 
-int nil_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
+int
+nil_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
     ipc_call_t *answer, int *answer_count)
 {
-	ERROR_DECLARE;
-	
 	measured_string_ref address;
 	packet_t packet;
@@ -725,37 +842,47 @@
 	size_t suffix;
 	size_t content;
+	int rc;
 	
 	*answer_count = 0;
 	switch (IPC_GET_METHOD(*call)) {
-		case IPC_M_PHONE_HUNGUP:
+	case IPC_M_PHONE_HUNGUP:
+		return EOK;
+	
+	case NET_NIL_DEVICE:
+		return eth_device_message(IPC_GET_DEVICE(call),
+		    IPC_GET_SERVICE(call), IPC_GET_MTU(call));
+	case NET_NIL_SEND:
+		rc = packet_translate_remote(eth_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return eth_send_message(IPC_GET_DEVICE(call), packet,
+		    IPC_GET_SERVICE(call));
+	case NET_NIL_PACKET_SPACE:
+		rc = eth_packet_space_message(IPC_GET_DEVICE(call), &addrlen,
+		    &prefix, &content, &suffix);
+		if (rc != EOK)
+			return rc;
+		IPC_SET_ADDR(answer, addrlen);
+		IPC_SET_PREFIX(answer, prefix);
+		IPC_SET_CONTENT(answer, content);
+		IPC_SET_SUFFIX(answer, suffix);
+		*answer_count = 4;
+		return EOK;
+	case NET_NIL_ADDR:
+		rc = eth_addr_message(IPC_GET_DEVICE(call), ETH_LOCAL_ADDR,
+		    &address);
+		if (rc != EOK)
+			return rc;
+		return measured_strings_reply(address, 1);
+	case NET_NIL_BROADCAST_ADDR:
+		rc = eth_addr_message(IPC_GET_DEVICE(call), ETH_BROADCAST_ADDR,
+		    &address);
+		if (rc != EOK)
 			return EOK;
-		case NET_NIL_DEVICE:
-			return eth_device_message(IPC_GET_DEVICE(call),
-			    IPC_GET_SERVICE(call), IPC_GET_MTU(call));
-		case NET_NIL_SEND:
-			ERROR_PROPAGATE(packet_translate_remote(eth_globals.net_phone, &packet,
-			    IPC_GET_PACKET(call)));
-			return eth_send_message(IPC_GET_DEVICE(call), packet,
-			    IPC_GET_SERVICE(call));
-		case NET_NIL_PACKET_SPACE:
-			ERROR_PROPAGATE(eth_packet_space_message(IPC_GET_DEVICE(call),
-			    &addrlen, &prefix, &content, &suffix));
-			IPC_SET_ADDR(answer, addrlen);
-			IPC_SET_PREFIX(answer, prefix);
-			IPC_SET_CONTENT(answer, content);
-			IPC_SET_SUFFIX(answer, suffix);
-			*answer_count = 4;
-			return EOK;
-		case NET_NIL_ADDR:
-			ERROR_PROPAGATE(eth_addr_message(IPC_GET_DEVICE(call),
-			    ETH_LOCAL_ADDR, &address));
-			return measured_strings_reply(address, 1);
-		case NET_NIL_BROADCAST_ADDR:
-			ERROR_PROPAGATE(eth_addr_message(IPC_GET_DEVICE(call),
-			    ETH_BROADCAST_ADDR, &address));
-			return measured_strings_reply(address, 1);
-		case IPC_M_CONNECT_TO_ME:
-			return eth_register_message(NIL_GET_PROTO(call),
-			    IPC_GET_PHONE(call));
+		return measured_strings_reply(address, 1);
+	case IPC_M_CONNECT_TO_ME:
+		return eth_register_message(NIL_GET_PROTO(call),
+		    IPC_GET_PHONE(call));
 	}
 	
@@ -763,33 +890,8 @@
 }
 
-void eth_receiver(ipc_callid_t iid, ipc_call_t * icall){
-	ERROR_DECLARE;
-
-	packet_t packet;
-
-	while(true){
-//		printf("message %d - %d\n", IPC_GET_METHOD(*icall), NET_NIL_FIRST);
-		switch(IPC_GET_METHOD(*icall)){
-			case NET_NIL_DEVICE_STATE:
-				nil_device_state_msg_local(0, IPC_GET_DEVICE(icall), IPC_GET_STATE(icall));
-				ipc_answer_0(iid, EOK);
-				break;
-			case NET_NIL_RECEIVED:
-				if(! ERROR_OCCURRED(packet_translate_remote(eth_globals.net_phone, &packet, IPC_GET_PACKET(icall)))){
-					ERROR_CODE = nil_received_msg_local(0, IPC_GET_DEVICE(icall), packet, 0);
-				}
-				ipc_answer_0(iid, (ipcarg_t) ERROR_CODE);
-				break;
-			default:
-				ipc_answer_0(iid, (ipcarg_t) ENOTSUP);
-		}
-		iid = async_get_call(icall);
-	}
-}
-
 /** Default thread for new connections.
  *
- * @param[in] iid The initial message identifier.
- * @param[in] icall The initial message call structure.
+ * @param[in] iid	The initial message identifier.
+ * @param[in] icall	The initial message call structure.
  *
  */
@@ -802,5 +904,5 @@
 	ipc_answer_0(iid, EOK);
 	
-	while(true) {
+	while (true) {
 		ipc_call_t answer;
 		int answer_count;
@@ -814,9 +916,13 @@
 		
 		/* Process the message */
-		int res = nil_module_message_standalone(NAME, callid, &call, &answer,
-		    &answer_count);
-		
-		/* End if said to either by the message or the processing result */
-		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+		int res = nil_module_message_standalone(NAME, callid, &call,
+		    &answer, &answer_count);
+		
+		/*
+		 * End if told to either by the message or the processing
+		 * result.
+		 */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
+		    (res == EHANGUP))
 			return;
 		
@@ -828,11 +934,9 @@
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	if (ERROR_OCCURRED(nil_module_start_standalone(nil_client_connection)))
-		return ERROR_CODE;
-	
-	return EOK;
+	rc = nil_module_start_standalone(nil_client_connection);
+	return rc;
 }
 
Index: uspace/srv/net/nil/eth/eth.h
===================================================================
--- uspace/srv/net/nil/eth/eth.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/nil/eth/eth.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -32,9 +32,9 @@
 
 /** @file
- *  Ethernet module.
+ * Ethernet module.
  */
 
-#ifndef __NET_ETH_H__
-#define __NET_ETH_H__
+#ifndef NET_ETH_H_
+#define NET_ETH_H_
 
 #include <fibril_synch.h>
@@ -45,103 +45,92 @@
 
 /** Type definition of the Ethernet global data.
- *  @see eth_globals
+ * @see eth_globals
  */
-typedef struct eth_globals	eth_globals_t;
+typedef struct eth_globals eth_globals_t;
 
 /** Type definition of the Ethernet device specific data.
- *  @see eth_device
+ * @see eth_device
  */
-typedef struct eth_device	eth_device_t;
+typedef struct eth_device eth_device_t;
 
 /** Type definition of the Ethernet device specific data pointer.
- *  @see eth_device
+ * @see eth_device
  */
-typedef eth_device_t *		eth_device_ref;
+typedef eth_device_t *eth_device_ref;
 
 /** Type definition of the Ethernet protocol specific data.
- *  @see eth_proto
+ * @see eth_proto
  */
-typedef struct eth_proto	eth_proto_t;
+typedef struct eth_proto eth_proto_t;
 
 /** Type definition of the Ethernet protocol specific data pointer.
- *  @see eth_proto
+ * @see eth_proto
  */
-typedef eth_proto_t *		eth_proto_ref;
+typedef eth_proto_t *eth_proto_ref;
 
 /** Ethernet device map.
- *  Maps devices to the Ethernet device specific data.
- *  @see device.h
+ * Maps devices to the Ethernet device specific data.
+ * @see device.h
  */
-DEVICE_MAP_DECLARE(eth_devices, eth_device_t)
+DEVICE_MAP_DECLARE(eth_devices, eth_device_t);
 
 /** Ethernet protocol map.
- *  Maps protocol identifiers to the Ethernet protocol specific data.
- *  @see int_map.h
+ * Maps protocol identifiers to the Ethernet protocol specific data.
+ * @see int_map.h
  */
-INT_MAP_DECLARE(eth_protos, eth_proto_t)
+INT_MAP_DECLARE(eth_protos, eth_proto_t);
 
-/** Ethernet device specific data.
- */
-struct	eth_device{
-	/** Device identifier.
-	 */
+/** Ethernet device specific data. */
+struct eth_device {
+	/** Device identifier. */
 	device_id_t device_id;
-	/** Device driver service.
-	 */
+	/** Device driver service. */
 	services_t service;
-	/** Driver phone.
-	 */
+	/** Driver phone. */
 	int phone;
-	/** Maximal transmission unit.
-	 */
+	/** Maximal transmission unit. */
 	size_t mtu;
-	/** Various device flags.
-	 *  @see ETH_DUMMY
-	 *  @see ETH_MODE_MASK
+	
+	/**
+	 * Various device flags.
+	 * @see ETH_DUMMY
+	 * @see ETH_MODE_MASK
 	 */
 	int flags;
-	/** Actual device hardware address.
-	 */
+	
+	/** Actual device hardware address. */
 	measured_string_ref addr;
-	/** Actual device hardware address data.
-	 */
-	char * addr_data;
+	/** Actual device hardware address data. */
+	char *addr_data;
 };
 
-/** Ethernet protocol specific data.
- */
-struct eth_proto{
-	/** Protocol service.
-	 */
+/** Ethernet protocol specific data. */
+struct eth_proto {
+	/** Protocol service. */
 	services_t service;
-	/** Protocol identifier.
-	 */
+	/** Protocol identifier. */
 	int protocol;
-	/** Protocol module phone.
-	 */
+	/** Protocol module phone. */
 	int phone;
 };
 
-/** Ethernet global data.
- */
-struct	eth_globals{
-	/** Networking module phone.
-	 */
+/** Ethernet global data. */
+struct eth_globals {
+	/** Networking module phone. */
 	int net_phone;
-	/** Safety lock for devices.
-	 */
+	/** Safety lock for devices. */
 	fibril_rwlock_t devices_lock;
-	/** All known Ethernet devices.
-	 */
+	/** All known Ethernet devices. */
 	eth_devices_t devices;
-	/** Safety lock for protocols.
-	 */
+	/** Safety lock for protocols. */
 	fibril_rwlock_t protos_lock;
-	/** Protocol map.
-	 *  Service phone map for each protocol.
+	
+	/**
+	 * Protocol map.
+	 * Service phone map for each protocol.
 	 */
 	eth_protos_t protos;
-	/** Broadcast device hardware address.
-	 */
+	
+	/** Broadcast device hardware address. */
 	measured_string_ref broadcast_addr;
 };
Index: uspace/srv/net/nil/eth/eth_header.h
===================================================================
--- uspace/srv/net/nil/eth/eth_header.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/nil/eth/eth_header.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -32,101 +32,103 @@
 
 /** @file
- *  Ethernet protocol header definitions.
- *  Based on the IEEE~802.3-2005
- */
-
-#ifndef __NET_ETH_HEADER_H__
-#define __NET_ETH_HEADER_H__
+ * Ethernet protocol header definitions.
+ * Based on the IEEE 802.3-2005
+ */
+
+#ifndef NET_ETH_HEADER_H_
+#define NET_ETH_HEADER_H_
 
 #include <sys/types.h>
 
-/** Ethernet address length.
- */
-#define ETH_ADDR		6
-
-/** Ethernet header preamble value.
- */
+/** Ethernet address length. */
+#define ETH_ADDR	6
+
+/** Ethernet header preamble value. */
 #define ETH_PREAMBLE	0x55
 
-/** Ethernet header start of frame value.
- */
-#define ETH_SFD			0xD5
-
-/** IEEE 802.2 unordered information control field.
- */
+/** Ethernet header start of frame value. */
+#define ETH_SFD		0xD5
+
+/** IEEE 802.2 unordered information control field. */
 #define IEEE_8023_2_UI	0x03
 
 /** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
- *  @see eth_header_snap
- */
-typedef struct eth_header_snap	eth_header_snap_t;
-
-/** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions pointer.
- *  @see eth_header_snap
- */
-typedef eth_header_snap_t *		eth_header_snap_ref;
+ * @see eth_header_snap
+ */
+typedef struct eth_header_snap eth_header_snap_t;
+
+/** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions
+ * pointer.
+ *
+ * @see eth_header_snap
+ */
+typedef eth_header_snap_t *eth_header_snap_ref;
 
 /** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
- *  @see eth_header_lsap
- */
-typedef struct eth_header_lsap	eth_header_lsap_t;
+ * @see eth_header_lsap
+ */
+typedef struct eth_header_lsap eth_header_lsap_t;
 
 /** Type definition of the Ethernet header IEEE 802.3 + 802.2 extension pointer.
- *  @see eth_header_lsap
- */
-typedef eth_header_lsap_t *		eth_header_lsap_ref;
+ * @see eth_header_lsap
+ */
+typedef eth_header_lsap_t *eth_header_lsap_ref;
 
 /** Type definition of the Ethernet header LSAP extension.
- *  @see eth_ieee_lsap
- */
-typedef struct eth_ieee_lsap	eth_ieee_lsap_t;
+ * @see eth_ieee_lsap
+ */
+typedef struct eth_ieee_lsap eth_ieee_lsap_t;
 
 /** Type definition of the Ethernet header LSAP extension pointer.
- *  @see eth_ieee_lsap
- */
-typedef eth_ieee_lsap_t *		eth_ieee_lsap_ref;
+ * @see eth_ieee_lsap
+ */
+typedef eth_ieee_lsap_t *eth_ieee_lsap_ref;
 
 /** Type definition of the Ethernet header SNAP extension.
- *  @see eth_snap
- */
-typedef struct eth_snap		eth_snap_t;
+ * @see eth_snap
+ */
+typedef struct eth_snap eth_snap_t;
 
 /** Type definition of the Ethernet header SNAP extension pointer.
- *  @see eth_snap
- */
-typedef eth_snap_t *		eth_snap_ref;
+ * @see eth_snap
+ */
+typedef eth_snap_t *eth_snap_ref;
 
 /** Type definition of the Ethernet header preamble.
- *  @see preamble
- */
-typedef struct eth_preamble	eth_preamble_t;
+ * @see preamble
+ */
+typedef struct eth_preamble eth_preamble_t;
 
 /** Type definition of the Ethernet header preamble pointer.
- *  @see eth_preamble
- */
-typedef eth_preamble_t *	eth_preamble_ref;
+ * @see eth_preamble
+ */
+typedef eth_preamble_t *eth_preamble_ref;
 
 /** Type definition of the Ethernet header.
- *  @see eth_header
- */
-typedef struct eth_header	eth_header_t;
+ * @see eth_header
+ */
+typedef struct eth_header eth_header_t;
 
 /** Type definition of the Ethernet header pointer.
- *  @see eth_header
- */
-typedef eth_header_t *		eth_header_ref;
-
-/** Ethernet header Link Service Access Point extension.
- */
-struct eth_ieee_lsap{
-	/** Destination Service Access Point identifier.
+ * @see eth_header
+ */
+typedef eth_header_t *eth_header_ref;
+
+/** Ethernet header Link Service Access Point extension. */
+struct eth_ieee_lsap {
+	/**
+	 * Destination Service Access Point identifier.
 	 * The possible values are assigned by an IEEE committee.
 	 */
 	uint8_t dsap;
-	/** Source Service Access Point identifier.
+	
+	/**
+	 * Source Service Access Point identifier.
 	 * The possible values are assigned by an IEEE committee.
 	 */
 	uint8_t ssap;
-	/** Control parameter.
+	
+	/**
+	 * Control parameter.
 	 * The possible values are assigned by an IEEE committee.
 	 */
@@ -134,12 +136,12 @@
 } __attribute__ ((packed));
 
-/** Ethernet header SNAP extension.
- */
-struct eth_snap{
-	/** Protocol identifier or organization code.
-	 */
+/** Ethernet header SNAP extension. */
+struct eth_snap {
+	/** Protocol identifier or organization code. */
 	uint8_t protocol[3];
-	/** Ethernet protocol identifier in the network byte order (big endian).
-	 *  @see ethernet_protocols.h
+	
+	/**
+	 * Ethernet protocol identifier in the network byte order (big endian).
+	 * @see ethernet_protocols.h
 	 */
 	uint16_t ethertype;
@@ -147,68 +149,76 @@
 
 /** Ethernet header preamble.
- *  Used for dummy devices.
- */
-struct eth_preamble{
-	/** Controlling preamble used for the frame transmission synchronization.
-	 *  All should be set to ETH_PREAMBLE.
+ *
+ * Used for dummy devices.
+ */
+struct eth_preamble {
+	/**
+	 * Controlling preamble used for the frame transmission synchronization.
+	 * All should be set to ETH_PREAMBLE.
 	 */
 	uint8_t preamble[7];
-	/** Start of Frame Delimiter used for the frame transmission synchronization.
-	 *  Should be set to ETH_SFD.
+	
+	/**
+	 * Start of Frame Delimiter used for the frame transmission
+	 * synchronization.
+	 * Should be set to ETH_SFD.
 	 */
 	uint8_t sfd;
 } __attribute__ ((packed));
 
-/** Ethernet header.
- */
-struct eth_header{
-	/** Destination host Ethernet address (MAC address).
-	 */
+/** Ethernet header. */
+struct eth_header {
+	/** Destination host Ethernet address (MAC address). */
 	uint8_t destination_address[ETH_ADDR];
-	/** Source host Ethernet address (MAC address).
-	 */
+	/** Source host Ethernet address (MAC address). */
 	uint8_t source_address[ETH_ADDR];
-	/** Ethernet protocol identifier in the network byte order (big endian).
-	 *  @see ethernet_protocols.h
+	
+	/**
+	 * Ethernet protocol identifier in the network byte order (big endian).
+	 * @see ethernet_protocols.h
 	 */
 	uint16_t ethertype;
 } __attribute__ ((packed));
 
-/** Ethernet header IEEE 802.3 + 802.2 extension.
- */
-struct eth_header_lsap{
-	/** Ethernet header.
-	 */
+/** Ethernet header IEEE 802.3 + 802.2 extension. */
+struct eth_header_lsap {
+	/** Ethernet header. */
 	eth_header_t header;
-	/** LSAP extension.
-	 *  If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being used.
-	 *  If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet without any extensions is being used and the frame content starts rigth after the two fields.
+	
+	/**
+	 * LSAP extension.
+	 * If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being
+	 * used.
+	 * If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet
+	 * without any extensions is being used and the frame content starts
+	 * rigth after the two fields.
 	 */
 	eth_ieee_lsap_t lsap;
 } __attribute__ ((packed));
 
-/** Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
- */
-struct eth_header_snap{
-	/** Ethernet header.
-	 */
+/** Ethernet header IEEE 802.3 + 802.2 + SNAP extensions. */
+struct eth_header_snap {
+	/** Ethernet header. */
 	eth_header_t header;
-	/** LSAP extension.
-	 *  If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being used.
-	 *  If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet without any extensions is being used and the frame content starts rigth after the two fields.
+	
+	/**
+	 * LSAP extension.
+	 * If DSAP and SSAP are set to ETH_LSAP_SNAP the SNAP extension is being
+	 * used.
+	 * If DSAP and SSAP fields are equal to ETH_RAW the raw Ethernet packet
+	 * without any extensions is being used and the frame content starts
+	 * rigth after the two fields.
 	 */
 	eth_ieee_lsap_t lsap;
-	/** SNAP extension.
-	 */
+	
+	/** SNAP extension. */
 	eth_snap_t snap;
 } __attribute__ ((packed));
 
-/** Ethernet Frame Check Sequence.
- */
-typedef uint32_t		eth_fcs_t;
-
-/** Ethernet Frame Check Sequence pointer.
- */
-typedef eth_fcs_t *		eth_fcs_ref;
+/** Ethernet Frame Check Sequence. */
+typedef uint32_t eth_fcs_t;
+
+/** Ethernet Frame Check Sequence pointer. */
+typedef eth_fcs_t *eth_fcs_ref;
 
 #endif
Index: uspace/srv/net/nil/eth/eth_module.c
===================================================================
--- uspace/srv/net/nil/eth/eth_module.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/nil/eth/eth_module.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -36,7 +36,9 @@
  */
 
+#include "eth.h"
+
 #include <async.h>
 #include <stdio.h>
-#include <err.h>
+#include <errno.h>
 
 #include <ipc/ipc.h>
@@ -48,52 +50,34 @@
 #include <nil_local.h>
 
-#include "eth.h"
-
-/** Starts the Ethernet module.
- *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the pm_init() function.
- *  @returns Other error codes as defined for the nil_initialize() function.
- *  @returns Other error codes as defined for the REGISTER_ME() macro function.
- */
 int nil_module_start_standalone(async_client_conn_t client_connection)
 {
-	ERROR_DECLARE;
+	ipcarg_t phonehash;
+	int rc;
 	
 	async_set_client_connection(client_connection);
 	int net_phone = net_connect_module();
-	ERROR_PROPAGATE(pm_init());
+
+	rc = pm_init();
+	if (rc != EOK)
+		return rc;
 	
-	ipcarg_t phonehash;
-	if (ERROR_OCCURRED(nil_initialize(net_phone))
-	    || ERROR_OCCURRED(REGISTER_ME(SERVICE_ETHERNET, &phonehash))) {
-		pm_destroy();
-		return ERROR_CODE;
-	}
+	rc = nil_initialize(net_phone);
+	if (rc != EOK)
+		goto out;
+
+	rc = REGISTER_ME(SERVICE_ETHERNET, &phonehash);
+	if (rc != EOK)
+		goto out;
 	
 	async_manager();
-	
+
+out:
 	pm_destroy();
-	return EOK;
+	return rc;
 }
 
-/** Pass the parameters to the module specific nil_message() function.
- *
- * @param[in]  name         Module name.
- * @param[in]  callid       The message identifier.
- * @param[in]  call         The message parameters.
- * @param[out] answer       The message answer parameters.
- * @param[out] answer_count The last parameter for the actual answer
- *                          in the answer parameter.
- *
- * @return EOK on success.
- * @return ENOTSUP if the message is not known.
- * @return Other error codes as defined for each
- *         specific module message function.
- *
- */
-int nil_module_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+int
+nil_module_message_standalone(const char *name, ipc_callid_t callid,
+    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
 {
 	return nil_message_standalone(name, callid, call, answer, answer_count);
Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -41,5 +41,4 @@
 #include <stdio.h>
 #include <str.h>
-#include <err.h>
 #include <ipc/ipc.h>
 #include <ipc/net.h>
@@ -58,17 +57,11 @@
 #include "nildummy.h"
 
-/** The module name.
- *
- */
+/** The module name. */
 #define NAME  "nildummy"
 
-/** Default maximum transmission unit.
- *
- */
+/** Default maximum transmission unit. */
 #define NET_DEFAULT_MTU  1500
 
-/** Network interface layer module global data.
- *
- */
+/** Network interface layer module global data. */
 nildummy_globals_t nildummy_globals;
 
@@ -78,9 +71,7 @@
 {
 	fibril_rwlock_read_lock(&nildummy_globals.protos_lock);
-	
 	if (nildummy_globals.proto.phone)
-		il_device_state_msg(nildummy_globals.proto.phone, device_id, state,
-		    nildummy_globals.proto.service);
-	
+		il_device_state_msg(nildummy_globals.proto.phone, device_id,
+		    state, nildummy_globals.proto.service);
 	fibril_rwlock_read_unlock(&nildummy_globals.protos_lock);
 	
@@ -90,5 +81,5 @@
 int nil_initialize(int net_phone)
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	fibril_rwlock_initialize(&nildummy_globals.devices_lock);
@@ -99,38 +90,45 @@
 	nildummy_globals.net_phone = net_phone;
 	nildummy_globals.proto.phone = 0;
-	ERROR_PROPAGATE(nildummy_devices_initialize(&nildummy_globals.devices));
+	rc = nildummy_devices_initialize(&nildummy_globals.devices);
 	
 	fibril_rwlock_write_unlock(&nildummy_globals.protos_lock);
 	fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
 	
-	return EOK;
-}
-
-/** Process IPC messages from the registered device driver modules in an infinite loop.
- *
- * @param[in]     iid   The message identifier.
- * @param[in,out] icall The message parameters.
- *
- */
-static void nildummy_receiver(ipc_callid_t iid, ipc_call_t * icall){
-	ERROR_DECLARE;
-
+	return rc;
+}
+
+/** Process IPC messages from the registered device driver modules in an
+ * infinite loop.
+ *
+ * @param[in] iid	The message identifier.
+ * @param[in,out]	icall The message parameters.
+ */
+static void nildummy_receiver(ipc_callid_t iid, ipc_call_t *icall)
+{
 	packet_t packet;
-
-	while(true){
-		switch(IPC_GET_METHOD(*icall)){
-			case NET_NIL_DEVICE_STATE:
-				ERROR_CODE = nil_device_state_msg_local(0, IPC_GET_DEVICE(icall), IPC_GET_STATE(icall));
-				ipc_answer_0(iid, (ipcarg_t) ERROR_CODE);
-				break;
-			case NET_NIL_RECEIVED:
-				if(! ERROR_OCCURRED(packet_translate_remote(nildummy_globals.net_phone, &packet, IPC_GET_PACKET(icall)))){
-					ERROR_CODE = nil_received_msg_local(0, IPC_GET_DEVICE(icall), packet, 0);
-				}
-				ipc_answer_0(iid, (ipcarg_t) ERROR_CODE);
-				break;
-			default:
-				ipc_answer_0(iid, (ipcarg_t) ENOTSUP);
+	int rc;
+
+	while (true) {
+		switch (IPC_GET_METHOD(*icall)) {
+		case NET_NIL_DEVICE_STATE:
+			rc = nil_device_state_msg_local(0,
+			    IPC_GET_DEVICE(icall), IPC_GET_STATE(icall));
+			ipc_answer_0(iid, (ipcarg_t) rc);
+			break;
+		
+		case NET_NIL_RECEIVED:
+			rc = packet_translate_remote(nildummy_globals.net_phone,
+			    &packet, IPC_GET_PACKET(icall));
+			if (rc == EOK) {
+				rc = nil_received_msg_local(0,
+				    IPC_GET_DEVICE(icall), packet, 0);
+			}
+			ipc_answer_0(iid, (ipcarg_t) rc);
+			break;
+		
+		default:
+			ipc_answer_0(iid, (ipcarg_t) ENOTSUP);
 		}
+		
 		iid = async_get_call(icall);
 	}
@@ -141,86 +139,99 @@
  * Determine the device local hardware address.
  *
- * @param[in] device_id The new device identifier.
- * @param[in] service   The device driver service.
- * @param[in] mtu       The device maximum transmission unit.
- *
- * @returns EOK on success.
- * @returns EEXIST if the device with the different service exists.
- * @returns ENOMEM if there is not enough memory left.
- * @returns Other error codes as defined for the netif_bind_service() function.
- * @returns Other error codes as defined for the netif_get_addr_req() function.
- *
- */
-static int nildummy_device_message(device_id_t device_id, services_t service,
-    size_t mtu)
-{
-	ERROR_DECLARE;
-
+ * @param[in] device_id	The new device identifier.
+ * @param[in] service	The device driver service.
+ * @param[in] mtu	The device maximum transmission unit.
+ * @returns		EOK on success.
+ * @returns		EEXIST if the device with the different service exists.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the
+ *			netif_bind_service() function.
+ * @returns		Other error codes as defined for the
+ *			netif_get_addr_req() function.
+ */
+static int
+nildummy_device_message(device_id_t device_id, services_t service, size_t mtu)
+{
 	nildummy_device_ref device;
 	int index;
+	int rc;
 
 	fibril_rwlock_write_lock(&nildummy_globals.devices_lock);
+
 	// an existing device?
 	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
-	if(device){
-		if(device->service != service){
+	if (device) {
+		if (device->service != service) {
 			printf("Device %d already exists\n", device->device_id);
-			fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
+			fibril_rwlock_write_unlock(
+			    &nildummy_globals.devices_lock);
 			return EEXIST;
-		}else{
-			// update mtu
-			if(mtu > 0){
-				device->mtu = mtu;
-			}else{
-				device->mtu = NET_DEFAULT_MTU;
-			}
-			printf("Device %d already exists:\tMTU\t= %d\n", device->device_id, device->mtu);
-			fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
-			// notify the upper layer module
-			fibril_rwlock_read_lock(&nildummy_globals.protos_lock);
-			if(nildummy_globals.proto.phone){
-				il_mtu_changed_msg(nildummy_globals.proto.phone, device->device_id, device->mtu, nildummy_globals.proto.service);
-			}
-			fibril_rwlock_read_unlock(&nildummy_globals.protos_lock);
-			return EOK;
 		}
-	}else{
-		// create a new device
-		device = (nildummy_device_ref) malloc(sizeof(nildummy_device_t));
-		if(! device){
-			return ENOMEM;
+		
+		// update mtu
+		if (mtu > 0)
+			device->mtu = mtu;
+		else
+			device->mtu = NET_DEFAULT_MTU;
+		
+		printf("Device %d already exists:\tMTU\t= %d\n",
+		    device->device_id, device->mtu);
+		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
+		
+		// notify the upper layer module
+		fibril_rwlock_read_lock(&nildummy_globals.protos_lock);
+		if (nildummy_globals.proto.phone) {
+			il_mtu_changed_msg(nildummy_globals.proto.phone,
+			    device->device_id, device->mtu,
+			    nildummy_globals.proto.service);
 		}
-		device->device_id = device_id;
-		device->service = service;
-		if(mtu > 0){
-			device->mtu = mtu;
-		}else{
-			device->mtu = NET_DEFAULT_MTU;
-		}
-		// bind the device driver
-		device->phone = netif_bind_service(device->service, device->device_id, SERVICE_ETHERNET, nildummy_receiver);
-		if(device->phone < 0){
-			fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
-			free(device);
-			return device->phone;
-		}
-		// get hardware address
-		if(ERROR_OCCURRED(netif_get_addr_req(device->phone, device->device_id, &device->addr, &device->addr_data))){
-			fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
-			free(device);
-			return ERROR_CODE;
-		}
-		// add to the cache
-		index = nildummy_devices_add(&nildummy_globals.devices, device->device_id, device);
-		if(index < 0){
-			fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
-			free(device->addr);
-			free(device->addr_data);
-			free(device);
-			return index;
-		}
-		printf("%s: Device registered (id: %d, service: %d, mtu: %d)\n",
-		    NAME, device->device_id, device->service, device->mtu);
-	}
+		fibril_rwlock_read_unlock(&nildummy_globals.protos_lock);
+		
+		return EOK;
+	}
+	
+	// create a new device
+	device = (nildummy_device_ref) malloc(sizeof(nildummy_device_t));
+	if (!device)
+		return ENOMEM;
+	
+	device->device_id = device_id;
+	device->service = service;
+	if (mtu > 0)
+		device->mtu = mtu;
+	else
+		device->mtu = NET_DEFAULT_MTU;
+
+	// bind the device driver
+	device->phone = netif_bind_service(device->service, device->device_id,
+	    SERVICE_ETHERNET, nildummy_receiver);
+	if (device->phone < 0) {
+		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
+		free(device);
+		return device->phone;
+	}
+	
+	// get hardware address
+	rc = netif_get_addr_req(device->phone, device->device_id, &device->addr,
+	    &device->addr_data);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
+		free(device);
+		return rc;
+	}
+	
+	// add to the cache
+	index = nildummy_devices_add(&nildummy_globals.devices,
+	    device->device_id, device);
+	if (index < 0) {
+		fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
+		free(device->addr);
+		free(device->addr_data);
+		free(device);
+		return index;
+	}
+	
+	printf("%s: Device registered (id: %d, service: %d, mtu: %d)\n",
+	    NAME, device->device_id, device->service, device->mtu);
 	fibril_rwlock_write_unlock(&nildummy_globals.devices_lock);
 	return EOK;
@@ -229,23 +240,22 @@
 /** Return the device hardware address.
  *
- * @param[in]  device_id The device identifier.
- * @param[out] address   The device hardware address.
- *
- * @return EOK on success.
- * @return EBADMEM if the address parameter is NULL.
- * @return ENOENT if there no such device.
- *
- */
-static int nildummy_addr_message(device_id_t device_id,
-    measured_string_ref *address)
+ * @param[in] device_id	The device identifier.
+ * @param[out] address	The device hardware address.
+ * @return		 EOK on success.
+ * @return		EBADMEM if the address parameter is NULL.
+ * @return		ENOENT if there no such device.
+ *
+ */
+static int
+nildummy_addr_message(device_id_t device_id, measured_string_ref *address)
 {
 	nildummy_device_ref device;
 
-	if(! address){
+	if (!address)
 		return EBADMEM;
-	}
+	
 	fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
 	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 		return ENOENT;
@@ -253,4 +263,5 @@
 	*address = device->addr;
 	fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
+	
 	return (*address) ? EOK : ENOENT;
 }
@@ -258,26 +269,26 @@
 /** Return the device packet dimensions for sending.
  *
- * @param[in]  device_id The device identifier.
- * @param[out] addr_len  The minimum reserved address length.
- * @param[out] prefix    The minimum reserved prefix size.
- * @param[out] content   The maximum content size.
- * @param[out] suffix    The minimum reserved suffix size.
- *
- * @return EOK on success.
- * @return EBADMEM if either one of the parameters is NULL.
- * @return ENOENT if there is no such device.
- *
- */
-static int nildummy_packet_space_message(device_id_t device_id,
-    size_t *addr_len, size_t *prefix, size_t *content, size_t *suffix)
+ * @param[in] device_id	The device identifier.
+ * @param[out] addr_len	The minimum reserved address length.
+ * @param[out] prefix	The minimum reserved prefix size.
+ * @param[out] content	The maximum content size.
+ * @param[out] suffix	The minimum reserved suffix size.
+ * @return		EOK on success.
+ * @return		EBADMEM if either one of the parameters is NULL.
+ * @return		ENOENT if there is no such device.
+ *
+ */
+static int
+nildummy_packet_space_message(device_id_t device_id, size_t *addr_len,
+    size_t *prefix, size_t *content, size_t *suffix)
 {
 	nildummy_device_ref device;
 
-	if(!(addr_len && prefix && content && suffix)){
+	if (!addr_len || !prefix || !content || !suffix)
 		return EBADMEM;
-	}
+	
 	fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
 	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 		return ENOENT;
@@ -285,4 +296,5 @@
 	*content = device->mtu;
 	fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
+	
 	*addr_len = 0;
 	*prefix = 0;
@@ -291,16 +303,21 @@
 }
 
-int nil_received_msg_local(int nil_phone, device_id_t device_id, packet_t packet, services_t target){
+int
+nil_received_msg_local(int nil_phone, device_id_t device_id, packet_t packet,
+    services_t target)
+{
 	packet_t next;
 
 	fibril_rwlock_read_lock(&nildummy_globals.protos_lock);
-	if(nildummy_globals.proto.phone){
-		do{
+	if (nildummy_globals.proto.phone) {
+		do {
 			next = pq_detach(packet);
-			il_received_msg(nildummy_globals.proto.phone, device_id, packet, nildummy_globals.proto.service);
+			il_received_msg(nildummy_globals.proto.phone, device_id,
+			    packet, nildummy_globals.proto.service);
 			packet = next;
-		}while(packet);
+		} while(packet);
 	}
 	fibril_rwlock_read_unlock(&nildummy_globals.protos_lock);
+	
 	return EOK;
 }
@@ -310,11 +327,9 @@
  * Pass received packets for this service.
  *
- * @param[in] service The module service.
- * @param[in] phone   The service phone.
- *
- * @return EOK on success.
- * @return ENOENT if the service is not known.
- * @return ENOMEM if there is not enough memory left.
- *
+ * @param[in] service	The module service.
+ * @param[in] phone	The service phone.
+ * @return		EOK on success.
+ * @return		ENOENT if the service is not known.
+ * @return		ENOMEM if there is not enough memory left.
  */
 static int nildummy_register_message(services_t service, int phone)
@@ -333,15 +348,13 @@
 /** Send the packet queue.
  *
- * @param[in] device_id The device identifier.
- * @param[in] packet    The packet queue.
- * @param[in] sender    The sending module service.
- *
- * @return EOK on success.
- * @return ENOENT if there no such device.
- * @return EINVAL if the service parameter is not known.
- *
- */
-static int nildummy_send_message(device_id_t device_id, packet_t packet,
-    services_t sender)
+ * @param[in] device_id	The device identifier.
+ * @param[in] packet	The packet queue.
+ * @param[in] sender	The sending module service.
+ * @return		EOK on success.
+ * @return		ENOENT if there no such device.
+ * @return		EINVAL if the service parameter is not known.
+ */
+static int
+nildummy_send_message(device_id_t device_id, packet_t packet, services_t sender)
 {
 	nildummy_device_ref device;
@@ -349,21 +362,20 @@
 	fibril_rwlock_read_lock(&nildummy_globals.devices_lock);
 	device = nildummy_devices_find(&nildummy_globals.devices, device_id);
-	if(! device){
+	if (!device) {
 		fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 		return ENOENT;
 	}
 	// send packet queue
-	if(packet){
-		netif_send_msg(device->phone, device_id, packet, SERVICE_NILDUMMY);
-	}
+	if (packet)
+		netif_send_msg(device->phone, device_id, packet,
+		    SERVICE_NILDUMMY);
 	fibril_rwlock_read_unlock(&nildummy_globals.devices_lock);
 	return EOK;
 }
 
-int nil_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
+int
+nil_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
     ipc_call_t *answer, int *answer_count)
 {
-	ERROR_DECLARE;
-	
 	measured_string_ref address;
 	packet_t packet;
@@ -372,37 +384,50 @@
 	size_t suffix;
 	size_t content;
+	int rc;
 	
 	*answer_count = 0;
 	switch (IPC_GET_METHOD(*call)) {
-		case IPC_M_PHONE_HUNGUP:
-			return EOK;
-		case NET_NIL_DEVICE:
-			return nildummy_device_message(IPC_GET_DEVICE(call),
-			    IPC_GET_SERVICE(call), IPC_GET_MTU(call));
-		case NET_NIL_SEND:
-			ERROR_PROPAGATE(packet_translate_remote(nildummy_globals.net_phone,
-			    &packet, IPC_GET_PACKET(call)));
-			return nildummy_send_message(IPC_GET_DEVICE(call), packet,
-			    IPC_GET_SERVICE(call));
-		case NET_NIL_PACKET_SPACE:
-			ERROR_PROPAGATE(nildummy_packet_space_message(IPC_GET_DEVICE(call),
-			    &addrlen, &prefix, &content, &suffix));
-			IPC_SET_ADDR(answer, addrlen);
-			IPC_SET_PREFIX(answer, prefix);
-			IPC_SET_CONTENT(answer, content);
-			IPC_SET_SUFFIX(answer, suffix);
-			*answer_count = 4;
-			return EOK;
-		case NET_NIL_ADDR:
-			ERROR_PROPAGATE(nildummy_addr_message(IPC_GET_DEVICE(call),
-			    &address));
-			return measured_strings_reply(address, 1);
-		case NET_NIL_BROADCAST_ADDR:
-			ERROR_PROPAGATE(nildummy_addr_message(IPC_GET_DEVICE(call),
-			    &address));
-			return measured_strings_reply(address, 1);
-		case IPC_M_CONNECT_TO_ME:
-			return nildummy_register_message(NIL_GET_PROTO(call),
-			    IPC_GET_PHONE(call));
+	case IPC_M_PHONE_HUNGUP:
+		return EOK;
+	
+	case NET_NIL_DEVICE:
+		return nildummy_device_message(IPC_GET_DEVICE(call),
+		    IPC_GET_SERVICE(call), IPC_GET_MTU(call));
+	
+	case NET_NIL_SEND:
+		rc = packet_translate_remote(nildummy_globals.net_phone,
+		    &packet, IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return nildummy_send_message(IPC_GET_DEVICE(call), packet,
+		    IPC_GET_SERVICE(call));
+	
+	case NET_NIL_PACKET_SPACE:
+		rc = nildummy_packet_space_message(IPC_GET_DEVICE(call),
+		    &addrlen, &prefix, &content, &suffix);
+		if (rc != EOK)
+			return rc;
+		IPC_SET_ADDR(answer, addrlen);
+		IPC_SET_PREFIX(answer, prefix);
+		IPC_SET_CONTENT(answer, content);
+		IPC_SET_SUFFIX(answer, suffix);
+		*answer_count = 4;
+		return EOK;
+	
+	case NET_NIL_ADDR:
+		rc = nildummy_addr_message(IPC_GET_DEVICE(call), &address);
+		if (rc != EOK)
+			return rc;
+		return measured_strings_reply(address, 1);
+	
+	case NET_NIL_BROADCAST_ADDR:
+		rc = nildummy_addr_message(IPC_GET_DEVICE(call), &address);
+		if (rc != EOK)
+			return rc;
+		return measured_strings_reply(address, 1);
+	
+	case IPC_M_CONNECT_TO_ME:
+		return nildummy_register_message(NIL_GET_PROTO(call),
+		    IPC_GET_PHONE(call));
 	}
 	
@@ -412,7 +437,6 @@
 /** Default thread for new connections.
  *
- * @param[in] iid   The initial message identifier.
- * @param[in] icall The initial message call structure.
- *
+ * @param[in] iid	The initial message identifier.
+ * @param[in] icall	The initial message call structure.
  */
 static void nil_client_connection(ipc_callid_t iid, ipc_call_t *icall)
@@ -424,5 +448,5 @@
 	ipc_answer_0(iid, EOK);
 	
-	while(true) {
+	while (true) {
 		ipc_call_t answer;
 		int answer_count;
@@ -436,9 +460,13 @@
 		
 		/* Process the message */
-		int res = nil_module_message_standalone(NAME, callid, &call, &answer,
-		    &answer_count);
-		
-		/* End if said to either by the message or the processing result */
-		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+		int res = nil_module_message_standalone(NAME, callid, &call,
+		    &answer, &answer_count);
+		
+		/*
+		 * End if told to either by the message or the processing
+		 * result.
+		 */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
+		    (res == EHANGUP))
 			return;
 		
@@ -450,11 +478,9 @@
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	if (ERROR_OCCURRED(nil_module_start_standalone(nil_client_connection)))
-		return ERROR_CODE;
-	
-	return EOK;
+	rc = nil_module_start_standalone(nil_client_connection);
+	return rc;
 }
 
Index: uspace/srv/net/nil/nildummy/nildummy.h
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/nil/nildummy/nildummy.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,13 +28,13 @@
 
 /** @addtogroup nildummy
- *  @{
+ * @{
  */
 
 /** @file
- *  Dummy network interface layer module.
+ * Dummy network interface layer module.
  */
 
-#ifndef __NET_NILDUMMY_H__
-#define __NET_NILDUMMY_H__
+#ifndef NET_NILDUMMY_H_
+#define NET_NILDUMMY_H_
 
 #include <fibril_synch.h>
@@ -45,85 +45,69 @@
 
 /** Type definition of the dummy nil global data.
- *  @see nildummy_globals
+ * @see nildummy_globals
  */
-typedef struct nildummy_globals	nildummy_globals_t;
+typedef struct nildummy_globals nildummy_globals_t;
 
 /** Type definition of the dummy nil device specific data.
- *  @see nildummy_device
+ * @see nildummy_device
  */
-typedef struct nildummy_device	nildummy_device_t;
+typedef struct nildummy_device nildummy_device_t;
 
 /** Type definition of the dummy nil device specific data pointer.
- *  @see nildummy_device
+ * @see nildummy_device
  */
-typedef nildummy_device_t *		nildummy_device_ref;
+typedef nildummy_device_t *nildummy_device_ref;
 
 /** Type definition of the dummy nil protocol specific data.
- *  @see nildummy_proto
+ * @see nildummy_proto
  */
-typedef struct nildummy_proto	nildummy_proto_t;
+typedef struct nildummy_proto nildummy_proto_t;
 
 /** Type definition of the dummy nil protocol specific data pointer.
- *  @see nildummy_proto
+ * @see nildummy_proto
  */
-typedef nildummy_proto_t *		nildummy_proto_ref;
+typedef nildummy_proto_t *nildummy_proto_ref;
 
 /** Dummy nil device map.
- *  Maps devices to the dummy nil device specific data.
- *  @see device.h
+ * Maps devices to the dummy nil device specific data.
+ * @see device.h
  */
-DEVICE_MAP_DECLARE(nildummy_devices, nildummy_device_t)
+DEVICE_MAP_DECLARE(nildummy_devices, nildummy_device_t);
 
-/** Dummy nil device specific data.
- */
-struct	nildummy_device{
-	/** Device identifier.
-	 */
+/** Dummy nil device specific data. */
+struct nildummy_device {
+	/** Device identifier. */
 	device_id_t device_id;
-	/** Device driver service.
-	 */
+	/** Device driver service. */
 	services_t service;
-	/** Driver phone.
-	 */
+	/** Driver phone. */
 	int phone;
-	/** Maximal transmission unit.
-	 */
+	/** Maximal transmission unit. */
 	size_t mtu;
-	/** Actual device hardware address.
-	 */
+	/** Actual device hardware address. */
 	measured_string_ref addr;
-	/** Actual device hardware address data.
-	 */
-	char * addr_data;
+	/** Actual device hardware address data. */
+	char *addr_data;
 };
 
-/** Dummy nil protocol specific data.
- */
-struct nildummy_proto{
-	/** Protocol service.
-	 */
+/** Dummy nil protocol specific data. */
+struct nildummy_proto {
+	/** Protocol service. */
 	services_t service;
-	/** Protocol module phone.
-	 */
+	/** Protocol module phone. */
 	int phone;
 };
 
-/** Dummy nil global data.
- */
-struct	nildummy_globals{
-	/** Networking module phone.
-	 */
+/** Dummy nil global data. */
+struct nildummy_globals {
+	/** Networking module phone. */
 	int net_phone;
-	/** Safety lock for devices.
-	 */
+	/** Safety lock for devices. */
 	fibril_rwlock_t devices_lock;
-	/** All known Ethernet devices.
-	 */
+	/** All known Ethernet devices. */
 	nildummy_devices_t devices;
-	/** Safety lock for protocols.
-	 */
+	/** Safety lock for protocols. */
 	fibril_rwlock_t protos_lock;
-	/** Default protocol.
-	 */
+	/** Default protocol. */
 	nildummy_proto_t proto;
 };
Index: uspace/srv/net/nil/nildummy/nildummy_module.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy_module.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/nil/nildummy/nildummy_module.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -38,5 +38,5 @@
 #include <async.h>
 #include <stdio.h>
-#include <err.h>
+#include <errno.h>
 
 #include <ipc/ipc.h>
@@ -50,57 +50,34 @@
 #include "nildummy.h"
 
-/** Start the dummy nil module.
- *
- * Initialize the client connection serving function, initialize
- * the module, register the module service and start the async
- * manager, processing IPC messages in an infinite loop.
- *
- * @param[in] client_connection The client connection processing
- *                              function. The module skeleton propagates
- *                              its own one.
- *
- * @return EOK on success.
- * @return Other error codes as defined for the pm_init() function.
- * @return Other error codes as defined for the nil_initialize() function.
- * @return Other error codes as defined for the REGISTER_ME() macro function.
- *
- */
 int nil_module_start_standalone(async_client_conn_t client_connection)
 {
-	ERROR_DECLARE;
+	ipcarg_t phonehash;
+	int rc;
 	
 	async_set_client_connection(client_connection);
 	int net_phone = net_connect_module();
-	ERROR_PROPAGATE(pm_init());
 	
-	ipcarg_t phonehash;
-	if (ERROR_OCCURRED(nil_initialize(net_phone))
-	    || ERROR_OCCURRED(REGISTER_ME(SERVICE_NILDUMMY, &phonehash))){
-		pm_destroy();
-		return ERROR_CODE;
-	}
+	rc = pm_init();
+	if (rc != EOK)
+		return rc;
+	
+	
+	rc = nil_initialize(net_phone);
+	if (rc != EOK)
+		goto out;
+	
+	rc = REGISTER_ME(SERVICE_NILDUMMY, &phonehash);
+	if (rc != EOK)
+		goto out;
 	
 	async_manager();
-	
+
+out:
 	pm_destroy();
-	return EOK;
+	return rc;
 }
 
-/** Pass the parameters to the module specific nil_message() function.
- *
- * @param[in]  name         Module name.
- * @param[in]  callid       The message identifier.
- * @param[in]  call         The message parameters.
- * @param[out] answer       The message answer parameters.
- * @param[out] answer_count The last parameter for the actual answer
- *                          in the answer parameter.
- *
- * @return EOK on success.
- * @return ENOTSUP if the message is not known.
- * @return Other error codes as defined for each specific
- *          module message function.
- *
- */
-int nil_module_message_standalone(const char *name, ipc_callid_t callid,
+int
+nil_module_message_standalone(const char *name, ipc_callid_t callid,
     ipc_call_t *call, ipc_call_t *answer, int *answer_count)
 {
Index: uspace/srv/net/tl/icmp/icmp.c
===================================================================
--- uspace/srv/net/tl/icmp/icmp.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/icmp/icmp.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,11 +28,14 @@
 
 /** @addtogroup icmp
- *  @{
+ * @{
  */
 
 /** @file
- *  ICMP module implementation.
- *  @see icmp.h
- */
+ * ICMP module implementation.
+ * @see icmp.h
+ */
+
+#include "icmp.h"
+#include "icmp_module.h"
 
 #include <async.h>
@@ -51,18 +54,17 @@
 #include <byteorder.h>
 #include <errno.h>
-#include <err.h>
 
 #include <net/socket_codes.h>
 #include <net/ip_protocols.h>
 #include <net/inet.h>
-
 #include <net/modules.h>
+#include <net/icmp_api.h>
+#include <net/icmp_codes.h>
+#include <net/icmp_common.h>
+
 #include <packet_client.h>
 #include <packet_remote.h>
 #include <net_checksum.h>
-#include <net/icmp_api.h>
 #include <icmp_client.h>
-#include <net/icmp_codes.h>
-#include <net/icmp_common.h>
 #include <icmp_interface.h>
 #include <il_interface.h>
@@ -74,249 +76,227 @@
 #include <icmp_header.h>
 
-#include "icmp.h"
-#include "icmp_module.h"
-
-/** ICMP module name.
- */
+/** ICMP module name. */
 #define NAME	"ICMP protocol"
 
-/** Default ICMP error reporting.
- */
+/** Default ICMP error reporting. */
 #define NET_DEFAULT_ICMP_ERROR_REPORTING	true
 
-/** Default ICMP echo replying.
- */
+/** Default ICMP echo replying. */
 #define NET_DEFAULT_ICMP_ECHO_REPLYING		true
 
-/** Original datagram length in bytes transfered to the error notification message.
+/** Original datagram length in bytes transfered to the error notification
+ * message.
  */
 #define ICMP_KEEP_LENGTH	8
 
-/** Free identifier numbers pool start.
- */
+/** Free identifier numbers pool start. */
 #define ICMP_FREE_IDS_START	1
 
-/** Free identifier numbers pool end.
- */
+/** Free identifier numbers pool end. */
 #define ICMP_FREE_IDS_END	UINT16_MAX
 
 /** Computes the ICMP datagram checksum.
- *  @param[in,out] header The ICMP datagram header.
- *  @param[in] length The total datagram length.
- *  @returns The computed checksum.
- */
-#define ICMP_CHECKSUM(header, length)		htons(ip_checksum((uint8_t *) (header), (length)))
-
-/** An echo request datagrams pattern.
- */
-#define ICMP_ECHO_TEXT					"Hello from HelenOS."
+ *
+ * @param[in,out] header The ICMP datagram header.
+ * @param[in] length	The total datagram length.
+ * @returns		The computed checksum.
+ */
+#define ICMP_CHECKSUM(header, length) \
+	htons(ip_checksum((uint8_t *) (header), (length)))
+
+/** An echo request datagrams pattern. */
+#define ICMP_ECHO_TEXT		"Hello from HelenOS."
 
 /** Computes an ICMP reply data key.
- *  @param[in] id The message identifier.
- *  @param[in] sequence The message sequence number.
- *  @returns The computed ICMP reply data key.
- */
-#define ICMP_GET_REPLY_KEY(id, sequence)	(((id) << 16) | (sequence &0xFFFF))
-
-/** Processes the received ICMP packet.
- *  Is used as an entry point from the underlying IP module.
- *  Releases the packet on error.
- *  @param device_id The device identifier. Ignored parameter.
- *  @param[in,out] packet The received packet.
- *  @param receiver The target service. Ignored parameter.
- *  @param[in] error The packet error reporting service. Prefixes the received packet.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the icmp_process_packet() function.
- */
-int icmp_received_msg(device_id_t device_id, packet_t packet, services_t receiver, services_t error);
-
-/** Processes the received ICMP packet.
- *  Notifies the destination socket application.
- *  @param[in,out] packet The received packet.
- *  @param[in] error The packet error reporting service. Prefixes the received packet.
- *  @returns EOK on success.
- *  @returns EINVAL if the packet is not valid.
- *  @returns EINVAL if the stored packet address is not the an_addr_t.
- *  @returns EINVAL if the packet does not contain any data.
- *  @returns NO_DATA if the packet content is shorter than the user datagram header.
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns EADDRNOTAVAIL if the destination socket does not exist.
- *  @returns Other error codes as defined for the ip_client_process_packet() function.
- */
-int icmp_process_packet(packet_t packet, services_t error);
-
-/** Processes the client messages.
- *  Remembers the assigned identifier and sequence numbers.
- *  Runs until the client module disconnects.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @returns EOK.
- *  @see icmp_interface.h
- *  @see icmp_api.h
- */
-int icmp_process_client_messages(ipc_callid_t callid, ipc_call_t call);
-
-/** Processes the generic client messages.
- *  @param[in] call The message parameters.
- *  @returns EOK on success.
- *  @returns ENOTSUP if the message is not known.
- *  @returns Other error codes as defined for the packet_translate() function.
- *  @returns Other error codes as defined for the icmp_destination_unreachable_msg() function.
- *  @returns Other error codes as defined for the icmp_source_quench_msg() function.
- *  @returns Other error codes as defined for the icmp_time_exceeded_msg() function.
- *  @returns Other error codes as defined for the icmp_parameter_problem_msg() function.
- *  @see icmp_interface.h
- */
-int icmp_process_message(ipc_call_t * call);
+ *
+ * @param[in] id	The message identifier.
+ * @param[in] sequence	The message sequence number.
+ * @returns		The computed ICMP reply data key.
+ */
+#define ICMP_GET_REPLY_KEY(id, sequence) \
+	(((id) << 16) | (sequence & 0xFFFF))
+
+
+/** ICMP global data. */
+icmp_globals_t	icmp_globals;
+
+INT_MAP_IMPLEMENT(icmp_replies, icmp_reply_t);
+INT_MAP_IMPLEMENT(icmp_echo_data, icmp_echo_t);
 
 /** Releases the packet and returns the result.
- *  @param[in] packet The packet queue to be released.
- *  @param[in] result The result to be returned.
- *  @returns The result parameter.
- */
-int icmp_release_and_return(packet_t packet, int result);
+ *
+ * @param[in] packet	The packet queue to be released.
+ * @param[in] result	The result to be returned.
+ * @returns		The result parameter.
+ */
+static int icmp_release_and_return(packet_t packet, int result)
+{
+	pq_release_remote(icmp_globals.net_phone, packet_get_id(packet));
+	return result;
+}
+
+/** Sends the ICMP message.
+ *
+ * Sets the message type and code and computes the checksum.
+ * Error messages are sent only if allowed in the configuration.
+ * Releases the packet on errors.
+ *
+ * @param[in] type	The message type.
+ * @param[in] code	The message code.
+ * @param[in] packet	The message packet to be sent.
+ * @param[in] header	The ICMP header.
+ * @param[in] error	The error service to be announced. Should be
+ *			SERVICE_ICMP or zero.
+ * @param[in] ttl	The time to live.
+ * @param[in] tos	The type of service.
+ * @param[in] dont_fragment The value indicating whether the datagram must not
+ *			be fragmented. Is used as a MTU discovery.
+ * @returns		EOK on success.
+ * @returns		EPERM if the error message is not allowed.
+ */
+static int
+icmp_send_packet(icmp_type_t type, icmp_code_t code, packet_t packet,
+    icmp_header_ref header, services_t error, ip_ttl_t ttl, ip_tos_t tos,
+    int dont_fragment)
+{
+	int rc;
+
+	// do not send an error if disabled
+	if (error && !icmp_globals.error_reporting)
+		return icmp_release_and_return(packet, EPERM);
+
+	header->type = type;
+	header->code = code;
+	header->checksum = 0;
+	header->checksum = ICMP_CHECKSUM(header,
+	    packet_get_data_length(packet));
+	
+	rc = ip_client_prepare_packet(packet, IPPROTO_ICMP, ttl, tos,
+	    dont_fragment, 0);
+	if (rc != EOK)
+		return icmp_release_and_return(packet, rc);
+
+	return ip_send_msg(icmp_globals.ip_phone, -1, packet, SERVICE_ICMP,
+	    error);
+}
+
+/** Prepares the ICMP error packet.
+ *
+ * Truncates the original packet if longer than ICMP_KEEP_LENGTH bytes.
+ * Prefixes and returns the ICMP header.
+ *
+ * @param[in,out] packet The original packet.
+ * @returns The prefixed ICMP header.
+ * @returns NULL on errors.
+ */
+static icmp_header_ref icmp_prepare_packet(packet_t packet)
+{
+	icmp_header_ref header;
+	size_t header_length;
+	size_t total_length;
+
+	total_length = packet_get_data_length(packet);
+	if (total_length <= 0)
+		return NULL;
+
+	header_length = ip_client_header_length(packet);
+	if (header_length <= 0)
+		return NULL;
+
+	// truncate if longer than 64 bits (without the IP header)
+	if ((total_length > header_length + ICMP_KEEP_LENGTH) &&
+	    (packet_trim(packet, 0,
+	    total_length - header_length - ICMP_KEEP_LENGTH) != EOK)) {
+		return NULL;
+	}
+
+	header = PACKET_PREFIX(packet, icmp_header_t);
+	if (!header)
+		return NULL;
+
+	bzero(header, sizeof(*header));
+	return header;
+}
 
 /** Requests an echo message.
- *  Sends a packet with specified parameters to the target host and waits for the reply upto the given timeout.
- *  Blocks the caller until the reply or the timeout occurs.
- *  @param[in] id The message identifier.
- *  @param[in] sequence The message sequence parameter.
- *  @param[in] size The message data length in bytes.
- *  @param[in] timeout The timeout in miliseconds.
- *  @param[in] ttl The time to live.
- *  @param[in] tos The type of service.
- *  @param[in] dont_fragment The value indicating whether the datagram must not be fragmented. Is used as a MTU discovery.
- *  @param[in] addr The target host address.
- *  @param[in] addrlen The torget host address length.
- *  @returns ICMP_ECHO on success.
- *  @returns ETIMEOUT if the reply has not arrived before the timeout.
- *  @returns ICMP type of the received error notification. 
- *  @returns EINVAL if the addrlen parameter is less or equal to zero (<=0).
- *  @returns ENOMEM if there is not enough memory left.
- *  @returns EPARTY if there was an internal error.
- */
-int icmp_echo(icmp_param_t id, icmp_param_t sequence, size_t size, mseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, const struct sockaddr * addr, socklen_t addrlen);
-
-/** Prepares the ICMP error packet.
- *  Truncates the original packet if longer than ICMP_KEEP_LENGTH bytes.
- *  Prefixes and returns the ICMP header.
- *  @param[in,out] packet The original packet.
- *  @returns The prefixed ICMP header.
- *  @returns NULL on errors.
- */
-icmp_header_ref icmp_prepare_packet(packet_t packet);
-
-/** Sends the ICMP message.
- *  Sets the message type and code and computes the checksum.
- *  Error messages are sent only if allowed in the configuration.
- *  Releases the packet on errors.
- *  @param[in] type The message type.
- *  @param[in] code The message code.
- *  @param[in] packet The message packet to be sent.
- *  @param[in] header The ICMP header.
- *  @param[in] error The error service to be announced. Should be SERVICE_ICMP or zero (0).
- *  @param[in] ttl The time to live.
- *  @param[in] tos The type of service.
- *  @param[in] dont_fragment The value indicating whether the datagram must not be fragmented. Is used as a MTU discovery.
- *  @returns EOK on success.
- *  @returns EPERM if the error message is not allowed.
- */
-int icmp_send_packet(icmp_type_t type, icmp_code_t code, packet_t packet, icmp_header_ref header, services_t error, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment);
-
-/** Tries to set the pending reply result as the received message type.
- *  If the reply data is not present, the reply timed out and the other fibril
- *  is already awake.
- *  Releases the packet.
- *  @param[in] packet The received reply message.
- *  @param[in] header The ICMP message header.
- *  @param[in] type The received reply message type.
- *  @param[in] code The received reply message code.
- *  @returns EOK.
- */
-int icmp_process_echo_reply(packet_t packet, icmp_header_ref header, icmp_type_t type, icmp_code_t code);
-
-/** Assigns a new identifier for the connection.
- *  Fills the echo data parameter with the assigned values.
- *  @param[in,out] echo_data The echo data to be bound.
- *  @returns Index of the inserted echo data.
- *  @returns EBADMEM if the echo_data parameter is NULL.
- *  @returns ENOTCONN if no free identifier have been found.
- */
-int icmp_bind_free_id(icmp_echo_ref echo_data);
-
-/** ICMP global data.
- */
-icmp_globals_t	icmp_globals;
-
-INT_MAP_IMPLEMENT(icmp_replies, icmp_reply_t);
-
-INT_MAP_IMPLEMENT(icmp_echo_data, icmp_echo_t);
-
-int icmp_echo_msg(int icmp_phone, size_t size, mseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, const struct sockaddr * addr, socklen_t addrlen){
-	icmp_echo_ref echo_data;
-	int res;
-
-	fibril_rwlock_write_lock(&icmp_globals.lock);
-	// use the phone as the echo data index
-	echo_data = icmp_echo_data_find(&icmp_globals.echo_data, icmp_phone);
-	if(! echo_data){
-		res = ENOENT;
-	}else{
-		res = icmp_echo(echo_data->identifier, echo_data->sequence_number, size, timeout, ttl, tos, dont_fragment, addr, addrlen);
-		if(echo_data->sequence_number < UINT16_MAX){
-			++ echo_data->sequence_number;
-		}else{
-			echo_data->sequence_number = 0;
-		}
-	}
-	fibril_rwlock_write_unlock(&icmp_globals.lock);
-	return res;
-}
-
-int icmp_echo(icmp_param_t id, icmp_param_t sequence, size_t size, mseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, const struct sockaddr * addr, socklen_t addrlen){
-	ERROR_DECLARE;
-
+ *
+ * Sends a packet with specified parameters to the target host and waits for
+ * the reply upto the given timeout.
+ * Blocks the caller until the reply or the timeout occurs.
+ *
+ * @param[in] id	The message identifier.
+ * @param[in] sequence	The message sequence parameter.
+ * @param[in] size	The message data length in bytes.
+ * @param[in] timeout	The timeout in miliseconds.
+ * @param[in] ttl	The time to live.
+ * @param[in] tos	The type of service.
+ * @param[in] dont_fragment The value indicating whether the datagram must not
+ *			be fragmented. Is used as a MTU discovery.
+ * @param[in] addr	The target host address.
+ * @param[in] addrlen	The torget host address length.
+ * @returns		ICMP_ECHO on success.
+ * @returns		ETIMEOUT if the reply has not arrived before the
+ *			timeout.
+ * @returns		ICMP type of the received error notification.
+ * @returns		EINVAL if the addrlen parameter is less or equal to
+ *			zero.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		EPARTY if there was an internal error.
+ */
+static int
+icmp_echo(icmp_param_t id, icmp_param_t sequence, size_t size,
+    mseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment,
+    const struct sockaddr * addr, socklen_t addrlen)
+{
 	icmp_header_ref header;
 	packet_t packet;
 	size_t length;
-	uint8_t * data;
+	uint8_t *data;
 	icmp_reply_ref reply;
 	int reply_key;
-	int result;
 	int index;
-
-	if(addrlen <= 0){
+	int rc;
+
+	if (addrlen <= 0)
 		return EINVAL;
-	}
+
 	length = (size_t) addrlen;
 	// TODO do not ask all the time
-	ERROR_PROPAGATE(ip_packet_size_req(icmp_globals.ip_phone, -1, &icmp_globals.packet_dimension));
-	packet = packet_get_4_remote(icmp_globals.net_phone, size, icmp_globals.packet_dimension.addr_len, ICMP_HEADER_SIZE + icmp_globals.packet_dimension.prefix, icmp_globals.packet_dimension.suffix);
-	if(! packet){
+	rc = ip_packet_size_req(icmp_globals.ip_phone, -1,
+	    &icmp_globals.packet_dimension);
+	if (rc != EOK)
+		return rc;
+
+	packet = packet_get_4_remote(icmp_globals.net_phone, size,
+	    icmp_globals.packet_dimension.addr_len,
+	    ICMP_HEADER_SIZE + icmp_globals.packet_dimension.prefix,
+	    icmp_globals.packet_dimension.suffix);
+	if (!packet)
 		return ENOMEM;
-	}
 
 	// prepare the requesting packet
 	// set the destination address
-	if(ERROR_OCCURRED(packet_set_addr(packet, NULL, (const uint8_t *) addr, length))){
-		return icmp_release_and_return(packet, ERROR_CODE);
-	}
+	rc = packet_set_addr(packet, NULL, (const uint8_t *) addr, length);
+	if (rc != EOK)
+		return icmp_release_and_return(packet, rc);
+
 	// allocate space in the packet
 	data = (uint8_t *) packet_suffix(packet, size);
-	if(! data){
+	if (!data)
 		return icmp_release_and_return(packet, ENOMEM);
-	}
+
 	// fill the data
 	length = 0;
-	while(size > length + sizeof(ICMP_ECHO_TEXT)){
+	while (size > length + sizeof(ICMP_ECHO_TEXT)) {
 		memcpy(data + length, ICMP_ECHO_TEXT, sizeof(ICMP_ECHO_TEXT));
 		length += sizeof(ICMP_ECHO_TEXT);
 	}
 	memcpy(data + length, ICMP_ECHO_TEXT, size - length);
+
 	// prefix the header
 	header = PACKET_PREFIX(packet, icmp_header_t);
-	if(! header){
+	if (!header)
 		return icmp_release_and_return(packet, ENOMEM);
-	}
+
 	bzero(header, sizeof(*header));
 	header->un.echo.identifier = id;
@@ -325,13 +305,14 @@
 	// prepare the reply structure
 	reply = malloc(sizeof(*reply));
-	if(! reply){
+	if (!reply)
 		return icmp_release_and_return(packet, ENOMEM);
-	}
+
 	fibril_mutex_initialize(&reply->mutex);
 	fibril_mutex_lock(&reply->mutex);
 	fibril_condvar_initialize(&reply->condvar);
-	reply_key = ICMP_GET_REPLY_KEY(header->un.echo.identifier, header->un.echo.sequence_number);
+	reply_key = ICMP_GET_REPLY_KEY(header->un.echo.identifier,
+	    header->un.echo.sequence_number);
 	index = icmp_replies_add(&icmp_globals.replies, reply_key, reply);
-	if(index < 0){
+	if (index < 0) {
 		free(reply);
 		return icmp_release_and_return(packet, index);
@@ -342,14 +323,13 @@
 
 	// send the request
-	icmp_send_packet(ICMP_ECHO, 0, packet, header, 0, ttl, tos, dont_fragment);
+	icmp_send_packet(ICMP_ECHO, 0, packet, header, 0, ttl, tos,
+	    dont_fragment);
 
 	// wait for the reply
 	// timeout in microseconds
-	if(ERROR_OCCURRED(fibril_condvar_wait_timeout(&reply->condvar, &reply->mutex, timeout * 1000))){
-		result = ERROR_CODE;
-	}else{
-		// read the result
-		result = reply->result;
-	}
+	rc = fibril_condvar_wait_timeout(&reply->condvar, &reply->mutex,
+	    timeout * 1000);
+	if (rc == EOK)
+		rc = reply->result;
 
 	// drop the reply mutex before locking the globals again
@@ -359,101 +339,88 @@
 	// destroy the reply structure
 	icmp_replies_exclude_index(&icmp_globals.replies, index);
-	return result;
-}
-
-int icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet){
+
+	return rc;
+}
+
+static int
+icmp_destination_unreachable_msg_local(int icmp_phone, icmp_code_t code,
+    icmp_param_t mtu, packet_t packet)
+{
 	icmp_header_ref header;
 
 	header = icmp_prepare_packet(packet);
-	if(! header){
+	if (!header)
 		return icmp_release_and_return(packet, ENOMEM);
-	}
-	if(mtu){
+
+	if (mtu)
 		header->un.frag.mtu = mtu;
-	}
-	return icmp_send_packet(ICMP_DEST_UNREACH, code, packet, header, SERVICE_ICMP, 0, 0, 0);
-}
-
-int icmp_source_quench_msg(int icmp_phone, packet_t packet){
+
+	return icmp_send_packet(ICMP_DEST_UNREACH, code, packet, header,
+	    SERVICE_ICMP, 0, 0, 0);
+}
+
+static int icmp_source_quench_msg_local(int icmp_phone, packet_t packet)
+{
 	icmp_header_ref header;
 
 	header = icmp_prepare_packet(packet);
-	if(! header){
+	if (!header)
 		return icmp_release_and_return(packet, ENOMEM);
-	}
-	return icmp_send_packet(ICMP_SOURCE_QUENCH, 0, packet, header, SERVICE_ICMP, 0, 0, 0);
-}
-
-int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet){
+
+	return icmp_send_packet(ICMP_SOURCE_QUENCH, 0, packet, header,
+	    SERVICE_ICMP, 0, 0, 0);
+}
+
+static int
+icmp_time_exceeded_msg_local(int icmp_phone, icmp_code_t code, packet_t packet)
+{
 	icmp_header_ref header;
 
 	header = icmp_prepare_packet(packet);
-	if(! header){
+	if (!header)
 		return icmp_release_and_return(packet, ENOMEM);
-	}
-	return icmp_send_packet(ICMP_TIME_EXCEEDED, code, packet, header, SERVICE_ICMP, 0, 0, 0);
-}
-
-int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet){
+
+	return icmp_send_packet(ICMP_TIME_EXCEEDED, code, packet, header,
+	    SERVICE_ICMP, 0, 0, 0);
+}
+
+static int
+icmp_parameter_problem_msg_local(int icmp_phone, icmp_code_t code,
+    icmp_param_t pointer, packet_t packet)
+{
 	icmp_header_ref header;
 
 	header = icmp_prepare_packet(packet);
-	if(! header){
+	if (!header)
 		return icmp_release_and_return(packet, ENOMEM);
-	}
+
 	header->un.param.pointer = pointer;
-	return icmp_send_packet(ICMP_PARAMETERPROB, code, packet, header, SERVICE_ICMP, 0, 0, 0);
-}
-
-icmp_header_ref icmp_prepare_packet(packet_t packet){
-	icmp_header_ref header;
-	size_t header_length;
-	size_t total_length;
-
-	total_length = packet_get_data_length(packet);
-	if(total_length <= 0){
-		return NULL;
-	}
-	header_length = ip_client_header_length(packet);
-	if(header_length <= 0){
-		return NULL;
-	}
-	// truncate if longer than 64 bits (without the IP header)
-	if((total_length > header_length + ICMP_KEEP_LENGTH)
-		&& (packet_trim(packet, 0, total_length - header_length - ICMP_KEEP_LENGTH) != EOK)){
-		return NULL;
-	}
-	header = PACKET_PREFIX(packet, icmp_header_t);
-	if(! header){
-		return NULL;
-	}
-	bzero(header, sizeof(*header));
-	return header;
-}
-
-int icmp_send_packet(icmp_type_t type, icmp_code_t code, packet_t packet, icmp_header_ref header, services_t error, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment){
-	ERROR_DECLARE;
-
-	// do not send an error if disabled
-	if(error && (! icmp_globals.error_reporting)){
-		return icmp_release_and_return(packet, EPERM);
-	}
-	header->type = type;
-	header->code = code;
-	header->checksum = 0;
-	header->checksum = ICMP_CHECKSUM(header, packet_get_data_length(packet));
-	if(ERROR_OCCURRED(ip_client_prepare_packet(packet, IPPROTO_ICMP, ttl, tos, dont_fragment, 0))){
-		return icmp_release_and_return(packet, ERROR_CODE);
-	}
-	return ip_send_msg(icmp_globals.ip_phone, -1, packet, SERVICE_ICMP, error);
-}
-
-int icmp_initialize(async_client_conn_t client_connection){
-	ERROR_DECLARE;
-
-	measured_string_t names[] = {{str_dup("ICMP_ERROR_REPORTING"), 20}, {str_dup("ICMP_ECHO_REPLYING"), 18}};
+	return icmp_send_packet(ICMP_PARAMETERPROB, code, packet, header,
+	    SERVICE_ICMP, 0, 0, 0);
+}
+
+/** Initializes the ICMP module.
+ *
+ * @param[in] client_connection The client connection processing function. The
+ *			module skeleton propagates its own one.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int icmp_initialize(async_client_conn_t client_connection)
+{
+	measured_string_t names[] = {
+		{
+			(char *) "ICMP_ERROR_REPORTING",
+			20
+		},
+		{
+			(char *) "ICMP_ECHO_REPLYING",
+			18
+		}
+	};
 	measured_string_ref configuration;
 	size_t count = sizeof(names) / sizeof(measured_string_t);
-	char * data;
+	char *data;
+	int rc;
 
 	fibril_rwlock_initialize(&icmp_globals.lock);
@@ -461,94 +428,161 @@
 	icmp_replies_initialize(&icmp_globals.replies);
 	icmp_echo_data_initialize(&icmp_globals.echo_data);
-	icmp_globals.ip_phone = ip_bind_service(SERVICE_IP, IPPROTO_ICMP, SERVICE_ICMP, client_connection);
-	if(icmp_globals.ip_phone < 0){
+	
+	icmp_globals.ip_phone = ip_bind_service(SERVICE_IP, IPPROTO_ICMP,
+	    SERVICE_ICMP, client_connection);
+	if (icmp_globals.ip_phone < 0) {
+		fibril_rwlock_write_unlock(&icmp_globals.lock);
 		return icmp_globals.ip_phone;
 	}
-	ERROR_PROPAGATE(ip_packet_size_req(icmp_globals.ip_phone, -1, &icmp_globals.packet_dimension));
+	
+	rc = ip_packet_size_req(icmp_globals.ip_phone, -1,
+	    &icmp_globals.packet_dimension);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&icmp_globals.lock);
+		return rc;
+	}
+
 	icmp_globals.packet_dimension.prefix += ICMP_HEADER_SIZE;
 	icmp_globals.packet_dimension.content -= ICMP_HEADER_SIZE;
-	// get configuration
+
 	icmp_globals.error_reporting = NET_DEFAULT_ICMP_ERROR_REPORTING;
 	icmp_globals.echo_replying = NET_DEFAULT_ICMP_ECHO_REPLYING;
+
+	// get configuration
 	configuration = &names[0];
-	ERROR_PROPAGATE(net_get_conf_req(icmp_globals.net_phone, &configuration, count, &data));
-	if(configuration){
-		if(configuration[0].value){
-			icmp_globals.error_reporting = (configuration[0].value[0] == 'y');
+	rc = net_get_conf_req(icmp_globals.net_phone, &configuration, count,
+	    &data);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&icmp_globals.lock);
+		return rc;
+	}
+	
+	if (configuration) {
+		if (configuration[0].value) {
+			icmp_globals.error_reporting =
+			    (configuration[0].value[0] == 'y');
 		}
-		if(configuration[1].value){
-			icmp_globals.echo_replying = (configuration[1].value[0] == 'y');
+		if (configuration[1].value) {
+			icmp_globals.echo_replying =
+			    (configuration[1].value[0] == 'y');
 		}
 		net_free_settings(configuration, data);
 	}
+
 	fibril_rwlock_write_unlock(&icmp_globals.lock);
 	return EOK;
 }
 
-int icmp_received_msg(device_id_t device_id, packet_t packet, services_t receiver, services_t error){
-	ERROR_DECLARE;
-
-	if(ERROR_OCCURRED(icmp_process_packet(packet, error))){
-		return icmp_release_and_return(packet, ERROR_CODE);
-	}
-
-	return EOK;
-}
-
-int icmp_process_packet(packet_t packet, services_t error){
-	ERROR_DECLARE;
-
+/** Tries to set the pending reply result as the received message type.
+ *
+ * If the reply data is not present, the reply timed out and the other fibril
+ * is already awake.
+ * Releases the packet.
+ *
+ * @param[in] packet	The received reply message.
+ * @param[in] header	The ICMP message header.
+ * @param[in] type	The received reply message type.
+ * @param[in] code	The received reply message code.
+ */
+static void 
+icmp_process_echo_reply(packet_t packet, icmp_header_ref header,
+    icmp_type_t type, icmp_code_t code)
+{
+	int reply_key;
+	icmp_reply_ref reply;
+
+	// compute the reply key
+	reply_key = ICMP_GET_REPLY_KEY(header->un.echo.identifier,
+	    header->un.echo.sequence_number);
+	pq_release_remote(icmp_globals.net_phone, packet_get_id(packet));
+
+	fibril_rwlock_write_lock(&icmp_globals.lock);
+	// find the pending reply
+	reply = icmp_replies_find(&icmp_globals.replies, reply_key);
+	if (reply) {
+		reply->result = type;
+		fibril_condvar_signal(&reply->condvar);
+	}
+	fibril_rwlock_write_unlock(&icmp_globals.lock);
+}
+
+/** Processes the received ICMP packet.
+ *
+ * Notifies the destination socket application.
+ *
+ * @param[in,out] packet The received packet.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet is not valid.
+ * @returns		EINVAL if the stored packet address is not the an_addr_t.
+ * @returns		EINVAL if the packet does not contain any data.
+ * @returns		NO_DATA if the packet content is shorter than the user
+ *			datagram header.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		EADDRNOTAVAIL if the destination socket does not exist.
+ * @returns		Other error codes as defined for the
+ *			ip_client_process_packet() function.
+ */
+static int icmp_process_packet(packet_t packet, services_t error)
+{
 	size_t length;
-	uint8_t * src;
+	uint8_t *src;
 	int addrlen;
 	int result;
-	void * data;
+	void *data;
 	icmp_header_ref header;
 	icmp_type_t type;
 	icmp_code_t code;
-
-	if(error){
-		switch(error){
-			case SERVICE_ICMP:
-				// process error
-				result = icmp_client_process_packet(packet, &type, &code, NULL, NULL);
-				if(result < 0){
-					return result;
-				}
-				length = (size_t) result;
-				// remove the error header
-				ERROR_PROPAGATE(packet_trim(packet, length, 0));
-				break;
-			default:
-				return ENOTSUP;
-		}
-	}
+	int rc;
+
+	switch (error) {
+	case SERVICE_NONE:
+		break;
+	case SERVICE_ICMP:
+		// process error
+		result = icmp_client_process_packet(packet, &type, &code, NULL,
+		    NULL);
+		if (result < 0)
+			return result;
+		length = (size_t) result;
+		// remove the error header
+		rc = packet_trim(packet, length, 0);
+		if (rc != EOK)
+			return rc;
+		break;
+	default:
+		return ENOTSUP;
+	}
+
 	// get rid of the ip header
 	length = ip_client_header_length(packet);
-	ERROR_PROPAGATE(packet_trim(packet, length, 0));
+	rc = packet_trim(packet, length, 0);
+	if (rc != EOK)
+		return rc;
 
 	length = packet_get_data_length(packet);
-	if(length <= 0){
+	if (length <= 0)
 		return EINVAL;
-	}
-	if(length < ICMP_HEADER_SIZE){
+
+	if (length < ICMP_HEADER_SIZE)
 		return EINVAL;
-	}
+
 	data = packet_get_data(packet);
-	if(! data){
+	if (!data)
 		return EINVAL;
-	}
+
 	// get icmp header
 	header = (icmp_header_ref) data;
-	// checksum
-	if(header->checksum){
-		while(ICMP_CHECKSUM(header, length) != IP_CHECKSUM_ZERO){
+
+	if (header->checksum) {
+		while (ICMP_CHECKSUM(header, length) != IP_CHECKSUM_ZERO) {
 			// set the original message type on error notification
 			// type swap observed in Qemu
-			if(error){
-				switch(header->type){
-					case ICMP_ECHOREPLY:
-						header->type = ICMP_ECHO;
-						continue;
+			if (error) {
+				switch (header->type) {
+				case ICMP_ECHOREPLY:
+					header->type = ICMP_ECHO;
+					continue;
 				}
 			}
@@ -556,101 +590,211 @@
 		}
 	}
-	switch(header->type){
-		case ICMP_ECHOREPLY:
-			if(error){
-				return icmp_process_echo_reply(packet, header, type, code);
-			}else{
-				return icmp_process_echo_reply(packet, header, ICMP_ECHO, 0);
+
+	switch (header->type) {
+	case ICMP_ECHOREPLY:
+		if (error)
+			icmp_process_echo_reply(packet, header, type, code);
+		else
+			icmp_process_echo_reply(packet, header, ICMP_ECHO, 0);
+
+		return EOK;
+
+	case ICMP_ECHO:
+		if (error) {
+			icmp_process_echo_reply(packet, header, type, code);
+			return EOK;
+		}
+		
+		// do not send a reply if disabled
+		if (icmp_globals.echo_replying) {
+			addrlen = packet_get_addr(packet, &src, NULL);
+
+			// set both addresses to the source one (avoids the
+			// source address deletion before setting the
+			// destination one)
+			if ((addrlen > 0) && (packet_set_addr(packet, src, src,
+			    (size_t) addrlen) == EOK)) {
+				// send the reply
+				icmp_send_packet(ICMP_ECHOREPLY, 0, packet,
+				    header, 0, 0, 0, 0);
+				return EOK;
 			}
-		case ICMP_ECHO:
-			if(error){
-				return icmp_process_echo_reply(packet, header, type, code);
-			// do not send a reply if disabled
-			}else if(icmp_globals.echo_replying){
-				addrlen = packet_get_addr(packet, &src, NULL);
-				if((addrlen > 0)
-				// set both addresses to the source one (avoids the source address deletion before setting the destination one)
-					&& (packet_set_addr(packet, src, src, (size_t) addrlen) == EOK)){
-					// send the reply
-					icmp_send_packet(ICMP_ECHOREPLY, 0, packet, header, 0, 0, 0, 0);
-					return EOK;
-				}else{
-					return EINVAL;
+
+			return EINVAL;
+		}
+
+		return EPERM;
+
+	case ICMP_DEST_UNREACH:
+	case ICMP_SOURCE_QUENCH:
+	case ICMP_REDIRECT:
+	case ICMP_ALTERNATE_ADDR:
+	case ICMP_ROUTER_ADV:
+	case ICMP_ROUTER_SOL:
+	case ICMP_TIME_EXCEEDED:
+	case ICMP_PARAMETERPROB:
+	case ICMP_CONVERSION_ERROR:
+	case ICMP_REDIRECT_MOBILE:
+	case ICMP_SKIP:
+	case ICMP_PHOTURIS:
+		ip_received_error_msg(icmp_globals.ip_phone, -1, packet,
+		    SERVICE_IP, SERVICE_ICMP);
+		return EOK;
+
+	default:
+		return ENOTSUP;
+	}
+}
+
+/** Processes the received ICMP packet.
+ *
+ * Is used as an entry point from the underlying IP module.
+ * Releases the packet on error.
+ *
+ * @param device_id	The device identifier. Ignored parameter.
+ * @param[in,out] packet The received packet.
+ * @param receiver	The target service. Ignored parameter.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for the
+ *			icmp_process_packet() function.
+ */
+static int
+icmp_received_msg_local(device_id_t device_id, packet_t packet,
+    services_t receiver, services_t error)
+{
+	int rc;
+
+	rc = icmp_process_packet(packet, error);
+	if (rc != EOK)
+		return icmp_release_and_return(packet, rc);
+
+	return EOK;
+}
+
+/** Processes the generic client messages.
+ *
+ * @param[in] call	The message parameters.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if the message is not known.
+ * @returns		Other error codes as defined for the packet_translate()
+ *			function.
+ * @returns		Other error codes as defined for the
+ *			icmp_destination_unreachable_msg_local() function.
+ * @returns		Other error codes as defined for the
+ *			icmp_source_quench_msg_local() function.
+ * @returns		Other error codes as defined for the
+ *			icmp_time_exceeded_msg_local() function.
+ * @returns		Other error codes as defined for the
+ *			icmp_parameter_problem_msg_local() function.
+ *
+ * @see icmp_interface.h
+ */
+static int icmp_process_message(ipc_call_t *call)
+{
+	packet_t packet;
+	int rc;
+
+	switch (IPC_GET_METHOD(*call)) {
+	case NET_ICMP_DEST_UNREACH:
+		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return icmp_destination_unreachable_msg_local(0,
+		    ICMP_GET_CODE(call), ICMP_GET_MTU(call), packet);
+	case NET_ICMP_SOURCE_QUENCH:
+		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return icmp_source_quench_msg_local(0, packet);
+	case NET_ICMP_TIME_EXCEEDED:
+		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return icmp_time_exceeded_msg_local(0, ICMP_GET_CODE(call),
+		    packet);
+	case NET_ICMP_PARAMETERPROB:
+		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return icmp_parameter_problem_msg_local(0, ICMP_GET_CODE(call),
+		    ICMP_GET_POINTER(call), packet);
+	default:
+		return ENOTSUP;
+	}
+}
+
+/** Assigns a new identifier for the connection.
+ *
+ * Fills the echo data parameter with the assigned values.
+ *
+ * @param[in,out] echo_data The echo data to be bound.
+ * @returns		Index of the inserted echo data.
+ * @returns		EBADMEM if the echo_data parameter is NULL.
+ * @returns		ENOTCONN if no free identifier have been found.
+ */
+static int icmp_bind_free_id(icmp_echo_ref echo_data)
+{
+	icmp_param_t index;
+
+	if (!echo_data)
+		return EBADMEM;
+
+	// from the last used one
+	index = icmp_globals.last_used_id;
+	do {
+		index++;
+		// til the range end
+		if (index >= ICMP_FREE_IDS_END) {
+			// start from the range beginning
+			index = ICMP_FREE_IDS_START - 1;
+			do {
+				index++;
+				// til the last used one
+				if (index >= icmp_globals.last_used_id) {
+					// none found
+					return ENOTCONN;
 				}
-			}else{
-				return EPERM;
-			}
-		case ICMP_DEST_UNREACH:
-		case ICMP_SOURCE_QUENCH:
-		case ICMP_REDIRECT:
-		case ICMP_ALTERNATE_ADDR:
-		case ICMP_ROUTER_ADV:
-		case ICMP_ROUTER_SOL:
-		case ICMP_TIME_EXCEEDED:
-		case ICMP_PARAMETERPROB:
-		case ICMP_CONVERSION_ERROR:
-		case ICMP_REDIRECT_MOBILE:
-		case ICMP_SKIP:
-		case ICMP_PHOTURIS:
-			ip_received_error_msg(icmp_globals.ip_phone, -1, packet, SERVICE_IP, SERVICE_ICMP);
-			return EOK;
-		default:
-			return ENOTSUP;
-	}
-}
-
-int icmp_process_echo_reply(packet_t packet, icmp_header_ref header, icmp_type_t type, icmp_code_t code){
-	int reply_key;
-	icmp_reply_ref reply;
-
-	// compute the reply key
-	reply_key = ICMP_GET_REPLY_KEY(header->un.echo.identifier, header->un.echo.sequence_number);
-	pq_release_remote(icmp_globals.net_phone, packet_get_id(packet));
-	// lock the globals
-	fibril_rwlock_write_lock(&icmp_globals.lock);
-	// find the pending reply
-	reply = icmp_replies_find(&icmp_globals.replies, reply_key);
-	if(reply){
-		// set the result
-		reply->result = type;
-		// notify the waiting fibril
-		fibril_condvar_signal(&reply->condvar);
-	}
-	fibril_rwlock_write_unlock(&icmp_globals.lock);
-	return EOK;
-}
-
-int icmp_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
-	ERROR_DECLARE;
-
-	packet_t packet;
-
-	*answer_count = 0;
-	switch(IPC_GET_METHOD(*call)){
-		case NET_TL_RECEIVED:
-			if(! ERROR_OCCURRED(packet_translate_remote(icmp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){
-				ERROR_CODE = icmp_received_msg(IPC_GET_DEVICE(call), packet, SERVICE_ICMP, IPC_GET_ERROR(call));
-			}
-			return ERROR_CODE;
-		case NET_ICMP_INIT:
-			return icmp_process_client_messages(callid, * call);
-		default:
-			return icmp_process_message(call);
-	}
-	return ENOTSUP;
-}
-
-int icmp_process_client_messages(ipc_callid_t callid, ipc_call_t call){
-	ERROR_DECLARE;
-
+			} while(icmp_echo_data_find(&icmp_globals.echo_data,
+			    index) != NULL);
+
+			// found, break immediately
+			break;
+		}
+	} while (icmp_echo_data_find(&icmp_globals.echo_data, index) != NULL);
+
+	echo_data->identifier = index;
+	echo_data->sequence_number = 0;
+
+	return icmp_echo_data_add(&icmp_globals.echo_data, index, echo_data);
+}
+
+/** Processes the client messages.
+ *
+ * Remembers the assigned identifier and sequence numbers.
+ * Runs until the client module disconnects.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @returns EOK.
+ *
+ * @see icmp_interface.h
+ * @see icmp_api.h
+ */
+static int icmp_process_client_messages(ipc_callid_t callid, ipc_call_t call)
+{
 	bool keep_on_going = true;
-//	fibril_rwlock_t			lock;
 	ipc_call_t answer;
 	int answer_count;
 	size_t length;
-	struct sockaddr * addr;
+	struct sockaddr *addr;
 	ipc_callid_t data_callid;
 	icmp_echo_ref echo_data;
-	int res;
+	int rc = EOK;
 
 	/*
@@ -658,27 +802,22 @@
 	 *  - Answer the first NET_ICMP_INIT call.
 	 */
-	res = EOK;
 	answer_count = 0;
 
-//	fibril_rwlock_initialize(&lock);
-
 	echo_data = (icmp_echo_ref) malloc(sizeof(*echo_data));
-	if(! echo_data){
+	if (!echo_data)
 		return ENOMEM;
-	}
 
 	// assign a new identifier
 	fibril_rwlock_write_lock(&icmp_globals.lock);
-	res = icmp_bind_free_id(echo_data);
+	rc = icmp_bind_free_id(echo_data);
 	fibril_rwlock_write_unlock(&icmp_globals.lock);
-	if(res < 0){
+	if (rc < 0) {
 		free(echo_data);
-		return res;
-	}
-
-	while(keep_on_going){
-
+		return rc;
+	}
+
+	while (keep_on_going) {
 		// answer the call
-		answer_call(callid, res, &answer, answer_count);
+		answer_call(callid, rc, &answer, answer_count);
 
 		// refresh data
@@ -689,38 +828,50 @@
 
 		// process the call
-		switch(IPC_GET_METHOD(call)){
-			case IPC_M_PHONE_HUNGUP:
-				keep_on_going = false;
-				res = EHANGUP;
+		switch (IPC_GET_METHOD(call)) {
+		case IPC_M_PHONE_HUNGUP:
+			keep_on_going = false;
+			rc = EHANGUP;
+			break;
+		
+		case NET_ICMP_ECHO:
+			if (!async_data_write_receive(&data_callid, &length)) {
+				rc = EINVAL;
 				break;
-			case NET_ICMP_ECHO:
-//				fibril_rwlock_write_lock(&lock);
-				if(! async_data_write_receive(&data_callid, &length)){
-					res = EINVAL;
-				}else{
-					addr = malloc(length);
-					if(! addr){
-						res = ENOMEM;
-					}else{
-						if(! ERROR_OCCURRED(async_data_write_finalize(data_callid, addr, length))){
-							fibril_rwlock_write_lock(&icmp_globals.lock);
-							res = icmp_echo(echo_data->identifier, echo_data->sequence_number, ICMP_GET_SIZE(call), ICMP_GET_TIMEOUT(call), ICMP_GET_TTL(call), ICMP_GET_TOS(call), ICMP_GET_DONT_FRAGMENT(call), addr, (socklen_t) length);
-							fibril_rwlock_write_unlock(&icmp_globals.lock);
-							free(addr);
-							if(echo_data->sequence_number < UINT16_MAX){
-								++ echo_data->sequence_number;
-							}else{
-								echo_data->sequence_number = 0;
-							}
-						}else{
-							res = ERROR_CODE;
-						}
-					}
-				}
-//				fibril_rwlock_write_unlock(&lock);
+			}
+			
+			addr = malloc(length);
+			if (!addr) {
+				rc = ENOMEM;
 				break;
-			default:
-				res = icmp_process_message(&call);
+			}
+			
+			rc = async_data_write_finalize(data_callid, addr,
+			    length);
+			if (rc != EOK) {
+				free(addr);
+				break;
+			}
+
+			fibril_rwlock_write_lock(&icmp_globals.lock);
+			rc = icmp_echo(echo_data->identifier,
+			    echo_data->sequence_number, ICMP_GET_SIZE(call),
+			    ICMP_GET_TIMEOUT(call), ICMP_GET_TTL(call),
+			    ICMP_GET_TOS(call), ICMP_GET_DONT_FRAGMENT(call),
+			    addr, (socklen_t) length);
+			fibril_rwlock_write_unlock(&icmp_globals.lock);
+
+			free(addr);
+
+			if (echo_data->sequence_number < UINT16_MAX)
+				echo_data->sequence_number++;
+			else
+				echo_data->sequence_number = 0;
+
+			break;
+
+		default:
+			rc = icmp_process_message(&call);
 		}
+
 	}
 
@@ -729,81 +880,56 @@
 	icmp_echo_data_exclude(&icmp_globals.echo_data, echo_data->identifier);
 	fibril_rwlock_write_unlock(&icmp_globals.lock);
-	return res;
-}
-
-int icmp_process_message(ipc_call_t * call){
-	ERROR_DECLARE;
-
+
+	return rc;
+}
+
+/** Processes the ICMP message.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if the message is not known.
+ *
+ * @see icmp_interface.h
+ * @see IS_NET_ICMP_MESSAGE()
+ */
+int
+icmp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	packet_t packet;
-
-	switch(IPC_GET_METHOD(*call)){
-		case NET_ICMP_DEST_UNREACH:
-			if(! ERROR_OCCURRED(packet_translate_remote(icmp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){
-				ERROR_CODE = icmp_destination_unreachable_msg(0, ICMP_GET_CODE(call), ICMP_GET_MTU(call), packet);
-			}
-			return ERROR_CODE;
-		case NET_ICMP_SOURCE_QUENCH:
-			if(! ERROR_OCCURRED(packet_translate_remote(icmp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){
-				ERROR_CODE = icmp_source_quench_msg(0, packet);
-			}
-			return ERROR_CODE;
-		case NET_ICMP_TIME_EXCEEDED:
-			if(! ERROR_OCCURRED(packet_translate_remote(icmp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){
-				ERROR_CODE = icmp_time_exceeded_msg(0, ICMP_GET_CODE(call), packet);
-			}
-			return ERROR_CODE;
-		case NET_ICMP_PARAMETERPROB:
-			if(! ERROR_OCCURRED(packet_translate_remote(icmp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){
-				ERROR_CODE = icmp_parameter_problem_msg(0, ICMP_GET_CODE(call), ICMP_GET_POINTER(call), packet);
-			}
-			return ERROR_CODE;
-		default:
-			return ENOTSUP;
-	}
-}
-
-int icmp_release_and_return(packet_t packet, int result){
-	pq_release_remote(icmp_globals.net_phone, packet_get_id(packet));
-	return result;
-}
-
-int icmp_bind_free_id(icmp_echo_ref echo_data){
-	icmp_param_t index;
-
-	if(! echo_data){
-		return EBADMEM;
-	}
-	// from the last used one
-	index = icmp_globals.last_used_id;
-	do{
-		++ index;
-		// til the range end
-		if(index >= ICMP_FREE_IDS_END){
-			// start from the range beginning
-			index = ICMP_FREE_IDS_START - 1;
-			do{
-				++ index;
-				// til the last used one
-				if(index >= icmp_globals.last_used_id){
-					// none found
-					return ENOTCONN;
-				}
-			}while(icmp_echo_data_find(&icmp_globals.echo_data, index) != NULL);
-			// found, break immediately
-			break;
-		}
-	}while(icmp_echo_data_find(&icmp_globals.echo_data, index) != NULL);
-	echo_data->identifier = index;
-	echo_data->sequence_number = 0;
-	return icmp_echo_data_add(&icmp_globals.echo_data, index, echo_data);
-}
+	int rc;
+
+	*answer_count = 0;
+	switch (IPC_GET_METHOD(*call)) {
+	case NET_TL_RECEIVED:
+		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return icmp_received_msg_local(IPC_GET_DEVICE(call), packet,
+		    SERVICE_ICMP, IPC_GET_ERROR(call));
+	
+	case NET_ICMP_INIT:
+		return icmp_process_client_messages(callid, * call);
+	
+	default:
+		return icmp_process_message(call);
+	}
+
+	return ENOTSUP;
+}
+
 
 /** Default thread for new connections.
  *
- *  @param[in] iid The initial message identifier.
- *  @param[in] icall The initial message call structure.
- *
- */
-static void tl_client_connection(ipc_callid_t iid, ipc_call_t * icall)
+ * @param[in] iid The initial message identifier.
+ * @param[in] icall The initial message call structure.
+ *
+ */
+static void tl_client_connection(ipc_callid_t iid, ipc_call_t *icall)
 {
 	/*
@@ -813,5 +939,5 @@
 	ipc_answer_0(iid, EOK);
 	
-	while(true) {
+	while (true) {
 		ipc_call_t answer;
 		int answer_count;
@@ -828,6 +954,10 @@
 		    &answer_count);
 		
-		/* End if said to either by the message or the processing result */
-		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))
+		/*
+		 * End if told to either by the message or the processing
+		 * result.
+		 */
+		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
+		    (res == EHANGUP))
 			return;
 		
@@ -839,22 +969,18 @@
 /** Starts the module.
  *
- *  @param argc The count of the command line arguments. Ignored parameter.
- *  @param argv The command line parameters. Ignored parameter.
- *
- *  @returns EOK on success.
- *  @returns Other error codes as defined for each specific module start function.
- *
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for each specific module
+ *			start function.
  */
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	if (ERROR_OCCURRED(tl_module_start_standalone(tl_client_connection)))
-		return ERROR_CODE;
-	
-	return EOK;
+	rc = tl_module_start_standalone(tl_client_connection);
+	return rc;
 }
 
 /** @}
  */
+
Index: uspace/srv/net/tl/icmp/icmp.h
===================================================================
--- uspace/srv/net/tl/icmp/icmp.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/icmp/icmp.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,90 +28,81 @@
 
 /** @addtogroup icmp
- *  @{
+ * @{
  */
 
 /** @file
- *  ICMP module.
+ * ICMP module.
  */
 
-#ifndef __NET_ICMP_H__
-#define __NET_ICMP_H__
+#ifndef NET_ICMP_H_
+#define NET_ICMP_H_
 
 #include <fibril_synch.h>
 
 #include <net/icmp_codes.h>
+#include <net/packet.h>
 #include <adt/int_map.h>
 #include <icmp_header.h>
 
 /** Type definition of the ICMP reply data.
- *  @see icmp_reply
+ * @see icmp_reply
  */
-typedef struct icmp_reply	icmp_reply_t;
+typedef struct icmp_reply icmp_reply_t;
 
 /** Type definition of the ICMP reply data pointer.
- *  @see icmp_reply
+ * @see icmp_reply
  */
-typedef icmp_reply_t *	icmp_reply_ref;
+typedef icmp_reply_t *icmp_reply_ref;
 
 /** Type definition of the ICMP global data.
- *  @see icmp_globals
+ * @see icmp_globals
  */
-typedef struct icmp_globals	icmp_globals_t;
+typedef struct icmp_globals icmp_globals_t;
 
 /** Pending replies map.
- *  Maps message identifiers to the pending replies.
- *  Sending fibril waits for its associated reply event.
- *  Receiving fibril sets the associated reply with the return value and signals the event.
+ *
+ * Maps message identifiers to the pending replies.
+ * Sending fibril waits for its associated reply event.
+ * Receiving fibril sets the associated reply with the return value and signals
+ * the event.
  */
 INT_MAP_DECLARE(icmp_replies, icmp_reply_t);
 
 /** Echo specific data map.
- *  The identifier is used in the future semi-remote calls instead of the ICMP phone.
+ *
+ * The identifier is used in the future semi-remote calls instead of the ICMP
+ * phone.
  */
 INT_MAP_DECLARE(icmp_echo_data, icmp_echo_t);
 
-/** ICMP reply data.
- */
-struct icmp_reply{
-	/** Reply result.
-	 */
+/** ICMP reply data. */
+struct icmp_reply {
+	/** Reply result. */
 	int result;
-	/** Safety lock.
-	 */
+	/** Safety lock. */
 	fibril_mutex_t mutex;
-	/** Received or timeouted reply signaling.
-	 */
+	/** Received or timeouted reply signaling. */
 	fibril_condvar_t condvar;
 };
 
-/** ICMP global data.
- */
-struct	icmp_globals{
-	/** IP module phone.
-	 */
+/** ICMP global data. */
+struct icmp_globals {
+	/** IP module phone. */
 	int ip_phone;
-	/** Packet dimension.
-	 */
+	/** Packet dimension. */
 	packet_dimension_t packet_dimension;
-	/** Networking module phone.
-	 */
+	/** Networking module phone. */
 	int net_phone;
-	/** Indicates whether ICMP error reporting is enabled.
-	 */
+	/** Indicates whether ICMP error reporting is enabled. */
 	int error_reporting;
-	/** Indicates whether ICMP echo replying (ping) is enabled.
-	 */
+	/** Indicates whether ICMP echo replying (ping) is enabled. */
 	int echo_replying;
-	/** The last used identifier number.
-	 */
+	/** The last used identifier number. */
 	icmp_param_t last_used_id;
-	/** The budled modules assigned echo specific data.
-	 */
+	/** The budled modules assigned echo specific data. */
 	icmp_echo_data_t echo_data;
-	/** Echo timeout locks.
-	 */
+	/** Echo timeout locks. */
 	icmp_replies_t replies;
-	/** Safety lock.
-	 */
+	/** Safety lock. */
 	fibril_rwlock_t lock;
 };
@@ -121,3 +112,2 @@
 /** @}
  */
-
Index: uspace/srv/net/tl/icmp/icmp_module.c
===================================================================
--- uspace/srv/net/tl/icmp/icmp_module.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/icmp/icmp_module.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,17 +28,20 @@
 
 /** @addtogroup icmp
- *  @{
+ * @{
  */
 
 /** @file
- *  ICMP standalone module implementation.
- *  Contains skeleton module functions mapping.
- *  The functions are used by the module skeleton as module specific entry points.
- *  @see module.c
+ * ICMP standalone module implementation.
+ * Contains skeleton module functions mapping.
+ * The functions are used by the module skeleton as module specific entry points.
+ * @see module.c
  */
+
+#include "icmp.h"
+#include "icmp_module.h"
 
 #include <async.h>
 #include <stdio.h>
-#include <err.h>
+#include <errno.h>
 #include <ipc/ipc.h>
 #include <ipc/services.h>
@@ -47,52 +50,43 @@
 #include <net/packet.h>
 #include <net_interface.h>
+
 #include <tl_local.h>
 
-#include "icmp.h"
-#include "icmp_module.h"
+/** ICMP module global data. */
+extern icmp_globals_t icmp_globals;
 
-/** ICMP module global data.
- */
-extern icmp_globals_t	icmp_globals;
-
-/** Starts the ICMP module.
- *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on successful module termination.
- *  @returns Other error codes as defined for the arp_initialize() function.
- *  @returns Other error codes as defined for the REGISTER_ME() macro function.
- */
-int tl_module_start_standalone(async_client_conn_t client_connection){
-	ERROR_DECLARE;
-
+int tl_module_start_standalone(async_client_conn_t client_connection)
+{
 	ipcarg_t phonehash;
+	int rc;
 
 	async_set_client_connection(client_connection);
 	icmp_globals.net_phone = net_connect_module();
-	if(icmp_globals.net_phone < 0){
+	if (icmp_globals.net_phone < 0)
 		return icmp_globals.net_phone;
-	}
-	ERROR_PROPAGATE(pm_init());
-	if(ERROR_OCCURRED(icmp_initialize(client_connection))
-		|| ERROR_OCCURRED(REGISTER_ME(SERVICE_ICMP, &phonehash))){
-		pm_destroy();
-		return ERROR_CODE;
-	}
+
+	rc = pm_init();
+	if (rc != EOK)
+		return rc;
+	
+	rc = icmp_initialize(client_connection);
+	if (rc != EOK)
+		goto out;
+
+	rc = REGISTER_ME(SERVICE_ICMP, &phonehash);
+	if (rc != EOK)
+		goto out;
 
 	async_manager();
 
+out:
 	pm_destroy();
-	return EOK;
+	return rc;
 }
 
-/** Processes the ICMP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the icmp_message() function.
- */
-int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+int
+tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	return icmp_message_standalone(callid, call, answer, answer_count);
 }
Index: uspace/srv/net/tl/icmp/icmp_module.h
===================================================================
--- uspace/srv/net/tl/icmp/icmp_module.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/icmp/icmp_module.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,36 +28,21 @@
 
 /** @addtogroup icmp
- *  @{
+ * @{
  */
 
 /** @file
- *  ICMP module functions.
- *  The functions are used as ICMP module entry points.
+ * ICMP module functions.
+ * The functions are used as ICMP module entry points.
  */
 
-#ifndef __NET_ICMP_MODULE_H__
-#define __NET_ICMP_MODULE_H__
+#ifndef NET_ICMP_MODULE_H_
+#define NET_ICMP_MODULE_H_
 
 #include <async.h>
 #include <ipc/ipc.h>
 
-/** Initializes the ICMP module.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on success.
- *  @returns ENOMEM if there is not enough memory left.
- */
-int icmp_initialize(async_client_conn_t client_connection);
-
-/** Processes the ICMP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns ENOTSUP if the message is not known.
- *  @see icmp_interface.h
- *  @see IS_NET_ICMP_MESSAGE()
- */
-int icmp_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
+extern int icmp_initialize(async_client_conn_t);
+extern int icmp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
+    int *);
 
 #endif
Index: uspace/srv/net/tl/tcp/tcp.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/tcp/tcp.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,11 +28,15 @@
 
 /** @addtogroup tcp
- *  @{
+ * @{
  */
 
 /** @file
- *  TCP module implementation.
- *  @see tcp.h
+ * TCP module implementation.
+ * @see tcp.h
  */
+
+#include "tcp.h"
+#include "tcp_header.h"
+#include "tcp_module.h"
 
 #include <assert.h>
@@ -43,5 +47,4 @@
 #include <stdio.h>
 #include <errno.h>
-#include <err.h>
 
 #include <ipc/ipc.h>
@@ -72,8 +75,4 @@
 #include <tl_interface.h>
 
-#include "tcp.h"
-#include "tcp_header.h"
-#include "tcp_module.h"
-
 /** TCP module name. */
 #define NAME	"TCP protocol"
@@ -110,10 +109,11 @@
 
 /** Returns a value indicating whether the value is in the interval respecting
- *  the possible overflow.
+ * the possible overflow.
  *
- *  The high end and/or the value may overflow, be lower than the low value.
- *  @param[in] lower The last value before the interval.
- *  @param[in] value The value to be checked.
- *  @param[in] higher_equal The last value in the interval.
+ * The high end and/or the value may overflow, be lower than the low value.
+ *
+ * @param[in] lower	The last value before the interval.
+ * @param[in] value	The value to be checked.
+ * @param[in] higher_equal The last value in the interval.
  */
 #define IS_IN_INTERVAL_OVERFLOW(lower, value, higher_equal) \
@@ -165,89 +165,74 @@
 };
 
-/** Releases the packet and returns the result.
- *  @param[in] packet The packet queue to be released.
- *  @param[in] result The result to be returned.
- *  @return The result parameter.
- */
-int tcp_release_and_return(packet_t packet, int result);
-
-void tcp_prepare_operation_header(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, tcp_header_ref header, int synchronize,
-    int finalize);
-int tcp_prepare_timeout(int (*timeout_function)(void *tcp_timeout_t),
-    socket_core_ref socket, tcp_socket_data_ref socket_data,
-    size_t sequence_number, tcp_socket_state_t state, suseconds_t timeout,
-    int globals_read_only);
-void tcp_free_socket_data(socket_core_ref socket);
-
-int tcp_timeout(void *data);
-
-int tcp_release_after_timeout(void *data);
-
-int tcp_process_packet(device_id_t device_id, packet_t packet,
-    services_t error);
-int tcp_connect_core(socket_core_ref socket, socket_cores_ref local_sockets,
-    struct sockaddr *addr, socklen_t addrlen);
-int tcp_queue_prepare_packet(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, packet_t packet, size_t data_length);
-int tcp_queue_packet(socket_core_ref socket, tcp_socket_data_ref socket_data,
-    packet_t packet, size_t data_length);
-packet_t tcp_get_packets_to_send(socket_core_ref socket,
-    tcp_socket_data_ref socket_data);
-void tcp_send_packets(device_id_t device_id, packet_t packet);
-
-void tcp_process_acknowledgement(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, tcp_header_ref header);
-packet_t tcp_send_prepare_packet(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, packet_t packet, size_t data_length,
-    size_t sequence_number);
-packet_t tcp_prepare_copy(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, packet_t packet, size_t data_length,
-    size_t sequence_number);
-void tcp_retransmit_packet(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, size_t sequence_number);
-int tcp_create_notification_packet(packet_t * packet, socket_core_ref socket,
-    tcp_socket_data_ref socket_data, int synchronize, int finalize);
-void tcp_refresh_socket_data(tcp_socket_data_ref socket_data);
-
-void tcp_initialize_socket_data(tcp_socket_data_ref socket_data);
-
-int tcp_process_listen(socket_core_ref listening_socket,
-    tcp_socket_data_ref listening_socket_data, tcp_header_ref header,
-    packet_t packet, struct sockaddr *src, struct sockaddr *dest,
-    size_t addrlen);
-int tcp_process_syn_sent(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, tcp_header_ref header, packet_t packet);
-int tcp_process_syn_received(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, tcp_header_ref header, packet_t packet);
-int tcp_process_established(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, tcp_header_ref header, packet_t packet,
-    int fragments, size_t total_length);
-int tcp_queue_received_packet(socket_core_ref socket,
-    tcp_socket_data_ref socket_data, packet_t packet, int fragments,
-    size_t total_length);
-
-int tcp_received_msg(device_id_t device_id, packet_t packet,
-    services_t receiver, services_t error);
-int tcp_process_client_messages(ipc_callid_t callid, ipc_call_t call);
-
-int tcp_listen_message(socket_cores_ref local_sockets, int socket_id,
-    int backlog);
-int tcp_connect_message(socket_cores_ref local_sockets, int socket_id,
-    struct sockaddr *addr, socklen_t addrlen);
-int tcp_recvfrom_message(socket_cores_ref local_sockets, int socket_id,
-    int flags, size_t * addrlen);
-int tcp_send_message(socket_cores_ref local_sockets, int socket_id,
-    int fragments, size_t * data_fragment_size, int flags);
-int tcp_accept_message(socket_cores_ref local_sockets, int socket_id,
-    int new_socket_id, size_t * data_fragment_size, size_t * addrlen);
-int tcp_close_message(socket_cores_ref local_sockets, int socket_id);
+static int tcp_release_and_return(packet_t, int);
+static void tcp_prepare_operation_header(socket_core_ref, tcp_socket_data_ref,
+    tcp_header_ref, int synchronize, int);
+static int tcp_prepare_timeout(int (*)(void *), socket_core_ref,
+    tcp_socket_data_ref, size_t, tcp_socket_state_t, suseconds_t, int);
+static void tcp_free_socket_data(socket_core_ref);
+
+static int tcp_timeout(void *);
+
+static int tcp_release_after_timeout(void *);
+
+static int tcp_process_packet(device_id_t, packet_t, services_t);
+static int tcp_connect_core(socket_core_ref, socket_cores_ref,
+    struct sockaddr *, socklen_t);
+static int tcp_queue_prepare_packet(socket_core_ref, tcp_socket_data_ref,
+    packet_t, size_t);
+static int tcp_queue_packet(socket_core_ref, tcp_socket_data_ref, packet_t,
+    size_t);
+static packet_t tcp_get_packets_to_send(socket_core_ref, tcp_socket_data_ref);
+static void tcp_send_packets(device_id_t, packet_t);
+
+static void tcp_process_acknowledgement(socket_core_ref, tcp_socket_data_ref,
+    tcp_header_ref);
+static packet_t tcp_send_prepare_packet(socket_core_ref, tcp_socket_data_ref,
+    packet_t, size_t, size_t);
+static packet_t tcp_prepare_copy(socket_core_ref, tcp_socket_data_ref, packet_t,
+    size_t, size_t);
+/* static */ void tcp_retransmit_packet(socket_core_ref, tcp_socket_data_ref,
+    size_t);
+static int tcp_create_notification_packet(packet_t *, socket_core_ref,
+    tcp_socket_data_ref, int, int);
+static void tcp_refresh_socket_data(tcp_socket_data_ref);
+
+static void tcp_initialize_socket_data(tcp_socket_data_ref);
+
+static int tcp_process_listen(socket_core_ref, tcp_socket_data_ref,
+    tcp_header_ref, packet_t, struct sockaddr *, struct sockaddr *, size_t);
+static int tcp_process_syn_sent(socket_core_ref, tcp_socket_data_ref,
+    tcp_header_ref, packet_t);
+static int tcp_process_syn_received(socket_core_ref, tcp_socket_data_ref,
+    tcp_header_ref, packet_t);
+static int tcp_process_established(socket_core_ref, tcp_socket_data_ref,
+    tcp_header_ref, packet_t, int, size_t);
+static int tcp_queue_received_packet(socket_core_ref, tcp_socket_data_ref,
+    packet_t, int, size_t);
+
+static int tcp_received_msg(device_id_t, packet_t, services_t, services_t);
+static int tcp_process_client_messages(ipc_callid_t, ipc_call_t);
+
+static int tcp_listen_message(socket_cores_ref, int, int);
+static int tcp_connect_message(socket_cores_ref, int, struct sockaddr *,
+    socklen_t);
+static int tcp_recvfrom_message(socket_cores_ref, int, int, size_t *);
+static int tcp_send_message(socket_cores_ref, int, int, size_t *, int);
+static int tcp_accept_message(socket_cores_ref, int, int, size_t *, size_t *);
+static int tcp_close_message(socket_cores_ref, int);
 
 /** TCP global data. */
 tcp_globals_t tcp_globals;
 
+/** Initializes the TCP module.
+ *
+ * @param[in] client_connection The client connection processing function. The
+ *			module skeleton propagates its own one.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
 int tcp_initialize(async_client_conn_t client_connection)
 {
-	ERROR_DECLARE;
+	int rc;
 
 	assert(client_connection);
@@ -260,18 +245,24 @@
 	tcp_globals.ip_phone = ip_bind_service(SERVICE_IP, IPPROTO_TCP,
 	    SERVICE_TCP, client_connection);
-	if (tcp_globals.ip_phone < 0)
+	if (tcp_globals.ip_phone < 0) {
+		fibril_rwlock_write_unlock(&tcp_globals.lock);
 		return tcp_globals.ip_phone;
+	}
 	
-	ERROR_PROPAGATE(socket_ports_initialize(&tcp_globals.sockets));
-	if (ERROR_OCCURRED(packet_dimensions_initialize(
-	    &tcp_globals.dimensions))) {
+	rc = socket_ports_initialize(&tcp_globals.sockets);
+	if (rc != EOK)
+		goto out;
+
+	rc = packet_dimensions_initialize(&tcp_globals.dimensions);
+	if (rc != EOK) {
 		socket_ports_destroy(&tcp_globals.sockets);
-		return ERROR_CODE;
+		goto out;
 	}
 
 	tcp_globals.last_used_port = TCP_FREE_PORTS_START - 1;
+
+out:
 	fibril_rwlock_write_unlock(&tcp_globals.lock);
-
-	return EOK;
+	return rc;
 }
 
@@ -280,5 +271,5 @@
     services_t error)
 {
-	ERROR_DECLARE;
+	int rc;
 
 	if (receiver != SERVICE_TCP)
@@ -286,16 +277,15 @@
 
 	fibril_rwlock_write_lock(&tcp_globals.lock);
-	if (ERROR_OCCURRED(tcp_process_packet(device_id, packet, error)))
+	rc = tcp_process_packet(device_id, packet, error);
+	if (rc != EOK)
 		fibril_rwlock_write_unlock(&tcp_globals.lock);
 
-	printf("receive %d \n", ERROR_CODE);
-
-	return ERROR_CODE;
+	printf("receive %d \n", rc);
+
+	return rc;
 }
 
 int tcp_process_packet(device_id_t device_id, packet_t packet, services_t error)
 {
-	ERROR_DECLARE;
-
 	size_t length;
 	size_t offset;
@@ -313,24 +303,23 @@
 	struct sockaddr *dest;
 	size_t addrlen;
-
-	if (error) {
-		switch (error) {
-		case SERVICE_ICMP:
-			// process error
-			result = icmp_client_process_packet(packet, &type,
-			    &code, NULL, NULL);
-			if (result < 0)
-				return tcp_release_and_return(packet, result);
-
-			length = (size_t) result;
-			if (ERROR_OCCURRED(packet_trim(packet, length, 0))) {
-				return tcp_release_and_return(packet,
-				    ERROR_CODE);
-			}
-			break;
-
-		default:
-			return tcp_release_and_return(packet, ENOTSUP);
-		}
+	int rc;
+
+	switch (error) {
+	case SERVICE_NONE:
+		break;
+	case SERVICE_ICMP:
+		// process error
+		result = icmp_client_process_packet(packet, &type, &code, NULL,
+		    NULL);
+		if (result < 0)
+			return tcp_release_and_return(packet, result);
+
+		length = (size_t) result;
+		rc = packet_trim(packet, length, 0);
+		if (rc != EOK)
+			return tcp_release_and_return(packet, rc);
+		break;
+	default:
+		return tcp_release_and_return(packet, ENOTSUP);
 	}
 
@@ -350,6 +339,7 @@
 
 	// trim all but TCP header
-	if (ERROR_OCCURRED(packet_trim(packet, offset, 0)))
-		return tcp_release_and_return(packet, ERROR_CODE);
+	rc = packet_trim(packet, offset, 0);
+	if (rc != EOK)
+		return tcp_release_and_return(packet, rc);
 
 	// get tcp header
@@ -367,7 +357,7 @@
 	addrlen = (size_t) result;
 
-	if (ERROR_OCCURRED(tl_set_address_port(src, addrlen,
-	    ntohs(header->source_port)))) 
-		return tcp_release_and_return(packet, ERROR_CODE);
+	rc = tl_set_address_port(src, addrlen, ntohs(header->source_port));
+	if (rc != EOK)
+		return tcp_release_and_return(packet, rc);
 	
 	// find the destination socket
@@ -379,14 +369,14 @@
 		    ntohs(header->destination_port), SOCKET_MAP_KEY_LISTENING,
 		    0);
-		if (!socket) {
-			if (tl_prepare_icmp_packet(tcp_globals.net_phone,
-			    tcp_globals.icmp_phone, packet, error) == EOK) {
-				icmp_destination_unreachable_msg(
-				    tcp_globals.icmp_phone, ICMP_PORT_UNREACH,
-				    0, packet);
-			}
-			return EADDRNOTAVAIL;
-		}
-	}
+	}
+	if (!socket) {
+		if (tl_prepare_icmp_packet(tcp_globals.net_phone,
+		    tcp_globals.icmp_phone, packet, error) == EOK) {
+			icmp_destination_unreachable_msg(tcp_globals.icmp_phone,
+			    ICMP_PORT_UNREACH, 0, packet);
+		}
+		return EADDRNOTAVAIL;
+	}
+
 	printf("socket id %d\n", socket->socket_id);
 	socket_data = (tcp_socket_data_ref) socket->specific_data;
@@ -402,5 +392,5 @@
 	total_length = 0;
 	do {
-		++fragments;
+		fragments++;
 		length = packet_get_data_length(next_packet);
 		if (length <= 0)
@@ -421,8 +411,7 @@
 
 	if (error)
-		goto error;
+		goto has_error_service;
 	
 	if (socket_data->state == TCP_SOCKET_LISTEN) {
-
 		if (socket_data->pseudo_header) {
 			free(socket_data->pseudo_header);
@@ -431,16 +420,19 @@
 		}
 
-		if (ERROR_OCCURRED(ip_client_get_pseudo_header(IPPROTO_TCP, src,
-		    addrlen, dest, addrlen, total_length,
-		    &socket_data->pseudo_header, &socket_data->headerlen))) {
+		rc = ip_client_get_pseudo_header(IPPROTO_TCP, src, addrlen,
+		    dest, addrlen, total_length, &socket_data->pseudo_header,
+		    &socket_data->headerlen);
+		if (rc != EOK) {
 			fibril_rwlock_write_unlock(socket_data->local_lock);
-			return tcp_release_and_return(packet, ERROR_CODE);
-		}
-
-	} else if (ERROR_OCCURRED(ip_client_set_pseudo_header_data_length(
-	    socket_data->pseudo_header, socket_data->headerlen,
-	    total_length))) {
-		fibril_rwlock_write_unlock(socket_data->local_lock);
-		return tcp_release_and_return(packet, ERROR_CODE);
+			return tcp_release_and_return(packet, rc);
+		}
+	} else {
+		rc = ip_client_set_pseudo_header_data_length(
+		    socket_data->pseudo_header, socket_data->headerlen,
+		    total_length);
+		if (rc != EOK) {
+			fibril_rwlock_write_unlock(socket_data->local_lock);
+			return tcp_release_and_return(packet, rc);
+		}
 	}
 	
@@ -452,6 +444,7 @@
 		fibril_rwlock_write_unlock(socket_data->local_lock);
 
-		if (ERROR_NONE(tl_prepare_icmp_packet(tcp_globals.net_phone,
-		    tcp_globals.icmp_phone, packet, error))) {
+		rc = tl_prepare_icmp_packet(tcp_globals.net_phone,
+		    tcp_globals.icmp_phone, packet, error);
+		if (rc == EOK) {
 			// checksum error ICMP
 			icmp_parameter_problem_msg(tcp_globals.icmp_phone,
@@ -464,5 +457,5 @@
 	}
 
-error:
+has_error_service:
 	fibril_rwlock_read_unlock(&tcp_globals.lock);
 
@@ -470,14 +463,13 @@
 	switch (socket_data->state) {
 	case TCP_SOCKET_LISTEN:
-		ERROR_CODE = tcp_process_listen(socket, socket_data, header,
-		    packet, src, dest, addrlen);
+		rc = tcp_process_listen(socket, socket_data, header, packet,
+		    src, dest, addrlen);
 		break;
 	case TCP_SOCKET_SYN_RECEIVED:
-		ERROR_CODE = tcp_process_syn_received(socket, socket_data,
-		    header, packet);
+		rc = tcp_process_syn_received(socket, socket_data, header,
+		    packet);
 		break;
 	case TCP_SOCKET_SYN_SENT:
-		ERROR_CODE = tcp_process_syn_sent(socket, socket_data, header,
-		    packet);
+		rc = tcp_process_syn_sent(socket, socket_data, header, packet);
 		break;
 	case TCP_SOCKET_FIN_WAIT_1:
@@ -490,6 +482,6 @@
 		// ack releasing the socket gets processed later
 	case TCP_SOCKET_ESTABLISHED:
-		ERROR_CODE = tcp_process_established(socket, socket_data,
-		    header, packet, fragments, total_length);
+		rc = tcp_process_established(socket, socket_data, header,
+		    packet, fragments, total_length);
 		break;
 	default:
@@ -497,7 +489,7 @@
 	}
 
-	if (ERROR_CODE != EOK) {
-		printf("process %d\n", ERROR_CODE);
+	if (rc != EOK) {
 		fibril_rwlock_write_unlock(socket_data->local_lock);
+		printf("process %d\n", rc);
 	}
 
@@ -507,9 +499,6 @@
 int
 tcp_process_established(socket_core_ref socket, tcp_socket_data_ref socket_data,
-    tcp_header_ref header, packet_t packet, int fragments,
-    size_t total_length)
-{
-	ERROR_DECLARE;
-
+    tcp_header_ref header, packet_t packet, int fragments, size_t total_length)
+{
 	packet_t next_packet;
 	packet_t tmp_packet;
@@ -520,4 +509,5 @@
 	size_t offset;
 	uint32_t new_sequence_number;
+	int rc;
 
 	assert(socket);
@@ -560,7 +550,9 @@
 		}
 
-		if ((offset > 0) && (ERROR_OCCURRED(packet_trim(packet,
-		    offset, 0))))
-			return tcp_release_and_return(packet, ERROR_CODE);
+		if (offset > 0) {
+			rc = packet_trim(packet, offset, 0);
+			if (rc != EOK)
+				return tcp_release_and_return(packet, rc);
+		}
 
 		assert(new_sequence_number == socket_data->next_incoming);
@@ -594,8 +586,11 @@
 			if (length <= offset)
 				next_packet = pq_next(next_packet);
-			else if (ERROR_OCCURRED(packet_trim(next_packet, 0,
-			    length - offset)))
-				return tcp_release_and_return(packet,
-				    ERROR_CODE);
+			else {
+				rc = packet_trim(next_packet, 0,
+				    length - offset));
+				if (rc != EOK)
+					return tcp_release_and_return(packet,
+					    rc);
+			}
 			offset -= length;
 			total_length -= length - offset;
@@ -622,11 +617,13 @@
 		// remove the header
 		total_length -= TCP_HEADER_LENGTH(header);
-		if (ERROR_OCCURRED(packet_trim(packet,
-		    TCP_HEADER_LENGTH(header), 0)))
-			return tcp_release_and_return(packet, ERROR_CODE);
+		rc = packet_trim(packet, TCP_HEADER_LENGTH(header), 0);
+		if (rc != EOK)
+			return tcp_release_and_return(packet, rc);
 
 		if (total_length) {
-			ERROR_PROPAGATE(tcp_queue_received_packet(socket,
-			    socket_data, packet, fragments, total_length));
+			rc = tcp_queue_received_packet(socket, socket_data,
+			    packet, fragments, total_length);
+			if (rc != EOK)
+				return rc;
 		} else {
 			total_length = 1;
@@ -636,7 +633,6 @@
 		packet = socket_data->incoming;
 		while (packet) {
-
-			if (ERROR_OCCURRED(pq_get_order(socket_data->incoming,
-			    &order, NULL))) {
+			rc = pq_get_order(socket_data->incoming, &order, NULL);
+			if (rc != EOK) {
 				// remove the corrupted packet
 				next_packet = pq_detach(packet);
@@ -675,8 +671,9 @@
 				    socket_data->next_incoming) {
 					// queue received data
-					ERROR_PROPAGATE(
-					    tcp_queue_received_packet(socket,
+					rc = tcp_queue_received_packet(socket,
 					    socket_data, packet, 1,
-					    packet_get_data_length(packet)));
+					    packet_get_data_length(packet));
+					if (rc != EOK)
+						return rc;
 					socket_data->next_incoming =
 					    new_sequence_number;
@@ -684,7 +681,7 @@
 					continue;
 					// at least partly following data?
-				} else if (IS_IN_INTERVAL_OVERFLOW(
-				    sequence_number, socket_data->next_incoming,
-				    new_sequence_number)) {
+				}
+				if (IS_IN_INTERVAL_OVERFLOW(sequence_number,
+				    socket_data->next_incoming, new_sequence_number)) {
 					if (socket_data->next_incoming <
 					    new_sequence_number) {
@@ -696,12 +693,13 @@
 						    new_sequence_number;
 					}
-					if (ERROR_NONE(packet_trim(packet,
-					    length, 0))) {
+					rc = packet_trim(packet,length, 0);
+					if (rc == EOK) {
 						// queue received data
-						ERROR_PROPAGATE(
-						    tcp_queue_received_packet(
+						rc = tcp_queue_received_packet(
 						    socket, socket_data, packet,
 						    1, packet_get_data_length(
-						    packet)));
+						    packet));
+						if (rc != EOK)
+							return rc;
 						socket_data->next_incoming =
 						    new_sequence_number;
@@ -728,12 +726,13 @@
 		// remove the header
 		total_length -= TCP_HEADER_LENGTH(header);
-		if (ERROR_OCCURRED(packet_trim(packet,
-		    TCP_HEADER_LENGTH(header), 0)))
-			return tcp_release_and_return(packet, ERROR_CODE);
+		rc = packet_trim(packet, TCP_HEADER_LENGTH(header), 0);
+		if (rc != EOK)
+			return tcp_release_and_return(packet, rc);
 
 		next_packet = pq_detach(packet);
 		length = packet_get_data_length(packet);
-		if (ERROR_OCCURRED(pq_add(&socket_data->incoming, packet,
-		    new_sequence_number, length))) {
+		rc = pq_add(&socket_data->incoming, packet, new_sequence_number,
+		    length);
+		if (rc != EOK) {
 			// remove the corrupted packets
 			pq_release_remote(tcp_globals.net_phone,
@@ -746,8 +745,13 @@
 				tmp_packet = pq_detach(next_packet);
 				length = packet_get_data_length(next_packet);
-				if (ERROR_OCCURRED(pq_set_order(next_packet,
-				    new_sequence_number, length)) ||
-				    ERROR_OCCURRED(pq_insert_after(packet,
-				    next_packet))) {
+
+				rc = pq_set_order(next_packet,
+				    new_sequence_number, length);
+				if (rc != EOK) {
+					pq_release_remote(tcp_globals.net_phone,
+					    packet_get_id(next_packet));
+				}
+				rc = pq_insert_after(packet, next_packet);
+				if (rc != EOK) {
 					pq_release_remote(tcp_globals.net_phone,
 					    packet_get_id(next_packet));
@@ -781,8 +785,11 @@
 	if (!packet) {
 		// create the notification packet
-		ERROR_PROPAGATE(tcp_create_notification_packet(&packet, socket,
-		    socket_data, 0, 0));
-		ERROR_PROPAGATE(tcp_queue_prepare_packet(socket, socket_data,
-		    packet, 1));
+		rc = tcp_create_notification_packet(&packet, socket,
+		    socket_data, 0, 0);
+		if (rc != EOK)
+			return rc;
+		rc = tcp_queue_prepare_packet(socket, socket_data, packet, 1);
+		if (rc != EOK)
+			return rc;
 		packet = tcp_send_prepare_packet(socket, socket_data, packet, 1,
 		    socket_data->last_outgoing + 1);
@@ -802,7 +809,6 @@
     size_t total_length)
 {
-	ERROR_DECLARE;
-
 	packet_dimension_ref packet_dimension;
+	int rc;
 
 	assert(socket);
@@ -814,11 +820,12 @@
 
 	// queue the received packet
-	if (ERROR_OCCURRED(dyn_fifo_push(&socket->received,
-	    packet_get_id(packet), SOCKET_MAX_RECEIVED_SIZE)) ||
-	    ERROR_OCCURRED(tl_get_ip_packet_dimension(tcp_globals.ip_phone,
-	    &tcp_globals.dimensions, socket_data->device_id,
-	    &packet_dimension))) {
-		return tcp_release_and_return(packet, ERROR_CODE);
-	}
+	rc = dyn_fifo_push(&socket->received, packet_get_id(packet),
+	    SOCKET_MAX_RECEIVED_SIZE);
+	if (rc != EOK)
+		return tcp_release_and_return(packet, rc);
+	rc = tl_get_ip_packet_dimension(tcp_globals.ip_phone,
+	    &tcp_globals.dimensions, socket_data->device_id, &packet_dimension);
+	if (rc != EOK)
+		return tcp_release_and_return(packet, rc);
 
 	// decrease the window size
@@ -839,7 +846,6 @@
     tcp_header_ref header, packet_t packet)
 {
-	ERROR_DECLARE;
-
 	packet_t next_packet;
+	int rc;
 
 	assert(socket);
@@ -863,8 +869,9 @@
 	}
 	// trim if longer than the header
-	if ((packet_get_data_length(packet) > sizeof(*header)) &&
-	    ERROR_OCCURRED(packet_trim(packet, 0,
-	    packet_get_data_length(packet) - sizeof(*header)))) {
-		return tcp_release_and_return(packet, ERROR_CODE);
+	if (packet_get_data_length(packet) > sizeof(*header)) {
+		rc = packet_trim(packet, 0,
+		    packet_get_data_length(packet) - sizeof(*header));
+		if (rc != EOK)
+			return tcp_release_and_return(packet, rc);
 	}
 	tcp_prepare_operation_header(socket, socket_data, header, 0, 0);
@@ -895,6 +902,4 @@
     size_t addrlen)
 {
-	ERROR_DECLARE;
-
 	packet_t next_packet;
 	socket_core_ref socket;
@@ -903,4 +908,5 @@
 	int listening_socket_id = listening_socket->socket_id;
 	int listening_port = listening_socket->port;
+	int rc;
 
 	assert(listening_socket);
@@ -932,19 +938,20 @@
 	memcpy(socket_data->addr, src, socket_data->addrlen);
 	socket_data->dest_port = ntohs(header->source_port);
-	if (ERROR_OCCURRED(tl_set_address_port(socket_data->addr,
-	    socket_data->addrlen, socket_data->dest_port))) {
+	rc = tl_set_address_port(socket_data->addr, socket_data->addrlen,
+	    socket_data->dest_port);
+	if (rc != EOK) {
 		free(socket_data->addr);
 		free(socket_data);
-		pq_release_remote(tcp_globals.net_phone, packet_get_id(packet));
-		return ERROR_CODE;
+		return tcp_release_and_return(packet, rc);
 	}
 
 	// create a socket
 	socket_id = -1;
-	if (ERROR_OCCURRED(socket_create(socket_data->local_sockets,
-	    listening_socket->phone, socket_data, &socket_id))) {
+	rc = socket_create(socket_data->local_sockets, listening_socket->phone,
+	    socket_data, &socket_id);
+	if (rc != EOK) {
 		free(socket_data->addr);
 		free(socket_data);
-		return tcp_release_and_return(packet, ERROR_CODE);
+		return tcp_release_and_return(packet, rc);
 	}
 
@@ -961,5 +968,5 @@
 	listening_socket = socket_port_find(&tcp_globals.sockets,
 	    listening_port, SOCKET_MAP_KEY_LISTENING, 0);
-	if ((!listening_socket) ||
+	if (!listening_socket ||
 	    (listening_socket->socket_id != listening_socket_id)) {
 		fibril_rwlock_write_unlock(&tcp_globals.lock);
@@ -983,19 +990,19 @@
 	assert(socket_data);
 
-	ERROR_CODE = socket_port_add(&tcp_globals.sockets, listening_port,
-	    socket, (const char *) socket_data->addr, socket_data->addrlen);
+	rc = socket_port_add(&tcp_globals.sockets, listening_port, socket,
+	    (const char *) socket_data->addr, socket_data->addrlen);
 	assert(socket == socket_port_find(&tcp_globals.sockets, listening_port,
 	    (const char *) socket_data->addr, socket_data->addrlen));
 
-//	ERROR_CODE = socket_bind_free_port(&tcp_globals.sockets, socket,
+//	rc = socket_bind_free_port(&tcp_globals.sockets, socket,
 //	    TCP_FREE_PORTS_START, TCP_FREE_PORTS_END,
 //	    tcp_globals.last_used_port);
 //	tcp_globals.last_used_port = socket->port;
 	fibril_rwlock_write_unlock(&tcp_globals.lock);
-	if (ERROR_CODE != EOK) {
+	if (rc != EOK) {
 		socket_destroy(tcp_globals.net_phone, socket->socket_id,
 		    socket_data->local_sockets, &tcp_globals.sockets,
 		    tcp_free_socket_data);
-		return tcp_release_and_return(packet, ERROR_CODE);
+		return tcp_release_and_return(packet, rc);
 	}
 
@@ -1011,20 +1018,23 @@
 
 	// trim if longer than the header
-	if ((packet_get_data_length(packet) > sizeof(*header)) &&
-	    ERROR_OCCURRED(packet_trim(packet, 0,
-	    packet_get_data_length(packet) - sizeof(*header)))) {
+	if (packet_get_data_length(packet) > sizeof(*header)) {
+		rc = packet_trim(packet, 0,
+		    packet_get_data_length(packet) - sizeof(*header));
+		if (rc != EOK) {
+			socket_destroy(tcp_globals.net_phone, socket->socket_id,
+			    socket_data->local_sockets, &tcp_globals.sockets,
+			    tcp_free_socket_data);
+			return tcp_release_and_return(packet, rc);
+		}
+	}
+
+	tcp_prepare_operation_header(socket, socket_data, header, 1, 0);
+
+	rc = tcp_queue_packet(socket, socket_data, packet, 1);
+	if (rc != EOK) {
 		socket_destroy(tcp_globals.net_phone, socket->socket_id,
 		    socket_data->local_sockets, &tcp_globals.sockets,
 		    tcp_free_socket_data);
-		return tcp_release_and_return(packet, ERROR_CODE);
-	}
-
-	tcp_prepare_operation_header(socket, socket_data, header, 1, 0);
-
-	if (ERROR_OCCURRED(tcp_queue_packet(socket, socket_data, packet, 1))) {
-		socket_destroy(tcp_globals.net_phone, socket->socket_id,
-		    socket_data->local_sockets, &tcp_globals.sockets,
-		    tcp_free_socket_data);
-		return ERROR_CODE;
+		return rc;
 	}
 
@@ -1050,8 +1060,7 @@
     tcp_socket_data_ref socket_data, tcp_header_ref header, packet_t packet)
 {
-	ERROR_DECLARE;
-
 	socket_core_ref listening_socket;
 	tcp_socket_data_ref listening_socket_data;
+	int rc;
 
 	assert(socket);
@@ -1078,8 +1087,7 @@
 
 		// queue the received packet
-		if (ERROR_NONE(dyn_fifo_push(&listening_socket->accepted,
-		    (-1 * socket->socket_id),
-		    listening_socket_data->backlog))) {
-
+		rc = dyn_fifo_push(&listening_socket->accepted,
+		    (-1 * socket->socket_id), listening_socket_data->backlog);
+		if (rc == EOK) {
 			// notify the destination socket
 			async_msg_5(socket->phone, NET_SOCKET_ACCEPTED,
@@ -1096,9 +1104,12 @@
 
 	// create the notification packet
-	ERROR_PROPAGATE(tcp_create_notification_packet(&packet, socket,
-	    socket_data, 0, 1));
+	rc = tcp_create_notification_packet(&packet, socket, socket_data, 0, 1);
+	if (rc != EOK)
+		return rc;
 
 	// send the packet
-	ERROR_PROPAGATE(tcp_queue_packet(socket, socket_data, packet, 1));
+	rc = tcp_queue_packet(socket, socket_data, packet, 1);
+	if (rc != EOK)
+		return rc;
 
 	// flush packets
@@ -1191,5 +1202,5 @@
 	if (number == socket_data->expected) {
 		// increase the counter
-		++socket_data->expected_count;
+		socket_data->expected_count++;
 		if (socket_data->expected_count == TCP_FAST_RETRANSMIT_COUNT) {
 			socket_data->expected_count = 1;
@@ -1200,10 +1211,23 @@
 }
 
-int tcp_message_standalone(ipc_callid_t callid, ipc_call_t * call,
-    ipc_call_t * answer, int *answer_count)
-{
-	ERROR_DECLARE;
-
+/** Processes the TCP message.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if the message is not known.
+ *
+ * @see tcp_interface.h
+ * @see IS_NET_TCP_MESSAGE()
+ */
+int
+tcp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	packet_t packet;
+	int rc;
 
 	assert(call);
@@ -1214,13 +1238,15 @@
 	switch (IPC_GET_METHOD(*call)) {
 	case NET_TL_RECEIVED:
-		//fibril_rwlock_read_lock(&tcp_globals.lock);
-		if (ERROR_NONE(packet_translate_remote(tcp_globals.net_phone,
-		    &packet, IPC_GET_PACKET(call)))) {
-			ERROR_CODE = tcp_received_msg(IPC_GET_DEVICE(call),
-			    packet, SERVICE_TCP, IPC_GET_ERROR(call));
-		}
-		//fibril_rwlock_read_unlock(&tcp_globals.lock);
-		return ERROR_CODE;
-
+//		fibril_rwlock_read_lock(&tcp_globals.lock);
+		rc = packet_translate_remote(tcp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK) {
+//			fibril_rwlock_read_unlock(&tcp_globals.lock);
+			return rc;
+		}
+		rc = tcp_received_msg(IPC_GET_DEVICE(call), packet, SERVICE_TCP,
+		    IPC_GET_ERROR(call));
+//		fibril_rwlock_read_unlock(&tcp_globals.lock);
+		return rc;
 	case IPC_M_CONNECT_TO_ME:
 		return tcp_process_client_messages(callid, *call);
@@ -1521,5 +1547,5 @@
 	socket = socket_port_find(&tcp_globals.sockets, timeout->port,
 	    timeout->key, timeout->key_length);
-	if (!(socket && (socket->socket_id == timeout->socket_id)))
+	if (!socket || (socket->socket_id != timeout->socket_id))
 		goto out;
 	
@@ -1532,5 +1558,5 @@
 	if (timeout->sequence_number) {
 		// increase the timeout counter;
-		++socket_data->timeout_count;
+		socket_data->timeout_count++;
 		if (socket_data->timeout_count == TCP_MAX_TIMEOUTS) {
 			// TODO release as connection lost
@@ -1667,7 +1693,6 @@
     struct sockaddr *addr, socklen_t addrlen)
 {
-	ERROR_DECLARE;
-
 	socket_core_ref socket;
+	int rc;
 
 	assert(local_sockets);
@@ -1680,6 +1705,6 @@
 		return ENOTSOCK;
 	
-	if (ERROR_OCCURRED(tcp_connect_core(socket, local_sockets, addr,
-	    addrlen))) {
+	rc = tcp_connect_core(socket, local_sockets, addr, addrlen);
+	if (rc != EOK) {
 		tcp_free_socket_data(socket);
 		// unbind if bound
@@ -1690,5 +1715,5 @@
 		}
 	}
-	return ERROR_CODE;
+	return rc;
 }
 
@@ -1697,8 +1722,7 @@
     struct sockaddr *addr, socklen_t addrlen)
 {
-	ERROR_DECLARE;
-
 	tcp_socket_data_ref socket_data;
 	packet_t packet;
+	int rc;
 
 	assert(socket);
@@ -1716,22 +1740,29 @@
 
 	// get the destination port
-	ERROR_PROPAGATE(tl_get_address_port(addr, addrlen,
-	    &socket_data->dest_port));
+	rc = tl_get_address_port(addr, addrlen, &socket_data->dest_port);
+	if (rc != EOK)
+		return rc;
+	
 	if (socket->port <= 0) {
 		// try to find a free port
-		ERROR_PROPAGATE(socket_bind_free_port(&tcp_globals.sockets,
-		    socket, TCP_FREE_PORTS_START, TCP_FREE_PORTS_END,
-		    tcp_globals.last_used_port));
+		rc = socket_bind_free_port(&tcp_globals.sockets, socket,
+		    TCP_FREE_PORTS_START, TCP_FREE_PORTS_END,
+		    tcp_globals.last_used_port);
+		if (rc != EOK)
+			return rc;
 		// set the next port as the search starting port number
 		tcp_globals.last_used_port = socket->port;
 	}
 
-	ERROR_PROPAGATE(ip_get_route_req(tcp_globals.ip_phone, IPPROTO_TCP,
+	rc = ip_get_route_req(tcp_globals.ip_phone, IPPROTO_TCP,
 	    addr, addrlen, &socket_data->device_id,
-	    &socket_data->pseudo_header, &socket_data->headerlen));
+	    &socket_data->pseudo_header, &socket_data->headerlen);
+	if (rc != EOK)
+		return rc;
 
 	// create the notification packet
-	ERROR_PROPAGATE(tcp_create_notification_packet(&packet, socket,
-	    socket_data, 1, 0));
+	rc = tcp_create_notification_packet(&packet, socket, socket_data, 1, 0);
+	if (rc != EOK)
+		return rc;
 
 	// unlock the globals and wait for an operation
@@ -1741,14 +1772,13 @@
 	socket_data->addrlen = addrlen;
 	// send the packet
-	if (ERROR_OCCURRED(tcp_queue_packet(socket, socket_data, packet, 1)) ||
-	    ERROR_OCCURRED(tcp_prepare_timeout(tcp_timeout, socket, socket_data,
-	    0, TCP_SOCKET_INITIAL, NET_DEFAULT_TCP_INITIAL_TIMEOUT, false))) {
-
+
+	if (((rc = tcp_queue_packet(socket, socket_data, packet, 1)) != EOK) ||
+	    ((rc = tcp_prepare_timeout(tcp_timeout, socket, socket_data, 0,
+	    TCP_SOCKET_INITIAL, NET_DEFAULT_TCP_INITIAL_TIMEOUT, false)) !=
+	    EOK)) {
 		socket_data->addr = NULL;
 		socket_data->addrlen = 0;
 		fibril_rwlock_write_lock(&tcp_globals.lock);
-
 	} else {
-
 		packet = tcp_get_packets_to_send(socket, socket_data);
 		if (packet) {
@@ -1762,6 +1792,6 @@
 			fibril_condvar_wait(&socket_data->operation.condvar,
 			    &socket_data->operation.mutex);
-			ERROR_CODE = socket_data->operation.result;
-			if (ERROR_CODE != EOK) {
+			rc = socket_data->operation.result;
+			if (rc != EOK) {
 				socket_data->addr = NULL;
 				socket_data->addrlen = 0;
@@ -1770,5 +1800,5 @@
 			socket_data->addr = NULL;
 			socket_data->addrlen = 0;
-			ERROR_CODE = EINTR;
+			rc = EINTR;
 		}
 	}
@@ -1777,5 +1807,5 @@
 
 	// return the result
-	return ERROR_CODE;
+	return rc;
 }
 
@@ -1784,7 +1814,6 @@
     tcp_socket_data_ref socket_data, packet_t packet, size_t data_length)
 {
-	ERROR_DECLARE;
-
 	tcp_header_ref header;
+	int rc;
 
 	assert(socket);
@@ -1801,6 +1830,7 @@
 	header->sequence_number = htonl(socket_data->next_outgoing);
 
-	if (ERROR_OCCURRED(packet_set_addr(packet, NULL,
-	    (uint8_t *) socket_data->addr, socket_data->addrlen)))
+	rc = packet_set_addr(packet, NULL, (uint8_t *) socket_data->addr,
+	    socket_data->addrlen);
+	if (rc != EOK)
 		return tcp_release_and_return(packet, EINVAL);
 
@@ -1816,5 +1846,5 @@
     packet_t packet, size_t data_length)
 {
-	ERROR_DECLARE;
+	int rc;
 
 	assert(socket);
@@ -1822,10 +1852,12 @@
 	assert(socket->specific_data == socket_data);
 
-	ERROR_PROPAGATE(tcp_queue_prepare_packet(socket, socket_data, packet,
-	    data_length));
-
-	if (ERROR_OCCURRED(pq_add(&socket_data->outgoing, packet,
-	    socket_data->next_outgoing, data_length)))
-		return tcp_release_and_return(packet, ERROR_CODE);
+	rc = tcp_queue_prepare_packet(socket, socket_data, packet, data_length);
+	if (rc != EOK)
+		return rc;
+
+	rc = pq_add(&socket_data->outgoing, packet, socket_data->next_outgoing,
+	    data_length);
+	if (rc != EOK)
+		return tcp_release_and_return(packet, rc);
 
 	socket_data->next_outgoing += data_length;
@@ -1836,6 +1868,4 @@
 tcp_get_packets_to_send(socket_core_ref socket, tcp_socket_data_ref socket_data)
 {
-	ERROR_DECLARE;
-
 	packet_t packet;
 	packet_t copy;
@@ -1843,4 +1873,5 @@
 	packet_t previous = NULL;
 	size_t data_length;
+	int rc;
 
 	assert(socket);
@@ -1867,8 +1898,11 @@
 		if (!sending) {
 			sending = copy;
-		} else if (ERROR_OCCURRED(pq_insert_after(previous, copy))) {
-			pq_release_remote(tcp_globals.net_phone,
-			    packet_get_id(copy));
-			return sending;
+		} else {
+			rc = pq_insert_after(previous, copy);
+			if (rc != EOK) {
+				pq_release_remote(tcp_globals.net_phone,
+				    packet_get_id(copy));
+				return sending;
+			}
 		}
 
@@ -1876,5 +1910,5 @@
 		packet = pq_next(packet);
 		// overflow occurred ?
-		if ((!packet) &&
+		if (!packet &&
 		    (socket_data->last_outgoing > socket_data->next_outgoing)) {
 			printf("gpts overflow\n");
@@ -1892,8 +1926,7 @@
     packet_t packet, size_t data_length, size_t sequence_number)
 {
-	ERROR_DECLARE;
-
 	tcp_header_ref header;
 	uint32_t checksum;
+	int rc;
 
 	assert(socket);
@@ -1902,7 +1935,7 @@
 
 	// adjust the pseudo header
-	if (ERROR_OCCURRED(ip_client_set_pseudo_header_data_length(
-	    socket_data->pseudo_header, socket_data->headerlen,
-	    packet_get_data_length(packet)))) {
+	rc = ip_client_set_pseudo_header_data_length(socket_data->pseudo_header,
+	    socket_data->headerlen, packet_get_data_length(packet));
+	if (rc != EOK) {
 		pq_release_remote(tcp_globals.net_phone, packet_get_id(packet));
 		return NULL;
@@ -1929,13 +1962,18 @@
 	checksum = compute_checksum(0, socket_data->pseudo_header,
 	    socket_data->headerlen);
-	checksum = compute_checksum(checksum, (uint8_t *) packet_get_data(packet),
+	checksum = compute_checksum(checksum,
+	    (uint8_t *) packet_get_data(packet),
 	    packet_get_data_length(packet));
 	header->checksum = htons(flip_checksum(compact_checksum(checksum)));
 
 	// prepare the packet
-	if (ERROR_OCCURRED(ip_client_prepare_packet(packet, IPPROTO_TCP, 0, 0,
-	    0, 0)) || ERROR_OCCURRED(tcp_prepare_timeout(tcp_timeout, socket,
-	    socket_data, sequence_number, socket_data->state,
-	    socket_data->timeout, true))) {
+	rc = ip_client_prepare_packet(packet, IPPROTO_TCP, 0, 0, 0, 0);
+	if (rc != EOK) {
+		pq_release_remote(tcp_globals.net_phone, packet_get_id(packet));
+		return NULL;
+	}
+	rc = tcp_prepare_timeout(tcp_timeout, socket, socket_data,
+	    sequence_number, socket_data->state, socket_data->timeout, true);
+	if (rc != EOK) {
 		pq_release_remote(tcp_globals.net_phone, packet_get_id(packet));
 		return NULL;
@@ -2033,5 +2071,5 @@
 	if (!fibril) {
 		free(operation_timeout);
-		return EPARTY;
+		return EPARTY;	/* FIXME: use another EC */
 	}
 //      fibril_mutex_lock(&socket_data->operation.mutex);
@@ -2044,8 +2082,6 @@
 int
 tcp_recvfrom_message(socket_cores_ref local_sockets, int socket_id, int flags,
-    size_t * addrlen)
-{
-	ERROR_DECLARE;
-
+    size_t *addrlen)
+{
 	socket_core_ref socket;
 	tcp_socket_data_ref socket_data;
@@ -2053,4 +2089,5 @@
 	packet_t packet;
 	size_t length;
+	int rc;
 
 	assert(local_sockets);
@@ -2074,6 +2111,7 @@
 	// send the source address if desired
 	if (addrlen) {
-		ERROR_PROPAGATE(data_reply(socket_data->addr,
-		    socket_data->addrlen));
+		rc = data_reply(socket_data->addr, socket_data->addrlen);
+		if (rc != EOK)
+			return rc;
 		*addrlen = socket_data->addrlen;
 	}
@@ -2084,9 +2122,12 @@
 		return NO_DATA;
 
-	ERROR_PROPAGATE(packet_translate_remote(tcp_globals.net_phone, &packet,
-	    packet_id));
+	rc = packet_translate_remote(tcp_globals.net_phone, &packet, packet_id);
+	if (rc != EOK)
+		return rc;
 
 	// reply the packets
-	ERROR_PROPAGATE(socket_reply_packets(packet, &length));
+	rc = socket_reply_packets(packet, &length);
+	if (rc != EOK)
+		return rc;
 
 	// release the packet
@@ -2099,8 +2140,6 @@
 int
 tcp_send_message(socket_cores_ref local_sockets, int socket_id, int fragments,
-    size_t * data_fragment_size, int flags)
-{
-	ERROR_DECLARE;
-
+    size_t *data_fragment_size, int flags)
+{
 	socket_core_ref socket;
 	tcp_socket_data_ref socket_data;
@@ -2111,4 +2150,5 @@
 	int index;
 	int result;
+	int rc;
 
 	assert(local_sockets);
@@ -2131,6 +2171,8 @@
 		return ENOTCONN;
 
-	ERROR_PROPAGATE(tl_get_ip_packet_dimension(tcp_globals.ip_phone,
-	   &tcp_globals.dimensions, socket_data->device_id, &packet_dimension));
+	rc = tl_get_ip_packet_dimension(tcp_globals.ip_phone,
+	    &tcp_globals.dimensions, socket_data->device_id, &packet_dimension);
+	if (rc != EOK)
+		return rc;
 
 	*data_fragment_size =
@@ -2138,5 +2180,5 @@
 	    packet_dimension->content : socket_data->data_fragment_size);
 
-	for (index = 0; index < fragments; ++index) {
+	for (index = 0; index < fragments; index++) {
 		// read the data fragment
 		result = tl_socket_read_packet_data(tcp_globals.net_phone,
@@ -2153,6 +2195,7 @@
 
 		tcp_prepare_operation_header(socket, socket_data, header, 0, 0);
-		ERROR_PROPAGATE(tcp_queue_packet(socket, socket_data, packet,
-		    0));
+		rc = tcp_queue_packet(socket, socket_data, packet, 0);
+		if (rc != EOK)
+			return rc;
 	}
 
@@ -2173,9 +2216,8 @@
 tcp_close_message(socket_cores_ref local_sockets, int socket_id)
 {
-	ERROR_DECLARE;
-
 	socket_core_ref socket;
 	tcp_socket_data_ref socket_data;
 	packet_t packet;
+	int rc;
 
 	// find the socket
@@ -2202,11 +2244,12 @@
 	default:
 		// just destroy
-		if (ERROR_NONE(socket_destroy(tcp_globals.net_phone, socket_id,
+		rc = socket_destroy(tcp_globals.net_phone, socket_id,
 		    local_sockets, &tcp_globals.sockets,
-		    tcp_free_socket_data))) {
+		    tcp_free_socket_data);
+		if (rc == EOK) {
 			fibril_rwlock_write_unlock(socket_data->local_lock);
 			fibril_rwlock_write_unlock(&tcp_globals.lock);
 		}
-		return ERROR_CODE;
+		return rc;
 	}
 
@@ -2215,9 +2258,12 @@
 
 	// create the notification packet
-	ERROR_PROPAGATE(tcp_create_notification_packet(&packet, socket,
-	    socket_data, 0, 1));
+	rc = tcp_create_notification_packet(&packet, socket, socket_data, 0, 1);
+	if (rc != EOK)
+		return rc;
 
 	// send the packet
-	ERROR_PROPAGATE(tcp_queue_packet(socket, socket_data, packet, 1));
+	rc = tcp_queue_packet(socket, socket_data, packet, 1);
+	if (rc != EOK)
+		return rc;
 
 	// flush packets
@@ -2235,18 +2281,18 @@
 
 int
-tcp_create_notification_packet(packet_t * packet, socket_core_ref socket,
+tcp_create_notification_packet(packet_t *packet, socket_core_ref socket,
     tcp_socket_data_ref socket_data, int synchronize, int finalize)
 {
-	ERROR_DECLARE;
-
 	packet_dimension_ref packet_dimension;
 	tcp_header_ref header;
+	int rc;
 
 	assert(packet);
 
 	// get the device packet dimension
-	ERROR_PROPAGATE(tl_get_ip_packet_dimension(tcp_globals.ip_phone,
-	    &tcp_globals.dimensions, socket_data->device_id,
-	    &packet_dimension));
+	rc = tl_get_ip_packet_dimension(tcp_globals.ip_phone,
+	    &tcp_globals.dimensions, socket_data->device_id, &packet_dimension);
+	if (rc != EOK)
+		return rc;
 
 	// get a new packet
@@ -2271,12 +2317,11 @@
 int
 tcp_accept_message(socket_cores_ref local_sockets, int socket_id,
-    int new_socket_id, size_t * data_fragment_size, size_t * addrlen)
-{
-	ERROR_DECLARE;
-
+    int new_socket_id, size_t *data_fragment_size, size_t *addrlen)
+{
 	socket_core_ref accepted;
 	socket_core_ref socket;
 	tcp_socket_data_ref socket_data;
 	packet_dimension_ref packet_dimension;
+	int rc;
 
 	assert(local_sockets);
@@ -2312,9 +2357,13 @@
 		// TODO can it be in another state?
 		if (socket_data->state == TCP_SOCKET_ESTABLISHED) {
-			ERROR_PROPAGATE(data_reply(socket_data->addr,
-			    socket_data->addrlen));
-			ERROR_PROPAGATE(tl_get_ip_packet_dimension(
-			    tcp_globals.ip_phone, &tcp_globals.dimensions,
-			    socket_data->device_id, &packet_dimension));
+			rc = data_reply(socket_data->addr,
+			    socket_data->addrlen);
+			if (rc != EOK)
+				return rc;
+			rc = tl_get_ip_packet_dimension(tcp_globals.ip_phone,
+			    &tcp_globals.dimensions, socket_data->device_id,
+			    &packet_dimension);
+			if (rc != EOK)
+				return rc;
 			*addrlen = socket_data->addrlen;
 
@@ -2326,7 +2375,8 @@
 	
 			if (new_socket_id > 0) {
-				ERROR_PROPAGATE(socket_cores_update(
-				    local_sockets, accepted->socket_id,
-				    new_socket_id));
+				rc = socket_cores_update(local_sockets,
+				    accepted->socket_id, new_socket_id);
+				if (rc != EOK)
+					return rc;
 				accepted->socket_id = new_socket_id;
 			}
@@ -2373,4 +2423,10 @@
 }
 
+/** Releases the packet and returns the result.
+ *
+ * @param[in] packet	The packet queue to be released.
+ * @param[in] result	The result to be returned.
+ * @return		The result parameter.
+ */
 int tcp_release_and_return(packet_t packet, int result)
 {
@@ -2381,6 +2437,6 @@
 /** Default thread for new connections.
  *
- *  @param[in] iid The initial message identifier.
- *  @param[in] icall The initial message call structure.
+ * @param[in] iid	The initial message identifier.
+ * @param[in] icall	The initial message call structure.
  *
  */
@@ -2397,23 +2453,18 @@
 		int answer_count;
 
-		/*
-		   Clear the answer structure 
-		 */
+		/* Clear the answer structure */
 		refresh_answer(&answer, &answer_count);
 
-		/*
-		   Fetch the next message 
-		 */
+		/* Fetch the next message */
 		ipc_call_t call;
 		ipc_callid_t callid = async_get_call(&call);
 
-		/*
-		   Process the message 
-		 */
+		/* Process the message */
 		int res = tl_module_message_standalone(callid, &call, &answer,
 		    &answer_count);
 
 		/*
-		   End if said to either by the message or the processing result 
+		 * End if told to either by the message or the processing
+		 * result.
 		 */
 		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
@@ -2430,23 +2481,15 @@
 /** Starts the module.
  *
- *  @param argc The count of the command line arguments. Ignored parameter.
- *  @param argv The command line parameters. Ignored parameter.
- *
- *  @returns EOK on success.
- *  @returns Other error codes as defined for each specific module start function.
- *
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for each specific module
+ *			start function.
  */
 int
 main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
-
-	/*
-	   Start the module 
-	 */
-	if (ERROR_OCCURRED(tl_module_start_standalone(tl_client_connection)))
-		return ERROR_CODE;
-
-	return EOK;
+	int rc;
+
+	rc = tl_module_start_standalone(tl_client_connection);
+	return rc;
 }
 
Index: uspace/srv/net/tl/tcp/tcp.h
===================================================================
--- uspace/srv/net/tl/tcp/tcp.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/tcp/tcp.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,13 +28,13 @@
 
 /** @addtogroup tcp
- *  @{
+ * @{
  */
 
 /** @file
- *  TCP module.
- */
-
-#ifndef __NET_TCP_H__
-#define __NET_TCP_H__
+ * TCP module.
+ */
+
+#ifndef NET_TCP_H_
+#define NET_TCP_H_
 
 #include <fibril_synch.h>
@@ -46,246 +46,271 @@
 
 /** Type definition of the TCP global data.
- *  @see tcp_globals
- */
-typedef struct tcp_globals	tcp_globals_t;
+ * @see tcp_globals
+ */
+typedef struct tcp_globals tcp_globals_t;
 
 /** Type definition of the TCP socket specific data.
- *  @see tcp_socket_data
- */
-typedef struct tcp_socket_data	tcp_socket_data_t;
+ * @see tcp_socket_data
+ */
+typedef struct tcp_socket_data tcp_socket_data_t;
 
 /** Type definition of the TCP socket specific data pointer.
- *  @see tcp_socket_data
- */
-typedef tcp_socket_data_t *	tcp_socket_data_ref;
+ * @see tcp_socket_data
+ */
+typedef tcp_socket_data_t *tcp_socket_data_ref;
 
 /** Type definition of the TCP operation data.
- *  @see tcp_operation
- */
-typedef struct tcp_operation	tcp_operation_t;
+ * @see tcp_operation
+ */
+typedef struct tcp_operation tcp_operation_t;
 
 /** Type definition of the TCP operation data pointer.
- *  @see tcp_operation
- */
-typedef tcp_operation_t *	tcp_operation_ref;
+ * @see tcp_operation
+ */
+typedef tcp_operation_t *tcp_operation_ref;
 
 /** TCP socket state type definition.
- *  @see tcp_socket_state
- */
-typedef enum tcp_socket_state	tcp_socket_state_t;
-
-/** TCP socket state.
- */
-enum tcp_socket_state{
+ * @see tcp_socket_state
+ */
+typedef enum tcp_socket_state tcp_socket_state_t;
+
+/** TCP socket state. */
+enum tcp_socket_state {
 	/** Initial.
-	 *  Not connected or bound.
+	 *
+	 * Not connected or bound.
 	 */
 	TCP_SOCKET_INITIAL,
+	
 	/** Listening.
-	 *  Awaiting a connection request from another TCP layer.
-	 *  When SYN is received a new bound socket in the TCP_SOCKET_SYN_RECEIVED state should be created.
+	 *
+	 * Awaiting a connection request from another TCP layer.
+	 * When SYN is received a new bound socket in the
+	 * TCP_SOCKET_SYN_RECEIVED state should be created.
 	 */
 	TCP_SOCKET_LISTEN,
+	
 	/** Connecting issued.
-	 *  A~SYN has been sent, and TCP is awaiting the response SYN.
-	 *  Should continue to the TCP_SOCKET_ESTABLISHED state.
+	 *
+	 * A SYN has been sent, and TCP is awaiting the response SYN.
+	 * Should continue to the TCP_SOCKET_ESTABLISHED state.
 	 */
 	TCP_SOCKET_SYN_SENT,
+	
 	/** Connecting received.
-	 *  A~SYN has been received, a~SYN has been sent, and TCP is awaiting an ACK.
-	 *  Should continue to the TCP_SOCKET_ESTABLISHED state.
+	 *
+	 * A SYN has been received, a SYN has been sent, and TCP is awaiting an
+	 * ACK. Should continue to the TCP_SOCKET_ESTABLISHED state.
 	 */
 	TCP_SOCKET_SYN_RECEIVED,
+	
 	/** Connected.
-	 *  The three-way handshake has been completed.
+	 *
+	 * The three-way handshake has been completed.
 	 */
 	TCP_SOCKET_ESTABLISHED,
+	
 	/** Closing started.
-	 *  The local application has issued a~CLOSE.
-	 *  TCP has sent a~FIN, and is awaiting an ACK or a~FIN.
-	 *  Should continue to the TCP_SOCKET_FIN_WAIT_2 state when an ACK is received.
-	 *  Should continue to the TCP_SOCKET_CLOSING state when a~FIN is received.
+	 *
+	 * The local application has issued a CLOSE.
+	 * TCP has sent a FIN, and is awaiting an ACK or a FIN.
+	 * Should continue to the TCP_SOCKET_FIN_WAIT_2 state when an ACK is
+	 * received.
+	 * Should continue to the TCP_SOCKET_CLOSING state when a FIN is
+	 * received.
 	 */
 	TCP_SOCKET_FIN_WAIT_1,
+	
 	/** Closing confirmed.
-	 *  A~FIN has been sent, and an ACK received.
-	 *  TCP is awaiting a~FIN from the remote TCP layer.
-	 *  Should continue to the TCP_SOCKET_CLOSING state.
+	 *
+	 * A FIN has been sent, and an ACK received.
+	 * TCP is awaiting a~FIN from the remote TCP layer.
+	 * Should continue to the TCP_SOCKET_CLOSING state.
 	 */
 	TCP_SOCKET_FIN_WAIT_2,
+	
 	/** Closing.
-	 *  A FIN has been sent, a FIN has been received, and an ACK has been sent.
-	 *  TCP is awaiting an ACK for the FIN that was sent.
-	 *  Should continue to the TCP_SOCKET_TIME_WAIT state.
+	 *
+	 * A FIN has been sent, a FIN has been received, and an ACK has been
+	 * sent.
+	 * TCP is awaiting an ACK for the FIN that was sent.
+	 * Should continue to the TCP_SOCKET_TIME_WAIT state.
 	 */
 	TCP_SOCKET_CLOSING,
+	
 	/** Closing received.
-	 *  TCP has received a~FIN, and has sent an ACK.
-	 *  It is awaiting a~close request from the local application before sending a~FIN.
-	 *  Should continue to the TCP_SOCKET_SOCKET_LAST_ACK state.
+	 *
+	 * TCP has received a FIN, and has sent an ACK.
+	 * It is awaiting a close request from the local application before
+	 * sending a FIN.
+	 * Should continue to the TCP_SOCKET_SOCKET_LAST_ACK state.
 	 */
 	TCP_SOCKET_CLOSE_WAIT,
-	/** 
-	 *  A~FIN has been received, and an ACK and a~FIN have been sent.
-	 *  TCP is awaiting an ACK.
-	 *  Should continue to the TCP_SOCKET_TIME_WAIT state.
+	
+	/**
+	 * A FIN has been received, and an ACK and a FIN have been sent.
+	 * TCP is awaiting an ACK.
+	 * Should continue to the TCP_SOCKET_TIME_WAIT state.
 	 */
 	TCP_SOCKET_LAST_ACK,
+	
 	/** Closing finished.
-	 *  FINs have been received and ACK’d, and TCP is waiting two MSLs to remove the connection from the table.
+	 *
+	 * FINs have been received and ACK’d, and TCP is waiting two MSLs to
+	 * remove the connection from the table.
 	 */
 	TCP_SOCKET_TIME_WAIT,
+	
 	/** Closed.
-	 *  Imaginary, this indicates that a~connection has been removed from the connection table.
+	 *
+	 * Imaginary, this indicates that a connection has been removed from
+	 * the connection table.
 	 */
 	TCP_SOCKET_CLOSED
 };
 
-/** TCP operation data.
- */
-struct tcp_operation{
-	/** Operation result.
-	 */
+/** TCP operation data. */
+struct tcp_operation {
+	/** Operation result. */
 	int result;
-	/** Safety lock.
-	 */
+	/** Safety lock. */
 	fibril_mutex_t mutex;
-	/** Operation result signaling.
-	 */
+	/** Operation result signaling. */
 	fibril_condvar_t condvar;
 };
 
-/** TCP socket specific data.
- */
-struct tcp_socket_data{
-	/** TCP socket state.
-	 */
+/** TCP socket specific data. */
+struct tcp_socket_data {
+	/** TCP socket state. */
 	tcp_socket_state_t state;
-	/** Data fragment size.
-	 *  Sending optimalization.
+	
+	/**
+	 * Data fragment size.
+	 * Sending optimalization.
 	 */
 	size_t data_fragment_size;
-	/** Device identifier.
-	 */
+	
+	/** Device identifier. */
 	device_id_t device_id;
-	/** Listening backlog.
-	 *  The maximal number of connected but not yet accepted sockets.
+	
+	/**
+	 * Listening backlog.
+	 * The maximal number of connected but not yet accepted sockets.
 	 */
 	int backlog;
-//	/** Segment size.
-//	 */
-//	size_t			segment_size;
-	/** Parent listening socket identifier.
-	 *  Set if this socket is an accepted one.
+	
+//	/** Segment size. */
+//	size_t segment_size;
+
+	/**
+	 * Parent listening socket identifier.
+	 * Set if this socket is an accepted one.
 	 */
 	int listening_socket_id;
-	/** Treshold size in bytes.
-	 */
+	
+	/** Treshold size in bytes. */
 	size_t treshold;
-	/** Window size in bytes.
-	 */
+	/** Window size in bytes. */
 	size_t window;
-	/** Acknowledgement timeout.
-	 */
+	/** Acknowledgement timeout. */
 	suseconds_t timeout;
-	/** Last acknowledged byte.
-	 */
+	/** Last acknowledged byte. */
 	uint32_t acknowledged;
-	/** Next incoming sequence number.
-	 */
+	/** Next incoming sequence number. */
 	uint32_t next_incoming;
-	/** Incoming FIN.
-	 */
+	/** Incoming FIN. */
 	uint32_t fin_incoming;
-	/** Next outgoing sequence number.
-	 */
+	/** Next outgoing sequence number. */
 	uint32_t next_outgoing;
-	/** Last outgoing sequence number.
-	 */
+	/** Last outgoing sequence number. */
 	uint32_t last_outgoing;
-	/** Outgoing FIN.
-	 */
+	/** Outgoing FIN. */
 	uint32_t fin_outgoing;
-	/** Expected sequence number by the remote host.
-	 *  The sequence number the other host expects.
-	 *  The notification is sent only upon a packet reecival.
+	
+	/**
+	 * Expected sequence number by the remote host.
+	 * The sequence number the other host expects.
+	 * The notification is sent only upon a packet reecival.
 	 */
 	uint32_t expected;
-	/** Expected sequence number counter.
-	 *  Counts the number of received notifications for the same sequence number.
+	
+	/**
+	 * Expected sequence number counter.
+	 * Counts the number of received notifications for the same sequence
+	 * number.
 	 */
 	int expected_count;
+	
 	/** Incoming packet queue.
-	 *  Packets are buffered until received in the right order.
-	 *  The packets are excluded after successfully read.
-	 *  Packets are sorted by their starting byte.
-	 *  Packets metric is set as their data length.
+	 *
+	 * Packets are buffered until received in the right order.
+	 * The packets are excluded after successfully read.
+	 * Packets are sorted by their starting byte.
+	 * Packets metric is set as their data length.
 	 */
 	packet_t incoming;
+	
 	/** Outgoing packet queue.
-	 *  Packets are buffered until acknowledged by the remote host in the right order.
-	 *  The packets are excluded after acknowledged.
-	 *  Packets are sorted by their starting byte.
-	 *  Packets metric is set as their data length.
+	 *
+	 * Packets are buffered until acknowledged by the remote host in the
+	 * right order.
+	 * The packets are excluded after acknowledged.
+	 * Packets are sorted by their starting byte.
+	 * Packets metric is set as their data length.
 	 */
 	packet_t outgoing;
-	/** IP pseudo header.
-	 */
+	
+	/** IP pseudo header. */
 	void *pseudo_header;
-	/** IP pseudo header length.
-	 */
+	/** IP pseudo header length. */
 	size_t headerlen;
-	/** Remote host address.
-	 */
-	struct sockaddr * addr;
-	/** Remote host address length.
-	 */
+	/** Remote host address. */
+	struct sockaddr *addr;
+	/** Remote host address length. */
 	socklen_t addrlen;
-	/** Remote host port.
-	 */
+	/** Remote host port. */
 	uint16_t dest_port;
-	/** Parent local sockets.
-	 */
+	/** Parent local sockets. */
 	socket_cores_ref local_sockets;
+	
 	/** Local sockets safety lock.
-	 *  May be locked for writing while holding the global lock for reading when changing the local sockets only.
-	 *  The global lock may to be locked only before locking the local lock.
-	 *  The global lock may be locked more weakly than the local lock.
-	 *  The global lock may be released before releasing the local lock.
-	 *  @see tcp_globals:lock
-	 */
-	fibril_rwlock_t * local_lock;
-	/** Pending operation data.
-	 */
+	 *
+	 * May be locked for writing while holding the global lock for reading
+	 * when changing the local sockets only.
+	 * The global lock may be locked only before locking the local lock.
+	 * The global lock may be locked more weakly than the local lock.
+	 * The global lock may be released before releasing the local lock.
+	 * @see tcp_globals:lock
+	 */
+	fibril_rwlock_t *local_lock;
+	
+	/** Pending operation data. */
 	tcp_operation_t operation;
-	/** Timeouts in a row counter.
-	 *  If TCP_MAX_TIMEOUTS is reached, the connection is lost.
+	
+	/**
+	 * Timeouts in a row counter.
+	 * If TCP_MAX_TIMEOUTS is reached, the connection is lost.
 	 */
 	int timeout_count;
 };
 
-/** TCP global data.
- */
-struct	tcp_globals{
-	/** Networking module phone.
-	 */
+/** TCP global data. */
+struct tcp_globals {
+	/** Networking module phone. */
 	int net_phone;
-	/** IP module phone.
-	 */
+	/** IP module phone. */
 	int ip_phone;
-	/** ICMP module phone.
-	 */
+	/** ICMP module phone. */
 	int icmp_phone;
-	/** Last used free port.
-	 */
+	/** Last used free port. */
 	int last_used_port;
-	/** Active sockets.
-	 */
+	/** Active sockets. */
 	socket_ports_t sockets;
-	/** Device packet dimensions.
-	 */
+	/** Device packet dimensions. */
 	packet_dimensions_t dimensions;
-	/** Safety lock.
-	 *  Write lock is used only for adding or removing socket ports.
+	
+	/**
+	 * Safety lock.
+	 * Write lock is used only for adding or removing socket ports.
 	 */
 	fibril_rwlock_t lock;
@@ -296,3 +321,2 @@
 /** @}
  */
-
Index: uspace/srv/net/tl/tcp/tcp_header.h
===================================================================
--- uspace/srv/net/tl/tcp/tcp_header.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/tcp/tcp_header.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,194 +28,113 @@
 
 /** @addtogroup tcp
- *  @{
+ * @{
  */
 
 /** @file
- *  TCP header definition.
- *  Based on the RFC~793.
+ * TCP header definition.
+ * Based on the RFC 793.
  */
 
-#ifndef __NET_TCP_HEADER_H__
-#define __NET_TCP_HEADER_H__
+#ifndef NET_TCP_HEADER_H_
+#define NET_TCP_HEADER_H_
 
 #include <sys/types.h>
 
-/** TCP header size in bytes.
- */
-#define TCP_HEADER_SIZE			sizeof(tcp_header_t)
+/** TCP header size in bytes. */
+#define TCP_HEADER_SIZE				sizeof(tcp_header_t)
 
 /** Returns the actual TCP header length in bytes.
- *  @param[in] header The TCP packet header.
+ * @param[in] header The TCP packet header.
  */
-#define TCP_HEADER_LENGTH(header)		((header)->header_length * 4u)
+#define TCP_HEADER_LENGTH(header)		((header)->header_length * 4U)
 
 /** Returns the TCP header length.
- *  @param[in] length The TCP header length in bytes.
+ * @param[in] length The TCP header length in bytes.
  */
-#define TCP_COMPUTE_HEADER_LENGTH(length)		((uint8_t) ((length) / 4u))
+#define TCP_COMPUTE_HEADER_LENGTH(length)	((uint8_t) ((length) / 4U))
 
 /** Type definition of the transmission datagram header.
- *  @see tcp_header
+ * @see tcp_header
  */
-typedef struct tcp_header	tcp_header_t;
+typedef struct tcp_header tcp_header_t;
 
 /** Type definition of the transmission datagram header pointer.
- *  @see tcp_header
+ * @see tcp_header
  */
-typedef tcp_header_t *		tcp_header_ref;
+typedef tcp_header_t *tcp_header_ref;
 
 /** Type definition of the transmission datagram header option.
- *  @see tcp_option
+ * @see tcp_option
  */
-typedef struct tcp_option	tcp_option_t;
+typedef struct tcp_option tcp_option_t;
 
 /** Type definition of the transmission datagram header option pointer.
- *  @see tcp_option
+ * @see tcp_option
  */
-typedef tcp_option_t *		tcp_option_ref;
+typedef tcp_option_t *tcp_option_ref;
 
-/** Type definition of the Maximum segment size TCP option.
- *  @see ...
- */
-typedef struct tcp_max_segment_size_option	tcp_max_segment_size_option_t;
+/** Type definition of the Maximum segment size TCP option. */
+typedef struct tcp_max_segment_size_option tcp_max_segment_size_option_t;
 
 /** Type definition of the Maximum segment size TCP option pointer.
- *  @see tcp_max_segment_size_option
+ * @see tcp_max_segment_size_option
  */
-typedef tcp_max_segment_size_option_t *		tcp_max_segment_size_option_ref;
+typedef tcp_max_segment_size_option_t *tcp_max_segment_size_option_ref;
 
-/** Transmission datagram header.
- */
-struct tcp_header{
-	/** The source port number.
-	 */
+/** Transmission datagram header. */
+struct tcp_header {
 	uint16_t source_port;
-	/** The destination port number.
-	 */
 	uint16_t destination_port;
-	/** The sequence number of the first data octet in this segment (except when SYN is present).
-	 *  If SYN is present the sequence number is the initial sequence number (ISN) and the first data octet is ISN+1.
-	 */
 	uint32_t sequence_number;
-	/** If the ACK control bit is set this field contains the value of the next sequence number the sender of the segment is expecting to receive.
-	 *  Once a~connection is established this is always sent.
-	 *  @see acknowledge
-	 */
 	uint32_t acknowledgement_number;
+	
 #ifdef ARCH_IS_BIG_ENDIAN
-	/** The number of 32~bit words in the TCP Header.
-	 *  This indicates where the data begins.
-	 *  The TCP header (even one including options) is an integral number of 32~bits long.
-	 */
 	uint8_t header_length:4;
-	/** Four bits reserved for future use.
-	 *  Must be zero.
-	 */
 	uint8_t reserved1:4;
 #else
-	/** Four bits reserved for future use.
-	 *  Must be zero.
-	 */
 	uint8_t reserved1:4;
-	/** The number of 32~bit words in the TCP Header.
-	 *  This indicates where the data begins.
-	 *  The TCP header (even one including options) is an integral number of 32~bits long.
-	 */
 	uint8_t header_length:4;
 #endif
+
 #ifdef ARCH_IS_BIG_ENDIAN
-	/** Two bits reserved for future use.
-	 *  Must be zero.
-	 */
 	uint8_t reserved2:2;
-	/** Urgent Pointer field significant.
-	 *  @see tcp_header:urgent_pointer
-	 */
 	uint8_t urgent:1;
-	/** Acknowledgment field significant
-	 *  @see tcp_header:acknowledgement_number
-	 */
 	uint8_t acknowledge:1;
-	/** Push function.
-	 */
 	uint8_t push:1;
-	/** Reset the connection.
-	 */
 	uint8_t reset:1;
-	/** Synchronize the sequence numbers.
-	 */
 	uint8_t synchronize:1;
-	/** No more data from the sender.
-	 */
 	uint8_t finalize:1;
 #else
-	/** No more data from the sender.
-	 */
 	uint8_t finalize:1;
-	/** Synchronize the sequence numbers.
-	 */
 	uint8_t synchronize:1;
-	/** Reset the connection.
-	 */
 	uint8_t reset:1;
-	/** Push function.
-	 */
 	uint8_t push:1;
-	/** Acknowledgment field significant.
-	 *  @see tcp_header:acknowledgement_number
-	 */
 	uint8_t acknowledge:1;
-	/** Urgent Pointer field significant.
-	 *  @see tcp_header:urgent_pointer
-	 */
 	uint8_t urgent:1;
-	/** Two bits reserved for future use.
-	 *  Must be zero.
-	 */
 	uint8_t reserved2:2;
 #endif
-	/** The number of data octets beginning with the one indicated in the acknowledgment field which the sender of this segment is willing to accept.
-	 *  @see tcp_header:acknowledge
-	 */
+
 	uint16_t window;
-	/** The checksum field is the 16~bit one's complement of the one's complement sum of all 16~bit words in the header and text.
-	 *  If a~segment contains an odd number of header and text octets to be checksummed, the last octet is padded on the right with zeros to form a~16~bit word for checksum purposes.
-	 *  The pad is not transmitted as part of the segment.
-	 *  While computing the checksum, the checksum field itself is replaced with zeros.
-	 *  The checksum also coves a~pseudo header conceptually.
-	 *  The pseudo header conceptually prefixed to the TCP header contains the source address, the destination address, the protocol, and the TCP length.
-	 *  This information gives protection against misrouted datagrams.
-	 *  If the computed checksum is zero, it is transmitted as all ones (the equivalent in one's complement arithmetic).
-	 */
 	uint16_t checksum;
-	/** This field communicates the current value of the urgent pointer as a~positive offset from the sequence number in this segment.
-	 *  The urgent pointer points to the sequence number of the octet following the urgent data.
-	 *  This field is only be interpreted in segments with the URG control bit set.
-	 *  @see tcp_header:urgent
-	 */
 	uint16_t urgent_pointer;
 } __attribute__ ((packed));
 
-/** Transmission datagram header option.
- */
-struct tcp_option{
-	/** Option type.
-	 */
+/** Transmission datagram header option. */
+struct tcp_option {
+	/** Option type. */
 	uint8_t type;
-	/** Option length.
-	 */
+	/** Option length. */
 	uint8_t length;
 };
 
-/** Maximum segment size TCP option.
- */
-struct tcp_max_segment_size_option{
+/** Maximum segment size TCP option. */
+struct tcp_max_segment_size_option {
 	/** TCP option.
-	 *  @see TCPOPT_MAX_SEGMENT_SIZE
-	 *  @see TCPOPT_MAX_SEGMENT_SIZE_LENGTH
+	 * @see TCPOPT_MAX_SEGMENT_SIZE
+	 * @see TCPOPT_MAX_SEGMENT_SIZE_LENGTH
 	 */
 	tcp_option_t option;
-	/** Maximum segment size in bytes.
-	 */
+	
+	/** Maximum segment size in bytes. */
 	uint16_t max_segment_size;
 } __attribute__ ((packed));
Index: uspace/srv/net/tl/tcp/tcp_module.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp_module.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/tcp/tcp_module.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,17 +28,21 @@
 
 /** @addtogroup tcp
- *  @{
+ * @{
  */
 
 /** @file
- *  TCP standalone module implementation.
- *  Contains skeleton module functions mapping.
- *  The functions are used by the module skeleton as module specific entry points.
- *  @see module.c
+ * TCP standalone module implementation.
+ * Contains skeleton module functions mapping.
+ * The functions are used by the module skeleton as module specific entry
+ * points.
+ * @see module.c
  */
+
+#include "tcp.h"
+#include "tcp_module.h"
 
 #include <async.h>
 #include <stdio.h>
-#include <err.h>
+#include <errno.h>
 #include <ipc/ipc.h>
 #include <ipc/services.h>
@@ -46,54 +50,44 @@
 #include <net/ip_protocols.h>
 #include <net/modules.h>
-
 #include <net/packet.h>
 #include <net_interface.h>
+
 #include <ip_interface.h>
 #include <tl_local.h>
 
-#include "tcp.h"
-#include "tcp_module.h"
+/** TCP module global data. */
+extern tcp_globals_t tcp_globals;
 
-/** TCP module global data.
- */
-extern tcp_globals_t	tcp_globals;
-
-/** Starts the TCP module.
- *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on successful module termination.
- *  @returns Other error codes as defined for the tcp_initialize() function.
- *  @returns Other error codes as defined for the REGISTER_ME() macro function.
- */
 int tl_module_start_standalone(async_client_conn_t client_connection)
 {
-	ERROR_DECLARE;
-	
+	ipcarg_t phonehash;
+	int rc;
+
 	async_set_client_connection(client_connection);
 	tcp_globals.net_phone = net_connect_module();
-	ERROR_PROPAGATE(pm_init());
-	
-	ipcarg_t phonehash;
-	if (ERROR_OCCURRED(tcp_initialize(client_connection))
-	    || ERROR_OCCURRED(REGISTER_ME(SERVICE_TCP, &phonehash))) {
-		pm_destroy();
-		return ERROR_CODE;
-	}
+
+	rc = pm_init();
+	if (rc != EOK)
+		return rc;
+
+	rc = tcp_initialize(client_connection);
+	if (rc != EOK)
+		goto out;
+
+	rc = REGISTER_ME(SERVICE_TCP, &phonehash);
+	if (rc != EOK)
+		goto out;
 	
 	async_manager();
 	
+out:
 	pm_destroy();
-	return EOK;
+	return rc;
 }
 
-/** Processes the TCP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the tcp_message() function.
- */
-int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+int
+tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	return tcp_message_standalone(callid, call, answer, answer_count);
 }
Index: uspace/srv/net/tl/tcp/tcp_module.h
===================================================================
--- uspace/srv/net/tl/tcp/tcp_module.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/tcp/tcp_module.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,36 +28,21 @@
 
 /** @addtogroup tcp
- *  @{
+ * @{
  */
 
 /** @file
- *  TCP module functions.
- *  The functions are used as TCP module entry points.
+ * TCP module functions.
+ * The functions are used as TCP module entry points.
  */
 
-#ifndef __NET_TCP_MODULE_H__
-#define __NET_TCP_MODULE_H__
+#ifndef NET_TCP_MODULE_H_
+#define NET_TCP_MODULE_H_
 
 #include <async.h>
 #include <ipc/ipc.h>
 
-/** Initializes the TCP module.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on success.
- *  @returns ENOMEM if there is not enough memory left.
- */
-extern int tcp_initialize(async_client_conn_t client_connection);
-
-/** Processes the TCP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns ENOTSUP if the message is not known.
- *  @see tcp_interface.h
- *  @see IS_NET_TCP_MESSAGE()
- */
-extern int tcp_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
+extern int tcp_initialize(async_client_conn_t);
+extern int tcp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
+    int *);
 
 #endif
Index: uspace/srv/net/tl/udp/udp.c
===================================================================
--- uspace/srv/net/tl/udp/udp.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/udp/udp.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,11 +28,15 @@
 
 /** @addtogroup udp
- *  @{
+ * @{
  */
 
 /** @file
- *  UDP module implementation.
- *  @see udp.h
- */
+ * UDP module implementation.
+ * @see udp.h
+ */
+
+#include "udp.h"
+#include "udp_header.h"
+#include "udp_module.h"
 
 #include <async.h>
@@ -45,6 +49,6 @@
 #include <ipc/tl.h>
 #include <ipc/socket.h>
+#include <adt/dynamic_fifo.h>
 #include <errno.h>
-#include <err.h>
 
 #include <net/socket_codes.h>
@@ -55,5 +59,4 @@
 #include <net/modules.h>
 
-#include <adt/dynamic_fifo.h>
 #include <packet_client.h>
 #include <packet_remote.h>
@@ -69,8 +72,4 @@
 #include <tl_interface.h>
 
-#include "udp.h"
-#include "udp_header.h"
-#include "udp_module.h"
-
 /** UDP module name. */
 #define NAME	"UDP protocol"
@@ -91,141 +90,23 @@
 #define UDP_FREE_PORTS_END		65535
 
-/** Processes the received UDP packet queue.
- *
- *  Is used as an entry point from the underlying IP module.
- *  Locks the global lock and calls udp_process_packet() function.
- *
- *  @param[in] device_id The receiving device identifier.
- *  @param[in,out] packet The received packet queue.
- *  @param receiver	The target service. Ignored parameter.
- *  @param[in] error	The packet error reporting service. Prefixes the
- *			received packet.
- *  @returns		EOK on success.
- *  @returns		Other error codes as defined for the
- *			udp_process_packet() function.
- */
-int
-udp_received_msg(device_id_t device_id, packet_t packet, services_t receiver,
-    services_t error);
-
-/** Processes the received UDP packet queue.
- *
- *  Notifies the destination socket application.
- *  Releases the packet on error or sends an ICMP error notification.
- *
- *  @param[in] device_id The receiving device identifier.
- *  @param[in,out] packet The received packet queue.
- *  @param[in] error	The packet error reporting service. Prefixes the
- *			received packet.
- *  @returns		EOK on success.
- *  @returns		EINVAL if the packet is not valid.
- *  @returns		EINVAL if the stored packet address is not the
- *			an_addr_t.
- *  @returns		EINVAL if the packet does not contain any data.
- *  @returns 		NO_DATA if the packet content is shorter than the user
- *			datagram header.
- *  @returns		ENOMEM if there is not enough memory left.
- *  @returns		EADDRNOTAVAIL if the destination socket does not exist.
- *  @returns		Other error codes as defined for the
- *			ip_client_process_packet() function.
- */
-int
-udp_process_packet(device_id_t device_id, packet_t packet, services_t error);
-
-/** Releases the packet and returns the result.
- *
- *  @param[in] packet	The packet queue to be released.
- *  @param[in] result	The result to be returned.
- *  @return		The result parameter.
- */
-int udp_release_and_return(packet_t packet, int result);
-
-/** @name Socket messages processing functions
- */
-/*@{*/
-
-/** Processes the socket client messages.
- *
- *  Runs until the client module disconnects.
- *
- *  @param[in] callid 	The message identifier.
- *  @param[in] call	The message parameters.
- *  @returns		EOK on success.
- *  @see		socket.h
- */
-int udp_process_client_messages(ipc_callid_t callid, ipc_call_t call);
-
-/** Sends data from the socket to the remote address.
- *
- *  Binds the socket to a free port if not already connected/bound.
- *  Handles the NET_SOCKET_SENDTO message.
- *  Supports AF_INET and AF_INET6 address families.
- *
- *  @param[in,out] local_sockets The application local sockets.
- *  @param[in] socket_id Socket identifier.
- *  @param[in] addr	The destination address.
- *  @param[in] addrlen	The address length.
- *  @param[in] fragments The number of data fragments.
- *  @param[out] data_fragment_size The data fragment size in bytes.
- *  @param[in] flags	Various send flags.
- *  @returns		EOK on success.
- *  @returns		EAFNOTSUPPORT if the address family is not supported.
- *  @returns		ENOTSOCK if the socket is not found.
- *  @returns		EINVAL if the address is invalid.
- *  @returns		ENOTCONN if the sending socket is not and cannot be
- *			bound.
- *  @returns		ENOMEM if there is not enough memory left.
- *  @returns		Other error codes as defined for the
- *			socket_read_packet_data() function.
- *  @returns		Other error codes as defined for the
- *			ip_client_prepare_packet() function.
- *  @returns		Other error codes as defined for the ip_send_msg()
- *			function.
- */
-int
-udp_sendto_message(socket_cores_ref local_sockets, int socket_id,
-    const struct sockaddr * addr, socklen_t addrlen, int fragments,
-    size_t * data_fragment_size, int flags);
-
-/** Receives data to the socket.
- *
- *  Handles the NET_SOCKET_RECVFROM message.
- *  Replies the source address as well.
- *
- *  @param[in] local_sockets The application local sockets.
- *  @param[in] socket_id Socket identifier.
- *  @param[in] flags	Various receive flags.
- *  @param[out] addrlen	The source address length.
- *  @returns		The number of bytes received.
- *  @returns		ENOTSOCK if the socket is not found.
- *  @returns		NO_DATA if there are no received packets or data.
- *  @returns		ENOMEM if there is not enough memory left.
- *  @returns		EINVAL if the received address is not an IP address.
- *  @returns		Other error codes as defined for the packet_translate()
- *			function.
- *  @returns		Other error codes as defined for the data_reply()
- *			function.
- */
-int
-udp_recvfrom_message(socket_cores_ref local_sockets, int socket_id, int flags,
-    size_t * addrlen);
-
-/*@}*/
-
-/** UDP global data.
- */
+/** UDP global data.  */
 udp_globals_t udp_globals;
 
+/** Initializes the UDP module.
+ *
+ * @param[in] client_connection The client connection processing function. The
+ *			module skeleton propagates its own one.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
 int udp_initialize(async_client_conn_t client_connection)
 {
-	ERROR_DECLARE;
-
 	measured_string_t names[] = {
 		{
-			str_dup("UDP_CHECKSUM_COMPUTING"),
+			(char *) "UDP_CHECKSUM_COMPUTING",
 			22
 		},
 		{
-			str_dup("UDP_AUTOBINDING"),
+			(char *) "UDP_AUTOBINDING",
 			15
 		}
@@ -233,5 +114,6 @@
 	measured_string_ref configuration;
 	size_t count = sizeof(names) / sizeof(measured_string_t);
-	char * data;
+	char *data;
+	int rc;
 
 	fibril_rwlock_initialize(&udp_globals.lock);
@@ -240,28 +122,50 @@
 	udp_globals.icmp_phone = icmp_connect_module(SERVICE_ICMP,
 	    ICMP_CONNECT_TIMEOUT);
+	
 	udp_globals.ip_phone = ip_bind_service(SERVICE_IP, IPPROTO_UDP,
 	    SERVICE_UDP, client_connection);
-	if (udp_globals.ip_phone < 0)
+	if (udp_globals.ip_phone < 0) {
+		fibril_rwlock_write_unlock(&udp_globals.lock);
 		return udp_globals.ip_phone;
+	}
 
 	// read default packet dimensions
-	ERROR_PROPAGATE(ip_packet_size_req(udp_globals.ip_phone, -1,
-	    &udp_globals.packet_dimension));
-	ERROR_PROPAGATE(socket_ports_initialize(&udp_globals.sockets));
-	if (ERROR_OCCURRED(packet_dimensions_initialize(
-	    &udp_globals.dimensions))) {
+	rc = ip_packet_size_req(udp_globals.ip_phone, -1,
+	    &udp_globals.packet_dimension);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&udp_globals.lock);
+		return rc;
+	}
+	
+	rc = socket_ports_initialize(&udp_globals.sockets);
+	if (rc != EOK) {
+		fibril_rwlock_write_unlock(&udp_globals.lock);
+		return rc;
+	}
+	
+	rc = packet_dimensions_initialize(&udp_globals.dimensions);
+	if (rc != EOK) {
 		socket_ports_destroy(&udp_globals.sockets);
-		return ERROR_CODE;
-	}
+		fibril_rwlock_write_unlock(&udp_globals.lock);
+		return rc;
+	}
+	
 	udp_globals.packet_dimension.prefix += sizeof(udp_header_t);
 	udp_globals.packet_dimension.content -= sizeof(udp_header_t);
 	udp_globals.last_used_port = UDP_FREE_PORTS_START - 1;
 
-	// get configuration
 	udp_globals.checksum_computing = NET_DEFAULT_UDP_CHECKSUM_COMPUTING;
 	udp_globals.autobinding = NET_DEFAULT_UDP_AUTOBINDING;
+
+	// get configuration
 	configuration = &names[0];
-	ERROR_PROPAGATE(net_get_conf_req(udp_globals.net_phone, &configuration,
-	    count, &data));
+	rc = net_get_conf_req(udp_globals.net_phone, &configuration, count,
+	    &data);
+	if (rc != EOK) {
+		socket_ports_destroy(&udp_globals.sockets);
+		fibril_rwlock_write_unlock(&udp_globals.lock);
+		return rc;
+	}
+	
 	if (configuration) {
 		if (configuration[0].value)
@@ -280,22 +184,40 @@
 }
 
-int
-udp_received_msg(device_id_t device_id, packet_t packet, services_t receiver,
-    services_t error)
+/** Releases the packet and returns the result.
+ *
+ * @param[in] packet	The packet queue to be released.
+ * @param[in] result	The result to be returned.
+ * @return		The result parameter.
+ */
+static int udp_release_and_return(packet_t packet, int result)
 {
-	int result;
-
-	fibril_rwlock_write_lock(&udp_globals.lock);
-	result = udp_process_packet(device_id, packet, error);
-	if (result != EOK)
-		fibril_rwlock_write_unlock(&udp_globals.lock);
-
+	pq_release_remote(udp_globals.net_phone, packet_get_id(packet));
 	return result;
 }
 
-int udp_process_packet(device_id_t device_id, packet_t packet, services_t error)
+/** Processes the received UDP packet queue.
+ *
+ * Notifies the destination socket application.
+ * Releases the packet on error or sends an ICMP error notification.
+ *
+ * @param[in] device_id	The receiving device identifier.
+ * @param[in,out] packet The received packet queue.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet is not valid.
+ * @returns		EINVAL if the stored packet address is not the
+ *			an_addr_t.
+ * @returns		EINVAL if the packet does not contain any data.
+ * @returns 		NO_DATA if the packet content is shorter than the user
+ *			datagram header.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		EADDRNOTAVAIL if the destination socket does not exist.
+ * @returns		Other error codes as defined for the
+ *			ip_client_process_packet() function.
+ */
+static int
+udp_process_packet(device_id_t device_id, packet_t packet, services_t error)
 {
-	ERROR_DECLARE;
-
 	size_t length;
 	size_t offset;
@@ -314,23 +236,24 @@
 	struct sockaddr *dest;
 	packet_dimension_ref packet_dimension;
-
-	if (error) {
-		switch (error) {
-		case SERVICE_ICMP:
-			// ignore error
-			// length = icmp_client_header_length(packet);
-			// process error
-			result = icmp_client_process_packet(packet, &type,
-			    &code, NULL, NULL);
-			if (result < 0)
-				return udp_release_and_return(packet, result);
-			length = (size_t) result;
-			if (ERROR_OCCURRED(packet_trim(packet, length, 0)))
-				return udp_release_and_return(packet,
-				    ERROR_CODE);
-			break;
-		default:
-			return udp_release_and_return(packet, ENOTSUP);
-		}
+	int rc;
+
+	switch (error) {
+	case SERVICE_NONE:
+		break;
+	case SERVICE_ICMP:
+		// ignore error
+		// length = icmp_client_header_length(packet);
+		// process error
+		result = icmp_client_process_packet(packet, &type,
+		    &code, NULL, NULL);
+		if (result < 0)
+			return udp_release_and_return(packet, result);
+		length = (size_t) result;
+		rc = packet_trim(packet, length, 0);
+		if (rc != EOK)
+			return udp_release_and_return(packet, rc);
+		break;
+	default:
+		return udp_release_and_return(packet, ENOTSUP);
 	}
 
@@ -348,6 +271,7 @@
 
 	// trim all but UDP header
-	if (ERROR_OCCURRED(packet_trim(packet, offset, 0)))
-		return udp_release_and_return(packet, ERROR_CODE);
+	rc = packet_trim(packet, offset, 0);
+	if (rc != EOK)
+		return udp_release_and_return(packet, rc);
 
 	// get udp header
@@ -374,14 +298,14 @@
 
 	// compute header checksum if set
-	if (header->checksum && (!error)) {
+	if (header->checksum && !error) {
 		result = packet_get_addr(packet, (uint8_t **) &src,
 		    (uint8_t **) &dest);
-		if( result <= 0)
+		if (result <= 0)
 			return udp_release_and_return(packet, result);
-
-		if (ERROR_OCCURRED(ip_client_get_pseudo_header(IPPROTO_UDP,
-		    src, result, dest, result, total_length, &ip_header,
-		    &length))) {
-			return udp_release_and_return(packet, ERROR_CODE);
+		
+		rc = ip_client_get_pseudo_header(IPPROTO_UDP, src, result, dest,
+		    result, total_length, &ip_header, &length);
+		if (rc != EOK) {
+			return udp_release_and_return(packet, rc);
 		} else {
 			checksum = compute_checksum(0, ip_header, length);
@@ -396,5 +320,5 @@
 
 	do {
-		++ fragments;
+		fragments++;
 		length = packet_get_data_length(next_packet);
 		if (length <= 0)
@@ -402,9 +326,7 @@
 
 		if (total_length < length) {
-			if (ERROR_OCCURRED(packet_trim(next_packet, 0,
-			    length - total_length))) {
-				return udp_release_and_return(packet,
-				    ERROR_CODE);
-			}
+			rc = packet_trim(next_packet, 0, length - total_length);
+			if (rc != EOK)
+				return udp_release_and_return(packet, rc);
 
 			// add partial checksum if set
@@ -455,10 +377,13 @@
 
 	// queue the received packet
-	if (ERROR_OCCURRED(dyn_fifo_push(&socket->received,
-	    packet_get_id(packet), SOCKET_MAX_RECEIVED_SIZE)) ||
-	    ERROR_OCCURRED(tl_get_ip_packet_dimension(udp_globals.ip_phone,
-	    &udp_globals.dimensions, device_id, &packet_dimension))) {
-		return udp_release_and_return(packet, ERROR_CODE);
-	}
+	rc = dyn_fifo_push(&socket->received, packet_get_id(packet),
+	    SOCKET_MAX_RECEIVED_SIZE);
+	if (rc != EOK)
+		return udp_release_and_return(packet, rc);
+		
+	rc = tl_get_ip_packet_dimension(udp_globals.ip_phone,
+	    &udp_globals.dimensions, device_id, &packet_dimension);
+	if (rc != EOK)
+		return udp_release_and_return(packet, rc);
 
 	// notify the destination socket
@@ -471,31 +396,309 @@
 }
 
-int
-udp_message_standalone(ipc_callid_t callid, ipc_call_t * call,
-    ipc_call_t * answer, int * answer_count)
+/** Processes the received UDP packet queue.
+ *
+ * Is used as an entry point from the underlying IP module.
+ * Locks the global lock and calls udp_process_packet() function.
+ *
+ * @param[in] device_id	The receiving device identifier.
+ * @param[in,out] packet The received packet queue.
+ * @param receiver	The target service. Ignored parameter.
+ * @param[in] error	The packet error reporting service. Prefixes the
+ *			received packet.
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for the
+ *			udp_process_packet() function.
+ */
+static int
+udp_received_msg(device_id_t device_id, packet_t packet, services_t receiver,
+    services_t error)
 {
-	ERROR_DECLARE;
-
+	int result;
+
+	fibril_rwlock_write_lock(&udp_globals.lock);
+	result = udp_process_packet(device_id, packet, error);
+	if (result != EOK)
+		fibril_rwlock_write_unlock(&udp_globals.lock);
+
+	return result;
+}
+
+/** Sends data from the socket to the remote address.
+ *
+ * Binds the socket to a free port if not already connected/bound.
+ * Handles the NET_SOCKET_SENDTO message.
+ * Supports AF_INET and AF_INET6 address families.
+ *
+ * @param[in,out] local_sockets The application local sockets.
+ * @param[in] socket_id	Socket identifier.
+ * @param[in] addr	The destination address.
+ * @param[in] addrlen	The address length.
+ * @param[in] fragments	The number of data fragments.
+ * @param[out] data_fragment_size The data fragment size in bytes.
+ * @param[in] flags	Various send flags.
+ * @returns		EOK on success.
+ * @returns		EAFNOTSUPPORT if the address family is not supported.
+ * @returns		ENOTSOCK if the socket is not found.
+ * @returns		EINVAL if the address is invalid.
+ * @returns		ENOTCONN if the sending socket is not and cannot be
+ *			bound.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		Other error codes as defined for the
+ *			socket_read_packet_data() function.
+ * @returns		Other error codes as defined for the
+ *			ip_client_prepare_packet() function.
+ * @returns		Other error codes as defined for the ip_send_msg()
+ *			function.
+ */
+static int
+udp_sendto_message(socket_cores_ref local_sockets, int socket_id,
+    const struct sockaddr *addr, socklen_t addrlen, int fragments,
+    size_t *data_fragment_size, int flags)
+{
+	socket_core_ref socket;
 	packet_t packet;
-
-	*answer_count = 0;
-
-	switch (IPC_GET_METHOD(*call)) {
-	case NET_TL_RECEIVED:
-		if (!ERROR_OCCURRED(packet_translate_remote(
-		    udp_globals.net_phone, &packet, IPC_GET_PACKET(call)))) {
-			ERROR_CODE = udp_received_msg(IPC_GET_DEVICE(call),
-			    packet, SERVICE_UDP, IPC_GET_ERROR(call));
+	packet_t next_packet;
+	udp_header_ref header;
+	int index;
+	size_t total_length;
+	int result;
+	uint16_t dest_port;
+	uint32_t checksum;
+	void *ip_header;
+	size_t headerlen;
+	device_id_t device_id;
+	packet_dimension_ref packet_dimension;
+	int rc;
+	
+	rc = tl_get_address_port(addr, addrlen, &dest_port);
+	if (rc != EOK)
+		return rc;
+
+	socket = socket_cores_find(local_sockets, socket_id);
+	if (!socket)
+		return ENOTSOCK;
+
+	if ((socket->port <= 0) && udp_globals.autobinding) {
+		// bind the socket to a random free port if not bound
+		rc = socket_bind_free_port(&udp_globals.sockets, socket,
+		    UDP_FREE_PORTS_START, UDP_FREE_PORTS_END,
+		    udp_globals.last_used_port);
+		if (rc != EOK)
+			return rc;
+		// set the next port as the search starting port number
+		udp_globals.last_used_port = socket->port;
+	}
+
+	if (udp_globals.checksum_computing) {
+		rc = ip_get_route_req(udp_globals.ip_phone, IPPROTO_UDP, addr,
+		    addrlen, &device_id, &ip_header, &headerlen);
+		if (rc != EOK)
+			return rc;
+		// get the device packet dimension
+//		rc = tl_get_ip_packet_dimension(udp_globals.ip_phone,
+//		    &udp_globals.dimensions, device_id, &packet_dimension);
+//		if (rc != EOK)
+//			return rc;
+	}
+//	} else {
+		// do not ask all the time
+		rc = ip_packet_size_req(udp_globals.ip_phone, -1,
+		    &udp_globals.packet_dimension);
+		if (rc != EOK)
+			return rc;
+		packet_dimension = &udp_globals.packet_dimension;
+//	}
+
+	// read the first packet fragment
+	result = tl_socket_read_packet_data(udp_globals.net_phone, &packet,
+	    UDP_HEADER_SIZE, packet_dimension, addr, addrlen);
+	if (result < 0)
+		return result;
+
+	total_length = (size_t) result;
+	if (udp_globals.checksum_computing)
+		checksum = compute_checksum(0, packet_get_data(packet),
+		    packet_get_data_length(packet));
+	else
+		checksum = 0;
+
+	// prefix the udp header
+	header = PACKET_PREFIX(packet, udp_header_t);
+	if (!header)
+		return udp_release_and_return(packet, ENOMEM);
+
+	bzero(header, sizeof(*header));
+	// read the rest of the packet fragments
+	for (index = 1; index < fragments; index++) {
+		result = tl_socket_read_packet_data(udp_globals.net_phone,
+		    &next_packet, 0, packet_dimension, addr, addrlen);
+		if (result < 0)
+			return udp_release_and_return(packet, result);
+
+		rc = pq_add(&packet, next_packet, index, 0);
+		if (rc != EOK)
+			return udp_release_and_return(packet, rc);
+
+		total_length += (size_t) result;
+		if (udp_globals.checksum_computing) {
+			checksum = compute_checksum(checksum,
+			    packet_get_data(next_packet),
+			    packet_get_data_length(next_packet));
 		}
-		return ERROR_CODE;
+	}
+
+	// set the udp header
+	header->source_port = htons((socket->port > 0) ? socket->port : 0);
+	header->destination_port = htons(dest_port);
+	header->total_length = htons(total_length + sizeof(*header));
+	header->checksum = 0;
+	if (udp_globals.checksum_computing) {
+		// update the pseudo header
+		rc = ip_client_set_pseudo_header_data_length(ip_header,
+		    headerlen, total_length + UDP_HEADER_SIZE);
+		if (rc != EOK) {
+			free(ip_header);
+			return udp_release_and_return(packet, rc);
+		}
+
+		// finish the checksum computation
+		checksum = compute_checksum(checksum, ip_header, headerlen);
+		checksum = compute_checksum(checksum, (uint8_t *) header,
+		    sizeof(*header));
+		header->checksum =
+		    htons(flip_checksum(compact_checksum(checksum)));
+		free(ip_header);
+	} else {
+		device_id = DEVICE_INVALID_ID;
+	}
+
+	// prepare the first packet fragment
+	rc = ip_client_prepare_packet(packet, IPPROTO_UDP, 0, 0, 0, 0);
+	if (rc != EOK)
+		return udp_release_and_return(packet, rc);
+
+	/* Release the UDP global lock on success. */
+	fibril_rwlock_write_unlock(&udp_globals.lock);
+
+	// send the packet
+	ip_send_msg(udp_globals.ip_phone, device_id, packet, SERVICE_UDP, 0);
+
+	return EOK;
+}
+
+/** Receives data to the socket.
+ *
+ * Handles the NET_SOCKET_RECVFROM message.
+ * Replies the source address as well.
+ *
+ * @param[in] local_sockets The application local sockets.
+ * @param[in] socket_id	Socket identifier.
+ * @param[in] flags	Various receive flags.
+ * @param[out] addrlen	The source address length.
+ * @returns		The number of bytes received.
+ * @returns		ENOTSOCK if the socket is not found.
+ * @returns		NO_DATA if there are no received packets or data.
+ * @returns		ENOMEM if there is not enough memory left.
+ * @returns		EINVAL if the received address is not an IP address.
+ * @returns		Other error codes as defined for the packet_translate()
+ *			function.
+ * @returns		Other error codes as defined for the data_reply()
+ *			function.
+ */
+static int
+udp_recvfrom_message(socket_cores_ref local_sockets, int socket_id, int flags,
+    size_t *addrlen)
+{
+	socket_core_ref socket;
+	int packet_id;
+	packet_t packet;
+	udp_header_ref header;
+	struct sockaddr *addr;
+	size_t length;
+	uint8_t *data;
+	int result;
+	int rc;
+
+	// find the socket
+	socket = socket_cores_find(local_sockets, socket_id);
+	if (!socket)
+		return ENOTSOCK;
+
+	// get the next received packet
+	packet_id = dyn_fifo_value(&socket->received);
+	if (packet_id < 0)
+		return NO_DATA;
 	
-	case IPC_M_CONNECT_TO_ME:
-		return udp_process_client_messages(callid, * call);
-	}
-
-	return ENOTSUP;
+	rc = packet_translate_remote(udp_globals.net_phone, &packet, packet_id);
+	if (rc != EOK) {
+		(void) dyn_fifo_pop(&socket->received);
+		return rc;
+	}
+
+	// get udp header
+	data = packet_get_data(packet);
+	if (!data) {
+		(void) dyn_fifo_pop(&socket->received);
+		return udp_release_and_return(packet, NO_DATA);
+	}
+	header = (udp_header_ref) data;
+
+	// set the source address port
+	result = packet_get_addr(packet, (uint8_t **) &addr, NULL);
+	rc = tl_set_address_port(addr, result, ntohs(header->source_port));
+	if (rc != EOK) {
+		(void) dyn_fifo_pop(&socket->received);
+		return udp_release_and_return(packet, rc);
+	}
+	*addrlen = (size_t) result;
+
+	// send the source address
+	rc = data_reply(addr, *addrlen);
+	switch (rc) {
+	case EOK:
+		break;
+	case EOVERFLOW:
+		return rc;
+	default:
+		(void) dyn_fifo_pop(&socket->received);
+		return udp_release_and_return(packet, rc);
+	}
+
+	// trim the header
+	rc = packet_trim(packet, UDP_HEADER_SIZE, 0);
+	if (rc != EOK) {
+		(void) dyn_fifo_pop(&socket->received);
+		return udp_release_and_return(packet, rc);
+	}
+
+	// reply the packets
+	rc = socket_reply_packets(packet, &length);
+	switch (rc) {
+	case EOK:
+		break;
+	case EOVERFLOW:
+		return rc;
+	default:
+		(void) dyn_fifo_pop(&socket->received);
+		return udp_release_and_return(packet, rc);
+	}
+
+	(void) dyn_fifo_pop(&socket->received);
+
+	// release the packet and return the total length
+	return udp_release_and_return(packet, (int) length);
 }
 
-int udp_process_client_messages(ipc_callid_t callid, ipc_call_t call)
+/** Processes the socket client messages.
+ *
+ * Runs until the client module disconnects.
+ *
+ * @param[in] callid 	The message identifier.
+ * @param[in] call	The message parameters.
+ * @returns		EOK on success.
+ *
+ * @see	socket.h
+ */
+static int udp_process_client_messages(ipc_callid_t callid, ipc_call_t call)
 {
 	int res;
@@ -638,223 +841,45 @@
 }
 
+/** Processes the UDP message.
+ *
+ * @param[in] callid	The message identifier.
+ * @param[in] call	The message parameters.
+ * @param[out] answer	The message answer parameters.
+ * @param[out] answer_count The last parameter for the actual answer in the
+ *			answer parameter.
+ * @returns		EOK on success.
+ * @returns		ENOTSUP if the message is not known.
+ *
+ * @see udp_interface.h
+ * @see IS_NET_UDP_MESSAGE()
+ */
 int
-udp_sendto_message(socket_cores_ref local_sockets, int socket_id,
-    const struct sockaddr *addr, socklen_t addrlen, int fragments,
-    size_t *data_fragment_size, int flags)
+udp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
 {
-	ERROR_DECLARE;
-
-	socket_core_ref socket;
 	packet_t packet;
-	packet_t next_packet;
-	udp_header_ref header;
-	int index;
-	size_t total_length;
-	int result;
-	uint16_t dest_port;
-	uint32_t checksum;
-	void *ip_header;
-	size_t headerlen;
-	device_id_t device_id;
-	packet_dimension_ref packet_dimension;
-
-	ERROR_PROPAGATE(tl_get_address_port(addr, addrlen, &dest_port));
-
-	socket = socket_cores_find(local_sockets, socket_id);
-	if (!socket)
-		return ENOTSOCK;
-
-	if ((socket->port <= 0) && udp_globals.autobinding) {
-		// bind the socket to a random free port if not bound
-//		do {
-			// try to find a free port
-//			fibril_rwlock_read_unlock(&udp_globals.lock);
-//			fibril_rwlock_write_lock(&udp_globals.lock);
-			// might be changed in the meantime
-//			if (socket->port <= 0) {
-				if (ERROR_OCCURRED(socket_bind_free_port(
-				    &udp_globals.sockets, socket,
-				    UDP_FREE_PORTS_START, UDP_FREE_PORTS_END,
-				    udp_globals.last_used_port))) {
-//					fibril_rwlock_write_unlock(
-//					    &udp_globals.lock);
-//					fibril_rwlock_read_lock(
-//					    &udp_globals.lock);
-					return ERROR_CODE;
-				}
-				// set the next port as the search starting port
-				// number
-				udp_globals.last_used_port = socket->port;
-//			}
-//			fibril_rwlock_write_unlock(&udp_globals.lock);
-//			fibril_rwlock_read_lock(&udp_globals.lock);
-			// might be changed in the meantime
-//		} while (socket->port <= 0);
-	}
-
-	if (udp_globals.checksum_computing) {
-		if (ERROR_OCCURRED(ip_get_route_req(udp_globals.ip_phone,
-		    IPPROTO_UDP, addr, addrlen, &device_id, &ip_header,
-		    &headerlen))) {
-			return udp_release_and_return(packet, ERROR_CODE);
-		}
-		// get the device packet dimension
-//		ERROR_PROPAGATE(tl_get_ip_packet_dimension(udp_globals.ip_phone,
-//		    &udp_globals.dimensions, device_id, &packet_dimension));
-	}
-//	} else {
-		// do not ask all the time
-		ERROR_PROPAGATE(ip_packet_size_req(udp_globals.ip_phone, -1,
-		    &udp_globals.packet_dimension));
-		packet_dimension = &udp_globals.packet_dimension;
-//	}
-
-	// read the first packet fragment
-	result = tl_socket_read_packet_data(udp_globals.net_phone, &packet,
-	    UDP_HEADER_SIZE, packet_dimension, addr, addrlen);
-	if (result < 0)
-		return result;
-
-	total_length = (size_t) result;
-	if (udp_globals.checksum_computing)
-		checksum = compute_checksum(0, packet_get_data(packet),
-		    packet_get_data_length(packet));
-	else
-		checksum = 0;
-
-	// prefix the udp header
-	header = PACKET_PREFIX(packet, udp_header_t);
-	if(! header)
-		return udp_release_and_return(packet, ENOMEM);
-
-	bzero(header, sizeof(*header));
-	// read the rest of the packet fragments
-	for (index = 1; index < fragments; ++ index) {
-		result = tl_socket_read_packet_data(udp_globals.net_phone,
-		    &next_packet, 0, packet_dimension, addr, addrlen);
-		if (result < 0)
-			return udp_release_and_return(packet, result);
-
-		if (ERROR_OCCURRED(pq_add(&packet, next_packet, index, 0)))
-			return udp_release_and_return(packet, ERROR_CODE);
-
-		total_length += (size_t) result;
-		if (udp_globals.checksum_computing) {
-			checksum = compute_checksum(checksum,
-			    packet_get_data(next_packet),
-			    packet_get_data_length(next_packet));
-		}
-	}
-
-	// set the udp header
-	header->source_port = htons((socket->port > 0) ? socket->port : 0);
-	header->destination_port = htons(dest_port);
-	header->total_length = htons(total_length + sizeof(*header));
-	header->checksum = 0;
-	if (udp_globals.checksum_computing) {
-		// update the pseudo header
-		if (ERROR_OCCURRED(ip_client_set_pseudo_header_data_length(
-		    ip_header, headerlen, total_length + UDP_HEADER_SIZE))) {
-			free(ip_header);
-			return udp_release_and_return(packet, ERROR_CODE);
-		}
-
-		// finish the checksum computation
-		checksum = compute_checksum(checksum, ip_header, headerlen);
-		checksum = compute_checksum(checksum, (uint8_t *) header,
-		    sizeof(*header));
-		header->checksum =
-		    htons(flip_checksum(compact_checksum(checksum)));
-		free(ip_header);
-	} else {
-		device_id = DEVICE_INVALID_ID;
-	}
-
-	// prepare the first packet fragment
-	if (ERROR_OCCURRED(ip_client_prepare_packet(packet, IPPROTO_UDP, 0, 0,
-	    0, 0))) {
-		return udp_release_and_return(packet, ERROR_CODE);
-	}
-
-	// send the packet
-	fibril_rwlock_write_unlock(&udp_globals.lock);
-	ip_send_msg(udp_globals.ip_phone, device_id, packet, SERVICE_UDP, 0);
-
-	return EOK;
+	int rc;
+
+	*answer_count = 0;
+
+	switch (IPC_GET_METHOD(*call)) {
+	case NET_TL_RECEIVED:
+		rc = packet_translate_remote(udp_globals.net_phone, &packet,
+		    IPC_GET_PACKET(call));
+		if (rc != EOK)
+			return rc;
+		return udp_received_msg(IPC_GET_DEVICE(call), packet,
+		    SERVICE_UDP, IPC_GET_ERROR(call));
+	case IPC_M_CONNECT_TO_ME:
+		return udp_process_client_messages(callid, * call);
+	}
+
+	return ENOTSUP;
 }
 
-int
-udp_recvfrom_message(socket_cores_ref local_sockets, int socket_id, int flags,
-    size_t *addrlen)
-{
-	ERROR_DECLARE;
-
-	socket_core_ref socket;
-	int packet_id;
-	packet_t packet;
-	udp_header_ref header;
-	struct sockaddr *addr;
-	size_t length;
-	uint8_t *data;
-	int result;
-
-	// find the socket
-	socket = socket_cores_find(local_sockets, socket_id);
-	if (!socket)
-		return ENOTSOCK;
-
-	// get the next received packet
-	packet_id = dyn_fifo_value(&socket->received);
-	if (packet_id < 0)
-		return NO_DATA;
-
-	ERROR_PROPAGATE(packet_translate_remote(udp_globals.net_phone, &packet,
-	    packet_id));
-
-	// get udp header
-	data = packet_get_data(packet);
-	if (!data) {
-		pq_release_remote(udp_globals.net_phone, packet_id);
-		return NO_DATA;
-	}
-	header = (udp_header_ref) data;
-
-	// set the source address port
-	result = packet_get_addr(packet, (uint8_t **) &addr, NULL);
-	if (ERROR_OCCURRED(tl_set_address_port(addr, result,
-	    ntohs(header->source_port)))) {
-		pq_release_remote(udp_globals.net_phone, packet_id);
-		return ERROR_CODE;
-	}
-	*addrlen = (size_t) result;
-
-	// send the source address
-	ERROR_PROPAGATE(data_reply(addr, * addrlen));
-
-	// trim the header
-	ERROR_PROPAGATE(packet_trim(packet, UDP_HEADER_SIZE, 0));
-
-	// reply the packets
-	ERROR_PROPAGATE(socket_reply_packets(packet, &length));
-
-	// release the packet
-	dyn_fifo_pop(&socket->received);
-	pq_release_remote(udp_globals.net_phone, packet_get_id(packet));
-
-	// return the total length
-	return (int) length;
-}
-
-int udp_release_and_return(packet_t packet, int result)
-{
-	pq_release_remote(udp_globals.net_phone, packet_get_id(packet));
-	return result;
-}
-
 /** Default thread for new connections.
  *
- *  @param[in] iid	The initial message identifier.
- *  @param[in] icall	The initial message call structure.
- *
+ * @param[in] iid	The initial message identifier.
+ * @param[in] icall	The initial message call structure.
  */
 static void tl_client_connection(ipc_callid_t iid, ipc_call_t * icall)
@@ -882,5 +907,6 @@
 		
 		/*
-		 * End if said to either by the message or the processing result
+		 * End if told to either by the message or the processing
+		 * result.
 		 */
 		if ((IPC_GET_METHOD(call) == IPC_M_PHONE_HUNGUP) ||
@@ -895,21 +921,15 @@
 /** Starts the module.
  *
- *  @param argc		The count of the command line arguments. Ignored
- *			parameter.
- *  @param argv		The command line parameters. Ignored parameter.
- *
- *  @returns		EOK on success.
- *  @returns		Other error codes as defined for each specific module
+ * @returns		EOK on success.
+ * @returns		Other error codes as defined for each specific module
  *			start function.
  */
 int main(int argc, char *argv[])
 {
-	ERROR_DECLARE;
+	int rc;
 	
 	/* Start the module */
-	if (ERROR_OCCURRED(tl_module_start_standalone(tl_client_connection)))
-		return ERROR_CODE;
-	
-	return EOK;
+	rc = tl_module_start_standalone(tl_client_connection);
+	return rc;
 }
 
Index: uspace/srv/net/tl/udp/udp.h
===================================================================
--- uspace/srv/net/tl/udp/udp.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/udp/udp.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,13 +28,13 @@
 
 /** @addtogroup udp
- *  @{
+ * @{
  */
 
 /** @file
- *  UDP module.
+ * UDP module.
  */
 
-#ifndef __NET_UDP_H__
-#define __NET_UDP_H__
+#ifndef NET_UDP_H_
+#define NET_UDP_H_
 
 #include <fibril_synch.h>
@@ -43,40 +43,29 @@
 
 /** Type definition of the UDP global data.
- *  @see udp_globals
+ * @see udp_globals
  */
-typedef struct udp_globals	udp_globals_t;
+typedef struct udp_globals udp_globals_t;
 
-/** UDP global data.
- */
-struct	udp_globals{
-	/** Networking module phone.
-	 */
+/** UDP global data. */
+struct udp_globals {
+	/** Networking module phone. */
 	int net_phone;
-	/** IP module phone.
-	 */
+	/** IP module phone. */
 	int ip_phone;
-	/** ICMP module phone.
-	 */
+	/** ICMP module phone. */
 	int icmp_phone;
-	/** Packet dimension.
-	 */
+	/** Packet dimension. */
 	packet_dimension_t packet_dimension;
-	/** Indicates whether UDP checksum computing is enabled.
-	 */
+	/** Indicates whether UDP checksum computing is enabled. */
 	int checksum_computing;
-	/** Indicates whether UDP autobnding on send is enabled.
-	 */
+	/** Indicates whether UDP autobnding on send is enabled. */
 	int autobinding;
-	/** Last used free port.
-	 */
+	/** Last used free port. */
 	int last_used_port;
-	/** Active sockets.
-	 */
+	/** Active sockets. */
 	socket_ports_t sockets;
-	/** Device packet dimensions.
-	 */
+	/** Device packet dimensions. */
 	packet_dimensions_t dimensions;
-	/** Safety lock.
-	 */
+	/** Safety lock. */
 	fibril_rwlock_t lock;
 };
@@ -86,3 +75,2 @@
 /** @}
  */
-
Index: uspace/srv/net/tl/udp/udp_header.h
===================================================================
--- uspace/srv/net/tl/udp/udp_header.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/udp/udp_header.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,51 +28,35 @@
 
 /** @addtogroup udp
- *  @{
+ * @{
  */
 
 /** @file
- *  UDP header definition.
- *  Based on the RFC~768.
+ * UDP header definition.
+ * Based on the RFC 768.
  */
 
-#ifndef __NET_UDP_HEADER_H__
-#define __NET_UDP_HEADER_H__
+#ifndef NET_UDP_HEADER_H_
+#define NET_UDP_HEADER_H_
 
 #include <sys/types.h>
 
-/** UDP header size in bytes.
- */
-#define UDP_HEADER_SIZE			sizeof(udp_header_t)
+/** UDP header size in bytes. */
+#define UDP_HEADER_SIZE		sizeof(udp_header_t)
 
 /** Type definition of the user datagram header.
- *  @see udp_header
+ * @see udp_header
  */
-typedef struct udp_header	udp_header_t;
+typedef struct udp_header udp_header_t;
 
 /** Type definition of the user datagram header pointer.
- *  @see udp_header
+ * @see udp_header
  */
-typedef udp_header_t *		udp_header_ref;
+typedef udp_header_t *udp_header_ref;
 
-/** User datagram header.
- */
-struct udp_header{
-	/** Source Port is an optional field, when meaningful, it indicates the port of the sending process, and may be assumed to be the port to which a reply should be addressed in the absence of any other information.
-	 *  If not used, a value of zero is inserted.
-	 */
+/** User datagram header. */
+struct udp_header {
 	uint16_t source_port;
-	/** Destination port has a meaning within the context of a particular internet destination address.
-	 */
 	uint16_t destination_port;
-	/** Length is the length in octets of this user datagram including this header and the data.
-	 *  This means the minimum value of the length is eight.
-	 */
 	uint16_t total_length;
-	/** Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the UDP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets.
-	 *  The pseudo header conceptually prefixed to the UDP header contains the source address, the destination address, the protocol, and the UDP length.
-	 *  This information gives protection against misrouted datagrams.
-	 *  If the computed checksum is zero, it is transmitted as all ones (the equivalent in one's complement arithmetic).
-	 *  An all zero transmitted checksum value means that the transmitter generated no checksum (for debugging or for higher level protocols that don't care).
-	 */
 	uint16_t checksum;
 } __attribute__ ((packed));
Index: uspace/srv/net/tl/udp/udp_module.c
===================================================================
--- uspace/srv/net/tl/udp/udp_module.c	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/udp/udp_module.c	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,17 +28,21 @@
 
 /** @addtogroup udp
- *  @{
+ * @{
  */
 
 /** @file
- *  UDP standalone module implementation.
- *  Contains skeleton module functions mapping.
- *  The functions are used by the module skeleton as module specific entry points.
- *  @see module.c
+ * UDP standalone module implementation.
+ * Contains skeleton module functions mapping.
+ * The functions are used by the module skeleton as module specific entry
+ * points.
+ * @see module.c
  */
+
+#include "udp.h"
+#include "udp_module.h"
 
 #include <async.h>
 #include <stdio.h>
-#include <err.h>
+#include <errno.h>
 #include <ipc/ipc.h>
 #include <ipc/services.h>
@@ -46,53 +50,44 @@
 #include <net/modules.h>
 #include <net/packet.h>
+
 #include <net_interface.h>
 #include <tl_local.h>
 
-#include "udp.h"
-#include "udp_module.h"
+/** UDP module global data. */
+extern udp_globals_t udp_globals;
 
-/** UDP module global data.
- */
-extern udp_globals_t	udp_globals;
-
-/** Starts the UDP module.
- *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on successful module termination.
- *  @returns Other error codes as defined for the udp_initialize() function.
- *  @returns Other error codes as defined for the REGISTER_ME() macro function.
- */
-int tl_module_start_standalone(async_client_conn_t client_connection){
-	ERROR_DECLARE;
-
+int tl_module_start_standalone(async_client_conn_t client_connection)
+{
 	ipcarg_t phonehash;
+	int rc;
 
 	async_set_client_connection(client_connection);
 	udp_globals.net_phone = net_connect_module();
-	if(udp_globals.net_phone < 0){
+	if (udp_globals.net_phone < 0)
 		return udp_globals.net_phone;
-	}
-	ERROR_PROPAGATE(pm_init());
-	if(ERROR_OCCURRED(udp_initialize(client_connection))
-		|| ERROR_OCCURRED(REGISTER_ME(SERVICE_UDP, &phonehash))){
-		pm_destroy();
-		return ERROR_CODE;
-	}
+	
+	rc = pm_init();
+	if (rc != EOK)
+		return EOK;
+		
+	rc = udp_initialize(client_connection);
+	if (rc != EOK)
+		goto out;
+	
+	rc = REGISTER_ME(SERVICE_UDP, &phonehash);
+	if (rc != EOK)
+		goto out;
 
 	async_manager();
 
+out:
 	pm_destroy();
-	return EOK;
+	return rc;
 }
 
-/** Processes the UDP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns Other error codes as defined for the udp_message() function.
- */
-int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
+int
+tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
+    ipc_call_t *answer, int *answer_count)
+{
 	return udp_message_standalone(callid, call, answer, answer_count);
 }
Index: uspace/srv/net/tl/udp/udp_module.h
===================================================================
--- uspace/srv/net/tl/udp/udp_module.h	(revision 9414abc19106996bac61d12354e75953aa14bf29)
+++ uspace/srv/net/tl/udp/udp_module.h	(revision 32efd865176bfa9c946bb85353ec87e270ab1dda)
@@ -28,36 +28,21 @@
 
 /** @addtogroup udp
- *  @{
+ * @{
  */
 
 /** @file
- *  UDP module functions.
- *  The functions are used as UDP module entry points.
+ * UDP module functions.
+ * The functions are used as UDP module entry points.
  */
 
-#ifndef __NET_UDP_MODULE_H__
-#define __NET_UDP_MODULE_H__
+#ifndef NET_UDP_MODULE_H_
+#define NET_UDP_MODULE_H_
 
 #include <async.h>
 #include <ipc/ipc.h>
 
-/** Initializes the UDP module.
- *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
- *  @returns EOK on success.
- *  @returns ENOMEM if there is not enough memory left.
- */
-extern int udp_initialize(async_client_conn_t client_connection);
-
-/** Processes the UDP message.
- *  @param[in] callid The message identifier.
- *  @param[in] call The message parameters.
- *  @param[out] answer The message answer parameters.
- *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
- *  @returns EOK on success.
- *  @returns ENOTSUP if the message is not known.
- *  @see udp_interface.h
- *  @see IS_NET_UDP_MESSAGE()
- */
-extern int udp_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
+extern int udp_initialize(async_client_conn_t);
+extern int udp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
+    int *);
 
 #endif
