+ if (sap_addrtype) {
+ struct in6_addr in6addr;
+
+ memcpy(in6addr.in6_u.u6_addr8, sender_address, 16);
+ if (!(sdpinfo->host = (char*)inet_ntop(AF_INET6, &in6addr, hostbuf, INET6_ADDRSTRLEN))) {
+ perror("inet_ntop");
+ continue;
+ }
+ } else {
+ struct in_addr inaddr;
+
+ inaddr.s_addr = *((in_addr_t*)sender_address);
+ if (!(sdpinfo->host = (char*)inet_ntop(AF_INET, &inaddr, hostbuf, INET6_ADDRSTRLEN))) {
+ perror("inet_ntop");
+ continue;
+ }
+ }