Index: uspace/srv/net/udp/pdu.c
===================================================================
--- uspace/srv/net/udp/pdu.c	(revision 695b6ff32cdb5ebb7fa100f5cba53b124a106990)
+++ uspace/srv/net/udp/pdu.c	(revision c2a698383608df44fde7e7cb4047a416d8688eee)
@@ -85,19 +85,19 @@
 }
 
-static uint16_t udp_phdr_setup(udp_pdu_t *pdu, udp_phdr_t *phdr,
+static ip_ver_t udp_phdr_setup(udp_pdu_t *pdu, udp_phdr_t *phdr,
     udp_phdr6_t *phdr6)
 {
 	addr32_t src_v4;
 	addr128_t src_v6;
-	uint16_t src_af = inet_addr_get(&pdu->src, &src_v4, &src_v6);
-	
+	ip_ver_t src_ver = inet_addr_get(&pdu->src, &src_v4, &src_v6);
+
 	addr32_t dest_v4;
 	addr128_t dest_v6;
-	uint16_t dest_af = inet_addr_get(&pdu->dest, &dest_v4, &dest_v6);
-	
-	assert(src_af == dest_af);
-	
-	switch (src_af) {
-	case AF_INET:
+	ip_ver_t dest_ver = inet_addr_get(&pdu->dest, &dest_v4, &dest_v6);
+
+	assert(src_ver == dest_ver);
+
+	switch (src_ver) {
+	case ip_v4:
 		phdr->src_addr = host2uint32_t_be(src_v4);
 		phdr->dest_addr = host2uint32_t_be(dest_v4);
@@ -106,5 +106,5 @@
 		phdr->udp_length = host2uint16_t_be(pdu->data_size);
 		break;
-	case AF_INET6:
+	case ip_v6:
 		host2addr128_t_be(src_v6, phdr6->src_addr);
 		host2addr128_t_be(dest_v6, phdr6->dest_addr);
@@ -116,6 +116,6 @@
 		assert(false);
 	}
-	
-	return src_af;
+
+	return src_ver;
 }
 
@@ -136,12 +136,12 @@
 	udp_phdr_t phdr;
 	udp_phdr6_t phdr6;
-	
-	uint16_t af = udp_phdr_setup(pdu, &phdr, &phdr6);
-	switch (af) {
-	case AF_INET:
+
+	ip_ver_t ver = udp_phdr_setup(pdu, &phdr, &phdr6);
+	switch (ver) {
+	case ip_v4:
 		cs_phdr = udp_checksum_calc(UDP_CHECKSUM_INIT, (void *) &phdr,
 		    sizeof(udp_phdr_t));
 		break;
-	case AF_INET6:
+	case ip_v6:
 		cs_phdr = udp_checksum_calc(UDP_CHECKSUM_INIT, (void *) &phdr6,
 		    sizeof(udp_phdr6_t));
@@ -150,5 +150,5 @@
 		assert(false);
 	}
-	
+
 	return udp_checksum_calc(cs_phdr, pdu->data, pdu->data_size);
 }
