Retrieve IPv6 addresses in Upnp_Discovery.

Changing sockaddr_in into sockaddr_storage in Upnp_Discovery to be able
to retrieve IPv6 addresses of devices in Control Points using pupnp.
This commit is contained in:
Fabrice Fontaine 2012-01-10 21:40:25 +01:00 committed by Marcelo Roberto Jimenez
parent 80a65e5f61
commit 03bd7759cd
3 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,13 @@
Version 1.6.15
*******************************************************************************
2012-01-11 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Retrieve IPv6 addresses in Upnp_Discovery.
Changing sockaddr_in into sockaddr_storage in Upnp_Discovery to be able
to retrieve IPv6 addresses of devices in Control Points using pupnp.
2012-01-04 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
Bug fix for IPv4-mapped IPv6 addresses.

View File

@ -5,7 +5,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (C) 2011 France Telecom All rights reserved.
* Copyright (C) 2011-2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@ -756,7 +756,7 @@ struct Upnp_Discovery
char Ext[LINE_SIZE];
/** The host address of the device responding to the search. */
struct sockaddr_in DestAddr;
struct sockaddr_storage DestAddr;
};
/** Returned along with a {\bf UPNP_EVENT_SUBSCRIBE_COMPLETE} or {\bf

View File

@ -2,6 +2,7 @@
*
* Copyright (c) 2000-2003 Intel Corporation
* All rights reserved.
* Copyright (C) 2012 France Telecom All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@ -128,7 +129,7 @@ void ssdp_handle_ctrlpt_msg(http_message_t *hmsg, struct sockaddr_storage *dest_
linecopylen(param.Date, hdr_value.buf, hdr_value.length);
}
/* dest addr */
memcpy(&param.DestAddr, dest_addr, sizeof(struct sockaddr_in));
memcpy(&param.DestAddr, dest_addr, sizeof(struct sockaddr_storage));
/* EXT */
param.Ext[0] = '\0';
if (httpmsg_find_hdr(hmsg, HDR_EXT, &hdr_value) != NULL) {